From 6e3135f55d7033f3ffd92c635a7990df3dfa84ed Mon Sep 17 00:00:00 2001 From: lisb-jenkins Date: Sat, 10 Dec 2022 22:01:06 +0000 Subject: [PATCH 1/2] Update lib/*.js --- lib/direct-node.min.js | 2 +- lib/direct.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/direct-node.min.js b/lib/direct-node.min.js index 7a6c008..041b73e 100755 --- a/lib/direct-node.min.js +++ b/lib/direct-node.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function s(){return io.__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&&(Fo.host=e.host,Fo.endpoint=e.endpoint,Fo.accessToken=e.access_token,Fo.proxyURL=e.proxyURL,Fo.account=e.account,Fo.talkWithBot=e.talkWithBot,Fo.acceptableEventTimeDiff=e.acceptableEventTimeDiff,Fo.name=e.name,Fo.storagePath=e.storage_path,Fo.storageQuota=e.storage_quota,Fo.wsConfig=e.ws_config),$i._d("["+et.dateStr(new Date)+"] ","current settings",Fo,"","",""),null==Fo.accessToken&&$i._e("["+et.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+=W.string(et.substr(e,n,null));break}var r=this.matchedPos();if(i+=W.string(et.substr(e,n,r.pos-n)),i+=W.string(t(this)),n=0==r.len?(i+=W.string(et.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},K.startsWith=function(e,t){return e.length>=t.length&&et.substr(e,0,t.length)==t},K.isSpace=function(e,t){var n=et.cca(e,t);return 8>>=4););if(null!=t)for(;n.lengthn;){var t=et.substr(e,0,n);i.push(t),e=et.substr(e,n,null)}0n&&(t(r),r=""),0>>16,l=65535&n.low,u=n.low>>>16,c=Ca._mul(o,l),_=Ca._mul(s,l),h=Ca._mul(o,u),d=c,f=(Ca._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,Ca.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,Ca.ucompare(d,_)<0){f++;f|=0}f=f+(Ca._mul(t.low,n.high)+Ca._mul(t.high,n.low)|0)|0;var m=new $n(f,d),p=new $n(0,W.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(Ca.ucompare(v,m.low)<0){g++;g|=0}t=new $n(g,v)}return t},nt.getHigh=function(e){return e.high},nt.getLow=function(e){return e.low},nt.idStr=function(e){return"_"+e.high+"_"+e.low},nt.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new $n(W.parseInt(t.matched(1)),W.parseInt(t.matched(2))):null},nt.fromNullableIdStr=function(e){return null!=e?nt.makeFromIdStr(e):null},nt.toStr=function(e){return Oa.toString(e)},nt.isNeg=function(e){return e.high<0},nt.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(Ca.ucompare(i,e.low)<0){n++;n|=0}return new $n(n,i)},nt.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(Ca.ucompare(e.low,t.low)<0){n--;n|=0}return new $n(n,i)},nt.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:Ca.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},nt.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},nt.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},nt.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},nt.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},nt.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=rt.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(n,e){for(var i=this,t=Promise.resolve([]),r=nt.splitUsingMaxCount(e,100),a=0;a>t,e.high<<32-t|e.low>>>t):new $n(e.high>>31,e.high>>t-32):new $n(e.high,e.low)},Ft.subTimestampPart=function(e,t){var n=Ft.timestamp(e),i=Ft.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(Ca.ucompare(n.low,i.low)<0){r--;r|=0}return new $n(r,a)},Ft.createForTest=function(e){var t=Ft.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new $n(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Zi.localize("MessageStringMaker.achieve"),Zi.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Zi.localize("MessageStringMaker.achieve"):Zi.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=Ca._mul(a,s),c=Ca._mul(o,s),_=Ca._mul(a,l),h=u,d=(Ca._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,Ca.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,Ca.ucompare(h,c)<0){d++;d|=0}d=d+(Ca._mul(e.low,t.high)+Ca._mul(e.high,t.low)|0)|0;var f=new $n(d,h),m=new $n(0,W.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(Ca.ucompare(g,f.low)<0){p++;p|=0}e=new $n(p,g)}return e},__class__:An};function bn(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=bn).__name__=["albero","entity","OriginalStamp"],bn.__interfaces__=[En],bn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=nt.makeFromIdStr(t.stampsetIdStr),i=nt.makeFromIdStr(t.stampIdStr);return new bn(n,i,t.illust)},bn.fromPropsAndStampsetId=function(e,t){return new bn(t,nt.fromIntOrInt64(e.id),e.illust)},bn.createKey=function(e){return"original__"+e.high+"_"+e.low},bn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return bn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new jt;return n.talkId=e,n.type=Gt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:bn};function Dn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=Dn).__name__=["albero","entity","Stampset"],Dn.historyStampset=function(){return new Dn(Mn.getHistoryStampsetType(),"stamp-history",null,0)},Dn.commonStampset=function(e,t,n){return new Dn(Mn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},Dn.originalStampset=function(e){var t=nt.fromIntOrInt64(e.stampset_id),n=Mn.fromStampsetId(t),i=new Dn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=io.__cast(e.stamps,Array).map(function(e){return bn.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},Dn.fromStampsetInfo=function(e){var t=Mn.fromStampsetId(e.stampsetId);return new Dn(t,e.name,e.icon,e.version)},Dn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:kn};var Cn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(nt.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=Cn).__name__=["albero","entity","StampsetSetting"],Cn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new kn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&tt.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return tt.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new Ka,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=ar.HIRAGANA_SMALL_A&&o<=ar.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(ar.KATAKANA_SMALL_A-ar.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},ar.katakanaToRoman=function(e){return(new Qi).convert(e)},ar.normalize=function(e){return new or(null).normalize(e)},ar.normalizeForFile=function(e){return new or(null).normalizeForFile(e)},ar.asyncAssureNormalize=function(){return Promise.resolve()},ar.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var or=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=or).__name__=["albero","js","Normalizer"],or.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof no&&(e=e.val),$i._e("["+et.dateStr(new Date)+"] ","invalid character:",e,"","",""),Zi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof no&&(e=e.val),$i._e("["+et.dateStr(new Date)+"] ","invalid character:",e,"","",""),Zi.localize("TextCanonicalizer.invalid")}},__class__:or};function sr(){}(n["albero.js.WebSocket"]=sr).__name__=["albero","js","WebSocket"],sr.prototype={__class__:sr};function lr(){}(n["albero.js.WebSocketFactory"]=lr).__name__=["albero","js","WebSocketFactory"],lr.newInstance=function(e,t){return new ur(e,t)};var ur=function(e,t){var n=this;this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong;var i=Fo.wsConfig,r=require("websocket").client;this.ws=new r(i),this.ws.on("connectFailed",bo(this,this.onError)),this.ws.on("connect",function(e){(n.connection=e).on("error",bo(n,n.onError)),e.on("close",bo(n,n.onConnectionClose)),e.on("message",bo(n,n.onMessage)),e.on("pong",bo(n,n.onPong)),n.onOpen(null)});var a=null;null!=Fo.proxyURL&&(a={agent:ir.createAgent(Fo.proxyURL)}),this.ws.connect(e,null,null,null,a)};(n["albero.js.WebSocketForNodeJs"]=ur).__name__=["albero","js","WebSocketForNodeJs"],ur.__interfaces__=[sr],ur.prototype={onOpen:function(e){$i._i("["+et.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryDataForHubot(e),this.onmessage(t)}},getBinaryDataForHubot:function(e){return Wa.ofData(e.binaryData)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){$i._e("["+et.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){this.removeAllEventListenersForHubot();var t="WebSocket closed. "+W.string(e.code)+" "+W.string(e.reason)+" "+W.string(e.wasClean);$i._i("["+et.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},removeAllEventListenersForHubot:function(){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new uo(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:ur};function cr(){}(n["puremvc.interfaces.IProxy"]=cr).__name__=["puremvc","interfaces","IProxy"],cr.prototype={__class__:cr};function _r(){}(n["albero.proxy.AccessTokenResolverProxy"]=_r).__name__=["albero","proxy","AccessTokenResolverProxy"],_r.__interfaces__=[cr],_r.prototype={__class__:_r};var hr=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=hr).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],hr.newInstance=function(){return new fr("accessTokenResolver")};var dr=function(e,t){U.call(this),this.proxyName=null!=e?e:dr.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=dr).__name__=["puremvc","patterns","proxy","Proxy"],dr.__interfaces__=[cr],dr.__super__=U,dr.prototype=i(U.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:dr});var fr=function(e){dr.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=fr).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],fr.__interfaces__=[_r],fr.__super__=dr,fr.prototype=i(dr.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=Fo.account?Fo.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__:fr});function mr(){}(n["albero.proxy.AccountLoaderProxy"]=mr).__name__=["albero","proxy","AccountLoaderProxy"],mr.__interfaces__=[cr],mr.prototype={__class__:mr};var pr=function(){};(n["albero.proxy.AccountLoaderProxyFactory"]=pr).__name__=["albero","proxy","AccountLoaderProxyFactory"],pr.newInstance=function(){var e=ee.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?ee.createInstance(e,["accountLoader"]):new gr("accountLoader")};var gr=function(e){dr.call(this,e)};(n["albero.proxy.AccountLoaderProxyForHubot"]=gr).__name__=["albero","proxy","AccountLoaderProxyForHubot"],gr.__interfaces__=[mr],gr.__super__=dr,gr.prototype=i(dr.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 ke(n,t))})}),null},__class__:gr});var vr=function(){dr.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=vr).__name__=["albero","proxy","AlberoBroadcastProxy"],vr.__super__=dr,vr.prototype=i(dr.prototype,{handleNotification:function(e,t,n){var i=this;switch($i._d("["+et.dateStr(new Date)+"] ","Receive request from server. name:",e," body:",t,""),e){case"notify_add_account_control_request":var r=new st(t);this.dataStore.setAccountControlRequest(r),this.sendNotification(e,r),n();break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1])),n();break;case"notify_add_acquaintances":for(var a=t[1].map(bo(Eo=this.dataFactory,Eo.newAcquaintance)),o=0;ot.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 $i._e("["+et.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(n=new zn).id=t.talkId,n.talkOrderingTimestamp=i.updatedAt}(null==n.pushNotificationSetting||t.version>n.pushNotificationSetting.version)&&(n.pushNotificationSetting=an.createWithParams(e,t.version),this.dataStore.setTalkStatus(n))},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new zn).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);null==t&&((t=new zn).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var i=this;if(!tt.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);return null==t?($i._e("["+et.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(t.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(t),t)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new Fe).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:vr});var yr=function(){dr.call(this,"api")};(n["albero.proxy.AlberoServiceProxy"]=yr).__name__=["albero","proxy","AlberoServiceProxy"],yr.__super__=dr,yr.prototype=i(dr.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");r=-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",[l[1],l[0],t,s,o,""]):(i="create_access_token",[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){$i._d("["+et.dateStr(new Date)+"] ","access token:",e,"","",""),a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",De.FORWARD(V.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.callImmediately("authorize_device",[e,n],function(e){t()})},createSession:function(e,i){var r=this,t=[e,"1.117",this.getOSString()];this.apiCaller.onSessionClear(),this.apiCaller.callImmediatelyReliable("create_session",t,function(e){var t=new Sn(e),n=I.nowAsInt64();t.passwordExpiration.isExpired(n)?r.sendNotification("password_expiration_overed"):(t.passwordExpiration.needWarning(n,r.settings.getPasswordWarningSkipUntil())&&(r.settings.setPasswordWarningSkipUntil(I.oneDayAfterAsInt64()),r.sendNotification("password_expiration_warned")),r.apiCaller.onSessionCreated(),i(t),r.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void r.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void r.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void r.sendNotification("Device",Q.AUTHORIZE);r.apiCaller.handleServerErrorDefault(e)}r.settings.clearAccessToken(),r.sendNotification("Url",De.FORWARD(V.error))},function(e){return r.shouldRetryCreateSession(e)?Ya.Some(r.apiCaller.retryTimeForReplicationLag()):Ya.None})},shouldRetryCreateSession:function(e){return 401==e.code&&"invalid token"==e.message},startNotification:function(){var t=this;this.apiCaller.call("start_notification",[],function(e){e||(t.dataStore.clear(!0),t.sendNotification("start_notification_failed"))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=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,jt.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),a.fileInfoStore.removeMessageFileInfos(o.id),a.messageStore.removeMessage(o.id)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=zr.toLocalError(Lt.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 zt;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=zr.toLocalError(Lt.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?Ya.Some(1e3*o.asInt(e.detail.retry_after)):Ya.None})},searchMessagesAroundDateTime:function(e,i){var r=this;return new Promise(function(n,t){r.apiCaller.call("search_messages_around_datetime",[e,i],function(e){var t=new ai(i,e);n(t)},function(e){t(e)})})},upload:function(t,n,i,r){var a=this,e=fi.getBlobFromUpdatableFile(i);this.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:i,thumb:e}}).then(function(e){a.uploadV2(t,n,e,r)})},uploadV2: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.file,n.thumb,e);o.then(function(e){r.createMessageReliable(t,Gt.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return $i._w("["+et.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMulti:function(n,i,r,e,a){var o=this,t=e.map(function(t){var e=fi.getBlobFromUpdatableFile(t);return o.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:t,thumb:e}})});Promise.all(t).then(function(e){var t=e.map(function(e){return e});o.uploadMultiV2(n,i,r,t,a)})},uploadMultiV2: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!=xo[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 Ka,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.versionr[o])return!0;if(a[o]>>31,t.low<<1);if(63,u=new $n(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new $n(0,0);if(u.high==h.high&&u.low==h.low)break;var d=Ca.ucompare(n.high,t.high);if(0<=(0!=d?d:Ca.ucompare(n.low,t.low))){l=new $n(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(Ca.ucompare(n.low,t.low)<0){f--;f|=0}n=new $n(f,m)}63,u=new $n(u.high>>>1,u.high<<31|u.low>>>1);63,t=new $n(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 $n(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new $n(v,y)}return{quotient:l,modulus:n}};var Ma=function(){};(n["haxe.Int64Helper"]=Ma).__name__=["haxe","Int64Helper"],Ma.parseString=function(e){var t=new $n(0,10),n=new $n(0,0),i=new $n(0,1),r=!1,a=K.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=Ca._mul(h,f),g=Ca._mul(d,f),v=Ca._mul(h,m),y=p,S=(Ca._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,Ca.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,Ca.ucompare(y,g)<0){S++;S|=0}S=S+(Ca._mul(i.low,_.high)+Ca._mul(i.high,_.low)|0)|0;var w=new $n(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(Ca.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new $n(T,I)).high<0))throw new no("NumberFormatError: Underflow")}else{var N=65535&i.low,E=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=Ca._mul(N,A),k=Ca._mul(E,A),C=Ca._mul(N,b),O=D,M=(Ca._mul(E,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,Ca.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,Ca.ucompare(O,k)<0){M++;M|=0}M=M+(Ca._mul(i.low,_.high)+Ca._mul(i.high,_.low)|0)|0;var R=new $n(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(Ca.ucompare(x,n.low)<0){F++;F|=0}if((n=new $n(F,x)).high<0)throw new no("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,H=Ca._mul(U,L),j=Ca._mul(P,L),G=Ca._mul(U,B),Y=H,z=(Ca._mul(P,B)+(G>>>16)|0)+(j>>>16)|0;if(Y=Y+(G<<=16)|0,Ca.ucompare(Y,G)<0){z++;z|=0}if(Y=Y+(j<<=16)|0,Ca.ucompare(Y,j)<0){z++;z|=0}z=z+(Ca._mul(i.low,t.high)+Ca._mul(i.high,t.low)|0)|0,i=new $n(z,Y)}return n};var Ra=function(){this.buf=new T,this.cache=[],this.useCache=Ra.USE_CACHE,this.useEnumIndex=Ra.USE_ENUM_INDEX,this.shash=new Ka,this.scount=0};(n["haxe.Serializer"]=Ra).__name__=["haxe","Serializer"],Ra.run=function(e){var t=new Ra;return t.serialize(e),t.toString()},Ra.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=xo[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!=xo[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=W.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(E==A){var x=N.b[E++],U=N.b[E++];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(E==1+A){var P=N.b[E++];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+=W.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=W.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=W.string(B-2);for(var H=2,j=B;H=this.length)throw new no("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new no("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 no("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new no("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 Ka;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=xo[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 no("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 no("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new no("Unknown enum index "+y+"@"+w);var I=this.unserializeEnum(S,T);return this.cache.push(I),I;case 107:return NaN;case 108:var N=new $;this.cache.push(N);for(this.buf;104!=this.buf.charCodeAt(this.pos);)N.add(this.unserialize());return this.pos++,N;case 109:return-1/0;case 110:return null;case 111:var E={};return this.cache.push(E),this.unserializeObject(E),E;case 112:return 1/0;case 113:var A=new ja;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 no("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new no("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var j=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<4|j>>2);var G=R[M.charCodeAt(F++)];P.b[L++]=255&(j<<6|G)}if(2<=x){var Y=R[M.charCodeAt(F++)],z=R[M.charCodeAt(F++)];if(P.b[L++]=255&(Y<<2|z>>4),3==x){var K=R[M.charCodeAt(F++)];P.b[L++]=255&(z<<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=et.strDate(et.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 no("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw no.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 La(e.left,e.key,e.value,new La(e.right,t,n,i)):new La(new La(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new La(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new La(new La(e,t,n,i.left),i.key,i.value,i.right):new La(new La(e,t,n,i.left.left),i.left.key,i.left.value,new La(i.left.right,i.key,i.value,i.right))}return new La(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"]=La).__name__=["haxe","ds","TreeNode"],La.prototype={__class__:La};var Ba=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Ba.Left=function(e){var t=["Left",0,e];return t.__enum__=Ba,t.toString=s,t},Ba.Right=function(e){var t=["Right",1,e];return t.__enum__=Ba,t.toString=s,t},Ba.__empty_constructs__=[];var Ha=function(){Pa.call(this)};(n["haxe.ds.EnumValueMap"]=Ha).__name__=["haxe","ds","EnumValueMap"],Ha.__interfaces__=[ka],Ha.__super__=Pa,Ha.prototype=i(Pa.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 Wa(new Uint8Array(t).buffer)},Wa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Wa(e)},Wa.fastGet=function(e,t){return e.bytes[t]},Wa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new no($a.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__:Wa};function Va(){this.b=[]}(n["haxe.io.BytesBuffer"]=Va).__name__=["haxe","io","BytesBuffer"],Va.prototype={getBytes:function(){var e=new Wa(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Va};function qa(){}(n["haxe.io.Input"]=qa).__name__=["haxe","io","Input"],qa.prototype={readByte:function(){throw new no("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new no($a.OutsideBounds);try{for(;0e.length)throw new no($a.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Qa).__name__=["haxe","io","BytesInput"],Qa.__super__=qa,Qa.prototype=i(qa.prototype,{readByte:function(){if(0==this.len)throw new no(new Za);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new no($a.OutsideBounds);if(0==this.len&&0e.length)throw new no($a.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__:Ja};function Xa(){this.b=new Va}(n["haxe.io.BytesOutput"]=Xa).__name__=["haxe","io","BytesOutput"],Xa.__super__=Ja,Xa.prototype=i(Ja.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 no($a.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)},eo.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)},eo.doubleToI64=function(e){var t=eo.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},Ra.USE_CACHE=!1,Ra.USE_ENUM_INDEX=!1,Ra.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Ua.DEFAULT_RESOLVER=new xa,Ua.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Ga.count=0,eo.i64tmp=new $n(0,0),io.__toStr={}.toString,_o.FLOAT_SINGLE_MIN=1401298464324817e-60,_o.FLOAT_SINGLE_MAX=34028234663852886e22,_o.FLOAT_DOUBLE_MIN=5e-324,_o.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";var n={},i=function(){return lo.__string_rec(this,"")};function r(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 a=e.DirectAPI=function(){this.eventEmitter=new l,require("unorm")};n.DirectAPI=a,a.__name__=["DirectAPI"],a.getInstance=function(){return null==a.instance&&(a.instance=new a),a.instance},a.main=function(){},a.prototype={setOptions:function(e){null!=e&&(jo.host=e.host,jo.endpoint=e.endpoint,jo.accessToken=e.access_token,jo.proxyURL=e.proxyURL,jo.account=e.account,jo.talkWithBot=e.talkWithBot,jo.acceptableEventTimeDiff=e.acceptableEventTimeDiff,jo.name=e.name,jo.storagePath=e.storage_path,jo.storageQuota=e.storage_quota,jo.wsConfig=e.ws_config),nr._d("["+u.dateStr(new Date)+"] ","current settings",jo,"","",""),null==jo.accessToken&&nr._e("["+u.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(a.length>2)r=new ni(v.parseInt(a[1]),v.parseInt(a[2]));else r=null;if(null==r||null==t)return;var o=this.data.getTalk(r);if(null==o)return;n=o.domainId}else{var s=e.id.split("_");if(s.length>2)n=new ni(v.parseInt(s[1]),v.parseInt(s[2]));else n=null}null!=n&&this.sendQueue.sendAnnouncement(n,t)},send:function(e,t){var n,i=e.room.split("_");i.length>2?n=new ni(v.parseInt(i[1]),v.parseInt(i[2])):n=null;null!=n&&null!=t&&this.sendQueue.sendMessage(n,t)},topic:function(e,t){var n,i=e.room.split("_");i.length>2?n=new ni(v.parseInt(i[1]),v.parseInt(i[2])):n=null;this.facade.sendNotification("Talk",ke.UPDATE_FOR_HUBOT(n,t))},download:function(e,t,n){var i,r=null,a=null;"string"==typeof t?i=t:(i=t.url,r=t.path,a=t.name),null!=i?(null==a&&(a=ho.basename(i)),null==r&&(r=ho.join(_o.tmpdir(),a)),this.facade.sendNotification("FilePath",se.DOWNLOAD_PATH(i,r,n))):n(null,new Error("target URL is required"))},leave:function(e,t){var n,i,r=this,a=e.room.split("_");if(a.length>2){var o=new ni(v.parseInt(a[1]),v.parseInt(a[2]));n=o}else n=null;if(null==t)i=null;else{var s=t.id.split("_");if(s.length>2){var l=new ni(v.parseInt(s[1]),v.parseInt(s[2]));i=l}else i=null}Ba.delay(function(){r.facade.sendNotification("Talk",ke.DELETE_FOR_HUBOT(n,i))},500)},userForId:function(e,t){var n=x.fromNullableIdStr(t);return this.hubotObject.userObjectByIdStr(n,e)},userObjects:function(e){var t=x.fromNullableIdStr(e);return this.hubotObject.userObjects(t)},talkObjects:function(){return this.hubotObject.talkObjects()},domainObjects:function(){return this.hubotObject.domainObjects()},parseInt64:function(e){return e.length>0&&"_"==e.charAt(0)?x.makeFromIdStr(e):x.parse(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:Ua.toString(e)},listen:function(){this.facade=A.getInstance(),this.api=lo.__cast(this.facade.retrieveProxy("api"),Tr),this.data=lo.__cast(this.facade.retrieveProxy("dataStore"),Dr),this.hubotObject=lo.__cast(this.facade.retrieveProxy("hubotObject"),Na),this.sendQueue=lo.__cast(this.facade.retrieveProxy("sendQueue"),ba);var e=lo.__cast(this.facade.retrieveProxy("fileService"),Mr),t=lo.__cast(this.facade.retrieveProxy("fileInfoStore"),Or);this.notes=new ua(new ca(this,this.api,t,e)),this.facade.startup()},emit:function(e,t,n,i){this.eventEmitter.emit(e,t,n,i)},on:function(e,t){return this.eventEmitter.on(e,t)},getDomainInvites:function(e){this.api._getDomainInvites(e)},acceptDomainInvite:function(e){this.api.acceptDomainInvite(e)},__class__:a};var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};n.EReg=o,o.__name__=["EReg"],o.prototype={match:function(e){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(e),this.r.s=e,null!=this.r.m},matched:function(e){if(null!=this.r.m&&e>=0&&e=e.length);){if(!this.matchSub(e,n)){i+=v.string(u.substr(e,n,null));break}var r=this.matchedPos();if(i+=v.string(u.substr(e,n,r.pos-n)),i+=v.string(t(this)),0==r.len?(i+=v.string(u.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&n0?this.interval-(e-this.basetime):this.interval,Math.ceil(t/1e3)},createError:function(e){var t=this.max+" calls every "+Math.floor(this.interval/1e3)+" sec";return ka.createTooManyRequestsError(t,this.calculateRetryAfter(e))},apply:function(e){var t=this;return new Promise(function(n,i){var r=t._now();if(t.max>0&&r-t.basetime>t.interval)t.basetime=r,t.count=1;else{if(!(t.max>0&&t.countt?1:-1},g.isObject=function(e){if(null==e)return!1;var t=typeof e;return"string"==t||"object"==t&&null==e.__enum__||"function"==t&&null!=(e.__name__||e.__ename__)},g.isEnumValue=function(e){return null!=e&&null!=e.__enum__},g.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var v=function(){};n.Std=v,v.__name__=["Std"],v.string=function(e){return lo.__string_rec(e,"")},v.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=u.cca(e,1)&&88!=u.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var y=function(){this.b=""};n.StringBuf=y,y.__name__=["StringBuf"],y.prototype={toString:function(){return this.b},__class__:y};var S=function(){};n.StringTools=S,S.__name__=["StringTools"],S.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},S.startsWith=function(e,t){return e.length>=t.length&&u.substr(e,0,t.length)==t},S.isSpace=function(e,t){var n=u.cca(e,t);return n>8&&n<14||32==n},S.ltrim=function(e){for(var t=e.length,n=0;n0?u.substr(e,n,t-n):e},S.rtrim=function(e){for(var t=e.length,n=0;n0?u.substr(e,0,t-n):e},S.trim=function(e){return S.ltrim(S.rtrim(e))},S.replace=function(e,t,n){return e.split(t).join(n)},S.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,(e>>>=4)>0;);if(null!=t)for(;n.lengtht;){var i=u.substr(e,0,t);n.push(i),e=u.substr(e,t,null)}e.length>0&&n.push(e)},r="",a=e.split("\n");a.length>0;){var o=a.shift();r.length+o.length>t&&(i(r),r=""),r.length>0&&(r+="\n"),r+=o}return i(r),n};var T=n.ValueType={__ename__:["ValueType"],__constructs__:["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]};T.TNull=["TNull",0],T.TNull.toString=i,T.TNull.__enum__=T,T.TInt=["TInt",1],T.TInt.toString=i,T.TInt.__enum__=T,T.TFloat=["TFloat",2],T.TFloat.toString=i,T.TFloat.__enum__=T,T.TBool=["TBool",3],T.TBool.toString=i,T.TBool.__enum__=T,T.TObject=["TObject",4],T.TObject.toString=i,T.TObject.__enum__=T,T.TFunction=["TFunction",5],T.TFunction.toString=i,T.TFunction.__enum__=T,T.TClass=function(e){var t=["TClass",6,e];return t.__enum__=T,t.toString=i,t},T.TEnum=function(e){var t=["TEnum",7,e];return t.__enum__=T,t.toString=i,t},T.TUnknown=["TUnknown",8],T.TUnknown.toString=i,T.TUnknown.__enum__=T,T.__empty_constructs__=[T.TNull,T.TInt,T.TFloat,T.TBool,T.TObject,T.TFunction,T.TUnknown];var I=function(){};n.Type=I,I.__name__=["Type"],I.getClassName=function(e){var t=e.__name__;return null==t?null:t.join(".")},I.getEnumName=function(e){return e.__ename__.join(".")},I.resolveClass=function(e){var t=n[e];return null!=t&&t.__name__?t:null},I.resolveEnum=function(e){var t=n[e];return null!=t&&t.__ename__?t:null},I.createInstance=function(e,t){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6]);case 8:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]);case 9:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]);case 10:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9]);case 11:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10]);case 12:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11]);case 13:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12]);case 14:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13]);default:throw new so("Too many arguments")}},I.createEmptyInstance=function(e){function t(){}return t.prototype=e.prototype,new t},I.createEnum=function(e,t,n){var i=g.field(e,t);if(null==i)throw new so("No such constructor "+t);if(g.isFunction(i)){if(null==n)throw new so("Constructor "+t+" need parameters");return i.apply(e,n)}if(null!=n&&0!=n.length)throw new so("Constructor "+t+" does not need parameters");return i},I.typeof=function(e){switch(typeof e){case"boolean":return T.TBool;case"function":return e.__name__||e.__ename__?T.TObject:T.TFunction;case"number":return Math.ceil(e)==e%2147483648?T.TInt:T.TFloat;case"object":if(null==e)return T.TNull;var t=e.__enum__;if(null!=t)return T.TEnum(t);var n=lo.getClass(e);return null!=n?T.TClass(n):T.TObject;case"string":return T.TClass(String);case"undefined":return T.TNull;default:return T.TUnknown}},I.enumEq=function(e,t){if(e==t)return!0;try{if(e[0]!=t[0])return!1;for(var n=2,i=e.length;n=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():O.dateString(r,!1)},O.getDateStringForNotification=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():r.getMonth()+1+"/"+r.getDate()},O.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296)),a=O.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},O.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=new Date(4294967296*t+(n>=0?n:n+4294967296));return i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()},O.datetimeString=function(e){if(null==e)return"";var t=parseFloat(Ua.toString(e)),n=new Date(t);return n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" "+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()};var M=function(){};n["albero.FileDynamicHelper"]=M,M.__name__=["albero","FileDynamicHelper"],M.filterDeleted=function(e){return null==e?[]:e.filter(M.isNotDeleted)},M.isNotDeleted=function(e){return null==e.deleted||!e.deleted},M.createFileInfoDynamic=function(e,t,n,i){var r={url:i.get_url,content_type:e.type,content_size:e.size,name:t,file_id:i.file_id};return B.foreach(n,function(e){null!=e.auth&&(r.thumbnail_url=e.auth.get_url),null!=e.dimension&&(r.thumbnail_dimension=e.dimension.toObject())}),r};var R=function(){};n["albero.FileHelper"]=R,R.__name__=["albero","FileHelper"],R.createByteSizeStringWithUnit=function(e){if(null==e)return"0 B";for(var t,n=["","K","M","G","T"];;){var i=new ni(0,1024),r=t=Ua.divMod(e,i).quotient,a=new ni(0,0),o=r.high-a.high|0;if(o=0!=o?o:xa.ucompare(r.low,a.low),!((r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0))break;e=t,n.shift()}return Ua.toString(e)+" "+n.shift()+"B"},R.extractFilenameExceptExtension=function(e){return new o("\\.(?=[^.]+$)","").split(e)[0]};var F=function(){};n["albero.History"]=F,F.__name__=["albero","History"],F.replaceState=function(e,t,n){return null!=window.history&&(window.history.replaceState(e,t,n),!0)};var x=function(){};n["albero.Int64Helper"]=x,x.__name__=["albero","Int64Helper"],x.parse=function(e){if(!new o("^\\d+$","").match(e))return null;for(var t=new ni(0,0),n=new ni(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=xa._mul(s,u),h=xa._mul(l,u),d=xa._mul(s,c),f=_,m=(xa._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,xa.ucompare(f,d)<0){m++;m|=0}if(f=f+(h<<=16)|0,xa.ucompare(f,h)<0){m++;m|=0}m=m+(xa._mul(t.low,n.high)+xa._mul(t.high,n.low)|0)|0;var p=new ni(m,f),g=new ni(0,v.parseInt(e.charAt(a))),y=p.high+g.high|0,S=p.low+g.low|0;if(xa.ucompare(S,p.low)<0){y++;y|=0}t=new ni(y,S)}return t},x.getHigh=function(e){return e.high},x.getLow=function(e){return e.low},x.idStr=function(e){return"_"+e.high+"_"+e.low},x.makeFromIdStr=function(e){var t=new o("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new ni(v.parseInt(t.matched(1)),v.parseInt(t.matched(2))):null},x.fromNullableIdStr=function(e){return null!=e?x.makeFromIdStr(e):null},x.toStr=function(e){return Ua.toString(e)},x.isNeg=function(e){return e.high<0},x.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(xa.ucompare(i,e.low)<0){n++;n|=0}return new ni(n,i)},x.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(xa.ucompare(e.low,t.low)<0){n--;n|=0}return new ni(n,i)},x.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:xa.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:t.high>=0?n:1},x.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},x.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},x.toFloat=function(e){var t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)},x.idStrToInt64=function(e){var t=e.split("_");return t.length>2?new ni(v.parseInt(t[1]),v.parseInt(t[2])):null},x.decrement=function(e){if(null==e)return null;var t=new ni(0,1),n=e.high-t.high|0,i=e.low-t.low|0;if(xa.ucompare(e.low,t.low)<0){n--;n|=0}return new ni(n,i)},x.increment=function(e){if(null==e)return null;var t=new ni(0,1),n=e.high+t.high|0,i=e.low+t.low|0;if(xa.ucompare(i,e.low)<0){n++;n|=0}return new ni(n,i)},x.unique=function(e){if(null==e)return[];for(var t=[],n=0,i=e.length;n>31,t)},x.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;nt?1:e0&&a.push(new an(d.id,f))}}}else{for(var w=[],T=(u.iter(n),0);T0&&a.push(new an(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:Ce});var Oe=function(){X.call(this)};n["albero.command.UpdateUserCommand"]=Oe,Oe.__name__=["albero","command","UpdateUserCommand"],Oe.__super__=X,Oe.prototype=r(X.prototype,{execute:function(e){var t=e.getBody();if(null!=t.profileImage){var n=t.profileImage;if(!S.startsWith(n.type,"image/"))return}this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:Oe});var Me=function(){X.call(this)};n["albero.command.UpdateUserPresencesCommand"]=Me,Me.__name__=["albero","command","UpdateUserPresencesCommand"],Me.__super__=X,Me.prototype=r(X.prototype,{execute:function(e){var t=e.getBody().domainId,n=e.getBody().userIds;if(null!=t&&null!=n){var i=this.filterOnlyExpired(x.unique(n));0!=i.length&&this.updateIfNeedPerSub(t,i)}},filterOnlyExpired:function(e){var t=this,n=O.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new ni(i>>31,i);return e.filter(function(e){var i=B.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,r)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){for(var n=this,i=Promise.resolve([]),r=x.splitUsingMaxCount(t,100),a=0;a0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},Ge.prototype={compareStrongness:function(e){return this.getStrongness()-e.getStrongness()},getStrongness:function(){switch(this.value[1]){case 0:return 40;case 2:return 30;case 3:return 20;case 4:return 10;case 1:case 5:return 0}},createAttachmentErrorMessageByDomain:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return tr.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return tr.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return tr.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return tr.localize("AllowAttachmentType.ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentErrorMessageByNetwork:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return tr.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return tr.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return tr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return tr.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:return function(e){return new o("image.*","").match(e.type)};case 3:return function(e){return new o("image.*|video.*","").match(e.type)};case 4:return function(e){return new o("image.*|video.*|audio.*","").match(e.type)};default:return function(e){return!0}}},createDataTransferItemFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:var e=new o("image.*","");return function(t){return e.match(t.type)};case 3:var t=new o("image.*|video.*","");return function(e){return t.match(e.type)};case 4:var n=new o("image.*|video.*|audio.*","");return function(e){return n.match(e.type)};default:return function(e){return!0}}},__class__:Ge};var Ye=function(e){null!=e&&(this.id=e.announcement_id,this.domainId=e.domain_id,this.groupId=e.group_id,this.groupName=e.group_name,this.type=Gt.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};n["albero.entity.Announcement"]=Ye,Ye.__name__=["albero","entity","Announcement"],Ye.prototype={getDisplayTextWithoutEscape:function(){return Gt.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 7:return e+":"+this.getDisplayTextWithoutEscape();default:return nr._e("["+u.dateStr(new Date)+"] ","Unsupported announcement.type is detected. announcment:%o",this,"","",""),Gt.getUnsupportText()}},__class__:Ye};var ze=function(e){this.unreadCount=0,null!=e&&(this.domainId=e.domain_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.maxAnnouncementId=e.max_announcement_id,null!=e.max_announcement&&(this.maxAnnouncement=new Ye(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=ze,ze.__name__=["albero","entity","AnnouncementStatus"],ze.prototype={updateReadWithStatusUpdate:function(e){var t=0,n=null;if(null!=e.readAnnouncementIds)for(var i=0,r=e.readAnnouncementIds;i=0?l:1)>0}else a=!0;if(a){var u;if(null!=n){var c=o.high-n.high|0;c=0!=c?c:xa.ucompare(o.low,n.low),u=(o.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=o),++t}}null!=n&&this.read(n,t)},updateByAnnouncementDeletion:function(e){var t,n=!1;if(this.isUnread(e)&&(this.decrementUnreadCount(1),n=!0),null!=this.maxAnnouncementId){var i=this.maxAnnouncementId;t=null!=i&&null!=e&&i.high==e.high&&i.low==e.low}else t=!1;return t&&null!=this.maxAnnouncement&&(this.maxAnnouncement.type=Yt.deleted,this.maxAnnouncement.content="",n=!0),n},updateByAnnouncement:function(e){this.isNewMax(e.id)&&(this.maxAnnouncementId=e.id,this.maxAnnouncement=e),this.unreadCount++},updateByReadingAnnouncements:function(e){if(null==e||this.canRegardAnnouncementReadCountZero(e)){if(!Ke.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(Mo(this,this.isUnread));if(0==t.length)return!1;this.read(t[t.length-1],t.length)}return!0},canRegardAnnouncementReadCountZero:function(e){var t=this.maxAnnouncementId,n=B.orNull(P.lastOption(e));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},read:function(e,t){this.maxReadAnnouncementId=e,this.decrementUnreadCount(t);var n=this.domainId,i=this.maxReadAnnouncementId,r=this.unreadCount;nr._d("["+u.dateStr(new Date)+"] ","Announcement status is updated. [domainId, maxReadAnnoundementId, unreadCount]:",n,i,r,"")},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},isUnread:function(e){if(null!=this.maxReadAnnouncementId){var t=this.maxReadAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:xa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:xa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:ze};var Ke=function(){};n["albero.entity.AnnouncementStatusHelper"]=Ke,Ke.__name__=["albero","entity","AnnouncementStatusHelper"],Ke.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},Ke.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var We=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=We,We.__name__=["albero","entity","AnnouncementStatusUpdate"],We.prototype={__class__:We};var Ve=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.talkAutoScroll=1,this.talksSortMode="new_messages_first",this.keywordWatchingText="",this.keywordWatchingEmphasis=!1,this.keywordWatchingSelfMessage=!1,this.keywordWatchingActionReply=!1,this.userDataContainer=[],this.language="ja",this.conferenceIncomingSound=!0,null!=e){if(null!=e.notificationInvisibleTalkSound&&(this.notificationInvisibleTalkSound=e.notificationInvisibleTalkSound),null!=e.notificationInvisibleTalkPopup&&(this.notificationInvisibleTalkPopup=e.notificationInvisibleTalkPopup),null!=e.notificationVisibleTalkSound&&(this.notificationVisibleTalkSound=e.notificationVisibleTalkSound),null!=e.notificationVisibleTalkPopup&&(this.notificationVisibleTalkPopup=e.notificationVisibleTalkPopup),null!=e.notificationIncludingMessageContent&&(this.notificationIncludingMessageContent=e.notificationIncludingMessageContent),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),null!=e.keywordWatchingText&&(this.keywordWatchingText=e.keywordWatchingText),null!=e.keywordWatchingEmphasis&&(this.keywordWatchingEmphasis=e.keywordWatchingEmphasis),null!=e.keywordWatchingSelfMessage&&(this.keywordWatchingSelfMessage=e.keywordWatchingSelfMessage),null!=e.keywordWatchingActionReply&&(this.keywordWatchingActionReply=e.keywordWatchingActionReply),null!=e.userDataContainer)for(var t=0,n=lo.__cast(e.userDataContainer,Array);t=0?n:n+4294967296)+Je.INCOMING_TIME<(new Date).getTime()},isExpired:function(){var e=this.expiredAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)<(new Date).getTime()},__class__:Je};var Xe=function(e){null!=e&&(this.maxFriends=e.max_friends,this.maxTalks=e.max_talks,this.maxTalkers=e.max_talkers,this.maxMessageContentLength=e.max_message_content_length,this.botExpiredVersion=e.bot_expired_version,this.presenceExpiration=null!=e.presence_expiration?e.presence_expiration:Xe.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Ge.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=Xe,Xe.__name__=["albero","entity","Configuration"],Xe.prototype={__class__:Xe};var Ze=function(e){this.contractConference=qa.None,null!=e&&(this.id=e.contract_id,this.plan=new $t(e.plan),this.quota=new mn(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=qa.Some(new $e(e.conference))))};n["albero.entity.Contract"]=Ze,Ze.__name__=["albero","entity","Contract"],Ze.prototype={getMaxMessageContentLength:function(){return B.map(B.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return B.flatMap(B.option(this.quota),function(e){return B.option(e.maxTalkers)})},getMaxTalks:function(){return B.flatMap(B.option(this.quota),function(e){return B.option(e.maxTalks)})},isConferenceEnalbed:function(){return B.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=B.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return B.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return B.map(this.contractConference,function(e){return e.maxConferenceParticipants})},isGroupConfenreceEnalbed:function(){var e=B.map(this.contractConference,function(e){return e.groupConferenceEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},isTargetOfPlanAd:function(){return null!=this.quota&&this.quota.withAd},isFreePlan:function(){return null!=this.plan&&this.plan.free},__class__:Ze};var $e=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=$e.DEFAULT_MAX_PARTICIPANTS,this.ttl=$e.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants,this.groupConferenceEnabled=e.group_conference_enabled)};n["albero.entity.ContractConference"]=$e,$e.__name__=["albero","entity","ContractConference"],$e.prototype={__class__:$e};var et=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?nt.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=et.getLabelRoot();break;case 2:this.name=et.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=et,et.__name__=["albero","entity","Department"],et.getLabelFree=function(){return tr.localize("Department.label_free")},et.getLabelRoot=function(){return tr.localize("Department.label_root")},et.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==nt.Root},isFree:function(){return this.nodeType==nt.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return nt.Root;case 2:return nt.Free;default:return nt.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(x.idStr)},__class__:et};var tt=function(){};n["albero.entity.DepartmentHelper"]=tt,tt.__name__=["albero","entity","DepartmentHelper"],tt.getName=function(e){return null==e?null:e.name};var nt=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};nt.Normal=["Normal",0],nt.Normal.toString=i,nt.Normal.__enum__=nt,nt.Root=["Root",1],nt.Root.toString=i,nt.Root.__enum__=nt,nt.Free=["Free",2],nt.Free.toString=i,nt.Free.__enum__=nt,nt.__empty_constructs__=[nt.Normal,nt.Root,nt.Free];var it=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=it,it.__name__=["albero","entity","DepartmentList"],it.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new et(e)})},__class__:it};var rt=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=rt,rt.__name__=["albero","entity","DepartmentUserCount"],rt.prototype={__class__:rt};var at=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=at,at.__name__=["albero","entity","DepartmentUserCountList"],at.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new rt(e)})},__class__:at};var ot=function(e,t){if(null!=e){if(this.id=x.fromIntOrInt64(e.direct_app_id),this.uniqueKey=e.unique_key,this.appUrl=e.app_url,this.locales=new Ja,null!=e.locales)for(var n=0,i=g.fields(e.locales);n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){if(j.isEmpty(e))return!0;if(j.isEmpty(this.canonicalDisplayName)){this.canonicalDisplayName=lr.canonicalize(this.displayName);var t=this.canonicalDisplayName,n=this.displayName;nr._d("["+u.dateStr(new Date)+"] ","create canonical display name from %s to %s.",t,n,"","")}return this.canonicalDisplayName.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&this.canonicalPhoneticDisplayName.indexOf(e)>-1},matchNameOrPhoneticRoman:function(e){if(this.matchNameOrPhonetic(e))return!0;if(j.isEmpty(this.canonicalDisplayNameRoman)){this.canonicalDisplayNameRoman=lr.canonicalizeForRoman(this.displayName);var t=this.canonicalDisplayNameRoman,n=this.displayName;nr._d("["+u.dateStr(new Date)+"] ","create canonical display name(roman) from %s to %s.",t,n,"","")}return this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(j.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=lr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1)},__class__:Tt});var It=function(e){this.values=e};n["albero.entity.Domains"]=It,It.__name__=["albero","entity","Domains"],It.prototype={orderByName:function(){var e=P.sortAndReturn(this.values.map(Nt.fromDomain),Nt.compare).map(Nt.toDomain);return new It(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?qa.None:c.fold(this.values,function(e,t){switch(B.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:xa.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return B.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:xa.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return qa.Some(e)}},qa.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new Ja;return c.iter(this.values,function(t){c.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=Go[n]?e.setReserved(n,t):e.h[n]=t})}),L.toValueArray(e)},__class__:It};var Nt=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=lr.canonicalize(this.name)};n["albero.entity.DomainForSort"]=Nt,Nt.__name__=["albero","entity","DomainForSort"],Nt.fromDomain=function(e){return new Nt(e)},Nt.toDomain=function(e){return e.domain},Nt.compare=function(e,t){var n=j.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:j.compare(e.name,t.name)},Nt.prototype={__class__:Nt};var Et=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new At(e.get_headers))};n["albero.entity.DownloadAuth"]=Et,Et.__name__=["albero","entity","DownloadAuth"],Et.prototype={__class__:Et};var At=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=At,At.__name__=["albero","entity","DownloadAuthHeaders"],At.prototype={__class__:At};var bt=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version)};n["albero.entity.FavoriteTalkEvent"]=bt,bt.__name__=["albero","entity","FavoriteTalkEvent"],bt.prototype={__class__:bt};var Dt=function(e){this.uploadResult=kt.NONE,this.thumbnailDimension=qa.None,null!=e&&(this.attachmentId=e.attachment_id,this.messageId=e.message_id,this.talkId=e.talk_id,this.id=e.file_id,this.userId=e.user_id,this.name=e.name,this.contentType=e.content_type,this.contentSize=e.content_size,this.url=e.url,this.thumbUrl=e.thumbnail_url,this.updatedAt=e.updated_at,this.file=e.file,this.localThumbInfo=e.localThumbInfo,this.thumbnailDimension=qa.None,this.deleted=null!=e.deleted&&e.deleted)};n["albero.entity.FileInfo"]=Dt,Dt.__name__=["albero","entity","FileInfo"],Dt.fromMessageAndFile=function(e,t){var n=new Dt;return n.messageId=e.id,n.talkId=e.talkId,n.userId=e.userId,n.updatedAt=e.createdAt,n.id=t.file_id,n.name=t.name,n.contentType=t.content_type,n.contentSize=t.content_size,n.url=t.url,n.thumbUrl=t.thumbnail_url,n.thumbnailDimension=null==t.thumbnail_dimension?qa.None:qa.Some(new Xn(t.thumbnail_dimension)),n.deleted=null!=t.deleted&&t.deleted,n.file=t.file,n.localThumbInfo=t.localThumbInfo,n},Dt.fromMessageAndFileWithFileId=function(e,t,n){var i=Dt.fromMessageAndFile(e,t);return i.id=n,i},Dt.prototype={isRemote:function(){return null==this.file},isUploaded:function(){if(this.isRemote())return!0;switch(this.uploadResult[1]){case 0:return!0;case 1:case 2:return!1}},isUploadFailed:function(){if(this.isRemote())return!1;switch(this.uploadResult[1]){case 1:return!0;case 0:case 2:return!1}},setUploadResult:function(e){this.uploadResult=e},isNotUploaded:function(){return!this.isUploaded()},hasThumb:function(){return null!=this.thumbUrl||this.hasLocalThumbInfo()},hasLocalThumbInfo:function(){return null!=this.localThumbInfo},hasLocalFile:function(){return null!=this.file},hasUrl:function(){return null!=this.url},isImage:function(){return S.startsWith(this.contentType,"image/")},isImageGif:function(){return S.startsWith(this.contentType,"image/gif")},isImageJpeg:function(){return S.startsWith(this.contentType,"image/jpeg")},isPdf:function(){return S.startsWith(this.contentType,"application/pdf")},isVideo:function(){return S.startsWith(this.contentType,"video/")},canDisplayAsThumb:function(){return!!this.hasThumb()||this.isImage()},getNoThumbText:function(){return null!=this.name?this.name:this.url},getUploadedFileData:function(){if(null==this.file){var e={url:this.url,content_type:this.contentType,content_size:this.contentSize,name:this.name,file_id:this.id};return null!=this.thumbUrl&&(e.thumbnail_url=this.thumbUrl),B.isDefined(this.thumbnailDimension)&&(e.thumbnail_dimension=B.get(this.thumbnailDimension)),e}var t=this.uploadResult;switch(t[1]){case 0:return t[2];case 1:case 2:return nr._e("["+u.dateStr(new Date)+"] ","file not uploaded.","","","",""),null}},addLocalFile:function(e){this.file=e},addLocalThumbInfo:function(e){this.localThumbInfo=e},getUploadableFilePack:function(){return{file:this.file,thumb:this.localThumbInfo}},__class__:Dt};var kt=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};kt.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=kt,t.toString=i,t},kt.FAILUER=["FAILUER",1],kt.FAILUER.toString=i,kt.FAILUER.__enum__=kt,kt.NONE=["NONE",2],kt.NONE.toString=i,kt.NONE.__enum__=kt,kt.__empty_constructs__=[kt.FAILUER,kt.NONE];var Ct=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=Ct,Ct.__name__=["albero","entity","FileInfoDeletion"],Ct.prototype={__class__:Ct};var Ot=function(e){null!=e&&(this.domainId=e.domain_id,this.show=e.show,this.updatedAt=e.updated_at,this.version=e.version)};n["albero.entity.FlowNotificationBadge"]=Ot,Ot.__name__=["albero","entity","FlowNotificationBadge"],Ot.prototype={__class__:Ot};var Mt=function(){};n["albero.entity.FlowNotificationBadgeStore"]=Mt,Mt.__name__=["albero","entity","FlowNotificationBadgeStore"],Mt.prototype={clear:function(){this.badgeMap=new Ja},setBadge:function(e,t){null==this.badgeMap&&(this.badgeMap=new Ja);var n="_"+e.high+"_"+e.low,i=this.badgeMap;null!=Go[n]?i.setReserved(n,t):i.h[n]=t},getBadge:function(e){if(null==this.badgeMap)return null;var t="_"+e.high+"_"+e.low,n=this.badgeMap;return null!=Go[t]?n.getReserved(t):n.h[t]},removeBadge:function(e){if(null!=this.badgeMap){var t="_"+e.high+"_"+e.low;this.badgeMap.remove(t)}},isBadgeShownForOneDomain:function(e){return null!=e&&this.isBadgeShown("_"+e.high+"_"+e.low)},isBadgeShown:function(e){if(null==this.badgeMap)return!1;var t=this.badgeMap,n=null!=Go[e]?t.getReserved(e):t.h[e];return null!=n&&n.show},__class__:Mt};var Rt=function(e){null!=e&&(this.talkId=e.talk_id,null!=e.messages&&(this.messages=lo.__cast(e.messages,Array).map(function(e){return new Ft(e)})))};n["albero.entity.HitContext"]=Rt,Rt.__name__=["albero","entity","HitContext"],Rt.prototype={findHitMessage:function(e){return c.find(this.messages,function(t){var n=t.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low})},__class__:Rt};var Ft=function(e){null!=e&&(this.id=e.message_id,this.talkId=e.talk_id,this.userId=e.user_id,this.type=Gt.typeOf(e.type),this.content=e.content,this.createdAt=e.created_at,this.hit=e.hit)};n["albero.entity.HitMessage"]=Ft,Ft.__name__=["albero","entity","HitMessage"],Ft.prototype={__class__:Ft};var xt=function(){};n["albero.entity.IdSpec"]=xt,xt.__name__=["albero","entity","IdSpec"],xt.timestamp=function(e){var t=xt.TIMESTAMP_SHIFT;return 0==(t&=63)?new ni(e.high,e.low):t<32?new ni(e.high>>t,e.high<<32-t|e.low>>>t):new ni(e.high>>31,e.high>>t-32)},xt.subTimestampPart=function(e,t){var n=xt.timestamp(e),i=xt.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(xa.ucompare(n.low,i.low)<0){r--;r|=0}return new ni(r,a)},xt.createForTest=function(e){var t=xt.TIMESTAMP_SHIFT;return 0==(t&=63)?new ni(e.high,e.low):t<32?new ni(e.high<>>32-t,e.low<0||this.credential.ttl0?this.content.text:"";case 7:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 13:return[this.content.question,tr.localize("MessageStringMaker.yes"),tr.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?tr.localize("MessageStringMaker.yes"):tr.localize("MessageStringMaker.no"):"";case 15:return null!=this.content.options?v.string(this.content.question)+" "+v.string(this.content.options.join(" ")):this.content.question;case 16:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,tr.localize("MessageStringMaker.achieve"),tr.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?tr.localize("MessageStringMaker.achieve"):tr.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 7:return tr.localize("Message.bookmark_label_deleted");case 8:return[tr.localize("Message.bookmark_label_note_shared"),new Ei(this.content).title].join(" ");case 10:return[tr.localize("Message.bookmark_label_note_created"),new Ei(this.content).title].join(" ");case 11:return[tr.localize("Message.bookmark_label_note_updated"),new Ei(this.content).title].join(" ");case 2:case 12:if(null!=this.content.text&&this.content.text.length>0)return[tr.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 14:case 16:return[tr.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[tr.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[tr.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?tr.localize("Message.bookmark_label_completed"):tr.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[tr.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[tr.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new Ei(this.content);default:return null}},messageStringRaw:function(){switch(this.type[1]){case 0:return"";case 1:return this.content;case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 8:case 9:case 10:case 11:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 14:case 16:return"";case 13:case 15:return this.content.question;case 17:return this.content.title;case 18:return"";case 19:case 20:case 21:case 22:default:return""}},getContentsForNoteDelete:function(){return 9==this.type[1]?new Ai(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new bi(this.content):null},isAllowedToDelete:function(e){return!!(this.isSentBy(e)&&this.isNotSystemMessage()&&this.isNotActionStampMessage()&&this.isNotNoteMessage())&&this.isNotDeletedMessage()},isAllowedToReply:function(e){return!(!this.isNotSentBy(e)||!this.isNotSystemMessage())&&this.isNotDeletedMessage()},isAllowedToQuote:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToCopy:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToForward:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotActionStampMessage()&&this.isNotDeletedFileMessage(e)&&this.isNotTextMultipleFileAllDeletedWithEmptyText(e)&&this.isNotNoteMessage())&&this.isNotOpenConference()},isAllowedToForwardOnOnlyTextOrStamp:function(){return!(!this.isTextMessage()&&!this.isStampMessage())||this.isTextMultipleFileWithText()},isAllowedToAddToFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isNotFavorite()},isAllowedToRemoveFromFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isFavorite()},isMatchCategory:function(e){switch(e[1]){case 0:return!!(this.isTextMessage()||this.isFileMessage()||this.isTextMultipleFile())||this.isStampMessageWithText();case 1:return!1}},isSentBy:function(e){var t=this.userId;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},isNotSentBy:function(e){return!this.isSentBy(e)},isSystemMessage:function(){return this.type==Yt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==Yt.yesOrNo||this.type==Yt.yesOrNoReply||this.type==Yt.selectOne||this.type==Yt.selectOneReply||this.type==Yt.todo||this.type==Yt.todoDone||this.type==Yt.yesOrNoClosed||this.type==Yt.selectOneClosed||this.type==Yt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==Yt.selectOneReply||this.type==Yt.yesOrNoReply||this.type==Yt.todoDone},isClosedActionStampMessage:function(){return this.type==Yt.yesOrNoClosed||this.type==Yt.selectOneClosed||this.type==Yt.todoClosed},isSendingActionStampMessage:function(){return this.type==Yt.yesOrNo||this.type==Yt.selectOne||this.type==Yt.todo},isNoteMessage:function(){return this.type==Yt.noteShared||this.type==Yt.noteDeleted||this.type==Yt.noteCreated||this.type==Yt.noteUpdated},isNoteDeletedMessage:function(){return this.type==Yt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==Yt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==Yt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==Yt.stamp||this.type==Yt.originalStamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithText:function(){return!!this.isStampMessage()&&this.isNotObjectWithEmptyText()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return j.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()},isTextMultipleFile:function(){return this.type==Yt.textMultipleFile},isNotTextMultipleFile:function(){return!this.isTextMultipleFile()},isTextMultipleFileWithText:function(){return!!this.isTextMultipleFile()&&this.isNotObjectWithEmptyText()},isTextMultipleFileWithEmptyText:function(){return!!this.isTextMultipleFile()&&this.isObjectWithEmptyText()},isNotTextMultipleFileWithEmptyText:function(){return!!this.isNotTextMultipleFile()||this.isNotObjectWithEmptyText()},isNotDeletedFileMessage:function(e){return!!this.isNotFileMessage()||!e},isNotTextMultipleFileAllDeletedWithEmptyText:function(e){return!!this.isNotTextMultipleFileWithEmptyText()||!e},isTextMessage:function(){return this.type==Yt.text},isOpenConference:function(){return this.type==Yt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){var e=this.type;return nr._i("["+u.dateStr(new Date)+"] ",e,"","","",""),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?qa.Some(this.content.in_reply_to):qa.None},isNotFavorite:function(){return!this.isFavorite()},isFavorite:function(){return this.favorite.isFavorite()},isNotCalloutHolder:function(){return!(!this.isFileMessage()&&!this.isTextMultipleFileWithEmptyText())||this.isStampMessageWithEmptyText()},close:function(){this.content.closed=!0},updateFavorite:function(e){this.favorite.update(e)},addReadUsersUntillMaxCount:function(e){var t=this;if(!(this.readUserIds.length>=16)){var n=e.filter(function(e){return x.notContains(t.readUserIds,e)});this.readUserIds=this.readUserIds.concat(n).slice(0,16)}},createReadCountText:function(){return this.readUserIds.length>=16?"15+":v.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},deleteFile:function(e){var t;switch(this.type[1]){case 4:t=[this.content];break;case 5:t=this.content.files;break;default:t=[]}if(0!=t.length){var n=c.find(t,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=n&&(n.deleted=!0)}},getQuestionTitle:function(){switch(this.type[1]){case 17:case 18:case 21:return null==this.content.title?"":this.content.title;case 13:case 14:case 15:case 16:case 19:case 20:return null==this.content.question?"":this.content.question;default:return""}},getChoiceCloseResponse:function(e){var t=tr.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==dn.closingTypeOf(this.content.closing_type)[1])t+=null!=i?tr.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):tr.localize("QuestionHelper.no_answer");else{t+=null!=i?null==n?"":n.map(function(t){var n=null==t.count?0:t.count;return e(t.content)+": "+n+tr.localize("QuestionHelper.name")}).join("\n"):tr.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=tr.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==dn.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?tr.localize("QuestionHelper.achieve_task"):tr.localize("QuestionHelper.not_achieve_task")}else{var i=0;if(null!=t)for(var r=0;r=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:Zt};var $t=function(e){null!=e&&(this.name=e.plan_name,this.trial=!!e.trial,this.free=!!e.free)};n["albero.entity.Plan"]=$t,$t.__name__=["albero","entity","Plan"],$t.prototype={__class__:$t};var en=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=lo.__cast(e.item_values,Array).map(function(e){return new rn(e)})))};n["albero.entity.Profile"]=en,en.__name__=["albero","entity","Profile"],en.prototype={__class__:en};var tn=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=lo.__cast(e.item_definitions,Array);t=0?o:1)>0&&(this.updatedAt=i,this.maxResponseId=t,this.lastResponse=e,this.lastResponseUserId=n)},__class__:un};var cn=n["albero.entity.QuestionFromType"]={__ename__:["albero","entity","QuestionFromType"],__constructs__:["fromSelf","fromOther"]};cn.fromSelf=["fromSelf",0],cn.fromSelf.toString=i,cn.fromSelf.__enum__=cn,cn.fromOther=["fromOther",1],cn.fromOther.toString=i,cn.fromOther.__enum__=cn,cn.__empty_constructs__=[cn.fromSelf,cn.fromOther];var _n=n["albero.entity.QuestionFilter"]={__ename__:["albero","entity","QuestionFilter"],__constructs__:["onlyClosed","onlyUnclosed","noFilter"]};_n.onlyClosed=["onlyClosed",0],_n.onlyClosed.toString=i,_n.onlyClosed.__enum__=_n,_n.onlyUnclosed=["onlyUnclosed",1],_n.onlyUnclosed.toString=i,_n.onlyUnclosed.__enum__=_n,_n.noFilter=["noFilter",2],_n.noFilter.toString=i,_n.noFilter.__enum__=_n,_n.__empty_constructs__=[_n.onlyClosed,_n.onlyUnclosed,_n.noFilter];var hn=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};hn.any=["any",0],hn.any.toString=i,hn.any.__enum__=hn,hn.all=["all",1],hn.all.toString=i,hn.all.__enum__=hn,hn.unknown=["unknown",2],hn.unknown.toString=i,hn.unknown.__enum__=hn,hn.__empty_constructs__=[hn.any,hn.all,hn.unknown];var dn=function(){};n["albero.entity.QuestionClosingTypeHelper"]=dn,dn.__name__=["albero","entity","QuestionClosingTypeHelper"],dn.closingTypeOf=function(e){switch(e){case 0:return hn.any;case 1:return hn.all;default:return hn.unknown}};var fn=function(e){this.content=e.content,this.count=null==e.count?0:e.count,this.userIds=null==e.user_ids?[]:e.user_ids};n["albero.entity.QuestionResponse"]=fn,fn.__name__=["albero","entity","QuestionResponse"],fn.prototype={add:function(e){this.contains(e)||(this.count+=1,this.userIds=this.userIds.concat([e]))},sub:function(e){this.contains(e)&&(this.count-=1,this.userIds=this.userIds.filter(function(t){return!(e.high==t.high&&e.low==t.low)}))},contains:function(e){return x.contains(this.userIds,e)},__class__:fn};var mn=function(e){null!=e&&(this.msgRetentionPeriod=e.msg_retention_period,this.msgFileSize=e.msg_file_size,this.maxMessageContentLength=e.max_message_content_length,this.maxTalkers=e.max_talkers,this.maxTalks=e.max_talks,this.withAd=!!e.with_ad)};n["albero.entity.Quota"]=mn,mn.__name__=["albero","entity","Quota"],mn.prototype={__class__:mn};var pn=function(e){if(null!=e&&(this.total=e.total,this.marker=e.marker,this.nextMarker=e.next_marker,this.contents=[],null!=e.contents))for(var t=0,n=lo.__cast(e.contents,Array);t>>16,s=65535&t.low,l=t.low>>>16,u=xa._mul(a,s),c=xa._mul(o,s),_=xa._mul(a,l),h=u,d=(xa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,xa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,xa.ucompare(h,c)<0){d++;d|=0}d=d+(xa._mul(e.low,t.high)+xa._mul(e.high,t.low)|0)|0;var f=new ni(d,h),m=new ni(0,v.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(xa.ucompare(g,f.low)<0){p++;p|=0}e=new ni(p,g)}return e},__class__:kn};var Cn=function(e,t,n){this.stampsetId=e,this.id=t,this.illust=n};n["albero.entity.OriginalStamp"]=Cn,Cn.__name__=["albero","entity","OriginalStamp"],Cn.__interfaces__=[Dn],Cn.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=x.makeFromIdStr(t.stampsetIdStr),i=x.makeFromIdStr(t.stampIdStr);return new Cn(n,i,t.illust)},Cn.fromPropsAndStampsetId=function(e,t){return new Cn(t,x.fromIntOrInt64(e.id),e.illust)},Cn.createKey=function(e){return"original__"+e.high+"_"+e.low},Cn.prototype={getImageUrl:function(){return this.illust},getKey:function(){return Cn.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Gt;return n.talkId=e,n.type=Yt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:Cn};var On=function(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]};n["albero.entity.Stampset"]=On,On.__name__=["albero","entity","Stampset"],On.historyStampset=function(){return new On(xn.getHistoryStampsetType(),"stamp-history",null,0)},On.commonStampset=function(e,t,n){return new On(xn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},On.originalStampset=function(e){var t=x.fromIntOrInt64(e.stampset_id),n=xn.fromStampsetId(t),i=new On(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=lo.__cast(e.stamps,Array).map(function(e){return Cn.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},On.fromStampsetInfo=function(e){var t=xn.fromStampsetId(e.stampsetId);return new On(t,e.name,e.icon,e.version)},On.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:Mn};var Rn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(x.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};n["albero.entity.StampsetSetting"]=Rn,Rn.__name__=["albero","entity","StampsetSetting"],Rn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new Mn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(e){return null!=this.allowCreateMessageStampsetIds&&c.exists(this.allowCreateMessageStampsetIds,function(t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low})},containVisibleStampset:function(e){return c.exists(this.stampsetInfos,function(t){var n=t.stampsetId;return null!=e&&null!=n&&e.high==n.high&&e.low==n.low})},getSendableStampsetInfos:function(){var e=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(t){return e.containSendableStampset(t.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.map(function(t){return e.eqStampsetId(t)&&e.isNewerThan(t)?e:t})},deleteStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.filter(function(t){var n=t.stampsetId;return!(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(t){return!(null!=t&&null!=e&&t.high==e.high&&t.low==e.low)})},getStampsetIdsDiff:function(e){for(var t=new Ja,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=0?r:1},jn.prototype={getTalkOrderingTimestamp:function(){return null!=this.status&&null!=this.status.talkOrderingTimestamp?this.status.talkOrderingTimestamp:this.talk.updatedAt},getTalkOrderInFavorites:function(){return null!=this.status?this.status.orderInFavorites:null},__class__:jn};var Gn=function(e,t){this.paneType=e,this.talkSelection=t};n["albero.entity.TalkPaneSelection"]=Gn,Gn.__name__=["albero","entity","TalkPaneSelection"],Gn.createArrayForMultiPanes=function(e){return c.mapi(e,function(e,t){return new Gn(Xt.getMultiPaneType(e),t)})},Gn.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return G.talks(e,Y.single(this.talkSelection));case 1:var n=Mo(t,t.getTalkSelection),i=e,r=Xt.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,G.talks(e,Y.multi(r));case 2:var a=Mo(t,t.getTalkSelection),o=e,s=Xt.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,G.talks(e,Y.multi(s));case 3:var l=Mo(t,t.getTalkSelection),u=e,c=Xt.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,G.talks(e,Y.multi(c))}},getTalkIdOrNull:function(){return Wn.getTalkIdOrNull(this.talkSelection)},__class__:Gn};var Yn=function(){};n["albero.entity.ITalkSelectionGetter"]=Yn,Yn.__name__=["albero","entity","ITalkSelectionGetter"],Yn.prototype={__class__:Yn};var zn=function(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?sn.fromRawValue(e.type):ln.None,this.version=e.version};n["albero.entity.TalkPushNotificationEvent"]=zn,zn.__name__=["albero","entity","TalkPushNotificationEvent"],zn.prototype={__class__:zn};var Kn=n["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};Kn.NotSelected=["NotSelected",0],Kn.NotSelected.toString=i,Kn.NotSelected.__enum__=Kn,Kn.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=Kn,n.toString=i,n},Kn.AnnouncementsSelected=["AnnouncementsSelected",2],Kn.AnnouncementsSelected.toString=i,Kn.AnnouncementsSelected.__enum__=Kn,Kn.__empty_constructs__=[Kn.NotSelected,Kn.AnnouncementsSelected];var Wn=function(){};n["albero.entity.TalkSelectionHelper"]=Wn,Wn.__name__=["albero","entity","TalkSelectionHelper"],Wn.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=Wn.getTalkIdOrNull(e),r=Wn.getTalkIdOrNull(t);n=null==i&&null==r||null!=i&&null!=r&&i.high==r.high&&i.low==r.low}else n=!1;if(n){var a=Wn.getMessageIdOrNull(e),o=Wn.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},Wn.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:e[3];var n=e[2],i=B.orNull(Hn.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==Bn.annoucements}},Wn.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},Wn.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return B.orNull(t);case 2:return null}},Wn.toTalkSelectionStr=function(e){switch(e[1]){case 0:return"";case 1:var t=e[2];return"_"+t.high+"_"+t.low;case 2:return"announcement"}};var Vn=function(e){this.unreadMentionCount=0,this.unreadCount=0,null!=e?(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.unreadMentionCount=null!=e.unread_mention_count?e.unread_mention_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new Gt(e.max_message):this.maxMessage=null,this.maxReadMessageId=e.max_read_message_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.talkOrderingTimestamp=e.talk_ordering_timestamp,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version,this.pushNotificationSetting=new on(e.push_notification)):this.pushNotificationSetting=new on};n["albero.entity.TalkStatus"]=Vn,Vn.__name__=["albero","entity","TalkStatus"],Vn.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),B.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},updateByMessageDeletion:function(e){var t=!1;return this.isUnread(e.messageId)&&(this.decrementUnreadCount(1),e.isMention&&this.decrementUnreadMentionCount(1),t=!0),this.isMax(e.messageId)&&(null!=this.maxMessage&&(this.maxMessage.type=Yt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(Mo(this,this.isUnread));if(0==i.length)return!1;for(var r=i[0],a=0;a=0?s:1)<0&&(r=o),x.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&(this.decrementUnreadCount(1),x.contains(n,o)&&this.decrementUnreadMentionCount(1))}return this.maxReadMessageId=r,!0},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:xa.ucompare(e.low,t.low),(e.high<0?t.high<0?n:-1:t.high>=0?n:1)<0}return!0}return!1},read:function(e,t,n){this.maxReadMessageId=e,this.decrementUnreadCount(t),this.decrementUnreadMentionCount(n)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},decrementUnreadMentionCount:function(e){this.unreadMentionCount-=e,this.unreadMentionCount<0&&(this.unreadMentionCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0,this.unreadMentionCount=0},updateByMessage:function(e,t){this.isNewMax(e.id)&&(this.maxMessageId=e.id,this.maxMessage=e),e.isUnreadCountTarget&&(t?this.isUnread(e.id)&&this.readAll():(this.unreadCount++,e.mention&&this.unreadMentionCount++),this.talkOrderingTimestamp=e.createdAt)},updateByReadingMessages:function(e,t){var n=this;if(null==e||this.canRegardTalkReadCountZero(e)){if(!qn.isUnreadMesasgeExisted(this))return!1;if(null==this.maxMessageId)return!1;this.readAll()}else{var i=e.filter(function(e){return n.isUnread(e.id)});if(0==i.length)return!1;var r=i[i.length-1].id,a=i.filter(function(e){if(e.isUnreadCountTarget){var n=e.userId;return!(null!=n&&null!=t&&n.high==t.high&&n.low==t.low)}return!1}),o=a.filter(function(e){return e.mention});this.read(r,a.length,o.length)}return!0},updateByTalkPushNotificationEvent:function(e){return e.version>this.pushNotificationSetting.version&&(this.pushNotificationSetting=on.createWithParams(e.type,e.version),!0)},canRegardTalkReadCountZero:function(e){var t=this.maxMessageId,n=B.orNull(P.lastOption(e.map(function(e){return e.id})));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},isMessageAcceptable:function(e,t){if(this.isUnread(e.id))return!0;var n=xt.subTimestampPart(this.maxReadMessageId,e.id),i=n.high-t.high|0;return i=0!=i?i:xa.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<=0},isUnread:function(e){if(null!=this.maxReadMessageId){var t=this.maxReadMessageId,n=t.high-e.high|0;return n=0!=n?n:xa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId,n=t.high-e.high|0;return n=0!=n?n:xa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},__class__:Vn};var qn=function(){};n["albero.entity.TalkStatusHelper"]=qn,qn.__name__=["albero","entity","TalkStatusHelper"],qn.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},qn.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},qn.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&e.isUnread(e.maxMessage.id))};var Qn=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=B.option(e.max_read_message_id))};n["albero.entity.TalkStatusUpdate"]=Qn,Qn.__name__=["albero","entity","TalkStatusUpdate"],Qn.prototype={__class__:Qn};var Jn=function(e,t,n){this.file=e,this.dimension=Xn.createWithSize(t,n),this.auth=null};n["albero.entity.ThumbInfo"]=Jn,Jn.__name__=["albero","entity","ThumbInfo"],Jn.prototype={setAuth:function(e){this.auth=e},__class__:Jn};var Xn=function(e){null!=e&&(this.width=e.width,this.height=e.height)};n["albero.entity.ThumbDimension"]=Xn,Xn.__name__=["albero","entity","ThumbDimension"],Xn.createWithSize=function(e,t){var n=new Xn;return n.width=e,n.height=t,n},Xn.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:Xn};var Zn=function(e,t,n){var i=new ni(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n};n["albero.entity.UpdateDomainStampSettingEvent"]=Zn,Zn.__name__=["albero","entity","UpdateDomainStampSettingEvent"],Zn.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:Zn};var $n=n["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL"]};$n.PROFILE_IMAGE=["PROFILE_IMAGE",0],$n.PROFILE_IMAGE.toString=i,$n.PROFILE_IMAGE.__enum__=$n,$n.MESSAGE=["MESSAGE",1],$n.MESSAGE.toString=i,$n.MESSAGE.__enum__=$n,$n.TALK_ICON=["TALK_ICON",2],$n.TALK_ICON.toString=i,$n.TALK_ICON.__enum__=$n,$n.THUMBNAIL=["THUMBNAIL",3],$n.THUMBNAIL.toString=i,$n.THUMBNAIL.__enum__=$n,$n.NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],$n.NOTE_ATTACHMENT.toString=i,$n.NOTE_ATTACHMENT.__enum__=$n,$n.NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],$n.NOTE_THUMBNAIL.toString=i,$n.NOTE_THUMBNAIL.__enum__=$n,$n.__empty_constructs__=[$n.PROFILE_IMAGE,$n.MESSAGE,$n.TALK_ICON,$n.THUMBNAIL,$n.NOTE_ATTACHMENT,$n.NOTE_THUMBNAIL];var ei=function(){};n["albero.entity.UploadUseTypeHelper"]=ei,ei.__name__=["albero","entity","UploadUseTypeHelper"],ei.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 5;case 5:return 6}};var ti=function(e){null!=e&&(null!=e.user_id&&(this.userId=e.user_id),null!=e.email&&(this.email=e.email),null!=e.sub_email&&(this.subEmail=e.sub_email),null!=e.group_alias&&(this.groupAlias=e.group_alias),null!=e.signin_id&&(this.signinId=e.signin_id))};n["albero.entity.UserIdentifier"]=ti,ti.__name__=["albero","entity","UserIdentifier"],ti.prototype={__class__:ti};var ni=function(e,t){this.high=e,this.low=t};n["haxe._Int64.___Int64"]=ni,ni.__name__=["haxe","_Int64","___Int64"],ni.prototype={__class__:ni};var ii=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=B.option(e.last_used_at))};n["albero.entity.UserPresence"]=ii,ii.__name__=["albero","entity","UserPresence"],ii.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(xa.ucompare(t.low,e.low)<0){n--;n|=0}var r=new ni(n,i),a=ii.SIXTY_MINUTES,o=r.high-a.high|0;if(o=0!=o?o:xa.ucompare(r.low,a.low),(r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0)return ri.GT_60;var s=ii.FIFTEEN_MINUTES,l=r.high-s.high|0;return l=0!=l?l:xa.ucompare(r.low,s.low),(r.high<0?s.high<0?l:-1:s.high>=0?l:1)>0?ri.LT_OR_EQ_60:ri.LT_OR_EQ_15},ii.prototype={toState:function(e){var t=e,n=B.map(this.lastUsedAtOpt,function(e){return ii.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return ri.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(xa.ucompare(e.low,n.low)<0){i--;i|=0}var a=new ni(i,r),o=a.high-t.high|0;return o=0!=o?o:xa.ucompare(a.low,t.low),(a.high<0?t.high<0?o:-1:t.high>=0?o:1)>0},__class__:ii};var ri=n["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};ri.LT_OR_EQ_15=["LT_OR_EQ_15",0],ri.LT_OR_EQ_15.toString=i,ri.LT_OR_EQ_15.__enum__=ri,ri.LT_OR_EQ_60=["LT_OR_EQ_60",1],ri.LT_OR_EQ_60.toString=i,ri.LT_OR_EQ_60.__enum__=ri,ri.GT_60=["GT_60",2],ri.GT_60.toString=i,ri.GT_60.__enum__=ri,ri.__empty_constructs__=[ri.LT_OR_EQ_15,ri.LT_OR_EQ_60,ri.GT_60];var ai=function(e){this.success=e};n["albero.entity.api.message.AddFavoriteMessageResult"]=ai,ai.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],ai.prototype={__class__:ai};var oi=function(e){this.success=e};n["albero.entity.api.message.DeleteFavoriteMessageResult"]=oi,oi.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],oi.prototype={__class__:oi};var si=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};n["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=si,si.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],si.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:si};var li=function(e,t){var n=this;c.iter(t,function(t){var i=new ui(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:xa.ucompare(e.low,r.low),(e.high<0?r.high<0?a:-1:r.high>=0?a:1)<0?n.messageCreatedAtNew=i:n.messageCreatedAtOld=i})};n["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=li,li.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],li.prototype={__class__:li};var ui=function(e){this.messageId=e.message_id,this.createdAt=e.created_at};n["albero.entity.api.message.MessageCreatedAt"]=ui,ui.__name__=["albero","entity","api","message","MessageCreatedAt"],ui.prototype={__class__:ui};var ci=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=ci,ci.__name__=["albero","entity","api","note","CreateNoteError"],ci.prototype={__class__:ci};var _i=function(e){this.note=new Mi(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=_i,_i.__name__=["albero","entity","api","note","CreateNoteResult"],_i.prototype={updateWithEmitterKey:function(e){var t=new _i;return t.note=this.note,t.emitterKey=e,t},__class__:_i};var hi=function(e){this.result=e};n["albero.entity.api.note.DeleteNoteResult"]=hi,hi.__name__=["albero","entity","api","note","DeleteNoteResult"],hi.prototype={__class__:hi};var di=function(e){this.note=new Mi(e)};n["albero.entity.api.note.GetNoteResult"]=di,di.__name__=["albero","entity","api","note","GetNoteResult"],di.prototype={getNoteId:function(){return this.note.noteId},getNoteCreateUserId:function(){return this.note.createdBy},getRevisionCreateUserId:function(){return this.note.getRevisionCreateUserId()},getNoteCreateDate:function(){return this.note.createdAt},getRevisionCreateDate:function(){return this.note.getRevisionCreateDate()},getLockedUserIdWithoutSelf:function(e){return this.note.getLockedUserIdWithoutSelf(e)},__class__:di};var fi=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=P.asArray(e.contents).map(function(e){return new qi(e)}))};n["albero.entity.api.note.GetNoteStatusesResult"]=fi,fi.__name__=["albero","entity","api","note","GetNoteStatusesResult"],fi.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:fi};var mi=function(e){this.note=new Mi(e)};n["albero.entity.api.note.UpdateNoteResult"]=mi,mi.__name__=["albero","entity","api","note","UpdateNoteResult"],mi.prototype={__class__:mi};var pi=function(e){this.note=new Mi(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=pi,pi.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],pi.prototype={__class__:pi};var gi=function(){};n["albero.entity.file.DummyFileUtil"]=gi,gi.__name__=["albero","entity","file","DummyFileUtil"],gi.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var vi=function(){};n["albero.entity.file.StageType"]=vi,vi.__name__=["albero","entity","file","StageType"],vi.prototype={__class__:vi};var yi=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=yi,yi.__name__=["albero","entity","file","StageTypeTalk"],yi.__interfaces__=[vi],yi.prototype={toString:function(){var e=this.talkId;return"staged__"+e.high+"_"+e.low+Xt.toPanePrefix(this.paneType)},isForPane:function(e){return this.paneType==e},isForNote:function(){return!1},isForPreview:function(){return!1},__class__:yi};var Si=function(){};n["albero.entity.file.StageTypeNote"]=Si,Si.__name__=["albero","entity","file","StageTypeNote"],Si.__interfaces__=[vi],Si.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:Si};var wi=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=wi,wi.__name__=["albero","entity","message","IFavoriteMessageEvent"],wi.prototype={__class__:wi};var Ti=function(e){this.message=new Gt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=Ti,Ti.__name__=["albero","entity","message","AddFavoriteMessageEvent"],Ti.__interfaces__=[wi],Ti.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},getTalkId:function(){return this.talkId},__class__:Ti};var Ii=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=Ii,Ii.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],Ii.__interfaces__=[wi],Ii.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:Ii};var Ni=function(){};n["albero.entity.message.IMessageContentForActionReply"]=Ni,Ni.__name__=["albero","entity","message","IMessageContentForActionReply"],Ni.prototype={__class__:Ni};var Ei=function(e){null!=e&&(this.noteId=new xi(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted,this.hasAttachments=!!e.has_attachments)};n["albero.entity.message.MessageContentForNote"]=Ei,Ei.__name__=["albero","entity","message","MessageContentForNote"],Ei.prototype={__class__:Ei};var Ai=function(e){null!=e&&(this.noteId=new xi(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Ai,Ai.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Ai.prototype={__class__:Ai};var bi=function(e){this.text=qa.None,this.stampsetId=x.fromIntOrInt64(e.stampset_id),this.stampId=x.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=qa.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=bi,bi.__name__=["albero","entity","message","MessageContentForOriginalStamp"],bi.prototype={hasValidText:function(){return B.isDefined(this.getValidText())},getValidText:function(){return B.filter(this.text,j.isNotEmpty)},__class__:bi};var Di=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.options=e.options,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForSelectOneReply"]=Di,Di.__name__=["albero","entity","message","MessageContentForSelectOneReply"],Di.__interfaces__=[Ni],Di.prototype={getResponseIndex:function(){return this.response},__class__:Di};var ki=function(e){this.inReplyTo=e.in_reply_to,this.title=e.title,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.done=e.done,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForTodoReply"]=ki,ki.__name__=["albero","entity","message","MessageContentForTodoReply"],ki.__interfaces__=[Ni],ki.prototype={getResponseIndex:function(){return this.done?0:1},__class__:ki};var Ci=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.question=e.question,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForYesNoReply"]=Ci,Ci.__name__=["albero","entity","message","MessageContentForYesNoReply"],Ci.__interfaces__=[Ni],Ci.prototype={getResponseIndex:function(){return this.response?0:1},__class__:Ci};var Oi=function(e){if(null==e)return this.favorite=!1,this.createdAt=null,void(this.tags=[]);this.favorite=!0,this.createdAt=e.created_at,this.tags=e.tags};n["albero.entity.message.MessageFavorite"]=Oi,Oi.__name__=["albero","entity","message","MessageFavorite"],Oi.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:Oi};var Mi=function(e){null!=e&&(this.noteId=new xi(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new Vi(e.setting),this.noteRevision=new Ki(e.note_revision),this.noteLocked=new Gi(e.locked))};n["albero.entity.note.Note"]=Mi,Mi.__name__=["albero","entity","note","Note"],Mi.prototype={isSameNoteId:function(e){return this.noteId.equals(e)},getRevisionCreateUserId:function(){return this.noteRevision.createdBy},getRevisionCreateDate:function(){return this.noteRevision.createdAt},compareRevision:function(e){return this.noteRevision.compareRevision(e)},lock:function(e,t,n,i){this.noteRevision.revision==e&&this.noteLocked.lock(t,n,i)},unlock:function(e,t){this.noteRevision.revision==e&&this.noteLocked.unlock(t)},getLockedUserIdWithoutSelf:function(e){return this.noteLocked.getLockedUserIdWithoutSelf(e)},__class__:Mi};var Ri=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};Ri.TEXT=["TEXT",0],Ri.TEXT.toString=i,Ri.TEXT.__enum__=Ri,Ri.FILES=["FILES",1],Ri.FILES.toString=i,Ri.FILES.__enum__=Ri,Ri.__empty_constructs__=[Ri.TEXT,Ri.FILES];var Fi=function(){};n["albero.entity.note.NoteContentTypeHelper"]=Fi,Fi.__name__=["albero","entity","note","NoteContentTypeHelper"],Fi.createNoteContentType=function(e){if(null==e)return nr._e("["+u.dateStr(new Date)+"] ","no value.","","","",""),null;switch(e){case 1:return Ri.TEXT;case 5:return Ri.FILES;default:return nr._e("["+u.dateStr(new Date)+"] ","value is not expected.","","","",""),null}},Fi.getValue=function(e){if(null==e)return nr._e("["+u.dateStr(new Date)+"] ","no content type.","","","",""),null;switch(e[1]){case 0:return 1;case 1:return 5}};var xi=function(e){this.value=e};n["albero.entity.note.NoteId"]=xi,xi.__name__=["albero","entity","note","NoteId"],xi.__interfaces__=[Ut],xi.createDummyId=function(){var e,t=xi.nextDummyId,n=xi.nextDummyId;if(null==n)e=null;else{var i=new ni(0,1),r=n.high-i.high|0,a=n.low-i.low|0;if(xa.ucompare(n.low,i.low)<0){r--;r|=0}e=new ni(r,a)}return xi.nextDummyId=e,new xi(t)},xi.prototype={toString:function(){var e=this.value;return"_"+e.high+"_"+e.low},equals:function(e){if(null==e)return!1;var t=this.value,n=e.value;return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},getHtmlAttributeId:function(){return"note-"+this.toString()},isDummy:function(){return this.value.high<0},__class__:xi};var Ui=function(e,t,n,i,r,a){this.state=Pi.SENDING,this.talkId=e,this.noteId=t,this.title=n,this.text=i,this.fileInfos=r,this.emitterKey=a};n["albero.entity.note.NoteLocalEdit"]=Ui,Ui.__name__=["albero","entity","note","NoteLocalEdit"],Ui.prototype={hasEmitterKey:function(){return null!=this.emitterKey},getEmitterKey:function(){return this.emitterKey},setState:function(e){this.state=e},getTalkId:function(){return this.talkId},getNoteId:function(){return this.noteId},getTitle:function(){return this.title},getText:function(){return this.text},getContent:function(){switch(this.getContentType()[1]){case 0:return this.text;case 1:return{files:this.getUploadedFilesData(),text:null==this.text?"":this.text}}},getFileInfos:function(){return this.fileInfos},getState:function(){return this.state},isSending:function(){return this.state==Pi.SENDING},isFailed:function(){switch(this.state[1]){case 0:case 5:return!1;case 1:case 2:case 3:case 4:return!0}},isForCreate:function(){return this.noteId.isDummy()},canNotSend:function(){return 0!=this.getUnuploadedFileInfos().length},getContentType:function(){return this.fileInfos.length>0?Ri.FILES:Ri.TEXT},getUnuploadedFileInfos:function(){return this.fileInfos.filter(function(e){return e.isNotUploaded()})},getUploadedFilesData:function(){return this.fileInfos.map(function(e){return e.getUploadedFileData()}).filter(function(e){return null!=e})},createNoteRevisionSummary:function(e){var t=new Wi;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=O.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=Pi.FAILED_BY_CONFLICT},deleted:function(){this.state=Pi.FAILED_BY_NOT_FOUND},__class__:Ui};var Pi=n["albero.entity.note.NoteLocalEditState"]={__ename__:["albero","entity","note","NoteLocalEditState"],__constructs__:["SENDING","FAILED_BY_CONFLICT","FAILED_BY_NOT_FOUND","FAILED_BY_FILE","FAILED_BY_UNKNOWN","COMPLETED"]};Pi.SENDING=["SENDING",0],Pi.SENDING.toString=i,Pi.SENDING.__enum__=Pi,Pi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],Pi.FAILED_BY_CONFLICT.toString=i,Pi.FAILED_BY_CONFLICT.__enum__=Pi,Pi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Pi.FAILED_BY_NOT_FOUND.toString=i,Pi.FAILED_BY_NOT_FOUND.__enum__=Pi,Pi.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",3,e,t];return n.__enum__=Pi,n.toString=i,n},Pi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",4],Pi.FAILED_BY_UNKNOWN.toString=i,Pi.FAILED_BY_UNKNOWN.__enum__=Pi,Pi.COMPLETED=["COMPLETED",5],Pi.COMPLETED.toString=i,Pi.COMPLETED.__enum__=Pi,Pi.__empty_constructs__=[Pi.SENDING,Pi.FAILED_BY_CONFLICT,Pi.FAILED_BY_NOT_FOUND,Pi.FAILED_BY_UNKNOWN,Pi.COMPLETED];var Li=function(e){null!=e&&(this.noteId=new xi(e.note_id),this.revision=e.revision,this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLockEvent"]=Li,Li.__name__=["albero","entity","note","NoteLockEvent"],Li.prototype={__class__:Li};var Bi=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=Bi,Bi.__name__=["albero","entity","note","NoteLockExpiredAt"],Bi.prototype={fromNow:function(){var e=this.value,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)-(new Date).getTime()|0},calcRelockDelay:function(){return.9*this.fromNow()|0},__class__:Bi};var Hi=n["albero.entity.note.NoteLockStateValue"]={__ename__:["albero","entity","note","NoteLockStateValue"],__constructs__:["FAILED_BY_CONFLICT","FAILED_BY_LOCKED","FAILED_BY_NOT_FOUND","FAILED_BY_UNKNOWN","COMPLETED","RELEASED"]};Hi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],Hi.FAILED_BY_CONFLICT.toString=i,Hi.FAILED_BY_CONFLICT.__enum__=Hi,Hi.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=Hi,t.toString=i,t},Hi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Hi.FAILED_BY_NOT_FOUND.toString=i,Hi.FAILED_BY_NOT_FOUND.__enum__=Hi,Hi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],Hi.FAILED_BY_UNKNOWN.toString=i,Hi.FAILED_BY_UNKNOWN.__enum__=Hi,Hi.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=Hi,t.toString=i,t},Hi.RELEASED=["RELEASED",5],Hi.RELEASED.toString=i,Hi.RELEASED.__enum__=Hi,Hi.__empty_constructs__=[Hi.FAILED_BY_CONFLICT,Hi.FAILED_BY_NOT_FOUND,Hi.FAILED_BY_UNKNOWN,Hi.RELEASED];var ji=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=ji,ji.__name__=["albero","entity","note","NoteLockState"],ji.prototype={isCompleted:function(){return 4==this.value[1]},getExpiredAtOrNull:function(){var e=this.value;return 4==e[1]?e[2]:null},isLockedByOther:function(){return 1==this.value[1]},getLockedUser:function(){var e=this.value;return 1==e[1]?e[2]:null},__class__:ji};var Gi=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=Gi,Gi.__name__=["albero","entity","note","NoteLocked"],Gi.prototype={lock:function(e,t,n){this.expiredAt=n,this.deviceId=t,this.userId=e},unlock:function(e){var t=this.userId;null!=t&&null!=e&&t.high==e.high&&t.low==e.low&&(this.expiredAt=null,this.userId=null,this.deviceId=null)},getLockedUserIdWithoutSelf:function(e){var t,n=this.deviceId;if(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)return null;if(null!=this.expiredAt){var i=this.expiredAt,r=i.high,a=i.low;t=4294967296*r+(a>=0?a:a+4294967296)<=(new Date).getTime()}else t=!0;return t?null:this.userId},__class__:Gi};var Yi=function(e){null!=e&&(this.noteId=new xi(e.note_id),this.talkId=e.talk_id,this.setting=new Vi(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=Yi,Yi.__name__=["albero","entity","note","NotePartialUpdateForSetting"],Yi.prototype={__class__:Yi};var zi=function(e){null!=e&&(this.noteId=new xi(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new Wi(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=zi,zi.__name__=["albero","entity","note","NotePartialUpdateForSummary"],zi.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:zi};var Ki=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=Fi.createNoteContentType(e.content_type),this.contentType[1]){case 0:this.contentText=e.content;break;case 1:if(this.contentText=null==e.content.text?"":e.content.text,null!=e.content.files)for(var t=0,n=lo.__cast(e.content.files,Array);t=lr.HIRAGANA_SMALL_A&&o<=lr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(lr.KATAKANA_SMALL_A-lr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},lr.katakanaToRoman=function(e){return(new Zi).convert(e)},lr.normalize=function(e){return new ur(null).normalize(e)},lr.normalizeForFile=function(e){return new ur(null).normalizeForFile(e)},lr.asyncAssureNormalize=function(){return Promise.resolve()},lr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var ur=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=ur,ur.__name__=["albero","js","Normalizer"],ur.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof so&&(e=e.val),nr._e("["+u.dateStr(new Date)+"] ","invalid character:",e,"","",""),tr.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof so&&(e=e.val),nr._e("["+u.dateStr(new Date)+"] ","invalid character:",e,"","",""),tr.localize("TextCanonicalizer.invalid")}},__class__:ur};var cr=function(){};n["albero.js.WebSocket"]=cr,cr.__name__=["albero","js","WebSocket"],cr.prototype={__class__:cr};var _r=function(){};n["albero.js.WebSocketFactory"]=_r,_r.__name__=["albero","js","WebSocketFactory"],_r.newInstance=function(e,t){return new hr(e,t)};var hr=function(e,t){var n=this;this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong;var i=jo.wsConfig,r=require("websocket").client;this.ws=new r(i),this.ws.on("connectFailed",Mo(this,this.onError)),this.ws.on("connect",function(e){n.connection=e,e.on("error",Mo(n,n.onError)),e.on("close",Mo(n,n.onConnectionClose)),e.on("message",Mo(n,n.onMessage)),e.on("pong",Mo(n,n.onPong)),n.onOpen(null)});var a=null;null!=jo.proxyURL&&(a={agent:or.createAgent(jo.proxyURL)}),this.ws.connect(e,null,null,null,a)};n["albero.js.WebSocketForNodeJs"]=hr,hr.__name__=["albero","js","WebSocketForNodeJs"],hr.__interfaces__=[cr],hr.prototype={onOpen:function(e){nr._i("["+u.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryDataForHubot(e),this.onmessage(t)}},getBinaryDataForHubot:function(e){return Xa.ofData(e.binaryData)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){nr._e("["+u.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){this.removeAllEventListenersForHubot();var t="WebSocket closed. "+v.string(e.code)+" "+v.string(e.reason)+" "+v.string(e.wasClean);nr._i("["+u.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},removeAllEventListenersForHubot:function(){null!=this.ws&&(this.ws.removeAllListeners(),this.ws=null),null!=this.connection&&(this.connection.removeAllListeners(),this.connection=null)},onConnectionClose:function(e,t){this.onClose({code:e,reason:t})},close:function(){if(this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,!this.isClosed()){var e=this.connection;this.onConnectionClose(1e3,"Normal connection closure"),e.close()}},send:function(e){this.isClosed()||this.connection.sendBytes(new mo(e.b.bufferValue))},ping:function(e){this.connection.ping(e)},isClosed:function(){return null==this.ws||null==this.connection||!this.connection.connected},__class__:hr};var dr=function(){};n["puremvc.interfaces.IProxy"]=dr,dr.__name__=["puremvc","interfaces","IProxy"],dr.prototype={__class__:dr};var fr=function(){};n["albero.proxy.AccessTokenResolverProxy"]=fr,fr.__name__=["albero","proxy","AccessTokenResolverProxy"],fr.__interfaces__=[dr],fr.prototype={__class__:fr};var mr=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=mr,mr.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],mr.newInstance=function(){return new gr("accessTokenResolver")};var pr=function(e,t){q.call(this),this.proxyName=null!=e?e:pr.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=pr,pr.__name__=["puremvc","patterns","proxy","Proxy"],pr.__interfaces__=[dr],pr.__super__=q,pr.prototype=r(q.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:pr});var gr=function(e){pr.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJsHubot"]=gr,gr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJsHubot"],gr.__interfaces__=[fr],gr.__super__=pr,gr.prototype=r(pr.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=jo.account?jo.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__:gr});var vr=function(){};n["albero.proxy.AccountLoaderProxy"]=vr,vr.__name__=["albero","proxy","AccountLoaderProxy"],vr.__interfaces__=[dr],vr.prototype={__class__:vr};var yr=function(){};n["albero.proxy.AccountLoaderProxyFactory"]=yr,yr.__name__=["albero","proxy","AccountLoaderProxyFactory"],yr.newInstance=function(){var e=I.resolveClass("albero.debug.proxy.AccountLoaderProxyImpl");return null!=e?I.createInstance(e,["accountLoader"]):new Sr("accountLoader")};var Sr=function(e){pr.call(this,e)};n["albero.proxy.AccountLoaderProxyForHubot"]=Sr,Sr.__name__=["albero","proxy","AccountLoaderProxyForHubot"],Sr.__interfaces__=[vr],Sr.__super__=pr,Sr.prototype=r(pr.prototype,{load:function(){var e=this,t=require("read");return t({prompt:"Email: "},function(n,i){t({prompt:"Password: ",silent:!0},function(t,n){e.sendNotification("SignIn",new xe(i,n))})}),null},__class__:Sr});var wr=function(){pr.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=wr,wr.__name__=["albero","proxy","AlberoBroadcastProxy"],wr.__super__=pr,wr.prototype=r(pr.prototype,{handleNotification:function(e,t,n){var i=this;switch(nr._d("["+u.dateStr(new Date)+"] ","Receive request from server. name:",e," body:",t,""),e){case"notify_add_account_control_request":var r=new He(t);this.dataStore.setAccountControlRequest(r),this.sendNotification(e,r),n();break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1])),n();break;case"notify_add_acquaintances":for(var a=t[1].map(Mo(Co=this.dataFactory,Co.newAcquaintance)),o=0;ot.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){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t){var n=this.dataStore.getTalk(e.talkId);if(null==n)return void nr._e("["+u.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(t=new Vn).id=e.talkId,t.talkOrderingTimestamp=n.updatedAt}t.updateByTalkPushNotificationEvent(e)&&this.dataStore.setTalkStatus(t)},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new Vn).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);null==t&&((t=new Vn).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var t=this;if(!c.exists(e.readUserIds,function(e){var n=t.dataStore;if(null!=n.me){var i=n.me.id;return null!=i&&null!=e&&i.high==e.high&&i.low==e.low}return!1}))return null;var n=this.dataStore.getTalkStatus(e.talkId);return null==n?(nr._e("["+u.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(n.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(n),n)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new ze).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:wr});var Tr=function(){pr.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=Tr,Tr.__name__=["albero","proxy","AlberoServiceProxy"],Tr.__super__=pr,Tr.prototype=r(pr.prototype,{getOSString:function(){return"bot","bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",r=[l[1],l[0],t,s,o,""]):(i="create_access_token",r=[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){nr._d("["+u.dateStr(new Date)+"] ","access token:",e,"","",""),a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",Fe.FORWARD(G.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.callImmediately("authorize_device",[e,n],function(e){t()})},createSession:function(e,t){var n=this,i=[e,"1.119",this.getOSString()];this.apiCaller.onSessionClear(),this.apiCaller.callImmediatelyReliable("create_session",i,function(e){var i=new In(e),r=O.nowAsInt64();i.passwordExpiration.isExpired(r)?n.sendNotification("password_expiration_overed"):(i.passwordExpiration.needWarning(r,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(O.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),n.apiCaller.onSessionCreated(),t(i),n.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void n.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void n.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void n.sendNotification("Device",ie.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",Fe.FORWARD(G.error))},function(e){return n.shouldRetryCreateSession(e)?qa.Some(n.apiCaller.retryTimeForReplicationLag()):qa.None})},shouldRetryCreateSession:function(e){return 401==e.code&&"invalid token"==e.message},startNotification:function(){var e=this;this.apiCaller.call("start_notification",[],function(t){t||(e.dataStore.clear(!0),e.sendNotification("start_notification_failed"))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=t.length)){var r=t[n],a=e.id,o=this.dataFactory.newDummyMessage(a,r.type,r.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[a,Gt.enumIndex(r.type),r.content],function(r){var a=i.dataFactory.newMessage(r);i.sendNotification("create_message_complete",[a,o.id]),i.forwardMessages(e,t,n+1),i.fileInfoStore.removeMessageFileInfos(o.id),i.messageStore.removeMessage(o.id)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Vr.toLocalError(Bt.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.apiCaller.call("delete_message",[e,t],function(e){},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void n.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=Vr.toLocalError(Bt.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.apiCaller.callApiReliable("update_read_statuses",[e,t],function(i){var r,a=n.dataStore.getTalkStatus(e);if(null!=a){var o=a.maxReadMessageId;r=null!=o&&null!=t&&o.high==t.high&&o.low==t.low}else r=!1;r&&n.sendNotification("notify_update_local_talk_status",a)},null,function(e){return 429==e.code&&"too many requests"==e.message?qa.Some(1e3*n.asInt(e.detail.retry_after)):qa.None})},searchMessagesAroundDateTime:function(e,t){var n=this;return new Promise(function(i,r){n.apiCaller.call("search_messages_around_datetime",[e,t],function(e){var n=new li(t,e);i(n)},function(e){r(e)})})},upload:function(e,t,n,i){var r=this,a=gi.getBlobFromUpdatableFile(n);this.fileService.asyncCreateThumbnail(a).catch(function(e){return null}).then(function(e){return{file:n,thumb:e}}).then(function(n){r.uploadV2(e,t,n,i)})},uploadV2: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.file,n.thumb,e);o.then(function(e){r.createMessageReliable(t,Yt.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return nr._w("["+u.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMulti:function(e,t,n,i,r){var a=this,o=i.map(function(e){var t=gi.getBlobFromUpdatableFile(e);return a.fileService.asyncCreateThumbnail(t).catch(function(e){return null}).then(function(t){return{file:e,thumb:t}})});Promise.all(o).then(function(i){var o=i.map(function(e){return e});a.uploadMultiV2(e,t,n,o,r)})},uploadMultiV2:function(e,t,n,i,r){var a=this,o=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",o);for(var s=Promise.resolve([]),l=0;l0&&(s.text=n),a.createMessageReliable(t,Yt.textMultipleFile,s,o,r)}}),s.catch(function(e){a.sendNotification("create_message_fail",[e,o],r)})},uploadMultiForHubot:function(e,t,n,i){var r=this.dataStore.getTalk(e),a=n.map(function(e){return{file:e,thumb:null}});if(null==r){var o=this.dataFactory.newDummyMultipleFileMessage(e,t,a),s={code:400,message:"invalid talk_id (deleted talk)"};return nr._w("["+u.dateStr(new Date)+"] ","WARNING method: uploadMulti",s,"","",""),void this.sendNotification("create_message_fail",[s,o],i)}this.uploadMultiV2(r.domainId,r.id,t,a,i)},prepareMessageFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,$n.THUMBNAIL,function(n){t.setAuth(n),e(qa.Some(t))},function(t){e(qa.None)}):e(qa.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,$n.MESSAGE,function(n){var i=lr.normalizeForFile(e.name),a=M.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,$n.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(qa.Some(t))},function(t){e(qa.None)}):e(qa.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,$n.NOTE_ATTACHMENT,function(n){var i=lr.normalizeForFile(e.name),a=M.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},createMessageReliable:function(e,t,n,i,r){var a=this;this.apiCaller.callApiReliable("create_message",[e,Gt.enumIndex(t),n],function(e){a.fileInfoStore.removeMessageFileInfos(i.id),a.messageStore.removeMessage(i.id);var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,i.id],r)},function(e){if(a.sendNotification("create_message_fail",[e,i],r),null!=e&&409==e.code){var t=Vr.toLocalError(Bt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)},function(e){return a.shouldRetryCreateMessage(e)?qa.Some(a.apiCaller.retryTimeForReplicationLag()):qa.None})},shouldRetryCreateMessage:function(e){return null!=e.code&&(500==e.code?"Internal Error (IllegalStateException)"==e.message:400==e.code&&"invalid file_id"==e.message)},uploadFile:function(e,t,n,i,r){var a=this,o=e,s=lr.normalizeForFile(o.name),l=o.type,c=o.size,_=this.apiCaller,h=ei.getUseTypeInt(n);_.call("create_upload_auth",[s,l,c,t,h],function(t){a.fileService.upload(t,l,e).then(function(e){i(t)},function(e){var t="failed to upload: "+v.string(e);nr._e("["+u.dateStr(new Date)+"] ",t,"","","","");var i=new Wr({code:null,detail:null,message:e});if(n!=$n.THUMBNAIL&&n!=$n.NOTE_THUMBNAIL&&n!=$n.NOTE_ATTACHMENT){var o=Vr.toLocalError(Bt.GeneralFileError,i);a.sendNotification("error_occurred",o)}r(i)})},function(e){if(n!=$n.THUMBNAIL&&n!=$n.NOTE_THUMBNAIL&&n!=$n.NOTE_ATTACHMENT&&null!=e)if(502==e.code&&null!=e.detail){var t=x.fromIntOrInt64(e.detail.limit_max);if("file_size"==e.detail.limit_target){var i=Vr.toLocalError(Bt.UploadSizeOvered(t),e);a.sendNotification("error_occurred",i)}else if("storage_size"==e.detail.limit_target){var o=Vr.toLocalError(Bt.StorageSizeOvered(t),e);a.sendNotification("error_occurred",o)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){var a=this;this.apiCaller.callApiReliable("create_download_auth",[e,t,n],function(e){i(new Et(e))},function(e){r(e)},function(e){return 429==e.code&&"too many requests"==e.message?qa.Some(1e3*a.asInt(e.detail.retry_after)):qa.None})},deleteAttachment:function(e,t){this.apiCaller.call("delete_attachment",[e,t])},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.apiCaller.call("get_attachments",[e,20,t.sinceId,t.maxId],function(t){var i=t.map(Mo(Co=n.dataFactory,Co.newFileInfo));n.sendNotification("get_file_responsed",{talkId:e,files:i})})},createAnnouncement:function(e,t,n,i){var r=this;if(null!=e||null!=(e=this.settings.getSelectedDomainId())){var a=this.dataFactory.newDummyMessage(null,t,n);this.sendNotification("create_announcement_start",a),this.apiCaller.call("create_announcement",[e,Gt.enumIndex(t),n],function(e){var t=r.dataFactory.newAnnouncement(e);r.sendNotification("create_announcement_complete",[t,a.id],i)},function(e){r.sendNotification("create_announcement_fail",a),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();if(null!=r){e=null==e?{sinceId:null,maxId:null}:e;var a=this.apiCaller,o=e.sinceId,s=e.maxId,l=Qt.orderToInt(t);a.call("get_announcements",[r,20,o,s,l],function(e){var a=e.map(Mo(Co=i.dataFactory,Co.newAnnouncement));i.sendNotification("notify_get_announcements",{domainId:r,announcements:a,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i=0?s:1;(l>1||2==r.type&&0!=l)&&(r.user=t,this.sendNotification("notify_update_user",t))}else{var u={type:2,user:t};null!=Go[i]?e.setReserved(i,u):e.h[i]=u}this.storage.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new Ja);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=Go[n]?i.setReserved(n,e):i.h[n]=e},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=Go[t]?n.getReserved(t):n.h[t]},isDepartmentsChanged:function(e,t){return!x.eqArray(e.departments,t.departments)},setUsersIfLatest:function(e,t){var n=this.ensureDomainUserMap(e),i=Mo(this,this.setUserIfLatest),r=n;c.iter(t,function(e){i(r,e)})},clearDomainUsers:function(e){this.users.remove("_"+e.high+"_"+e.low)&&this.storage.setDirtyFlag()},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=Go[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new Qa(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storage.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=Go[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=Go[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storage.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n,i=new ni(0,0);if(t.high==i.high&&t.low==i.low)return null;if(null!=this.me){var r=this.me.id;n=null!=r&&null!=t&&r.high==t.high&&r.low==t.low}else n=!1;if(n)return this.me.toDomainUser(e);var a="_"+e.high+"_"+e.low,o=this.users,s=null!=Go[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=Go[l]?s.getReserved(l):s.h[l];if(null!=u)return u.user}return null},getUsers:function(e,t){var n=this,i=function(e,t){var i="_"+e.high+"_"+e.low,r=n.users,a=null!=Go[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new ni(0,0);if(t.high==i.high&&t.low==i.low)return null;var r=n.me.id;if(null!=r&&null!=t&&r.high==t.high&&r.low==t.low)return n.me.toDomainUser(e);var o="_"+t.high+"_"+t.low,s=null!=Go[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new Qa(a,s);l.hasNext();)o.push(l.next().user);return o}return[]};if(null!=e)return i(e,t);for(var r=this.domains,a=new Qa(r,r.arrayKeys()),o=null;a.hasNext();)o=null==o?i(a.next().id,t):o.concat(i(a.next().id,t));return null==o?[]:o},getTalk:function(e){var t="_"+e.high+"_"+e.low,n=this.talks;return null!=Go[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:c.find(this.getTalks(),function(i){if(!I.enumEq(i.type,Ln.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!c.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!c.exists(i.userIds,function(e){var t=n.me.id;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low}))})},setTalk:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.talks;if(null!=Go[n]?i.setReserved(n,e):i.h[n]=e,null!=e.leftUsers)for(var r=this.ensureDomainUserMap(e.domainId),a=0,o=e.leftUsers;a=0?f:1)>0}else _=!1;_&&(c.user=s,this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=Go[u]?r.setReserved(u,m):r.h[u]=m,this.sendNotification("notify_update_user",s)}}return this.storage.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=Go[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){c.iter(e,Mo(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=Go[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}if(null!=this.questions)for(var a=this.getQuestions(e),o=0;o=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=Go[i]?u.setReserved(i,e):u.h[i]=e,this.storage.setDirtyFlag(),e}return a},removeDomain:function(e){this.domains.remove("_"+e.high+"_"+e.low),this.storage.setDirtyFlag();for(var t=this.getTalks().filter(function(t){var n=t.domainId;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}),n=0;ne.version)return r;var a=this.accountControlRequests;return null!=Go[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 Ja,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=0?a:1)>=0}else i=!1;i&&this.removeKeywordDetection(e,t)}},removeKeywordDetection:function(e,t){if(null!=this.detectedDomainTalkIdStrings){var n=this.getKey(e,t);if(null!=n){this.detectedDomainTalkIdStrings.remove(n);var i=this.settings.getBrowserSettings().keywordWatchingEmphasis;this.sendNotification("keyword_detaction_updated",{domainId:e,talkId:t,detected:!1,emphasis:i})}}},removeKeywordDetectionAll:function(){if(null!=this.detectedDomainTalkIdStrings)for(var e=this.settings.getBrowserSettings().keywordWatchingEmphasis,t=this.detectedDomainTalkIdStrings.keys();t.hasNext();){var n=t.next();if(S.startsWith(n,"talk_")){var i=n.substring("talk_".length),r=x.makeFromIdStr(i);this.sendNotification("keyword_detaction_updated",{domainId:null,talkId:r,detected:!1,emphasis:e})}else if(S.startsWith(n,"announcement_")){var a=n.substring("announcement_".length),o=x.makeFromIdStr(a);this.sendNotification("keyword_detaction_updated",{domainId:o,talkId:null,detected:!1,emphasis:e})}this.detectedDomainTalkIdStrings.remove(n)}},getDetectId:function(e,t){if(null==this.detectedDomainTalkIdStrings)return null;var n=this.getKey(e,t);if(null==n)return null;var i=this.detectedDomainTalkIdStrings;return null!=Go[n]?i.getReserved(n):i.h[n]},hasKeywordDetection:function(e,t){return null!=this.getDetectId(e,t)},getKey:function(e,t){return null==e&&null==t?null:null!=t?"talk__"+t.high+"_"+t.low:"announcement__"+e.high+"_"+e.low},__class__:xr});var Ur=function(){};n["albero.proxy.KeywordParser"]=Ur,Ur.__name__=["albero","proxy","KeywordParser"],Ur.parse=function(e){var t=S.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return Ur.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(j.isNotEmpty).map(Ur.decodeSpace).map(Ur.createParsedKeyword)},Ur.encodeSpace=function(e){return S.replace(S.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},Ur.decodeSpace=function(e){return S.replace(S.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},Ur.createParsedKeyword=function(e){var t=new o("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=Br.getKeywordTypeByMessageTypeString(n);if(r!=Lr.normal)return new Pr(r,i)}return new Pr(Lr.normal,e)};var Pr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=Pr,Pr.__name__=["albero","proxy","ParsedKeyword"],Pr.prototype={__class__:Pr};var Lr=n["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Lr.normal=["normal",0],Lr.normal.toString=i,Lr.normal.__enum__=Lr,Lr.selectOneReplyOnly=["selectOneReplyOnly",1],Lr.selectOneReplyOnly.toString=i,Lr.selectOneReplyOnly.__enum__=Lr,Lr.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Lr.yesOrNoReplyOnly.toString=i,Lr.yesOrNoReplyOnly.__enum__=Lr,Lr.todoDoneOnly=["todoDoneOnly",3],Lr.todoDoneOnly.toString=i,Lr.todoDoneOnly.__enum__=Lr,Lr.__empty_constructs__=[Lr.normal,Lr.selectOneReplyOnly,Lr.yesOrNoReplyOnly,Lr.todoDoneOnly];var Br=function(){};n["albero.proxy.KeywordTypeHelper"]=Br,Br.__name__=["albero","proxy","KeywordTypeHelper"],Br.getKeywordType=function(e){return null!=e?Br.getKeywordTypeByMessageTypeString(Gt.typeString(e)):Lr.normal},Br.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Lr.selectOneReplyOnly;case"todoDone":return Lr.todoDoneOnly;case"yesOrNoReply":return Lr.yesOrNoReplyOnly}return Lr.normal},Br.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==Yt.selectOneReply;case 2:return e==Yt.yesOrNoReply;case 3:return e==Yt.todoDone}},Br.createFilterClassStringFromMessageType=function(e){return Br.createFilterClassString(Br.getKeywordType(e))},Br.createFilterClassString=function(e){return"keyword_type_"+v.string(e)};var Hr=function(){pr.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=Hr,Hr.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],Hr.__super__=pr,Hr.prototype=r(pr.prototype,{startPolling:function(e){if(null==this.pollingTimer){var t,n=this.getLastUsedExpiredAt();if(null==n)t=0;else{var i=n.high,r=n.low;t=4294967296*i+(r>=0?r:r+4294967296)-(new Date).getTime()|0}if(t<=0)e(),this.pollingTimer=new Ba(6e5),this.pollingTimer.run=e;else{var a=Mo(this,this.startPolling),o=e;Ba.delay(function(){a(o)},t)}}},stopPolling:function(){null!=this.pollingTimer&&(this.pollingTimer.stop(),this.pollingTimer=null)},getLastUsedExpiredAt:function(){return null!=this.lastUsedExpiredAtCache?this.lastUsedExpiredAtCache:this.settings.getLastUsedExpiredAt()},update:function(){this.lastUsedExpiredAtCache=O.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache)},__class__:Hr});var jr=function(){pr.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=jr,jr.__name__=["albero","proxy","LimitationsProxy"],jr.__super__=pr,jr.prototype=r(pr.prototype,{getMaxTalkers:function(){var e=this,t=B.flatMap(B.flatMap(B.option(this.settings.getSelectedDomainId()),function(t){return B.option(e.dataStore.getDomain(t))}),function(e){return e.getMaxTalkers()});switch(t[1]){case 0:return t[2];case 1:return this.settings.getConfiguration().maxTalkers}},__class__:jr});var Gr=function(){pr.call(this,"messageStore")};n["albero.proxy.MessageStoreProxy"]=Gr,Gr.__name__=["albero","proxy","MessageStoreProxy"],Gr.__super__=pr,Gr.prototype=r(pr.prototype,{onRegister:function(){this.messages=new Ja},getMessage:function(e){if(null==e)return qa.None;var t="_"+e.high+"_"+e.low,n=this.messages;return B.option(null!=Go[t]?n.getReserved(t):n.h[t])},setMessage:function(e){},removeMessage:function(e){this.messages.remove("_"+e.high+"_"+e.low)},onFileDeleted:function(e){B.foreach(this.getMessage(e.messageId),function(t){t.deleteFile(e)})},onConferenceClose:function(e){B.foreach(this.getMessage(e.messageId),function(e){e.close()})},onActionStampClose:function(e){B.foreach(this.getMessage(e),function(e){e.close()})},onDeleteFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());B.foreach(t,function(t){t.updateFavorite(e)})},onAddFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());B.foreach(t,function(t){t.updateFavorite(e)}),B.isEmpty(t)&&this.setMessage(e.getMessage())},__class__:Gr});var Yr=function(){this.connectionStatus=D.Ok,pr.call(this,"rpc"),this.responseHandlers=new Wa,this.connectionKeeper=new zr(Mo(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=Yr,Yr.__name__=["albero","proxy","MsgPackRpcProxy"],Yr.__super__=pr,Yr.prototype=r(pr.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=_r.newInstance(jo.endpoint,{onopen:Mo(this,this.onOpen),onmessage:Mo(this,this.onMessage),onclose:Mo(this,this.onClose),onpong:Mo(this,this.onPong)}),Yr.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.close();var e=this.ws;return this.ws=null,Yr.pingAt=null,this.lastUsedAtUpdater.stopPolling(),e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=D.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Yr.pingAt=null;var t="PONG "+v.string(e);nr._d("["+u.dateStr(new Date)+"] ",t,"","","","")},onMessage:function(e){var t=this,n=new po(e,!0).o,i=lo.__cast(n[0],xo);if(1==i&&4==n.length){var r=lo.__cast(n[1],xo),a=n[2],o=n[3],s=this.responseHandlers.h[r];if(null==s)return void nr._e("["+u.dateStr(new Date)+"] ","No ResponseHandler prepared. msgId:%s error:%s result:",r,a,o,"");var l=s.method;if(nr._d("["+u.dateStr(new Date)+"] ","response received. method:",l," data:",n,""),null==a)s.onSuccess(o);else{var c=s.method;nr._e("["+u.dateStr(new Date)+"] ","Receive Error Response. method:",c," error:",a,""),s.onError(a)}this.responseHandlers.remove(r)}else if(0==i&&4==n.length){var _=lo.__cast(n[1],xo),h=lo.__cast(n[2],String),d=lo.__cast(n[3],Array);if(nr._d("["+u.dateStr(new Date)+"] ","request received. method:",h,"","",""),0==d.length)return void nr._e("["+u.dateStr(new Date)+"] ","empty params.","","","","");this.broadcast.handleNotification(h,d[0],function(){null!=t.ws?(nr._d("["+u.dateStr(new Date)+"] ","response sent. method:",h,"","",""),t.ws.send(new go([1,_,null,!0]).o.getBytes())):nr._e("["+u.dateStr(new Date)+"] ","websocket was finished.","","","","")})}},onClose:function(e,t,n){nr._i("["+u.dateStr(new Date)+"] ","onClose. code:"+e+", reason:"+t+", wasClean:"+(null==n?"null":""+n),"","","",""),1001==e&&n||(this.connectionStatus=1e3!=e&&1005!=e||"concurrent access"!=t?1e3!=e&&1005!=e||"forcibly closed"!=t?D.Error:D.ForcibliyClosedError:D.ConcurrentAccessError,this.connectionStatus==D.ForcibliyClosedError?this.sendNotification("SignOut"):this.sendNotification("Url",Fe.FORWARD(G.error))),this.finishWebSocket(),this.connectionKeeper.setConnected(!1)},restart:function(e){null==e&&(e=500);for(var t=this,n=this.finishWebSocket(),i=this.responseHandlers.keys();i.hasNext();){var r=i.next();this.responseHandlers.remove(r)}var a=null;a=function(){null==n||n.isClosed()?t.initWebSocket():Ba.delay(a,100)},Ba.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=Mo(this,this.onServerError));var r=Yr.lastMsgId++,a=this.responseHandlers,o=new Kr(e,n,i);a.h[r]=o;var s=[0,r,e,t],l=new go(s).o.getBytes();this.ws.send(l),nr._d("["+u.dateStr(new Date)+"] ","send request. data:",s,"","","")}else{var c=this.data;nr._e("["+u.dateStr(new Date)+"] ","disconnected. data:",c,"","","")}},ping:function(){switch(this.connectionStatus[1]){case 2:case 3:return}if(null==this.ws||this.ws.isClosed()){this.restart();var e="restart connection. "+Yr.pingAt+" "+v.string(null==this.ws||this.ws.isClosed());nr._d("["+u.dateStr(new Date)+"] ",e,"","","","")}else if(Yr.pingAt>0){this.restart();var t="restart connection. "+Yr.pingAt+" "+v.string(null==this.ws||this.ws.isClosed());nr._d("["+u.dateStr(new Date)+"] ",t,"","","","")}else{var n="before pingAt "+Yr.pingAt;nr._d("["+u.dateStr(new Date)+"] ",n,"","","",""),this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Yr.pingAt=(new Date).getTime(),nr._d("["+u.dateStr(new Date)+"] ","send ping","","","",""))}},onServerError:function(e){if(this.sendNotification("error_occurred",e),503==e.code&&"service temporarily unavailable"==e.message){var t=e.detail.retry_after;this.restart(1e3*t)}"invalid session"==e.message&&this.restart()},__class__:Yr});var zr=function(e){this.connected=!1,this.ping=e};n["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=zr,zr.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],zr.prototype={start:function(){},stop:function(){this.deleteTimer()},setConnected:function(e){this.connected==e&&null!=this.timer||(this.connected=e,this.resetTimer())},isConnected:function(){return this.connected},resetTimer:function(){var e=this;if(this.deleteTimer(),this.connected)this.timer=new Ba(45e3),this.timer.run=this.ping;else{var t=null;(t=function(n){var i=0|Math.min(2*n,45e3);return function(){e.ping();var r=t(i);e.timer=Ba.delay(r,n)}})(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:zr};var Kr=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};n["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=Kr,Kr.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],Kr.prototype={__class__:Kr};var Wr=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};n["albero.proxy.Error"]=Wr,Wr.__name__=["albero","proxy","Error"],Wr.prototype={__class__:Wr};var Vr=function(){};n["albero.proxy.ErrorConverter"]=Vr,Vr.__name__=["albero","proxy","ErrorConverter"],Vr.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var qr=function(){pr.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new Ja,this.updateReadAnnouncementStatusesTimers=new Ja};n["albero.proxy.ReadStatusUpdaterProxy"]=qr,qr.__name__=["albero","proxy","ReadStatusUpdaterProxy"],qr.__super__=pr,qr.prototype=r(pr.prototype,{updateReadStatuses:function(e,t){var n=this,i=this.dataStore.getTalkStatus(e);if(null!=i&&i.updateByReadingMessages(t,this.dataStore.me.id)){this.dataStore.setTalkStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadStatusesTimers,o=null!=Go[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=Ba.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=Go[r]?u.setReserved(r,l):u.h[r]=l}},updateAnnouncementReadStatus:function(e,t){var n=this,i=this.dataStore.getAnnouncementStatus(e);if(null!=i&&i.updateByReadingAnnouncements(t)){this.dataStore.setAnnouncementStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadAnnouncementStatusesTimers,o=null!=Go[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=Ba.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=Go[r]?l.setReserved(r,o):l.h[r]=o}},__class__:qr});var Qr=function(){pr.call(this,"routing")};n["albero.proxy.RoutingProxy"]=Qr,Qr.__name__=["albero","proxy","RoutingProxy"],Qr.__super__=pr,Qr.prototype=r(pr.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new Jr(this,this.settings,this.dataStore),this.sendNotification("first_routing_will_start"))},forward:function(e){this.init(),this.router.forward(e)},redirect:function(e,t){this.init(),this.router.redirect(e,t)},back:function(){null!=this.router&&this.router.back()},stop:function(){null!=this.router&&this.router.stop()},__class__:Qr});var Jr=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.urlConverterDelegate=new Xr(t,n)};n["albero.proxy._RoutingProxy.LocalRouter"]=Jr,Jr.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],Jr.prototype={notify:function(e){var t=this.getDomainId(e);this.settings.setSelectedDomainId(t),this.proxy.sendNotification("current_page_changed",e)},forward:function(e){0!=e[1]&&this.notify(e)},redirect:function(e,t){},redirectWithHash:function(){},back:function(){this.notify(this.prev)},stop:function(){},getDomainId:function(e){switch(e[1]){case 2:return e[2];case 3:return e[2];case 4:return e[2];case 5:return e[2];case 6:return e[2];case 7:return e[2];case 11:return e[2];default:return null}},parseFragment:function(e){return K.createUrls(e,this.urlConverterDelegate)},toFragment:function(e){return K.createFragment(e,this.urlConverterDelegate)},__class__:Jr};var Xr=function(e,t){this.settings=e,this.dataStore=t};n["albero.proxy.UrlConverterDelegate"]=Xr,Xr.__name__=["albero","proxy","UrlConverterDelegate"],Xr.__interfaces__=[W],Xr.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return B.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(B.flatMap(this.getLastSelectedDomainId(),Mo(this,this.getDomain))[1]){case 0:e=B.flatMap(this.getLastSelectedDomainId(),Mo(this,this.getDomain));break;case 1:e=this.getOldestDomain()}return B.map(e,function(e){return e.id})},getDomain:function(e){return B.option(this.dataStore.getDomain(e))},getOldestDomain:function(){return new It(this.dataStore.getDomains()).getOldestDomain()},__class__:Xr};var Zr=function(){pr.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=Zr,Zr.__name__=["albero","proxy","SearchServiceProxy"],Zr.__super__=pr,Zr.prototype=r(pr.prototype,{isSearching:function(){return this.searching},clearSearching:function(){this.searching=!1},isRecentParams:function(e){return null!=this.recentParams&&null!=e&&this.recentParams.eq(e)},clearRecentParams:function(){this.recentParams=null},clearEditingParams:function(){this.editingParams=null},saveParams:function(e){this.editingParams=e,this.recentParams=e.copy()},updateTalkIdParam:function(e){this.assureParams(),this.editingParams.talkId=e},updateSearchTypeParam:function(e){this.assureParams(),this.editingParams.searchType=e},updateFromUserIdParam:function(e){this.assureParams(),this.editingParams.fromUserId=e},updateKeywordParam:function(e){this.assureParams(),this.editingParams.keyword=e},updateDomainIdParam:function(e){this.assureParams(),this.editingParams.domainId=e},updateSinceTextParam:function(e){this.assureParams(),this.editingParams.sinceText=e},updateUntilTextParam:function(e){this.assureParams(),this.editingParams.untilText=e},assureParams:function(){if(null==this.editingParams){var e=this.settings.getSelectedDomainId(),t={domain_id_str:"_"+e.high+"_"+e.low};this.editingParams=new vn(t)}},prepareForSearching:function(e,t){this.searching=!0,null==t&&this.sendNotification("notify_search_prepare",{searching:!0,params:e})},notifySearchMessagesFail:function(){this.searching=!1,this.sendNotification("notify_search_messages_fail",{})},notifySearchAttachmentsFail:function(){this.searching=!1,this.sendNotification("notify_search_attachments_fail",{})},saveSearchMessagesResult:function(e){null==this.contextMap&&(this.contextMap=new Ja),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new Ja);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(function(){(n+=1)==t.length&&i()}):i();var r=0,a=function(){2==(r+=1)&&e.api.getTalks(i)};e.api.getFriends(a),e.api.getAcquaintances(a)}),e.api.getAccountControlRequests(function(){e.api.getDomainInvites(i)}),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=P.sortAndReturn(this.dataStore.getDomains(),function(e,t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:xa.ucompare(n.low,i.low),n.high<0?i.high<0?r:-1:i.high>=0?r:1});this.api.sendDomainNotifications(e);for(var t=0;tr[o])return!0;if(a[o]2?n=new ni(v.parseInt(i[1]),v.parseInt(i[2])):n=null;var r=this.userObjectsByIds(e,[n]);return r.length>0?r[0]:null},userObjectsByIds:function(e,t,n){for(var i=[],r=0,a=this.dataStore.getUsers(e,t);r=0?_:1)<=0}else o=!0;o&&(t[l]=this.userObject(a),null!=Go[l]?n.setReserved(l,a):n.h[l]=a)}return t},talkObject:function(e,t){var n=this.userObjectsByIds(e.domainId,e.userIds,t),i=this.domainObjectById(e.domainId,t);return ga.create(e,n,i).toCompatibleData()},talkObjects:function(e){for(var t=new Ja,n={},i=0,r=this.dataStore.getTalks();i0?i[0]:null;var u=e.userId;r.userId="_"+u.high+"_"+u.low,r.talk=this.talkObject(n,t);var c=e.talkId;return r.talkId="_"+c.high+"_"+c.low,r},__class__:Na});var Ea=function(){pr.call(this,"messageEvent"),this.emitters=new Ja};n["albero_cli.proxy.MessageEventProxy"]=Ea,Ea.__name__=["albero_cli","proxy","MessageEventProxy"],Ea.__super__=pr,Ea.prototype=r(pr.prototype,{registEmitter:function(e,t){Aa.factory=this;var n=Aa.createInstance(t);if(null!=n){var i=this.emitters;null!=Go[e]?i.setReserved(e,n):i.h[e]=n}},noteCreated:function(e,t){var n=this.emitters,i=null!=Go[t]?n.getReserved(t):n.h[t];if(null!=i&&(this.emitters.remove(t),null!=e)){var r=e.noteId.toString(),a=this.emitters;null!=Go[r]?a.setReserved(r,i):a.h[r]=i,i.talk=this.dataStore.getTalk(e.talkId),i.setFirstReader(this.dataStore.me),i.onceOnSend(e),i.hasEventListener()||this.emitters.remove(r)}},messageCreated:function(e,t){var n=this.emitters,i=null!=Go[t]?n.getReserved(t):n.h[t];if(null!=i&&(this.emitters.remove(t),null!=e)){var r=e.id,a="_"+r.high+"_"+r.low,o=this.emitters;if(null!=Go[a]?o.setReserved(a,i):o.h[a]=i,i.talk=this.dataStore.getTalk(e.talkId),i.setFirstReader(this.dataStore.me),i.emitOnSend(e),i.removeEventListener("send"),!i.hasEventListener()){var s=e.id;this.emitters.remove("_"+s.high+"_"+s.low)}}},messageRead:function(e,t,n,i){var r=this,a="_"+t.high+"_"+t.low,o=this.emitters,s=null!=Go[a]?o.getReserved(a):o.h[a];if(null!=s){s.emitOnRead(n,i);var l=s.__readerIds.length>=16;s.startTimer(l,function(n){n?r.messageReadEveryone(e,t):r.sendNotification("Read",ve.READ_STATUS(e,t))}),0==s.__unreadIds.length&&this.messageReadEveryone(e,t)}},messageReadEveryone:function(e,t){if(null!=t)for(var n=this.emitters.keys();n.hasNext();){var i,r=n.next(),a=this.emitters,o=null!=Go[r]?a.getReserved(r):a.h[r];if(null!=o.talk){var s=o.talk.id;i=null!=s&&null!=e&&s.high==e.high&&s.low==e.low}else i=!1;if(i){var l=x.makeFromIdStr(r),u=l.high-t.high|0;u=0!=u?u:xa.ucompare(l.low,t.low),(l.high<0?t.high<0?u:-1:t.high>=0?u:1)<=0&&this._messageReadEveryone(e,r)}}},_messageReadEveryone:function(e,t){var n=this.emitters,i=null!=Go[t]?n.getReserved(t):n.h[t];null!=i&&(i.__unreadIds.length>0&&i.emitOnRead(i.__unreadIds),i.stopTimer(),i.removeEventListener("read"),i.hasEventListener()||this.emitters.remove(t))},deleteTalk:function(e){for(var t=this.emitters.keys();t.hasNext();){var n,i=t.next(),r=this.emitters,a=null!=Go[i]?r.getReserved(i):r.h[i];if(null!=a.talk){var o=a.talk.id;n=null!=o&&null!=e&&o.high==e.high&&o.low==e.low}else n=!1;n&&(a.stopTimer(),this.emitters.remove(i))}},leaveDomain:function(e){for(var t=this.emitters.keys();t.hasNext();){var n,i=t.next(),r=this.emitters,a=null!=Go[i]?r.getReserved(i):r.h[i];if(null!=a.talk){var o=a.talk.domainId;n=null!=o&&null!=e&&o.high==e.high&&o.low==e.low}else n=!1;n&&(a.stopTimer(),this.emitters.remove(i))}},__class__:Ea});var Aa=function(e){this.context=e,this.listeners=new Ja,Object.defineProperty(this,"readUsers",{get:this.get_readUsers}),Object.defineProperty(this,"unreadUsers",{get:this.get_unreadUsers})};n["albero_cli.proxy.Emitter"]=Aa,Aa.__name__=["albero_cli","proxy","Emitter"],Aa.createInstance=function(e){for(var t=null,n=g.fields(e),i=0;i0&&this.emit("read",[this.users(n),this.get_readUsers(),this.get_unreadUsers()])},setFirstReader:function(e){this.__readerIds=[e.id],this.__unreadIds=this.talk.userIds.slice(),x.remove(this.__unreadIds,e.id)},get_readUsers:function(){return this.users(this.__readerIds)},get_unreadUsers:function(){return this.users(this.__unreadIds)},users:function(e){return null==e?[]:Aa.factory.hubotObject.userObjectsByIds(this.talk.domainId,e)},createNoteObjectForHubot:function(e){return Aa.factory.hubotObject.noteObject(e)},get_message:function(e){return Aa.factory.hubotObject.messageObject(e)},answer:function(e){var t,n=this,i=Gt.typeOf(this.message.type),r=this.message.id.split("_");r.length>2?t=new ni(v.parseInt(r[1]),v.parseInt(r[2])):t=null;switch(i[1]){case 14:case 16:case 18:case 19:case 20:case 21:var a=this.message.content.in_reply_to;t=new ni(a.high,a.low)}var o=Se.Question(t,function(t){var r=t.responses;switch(i[1]){case 13:case 14:case 19:var a=n.users(r[0].userIds),o=n.users(r[1].userIds);e(a,o);break;case 17:case 18:case 21:var s=n.users(r[0].userIds),l=n.users(r[1].userIds);e(s,l);break;case 15:case 16:case 20:var u=r.map(function(e){return n.users(e.userIds)});e(u)}});Aa.factory.sendNotification("ReloadData",o)},startTimer:function(e,t){var n=this;null!=this.__readerTimer&&this.stopTimer(),this.__readerTimerWait=e?1:1440;var i=null;i=function(){n.__readerTimerWait*=2,n.__readerTimerWait<1440?(t(!1),n.__readerTimer=Ba.delay(i,60*n.__readerTimerWait*1e3|0)):(t(!0),n.__readerTimer=null)},this.__readerTimer=Ba.delay(i,60*this.__readerTimerWait*1e3|0)},stopTimer:function(){null!=this.__readerTimer&&(this.__readerTimer.stop(),this.__readerTimer=null)},__class__:Aa};var ba=function(){pr.call(this,"sendQueue"),this.sendCount=0,this.sendMsgQueue=new Da(this,550,new er("sendQueueMessage")),this.sendAnnounceQueue=new Da(this,5050,new er("sendQueueAnnounce"))};n["albero_cli.proxy.SendQueueProxy"]=ba,ba.__name__=["albero_cli","proxy","SendQueueProxy"],ba.__super__=pr,ba.prototype=r(pr.prototype,{restart:function(){this.sendMsgQueue.sendNext(),this.sendAnnounceQueue.sendNext()},retryAfter:function(e){this.sendMsgQueue.retryAfter(e),this.sendAnnounceQueue.retryAfter(e)},sendNextTalkMessage:function(){this.sendMsgQueue.sendNext()},sendNext:function(e){null!=e.talkId?this.sendMsgQueue.sendNext():this.sendAnnounceQueue.sendNext()},sendAnnouncement:function(e,t){this.send(e,null,t)},sendMessage:function(e,t){this.send(null,e,t)},send:function(e,t,n){if("string"!=typeof n){var i=new ni(0,this.sendCount++);this.messageEvent.registEmitter("_"+i.high+"_"+i.low,n);var r=new Gt;if(r.id=i,r.domainId=e,r.talkId=t,r.content=this.parseContent(n),r.type=this.detectType(r.content),r.type==Yt.unknown)return;if(r.type==Yt.file&&null!=r.content.path)return void this.sendFile(t,r.content,"_"+i.high+"_"+i.low);if(r.type==Yt.noteCreated)return void this.sendNote(t,r.content,"_"+i.high+"_"+i.low);r.type!=Yt.yesOrNo&&r.type!=Yt.selectOne||null!=r.content.listing||(r.content.listing=!1),this.applyLimitToMessage(r),this.pushQueue(r)}else for(var a=0,o=w.slice(n,1024);a2)a=new ni(v.parseInt(o[1]),v.parseInt(o[2]));else a=null}else if("close_yesno"==i||"close_select"==i||"close_task"==i){e.close=u.substr(i,6,null),i="in_reply_to";var s=r.split("_");if(s.length>2)a=new ni(v.parseInt(s[1]),v.parseInt(s[2]));else a=null}null!=a&&(e[i]=a)}else if(null!=r&&g.isObject(e)&&null!=r.high&&null!=r.low){var l=new ni(r.high,r.low);e[i]=l}}return 1==t.length&&null!=e.text?e.text:e},detectType:function(e){if(null==e)return Yt.unknown;if("string"==typeof e)return Yt.text;if(null!=e.stamp_set)return Yt.stamp;if(null!=e.lat)return Yt.geo;if(null!=e.file_id||null!=e.path)return Yt.file;if(null!=e.close){var t=e.close;if(g.deleteField(e,"close"),"yesno"==t)return Yt.yesOrNoClosed;if("select"==t)return Yt.selectOneClosed;if("task"==t)return Yt.todoClosed}else if(null!=e.in_reply_to){if("boolean"==typeof e.response)return Yt.yesOrNoReply;var n=e.response;if("number"==typeof n&&(0|n)===n)return Yt.selectOneReply;if(null!=e.done)return Yt.todoDone}else{if(null!=e.question)return null==e.options?Yt.yesOrNo:Yt.selectOne;if(null!=e.title)return Yt.todo;if(null!=e.note_title)return Yt.noteCreated}return Yt.unknown},applyLimitToMessage:function(e){switch(e.type[1]){case 1:var t=e.content;null!=t&&t.length>1024&&(e.content=t.substring(0,1024));break;case 2:case 5:var n=e.content.text;null!=n&&n.length>1024&&(e.content.text=n.substring(0,1024));break;case 13:case 15:var i=e.content.question;if(null!=i&&i.length>1024&&(e.content.question=i.substring(0,1024)),e.type==Yt.selectOne){var r=e.content.options;r.length>9&&(r=r.slice(0,9),e.content.options=r);for(var a=0,o=r.length;a64&&(r[s]=r[s].substring(0,64))}}break;case 17:var l=e.content.title;null!=l&&l.length>1024&&(e.content.title=l.substring(0,1024))}},__class__:ba});var Da=function(e,t,n){this.proxy=e,this.sendSpan=t,this.storage=n,this.sendQueue=this.loadQueue(),this.sending=this.sendQueue.length>0,this.lastSendNode=null,this.lastSendTime=new Date(0)};n["albero_cli.proxy._SendQueueProxy.SendQueue"]=Da,Da.__name__=["albero_cli","proxy","_SendQueueProxy","SendQueue"],Da.prototype={pushQueue:function(e,t){this.sendQueue.push({name:e,param:t}),this.saveQueue(),this.sending||(this.sending=!0,this.sendNext())},sendNext:function(){if(this.sending&&0!=this.sendQueue.length){var e=(new Date).getTime()-this.lastSendTime.getTime(),t=0|Math.max(this.sendSpan-e,100);Ba.delay(Mo(this,this.sendNotification),t)}else this.closeQueue()},retryAfter:function(e){this.sending&&null!=this.lastSendNode?(this.sendQueue.unshift(this.lastSendNode),this.saveQueue(),Ba.delay(Mo(this,this.sendNotification),e)):this.closeQueue()},sendNotification:function(){var e=this.sendQueue.shift();this.saveQueue(),this.proxy.sendNotification(e.name,e.param),this.lastSendNode=e,this.lastSendTime=new Date},closeQueue:function(){this.sending=!1,this.lastSendNode=null},saveQueue:function(){null!=this.storage&&this.storage.save(this.sendQueue)},loadQueue:function(){if(null!=this.storage){var e=this.storage.load();if(null!=e)return e}return[]},__class__:Da};var ka=function(e,t,n){this.code=e,this.message=t,this.detail=n};n["albero_cli.value.ApiErrorResponse"]=ka,ka.__name__=["albero_cli","value","ApiErrorResponse"],ka.of=function(e){switch(e.code){case 400:if("invalid parameter"==e.message)return new ka(Ca.INVALID_PARAMETER);break;case 403:if("forbidden"==e.message)return new ka(Ca.FORBIDDEN);break;case 404:if("not found"==e.message)return new ka(Ca.NOT_FOUND);break;case 409:switch(e.message){case"conflict":return new ka(Ca.CONFLICT);case"locked by another user":return new ka(Ca.LOCKED_BY_ANOTHER_USER,null,{userId:e.detail.user_id})}break;case 429:return ka.createTooManyRequestsError(e.message,e.detail.retry_after)}var t="please contact us: error = "+v.string(e);return nr._w("["+u.dateStr(new Date)+"] ",t,"","","",""),new ka(Ca.UNKNOWN)},ka.createInvalidParameterError=function(e){return new ka(Ca.INVALID_PARAMETER,e)},ka.createTooManyRequestsError=function(e,t){return new ka(Ca.TOO_MANY_REQUESTS,e,{retryAfter:t})},ka.prototype={__class__:ka};var Ca=function(){};n["albero_cli.value.ApiErrorCode"]=Ca,Ca.__name__=["albero_cli","value","ApiErrorCode"];var Oa=function(){};n["albero_cli.value.note.DeleteNoteResult"]=Oa,Oa.__name__=["albero_cli","value","note","DeleteNoteResult"],Oa.of=function(e){return new Oa},Oa.prototype={__class__:Oa};var Ma=function(e){this.note=e};n["albero_cli.value.note.GetNoteResult"]=Ma,Ma.__name__=["albero_cli","value","note","GetNoteResult"],Ma.of=function(e){return new Ma(va.of(e.note))},Ma.prototype={__class__:Ma};var Ra=function(e){this.note=e};n["albero_cli.value.note.UpdateNoteResult"]=Ra,Ra.__name__=["albero_cli","value","note","UpdateNoteResult"],Ra.of=function(e){return new Ra(va.of(e.note))},Ra.prototype={__class__:Ra};var Fa=function(){};n["haxe.IMap"]=Fa,Fa.__name__=["haxe","IMap"],Fa.prototype={__class__:Fa};var xa={};n["haxe._Int32.Int32_Impl_"]=xa,xa.__name__=["haxe","_Int32","Int32_Impl_"],xa.ucompare=function(e,t){return e<0?t<0?~t-~e|0:1:t<0?-1:e-t|0};var Ua={};n["haxe._Int64.Int64_Impl_"]=Ua,Ua.__name__=["haxe","_Int64","Int64_Impl_"],Ua.toString=function(e){var t=e,n=new ni(0,0);if(t.high==n.high&&t.low==n.low)return"0";var i="",r=!1;t.high<0&&(r=!0);for(var a=new ni(0,10);;){var o=new ni(0,0);if(t.high==o.high&&t.low==o.low)break;var s=Ua.divMod(t,a);if(s.modulus.high<0){var l=s.modulus,u=~l.high,c=-l.low;if(0==c){u++;u|=0}i=new ni(u,c).low+i;var _=s.quotient,h=~_.high,d=-_.low;if(0==d){h++;h|=0}t=new ni(h,d)}else i=s.modulus.low+i,t=s.quotient}return r&&(i="-"+i),i},Ua.divMod=function(e,t){if(0==t.high)switch(t.low){case 0:throw new so("divide by zero");case 1:return{quotient:new ni(e.high,e.low),modulus:new ni(0,0)}}var n,i=e.high<0!=t.high<0;if(e.high<0){var r=~e.high,a=-e.low;if(0==a){r++;r|=0}n=new ni(r,a)}else{n=new ni(e.high,e.low)}if(t.high<0){var o=~t.high,s=-t.low;if(0==s){o++;o|=0}t=new ni(o,s)}else t=t;for(var l=new ni(0,0),u=new ni(0,1);!(t.high<0);){var c=xa.ucompare(t.high,n.high),_=0!=c?c:xa.ucompare(t.low,n.low),h=1;if(0==(h&=63))t=new ni(t.high,t.low);else if(h<32){t=new ni(t.high<>>32-h,t.low<>>32-d,u.low<=0)break}for(;;){var f=new ni(0,0);if(u.high==f.high&&u.low==f.low)break;var m=xa.ucompare(n.high,t.high);if((0!=m?m:xa.ucompare(n.low,t.low))>=0){l=new ni(l.high|u.high,l.low|u.low);var p=n.high-t.high|0,g=n.low-t.low|0;if(xa.ucompare(n.low,t.low)<0){p--;p|=0}n=new ni(p,g)}var v=1;if(0==(v&=63))u=new ni(u.high,u.low);else if(v<32){u=new ni(u.high>>>v,u.high<<32-v|u.low>>>v)}else{u=new ni(0,u.high>>>v-32)}var y=1;if(0==(y&=63))t=new ni(t.high,t.low);else if(y<32){t=new ni(t.high>>>y,t.high<<32-y|t.low>>>y)}else{t=new ni(0,t.high>>>y-32)}}if(i){var S=~l.high,w=-l.low;if(0==w){S++;S|=0}l=new ni(S,w)}if(e.high<0){var T=~n.high,I=-n.low;if(0==I){T++;T|=0}n=new ni(T,I)}return{quotient:l,modulus:n}};var Pa=function(){};n["haxe.Int64Helper"]=Pa,Pa.__name__=["haxe","Int64Helper"],Pa.parseString=function(e){var t=new ni(0,10),n=new ni(0,0),i=new ni(0,1),r=!1,a=S.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s9)throw new so("NumberFormatError");var h=new ni(_>>31,_);if(r){var d=65535&i.low,f=i.low>>>16,m=65535&h.low,p=h.low>>>16,g=xa._mul(d,m),v=xa._mul(f,m),y=xa._mul(d,p),w=g,T=(xa._mul(f,p)+(y>>>16)|0)+(v>>>16)|0;if(w=w+(y<<=16)|0,xa.ucompare(w,y)<0){T++;T|=0}if(w=w+(v<<=16)|0,xa.ucompare(w,v)<0){T++;T|=0}T=T+(xa._mul(i.low,h.high)+xa._mul(i.high,h.low)|0)|0;var I=new ni(T,w),N=n.high-I.high|0,E=n.low-I.low|0;if(xa.ucompare(n.low,I.low)<0){N--;N|=0}if(!((n=new ni(N,E)).high<0))throw new so("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,D=65535&h.low,k=h.low>>>16,C=xa._mul(A,D),O=xa._mul(b,D),M=xa._mul(A,k),R=C,F=(xa._mul(b,k)+(M>>>16)|0)+(O>>>16)|0;if(R=R+(M<<=16)|0,xa.ucompare(R,M)<0){F++;F|=0}if(R=R+(O<<=16)|0,xa.ucompare(R,O)<0){F++;F|=0}F=F+(xa._mul(i.low,h.high)+xa._mul(i.high,h.low)|0)|0;var x=new ni(F,R),U=n.high+x.high|0,P=n.low+x.low|0;if(xa.ucompare(P,n.low)<0){U++;U|=0}if((n=new ni(U,P)).high<0)throw new so("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,H=65535&t.low,j=t.low>>>16,G=xa._mul(L,H),Y=xa._mul(B,H),z=xa._mul(L,j),K=G,W=(xa._mul(B,j)+(z>>>16)|0)+(Y>>>16)|0;if(K=K+(z<<=16)|0,xa.ucompare(K,z)<0){W++;W|=0}if(K=K+(Y<<=16)|0,xa.ucompare(K,Y)<0){W++;W|=0}W=W+(xa._mul(i.low,t.high)+xa._mul(i.high,t.low)|0)|0,i=new ni(W,K)}return n};var La=function(){this.buf=new y,this.cache=[],this.useCache=La.USE_CACHE,this.useEnumIndex=La.USE_ENUM_INDEX,this.shash=new Ja,this.scount=0};n["haxe.Serializer"]=La,La.__name__=["haxe","Serializer"],La.run=function(e){var t=new La;return t.serialize(e),t.toString()},La.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=Go[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!=Go[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=v.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;n0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o),o=0),this.serialize(e[c]))}o>0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o)),this.buf.b+="h";break;case Date:var h=e;this.buf.b+="v",this.buf.b+=v.string(h.getTime());break;case _:this.buf.b+="l";for(var d=e.h;null!=d;){var f=d.item;d=d.next;var m=f;this.serialize(m)}this.buf.b+="h";break;case Wa:this.buf.b+="q";for(var p=e,y=p.keys();y.hasNext();){var S=y.next();this.buf.b+=":",this.buf.b+=null==S?"null":""+S,this.serialize(p.h[S])}this.buf.b+="h";break;case Va:this.buf.b+="M";for(var w=e,T=w.keys();T.hasNext();){var N=T.next(),E=g.field(N,"__id__");g.deleteField(N,"__id__"),this.serialize(N),N.__id__=E,this.serialize(w.h[N.__id__])}this.buf.b+="h";break;case Ja:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var D=b.next();this.serializeString(D),this.serialize(null!=Go[D]?A.getReserved(D):A.h[D])}this.buf.b+="h";break;case Xa:var k=e;this.buf.b+="s",this.buf.b+=v.string(Math.ceil(8*k.length/6)),this.buf.b+=":";var C=0,O=k.length-2,M=La.BASE64_CODES;if(null==M){var R=La.BASE64.length;M=new Array(R);for(var F=0,x=La.BASE64.length;F>2]),this.buf.b+=String.fromCharCode(M[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(M[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(M[63&B])}if(C==O){var H=k.b[C++],j=k.b[C++];this.buf.b+=String.fromCharCode(M[H>>2]),this.buf.b+=String.fromCharCode(M[63&(H<<4|j>>4)]),this.buf.b+=String.fromCharCode(M[j<<2&63])}else if(C==O+1){var G=k.b[C++];this.buf.b+=String.fromCharCode(M[G>>2]),this.buf.b+=String.fromCharCode(M[G<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(I.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(I.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var Y=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=v.string(this.useEnumIndex?"j":"w"),this.serializeString(I.getEnumName(Y)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=v.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var z=e.length;this.buf.b+=v.string(z-2);for(var K=2,W=z;K57)break;e=10*e+(i-48),this.pos++}else{if(this.pos!=n)break;t=!0,this.pos++}}return t&&(e*=-1),e},readFloat:function(){for(var e=this.pos;;){var t=this.buf.charCodeAt(this.pos);if(t!=t)break;if(!(t>=43&&t<58||101==t||69==t))break;this.pos++}return parseFloat(u.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new so("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new so("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 so("Invalid enum format");var n=this.readDigits();if(0==n)return I.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return I.createEnum(e,t,i)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new so("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new so("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new so("Class not found "+r);var o=I.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new so("Invalid custom data");return o;case 77:var s=new Va;this.cache.push(s);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var l=this.unserialize();s.set(l,this.unserialize())}return this.pos++,s;case 82:var c=this.readDigits();if(c<0||c>=this.scache.length)throw new so("Invalid string reference");return this.scache[c];case 97:this.buf;var h=[];for(this.cache.push(h);;){var d=this.buf.charCodeAt(this.pos);if(104==d){this.pos++;break}if(117==d){this.pos++;var f=this.readDigits();h[h.length+f-1]=null}else h.push(this.unserialize())}return h;case 98:var m=new Ja;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=Go[p]?m.setReserved(p,g):m.h[p]=g}return this.pos++,m;case 99:var v=this.unserialize(),y=this.resolver.resolveClass(v);if(null==y)throw new so("Class not found "+v);var S=I.createEmptyInstance(y);return this.cache.push(S),this.unserializeObject(S),S;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var w=this.unserialize(),T=this.resolver.resolveEnum(w);if(null==T)throw new so("Enum not found "+w);this.pos++;var N=this.readDigits(),E=T.__constructs__.slice()[N];if(null==E)throw new so("Unknown enum index "+w+"@"+N);var A=this.unserializeEnum(T,E);return this.cache.push(A),A;case 107:return NaN;case 108:var b=new _;this.cache.push(b);for(this.buf;104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());return this.pos++,b;case 109:return-1/0;case 110:return null;case 111:var D={};return this.cache.push(D),this.unserializeObject(D),D;case 112:return 1/0;case 113:var k=new Wa;this.cache.push(k);this.buf;for(var C=this.buf.charCodeAt(this.pos++);58==C;){var O=this.readDigits(),M=this.unserialize();k.h[O]=M,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new so("Invalid IntMap format");return k;case 114:var R=this.readDigits();if(R<0||R>=this.cache.length)throw new so("Invalid reference");return this.cache[R];case 115:var F=this.readDigits(),x=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0))),j=0;P>4);var z=U[x.charCodeAt(P++)];H.b[j++]=255&(Y<<4|z>>2);var K=U[x.charCodeAt(P++)];H.b[j++]=255&(z<<6|K)}if(L>=2){var W=U[x.charCodeAt(P++)],V=U[x.charCodeAt(P++)];if(H.b[j++]=255&(W<<2|V>>4),3==L){var q=U[x.charCodeAt(P++)];H.b[j++]=255&(V<<4|q>>2)}}return this.pos+=F,this.cache.push(H),H;case 116:return!0;case 118:var Q;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))Q=u.strDate(u.substr(this.buf,this.pos,19)),this.pos+=19;else{var J=this.readFloat();Q=new Date(J)}return this.cache.push(Q),Q;case 119:var X=this.unserialize(),Z=this.resolver.resolveEnum(X);if(null==Z)throw new so("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw so.wrap(this.unserialize());case 121:var ee=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.posa+2){var o=e.left,s=e.right;return(null==o?0:o._height)>=(null==s?0:s._height)?new Ya(e.left,e.key,e.value,new Ya(e.right,t,n,i)):new Ya(new Ya(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Ya(e.right.right,t,n,i))}if(a>r+2){var l=i.right,u=i.left;return(null==l?0:l._height)>(null==u?0:u._height)?new Ya(new Ya(e,t,n,i.left),i.key,i.value,i.right):new Ya(new Ya(e,t,n,i.left.left),i.left.key,i.left.value,new Ya(i.left.right,i.key,i.value,i.right))}return new Ya(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return g.compare(e,t)},__class__:Ga};var Ya=function(e,t,n,i,r){if(null==r&&(r=-1),this.left=e,this.key=t,this.value=n,this.right=i,-1==r){var a,o=this.left,s=this.right;if((null==o?0:o._height)>(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"]=Ya,Ya.__name__=["haxe","ds","TreeNode"],Ya.prototype={__class__:Ya};var za=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};za.Left=function(e){var t=["Left",0,e];return t.__enum__=za,t.toString=i,t},za.Right=function(e){var t=["Right",1,e];return t.__enum__=za,t.toString=i,t},za.__empty_constructs__=[];var Ka=function(){Ga.call(this)};n["haxe.ds.EnumValueMap"]=Ka,Ka.__name__=["haxe","ds","EnumValueMap"],Ka.__interfaces__=[Fa],Ka.__super__=Ga,Ka.prototype=r(Ga.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),t.push(128|63&i)):i<=65535?(t.push(224|i>>12),t.push(128|i>>6&63),t.push(128|63&i)):(t.push(240|i>>18),t.push(128|i>>12&63),t.push(128|i>>6&63),t.push(128|63&i))}return new Xa(new Uint8Array(t).buffer)},Xa.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Xa(e)},Xa.fastGet=function(e,t){return e.bytes[t]},Xa.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new so(ro.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__:Xa};var Za=function(){this.b=[]};n["haxe.io.BytesBuffer"]=Za,Za.__name__=["haxe","io","BytesBuffer"],Za.prototype={getBytes:function(){var e=new Xa(new Uint8Array(this.b).buffer);return this.b=null,e},__class__:Za};var $a=function(){};n["haxe.io.Input"]=$a,$a.__name__=["haxe","io","Input"],$a.prototype={readByte:function(){throw new so("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new so(ro.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof so&&(e=e.val),!lo.__instanceof(e,io))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new Xa(new ArrayBuffer(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new so(ro.Blocked);n+=i,e-=i}return t},readFloat:function(){return ao.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?ao.i64ToDouble(t,e):ao.i64ToDouble(e,t)},readInt8:function(){var e=this.readByte();return e>=128?e-256:e},readInt16:function(){var e=this.readByte(),t=this.readByte(),n=this.bigEndian?t|e<<8:e|t<<8;return 0!=(32768&n)?n-65536:n},readUInt16:function(){var e=this.readByte(),t=this.readByte();return this.bigEndian?t|e<<8:e|t<<8},readInt32:function(){var e=this.readByte(),t=this.readByte(),n=this.readByte(),i=this.readByte();return this.bigEndian?i|n<<8|t<<16|e<<24:e|t<<8|n<<16|i<<24},__class__:$a};var eo=function(e,t,n){if(null==t&&(t=0),null==n&&(n=e.length-t),t<0||n<0||t+n>e.length)throw new so(ro.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=eo,eo.__name__=["haxe","io","BytesInput"],eo.__super__=$a,eo.prototype=r($a.prototype,{readByte:function(){if(0==this.len)throw new so(new io);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new so(ro.OutsideBounds);if(0==this.len&&n>0)throw new so(new io);this.lene.length)throw new so(ro.OutsideBounds);for(var i=e.b,r=n;r>0;)this.writeByte(i[t]),++t,--r;return n},set_bigEndian:function(e){return this.bigEndian=e,e},write:function(e){for(var t=e.length,n=0;t>0;){var i=this.writeBytes(e,n,t);if(0==i)throw new so(ro.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(ao.floatToI32(e))},writeDouble:function(e){var t=ao.doubleToI64(e);this.bigEndian?(this.writeInt32(t.high),this.writeInt32(t.low)):(this.writeInt32(t.low),this.writeInt32(t.high))},writeInt8:function(e){if(e<-128||e>=128)throw new so(ro.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new so(ro.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new so(ro.Overflow);this.bigEndian?(this.writeByte(e>>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__:to};var no=function(){this.b=new Za};n["haxe.io.BytesOutput"]=no,no.__name__=["haxe","io","BytesOutput"],no.__super__=to,no.prototype=r(to.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 so(ro.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)},ao.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:n>128&&(n=128);var i=Math.round(8388608*(t/Math.pow(2,n)-1));return 8388608==i&&n<128&&(i=0,++n),(e<0?-2147483648:0)|n+127<<23|i},ao.i64ToDouble=function(e,t){var n=(t>>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)},ao.doubleToI64=function(e){var t=ao.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 e>0?(t.low=0,t.high=2146435072):(t.low=0,t.high=-1048576);return t};var oo=function(){};n["haxe.rtti.Meta"]=oo,oo.__name__=["haxe","rtti","Meta"],oo.getMeta=function(e){return e.__meta__},oo.getFields=function(e){var t=oo.getMeta(e);return null==t||null==t.fields?{}:t.fields};var so=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,so)};n["js._Boot.HaxeError"]=so,so.__name__=["js","_Boot","HaxeError"],so.wrap=function(e){return e instanceof Error?e:new so(e)},so.__super__=Error,so.prototype=r(Error.prototype,{__class__:so});var lo=function(){};n["js.Boot"]=lo,lo.__name__=["js","Boot"],lo.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=lo.__nativeClassName(e);return null!=n?lo.__resolveNativeClass(n):null},lo.__string_rec=function(e,t){if(null==e)return"null";if(t.length>=5)return"<...>";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;r0?",":"")+lo.__string_rec(e[_],t)}return l+="]"}var h;try{h=e.toString}catch(e){return"???"}if(null!=h&&h!=Object.toString&&"function"==typeof h){var d=e.toString();if("[object Object]"!=d)return d}var f=null,m="{\n";t+="\t";var p=null!=e.hasOwnProperty;for(var f in e)p&&!e.hasOwnProperty(f)||"prototype"!=f&&"__class__"!=f&&"__super__"!=f&&"__interfaces__"!=f&&"__properties__"!=f&&(2!=m.length&&(m+=", \n"),m+=t+f+" : "+lo.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},lo.__interfLoop=function(e,t){if(null==e)return!1;if(e==t)return!0;var n=e.__interfaces__;if(null!=n)for(var i=0,r=n.length;i223)return-256|n}}catch(e){if(e instanceof so&&(e=e.val),!lo.__instanceof(e,io))throw e}return null},readArray:function(e,t,n){for(var i=[],r=0,a=t;r1.401298464324817e-45&&r<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(i)):(this.o.writeByte(203),this.o.writeDouble(i));break;case 3:this.o.writeByte(e?195:194);break;case 4:var a=g.fields(e),o=c.count(a);o<16?this.o.writeByte(128|o):o<65536?(this.o.writeByte(222),this.o.writeUInt16(o)):(this.o.writeByte(223),this.o.writeInt32(o));for(var s=0;s1.401298464324817e-45&&t<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(e)):(this.o.writeByte(203),this.o.writeDouble(e))},writeRaw:function(e){var t=e.length;t<32?this.o.writeByte(160|t):t<65536?(this.o.writeByte(218),this.o.writeUInt16(t)):(this.o.writeByte(219),this.o.writeInt32(t)),this.o.write(e)},writeArray:function(e){var t=e.length;t<16?this.o.writeByte(144|t):t<65536?(this.o.writeByte(220),this.o.writeUInt16(t)):(this.o.writeByte(221),this.o.writeInt32(t));for(var n=0;n0)for(var o=new Do(Mo(e,e.handleNotification),e),s=0,l=a.length;s{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,r=(r=>(a,o)=>r&&r.get(a)||(o=((r,a,o,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let l of n(a))i.call(r,l)||!o&&"default"===l||e(r,l,{get:()=>a[l],enumerable:!(s=t(a,l))||s.enumerable});return r})((t=>e(t,"__esModule",{value:!0}))({}),a,1),r&&r.set(a,o),o))("undefined"!=typeof WeakMap?new WeakMap:0),a={};((t,n)=>{for(var i in n)e(t,i,{get:n[i],enumerable:!0})})(a,{extractMentionParts:()=>_,findMentionSuggestionHint:()=>d,hasMentionPartForMeOrAll:()=>s,invalidateManualMentionMarkup:()=>u,parseMessageMention:()=>c,removeMentionMarkup:()=>l});var o=/{@:(ALL|\d+),(\d+)}@/g,s=e=>_(e).some(({userIdNumStr:e})=>null===e||"ALL"===e),l=e=>c(e).map(t=>"mention"===t.type?t.mentionText:"normal"===t.type?e.substring(t.start,t.end):"").join(""),u=e=>e.replace(o,e=>e.substring(0,e.length-1)+" "),c=e=>{let t=0;const n=_(e).flatMap(e=>{const n=[];return t!==e.start&&n.push({type:"normal",start:t,end:e.start}),n.push(e),t=e.end,n});return e.length!==t&&n.push({type:"normal",start:t,end:e.length}),n},_=e=>{let t=0;return Array.from(e.matchAll(o)).flatMap(n=>{var i;const r=null!=(i=n.index)?i:0;if(rArray.from(e))(e.substring(a,c)).slice(0,u);if(_.length!==u)return[];const h=_.join(""),d="@"+h,f={type:"mention",start:r,end:a+h.length,userIdNumStr:o,mentionText:d};return t=f.end,f})},h=/^(.*?)([@@]?[@@])([^@@\s]*)$/,d=e=>{const t=e.match(h);return null===t?null:{prev:t[1],atMarks:t[2],keyword:t[3]}};return r(a)})();var Fo=Ro.exports;String.prototype.__class__=n.String=String,String.__name__=["String"],n.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=n.Date=Date,Date.__name__=["Date"];var xo=n.Int={__name__:["Int"]},Uo=n.Dynamic={__name__:["Dynamic"]},Po=n.Float=Number;Po.__name__=["Float"];var Lo=n.Bool=Boolean;Lo.__ename__=["Bool"];var Bo=n.Class={__name__:["Class"]},Ho={},jo={},Go={};A.APP_STATE_CHANGED="app_state_changed",A.ACCESS_TOKEN_CHANGED="access_token_changed",A.CURRENT_USER_CHANGED="current_user_changed",A.CONFIGURATION_CHANGED="configuration_changed",A.DOMAIN_SELECTION_CHANGED="domain_selection_changed",A.TALK_SELECTION_CHANGED="talk_selection_changed",A.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",A.USER_SELECTION_NEEDED="user_selection_needed",A.USER_SELECTION_CHANGED="user_selection_changed",A.FRIEND_SELECTION_NEEDED="friend_selection_needed",A.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",A.STAMP_SELECTION_STARTED="stamp_selection_started",A.STAMP_SELECTION_ENDED="stamp_selection_ended",A.STAMP_SELECTION_CHANGED="stamp_selection_changed",A.ACTION_SELECTION_CHANGED="action_selection_changed",A.CURRENT_PAGE_CHANGED="current_page_changed",A.CURRENT_PAGE_REASSIGNED="current_page_reassgined",A.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",A.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",A.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",A.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",A.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",A.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",A.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",A.ERROR_OCCURRED="error_occurred",A.UNREAD_COUNT_CHANGED="brand_badge_changed",A.SEND_FORM_TOP_CHANGED="send_form_top_changed",A.SOLUTIONS_LOADED="solutions_loaded",A.RIGHT_PANE_OPENED="right_pane_opened",A.RIGHT_PANE_CLOSED="right_pane_closed",A.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",A.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",A.PHOTO_EDITOR_SAVED="photo_editor_saved",A.ICON_EDITOR_SAVED="icon_editor_saved",A.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",A.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",A.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",A.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",A.PRESENCES_UPDATED="presences_updated",A.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",A.START_NOTE_EDITING="start_note_editing",A.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",A.FIRST_ROUTING_WILL_START="first_routing_will_start",A.SIGNED_OUT="signed_out",A.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",A.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",A.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",A.DATA_RECOVERING="data_recovering",A.DATA_RECOVERED="data_recovered",A.NOTIFY_UPDATE_USER="notify_update_user",A.NOTIFY_ADD_FRIEND="notify_add_friend",A.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",A.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",A.NOTIFY_DELETE_FRIEND="notify_delete_friend",A.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",A.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",A.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",A.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",A.GET_USERS_RESPONSED="get_users_responsed",A.GET_PROFILE_RESPONSED="get_profile_responsed",A.GET_PROFILE_ERRORED="get_profile_errored",A.UPDATE_USER_RESPONSED="update_user_responsed",A.UPDATE_USER_ERRORED="update_user_errored",A.UPDATE_PROFILE_RESPONSED="update_profile_responsed",A.UPDATE_PROFILE_ERRORED="update_profile_errored",A.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",A.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",A.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",A.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",A.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",A.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",A.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",A.GET_ME_RESPONSED="get_me_responsed",A.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",A.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",A.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",A.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",A.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",A.NOTIFY_JOIN_DOMAIN="notify_join_domain",A.NOTIFY_UPDATE_DOMAIN="notify_update_domain",A.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",A.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",A.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",A.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",A.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",A.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",A.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",A.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",A.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",A.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",A.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",A.NOTIFY_ADD_TALKERS="notify_add_talkers",A.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",A.NOTIFY_DELETE_TALKER="notify_delete_talker",A.NOTIFY_DELETE_TALK="notify_delete_talk",A.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",A.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",A.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",A.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",A.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",A.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",A.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",A.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",A.ADD_TALKERS_FAILED="add_talkers_failed",A.NOTIFY_CREATE_MESSAGE="notify_create_message",A.NOTIFY_DELETE_MESSAGE="notify_delete_message",A.NOTIFY_GET_MESSAGES="notify_get_messages",A.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",A.CREATE_MESSAGE_START="create_message_start",A.CREATE_MESSAGE_COMPLETE="create_message_complete",A.CREATE_MESSAGE_FAIL="create_message_fail",A.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",A.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",A.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",A.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",A.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",A.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",A.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",A.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",A.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",A.CREATE_ANNOUNCEMENT_START="create_announcement_start",A.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",A.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",A.NOTIFY_UPDATE_QUESTION="notify_update_question",A.NOTIFY_GET_QUESTIONS="get_questions_responsed",A.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",A.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",A.GET_FILE_RESPONSED="get_file_responsed",A.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",A.GET_NOTE_LOADED="get_note_loaded",A.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",A.CREATE_NOTE_COMPLETED="create_note_completed",A.CREATE_NOTE_FAILED="create_note_failed",A.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",A.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",A.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",A.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",A.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",A.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",A.UPDATE_NOTE_COMPLETED="update_note_completed",A.DELETE_NOTE_COMPLETED="delete_note_completed",A.NOTIFY_CREATE_NOTE="notify_create_note",A.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",A.NOTIFY_DELETE_NOTE="notify_delete_note",A.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",A.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",A.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",A.NOTIFY_LOCK_NOTE="notify_lock_note",A.NOTIFY_UNLOCK_NOTE="notify_unlock_note",A.NOTIFY_SEARCH_MESSAGES="notify_search_messages",A.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",A.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",A.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",A.NOTIFY_SEARCH_PREPARE="notify_search_prepare",A.NOTIFY_SEARCH_CLEAR="notify_search_clear",A.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",A.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",A.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",A.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",A.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",A.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",A.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",A.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",A.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",A.JOIN_CONFERENCE_CANCELED="join_conference_canceled",A.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",A.NOTIFY_OPEN_CONFERENCE="notify_open_conference",A.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",A.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",A.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",A.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",A.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",A.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",A.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",A.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",A.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",A.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",A.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",A.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",A.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",A.START_NOTIFICATION_FAILED="start_notification_failed",K.ANNOUNCEMENTS_KEY="-1",Z.__meta__={fields:{api:{inject:null}}},Z.NAME="AccountControlRequest",ee.__meta__={fields:{api:{inject:null},conferenceStore:{inject:null}}},ee.NAME="Conference",ne.__meta__={fields:{api:{inject:null}}},ne.NAME="Device",re.__meta__={fields:{api:{inject:null}}},re.NAME="Domain",oe.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null}}},oe.NAME="FilePath",le.__meta__={fields:{api:{inject:null},stampsStore:{inject:null}}},le.NAME="LoadStampset",_e.__meta__={fields:{api:{inject:null}}},_e.NAME="ManageFriends",de.__meta__={fields:{api:{inject:null}}},de.NAME="Message",me.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null},fileInfoStore:{inject:null}}},me.NAME="Note",ge.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},ge.NAME="Read",ye.__meta__={fields:{api:{inject:null}}},ye.NAME="ReloadData",we.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},we.NAME="Search",Ie.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},Ie.NAME="SelectTalk",Ee.__meta__={fields:{api:{inject:null}}},Ee.NAME="Send",Ae.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},Ae.NAME="SignIn",be.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},be.NAME="SignOut",De.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},De.NAME="Talk",Ce.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ce.NAME="UpdateProfile",Oe.__meta__={fields:{api:{inject:null}}},Oe.NAME="UpdateUser",Me.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},Me.NAME="UpdateUserPresences",Me.MAX_USERS_PER_API=100,Re.__meta__={fields:{routing:{inject:null}}},Re.NAME="Url",Ve.TalkAutoScrollDelay=1,Ve.TalkAutoScrollImmediately=2,Ve.TalkAutoScrollNone=3,Ve.TalksSortModeNewMessagesFirst="new_messages_first",Ve.TalksSortModeUnreadMessagesFirst="unread_messages_first",Ve.NAME="browser_settings",Qe.MAX_SIZE=72,Je.INCOMING_TIME=6e4,Xe.DEFAULT_PRESENCE_EXPIRATION=3e5,$e.DEFAULT_TTL=3600,$e.DEFAULT_MAX_PARTICIPANTS=8,xt.TIMESTAMP_SHIFT=22,Gt.MAX_READ_USER_IDS_COUNT=16,vn.QUERY_DATE_TODAY="t",vn.QUERY_DATE_YESTERDAY="-1d",vn.QUERY_DATE_THREE_DAYS_BEFORE="-3d",On.HISTORY_TAB_NAME="stamp-history",ii.SIXTY_MINUTES=new ni(0,36e5),ii.FIFTEEN_MINUTES=new ni(0,9e5),xi.PREFIX="note-",xi.nextDummyId=new ni(-1,-1),Bi.CONTINUE_MARGIN_RATE=.1,Ji.CHEKBOX_UNCHECKED="- [ ] ",Ji.CHEKBOX_CHECKED="- [x] ",Zi.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),Zi.XTU_REG=new o("ッ","gm"),nr.EMERGENCY=0,nr.ALERT=1,nr.CRITICAL=2,nr.ERROR=3,nr.WARNING=4,nr.NOTICE=5,nr.INFO=6,nr.DEBUG=7,nr.level=nr.getLogLevel(process.env.HUBOT_LOG_LEVEL),nr._d=7<=nr.level&&null!=console?console.log.bind(console):nr._nop,nr._i=6<=nr.level&&null!=console?console.info.bind(console):nr._nop,nr._w=4<=nr.level&&null!=console?console.warn.bind(console):nr._nop,nr._e=3<=nr.level&&null!=console?console.error.bind(console):nr._nop,lr.HIRAGANA_SMALL_A=12353,lr.HIRAGANA_NN=12435,lr.KATAKANA_SMALL_A=12449,mr.NAME="accessTokenResolver",pr.NAME="Proxy",gr.__meta__={fields:{settings:{inject:null},accountLoader:{inject:null},api:{inject:null}}},yr.NAME="accountLoader",wr.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},fileInfoStore:{inject:null},departmentStore:{inject:null},messageStore:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null},conferenceStore:{inject:null},stampsStore:{inject:null}}},wr.NAME="broadcast",Tr.__meta__={fields:{wsApi:{inject:null},apiCaller:{inject:null},apiNote:{inject:null},settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},fileService:{inject:null},searchService:{inject:null},fileInfoStore:{inject:null},messageStore:{inject:null},departmentStore:{inject:null},conferenceStore:{inject:null},lastUsedAtUpdater:{inject:null},stampsStore:{inject:null}}},Tr.NAME="api",Tr.API_VERSION="1.119",Tr.UPDATE_VERSION="1.119_1",Tr.ACTIONS_COUNT_PER_API=20,Ir.__meta__={fields:{rpc:{inject:null}}},Ir.NAME="apiCaller",Ir.DELAY_FOR_DB_REPLICATION=500,Ir.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,Ir.API_TRY_COUNT=3,Nr.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},Nr.NAME="apiNote",Er.NAME="appState",Ar.__meta__={fields:{dataStore:{inject:null},messageStore:{inject:null},settings:{inject:null}}},Ar.NAME="conferenceStore",br.__meta__={fields:{dataStore:{inject:null}}},br.NAME="dataFactory",Dr.__meta__={fields:{fileInfoStore:{inject:null},messageStore:{inject:null},solutionsStore:{inject:null},conferenceStore:{inject:null}}},Dr.NAME="dataStore",Dr.STORAGE_KEY_FOR_GENERAL="dataStore",Dr.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",Dr.TYPE_FRIEND=0,Dr.TYPE_ACQUAINSTANCE=1,Dr.TYPE_NONE=2,kr.__meta__={fields:{dataStore:{inject:null}}},kr.NAME="departmentStore",Cr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Cr.NAME="features",Or.NAME="fileInfoStore",Rr.NAME="fileService",Fr.__meta__={fields:{settings:{inject:null}}},xr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},xr.NAME="keywordWatcher",xr.TALK_KEY_PREFIX="talk_",xr.ANNOUNCEMENT_KEY_PREFIX="announcement_",Ur.TEMP_HALF_SPACE="&SPACE",Ur.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",Hr.__meta__={fields:{settings:{inject:null}}},Hr.NAME="lastUsedAtUpdater",Hr.UPDATE_LAST_USED_AT_INTERVAL=6e5,jr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},jr.NAME="limitations",Gr.NAME="messageStore",Yr.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},Yr.NAME="rpc",Yr.lastMsgId=0,zr.PING_INTERVAL_ON_CONNECTED=45e3,qr.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},qr.NAME="readStatusUpdater",Qr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Qr.NAME="routing",Zr.__meta__={fields:{settings:{inject:null}}},Zr.NAME="searchService",Zr.LOAD_SIZE=20,Zr.DUMMY_VALUE_FOR_SET=1,$r.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},$r.NAME="session",ea.NAME="settings",ea.KEY_ACCESS_TOKEN="access_token",ea.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",ea.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",ea.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",ea.KEY_INPUT_TEXT="input_text",ea.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",ea.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",ea.KEY_SEARCH_HISTORIES="search_histories",ea.KEY_RIGHT_PANEL_OPENED="right_panel_opened",ea.KEY_RIGHT_PANEL_WIDTH="right_panel_width",ea.KEY_MULTI_VIEW_MODE="multi_view_mode",ea.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",ea.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",ea.KEY_IDFV="idfv",ta.__meta__={fields:{settings:{inject:null}}},ta.NAME="solutionsStore",na.NAME="stampsStore",ia.__meta__={fields:{dataStore:{inject:null},conferenceStore:{inject:null}}},ia.NAME="talksService",ra.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},ra.NAME="ThumbnailExpansion",aa.__meta__={fields:{dataStore:{inject:null}}},aa.NAME="userPresences",oa.__meta__={fields:{apiCaller:{inject:null}}},oa.NAME="wsApi",wa.NAME="Mediator",Ta.__meta__={fields:{dataStore:{inject:null},api:{inject:null},hubotObject:{inject:null},messageEvent:{inject:null},sendQueue:{inject:null}}},Ta.NAME="commandline",Ta.DATA_SAVE_SPAN=5e3,Na.__meta__={fields:{dataStore:{inject:null}}},Na.NAME="hubotObject",Ea.__meta__={fields:{dataStore:{inject:null},hubotObject:{inject:null}}},Ea.NAME="messageEvent",Aa.minWaitMinute=1,Aa.maxWaitMinute=1440,Aa.SEND_EVENT_NAME="send",ba.__meta__={fields:{messageEvent:{inject:null}}},ba.NAME="sendQueue",ba.MIN_SEND_SPAN_MESSAGE=550,ba.MIN_SEND_SPAN_ANNOUNCE=5050,ba.MAX_TEXT_LENGTH=1024,ba.MAX_FIELD_COUNT=9,ba.MAX_FIELD_LENGTH=64,Ca.INVALID_PARAMETER="INVALID_PARAMETER",Ca.FORBIDDEN="FORBIDDEN",Ca.NOT_FOUND="NOT_FOUND",Ca.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",Ca.CONFLICT="CONFLICT",Ca.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",Ca.UNKNOWN="UNKNOWN",xa._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},La.USE_CACHE=!1,La.USE_ENUM_INDEX=!1,La.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ja.DEFAULT_RESOLVER=new Ha,ja.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Va.count=0,ao.i64tmp=new ni(0,0),lo.__toStr={}.toString,go.FLOAT_SINGLE_MIN=1.401298464324817e-45,go.FLOAT_SINGLE_MAX=3.4028234663852886e38,go.FLOAT_DOUBLE_MIN=5e-324,go.FLOAT_DOUBLE_MAX=1.7976931348623157e308,a.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 c4ae9fd..c76d044 100755 --- a/lib/direct.min.js +++ b/lib/direct.min.js @@ -1 +1 @@ -!function(e,t){"use strict";function o(){return Ha.__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 so};(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&&(wo.host=e.host,wo.endpoint=e.endpoint,wo.accessToken=e.access_token,wo.proxyURL=e.proxyURL,wo.account=e.account,wo.talkWithBot=e.talkWithBot,wo.acceptableEventTimeDiff=e.acceptableEventTimeDiff),Xi._d("["+et.dateStr(new Date)+"] ","current settings",wo,"","",""),null==wo.accessToken&&Xi._e("["+et.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(et.substr(e,n,null));break}var r=this.matchedPos();if(i+=K.string(et.substr(e,n,r.pos-n)),i+=K.string(t(this)),n=0==r.len?(i+=K.string(et.substr(e,r.pos,1)),r.pos+1):r.pos+r.len,!this.r.global)break}return!this.r.global&&0r.interval)r.basetime=n,r.count=1;else{if(!(0").join(">"),t?e.split('"').join(""").split("'").join("'"):e},j.startsWith=function(e,t){return e.length>=t.length&&et.substr(e,0,t.length)==t},j.isSpace=function(e,t){var n=et.cca(e,t);return 8>>=4););if(null!=t)for(;n.length>>16,l=65535&n.low,u=n.low>>>16,c=da._mul(o,l),_=da._mul(s,l),h=da._mul(o,u),d=c,f=(da._mul(s,u)+(h>>>16)|0)+(_>>>16)|0;if(d=d+(h<<=16)|0,da.ucompare(d,h)<0){f++;f|=0}if(d=d+(_<<=16)|0,da.ucompare(d,_)<0){f++;f|=0}f=f+(da._mul(t.low,n.high)+da._mul(t.high,n.low)|0)|0;var m=new Jn(f,d),p=new Jn(0,K.parseInt(e.charAt(a))),g=m.high+p.high|0,v=m.low+p.low|0;if(da.ucompare(v,m.low)<0){g++;g|=0}t=new Jn(g,v)}return t},nt.getHigh=function(e){return e.high},nt.getLow=function(e){return e.low},nt.idStr=function(e){return"_"+e.high+"_"+e.low},nt.makeFromIdStr=function(e){var t=new y("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Jn(K.parseInt(t.matched(1)),K.parseInt(t.matched(2))):null},nt.fromNullableIdStr=function(e){return null!=e?nt.makeFromIdStr(e):null},nt.toStr=function(e){return fa.toString(e)},nt.isNeg=function(e){return e.high<0},nt.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(da.ucompare(i,e.low)<0){n++;n|=0}return new Jn(n,i)},nt.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(da.ucompare(e.low,t.low)<0){n--;n|=0}return new Jn(n,i)},nt.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:da.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:0<=t.high?n:1},nt.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},nt.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},nt.toFloat=function(e){var t=4294967296,n=e.high,i=e.low;return n*t+(0<=i?i:i+t)},nt.idStrToInt64=function(e){var t=e.split("_");return 2>31,t)},nt.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=rt.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(n,e){for(var i=this,t=Promise.resolve([]),r=nt.splitUsingMaxCount(e,100),a=0;a>t,e.high<<32-t|e.low>>>t):new Jn(e.high>>31,e.high>>t-32):new Jn(e.high,e.low)},Ot.subTimestampPart=function(e,t){var n=Ot.timestamp(e),i=Ot.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(da.ucompare(n.low,i.low)<0){r--;r|=0}return new Jn(r,a)},Ot.createForTest=function(e){var t=Ot.TIMESTAMP_SHIFT;return 0!=(t&=63)?t<32?new Jn(e.high<>>32-t,e.low<this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Ji.localize("MessageStringMaker.achieve"),Ji.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Ji.localize("MessageStringMaker.achieve"):Ji.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmarkWithEllipsis:function(){var e=this.messageStringForBookmark();return e.length<100?e:e.substring(0,99)+"…"},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&0>>16,s=65535&t.low,l=t.low>>>16,u=da._mul(a,s),c=da._mul(o,s),_=da._mul(a,l),h=u,d=(da._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,da.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,da.ucompare(h,c)<0){d++;d|=0}d=d+(da._mul(e.low,t.high)+da._mul(e.high,t.low)|0)|0;var f=new Jn(d,h),m=new Jn(0,K.parseInt(this.commonStampId.charAt(r))),p=f.high+m.high|0,g=f.low+m.low|0;if(da.ucompare(g,f.low)<0){p++;p|=0}e=new Jn(p,g)}return e},__class__:In};function En(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}(n["albero.entity.OriginalStamp"]=En).__name__=["albero","entity","OriginalStamp"],En.__interfaces__=[Tn],En.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=nt.makeFromIdStr(t.stampsetIdStr),i=nt.makeFromIdStr(t.stampIdStr);return new En(n,i,t.illust)},En.fromPropsAndStampsetId=function(e,t){return new En(t,nt.fromIntOrInt64(e.id),e.illust)},En.createKey=function(e){return"original__"+e.high+"_"+e.low},En.prototype={getImageUrl:function(){return this.illust},getKey:function(){return En.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Lt;return n.talkId=e,n.type=Bt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:En};function Nn(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]}(n["albero.entity.Stampset"]=Nn).__name__=["albero","entity","Stampset"],Nn.historyStampset=function(){return new Nn(kn.getHistoryStampsetType(),"stamp-history",null,0)},Nn.commonStampset=function(e,t,n){return new Nn(kn.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},Nn.originalStampset=function(e){var t=nt.fromIntOrInt64(e.stampset_id),n=kn.fromStampsetId(t),i=new Nn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=Ha.__cast(e.stamps,Array).map(function(e){return En.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},Nn.fromStampsetInfo=function(e){var t=kn.fromStampsetId(e.stampsetId);return new Nn(t,e.name,e.icon,e.version)},Nn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:An};var bn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(nt.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};(n["albero.entity.StampsetSetting"]=bn).__name__=["albero","entity","StampsetSetting"],bn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new An(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(t){return null!=this.allowCreateMessageStampsetIds&&tt.exists(this.allowCreateMessageStampsetIds,function(e){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})},containVisibleStampset:function(n){return tt.exists(this.stampsetInfos,function(e){var t=e.stampsetId;return null!=n&&null!=t&&n.high==t.high&&n.low==t.low})},getSendableStampsetInfos:function(){var t=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(e){return t.containSendableStampset(e.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(t){this.stampsetInfos=this.stampsetInfos.map(function(e){return t.eqStampsetId(e)&&t.isNewerThan(e)?t:e})},deleteStampsetInfo:function(n){this.stampsetInfos=this.stampsetInfos.filter(function(e){var t=e.stampsetId;return!(null!=t&&null!=n&&t.high==n.high&&t.low==n.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(e){return!(null!=e&&null!=n&&e.high==n.high&&e.low==n.low)})},getStampsetIdsDiff:function(e){for(var t=new Da,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i>2)),r+=K.string(a.charAt(63&(o<<4|s>>4))),r+=K.string(a.charAt(63&(s<<2|l>>6))),r+=K.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=K.string(a.charAt(u>>2)),r+=K.string(a.charAt(63&(u<<4|c>>4))),r+=K.string(a.charAt(c<<2&63))}else if(n==1+i){var _=t.b[n++];r+=K.string(a.charAt(_>>2)),r+=K.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},Wi.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=et.substr(e,0,t));var n=e.length,i=e,r=Wi.CODES;null==r&&(r=Wi.initCodes(),Wi.CODES=r);for(var a=0,o=3&n,s=a+(n-o),l=new ka(new Io(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 Vi(){}(n["albero.js.KatakanaToRoman"]=Vi).__name__=["albero","js","KatakanaToRoman"],Vi.assureConvertTable=function(){return null!=Vi.convertTable||(Vi.convertTable=new Da,tt.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=Vi.convertTable,n=e[0],i=e[1];null!=To[n]?t.setReserved(n,i):t.h[n]=i})),Vi.convertTable},Vi.matchNext=function(e,t){var n=Vi.assureConvertTable();if(t+1=nr.HIRAGANA_SMALL_A&&o<=nr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(nr.KATAKANA_SMALL_A-nr.HIRAGANA_SMALL_A)),t=1+a)}return n+=e.substring(t,e.length)},nr.katakanaToRoman=function(e){return(new Vi).convert(e)},nr.normalize=function(e){return new ir(null).normalize(e)},nr.normalizeForFile=function(e){return new ir(null).normalizeForFile(e)},nr.asyncAssureNormalize=function(){return Promise.resolve()},nr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var ir=function(e){this.beforeTask=null,this.beforeTask=e};(n["albero.js.Normalizer"]=ir).__name__=["albero","js","Normalizer"],ir.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ba&&(e=e.val),Xi._e("["+et.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ji.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ba&&(e=e.val),Xi._e("["+et.dateStr(new Date)+"] ","invalid character:",e,"","",""),Ji.localize("TextCanonicalizer.invalid")}},__class__:ir};function rr(){}(n["albero.js.WebSocket"]=rr).__name__=["albero","js","WebSocket"],rr.prototype={__class__:rr};function ar(){}(n["albero.js.WebSocketFactory"]=ar).__name__=["albero","js","WebSocketFactory"],ar.newInstance=function(e,t){return new or(e,t)};var or=function(e,t){this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong,this.ws=new WebSocket(e),So.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=oo(this,this.onOpen),this.ws.onmessage=oo(this,this.onMessage),this.ws.onerror=oo(this,this.onError),this.ws.onclose=oo(this,this.onClose)};(n["albero.js.WebSocketForBrowser"]=or).__name__=["albero","js","WebSocketForBrowser"],or.__interfaces__=[rr],or.prototype={onOpen:function(e){Xi._i("["+et.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryData(e),this.onmessage(t)}},getBinaryData:function(e){return So.websocketsbinary?ka.ofData(new Eo(e.data)):Wi.decode(e.data)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){Xi._e("["+et.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);Xi._i("["+et.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,this.ws.close()},send:function(e){So.websocketsbinary?this.ws.send(new Eo(e.b.bufferValue).buffer):this.ws.send(Wi.encode(e))},ping:function(e){this.send(new ka(new Io(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:or};function sr(){}(n["puremvc.interfaces.IProxy"]=sr).__name__=["puremvc","interfaces","IProxy"],sr.prototype={__class__:sr};function lr(){}(n["albero.proxy.AccessTokenResolverProxy"]=lr).__name__=["albero","proxy","AccessTokenResolverProxy"],lr.__interfaces__=[sr],lr.prototype={__class__:lr};var ur=function(){};(n["albero.proxy.AccessTokenResolverProxyFactory"]=ur).__name__=["albero","proxy","AccessTokenResolverProxyFactory"],ur.newInstance=function(){return new _r("accessTokenResolver")};var cr=function(e,t){F.call(this),this.proxyName=null!=e?e:cr.NAME,null!=t&&this.setData(t)};(n["puremvc.patterns.proxy.Proxy"]=cr).__name__=["puremvc","patterns","proxy","Proxy"],cr.__interfaces__=[sr],cr.__super__=F,cr.prototype=i(F.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:cr});var _r=function(e){cr.call(this,e)};(n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=_r).__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],_r.__interfaces__=[lr],_r.__super__=cr,_r.prototype=i(cr.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=wo.account?wo.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:_r});var hr=function(){cr.call(this,"broadcast")};(n["albero.proxy.AlberoBroadcastProxy"]=hr).__name__=["albero","proxy","AlberoBroadcastProxy"],hr.__super__=cr,hr.prototype=i(cr.prototype,{handleNotification:function(e,t,n){var i=this;switch(e){case"notify_add_account_control_request":var r=new st(t);this.dataStore.setAccountControlRequest(r),this.sendNotification(e,r),n();break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1])),n();break;case"notify_add_acquaintances":for(var a=t[1].map(oo(ro=this.dataFactory,ro.newAcquaintance)),o=0;ot.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 Xi._e("["+et.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=tn.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);null==t&&((t=new Yn).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var i=this;if(!tt.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);return null==t?(Xi._e("["+et.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(t.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(t),t)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new Oe).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:hr});var dr=function(){cr.call(this,"api")};(n["albero.proxy.AlberoServiceProxy"]=dr).__name__=["albero","proxy","AlberoServiceProxy"],dr.__super__=cr,dr.prototype=i(cr.prototype,{getOSString:function(){return"bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");r=-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",[l[1],l[0],t,s,o,""]):(i="create_access_token",[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",Ne.FORWARD(D.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.callImmediately("authorize_device",[e,n],function(e){t()})},createSession:function(e,i){var r=this,t=[e,"1.117"];this.apiCaller.onSessionClear(),this.apiCaller.callImmediatelyReliable("create_session",t,function(e){var t=new gn(e),n=v.nowAsInt64();t.passwordExpiration.isExpired(n)?r.sendNotification("password_expiration_overed"):(t.passwordExpiration.needWarning(n,r.settings.getPasswordWarningSkipUntil())&&(r.settings.setPasswordWarningSkipUntil(v.oneDayAfterAsInt64()),r.sendNotification("password_expiration_warned")),r.apiCaller.onSessionCreated(),i(t),r.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void r.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void r.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void r.sendNotification("Device",W.AUTHORIZE);r.apiCaller.handleServerErrorDefault(e)}r.settings.clearAccessToken(),r.sendNotification("Url",Ne.FORWARD(D.error))},function(e){return r.shouldRetryCreateSession(e)?Aa.Some(r.apiCaller.retryTimeForReplicationLag()):Aa.None})},shouldRetryCreateSession:function(e){return 401==e.code&&"invalid token"==e.message},startNotification:function(){var t=this;this.apiCaller.call("start_notification",[],function(e){e||(t.dataStore.clear(!0),t.sendNotification("start_notification_failed"))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=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,Lt.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),a.fileInfoStore.removeMessageFileInfos(o.id),a.messageStore.removeMessage(o.id)},function(e){if(a.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Lr.toLocalError(xt.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 Yt;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=Lr.toLocalError(xt.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?Aa.Some(1e3*o.asInt(e.detail.retry_after)):Aa.None})},searchMessagesAroundDateTime:function(e,i){var r=this;return new Promise(function(n,t){r.apiCaller.call("search_messages_around_datetime",[e,i],function(e){var t=new ni(i,e);n(t)},function(e){t(e)})})},upload:function(t,n,i,r){var a=this,e=_i.getBlobFromUpdatableFile(i);this.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:i,thumb:e}}).then(function(e){a.uploadV2(t,n,e,r)})},uploadV2: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.file,n.thumb,e);o.then(function(e){r.createMessageReliable(t,Bt.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return Xi._w("["+et.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMulti:function(n,i,r,e,a){var o=this,t=e.map(function(t){var e=_i.getBlobFromUpdatableFile(t);return o.fileService.asyncCreateThumbnail(e).catch(function(e){return null}).then(function(e){return{file:t,thumb:e}})});Promise.all(t).then(function(e){var t=e.map(function(e){return e});o.uploadMultiV2(n,i,r,t,a)})},uploadMultiV2: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!=To[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 Da,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 Jn(u.high<<1|u.low>>>31,u.low<<1),0<=_)break}for(;;){var h=new Jn(0,0);if(u.high==h.high&&u.low==h.low)break;var d=da.ucompare(n.high,t.high);if(0<=(0!=d?d:da.ucompare(n.low,t.low))){l=new Jn(l.high|u.high,l.low|u.low);var f=n.high-t.high|0,m=n.low-t.low|0;if(da.ucompare(n.low,t.low)<0){f--;f|=0}n=new Jn(f,m)}63,u=new Jn(u.high>>>1,u.high<<31|u.low>>>1);63,t=new Jn(t.high>>>1,t.high<<31|t.low>>>1)}if(i){var p=~l.high,g=-l.low;if(0==g){p++;p|=0}l=new Jn(p,g)}if(e.high<0){var v=~n.high,y=-n.low;if(0==y){v++;v|=0}n=new Jn(v,y)}return{quotient:l,modulus:n}};var ma=function(){};(n["haxe.Int64Helper"]=ma).__name__=["haxe","Int64Helper"],ma.parseString=function(e){var t=new Jn(0,10),n=new Jn(0,0),i=new Jn(0,1),r=!1,a=j.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,s=0,l=o;s>31,c);if(r){var h=65535&i.low,d=i.low>>>16,f=65535&_.low,m=_.low>>>16,p=da._mul(h,f),g=da._mul(d,f),v=da._mul(h,m),y=p,S=(da._mul(d,m)+(v>>>16)|0)+(g>>>16)|0;if(y=y+(v<<=16)|0,da.ucompare(y,v)<0){S++;S|=0}if(y=y+(g<<=16)|0,da.ucompare(y,g)<0){S++;S|=0}S=S+(da._mul(i.low,_.high)+da._mul(i.high,_.low)|0)|0;var w=new Jn(S,y),T=n.high-w.high|0,I=n.low-w.low|0;if(da.ucompare(n.low,w.low)<0){T--;T|=0}if(!((n=new Jn(T,I)).high<0))throw new Ba("NumberFormatError: Underflow")}else{var E=65535&i.low,N=i.low>>>16,A=65535&_.low,b=_.low>>>16,D=da._mul(E,A),k=da._mul(N,A),C=da._mul(E,b),O=D,M=(da._mul(N,b)+(C>>>16)|0)+(k>>>16)|0;if(O=O+(C<<=16)|0,da.ucompare(O,C)<0){M++;M|=0}if(O=O+(k<<=16)|0,da.ucompare(O,k)<0){M++;M|=0}M=M+(da._mul(i.low,_.high)+da._mul(i.high,_.low)|0)|0;var R=new Jn(M,O),F=n.high+R.high|0,x=n.low+R.low|0;if(da.ucompare(x,n.low)<0){F++;F|=0}if((n=new Jn(F,x)).high<0)throw new Ba("NumberFormatError: Overflow")}var U=65535&i.low,P=i.low>>>16,L=65535&t.low,B=t.low>>>16,H=da._mul(U,L),Y=da._mul(P,L),G=da._mul(U,B),z=H,K=(da._mul(P,B)+(G>>>16)|0)+(Y>>>16)|0;if(z=z+(G<<=16)|0,da.ucompare(z,G)<0){K++;K|=0}if(z=z+(Y<<=16)|0,da.ucompare(z,Y)<0){K++;K|=0}K=K+(da._mul(i.low,t.high)+da._mul(i.high,t.low)|0)|0,i=new Jn(K,z)}return n};var pa=function(){this.buf=new T,this.cache=[],this.useCache=pa.USE_CACHE,this.useEnumIndex=pa.USE_ENUM_INDEX,this.shash=new Da,this.scount=0};(n["haxe.Serializer"]=pa).__name__=["haxe","Serializer"],pa.run=function(e){var t=new pa;return t.serialize(e),t.toString()},pa.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=To[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!=To[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=K.string(e.length),this.buf.b+=":",this.buf.b+=null==e?"null":""+e},serializeRef:function(e){for(var t=typeof e,n=0,i=this.cache.length;n>2]),this.buf.b+=String.fromCharCode(b[63&(M<<4|R>>4)]),this.buf.b+=String.fromCharCode(b[63&(R<<2|F>>6)]),this.buf.b+=String.fromCharCode(b[63&F])}if(N==A){var x=E.b[N++],U=E.b[N++];this.buf.b+=String.fromCharCode(b[x>>2]),this.buf.b+=String.fromCharCode(b[63&(x<<4|U>>4)]),this.buf.b+=String.fromCharCode(b[U<<2&63])}else if(N==1+A){var P=E.b[N++];this.buf.b+=String.fromCharCode(b[P>>2]),this.buf.b+=String.fromCharCode(b[P<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ee.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var L=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w"),this.serializeString(ee.getEnumName(L)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var B=e.length;this.buf.b+=K.string(B-2);for(var H=2,Y=B;H=this.length)throw new Ba("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ba("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 Ba("Invalid enum format");var n=this.readDigits();if(0==n)return ee.createEnum(e,t);for(var i=[];0=this.scache.length)throw new Ba("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 Da;this.cache.push(d);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var f=this.unserialize(),m=this.unserialize();null!=To[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 Ba("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 Ba("Enum not found "+y);this.pos++;var w=this.readDigits(),T=S.__constructs__.slice()[w];if(null==T)throw new Ba("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 Ea;this.cache.push(A);this.buf;for(var b=this.buf.charCodeAt(this.pos++);58==b;){var D=this.readDigits(),k=this.unserialize();A.h[D]=k,b=this.buf.charCodeAt(this.pos++)}if(104!=b)throw new Ba("Invalid IntMap format");return A;case 114:var C=this.readDigits();if(C<0||C>=this.cache.length)throw new Ba("Invalid reference");return this.cache[C];case 115:var O=this.readDigits(),M=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(2<=x?x-1:0))),L=0;F>4);var Y=R[M.charCodeAt(F++)];P.b[L++]=255&(H<<4|Y>>2);var G=R[M.charCodeAt(F++)];P.b[L++]=255&(Y<<6|G)}if(2<=x){var z=R[M.charCodeAt(F++)],K=R[M.charCodeAt(F++)];if(P.b[L++]=255&(z<<2|K>>4),3==x){var j=R[M.charCodeAt(F++)];P.b[L++]=255&(K<<4|j>>2)}}return this.pos+=O,this.cache.push(P),P;case 116:return!0;case 118:var W;if(48<=this.buf.charCodeAt(this.pos)&&this.buf.charCodeAt(this.pos)<=57&&48<=this.buf.charCodeAt(this.pos+1)&&this.buf.charCodeAt(this.pos+1)<=57&&48<=this.buf.charCodeAt(this.pos+2)&&this.buf.charCodeAt(this.pos+2)<=57&&48<=this.buf.charCodeAt(this.pos+3)&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))W=et.strDate(et.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 Ba("Enum not found "+q);var J=this.unserializeEnum(Q,this.unserialize());return this.cache.push(J),J;case 120:throw Ba.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 wa(e.left,e.key,e.value,new wa(e.right,t,n,i)):new wa(new wa(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new wa(e.right.right,t,n,i))}if(r+2(null==u?0:u._height)?new wa(new wa(e,t,n,i.left),i.key,i.value,i.right):new wa(new wa(e,t,n,i.left.left),i.left.key,i.left.value,new wa(i.left.right,i.key,i.value,i.right))}return new wa(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"]=wa).__name__=["haxe","ds","TreeNode"],wa.prototype={__class__:wa};var Ta=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Ta.Left=function(e){var t=["Left",0,e];return t.__enum__=Ta,t.toString=o,t},Ta.Right=function(e){var t=["Right",1,e];return t.__enum__=Ta,t.toString=o,t},Ta.__empty_constructs__=[];var Ia=function(){Sa.call(this)};(n["haxe.ds.EnumValueMap"]=Ia).__name__=["haxe","ds","EnumValueMap"],Ia.__interfaces__=[ha],Ia.__super__=Sa,Ia.prototype=i(Sa.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 ka(new Eo(t).buffer)},ka.ofData=function(e){var t=e.hxBytes;return null!=t?t:new ka(e)},ka.fastGet=function(e,t){return e.bytes[t]},ka.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ba(Ua.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__:ka};function Ca(){this.b=[]}(n["haxe.io.BytesBuffer"]=Ca).__name__=["haxe","io","BytesBuffer"],Ca.prototype={getBytes:function(){var e=new ka(new Eo(this.b).buffer);return this.b=null,e},__class__:Ca};function Oa(){}(n["haxe.io.Input"]=Oa).__name__=["haxe","io","Input"],Oa.prototype={readByte:function(){throw new Ba("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ba(Ua.OutsideBounds);try{for(;0e.length)throw new Ba(Ua.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n}(n["haxe.io.BytesInput"]=Ma).__name__=["haxe","io","BytesInput"],Ma.__super__=Oa,Ma.prototype=i(Oa.prototype,{readByte:function(){if(0==this.len)throw new Ba(new xa);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ba(Ua.OutsideBounds);if(0==this.len&&0e.length)throw new Ba(Ua.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__:Ra};function Fa(){this.b=new Ca}(n["haxe.io.BytesOutput"]=Fa).__name__=["haxe","io","BytesOutput"],Fa.__super__=Ra,Fa.prototype=i(Ra.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 Ba(Ua.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)},Pa.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)},Pa.doubleToI64=function(e){var t=Pa.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 Ba("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Ba("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},so.prototype.once=function(e,t){if(!lo(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},so.prototype.removeListener=function(e,t){var n,i,r,a;if(!lo(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||lo(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(uo(n)){for(a=r;0>>16)<<16|0)|0},pa.USE_CACHE=!1,pa.USE_ENUM_INDEX=!1,pa.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",ya.DEFAULT_RESOLVER=new va,ya.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Na.count=0,Pa.i64tmp=new Jn(0,0),Ha.__toStr={}.toString,za.BYTES_PER_ELEMENT=1,ja.FLOAT_SINGLE_MIN=1401298464324817e-60,ja.FLOAT_SINGLE_MAX=34028234663852886e22,ja.FLOAT_DOUBLE_MIN=5e-324,ja.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";var n={},i=function(){return za.__string_rec(this,"")};function r(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 a=e.DirectAPI=function(){this.eventEmitter=new co};n.DirectAPI=a,a.__name__=["DirectAPI"],a.getInstance=function(){return null==a.instance&&(a.instance=new a),a.instance},a.main=function(){},a.prototype={setOptions:function(e){null!=e&&(Eo.host=e.host,Eo.endpoint=e.endpoint,Eo.accessToken=e.access_token,Eo.proxyURL=e.proxyURL,Eo.account=e.account,Eo.talkWithBot=e.talkWithBot,Eo.acceptableEventTimeDiff=e.acceptableEventTimeDiff),$i._d("["+s.dateStr(new Date)+"] ","current settings",Eo,"","",""),null==Eo.accessToken&&$i._e("["+s.dateStr(new Date)+"] ","Not enough parameters provided. I need a access token","","","","")},parseInt64:function(e){return e.length>0&&"_"==e.charAt(0)?O.makeFromIdStr(e):O.parse(e)},stringifyInt64:function(e,t){return null==t&&(t=!1),t?"_"+e.high+"_"+e.low:ga.toString(e)},listen:function(){this.facade=T.getInstance(),this.api=za.__cast(this.facade.retrieveProxy("api"),mr),this.data=za.__cast(this.facade.retrieveProxy("dataStore"),wr);var e=za.__cast(this.facade.retrieveProxy("fileService"),Nr),t=za.__cast(this.facade.retrieveProxy("fileInfoStore"),Er);this.notes=new na(new ia(this,this.api,t,e)),this.facade.startup()},emit:function(e,t,n,i){this.eventEmitter.emit(e,t,n,i)},on:function(e,t){return this.eventEmitter.on(e,t)},getDomainInvites:function(e){this.api._getDomainInvites(e)},acceptDomainInvite:function(e){this.api.acceptDomainInvite(e)},__class__:a};var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};n.EReg=o,o.__name__=["EReg"],o.prototype={match:function(e){return this.r.global&&(this.r.lastIndex=0),this.r.m=this.r.exec(e),this.r.s=e,null!=this.r.m},matched:function(e){if(null!=this.r.m&&e>=0&&e=e.length);){if(!this.matchSub(e,n)){i+=m.string(s.substr(e,n,null));break}var r=this.matchedPos();if(i+=m.string(s.substr(e,n,r.pos-n)),i+=m.string(t(this)),0==r.len?(i+=m.string(s.substr(e,r.pos,1)),n=r.pos+1):n=r.pos+r.len,!this.r.global)break}return!this.r.global&&n>0&&n0?this.interval-(e-this.basetime):this.interval,Math.ceil(t/1e3)},createError:function(e){var t=this.max+" calls every "+Math.floor(this.interval/1e3)+" sec";return ca.createTooManyRequestsError(t,this.calculateRetryAfter(e))},apply:function(e){var t=this;return new Promise(function(n,i){var r=t._now();if(t.max>0&&r-t.basetime>t.interval)t.basetime=r,t.count=1;else{if(!(t.max>0&&t.countt?1:-1},f.isEnumValue=function(e){return null!=e&&null!=e.__enum__},f.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)};var m=function(){};n.Std=m,m.__name__=["Std"],m.string=function(e){return za.__string_rec(e,"")},m.parseInt=function(e){var t=parseInt(e,10);return 0!=t||120!=s.cca(e,1)&&88!=s.cca(e,1)||(t=parseInt(e)),isNaN(t)?null:t};var p=function(){this.b=""};n.StringBuf=p,p.__name__=["StringBuf"],p.prototype={toString:function(){return this.b},__class__:p};var g=function(){};n.StringTools=g,g.__name__=["StringTools"],g.htmlEscape=function(e,t){return e=e.split("&").join("&").split("<").join("<").split(">").join(">"),t?e.split('"').join(""").split("'").join("'"):e},g.startsWith=function(e,t){return e.length>=t.length&&s.substr(e,0,t.length)==t},g.isSpace=function(e,t){var n=s.cca(e,t);return n>8&&n<14||32==n},g.ltrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,n,t-n):e},g.rtrim=function(e){for(var t=e.length,n=0;n0?s.substr(e,0,t-n):e},g.trim=function(e){return g.ltrim(g.rtrim(e))},g.replace=function(e,t,n){return e.split(t).join(n)},g.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,(e>>>=4)>0;);if(null!=t)for(;n.length=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():b.dateString(r,!1)},b.getDateStringForNotification=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296));return t.getFullYear()==r.getFullYear()&&t.getMonth()==r.getMonth()&&t.getDate()==r.getDate()?r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes():r.getMonth()+1+"/"+r.getDate()},b.datetimeStringIn11Chars=function(e){if(null==e)return"";var t=new Date,n=e.high,i=e.low,r=new Date(4294967296*n+(i>=0?i:i+4294967296)),a=b.dateString(r,!1);return t.getFullYear()==r.getFullYear()&&(a+=" "+r.getHours()+":"+(r.getMinutes()<10?"0":"")+r.getMinutes()),a},b.timeString=function(e){if(null==e)return"";var t=e.high,n=e.low,i=new Date(4294967296*t+(n>=0?n:n+4294967296));return i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()},b.datetimeString=function(e){if(null==e)return"";var t=parseFloat(ga.toString(e)),n=new Date(t);return n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" "+n.getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes()};var D=function(){};n["albero.FileDynamicHelper"]=D,D.__name__=["albero","FileDynamicHelper"],D.filterDeleted=function(e){return null==e?[]:e.filter(D.isNotDeleted)},D.isNotDeleted=function(e){return null==e.deleted||!e.deleted},D.createFileInfoDynamic=function(e,t,n,i){var r={url:i.get_url,content_type:e.type,content_size:e.size,name:t,file_id:i.file_id};return x.foreach(n,function(e){null!=e.auth&&(r.thumbnail_url=e.auth.get_url),null!=e.dimension&&(r.thumbnail_dimension=e.dimension.toObject())}),r};var k=function(){};n["albero.FileHelper"]=k,k.__name__=["albero","FileHelper"],k.createByteSizeStringWithUnit=function(e){if(null==e)return"0 B";for(var t,n=["","K","M","G","T"];;){var i=new Zn(0,1024),r=t=ga.divMod(e,i).quotient,a=new Zn(0,0),o=r.high-a.high|0;if(o=0!=o?o:pa.ucompare(r.low,a.low),!((r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0))break;e=t,n.shift()}return ga.toString(e)+" "+n.shift()+"B"},k.extractFilenameExceptExtension=function(e){return new o("\\.(?=[^.]+$)","").split(e)[0]};var C=function(){};n["albero.History"]=C,C.__name__=["albero","History"],C.replaceState=function(e,t,n){return null!=window.history&&(window.history.replaceState(e,t,n),!0)};var O=function(){};n["albero.Int64Helper"]=O,O.__name__=["albero","Int64Helper"],O.parse=function(e){if(!new o("^\\d+$","").match(e))return null;for(var t=new Zn(0,0),n=new Zn(0,10),i=0,r=e.length;i>>16,u=65535&n.low,c=n.low>>>16,_=pa._mul(s,u),h=pa._mul(l,u),d=pa._mul(s,c),f=_,p=(pa._mul(l,c)+(d>>>16)|0)+(h>>>16)|0;if(f=f+(d<<=16)|0,pa.ucompare(f,d)<0){p++;p|=0}if(f=f+(h<<=16)|0,pa.ucompare(f,h)<0){p++;p|=0}p=p+(pa._mul(t.low,n.high)+pa._mul(t.high,n.low)|0)|0;var g=new Zn(p,f),v=new Zn(0,m.parseInt(e.charAt(a))),y=g.high+v.high|0,S=g.low+v.low|0;if(pa.ucompare(S,g.low)<0){y++;y|=0}t=new Zn(y,S)}return t},O.getHigh=function(e){return e.high},O.getLow=function(e){return e.low},O.idStr=function(e){return"_"+e.high+"_"+e.low},O.makeFromIdStr=function(e){var t=new o("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?new Zn(m.parseInt(t.matched(1)),m.parseInt(t.matched(2))):null},O.fromNullableIdStr=function(e){return null!=e?O.makeFromIdStr(e):null},O.toStr=function(e){return ga.toString(e)},O.isNeg=function(e){return e.high<0},O.add=function(e,t){var n=e.high+t.high|0,i=e.low+t.low|0;if(pa.ucompare(i,e.low)<0){n++;n|=0}return new Zn(n,i)},O.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;if(pa.ucompare(e.low,t.low)<0){n--;n|=0}return new Zn(n,i)},O.compare=function(e,t){var n=e.high-t.high|0;return n=0!=n?n:pa.ucompare(e.low,t.low),e.high<0?t.high<0?n:-1:t.high>=0?n:1},O.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},O.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},O.toFloat=function(e){var t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)},O.idStrToInt64=function(e){var t=e.split("_");return t.length>2?new Zn(m.parseInt(t[1]),m.parseInt(t[2])):null},O.decrement=function(e){if(null==e)return null;var t=new Zn(0,1),n=e.high-t.high|0,i=e.low-t.low|0;if(pa.ucompare(e.low,t.low)<0){n--;n|=0}return new Zn(n,i)},O.increment=function(e){if(null==e)return null;var t=new Zn(0,1),n=e.high+t.high|0,i=e.low+t.low|0;if(pa.ucompare(i,e.low)<0){n++;n|=0}return new Zn(n,i)},O.unique=function(e){if(null==e)return[];for(var t=[],n=0,i=e.length;n>31,t)},O.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;nt?1:e0&&a.push(new en(d.id,f))}}}else{for(var w=[],T=(s.iter(n),0);T0&&a.push(new en(r.id,w))}0==a.length?this.sendNotification("update_profile_responsed",this.dataStore.me):this.api.updateProfile(a)}},__class__:Ae});var be=function(){V.call(this)};n["albero.command.UpdateUserCommand"]=be,be.__name__=["albero","command","UpdateUserCommand"],be.__super__=V,be.prototype=r(V.prototype,{execute:function(e){var t=e.getBody();if(null!=t.profileImage){var n=t.profileImage;if(!g.startsWith(n.type,"image/"))return}this.api.updateUser(t.displayName,t.profileImage,t.profileImageUrl,t.phoneticDisplayName,t.status)},__class__:be});var De=function(){V.call(this)};n["albero.command.UpdateUserPresencesCommand"]=De,De.__name__=["albero","command","UpdateUserPresencesCommand"],De.__super__=V,De.prototype=r(V.prototype,{execute:function(e){var t=e.getBody().domainId,n=e.getBody().userIds;if(null!=t&&null!=n){var i=this.filterOnlyExpired(O.unique(n));0!=i.length&&this.updateIfNeedPerSub(t,i)}},filterOnlyExpired:function(e){var t=this,n=b.nowAsInt64(),i=this.settings.getConfiguration().presenceExpiration,r=new Zn(i>>31,i);return e.filter(function(e){var i=x.map(t.userPresences.getUserPresence(e),function(e){return e.isExpired(n,r)});switch(i[1]){case 0:return i[2];case 1:return!0}})},updateIfNeedPerSub:function(e,t){for(var n=this,i=Promise.resolve([]),r=O.splitUsingMaxCount(t,100),a=0;a0?e.createAttachmentErrorMessageByNetwork(n):t.createAttachmentErrorMessageByDomain(n)},Le.prototype={compareStrongness:function(e){return this.getStrongness()-e.getStrongness()},getStrongness:function(){switch(this.value[1]){case 0:return 40;case 2:return 30;case 3:return 20;case 4:return 10;case 1:case 5:return 0}},createAttachmentErrorMessageByDomain:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return Zi.localize("AllowAttachmentType.ban_attach_file")+e;case 2:return Zi.localize("AllowAttachmentType.ban_attach_file_without_img")+e;case 3:return Zi.localize("AllowAttachmentType.ban_attach_file_without_img_movie")+e;case 4:return Zi.localize("AllowAttachmentType.ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentErrorMessageByNetwork:function(e){switch(null==e&&(e=""),this.value[1]){case 0:return Zi.localize("AllowAttachmentType.network_ban_attach_file")+e;case 2:return Zi.localize("AllowAttachmentType.network_ban_attach_file_without_img")+e;case 3:return Zi.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie")+e;case 4:return Zi.localize("AllowAttachmentType.network_ban_attach_file_without_img_movie_sound")+e;default:return""}},createAttachmentFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:return function(e){return new o("image.*","").match(e.type)};case 3:return function(e){return new o("image.*|video.*","").match(e.type)};case 4:return function(e){return new o("image.*|video.*|audio.*","").match(e.type)};default:return function(e){return!0}}},createDataTransferItemFilter:function(){switch(this.value[1]){case 0:return function(e){return!1};case 2:var e=new o("image.*","");return function(t){return e.match(t.type)};case 3:var t=new o("image.*|video.*","");return function(e){return t.match(e.type)};case 4:var n=new o("image.*|video.*|audio.*","");return function(e){return n.match(e.type)};default:return function(e){return!0}}},__class__:Le};var Be=function(e){null!=e&&(this.id=e.announcement_id,this.domainId=e.domain_id,this.groupId=e.group_id,this.groupName=e.group_name,this.type=Lt.typeOf(e.type),this.content=e.content,this.userId=e.user_id,this.userName=e.user_name,this.createdAt=e.created_at)};n["albero.entity.Announcement"]=Be,Be.__name__=["albero","entity","Announcement"],Be.prototype={getDisplayTextWithoutEscape:function(){return Lt.getDisplayTextWithoutEscape(this.type,this.content)},getNotificatoinTextWithoutEscape:function(e){switch(null==e&&(e=this.userName),null==e&&(e=""),this.type[1]){case 1:case 7:return e+":"+this.getDisplayTextWithoutEscape();default:return $i._e("["+s.dateStr(new Date)+"] ","Unsupported announcement.type is detected. announcment:%o",this,"","",""),Lt.getUnsupportText()}},__class__:Be};var He=function(e){this.unreadCount=0,null!=e&&(this.domainId=e.domain_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.maxAnnouncementId=e.max_announcement_id,null!=e.max_announcement&&(this.maxAnnouncement=new Be(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id)};n["albero.entity.AnnouncementStatus"]=He,He.__name__=["albero","entity","AnnouncementStatus"],He.prototype={updateReadWithStatusUpdate:function(e){var t=0,n=null;if(null!=e.readAnnouncementIds)for(var i=0,r=e.readAnnouncementIds;i=0?l:1)>0}else a=!0;if(a){var u;if(null!=n){var c=o.high-n.high|0;c=0!=c?c:pa.ucompare(o.low,n.low),u=(o.high<0?n.high<0?c:-1:n.high>=0?c:1)>0}else u=!0;u&&(n=o),++t}}null!=n&&this.read(n,t)},updateByAnnouncementDeletion:function(e){var t,n=!1;if(this.isUnread(e)&&(this.decrementUnreadCount(1),n=!0),null!=this.maxAnnouncementId){var i=this.maxAnnouncementId;t=null!=i&&null!=e&&i.high==e.high&&i.low==e.low}else t=!1;return t&&null!=this.maxAnnouncement&&(this.maxAnnouncement.type=Bt.deleted,this.maxAnnouncement.content="",n=!0),n},updateByAnnouncement:function(e){this.isNewMax(e.id)&&(this.maxAnnouncementId=e.id,this.maxAnnouncement=e),this.unreadCount++},updateByReadingAnnouncements:function(e){if(null==e||this.canRegardAnnouncementReadCountZero(e)){if(!Ye.isUnreadAnnouncementExisted(this))return!1;if(null==this.maxAnnouncementId)return!1;this.readAll()}else{var t=e.filter(uo(this,this.isUnread));if(0==t.length)return!1;this.read(t[t.length-1],t.length)}return!0},canRegardAnnouncementReadCountZero:function(e){var t=this.maxAnnouncementId,n=x.orNull(F.lastOption(e));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},read:function(e,t){this.maxReadAnnouncementId=e,this.decrementUnreadCount(t);this.domainId,this.maxReadAnnouncementId,this.unreadCount},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},readAll:function(){this.maxReadAnnouncementId=this.maxAnnouncementId,this.unreadCount=0},isUnread:function(e){if(null!=this.maxReadAnnouncementId){var t=this.maxReadAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:pa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxAnnouncementId){var t=this.maxAnnouncementId,n=t.high-e.high|0;return n=0!=n?n:pa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},__class__:He};var Ye=function(){};n["albero.entity.AnnouncementStatusHelper"]=Ye,Ye.__name__=["albero","entity","AnnouncementStatusHelper"],Ye.isUnreadAnnouncementExisted=function(e){return null!=e&&(null!=e.maxAnnouncement&&e.isUnread(e.maxAnnouncement.id))},Ye.hasAnnouncement=function(e,t){return!(null==e||!e.role.allowReadAnnouncements||null==t)&&null!=t.maxAnnouncementId};var Ge=function(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)};n["albero.entity.AnnouncementStatusUpdate"]=Ge,Ge.__name__=["albero","entity","AnnouncementStatusUpdate"],Ge.prototype={__class__:Ge};var ze=function(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.talkAutoScroll=1,this.talksSortMode="new_messages_first",this.keywordWatchingText="",this.keywordWatchingEmphasis=!1,this.keywordWatchingSelfMessage=!1,this.keywordWatchingActionReply=!1,this.userDataContainer=[],this.language="ja",this.conferenceIncomingSound=!0,null!=e){if(null!=e.notificationInvisibleTalkSound&&(this.notificationInvisibleTalkSound=e.notificationInvisibleTalkSound),null!=e.notificationInvisibleTalkPopup&&(this.notificationInvisibleTalkPopup=e.notificationInvisibleTalkPopup),null!=e.notificationVisibleTalkSound&&(this.notificationVisibleTalkSound=e.notificationVisibleTalkSound),null!=e.notificationVisibleTalkPopup&&(this.notificationVisibleTalkPopup=e.notificationVisibleTalkPopup),null!=e.notificationIncludingMessageContent&&(this.notificationIncludingMessageContent=e.notificationIncludingMessageContent),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),null!=e.keywordWatchingText&&(this.keywordWatchingText=e.keywordWatchingText),null!=e.keywordWatchingEmphasis&&(this.keywordWatchingEmphasis=e.keywordWatchingEmphasis),null!=e.keywordWatchingSelfMessage&&(this.keywordWatchingSelfMessage=e.keywordWatchingSelfMessage),null!=e.keywordWatchingActionReply&&(this.keywordWatchingActionReply=e.keywordWatchingActionReply),null!=e.userDataContainer)for(var t=0,n=za.__cast(e.userDataContainer,Array);t=0?n:n+4294967296)+We.INCOMING_TIME<(new Date).getTime()},isExpired:function(){var e=this.expiredAt,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)<(new Date).getTime()},__class__:We};var Ve=function(e){null!=e&&(this.maxFriends=e.max_friends,this.maxTalks=e.max_talks,this.maxTalkers=e.max_talkers,this.maxMessageContentLength=e.max_message_content_length,this.botExpiredVersion=e.bot_expired_version,this.presenceExpiration=null!=e.presence_expiration?e.presence_expiration:Ve.DEFAULT_PRESENCE_EXPIRATION,this.allowAttachmentType=Le.fromInt(e.allow_attachment_type),this.imageSanitizationEnabled=!!e.image_sanitization_enabled)};n["albero.entity.Configuration"]=Ve,Ve.__name__=["albero","entity","Configuration"],Ve.prototype={__class__:Ve};var qe=function(e){this.contractConference=ka.None,null!=e&&(this.id=e.contract_id,this.plan=new Qt(e.plan),this.quota=new _n(e.quota),this.solutionIds=e.solution_ids,null!=e.conference&&(this.contractConference=ka.Some(new Qe(e.conference))))};n["albero.entity.Contract"]=qe,qe.__name__=["albero","entity","Contract"],qe.prototype={getMaxMessageContentLength:function(){return x.map(x.option(this.quota),function(e){return e.maxMessageContentLength})},getMaxTalkers:function(){return x.flatMap(x.option(this.quota),function(e){return x.option(e.maxTalkers)})},getMaxTalks:function(){return x.flatMap(x.option(this.quota),function(e){return x.option(e.maxTalks)})},isConferenceEnalbed:function(){return x.isDefined(this.contractConference)},isVideoEnalbed:function(){var e=x.map(this.contractConference,function(e){return e.videoEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},getConferenceTtl:function(){return x.map(this.contractConference,function(e){return e.ttl})},getConferenceMaxParticipants:function(){return x.map(this.contractConference,function(e){return e.maxConferenceParticipants})},isGroupConfenreceEnalbed:function(){var e=x.map(this.contractConference,function(e){return e.groupConferenceEnabled});switch(e[1]){case 0:return e[2];case 1:return!1}},isTargetOfPlanAd:function(){return null!=this.quota&&this.quota.withAd},isFreePlan:function(){return null!=this.plan&&this.plan.free},__class__:qe};var Qe=function(e){this.groupConferenceEnabled=!1,this.maxConferenceParticipants=Qe.DEFAULT_MAX_PARTICIPANTS,this.ttl=Qe.DEFAULT_TTL,this.videoEnabled=!1,null!=e&&(this.videoEnabled=e.video_enabled,this.ttl=e.ttl,this.maxConferenceParticipants=e.max_conference_participants,this.groupConferenceEnabled=e.group_conference_enabled)};n["albero.entity.ContractConference"]=Qe,Qe.__name__=["albero","entity","ContractConference"],Qe.prototype={__class__:Qe};var Je=function(e){if(null!=e){switch(this.id=e.department_id,this.order=e.order,this.parentId=e.parent,this.nodeType=null==e.node?Ze.Normal:this.parseDepartmentNodeType(e.node),this.nodeType[1]){case 0:this.name=e.name;break;case 1:this.name=Je.getLabelRoot();break;case 2:this.name=Je.getLabelFree()}this.depth=0,this.childrenIds=null,this.userCount=null,this.userIds=null,this.userCountLoading=!1}};n["albero.entity.Department"]=Je,Je.__name__=["albero","entity","Department"],Je.getLabelFree=function(){return Zi.localize("Department.label_free")},Je.getLabelRoot=function(){return Zi.localize("Department.label_root")},Je.prototype={addChild:function(e){null==this.childrenIds&&(this.childrenIds=[]),this.childrenIds.push(e)},isRoot:function(){return this.nodeType==Ze.Root},isFree:function(){return this.nodeType==Ze.Free},parseDepartmentNodeType:function(e){switch(e){case 1:return Ze.Root;case 2:return Ze.Free;default:return Ze.Normal}},getChildIdStrList:function(){return null==this.childrenIds?[]:this.childrenIds.map(O.idStr)},__class__:Je};var Xe=function(){};n["albero.entity.DepartmentHelper"]=Xe,Xe.__name__=["albero","entity","DepartmentHelper"],Xe.getName=function(e){return null==e?null:e.name};var Ze=n["albero.entity.DepartmentNodeType"]={__ename__:["albero","entity","DepartmentNodeType"],__constructs__:["Normal","Root","Free"]};Ze.Normal=["Normal",0],Ze.Normal.toString=i,Ze.Normal.__enum__=Ze,Ze.Root=["Root",1],Ze.Root.toString=i,Ze.Root.__enum__=Ze,Ze.Free=["Free",2],Ze.Free.toString=i,Ze.Free.__enum__=Ze,Ze.__empty_constructs__=[Ze.Normal,Ze.Root,Ze.Free];var $e=function(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))};n["albero.entity.DepartmentList"]=$e,$e.__name__=["albero","entity","DepartmentList"],$e.prototype={getDepartments:function(e){return null==e?[]:e.map(function(e){return new Je(e)})},__class__:$e};var et=function(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)};n["albero.entity.DepartmentUserCount"]=et,et.__name__=["albero","entity","DepartmentUserCount"],et.prototype={__class__:et};var tt=function(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))};n["albero.entity.DepartmentUserCountList"]=tt,tt.__name__=["albero","entity","DepartmentUserCountList"],tt.prototype={getDepartmentUserCounts:function(e){return null==e?[]:e.map(function(e){return new et(e)})},__class__:tt};var nt=function(e,t){if(null!=e){if(this.id=O.fromIntOrInt64(e.direct_app_id),this.uniqueKey=e.unique_key,this.appUrl=e.app_url,this.locales=new Oa,null!=e.locales)for(var n=0,i=f.fields(e.locales);n-1)return!0;break}}}return!1},matchNameOrPhonetic:function(e){if(P.isEmpty(e))return!0;if(P.isEmpty(this.canonicalDisplayName)){this.canonicalDisplayName=rr.canonicalize(this.displayName);this.canonicalDisplayName,this.displayName}return this.canonicalDisplayName.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&this.canonicalPhoneticDisplayName.indexOf(e)>-1},matchNameOrPhoneticRoman:function(e){if(this.matchNameOrPhonetic(e))return!0;if(P.isEmpty(this.canonicalDisplayNameRoman)){this.canonicalDisplayNameRoman=rr.canonicalizeForRoman(this.displayName);this.canonicalDisplayNameRoman,this.displayName}return this.canonicalDisplayNameRoman.indexOf(e)>-1||null!=this.canonicalPhoneticDisplayName&&(P.isEmpty(this.canonicalPhoneticDisplayNameRoman)&&(this.canonicalPhoneticDisplayNameRoman=rr.canonicalizeForRoman(this.canonicalPhoneticDisplayName)),this.canonicalPhoneticDisplayNameRoman.indexOf(e)>-1)},__class__:vt});var yt=function(e){this.values=e};n["albero.entity.Domains"]=yt,yt.__name__=["albero","entity","Domains"],yt.prototype={orderByName:function(){var e=F.sortAndReturn(this.values.map(St.fromDomain),St.compare).map(St.toDomain);return new yt(e)},getOldestDomain:function(){return null==this.values||0==this.values.length?ka.None:l.fold(this.values,function(e,t){switch(x.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:pa.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0})[1]){case 0:return x.filter(t,function(t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:pa.ucompare(n.low,i.low),(n.high<0?i.high<0?r:-1:i.high>=0?r:1)<=0});case 1:return ka.Some(e)}},ka.None)},getDirectAppsIds:function(){if(null==this.values||0==this.values.length)return[];var e=new Oa;return l.iter(this.values,function(t){l.iter(t.directAppsSetting.enabled,function(t){var n="_"+t.high+"_"+t.low;null!=No[n]?e.setReserved(n,t):e.h[n]=t})}),R.toValueArray(e)},__class__:yt};var St=function(e){this.domain=e,this.name=e.domainInfo.name,this.canonicalizedName=rr.canonicalize(this.name)};n["albero.entity.DomainForSort"]=St,St.__name__=["albero","entity","DomainForSort"],St.fromDomain=function(e){return new St(e)},St.toDomain=function(e){return e.domain},St.compare=function(e,t){var n=P.compare(e.canonicalizedName,t.canonicalizedName);return 0!=n?n:P.compare(e.name,t.name)},St.prototype={__class__:St};var wt=function(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new Tt(e.get_headers))};n["albero.entity.DownloadAuth"]=wt,wt.__name__=["albero","entity","DownloadAuth"],wt.prototype={__class__:wt};var Tt=function(e){this.rawData=e};n["albero.entity.DownloadAuthHeaders"]=Tt,Tt.__name__=["albero","entity","DownloadAuthHeaders"],Tt.prototype={__class__:Tt};var It=function(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version)};n["albero.entity.FavoriteTalkEvent"]=It,It.__name__=["albero","entity","FavoriteTalkEvent"],It.prototype={__class__:It};var Et=function(e){this.uploadResult=Nt.NONE,this.thumbnailDimension=ka.None,null!=e&&(this.attachmentId=e.attachment_id,this.messageId=e.message_id,this.talkId=e.talk_id,this.id=e.file_id,this.userId=e.user_id,this.name=e.name,this.contentType=e.content_type,this.contentSize=e.content_size,this.url=e.url,this.thumbUrl=e.thumbnail_url,this.updatedAt=e.updated_at,this.file=e.file,this.localThumbInfo=e.localThumbInfo,this.thumbnailDimension=ka.None,this.deleted=null!=e.deleted&&e.deleted)};n["albero.entity.FileInfo"]=Et,Et.__name__=["albero","entity","FileInfo"],Et.fromMessageAndFile=function(e,t){var n=new Et;return n.messageId=e.id,n.talkId=e.talkId,n.userId=e.userId,n.updatedAt=e.createdAt,n.id=t.file_id,n.name=t.name,n.contentType=t.content_type,n.contentSize=t.content_size,n.url=t.url,n.thumbUrl=t.thumbnail_url,n.thumbnailDimension=null==t.thumbnail_dimension?ka.None:ka.Some(new Vn(t.thumbnail_dimension)),n.deleted=null!=t.deleted&&t.deleted,n.file=t.file,n.localThumbInfo=t.localThumbInfo,n},Et.fromMessageAndFileWithFileId=function(e,t,n){var i=Et.fromMessageAndFile(e,t);return i.id=n,i},Et.prototype={isRemote:function(){return null==this.file},isUploaded:function(){if(this.isRemote())return!0;switch(this.uploadResult[1]){case 0:return!0;case 1:case 2:return!1}},isUploadFailed:function(){if(this.isRemote())return!1;switch(this.uploadResult[1]){case 1:return!0;case 0:case 2:return!1}},setUploadResult:function(e){this.uploadResult=e},isNotUploaded:function(){return!this.isUploaded()},hasThumb:function(){return null!=this.thumbUrl||this.hasLocalThumbInfo()},hasLocalThumbInfo:function(){return null!=this.localThumbInfo},hasLocalFile:function(){return null!=this.file},hasUrl:function(){return null!=this.url},isImage:function(){return g.startsWith(this.contentType,"image/")},isImageGif:function(){return g.startsWith(this.contentType,"image/gif")},isImageJpeg:function(){return g.startsWith(this.contentType,"image/jpeg")},isPdf:function(){return g.startsWith(this.contentType,"application/pdf")},isVideo:function(){return g.startsWith(this.contentType,"video/")},canDisplayAsThumb:function(){return!!this.hasThumb()||this.isImage()},getNoThumbText:function(){return null!=this.name?this.name:this.url},getUploadedFileData:function(){if(null==this.file){var e={url:this.url,content_type:this.contentType,content_size:this.contentSize,name:this.name,file_id:this.id};return null!=this.thumbUrl&&(e.thumbnail_url=this.thumbUrl),x.isDefined(this.thumbnailDimension)&&(e.thumbnail_dimension=x.get(this.thumbnailDimension)),e}var t=this.uploadResult;switch(t[1]){case 0:return t[2];case 1:case 2:return $i._e("["+s.dateStr(new Date)+"] ","file not uploaded.","","","",""),null}},addLocalFile:function(e){this.file=e},addLocalThumbInfo:function(e){this.localThumbInfo=e},getUploadableFilePack:function(){return{file:this.file,thumb:this.localThumbInfo}},__class__:Et};var Nt=n["albero.entity.UploadResult"]={__ename__:["albero","entity","UploadResult"],__constructs__:["SUCCESS","FAILUER","NONE"]};Nt.SUCCESS=function(e){var t=["SUCCESS",0,e];return t.__enum__=Nt,t.toString=i,t},Nt.FAILUER=["FAILUER",1],Nt.FAILUER.toString=i,Nt.FAILUER.__enum__=Nt,Nt.NONE=["NONE",2],Nt.NONE.toString=i,Nt.NONE.__enum__=Nt,Nt.__empty_constructs__=[Nt.FAILUER,Nt.NONE];var At=function(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])};n["albero.entity.FileInfoDeletion"]=At,At.__name__=["albero","entity","FileInfoDeletion"],At.prototype={__class__:At};var bt=function(e){null!=e&&(this.domainId=e.domain_id,this.show=e.show,this.updatedAt=e.updated_at,this.version=e.version)};n["albero.entity.FlowNotificationBadge"]=bt,bt.__name__=["albero","entity","FlowNotificationBadge"],bt.prototype={__class__:bt};var Dt=function(){};n["albero.entity.FlowNotificationBadgeStore"]=Dt,Dt.__name__=["albero","entity","FlowNotificationBadgeStore"],Dt.prototype={clear:function(){this.badgeMap=new Oa},setBadge:function(e,t){null==this.badgeMap&&(this.badgeMap=new Oa);var n="_"+e.high+"_"+e.low,i=this.badgeMap;null!=No[n]?i.setReserved(n,t):i.h[n]=t},getBadge:function(e){if(null==this.badgeMap)return null;var t="_"+e.high+"_"+e.low,n=this.badgeMap;return null!=No[t]?n.getReserved(t):n.h[t]},removeBadge:function(e){if(null!=this.badgeMap){var t="_"+e.high+"_"+e.low;this.badgeMap.remove(t)}},isBadgeShownForOneDomain:function(e){return null!=e&&this.isBadgeShown("_"+e.high+"_"+e.low)},isBadgeShown:function(e){if(null==this.badgeMap)return!1;var t=this.badgeMap,n=null!=No[e]?t.getReserved(e):t.h[e];return null!=n&&n.show},__class__:Dt};var kt=function(e){null!=e&&(this.talkId=e.talk_id,null!=e.messages&&(this.messages=za.__cast(e.messages,Array).map(function(e){return new Ct(e)})))};n["albero.entity.HitContext"]=kt,kt.__name__=["albero","entity","HitContext"],kt.prototype={findHitMessage:function(e){return l.find(this.messages,function(t){var n=t.id;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low})},__class__:kt};var Ct=function(e){null!=e&&(this.id=e.message_id,this.talkId=e.talk_id,this.userId=e.user_id,this.type=Lt.typeOf(e.type),this.content=e.content,this.createdAt=e.created_at,this.hit=e.hit)};n["albero.entity.HitMessage"]=Ct,Ct.__name__=["albero","entity","HitMessage"],Ct.prototype={__class__:Ct};var Ot=function(){};n["albero.entity.IdSpec"]=Ot,Ot.__name__=["albero","entity","IdSpec"],Ot.timestamp=function(e){var t=Ot.TIMESTAMP_SHIFT;return 0==(t&=63)?new Zn(e.high,e.low):t<32?new Zn(e.high>>t,e.high<<32-t|e.low>>>t):new Zn(e.high>>31,e.high>>t-32)},Ot.subTimestampPart=function(e,t){var n=Ot.timestamp(e),i=Ot.timestamp(t),r=n.high-i.high|0,a=n.low-i.low|0;if(pa.ucompare(n.low,i.low)<0){r--;r|=0}return new Zn(r,a)},Ot.createForTest=function(e){var t=Ot.TIMESTAMP_SHIFT;return 0==(t&=63)?new Zn(e.high,e.low):t<32?new Zn(e.high<>>32-t,e.low<0||this.credential.ttl0?this.content.text:"";case 7:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 13:return[this.content.question,Zi.localize("MessageStringMaker.yes"),Zi.localize("MessageStringMaker.no")].join(" ");case 14:return e&&null!=this.content.response?this.content.response?Zi.localize("MessageStringMaker.yes"):Zi.localize("MessageStringMaker.no"):"";case 15:return null!=this.content.options?m.string(this.content.question)+" "+m.string(this.content.options.join(" ")):this.content.question;case 16:return e&&null!=this.content.response&&null!=this.content.options&&this.content.options.length>this.content.response?this.content.options[this.content.response]:"";case 17:return[this.content.title,Zi.localize("MessageStringMaker.achieve"),Zi.localize("MessageStringMaker.remand")].join(" ");case 18:return e&&null!=this.content.done?this.content.done?Zi.localize("MessageStringMaker.achieve"):Zi.localize("MessageStringMaker.remand"):"";case 19:case 20:case 21:default:return""}},messageStringForBookmark:function(){switch(this.type[1]){case 1:return this.content;case 5:if(null!=this.content.text&&this.content.text.length>0)return this.content.text;break;case 7:return Zi.localize("Message.bookmark_label_deleted");case 8:return[Zi.localize("Message.bookmark_label_note_shared"),new wi(this.content).title].join(" ");case 10:return[Zi.localize("Message.bookmark_label_note_created"),new wi(this.content).title].join(" ");case 11:return[Zi.localize("Message.bookmark_label_note_updated"),new wi(this.content).title].join(" ");case 2:case 12:if(null!=this.content.text&&this.content.text.length>0)return[Zi.localize("Message.bookmark_label_stamp"),this.content.text].join(" ");break;case 14:case 16:return[Zi.localize("Message.bookmark_label_answer"),this.content.question].join(" ");case 13:case 15:return[Zi.localize("Message.bookmark_label_question"),this.content.question].join(" ");case 17:return[Zi.localize("Message.bookmark_label_task"),this.content.title].join(" ");case 18:return[this.content.done?Zi.localize("Message.bookmark_label_completed"):Zi.localize("Message.bookmark_label_reverted"),this.content.title].join(" ");case 19:case 20:return[Zi.localize("Message.bookmark_label_closed"),this.content.question].join(" ");case 21:return[Zi.localize("Message.bookmark_label_closed"),this.content.title].join(" ")}return""},getContentsForNote:function(){switch(this.type[1]){case 8:case 10:case 11:return new wi(this.content);default:return null}},messageStringRaw:function(){switch(this.type[1]){case 0:return"";case 1:return this.content;case 3:case 4:return"";case 5:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 8:case 9:case 10:case 11:return"";case 2:case 12:return null!=this.content.text&&this.content.text.length>0?this.content.text:"";case 14:case 16:return"";case 13:case 15:return this.content.question;case 17:return this.content.title;case 18:return"";case 19:case 20:case 21:case 22:default:return""}},getContentsForNoteDelete:function(){return 9==this.type[1]?new Ti(this.content):null},getContentsForOriginalStamp:function(){return 12==this.type[1]?new Ii(this.content):null},isAllowedToDelete:function(e){return!!(this.isSentBy(e)&&this.isNotSystemMessage()&&this.isNotActionStampMessage()&&this.isNotNoteMessage())&&this.isNotDeletedMessage()},isAllowedToReply:function(e){return!(!this.isNotSentBy(e)||!this.isNotSystemMessage())&&this.isNotDeletedMessage()},isAllowedToQuote:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToCopy:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotFileMessage()&&this.isNotStampMessageWithEmptyText())&&this.isNotTextMultipleFileWithEmptyText()},isAllowedToForward:function(e){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotActionStampMessage()&&this.isNotDeletedFileMessage(e)&&this.isNotTextMultipleFileAllDeletedWithEmptyText(e)&&this.isNotNoteMessage())&&this.isNotOpenConference()},isAllowedToForwardOnOnlyTextOrStamp:function(){return!(!this.isTextMessage()&&!this.isStampMessage())||this.isTextMultipleFileWithText()},isAllowedToAddToFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isNotFavorite()},isAllowedToRemoveFromFavorites:function(){return!!(this.isNotSystemMessage()&&this.isNotDeletedMessage()&&this.isNotOpenConference()&&this.isNotStampMessageWithEmptyText()&&this.isNotNoteDeletedMessage())&&this.isFavorite()},isMatchCategory:function(e){switch(e[1]){case 0:return!!(this.isTextMessage()||this.isFileMessage()||this.isTextMultipleFile())||this.isStampMessageWithText();case 1:return!1}},isSentBy:function(e){var t=this.userId;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},isNotSentBy:function(e){return!this.isSentBy(e)},isSystemMessage:function(){return this.type==Bt.system},isNotSystemMessage:function(){return!this.isSystemMessage()},isActionStampMessage:function(){return this.type==Bt.yesOrNo||this.type==Bt.yesOrNoReply||this.type==Bt.selectOne||this.type==Bt.selectOneReply||this.type==Bt.todo||this.type==Bt.todoDone||this.type==Bt.yesOrNoClosed||this.type==Bt.selectOneClosed||this.type==Bt.todoClosed},isNotActionStampMessage:function(){return!this.isActionStampMessage()},isReplyActionStampMessage:function(){return this.type==Bt.selectOneReply||this.type==Bt.yesOrNoReply||this.type==Bt.todoDone},isClosedActionStampMessage:function(){return this.type==Bt.yesOrNoClosed||this.type==Bt.selectOneClosed||this.type==Bt.todoClosed},isSendingActionStampMessage:function(){return this.type==Bt.yesOrNo||this.type==Bt.selectOne||this.type==Bt.todo},isNoteMessage:function(){return this.type==Bt.noteShared||this.type==Bt.noteDeleted||this.type==Bt.noteCreated||this.type==Bt.noteUpdated},isNoteDeletedMessage:function(){return this.type==Bt.noteDeleted},isNotNoteMessage:function(){return!this.isNoteMessage()},isNotNoteDeletedMessage:function(){return!this.isNoteDeletedMessage()},isDeletedMessage:function(){return this.type==Bt.deleted},isNotDeletedMessage:function(){return!this.isDeletedMessage()},isFileMessage:function(){return this.type==Bt.file},isNotFileMessage:function(){return!this.isFileMessage()},isStampMessage:function(){return this.type==Bt.stamp||this.type==Bt.originalStamp},isNotStampMessage:function(){return!this.isStampMessage()},isStampMessageWithText:function(){return!!this.isStampMessage()&&this.isNotObjectWithEmptyText()},isStampMessageWithEmptyText:function(){return!!this.isStampMessage()&&this.isObjectWithEmptyText()},isNotStampMessageWithEmptyText:function(){return!!this.isNotStampMessage()||this.isNotObjectWithEmptyText()},isObjectWithEmptyText:function(){return P.isEmpty(this.content.text)},isNotObjectWithEmptyText:function(){return!this.isObjectWithEmptyText()},isTextMultipleFile:function(){return this.type==Bt.textMultipleFile},isNotTextMultipleFile:function(){return!this.isTextMultipleFile()},isTextMultipleFileWithText:function(){return!!this.isTextMultipleFile()&&this.isNotObjectWithEmptyText()},isTextMultipleFileWithEmptyText:function(){return!!this.isTextMultipleFile()&&this.isObjectWithEmptyText()},isNotTextMultipleFileWithEmptyText:function(){return!!this.isNotTextMultipleFile()||this.isNotObjectWithEmptyText()},isNotDeletedFileMessage:function(e){return!!this.isNotFileMessage()||!e},isNotTextMultipleFileAllDeletedWithEmptyText:function(e){return!!this.isNotTextMultipleFileWithEmptyText()||!e},isTextMessage:function(){return this.type==Bt.text},isOpenConference:function(){return this.type==Bt.openConference},isNotOpenConference:function(){return!this.isOpenConference()},getInReplyTo:function(){var e=this.type;return $i._i("["+s.dateStr(new Date)+"] ",e,"","","",""),this.isReplyActionStampMessage()||this.isClosedActionStampMessage()?ka.Some(this.content.in_reply_to):ka.None},isNotFavorite:function(){return!this.isFavorite()},isFavorite:function(){return this.favorite.isFavorite()},isNotCalloutHolder:function(){return!(!this.isFileMessage()&&!this.isTextMultipleFileWithEmptyText())||this.isStampMessageWithEmptyText()},close:function(){this.content.closed=!0},updateFavorite:function(e){this.favorite.update(e)},addReadUsersUntillMaxCount:function(e){var t=this;if(!(this.readUserIds.length>=16)){var n=e.filter(function(e){return O.notContains(t.readUserIds,e)});this.readUserIds=this.readUserIds.concat(n).slice(0,16)}},createReadCountText:function(){return this.readUserIds.length>=16?"15+":m.string(this.readUserIds.length)},hasNoReadUsers:function(){return 0==this.readUserIds.length},deleteFile:function(e){var t;switch(this.type[1]){case 4:t=[this.content];break;case 5:t=this.content.files;break;default:t=[]}if(0!=t.length){var n=l.find(t,function(t){var n=t.file_id,i=e.fileId;return null!=n&&null!=i&&n.high==i.high&&n.low==i.low});null!=n&&(n.deleted=!0)}},getQuestionTitle:function(){switch(this.type[1]){case 17:case 18:case 21:return null==this.content.title?"":this.content.title;case 13:case 14:case 15:case 16:case 19:case 20:return null==this.content.question?"":this.content.question;default:return""}},getChoiceCloseResponse:function(e){var t=Zi.localize("QuestionHelper.close_answer")+"\n";if(null==this.content.responses)t+="...";else{var n=this.content.responses,i=this.content.last_response;if(0==un.closingTypeOf(this.content.closing_type)[1])t+=null!=i?Zi.localize("QuestionHelper.last_response",{content:e(n[i].content),interpolation:{escapeValue:!1}}):Zi.localize("QuestionHelper.no_answer");else{t+=null!=i?null==n?"":n.map(function(t){var n=null==t.count?0:t.count;return e(t.content)+": "+n+Zi.localize("QuestionHelper.name")}).join("\n"):Zi.localize("QuestionHelper.no_answer")}}return t},getTodoCloseResponse:function(){var e=Zi.localize("QuestionHelper.close_task")+"\n";if(null==this.content.responses)e+="...";else{var t=this.content.responses,n=this.content.last_response;if(0==un.closingTypeOf(this.content.closing_type)[1]){e+=null!=n&&"DONE"==t[n].content?Zi.localize("QuestionHelper.achieve_task"):Zi.localize("QuestionHelper.not_achieve_task")}else{var i=0;if(null!=t)for(var r=0;r=0?n:1)>0}return!1},timeOveredOrNotExist:function(e,t){return null==e||this.timeOvered(e,t)},__class__:qt};var Qt=function(e){null!=e&&(this.name=e.plan_name,this.trial=!!e.trial,this.free=!!e.free)};n["albero.entity.Plan"]=Qt,Qt.__name__=["albero","entity","Plan"],Qt.prototype={__class__:Qt};var Jt=function(e){null!=e&&(this.domainId=e.domain_id,this.userId=e.user_id,this.itemValues=null,null!=e.item_values&&(this.itemValues=za.__cast(e.item_values,Array).map(function(e){return new $t(e)})))};n["albero.entity.Profile"]=Jt,Jt.__name__=["albero","entity","Profile"],Jt.prototype={__class__:Jt};var Xt=function(e){if(null!=e&&(this.domainId=e.domain_id,null!=e.item_definitions)){this.itemDefinitions=[];for(var t=0,n=za.__cast(e.item_definitions,Array);t=0?o:1)>0&&(this.updatedAt=i,this.maxResponseId=t,this.lastResponse=e,this.lastResponseUserId=n)},__class__:an};var on=n["albero.entity.QuestionFromType"]={__ename__:["albero","entity","QuestionFromType"],__constructs__:["fromSelf","fromOther"]};on.fromSelf=["fromSelf",0],on.fromSelf.toString=i,on.fromSelf.__enum__=on,on.fromOther=["fromOther",1],on.fromOther.toString=i,on.fromOther.__enum__=on,on.__empty_constructs__=[on.fromSelf,on.fromOther];var sn=n["albero.entity.QuestionFilter"]={__ename__:["albero","entity","QuestionFilter"],__constructs__:["onlyClosed","onlyUnclosed","noFilter"]};sn.onlyClosed=["onlyClosed",0],sn.onlyClosed.toString=i,sn.onlyClosed.__enum__=sn,sn.onlyUnclosed=["onlyUnclosed",1],sn.onlyUnclosed.toString=i,sn.onlyUnclosed.__enum__=sn,sn.noFilter=["noFilter",2],sn.noFilter.toString=i,sn.noFilter.__enum__=sn,sn.__empty_constructs__=[sn.onlyClosed,sn.onlyUnclosed,sn.noFilter];var ln=n["albero.entity.QuestionClosingType"]={__ename__:["albero","entity","QuestionClosingType"],__constructs__:["any","all","unknown"]};ln.any=["any",0],ln.any.toString=i,ln.any.__enum__=ln,ln.all=["all",1],ln.all.toString=i,ln.all.__enum__=ln,ln.unknown=["unknown",2],ln.unknown.toString=i,ln.unknown.__enum__=ln,ln.__empty_constructs__=[ln.any,ln.all,ln.unknown];var un=function(){};n["albero.entity.QuestionClosingTypeHelper"]=un,un.__name__=["albero","entity","QuestionClosingTypeHelper"],un.closingTypeOf=function(e){switch(e){case 0:return ln.any;case 1:return ln.all;default:return ln.unknown}};var cn=function(e){this.content=e.content,this.count=null==e.count?0:e.count,this.userIds=null==e.user_ids?[]:e.user_ids};n["albero.entity.QuestionResponse"]=cn,cn.__name__=["albero","entity","QuestionResponse"],cn.prototype={add:function(e){this.contains(e)||(this.count+=1,this.userIds=this.userIds.concat([e]))},sub:function(e){this.contains(e)&&(this.count-=1,this.userIds=this.userIds.filter(function(t){return!(e.high==t.high&&e.low==t.low)}))},contains:function(e){return O.contains(this.userIds,e)},__class__:cn};var _n=function(e){null!=e&&(this.msgRetentionPeriod=e.msg_retention_period,this.msgFileSize=e.msg_file_size,this.maxMessageContentLength=e.max_message_content_length,this.maxTalkers=e.max_talkers,this.maxTalks=e.max_talks,this.withAd=!!e.with_ad)};n["albero.entity.Quota"]=_n,_n.__name__=["albero","entity","Quota"],_n.prototype={__class__:_n};var hn=function(e){if(null!=e&&(this.total=e.total,this.marker=e.marker,this.nextMarker=e.next_marker,this.contents=[],null!=e.contents))for(var t=0,n=za.__cast(e.contents,Array);t>>16,s=65535&t.low,l=t.low>>>16,u=pa._mul(a,s),c=pa._mul(o,s),_=pa._mul(a,l),h=u,d=(pa._mul(o,l)+(_>>>16)|0)+(c>>>16)|0;if(h=h+(_<<=16)|0,pa.ucompare(h,_)<0){d++;d|=0}if(h=h+(c<<=16)|0,pa.ucompare(h,c)<0){d++;d|=0}d=d+(pa._mul(e.low,t.high)+pa._mul(e.high,t.low)|0)|0;var f=new Zn(d,h),p=new Zn(0,m.parseInt(this.commonStampId.charAt(r))),g=f.high+p.high|0,v=f.low+p.low|0;if(pa.ucompare(v,f.low)<0){g++;g|=0}e=new Zn(g,v)}return e},__class__:Nn};var An=function(e,t,n){this.stampsetId=e,this.id=t,this.illust=n};n["albero.entity.OriginalStamp"]=An,An.__name__=["albero","entity","OriginalStamp"],An.__interfaces__=[En],An.fromJson=function(e){if(null==e.originalStamp)return null;var t=e.originalStamp;if(null==t.stampsetIdStr||null==t.stampIdStr)return null;var n=O.makeFromIdStr(t.stampsetIdStr),i=O.makeFromIdStr(t.stampIdStr);return new An(n,i,t.illust)},An.fromPropsAndStampsetId=function(e,t){return new An(t,O.fromIntOrInt64(e.id),e.illust)},An.createKey=function(e){return"original__"+e.high+"_"+e.low},An.prototype={getImageUrl:function(){return this.illust},getKey:function(){return An.createKey(this.id)},toJson:function(){var e=this.stampsetId,t=this.id;return{originalStamp:{stampsetIdStr:"_"+e.high+"_"+e.low,stampIdStr:"_"+t.high+"_"+t.low,illust:this.illust}}},createMessage:function(e,t){var n=new Lt;return n.talkId=e,n.type=Bt.originalStamp,n.content={stampset_id:this.stampsetId,stamp_id:this.id},null!=t&&0!=t.length&&(n.content.text=t),n},__class__:An};var bn=function(e,t,n,i){this.stampsetType=e,this.name=t,this.icon=n,this.version=i,this.stamps=[]};n["albero.entity.Stampset"]=bn,bn.__name__=["albero","entity","Stampset"],bn.historyStampset=function(){return new bn(On.getHistoryStampsetType(),"stamp-history",null,0)},bn.commonStampset=function(e,t,n){return new bn(On.fromCommonStampCategoryIndex(e),t,"./images/stamp/3/"+n,0)},bn.originalStampset=function(e){var t=O.fromIntOrInt64(e.stampset_id),n=On.fromStampsetId(t),i=new bn(n,e.name,e.icon,e.version);if(null!=e.stamps){var r=za.__cast(e.stamps,Array).map(function(e){return An.fromPropsAndStampsetId(e,t)});i.setStamps(r)}return i},bn.fromStampsetInfo=function(e){var t=On.fromStampsetId(e.stampsetId);return new bn(t,e.name,e.icon,e.version)},bn.prototype={toTabId:function(){return this.stampsetType.toTabId()},getIconUrl:function(){return this.icon},isStampHistory:function(){return"stamp-history"==this.name},isOriginalStampset:function(){return this.stampsetType.isOriginalStampset()},isEmpty:function(){return 0==this.stamps.length},setStamps:function(e){this.stamps=e},getStamps:function(){return this.stamps},isOlderThan:function(e){return this.versione.version},__class__:Dn};var kn=function(e){this.stampsetInfos=[],this.allowCreateMessageStampsetIds=[],this.version=0,null!=e&&(this.version=e.version,this.allowCreateMessageStampsetIds=e.allow_create_message_stampset_ids.map(O.fromIntOrInt64),this.stampsetInfos=this.getStampsetInfos(e.stampset_infos))};n["albero.entity.StampsetSetting"]=kn,kn.__name__=["albero","entity","StampsetSetting"],kn.prototype={getStampsetInfos:function(e){return null==e?[]:e.map(function(e){return new Dn(e)})},isForwardForbidden:function(e){var t=e.getContentsForOriginalStamp(),n=null==t?null:t.stampsetId;return null!=n&&!this.containSendableStampset(n)},containSendableStampset:function(e){return null!=this.allowCreateMessageStampsetIds&&l.exists(this.allowCreateMessageStampsetIds,function(t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low})},containVisibleStampset:function(e){return l.exists(this.stampsetInfos,function(t){var n=t.stampsetId;return null!=e&&null!=n&&e.high==n.high&&e.low==n.low})},getSendableStampsetInfos:function(){var e=this;return null==this.stampsetInfos?[]:null==this.allowCreateMessageStampsetIds?[]:this.stampsetInfos.filter(function(t){return e.containSendableStampset(t.stampsetId)})},isNewerThan:function(e){return this.version>e.version},updateStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.map(function(t){return e.eqStampsetId(t)&&e.isNewerThan(t)?e:t})},deleteStampsetInfo:function(e){this.stampsetInfos=this.stampsetInfos.filter(function(t){var n=t.stampsetId;return!(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)}),this.allowCreateMessageStampsetIds=this.allowCreateMessageStampsetIds.filter(function(t){return!(null!=t&&null!=e&&t.high==e.high&&t.low==e.low)})},getStampsetIdsDiff:function(e){for(var t=new Oa,n=e.stampsetInfos.concat(this.stampsetInfos),i=0;i=0?r:1},Pn.prototype={getTalkOrderingTimestamp:function(){return null!=this.status&&null!=this.status.talkOrderingTimestamp?this.status.talkOrderingTimestamp:this.talk.updatedAt},getTalkOrderInFavorites:function(){return null!=this.status?this.status.orderInFavorites:null},__class__:Pn};var Ln=function(e,t){this.paneType=e,this.talkSelection=t};n["albero.entity.TalkPaneSelection"]=Ln,Ln.__name__=["albero","entity","TalkPaneSelection"],Ln.createArrayForMultiPanes=function(e){return l.mapi(e,function(e,t){return new Ln(Vt.getMultiPaneType(e),t)})},Ln.prototype={createUrls:function(e,t){switch(this.paneType[1]){case 0:return L.talks(e,B.single(this.talkSelection));case 1:var n=uo(t,t.getTalkSelection),i=e,r=Vt.getMultiPaneTypes().map(function(e){return n(i,e)});return r[0]=this.talkSelection,L.talks(e,B.multi(r));case 2:var a=uo(t,t.getTalkSelection),o=e,s=Vt.getMultiPaneTypes().map(function(e){return a(o,e)});return s[1]=this.talkSelection,L.talks(e,B.multi(s));case 3:var l=uo(t,t.getTalkSelection),u=e,c=Vt.getMultiPaneTypes().map(function(e){return l(u,e)});return c[2]=this.talkSelection,L.talks(e,B.multi(c))}},getTalkIdOrNull:function(){return Gn.getTalkIdOrNull(this.talkSelection)},__class__:Ln};var Bn=function(){};n["albero.entity.ITalkSelectionGetter"]=Bn,Bn.__name__=["albero","entity","ITalkSelectionGetter"],Bn.prototype={__class__:Bn};var Hn=function(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?nn.fromRawValue(e.type):rn.None,this.version=e.version};n["albero.entity.TalkPushNotificationEvent"]=Hn,Hn.__name__=["albero","entity","TalkPushNotificationEvent"],Hn.prototype={__class__:Hn};var Yn=n["albero.entity.TalkSelection"]={__ename__:["albero","entity","TalkSelection"],__constructs__:["NotSelected","TalkSelected","AnnouncementsSelected"]};Yn.NotSelected=["NotSelected",0],Yn.NotSelected.toString=i,Yn.NotSelected.__enum__=Yn,Yn.TalkSelected=function(e,t){var n=["TalkSelected",1,e,t];return n.__enum__=Yn,n.toString=i,n},Yn.AnnouncementsSelected=["AnnouncementsSelected",2],Yn.AnnouncementsSelected.toString=i,Yn.AnnouncementsSelected.__enum__=Yn,Yn.__empty_constructs__=[Yn.NotSelected,Yn.AnnouncementsSelected];var Gn=function(){};n["albero.entity.TalkSelectionHelper"]=Gn,Gn.__name__=["albero","entity","TalkSelectionHelper"],Gn.eqTalkSelection=function(e,t){var n;if(e[0]==t[0]){var i=Gn.getTalkIdOrNull(e),r=Gn.getTalkIdOrNull(t);n=null==i&&null==r||null!=i&&null!=r&&i.high==r.high&&i.low==r.low}else n=!1;if(n){var a=Gn.getMessageIdOrNull(e),o=Gn.getMessageIdOrNull(t);return null==a&&null==o||null!=a&&null!=o&&a.high==o.high&&a.low==o.low}return!1},Gn.isSelected=function(e,t){switch(e[1]){case 0:return!1;case 1:e[3];var n=e[2],i=x.orNull(Un.getTalkId(t));return null!=n&&null!=i&&n.high==i.high&&n.low==i.low;case 2:return t==xn.annoucements}},Gn.getTalkIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:return e[2];case 2:return null}},Gn.getMessageIdOrNull=function(e){switch(e[1]){case 0:return null;case 1:var t=e[3];return x.orNull(t);case 2:return null}},Gn.toTalkSelectionStr=function(e){switch(e[1]){case 0:return"";case 1:var t=e[2];return"_"+t.high+"_"+t.low;case 2:return"announcement"}};var zn=function(e){this.unreadMentionCount=0,this.unreadCount=0,null!=e?(this.id=e.talk_id,this.unreadCount=null!=e.unread_count?e.unread_count:0,this.unreadMentionCount=null!=e.unread_mention_count?e.unread_mention_count:0,this.maxMessageId=e.max_message_id,null!=e.max_message?this.maxMessage=new Lt(e.max_message):this.maxMessage=null,this.maxReadMessageId=e.max_read_message_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.talkOrderingTimestamp=e.talk_ordering_timestamp,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version,this.pushNotificationSetting=new tn(e.push_notification)):this.pushNotificationSetting=new tn};n["albero.entity.TalkStatus"]=zn,zn.__name__=["albero","entity","TalkStatus"],zn.prototype={update:function(e){var t=this,n=!1;return this.needIdUpdate(this.maxEveryoneReadMessageId,e.maxEveryoneReadMessageId)&&(this.maxEveryoneReadMessageId=e.maxEveryoneReadMessageId,n=!0),x.foreach(e.maxReadMessageId,function(e){t.needIdUpdate(t.maxReadMessageId,e)&&(t.maxReadMessageId=e,n=!0)}),n},updateByMessageDeletion:function(e){var t=!1;return this.isUnread(e.messageId)&&(this.decrementUnreadCount(1),e.isMention&&this.decrementUnreadMentionCount(1),t=!0),this.isMax(e.messageId)&&(null!=this.maxMessage&&(this.maxMessage.type=Bt.deleted),t=!0),t},updateByMessageReadStatusesUpdate:function(e){var t=e.messageIds,n=e.mentionMessageIds,i=t.filter(uo(this,this.isUnread));if(0==i.length)return!1;for(var r=i[0],a=0;a=0?s:1)<0&&(r=o),O.notContains(e.messageIdsExcludingUnreadCountTargets,o)&&(this.decrementUnreadCount(1),O.contains(n,o)&&this.decrementUnreadMentionCount(1))}return this.maxReadMessageId=r,!0},needIdUpdate:function(e,t){if(null!=t){if(null!=e){var n=e.high-t.high|0;return n=0!=n?n:pa.ucompare(e.low,t.low),(e.high<0?t.high<0?n:-1:t.high>=0?n:1)<0}return!0}return!1},read:function(e,t,n){this.maxReadMessageId=e,this.decrementUnreadCount(t),this.decrementUnreadMentionCount(n)},decrementUnreadCount:function(e){this.unreadCount-=e,this.unreadCount<0&&(this.unreadCount=0)},decrementUnreadMentionCount:function(e){this.unreadMentionCount-=e,this.unreadMentionCount<0&&(this.unreadMentionCount=0)},readAll:function(){this.maxReadMessageId=this.maxMessageId,this.unreadCount=0,this.unreadMentionCount=0},updateByMessage:function(e,t){this.isNewMax(e.id)&&(this.maxMessageId=e.id,this.maxMessage=e),e.isUnreadCountTarget&&(t?this.isUnread(e.id)&&this.readAll():(this.unreadCount++,e.mention&&this.unreadMentionCount++),this.talkOrderingTimestamp=e.createdAt)},updateByReadingMessages:function(e,t){var n=this;if(null==e||this.canRegardTalkReadCountZero(e)){if(!Kn.isUnreadMesasgeExisted(this))return!1;if(null==this.maxMessageId)return!1;this.readAll()}else{var i=e.filter(function(e){return n.isUnread(e.id)});if(0==i.length)return!1;var r=i[i.length-1].id,a=i.filter(function(e){if(e.isUnreadCountTarget){var n=e.userId;return!(null!=n&&null!=t&&n.high==t.high&&n.low==t.low)}return!1}),o=a.filter(function(e){return e.mention});this.read(r,a.length,o.length)}return!0},updateByTalkPushNotificationEvent:function(e){return e.version>this.pushNotificationSetting.version&&(this.pushNotificationSetting=tn.createWithParams(e.type,e.version),!0)},canRegardTalkReadCountZero:function(e){var t=this.maxMessageId,n=x.orNull(F.lastOption(e.map(function(e){return e.id})));return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},isMessageAcceptable:function(e,t){if(this.isUnread(e.id))return!0;var n=Ot.subTimestampPart(this.maxReadMessageId,e.id),i=n.high-t.high|0;return i=0!=i?i:pa.ucompare(n.low,t.low),(n.high<0?t.high<0?i:-1:t.high>=0?i:1)<=0},isUnread:function(e){if(null!=this.maxReadMessageId){var t=this.maxReadMessageId,n=t.high-e.high|0;return n=0!=n?n:pa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId;return null!=t&&null!=e&&t.high==e.high&&t.low==e.low}return!1},isNewMax:function(e){if(null!=this.maxMessageId){var t=this.maxMessageId,n=t.high-e.high|0;return n=0!=n?n:pa.ucompare(t.low,e.low),(t.high<0?e.high<0?n:-1:e.high>=0?n:1)<0}return!0},isNotificationDisabled:function(){return this.pushNotificationSetting.isDisabled()},getNotificationType:function(){return this.pushNotificationSetting.type},__class__:zn};var Kn=function(){};n["albero.entity.TalkStatusHelper"]=Kn,Kn.__name__=["albero","entity","TalkStatusHelper"],Kn.isNotificationDisabled=function(e){return null!=e&&e.isNotificationDisabled()},Kn.isFavoriteTalk=function(e){return null!=e&&null!=e.orderInFavorites},Kn.isUnreadMesasgeExisted=function(e){return null!=e&&(null!=e.maxMessage&&e.isUnread(e.maxMessage.id))};var jn=function(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=x.option(e.max_read_message_id))};n["albero.entity.TalkStatusUpdate"]=jn,jn.__name__=["albero","entity","TalkStatusUpdate"],jn.prototype={__class__:jn};var Wn=function(e,t,n){this.file=e,this.dimension=Vn.createWithSize(t,n),this.auth=null};n["albero.entity.ThumbInfo"]=Wn,Wn.__name__=["albero","entity","ThumbInfo"],Wn.prototype={setAuth:function(e){this.auth=e},__class__:Wn};var Vn=function(e){null!=e&&(this.width=e.width,this.height=e.height)};n["albero.entity.ThumbDimension"]=Vn,Vn.__name__=["albero","entity","ThumbDimension"],Vn.createWithSize=function(e,t){var n=new Vn;return n.width=e,n.height=t,n},Vn.prototype={toObject:function(){return{width:this.width,height:this.height}},__class__:Vn};var qn=function(e,t,n){var i=new Zn(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n};n["albero.entity.UpdateDomainStampSettingEvent"]=qn,qn.__name__=["albero","entity","UpdateDomainStampSettingEvent"],qn.prototype={isValid:function(){return this.newSetting.isNewerThan(this.oldSetting)},getStampsetIdsDiff:function(){return this.oldSetting.getStampsetIdsDiff(this.newSetting)},__class__:qn};var Qn=n["albero.entity.UploadUseType"]={__ename__:["albero","entity","UploadUseType"],__constructs__:["PROFILE_IMAGE","MESSAGE","TALK_ICON","THUMBNAIL","NOTE_ATTACHMENT","NOTE_THUMBNAIL"]};Qn.PROFILE_IMAGE=["PROFILE_IMAGE",0],Qn.PROFILE_IMAGE.toString=i,Qn.PROFILE_IMAGE.__enum__=Qn,Qn.MESSAGE=["MESSAGE",1],Qn.MESSAGE.toString=i,Qn.MESSAGE.__enum__=Qn,Qn.TALK_ICON=["TALK_ICON",2],Qn.TALK_ICON.toString=i,Qn.TALK_ICON.__enum__=Qn,Qn.THUMBNAIL=["THUMBNAIL",3],Qn.THUMBNAIL.toString=i,Qn.THUMBNAIL.__enum__=Qn,Qn.NOTE_ATTACHMENT=["NOTE_ATTACHMENT",4],Qn.NOTE_ATTACHMENT.toString=i,Qn.NOTE_ATTACHMENT.__enum__=Qn,Qn.NOTE_THUMBNAIL=["NOTE_THUMBNAIL",5],Qn.NOTE_THUMBNAIL.toString=i,Qn.NOTE_THUMBNAIL.__enum__=Qn,Qn.__empty_constructs__=[Qn.PROFILE_IMAGE,Qn.MESSAGE,Qn.TALK_ICON,Qn.THUMBNAIL,Qn.NOTE_ATTACHMENT,Qn.NOTE_THUMBNAIL];var Jn=function(){};n["albero.entity.UploadUseTypeHelper"]=Jn,Jn.__name__=["albero","entity","UploadUseTypeHelper"],Jn.getUseTypeInt=function(e){switch(e[1]){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 4;case 4:return 5;case 5:return 6}};var Xn=function(e){null!=e&&(null!=e.user_id&&(this.userId=e.user_id),null!=e.email&&(this.email=e.email),null!=e.sub_email&&(this.subEmail=e.sub_email),null!=e.group_alias&&(this.groupAlias=e.group_alias),null!=e.signin_id&&(this.signinId=e.signin_id))};n["albero.entity.UserIdentifier"]=Xn,Xn.__name__=["albero","entity","UserIdentifier"],Xn.prototype={__class__:Xn};var Zn=function(e,t){this.high=e,this.low=t};n["haxe._Int64.___Int64"]=Zn,Zn.__name__=["haxe","_Int64","___Int64"],Zn.prototype={__class__:Zn};var $n=function(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=x.option(e.last_used_at))};n["albero.entity.UserPresence"]=$n,$n.__name__=["albero","entity","UserPresence"],$n.createUserPresenceState=function(e,t){var n=t.high-e.high|0,i=t.low-e.low|0;if(pa.ucompare(t.low,e.low)<0){n--;n|=0}var r=new Zn(n,i),a=$n.SIXTY_MINUTES,o=r.high-a.high|0;if(o=0!=o?o:pa.ucompare(r.low,a.low),(r.high<0?a.high<0?o:-1:a.high>=0?o:1)>0)return ei.GT_60;var s=$n.FIFTEEN_MINUTES,l=r.high-s.high|0;return l=0!=l?l:pa.ucompare(r.low,s.low),(r.high<0?s.high<0?l:-1:s.high>=0?l:1)>0?ei.LT_OR_EQ_60:ei.LT_OR_EQ_15},$n.prototype={toState:function(e){var t=e,n=x.map(this.lastUsedAtOpt,function(e){return $n.createUserPresenceState(e,t)});switch(n[1]){case 0:return n[2];case 1:return ei.GT_60}},isExpired:function(e,t){var n=this.lastUpdatedAt,i=e.high-n.high|0,r=e.low-n.low|0;if(pa.ucompare(e.low,n.low)<0){i--;i|=0}var a=new Zn(i,r),o=a.high-t.high|0;return o=0!=o?o:pa.ucompare(a.low,t.low),(a.high<0?t.high<0?o:-1:t.high>=0?o:1)>0},__class__:$n};var ei=n["albero.entity.UserPresenceState"]={__ename__:["albero","entity","UserPresenceState"],__constructs__:["LT_OR_EQ_15","LT_OR_EQ_60","GT_60"]};ei.LT_OR_EQ_15=["LT_OR_EQ_15",0],ei.LT_OR_EQ_15.toString=i,ei.LT_OR_EQ_15.__enum__=ei,ei.LT_OR_EQ_60=["LT_OR_EQ_60",1],ei.LT_OR_EQ_60.toString=i,ei.LT_OR_EQ_60.__enum__=ei,ei.GT_60=["GT_60",2],ei.GT_60.toString=i,ei.GT_60.__enum__=ei,ei.__empty_constructs__=[ei.LT_OR_EQ_15,ei.LT_OR_EQ_60,ei.GT_60];var ti=function(e){this.success=e};n["albero.entity.api.message.AddFavoriteMessageResult"]=ti,ti.__name__=["albero","entity","api","message","AddFavoriteMessageResult"],ti.prototype={__class__:ti};var ni=function(e){this.success=e};n["albero.entity.api.message.DeleteFavoriteMessageResult"]=ni,ni.__name__=["albero","entity","api","message","DeleteFavoriteMessageResult"],ni.prototype={__class__:ni};var ii=function(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r};n["albero.entity.api.message.GetFavoriteMessagesResultWithParams"]=ii,ii.__name__=["albero","entity","api","message","GetFavoriteMessagesResultWithParams"],ii.prototype={getNextMarker:function(){return this.nextMarker},getMessages:function(){return this.messages},__class__:ii};var ri=function(e,t){var n=this;l.iter(t,function(t){var i=new ai(t),r=i.createdAt,a=e.high-r.high|0;a=0!=a?a:pa.ucompare(e.low,r.low),(e.high<0?r.high<0?a:-1:r.high>=0?a:1)<0?n.messageCreatedAtNew=i:n.messageCreatedAtOld=i})};n["albero.entity.api.message.SearchMessagesAroundDateTimeResult"]=ri,ri.__name__=["albero","entity","api","message","SearchMessagesAroundDateTimeResult"],ri.prototype={__class__:ri};var ai=function(e){this.messageId=e.message_id,this.createdAt=e.created_at};n["albero.entity.api.message.MessageCreatedAt"]=ai,ai.__name__=["albero","entity","api","message","MessageCreatedAt"],ai.prototype={__class__:ai};var oi=function(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n};n["albero.entity.api.note.CreateNoteError"]=oi,oi.__name__=["albero","entity","api","note","CreateNoteError"],oi.prototype={__class__:oi};var si=function(e){this.note=new Di(e),this.emitterKey=null};n["albero.entity.api.note.CreateNoteResult"]=si,si.__name__=["albero","entity","api","note","CreateNoteResult"],si.prototype={updateWithEmitterKey:function(e){var t=new si;return t.note=this.note,t.emitterKey=e,t},__class__:si};var li=function(e){this.result=e};n["albero.entity.api.note.DeleteNoteResult"]=li,li.__name__=["albero","entity","api","note","DeleteNoteResult"],li.prototype={__class__:li};var ui=function(e){this.note=new Di(e)};n["albero.entity.api.note.GetNoteResult"]=ui,ui.__name__=["albero","entity","api","note","GetNoteResult"],ui.prototype={getNoteId:function(){return this.note.noteId},getNoteCreateUserId:function(){return this.note.createdBy},getRevisionCreateUserId:function(){return this.note.getRevisionCreateUserId()},getNoteCreateDate:function(){return this.note.createdAt},getRevisionCreateDate:function(){return this.note.getRevisionCreateDate()},getLockedUserIdWithoutSelf:function(e){return this.note.getLockedUserIdWithoutSelf(e)},__class__:ui};var ci=function(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=F.asArray(e.contents).map(function(e){return new Ki(e)}))};n["albero.entity.api.note.GetNoteStatusesResult"]=ci,ci.__name__=["albero","entity","api","note","GetNoteStatusesResult"],ci.prototype={isNotEmptyNoteStatuses:function(){return this.noteStatuses.length>0},__class__:ci};var _i=function(e){this.note=new Di(e)};n["albero.entity.api.note.UpdateNoteResult"]=_i,_i.__name__=["albero","entity","api","note","UpdateNoteResult"],_i.prototype={__class__:_i};var hi=function(e){this.note=new Di(e)};n["albero.entity.api.note.UpdateNoteSettingResult"]=hi,hi.__name__=["albero","entity","api","note","UpdateNoteSettingResult"],hi.prototype={__class__:hi};var di=function(){};n["albero.entity.file.DummyFileUtil"]=di,di.__name__=["albero","entity","file","DummyFileUtil"],di.getBlobFromUpdatableFile=function(e){return null==e.blob?e:e.blob};var fi=function(){};n["albero.entity.file.StageType"]=fi,fi.__name__=["albero","entity","file","StageType"],fi.prototype={__class__:fi};var mi=function(e,t){this.talkId=e,this.paneType=t};n["albero.entity.file.StageTypeTalk"]=mi,mi.__name__=["albero","entity","file","StageTypeTalk"],mi.__interfaces__=[fi],mi.prototype={toString:function(){var e=this.talkId;return"staged__"+e.high+"_"+e.low+Vt.toPanePrefix(this.paneType)},isForPane:function(e){return this.paneType==e},isForNote:function(){return!1},isForPreview:function(){return!1},__class__:mi};var pi=function(){};n["albero.entity.file.StageTypeNote"]=pi,pi.__name__=["albero","entity","file","StageTypeNote"],pi.__interfaces__=[fi],pi.prototype={toString:function(){return"staged_note_"},isForPane:function(e){return!1},isForNote:function(){return!0},isForPreview:function(){return!1},__class__:pi};var gi=function(){};n["albero.entity.message.IFavoriteMessageEvent"]=gi,gi.__name__=["albero","entity","message","IFavoriteMessageEvent"],gi.prototype={__class__:gi};var vi=function(e){this.message=new Lt(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.AddFavoriteMessageEvent"]=vi,vi.__name__=["albero","entity","message","AddFavoriteMessageEvent"],vi.__interfaces__=[gi],vi.prototype={getMessage:function(){return this.message},getMessageId:function(){return this.message.id},isFavorite:function(){return!0},getDomainId:function(){return this.domainId},getTalkId:function(){return this.talkId},__class__:vi};var yi=function(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id};n["albero.entity.message.DeleteFavoriteMessageEvent"]=yi,yi.__name__=["albero","entity","message","DeleteFavoriteMessageEvent"],yi.__interfaces__=[gi],yi.prototype={getMessageId:function(){return this.messageId},isFavorite:function(){return!1},__class__:yi};var Si=function(){};n["albero.entity.message.IMessageContentForActionReply"]=Si,Si.__name__=["albero","entity","message","IMessageContentForActionReply"],Si.prototype={__class__:Si};var wi=function(e){null!=e&&(this.noteId=new Oi(e.note_id),this.title=e.title,this.revision=e.revision,this.deleted=e.deleted,this.hasAttachments=!!e.has_attachments)};n["albero.entity.message.MessageContentForNote"]=wi,wi.__name__=["albero","entity","message","MessageContentForNote"],wi.prototype={__class__:wi};var Ti=function(e){null!=e&&(this.noteId=new Oi(e.note_id),this.title=e.title)};n["albero.entity.message.MessageContentForNoteDeleted"]=Ti,Ti.__name__=["albero","entity","message","MessageContentForNoteDeleted"],Ti.prototype={__class__:Ti};var Ii=function(e){this.text=ka.None,this.stampsetId=O.fromIntOrInt64(e.stampset_id),this.stampId=O.fromIntOrInt64(e.stamp_id),null!=e.text&&(this.text=ka.Some(e.text))};n["albero.entity.message.MessageContentForOriginalStamp"]=Ii,Ii.__name__=["albero","entity","message","MessageContentForOriginalStamp"],Ii.prototype={hasValidText:function(){return x.isDefined(this.getValidText())},getValidText:function(){return x.filter(this.text,P.isNotEmpty)},__class__:Ii};var Ei=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.options=e.options,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForSelectOneReply"]=Ei,Ei.__name__=["albero","entity","message","MessageContentForSelectOneReply"],Ei.__interfaces__=[Si],Ei.prototype={getResponseIndex:function(){return this.response},__class__:Ei};var Ni=function(e){this.inReplyTo=e.in_reply_to,this.title=e.title,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.done=e.done,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForTodoReply"]=Ni,Ni.__name__=["albero","entity","message","MessageContentForTodoReply"],Ni.__interfaces__=[Si],Ni.prototype={getResponseIndex:function(){return this.done?0:1},__class__:Ni};var Ai=function(e){this.inReplyTo=e.in_reply_to,this.response=e.response,this.question=e.question,this.listing=null==e.listing||e.listing,this.closingType=null==e.closing_type?1:e.closing_type,this.closed=null!=e.closed&&e.closed};n["albero.entity.message.MessageContentForYesNoReply"]=Ai,Ai.__name__=["albero","entity","message","MessageContentForYesNoReply"],Ai.__interfaces__=[Si],Ai.prototype={getResponseIndex:function(){return this.response?0:1},__class__:Ai};var bi=function(e){if(null==e)return this.favorite=!1,this.createdAt=null,void(this.tags=[]);this.favorite=!0,this.createdAt=e.created_at,this.tags=e.tags};n["albero.entity.message.MessageFavorite"]=bi,bi.__name__=["albero","entity","message","MessageFavorite"],bi.prototype={isFavorite:function(){return this.favorite},update:function(e){this.favorite=e.isFavorite()},__class__:bi};var Di=function(e){null!=e&&(this.noteId=new Oi(e.note_id),this.talkId=e.talk_id,this.createdBy=e.created_by,this.createdAt=e.created_at,this.setting=new zi(e.setting),this.noteRevision=new Yi(e.note_revision),this.noteLocked=new Li(e.locked))};n["albero.entity.note.Note"]=Di,Di.__name__=["albero","entity","note","Note"],Di.prototype={isSameNoteId:function(e){return this.noteId.equals(e)},getRevisionCreateUserId:function(){return this.noteRevision.createdBy},getRevisionCreateDate:function(){return this.noteRevision.createdAt},compareRevision:function(e){return this.noteRevision.compareRevision(e)},lock:function(e,t,n,i){this.noteRevision.revision==e&&this.noteLocked.lock(t,n,i)},unlock:function(e,t){this.noteRevision.revision==e&&this.noteLocked.unlock(t)},getLockedUserIdWithoutSelf:function(e){return this.noteLocked.getLockedUserIdWithoutSelf(e)},__class__:Di};var ki=n["albero.entity.note.NoteContentType"]={__ename__:["albero","entity","note","NoteContentType"],__constructs__:["TEXT","FILES"]};ki.TEXT=["TEXT",0],ki.TEXT.toString=i,ki.TEXT.__enum__=ki,ki.FILES=["FILES",1],ki.FILES.toString=i,ki.FILES.__enum__=ki,ki.__empty_constructs__=[ki.TEXT,ki.FILES];var Ci=function(){};n["albero.entity.note.NoteContentTypeHelper"]=Ci,Ci.__name__=["albero","entity","note","NoteContentTypeHelper"],Ci.createNoteContentType=function(e){if(null==e)return $i._e("["+s.dateStr(new Date)+"] ","no value.","","","",""),null;switch(e){case 1:return ki.TEXT;case 5:return ki.FILES;default:return $i._e("["+s.dateStr(new Date)+"] ","value is not expected.","","","",""),null}},Ci.getValue=function(e){if(null==e)return $i._e("["+s.dateStr(new Date)+"] ","no content type.","","","",""),null;switch(e[1]){case 0:return 1;case 1:return 5}};var Oi=function(e){this.value=e};n["albero.entity.note.NoteId"]=Oi,Oi.__name__=["albero","entity","note","NoteId"],Oi.__interfaces__=[Mt],Oi.createDummyId=function(){var e,t=Oi.nextDummyId,n=Oi.nextDummyId;if(null==n)e=null;else{var i=new Zn(0,1),r=n.high-i.high|0,a=n.low-i.low|0;if(pa.ucompare(n.low,i.low)<0){r--;r|=0}e=new Zn(r,a)}return Oi.nextDummyId=e,new Oi(t)},Oi.prototype={toString:function(){var e=this.value;return"_"+e.high+"_"+e.low},equals:function(e){if(null==e)return!1;var t=this.value,n=e.value;return null!=t&&null!=n&&t.high==n.high&&t.low==n.low},getHtmlAttributeId:function(){return"note-"+this.toString()},isDummy:function(){return this.value.high<0},__class__:Oi};var Mi=function(e,t,n,i,r,a){this.state=Fi.SENDING,this.talkId=e,this.noteId=t,this.title=n,this.text=i,this.fileInfos=r,this.emitterKey=a};n["albero.entity.note.NoteLocalEdit"]=Mi,Mi.__name__=["albero","entity","note","NoteLocalEdit"],Mi.prototype={hasEmitterKey:function(){return null!=this.emitterKey},getEmitterKey:function(){return this.emitterKey},setState:function(e){this.state=e},getTalkId:function(){return this.talkId},getNoteId:function(){return this.noteId},getTitle:function(){return this.title},getText:function(){return this.text},getContent:function(){switch(this.getContentType()[1]){case 0:return this.text;case 1:return{files:this.getUploadedFilesData(),text:null==this.text?"":this.text}}},getFileInfos:function(){return this.fileInfos},getState:function(){return this.state},isSending:function(){return this.state==Fi.SENDING},isFailed:function(){switch(this.state[1]){case 0:case 5:return!1;case 1:case 2:case 3:case 4:return!0}},isForCreate:function(){return this.noteId.isDummy()},canNotSend:function(){return 0!=this.getUnuploadedFileInfos().length},getContentType:function(){return this.fileInfos.length>0?ki.FILES:ki.TEXT},getUnuploadedFileInfos:function(){return this.fileInfos.filter(function(e){return e.isNotUploaded()})},getUploadedFilesData:function(){return this.fileInfos.map(function(e){return e.getUploadedFileData()}).filter(function(e){return null!=e})},createNoteRevisionSummary:function(e){var t=new Gi;return t.revision=0,t.contentType=this.getContentType(),t.title=this.title,t.contentSummary=this.text,t.createdBy=e,t.createdAt=b.nowAsInt64(),t.contentFiles=this.fileInfos,t},conflict:function(){this.state=Fi.FAILED_BY_CONFLICT},deleted:function(){this.state=Fi.FAILED_BY_NOT_FOUND},__class__:Mi};var Fi=n["albero.entity.note.NoteLocalEditState"]={__ename__:["albero","entity","note","NoteLocalEditState"],__constructs__:["SENDING","FAILED_BY_CONFLICT","FAILED_BY_NOT_FOUND","FAILED_BY_FILE","FAILED_BY_UNKNOWN","COMPLETED"]};Fi.SENDING=["SENDING",0],Fi.SENDING.toString=i,Fi.SENDING.__enum__=Fi,Fi.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",1],Fi.FAILED_BY_CONFLICT.toString=i,Fi.FAILED_BY_CONFLICT.__enum__=Fi,Fi.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Fi.FAILED_BY_NOT_FOUND.toString=i,Fi.FAILED_BY_NOT_FOUND.__enum__=Fi,Fi.FAILED_BY_FILE=function(e,t){var n=["FAILED_BY_FILE",3,e,t];return n.__enum__=Fi,n.toString=i,n},Fi.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",4],Fi.FAILED_BY_UNKNOWN.toString=i,Fi.FAILED_BY_UNKNOWN.__enum__=Fi,Fi.COMPLETED=["COMPLETED",5],Fi.COMPLETED.toString=i,Fi.COMPLETED.__enum__=Fi,Fi.__empty_constructs__=[Fi.SENDING,Fi.FAILED_BY_CONFLICT,Fi.FAILED_BY_NOT_FOUND,Fi.FAILED_BY_UNKNOWN,Fi.COMPLETED];var Ri=function(e){null!=e&&(this.noteId=new Oi(e.note_id),this.revision=e.revision,this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLockEvent"]=Ri,Ri.__name__=["albero","entity","note","NoteLockEvent"],Ri.prototype={__class__:Ri};var xi=function(e){this.value=e};n["albero.entity.note.NoteLockExpiredAt"]=xi,xi.__name__=["albero","entity","note","NoteLockExpiredAt"],xi.prototype={fromNow:function(){var e=this.value,t=e.high,n=e.low;return 4294967296*t+(n>=0?n:n+4294967296)-(new Date).getTime()|0},calcRelockDelay:function(){return.9*this.fromNow()|0},__class__:xi};var Ui=n["albero.entity.note.NoteLockStateValue"]={__ename__:["albero","entity","note","NoteLockStateValue"],__constructs__:["FAILED_BY_CONFLICT","FAILED_BY_LOCKED","FAILED_BY_NOT_FOUND","FAILED_BY_UNKNOWN","COMPLETED","RELEASED"]};Ui.FAILED_BY_CONFLICT=["FAILED_BY_CONFLICT",0],Ui.FAILED_BY_CONFLICT.toString=i,Ui.FAILED_BY_CONFLICT.__enum__=Ui,Ui.FAILED_BY_LOCKED=function(e){var t=["FAILED_BY_LOCKED",1,e];return t.__enum__=Ui,t.toString=i,t},Ui.FAILED_BY_NOT_FOUND=["FAILED_BY_NOT_FOUND",2],Ui.FAILED_BY_NOT_FOUND.toString=i,Ui.FAILED_BY_NOT_FOUND.__enum__=Ui,Ui.FAILED_BY_UNKNOWN=["FAILED_BY_UNKNOWN",3],Ui.FAILED_BY_UNKNOWN.toString=i,Ui.FAILED_BY_UNKNOWN.__enum__=Ui,Ui.COMPLETED=function(e){var t=["COMPLETED",4,e];return t.__enum__=Ui,t.toString=i,t},Ui.RELEASED=["RELEASED",5],Ui.RELEASED.toString=i,Ui.RELEASED.__enum__=Ui,Ui.__empty_constructs__=[Ui.FAILED_BY_CONFLICT,Ui.FAILED_BY_NOT_FOUND,Ui.FAILED_BY_UNKNOWN,Ui.RELEASED];var Pi=function(e){this.value=e};n["albero.entity.note.NoteLockState"]=Pi,Pi.__name__=["albero","entity","note","NoteLockState"],Pi.prototype={isCompleted:function(){return 4==this.value[1]},getExpiredAtOrNull:function(){var e=this.value;return 4==e[1]?e[2]:null},isLockedByOther:function(){return 1==this.value[1]},getLockedUser:function(){var e=this.value;return 1==e[1]?e[2]:null},__class__:Pi};var Li=function(e){null!=e&&(this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)};n["albero.entity.note.NoteLocked"]=Li,Li.__name__=["albero","entity","note","NoteLocked"],Li.prototype={lock:function(e,t,n){this.expiredAt=n,this.deviceId=t,this.userId=e},unlock:function(e){var t=this.userId;null!=t&&null!=e&&t.high==e.high&&t.low==e.low&&(this.expiredAt=null,this.userId=null,this.deviceId=null)},getLockedUserIdWithoutSelf:function(e){var t,n=this.deviceId;if(null!=n&&null!=e&&n.high==e.high&&n.low==e.low)return null;if(null!=this.expiredAt){var i=this.expiredAt,r=i.high,a=i.low;t=4294967296*r+(a>=0?a:a+4294967296)<=(new Date).getTime()}else t=!0;return t?null:this.userId},__class__:Li};var Bi=function(e){null!=e&&(this.noteId=new Oi(e.note_id),this.talkId=e.talk_id,this.setting=new zi(e.setting))};n["albero.entity.note.NotePartialUpdateForSetting"]=Bi,Bi.__name__=["albero","entity","note","NotePartialUpdateForSetting"],Bi.prototype={__class__:Bi};var Hi=function(e){null!=e&&(this.noteId=new Oi(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new Gi(e.note_revision_summary))};n["albero.entity.note.NotePartialUpdateForSummary"]=Hi,Hi.__name__=["albero","entity","note","NotePartialUpdateForSummary"],Hi.prototype={getRevision:function(){return this.noteRevisionSummary.revision},getUpdatedBy:function(){return this.noteRevisionSummary.createdBy},getUpdatedAt:function(){return this.noteRevisionSummary.createdAt},__class__:Hi};var Yi=function(e){if(this.contentFiles=[],null!=e){switch(this.revision=e.revision,this.title=e.title,this.contentType=Ci.createNoteContentType(e.content_type),this.contentType[1]){case 0:this.contentText=e.content;break;case 1:if(this.contentText=null==e.content.text?"":e.content.text,null!=e.content.files)for(var t=0,n=za.__cast(e.content.files,Array);t>2)),r+=m.string(a.charAt(63&(o<<4|s>>4))),r+=m.string(a.charAt(63&(s<<2|l>>6))),r+=m.string(a.charAt(63&l))}if(n==i){var u=t.b[n++],c=t.b[n++];r+=m.string(a.charAt(u>>2)),r+=m.string(a.charAt(63&(u<<4|c>>4))),r+=m.string(a.charAt(c<<2&63))}else if(n==i+1){var _=t.b[n++];r+=m.string(a.charAt(_>>2)),r+=m.string(a.charAt(_<<4&63))}var h=r;switch(h.length%4){case 2:h+="==";break;case 3:h+="="}return h},qi.decode=function(e){var t=e.length-1;"="==e.charAt(t)&&("="==e.charAt(t-1)&&--t,e=s.substr(e,0,t));var n=e.length,i=e,r=qi.CODES;null==r&&(r=qi.initCodes(),qi.CODES=r);for(var a=0,o=3&n,l=a+(n-o),u=new Ma(new Ao(3*(n>>2)+(o>=2?o-1:0))),c=0;a>4);var d=r[i.charCodeAt(a++)];u.b[c++]=255&(h<<4|d>>2);var f=r[i.charCodeAt(a++)];u.b[c++]=255&(d<<6|f)}if(o>=2){var m=r[i.charCodeAt(a++)],p=r[i.charCodeAt(a++)];if(u.b[c++]=255&(m<<2|p>>4),3==o){var g=r[i.charCodeAt(a++)];u.b[c++]=255&(p<<4|g>>2)}}return u};var Qi=function(){};n["albero.js.KatakanaToRoman"]=Qi,Qi.__name__=["albero","js","KatakanaToRoman"],Qi.assureConvertTable=function(){return null!=Qi.convertTable?Qi.convertTable:(Qi.convertTable=new Oa,l.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=Qi.convertTable,n=e[0],i=e[1];null!=No[n]?t.setReserved(n,i):t.h[n]=i}),Qi.convertTable)},Qi.matchNext=function(e,t){var n=Qi.assureConvertTable();if(t+1=rr.HIRAGANA_SMALL_A&&o<=rr.HIRAGANA_NN&&(n+=e.substring(t,a),n+=String.fromCharCode(o+(rr.KATAKANA_SMALL_A-rr.HIRAGANA_SMALL_A)),t=a+1)}return n+=e.substring(t,e.length)},rr.katakanaToRoman=function(e){return(new Qi).convert(e)},rr.normalize=function(e){return new ar(null).normalize(e)},rr.normalizeForFile=function(e){return new ar(null).normalizeForFile(e)},rr.asyncAssureNormalize=function(){return Promise.resolve()},rr.eraseInvisible=function(e){var t=new RegExp("[\\u0000-\\u0020 ]","g".split("u").join(""));return e.replace(t,"")};var ar=function(e){this.beforeTask=null,this.beforeTask=e};n["albero.js.Normalizer"]=ar,ar.__name__=["albero","js","Normalizer"],ar.prototype={normalize:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFKC")}catch(e){return e instanceof Ga&&(e=e.val),$i._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),Zi.localize("TextCanonicalizer.invalid")}},normalizeForFile:function(e){try{return null!=this.beforeTask&&this.beforeTask(),e.normalize("NFC")}catch(e){return e instanceof Ga&&(e=e.val),$i._e("["+s.dateStr(new Date)+"] ","invalid character:",e,"","",""),Zi.localize("TextCanonicalizer.invalid")}},__class__:ar};var or=function(){};n["albero.js.WebSocket"]=or,or.__name__=["albero","js","WebSocket"],or.prototype={__class__:or};var sr=function(){};n["albero.js.WebSocketFactory"]=sr,sr.__name__=["albero","js","WebSocketFactory"],sr.newInstance=function(e,t){return new lr(e,t)};var lr=function(e,t){this.onopen=t.onopen,this.onmessage=t.onmessage,this.onerror=null,this.onclose=t.onclose,this.onpong=t.onpong,this.ws=new WebSocket(e),Io.websocketsbinary&&(this.ws.binaryType="arraybuffer"),this.ws.onopen=uo(this,this.onOpen),this.ws.onmessage=uo(this,this.onMessage),this.ws.onerror=uo(this,this.onError),this.ws.onclose=uo(this,this.onClose)};n["albero.js.WebSocketForBrowser"]=lr,lr.__name__=["albero","js","WebSocketForBrowser"],lr.__interfaces__=[or],lr.prototype={onOpen:function(e){$i._i("["+s.dateStr(new Date)+"] ","WebSocket opened.","","","",""),null!=this.onopen&&this.onopen()},onMessage:function(e){if(null!=this.onmessage){var t;t=this.getBinaryData(e),this.onmessage(t)}},getBinaryData:function(e){return Io.websocketsbinary?Ma.ofData(new bo(e.data)):qi.decode(e.data)},onPong:function(e){null!=this.onpong&&this.onpong(e)},onError:function(e){$i._e("["+s.dateStr(new Date)+"] ","WebSocket error. event:",e,"","",""),null!=this.onerror&&this.onerror()},onClose:function(e){var t="WebSocket closed. "+m.string(e.code)+" "+m.string(e.reason)+" "+m.string(e.wasClean);$i._i("["+s.dateStr(new Date)+"] ",t,"","","",""),null!=this.onclose&&this.onclose(e.code,e.reason,e.wasClean)},close:function(){this.onopen=null,this.onmessage=null,this.onerror=null,this.onclose=null,this.onpong=null,this.ws.close()},send:function(e){Io.websocketsbinary?this.ws.send(new bo(e.b.bufferValue).buffer):this.ws.send(qi.encode(e))},ping:function(e){this.send(new Ma(new Ao(0)))},isClosed:function(){return null==this.ws||3==this.ws.readyState},__class__:lr};var ur=function(){};n["puremvc.interfaces.IProxy"]=ur,ur.__name__=["puremvc","interfaces","IProxy"],ur.prototype={__class__:ur};var cr=function(){};n["albero.proxy.AccessTokenResolverProxy"]=cr,cr.__name__=["albero","proxy","AccessTokenResolverProxy"],cr.__interfaces__=[ur],cr.prototype={__class__:cr};var _r=function(){};n["albero.proxy.AccessTokenResolverProxyFactory"]=_r,_r.__name__=["albero","proxy","AccessTokenResolverProxyFactory"],_r.newInstance=function(){return new dr("accessTokenResolver")};var hr=function(e,t){K.call(this),this.proxyName=null!=e?e:hr.NAME,null!=t&&this.setData(t)};n["puremvc.patterns.proxy.Proxy"]=hr,hr.__name__=["puremvc","patterns","proxy","Proxy"],hr.__interfaces__=[ur],hr.__super__=K,hr.prototype=r(K.prototype,{getProxyName:function(){return this.proxyName},setData:function(e){this.data=e},getData:function(){return this.data},onRegister:function(){},onRemove:function(){},__class__:hr});var dr=function(e){hr.call(this,e)};n["albero.proxy.AccessTokenResolverProxyForDirectJs"]=dr,dr.__name__=["albero","proxy","AccessTokenResolverProxyForDirectJs"],dr.__interfaces__=[cr],dr.__super__=hr,dr.prototype=r(hr.prototype,{asyncGetAccessToken:function(e,t){var n=this.settings.getAccessToken();if(null==n){var i=null!=Eo.account?Eo.account.split(":"):null;null!=i&&2==i.length&&this.api.createAccessToken(i[0],i[1],t)}else t(n)},__class__:dr});var fr=function(){hr.call(this,"broadcast")};n["albero.proxy.AlberoBroadcastProxy"]=fr,fr.__name__=["albero","proxy","AlberoBroadcastProxy"],fr.__super__=hr,fr.prototype=r(hr.prototype,{handleNotification:function(e,t,n){var i=this;switch(e){case"notify_add_account_control_request":var r=new Ue(t);this.dataStore.setAccountControlRequest(r),this.sendNotification(e,r),n();break;case"notify_add_acquaintance":this.sendNotification(e,this.dataFactory.newAcquaintance(t[1])),n();break;case"notify_add_acquaintances":for(var a=t[1].map(uo(so=this.dataFactory,so.newAcquaintance)),o=0;ot.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){var t=this.dataStore.getTalkStatus(e.talkId);if(null==t){var n=this.dataStore.getTalk(e.talkId);if(null==n)return void $i._e("["+s.dateStr(new Date)+"] ","talk not found on change favorite talk.","","","","");(t=new zn).id=e.talkId,t.talkOrderingTimestamp=n.updatedAt}t.updateByTalkPushNotificationEvent(e)&&this.dataStore.setTalkStatus(t)},newTalkStatusByTalk:function(e){var t=this.dataStore.getTalkStatus(e.id);return null==t&&((t=new zn).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);null==t&&((t=new zn).id=e.talkId);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;return t.updateByMessage(e,n),this.dataStore.setTalkStatus(t),t},updateTalkStatusOnMessageDelete:function(e){var t=this.dataStore.getTalkStatus(e.talkId);return null!=t&&t.updateByMessageDeletion(e)&&this.dataStore.setTalkStatus(t),t},updateTalkStatus:function(e){var t=this;if(!l.exists(e.readUserIds,function(e){var n=t.dataStore;if(null!=n.me){var i=n.me.id;return null!=i&&null!=e&&i.high==e.high&&i.low==e.low}return!1}))return null;var n=this.dataStore.getTalkStatus(e.talkId);return null==n?($i._e("["+s.dateStr(new Date)+"] ","talkStatus is not found.","","","",""),null):(n.updateByMessageReadStatusesUpdate(e)&&this.dataStore.setTalkStatus(n),n)},newAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e.domainId);return null==t&&((t=new He).domainId=e.domainId),t.updateByAnnouncement(e),this.dataStore.setAnnouncementStatus(t),t},assureAnnouncementStatus:function(e){var t=this.dataStore.getAnnouncementStatus(e);return null==t&&(t=this.dataFactory.newAnnouncementStatusForDomain(e)),t},__class__:fr});var mr=function(){hr.call(this,"api")};n["albero.proxy.AlberoServiceProxy"]=mr,mr.__name__=["albero","proxy","AlberoServiceProxy"],mr.__super__=hr,mr.prototype=r(hr.prototype,{getOSString:function(){return"bot","bot"},createAccessToken:function(e,t,n){var i,r,a=this,o=this.settings.getOs(),s=this.settings.getIDFV(),l=e.split("$");-1==e.indexOf("@")&&2==l.length?(i="create_access_token_by_id",r=[l[1],l[0],t,s,o,""]):(i="create_access_token",r=[e,t,s,o,""]),this.apiCaller.callImmediately(i,r,function(e){a.settings.setAccessToken(e),n(e)},function(e){a.sendNotification("Url",Ce.FORWARD(L.error))})},authorizeDevice:function(e,t){var n=this.settings.getIDFV();this.apiCaller.callImmediately("authorize_device",[e,n],function(e){t()})},createSession:function(e,t){var n=this,i=[e,"1.119"];this.apiCaller.onSessionClear(),this.apiCaller.callImmediatelyReliable("create_session",i,function(e){var i=new yn(e),r=b.nowAsInt64();i.passwordExpiration.isExpired(r)?n.sendNotification("password_expiration_overed"):(i.passwordExpiration.needWarning(r,n.settings.getPasswordWarningSkipUntil())&&(n.settings.setPasswordWarningSkipUntil(b.oneDayAfterAsInt64()),n.sendNotification("password_expiration_warned")),n.apiCaller.onSessionCreated(),t(i),n.apiCaller.fireCallbacksWaitingForSession())},function(e){if(null!=e){if(401==e.code&&"expired password"==e.message)return void n.sendNotification("password_expiration_overed");if(401==e.code&&"deleted account"==e.message)return void n.sendNotification("SignOut");if(401==e.code&&"unauthorized device"==e.message)return void n.sendNotification("Device",$.AUTHORIZE);n.apiCaller.handleServerErrorDefault(e)}n.settings.clearAccessToken(),n.sendNotification("Url",Ce.FORWARD(L.error))},function(e){return n.shouldRetryCreateSession(e)?ka.Some(n.apiCaller.retryTimeForReplicationLag()):ka.None})},shouldRetryCreateSession:function(e){return 401==e.code&&"invalid token"==e.message},startNotification:function(){var e=this;this.apiCaller.call("start_notification",[],function(t){t||(e.dataStore.clear(!0),e.sendNotification("start_notification_failed"))})},resetNotification:function(e){this.apiCaller.call("reset_notification",[],e)},sendDomainNotifications:function(e){for(var t=0;t=t.length)){var r=t[n],a=e.id,o=this.dataFactory.newDummyMessage(a,r.type,r.content);this.sendNotification("create_message_start",o),this.apiCaller.call("create_message",[a,Lt.enumIndex(r.type),r.content],function(r){var a=i.dataFactory.newMessage(r);i.sendNotification("create_message_complete",[a,o.id]),i.forwardMessages(e,t,n+1),i.fileInfoStore.removeMessageFileInfos(o.id),i.messageStore.removeMessage(o.id)},function(e){if(i.sendNotification("create_message_fail",[e,o]),null!=e&&409==e.code){var t=Hr.toLocalError(xt.SendingMessageConflicted,e);i.sendNotification("error_occurred",t)}else i.sendNotification("error_occurred",e)})}},deleteMessage:function(e,t){var n=this;this.apiCaller.call("delete_message",[e,t],function(e){},function(e){if(null!=e){if(403==e.code&&"frozen domain"==e.message)return void n.sendNotification("error_occurred",e);if(409==e.code&&"conflict"==e.message){var t=Hr.toLocalError(xt.DeletingMessageConflicted,e);return void n.sendNotification("error_occurred",t)}n.sendNotification("error_occurred",e)}})},updateReadStatuses:function(e,t){var n=this;this.apiCaller.callApiReliable("update_read_statuses",[e,t],function(i){var r,a=n.dataStore.getTalkStatus(e);if(null!=a){var o=a.maxReadMessageId;r=null!=o&&null!=t&&o.high==t.high&&o.low==t.low}else r=!1;r&&n.sendNotification("notify_update_local_talk_status",a)},null,function(e){return 429==e.code&&"too many requests"==e.message?ka.Some(1e3*n.asInt(e.detail.retry_after)):ka.None})},searchMessagesAroundDateTime:function(e,t){var n=this;return new Promise(function(i,r){n.apiCaller.call("search_messages_around_datetime",[e,t],function(e){var n=new ri(t,e);i(n)},function(e){r(e)})})},upload:function(e,t,n,i){var r=this,a=di.getBlobFromUpdatableFile(n);this.fileService.asyncCreateThumbnail(a).catch(function(e){return null}).then(function(e){return{file:n,thumb:e}}).then(function(n){r.uploadV2(e,t,n,i)})},uploadV2: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.file,n.thumb,e);o.then(function(e){r.createMessageReliable(t,Bt.file,e,a,i)}),o.catch(function(e){r.sendNotification("create_message_fail",[e,a],i)})},uploadForHubot:function(e,t,n){var i=this.dataStore.getTalk(e),r={file:t,thumb:null};if(null==i){var a=this.dataFactory.newDummyFileMessage(e,r),o={code:400,message:"invalid talk_id (deleted talk)"};return $i._w("["+s.dateStr(new Date)+"] ","WARNING method: upload",o,"","",""),void this.sendNotification("create_message_fail",[o,a],n)}this.uploadV2(i.domainId,i.id,r,n)},uploadMulti:function(e,t,n,i,r){var a=this,o=i.map(function(e){var t=di.getBlobFromUpdatableFile(e);return a.fileService.asyncCreateThumbnail(t).catch(function(e){return null}).then(function(t){return{file:e,thumb:t}})});Promise.all(o).then(function(i){var o=i.map(function(e){return e});a.uploadMultiV2(e,t,n,o,r)})},uploadMultiV2:function(e,t,n,i,r){var a=this,o=this.dataFactory.newDummyMultipleFileMessage(t,n,i);this.sendNotification("create_message_start",o);for(var s=Promise.resolve([]),l=0;l0&&(s.text=n),a.createMessageReliable(t,Bt.textMultipleFile,s,o,r)}}),s.catch(function(e){a.sendNotification("create_message_fail",[e,o],r)})},uploadMultiForHubot:function(e,t,n,i){var r=this.dataStore.getTalk(e),a=n.map(function(e){return{file:e,thumb:null}});if(null==r){var o=this.dataFactory.newDummyMultipleFileMessage(e,t,a),l={code:400,message:"invalid talk_id (deleted talk)"};return $i._w("["+s.dateStr(new Date)+"] ","WARNING method: uploadMulti",l,"","",""),void this.sendNotification("create_message_fail",[l,o],i)}this.uploadMultiV2(r.domainId,r.id,t,a,i)},prepareMessageFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,Qn.THUMBNAIL,function(n){t.setAuth(n),e(ka.Some(t))},function(t){e(ka.None)}):e(ka.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,Qn.MESSAGE,function(n){var i=rr.normalizeForFile(e.name),a=D.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},prepareNoteFileAsync:function(e,t,n){var i=this;return new Promise(function(e,r){null!=t?i.uploadFile(t.file,n,Qn.NOTE_THUMBNAIL,function(n){t.setAuth(n),e(ka.Some(t))},function(t){e(ka.None)}):e(ka.None)}).then(function(t){return new Promise(function(r,a){i.uploadFile(e,n,Qn.NOTE_ATTACHMENT,function(n){var i=rr.normalizeForFile(e.name),a=D.createFileInfoDynamic(e,i,t,n);r(a)},a)})})},createMessageReliable:function(e,t,n,i,r){var a=this;this.apiCaller.callApiReliable("create_message",[e,Lt.enumIndex(t),n],function(e){a.fileInfoStore.removeMessageFileInfos(i.id),a.messageStore.removeMessage(i.id);var t=a.dataFactory.newMessage(e);a.sendNotification("create_message_complete",[t,i.id],r)},function(e){if(a.sendNotification("create_message_fail",[e,i],r),null!=e&&409==e.code){var t=Hr.toLocalError(xt.SendingMessageConflicted,e);a.sendNotification("error_occurred",t)}else a.sendNotification("error_occurred",e)},function(e){return a.shouldRetryCreateMessage(e)?ka.Some(a.apiCaller.retryTimeForReplicationLag()):ka.None})},shouldRetryCreateMessage:function(e){return null!=e.code&&(500==e.code?"Internal Error (IllegalStateException)"==e.message:400==e.code&&"invalid file_id"==e.message)},uploadFile:function(e,t,n,i,r){var a=this,o=e,l=rr.normalizeForFile(o.name),u=o.type,c=o.size,_=this.apiCaller,h=Jn.getUseTypeInt(n);_.call("create_upload_auth",[l,u,c,t,h],function(t){a.fileService.upload(t,u,e).then(function(e){i(t)},function(e){var t="failed to upload: "+m.string(e);$i._e("["+s.dateStr(new Date)+"] ",t,"","","","");var i=new Br({code:null,detail:null,message:e});if(n!=Qn.THUMBNAIL&&n!=Qn.NOTE_THUMBNAIL&&n!=Qn.NOTE_ATTACHMENT){var o=Hr.toLocalError(xt.GeneralFileError,i);a.sendNotification("error_occurred",o)}r(i)})},function(e){if(n!=Qn.THUMBNAIL&&n!=Qn.NOTE_THUMBNAIL&&n!=Qn.NOTE_ATTACHMENT&&null!=e)if(502==e.code&&null!=e.detail){var t=O.fromIntOrInt64(e.detail.limit_max);if("file_size"==e.detail.limit_target){var i=Hr.toLocalError(xt.UploadSizeOvered(t),e);a.sendNotification("error_occurred",i)}else if("storage_size"==e.detail.limit_target){var o=Hr.toLocalError(xt.StorageSizeOvered(t),e);a.sendNotification("error_occurred",o)}}else a.sendNotification("error_occurred",e);r(e)})},createDownloadAuth:function(e,t,n,i,r){var a=this;this.apiCaller.callApiReliable("create_download_auth",[e,t,n],function(e){i(new wt(e))},function(e){r(e)},function(e){return 429==e.code&&"too many requests"==e.message?ka.Some(1e3*a.asInt(e.detail.retry_after)):ka.None})},deleteAttachment:function(e,t){this.apiCaller.call("delete_attachment",[e,t])},getAttachments:function(e,t){var n=this;null==t&&(t={sinceId:null,maxId:null}),this.apiCaller.call("get_attachments",[e,20,t.sinceId,t.maxId],function(t){var i=t.map(uo(so=n.dataFactory,so.newFileInfo));n.sendNotification("get_file_responsed",{talkId:e,files:i})})},createAnnouncement:function(e,t,n,i){var r=this;if(null!=e||null!=(e=this.settings.getSelectedDomainId())){var a=this.dataFactory.newDummyMessage(null,t,n);this.sendNotification("create_announcement_start",a),this.apiCaller.call("create_announcement",[e,Lt.enumIndex(t),n],function(e){var t=r.dataFactory.newAnnouncement(e);r.sendNotification("create_announcement_complete",[t,a.id],i)},function(e){r.sendNotification("create_announcement_fail",a),r.sendNotification("error_occurred",e)})}},getAnnouncements:function(e,t,n){var i=this,r=this.settings.getSelectedDomainId();if(null!=r){e=null==e?{sinceId:null,maxId:null}:e;var a=this.apiCaller,o=e.sinceId,s=e.maxId,l=jt.orderToInt(t);a.call("get_announcements",[r,20,o,s,l],function(e){var a=e.map(uo(so=i.dataFactory,so.newAnnouncement));i.sendNotification("notify_get_announcements",{domainId:r,announcements:a,sortOrder:t,callerKey:n})})}},getAnnouncementStatuses:function(e){var t=this;this.apiCaller.call("get_announcement_statuses",[],function(n){for(var i=0;i=0?s:1;(l>1||2==r.type&&0!=l)&&(r.user=t,this.sendNotification("notify_update_user",t))}else{var u={type:2,user:t};null!=No[i]?e.setReserved(i,u):e.h[i]=u}this.storage.setDirtyFlag()},setUserPresence:function(e){null==this.userPresences&&(this.userPresences=new Oa);var t=e.userId,n="_"+t.high+"_"+t.low,i=this.userPresences;null!=No[n]?i.setReserved(n,e):i.h[n]=e},getUserPresence:function(e){if(null==this.userPresences)return null;var t="_"+e.high+"_"+e.low,n=this.userPresences;return null!=No[t]?n.getReserved(t):n.h[t]},isDepartmentsChanged:function(e,t){return!O.eqArray(e.departments,t.departments)},setUsersIfLatest:function(e,t){var n=this.ensureDomainUserMap(e),i=uo(this,this.setUserIfLatest),r=n;l.iter(t,function(e){i(r,e)})},clearDomainUsers:function(e){this.users.remove("_"+e.high+"_"+e.low)&&this.storage.setDirtyFlag()},clearUsersDepartments:function(e){var t="_"+e.high+"_"+e.low,n=this.users,i=null!=No[t]?n.getReserved(t):n.h[t];if(null!=i)for(var r=new Ca(i,i.arrayKeys());r.hasNext();){var a=r.next();a.user.departments=null,this.sendNotification("notify_update_user",a.user)}this.storage.setDirtyFlag()},removeFriend:function(e,t){var n="_"+e.high+"_"+e.low,i=this.users,r=null!=No[n]?i.getReserved(n):i.h[n];if(null!=r){var a="_"+t.high+"_"+t.low,o=null!=No[a]?r.getReserved(a):r.h[a];null!=o&&(o.type=2)}this.storage.setDirtyFlag()},removeAcquaintance:function(e,t){this.removeFriend(e,t)},getUser:function(e,t){if(null==t)return null;var n,i=new Zn(0,0);if(t.high==i.high&&t.low==i.low)return null;if(null!=this.me){var r=this.me.id;n=null!=r&&null!=t&&r.high==t.high&&r.low==t.low}else n=!1;if(n)return this.me.toDomainUser(e);var a="_"+e.high+"_"+e.low,o=this.users,s=null!=No[a]?o.getReserved(a):o.h[a];if(null!=s){var l="_"+t.high+"_"+t.low,u=null!=No[l]?s.getReserved(l):s.h[l];if(null!=u)return u.user}return null},getUsers:function(e,t){var n=this,i=function(e,t){var i="_"+e.high+"_"+e.low,r=n.users,a=null!=No[i]?r.getReserved(i):r.h[i];if(null!=a){if(null!=t)return t.map(function(t){var i=new Zn(0,0);if(t.high==i.high&&t.low==i.low)return null;var r=n.me.id;if(null!=r&&null!=t&&r.high==t.high&&r.low==t.low)return n.me.toDomainUser(e);var o="_"+t.high+"_"+t.low,s=null!=No[o]?a.getReserved(o):a.h[o];return null!=s?s.user:null});for(var o=[],s=a.arrayKeys(),l=new Ca(a,s);l.hasNext();)o.push(l.next().user);return o}return[]};if(null!=e)return i(e,t);for(var r=this.domains,a=new Ca(r,r.arrayKeys()),o=null;a.hasNext();)o=null==o?i(a.next().id,t):o.concat(i(a.next().id,t));return null==o?[]:o},getTalk:function(e){var t="_"+e.high+"_"+e.low,n=this.talks;return null!=No[t]?n.getReserved(t):n.h[t]},getValidPairTalk:function(e,t){var n=this;return null==this.me?null:l.find(this.getTalks(),function(i){if(!y.enumEq(i.type,Rn.PairTalk))return!1;var r=i.domainId;return null!=r&&null!=t&&r.high==t.high&&r.low==t.low&&(!!l.exists(i.userIds,function(t){return null!=t&&null!=e&&t.high==e.high&&t.low==e.low})&&!!l.exists(i.userIds,function(e){var t=n.me.id;return null!=e&&null!=t&&e.high==t.high&&e.low==t.low}))})},setTalk:function(e){var t=e.id,n="_"+t.high+"_"+t.low,i=this.talks;if(null!=No[n]?i.setReserved(n,e):i.h[n]=e,null!=e.leftUsers)for(var r=this.ensureDomainUserMap(e.domainId),a=0,o=e.leftUsers;a=0?f:1)>0}else _=!1;_&&(c.user=s,this.sendNotification("notify_update_user",s))}else{var m={type:2,user:s};null!=No[u]?r.setReserved(u,m):r.h[u]=m,this.sendNotification("notify_update_user",s)}}return this.storage.setDirtyFlag(),e},getTalks:function(){for(var e=[],t=this.talks.keys();t.hasNext();){var n=t.next(),i=this.talks;e.push(null!=No[n]?i.getReserved(n):i.h[n])}return e},setTalks:function(e){l.iter(e,uo(this,this.setTalk))},removeTalk:function(e){if(null!=this.domainUnreadCounts){var t="_"+e.high+"_"+e.low,n=this.talks,i=null!=No[t]?n.getReserved(t):n.h[t];if(null!=i){var r=i.domainId;this.domainUnreadCounts.remove("_"+r.high+"_"+r.low)}}if(null!=this.questions)for(var a=this.getQuestions(e),o=0;o=0?l:1)>=0}else t=!0;if(t){var u=this.domains;return null!=No[i]?u.setReserved(i,e):u.h[i]=e,this.storage.setDirtyFlag(),e}return a},removeDomain:function(e){this.domains.remove("_"+e.high+"_"+e.low),this.storage.setDirtyFlag();for(var t=this.getTalks().filter(function(t){var n=t.domainId;return null!=n&&null!=e&&n.high==e.high&&n.low==e.low}),n=0;ne.version)return r;var a=this.accountControlRequests;return null!=No[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 Oa,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=0?a:1)>=0}else i=!1;i&&this.removeKeywordDetection(e,t)}},removeKeywordDetection:function(e,t){if(null!=this.detectedDomainTalkIdStrings){var n=this.getKey(e,t);if(null!=n){this.detectedDomainTalkIdStrings.remove(n);var i=this.settings.getBrowserSettings().keywordWatchingEmphasis;this.sendNotification("keyword_detaction_updated",{domainId:e,talkId:t,detected:!1,emphasis:i})}}},removeKeywordDetectionAll:function(){if(null!=this.detectedDomainTalkIdStrings)for(var e=this.settings.getBrowserSettings().keywordWatchingEmphasis,t=this.detectedDomainTalkIdStrings.keys();t.hasNext();){var n=t.next();if(g.startsWith(n,"talk_")){var i=n.substring("talk_".length),r=O.makeFromIdStr(i);this.sendNotification("keyword_detaction_updated",{domainId:null,talkId:r,detected:!1,emphasis:e})}else if(g.startsWith(n,"announcement_")){var a=n.substring("announcement_".length),o=O.makeFromIdStr(a);this.sendNotification("keyword_detaction_updated",{domainId:o,talkId:null,detected:!1,emphasis:e})}this.detectedDomainTalkIdStrings.remove(n)}},getDetectId:function(e,t){if(null==this.detectedDomainTalkIdStrings)return null;var n=this.getKey(e,t);if(null==n)return null;var i=this.detectedDomainTalkIdStrings;return null!=No[n]?i.getReserved(n):i.h[n]},hasKeywordDetection:function(e,t){return null!=this.getDetectId(e,t)},getKey:function(e,t){return null==e&&null==t?null:null!=t?"talk__"+t.high+"_"+t.low:"announcement__"+e.high+"_"+e.low},__class__:Dr});var kr=function(){};n["albero.proxy.KeywordParser"]=kr,kr.__name__=["albero","proxy","KeywordParser"],kr.parse=function(e){var t=g.htmlEscape(e,!0),n=new o(""(.*?)"","g").map(t,function(e){return kr.encodeSpace(e.matched(1))});return new o("[  ]","g").split(n).filter(P.isNotEmpty).map(kr.decodeSpace).map(kr.createParsedKeyword)},kr.encodeSpace=function(e){return g.replace(g.replace(e," ","&SPACE")," ","&FULL_PITCH_SPACE")},kr.decodeSpace=function(e){return g.replace(g.replace(e,"&SPACE"," "),"&FULL_PITCH_SPACE"," ")},kr.createParsedKeyword=function(e){var t=new o("\\[type:([A-Za-z]+)\\](.*)","g");if(t.match(e)){var n=t.matched(1),i=t.matched(2),r=Mr.getKeywordTypeByMessageTypeString(n);if(r!=Or.normal)return new Cr(r,i)}return new Cr(Or.normal,e)};var Cr=function(e,t){this.type=e,this.word=t};n["albero.proxy.ParsedKeyword"]=Cr,Cr.__name__=["albero","proxy","ParsedKeyword"],Cr.prototype={__class__:Cr};var Or=n["albero.proxy.KeywordType"]={__ename__:["albero","proxy","KeywordType"],__constructs__:["normal","selectOneReplyOnly","yesOrNoReplyOnly","todoDoneOnly"]};Or.normal=["normal",0],Or.normal.toString=i,Or.normal.__enum__=Or,Or.selectOneReplyOnly=["selectOneReplyOnly",1],Or.selectOneReplyOnly.toString=i,Or.selectOneReplyOnly.__enum__=Or,Or.yesOrNoReplyOnly=["yesOrNoReplyOnly",2],Or.yesOrNoReplyOnly.toString=i,Or.yesOrNoReplyOnly.__enum__=Or,Or.todoDoneOnly=["todoDoneOnly",3],Or.todoDoneOnly.toString=i,Or.todoDoneOnly.__enum__=Or,Or.__empty_constructs__=[Or.normal,Or.selectOneReplyOnly,Or.yesOrNoReplyOnly,Or.todoDoneOnly];var Mr=function(){};n["albero.proxy.KeywordTypeHelper"]=Mr,Mr.__name__=["albero","proxy","KeywordTypeHelper"],Mr.getKeywordType=function(e){return null!=e?Mr.getKeywordTypeByMessageTypeString(Lt.typeString(e)):Or.normal},Mr.getKeywordTypeByMessageTypeString=function(e){if(null!=e)switch(e){case"selectOneReply":return Or.selectOneReplyOnly;case"todoDone":return Or.todoDoneOnly;case"yesOrNoReply":return Or.yesOrNoReplyOnly}return Or.normal},Mr.match=function(e,t){switch(t[1]){case 0:return!0;case 1:return e==Bt.selectOneReply;case 2:return e==Bt.yesOrNoReply;case 3:return e==Bt.todoDone}},Mr.createFilterClassStringFromMessageType=function(e){return Mr.createFilterClassString(Mr.getKeywordType(e))},Mr.createFilterClassString=function(e){return"keyword_type_"+m.string(e)};var Fr=function(){hr.call(this,"lastUsedAtUpdater")};n["albero.proxy.LastUsedAtUpdaterProxy"]=Fr,Fr.__name__=["albero","proxy","LastUsedAtUpdaterProxy"],Fr.__super__=hr,Fr.prototype=r(hr.prototype,{startPolling:function(e){if(null==this.pollingTimer){var t,n=this.getLastUsedExpiredAt();if(null==n)t=0;else{var i=n.high,r=n.low;t=4294967296*i+(r>=0?r:r+4294967296)-(new Date).getTime()|0}if(t<=0)e(),this.pollingTimer=new Sa(6e5),this.pollingTimer.run=e;else{var a=uo(this,this.startPolling),o=e;Sa.delay(function(){a(o)},t)}}},stopPolling:function(){null!=this.pollingTimer&&(this.pollingTimer.stop(),this.pollingTimer=null)},getLastUsedExpiredAt:function(){return null!=this.lastUsedExpiredAtCache?this.lastUsedExpiredAtCache:this.settings.getLastUsedExpiredAt()},update:function(){this.lastUsedExpiredAtCache=b.afterAsInt64(6e5),this.settings.setLastUsedExpiredAt(this.lastUsedExpiredAtCache)},__class__:Fr});var Rr=function(){hr.call(this,"limitations")};n["albero.proxy.LimitationsProxy"]=Rr,Rr.__name__=["albero","proxy","LimitationsProxy"],Rr.__super__=hr,Rr.prototype=r(hr.prototype,{getMaxTalkers:function(){var e=this,t=x.flatMap(x.flatMap(x.option(this.settings.getSelectedDomainId()),function(t){return x.option(e.dataStore.getDomain(t))}),function(e){return e.getMaxTalkers()});switch(t[1]){case 0:return t[2];case 1:return this.settings.getConfiguration().maxTalkers}},__class__:Rr});var xr=function(){hr.call(this,"messageStore")};n["albero.proxy.MessageStoreProxy"]=xr,xr.__name__=["albero","proxy","MessageStoreProxy"],xr.__super__=hr,xr.prototype=r(hr.prototype,{onRegister:function(){this.messages=new Oa},getMessage:function(e){if(null==e)return ka.None;var t="_"+e.high+"_"+e.low,n=this.messages;return x.option(null!=No[t]?n.getReserved(t):n.h[t])},setMessage:function(e){},removeMessage:function(e){this.messages.remove("_"+e.high+"_"+e.low)},onFileDeleted:function(e){x.foreach(this.getMessage(e.messageId),function(t){t.deleteFile(e)})},onConferenceClose:function(e){x.foreach(this.getMessage(e.messageId),function(e){e.close()})},onActionStampClose:function(e){x.foreach(this.getMessage(e),function(e){e.close()})},onDeleteFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());x.foreach(t,function(t){t.updateFavorite(e)})},onAddFavoriteMessage:function(e){var t=this.getMessage(e.getMessageId());x.foreach(t,function(t){t.updateFavorite(e)}),x.isEmpty(t)&&this.setMessage(e.getMessage())},__class__:xr});var Ur=function(){this.connectionStatus=E.Ok,hr.call(this,"rpc"),this.responseHandlers=new ba,this.connectionKeeper=new Pr(uo(this,this.ping))};n["albero.proxy.MsgPackRpcProxy"]=Ur,Ur.__name__=["albero","proxy","MsgPackRpcProxy"],Ur.__super__=hr,Ur.prototype=r(hr.prototype,{initWebSocket:function(){null==this.ws&&(this.ws=sr.newInstance(Eo.endpoint,{onopen:uo(this,this.onOpen),onmessage:uo(this,this.onMessage),onclose:uo(this,this.onClose),onpong:uo(this,this.onPong)}),Ur.pingAt=null)},finishWebSocket:function(){if(null==this.ws)return null;this.ws.close();var e=this.ws;return this.ws=null,Ur.pingAt=null,this.lastUsedAtUpdater.stopPolling(),e},onRegister:function(){this.initWebSocket(),this.connectionKeeper.start()},onRemove:function(){this.connectionKeeper.stop(),this.finishWebSocket()},onOpen:function(){this.connectionStatus=E.Ok,this.connectionKeeper.setConnected(!0),this.sendNotification("SignIn")},onPong:function(e){Ur.pingAt=null;m.string(e)},onMessage:function(e){var t=this,n=new Va(e,!0).o,i=za.__cast(n[0],mo);if(1==i&&4==n.length){var r=za.__cast(n[1],mo),a=n[2],o=n[3],l=this.responseHandlers.h[r];if(null==l)return void $i._e("["+s.dateStr(new Date)+"] ","No ResponseHandler prepared. msgId:%s error:%s result:",r,a,o,"");l.method;if(null==a)l.onSuccess(o);else{var u=l.method;$i._e("["+s.dateStr(new Date)+"] ","Receive Error Response. method:",u," error:",a,""),l.onError(a)}this.responseHandlers.remove(r)}else if(0==i&&4==n.length){var c=za.__cast(n[1],mo),_=za.__cast(n[2],String),h=za.__cast(n[3],Array);if(0==h.length)return void $i._e("["+s.dateStr(new Date)+"] ","empty params.","","","","");this.broadcast.handleNotification(_,h[0],function(){null!=t.ws?t.ws.send(new qa([1,c,null,!0]).o.getBytes()):$i._e("["+s.dateStr(new Date)+"] ","websocket was finished.","","","","")})}},onClose:function(e,t,n){$i._i("["+s.dateStr(new Date)+"] ","onClose. code:"+e+", reason:"+t+", wasClean:"+(null==n?"null":""+n),"","","",""),1001==e&&n||(this.connectionStatus=1e3!=e&&1005!=e||"concurrent access"!=t?1e3!=e&&1005!=e||"forcibly closed"!=t?E.Error:E.ForcibliyClosedError:E.ConcurrentAccessError,this.connectionStatus==E.ForcibliyClosedError?this.sendNotification("SignOut"):this.sendNotification("Url",Ce.FORWARD(L.error))),this.finishWebSocket(),this.connectionKeeper.setConnected(!1)},restart:function(e){null==e&&(e=500);for(var t=this,n=this.finishWebSocket(),i=this.responseHandlers.keys();i.hasNext();){var r=i.next();this.responseHandlers.remove(r)}var a=null;a=function(){null==n||n.isClosed()?t.initWebSocket():Sa.delay(a,100)},Sa.delay(a,e)},call:function(e,t,n,i){if(null!=this.ws){null==t&&(t=[]),null==n&&(n=function(e){}),null==i&&(i=uo(this,this.onServerError));var r=Ur.lastMsgId++,a=this.responseHandlers,o=new Lr(e,n,i);a.h[r]=o;var l=new qa([0,r,e,t]).o.getBytes();this.ws.send(l)}else{var u=this.data;$i._e("["+s.dateStr(new Date)+"] ","disconnected. data:",u,"","","")}},ping:function(){switch(this.connectionStatus[1]){case 2:case 3:return}if(null==this.ws||this.ws.isClosed()){this.restart();Ur.pingAt,m.string(null==this.ws||this.ws.isClosed())}else{Ur.pingAt;this.connectionKeeper.isConnected()&&(this.ws.ping("PING"),Ur.pingAt=(new Date).getTime())}},onServerError:function(e){if(this.sendNotification("error_occurred",e),503==e.code&&"service temporarily unavailable"==e.message){var t=e.detail.retry_after;this.restart(1e3*t)}"invalid session"==e.message&&this.restart()},__class__:Ur});var Pr=function(e){this.connected=!1,this.ping=e};n["albero.proxy._MsgPackRpcProxy.ConnectionKeeper"]=Pr,Pr.__name__=["albero","proxy","_MsgPackRpcProxy","ConnectionKeeper"],Pr.prototype={start:function(){},stop:function(){this.deleteTimer()},setConnected:function(e){this.connected==e&&null!=this.timer||(this.connected=e,this.resetTimer())},isConnected:function(){return this.connected},resetTimer:function(){var e=this;if(this.deleteTimer(),this.connected)this.timer=new Sa(45e3),this.timer.run=this.ping;else{var t=null;(t=function(n){var i=0|Math.min(2*n,45e3);return function(){e.ping();var r=t(i);e.timer=Sa.delay(r,n)}})(3e3)()}},deleteTimer:function(){null!=this.timer&&(this.timer.stop(),this.timer=null)},__class__:Pr};var Lr=function(e,t,n){this.method=e,this.onSuccess=t,this.onError=n};n["albero.proxy._MsgPackRpcProxy.ResponseHandler"]=Lr,Lr.__name__=["albero","proxy","_MsgPackRpcProxy","ResponseHandler"],Lr.prototype={__class__:Lr};var Br=function(e){this.code=e.code,this.message=e.message,this.detail=e.detail};n["albero.proxy.Error"]=Br,Br.__name__=["albero","proxy","Error"],Br.prototype={__class__:Br};var Hr=function(){};n["albero.proxy.ErrorConverter"]=Hr,Hr.__name__=["albero","proxy","ErrorConverter"],Hr.toLocalError=function(e,t){return{code:t.code,message:t.message,detail:t.detail,localErrorType:e}};var Yr=function(){hr.call(this,"readStatusUpdater"),this.updateReadStatusesTimers=new Oa,this.updateReadAnnouncementStatusesTimers=new Oa};n["albero.proxy.ReadStatusUpdaterProxy"]=Yr,Yr.__name__=["albero","proxy","ReadStatusUpdaterProxy"],Yr.__super__=hr,Yr.prototype=r(hr.prototype,{updateReadStatuses:function(e,t){var n=this,i=this.dataStore.getTalkStatus(e);if(null!=i&&i.updateByReadingMessages(t,this.dataStore.me.id)){this.dataStore.setTalkStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadStatusesTimers,o=null!=No[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadMessageId,l=Sa.delay(function(){n.updateReadStatusesTimers.remove(r),null!=n.dataStore.getTalkStatus(e)&&n.api.updateReadStatuses(e,s)},1e3),u=this.updateReadStatusesTimers;null!=No[r]?u.setReserved(r,l):u.h[r]=l}},updateAnnouncementReadStatus:function(e,t){var n=this,i=this.dataStore.getAnnouncementStatus(e);if(null!=i&&i.updateByReadingAnnouncements(t)){this.dataStore.setAnnouncementStatus(i);var r="_"+e.high+"_"+e.low,a=this.updateReadAnnouncementStatusesTimers,o=null!=No[r]?a.getReserved(r):a.h[r];null!=o&&o.stop();var s=i.maxReadAnnouncementId;o=Sa.delay(function(){n.updateReadAnnouncementStatusesTimers.remove(r),n.api.updateAnnouncementReadStatus(e,s)},1e3);var l=this.updateReadAnnouncementStatusesTimers;null!=No[r]?l.setReserved(r,o):l.h[r]=o}},__class__:Yr});var Gr=function(){hr.call(this,"routing")};n["albero.proxy.RoutingProxy"]=Gr,Gr.__name__=["albero","proxy","RoutingProxy"],Gr.__super__=hr,Gr.prototype=r(hr.prototype,{onRegister:function(){},init:function(){null==this.router&&(this.router=new zr(this,this.settings,this.dataStore),this.sendNotification("first_routing_will_start"))},forward:function(e){this.init(),this.router.forward(e)},redirect:function(e,t){this.init(),this.router.redirect(e,t)},back:function(){null!=this.router&&this.router.back()},stop:function(){null!=this.router&&this.router.stop()},__class__:Gr});var zr=function(e,t,n){this.proxy=e,this.settings=t,this.dataStore=n,this.urlConverterDelegate=new Kr(t,n)};n["albero.proxy._RoutingProxy.LocalRouter"]=zr,zr.__name__=["albero","proxy","_RoutingProxy","LocalRouter"],zr.prototype={notify:function(e){var t=this.getDomainId(e);this.settings.setSelectedDomainId(t),this.proxy.sendNotification("current_page_changed",e)},forward:function(e){0!=e[1]&&this.notify(e)},redirect:function(e,t){},redirectWithHash:function(){},back:function(){this.notify(this.prev)},stop:function(){},getDomainId:function(e){switch(e[1]){case 2:return e[2];case 3:return e[2];case 4:return e[2];case 5:return e[2];case 6:return e[2];case 7:return e[2];case 11:return e[2];default:return null}},parseFragment:function(e){return Y.createUrls(e,this.urlConverterDelegate)},toFragment:function(e){return Y.createFragment(e,this.urlConverterDelegate)},__class__:zr};var Kr=function(e,t){this.settings=e,this.dataStore=t};n["albero.proxy.UrlConverterDelegate"]=Kr,Kr.__name__=["albero","proxy","UrlConverterDelegate"],Kr.__interfaces__=[G],Kr.prototype={isMultiViewMode:function(){return this.settings.isMultiViewMode()},getLastSelectedDomainId:function(){return x.option(this.settings.getLastSelectedDomainId())},getFallbackDomainId:function(){var e;switch(x.flatMap(this.getLastSelectedDomainId(),uo(this,this.getDomain))[1]){case 0:e=x.flatMap(this.getLastSelectedDomainId(),uo(this,this.getDomain));break;case 1:e=this.getOldestDomain()}return x.map(e,function(e){return e.id})},getDomain:function(e){return x.option(this.dataStore.getDomain(e))},getOldestDomain:function(){return new yt(this.dataStore.getDomains()).getOldestDomain()},__class__:Kr};var jr=function(){hr.call(this,"searchService")};n["albero.proxy.SearchServiceProxy"]=jr,jr.__name__=["albero","proxy","SearchServiceProxy"],jr.__super__=hr,jr.prototype=r(hr.prototype,{isSearching:function(){return this.searching},clearSearching:function(){this.searching=!1},isRecentParams:function(e){return null!=this.recentParams&&null!=e&&this.recentParams.eq(e)},clearRecentParams:function(){this.recentParams=null},clearEditingParams:function(){this.editingParams=null},saveParams:function(e){this.editingParams=e,this.recentParams=e.copy()},updateTalkIdParam:function(e){this.assureParams(),this.editingParams.talkId=e},updateSearchTypeParam:function(e){this.assureParams(),this.editingParams.searchType=e},updateFromUserIdParam:function(e){this.assureParams(),this.editingParams.fromUserId=e},updateKeywordParam:function(e){this.assureParams(),this.editingParams.keyword=e},updateDomainIdParam:function(e){this.assureParams(),this.editingParams.domainId=e},updateSinceTextParam:function(e){this.assureParams(),this.editingParams.sinceText=e},updateUntilTextParam:function(e){this.assureParams(),this.editingParams.untilText=e},assureParams:function(){if(null==this.editingParams){var e=this.settings.getSelectedDomainId(),t={domain_id_str:"_"+e.high+"_"+e.low};this.editingParams=new fn(t)}},prepareForSearching:function(e,t){this.searching=!0,null==t&&this.sendNotification("notify_search_prepare",{searching:!0,params:e})},notifySearchMessagesFail:function(){this.searching=!1,this.sendNotification("notify_search_messages_fail",{})},notifySearchAttachmentsFail:function(){this.searching=!1,this.sendNotification("notify_search_attachments_fail",{})},saveSearchMessagesResult:function(e){null==this.contextMap&&(this.contextMap=new Oa),this.messagesNextMarker=e.nextMarker,null==e.marker&&(this.hitMessageIdSet=new Oa);for(var t=0,n=e.contents;t0?e.api.getAnnouncementStatuses(function(){(n+=1)==t.length&&i()}):i();var r=0,a=function(){2==(r+=1)&&e.api.getTalks(i)};e.api.getFriends(a),e.api.getAcquaintances(a)}),e.api.getAccountControlRequests(function(){e.api.getDomainInvites(i)}),e.api.getJoinedAccountControlGroup(i)})},prepareNecessaryDataFromCache:function(){var e=F.sortAndReturn(this.dataStore.getDomains(),function(e,t){var n=t.id,i=e.id,r=n.high-i.high|0;return r=0!=r?r:pa.ucompare(n.low,i.low),n.high<0?i.high<0?r:-1:i.high>=0?r:1});this.api.sendDomainNotifications(e);for(var t=0;t>>32-h,t.low<>>32-d,u.low<=0)break}for(;;){var f=new Zn(0,0);if(u.high==f.high&&u.low==f.low)break;var m=pa.ucompare(n.high,t.high);if((0!=m?m:pa.ucompare(n.low,t.low))>=0){l=new Zn(l.high|u.high,l.low|u.low);var p=n.high-t.high|0,g=n.low-t.low|0;if(pa.ucompare(n.low,t.low)<0){p--;p|=0}n=new Zn(p,g)}var v=1;if(0==(v&=63))u=new Zn(u.high,u.low);else if(v<32){u=new Zn(u.high>>>v,u.high<<32-v|u.low>>>v)}else{u=new Zn(0,u.high>>>v-32)}var y=1;if(0==(y&=63))t=new Zn(t.high,t.low);else if(y<32){t=new Zn(t.high>>>y,t.high<<32-y|t.low>>>y)}else{t=new Zn(0,t.high>>>y-32)}}if(i){var S=~l.high,w=-l.low;if(0==w){S++;S|=0}l=new Zn(S,w)}if(e.high<0){var T=~n.high,I=-n.low;if(0==I){T++;T|=0}n=new Zn(T,I)}return{quotient:l,modulus:n}};var va=function(){};n["haxe.Int64Helper"]=va,va.__name__=["haxe","Int64Helper"],va.parseString=function(e){var t=new Zn(0,10),n=new Zn(0,0),i=new Zn(0,1),r=!1,a=g.trim(e);"-"==a.charAt(0)&&(r=!0,a=a.substring(1,a.length));for(var o=a.length,l=0,u=o;l9)throw new Ga("NumberFormatError");var h=new Zn(_>>31,_);if(r){var d=65535&i.low,f=i.low>>>16,m=65535&h.low,p=h.low>>>16,v=pa._mul(d,m),y=pa._mul(f,m),S=pa._mul(d,p),w=v,T=(pa._mul(f,p)+(S>>>16)|0)+(y>>>16)|0;if(w=w+(S<<=16)|0,pa.ucompare(w,S)<0){T++;T|=0}if(w=w+(y<<=16)|0,pa.ucompare(w,y)<0){T++;T|=0}T=T+(pa._mul(i.low,h.high)+pa._mul(i.high,h.low)|0)|0;var I=new Zn(T,w),E=n.high-I.high|0,N=n.low-I.low|0;if(pa.ucompare(n.low,I.low)<0){E--;E|=0}if(!((n=new Zn(E,N)).high<0))throw new Ga("NumberFormatError: Underflow")}else{var A=65535&i.low,b=i.low>>>16,D=65535&h.low,k=h.low>>>16,C=pa._mul(A,D),O=pa._mul(b,D),M=pa._mul(A,k),F=C,R=(pa._mul(b,k)+(M>>>16)|0)+(O>>>16)|0;if(F=F+(M<<=16)|0,pa.ucompare(F,M)<0){R++;R|=0}if(F=F+(O<<=16)|0,pa.ucompare(F,O)<0){R++;R|=0}R=R+(pa._mul(i.low,h.high)+pa._mul(i.high,h.low)|0)|0;var x=new Zn(R,F),U=n.high+x.high|0,P=n.low+x.low|0;if(pa.ucompare(P,n.low)<0){U++;U|=0}if((n=new Zn(U,P)).high<0)throw new Ga("NumberFormatError: Overflow")}var L=65535&i.low,B=i.low>>>16,H=65535&t.low,Y=t.low>>>16,G=pa._mul(L,H),z=pa._mul(B,H),K=pa._mul(L,Y),j=G,W=(pa._mul(B,Y)+(K>>>16)|0)+(z>>>16)|0;if(j=j+(K<<=16)|0,pa.ucompare(j,K)<0){W++;W|=0}if(j=j+(z<<=16)|0,pa.ucompare(j,z)<0){W++;W|=0}W=W+(pa._mul(i.low,t.high)+pa._mul(i.high,t.low)|0)|0,i=new Zn(W,j)}return n};var ya=function(){this.buf=new p,this.cache=[],this.useCache=ya.USE_CACHE,this.useEnumIndex=ya.USE_ENUM_INDEX,this.shash=new Oa,this.scount=0};n["haxe.Serializer"]=ya,ya.__name__=["haxe","Serializer"],ya.run=function(e){var t=new ya;return t.serialize(e),t.toString()},ya.prototype={toString:function(){return this.buf.b},serializeString:function(e){var t=this.shash,n=null!=No[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!=No[e]?i.setReserved(e,r):i.h[e]=r,this.buf.b+="y",e=encodeURIComponent(e),this.buf.b+=m.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;n0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o),o=0),this.serialize(e[_]))}o>0&&(1==o?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==o?"null":""+o)),this.buf.b+="h";break;case Date:var h=e;this.buf.b+="v",this.buf.b+=m.string(h.getTime());break;case u:this.buf.b+="l";for(var d=e.h;null!=d;){var p=d.item;d=d.next;var g=p;this.serialize(g)}this.buf.b+="h";break;case ba:this.buf.b+="q";for(var v=e,S=v.keys();S.hasNext();){var w=S.next();this.buf.b+=":",this.buf.b+=null==w?"null":""+w,this.serialize(v.h[w])}this.buf.b+="h";break;case Da:this.buf.b+="M";for(var T=e,I=T.keys();I.hasNext();){var E=I.next(),N=f.field(E,"__id__");f.deleteField(E,"__id__"),this.serialize(E),E.__id__=N,this.serialize(T.h[E.__id__])}this.buf.b+="h";break;case Oa:this.buf.b+="b";for(var A=e,b=A.keys();b.hasNext();){var D=b.next();this.serializeString(D),this.serialize(null!=No[D]?A.getReserved(D):A.h[D])}this.buf.b+="h";break;case Ma:var k=e;this.buf.b+="s",this.buf.b+=m.string(Math.ceil(8*k.length/6)),this.buf.b+=":";var C=0,O=k.length-2,M=ya.BASE64_CODES;if(null==M){var F=ya.BASE64.length;M=new Array(F);for(var R=0,x=ya.BASE64.length;R>2]),this.buf.b+=String.fromCharCode(M[63&(P<<4|L>>4)]),this.buf.b+=String.fromCharCode(M[63&(L<<2|B>>6)]),this.buf.b+=String.fromCharCode(M[63&B])}if(C==O){var H=k.b[C++],Y=k.b[C++];this.buf.b+=String.fromCharCode(M[H>>2]),this.buf.b+=String.fromCharCode(M[63&(H<<4|Y>>4)]),this.buf.b+=String.fromCharCode(M[Y<<2&63])}else if(C==O+1){var G=k.b[C++];this.buf.b+=String.fromCharCode(M[G>>2]),this.buf.b+=String.fromCharCode(M[G<<4&63])}break;default:this.useCache&&this.cache.pop(),null!=e.hxSerialize?(this.buf.b+="C",this.serializeString(y.getClassName(a)),this.useCache&&this.cache.push(e),e.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(y.getClassName(a)),this.useCache&&this.cache.push(e),this.serializeFields(e))}break;case 7:var z=t[2];if(this.useCache){if(this.serializeRef(e))return;this.cache.pop()}this.buf.b+=m.string(this.useEnumIndex?"j":"w"),this.serializeString(y.getEnumName(z)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=m.string(e[1])):this.serializeString(e[0]),this.buf.b+=":";var K=e.length;this.buf.b+=m.string(K-2);for(var j=2,W=K;j57)break;e=10*e+(i-48),this.pos++}else{if(this.pos!=n)break;t=!0,this.pos++}}return t&&(e*=-1),e},readFloat:function(){for(var e=this.pos;;){var t=this.buf.charCodeAt(this.pos);if(t!=t)break;if(!(t>=43&&t<58||101==t||69==t))break;this.pos++}return parseFloat(s.substr(this.buf,e,this.pos-e))},unserializeObject:function(e){for(;;){if(this.pos>=this.length)throw new Ga("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new Ga("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 Ga("Invalid enum format");var n=this.readDigits();if(0==n)return y.createEnum(e,t);for(var i=[];n-- >0;)i.push(this.unserialize());return y.createEnum(e,t,i)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new Ga("Class not found "+e);return t;case 66:var n=this.unserialize(),i=this.resolver.resolveEnum(n);if(null==i)throw new Ga("Enum not found "+n);return i;case 67:var r=this.unserialize(),a=this.resolver.resolveClass(r);if(null==a)throw new Ga("Class not found "+r);var o=y.createEmptyInstance(a);if(this.cache.push(o),o.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new Ga("Invalid custom data");return o;case 77:var l=new Da;this.cache.push(l);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var c=this.unserialize();l.set(c,this.unserialize())}return this.pos++,l;case 82:var _=this.readDigits();if(_<0||_>=this.scache.length)throw new Ga("Invalid string reference");return this.scache[_];case 97:this.buf;var h=[];for(this.cache.push(h);;){var d=this.buf.charCodeAt(this.pos);if(104==d){this.pos++;break}if(117==d){this.pos++;var f=this.readDigits();h[h.length+f-1]=null}else h.push(this.unserialize())}return h;case 98:var m=new Oa;this.cache.push(m);for(this.buf;104!=this.buf.charCodeAt(this.pos);){var p=this.unserialize(),g=this.unserialize();null!=No[p]?m.setReserved(p,g):m.h[p]=g}return this.pos++,m;case 99:var v=this.unserialize(),S=this.resolver.resolveClass(v);if(null==S)throw new Ga("Class not found "+v);var w=y.createEmptyInstance(S);return this.cache.push(w),this.unserializeObject(w),w;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:var T=this.unserialize(),I=this.resolver.resolveEnum(T);if(null==I)throw new Ga("Enum not found "+T);this.pos++;var E=this.readDigits(),N=I.__constructs__.slice()[E];if(null==N)throw new Ga("Unknown enum index "+T+"@"+E);var A=this.unserializeEnum(I,N);return this.cache.push(A),A;case 107:return NaN;case 108:var b=new u;this.cache.push(b);for(this.buf;104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());return this.pos++,b;case 109:return-1/0;case 110:return null;case 111:var D={};return this.cache.push(D),this.unserializeObject(D),D;case 112:return 1/0;case 113:var k=new ba;this.cache.push(k);this.buf;for(var C=this.buf.charCodeAt(this.pos++);58==C;){var O=this.readDigits(),M=this.unserialize();k.h[O]=M,C=this.buf.charCodeAt(this.pos++)}if(104!=C)throw new Ga("Invalid IntMap format");return k;case 114:var F=this.readDigits();if(F<0||F>=this.cache.length)throw new Ga("Invalid reference");return this.cache[F];case 115:var R=this.readDigits(),x=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos>2)+(L>=2?L-1:0))),Y=0;P>4);var K=U[x.charCodeAt(P++)];H.b[Y++]=255&(z<<4|K>>2);var j=U[x.charCodeAt(P++)];H.b[Y++]=255&(K<<6|j)}if(L>=2){var W=U[x.charCodeAt(P++)],V=U[x.charCodeAt(P++)];if(H.b[Y++]=255&(W<<2|V>>4),3==L){var q=U[x.charCodeAt(P++)];H.b[Y++]=255&(V<<4|q>>2)}}return this.pos+=R,this.cache.push(H),H;case 116:return!0;case 118:var Q;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&45==this.buf.charCodeAt(this.pos+4))Q=s.strDate(s.substr(this.buf,this.pos,19)),this.pos+=19;else{var J=this.readFloat();Q=new Date(J)}return this.cache.push(Q),Q;case 119:var X=this.unserialize(),Z=this.resolver.resolveEnum(X);if(null==Z)throw new Ga("Enum not found "+X);var $=this.unserializeEnum(Z,this.unserialize());return this.cache.push($),$;case 120:throw Ga.wrap(this.unserialize());case 121:var ee=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.posa+2){var o=e.left,s=e.right;return(null==o?0:o._height)>=(null==s?0:s._height)?new Ea(e.left,e.key,e.value,new Ea(e.right,t,n,i)):new Ea(new Ea(e.left,e.key,e.value,e.right.left),e.right.key,e.right.value,new Ea(e.right.right,t,n,i))}if(a>r+2){var l=i.right,u=i.left;return(null==l?0:l._height)>(null==u?0:u._height)?new Ea(new Ea(e,t,n,i.left),i.key,i.value,i.right):new Ea(new Ea(e,t,n,i.left.left),i.left.key,i.left.value,new Ea(i.left.right,i.key,i.value,i.right))}return new Ea(e,t,n,i,(r>a?r:a)+1)},compare:function(e,t){return f.compare(e,t)},__class__:Ia};var Ea=function(e,t,n,i,r){if(null==r&&(r=-1),this.left=e,this.key=t,this.value=n,this.right=i,-1==r){var a,o=this.left,s=this.right;if((null==o?0:o._height)>(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"]=Ea,Ea.__name__=["haxe","ds","TreeNode"],Ea.prototype={__class__:Ea};var Na=n["haxe.ds.Either"]={__ename__:["haxe","ds","Either"],__constructs__:["Left","Right"]};Na.Left=function(e){var t=["Left",0,e];return t.__enum__=Na,t.toString=i,t},Na.Right=function(e){var t=["Right",1,e];return t.__enum__=Na,t.toString=i,t},Na.__empty_constructs__=[];var Aa=function(){Ia.call(this)};n["haxe.ds.EnumValueMap"]=Aa,Aa.__name__=["haxe","ds","EnumValueMap"],Aa.__interfaces__=[ma],Aa.__super__=Ia,Aa.prototype=r(Ia.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),t.push(128|63&i)):i<=65535?(t.push(224|i>>12),t.push(128|i>>6&63),t.push(128|63&i)):(t.push(240|i>>18),t.push(128|i>>12&63),t.push(128|i>>6&63),t.push(128|63&i))}return new Ma(new bo(t).buffer)},Ma.ofData=function(e){var t=e.hxBytes;return null!=t?t:new Ma(e)},Ma.fastGet=function(e,t){return e.bytes[t]},Ma.prototype={getString:function(e,t){if(e<0||t<0||e+t>this.length)throw new Ga(Ba.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__:Ma};var Fa=function(){this.b=[]};n["haxe.io.BytesBuffer"]=Fa,Fa.__name__=["haxe","io","BytesBuffer"],Fa.prototype={getBytes:function(){var e=new Ma(new bo(this.b).buffer);return this.b=null,e},__class__:Fa};var Ra=function(){};n["haxe.io.Input"]=Ra,Ra.__name__=["haxe","io","Input"],Ra.prototype={readByte:function(){throw new Ga("Not implemented")},readBytes:function(e,t,n){var i=n,r=e.b;if(t<0||n<0||t+n>e.length)throw new Ga(Ba.OutsideBounds);try{for(;i>0;)r[t]=this.readByte(),++t,--i}catch(e){if(e instanceof Ga&&(e=e.val),!za.__instanceof(e,La))throw e}return n-i},set_bigEndian:function(e){return this.bigEndian=e,e},read:function(e){for(var t=new Ma(new Ao(e)),n=0;e>0;){var i=this.readBytes(t,n,e);if(0==i)throw new Ga(Ba.Blocked);n+=i,e-=i}return t},readFloat:function(){return Ha.i32ToFloat(this.readInt32())},readDouble:function(){var e=this.readInt32(),t=this.readInt32();return this.bigEndian?Ha.i64ToDouble(t,e):Ha.i64ToDouble(e,t)},readInt8:function(){var e=this.readByte();return e>=128?e-256:e},readInt16:function(){var e=this.readByte(),t=this.readByte(),n=this.bigEndian?t|e<<8:e|t<<8;return 0!=(32768&n)?n-65536:n},readUInt16:function(){var e=this.readByte(),t=this.readByte();return this.bigEndian?t|e<<8:e|t<<8},readInt32:function(){var e=this.readByte(),t=this.readByte(),n=this.readByte(),i=this.readByte();return this.bigEndian?i|n<<8|t<<16|e<<24:e|t<<8|n<<16|i<<24},__class__:Ra};var xa=function(e,t,n){if(null==t&&(t=0),null==n&&(n=e.length-t),t<0||n<0||t+n>e.length)throw new Ga(Ba.OutsideBounds);this.b=e.b,this.pos=t,this.len=n,this.totlen=n};n["haxe.io.BytesInput"]=xa,xa.__name__=["haxe","io","BytesInput"],xa.__super__=Ra,xa.prototype=r(Ra.prototype,{readByte:function(){if(0==this.len)throw new Ga(new La);return this.len--,this.b[this.pos++]},readBytes:function(e,t,n){if(t<0||n<0||t+n>e.length)throw new Ga(Ba.OutsideBounds);if(0==this.len&&n>0)throw new Ga(new La);this.lene.length)throw new Ga(Ba.OutsideBounds);for(var i=e.b,r=n;r>0;)this.writeByte(i[t]),++t,--r;return n},set_bigEndian:function(e){return this.bigEndian=e,e},write:function(e){for(var t=e.length,n=0;t>0;){var i=this.writeBytes(e,n,t);if(0==i)throw new Ga(Ba.Blocked);n+=i,t-=i}},writeFloat:function(e){this.writeInt32(Ha.floatToI32(e))},writeDouble:function(e){var t=Ha.doubleToI64(e);this.bigEndian?(this.writeInt32(t.high),this.writeInt32(t.low)):(this.writeInt32(t.low),this.writeInt32(t.high))},writeInt8:function(e){if(e<-128||e>=128)throw new Ga(Ba.Overflow);this.writeByte(255&e)},writeInt16:function(e){if(e<-32768||e>=32768)throw new Ga(Ba.Overflow);this.writeUInt16(65535&e)},writeUInt16:function(e){if(e<0||e>=65536)throw new Ga(Ba.Overflow);this.bigEndian?(this.writeByte(e>>8),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8))},writeInt32:function(e){this.bigEndian?(this.writeByte(e>>>24),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)):(this.writeByte(255&e),this.writeByte(e>>8&255),this.writeByte(e>>16&255),this.writeByte(e>>>24))},__class__:Ua};var Pa=function(){this.b=new Fa};n["haxe.io.BytesOutput"]=Pa,Pa.__name__=["haxe","io","BytesOutput"],Pa.__super__=Ua,Pa.prototype=r(Ua.prototype,{writeByte:function(e){this.b.b.push(e)},writeBytes:function(e,t,n){var i=this.b;if(t<0||n<0||t+n>e.length)throw new Ga(Ba.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)},Ha.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:n>128&&(n=128);var i=Math.round(8388608*(t/Math.pow(2,n)-1));return 8388608==i&&n<128&&(i=0,++n),(e<0?-2147483648:0)|n+127<<23|i},Ha.i64ToDouble=function(e,t){var n=(t>>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)},Ha.doubleToI64=function(e){var t=Ha.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 e>0?(t.low=0,t.high=2146435072):(t.low=0,t.high=-1048576);return t};var Ya=function(){};n["haxe.rtti.Meta"]=Ya,Ya.__name__=["haxe","rtti","Meta"],Ya.getMeta=function(e){return e.__meta__},Ya.getFields=function(e){var t=Ya.getMeta(e);return null==t||null==t.fields?{}:t.fields};var Ga=function(e){Error.call(this),this.val=e,this.message=String(e),Error.captureStackTrace&&Error.captureStackTrace(this,Ga)};n["js._Boot.HaxeError"]=Ga,Ga.__name__=["js","_Boot","HaxeError"],Ga.wrap=function(e){return e instanceof Error?e:new Ga(e)},Ga.__super__=Error,Ga.prototype=r(Error.prototype,{__class__:Ga});var za=function(){};n["js.Boot"]=za,za.__name__=["js","Boot"],za.getClass=function(e){if(e instanceof Array&&null==e.__enum__)return Array;var t=e.__class__;if(null!=t)return t;var n=za.__nativeClassName(e);return null!=n?za.__resolveNativeClass(n):null},za.__string_rec=function(e,t){if(null==e)return"null";if(t.length>=5)return"<...>";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;r0?",":"")+za.__string_rec(e[_],t)}return l+="]"}var h;try{h=e.toString}catch(e){return"???"}if(null!=h&&h!=Object.toString&&"function"==typeof h){var d=e.toString();if("[object Object]"!=d)return d}var f=null,m="{\n";t+="\t";var p=null!=e.hasOwnProperty;for(var f in e)p&&!e.hasOwnProperty(f)||"prototype"!=f&&"__class__"!=f&&"__super__"!=f&&"__interfaces__"!=f&&"__properties__"!=f&&(2!=m.length&&(m+=", \n"),m+=t+f+" : "+za.__string_rec(e[f],t));return m+="\n"+(t=t.substring(1))+"}";case"string":return e;default:return String(e)}},za.__interfLoop=function(e,t){if(null==e)return!1;if(e==t)return!0;var n=e.__interfaces__;if(null!=n)for(var i=0,r=n.length;ithis.byteLength)throw new Ga("set() outside of range");for(var i=0,r=e.byteLength;ithis.byteLength)throw new Ga("set() outside of range");for(var s=0,l=o.length;s223)return-256|n}}catch(e){if(e instanceof Ga&&(e=e.val),!za.__instanceof(e,La))throw e}return null},readArray:function(e,t,n){for(var i=[],r=0,a=t;r1.401298464324817e-45&&r<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(i)):(this.o.writeByte(203),this.o.writeDouble(i));break;case 3:this.o.writeByte(e?195:194);break;case 4:var a=f.fields(e),o=l.count(a);o<16?this.o.writeByte(128|o):o<65536?(this.o.writeByte(222),this.o.writeUInt16(o)):(this.o.writeByte(223),this.o.writeInt32(o));for(var s=0;s1.401298464324817e-45&&t<3.4028234663852886e38?(this.o.writeByte(202),this.o.writeFloat(e)):(this.o.writeByte(203),this.o.writeDouble(e))},writeRaw:function(e){var t=e.length;t<32?this.o.writeByte(160|t):t<65536?(this.o.writeByte(218),this.o.writeUInt16(t)):(this.o.writeByte(219),this.o.writeInt32(t)),this.o.write(e)},writeArray:function(e){var t=e.length;t<16?this.o.writeByte(144|t):t<65536?(this.o.writeByte(220),this.o.writeUInt16(t)):(this.o.writeByte(221),this.o.writeInt32(t));for(var n=0;n0)for(var o=new ao(uo(e,e.handleNotification),e),s=0,l=a.length;s0&&this._events[e].length>n&&(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},co.prototype.on=co.prototype.addListener,co.prototype.once=function(e,t){if(!_o(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},co.prototype.removeListener=function(e,t){var n,i,r,a;if(!_o(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||_o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(ho(n)){for(a=r;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},co.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(_o(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},co.prototype.listeners=function(e){return this._events&&this._events[e]?_o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},co.listenerCount=function(e,t){return e._events&&e._events[t]?_o(e._events[t])?1:e._events[t].length:0};yo.exports;n.Math=Math,String.prototype.__class__=n.String=String,String.__name__=["String"],n.Array=Array,Array.__name__=["Array"],Date.prototype.__class__=n.Date=Date,Date.__name__=["Date"];var mo=n.Int={__name__:["Int"]},po=n.Dynamic={__name__:["Dynamic"]},go=n.Float=Number;go.__name__=["Float"];var vo=n.Bool=Boolean;vo.__ename__=["Bool"];var yo,So=n.Class={__name__:["Class"]},wo={};(yo={}).exports=null,yo.exports={upload:function(e){var t=e.url,n=e.headers,i=e.data,r=e.files,a=e.complete,o=new FormData;for(var s in i)i.hasOwnProperty(s)&&o.append(s,i[s]);for(var s in r)r.hasOwnProperty(s)&&o.append(s,r[s]);var l=new XMLHttpRequest;for(var s in l.open("POST",t,!0),n)n.hasOwnProperty(s)&&l.setRequestHeader(s,n[s]);return l.onload=function(e){4===l.readyState&&a(200===l.status,l)},l.onerror=function(e){a(!1,l)},l.send(o),l}};var To=yo.exports,Io={websocketsbinary:!0,audio:!1},Eo={},No={},Ao=t.ArrayBuffer||ja;null==Ao.prototype.slice&&(Ao.prototype.slice=ja.sliceImpl);var bo=t.Uint8Array||Wa._new;T.APP_STATE_CHANGED="app_state_changed",T.ACCESS_TOKEN_CHANGED="access_token_changed",T.CURRENT_USER_CHANGED="current_user_changed",T.CONFIGURATION_CHANGED="configuration_changed",T.DOMAIN_SELECTION_CHANGED="domain_selection_changed",T.TALK_SELECTION_CHANGED="talk_selection_changed",T.TALK_LIST_SCROLL_TO_TALK_TOP_NEEDED="talk_list_scroll_to_talk_top_needed",T.USER_SELECTION_NEEDED="user_selection_needed",T.USER_SELECTION_CHANGED="user_selection_changed",T.FRIEND_SELECTION_NEEDED="friend_selection_needed",T.COMMON_STAMP_SET_LOADED="common_stamp_set_loaded",T.STAMP_SELECTION_STARTED="stamp_selection_started",T.STAMP_SELECTION_ENDED="stamp_selection_ended",T.STAMP_SELECTION_CHANGED="stamp_selection_changed",T.ACTION_SELECTION_CHANGED="action_selection_changed",T.CURRENT_PAGE_CHANGED="current_page_changed",T.CURRENT_PAGE_REASSIGNED="current_page_reassgined",T.FILEINFO_SELECTION_CHANGED="fileinfo_selection_changed",T.NOTE_FILEINFO_SELECTION_CHANGED="note_fileinfo_selection_changed",T.MESSAGE_FILEINFO_SELECTION_CHANGED="message_fileinfo_selection_changed",T.STAGED_FILEINFO_SELECTION_CHANGED="staged_fileinfo_selection_changed",T.STAGED_FILEINFOS_ADDED="staged_fileinfos_added",T.STAGED_FILEINFOS_MOVED="staged_fileinfos_moved",T.CLOSE_FILEPREVIEW_MODAL="close_filepreview_modal",T.ERROR_OCCURRED="error_occurred",T.UNREAD_COUNT_CHANGED="brand_badge_changed",T.SEND_FORM_TOP_CHANGED="send_form_top_changed",T.SOLUTIONS_LOADED="solutions_loaded",T.RIGHT_PANE_OPENED="right_pane_opened",T.RIGHT_PANE_CLOSED="right_pane_closed",T.PASSWORD_EXPIRATION_OVERED="password_expiration_overed",T.PASSWORD_EXPIRATION_WARNED="password_expiration_warned",T.PHOTO_EDITOR_SAVED="photo_editor_saved",T.ICON_EDITOR_SAVED="icon_editor_saved",T.MC_AUTHENTICATED_USER_RECEIVED="mc_authenticated_user_received",T.KEYWORD_WATCHING_UPDATED="keyword_watching_updated",T.KEYWORD_DETECTION_UPDATED="keyword_detaction_updated",T.DEPARTMENT_SELECTION_CHANGED_FOR_MEMBERS_PAGE="department_selection_changed_for_members_page",T.PRESENCES_UPDATED="presences_updated",T.NOTEINFO_SELECTION_CHANGED="noteinfo_selection_changed",T.START_NOTE_EDITING="start_note_editing",T.OPEN_EXISTING_PAIR_TALK_COMPLETED="open_existing_pair_talk_completed",T.FIRST_ROUTING_WILL_START="first_routing_will_start",T.SIGNED_OUT="signed_out",T.ROUTUNG_TALK_FALLBACK="routing_talk_fallback",T.ROUTUNG_DOMAIN_FALLBACK="routing_domain_fallback",T.TALKS_SORT_MODE_CHANGED="talks_sort_mode_changed",T.DATA_RECOVERING="data_recovering",T.DATA_RECOVERED="data_recovered",T.NOTIFY_UPDATE_USER="notify_update_user",T.NOTIFY_ADD_FRIEND="notify_add_friend",T.NOTIFY_ADD_ACQUAINTANCE="notify_add_acquaintance",T.NOTIFY_ADD_ACQUAINTANCES="notify_add_acquaintances",T.NOTIFY_DELETE_FRIEND="notify_delete_friend",T.NOTIFY_DELETE_ACQUAINTANCE="notify_delete_acquaintance",T.NOTIFY_DELETE_ACQUAINTANCES="notify_delete_acquaintances",T.NOTIFY_UPDATE_DOMAIN_USERS="notify_update_domain_users",T.GET_DOMAIN_USERS_RESPONSED="get_domain_users_responsed",T.GET_USERS_RESPONSED="get_users_responsed",T.GET_PROFILE_RESPONSED="get_profile_responsed",T.GET_PROFILE_ERRORED="get_profile_errored",T.UPDATE_USER_RESPONSED="update_user_responsed",T.UPDATE_USER_ERRORED="update_user_errored",T.UPDATE_PROFILE_RESPONSED="update_profile_responsed",T.UPDATE_PROFILE_ERRORED="update_profile_errored",T.NOTIFY_UPDATE_DEPARTMENT_TREE="notify_update_department_tree",T.NOTIFY_UPDATE_DEPARTMENT_USERS="notify_update_department_users",T.GET_DEPARTMENT_TREE_RESPONSED="get_department_tree_responsed",T.GET_DEPARTMENT_TREE_CANCELED="get_department_tree_canceled",T.GET_DEPARTMENT_USERS_RESPONSED="get_department_users_responsed",T.GET_DEPARTMENT_USERS_CANCELED="get_department_users_canceled",T.GET_DEPARTMENT_USER_COUNT_RESPONSED="get_department_user_count_responsed",T.GET_ME_RESPONSED="get_me_responsed",T.DEPARTMENT_USER_COUNT_CLEARED="department_user_count_cleared",T.DEPARTMENT_USER_IDS_PREPARED="department_user_ids_prepared",T.NOTIFY_ADD_DOMAIN_INVITE="notify_add_domain_invite",T.NOTIFY_ACCEPT_DOMAIN_INVITE="notify_accept_domain_invite",T.NOTIFY_DELETE_DOMAIN_INVITE="notify_delete_domain_invite",T.NOTIFY_JOIN_DOMAIN="notify_join_domain",T.NOTIFY_UPDATE_DOMAIN="notify_update_domain",T.NOTIFY_LEAVE_DOMAIN="notify_leave_domain",T.NOTIFY_ADD_DOMAIN_MEMBERS="notify_add_domain_members",T.NOTIFY_CREATE_PAIR_TALK="notify_create_pair_talk",T.CREATE_PAIR_TALK_COMPLETE="create_pair_talk_complete",T.CREATE_PAIR_TALK_FAIL="create_pair_talk_fail",T.NOTIFY_CREATE_GROUP_TALK="notify_create_group_talk",T.CREATE_GROUP_TALK_COMPLETE="create_group_talk_complete",T.CREATE_GROUP_TALK_FAIL="create_group_talk_fail",T.NOTIFY_UPDATE_GROUP_TALK="notify_update_group_talk",T.UPDATE_GROUP_TALK_COMPLETE="update_group_talk_complete",T.UPDATE_GROUP_TALK_FAIL="update_group_talk_fail",T.NOTIFY_ADD_TALKERS="notify_add_talkers",T.NOTIFY_ADD_TALKERS_INCLUDING_ME="notify_add_talkers_including_me",T.NOTIFY_DELETE_TALKER="notify_delete_talker",T.NOTIFY_DELETE_TALK="notify_delete_talk",T.NOTIFY_UPDATE_READ_STATUSES="notify_update_read_statuses",T.NOTIFY_UPDATE_TALK_STATUS="notify_update_talk_status",T.NOTIFY_UPDATE_LOCAL_TALK_STATUS="notify_update_local_talk_status",T.NOTIFY_ADD_FAVORITE_TALK="notify_add_favorite_talk",T.NOTIFY_DELETE_FAVORITE_TALK="notify_delete_favorite_talk",T.NOTIFY_DISABLE_PUSH_NOTIFICATION="notify_disable_push_notification",T.NOTIFY_ENABLE_PUSH_NOTIFICATION="notify_enable_push_notification",T.ADD_TALKERS_SUCCEEDED="add_talkers_succeeded",T.ADD_TALKERS_FAILED="add_talkers_failed",T.NOTIFY_CREATE_MESSAGE="notify_create_message",T.NOTIFY_DELETE_MESSAGE="notify_delete_message",T.NOTIFY_GET_MESSAGES="notify_get_messages",T.NOTIFY_GET_MESSAGE_READ_STATUS="notify_get_message_status",T.CREATE_MESSAGE_START="create_message_start",T.CREATE_MESSAGE_COMPLETE="create_message_complete",T.CREATE_MESSAGE_FAIL="create_message_fail",T.ADD_FAVORITE_MESSAGE_COMPLETED="add_favorite_message_completed",T.DELETE_FAVORITE_MESSAGE_COMPLETED="delete_favorite_message_completed",T.GET_FAVORITE_MESSAGES_COMPLETED="get_favorite_messages_completed",T.NOTIFY_ADD_FAVORITE_MESSAGE="notify_add_favorite_message",T.NOTIFY_DELETE_FAVORITE_MESSAGE="notify_delete_favorite_message",T.NOTIFY_CREATE_ANNOUNCEMENT="notify_create_announcement",T.NOTIFY_DELETE_ANNOUNCEMENT="notify_delete_announcement",T.NOTIFY_UPDATE_ANNOUNCEMENT_STATUS="notify_update_announcement_status",T.NOTIFY_GET_ANNOUNCEMENTS="notify_get_announcements",T.CREATE_ANNOUNCEMENT_START="create_announcement_start",T.CREATE_ANNOUNCEMENT_COMPLETE="create_announcement_complete",T.CREATE_ANNOUNCEMENT_FAIL="create_announcement_fail",T.NOTIFY_UPDATE_QUESTION="notify_update_question",T.NOTIFY_GET_QUESTIONS="get_questions_responsed",T.NOTIFY_CREATE_ATTACHMENT="notify_create_attachment",T.NOTIFY_DELETE_ATTACHMENT="notify_delete_attachment",T.GET_FILE_RESPONSED="get_file_responsed",T.GET_NOTE_STATUSES_LOADED="get_note_statuses_loaded",T.GET_NOTE_LOADED="get_note_loaded",T.GET_NOTE_FAILED_BY_NOTE_NOT_FOUND="get_note_failed_by_note_not_found",T.CREATE_NOTE_COMPLETED="create_note_completed",T.CREATE_NOTE_FAILED="create_note_failed",T.UPDATE_NOTE_LOCAL_EDIT="update_note_local_edit",T.CLEAR_NOTE_LOCAL_EDIT="clear_note_local_edit",T.UPDATE_NOTE_SETTING_COMPLETED="update_note_setting_completed",T.UPDATE_NOTE_SETTING_FAILED_BY_NOT_FOUND="update_note_setting_failed_by_not_found",T.UPDATE_NOTE_SETTING_FAILED_BY_CONFLICT="update_note_setting_failed_by_conflict",T.UPDATE_NOTE_SETTING_FAILED_BY_EDITING="update_note_setting_failed_by_editing",T.UPDATE_NOTE_COMPLETED="update_note_completed",T.DELETE_NOTE_COMPLETED="delete_note_completed",T.NOTIFY_CREATE_NOTE="notify_create_note",T.NOTIFY_UPDATE_NOTE_PARTIALLY="notify_update_note_partially",T.NOTIFY_DELETE_NOTE="notify_delete_note",T.NOTIFY_UPDATE_NOTE_FOR_SETTING="notify_update_note_for_setting",T.NOTIFY_UPDATE_NOTE_FOR_SUMMARY="notify_update_note_for_revision",T.CREATE_NOTE_BUTTON_CLICKED="create_note_button_clicked",T.NOTIFY_LOCK_NOTE="notify_lock_note",T.NOTIFY_UNLOCK_NOTE="notify_unlock_note",T.NOTIFY_SEARCH_MESSAGES="notify_search_messages",T.NOTIFY_SEARCH_ATTACHMENTS="notify_search_attachments",T.NOTIFY_SEARCH_MESSAGES_FAIL="notify_search_messages_fail",T.NOTIFY_SEARCH_ATTACHMENTS_FAIL="notify_search_attachments_fail",T.NOTIFY_SEARCH_PREPARE="notify_search_prepare",T.NOTIFY_SEARCH_CLEAR="notify_search_clear",T.NOTIFY_FILTER_BOX_TEXT_CHANGED="notify_filter_box_text_changed",T.NOTIFY_SEARCH_BOX_POPUP="notify_search_box_popup",T.NOTIFY_ADD_ACCOUNT_CONTROL_REQUEST="notify_add_account_control_request",T.NOTIFY_DELETE_ACCOUNT_CONTROL_REQUEST="notify_delete_account_control_request",T.NOTIFY_JOIN_ACCOUNT_CONTROL_GROUP="notify_join_account_control_group",T.NOTIFY_UPDATE_ACCOUNT_CONTROL_GROUP_PARTIALLY="notify_update_account_control_group_partially",T.NOTIFY_LEAVE_ACCOUNT_CONTROL_GROUP="notify_leave_account_control_group",T.PREPARE_CONFERENCE_FROM_MESSAGE="prepare_conference_from_message",T.JOIN_CONFERENCE_RESPONSED="join_conference_responsed",T.JOIN_CONFERENCE_CANCELED="join_conference_canceled",T.GET_CONFERENCE_PARTICIPANTS_RESPONSED="get_conference_participants_responsed",T.NOTIFY_OPEN_CONFERENCE="notify_open_conference",T.NOTIFY_CLOSE_CONFERENCE="notify_close_conference",T.NOTIFY_CONFERENCE_PARTICIPANT_JOIN="notify_conference_participant_join",T.NOTIFY_CONFERENCE_PARTICIPANT_LIMIT="notify_conference_participant_limit",T.NOTIFY_CONFERENCE_PARTICIPANT_REJECT="notify_conference_participant_reject",T.NOTIFY_ALL_TALK_MEMBERS_REJECTED_CONFERENCE="notify_all_talk_members_rejected_conference",T.NOTIFY_UPDATE_DOMAIN_STAMP_SETTING="notify_update_domain_stampsetting",T.NOTIFY_UPDATE_STAMPSET="notify_update_stampset",T.NOTIFY_DELETE_STAMPSET="notify_delete_stampset",T.NOTIFY_FLOW_NOTIFICATION_BADGE="notify_flow_notification_badge",T.GET_FLOW_NOTIFICATION_BADGES_COMPLETED="get_flow_notification_badges_completed",T.GET_FLOW_NOTIFICATION_BADGES_FAILED="get_flow_notification_badges_failed",T.GET_DIRECT_APPS_COMPLETED="get_direct_apps_completed",T.GET_DIRECT_APPS_FAILED="get_direct_apps_failed",T.START_NOTIFICATION_FAILED="start_notification_failed",Y.ANNOUNCEMENTS_KEY="-1",q.__meta__={fields:{api:{inject:null}}},q.NAME="AccountControlRequest",J.__meta__={fields:{api:{inject:null},conferenceStore:{inject:null}}},J.NAME="Conference",Z.__meta__={fields:{api:{inject:null}}},Z.NAME="Device",ee.__meta__={fields:{api:{inject:null}}},ee.NAME="Domain",ne.__meta__={fields:{api:{inject:null}}},ne.NAME="File",re.__meta__={fields:{api:{inject:null},stampsStore:{inject:null}}},re.NAME="LoadStampset",se.__meta__={fields:{api:{inject:null}}},se.NAME="ManageFriends",ue.__meta__={fields:{api:{inject:null}}},ue.NAME="Message",_e.__meta__={fields:{api:{inject:null},dataStore:{inject:null},fileService:{inject:null},fileInfoStore:{inject:null}}},_e.NAME="Note",de.__meta__={fields:{api:{inject:null},keywordWatcher:{inject:null},readStatusUpdater:{inject:null}}},de.NAME="Read",me.__meta__={fields:{api:{inject:null}}},me.NAME="ReloadData",ge.__meta__={fields:{api:{inject:null},searchService:{inject:null}}},ge.NAME="Search",ye.__meta__={fields:{dataStore:{inject:null},settings:{inject:null}}},ye.NAME="SelectTalk",we.__meta__={fields:{api:{inject:null}}},we.NAME="Send",Te.__meta__={fields:{accessTokenResolver:{inject:null},session:{inject:null}}},Te.NAME="SignIn",Ie.__meta__={fields:{api:{inject:null},settings:{inject:null},dataStore:{inject:null}}},Ie.NAME="SignOut",Ee.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ee.NAME="Talk",Ae.__meta__={fields:{api:{inject:null},dataStore:{inject:null}}},Ae.NAME="UpdateProfile",be.__meta__={fields:{api:{inject:null}}},be.NAME="UpdateUser",De.__meta__={fields:{userPresences:{inject:null},api:{inject:null},settings:{inject:null}}},De.NAME="UpdateUserPresences",De.MAX_USERS_PER_API=100,ke.__meta__={fields:{routing:{inject:null}}},ke.NAME="Url",ze.TalkAutoScrollDelay=1,ze.TalkAutoScrollImmediately=2,ze.TalkAutoScrollNone=3,ze.TalksSortModeNewMessagesFirst="new_messages_first",ze.TalksSortModeUnreadMessagesFirst="unread_messages_first",ze.NAME="browser_settings",je.MAX_SIZE=72,We.INCOMING_TIME=6e4,Ve.DEFAULT_PRESENCE_EXPIRATION=3e5,Qe.DEFAULT_TTL=3600,Qe.DEFAULT_MAX_PARTICIPANTS=8,Ot.TIMESTAMP_SHIFT=22,Lt.MAX_READ_USER_IDS_COUNT=16,fn.QUERY_DATE_TODAY="t",fn.QUERY_DATE_YESTERDAY="-1d",fn.QUERY_DATE_THREE_DAYS_BEFORE="-3d",bn.HISTORY_TAB_NAME="stamp-history",$n.SIXTY_MINUTES=new Zn(0,36e5),$n.FIFTEEN_MINUTES=new Zn(0,9e5),Oi.PREFIX="note-",Oi.nextDummyId=new Zn(-1,-1),xi.CONTINUE_MARGIN_RATE=.1,Wi.CHEKBOX_UNCHECKED="- [ ] ",Wi.CHEKBOX_CHECKED="- [x] ",qi.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qi.TU_REG=new o("ッ([BCDFGHIJKLMNOPQRSTUVWYZ])","gm"),Qi.XTU_REG=new o("ッ","gm"),$i.EMERGENCY=0,$i.ALERT=1,$i.CRITICAL=2,$i.ERROR=3,$i.WARNING=4,$i.NOTICE=5,$i.INFO=6,$i.DEBUG=7,$i.level=6,$i._d=$i._nop,$i._i=null!=console?console.info.bind(console):$i._nop,$i._w=null!=console?console.warn.bind(console):$i._nop,$i._e=null!=console?console.error.bind(console):$i._nop,rr.HIRAGANA_SMALL_A=12353,rr.HIRAGANA_NN=12435,rr.KATAKANA_SMALL_A=12449,_r.NAME="accessTokenResolver",hr.NAME="Proxy",dr.__meta__={fields:{settings:{inject:null},api:{inject:null}}},fr.__meta__={fields:{api:{inject:null},dataStore:{inject:null},settings:{inject:null},fileInfoStore:{inject:null},departmentStore:{inject:null},messageStore:{inject:null},dataFactory:{inject:null},keywordWatcher:{inject:null},conferenceStore:{inject:null},stampsStore:{inject:null}}},fr.NAME="broadcast",mr.__meta__={fields:{wsApi:{inject:null},apiCaller:{inject:null},apiNote:{inject:null},settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},fileService:{inject:null},searchService:{inject:null},fileInfoStore:{inject:null},messageStore:{inject:null},departmentStore:{inject:null},conferenceStore:{inject:null},lastUsedAtUpdater:{inject:null},stampsStore:{inject:null}}},mr.NAME="api",mr.API_VERSION="1.119",mr.UPDATE_VERSION="1.119_1",mr.ACTIONS_COUNT_PER_API=20,pr.__meta__={fields:{rpc:{inject:null}}},pr.NAME="apiCaller",pr.DELAY_FOR_DB_REPLICATION=500,pr.DELAY_FOR_DB_REPLICATION_FOR_RETRY=1e3,pr.API_TRY_COUNT=3,gr.__meta__={fields:{apiCaller:{inject:null},dataStore:{inject:null},settings:{inject:null}}},gr.NAME="apiNote",vr.NAME="appState",yr.__meta__={fields:{dataStore:{inject:null},messageStore:{inject:null},settings:{inject:null}}},yr.NAME="conferenceStore",Sr.__meta__={fields:{dataStore:{inject:null}}},Sr.NAME="dataFactory",wr.__meta__={fields:{fileInfoStore:{inject:null},messageStore:{inject:null},solutionsStore:{inject:null},conferenceStore:{inject:null}}},wr.NAME="dataStore",wr.STORAGE_KEY_FOR_GENERAL="dataStore",wr.STORAGE_KEY_FOR_TALK_STATUSES="dataStoreTalkStatuses",wr.TYPE_FRIEND=0,wr.TYPE_ACQUAINSTANCE=1,wr.TYPE_NONE=2,Tr.__meta__={fields:{dataStore:{inject:null}}},Tr.NAME="departmentStore",Ir.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Ir.NAME="features",Er.NAME="fileInfoStore",Ar.NAME="fileService",br.__meta__={fields:{settings:{inject:null}}},Dr.__meta__={fields:{settings:{inject:null},features:{inject:null},dataStore:{inject:null}}},Dr.NAME="keywordWatcher",Dr.TALK_KEY_PREFIX="talk_",Dr.ANNOUNCEMENT_KEY_PREFIX="announcement_",kr.TEMP_HALF_SPACE="&SPACE",kr.TEMP_FULL_SPACE="&FULL_PITCH_SPACE",Fr.__meta__={fields:{settings:{inject:null}}},Fr.NAME="lastUsedAtUpdater",Fr.UPDATE_LAST_USED_AT_INTERVAL=6e5,Rr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Rr.NAME="limitations",xr.NAME="messageStore",Ur.__meta__={fields:{broadcast:{inject:null},lastUsedAtUpdater:{inject:null}}},Ur.NAME="rpc",Ur.lastMsgId=0,Pr.PING_INTERVAL_ON_CONNECTED=45e3,Yr.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},Yr.NAME="readStatusUpdater",Gr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Gr.NAME="routing",jr.__meta__={fields:{settings:{inject:null}}},jr.NAME="searchService",jr.LOAD_SIZE=20,jr.DUMMY_VALUE_FOR_SET=1,Wr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null},dataFactory:{inject:null},api:{inject:null}}},Wr.NAME="session",Vr.NAME="settings",Vr.KEY_ACCESS_TOKEN="access_token",Vr.KEY_SELECTED_DOMAIN_ID_H="selected_domain_id_h",Vr.KEY_SELECTED_DOMAIN_ID_L="selected_domain_id_l",Vr.KEY_SELECTED_STAMP_TAB_ID="selected_stamp_tab_id",Vr.KEY_INPUT_TEXT="input_text",Vr.KEY_COPY_PROFILE_TO_ALL_DOMAINS="copy_profile_to_all_domains",Vr.KEY_SELECTED_DEPARTMENT_IDS="selected_department_ids",Vr.KEY_SEARCH_HISTORIES="search_histories",Vr.KEY_RIGHT_PANEL_OPENED="right_panel_opened",Vr.KEY_RIGHT_PANEL_WIDTH="right_panel_width",Vr.KEY_MULTI_VIEW_MODE="multi_view_mode",Vr.KEY_PASSWORD_WARNING_SKIP_UNTIL="password_warning_skip_until",Vr.KEY_LAST_USED_EXPIRED_AT="last_used_expired_at",Vr.KEY_IDFV="idfv",qr.__meta__={fields:{settings:{inject:null}}},qr.NAME="solutionsStore",Qr.NAME="stampsStore",Jr.__meta__={fields:{dataStore:{inject:null},conferenceStore:{inject:null}}},Jr.NAME="talksService",Xr.__meta__={fields:{settings:{inject:null},dataStore:{inject:null}}},Xr.NAME="ThumbnailExpansion",Zr.__meta__={fields:{dataStore:{inject:null}}},Zr.NAME="userPresences",$r.__meta__={fields:{apiCaller:{inject:null}}},$r.NAME="wsApi",la.NAME="Mediator",ua.__meta__={fields:{dataStore:{inject:null},api:{inject:null}}},ua.NAME="commandline",ua.DATA_SAVE_SPAN=5e3,_a.INVALID_PARAMETER="INVALID_PARAMETER",_a.FORBIDDEN="FORBIDDEN",_a.NOT_FOUND="NOT_FOUND",_a.LOCKED_BY_ANOTHER_USER="LOCKED_BY_ANOTHER_USER",_a.CONFLICT="CONFLICT",_a.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",_a.UNKNOWN="UNKNOWN",pa._mul=null!=Math.imul?Math.imul:function(e,t){return e*(65535&t)+(e*(t>>>16)<<16|0)|0},ya.USE_CACHE=!1,ya.USE_ENUM_INDEX=!1,ya.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Ta.DEFAULT_RESOLVER=new wa,Ta.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:",Da.count=0,Ha.i64tmp=new Zn(0,0),za.__toStr={}.toString,Wa.BYTES_PER_ELEMENT=1,qa.FLOAT_SINGLE_MIN=1.401298464324817e-45,qa.FLOAT_SINGLE_MAX=3.4028234663852886e38,qa.FLOAT_DOUBLE_MIN=5e-324,qa.FLOAT_DOUBLE_MAX=1.7976931348623157e308,a.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 From 9a9fd88ecd3ad57de9983935063ef6dbe0a8cd25 Mon Sep 17 00:00:00 2001 From: "sho.kuroda" Date: Sun, 11 Dec 2022 07:19:28 +0900 Subject: [PATCH 2/2] chore: bump up version to 1.119.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f906ed8..ca4f2f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "direct-js", - "version": "1.117.0", + "version": "1.119.0", "description": "Low-level javascript library for direct", "main": "./lib/direct-node.min.js", "engines": {