diff --git a/lib/direct-node.min.js b/lib/direct-node.min.js index f99a4e1..7283e37 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function s(){return pa.__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&&(ja.host=e.host,ja.endpoint=e.endpoint,ja.accessToken=e.access_token,ja.proxyURL=e.proxyURL,ja.account=e.account,ja.talkWithBot=e.talkWithBot,ja.name=e.name,ja.storagePath=e.storage_path,ja.storageQuota=e.storage_quota,ja.wsConfig=e.ws_config),Si._d("["+He.dateStr(new Date)+"] ","current settings",ja,"","",""),null==ja.accessToken&&Si._e("["+He.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+=q.string(He.substr(e,n,null));break}var r=this.matchedPos();if(i+=q.string(He.substr(e,n,r.pos-n)),i+=q.string(t(this)),n=0==r.len?(i+=q.string(He.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},E.startsWith=function(e,t){return e.length>=t.length&&He.substr(e,0,t.length)==t},E.replace=function(e,t,n){return e.split(t).join(n)},E.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.lengthn;){var t=He.substr(e,0,n);i.push(t),e=He.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=Yr._mul(o,l),_=Yr._mul(s,l),h=Yr._mul(o,u),d=c,f=(Yr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Yr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Yr.ucompare(d,_)<0){f++;f|=0}f=f+(Yr._mul(t.low,n.high)+Yr._mul(t.high,n.low)|0)|0;var m=new Dn(f,d),p=new Dn(0,q.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Yr.ucompare(v,m.low)<0){g++;g|=0}t=new Dn(g,v)}return t},Ge.getHigh=function(e){return e.high},Ge.getLow=function(e){return e.low},Ge.idStr=function(e){return"_"+e.high+"_"+e.low},Ge.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Dn(q.parseInt(t.matched(1)),q.parseInt(t.matched(2))):null},Ge.toStr=function(e){return Kr.toString(e)},Ge.isNeg=function(e){return e.high<0},Ge.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Yr.ucompare(i,e.low)<0){n++;n|=0}return new Dn(n,i)},Ge.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Yr.ucompare(e.low,t.low)<0){n--;n|=0}return new Dn(n,i)},Ge.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Yr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Ge.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ge.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ge.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ge.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ge.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=Ke.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__:Se});var we=function(){P.call(this)};(n["albero.command.UrlCommand"]=we).__name__=["albero","command","UrlCommand"],we.__super__=P,we.prototype=i(P.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__:we});var Te=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};Te.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=Te,t.toString=s,t},Te.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=Te,t.toString=s,t},Te.BACK=["BACK",2],Te.BACK.toString=s,(Te.BACK.__enum__=Te).__empty_constructs__=[Te.BACK];function Ee(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Ee).__name__=["albero","entity","Account"],Ee.prototype={__class__:Ee};function Ve(e){null!=e&&(this.id=e.id,this.group=new Ie(e.group),this.profilePolicy=new Ne(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=Ve).__name__=["albero","entity","AccountControlGroup"],Ve.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:Ve};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 Ne=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"]=Ne).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ne.prototype={__class__:Ne};function qe(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ie(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ne(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=qe).__name__=["albero","entity","AccountControlGroupPartialUpdate"],qe.prototype={__class__:qe};function Qe(e){null!=e&&(this.id=Ge.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"]=Qe).__name__=["albero","entity","AccountControlRequest"],Qe.prototype={__class__:Qe};var Ae=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ae.ng=["ng",0],Ae.ng.toString=s,(Ae.ng.__enum__=Ae).ok=["ok",1],Ae.ok.toString=s,(Ae.ok.__enum__=Ae).image=["image",2],Ae.image.toString=s,(Ae.image.__enum__=Ae).imageOrVideo=["imageOrVideo",3],Ae.imageOrVideo.toString=s,(Ae.imageOrVideo.__enum__=Ae).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ae.imageOrVideoOrAudio.toString=s,(Ae.imageOrVideoOrAudio.__enum__=Ae).other=["other",5],Ae.other.toString=s,(Ae.other.__enum__=Ae).__empty_constructs__=[Ae.ng,Ae.ok,Ae.image,Ae.imageOrVideo,Ae.imageOrVideoOrAudio,Ae.other];function be(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=be).__name__=["albero","entity","AllowAttachmentType"],be.fromInt=function(e){if(null==e)return new be(Ae.other);var t;if(null==e)t=Ae.other;else switch(e){case 0:t=Ae.ng;break;case 1:t=Ae.ok;break;case 2:t=Ae.image;break;case 3:t=Ae.imageOrVideo;break;case 4:t=Ae.imageOrVideoOrAudio;break;default:t=Ae.other}return new be(t)},be.fromValue=function(e){return new be(e)},be.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,yi.localize("MessageStringMaker.achieve"),yi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?yi.localize("MessageStringMaker.achieve"):yi.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19: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 2:if(null!=this.content.text&&0=Ni.HIRAGANA_SMALL_A&&o<=Ni.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Ni.KATAKANA_SMALL_A-Ni.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Ni.katakanaToRoman=function(e){return(new pi).convert(e)},Ni.normalize=function(e){return new Ai(null).normalize(e)},Ni.normalizeForFile=function(e){return new Ai(null).normalizeForFile(e)},Ni.asyncAssureNormalize=function(){return Promise.resolve()},Ni.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ai=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Ai).__name__=["albero","js","Normalizer"],Ai.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof ma&&(e=e.val),Si._e("["+He.dateStr(new Date)+"] ","invalid character:",e,"","",""),yi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof ma&&(e=e.val),Si._e("["+He.dateStr(new Date)+"] ","invalid character:",e,"","",""),yi.localize("TextCanonicalizer.invalid")}},__class__:Ai};function bi(e){var t=this,n=ja.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",Ba(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",Ba(t,t.onError)),e.on("close",Ba(t,t.onConnectionClose)),e.on("message",Ba(t,t.onMessage)),e.on("pong",Ba(t,t.onPong)),t.onOpen(null)});var r=null;null!=ja.proxyURL&&(r={agent:Ii.createAgent(ja.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=bi).__name__=["albero","js","WebSocket"],bi.prototype={onOpen:function(e){Si._i("["+He.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=aa.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Si._e("["+He.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. "+q.string(e.code)+" "+q.string(e.reason)+" "+q.string(e.wasClean);Si._i("["+He.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 Ta(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:bi};function Di(){}(n["puremvc.interfaces.IProxy"]=Di).__name__=["puremvc","interfaces","IProxy"],Di.prototype={__class__:Di};function ki(){}(n["albero.proxy.AccessTokenResolverProxy"]=ki).__name__=["albero","proxy","AccessTokenResolverProxy"],ki.__interfaces__=[Di],ki.prototype={__class__:ki};var Ci=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ci).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ci.newInstance=function(){return new Ri("accessTokenResolver")};var Oi=function(e,t){F.call(this),this.proxyName=null!=e?e:Oi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Oi).__name__=["puremvc","patterns","proxy","Proxy"],Oi.__interfaces__=[Di],Oi.__super__=F,Oi.prototype=i(F.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Oi});var Ri=function(e){Oi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Ri).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Ri.__interfaces__=[ki],Ri.__super__=Oi,Ri.prototype=i(Oi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ja.account?ja.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__:Ri});function Mi(){}(n["albero.proxy.AccountLoaderProxy"]=Mi).__name__=["albero","proxy","AccountLoaderProxy"],Mi.__interfaces__=[Di],Mi.prototype={__class__:Mi};var Fi=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Fi).__name__=["albero","proxy","AccountLoaderProxyFactory"],Fi.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new xi("accountLoader")};var xi=function(e){Oi.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=xi).__name__=["albero","proxy","AccountLoaderProxyForHubot"],xi.__interfaces__=[Mi],xi.__super__=Oi,xi.prototype=i(Oi.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 Ee(n,t))})}),null},__class__:xi});var Ui=function(){Oi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Ui).__name__=["albero","proxy","AlberoBroadcastProxy"],Ui.__super__=Oi,Ui.prototype=i(Oi.prototype,{handleNotification:function(n,e,i){var r=this;switch(Si._d("["+He.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new Qe(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(Ba(Pa=this.dataFactory,Pa.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 Si._e("["+He.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Sn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=zt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Sn).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 Sn).id=e.talkId),wn.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;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(wn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),wn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=bt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!ze.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 Si._e("["+He.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,At.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=or.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 Dt;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=or.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?na.Some(1e3*o.asInt(e.detail.retry_after)):na.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,bt.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!=Va[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 ra,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,t.low<<1);if(63,u=new Dn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Dn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Yr.ucompare(n.high,t.high);if(0<=(0!=d?d:Yr.ucompare(n.low,t.low))){l=new Dn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Yr.ucompare(n.low,t.low)<0){f--;f|=0}n=new Dn(f,m)}63,u=new Dn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Dn(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 Dn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Dn(v,y)}return{quotient:l,modulus:n}};var Wr=function(){this.buf=new T,this.cache=[],this.useCache=Wr.USE_CACHE,this.useEnumIndex=Wr.USE_ENUM_INDEX,this.shash=new ra,this.scount=0};(n["haxe.Serializer"]=Wr).__name__=["haxe","Serializer"],Wr.run=function(e){var t=new Wr;return t.serialize(e),t.toString()},Wr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Va[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!=Va[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=q.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&(R<<4|M>>4)]),this.buf.b+=String.fromCharCode(b[63&(M<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=I.b[N++],U=I.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=I.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+=q.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=q.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=q.string(B-2);for(var j=2,H=B;j=this.length)throw new ma("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new ma("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 ma("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new ma("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 ra;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Va[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 ma("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 ma("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new ma("Unknown enum index "+y+"@"+w);var E=this.unserializeEnum(S,T);return this.cache.push(E),E;case 107:return NaN;case 108:var I=new $;this.cache.push(I);for(this.buf;104!=this.buf.charCodeAt(this.pos);)I.add(this.unserialize());return this.pos++,I;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 ea;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 ma("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new ma("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),R=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=M[R.charCodeAt(F++)];P.b[L++]=255&(j<<4|H>>2);var z=M[R.charCodeAt(F++)];P.b[L++]=255&(H<<6|z)}if(2<=x){var G=M[R.charCodeAt(F++)],Y=M[R.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|Y>>4),3==x){var K=M[R.charCodeAt(F++)];P.b[L++]=255&(Y<<4|K>>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=He.strDate(He.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 ma("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw ma.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 Xr(e.left,e.key,e.value,new Xr(e.right,t,n,i)):new Xr(new Xr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Xr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Xr(new Xr(e,t,n,i.left),i.key,i.value,i.right):new Xr(new Xr(e,t,n,i.left.left),i.left.key,i.left.value,new Xr(i.left.right,i.key,i.value,i.right))}return new Xr(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"]=Xr).__name__=["haxe","ds","TreeNode"],Xr.prototype={__class__:Xr};var Zr=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Zr.Left=function(e){var t=["Left",0,e];return t.__enum__=Zr,t.toString=s,t},Zr.Right=function(e){var t=["Right",1,e];return t.__enum__=Zr,t.toString=s,t},Zr.__empty_constructs__=[];var $r=function(){Jr.call(this)};(n["haxe.ds.EnumValueMap"]=$r).__name__=["haxe","ds","EnumValueMap"],$r.__interfaces__=[Gr],$r.__super__=Jr,$r.prototype=i(Jr.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 aa(new Uint8Array(t).buffer)},aa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new aa(e)},aa.fastGet=function(e,t){return e.bytes[t]},aa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new ma(ha.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__:aa};function oa(){this.b=[]}(n["haxe.io.BytesBuffer"]=oa).__name__=["haxe","io","BytesBuffer"],oa.prototype={getBytes:function(){var e=new aa(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:oa};function sa(){}(n["haxe.io.Input"]=sa).__name__=["haxe","io","Input"],sa.prototype={readByte:function(){throw new ma("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new ma(ha.OutsideBounds);try{for(;0e.length)throw new ma(ha.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=la).__name__=["haxe","io","BytesInput"],la.__super__=sa,la.prototype=i(sa.prototype,{readByte:function(){if(0==this.len)throw new ma(new _a);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new ma(ha.OutsideBounds);if(0==this.len&&0e.length)throw new ma(ha.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__:ua};function ca(){this.b=new oa}(n["haxe.io.BytesOutput"]=ca).__name__=["haxe","io","BytesOutput"],ca.__super__=ua,ca.prototype=i(ua.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 ma(ha.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)},da.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)},da.doubleToI64=function(e){var t=da.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},Wr.USE_CACHE=!1,Wr.USE_ENUM_INDEX=!1,Wr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Qr.DEFAULT_RESOLVER=new qr,Qr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ta.count=0,da.i64tmp=new Dn(0,0),pa.__toStr={}.toString,Ia.FLOAT_SINGLE_MIN=1401298464324817e-60,Ia.FLOAT_SINGLE_MAX=34028234663852886e22,Ia.FLOAT_DOUBLE_MIN=5e-324,Ia.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 pa.__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&&(ja.host=e.host,ja.endpoint=e.endpoint,ja.accessToken=e.access_token,ja.proxyURL=e.proxyURL,ja.account=e.account,ja.talkWithBot=e.talkWithBot,ja.name=e.name,ja.storagePath=e.storage_path,ja.storageQuota=e.storage_quota,ja.wsConfig=e.ws_config),Si._d("["+He.dateStr(new Date)+"] ","current settings",ja,"","",""),null==ja.accessToken&&Si._e("["+He.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+=q.string(He.substr(e,n,null));break}var r=this.matchedPos();if(i+=q.string(He.substr(e,n,r.pos-n)),i+=q.string(t(this)),n=0==r.len?(i+=q.string(He.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},E.startsWith=function(e,t){return e.length>=t.length&&He.substr(e,0,t.length)==t},E.replace=function(e,t,n){return e.split(t).join(n)},E.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.lengthn;){var t=He.substr(e,0,n);i.push(t),e=He.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=Yr._mul(o,l),_=Yr._mul(s,l),h=Yr._mul(o,u),d=c,f=(Yr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Yr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Yr.ucompare(d,_)<0){f++;f|=0}f=f+(Yr._mul(t.low,n.high)+Yr._mul(t.high,n.low)|0)|0;var m=new Dn(f,d),p=new Dn(0,q.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Yr.ucompare(v,m.low)<0){g++;g|=0}t=new Dn(g,v)}return t},Ge.getHigh=function(e){return e.high},Ge.getLow=function(e){return e.low},Ge.idStr=function(e){return"_"+e.high+"_"+e.low},Ge.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Dn(q.parseInt(t.matched(1)),q.parseInt(t.matched(2))):null},Ge.toStr=function(e){return Kr.toString(e)},Ge.isNeg=function(e){return e.high<0},Ge.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Yr.ucompare(i,e.low)<0){n++;n|=0}return new Dn(n,i)},Ge.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Yr.ucompare(e.low,t.low)<0){n--;n|=0}return new Dn(n,i)},Ge.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Yr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Ge.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ge.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ge.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ge.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ge.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=Ke.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__:Se});var we=function(){P.call(this)};(n["albero.command.UrlCommand"]=we).__name__=["albero","command","UrlCommand"],we.__super__=P,we.prototype=i(P.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__:we});var Te=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};Te.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=Te,t.toString=s,t},Te.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=Te,t.toString=s,t},Te.BACK=["BACK",2],Te.BACK.toString=s,(Te.BACK.__enum__=Te).__empty_constructs__=[Te.BACK];function Ee(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Ee).__name__=["albero","entity","Account"],Ee.prototype={__class__:Ee};function Ve(e){null!=e&&(this.id=e.id,this.group=new Ie(e.group),this.profilePolicy=new Ne(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=Ve).__name__=["albero","entity","AccountControlGroup"],Ve.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:Ve};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 Ne=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"]=Ne).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ne.prototype={__class__:Ne};function qe(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ie(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ne(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=qe).__name__=["albero","entity","AccountControlGroupPartialUpdate"],qe.prototype={__class__:qe};function Qe(e){null!=e&&(this.id=Ge.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"]=Qe).__name__=["albero","entity","AccountControlRequest"],Qe.prototype={__class__:Qe};var Ae=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ae.ng=["ng",0],Ae.ng.toString=s,(Ae.ng.__enum__=Ae).ok=["ok",1],Ae.ok.toString=s,(Ae.ok.__enum__=Ae).image=["image",2],Ae.image.toString=s,(Ae.image.__enum__=Ae).imageOrVideo=["imageOrVideo",3],Ae.imageOrVideo.toString=s,(Ae.imageOrVideo.__enum__=Ae).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ae.imageOrVideoOrAudio.toString=s,(Ae.imageOrVideoOrAudio.__enum__=Ae).other=["other",5],Ae.other.toString=s,(Ae.other.__enum__=Ae).__empty_constructs__=[Ae.ng,Ae.ok,Ae.image,Ae.imageOrVideo,Ae.imageOrVideoOrAudio,Ae.other];function be(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=be).__name__=["albero","entity","AllowAttachmentType"],be.fromInt=function(e){if(null==e)return new be(Ae.other);var t;if(null==e)t=Ae.other;else switch(e){case 0:t=Ae.ng;break;case 1:t=Ae.ok;break;case 2:t=Ae.image;break;case 3:t=Ae.imageOrVideo;break;case 4:t=Ae.imageOrVideoOrAudio;break;default:t=Ae.other}return new be(t)},be.fromValue=function(e){return new be(e)},be.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,yi.localize("MessageStringMaker.achieve"),yi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?yi.localize("MessageStringMaker.achieve"):yi.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19: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 2:if(null!=this.content.text&&0=Ni.HIRAGANA_SMALL_A&&o<=Ni.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Ni.KATAKANA_SMALL_A-Ni.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Ni.katakanaToRoman=function(e){return(new pi).convert(e)},Ni.normalize=function(e){return new Ai(null).normalize(e)},Ni.normalizeForFile=function(e){return new Ai(null).normalizeForFile(e)},Ni.asyncAssureNormalize=function(){return Promise.resolve()},Ni.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ai=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Ai).__name__=["albero","js","Normalizer"],Ai.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof ma&&(e=e.val),Si._e("["+He.dateStr(new Date)+"] ","invalid character:",e,"","",""),yi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof ma&&(e=e.val),Si._e("["+He.dateStr(new Date)+"] ","invalid character:",e,"","",""),yi.localize("TextCanonicalizer.invalid")}},__class__:Ai};function bi(e){var t=this,n=ja.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",Ba(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",Ba(t,t.onError)),e.on("close",Ba(t,t.onConnectionClose)),e.on("message",Ba(t,t.onMessage)),e.on("pong",Ba(t,t.onPong)),t.onOpen(null)});var r=null;null!=ja.proxyURL&&(r={agent:Ii.createAgent(ja.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=bi).__name__=["albero","js","WebSocket"],bi.prototype={onOpen:function(e){Si._i("["+He.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=aa.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Si._e("["+He.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. "+q.string(e.code)+" "+q.string(e.reason)+" "+q.string(e.wasClean);Si._i("["+He.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 Ta(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:bi};function Di(){}(n["puremvc.interfaces.IProxy"]=Di).__name__=["puremvc","interfaces","IProxy"],Di.prototype={__class__:Di};function ki(){}(n["albero.proxy.AccessTokenResolverProxy"]=ki).__name__=["albero","proxy","AccessTokenResolverProxy"],ki.__interfaces__=[Di],ki.prototype={__class__:ki};var Ci=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ci).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ci.newInstance=function(){return new Ri("accessTokenResolver")};var Oi=function(e,t){F.call(this),this.proxyName=null!=e?e:Oi.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Oi).__name__=["puremvc","patterns","proxy","Proxy"],Oi.__interfaces__=[Di],Oi.__super__=F,Oi.prototype=i(F.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Oi});var Ri=function(e){Oi.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Ri).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Ri.__interfaces__=[ki],Ri.__super__=Oi,Ri.prototype=i(Oi.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ja.account?ja.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__:Ri});function Mi(){}(n["albero.proxy.AccountLoaderProxy"]=Mi).__name__=["albero","proxy","AccountLoaderProxy"],Mi.__interfaces__=[Di],Mi.prototype={__class__:Mi};var Fi=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Fi).__name__=["albero","proxy","AccountLoaderProxyFactory"],Fi.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new xi("accountLoader")};var xi=function(e){Oi.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=xi).__name__=["albero","proxy","AccountLoaderProxyForHubot"],xi.__interfaces__=[Mi],xi.__super__=Oi,xi.prototype=i(Oi.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 Ee(n,t))})}),null},__class__:xi});var Ui=function(){Oi.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Ui).__name__=["albero","proxy","AlberoBroadcastProxy"],Ui.__super__=Oi,Ui.prototype=i(Oi.prototype,{handleNotification:function(n,e,i){var r=this;switch(Si._d("["+He.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new Qe(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(Ba(Pa=this.dataFactory,Pa.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 Si._e("["+He.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new Sn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=zt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Sn).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 Sn).id=e.talkId),wn.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;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(wn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),wn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=bt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!ze.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 Si._e("["+He.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,At.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=or.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 Dt;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=or.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?na.Some(1e3*o.asInt(e.detail.retry_after)):na.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,bt.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!=Va[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 ra,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,t.low<<1);if(63,u=new Dn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Dn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Yr.ucompare(n.high,t.high);if(0<=(0!=d?d:Yr.ucompare(n.low,t.low))){l=new Dn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Yr.ucompare(n.low,t.low)<0){f--;f|=0}n=new Dn(f,m)}63,u=new Dn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Dn(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 Dn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Dn(v,y)}return{quotient:l,modulus:n}};var Wr=function(){this.buf=new T,this.cache=[],this.useCache=Wr.USE_CACHE,this.useEnumIndex=Wr.USE_ENUM_INDEX,this.shash=new ra,this.scount=0};(n["haxe.Serializer"]=Wr).__name__=["haxe","Serializer"],Wr.run=function(e){var t=new Wr;return t.serialize(e),t.toString()},Wr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Va[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!=Va[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=q.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&(R<<4|M>>4)]),this.buf.b+=String.fromCharCode(b[63&(M<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=I.b[N++],U=I.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=I.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+=q.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=q.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=q.string(B-2);for(var j=2,H=B;j=this.length)throw new ma("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new ma("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 ma("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new ma("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 ra;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Va[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 ma("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 ma("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new ma("Unknown enum index "+y+"@"+w);var E=this.unserializeEnum(S,T);return this.cache.push(E),E;case 107:return NaN;case 108:var I=new $;this.cache.push(I);for(this.buf;104!=this.buf.charCodeAt(this.pos);)I.add(this.unserialize());return this.pos++,I;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 ea;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 ma("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new ma("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),R=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=M[R.charCodeAt(F++)];P.b[L++]=255&(j<<4|H>>2);var z=M[R.charCodeAt(F++)];P.b[L++]=255&(H<<6|z)}if(2<=x){var G=M[R.charCodeAt(F++)],Y=M[R.charCodeAt(F++)];if(P.b[L++]=255&(G<<2|Y>>4),3==x){var K=M[R.charCodeAt(F++)];P.b[L++]=255&(Y<<4|K>>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=He.strDate(He.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 ma("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw ma.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 Xr(e.left,e.key,e.value,new Xr(e.right,t,n,i)):new Xr(new Xr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Xr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Xr(new Xr(e,t,n,i.left),i.key,i.value,i.right):new Xr(new Xr(e,t,n,i.left.left),i.left.key,i.left.value,new Xr(i.left.right,i.key,i.value,i.right))}return new Xr(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"]=Xr).__name__=["haxe","ds","TreeNode"],Xr.prototype={__class__:Xr};var Zr=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Zr.Left=function(e){var t=["Left",0,e];return t.__enum__=Zr,t.toString=s,t},Zr.Right=function(e){var t=["Right",1,e];return t.__enum__=Zr,t.toString=s,t},Zr.__empty_constructs__=[];var $r=function(){Jr.call(this)};(n["haxe.ds.EnumValueMap"]=$r).__name__=["haxe","ds","EnumValueMap"],$r.__interfaces__=[Gr],$r.__super__=Jr,$r.prototype=i(Jr.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 aa(new Uint8Array(t).buffer)},aa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new aa(e)},aa.fastGet=function(e,t){return e.bytes[t]},aa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new ma(ha.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__:aa};function oa(){this.b=[]}(n["haxe.io.BytesBuffer"]=oa).__name__=["haxe","io","BytesBuffer"],oa.prototype={getBytes:function(){var e=new aa(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:oa};function sa(){}(n["haxe.io.Input"]=sa).__name__=["haxe","io","Input"],sa.prototype={readByte:function(){throw new ma("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new ma(ha.OutsideBounds);try{for(;0e.length)throw new ma(ha.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=la).__name__=["haxe","io","BytesInput"],la.__super__=sa,la.prototype=i(sa.prototype,{readByte:function(){if(0==this.len)throw new ma(new _a);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new ma(ha.OutsideBounds);if(0==this.len&&0e.length)throw new ma(ha.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__:ua};function ca(){this.b=new oa}(n["haxe.io.BytesOutput"]=ca).__name__=["haxe","io","BytesOutput"],ca.__super__=ua,ca.prototype=i(ua.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 ma(ha.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)},da.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)},da.doubleToI64=function(e){var t=da.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},Wr.USE_CACHE=!1,Wr.USE_ENUM_INDEX=!1,Wr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Qr.DEFAULT_RESOLVER=new qr,Qr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ta.count=0,da.i64tmp=new Dn(0,0),pa.__toStr={}.toString,Ia.FLOAT_SINGLE_MIN=1401298464324817e-60,Ia.FLOAT_SINGLE_MAX=34028234663852886e22,Ia.FLOAT_DOUBLE_MIN=5e-324,Ia.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 c08a919..b345b23 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function o(){return ea.__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 Ta};(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&&(wa.host=e.host,wa.endpoint=e.endpoint,wa.accessToken=e.access_token,wa.proxyURL=e.proxyURL,wa.account=e.account,wa.talkWithBot=e.talkWithBot),vi._d("["+Ye.dateStr(new Date)+"] ","current settings",wa,"","",""),null==wa.accessToken&&vi._e("["+Ye.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+=j.string(Ye.substr(e,n,null));break}var r=this.matchedPos();if(i+=j.string(Ye.substr(e,n,r.pos-n)),i+=j.string(t(this)),n=0==r.len?(i+=j.string(Ye.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},E.startsWith=function(e,t){return e.length>=t.length&&Ye.substr(e,0,t.length)==t},E.replace=function(e,t,n){return e.split(t).join(n)},E.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=Dr._mul(o,l),_=Dr._mul(s,l),h=Dr._mul(o,u),d=c,f=(Dr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Dr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Dr.ucompare(d,_)<0){f++;f|=0}f=f+(Dr._mul(t.low,n.high)+Dr._mul(t.high,n.low)|0)|0;var m=new In(f,d),p=new In(0,j.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Dr.ucompare(v,m.low)<0){g++;g|=0}t=new In(g,v)}return t},He.getHigh=function(e){return e.high},He.getLow=function(e){return e.low},He.idStr=function(e){return"_"+e.high+"_"+e.low},He.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new In(j.parseInt(t.matched(1)),j.parseInt(t.matched(2))):null},He.toStr=function(e){return kr.toString(e)},He.isNeg=function(e){return e.high<0},He.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Dr.ucompare(i,e.low)<0){n++;n|=0}return new In(n,i)},He.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Dr.ucompare(e.low,t.low)<0){n--;n|=0}return new In(n,i)},He.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Dr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},He.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},He.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},He.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},He.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},He.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=Ke.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__:ge});var ve=function(){x.call(this)};(n["albero.command.UrlCommand"]=ve).__name__=["albero","command","UrlCommand"],ve.__super__=x,ve.prototype=i(x.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__:ve});var ye=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};ye.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=ye,t.toString=o,t},ye.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=ye,t.toString=o,t},ye.BACK=["BACK",2],ye.BACK.toString=o,(ye.BACK.__enum__=ye).__empty_constructs__=[ye.BACK];function Se(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Se).__name__=["albero","entity","Account"],Se.prototype={__class__:Se};function Ve(e){null!=e&&(this.id=e.id,this.group=new we(e.group),this.profilePolicy=new Te(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=Ve).__name__=["albero","entity","AccountControlGroup"],Ve.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:Ve};var we=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"]=we).__name__=["albero","entity","AccountControlGroupGroup"],we.prototype={__class__:we};var Te=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"]=Te).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Te.prototype={__class__:Te};function qe(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new we(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Te(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=qe).__name__=["albero","entity","AccountControlGroupPartialUpdate"],qe.prototype={__class__:qe};function Qe(e){null!=e&&(this.id=He.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"]=Qe).__name__=["albero","entity","AccountControlRequest"],Qe.prototype={__class__:Qe};var Ee=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ee.ng=["ng",0],Ee.ng.toString=o,(Ee.ng.__enum__=Ee).ok=["ok",1],Ee.ok.toString=o,(Ee.ok.__enum__=Ee).image=["image",2],Ee.image.toString=o,(Ee.image.__enum__=Ee).imageOrVideo=["imageOrVideo",3],Ee.imageOrVideo.toString=o,(Ee.imageOrVideo.__enum__=Ee).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ee.imageOrVideoOrAudio.toString=o,(Ee.imageOrVideoOrAudio.__enum__=Ee).other=["other",5],Ee.other.toString=o,(Ee.other.__enum__=Ee).__empty_constructs__=[Ee.ng,Ee.ok,Ee.image,Ee.imageOrVideo,Ee.imageOrVideoOrAudio,Ee.other];function Ne(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ne).__name__=["albero","entity","AllowAttachmentType"],Ne.fromInt=function(e){if(null==e)return new Ne(Ee.other);var t;if(null==e)t=Ee.other;else switch(e){case 0:t=Ee.ng;break;case 1:t=Ee.ok;break;case 2:t=Ee.image;break;case 3:t=Ee.imageOrVideo;break;case 4:t=Ee.imageOrVideoOrAudio;break;default:t=Ee.other}return new Ne(t)},Ne.fromValue=function(e){return new Ne(e)},Ne.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,gi.localize("MessageStringMaker.achieve"),gi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?gi.localize("MessageStringMaker.achieve"):gi.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19: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 2:if(null!=this.content.text&&0>2)),r+=j.string(a.charAt(63&(o<<4|s>>4))),r+=j.string(a.charAt(63&(s<<2|l>>6))),r+=j.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=j.string(a.charAt(u>>2)),r+=j.string(a.charAt(63&(u<<4|c>>4))),r+=j.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=j.string(a.charAt(_>>2)),r+=j.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},di.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=Ye.substr(e,0,t));var n=e.length,i=e,r=di.CODES;null==r&&(r=di.initCodes(),di.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new Hr(new Ua(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 fi(){}(n["albero.js.KatakanaToRoman"]=fi).__name__=["albero","js","KatakanaToRoman"],fi.assureConvertTable=function(){return null!=fi.convertTable||(fi.convertTable=new Gr,Ge.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=fi.convertTable,n=e[0],i=e[1];null!=xa[n]?t.setReserved(n,i):t.h[n]=i})),fi.convertTable},fi.matchNext=function(e,t){var n=fi.assureConvertTable();if(t+1=Ti.HIRAGANA_SMALL_A&&o<=Ti.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Ti.KATAKANA_SMALL_A-Ti.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Ti.katakanaToRoman=function(e){return(new fi).convert(e)},Ti.normalize=function(e){return new Ei(null).normalize(e)},Ti.normalizeForFile=function(e){return new Ei(null).normalizeForFile(e)},Ti.asyncAssureNormalize=function(){return Promise.resolve()},Ti.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ei=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Ei).__name__=["albero","js","Normalizer"],Ei.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof $r&&(e=e.val),vi._e("["+Ye.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof $r&&(e=e.val),vi._e("["+Ye.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},__class__:Ei};function Ni(e){this.ws=new WebSocket(e),Fa.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=Sa(this,this.onOpen),this.ws.onmessage=Sa(this,this.onMessage),this.ws.onerror=Sa(this,this.onError),this.ws.onclose=Sa(this,this.onClose)}(n["albero.js.WebSocket"]=Ni).__name__=["albero","js","WebSocket"],Ni.prototype={onOpen:function(e){vi._i("["+Ye.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=Fa.websocketsbinary?Hr.ofData(new Pa(e.data)):di.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){vi._e("["+Ye.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+j.string(e.code)+" "+j.string(e.reason)+" "+j.string(e.wasClean);vi._i("["+Ye.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){Fa.websocketsbinary?this.ws.send(new Pa(e.b.bufferValue).buffer):this.ws.send(di.encode(e))},ping:function(e){this.send(new Hr(new Ua(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Ni};function Ii(){}(n["puremvc.interfaces.IProxy"]=Ii).__name__=["puremvc","interfaces","IProxy"],Ii.prototype={__class__:Ii};function Ai(){}(n["albero.proxy.AccessTokenResolverProxy"]=Ai).__name__=["albero","proxy","AccessTokenResolverProxy"],Ai.__interfaces__=[Ii],Ai.prototype={__class__:Ai};var bi=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=bi).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],bi.newInstance=function(){return new ki("accessTokenResolver")};var Di=function(e,t){R.call(this),this.proxyName=null!=e?e:Di.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Di).__name__=["puremvc","patterns","proxy","Proxy"],Di.__interfaces__=[Ii],Di.__super__=R,Di.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__:Di});var ki=function(e){Di.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=ki).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],ki.__interfaces__=[Ai],ki.__super__=Di,ki.prototype=i(Di.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=wa.account?wa.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:ki});var Ci=function(){Di.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Ci).__name__=["albero","proxy","AlberoBroadcastProxy"],Ci.__super__=Di,Ci.prototype=i(Di.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new Qe(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(Sa(va=this.dataFactory,va.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 vi._e("["+Ye.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new gn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Bt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new gn).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 gn).id=e.talkId),vn.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;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(vn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),vn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Nt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Ge.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 vi._e("["+Ye.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,Et.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=er.toLocalError(St.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 It;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=er.toLocalError(St.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?zr.Some(1e3*o.asInt(e.detail.retry_after)):zr.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,Nt.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!=xa[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 Gr,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,t.low<<1);if(63,u=new In(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new In(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Dr.ucompare(n.high,t.high);if(0<=(0!=d?d:Dr.ucompare(n.low,t.low))){l=new In(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Dr.ucompare(n.low,t.low)<0){f--;f|=0}n=new In(f,m)}63,u=new In(u.high>>>1,u.high<<31|u.low>>>1);63,t=new In(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 In(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new In(v,y)}return{quotient:l,modulus:n}};var Cr=function(){this.buf=new T,this.cache=[],this.useCache=Cr.USE_CACHE,this.useEnumIndex=Cr.USE_ENUM_INDEX,this.shash=new Gr,this.scount=0};(n["haxe.Serializer"]=Cr).__name__=["haxe","Serializer"],Cr.run=function(e){var t=new Cr;return t.serialize(e),t.toString()},Cr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=xa[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!=xa[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=j.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&(R<<4|M>>4)]),this.buf.b+=String.fromCharCode(b[63&(M<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(I==A){var x=N.b[I++],U=N.b[I++];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(I==1+A){var P=N.b[I++];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+=j.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=j.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=j.string(B-2);for(var z=2,Y=B;z=this.length)throw new $r("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new $r("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 $r("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new $r("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 Gr;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=xa[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 $r("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 $r("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new $r("Unknown enum index "+y+"@"+w);var E=this.unserializeEnum(S,T);return this.cache.push(E),E;case 107:return NaN;case 108:var N=new $;this.cache.push(N);for(this.buf;104!=this.buf.charCodeAt(this.pos);)N.add(this.unserialize());return this.pos++,N;case 109:return-1/0;case 110:return null;case 111:var I={};return this.cache.push(I),this.unserializeObject(I),I;case 112:return 1/0;case 113:var A=new Lr;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 $r("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new $r("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),R=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var Y=M[R.charCodeAt(F++)];P.b[L++]=255&(z<<4|Y>>2);var G=M[R.charCodeAt(F++)];P.b[L++]=255&(Y<<6|G)}if(2<=x){var H=M[R.charCodeAt(F++)],j=M[R.charCodeAt(F++)];if(P.b[L++]=255&(H<<2|j>>4),3==x){var K=M[R.charCodeAt(F++)];P.b[L++]=255&(j<<4|K>>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=Ye.strDate(Ye.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 $r("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw $r.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 xr(e.left,e.key,e.value,new xr(e.right,t,n,i)):new xr(new xr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new xr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new xr(new xr(e,t,n,i.left),i.key,i.value,i.right):new xr(new xr(e,t,n,i.left.left),i.left.key,i.left.value,new xr(i.left.right,i.key,i.value,i.right))}return new xr(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"]=xr).__name__=["haxe","ds","TreeNode"],xr.prototype={__class__:xr};var Ur=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Ur.Left=function(e){var t=["Left",0,e];return t.__enum__=Ur,t.toString=o,t},Ur.Right=function(e){var t=["Right",1,e];return t.__enum__=Ur,t.toString=o,t},Ur.__empty_constructs__=[];var Pr=function(){Fr.call(this)};(n["haxe.ds.EnumValueMap"]=Pr).__name__=["haxe","ds","EnumValueMap"],Pr.__interfaces__=[br],Pr.__super__=Fr,Pr.prototype=i(Fr.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 Hr(new Pa(t).buffer)},Hr.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Hr(e)},Hr.fastGet=function(e,t){return e.bytes[t]},Hr.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new $r(Jr.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__:Hr};function jr(){this.b=[]}(n["haxe.io.BytesBuffer"]=jr).__name__=["haxe","io","BytesBuffer"],jr.prototype={getBytes:function(){var e=new Hr(new Pa(this.b).buffer);return this.b=null,e},__class__:jr};function Kr(){}(n["haxe.io.Input"]=Kr).__name__=["haxe","io","Input"],Kr.prototype={readByte:function(){throw new $r("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new $r(Jr.OutsideBounds);try{for(;0e.length)throw new $r(Jr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Wr).__name__=["haxe","io","BytesInput"],Wr.__super__=Kr,Wr.prototype=i(Kr.prototype,{readByte:function(){if(0==this.len)throw new $r(new Qr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new $r(Jr.OutsideBounds);if(0==this.len&&0e.length)throw new $r(Jr.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__:Vr};function qr(){this.b=new jr}(n["haxe.io.BytesOutput"]=qr).__name__=["haxe","io","BytesOutput"],qr.__super__=Vr,qr.prototype=i(Vr.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 $r(Jr.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)},Xr.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)},Xr.doubleToI64=function(e){var t=Xr.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 $r("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new $r("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},Ta.prototype.once=function(e,t){if(!Ea(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},Ta.prototype.removeListener=function(e,t){var n,i,r,a;if(!Ea(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||Ea(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Na(n)){for(a=r;0>>16)<<16|0)|0},Cr.USE_CACHE=!1,Cr.USE_ENUM_INDEX=!1,Cr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Mr.DEFAULT_RESOLVER=new Rr,Mr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Br.count=0,Xr.i64tmp=new In(0,0),ea.__toStr={}.toString,ia.BYTES_PER_ELEMENT=1,aa.FLOAT_SINGLE_MIN=1401298464324817e-60,aa.FLOAT_SINGLE_MAX=34028234663852886e22,aa.FLOAT_DOUBLE_MIN=5e-324,aa.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 ea.__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 Ta};(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&&(wa.host=e.host,wa.endpoint=e.endpoint,wa.accessToken=e.access_token,wa.proxyURL=e.proxyURL,wa.account=e.account,wa.talkWithBot=e.talkWithBot),vi._d("["+Ye.dateStr(new Date)+"] ","current settings",wa,"","",""),null==wa.accessToken&&vi._e("["+Ye.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+=j.string(Ye.substr(e,n,null));break}var r=this.matchedPos();if(i+=j.string(Ye.substr(e,n,r.pos-n)),i+=j.string(t(this)),n=0==r.len?(i+=j.string(Ye.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},E.startsWith=function(e,t){return e.length>=t.length&&Ye.substr(e,0,t.length)==t},E.replace=function(e,t,n){return e.split(t).join(n)},E.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=Dr._mul(o,l),_=Dr._mul(s,l),h=Dr._mul(o,u),d=c,f=(Dr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Dr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Dr.ucompare(d,_)<0){f++;f|=0}f=f+(Dr._mul(t.low,n.high)+Dr._mul(t.high,n.low)|0)|0;var m=new In(f,d),p=new In(0,j.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Dr.ucompare(v,m.low)<0){g++;g|=0}t=new In(g,v)}return t},He.getHigh=function(e){return e.high},He.getLow=function(e){return e.low},He.idStr=function(e){return"_"+e.high+"_"+e.low},He.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new In(j.parseInt(t.matched(1)),j.parseInt(t.matched(2))):null},He.toStr=function(e){return kr.toString(e)},He.isNeg=function(e){return e.high<0},He.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Dr.ucompare(i,e.low)<0){n++;n|=0}return new In(n,i)},He.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Dr.ucompare(e.low,t.low)<0){n--;n|=0}return new In(n,i)},He.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Dr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},He.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},He.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},He.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},He.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},He.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=Ke.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__:ge});var ve=function(){x.call(this)};(n["albero.command.UrlCommand"]=ve).__name__=["albero","command","UrlCommand"],ve.__super__=x,ve.prototype=i(x.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__:ve});var ye=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};ye.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=ye,t.toString=o,t},ye.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=ye,t.toString=o,t},ye.BACK=["BACK",2],ye.BACK.toString=o,(ye.BACK.__enum__=ye).__empty_constructs__=[ye.BACK];function Se(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Se).__name__=["albero","entity","Account"],Se.prototype={__class__:Se};function Ve(e){null!=e&&(this.id=e.id,this.group=new we(e.group),this.profilePolicy=new Te(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=Ve).__name__=["albero","entity","AccountControlGroup"],Ve.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:Ve};var we=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"]=we).__name__=["albero","entity","AccountControlGroupGroup"],we.prototype={__class__:we};var Te=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"]=Te).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Te.prototype={__class__:Te};function qe(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new we(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Te(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=qe).__name__=["albero","entity","AccountControlGroupPartialUpdate"],qe.prototype={__class__:qe};function Qe(e){null!=e&&(this.id=He.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"]=Qe).__name__=["albero","entity","AccountControlRequest"],Qe.prototype={__class__:Qe};var Ee=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ee.ng=["ng",0],Ee.ng.toString=o,(Ee.ng.__enum__=Ee).ok=["ok",1],Ee.ok.toString=o,(Ee.ok.__enum__=Ee).image=["image",2],Ee.image.toString=o,(Ee.image.__enum__=Ee).imageOrVideo=["imageOrVideo",3],Ee.imageOrVideo.toString=o,(Ee.imageOrVideo.__enum__=Ee).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ee.imageOrVideoOrAudio.toString=o,(Ee.imageOrVideoOrAudio.__enum__=Ee).other=["other",5],Ee.other.toString=o,(Ee.other.__enum__=Ee).__empty_constructs__=[Ee.ng,Ee.ok,Ee.image,Ee.imageOrVideo,Ee.imageOrVideoOrAudio,Ee.other];function Ne(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ne).__name__=["albero","entity","AllowAttachmentType"],Ne.fromInt=function(e){if(null==e)return new Ne(Ee.other);var t;if(null==e)t=Ee.other;else switch(e){case 0:t=Ee.ng;break;case 1:t=Ee.ok;break;case 2:t=Ee.image;break;case 3:t=Ee.imageOrVideo;break;case 4:t=Ee.imageOrVideoOrAudio;break;default:t=Ee.other}return new Ne(t)},Ne.fromValue=function(e){return new Ne(e)},Ne.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,gi.localize("MessageStringMaker.achieve"),gi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?gi.localize("MessageStringMaker.achieve"):gi.localize("MessageStringMaker.remand"):"";case 17:case 18:case 19: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 2:if(null!=this.content.text&&0>2)),r+=j.string(a.charAt(63&(o<<4|s>>4))),r+=j.string(a.charAt(63&(s<<2|l>>6))),r+=j.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=j.string(a.charAt(u>>2)),r+=j.string(a.charAt(63&(u<<4|c>>4))),r+=j.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=j.string(a.charAt(_>>2)),r+=j.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},di.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=Ye.substr(e,0,t));var n=e.length,i=e,r=di.CODES;null==r&&(r=di.initCodes(),di.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new Hr(new Ua(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 fi(){}(n["albero.js.KatakanaToRoman"]=fi).__name__=["albero","js","KatakanaToRoman"],fi.assureConvertTable=function(){return null!=fi.convertTable||(fi.convertTable=new Gr,Ge.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=fi.convertTable,n=e[0],i=e[1];null!=xa[n]?t.setReserved(n,i):t.h[n]=i})),fi.convertTable},fi.matchNext=function(e,t){var n=fi.assureConvertTable();if(t+1=Ti.HIRAGANA_SMALL_A&&o<=Ti.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Ti.KATAKANA_SMALL_A-Ti.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Ti.katakanaToRoman=function(e){return(new fi).convert(e)},Ti.normalize=function(e){return new Ei(null).normalize(e)},Ti.normalizeForFile=function(e){return new Ei(null).normalizeForFile(e)},Ti.asyncAssureNormalize=function(){return Promise.resolve()},Ti.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ei=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Ei).__name__=["albero","js","Normalizer"],Ei.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof $r&&(e=e.val),vi._e("["+Ye.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof $r&&(e=e.val),vi._e("["+Ye.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},__class__:Ei};function Ni(e){this.ws=new WebSocket(e),Fa.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=Sa(this,this.onOpen),this.ws.onmessage=Sa(this,this.onMessage),this.ws.onerror=Sa(this,this.onError),this.ws.onclose=Sa(this,this.onClose)}(n["albero.js.WebSocket"]=Ni).__name__=["albero","js","WebSocket"],Ni.prototype={onOpen:function(e){vi._i("["+Ye.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=Fa.websocketsbinary?Hr.ofData(new Pa(e.data)):di.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){vi._e("["+Ye.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+j.string(e.code)+" "+j.string(e.reason)+" "+j.string(e.wasClean);vi._i("["+Ye.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){Fa.websocketsbinary?this.ws.send(new Pa(e.b.bufferValue).buffer):this.ws.send(di.encode(e))},ping:function(e){this.send(new Hr(new Ua(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:Ni};function Ii(){}(n["puremvc.interfaces.IProxy"]=Ii).__name__=["puremvc","interfaces","IProxy"],Ii.prototype={__class__:Ii};function Ai(){}(n["albero.proxy.AccessTokenResolverProxy"]=Ai).__name__=["albero","proxy","AccessTokenResolverProxy"],Ai.__interfaces__=[Ii],Ai.prototype={__class__:Ai};var bi=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=bi).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],bi.newInstance=function(){return new ki("accessTokenResolver")};var Di=function(e,t){R.call(this),this.proxyName=null!=e?e:Di.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Di).__name__=["puremvc","patterns","proxy","Proxy"],Di.__interfaces__=[Ii],Di.__super__=R,Di.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__:Di});var ki=function(e){Di.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=ki).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],ki.__interfaces__=[Ai],ki.__super__=Di,ki.prototype=i(Di.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=wa.account?wa.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:ki});var Ci=function(){Di.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Ci).__name__=["albero","proxy","AlberoBroadcastProxy"],Ci.__super__=Di,Ci.prototype=i(Di.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new Qe(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(Sa(va=this.dataFactory,va.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 vi._e("["+Ye.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new gn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Bt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new gn).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 gn).id=e.talkId),vn.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;n||t.unreadCount++,t.talkOrderingTimestamp=e.createdAt}return this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&(vn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),vn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Nt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!Ge.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 vi._e("["+Ye.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,Et.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=er.toLocalError(St.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 It;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=er.toLocalError(St.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?zr.Some(1e3*o.asInt(e.detail.retry_after)):zr.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,Nt.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!=xa[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 Gr,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,t.low<<1);if(63,u=new In(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new In(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Dr.ucompare(n.high,t.high);if(0<=(0!=d?d:Dr.ucompare(n.low,t.low))){l=new In(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Dr.ucompare(n.low,t.low)<0){f--;f|=0}n=new In(f,m)}63,u=new In(u.high>>>1,u.high<<31|u.low>>>1);63,t=new In(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 In(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new In(v,y)}return{quotient:l,modulus:n}};var Cr=function(){this.buf=new T,this.cache=[],this.useCache=Cr.USE_CACHE,this.useEnumIndex=Cr.USE_ENUM_INDEX,this.shash=new Gr,this.scount=0};(n["haxe.Serializer"]=Cr).__name__=["haxe","Serializer"],Cr.run=function(e){var t=new Cr;return t.serialize(e),t.toString()},Cr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=xa[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!=xa[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=j.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&(R<<4|M>>4)]),this.buf.b+=String.fromCharCode(b[63&(M<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(I==A){var x=N.b[I++],U=N.b[I++];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(I==1+A){var P=N.b[I++];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+=j.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=j.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=j.string(B-2);for(var z=2,Y=B;z=this.length)throw new $r("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new $r("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 $r("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new $r("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 Gr;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=xa[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 $r("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 $r("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new $r("Unknown enum index "+y+"@"+w);var E=this.unserializeEnum(S,T);return this.cache.push(E),E;case 107:return NaN;case 108:var N=new $;this.cache.push(N);for(this.buf;104!=this.buf.charCodeAt(this.pos);)N.add(this.unserialize());return this.pos++,N;case 109:return-1/0;case 110:return null;case 111:var I={};return this.cache.push(I),this.unserializeObject(I),I;case 112:return 1/0;case 113:var A=new Lr;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 $r("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new $r("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),R=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var Y=M[R.charCodeAt(F++)];P.b[L++]=255&(z<<4|Y>>2);var G=M[R.charCodeAt(F++)];P.b[L++]=255&(Y<<6|G)}if(2<=x){var H=M[R.charCodeAt(F++)],j=M[R.charCodeAt(F++)];if(P.b[L++]=255&(H<<2|j>>4),3==x){var K=M[R.charCodeAt(F++)];P.b[L++]=255&(j<<4|K>>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=Ye.strDate(Ye.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 $r("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw $r.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 xr(e.left,e.key,e.value,new xr(e.right,t,n,i)):new xr(new xr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new xr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new xr(new xr(e,t,n,i.left),i.key,i.value,i.right):new xr(new xr(e,t,n,i.left.left),i.left.key,i.left.value,new xr(i.left.right,i.key,i.value,i.right))}return new xr(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"]=xr).__name__=["haxe","ds","TreeNode"],xr.prototype={__class__:xr};var Ur=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Ur.Left=function(e){var t=["Left",0,e];return t.__enum__=Ur,t.toString=o,t},Ur.Right=function(e){var t=["Right",1,e];return t.__enum__=Ur,t.toString=o,t},Ur.__empty_constructs__=[];var Pr=function(){Fr.call(this)};(n["haxe.ds.EnumValueMap"]=Pr).__name__=["haxe","ds","EnumValueMap"],Pr.__interfaces__=[br],Pr.__super__=Fr,Pr.prototype=i(Fr.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 Hr(new Pa(t).buffer)},Hr.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Hr(e)},Hr.fastGet=function(e,t){return e.bytes[t]},Hr.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new $r(Jr.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__:Hr};function jr(){this.b=[]}(n["haxe.io.BytesBuffer"]=jr).__name__=["haxe","io","BytesBuffer"],jr.prototype={getBytes:function(){var e=new Hr(new Pa(this.b).buffer);return this.b=null,e},__class__:jr};function Kr(){}(n["haxe.io.Input"]=Kr).__name__=["haxe","io","Input"],Kr.prototype={readByte:function(){throw new $r("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new $r(Jr.OutsideBounds);try{for(;0e.length)throw new $r(Jr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Wr).__name__=["haxe","io","BytesInput"],Wr.__super__=Kr,Wr.prototype=i(Kr.prototype,{readByte:function(){if(0==this.len)throw new $r(new Qr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new $r(Jr.OutsideBounds);if(0==this.len&&0e.length)throw new $r(Jr.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__:Vr};function qr(){this.b=new jr}(n["haxe.io.BytesOutput"]=qr).__name__=["haxe","io","BytesOutput"],qr.__super__=Vr,qr.prototype=i(Vr.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 $r(Jr.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)},Xr.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)},Xr.doubleToI64=function(e){var t=Xr.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 $r("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new $r("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},Ta.prototype.once=function(e,t){if(!Ea(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},Ta.prototype.removeListener=function(e,t){var n,i,r,a;if(!Ea(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||Ea(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Na(n)){for(a=r;0>>16)<<16|0)|0},Cr.USE_CACHE=!1,Cr.USE_ENUM_INDEX=!1,Cr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Mr.DEFAULT_RESOLVER=new Rr,Mr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Br.count=0,Xr.i64tmp=new In(0,0),ea.__toStr={}.toString,ia.BYTES_PER_ELEMENT=1,aa.FLOAT_SINGLE_MIN=1401298464324817e-60,aa.FLOAT_SINGLE_MAX=34028234663852886e22,aa.FLOAT_DOUBLE_MIN=5e-324,aa.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 63ee1b9..b3bc294 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "direct-js", - "version": "1.109.0", + "version": "1.109.2", "description": "Low-level javascript library for direct", "main": "./lib/direct-node.min.js", "scripts": {