diff --git a/lib/direct-node.min.js b/lib/direct-node.min.js index 2942cf8..ccdcc6b 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function s(){return Qr.__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&&(ya.host=e.host,ya.endpoint=e.endpoint,ya.accessToken=e.access_token,ya.proxyURL=e.proxyURL,ya.account=e.account,ya.talkWithBot=e.talkWithBot,ya.name=e.name,ya.storagePath=e.storage_path,ya.storageQuota=e.storage_quota,ya.wsConfig=e.ws_config),vi._d("["+Fe.dateStr(new Date)+"] ","current settings",ya,"","",""),null==ya.accessToken&&vi._e("["+Fe.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+=Y.string(Fe.substr(e,n,null));break}var r=this.matchedPos();if(i+=Y.string(Fe.substr(e,n,r.pos-n)),i+=Y.string(t(this)),n=0==r.len?(i+=Y.string(Fe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},I.startsWith=function(e,t){return e.length>=t.length&&Fe.substr(e,0,t.length)==t},I.replace=function(e,t,n){return e.split(t).join(n)},I.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.lengthn;){var t=Fe.substr(e,0,n);i.push(t),e=Fe.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=Er._mul(o,l),_=Er._mul(s,l),d=Er._mul(o,u),h=c,f=(Er._mul(s,u)+(d>>>16)|0)+(_>>>16)|0;if(h=h+(d<<=16)|0,Er.ucompare(h,d)<0){f++;f|=0}if(h=h+(_<<=16)|0,Er.ucompare(h,_)<0){f++;f|=0}f=f+(Er._mul(t.low,n.high)+Er._mul(t.high,n.low)|0)|0;var m=new bn(f,h),p=new bn(0,Y.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Er.ucompare(v,m.low)<0){g++;g|=0}t=new bn(g,v)}return t},Ue.getHigh=function(e){return e.high},Ue.getLow=function(e){return e.low},Ue.idStr=function(e){return"_"+e.high+"_"+e.low},Ue.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new bn(Y.parseInt(t.matched(1)),Y.parseInt(t.matched(2))):null},Ue.toStr=function(e){return Nr.toString(e)},Ue.isNeg=function(e){return e.high<0},Ue.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Er.ucompare(i,e.low)<0){n++;n|=0}return new bn(n,i)},Ue.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Er.ucompare(e.low,t.low)<0){n--;n|=0}return new bn(n,i)},Ue.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Er.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Ue.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ue.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ue.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=Le.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:ye});var Se=function(){U.call(this)};(n["albero.command.UrlCommand"]=Se).__name__=["albero","command","UrlCommand"],Se.__super__=U,Se.prototype=i(U.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Se});var we=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};we.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=we,t.toString=s,t},we.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=we,t.toString=s,t},we.BACK=["BACK",2],we.BACK.toString=s,(we.BACK.__enum__=we).__empty_constructs__=[we.BACK];function Te(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Te).__name__=["albero","entity","Account"],Te.prototype={__class__:Te};function je(e){null!=e&&(this.id=e.id,this.group=new Ie(e.group),this.profilePolicy=new Ee(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=je).__name__=["albero","entity","AccountControlGroup"],je.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:je};var Ie=function(e){null!=e&&(this.name=e.name,this.alias=e.alias,this.ownerName=e.owner_name,this.version=e.version)};(n["albero.entity.AccountControlGroupGroup"]=Ie).__name__=["albero","entity","AccountControlGroupGroup"],Ie.prototype={__class__:Ie};var Ee=function(e){null!=e&&(this.allowUpdateDisplayName=e.allow_update_display_name,this.allowUpdateProfileImage=e.allow_update_profile_image,this.version=e.version)};(n["albero.entity.AccountControlGroupProfilePolicy"]=Ee).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ee.prototype={__class__:Ee};function He(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ie(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ee(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=He).__name__=["albero","entity","AccountControlGroupPartialUpdate"],He.prototype={__class__:He};function Ge(e){null!=e&&(this.id=Ue.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"]=Ge).__name__=["albero","entity","AccountControlRequest"],Ge.prototype={__class__:Ge};var Ne=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ne.ng=["ng",0],Ne.ng.toString=s,(Ne.ng.__enum__=Ne).ok=["ok",1],Ne.ok.toString=s,(Ne.ok.__enum__=Ne).image=["image",2],Ne.image.toString=s,(Ne.image.__enum__=Ne).imageOrVideo=["imageOrVideo",3],Ne.imageOrVideo.toString=s,(Ne.imageOrVideo.__enum__=Ne).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ne.imageOrVideoOrAudio.toString=s,(Ne.imageOrVideoOrAudio.__enum__=Ne).other=["other",5],Ne.other.toString=s,(Ne.other.__enum__=Ne).__empty_constructs__=[Ne.ng,Ne.ok,Ne.image,Ne.imageOrVideo,Ne.imageOrVideoOrAudio,Ne.other];function Ae(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ae).__name__=["albero","entity","AllowAttachmentType"],Ae.fromInt=function(e){if(null==e)return new Ae(Ne.other);var t;if(null==e)t=Ne.other;else switch(e){case 0:t=Ne.ng;break;case 1:t=Ne.ok;break;case 2:t=Ne.image;break;case 3:t=Ne.imageOrVideo;break;case 4:t=Ne.imageOrVideoOrAudio;break;default:t=Ne.other}return new Ae(t)},Ae.fromValue=function(e){return new Ae(e)},Ae.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),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=Ii.HIRAGANA_SMALL_A&&o<=Ii.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Ii.KATAKANA_SMALL_A-Ii.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Ii.katakanaToRoman=function(e){return(new fi).convert(e)},Ii.normalize=function(e){return new Ei(null).normalize(e)},Ii.normalizeForFile=function(e){return new Ei(null).normalizeForFile(e)},Ii.asyncAssureNormalize=function(){return Promise.resolve()},Ii.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 qr&&(e=e.val),vi._e("["+Fe.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 qr&&(e=e.val),vi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},__class__:Ei};function Ni(e){var t=this,n=ya.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",va(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",va(t,t.onError)),e.on("close",va(t,t.onConnectionClose)),e.on("message",va(t,t.onMessage)),e.on("pong",va(t,t.onPong)),t.onOpen(null)});var r=null;null!=ya.proxyURL&&(r={agent:Ti.createAgent(ya.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=Ni).__name__=["albero","js","WebSocket"],Ni.prototype={onOpen:function(e){vi._i("["+Fe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=Lr.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){vi._e("["+Fe.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. "+Y.string(e.code)+" "+Y.string(e.reason)+" "+Y.string(e.wasClean);vi._i("["+Fe.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__:Ni};function Ai(){}(n["puremvc.interfaces.IProxy"]=Ai).__name__=["puremvc","interfaces","IProxy"],Ai.prototype={__class__:Ai};function bi(){}(n["albero.proxy.AccessTokenResolverProxy"]=bi).__name__=["albero","proxy","AccessTokenResolverProxy"],bi.__interfaces__=[Ai],bi.prototype={__class__:bi};var Di=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Di).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Di.newInstance=function(){return new Ci("accessTokenResolver")};var ki=function(e,t){M.call(this),this.proxyName=null!=e?e:ki.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=ki).__name__=["puremvc","patterns","proxy","Proxy"],ki.__interfaces__=[Ai],ki.__super__=M,ki.prototype=i(M.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:ki});var Ci=function(e){ki.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Ci).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Ci.__interfaces__=[bi],Ci.__super__=ki,Ci.prototype=i(ki.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ya.account?ya.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__:Ci});function Oi(){}(n["albero.proxy.AccountLoaderProxy"]=Oi).__name__=["albero","proxy","AccountLoaderProxy"],Oi.__interfaces__=[Ai],Oi.prototype={__class__:Oi};var Ri=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Ri).__name__=["albero","proxy","AccountLoaderProxyFactory"],Ri.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new Mi("accountLoader")};var Mi=function(e){ki.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=Mi).__name__=["albero","proxy","AccountLoaderProxyForHubot"],Mi.__interfaces__=[Oi],Mi.__super__=ki,Mi.prototype=i(ki.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 Te(n,t))})}),null},__class__:Mi});var Fi=function(){ki.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Fi).__name__=["albero","proxy","AlberoBroadcastProxy"],Fi.__super__=ki,Fi.prototype=i(ki.prototype,{handleNotification:function(n,e,i){var r=this;switch(vi._d("["+Fe.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new Ge(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_domain_invite":var o=new ot(e);this.dataStore.setDomainInvite(o),this.sendNotification(n,o),i();break;case"notify_add_favorite_message":var s=new zn(e);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(n,s),i();break;case"notify_add_favorite_talk":var l=new ht(e);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(n,l),i();break;case"notify_add_friend":var u=this.dataFactory.newFriend(e[1]);this.sendNotification(n,u),i();break;case"notify_add_talkers":var c=new ln(e);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(n,c),i();break;case"notify_close_conference":var _=new Ke(e);this.conferenceStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(n,_),i();break;case"notify_conference_participant_join":var d,h=e[3],f=e[4],m=this.dataStore;if(null!=m.me){var p=m.me.id;d=null!=p&&null!=f&&p.high==f.high&&p.low==f.low}else d=!1;d&&this.dataStore.addReactedConfereceId(h),this.sendNotification(n,e),i();break;case"notify_conference_participant_reject":var g=e[3];this.dataStore.addReactedConfereceId(g),this.sendNotification(n,e),i();break;case"notify_create_announcement":var v=new ze(e);this.keywordWatcher.onAnnouncementCreated(v),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(v)),this.sendNotification(n,v),i();break;case"notify_create_message":var y=new Nt(e);this.messageStore.setMessage(y),this.keywordWatcher.onMessageCreated(y);var S=this.newTalkStatusByMessage(y);switch(null!=S&&this.sendNotification("notify_update_local_talk_status",S),y.type[1]){case 0:var w=y.content,T=null;switch(w.type){case"delete_talker":T=w.deleted_user_id;break;case"hide_pair_talk":T=w.user_id}if(null==T)return this.sendNotification(n,y),void i();for(var I=y.talkId,E=this.dataStore.getQuestions(I,T),N=0;Nt.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("["+Fe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new yn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Ht.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new yn).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 yn).id=e.talkId),Sn.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&&(Sn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),Sn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=At.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!xe.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("["+Fe.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,Nt.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=ir.toLocalError(Tt.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 bt;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=ir.toLocalError(Tt.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?xr.Some(1e3*o.asInt(e.detail.retry_after)):xr.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,At.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!=Aa[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 Pr,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 bn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var d=new bn(0,0);if(u.high==d.high&&u.low==d.low)break;var h=Er.ucompare(n.high,t.high);if(0<=(0!=h?h:Er.ucompare(n.low,t.low))){l=new bn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Er.ucompare(n.low,t.low)<0){f--;f|=0}n=new bn(f,m)}63,u=new bn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new bn(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 bn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new bn(v,y)}return{quotient:l,modulus:n}};var Ar=function(){this.buf=new T,this.cache=[],this.useCache=Ar.USE_CACHE,this.useEnumIndex=Ar.USE_ENUM_INDEX,this.shash=new Pr,this.scount=0};(n["haxe.Serializer"]=Ar).__name__=["haxe","Serializer"],Ar.run=function(e){var t=new Ar;return t.serialize(e),t.toString()},Ar.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Aa[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!=Aa[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=Y.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=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=Y.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=Y.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=Y.string(B-2);for(var j=2,H=B;j=this.length)throw new qr("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new qr("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 qr("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new qr("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 d=this.readDigits();c[c.length+d-1]=null}else c.push(this.unserialize())}return c;case 98:var h=new Pr;this.cache.push(h);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Aa[f]?h.setReserved(f,m):h.h[f]=m}return this.pos++,h;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new qr("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 qr("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new qr("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var E=new $;this.cache.push(E);for(this.buf;104!=this.buf.charCodeAt(this.pos);)E.add(this.unserialize());return this.pos++,E;case 109:return-1/0;case 110:return null;case 111:var N={};return this.cache.push(N),this.unserializeObject(N),N;case 112:return 1/0;case 113:var A=new Mr;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 qr("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new qr("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 G=M[R.charCodeAt(F++)];P.b[L++]=255&(H<<6|G)}if(2<=x){var z=M[R.charCodeAt(F++)],Y=M[R.charCodeAt(F++)];if(P.b[L++]=255&(z<<2|Y>>4),3==x){var W=M[R.charCodeAt(F++)];P.b[L++]=255&(Y<<4|W>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var K;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))K=Fe.strDate(Fe.substr(this.buf,this.pos,19)),this.pos+=19;else{var V=this.readFloat();K=new Date(V)}return this.cache.push(K),K;case 119:var q=this.unserialize(),Q=this.resolver.resolveEnum(q);if(null==Q)throw new qr("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw qr.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 Or(e.left,e.key,e.value,new Or(e.right,t,n,i)):new Or(new Or(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Or(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Or(new Or(e,t,n,i.left),i.key,i.value,i.right):new Or(new Or(e,t,n,i.left.left),i.left.key,i.left.value,new Or(i.left.right,i.key,i.value,i.right))}return new Or(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"]=Or).__name__=["haxe","ds","TreeNode"],Or.prototype={__class__:Or};var Rr=function(){Cr.call(this)};(n["haxe.ds.EnumValueMap"]=Rr).__name__=["haxe","ds","EnumValueMap"],Rr.__interfaces__=[Ir],Rr.__super__=Cr,Rr.prototype=i(Cr.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 Lr(new Uint8Array(t).buffer)},Lr.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Lr(e)},Lr.fastGet=function(e,t){return e.bytes[t]},Lr.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new qr(Wr.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__:Lr};function Br(){this.b=[]}(n["haxe.io.BytesBuffer"]=Br).__name__=["haxe","io","BytesBuffer"],Br.prototype={getBytes:function(){var e=new Lr(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Br};function jr(){}(n["haxe.io.Input"]=jr).__name__=["haxe","io","Input"],jr.prototype={readByte:function(){throw new qr("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new qr(Wr.OutsideBounds);try{for(;0e.length)throw new qr(Wr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Hr).__name__=["haxe","io","BytesInput"],Hr.__super__=jr,Hr.prototype=i(jr.prototype,{readByte:function(){if(0==this.len)throw new qr(new Yr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new qr(Wr.OutsideBounds);if(0==this.len&&0e.length)throw new qr(Wr.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__:Gr};function zr(){this.b=new Br}(n["haxe.io.BytesOutput"]=zr).__name__=["haxe","io","BytesOutput"],zr.__super__=Gr,zr.prototype=i(Gr.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 qr(Wr.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)},Kr.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)},Kr.doubleToI64=function(e){var t=Kr.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},Ar.USE_CACHE=!1,Ar.USE_ENUM_INDEX=!1,Ar.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",kr.DEFAULT_RESOLVER=new Dr,kr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Fr.count=0,Kr.i64tmp=new bn(0,0),Qr.__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 ia.__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&&(ba.host=e.host,ba.endpoint=e.endpoint,ba.accessToken=e.access_token,ba.proxyURL=e.proxyURL,ba.account=e.account,ba.talkWithBot=e.talkWithBot,ba.name=e.name,ba.storagePath=e.storage_path,ba.storageQuota=e.storage_quota,ba.wsConfig=e.ws_config),vi._d("["+Fe.dateStr(new Date)+"] ","current settings",ba,"","",""),null==ba.accessToken&&vi._e("["+Fe.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+=Y.string(Fe.substr(e,n,null));break}var r=this.matchedPos();if(i+=Y.string(Fe.substr(e,n,r.pos-n)),i+=Y.string(t(this)),n=0==r.len?(i+=Y.string(Fe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},E.startsWith=function(e,t){return e.length>=t.length&&Fe.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=Fe.substr(e,0,n);i.push(t),e=Fe.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=Or._mul(o,l),_=Or._mul(s,l),d=Or._mul(o,u),h=c,f=(Or._mul(s,u)+(d>>>16)|0)+(_>>>16)|0;if(h=h+(d<<=16)|0,Or.ucompare(h,d)<0){f++;f|=0}if(h=h+(_<<=16)|0,Or.ucompare(h,_)<0){f++;f|=0}f=f+(Or._mul(t.low,n.high)+Or._mul(t.high,n.low)|0)|0;var m=new bn(f,h),p=new bn(0,Y.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Or.ucompare(v,m.low)<0){g++;g|=0}t=new bn(g,v)}return t},Ue.getHigh=function(e){return e.high},Ue.getLow=function(e){return e.low},Ue.idStr=function(e){return"_"+e.high+"_"+e.low},Ue.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new bn(Y.parseInt(t.matched(1)),Y.parseInt(t.matched(2))):null},Ue.toStr=function(e){return Rr.toString(e)},Ue.isNeg=function(e){return e.high<0},Ue.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Or.ucompare(i,e.low)<0){n++;n|=0}return new bn(n,i)},Ue.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Or.ucompare(e.low,t.low)<0){n--;n|=0}return new bn(n,i)},Ue.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Or.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Ue.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ue.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ue.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=Le.map(n.userPresences.getUserPresence(e),function(e){return e.isExpired(i,r)});switch(t[1]){case 0:return t[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){var n=t.splice(0,100);0!=n.length&&this.api.getPresences(e,n),0!=t.length&&this.updateIfNeedPerSub(e,t)},__class__:ye});var Se=function(){U.call(this)};(n["albero.command.UrlCommand"]=Se).__name__=["albero","command","UrlCommand"],Se.__super__=U,Se.prototype=i(U.prototype,{execute:function(e){var t=e.getBody();switch(t[1]){case 0:var n=t[2];this.routing.forward(n);break;case 1:var i=t[2];this.routing.redirect(i);break;case 2:this.routing.back()}},__class__:Se});var we=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};we.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=we,t.toString=s,t},we.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=we,t.toString=s,t},we.BACK=["BACK",2],we.BACK.toString=s,(we.BACK.__enum__=we).__empty_constructs__=[we.BACK];function Te(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=Te).__name__=["albero","entity","Account"],Te.prototype={__class__:Te};function je(e){null!=e&&(this.id=e.id,this.group=new Ee(e.group),this.profilePolicy=new Ie(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=je).__name__=["albero","entity","AccountControlGroup"],je.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:je};var Ee=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"]=Ee).__name__=["albero","entity","AccountControlGroupGroup"],Ee.prototype={__class__:Ee};var Ie=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"]=Ie).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Ie.prototype={__class__:Ie};function He(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Ee(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Ie(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=He).__name__=["albero","entity","AccountControlGroupPartialUpdate"],He.prototype={__class__:He};function Ge(e){null!=e&&(this.id=Ue.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"]=Ge).__name__=["albero","entity","AccountControlRequest"],Ge.prototype={__class__:Ge};var Ne=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};Ne.ng=["ng",0],Ne.ng.toString=s,(Ne.ng.__enum__=Ne).ok=["ok",1],Ne.ok.toString=s,(Ne.ok.__enum__=Ne).image=["image",2],Ne.image.toString=s,(Ne.image.__enum__=Ne).imageOrVideo=["imageOrVideo",3],Ne.imageOrVideo.toString=s,(Ne.imageOrVideo.__enum__=Ne).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],Ne.imageOrVideoOrAudio.toString=s,(Ne.imageOrVideoOrAudio.__enum__=Ne).other=["other",5],Ne.other.toString=s,(Ne.other.__enum__=Ne).__empty_constructs__=[Ne.ng,Ne.ok,Ne.image,Ne.imageOrVideo,Ne.imageOrVideoOrAudio,Ne.other];function Ae(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Ae).__name__=["albero","entity","AllowAttachmentType"],Ae.fromInt=function(e){if(null==e)return new Ae(Ne.other);var t;if(null==e)t=Ne.other;else switch(e){case 0:t=Ne.ng;break;case 1:t=Ne.ok;break;case 2:t=Ne.image;break;case 3:t=Ne.imageOrVideo;break;case 4:t=Ne.imageOrVideoOrAudio;break;default:t=Ne.other}return new Ae(t)},Ae.fromValue=function(e){return new Ae(e)},Ae.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),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=Ei.HIRAGANA_SMALL_A&&o<=Ei.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(Ei.KATAKANA_SMALL_A-Ei.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},Ei.katakanaToRoman=function(e){return(new fi).convert(e)},Ei.normalize=function(e){return new Ii(null).normalize(e)},Ei.normalizeForFile=function(e){return new Ii(null).normalizeForFile(e)},Ei.asyncAssureNormalize=function(){return Promise.resolve()},Ei.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Ii=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Ii).__name__=["albero","js","Normalizer"],Ii.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof na&&(e=e.val),vi._e("["+Fe.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 na&&(e=e.val),vi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),gi.localize("TextCanonicalizer.invalid")}},__class__:Ii};function Ni(e){var t=this,n=ba.wsConfig,i=require("websocket").client;this.ws=new i(n),this.ws.on("connectFailed",Aa(this,this.onError)),this.ws.on("connect",function(e){(t.connection=e).on("error",Aa(t,t.onError)),e.on("close",Aa(t,t.onConnectionClose)),e.on("message",Aa(t,t.onMessage)),e.on("pong",Aa(t,t.onPong)),t.onOpen(null)});var r=null;null!=ba.proxyURL&&(r={agent:Ti.createAgent(ba.proxyURL)}),this.ws.connect(e,null,null,null,r)}(n["albero.js.WebSocket"]=Ni).__name__=["albero","js","WebSocket"],Ni.prototype={onOpen:function(e){vi._i("["+Fe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=Wr.ofData(e.binaryData),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){vi._e("["+Fe.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. "+Y.string(e.code)+" "+Y.string(e.reason)+" "+Y.string(e.wasClean);vi._i("["+Fe.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 ua(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:Ni};function Ai(){}(n["puremvc.interfaces.IProxy"]=Ai).__name__=["puremvc","interfaces","IProxy"],Ai.prototype={__class__:Ai};function bi(){}(n["albero.proxy.AccessTokenResolverProxy"]=bi).__name__=["albero","proxy","AccessTokenResolverProxy"],bi.__interfaces__=[Ai],bi.prototype={__class__:bi};var Di=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Di).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Di.newInstance=function(){return new Ci("accessTokenResolver")};var ki=function(e,t){M.call(this),this.proxyName=null!=e?e:ki.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=ki).__name__=["puremvc","patterns","proxy","Proxy"],ki.__interfaces__=[Ai],ki.__super__=M,ki.prototype=i(M.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:ki});var Ci=function(e){ki.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=Ci).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],Ci.__interfaces__=[bi],Ci.__super__=ki,Ci.prototype=i(ki.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ba.account?ba.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__:Ci});function Oi(){}(n["albero.proxy.AccountLoaderProxy"]=Oi).__name__=["albero","proxy","AccountLoaderProxy"],Oi.__interfaces__=[Ai],Oi.prototype={__class__:Oi};var Ri=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=Ri).__name__=["albero","proxy","AccountLoaderProxyFactory"],Ri.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new Mi("accountLoader")};var Mi=function(e){ki.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=Mi).__name__=["albero","proxy","AccountLoaderProxyForHubot"],Mi.__interfaces__=[Oi],Mi.__super__=ki,Mi.prototype=i(ki.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 Te(n,t))})}),null},__class__:Mi});var Fi=function(){ki.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=Fi).__name__=["albero","proxy","AlberoBroadcastProxy"],Fi.__super__=ki,Fi.prototype=i(ki.prototype,{handleNotification:function(n,e,i){var r=this;switch(vi._d("["+Fe.dateStr(new Date)+"] ","Receive request from server. name:",n," body:",e,""),n){case"notify_add_account_control_request":var t=new Ge(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_domain_invite":var o=new ot(e);this.dataStore.setDomainInvite(o),this.sendNotification(n,o),i();break;case"notify_add_favorite_message":var s=new zn(e);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(n,s),i();break;case"notify_add_favorite_talk":var l=new ht(e);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(n,l),i();break;case"notify_add_friend":var u=this.dataFactory.newFriend(e[1]);this.sendNotification(n,u),i();break;case"notify_add_talkers":var c=new ln(e);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(n,c),i();break;case"notify_close_conference":var _=new We(e);this.conferenceStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(n,_),i();break;case"notify_conference_participant_join":var d,h=e[3],f=e[4],m=this.dataStore;if(null!=m.me){var p=m.me.id;d=null!=p&&null!=f&&p.high==f.high&&p.low==f.low}else d=!1;d&&this.dataStore.addReactedConfereceId(h),this.sendNotification(n,e),i();break;case"notify_conference_participant_reject":var g=e[3];this.dataStore.addReactedConfereceId(g),this.sendNotification(n,e),i();break;case"notify_create_announcement":var v=new ze(e);this.keywordWatcher.onAnnouncementCreated(v),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(v)),this.sendNotification(n,v),i();break;case"notify_create_message":var y=new Nt(e);this.messageStore.setMessage(y),this.keywordWatcher.onMessageCreated(y);var S=this.newTalkStatusByMessage(y);switch(null!=S&&this.sendNotification("notify_update_local_talk_status",S),y.type[1]){case 0:var w=y.content,T=null;switch(w.type){case"delete_talker":T=w.deleted_user_id;break;case"hide_pair_talk":T=w.user_id}if(null==T)return this.sendNotification(n,y),void i();for(var E=y.talkId,I=this.dataStore.getQuestions(E,T),N=0;Nt.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("["+Fe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new yn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Ht.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new yn).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 yn).id=e.talkId),Sn.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&&(Sn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),Sn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=At.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!xe.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("["+Fe.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,Nt.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=rr.toLocalError(Tt.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 bt;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=rr.toLocalError(Tt.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,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,At.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!=Fa[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 Kr,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 bn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var d=new bn(0,0);if(u.high==d.high&&u.low==d.low)break;var h=Or.ucompare(n.high,t.high);if(0<=(0!=h?h:Or.ucompare(n.low,t.low))){l=new bn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Or.ucompare(n.low,t.low)<0){f--;f|=0}n=new bn(f,m)}63,u=new bn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new bn(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 bn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new bn(v,y)}return{quotient:l,modulus:n}};var Mr=function(){this.buf=new T,this.cache=[],this.useCache=Mr.USE_CACHE,this.useEnumIndex=Mr.USE_ENUM_INDEX,this.shash=new Kr,this.scount=0};(n["haxe.Serializer"]=Mr).__name__=["haxe","Serializer"],Mr.run=function(e){var t=new Mr;return t.serialize(e),t.toString()},Mr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Fa[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!=Fa[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=Y.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+=Y.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=Y.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=Y.string(B-2);for(var j=2,H=B;j=this.length)throw new na("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new na("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 na("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new na("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 d=this.readDigits();c[c.length+d-1]=null}else c.push(this.unserialize())}return c;case 98:var h=new Kr;this.cache.push(h);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=Fa[f]?h.setReserved(f,m):h.h[f]=m}return this.pos++,h;case 99:var p=this.unserialize(),g=this.resolver.resolveClass(p);if(null==g)throw new na("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 na("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new na("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 Hr;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 na("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new na("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 G=M[R.charCodeAt(F++)];P.b[L++]=255&(H<<6|G)}if(2<=x){var z=M[R.charCodeAt(F++)],Y=M[R.charCodeAt(F++)];if(P.b[L++]=255&(z<<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=Fe.strDate(Fe.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 na("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw na.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 Lr(e.left,e.key,e.value,new Lr(e.right,t,n,i)):new Lr(new Lr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Lr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Lr(new Lr(e,t,n,i.left),i.key,i.value,i.right):new Lr(new Lr(e,t,n,i.left.left),i.left.key,i.left.value,new Lr(i.left.right,i.key,i.value,i.right))}return new Lr(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"]=Lr).__name__=["haxe","ds","TreeNode"],Lr.prototype={__class__:Lr};var Br=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Br.Left=function(e){var t=["Left",0,e];return t.__enum__=Br,t.toString=s,t},Br.Right=function(e){var t=["Right",1,e];return t.__enum__=Br,t.toString=s,t},Br.__empty_constructs__=[];var jr=function(){Pr.call(this)};(n["haxe.ds.EnumValueMap"]=jr).__name__=["haxe","ds","EnumValueMap"],jr.__interfaces__=[Cr],jr.__super__=Pr,jr.prototype=i(Pr.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 Wr(new Uint8Array(t).buffer)},Wr.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Wr(e)},Wr.fastGet=function(e,t){return e.bytes[t]},Wr.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new na($r.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__:Wr};function Vr(){this.b=[]}(n["haxe.io.BytesBuffer"]=Vr).__name__=["haxe","io","BytesBuffer"],Vr.prototype={getBytes:function(){var e=new Wr(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Vr};function qr(){}(n["haxe.io.Input"]=qr).__name__=["haxe","io","Input"],qr.prototype={readByte:function(){throw new na("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new na($r.OutsideBounds);try{for(;0e.length)throw new na($r.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Qr).__name__=["haxe","io","BytesInput"],Qr.__super__=qr,Qr.prototype=i(qr.prototype,{readByte:function(){if(0==this.len)throw new na(new Zr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new na($r.OutsideBounds);if(0==this.len&&0e.length)throw new na($r.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__:Jr};function Xr(){this.b=new Vr}(n["haxe.io.BytesOutput"]=Xr).__name__=["haxe","io","BytesOutput"],Xr.__super__=Jr,Xr.prototype=i(Jr.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 na($r.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)},ea.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)},ea.doubleToI64=function(e){var t=ea.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},Mr.USE_CACHE=!1,Mr.USE_ENUM_INDEX=!1,Mr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Ur.DEFAULT_RESOLVER=new xr,Ur.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Gr.count=0,ea.i64tmp=new bn(0,0),ia.__toStr={}.toString,_a.FLOAT_SINGLE_MIN=1401298464324817e-60,_a.FLOAT_SINGLE_MAX=34028234663852886e22,_a.FLOAT_DOUBLE_MIN=5e-324,_a.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 4b69fa9..3ed5632 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function o(){return Pr.__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 aa};(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&&(ra.host=e.host,ra.endpoint=e.endpoint,ra.accessToken=e.access_token,ra.proxyURL=e.proxyURL,ra.account=e.account,ra.talkWithBot=e.talkWithBot),mi._d("["+Fe.dateStr(new Date)+"] ","current settings",ra,"","",""),null==ra.accessToken&&mi._e("["+Fe.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(Fe.substr(e,n,null));break}var r=this.matchedPos();if(i+=j.string(Fe.substr(e,n,r.pos-n)),i+=j.string(t(this)),n=0==r.len?(i+=j.string(Fe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},E.startsWith=function(e,t){return e.length>=t.length&&Fe.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=hr._mul(o,l),_=hr._mul(s,l),h=hr._mul(o,u),d=c,f=(hr._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,hr.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,hr.ucompare(d,_)<0){f++;f|=0}f=f+(hr._mul(t.low,n.high)+hr._mul(t.high,n.low)|0)|0;var m=new En(f,d),p=new En(0,j.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(hr.ucompare(v,m.low)<0){g++;g|=0}t=new En(g,v)}return t},Ue.getHigh=function(e){return e.high},Ue.getLow=function(e){return e.low},Ue.idStr=function(e){return"_"+e.high+"_"+e.low},Ue.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new En(j.parseInt(t.matched(1)),j.parseInt(t.matched(2))):null},Ue.toStr=function(e){return dr.toString(e)},Ue.isNeg=function(e){return e.high<0},Ue.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(hr.ucompare(i,e.low)<0){n++;n|=0}return new En(n,i)},Ue.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(hr.ucompare(e.low,t.low)<0){n--;n|=0}return new En(n,i)},Ue.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:hr.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},Ue.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ue.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ue.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=Le.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__:me});var pe=function(){M.call(this)};(n["albero.command.UrlCommand"]=pe).__name__=["albero","command","UrlCommand"],pe.__super__=M,pe.prototype=i(M.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__:pe});var ge=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};ge.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=ge,t.toString=o,t},ge.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=ge,t.toString=o,t},ge.BACK=["BACK",2],ge.BACK.toString=o,(ge.BACK.__enum__=ge).__empty_constructs__=[ge.BACK];function ve(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=ve).__name__=["albero","entity","Account"],ve.prototype={__class__:ve};function ze(e){null!=e&&(this.id=e.id,this.group=new ye(e.group),this.profilePolicy=new Se(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=ze).__name__=["albero","entity","AccountControlGroup"],ze.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:ze};var ye=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"]=ye).__name__=["albero","entity","AccountControlGroupGroup"],ye.prototype={__class__:ye};var Se=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"]=Se).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Se.prototype={__class__:Se};function Ge(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new ye(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Se(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=Ge).__name__=["albero","entity","AccountControlGroupPartialUpdate"],Ge.prototype={__class__:Ge};function Ye(e){null!=e&&(this.id=Ue.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"]=Ye).__name__=["albero","entity","AccountControlRequest"],Ye.prototype={__class__:Ye};var we=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};we.ng=["ng",0],we.ng.toString=o,(we.ng.__enum__=we).ok=["ok",1],we.ok.toString=o,(we.ok.__enum__=we).image=["image",2],we.image.toString=o,(we.image.__enum__=we).imageOrVideo=["imageOrVideo",3],we.imageOrVideo.toString=o,(we.imageOrVideo.__enum__=we).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],we.imageOrVideoOrAudio.toString=o,(we.imageOrVideoOrAudio.__enum__=we).other=["other",5],we.other.toString=o,(we.other.__enum__=we).__empty_constructs__=[we.ng,we.ok,we.image,we.imageOrVideo,we.imageOrVideoOrAudio,we.other];function Te(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Te).__name__=["albero","entity","AllowAttachmentType"],Te.fromInt=function(e){if(null==e)return new Te(we.other);var t;if(null==e)t=we.other;else switch(e){case 0:t=we.ng;break;case 1:t=we.ok;break;case 2:t=we.image;break;case 3:t=we.imageOrVideo;break;case 4:t=we.imageOrVideoOrAudio;break;default:t=we.other}return new Te(t)},Te.fromValue=function(e){return new Te(e)},Te.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,fi.localize("MessageStringMaker.achieve"),fi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?fi.localize("MessageStringMaker.achieve"):fi.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},ci.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=Fe.substr(e,0,t));var n=e.length,i=e,r=ci.CODES;null==r&&(r=ci.initCodes(),ci.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new Ar(new ya(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 _i(){}(n["albero.js.KatakanaToRoman"]=_i).__name__=["albero","js","KatakanaToRoman"],_i.assureConvertTable=function(){return null!=_i.convertTable||(_i.convertTable=new Nr,xe.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=_i.convertTable,n=e[0],i=e[1];null!=va[n]?t.setReserved(n,i):t.h[n]=i})),_i.convertTable},_i.matchNext=function(e,t){var n=_i.assureConvertTable();if(t+1=yi.HIRAGANA_SMALL_A&&o<=yi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(yi.KATAKANA_SMALL_A-yi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},yi.katakanaToRoman=function(e){return(new _i).convert(e)},yi.normalize=function(e){return new Si(null).normalize(e)},yi.normalizeForFile=function(e){return new Si(null).normalizeForFile(e)},yi.asyncAssureNormalize=function(){return Promise.resolve()},yi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Si=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Si).__name__=["albero","js","Normalizer"],Si.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ur&&(e=e.val),mi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),fi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ur&&(e=e.val),mi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),fi.localize("TextCanonicalizer.invalid")}},__class__:Si};function wi(e){this.ws=new WebSocket(e),ga.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=ia(this,this.onOpen),this.ws.onmessage=ia(this,this.onMessage),this.ws.onerror=ia(this,this.onError),this.ws.onclose=ia(this,this.onClose)}(n["albero.js.WebSocket"]=wi).__name__=["albero","js","WebSocket"],wi.prototype={onOpen:function(e){mi._i("["+Fe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=ga.websocketsbinary?Ar.ofData(new Sa(e.data)):ci.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){mi._e("["+Fe.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);mi._i("["+Fe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){ga.websocketsbinary?this.ws.send(new Sa(e.b.bufferValue).buffer):this.ws.send(ci.encode(e))},ping:function(e){this.send(new Ar(new ya(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:wi};function Ti(){}(n["puremvc.interfaces.IProxy"]=Ti).__name__=["puremvc","interfaces","IProxy"],Ti.prototype={__class__:Ti};function Ei(){}(n["albero.proxy.AccessTokenResolverProxy"]=Ei).__name__=["albero","proxy","AccessTokenResolverProxy"],Ei.__interfaces__=[Ti],Ei.prototype={__class__:Ei};var Ii=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ii).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ii.newInstance=function(){return new Ai("accessTokenResolver")};var Ni=function(e,t){C.call(this),this.proxyName=null!=e?e:Ni.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Ni).__name__=["puremvc","patterns","proxy","Proxy"],Ni.__interfaces__=[Ti],Ni.__super__=C,Ni.prototype=i(C.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Ni});var Ai=function(e){Ni.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Ai).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Ai.__interfaces__=[Ei],Ai.__super__=Ni,Ai.prototype=i(Ni.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=ra.account?ra.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Ai});var bi=function(){Ni.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=bi).__name__=["albero","proxy","AlberoBroadcastProxy"],bi.__super__=Ni,bi.prototype=i(Ni.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new Ye(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_domain_invite":var o=new nt(e);this.dataStore.setDomainInvite(o),this.sendNotification(n,o),i();break;case"notify_add_favorite_message":var s=new Bn(e);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(n,s),i();break;case"notify_add_favorite_talk":var l=new ut(e);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(n,l),i();break;case"notify_add_friend":var u=this.dataFactory.newFriend(e[1]);this.sendNotification(n,u),i();break;case"notify_add_talkers":var c=new rn(e);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(n,c),i();break;case"notify_close_conference":var _=new We(e);this.conferenceStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(n,_),i();break;case"notify_conference_participant_join":var h,d=e[3],f=e[4],m=this.dataStore;if(null!=m.me){var p=m.me.id;h=null!=p&&null!=f&&p.high==f.high&&p.low==f.low}else h=!1;h&&this.dataStore.addReactedConfereceId(d),this.sendNotification(n,e),i();break;case"notify_conference_participant_reject":var g=e[3];this.dataStore.addReactedConfereceId(g),this.sendNotification(n,e),i();break;case"notify_create_announcement":var v=new He(e);this.keywordWatcher.onAnnouncementCreated(v),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(v)),this.sendNotification(n,v),i();break;case"notify_create_message":var y=new wt(e);this.messageStore.setMessage(y),this.keywordWatcher.onMessageCreated(y);var S=this.newTalkStatusByMessage(y);switch(null!=S&&this.sendNotification("notify_update_local_talk_status",S),y.type[1]){case 0:var w=y.content,T=null;switch(w.type){case"delete_talker":T=w.deleted_user_id;break;case"hide_pair_talk":T=w.user_id}if(null==T)return this.sendNotification(n,y),void i();for(var E=y.talkId,I=this.dataStore.getQuestions(E,T),N=0;Nt.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void mi._e("["+Fe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new mn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Pt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new mn).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 mn).id=e.talkId),pn.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&&(pn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),pn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Tt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!xe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return mi._e("["+Fe.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,wt.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=Ji.toLocalError(vt.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 Et;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=Ji.toLocalError(vt.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?Er.Some(1e3*o.asInt(e.detail.retry_after)):Er.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,Tt.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!=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 Nr,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 En(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new En(0,0);if(u.high==h.high&&u.low==h.low)break;var d=hr.ucompare(n.high,t.high);if(0<=(0!=d?d:hr.ucompare(n.low,t.low))){l=new En(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(hr.ucompare(n.low,t.low)<0){f--;f|=0}n=new En(f,m)}63,u=new En(u.high>>>1,u.high<<31|u.low>>>1);63,t=new En(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 En(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new En(v,y)}return{quotient:l,modulus:n}};var fr=function(){this.buf=new T,this.cache=[],this.useCache=fr.USE_CACHE,this.useEnumIndex=fr.USE_ENUM_INDEX,this.shash=new Nr,this.scount=0};(n["haxe.Serializer"]=fr).__name__=["haxe","Serializer"],fr.run=function(e){var t=new fr;return t.serialize(e),t.toString()},fr.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+=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(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+=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,G=B;z=this.length)throw new Ur("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ur("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 Ur("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Ur("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 Nr;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 Ur("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 Ur("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Ur("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 wr;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 Ur("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new Ur("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 G=M[R.charCodeAt(F++)];P.b[L++]=255&(z<<4|G>>2);var Y=M[R.charCodeAt(F++)];P.b[L++]=255&(G<<6|Y)}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=Fe.strDate(Fe.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 Ur("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Ur.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 yr(e.left,e.key,e.value,new yr(e.right,t,n,i)):new yr(new yr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new yr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new yr(new yr(e,t,n,i.left),i.key,i.value,i.right):new yr(new yr(e,t,n,i.left.left),i.left.key,i.left.value,new yr(i.left.right,i.key,i.value,i.right))}return new yr(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"]=yr).__name__=["haxe","ds","TreeNode"],yr.prototype={__class__:yr};var Sr=function(){vr.call(this)};(n["haxe.ds.EnumValueMap"]=Sr).__name__=["haxe","ds","EnumValueMap"],Sr.__interfaces__=[_r],Sr.__super__=vr,Sr.prototype=i(vr.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 Ar(new Sa(t).buffer)},Ar.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ar(e)},Ar.fastGet=function(e,t){return e.bytes[t]},Ar.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ur(Mr.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__:Ar};function br(){this.b=[]}(n["haxe.io.BytesBuffer"]=br).__name__=["haxe","io","BytesBuffer"],br.prototype={getBytes:function(){var e=new Ar(new Sa(this.b).buffer);return this.b=null,e},__class__:br};function Dr(){}(n["haxe.io.Input"]=Dr).__name__=["haxe","io","Input"],Dr.prototype={readByte:function(){throw new Ur("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ur(Mr.OutsideBounds);try{for(;0e.length)throw new Ur(Mr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=kr).__name__=["haxe","io","BytesInput"],kr.__super__=Dr,kr.prototype=i(Dr.prototype,{readByte:function(){if(0==this.len)throw new Ur(new Rr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ur(Mr.OutsideBounds);if(0==this.len&&0e.length)throw new Ur(Mr.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__:Cr};function Or(){this.b=new br}(n["haxe.io.BytesOutput"]=Or).__name__=["haxe","io","BytesOutput"],Or.__super__=Cr,Or.prototype=i(Cr.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 Ur(Mr.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)},Fr.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)},Fr.doubleToI64=function(e){var t=Fr.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 Ur("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Ur("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},aa.prototype.once=function(e,t){if(!oa(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},aa.prototype.removeListener=function(e,t){var n,i,r,a;if(!oa(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||oa(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(sa(n)){for(a=r;0>>16)<<16|0)|0},fr.USE_CACHE=!1,fr.USE_ENUM_INDEX=!1,fr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",gr.DEFAULT_RESOLVER=new pr,gr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Tr.count=0,Fr.i64tmp=new En(0,0),Pr.__toStr={}.toString,zr.BYTES_PER_ELEMENT=1,Yr.FLOAT_SINGLE_MIN=1401298464324817e-60,Yr.FLOAT_SINGLE_MAX=34028234663852886e22,Yr.FLOAT_DOUBLE_MIN=5e-324,Yr.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 Lr.__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 oa};(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&&(aa.host=e.host,aa.endpoint=e.endpoint,aa.accessToken=e.access_token,aa.proxyURL=e.proxyURL,aa.account=e.account,aa.talkWithBot=e.talkWithBot),mi._d("["+Fe.dateStr(new Date)+"] ","current settings",aa,"","",""),null==aa.accessToken&&mi._e("["+Fe.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return 0=e.length);){if(!this.matchSub(e,n)){i+=K.string(Fe.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(Fe.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(Fe.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},E.startsWith=function(e,t){return e.length>=t.length&&Fe.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 En(f,d),p=new En(0,K.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 En(g,v)}return t},Ue.getHigh=function(e){return e.high},Ue.getLow=function(e){return e.low},Ue.idStr=function(e){return"_"+e.high+"_"+e.low},Ue.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new En(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},Ue.toStr=function(e){return fr.toString(e)},Ue.isNeg=function(e){return e.high<0},Ue.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 En(n,i)},Ue.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 En(n,i)},Ue.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},Ue.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},Ue.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},Ue.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},Ue.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=Le.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__:me});var pe=function(){M.call(this)};(n["albero.command.UrlCommand"]=pe).__name__=["albero","command","UrlCommand"],pe.__super__=M,pe.prototype=i(M.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__:pe});var ge=n["albero.command.UrlAction"]={__ename__:["albero","command","UrlAction"],__constructs__:["FORWARD","REDIRECT","BACK"]};ge.FORWARD=function(e){var t=["FORWARD",0,e];return t.__enum__=ge,t.toString=o,t},ge.REDIRECT=function(e){var t=["REDIRECT",1,e];return t.__enum__=ge,t.toString=o,t},ge.BACK=["BACK",2],ge.BACK.toString=o,(ge.BACK.__enum__=ge).__empty_constructs__=[ge.BACK];function ve(e,t,n){this.email=e,this.pass=t,this.accessToken=n}(n["albero.entity.Account"]=ve).__name__=["albero","entity","Account"],ve.prototype={__class__:ve};function ze(e){null!=e&&(this.id=e.id,this.group=new ye(e.group),this.profilePolicy=new Se(e.profile_policy))}(n["albero.entity.AccountControlGroup"]=ze).__name__=["albero","entity","AccountControlGroup"],ze.prototype={isAllowedUpdateProfileImage:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateProfileImage},isAllowedUpdateDisplayName:function(){return null==this.profilePolicy||this.profilePolicy.allowUpdateDisplayName},__class__:ze};var ye=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"]=ye).__name__=["albero","entity","AccountControlGroupGroup"],ye.prototype={__class__:ye};var Se=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"]=Se).__name__=["albero","entity","AccountControlGroupProfilePolicy"],Se.prototype={__class__:Se};function Ge(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new ye(e.group)),null!=e.profile_policy&&(this.profilePolicy=new Se(e.profile_policy)))}(n["albero.entity.AccountControlGroupPartialUpdate"]=Ge).__name__=["albero","entity","AccountControlGroupPartialUpdate"],Ge.prototype={__class__:Ge};function Ye(e){null!=e&&(this.id=Ue.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"]=Ye).__name__=["albero","entity","AccountControlRequest"],Ye.prototype={__class__:Ye};var we=n["albero.entity.AllowAttachmentTypeValue"]={__ename__:["albero","entity","AllowAttachmentTypeValue"],__constructs__:["ng","ok","image","imageOrVideo","imageOrVideoOrAudio","other"]};we.ng=["ng",0],we.ng.toString=o,(we.ng.__enum__=we).ok=["ok",1],we.ok.toString=o,(we.ok.__enum__=we).image=["image",2],we.image.toString=o,(we.image.__enum__=we).imageOrVideo=["imageOrVideo",3],we.imageOrVideo.toString=o,(we.imageOrVideo.__enum__=we).imageOrVideoOrAudio=["imageOrVideoOrAudio",4],we.imageOrVideoOrAudio.toString=o,(we.imageOrVideoOrAudio.__enum__=we).other=["other",5],we.other.toString=o,(we.other.__enum__=we).__empty_constructs__=[we.ng,we.ok,we.image,we.imageOrVideo,we.imageOrVideoOrAudio,we.other];function Te(e){this.value=e}(n["albero.entity.AllowAttachmentType"]=Te).__name__=["albero","entity","AllowAttachmentType"],Te.fromInt=function(e){if(null==e)return new Te(we.other);var t;if(null==e)t=we.other;else switch(e){case 0:t=we.ng;break;case 1:t=we.ok;break;case 2:t=we.image;break;case 3:t=we.imageOrVideo;break;case 4:t=we.imageOrVideoOrAudio;break;default:t=we.other}return new Te(t)},Te.fromValue=function(e){return new Te(e)},Te.createAttachmentErrorMessage=function(e,t,n){return null==n&&(n=""),0this.content.response?this.content.options[this.content.response]:"";case 15:return[this.content.title,fi.localize("MessageStringMaker.achieve"),fi.localize("MessageStringMaker.remand")].join(" ");case 16:return e&&null!=this.content.done?this.content.done?fi.localize("MessageStringMaker.achieve"):fi.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+=K.string(a.charAt(63&(o<<4|s>>4))),r+=K.string(a.charAt(63&(s<<2|l>>6))),r+=K.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=K.string(a.charAt(u>>2)),r+=K.string(a.charAt(63&(u<<4|c>>4))),r+=K.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=K.string(a.charAt(_>>2)),r+=K.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},ci.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=Fe.substr(e,0,t));var n=e.length,i=e,r=ci.CODES;null==r&&(r=ci.initCodes(),ci.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new br(new Sa(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 _i(){}(n["albero.js.KatakanaToRoman"]=_i).__name__=["albero","js","KatakanaToRoman"],_i.assureConvertTable=function(){return null!=_i.convertTable||(_i.convertTable=new Ar,xe.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=_i.convertTable,n=e[0],i=e[1];null!=ya[n]?t.setReserved(n,i):t.h[n]=i})),_i.convertTable},_i.matchNext=function(e,t){var n=_i.assureConvertTable();if(t+1=yi.HIRAGANA_SMALL_A&&o<=yi.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(yi.KATAKANA_SMALL_A-yi.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},yi.katakanaToRoman=function(e){return(new _i).convert(e)},yi.normalize=function(e){return new Si(null).normalize(e)},yi.normalizeForFile=function(e){return new Si(null).normalizeForFile(e)},yi.asyncAssureNormalize=function(){return Promise.resolve()},yi.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var Si=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=Si).__name__=["albero","js","Normalizer"],Si.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Pr&&(e=e.val),mi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),fi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Pr&&(e=e.val),mi._e("["+Fe.dateStr(new Date)+"] ","invalid character:",e,"","",""),fi.localize("TextCanonicalizer.invalid")}},__class__:Si};function wi(e){this.ws=new WebSocket(e),va.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=ra(this,this.onOpen),this.ws.onmessage=ra(this,this.onMessage),this.ws.onerror=ra(this,this.onError),this.ws.onclose=ra(this,this.onClose)}(n["albero.js.WebSocket"]=wi).__name__=["albero","js","WebSocket"],wi.prototype={onOpen:function(e){mi._i("["+Fe.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t=null;t=va.websocketsbinary?br.ofData(new wa(e.data)):ci.decode(e.data),this.onmessage(t)}},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){mi._e("["+Fe.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+K.string(e.code)+" "+K.string(e.reason)+" "+K.string(e.wasClean);mi._i("["+Fe.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.ws.close()},send:function(e){va.websocketsbinary?this.ws.send(new wa(e.b.bufferValue).buffer):this.ws.send(ci.encode(e))},ping:function(e){this.send(new br(new Sa(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:wi};function Ti(){}(n["puremvc.interfaces.IProxy"]=Ti).__name__=["puremvc","interfaces","IProxy"],Ti.prototype={__class__:Ti};function Ei(){}(n["albero.proxy.AccessTokenResolverProxy"]=Ei).__name__=["albero","proxy","AccessTokenResolverProxy"],Ei.__interfaces__=[Ti],Ei.prototype={__class__:Ei};var Ii=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=Ii).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],Ii.newInstance=function(){return new Ai("accessTokenResolver")};var Ni=function(e,t){C.call(this),this.proxyName=null!=e?e:Ni.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=Ni).__name__=["puremvc","patterns","proxy","Proxy"],Ni.__interfaces__=[Ti],Ni.__super__=C,Ni.prototype=i(C.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:Ni});var Ai=function(e){Ni.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=Ai).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],Ai.__interfaces__=[Ei],Ai.__super__=Ni,Ai.prototype=i(Ni.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=aa.account?aa.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:Ai});var bi=function(){Ni.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=bi).__name__=["albero","proxy","AlberoBroadcastProxy"],bi.__super__=Ni,bi.prototype=i(Ni.prototype,{handleNotification:function(n,e,i){var r=this;switch(n){case"notify_add_account_control_request":var t=new Ye(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_domain_invite":var o=new nt(e);this.dataStore.setDomainInvite(o),this.sendNotification(n,o),i();break;case"notify_add_favorite_message":var s=new Bn(e);this.messageStore.onAddFavoriteMessage(s),this.sendNotification(n,s),i();break;case"notify_add_favorite_talk":var l=new ut(e);this.updateTalkStatusByFavoriteTalkEvent(l),this.sendNotification(n,l),i();break;case"notify_add_friend":var u=this.dataFactory.newFriend(e[1]);this.sendNotification(n,u),i();break;case"notify_add_talkers":var c=new rn(e);null==this.dataStore.getTalk(c.id)&&this.sendNotification("notify_add_talkers_including_me",c),this.dataStore.setTalk(c),this.sendNotification(n,c),i();break;case"notify_close_conference":var _=new We(e);this.conferenceStore.removeConference(_),this.updateTalkStatusByConferenceClosedEvent(_),this.sendNotification(n,_),i();break;case"notify_conference_participant_join":var h,d=e[3],f=e[4],m=this.dataStore;if(null!=m.me){var p=m.me.id;h=null!=p&&null!=f&&p.high==f.high&&p.low==f.low}else h=!1;h&&this.dataStore.addReactedConfereceId(d),this.sendNotification(n,e),i();break;case"notify_conference_participant_reject":var g=e[3];this.dataStore.addReactedConfereceId(g),this.sendNotification(n,e),i();break;case"notify_create_announcement":var v=new He(e);this.keywordWatcher.onAnnouncementCreated(v),this.sendNotification("notify_update_announcement_status",this.newAnnouncementStatus(v)),this.sendNotification(n,v),i();break;case"notify_create_message":var y=new wt(e);this.messageStore.setMessage(y),this.keywordWatcher.onMessageCreated(y);var S=this.newTalkStatusByMessage(y);switch(null!=S&&this.sendNotification("notify_update_local_talk_status",S),y.type[1]){case 0:var w=y.content,T=null;switch(w.type){case"delete_talker":T=w.deleted_user_id;break;case"hide_pair_talk":T=w.user_id}if(null==T)return this.sendNotification(n,y),void i();for(var E=y.talkId,I=this.dataStore.getQuestions(E,T),N=0;Nt.favoriteVersion)&&(t.favoriteVersion=e.favoriteVersion,t.orderInFavorites=e.orderInFavorites,this.dataStore.setTalkStatus(t))},updateTalkStatusByConferenceClosedEvent:function(e){var t=this.dataStore.getTalkStatus(e.talkId);if(null!=t&&null!=t.maxMessage){var n=t.maxMessage.id,i=e.messageId;null!=n&&null!=i&&n.high==i.high&&n.low==i.low&&(t.maxMessage.content.closed=!0,this.dataStore.setTalkStatus(t))}},updateTalkStatusByTalkPushNotificationEvent:function(e,t){var n=this.dataStore.getTalkStatus(t.talkId);if(null==n){var i=this.dataStore.getTalk(t.talkId);if(null==i)return void mi._e("["+Fe.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new mn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=Pt.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new mn).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 mn).id=e.talkId),pn.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&&(pn.isUnread(t,e.messageId)&&(t.unreadCount-=1,t.unreadCount<0&&(t.unreadCount=0)),pn.isMax(t,e.messageId)&&null!=t.maxMessage&&(t.maxMessage.type=Tt.deleted),this.dataStore.setTalkStatus(t)),t},updateTalkStatus:function(e){var i=this;if(!xe.exists(e.readUserIds,function(e){var t=i.dataStore;if(null==t.me)return!1;var n=t.me.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}))return null;var t=this.dataStore.getTalkStatus(e.talkId);if(null==t)return mi._e("["+Fe.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,wt.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=Xi.toLocalError(vt.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 Et;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=Xi.toLocalError(vt.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?Ir.Some(1e3*o.asInt(e.detail.retry_after)):Ir.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,Tt.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!=ya[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 Ar,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 En(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new En(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 En(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 En(f,m)}63,u=new En(u.high>>>1,u.high<<31|u.low>>>1);63,t=new En(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 En(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new En(v,y)}return{quotient:l,modulus:n}};var mr=function(){this.buf=new T,this.cache=[],this.useCache=mr.USE_CACHE,this.useEnumIndex=mr.USE_ENUM_INDEX,this.shash=new Ar,this.scount=0};(n["haxe.Serializer"]=mr).__name__=["haxe","Serializer"],mr.run=function(e){var t=new mr;return t.serialize(e),t.toString()},mr.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=ya[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!=ya[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(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+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var z=2,G=B;z=this.length)throw new Pr("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Pr("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 Pr("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Pr("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 Ar;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=ya[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 Pr("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 Pr("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Pr("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 Tr;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 Pr("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new Pr("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 G=M[R.charCodeAt(F++)];P.b[L++]=255&(z<<4|G>>2);var Y=M[R.charCodeAt(F++)];P.b[L++]=255&(G<<6|Y)}if(2<=x){var H=M[R.charCodeAt(F++)],K=M[R.charCodeAt(F++)];if(P.b[L++]=255&(H<<2|K>>4),3==x){var j=M[R.charCodeAt(F++)];P.b[L++]=255&(K<<4|j>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=Fe.strDate(Fe.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 Pr("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Pr.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 Sr(e.left,e.key,e.value,new Sr(e.right,t,n,i)):new Sr(new Sr(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Sr(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new Sr(new Sr(e,t,n,i.left),i.key,i.value,i.right):new Sr(new Sr(e,t,n,i.left.left),i.left.key,i.left.value,new Sr(i.left.right,i.key,i.value,i.right))}return new Sr(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"]=Sr).__name__=["haxe","ds","TreeNode"],Sr.prototype={__class__:Sr};var wr=function(){yr.call(this)};(n["haxe.ds.EnumValueMap"]=wr).__name__=["haxe","ds","EnumValueMap"],wr.__interfaces__=[hr],wr.__super__=yr,wr.prototype=i(yr.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 br(new wa(t).buffer)},br.ofData=function(e){var t=e.hxBytes;return null!=t?t:new br(e)},br.fastGet=function(e,t){return e.bytes[t]},br.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Pr(Fr.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__:br};function Dr(){this.b=[]}(n["haxe.io.BytesBuffer"]=Dr).__name__=["haxe","io","BytesBuffer"],Dr.prototype={getBytes:function(){var e=new br(new wa(this.b).buffer);return this.b=null,e},__class__:Dr};function kr(){}(n["haxe.io.Input"]=kr).__name__=["haxe","io","Input"],kr.prototype={readByte:function(){throw new Pr("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Pr(Fr.OutsideBounds);try{for(;0e.length)throw new Pr(Fr.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Cr).__name__=["haxe","io","BytesInput"],Cr.__super__=kr,Cr.prototype=i(kr.prototype,{readByte:function(){if(0==this.len)throw new Pr(new Mr);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Pr(Fr.OutsideBounds);if(0==this.len&&0e.length)throw new Pr(Fr.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__:Or};function Rr(){this.b=new Dr}(n["haxe.io.BytesOutput"]=Rr).__name__=["haxe","io","BytesOutput"],Rr.__super__=Or,Rr.prototype=i(Or.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 Pr(Fr.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 Pr("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Pr("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},oa.prototype.once=function(e,t){if(!sa(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},oa.prototype.removeListener=function(e,t){var n,i,r,a;if(!sa(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||sa(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(la(n)){for(a=r;0>>16)<<16|0)|0},mr.USE_CACHE=!1,mr.USE_ENUM_INDEX=!1,mr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",vr.DEFAULT_RESOLVER=new gr,vr.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Er.count=0,xr.i64tmp=new En(0,0),Lr.__toStr={}.toString,Gr.BYTES_PER_ELEMENT=1,Hr.FLOAT_SINGLE_MIN=1401298464324817e-60,Hr.FLOAT_SINGLE_MAX=34028234663852886e22,Hr.FLOAT_DOUBLE_MIN=5e-324,Hr.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 b4d35cf..3817e61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "direct-js", - "version": "1.106.1", + "version": "1.107.0", "description": "Low-level javascript library for direct", "main": "./lib/direct-node.min.js", "scripts": {