diff --git a/lib/direct-node.min.js b/lib/direct-node.min.js index 427d6fb..31949c1 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function s(){return Fa.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new o,require("unorm")};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(ro.host=e.host,ro.endpoint=e.endpoint,ro.accessToken=e.access_token,ro.proxyURL=e.proxyURL,ro.account=e.account,ro.talkWithBot=e.talkWithBot,ro.acceptableEventTimeDiff=e.acceptableEventTimeDiff,ro.name=e.name,ro.storagePath=e.storage_path,ro.storageQuota=e.storage_quota,ro.wsConfig=e.ws_config),Fi._d("["+qe.dateStr(new Date)+"] ","current settings",ro,"","",""),null==ro.accessToken&&Fi._e("["+qe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},announce:function(e,t){var n,i=e.room;if(null!=i){var r,a=i.split("_");if(2=e.length);){if(!this.matchSub(e,n)){i+=K.string(qe.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(qe.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(qe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},W.startsWith=function(e,t){return e.length>=t.length&&qe.substr(e,0,t.length)==t},W.isSpace=function(e,t){var n=qe.cca(e,t);return 8>>=4););if(null!=t)for(;n.lengthn;){var t=qe.substr(e,0,n);i.push(t),e=qe.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=sa._mul(o,l),_=sa._mul(s,l),h=sa._mul(o,u),d=c,f=(sa._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,sa.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,sa.ucompare(d,_)<0){f++;f|=0}f=f+(sa._mul(t.low,n.high)+sa._mul(t.high,n.low)|0)|0;var m=new jn(f,d),p=new jn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(sa.ucompare(v,m.low)<0){g++;g|=0}t=new jn(g,v)}return t},Je.getHigh=function(e){return e.high},Je.getLow=function(e){return e.low},Je.idStr=function(e){return"_"+e.high+"_"+e.low},Je.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new jn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},Je.toStr=function(e){return la.toString(e)},Je.isNeg=function(e){return e.high<0},Je.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(sa.ucompare(i,e.low)<0){n++;n|=0}return new jn(n,i)},Je.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(sa.ucompare(e.low,t.low)<0){n--;n|=0}return new jn(n,i)},Je.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:sa.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Je.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Je.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Je.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Ze.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:Te});var Ie=function(){U.call(this)};(n["albero.command.UrlCommand"]=Ie).__name__=["albero","command","UrlCommand"],Ie.__super__=U,Ie.prototype=i(U.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Ie});var Ee=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};Ee.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=Ee,t.toString=s,t},Ee.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=Ee,t.toString=s,t},Ee.BACK=["BACK",2],Ee.BACK.toString=s,(Ee.BACK.__enum__=Ee).__empty_constructs__=[Ee.BACK];function Ne(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Ne).__name__=["albero","entity","Account"],Ne.prototype={__class__:Ne};function et(e){null!=e&&(this.id=e.id,this.group=new Ae(e.group),this.profilePolicy=new be(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=et).__name__=["albero","entity","AccountControlGroup"],et.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:et};var Ae=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ae).__name__=["albero","entity","AccountControlGroupGroup"],Ae.prototype={__class__:Ae};var be=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=be).__name__=["albero","entity","AccountControlGroupProfilePolicy"],be.prototype={__class__:be};function tt(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ae(e.group)),null!=e.profile_policy&&(this.profilePolicy=new be(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=tt).__name__=["albero","entity","AccountControlGroupPartialUpdate"],tt.prototype={__class__:tt};function nt(e){null!=e&&(this.id=Je.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=nt).__name__=["albero","entity","AccountControlRequest"],nt.prototype={__class__:nt};var De=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};De.ng=["ng",0],De.ng.toString=s,(De.ng.__enum__=De).ok=["ok",1],De.ok.toString=s,(De.ok.__enum__=De).image=["image",2],De.image.toString=s,(De.image.__enum__=De).imageOrVideo=["imageOrVideo",3],De.imageOrVideo.toString=s,(De.imageOrVideo.__enum__=De).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],De.imageOrVideoOrAudio.toString=s,(De.imageOrVideoOrAudio.__enum__=De).other=["other",5],De.other.toString=s,(De.other.__enum__=De).__empty_constructs__=[De.ng,De.ok,De.image,De.imageOrVideo,De.imageOrVideoOrAudio,De.other];function ke(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=ke).__name__=["albero","entity","AllowAttachmentType"],ke.fromInt=function(e){if(null==e)return new ke(De.other);var t;if(null==e)t=De.other;else switch(e){case 0:t=De.ng;break;case 1:t=De.ok;break;case 2:t=De.image;break;case 3:t=De.imageOrVideo;break;case 4:t=De.imageOrVideoOrAudio;break;default:t=De.other}return new ke(t)},ke.fromValue=function(e){return new ke(e)},ke.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0>t,e.high<<32-t|e.low>>>t):new jn(e.high>>31,e.high>>t-32):new jn(e.high,e.low)},It.subTimestampPart=function(e,t){var n=It.timestamp(e),i=It.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(sa.ucompare(n.low,i.low)<0){r--;r|=0}return new jn(r,a)},It.createForTest=function(e){var t=It.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new jn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Ri.localize("MessageStringMaker.achieve"),Ri.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Ri.localize("MessageStringMaker.achieve"):Ri.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=sa._mul(a,s),c=sa._mul(o,s),_=sa._mul(a,l),h=u,d=(sa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,sa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,sa.ucompare(h,c)<0){d++;d|=0}d=d+(sa._mul(e.low,t.high)+sa._mul(e.high,t.low)|0)|0;var f=new jn(d,h),m=new jn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(sa.ucompare(g,f.low)<0){p++;p|=0}e=new jn(p,g)}return e},__class__:dn};function fn(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=fn).__name__=["albero","entity","OriginalStamp"],fn.__interfaces__=[hn],fn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=Je.makeFromIdStr(t.stampsetIdStr),i=Je.makeFromIdStr(t.stampIdStr);return new fn(n,i,t.illust)},fn.fromPropsAndStampsetId=function(e,t){return new fn(t,Je.fromIntOrInt64(e.id),e.illust)},fn.createKey=function(e){return"original__"+e.high+"_"+e.low},fn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return fn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Ot;return n.talkId=e,n.type=Ct.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:fn};function mn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=mn).__name__=["albero","entity","Stampset"],mn.historyStampset=function(){return new mn(yn.getHistoryStampsetType(),"stamp-history",null,0)},mn.commonStampset=function(e,t,n){return new mn(yn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},mn.originalStampset=function(e){var t=Je.fromIntOrInt64(e.stampset_id),n=yn.fromStampsetId(t),i=new mn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=Fa.__cast(e.stamps,Array).map(function(e){return fn.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},mn.fromStampsetInfo=function(e){var t=yn.fromStampsetId(e.stampsetId);return new mn(t,e.name,e.icon,e.version)},mn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:pn};var gn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(Je.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=gn).__name__=["albero","entity","StampsetSetting"],gn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new pn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&Qe.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return Qe.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new Ta,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=ji.HIRAGANA_SMALL_A&&o<=ji.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(ji.KATAKANA_SMALL_A-ji.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},ji.katakanaToRoman=function(e){return(new Oi).convert(e)},ji.normalize=function(e){return new Hi(null).normalize(e)},ji.normalizeForFile=function(e){return new Hi(null).normalizeForFile(e)},ji.asyncAssureNormalize=function(){return Promise.resolve()},ji.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Hi=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Hi).__name__=["albero","js","Normalizer"],Hi.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ra&&(e=e.val),Fi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ri.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ra&&(e=e.val),Fi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ri.localize("TextCanonicalizer.invalid")}},__class__:Hi};function Yi(e){var t=this,n=ro.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",io(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",io(t,t.onError)),e.on("close",io(t,t.onConnectionClose)),e.on("message",io(t,t.onMessage)),e.on("pong",io(t,t.onPong)),t.onOpen(null)});var r=null;null!=ro.proxyURL&&(r={agent:Li.createAgent(ro.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=Yi).__name__=["albero","js","WebSocket"],Yi.prototype={onOpen:function(e){Fi._i("["+qe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=Ia.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Fi._e("["+qe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null);var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);Fi._i("["+qe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new ja(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:Yi};function Gi(){}(n["puremvc.interfaces.IProxy"]=Gi).__name__=["puremvc","interfaces","IProxy"],Gi.prototype={__class__:Gi};function zi(){}(n["albero.proxy.AccessTokenResolverProxy"]=zi).__name__=["albero","proxy","AccessTokenResolverProxy"],zi.__interfaces__=[Gi],zi.prototype={__class__:zi};var Ki=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ki).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ki.newInstance=function(){return new Vi("accessTokenResolver")};var Wi=function(e,t){R.call(this),this.proxyName=null!=e?e:Wi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Wi).__name__=["puremvc","patterns","proxy","Proxy"],Wi.__interfaces__=[Gi],Wi.__super__=R,Wi.prototype=i(R.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Wi});var Vi=function(e){Wi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Vi).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Vi.__interfaces__=[zi],Vi.__super__=Wi,Vi.prototype=i(Wi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ro.account?ro.account.split(":"):null;null==i||2!=i.length?null!=(e=null==e?this.accountLoader.load():e)&&(null!=e.accessToken?(this.settings.setAccessToken(e.accessToken),t(e.accessToken)):this.api.createAccessToken(e.email,e.pass,t)):this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Vi});function qi(){}(n["albero.proxy.AccountLoaderProxy"]=qi).__name__=["albero","proxy","AccountLoaderProxy"],qi.__interfaces__=[Gi],qi.prototype={__class__:qi};var Qi=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Qi).__name__=["albero","proxy","AccountLoaderProxyFactory"],Qi.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new Ji("accountLoader")};var Ji=function(e){Wi.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=Ji).__name__=["albero","proxy","AccountLoaderProxyForHubot"],Ji.__interfaces__=[qi],Ji.__super__=Wi,Ji.prototype=i(Wi.prototype,{load:function(){var i=this,t=require("read");return t({prompt:"Email: "},function(e,n){t({prompt:"Password: ",silent:!0},function(e,t){i.sendNotification("SignIn",new Ne(n,t))})}),null},__class__:Ji});var Xi=function(){Wi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Xi).__name__=["albero","proxy","AlberoBroadcastProxy"],Xi.__super__=Wi,Xi.prototype=i(Wi.prototype,{handleNotification:function(n,e,i){var r=this;switch(Fi._d("["+qe.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new nt(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_acquaintances":for(var o=e[1].map(io(to=this.dataFactory,to.newAcquaintance)),s=0;st.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Fi._e("["+qe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Cn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Wt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Cn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new Cn).id=e.talkId),Mn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;t.applyNewMessage(e,n)}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(Mn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),Mn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Ct.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Qe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return Fi._e("["+qe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,Ot.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=wr.toLocalError(bt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new Mt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=wr.toLocalError(bt.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?Sa.Some(1e3*o.asInt(e.detail.retry_after)):Sa.None})},upload:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a);var o=this.prepareMessageFileAsync(n,e);o.then(function(e){r.createMessageReliable(t,Ct.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadMulti:function(n,i,r,a,o){var s=this,l=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",l);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=_o[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new Ta,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>31,e);return I.createByteSizeStringWithUnit(t)},lr.convertUploadableFile=function(e){var t=!1,n=e.name;b.isEmpty(n)&&(n="clipboard_"+S.getDateStringForFile()+".png",t=!0);var i=lr.getContentTypeByFileName(n,e.type);return i!=e.type&&(t=!0),t?{name:n,type:i,file:n,blob:e,size:e.size}:e},lr.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob},lr.getContentTypeByFileName=function(e,t){if(b.isNotEmpty(t))return"csv"==lr.getExtension(e)?"text/csv":t;switch(lr.getExtension(e)){case"csv":return"text/csv";case"doc":return"application/msword";case"docm":return"application/vnd.ms-word.document.macroenabled.12";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"gif":return"image/gif";case"htm":case"html":return"text/html";case"jpeg":case"jpg":return"image/jpeg";case"md":return"text/markdown";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"pptm":return"application/vnd.ms-powerpoint.presentation.macroenabled.12";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"txt":return"text/plain";case"xls":return"application/vnd.ms-excel";case"xlsb":return"application/vnd.ms-excel.sheet.binary.macroenabled.12";case"xlsm":return"application/vnd.ms-excel.sheet.macroenabled.12";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"text/xml";default:return"application/octet-stream"}},lr.getExtension=function(e){if(null==e)return"";var t=e.split("."),n=t.length;return 0==n?"":t[n-1]},lr.__super__=Wi,lr.prototype=i(Wi.prototype,{getValidHost:function(){return"https://"+ro.host},downloadUrl:function(e,t){if(null==t&&(t=!1),null==e||0==e.length)return"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(W.startsWith(e,this.validHost)){var n=this.settings.getAccessToken(),i=e;return-1!=e.indexOf("?")?i+="&":i+="?",i+="Authorization=ALB%20"+n,t&&(i+="&download=true"),i}return e},download:function(e,i,r){var a=this;if(e=this.downloadUrl(e),W.startsWith(e,"data:"))r(null,new Error("download URL was not resolved"));else{var t=Ba.parse(e);null!=ro.proxyURL&&(t.agent=Li.createAgent(ro.proxyURL));var n=Ua.request(t,function(e){var t=e.headers.location;if(null==t)if(2==Math.floor(e.statusCode/100)){var n=xa.createWriteStream(i);e.on("data",function(e){n.write(e)}),e.on("end",function(){n.end(),n.on("finish",function(){r(i,null)})}),e.on("error",function(e){r(null,e)}),n.on("error",function(e){r(null,e)})}else r(null,new Error("HTTP request failed ("+e.statusCode+" "+e.statusMessage+")"));else a.download(t,i,r)});n.on("error",function(e){r(null,e)}),n.end()}},upload:function(e,t,n){return this.uploadForNodeJS(e,t,n)},uploadForNodeJS:function(e,t,r){var a=Ba.parse(e.put_url);a.method="PUT";a.headers={},a.headers["Content-Length"]=""+r.size;var n=e.post_form;return a.headers["Content-Type"]=n["Content-Type"],a.headers["Content-Disposition"]=n["Content-Disposition"],null!=ro.proxyURL&&(a.agent=Li.createAgent(ro.proxyURL)),new Promise(function(n,i){var t=Ua.request(a,function(e){if(2!=Math.floor(e.statusCode/100)){var t="";return e.on("data",function(e){t+=e}),void e.on("end",function(){i(e.statusCode+": "+t)})}Pi.resolveVoid(n)});t.on("error",function(e){i(e.message)});var e=xa.createReadStream(r.path);e.on("data",function(e){t.write(e)}),e.on("end",function(){t.end()}),e.on("error",function(){t.end()})})},createDummyFile:function(e,t,n){var i=W.replace(e,"/","\\").split("\\");if(0==i.length)return null;var r=i[i.length-1];if(null!=t&&(r=t),0==r.length)return null;var a=lr.getContentTypeByFileName(r,n);return{name:r,size:0|xa.statSync(e).size,type:a,path:e}},asyncCreateThumbnail:function(e){return Promise.reject(null)},__class__:lr});var ur=function(){Wi.call(this,"keywordWatcher")};(n["albero.proxy.KeywordWatcherProxy"]=ur).__name__=["albero","proxy","KeywordWatcherProxy"],ur.__super__=Wi,ur.prototype=i(Wi.prototype,{onMessageCreated:function(e){if(null!=e){var t,n=Ze.map(Ze.option(this.dataStore.getTalk(e.talkId)),function(e){return e.domainId});switch(n[1]){case 0:t=n[2];break;case 1:t=this.settings.getSelectedDomainId()}if(this.features.canDetectKeyword(t)){var i;if(this.settings.getBrowserSettings().keywordWatchingSelfMessage)i=!1;else{var r=this.dataStore,a=e.userId;if(null!=r.me){var o=r.me.id;i=null!=o&&null!=a&&o.high==a.high&&o.low==a.low}else i=!1}if(!i){var s=e.messageStringForKeywordDetection(this.settings.getBrowserSettings().keywordWatchingActionReply);this.detectKeyword(s,e.type,e.id,t,e.talkId)}}}},onAnnouncementCreated:function(e){if(null!=e&&this.features.canDetectKeyword(e.domainId)){var t=Ot.getDisplayTextWithoutEscape(e.type,e.content);this.detectKeyword(t,e.type,e.id,e.domainId,null)}},detectKeyword:function(s,l,u,c,_){var h=this;this.reserveOnNormalizedKeywordPrepared(function(e){for(var t=W.htmlEscape(s,!0),n=e.keys();n.hasNext();){var i=n.next(),r=e.get(i);if(null!=r&&0!=r.length&&dr.match(l,i))for(var a=0;a>>31,t.low<<1);if(63,u=new jn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new jn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=sa.ucompare(n.high,t.high);if(0<=(0!=d?d:sa.ucompare(n.low,t.low))){l=new jn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(sa.ucompare(n.low,t.low)<0){f--;f|=0}n=new jn(f,m)}63,u=new jn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new jn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new jn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new jn(v,y)}return{quotient:l,modulus:n}};var ua=function(){};(n["haxe.Int64Helper"]=ua).__name__=["haxe","Int64Helper"],ua.parseString=function(e){var t=new jn(0,10),n=new jn(0,0),i=new jn(0,1),r=!1,a=W.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=sa._mul(h,f),g=sa._mul(d,f),v=sa._mul(h,m),y=p,S=(sa._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,sa.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,sa.ucompare(y,g)<0){S++;S|=0}S=S+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var w=new jn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(sa.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new jn(T,I)).high<0))throw new Ra("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=sa._mul(E,A),k=sa._mul(N,A),O=sa._mul(E,b),C=D,M=(sa._mul(N,b)+(O>>>16)|0)+(k>>>16)|0;if(C=C+(O<<=16)|0,sa.ucompare(C,O)<0){M++;M|=0}if(C=C+(k<<=16)|0,sa.ucompare(C,k)<0){M++;M|=0}M=M+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var R=new jn(M,C),F=n.high+R.high|0,x=n.low+R.low|0;if(sa.ucompare(x,n.low)<0){F++;F|=0}if((n=new jn(F,x)).high<0)throw new Ra("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,j=sa._mul(U,L),H=sa._mul(P,L),Y=sa._mul(U,B),G=j,z=(sa._mul(P,B)+(Y>>>16)|0)+(H>>>16)|0;if(G=G+(Y<<=16)|0,sa.ucompare(G,Y)<0){z++;z|=0}if(G=G+(H<<=16)|0,sa.ucompare(G,H)<0){z++;z|=0}z=z+(sa._mul(i.low,t.high)+sa._mul(i.high,t.low)|0)|0,i=new jn(z,G)}return n};var ca=function(){this.buf=new T,this.cache=[],this.useCache=ca.USE_CACHE,this.useEnumIndex=ca.USE_ENUM_INDEX,this.shash=new Ta,this.scount=0};(n["haxe.Serializer"]=ca).__name__=["haxe","Serializer"],ca.run=function(e){var t=new ca;return t.serialize(e),t.toString()},ca.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=_o[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=_o[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var j=2,H=B;j=this.length)throw new Ra("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ra("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Ra("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Ra("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new Ta;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=_o[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new Ra("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new Ra("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Ra("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new va;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new Ra("Invalid IntMap format");return A;case 114:var O=this.readDigits();if(O<0||O>=this.cache.length)throw new Ra("Invalid reference");return this.cache[O];case 115:var C=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var H=R[M.charCodeAt(F++)];P.b[L++]=255&(j<<4|H>>2);var Y=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<6|Y)}if(2<=x){var G=R[M.charCodeAt(F++)],z=R[M.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|z>>4),3==x){var K=R[M.charCodeAt(F++)];P.b[L++]=255&(z<<4|K>>2)}}return this.pos+=C,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=qe.strDate(qe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new Ra("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Ra.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new ma(e.left,e.key,e.value,new ma(e.right,t,n,i)):new ma(new ma(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new ma(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new ma(new ma(e,t,n,i.left),i.key,i.value,i.right):new ma(new ma(e,t,n,i.left.left),i.left.key,i.left.value,new ma(i.left.right,i.key,i.value,i.right))}return new ma(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=ma).__name__=["haxe","ds","TreeNode"],ma.prototype={__class__:ma};var pa=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};pa.Left=function(e){var t=["Left",0,e];return t.__enum__=pa,t.toString=s,t},pa.Right=function(e){var t=["Right",1,e];return t.__enum__=pa,t.toString=s,t},pa.__empty_constructs__=[];var ga=function(){fa.call(this)};(n["haxe.ds.EnumValueMap"]=ga).__name__=["haxe","ds","EnumValueMap"],ga.__interfaces__=[oa],ga.__super__=fa,ga.prototype=i(fa.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Ia(new Uint8Array(t).buffer)},Ia.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ia(e)},Ia.fastGet=function(e,t){return e.bytes[t]},Ia.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ra(Oa.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Ia};function Ea(){this.b=[]}(n["haxe.io.BytesBuffer"]=Ea).__name__=["haxe","io","BytesBuffer"],Ea.prototype={getBytes:function(){var e=new Ia(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Ea};function Na(){}(n["haxe.io.Input"]=Na).__name__=["haxe","io","Input"],Na.prototype={readByte:function(){throw new Ra("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ra(Oa.OutsideBounds);try{for(;0e.length)throw new Ra(Oa.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Aa).__name__=["haxe","io","BytesInput"],Aa.__super__=Na,Aa.prototype=i(Na.prototype,{readByte:function(){if(0==this.len)throw new Ra(new ka);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ra(Oa.OutsideBounds);if(0==this.len&&0e.length)throw new Ra(Oa.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:ba};function Da(){this.b=new Ea}(n["haxe.io.BytesOutput"]=Da).__name__=["haxe","io","BytesOutput"],Da.__super__=ba,Da.prototype=i(ba.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Ra(Oa.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},Ca.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},Ca.doubleToI64=function(e){var t=Ca.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;r>>16)<<16|0)|0},ca.USE_CACHE=!1,ca.USE_ENUM_INDEX=!1,ca.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",da.DEFAULT_RESOLVER=new ha,da.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ya.count=0,Ca.i64tmp=new jn(0,0),Fa.__toStr={}.toString,Ya.FLOAT_SINGLE_MIN=1401298464324817e-60,Ya.FLOAT_SINGLE_MAX=34028234663852886e22,Ya.FLOAT_DOUBLE_MIN=5e-324,Ya.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file +!function(e,t){"use strict";function s(){return Fa.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new o,require("unorm")};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(ro.host=e.host,ro.endpoint=e.endpoint,ro.accessToken=e.access_token,ro.proxyURL=e.proxyURL,ro.account=e.account,ro.talkWithBot=e.talkWithBot,ro.acceptableEventTimeDiff=e.acceptableEventTimeDiff,ro.name=e.name,ro.storagePath=e.storage_path,ro.storageQuota=e.storage_quota,ro.wsConfig=e.ws_config),Fi._d("["+qe.dateStr(new Date)+"] ","current settings",ro,"","",""),null==ro.accessToken&&Fi._e("["+qe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},announce:function(e,t){var n,i=e.room;if(null!=i){var r,a=i.split("_");if(2=e.length);){if(!this.matchSub(e,n)){i+=K.string(qe.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(qe.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(qe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},W.startsWith=function(e,t){return e.length>=t.length&&qe.substr(e,0,t.length)==t},W.isSpace=function(e,t){var n=qe.cca(e,t);return 8>>=4););if(null!=t)for(;n.lengthn;){var t=qe.substr(e,0,n);i.push(t),e=qe.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=sa._mul(o,l),_=sa._mul(s,l),h=sa._mul(o,u),d=c,f=(sa._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,sa.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,sa.ucompare(d,_)<0){f++;f|=0}f=f+(sa._mul(t.low,n.high)+sa._mul(t.high,n.low)|0)|0;var m=new jn(f,d),p=new jn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(sa.ucompare(v,m.low)<0){g++;g|=0}t=new jn(g,v)}return t},Je.getHigh=function(e){return e.high},Je.getLow=function(e){return e.low},Je.idStr=function(e){return"_"+e.high+"_"+e.low},Je.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new jn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},Je.toStr=function(e){return la.toString(e)},Je.isNeg=function(e){return e.high<0},Je.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(sa.ucompare(i,e.low)<0){n++;n|=0}return new jn(n,i)},Je.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(sa.ucompare(e.low,t.low)<0){n--;n|=0}return new jn(n,i)},Je.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:sa.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Je.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Je.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Je.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Ze.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:Te});var Ie=function(){U.call(this)};(n["albero.command.UrlCommand"]=Ie).__name__=["albero","command","UrlCommand"],Ie.__super__=U,Ie.prototype=i(U.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Ie});var Ee=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};Ee.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=Ee,t.toString=s,t},Ee.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=Ee,t.toString=s,t},Ee.BACK=["BACK",2],Ee.BACK.toString=s,(Ee.BACK.__enum__=Ee).__empty_constructs__=[Ee.BACK];function Ne(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Ne).__name__=["albero","entity","Account"],Ne.prototype={__class__:Ne};function et(e){null!=e&&(this.id=e.id,this.group=new Ae(e.group),this.profilePolicy=new be(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=et).__name__=["albero","entity","AccountControlGroup"],et.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:et};var Ae=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ae).__name__=["albero","entity","AccountControlGroupGroup"],Ae.prototype={__class__:Ae};var be=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=be).__name__=["albero","entity","AccountControlGroupProfilePolicy"],be.prototype={__class__:be};function tt(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ae(e.group)),null!=e.profile_policy&&(this.profilePolicy=new be(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=tt).__name__=["albero","entity","AccountControlGroupPartialUpdate"],tt.prototype={__class__:tt};function nt(e){null!=e&&(this.id=Je.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=nt).__name__=["albero","entity","AccountControlRequest"],nt.prototype={__class__:nt};var De=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};De.ng=["ng",0],De.ng.toString=s,(De.ng.__enum__=De).ok=["ok",1],De.ok.toString=s,(De.ok.__enum__=De).image=["image",2],De.image.toString=s,(De.image.__enum__=De).imageOrVideo=["imageOrVideo",3],De.imageOrVideo.toString=s,(De.imageOrVideo.__enum__=De).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],De.imageOrVideoOrAudio.toString=s,(De.imageOrVideoOrAudio.__enum__=De).other=["other",5],De.other.toString=s,(De.other.__enum__=De).__empty_constructs__=[De.ng,De.ok,De.image,De.imageOrVideo,De.imageOrVideoOrAudio,De.other];function ke(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=ke).__name__=["albero","entity","AllowAttachmentType"],ke.fromInt=function(e){if(null==e)return new ke(De.other);var t;if(null==e)t=De.other;else switch(e){case 0:t=De.ng;break;case 1:t=De.ok;break;case 2:t=De.image;break;case 3:t=De.imageOrVideo;break;case 4:t=De.imageOrVideoOrAudio;break;default:t=De.other}return new ke(t)},ke.fromValue=function(e){return new ke(e)},ke.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0>t,e.high<<32-t|e.low>>>t):new jn(e.high>>31,e.high>>t-32):new jn(e.high,e.low)},It.subTimestampPart=function(e,t){var n=It.timestamp(e),i=It.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(sa.ucompare(n.low,i.low)<0){r--;r|=0}return new jn(r,a)},It.createForTest=function(e){var t=It.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new jn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Ri.localize("MessageStringMaker.achieve"),Ri.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Ri.localize("MessageStringMaker.achieve"):Ri.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=sa._mul(a,s),c=sa._mul(o,s),_=sa._mul(a,l),h=u,d=(sa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,sa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,sa.ucompare(h,c)<0){d++;d|=0}d=d+(sa._mul(e.low,t.high)+sa._mul(e.high,t.low)|0)|0;var f=new jn(d,h),m=new jn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(sa.ucompare(g,f.low)<0){p++;p|=0}e=new jn(p,g)}return e},__class__:dn};function fn(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=fn).__name__=["albero","entity","OriginalStamp"],fn.__interfaces__=[hn],fn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=Je.makeFromIdStr(t.stampsetIdStr),i=Je.makeFromIdStr(t.stampIdStr);return new fn(n,i,t.illust)},fn.fromPropsAndStampsetId=function(e,t){return new fn(t,Je.fromIntOrInt64(e.id),e.illust)},fn.createKey=function(e){return"original__"+e.high+"_"+e.low},fn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return fn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Ot;return n.talkId=e,n.type=Ct.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:fn};function mn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=mn).__name__=["albero","entity","Stampset"],mn.historyStampset=function(){return new mn(yn.getHistoryStampsetType(),"stamp-history",null,0)},mn.commonStampset=function(e,t,n){return new mn(yn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},mn.originalStampset=function(e){var t=Je.fromIntOrInt64(e.stampset_id),n=yn.fromStampsetId(t),i=new mn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=Fa.__cast(e.stamps,Array).map(function(e){return fn.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},mn.fromStampsetInfo=function(e){var t=yn.fromStampsetId(e.stampsetId);return new mn(t,e.name,e.icon,e.version)},mn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:pn};var gn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(Je.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=gn).__name__=["albero","entity","StampsetSetting"],gn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new pn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&Qe.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return Qe.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new Ta,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=ji.HIRAGANA_SMALL_A&&o<=ji.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(ji.KATAKANA_SMALL_A-ji.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},ji.katakanaToRoman=function(e){return(new Oi).convert(e)},ji.normalize=function(e){return new Hi(null).normalize(e)},ji.normalizeForFile=function(e){return new Hi(null).normalizeForFile(e)},ji.asyncAssureNormalize=function(){return Promise.resolve()},ji.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Hi=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Hi).__name__=["albero","js","Normalizer"],Hi.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ra&&(e=e.val),Fi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ri.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ra&&(e=e.val),Fi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ri.localize("TextCanonicalizer.invalid")}},__class__:Hi};function Yi(e){var t=this,n=ro.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",io(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",io(t,t.onError)),e.on("close",io(t,t.onConnectionClose)),e.on("message",io(t,t.onMessage)),e.on("pong",io(t,t.onPong)),t.onOpen(null)});var r=null;null!=ro.proxyURL&&(r={agent:Li.createAgent(ro.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=Yi).__name__=["albero","js","WebSocket"],Yi.prototype={onOpen:function(e){Fi._i("["+qe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=Ia.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Fi._e("["+qe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null);var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);Fi._i("["+qe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new ja(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:Yi};function Gi(){}(n["puremvc.interfaces.IProxy"]=Gi).__name__=["puremvc","interfaces","IProxy"],Gi.prototype={__class__:Gi};function zi(){}(n["albero.proxy.AccessTokenResolverProxy"]=zi).__name__=["albero","proxy","AccessTokenResolverProxy"],zi.__interfaces__=[Gi],zi.prototype={__class__:zi};var Ki=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ki).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ki.newInstance=function(){return new Vi("accessTokenResolver")};var Wi=function(e,t){R.call(this),this.proxyName=null!=e?e:Wi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Wi).__name__=["puremvc","patterns","proxy","Proxy"],Wi.__interfaces__=[Gi],Wi.__super__=R,Wi.prototype=i(R.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Wi});var Vi=function(e){Wi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Vi).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Vi.__interfaces__=[zi],Vi.__super__=Wi,Vi.prototype=i(Wi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ro.account?ro.account.split(":"):null;null==i||2!=i.length?null!=(e=null==e?this.accountLoader.load():e)&&(null!=e.accessToken?(this.settings.setAccessToken(e.accessToken),t(e.accessToken)):this.api.createAccessToken(e.email,e.pass,t)):this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Vi});function qi(){}(n["albero.proxy.AccountLoaderProxy"]=qi).__name__=["albero","proxy","AccountLoaderProxy"],qi.__interfaces__=[Gi],qi.prototype={__class__:qi};var Qi=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Qi).__name__=["albero","proxy","AccountLoaderProxyFactory"],Qi.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new Ji("accountLoader")};var Ji=function(e){Wi.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=Ji).__name__=["albero","proxy","AccountLoaderProxyForHubot"],Ji.__interfaces__=[qi],Ji.__super__=Wi,Ji.prototype=i(Wi.prototype,{load:function(){var i=this,t=require("read");return t({prompt:"Email: "},function(e,n){t({prompt:"Password: ",silent:!0},function(e,t){i.sendNotification("SignIn",new Ne(n,t))})}),null},__class__:Ji});var Xi=function(){Wi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Xi).__name__=["albero","proxy","AlberoBroadcastProxy"],Xi.__super__=Wi,Xi.prototype=i(Wi.prototype,{handleNotification:function(n,e,i){var r=this;switch(Fi._d("["+qe.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new nt(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_acquaintances":for(var o=e[1].map(io(to=this.dataFactory,to.newAcquaintance)),s=0;st.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Fi._e("["+qe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Cn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Wt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Cn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new Cn).id=e.talkId),Mn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;t.applyNewMessage(e,n)}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(Mn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),Mn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Ct.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Qe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return Fi._e("["+qe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,Ot.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=wr.toLocalError(bt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new Mt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=wr.toLocalError(bt.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?Sa.Some(1e3*o.asInt(e.detail.retry_after)):Sa.None})},upload:function(e,t,n,i){var r=this,a=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",a);var o=this.prepareMessageFileAsync(n,e);o.then(function(e){r.createMessageReliable(t,Ct.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadMulti:function(n,i,r,a,o){var s=this,l=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",l);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=_o[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new Ta,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>31,e);return I.createByteSizeStringWithUnit(t)},lr.convertUploadableFile=function(e){var t=!1,n=e.name;b.isEmpty(n)&&(n="clipboard_"+S.getDateStringForFile()+".png",t=!0);var i=lr.getContentTypeByFileName(n,e.type);return i!=e.type&&(t=!0),t?{name:n,type:i,file:n,blob:e,size:e.size}:e},lr.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob},lr.getContentTypeByFileName=function(e,t){if(b.isNotEmpty(t))return"csv"==lr.getExtension(e)?"text/csv":t;switch(lr.getExtension(e)){case"csv":return"text/csv";case"doc":return"application/msword";case"docm":return"application/vnd.ms-word.document.macroenabled.12";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"gif":return"image/gif";case"htm":case"html":return"text/html";case"jpeg":case"jpg":return"image/jpeg";case"md":return"text/markdown";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"pptm":return"application/vnd.ms-powerpoint.presentation.macroenabled.12";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"txt":return"text/plain";case"xls":return"application/vnd.ms-excel";case"xlsb":return"application/vnd.ms-excel.sheet.binary.macroenabled.12";case"xlsm":return"application/vnd.ms-excel.sheet.macroenabled.12";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"text/xml";default:return"application/octet-stream"}},lr.getExtension=function(e){if(null==e)return"";var t=e.split("."),n=t.length;return 0==n?"":t[n-1]},lr.__super__=Wi,lr.prototype=i(Wi.prototype,{getValidHost:function(){return"https://"+ro.host},downloadUrl:function(e,t){if(null==t&&(t=!1),null==e||0==e.length)return"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(W.startsWith(e,this.validHost)){var n=this.settings.getAccessToken(),i=e;return-1!=e.indexOf("?")?i+="&":i+="?",i+="Authorization=ALB%20"+n,t&&(i+="&download=true"),i}return e},download:function(e,i,r){var a=this;if(e=this.downloadUrl(e),W.startsWith(e,"data:"))r(null,new Error("download URL was not resolved"));else{var t=Ba.parse(e);null!=ro.proxyURL&&(t.agent=Li.createAgent(ro.proxyURL));var n=Ua.request(t,function(e){var t=e.headers.location;if(null==t)if(2==Math.floor(e.statusCode/100)){var n=xa.createWriteStream(i);e.on("data",function(e){n.write(e)}),e.on("end",function(){n.end(),n.on("finish",function(){r(i,null)})}),e.on("error",function(e){r(null,e)}),n.on("error",function(e){r(null,e)})}else r(null,new Error("HTTP request failed ("+e.statusCode+" "+e.statusMessage+")"));else a.download(t,i,r)});n.on("error",function(e){r(null,e)}),n.end()}},upload:function(e,t,n){return this.uploadForNodeJS(e,t,n)},uploadForNodeJS:function(e,t,r){var a=Ba.parse(e.put_url);a.method="PUT";a.headers={},a.headers["Content-Length"]=""+r.size;var n=e.post_form;return a.headers["Content-Type"]=n["Content-Type"],a.headers["Content-Disposition"]=n["Content-Disposition"],null!=ro.proxyURL&&(a.agent=Li.createAgent(ro.proxyURL)),new Promise(function(n,i){var t=Ua.request(a,function(e){if(2!=Math.floor(e.statusCode/100)){var t="";return e.on("data",function(e){t+=e}),void e.on("end",function(){i(e.statusCode+": "+t)})}Pi.resolveVoid(n)});t.on("error",function(e){i(e.message)});var e=xa.createReadStream(r.path);e.on("data",function(e){t.write(e)}),e.on("end",function(){t.end()}),e.on("error",function(){t.end()})})},createDummyFile:function(e,t,n){var i=W.replace(e,"/","\\").split("\\");if(0==i.length)return null;var r=i[i.length-1];if(null!=t&&(r=t),0==r.length)return null;var a=lr.getContentTypeByFileName(r,n);return{name:r,size:0|xa.statSync(e).size,type:a,path:e}},asyncCreateThumbnail:function(e){return Promise.reject(null)},__class__:lr});var ur=function(){Wi.call(this,"keywordWatcher")};(n["albero.proxy.KeywordWatcherProxy"]=ur).__name__=["albero","proxy","KeywordWatcherProxy"],ur.__super__=Wi,ur.prototype=i(Wi.prototype,{onMessageCreated:function(e){if(null!=e){var t,n=Ze.map(Ze.option(this.dataStore.getTalk(e.talkId)),function(e){return e.domainId});switch(n[1]){case 0:t=n[2];break;case 1:t=this.settings.getSelectedDomainId()}if(this.features.canDetectKeyword(t)){var i;if(this.settings.getBrowserSettings().keywordWatchingSelfMessage)i=!1;else{var r=this.dataStore,a=e.userId;if(null!=r.me){var o=r.me.id;i=null!=o&&null!=a&&o.high==a.high&&o.low==a.low}else i=!1}if(!i){var s=e.messageStringForKeywordDetection(this.settings.getBrowserSettings().keywordWatchingActionReply);this.detectKeyword(s,e.type,e.id,t,e.talkId)}}}},onAnnouncementCreated:function(e){if(null!=e&&this.features.canDetectKeyword(e.domainId)){var t=Ot.getDisplayTextWithoutEscape(e.type,e.content);this.detectKeyword(t,e.type,e.id,e.domainId,null)}},detectKeyword:function(s,l,u,c,_){var h=this;this.reserveOnNormalizedKeywordPrepared(function(e){for(var t=W.htmlEscape(s,!0),n=e.keys();n.hasNext();){var i=n.next(),r=e.get(i);if(null!=r&&0!=r.length&&dr.match(l,i))for(var a=0;a>>31,t.low<<1);if(63,u=new jn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new jn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=sa.ucompare(n.high,t.high);if(0<=(0!=d?d:sa.ucompare(n.low,t.low))){l=new jn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(sa.ucompare(n.low,t.low)<0){f--;f|=0}n=new jn(f,m)}63,u=new jn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new jn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new jn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new jn(v,y)}return{quotient:l,modulus:n}};var ua=function(){};(n["haxe.Int64Helper"]=ua).__name__=["haxe","Int64Helper"],ua.parseString=function(e){var t=new jn(0,10),n=new jn(0,0),i=new jn(0,1),r=!1,a=W.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=sa._mul(h,f),g=sa._mul(d,f),v=sa._mul(h,m),y=p,S=(sa._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,sa.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,sa.ucompare(y,g)<0){S++;S|=0}S=S+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var w=new jn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(sa.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new jn(T,I)).high<0))throw new Ra("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=sa._mul(E,A),k=sa._mul(N,A),O=sa._mul(E,b),C=D,M=(sa._mul(N,b)+(O>>>16)|0)+(k>>>16)|0;if(C=C+(O<<=16)|0,sa.ucompare(C,O)<0){M++;M|=0}if(C=C+(k<<=16)|0,sa.ucompare(C,k)<0){M++;M|=0}M=M+(sa._mul(i.low,_.high)+sa._mul(i.high,_.low)|0)|0;var R=new jn(M,C),F=n.high+R.high|0,x=n.low+R.low|0;if(sa.ucompare(x,n.low)<0){F++;F|=0}if((n=new jn(F,x)).high<0)throw new Ra("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,j=sa._mul(U,L),H=sa._mul(P,L),Y=sa._mul(U,B),G=j,z=(sa._mul(P,B)+(Y>>>16)|0)+(H>>>16)|0;if(G=G+(Y<<=16)|0,sa.ucompare(G,Y)<0){z++;z|=0}if(G=G+(H<<=16)|0,sa.ucompare(G,H)<0){z++;z|=0}z=z+(sa._mul(i.low,t.high)+sa._mul(i.high,t.low)|0)|0,i=new jn(z,G)}return n};var ca=function(){this.buf=new T,this.cache=[],this.useCache=ca.USE_CACHE,this.useEnumIndex=ca.USE_ENUM_INDEX,this.shash=new Ta,this.scount=0};(n["haxe.Serializer"]=ca).__name__=["haxe","Serializer"],ca.run=function(e){var t=new ca;return t.serialize(e),t.toString()},ca.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=_o[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=_o[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var j=2,H=B;j=this.length)throw new Ra("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ra("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new Ra("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Ra("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new Ta;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=_o[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new Ra("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new Ra("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Ra("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new va;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new Ra("Invalid IntMap format");return A;case 114:var O=this.readDigits();if(O<0||O>=this.cache.length)throw new Ra("Invalid reference");return this.cache[O];case 115:var C=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var H=R[M.charCodeAt(F++)];P.b[L++]=255&(j<<4|H>>2);var Y=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<6|Y)}if(2<=x){var G=R[M.charCodeAt(F++)],z=R[M.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|z>>4),3==x){var K=R[M.charCodeAt(F++)];P.b[L++]=255&(z<<4|K>>2)}}return this.pos+=C,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=qe.strDate(qe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new Ra("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Ra.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new ma(e.left,e.key,e.value,new ma(e.right,t,n,i)):new ma(new ma(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new ma(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new ma(new ma(e,t,n,i.left),i.key,i.value,i.right):new ma(new ma(e,t,n,i.left.left),i.left.key,i.left.value,new ma(i.left.right,i.key,i.value,i.right))}return new ma(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=ma).__name__=["haxe","ds","TreeNode"],ma.prototype={__class__:ma};var pa=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};pa.Left=function(e){var t=["Left",0,e];return t.__enum__=pa,t.toString=s,t},pa.Right=function(e){var t=["Right",1,e];return t.__enum__=pa,t.toString=s,t},pa.__empty_constructs__=[];var ga=function(){fa.call(this)};(n["haxe.ds.EnumValueMap"]=ga).__name__=["haxe","ds","EnumValueMap"],ga.__interfaces__=[oa],ga.__super__=fa,ga.prototype=i(fa.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new Ia(new Uint8Array(t).buffer)},Ia.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ia(e)},Ia.fastGet=function(e,t){return e.bytes[t]},Ia.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ra(Oa.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:Ia};function Ea(){this.b=[]}(n["haxe.io.BytesBuffer"]=Ea).__name__=["haxe","io","BytesBuffer"],Ea.prototype={getBytes:function(){var e=new Ia(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Ea};function Na(){}(n["haxe.io.Input"]=Na).__name__=["haxe","io","Input"],Na.prototype={readByte:function(){throw new Ra("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ra(Oa.OutsideBounds);try{for(;0e.length)throw new Ra(Oa.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Aa).__name__=["haxe","io","BytesInput"],Aa.__super__=Na,Aa.prototype=i(Na.prototype,{readByte:function(){if(0==this.len)throw new Ra(new ka);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ra(Oa.OutsideBounds);if(0==this.len&&0e.length)throw new Ra(Oa.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:ba};function Da(){this.b=new Ea}(n["haxe.io.BytesOutput"]=Da).__name__=["haxe","io","BytesOutput"],Da.__super__=ba,Da.prototype=i(ba.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Ra(Oa.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},Ca.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},Ca.doubleToI64=function(e){var t=Ca.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;r>>16)<<16|0)|0},ca.USE_CACHE=!1,ca.USE_ENUM_INDEX=!1,ca.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",da.DEFAULT_RESOLVER=new ha,da.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ya.count=0,Ca.i64tmp=new jn(0,0),Fa.__toStr={}.toString,Ya.FLOAT_SINGLE_MIN=1401298464324817e-60,Ya.FLOAT_SINGLE_MAX=34028234663852886e22,Ya.FLOAT_DOUBLE_MIN=5e-324,Ya.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file diff --git a/lib/direct.min.js b/lib/direct.min.js index 66fd417..32f4543 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function o(){return ga.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new Ba};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(La.host=e.host,La.endpoint=e.endpoint,La.accessToken=e.access_token,La.proxyURL=e.proxyURL,La.account=e.account,La.talkWithBot=e.talkWithBot,La.acceptableEventTimeDiff=e.acceptableEventTimeDiff),Mi._d("["+qe.dateStr(new Date)+"] ","current settings",La,"","",""),null==La.accessToken&&Mi._e("["+qe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return 0=e.length);){if(!this.matchSub(e,n)){i+=K.string(qe.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(qe.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(qe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},j.startsWith=function(e,t){return e.length>=t.length&&qe.substr(e,0,t.length)==t},j.isSpace=function(e,t){var n=qe.cca(e,t);return 8>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=Kr._mul(o,l),_=Kr._mul(s,l),h=Kr._mul(o,u),d=c,f=(Kr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Kr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Kr.ucompare(d,_)<0){f++;f|=0}f=f+(Kr._mul(t.low,n.high)+Kr._mul(t.high,n.low)|0)|0;var m=new Pn(f,d),p=new Pn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Kr.ucompare(v,m.low)<0){g++;g|=0}t=new Pn(g,v)}return t},Je.getHigh=function(e){return e.high},Je.getLow=function(e){return e.low},Je.idStr=function(e){return"_"+e.high+"_"+e.low},Je.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Pn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},Je.toStr=function(e){return jr.toString(e)},Je.isNeg=function(e){return e.high<0},Je.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Kr.ucompare(i,e.low)<0){n++;n|=0}return new Pn(n,i)},Je.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Kr.ucompare(e.low,t.low)<0){n--;n|=0}return new Pn(n,i)},Je.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Kr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Je.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Je.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Je.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Ze.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:ye});var Se=function(){F.call(this)};(n["albero.command.UrlCommand"]=Se).__name__=["albero","command","UrlCommand"],Se.__super__=F,Se.prototype=i(F.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Se});var we=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};we.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=we,t.toString=o,t},we.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=we,t.toString=o,t},we.BACK=["BACK",2],we.BACK.toString=o,(we.BACK.__enum__=we).__empty_constructs__=[we.BACK];function Te(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Te).__name__=["albero","entity","Account"],Te.prototype={__class__:Te};function et(e){null!=e&&(this.id=e.id,this.group=new Ie(e.group),this.profilePolicy=new Ee(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=et).__name__=["albero","entity","AccountControlGroup"],et.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:et};var Ie=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ie).__name__=["albero","entity","AccountControlGroupGroup"],Ie.prototype={__class__:Ie};var Ee=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=Ee).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ee.prototype={__class__:Ee};function tt(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ie(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ee(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=tt).__name__=["albero","entity","AccountControlGroupPartialUpdate"],tt.prototype={__class__:tt};function nt(e){null!=e&&(this.id=Je.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=nt).__name__=["albero","entity","AccountControlRequest"],nt.prototype={__class__:nt};var Ne=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ne.ng=["ng",0],Ne.ng.toString=o,(Ne.ng.__enum__=Ne).ok=["ok",1],Ne.ok.toString=o,(Ne.ok.__enum__=Ne).image=["image",2],Ne.image.toString=o,(Ne.image.__enum__=Ne).imageOrVideo=["imageOrVideo",3],Ne.imageOrVideo.toString=o,(Ne.imageOrVideo.__enum__=Ne).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ne.imageOrVideoOrAudio.toString=o,(Ne.imageOrVideoOrAudio.__enum__=Ne).other=["other",5],Ne.other.toString=o,(Ne.other.__enum__=Ne).__empty_constructs__=[Ne.ng,Ne.ok,Ne.image,Ne.imageOrVideo,Ne.imageOrVideoOrAudio,Ne.other];function Ae(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ae).__name__=["albero","entity","AllowAttachmentType"],Ae.fromInt=function(e){if(null==e)return new Ae(Ne.other);var t;if(null==e)t=Ne.other;else switch(e){case 0:t=Ne.ng;break;case 1:t=Ne.ok;break;case 2:t=Ne.image;break;case 3:t=Ne.imageOrVideo;break;case 4:t=Ne.imageOrVideoOrAudio;break;default:t=Ne.other}return new Ae(t)},Ae.fromValue=function(e){return new Ae(e)},Ae.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0>t,e.high<<32-t|e.low>>>t):new Pn(e.high>>31,e.high>>t-32):new Pn(e.high,e.low)},St.subTimestampPart=function(e,t){var n=St.timestamp(e),i=St.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Kr.ucompare(n.low,i.low)<0){r--;r|=0}return new Pn(r,a)},St.createForTest=function(e){var t=St.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new Pn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Oi.localize("MessageStringMaker.achieve"),Oi.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Oi.localize("MessageStringMaker.achieve"):Oi.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=Kr._mul(a,s),c=Kr._mul(o,s),_=Kr._mul(a,l),h=u,d=(Kr._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Kr.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Kr.ucompare(h,c)<0){d++;d|=0}d=d+(Kr._mul(e.low,t.high)+Kr._mul(e.high,t.low)|0)|0;var f=new Pn(d,h),m=new Pn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(Kr.ucompare(g,f.low)<0){p++;p|=0}e=new Pn(p,g)}return e},__class__:cn};function _n(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=_n).__name__=["albero","entity","OriginalStamp"],_n.__interfaces__=[un],_n.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=Je.makeFromIdStr(t.stampsetIdStr),i=Je.makeFromIdStr(t.stampIdStr);return new _n(n,i,t.illust)},_n.fromPropsAndStampsetId=function(e,t){return new _n(t,Je.fromIntOrInt64(e.id),e.illust)},_n.createKey=function(e){return"original__"+e.high+"_"+e.low},_n.prototype={getImageUrl:function(){return this.illust},getKey:function(){return _n.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new bt;return n.talkId=e,n.type=Dt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:_n};function hn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=hn).__name__=["albero","entity","Stampset"],hn.historyStampset=function(){return new hn(pn.getHistoryStampsetType(),"stamp-history",null,0)},hn.commonStampset=function(e,t,n){return new hn(pn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},hn.originalStampset=function(e){var t=Je.fromIntOrInt64(e.stampset_id),n=pn.fromStampsetId(t),i=new hn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=ga.__cast(e.stamps,Array).map(function(e){return _n.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},hn.fromStampsetInfo=function(e){var t=pn.fromStampsetId(e.stampsetId);return new hn(t,e.name,e.icon,e.version)},hn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:dn};var fn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(Je.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=fn).__name__=["albero","entity","StampsetSetting"],fn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new dn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&Qe.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return Qe.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new aa,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i>2)),r+=K.string(a.charAt(63&(o<<4|s>>4))),r+=K.string(a.charAt(63&(s<<2|l>>6))),r+=K.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=K.string(a.charAt(u>>2)),r+=K.string(a.charAt(63&(u<<4|c>>4))),r+=K.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=K.string(a.charAt(_>>2)),r+=K.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},bi.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=qe.substr(e,0,t));var n=e.length,i=e,r=bi.CODES;null==r&&(r=bi.initCodes(),bi.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new oa(new $a(3*(n>>2)+(2<=o?o-1:0))),u=0;a>4);var h=r[i.charCodeAt(a++)];l.b[u++]=255&(_<<4|h>>2);var d=r[i.charCodeAt(a++)];l.b[u++]=255&(h<<6|d)}if(2<=o){var f=r[i.charCodeAt(a++)],m=r[i.charCodeAt(a++)];if(l.b[u++]=255&(f<<2|m>>4),3==o){var p=r[i.charCodeAt(a++)];l.b[u++]=255&(m<<4|p>>2)}}return l};function Di(){}(n["albero.js.KatakanaToRoman"]=Di).__name__=["albero","js","KatakanaToRoman"],Di.assureConvertTable=function(){return null!=Di.convertTable||(Di.convertTable=new aa,Qe.iter([["ア","A"],["イ","I"],["ウ","U"],["エ","E"],["オ","O"],["カ","KA"],["キ","KI"],["ク","KU"],["ケ","KE"],["コ","KO"],["キャ","KYA"],["キュ","KYU"],["キョ","KYO"],["サ","SA"],["シ","SI"],["ス","SU"],["セ","SE"],["ソ","SO"],["シャ","SHA"],["シュ","SHU"],["ショ","SHO"],["タ","TA"],["チ","TI"],["ツ","TU"],["テ","TE"],["ト","TO"],["チャ","THA"],["チュ","THU"],["チョ","THO"],["ナ","NA"],["ニ","NI"],["ヌ","NU"],["ネ","NE"],["ノ","NO"],["ニャ","NYA"],["ニュ","NYU"],["ニョ","NYO"],["ハ","HA"],["ヒ","HI"],["フ","FU"],["ヘ","HE"],["ホ","HO"],["ヒャ","HYA"],["ヒュ","HYU"],["ヒョ","HYO"],["マ","MA"],["ミ","MI"],["ム","MU"],["メ","ME"],["モ","MO"],["ミャ","MYA"],["ミュ","MYU"],["ミョ","MYO"],["ヤ","YA"],["ユ","YU"],["ヨ","YO"],["ラ","RA"],["リ","RI"],["ル","RU"],["レ","RE"],["ロ","RO"],["リャ","RYA"],["リュ","RYU"],["リョ","RYO"],["ワ","WA"],["ヲ","O"],["ン","N"],["ガ","GA"],["ギ","GI"],["グ","GU"],["ゲ","GE"],["ゴ","GO"],["ギャ","GYA"],["ギュ","GYU"],["ギョ","GYO"],["ザ","ZA"],["ジ","JI"],["ズ","ZU"],["ゼ","ZE"],["ゾ","ZO"],["ジャ","ZYA"],["ジュ","ZYU"],["ジョ","ZYO"],["ダ","DA"],["ヂ","JI"],["ヅ","ZU"],["デ","DE"],["ド","DO"],["バ","BA"],["ビ","BI"],["ブ","BU"],["ベ","BE"],["ボ","BO"],["ビャ","BYA"],["ビュ","BYU"],["ビョ","BYO"],["パ","PA"],["ピ","PI"],["プ","PU"],["ペ","PE"],["ポ","PO"],["ピャ","PYA"],["ピュ","PYU"],["ピョ","PYO"],["ー",""],["ッ","ッ"]],function(e){var t=Di.convertTable,n=e[0],i=e[1];null!=Za[n]?t.setReserved(n,i):t.h[n]=i})),Di.convertTable},Di.matchNext=function(e,t){var n=Di.assureConvertTable();if(t+1=Pi.HIRAGANA_SMALL_A&&o<=Pi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Pi.KATAKANA_SMALL_A-Pi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Pi.katakanaToRoman=function(e){return(new Di).convert(e)},Pi.normalize=function(e){return new Li(null).normalize(e)},Pi.normalizeForFile=function(e){return new Li(null).normalizeForFile(e)},Pi.asyncAssureNormalize=function(){return Promise.resolve()},Pi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Li=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Li).__name__=["albero","js","Normalizer"],Li.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof pa&&(e=e.val),Mi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Oi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof pa&&(e=e.val),Mi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Oi.localize("TextCanonicalizer.invalid")}},__class__:Li};function Bi(e){this.ws=new WebSocket(e),Xa.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=Pa(this,this.onOpen),this.ws.onmessage=Pa(this,this.onMessage),this.ws.onerror=Pa(this,this.onError),this.ws.onclose=Pa(this,this.onClose)}(n["albero.js.WebSocket"]=Bi).__name__=["albero","js","WebSocket"],Bi.prototype={onOpen:function(e){Mi._i("["+qe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=Xa.websocketsbinary?oa.ofData(new eo(e.data)):bi.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Mi._e("["+qe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);Mi._i("["+qe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){Xa.websocketsbinary?this.ws.send(new eo(e.b.bufferValue).buffer):this.ws.send(bi.encode(e))},ping:function(e){this.send(new oa(new $a(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Bi};function Yi(){}(n["puremvc.interfaces.IProxy"]=Yi).__name__=["puremvc","interfaces","IProxy"],Yi.prototype={__class__:Yi};function Hi(){}(n["albero.proxy.AccessTokenResolverProxy"]=Hi).__name__=["albero","proxy","AccessTokenResolverProxy"],Hi.__interfaces__=[Yi],Hi.prototype={__class__:Hi};var zi=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=zi).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],zi.newInstance=function(){return new Ki("accessTokenResolver")};var Gi=function(e,t){O.call(this),this.proxyName=null!=e?e:Gi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Gi).__name__=["puremvc","patterns","proxy","Proxy"],Gi.__interfaces__=[Yi],Gi.__super__=O,Gi.prototype=i(O.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Gi});var Ki=function(e){Gi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Ki).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Ki.__interfaces__=[Hi],Ki.__super__=Gi,Ki.prototype=i(Gi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=La.account?La.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Ki});var ji=function(){Gi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=ji).__name__=["albero","proxy","AlberoBroadcastProxy"],ji.__super__=Gi,ji.prototype=i(Gi.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new nt(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_acquaintances":for(var o=e[1].map(Pa(xa=this.dataFactory,xa.newAcquaintance)),s=0;st.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Mi._e("["+qe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Dn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Gt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Dn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new Dn).id=e.talkId),kn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;t.applyNewMessage(e,n)}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(kn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),kn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Dt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Qe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return Mi._e("["+qe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,bt.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=mr.toLocalError(Et.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new kt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=mr.toLocalError(Et.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?ia.Some(1e3*o.asInt(e.detail.retry_after)):ia.None})},upload:function(e,t,n){var i=this,r=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",r);var a=this.prepareMessageFileAsync(n,e);a.then(function(e){i.createMessageReliable(t,Dt.file,e,r)}),a.catch(function(e){i.sendNotification("create_message_fail",[e,r])})},uploadMulti:function(n,i,r,a){var o=this,s=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",s);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=Za[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new aa,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>31,e);return v.createByteSizeStringWithUnit(t)},nr.convertUploadableFile=function(e){var t=!1,n=e.name;E.isEmpty(n)&&(n="clipboard_"+p.getDateStringForFile()+".png",t=!0);var i=nr.getContentTypeByFileName(n,e.type);return i!=e.type&&(t=!0),t?{name:n,type:i,file:n,blob:e,size:e.size}:e},nr.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob},nr.getContentTypeByFileName=function(e,t){if(E.isNotEmpty(t))return"csv"==nr.getExtension(e)?"text/csv":t;switch(nr.getExtension(e)){case"csv":return"text/csv";case"doc":return"application/msword";case"docm":return"application/vnd.ms-word.document.macroenabled.12";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"gif":return"image/gif";case"htm":case"html":return"text/html";case"jpeg":case"jpg":return"image/jpeg";case"md":return"text/markdown";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"pptm":return"application/vnd.ms-powerpoint.presentation.macroenabled.12";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"txt":return"text/plain";case"xls":return"application/vnd.ms-excel";case"xlsb":return"application/vnd.ms-excel.sheet.binary.macroenabled.12";case"xlsm":return"application/vnd.ms-excel.sheet.macroenabled.12";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"text/xml";default:return"application/octet-stream"}},nr.getExtension=function(e){if(null==e)return"";var t=e.split("."),n=t.length;return 0==n?"":t[n-1]},nr.__super__=Gi,nr.prototype=i(Gi.prototype,{getValidHost:function(){return"https://"+La.host},downloadUrl:function(e,t){if(null==t&&(t=!1),null==e||0==e.length)return"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(j.startsWith(e,this.validHost)){var n=this.settings.getAccessToken(),i=e;return-1!=e.indexOf("?")?i+="&":i+="?",i+="Authorization=ALB%20"+n,t&&(i+="&download=true"),i}return e},download:function(e,t,n){},upload:function(e,t,n){return this.uploadForBrowser(e,t,n)},uploadForBrowser:function(e,t,r){for(var a={},n=0,i=G.fields(e.post_form);n>>31,t.low<<1);if(63,u=new Pn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Pn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Kr.ucompare(n.high,t.high);if(0<=(0!=d?d:Kr.ucompare(n.low,t.low))){l=new Pn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Kr.ucompare(n.low,t.low)<0){f--;f|=0}n=new Pn(f,m)}63,u=new Pn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Pn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new Pn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Pn(v,y)}return{quotient:l,modulus:n}};var Wr=function(){};(n["haxe.Int64Helper"]=Wr).__name__=["haxe","Int64Helper"],Wr.parseString=function(e){var t=new Pn(0,10),n=new Pn(0,0),i=new Pn(0,1),r=!1,a=j.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=Kr._mul(h,f),g=Kr._mul(d,f),v=Kr._mul(h,m),y=p,S=(Kr._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,Kr.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,Kr.ucompare(y,g)<0){S++;S|=0}S=S+(Kr._mul(i.low,_.high)+Kr._mul(i.high,_.low)|0)|0;var w=new Pn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(Kr.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new Pn(T,I)).high<0))throw new pa("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=Kr._mul(E,A),k=Kr._mul(N,A),C=Kr._mul(E,b),O=D,M=(Kr._mul(N,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,Kr.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,Kr.ucompare(O,k)<0){M++;M|=0}M=M+(Kr._mul(i.low,_.high)+Kr._mul(i.high,_.low)|0)|0;var R=new Pn(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(Kr.ucompare(x,n.low)<0){F++;F|=0}if((n=new Pn(F,x)).high<0)throw new pa("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,Y=Kr._mul(U,L),H=Kr._mul(P,L),z=Kr._mul(U,B),G=Y,K=(Kr._mul(P,B)+(z>>>16)|0)+(H>>>16)|0;if(G=G+(z<<=16)|0,Kr.ucompare(G,z)<0){K++;K|=0}if(G=G+(H<<=16)|0,Kr.ucompare(G,H)<0){K++;K|=0}K=K+(Kr._mul(i.low,t.high)+Kr._mul(i.high,t.low)|0)|0,i=new Pn(K,G)}return n};var Vr=function(){this.buf=new T,this.cache=[],this.useCache=Vr.USE_CACHE,this.useEnumIndex=Vr.USE_ENUM_INDEX,this.shash=new aa,this.scount=0};(n["haxe.Serializer"]=Vr).__name__=["haxe","Serializer"],Vr.run=function(e){var t=new Vr;return t.serialize(e),t.toString()},Vr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Za[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=Za[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var Y=2,H=B;Y=this.length)throw new pa("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new pa("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new pa("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new pa("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new aa;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Za[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new pa("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new pa("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new pa("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new ta;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new pa("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new pa("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var H=R[M.charCodeAt(F++)];P.b[L++]=255&(Y<<4|H>>2);var z=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<6|z)}if(2<=x){var G=R[M.charCodeAt(F++)],K=R[M.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|K>>4),3==x){var j=R[M.charCodeAt(F++)];P.b[L++]=255&(K<<4|j>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=qe.strDate(qe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new pa("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw pa.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new Zr(e.left,e.key,e.value,new Zr(e.right,t,n,i)):new Zr(new Zr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Zr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Zr(new Zr(e,t,n,i.left),i.key,i.value,i.right):new Zr(new Zr(e,t,n,i.left.left),i.left.key,i.left.value,new Zr(i.left.right,i.key,i.value,i.right))}return new Zr(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=Zr).__name__=["haxe","ds","TreeNode"],Zr.prototype={__class__:Zr};var $r=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};$r.Left=function(e){var t=["Left",0,e];return t.__enum__=$r,t.toString=o,t},$r.Right=function(e){var t=["Right",1,e];return t.__enum__=$r,t.toString=o,t},$r.__empty_constructs__=[];var ea=function(){Xr.call(this)};(n["haxe.ds.EnumValueMap"]=ea).__name__=["haxe","ds","EnumValueMap"],ea.__interfaces__=[Gr],ea.__super__=Xr,ea.prototype=i(Xr.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new oa(new eo(t).buffer)},oa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new oa(e)},oa.fastGet=function(e,t){return e.bytes[t]},oa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new pa(da.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:oa};function sa(){this.b=[]}(n["haxe.io.BytesBuffer"]=sa).__name__=["haxe","io","BytesBuffer"],sa.prototype={getBytes:function(){var e=new oa(new eo(this.b).buffer);return this.b=null,e},__class__:sa};function la(){}(n["haxe.io.Input"]=la).__name__=["haxe","io","Input"],la.prototype={readByte:function(){throw new pa("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);try{for(;0e.length)throw new pa(da.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=ua).__name__=["haxe","io","BytesInput"],ua.__super__=la,ua.prototype=i(la.prototype,{readByte:function(){if(0==this.len)throw new pa(new ha);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);if(0==this.len&&0e.length)throw new pa(da.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:ca};function _a(){this.b=new sa}(n["haxe.io.BytesOutput"]=_a).__name__=["haxe","io","BytesOutput"],_a.__super__=ca,_a.prototype=i(ca.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},fa.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},fa.doubleToI64=function(e){var t=fa.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;rthis.byteLength)throw new pa("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new pa("set() outside of range");for(var s=0,l=o.length;sn&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},Ba.prototype.once=function(e,t){if(!Ya(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},Ba.prototype.removeListener=function(e,t){var n,i,r,a;if(!Ya(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,i=-1,n===t||Ya(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Ha(n)){for(a=r;0>>16)<<16|0)|0},Vr.USE_CACHE=!1,Vr.USE_ENUM_INDEX=!1,Vr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Jr.DEFAULT_RESOLVER=new Qr,Jr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",na.count=0,fa.i64tmp=new Pn(0,0),ga.__toStr={}.toString,Sa.BYTES_PER_ELEMENT=1,Ta.FLOAT_SINGLE_MIN=1401298464324817e-60,Ta.FLOAT_SINGLE_MAX=34028234663852886e22,Ta.FLOAT_DOUBLE_MIN=5e-324,Ta.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file +!function(e,t){"use strict";function o(){return ga.__string_rec(this,"")}var n={};function i(e,t){function n(){}n.prototype=e;var i=new n;for(var r in t)i[r]=t[r];return t.toString!==Object.prototype.toString&&(i.toString=t.toString),i}var r=e.DirectAPI=function(){this.eventEmitter=new Ba};(n.DirectAPI=r).__name__=["DirectAPI"],r.getInstance=function(){return null==r.instance&&(r.instance=new r),r.instance},r.main=function(){},r.prototype={setOptions:function(e){null!=e&&(La.host=e.host,La.endpoint=e.endpoint,La.accessToken=e.access_token,La.proxyURL=e.proxyURL,La.account=e.account,La.talkWithBot=e.talkWithBot,La.acceptableEventTimeDiff=e.acceptableEventTimeDiff),Mi._d("["+qe.dateStr(new Date)+"] ","current settings",La,"","",""),null==La.accessToken&&Mi._e("["+qe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return 0=e.length);){if(!this.matchSub(e,n)){i+=K.string(qe.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(qe.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(qe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},j.startsWith=function(e,t){return e.length>=t.length&&qe.substr(e,0,t.length)==t},j.isSpace=function(e,t){var n=qe.cca(e,t);return 8>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=Kr._mul(o,l),_=Kr._mul(s,l),h=Kr._mul(o,u),d=c,f=(Kr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Kr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Kr.ucompare(d,_)<0){f++;f|=0}f=f+(Kr._mul(t.low,n.high)+Kr._mul(t.high,n.low)|0)|0;var m=new Pn(f,d),p=new Pn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Kr.ucompare(v,m.low)<0){g++;g|=0}t=new Pn(g,v)}return t},Je.getHigh=function(e){return e.high},Je.getLow=function(e){return e.low},Je.idStr=function(e){return"_"+e.high+"_"+e.low},Je.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Pn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},Je.toStr=function(e){return jr.toString(e)},Je.isNeg=function(e){return e.high<0},Je.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Kr.ucompare(i,e.low)<0){n++;n|=0}return new Pn(n,i)},Je.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Kr.ucompare(e.low,t.low)<0){n--;n|=0}return new Pn(n,i)},Je.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Kr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Je.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Je.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Je.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Je.eqArray=function(e,t){if(e!=t){if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(var n=0,i=e.length;n>31,t);return e.filter(function(e){var t=Ze.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:ye});var Se=function(){F.call(this)};(n["albero.command.UrlCommand"]=Se).__name__=["albero","command","UrlCommand"],Se.__super__=F,Se.prototype=i(F.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Se});var we=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};we.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=we,t.toString=o,t},we.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=we,t.toString=o,t},we.BACK=["BACK",2],we.BACK.toString=o,(we.BACK.__enum__=we).__empty_constructs__=[we.BACK];function Te(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Te).__name__=["albero","entity","Account"],Te.prototype={__class__:Te};function et(e){null!=e&&(this.id=e.id,this.group=new Ie(e.group),this.profilePolicy=new Ee(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=et).__name__=["albero","entity","AccountControlGroup"],et.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:et};var Ie=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ie).__name__=["albero","entity","AccountControlGroupGroup"],Ie.prototype={__class__:Ie};var Ee=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=Ee).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ee.prototype={__class__:Ee};function tt(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ie(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ee(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=tt).__name__=["albero","entity","AccountControlGroupPartialUpdate"],tt.prototype={__class__:tt};function nt(e){null!=e&&(this.id=Je.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}(n["albero.entity.AccountControlRequest"]=nt).__name__=["albero","entity","AccountControlRequest"],nt.prototype={__class__:nt};var Ne=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ne.ng=["ng",0],Ne.ng.toString=o,(Ne.ng.__enum__=Ne).ok=["ok",1],Ne.ok.toString=o,(Ne.ok.__enum__=Ne).image=["image",2],Ne.image.toString=o,(Ne.image.__enum__=Ne).imageOrVideo=["imageOrVideo",3],Ne.imageOrVideo.toString=o,(Ne.imageOrVideo.__enum__=Ne).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ne.imageOrVideoOrAudio.toString=o,(Ne.imageOrVideoOrAudio.__enum__=Ne).other=["other",5],Ne.other.toString=o,(Ne.other.__enum__=Ne).__empty_constructs__=[Ne.ng,Ne.ok,Ne.image,Ne.imageOrVideo,Ne.imageOrVideoOrAudio,Ne.other];function Ae(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ae).__name__=["albero","entity","AllowAttachmentType"],Ae.fromInt=function(e){if(null==e)return new Ae(Ne.other);var t;if(null==e)t=Ne.other;else switch(e){case 0:t=Ne.ng;break;case 1:t=Ne.ok;break;case 2:t=Ne.image;break;case 3:t=Ne.imageOrVideo;break;case 4:t=Ne.imageOrVideoOrAudio;break;default:t=Ne.other}return new Ae(t)},Ae.fromValue=function(e){return new Ae(e)},Ae.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0>t,e.high<<32-t|e.low>>>t):new Pn(e.high>>31,e.high>>t-32):new Pn(e.high,e.low)},St.subTimestampPart=function(e,t){var n=St.timestamp(e),i=St.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Kr.ucompare(n.low,i.low)<0){r--;r|=0}return new Pn(r,a)},St.createForTest=function(e){var t=St.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new Pn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Oi.localize("MessageStringMaker.achieve"),Oi.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Oi.localize("MessageStringMaker.achieve"):Oi.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=Kr._mul(a,s),c=Kr._mul(o,s),_=Kr._mul(a,l),h=u,d=(Kr._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Kr.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Kr.ucompare(h,c)<0){d++;d|=0}d=d+(Kr._mul(e.low,t.high)+Kr._mul(e.high,t.low)|0)|0;var f=new Pn(d,h),m=new Pn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(Kr.ucompare(g,f.low)<0){p++;p|=0}e=new Pn(p,g)}return e},__class__:cn};function _n(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=_n).__name__=["albero","entity","OriginalStamp"],_n.__interfaces__=[un],_n.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=Je.makeFromIdStr(t.stampsetIdStr),i=Je.makeFromIdStr(t.stampIdStr);return new _n(n,i,t.illust)},_n.fromPropsAndStampsetId=function(e,t){return new _n(t,Je.fromIntOrInt64(e.id),e.illust)},_n.createKey=function(e){return"original__"+e.high+"_"+e.low},_n.prototype={getImageUrl:function(){return this.illust},getKey:function(){return _n.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new bt;return n.talkId=e,n.type=Dt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:_n};function hn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=hn).__name__=["albero","entity","Stampset"],hn.historyStampset=function(){return new hn(pn.getHistoryStampsetType(),"stamp-history",null,0)},hn.commonStampset=function(e,t,n){return new hn(pn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},hn.originalStampset=function(e){var t=Je.fromIntOrInt64(e.stampset_id),n=pn.fromStampsetId(t),i=new hn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=ga.__cast(e.stamps,Array).map(function(e){return _n.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},hn.fromStampsetInfo=function(e){var t=pn.fromStampsetId(e.stampsetId);return new hn(t,e.name,e.icon,e.version)},hn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:dn};var fn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(Je.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=fn).__name__=["albero","entity","StampsetSetting"],fn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new dn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&Qe.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return Qe.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new aa,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i>2)),r+=K.string(a.charAt(63&(o<<4|s>>4))),r+=K.string(a.charAt(63&(s<<2|l>>6))),r+=K.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=K.string(a.charAt(u>>2)),r+=K.string(a.charAt(63&(u<<4|c>>4))),r+=K.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=K.string(a.charAt(_>>2)),r+=K.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},bi.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=qe.substr(e,0,t));var n=e.length,i=e,r=bi.CODES;null==r&&(r=bi.initCodes(),bi.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new oa(new $a(3*(n>>2)+(2<=o?o-1:0))),u=0;a>4);var h=r[i.charCodeAt(a++)];l.b[u++]=255&(_<<4|h>>2);var d=r[i.charCodeAt(a++)];l.b[u++]=255&(h<<6|d)}if(2<=o){var f=r[i.charCodeAt(a++)],m=r[i.charCodeAt(a++)];if(l.b[u++]=255&(f<<2|m>>4),3==o){var p=r[i.charCodeAt(a++)];l.b[u++]=255&(m<<4|p>>2)}}return l};function Di(){}(n["albero.js.KatakanaToRoman"]=Di).__name__=["albero","js","KatakanaToRoman"],Di.assureConvertTable=function(){return null!=Di.convertTable||(Di.convertTable=new aa,Qe.iter([["ア","A"],["イ","I"],["ウ","U"],["エ","E"],["オ","O"],["カ","KA"],["キ","KI"],["ク","KU"],["ケ","KE"],["コ","KO"],["キャ","KYA"],["キュ","KYU"],["キョ","KYO"],["サ","SA"],["シ","SI"],["ス","SU"],["セ","SE"],["ソ","SO"],["シャ","SHA"],["シュ","SHU"],["ショ","SHO"],["タ","TA"],["チ","TI"],["ツ","TU"],["テ","TE"],["ト","TO"],["チャ","THA"],["チュ","THU"],["チョ","THO"],["ナ","NA"],["ニ","NI"],["ヌ","NU"],["ネ","NE"],["ノ","NO"],["ニャ","NYA"],["ニュ","NYU"],["ニョ","NYO"],["ハ","HA"],["ヒ","HI"],["フ","FU"],["ヘ","HE"],["ホ","HO"],["ヒャ","HYA"],["ヒュ","HYU"],["ヒョ","HYO"],["マ","MA"],["ミ","MI"],["ム","MU"],["メ","ME"],["モ","MO"],["ミャ","MYA"],["ミュ","MYU"],["ミョ","MYO"],["ヤ","YA"],["ユ","YU"],["ヨ","YO"],["ラ","RA"],["リ","RI"],["ル","RU"],["レ","RE"],["ロ","RO"],["リャ","RYA"],["リュ","RYU"],["リョ","RYO"],["ワ","WA"],["ヲ","O"],["ン","N"],["ガ","GA"],["ギ","GI"],["グ","GU"],["ゲ","GE"],["ゴ","GO"],["ギャ","GYA"],["ギュ","GYU"],["ギョ","GYO"],["ザ","ZA"],["ジ","JI"],["ズ","ZU"],["ゼ","ZE"],["ゾ","ZO"],["ジャ","ZYA"],["ジュ","ZYU"],["ジョ","ZYO"],["ダ","DA"],["ヂ","JI"],["ヅ","ZU"],["デ","DE"],["ド","DO"],["バ","BA"],["ビ","BI"],["ブ","BU"],["ベ","BE"],["ボ","BO"],["ビャ","BYA"],["ビュ","BYU"],["ビョ","BYO"],["パ","PA"],["ピ","PI"],["プ","PU"],["ペ","PE"],["ポ","PO"],["ピャ","PYA"],["ピュ","PYU"],["ピョ","PYO"],["ー",""],["ッ","ッ"]],function(e){var t=Di.convertTable,n=e[0],i=e[1];null!=Za[n]?t.setReserved(n,i):t.h[n]=i})),Di.convertTable},Di.matchNext=function(e,t){var n=Di.assureConvertTable();if(t+1=Pi.HIRAGANA_SMALL_A&&o<=Pi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Pi.KATAKANA_SMALL_A-Pi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Pi.katakanaToRoman=function(e){return(new Di).convert(e)},Pi.normalize=function(e){return new Li(null).normalize(e)},Pi.normalizeForFile=function(e){return new Li(null).normalizeForFile(e)},Pi.asyncAssureNormalize=function(){return Promise.resolve()},Pi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Li=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Li).__name__=["albero","js","Normalizer"],Li.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof pa&&(e=e.val),Mi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Oi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof pa&&(e=e.val),Mi._e("["+qe.dateStr(new Date)+"] ","invalid character:",e,"","",""),Oi.localize("TextCanonicalizer.invalid")}},__class__:Li};function Bi(e){this.ws=new WebSocket(e),Xa.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=Pa(this,this.onOpen),this.ws.onmessage=Pa(this,this.onMessage),this.ws.onerror=Pa(this,this.onError),this.ws.onclose=Pa(this,this.onClose)}(n["albero.js.WebSocket"]=Bi).__name__=["albero","js","WebSocket"],Bi.prototype={onOpen:function(e){Mi._i("["+qe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=Xa.websocketsbinary?oa.ofData(new eo(e.data)):bi.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Mi._e("["+qe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);Mi._i("["+qe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){Xa.websocketsbinary?this.ws.send(new eo(e.b.bufferValue).buffer):this.ws.send(bi.encode(e))},ping:function(e){this.send(new oa(new $a(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Bi};function Yi(){}(n["puremvc.interfaces.IProxy"]=Yi).__name__=["puremvc","interfaces","IProxy"],Yi.prototype={__class__:Yi};function Hi(){}(n["albero.proxy.AccessTokenResolverProxy"]=Hi).__name__=["albero","proxy","AccessTokenResolverProxy"],Hi.__interfaces__=[Yi],Hi.prototype={__class__:Hi};var zi=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=zi).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],zi.newInstance=function(){return new Ki("accessTokenResolver")};var Gi=function(e,t){O.call(this),this.proxyName=null!=e?e:Gi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Gi).__name__=["puremvc","patterns","proxy","Proxy"],Gi.__interfaces__=[Yi],Gi.__super__=O,Gi.prototype=i(O.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Gi});var Ki=function(e){Gi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Ki).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Ki.__interfaces__=[Hi],Ki.__super__=Gi,Ki.prototype=i(Gi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=La.account?La.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Ki});var ji=function(){Gi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=ji).__name__=["albero","proxy","AlberoBroadcastProxy"],ji.__super__=Gi,ji.prototype=i(Gi.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new nt(e);this.dataStore.setAccountControlRequest(t),this.sendNotification(n,t),i();break;case"notify_add_acquaintance":var a=this.dataFactory.newAcquaintance(e[1]);this.sendNotification(n,a),i();break;case"notify_add_acquaintances":for(var o=e[1].map(Pa(xa=this.dataFactory,xa.newAcquaintance)),s=0;st.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void Mi._e("["+qe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Dn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Gt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Dn).id=e.id),null==t.talkOrderingTimestamp&&(t.talkOrderingTimestamp=e.updatedAt),this.dataStore.setTalkStatus(t),t},newTalkStatusByMessage:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t&&((t=new Dn).id=e.talkId),kn.isNewMax(t,e.id)&&(t.maxMessageId=e.id,t.maxMessage=e),e.isUnreadCountTarget){var n,i=this.dataStore,r=e.userId;if(null!=i.me){var a=i.me.id;n=null!=a&&null!=r&&a.high==r.high&&a.low==r.low}else n=!1;t.applyNewMessage(e,n)}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(kn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),kn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Dt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Qe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return Mi._e("["+qe.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null;for(var n=e.messageIds[0],r=0,a=e.messageIds;r=i.length)){var e=i[r],t=n.id,o=this.dataFactory.newDummyMessage(t,e.type,e.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[t,bt.enumIndex(e.type),e.content],function(e){var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,o.id]),a.forwardMessages(n,i,r+1)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=mr.toLocalError(Et.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)})}},deleteMessage:function(n,i){var r=this;this.apiCaller.call("delete_message",[n,i],function(e){var t=new kt;t.talkId=n,t.messageId=i,r.sendNotification("notify_delete_message",t)},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void r.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=mr.toLocalError(Et.DeletingMessageConflicted,e);return void r.sendNotification("error_occurred",t)}r.sendNotification("error_occurred",e)}})},updateReadStatuses:function(r,a){var o=this;this.apiCaller.callApiReliable("update_read_statuses",[r,a],function(e){var t,n=o.dataStore.getTalkStatus(r);if(null!=n){var i=n.maxReadMessageId;t=null!=i&&null!=a&&i.high==a.high&&i.low==a.low}else t=!1;t&&o.sendNotification("notify_update_local_talk_status",n)},null,function(e){return 429==e.code&&"too many requests"==e.message?ia.Some(1e3*o.asInt(e.detail.retry_after)):ia.None})},upload:function(e,t,n){var i=this,r=this.dataFactory.newDummyFileMessage(t,n);this.sendNotification("create_message_start",r);var a=this.prepareMessageFileAsync(n,e);a.then(function(e){i.createMessageReliable(t,Dt.file,e,r)}),a.catch(function(e){i.sendNotification("create_message_fail",[e,r])})},uploadMulti:function(n,i,r,a){var o=this,s=this.dataFactory.newDummyMultipleFileMessage(i,r,a);this.sendNotification("create_message_start",s);for(var e=Promise.resolve([]),t=0;te.version)return r;var a=this.accountControlRequests;return null!=Za[n]?a.setReserved(n,e):a.h[n]=e,this.storage.setDirtyFlag(),e},removeAccountControlRequest:function(e){var t="_"+e.high+"_"+e.low;this.accountControlRequests.remove(t),this.storage.setDirtyFlag()},removeAccountControlRequests:function(){this.accountControlRequests=new aa,this.storage.setDirtyFlag()},getAccountControlGroup:function(){return this.accountControlGroup},setAccountControlGroup:function(e){return this.accountControlGroup=e,this.storage.setDirtyFlag(),this.accountControlGroup},updateAccountControlGroup:function(e){if(null!=this.accountControlGroup){var t=this.accountControlGroup.id,n=e.id;if(null!=t&&null!=n&&t.high==n.high&&t.low==n.low){var i=e.group;null!=i&&this.accountControlGroup.group.version>31,e);return v.createByteSizeStringWithUnit(t)},nr.convertUploadableFile=function(e){var t=!1,n=e.name;E.isEmpty(n)&&(n="clipboard_"+p.getDateStringForFile()+".png",t=!0);var i=nr.getContentTypeByFileName(n,e.type);return i!=e.type&&(t=!0),t?{name:n,type:i,file:n,blob:e,size:e.size}:e},nr.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob},nr.getContentTypeByFileName=function(e,t){if(E.isNotEmpty(t))return"csv"==nr.getExtension(e)?"text/csv":t;switch(nr.getExtension(e)){case"csv":return"text/csv";case"doc":return"application/msword";case"docm":return"application/vnd.ms-word.document.macroenabled.12";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"gif":return"image/gif";case"htm":case"html":return"text/html";case"jpeg":case"jpg":return"image/jpeg";case"md":return"text/markdown";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"pptm":return"application/vnd.ms-powerpoint.presentation.macroenabled.12";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"txt":return"text/plain";case"xls":return"application/vnd.ms-excel";case"xlsb":return"application/vnd.ms-excel.sheet.binary.macroenabled.12";case"xlsm":return"application/vnd.ms-excel.sheet.macroenabled.12";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"text/xml";default:return"application/octet-stream"}},nr.getExtension=function(e){if(null==e)return"";var t=e.split("."),n=t.length;return 0==n?"":t[n-1]},nr.__super__=Gi,nr.prototype=i(Gi.prototype,{getValidHost:function(){return"https://"+La.host},downloadUrl:function(e,t){if(null==t&&(t=!1),null==e||0==e.length)return"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(j.startsWith(e,this.validHost)){var n=this.settings.getAccessToken(),i=e;return-1!=e.indexOf("?")?i+="&":i+="?",i+="Authorization=ALB%20"+n,t&&(i+="&download=true"),i}return e},download:function(e,t,n){},upload:function(e,t,n){return this.uploadForBrowser(e,t,n)},uploadForBrowser:function(e,t,r){for(var a={},n=0,i=G.fields(e.post_form);n>>31,t.low<<1);if(63,u=new Pn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Pn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Kr.ucompare(n.high,t.high);if(0<=(0!=d?d:Kr.ucompare(n.low,t.low))){l=new Pn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Kr.ucompare(n.low,t.low)<0){f--;f|=0}n=new Pn(f,m)}63,u=new Pn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Pn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new Pn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Pn(v,y)}return{quotient:l,modulus:n}};var Wr=function(){};(n["haxe.Int64Helper"]=Wr).__name__=["haxe","Int64Helper"],Wr.parseString=function(e){var t=new Pn(0,10),n=new Pn(0,0),i=new Pn(0,1),r=!1,a=j.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=Kr._mul(h,f),g=Kr._mul(d,f),v=Kr._mul(h,m),y=p,S=(Kr._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,Kr.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,Kr.ucompare(y,g)<0){S++;S|=0}S=S+(Kr._mul(i.low,_.high)+Kr._mul(i.high,_.low)|0)|0;var w=new Pn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(Kr.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new Pn(T,I)).high<0))throw new pa("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=Kr._mul(E,A),k=Kr._mul(N,A),C=Kr._mul(E,b),O=D,M=(Kr._mul(N,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,Kr.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,Kr.ucompare(O,k)<0){M++;M|=0}M=M+(Kr._mul(i.low,_.high)+Kr._mul(i.high,_.low)|0)|0;var R=new Pn(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(Kr.ucompare(x,n.low)<0){F++;F|=0}if((n=new Pn(F,x)).high<0)throw new pa("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,Y=Kr._mul(U,L),H=Kr._mul(P,L),z=Kr._mul(U,B),G=Y,K=(Kr._mul(P,B)+(z>>>16)|0)+(H>>>16)|0;if(G=G+(z<<=16)|0,Kr.ucompare(G,z)<0){K++;K|=0}if(G=G+(H<<=16)|0,Kr.ucompare(G,H)<0){K++;K|=0}K=K+(Kr._mul(i.low,t.high)+Kr._mul(i.high,t.low)|0)|0,i=new Pn(K,G)}return n};var Vr=function(){this.buf=new T,this.cache=[],this.useCache=Vr.USE_CACHE,this.useEnumIndex=Vr.USE_ENUM_INDEX,this.shash=new aa,this.scount=0};(n["haxe.Serializer"]=Vr).__name__=["haxe","Serializer"],Vr.run=function(e){var t=new Vr;return t.serialize(e),t.toString()},Vr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Za[e]?t.getReserved(e):t.h[e];if(null!=n)return this.buf.b+="R",void(this.buf.b+=null==n?"null":""+n);var i=this.shash,r=this.scount++;null!=Za[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var Y=2,H=B;Y=this.length)throw new pa("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new pa("Invalid object key");var n=this.unserialize();e[t]=n}this.pos++},unserializeEnum:function(e,t){if(58!=this.buf.charCodeAt(this.pos++))throw new pa("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new pa("Invalid string reference");return this.scache[u];case 97:this.buf;var c=[];for(this.cache.push(c);;){var _=this.buf.charCodeAt(this.pos);if(104==_){this.pos++;break}if(117==_){this.pos++;var h=this.readDigits();c[c.length+h-1]=null}else c.push(this.unserialize())}return c;case 98:var d=new aa;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Za[f]?d.setReserved(f,m):d.h[f]=m}return this.pos++,d;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new pa("Class not found "+p);var v=ee.createEmptyInstance(g);return this.cache.push(v),this.unserializeObject(v),v;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var y=this.unserialize(),S=this.resolver.resolveEnum(y);if(null==S)throw new pa("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new pa("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new ta;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new pa("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new pa("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var H=R[M.charCodeAt(F++)];P.b[L++]=255&(Y<<4|H>>2);var z=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<6|z)}if(2<=x){var G=R[M.charCodeAt(F++)],K=R[M.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|K>>4),3==x){var j=R[M.charCodeAt(F++)];P.b[L++]=255&(K<<4|j>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=qe.strDate(qe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();W=new Date(V)}return this.cache.push(W),W;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new pa("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw pa.wrap(this.unserialize());case 121:var X=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos=(null==s?0:s._height)?new Zr(e.left,e.key,e.value,new Zr(e.right,t,n,i)):new Zr(new Zr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Zr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Zr(new Zr(e,t,n,i.left),i.key,i.value,i.right):new Zr(new Zr(e,t,n,i.left.left),i.left.key,i.left.value,new Zr(i.left.right,i.key,i.value,i.right))}return new Zr(e,t,n,i,(a(null==s?0:s._height)){var l=this.left;a=null==l?0:l._height}else{var u=this.right;a=null==u?0:u._height}this._height=a+1}else this._height=r};(n["haxe.ds.TreeNode"]=Zr).__name__=["haxe","ds","TreeNode"],Zr.prototype={__class__:Zr};var $r=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};$r.Left=function(e){var t=["Left",0,e];return t.__enum__=$r,t.toString=o,t},$r.Right=function(e){var t=["Right",1,e];return t.__enum__=$r,t.toString=o,t},$r.__empty_constructs__=[];var ea=function(){Xr.call(this)};(n["haxe.ds.EnumValueMap"]=ea).__name__=["haxe","ds","EnumValueMap"],ea.__interfaces__=[Gr],ea.__super__=Xr,ea.prototype=i(Xr.prototype,{compare:function(e,t){var n=e[1]-t[1];if(0!=n)return n;var i=e.slice(2),r=t.slice(2);return 0==i.length&&0==r.length?0:this.compareArgs(i,r)},compareArgs:function(e,t){var n=e.length-t.length;if(0!=n)return n;for(var i=0,r=e.length;i>6):(i<=65535?t.push(224|i>>12):(t.push(240|i>>18),t.push(128|i>>12&63)),t.push(128|i>>6&63)),t.push(128|63&i))}return new oa(new eo(t).buffer)},oa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new oa(e)},oa.fastGet=function(e,t){return e.bytes[t]},oa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new pa(da.OutsideBounds);for(var n="",i=this.b,r=String.fromCharCode,a=e,o=e+t;a>10)),n+=r(1023&l|56320)}}return n},toString:function(){return this.getString(0,this.length)},__class__:oa};function sa(){this.b=[]}(n["haxe.io.BytesBuffer"]=sa).__name__=["haxe","io","BytesBuffer"],sa.prototype={getBytes:function(){var e=new oa(new eo(this.b).buffer);return this.b=null,e},__class__:sa};function la(){}(n["haxe.io.Input"]=la).__name__=["haxe","io","Input"],la.prototype={readByte:function(){throw new pa("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);try{for(;0e.length)throw new pa(da.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=ua).__name__=["haxe","io","BytesInput"],ua.__super__=la,ua.prototype=i(la.prototype,{readByte:function(){if(0==this.len)throw new pa(new ha);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);if(0==this.len&&0e.length)throw new pa(da.OutsideBounds);for(var i=e.b,r=n;0>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:ca};function _a(){this.b=new sa}(n["haxe.io.BytesOutput"]=_a).__name__=["haxe","io","BytesOutput"],_a.__super__=ca,_a.prototype=i(ca.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new pa(da.OutsideBounds);i.b;for(var r=e.b,a=t,o=t+n;a>>23&255,n=8388607&e;return 0==n&&0==t?0:(1-(e>>>31<<1))*(1+Math.pow(2,-23)*n)*Math.pow(2,t-127)},fa.floatToI32=function(e){if(0==e)return 0;var t=e<0?-e:e,n=Math.floor(Math.log(t)/.6931471805599453);n<-127?n=-127:128>20&2047)-1023,i=4294967296*(1048575&t)+2147483648*(e>>>31)+(2147483647&e);return 0==i&&-1023==n?0:(1-(t>>>31<<1))*(1+Math.pow(2,-52)*i)*Math.pow(2,n)},fa.doubleToI64=function(e){var t=fa.i64tmp;if(0==e)t.low=0,t.high=0;else if(isFinite(e)){var n=e<0?-e:e,i=Math.floor(Math.log(n)/.6931471805599453),r=Math.round(4503599627370496*(n/Math.pow(2,i)-1)),a=0|r,o=r/4294967296|0;t.low=a,t.high=(e<0?-2147483648:0)|i+1023<<20|o}else 0";var n=typeof e;switch("function"==n&&(e.__name__||e.__ename__)&&(n="object"),n){case"function":return"";case"object":if(e instanceof Array){if(e.__enum__){if(2==e.length)return e[0];var i=e[0]+"(";t+="\t";for(var r=2,a=e.length;rthis.byteLength)throw new pa("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new pa("set() outside of range");for(var s=0,l=o.length;sn&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},Ba.prototype.once=function(e,t){if(!Ya(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},Ba.prototype.removeListener=function(e,t){var n,i,r,a;if(!Ya(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=(n=this._events[e]).length,i=-1,n===t||Ya(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Ha(n)){for(a=r;0>>16)<<16|0)|0},Vr.USE_CACHE=!1,Vr.USE_ENUM_INDEX=!1,Vr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Jr.DEFAULT_RESOLVER=new Qr,Jr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",na.count=0,fa.i64tmp=new Pn(0,0),ga.__toStr={}.toString,Sa.BYTES_PER_ELEMENT=1,Ta.FLOAT_SINGLE_MIN=1401298464324817e-60,Ta.FLOAT_SINGLE_MAX=34028234663852886e22,Ta.FLOAT_DOUBLE_MIN=5e-324,Ta.FLOAT_DOUBLE_MAX=17976931348623157e292,r.main()}("undefined"!=typeof exports?exports:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this); \ No newline at end of file diff --git a/package.json b/package.json index 6e1b4ef..822a8a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "direct-js", - "version": "1.111.0", + "version": "1.111.5", "description": "Low-level javascript library for direct", "main": "./lib/direct-node.min.js", "scripts": {