UNPKG

direct-js

Version:

Low-level javascript library for direct

1 lines 537 kB
!function(y,S){function a(){return G.__string_rec(this,"")}var t={};function e(e,t){function n(){}n.prototype=e;var i,r=new n;for(i in t)r[i]=t[i];return t.toString!==Object.prototype.toString&&(r.toString=t.toString),r}function v(e,t){this.r=new RegExp(e,t.split("u").join(""))}function T(){}function I(){}function N(){}function x(){}function A(){}function b(){}function M(){}function C(e){Fn.call(this,e)}function W(){}function K(){}function V(){}function q(){}function Q(){}function X(){}function J(){}function Z(){}function $(){}function ee(){}function te(){}function ne(){}function ie(){}function re(){}function oe(e,t,n){this.email=e,this.pass=t,this.accessToken=n}function ae(e){null!=e&&(this.id=e.id,this.group=new Mi(e.group),this.profilePolicy=new Ci(e.profile_policy))}function se(e){null!=e&&(this.id=e.id,null!=e.group&&(this.group=new Mi(e.group)),null!=e.profile_policy)&&(this.profilePolicy=new Ci(e.profile_policy))}function le(e){null!=e&&(this.id=D.fromIntOrInt64(e.id),this.groupName=e.group_name,this.groupOwnerName=e.group_owner_name,this.groupOwnerEmail=e.group_owner_email,this.hasDomainInvite=e.has_domain_invite,this.updatedAt=e.updated_at,this.version=e.version)}function ue(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 Ri(e.max_announcement)),this.maxReadAnnouncementId=e.max_read_announcement_id,null==this.maxReadAnnouncementId)&&0==this.unreadCount&&(this.maxReadAnnouncementId=this.maxAnnouncementId)}function ce(e){null!=e&&(this.domainId=e.domain_id,this.readAnnouncementIds=e.read_announcement_ids)}function _e(e){if(this.notificationInvisibleTalkSound=!0,this.notificationInvisibleTalkPopup=!1,this.notificationVisibleTalkSound=!1,this.notificationVisibleTalkPopup=!1,this.notificationIncludingMessageContent=!0,this.notificationPopupTime=5,this.talkAutoScroll=1,this.legacyNoteEnabled=!1,this.leaveTalksEnabled=!1,this.talksSortMode="new_messages_first",this.talkRightPanelOpened=!0,this.talkRightPanelWidth=0,this.keywordWatchingText="",this.keywordWatchingEmphasis=!1,this.keywordWatchingSelfMessage=!1,this.keywordWatchingActionReply=!1,this.userDataContainer=[],this.language="ja",this.conferenceIncomingSound=!0,this.domainsSortMode="name_order_asc",this.appLeftPanelOpened=!1,this.appLeftPanelWidth=0,this.scheduledMessageDefaultTimeStr="09:00",null!=e){var t;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.notificationPopupTime&&(this.notificationPopupTime=e.notificationPopupTime),null!=e.notificationVisibleTalkAutoScroll&&(this.talkAutoScroll=e.notificationVisibleTalkAutoScroll?1:3),null!=e.talkAutoScroll&&(this.talkAutoScroll=e.talkAutoScroll),null!=e.legacyNoteEnabled&&(this.legacyNoteEnabled=e.legacyNoteEnabled),null!=e.leaveTalksEnabled&&(this.leaveTalksEnabled=e.leaveTalksEnabled),null!=e.talksSortMode&&(this.talksSortMode=e.talksSortMode),this.talkRightPanelOpened=null!=e.talkRightPanelOpened?e.talkRightPanelOpened:null==o.getItem("right_panel_opened"),null!=e.talkRightPanelWidth?this.talkRightPanelWidth=e.talkRightPanelWidth:(t=P.parseInt(o.getItem("right_panel_width")),this.talkRightPanelWidth=null==t?0:t),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 n=0,i=G.__cast(e.userDataContainer,Array);n<i.length;){var r=i[n];++n,this.userDataContainer.push(xi.fromJson(r))}null!=e.language&&(this.language=e.language),null!=e.conferenceIncomingSound&&(this.conferenceIncomingSound=e.conferenceIncomingSound),null!=e.domainsSortMode&&(this.domainsSortMode=e.domainsSortMode),this.appLeftPanelOpened=null!=e.appLeftPanelOpened?e.appLeftPanelOpened:null!=o.getItem("app_left_panel_opened"),null!=e.appLeftPanelWidth&&(this.appLeftPanelWidth=e.appLeftPanelWidth),null!=e.scheduledMessageDefaultTimeStr&&(this.scheduledMessageDefaultTimeStr=e.scheduledMessageDefaultTimeStr)}}function he(e){null!=e&&(this.userId=e.user_id,this.id=e.conference_id,this.domainId=e.domain_id,this.talkId=e.talk_id,this.messageId=e.message_id,this.createdAt=e.created_at,this.expiredAt=e.expired_at,this.participants=e.participants,this.skywayVersion=null==e.skyway_version?1:e.skyway_version)}function de(){}function fe(e){null!=e&&(this.domainId=e.domain_id,this.departments=this.getDepartments(e.departments))}function me(e){null!=e&&(this.departmentId=e.department_id,this.all=e.all,this.partial=e.partial)}function pe(e){null!=e&&(this.departments=this.getDepartmentUserCounts(e.departments))}function ge(e){if(null!=e){if(this.id=D.fromIntOrInt64(e.direct_app_id),this.uniqueKey=e.unique_key,this.appUrl=e.app_url,this.locales=new B,null!=e.locales)for(var t=0,n=L.fields(e.locales);t<n.length;){var i=n[t],r=(++t,L.field(e.locales,i)),o=this.locales,r=new Wi(r);null!=Y[i]?o.setReserved(i,r):o.h[i]=r}if(this.features=[],null!=e.features)for(var a=0,s=G.__cast(e.features,Array);a<s.length;){var l=s[a];++a,this.features.push(new Ki(l))}}}function ye(e){null!=e&&(this.id=e.domain_id,this.updatedAt=e.updated_at,this.domainInfo=new Xi(e.domain),this.contract=new Hi(e.contract),this.profileDefinition=new Ir(e.profile_definition),this.setting=new Ji(e.setting),this.role=new $i(e.role),this.stampsetSetting=new Kr(e.stampset_setting),this.builtinStampSetting=new Li(e.builtin_stamp_setting),this.directAppsSetting=new Qi(e.direct_apps_setting),this.closed=!1)}function Se(e){null!=e&&(this.id=e.domain_id,this.name=e.domain_name,this.accountControlRequestId=D.fromIntOrInt64(e.account_control_request_id),this.updatedAt=e.updated_at)}function ve(e){ir.call(this,e),null!=e&&(this.domainId=e.domain_id,null!=e.profile_contact&&(this.profileContact=G.__cast(e.profile_contact,Array).map(function(e){return new wr(e)})),this.departments=e.departments,this.allowSelectedForTwoPersonsGroupTalk=0!=e.allow_selected_for_two_persons_group_talk)}function Te(e){this.values=e}function Ie(e){null!=e&&(this.fileId=e.file_id,this.url=e.get_url,this.headers=new or(e.get_headers))}function Ee(){}function we(){}function Ne(e){null!=e&&(this.domainId=e.domain_id,this.talkId=e.talk_id,this.orderInFavorites=e.order_in_favorites,this.favoriteVersion=e.favorite_version)}function Ae(e){null!=e&&(this.messageId=e[0],this.talkId=e[1],this.fileId=e[2])}function be(e){null!=e&&(this.domainId=e.domain_id,this.show=e.show,this.updatedAt=e.updated_at,this.version=e.version)}function Me(){}function Ce(){}function ke(e){null!=e&&(this.conferenceId=e.conference_id,this.roomName=e.room_name,this.credential=e.credential,this.mode=this.parseMode(e.mode),this.timestamp=e.timestamp,this.skywayVersion=null==e.skyway_version?1:e.skyway_version)}function De(){}function Re(e){null!=e&&(this.talkId=e[0],this.messageId=e[1],this.isMention=!!e[2])}function Oe(e){this.id=e.message_id,this.talkId=e.talk_id,this.readUserIds=null==e.read_user_ids?[]:e.read_user_ids,this.unreadUserIds=null==e.unread_user_ids?[]:e.unread_user_ids}function Fe(e){this.talkId=e.talk_id,this.messageIds=e.message_ids,this.mentionMessageIds=null==e.mention_message_ids?[]:e.mention_message_ids,this.readUserIds=null==e.read_user_ids?[]:e.read_user_ids,this.messageIdsExcludingUnreadCountTargets=e.message_ids_excluding_unread_count_targets,null==this.messageIdsExcludingUnreadCountTargets&&(this.messageIdsExcludingUnreadCountTargets=[])}function xe(){}function Ue(){}function Le(e,t,n){null==e?this.readingLastMessageId=n:(this.messages=e.map(function(e){return new Ur(e,t)}),this.readingLastMessageId=0<e.length?e[e.length-1].id:null)}function Pe(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=G.__cast(e.contents,Array);t<n.length;){var i=n[t];++t,this.contents.push(new ar(i))}}function Be(e){null!=e&&(this.total=e.total,this.marker=e.marker,this.nextMarker=e.next_marker,this.contents=[],null!=e.contents)&&(this.contents=G.__cast(e.contents,Array).map(function(e){return new cr(e)}))}function He(e){null!=e&&(null!=e.domain_id_str&&(this.domainId=D.makeFromIdStr(e.domain_id_str)),null!=e.talk_id_str&&(this.talkId=D.makeFromIdStr(e.talk_id_str)),this.keyword=e.keyword,null==e.search_type||e.search_type==Pr.toLocalizeText(Lr.MESSAGES)?this.searchType=Lr.MESSAGES:this.searchType=Lr.ATTACHMENTS,this.sinceText=e.since,this.untilText=e.until,null!=e.from_id_str)&&(this.fromUserId=D.makeFromIdStr(e.from_id_str))}function Ge(){}function je(e){null!=e&&(this.user=new fr(e.user),this.device=e.device,this.notification=e.notification,this.passwordExpiration=new Sr(e.password_expiration),this.configuration=new Bi(e.configuration))}function ze(e){null!=e&&(this.solutionId=e.solution_id,this.name=e.name,null!=e.link&&(this.link=new Hr(e.link)),null!=e.plugin)&&(this.plugin=new Gr(e.plugin))}function Ye(){}function We(e){this.commonStampId=e}function Ke(e,t,n){this.stampsetId=e,this.id=t,this.illust=n}function Ve(e){null!=e&&(this.stampsetId=D.fromIntOrInt64(e.stampset_id),this.name=e.name,this.icon=e.icon,this.version=e.version)}function qe(){}function Qe(e,t){this.talk=e,this.status=t}function Xe(){}function Je(e,t){this.domainId=e.domain_id,this.talkId=e.talk_id,this.type=t?br.fromRawValue(e.type):Mr.None,this.version=e.version}function Ze(e){this.unreadMentionCount=0,this.unreadCount=0,null==e?this.pushNotificationSetting=new Ar:(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,this.maxMessage=null!=e.max_message?new O(e.max_message):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 Ar(e.push_notification))}function $e(){}function et(e){null!=e&&(this.talkId=e.talk_id,this.maxEveryoneReadMessageId=e.max_everyone_read_message_id,this.maxReadMessageId=h.option(e.max_read_message_id))}function tt(e,t,n){this.file=e,this.dimension=to.createWithSize(t,n),this.auth=null}function nt(e,t,n){var i=new E(0,0);this.domainId=i,this.domainId=e,this.oldSetting=t,this.newSetting=n}function it(){}function rt(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)}function ot(e,t){this.lastUpdatedAt=t,null!=e&&(this.userId=e.user_id,this.lastUsedAtOpt=h.option(e.last_used_at))}function at(e){this.success=e}function st(e){this.success=e}function lt(e,t,n,i,r){this.domainId=e,this.talkId=t,this.marker=n,this.nextMarker=i,this.messages=r}function ut(e,t,n){this.domainId=e,this.talkId=t,this.marker=n.marker,this.nextMarker=n.nextMarker,this.contents=null==n.contents?[]:G.__cast(n.contents,Array).map(function(e){return new fo(e)})}function ct(i,e){var r=this;k.iter(e,function(e){var e=new io(e),t=e.createdAt,n=i.high-t.high|0;0==n&&(n=w.ucompare(i.low,t.low)),(i.high<0?t.high<0?n:-1:0<=t.high?n:1)<0?r.messageCreatedAtNew=e:r.messageCreatedAtOld=e})}function _t(e,t,n){this.callerId=e,this.error=t,this.emitterKey=n}function ht(e){this.note=new po(e),this.emitterKey=null}function dt(e){this.compressedNote=new ro(e)}function ft(e){this.result=e}function mt(e){this.note=new po(e)}function pt(e){this.compressedNote=new ro(e)}function gt(e){null!=e&&(this.marker=e.marker,this.nextMarker=e.next_marker,this.noteStatuses=Un.asArray(e.contents).map(function(e){return new Ao(e)}))}function yt(e){this.note=new po(e)}function St(e){this.compressedNote=new ro(e)}function vt(e){this.note=new po(e)}function Tt(e){this.compressedNote=new ro(e)}function It(){}function Et(e){null!=e&&(this.fileId=e.file_id,this.status=e.status,this.filePreviewFileId=e.file_preview_file_id,this.url=e.url,this.key=e.key)}function wt(){}function Nt(e,t){this.talkId=e,this.paneType=t}function At(){}function bt(){}function Mt(){}function Ct(){}function kt(e){this.message=new O(e.message),this.domainId=e.domain_id,this.talkId=e.talk_id}function Dt(e){this.messageId=e.message_id,this.domainId=e.domain_id,this.talkId=e.talk_id}function Rt(){}function Ot(e,t,n,i,r){null==r&&(r=!1),this.type=e,this.content=t,this.files=n,this.createMessageAt=i,this.hasError=r}function Ft(e){null!=e&&(this.noteId=new So(e.note_id),this.revision=e.revision,this.userId=e.user_id,this.deviceId=e.device_id,this.expiredAt=e.expired_at)}function xt(e){this.value=e}function Ut(e){this.value=e}function Lt(e){null!=e&&(this.noteId=new So(e.note_id),this.talkId=e.talk_id,this.setting=new No(e.setting),this.noteRevisionSummary=new wo(e.note_revision_summary))}function Pt(e){null!=e&&(this.noteId=new So(e.note_id),this.talkId=e.talk_id,this.setting=new No(e.setting))}function Bt(e){null!=e&&(this.noteId=new So(e.note_id),this.talkId=e.talk_id,this.noteRevisionSummary=new wo(e.note_revision_summary))}function Ht(){}function Gt(e){null!=e&&(this.noteId=new So(e.note_id),this.revision=e.revision,this.userId=e.user_id)}function jt(i){this.reactionCounts=new B;var r=this;null!=i&&(this.messageId=i.message_id,this.myReactionId=D.fromIntOrInt64(i.my_reaction_id),k.iter(L.fields(i.reaction_counts),function(e){var t=r.reactionCounts,n=L.field(i.reaction_counts,e);null!=Y[e]?t.setReserved(e,n):t.h[e]=n}))}function zt(i){this.reactionUserIds=new B;var r=this;null!=i&&(this.messageId=i.message_id,k.iter(L.fields(i.reaction_user_ids),function(e){var t=L.field(i.reaction_user_ids,e),n=r.reactionUserIds;null!=Y[e]?n.setReserved(e,t):n.h[e]=t}))}function Yt(){}function Wt(e,t,n){this.ignoreCase=t,this.normalizeFunc=n,t&&(e=e.toUpperCase()),this.normalizedPattern=n(e)}function Kt(){}function Vt(){}function qt(){}function Qt(){}function Xt(){}function Jt(){}function Zt(){}function $t(e){this.rawValue=e,this.post_url=e.post_url,this.post_form=e.post_form,this.put_url=e.put_url}function en(){}function p(){}function tn(){}function nn(e,t){this.updatedAt=e.updatedAt,this.domainInfo=e.domainInfo,this.contract=e.contract,this.profileDefinition=e.profileDefinition,this.setting=e.setting,this.role=e.role,this.closed=e.closed,this.id=e.id,null!=t&&(this.talks=t)}function rn(e){Aa.call(this,e),this.domainId=e.domainId,this.profileContact=this.convertProfileContact(e.profileContact),this.departments=e.departments,this.email=e.email,this.subEmail=e.subEmail,this.groupAlias=e.groupAlias,this.signinId=e.signinId}function on(e){Aa.call(this,e),this.email=e.email,this.signinId=e.signinId,this.profiles=e.profiles,this.departments=e.departments}function an(e){var t=e.id;this.id="_"+t.high+"_"+t.low,this.id_i64=e.id,this.name=e.name,this.content_type=e.contentType,this.content_size=e.contentSize,this.url=e.url}function sn(e,t,n){this.name=e.name,this.iconUrl=e.iconUrl,this.updatedAt=e.updatedAt,this.leftUsers=e.leftUsers,this.groupTalkSettings=e.groupTalkSettings,this.id=e.id,this.type=e.type,this.userIds=e.userIds,this.users=t,this.domain=n,this.domainId=e.domainId}function ln(e){this.id=e.noteId.toString(),this.id_i64=e.noteId.value;var t=e.talkId,t=(this.talkId="_"+t.high+"_"+t.low,this.talkId_i64=e.talkId,ka.of(e.noteRevisionSummary));Object.defineProperty(this,"noteRevisionSummary",{value:t}),Object.defineProperty(this,"title",{get:this.get_title,enumerable:!0}),Object.defineProperty(this,"contentType",{get:this.get_contentType,enumerable:!0}),Object.defineProperty(this,"contentSummary",{get:this.get_contentSummary,enumerable:!0}),Object.defineProperty(this,"attachments",{get:this.get_attachments,enumerable:!0}),Object.defineProperty(this,"lastUpdatedBy",{get:this.get_lastUpdatedBy}),Object.defineProperty(this,"lastUpdatedAt",{get:this.get_lastUpdatedAt})}function un(e){this.id=e.noteId.toString(),this.id_i64=e.noteId.value;var t=e.talkId,t=(this.talkId="_"+t.high+"_"+t.low,this.talkId_i64=e.talkId,this.createdBy=e.createdBy,this.createdAt=e.createdAt,ka.of(e.noteRevisionSummary));Object.defineProperty(this,"noteRevisionSummary",{value:t}),Object.defineProperty(this,"title",{get:this.get_title,enumerable:!0}),Object.defineProperty(this,"contentType",{get:this.get_contentType,enumerable:!0}),Object.defineProperty(this,"contentSummary",{get:this.get_contentSummary,enumerable:!0}),Object.defineProperty(this,"attachments",{get:this.get_attachments,enumerable:!0}),Object.defineProperty(this,"lastUpdatedBy",{get:this.get_lastUpdatedBy}),Object.defineProperty(this,"lastUpdatedAt",{get:this.get_lastUpdatedAt})}function cn(){}function _n(){}function hn(){}function dn(){}function fn(){}function mn(){}function pn(){}function gn(){}function yn(){}function Sn(){}var vn=y.DirectAPI=function(){this.eventEmitter=new In},Tn=((t.DirectAPI=vn).__name__=["DirectAPI"],vn.getInstance=function(){return null==vn.instance&&(vn.instance=new vn),vn.instance},vn.main=function(){},vn.prototype={setOptions:function(e){null!=e&&(qs.host=e.host,qs.endpoint=e.endpoint,qs.accessToken=e.access_token,qs.proxyURL=e.proxyURL,qs.account=e.account,qs.talkWithBot=e.talkWithBot,qs.acceptableEventTimeDiff=e.acceptableEventTimeDiff,qs.name=e.name,qs.storagePath=e.storage_path,qs.storageQuota=e.storage_quota,qs.wsConfig=e.ws_config,null!=e.internalLogger)&&F.setInternalLogger(e.internalLogger),F.d("current settings",qs),null==qs.accessToken&&F.e("Not enough parameters provided. I need a access token")},announce:function(e,t){var n=e.room;if(null!=n){n=n.split("_"),n=2<n.length?_.make(P.parseInt(n[1]),P.parseInt(n[2])):null;if(null==n||null==t)return;n=this.data.getTalk(n);if(null==n)return;i=n.domainId}else var n=e.id.split("_"),i=2<n.length?_.make(P.parseInt(n[1]),P.parseInt(n[2])):null;null!=i&&this.sendQueue.sendAnnouncement(i,t)},send:function(e,t){e=e.room.split("_"),e=2<e.length?_.make(P.parseInt(e[1]),P.parseInt(e[2])):null;null!=e&&null!=t&&this.sendQueue.sendMessage(e,t)},topic:function(e,t){e=e.room.split("_"),e=2<e.length?_.make(P.parseInt(e[1]),P.parseInt(e[2])):null;this.facade.sendNotification("Talk",Ii.UPDATE_FOR_HUBOT(e,t))},download:function(e,t,n){var i,r=null,o=null;"string"==typeof t?i=t:(i=t.url,r=t.path,o=t.name),null==i?n(null,new Error("target URL is required")):(null==o&&(o=ms.basename(i)),null==r&&(r=ms.join(fs.tmpdir(),o)),this.facade.sendNotification("FilePath",Xn.DOWNLOAD_PATH(i,r,n)))},leave:function(e,t){var n,i=this,e=e.room.split("_"),r=2<e.length?_.make(P.parseInt(e[1]),P.parseInt(e[2])):null;n=null!=t&&2<(e=t.id.split("_")).length?_.make(P.parseInt(e[1]),P.parseInt(e[2])):null,Xa.delay(function(){i.facade.sendNotification("Talk",Ii.DELETE_FOR_HUBOT(r,n))},500)},userForId:function(e,t){t=D.fromNullableIdStr(t);return this.hubotObject.userObjectByIdStr(t,e)},userObjects:function(e){e=D.fromNullableIdStr(e);return this.hubotObject.userObjects(e)},talkObjects:function(){return this.hubotObject.talkObjects()},domainObjects:function(){return this.hubotObject.domainObjects()},parseInt64:function(e){return ja.parseInt64(e)},stringifyInt64:function(e,t){return ja.stringifyInt64(e,t=null==t?!1:t)},listen:function(){this.facade=i.getInstance(),this.api=G.__cast(this.facade.retrieveProxy("api"),zo),this.data=G.__cast(this.facade.retrieveProxy("dataStore"),qo),this.ID=new ja,this.hubotObject=G.__cast(this.facade.retrieveProxy("hubotObject"),xa),this.sendQueue=G.__cast(this.facade.retrieveProxy("sendQueue"),Pa);var e=G.__cast(this.facade.retrieveProxy("fileService"),Xo);this.notes=new wa(new Na(this,this.api,e)),this.mention=new An,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)},off:function(e,t){return this.eventEmitter.removeListener(e,t)},getDomainInvites:function(e){this.api._getDomainInvites(e)},acceptDomainInvite:function(e){this.api.acceptDomainInvite(e)},__class__:vn},(t.EReg=v).__name__=["EReg"],v.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&&0<=e&&e<this.r.m.length)return this.r.m[e];throw new H("EReg::matched")},matchedPos:function(){if(null==this.r.m)throw new H("No string matched");return{pos:this.r.m.index,len:this.r.m[0].length}},matchSub:function(e,t,n){var i,r;return null==n&&(n=-1),this.r.global?(this.r.lastIndex=t,i=this.r,r=n<0?e:U.substr(e,0,t+n),this.r.m=i.exec(r),(i=null!=this.r.m)&&(this.r.s=e),i):((r=this.match(n<0?U.substr(e,t,null):U.substr(e,t,n)))&&(this.r.s=e,this.r.m.index+=t),r)},split:function(e){var t="#__delim__#";return e.replace(this.r,t).split(t)},map:function(e,t){for(var n=0,i="";!(n>=e.length);){if(!this.matchSub(e,n)){i+=P.string(U.substr(e,n,null));break}var r=this.matchedPos(),i=(i+=P.string(U.substr(e,n,r.pos-n)))+P.string(t(this)),n=0==r.len?(i+=P.string(U.substr(e,r.pos,1)),r.pos+1):r.pos+r.len;if(!this.r.global)break}return!this.r.global&&0<n&&n<e.length&&(i+=P.string(U.substr(e,n,null))),i},__class__:v},require("events").EventEmitter),In=function(){Tn.call(this)},U=((t.EventEmitter=In).__name__=["EventEmitter"],In.__super__=Tn,In.prototype=e(Tn.prototype,{__class__:In}),function(){}),k=((t.HxOverrides=U).__name__=["HxOverrides"],U.dateStr=function(e){var t=e.getMonth()+1,n=e.getDate(),i=e.getHours(),r=e.getMinutes(),o=e.getSeconds();return e.getFullYear()+"-"+(t<10?"0"+t:""+t)+"-"+(n<10?"0"+n:""+n)+" "+(i<10?"0"+i:""+i)+":"+(r<10?"0"+r:""+r)+":"+(o<10?"0"+o:""+o)},U.strDate=function(e){switch(e.length){case 8:var t=e.split(":"),n=new Date;return n.setTime(0),n.setUTCHours(t[0]),n.setUTCMinutes(t[1]),n.setUTCSeconds(t[2]),n;case 10:t=e.split("-");return new Date(t[0],t[1]-1,t[2],0,0,0);case 19:n=e.split(" "),t=n[0].split("-"),n=n[1].split(":");return new Date(t[0],t[1]-1,t[2],n[0],n[1],n[2]);default:throw new H("Invalid date format : "+e)}},U.cca=function(e,t){e=e.charCodeAt(t);if(e==e)return e},U.substr=function(e,t,n){if(null==n)n=e.length;else if(n<0){if(0!=t)return"";n=e.length+n}return e.substr(t,n)},U.remove=function(e,t){t=e.indexOf(t);return-1!=t&&(e.splice(t,1),!0)},U.iter=function(e){return{cur:0,arr:e,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}},function(){}),En=((t.Lambda=k).__name__=["Lambda"],k.array=function(e){for(var t=[],n=Ns(e)();n.hasNext();){var i=n.next();t.push(i)}return t},k.map=function(e,t){for(var n=new En,i=Ns(e)();i.hasNext();){var r=i.next();n.add(t(r))}return n},k.mapi=function(e,t){for(var n=new En,i=0,r=Ns(e)();r.hasNext();){var o=r.next();n.add(t(i++,o))}return n},k.has=function(e,t){for(var n=Ns(e)();n.hasNext();)if(n.next()==t)return!0;return!1},k.exists=function(e,t){for(var n=Ns(e)();n.hasNext();)if(t(n.next()))return!0;return!1},k.foreach=function(e,t){for(var n=Ns(e)();n.hasNext();)if(!t(n.next()))return!1;return!0},k.iter=function(e,t){for(var n=Ns(e)();n.hasNext();)t(n.next())},k.filter=function(e,t){for(var n=new En,i=Ns(e)();i.hasNext();){var r=i.next();t(r)&&n.add(r)}return n},k.fold=function(e,t,n){for(var i=Ns(e)();i.hasNext();)n=t(i.next(),n);return n},k.count=function(e,t){var n=0;if(null==t)for(var i=Ns(e)();i.hasNext();){i.next();++n}else for(var r=Ns(e)();r.hasNext();)t(r.next())&&++n;return n},k.find=function(e,t){for(var n=Ns(e)();n.hasNext();){var i=n.next();if(t(i))return i}return null},function(){this.length=0}),wn=((t.List=En).__name__=["List"],En.prototype={add:function(e){e=new wn(e,null);null==this.h?this.h=e:this.q.next=e,this.q=e,this.length++},isEmpty:function(){return null==this.h},remove:function(e){for(var t=null,n=this.h;null!=n;){if(n.item==e)return null==t?this.h=n.next:t.next=n.next,this.q==n&&(this.q=t),this.length--,!0;n=(t=n).next}return!1},iterator:function(){return new Nn(this.h)},map:function(e){for(var t=new En,n=this.h;null!=n;){var i=n.item,n=n.next;t.add(e(i))}return t},__class__:En},function(e,t){this.item=e,this.next=t}),Nn=((t["_List.ListNode"]=wn).__name__=["_List","ListNode"],wn.prototype={__class__:wn},function(e){this.head=e}),An=((t["_List.ListIterator"]=Nn).__name__=["_List","ListIterator"],Nn.prototype={hasNext:function(){return null!=this.head},next:function(){var e=this.head.item;return this.head=this.head.next,e},__class__:Nn},Math.__name__=["Math"],function(){this.forAll="ALL"}),bn=((t.MentionUtil=An).__name__=["MentionUtil"],An.extractMentionParts=function(e){return Gs.extractMentionParts(e).map(function(e){return new bn(e)})},An.removeMentionMarkup=function(e){return Gs.removeMentionMarkup(e)},An.prototype={markup:function(e){var t,n;return e&&e.id&&(e.name||e.displayName)?(t=D.makeFromIdStr(e.id),n=e.displayName||e.name,"{@:"+Va.toString(t)+","+(Gs.codePointCount(n)+1)+"}@"+n):"string"==typeof e&&"ALL"==e?"{@:ALL,4}@ALL":null},__class__:An},function(e){this.start=e.start,this.end=e.end,this.userIdNumStr=e.userIdNumStr,this.mentionText=e.mentionText}),Mn=((t.MentionPart=bn).__name__=["MentionPart"],bn.prototype={isALL:function(){return"ALL"==this.userIdNumStr},__class__:bn},(t.ObjectHelper=T).__name__=["ObjectHelper"],T.deepCopy=function(e){return null==e?null:JSON.parse(JSON.stringify(e))},function(e,t){this.basetime=0,this.count=0,this.max=e,this.interval=t}),L=((t.RateLimit=Mn).__name__=["RateLimit"],Mn.prototype={_now:function(){return(new Date).getTime()},calculateRetryAfter:function(e){e=0<this.basetime?this.interval-(e-this.basetime):this.interval;return Math.ceil(e/1e3)},createError:function(e){var t=this.max+" calls every "+Math.floor(this.interval/1e3)+" sec";return Ha.createTooManyRequestsError(t,this.calculateRetryAfter(e))},apply:function(i){var r=this;return new Promise(function(e,t){var n=r._now();if(0<r.max&&n-r.basetime>r.interval)r.basetime=n,r.count=1;else{if(!(0<r.max&&r.count<r.max))return void t(r.createError(n));r.count++}i().then(e,t)})},__class__:Mn},function(){}),P=((t.Reflect=L).__name__=["Reflect"],L.field=function(e,t){try{return e[t]}catch(e){return null}},L.fields=function(e){var t=[];if(null!=e){var n,i=Object.prototype.hasOwnProperty;for(n in e)"__id__"!=n&&"hx__closures__"!=n&&i.call(e,n)&&t.push(n)}return t},L.isFunction=function(e){return"function"==typeof e&&!(e.__name__||e.__ename__)},L.compare=function(e,t){return e==t?0:t<e?1:-1},L.isObject=function(e){var t;return null!=e&&("string"==(t=typeof e)||"object"==t&&null==e.__enum__||"function"==t&&null!=(e.__name__||e.__ename__))},L.isEnumValue=function(e){return null!=e&&null!=e.__enum__},L.deleteField=function(e,t){return!!Object.prototype.hasOwnProperty.call(e,t)&&(delete e[t],!0)},L.copy=function(e){for(var t={},n=0,i=L.fields(e);n<i.length;){var r=i[n];++n,t[r]=L.field(e,r)}return t},function(){}),Cn=((t.Std=P).__name__=["Std"],P.string=function(e){return G.__string_rec(e,"")},P.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},function(){this.b=""}),n=((t.StringBuf=Cn).__name__=["StringBuf"],Cn.prototype={toString:function(){return this.b},__class__:Cn},(t.StringTools=I).__name__=["StringTools"],I.htmlEscape=function(e,t){return e=e.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;"),t?e.split('"').join("&quot;").split("'").join("&#039;"):e},I.startsWith=function(e,t){return e.length>=t.length&&U.substr(e,0,t.length)==t},I.isSpace=function(e,t){e=U.cca(e,t);return 8<e&&e<14||32==e},I.ltrim=function(e){for(var t=e.length,n=0;n<t&&I.isSpace(e,n);)++n;return 0<n?U.substr(e,n,t-n):e},I.rtrim=function(e){for(var t=e.length,n=0;n<t&&I.isSpace(e,t-n-1);)++n;return 0<n?U.substr(e,0,t-n):e},I.trim=function(e){return I.ltrim(I.rtrim(e))},I.replace=function(e,t,n){return e.split(t).join(n)},I.hex=function(e,t){for(var n="";n="0123456789ABCDEF".charAt(15&e)+n,0<(e>>>=4););if(null!=t)for(;n.length<t;)n="0"+n;return n},(t.TextHelper=N).__name__=["TextHelper"],N.slice=function(e,n){for(var i=[],t=function(e){for(;e.length>n;){var t=U.substr(e,0,n);i.push(t),e=U.substr(e,n,null)}0<e.length&&i.push(e)},r="",o=e.split("\n");0<o.length;){var a=o.shift();r.length+a.length>n&&(t(r),r=""),0<r.length&&(r+="\n"),r+=a}return t(r),i},t.ValueType={__ename__:["ValueType"],__constructs__:["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]}),kn=(n.TNull=["TNull",0],n.TNull.toString=a,(n.TNull.__enum__=n).TInt=["TInt",1],n.TInt.toString=a,(n.TInt.__enum__=n).TFloat=["TFloat",2],n.TFloat.toString=a,(n.TFloat.__enum__=n).TBool=["TBool",3],n.TBool.toString=a,(n.TBool.__enum__=n).TObject=["TObject",4],n.TObject.toString=a,(n.TObject.__enum__=n).TFunction=["TFunction",5],n.TFunction.toString=a,(n.TFunction.__enum__=n).TClass=function(e){e=["TClass",6,e];return e.__enum__=n,e.toString=a,e},n.TEnum=function(e){e=["TEnum",7,e];return e.__enum__=n,e.toString=a,e},n.TUnknown=["TUnknown",8],n.TUnknown.toString=a,(n.TUnknown.__enum__=n).__empty_constructs__=[n.TNull,n.TInt,n.TFloat,n.TBool,n.TObject,n.TFunction,n.TUnknown],(t.Type=x).__name__=["Type"],x.getClassName=function(e){e=e.__name__;return null==e?null:e.join(".")},x.getEnumName=function(e){return e.__ename__.join(".")},x.resolveClass=function(e){e=t[e];return null!=e&&e.__name__?e:null},x.resolveEnum=function(e){e=t[e];return null!=e&&e.__ename__?e:null},x.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 H("Too many arguments")}},x.createEmptyInstance=function(e){function t(){}return t.prototype=e.prototype,new t},x.createEnum=function(e,t,n){var i=L.field(e,t);if(null==i)throw new H("No such constructor "+t);if(L.isFunction(i)){if(null==n)throw new H("Constructor "+t+" need parameters");return i.apply(e,n)}if(null!=n&&0!=n.length)throw new H("Constructor "+t+" does not need parameters");return i},x.typeof=function(e){var t;switch(typeof e){case"boolean":return n.TBool;case"function":return e.__name__||e.__ename__?n.TObject:n.TFunction;case"number":return Math.ceil(e)==e%2147483648?n.TInt:n.TFloat;case"object":return null==e?n.TNull:null!=(t=e.__enum__)?n.TEnum(t):null!=(t=G.getClass(e))?n.TClass(t):n.TObject;case"string":return n.TClass(String);case"undefined":return n.TNull;default:return n.TUnknown}},x.enumEq=function(e,t){if(e!=t)try{if(e[0]!=t[0])return!1;for(var n=2,i=e.length;n<i;){var r=n++;if(!x.enumEq(e[r],t[r]))return!1}var o=e.__enum__;if(o!=t.__enum__||null==o)return!1}catch(e){return!1}return!0},(t["puremvc.interfaces.IFacade"]=A).__name__=["puremvc","interfaces","IFacade"],A.prototype={__class__:A},function(){(kn.instance=this).initializeFacade()}),i=((t["puremvc.patterns.facade.Facade"]=kn).__name__=["puremvc","patterns","facade","Facade"],kn.__interfaces__=[A],kn.getInstance=function(){return null==kn.instance&&(kn.instance=new kn),kn.instance},kn.prototype={initializeFacade:function(){this.initializeModel(),this.initializeController(),this.initializeView()},initializeController:function(){null==this.controller&&(this.controller=vs.getInstance())},initializeModel:function(){null==this.model&&(this.model=Ts.getInstance())},initializeView:function(){null==this.view&&(this.view=Is.getInstance())},registerCommand:function(e,t){this.controller.registerCommand(e,t)},removeCommand:function(e){this.controller.removeCommand(e)},hasCommand:function(e){return this.controller.hasCommand(e)},registerProxy:function(e){this.model.registerProxy(e)},retrieveProxy:function(e){return this.model.retrieveProxy(e)},removeProxy:function(e){var t=null;return t=null!=this.model?this.model.removeProxy(e):t},hasProxy:function(e){return this.model.hasProxy(e)},registerMediator:function(e){null!=this.view&&this.view.registerMediator(e)},retrieveMediator:function(e){return this.view.retrieveMediator(e)},removeMediator:function(e){var t=null;return t=null!=this.view?this.view.removeMediator(e):t},hasMediator:function(e){return this.view.hasMediator(e)},sendNotification:function(e,t,n){this.notifyObservers(new Es(e,t,n))},notifyObservers:function(e){null!=this.view&&this.view.notifyObservers(e)},__class__:kn},function(){kn.call(this)}),Dn=((t["albero.AppFacade"]=i).__name__=["albero","AppFacade"],i.getInstance=function(){return null==kn.instance&&(kn.instance=new i),G.__cast(kn.instance,i)},i.__super__=kn,i.prototype=e(kn.prototype,{initializeFacade:function(){kn.prototype.initializeFacade.call(this)},initializeModel:function(){kn.prototype.initializeModel.call(this);var e=[];(e=(e=e.concat([new xa,new Pa,new Ua])).concat([new sa,new Ko,new qo,new Vo,new Sa,new jo,new zo,new Ia,new Yo,new Wo,Jo.newInstance(),new fa,new ga,new ea,new Qo,new ya,new da,new aa,new Ta,new va,new oa,Po.newInstance()])).push(Ho.newInstance());for(var t=0;t<e.length;){var n=e[t];++t,this.registerProxy(n)}for(var i=0;i<e.length;){var r=e[i];++i,this.autoBind(r)}},initializeView:function(){kn.prototype.initializeView.call(this);for(var e=0,t=this.getMediators();e<t.length;){var n=t[e];++e,this.registerMediator(n)}},getMediators:function(){return[new Ra]},initializeController:function(){kn.prototype.initializeController.call(this);for(var e=[Vn,Si,vi,ci,yi,Ti,ti,li,Zn,pi,wi,Ei,Ni,Ai,fi,Gn,ni,Wn,zn,ai,Jn,hi,ri],t=(e.push(Qn),0);t<e.length;){var n=e[t],i=(++t,I.replace(x.getClassName(n).split(".").pop(),"Command",""));this.registerCommand(i,n)}},registerMediator:function(e){this.autoBind(e),kn.prototype.registerMediator.call(this,e)},autoBind:function(e){for(var t=_s.getFields(null==e?null:G.getClass(e)),n=0,i=L.fields(t);n<i.length;){var r=i[n],o=(++n,L.field(t,r));Object.prototype.hasOwnProperty.call(o,"inject")&&(null==(o=this.retrieveProxy(r))?F.v("[autoBind:Error]"+x.getClassName(null==e?null:G.getClass(e))+"."+r):(F.v("[autoBind] "+x.getClassName(null==e?null:G.getClass(e))+"."+r+" <= "+x.getClassName(null==o?null:G.getClass(o))),e[r]=o))}},startup:function(){G.__cast(this.retrieveProxy("appState"),Ko).start()},__class__:i}),t["albero.AppState"]={__ename__:["albero","AppState"],__constructs__:["Active","Inactive"]}),Rn=(Dn.Active=["Active",0],Dn.Active.toString=a,(Dn.Active.__enum__=Dn).Inactive=["Inactive",1],Dn.Inactive.toString=a,(Dn.Inactive.__enum__=Dn).__empty_constructs__=[Dn.Active,Dn.Inactive],t["albero.ConnectionStatus"]={__ename__:["albero","ConnectionStatus"],__constructs__:["Ok","Error","ConcurrentAccessError","ForcibliyClosedError"]}),On=(Rn.Ok=["Ok",0],Rn.Ok.toString=a,(Rn.Ok.__enum__=Rn).Error=["Error",1],Rn.Error.toString=a,(Rn.Error.__enum__=Rn).ConcurrentAccessError=["ConcurrentAccessError",2],Rn.ConcurrentAccessError.toString=a,(Rn.ConcurrentAccessError.__enum__=Rn).ForcibliyClosedError=["ForcibliyClosedError",3],Rn.ForcibliyClosedError.toString=a,(Rn.ForcibliyClosedError.__enum__=Rn).__empty_constructs__=[Rn.Ok,Rn.Error,Rn.ConcurrentAccessError,Rn.ForcibliyClosedError],(t["albero.ContentTypeResolver"]=b).__name__=["albero","ContentTypeResolver"],b.prototype={__class__:b},(t["albero.DefaultContentTypeResolver"]=M).__name__=["albero","DefaultContentTypeResolver"],M.__interfaces__=[b],M.getContentTypeByFileName=function(e,t){if(Ln.isNotEmpty(t))return"csv"==M.getExtension(e)?"text/csv":t;switch(M.getExtension(e)){case"csv":return"text/csv";case"doc":return"application/msword";case"docm":return"application/vnd.ms-word.document.macroenabled.12";case"docx":return"application/vnd.openxmlformats-officedocument.wordprocessingml.document";case"gif":return"image/gif";case"htm":case"html":return"text/html";case"jpeg":case"jpg":return"image/jpeg";case"lzh":return"application/x-lzh";case"md":return"text/markdown";case"pdf":return"application/pdf";case"png":return"image/png";case"ppt":return"application/vnd.ms-powerpoint";case"pptm":return"application/vnd.ms-powerpoint.presentation.macroenabled.12";case"pptx":return"application/vnd.openxmlformats-officedocument.presentationml.presentation";case"rar":return"application/vnd.rar";case"svg":return"image/svg+xml";case"txt":return"text/plain";case"webp":return"image/webp";case"xls":return"application/vnd.ms-excel";case"xlsb":return"application/vnd.ms-excel.sheet.binary.macroenabled.12";case"xlsm":return"application/vnd.ms-excel.sheet.macroenabled.12";case"xlsx":return"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";case"xml":return"text/xml";default:return"application/octet-stream"}},M.getExtension=function(e){var t;return null==e||0==(t=(e=e.split(".")).length)?"":e[t-1]},M.prototype={resolve:function(e){return M.getContentTypeByFileName(e.name,e.type)},__class__:M},function(){}),Fn=((t["haxe._Unserializer.DefaultResolver"]=On).__name__=["haxe","_Unserializer","DefaultResolver"],On.prototype={resolveClass:function(e){return x.resolveClass(e)},resolveEnum:function(e){return x.resolveEnum(e)},__class__:On},function(e){this.buf=e,this.length=e.length,this.pos=0,this.scache=[],this.cache=[];e=Fn.DEFAULT_RESOLVER;null==e&&(e=new On,Fn.DEFAULT_RESOLVER=e),this.resolver=e}),D=((t["haxe.Unserializer"]=Fn).__name__=["haxe","Unserializer"],Fn.initCodes=function(){for(var e=[],t=0,n=Fn.BASE64.length;t<n;){var i=t++;e[Fn.BASE64.charCodeAt(i)]=i}return e},Fn.prototype={readDigits:function(){for(var e=0,t=!1,n=this.pos;;){var i=this.buf.charCodeAt(this.pos);if(i!=i)break;if(45==i){if(this.pos!=n)break;t=!0}else{if(i<48||57<i)break;e=10*e+(i-48)}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(!(43<=t&&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 H("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var t=this.unserialize();if("string"!=typeof t)throw new H("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 H("Invalid enum format");var n=this.readDigits();if(0==n)return x.createEnum(e,t);for(var i=[];0<n--;)i.push(this.unserialize());return x.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 H("Class not found "+e);return t;case 66:var e=this.unserialize(),t=this.resolver.resolveEnum(e);if(null==t)throw new H("Enum not found "+e);return t;case 67:e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new H("Class not found "+e);e=x.createEmptyInstance(t);if(this.cache.push(e),e.hxUnserialize(this),103!=this.buf.charCodeAt(this.pos++))throw new H("Invalid custom data");return e;case 77:var n=new ns;for(this.cache.push(n),this.buf;104!=this.buf.charCodeAt(this.pos);){var i=this.unserialize();n.set(i,this.unserialize())}return this.pos++,n;case 82:t=this.readDigits();if(t<0||t>=this.scache.length)throw new H("Invalid string reference");return this.scache[t];case 97:this.buf;var r=[];for(this.cache.push(r);;){var o=this.buf.charCodeAt(this.pos);if(104==o){this.pos++;break}117==o?(this.pos++,o=this.readDigits(),r[r.length+o-1]=null):r.push(this.unserialize())}return r;case 98:var a=new B;for(this.cache.push(a),this.buf;104!=this.buf.charCodeAt(this.pos);){var s=this.unserialize(),l=this.unserialize();null!=Y[s]?a.setReserved(s,l):a.h[s]=l}return this.pos++,a;case 99:e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new H("Class not found "+e);e=x.createEmptyInstance(t);return this.cache.push(e),this.unserializeObject(e),e;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:t=this.unserialize(),e=this.resolver.resolveEnum(t);if(null==e)throw new H("Enum not found "+t);this.pos++;var u=this.readDigits(),c=e.__constructs__.slice()[u];if(null==c)throw new H("Unknown enum index "+t+"@"+u);t=this.unserializeEnum(e,c);return this.cache.push(t),t;case 107:return NaN;case 108:var _=new En;for(this.cache.push(_),this.buf;104!=this.buf.charCodeAt(this.pos);)_.add(this.unserialize());return this.pos++,_;case 109:return-1/0;case 110:return null;case 111:u={};return this.cache.push(u),this.unserializeObject(u),u;case 112:return 1/0;case 113:for(var h=new ts,d=(this.cache.push(h),this.buf,this.buf.charCodeAt(this.pos++));58==d;){var f=this.readDigits(),m=this.unserialize();h.h[f]=m,d=this.buf.charCodeAt(this.pos++)}if(104!=d)throw new H("Invalid IntMap format");return h;case 114:e=this.readDigits();if(e<0||e>=this.cache.length)throw new H("Invalid reference");return this.cache[e];case 115:var c=this.readDigits(),p=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<c)throw new H("Invalid bytes length");for(var g=Fn.CODES,y=(null==g&&(g=Fn.initCodes(),Fn.CODES=g),this.pos),t=3&c,S=y+(c-t),v=new rs(new ArrayBuffer(3*(c>>2)+(2<=t?t-1:0))),T=0;y<S;){var I=g[p.charCodeAt(y++)],E=g[p.charCodeAt(y++)],I=(v.b[T++]=255&(I<<2|E>>4),g[p.charCodeAt(y++)]),E=(v.b[T++]=255&(E<<4|I>>2),g[p.charCodeAt(y++)]);v.b[T++]=255&(I<<6|E)}return 2<=t&&(u=g[p.charCodeAt(y++)],e=g[p.charCodeAt(y++)],v.b[T++]=255&(u<<2|e>>4),3==t)&&(u=g[p.charCodeAt(y++)],v.b[T++]=255&(e<<4|u>>2)),this.pos+=c,this.cache.push(v),v;case 116:return!0;case 118:return 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=U.strDate(U.substr(this.buf,this.pos,19)),this.pos+=19):(t=this.readFloat(),w=new Date(t)),this.cache.push(w),w;case 119:e=this.unserialize(),u=this.resolver.resolveEnum(e);if(null==u)throw new H("Enum not found "+e);c=this.unserializeEnum(u,this.unserialize());return this.cache.push(c),c;case 120:throw H.wrap(this.unserialize());case 121:t=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<t)throw new H("Invalid string length");var w=U.substr(this.buf,this.pos,t);return this.pos+=t,w=decodeURIComponent(w.split("+").join(" ")),this.scache.push(w),w;case 122:return 0}throw this.pos--,new H("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos)},__class__:Fn},(t["albero.CustomUnserializer"]=C).__name__=["albero","CustomUnserializer"],C.run=function(e){return new Fn(e).unserialize()},C.__super__=Fn,C.prototype=e(Fn.prototype,{unserialize:function(){if(99!=this.buf.charCodeAt(this.pos))return Fn.prototype.unserialize.call(this);this.pos++;var e=this.unserialize(),t=this.resolver.resolveClass(e);if(null==t)throw new H("Class not found "+e);e=x.createEmptyInstance(t);return this.cache.push(e),this.unserializeObject(e),G.__instanceof(e,E)?_.getOrStore(G.__cast(e,E)):e},__class__:C}),(t["albero.DateTimeHelper"]=W).__name__=["albero","DateTimeHelper"],W.isSameDate=function(e,t){return e.getFullYear()==t.getFullYear()&&e.getMonth()==t.getMonth()&&e.getDate()==t.getDate()},W.dateString=function(e,t){var n=new Date,i="";return e.getFullYear()!=n.getFullYear()&&(i+=e.getFullYear()+"/"),i+=e.getMonth()+1+"/"+e.getDate(),t&&(i+=" ("+W.dayOfWeekString(e)+")"),i},W.dayOfWeekString=function(e){switch(e.getDay()){case 0:return c.localize("DateTimeHelper.sun");case 1:return c.localize("DateTimeHelper.mon");case 2:return c.localize("DateTimeHelper.tue");case 3:return c.localize("DateTimeHelper.wed");case 4:return c.localize("DateTimeHelper.thu");case 5:return c.localize("DateTimeHelper.fri");default:return c.localize("DateTimeHelper.sat")}},W.dateStringForPicker=function(e){return e.getFullYear()+"-"+W.toDoubleDigits(e.getMonth()+1)+"-"+W.toDoubleDigits(e.getDate())},W.getDateStringForFile=function(){var e=new Date;return e.getFullYear()+W.toDoubleDigits(e.getMonth()+1)+W.toDoubleDigits(e.getDate())+"_"+W.toDoubleDigits(e.getHours())+W.toDoubleDigits(e.getMinutes())+W.toDoubleDigits(e.getSeconds())},W.getTimeStringForVoice=function(e){return W.toDoubleDigits(e/60|0)+":"+W.toDoubleDigits((0|e)%60)},W.toDoubleDigits=function(e){e=null==e?"null":""+e;return e=1==e.length?"0"+e:e},W.nowAsInt64=function(){return W.dateAsInt64((new Date).getTime())},W.oneDayAfterAsInt64=function(){return W.dateAsInt64((new Date).getTime()+864e5)},W.afterAsInt64=function(e){return W.dateAsInt64((new Date).getTime()+e)},W.dateAsInt64=function(e){var t=4294967296;return new E(e/t|0,e%t|0)},W.abbreviateDatetimeString=function(e){var t,n,i;return null==e?"":(t=new Date,n=4294967296,i=e.high,e=e.low,i=new Date(i*n+(0<=e?e:e+n)),t.getFullYear()==i.getFullYear()&&t.getMonth()==i.getMonth()&&t.getDate()==i.getDate()?i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes():W.dateString(i,!1))},W.getDateStringForNotification=function(e){var t,n,i;return null==e?"":(t=new Date,n=4294967296,i=e.high,e=e.low,i=new Date(i*n+(0<=e?e:e+n)),t.getFullYear()==i.getFullYear()&&t.getMonth()==i.getMonth()&&t.getDate()==i.getDate()?i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes():i.getMonth()+1+"/"+i.getDate())},W.datetimeStringIn11Chars=function(e){var t,n,i;return null==e?"":(t=new Date,n=4294967296,i=e.high,e=e.low,i=new Date(i*n+(0<=e?e:e+n)),e=W.dateString(i,!1),t.getFullYear()==i.getFullYear()&&(e+=" "+i.getHours()+":"+(i.getMinutes()<10?"0":"")+i.getMinutes()),e)},W.timeString=function(e){var t,n;return null==e?"":(t=4294967296,n=e.high,e=e.low,(n=new Date(n*t+(0<=e?e:e+t))).getHours()+":"+(n.getMinutes()<10?"0":"")+n.getMinutes())},W.datetimeString=function(e){return null==e?"":(e=parseFloat(Va.toString(e)),(e=new Date(e)).getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()+" "+e.getHours()+":"+(e.getMinutes()<10?"0":"")+e.getMinutes())},(t["albero.FileDynamicHelper"]=K).__name__=["albero","FileDynamicHelper"],K.filterDeleted=function(e){return null==e?[]:e.filter(K.isNotDeleted)},K.isNotDeleted=function(e){return null==e.deleted||!e.deleted},K.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 h.foreach(n,function(e){null!=e.auth&&(r.thumbnail_url=e.auth.get_url),null!=e.dimension&&(r.thumbnail_dimension=e.dimension.toObject())}),r},(t["albero.FileHelper"]=V).__name__=["albero","FileHelper"],V.createByteSizeStringWithUnit=function(e){if(null==e)return"0 B";for(var t=["","K","M","G","T"];;){var n,i=n=Va.divMod(e,_.make(0,1024)).quotient,r=new E(0,0),o=i.high-r.high|0;if(0==o&&(o=w.ucompare(i.low,r.low)),!(0<(i.high<0?r.high<0?o:-1:0<=r.high?o:1)))break;e=n,t.shift()}return Va.toString(e)+" "+t.shift()+"B"},V.extractFilenameExceptExtension=function(e){return new v("\\.(?=[^.]+$)","").split(e)[0]},V.getUniqueFilename=function(e,t){for(var n=e,i=0;null!=Y[n]?t.existsReserved(n):t.h.hasOwnProperty(n);){++i;var r=V.extractFilenameExceptExtension(e),n=r+"("+i+")"+U.substr(e,r.length,null)}return n},(t["albero.History"]=q).__name__=["albero","History"],q.replaceState=function(e,t,n){return null!=window.history&&(window.history.replaceState(e,t,n),!0)},function(){}),xn=((t["albero.Int64Helper"]=D).__name__=["albero","Int64Helper"],D.parse=function(e){if(!new v("^\\d+$","").match(e))return null;for(var t=_.make(0,0),n=_.make(0,10),i=0,r=e.length;i<r;){var o=i++,a=65535&t.low,s=t.low>>>16,l=65535&n.low,u=n.low>>>16,c=w._mul(a,l),l=w._mul(s,l),a=w._mul(a,u),s=(w._mul(s,u)+(a>>>16)|0)+(l>>>16)|0,s=(a<<=16,w.ucompare(u=c+a|0,a)<0&&(s++,s|=0),l<<=16,w.ucompare(u=u+l|0,l)<0&&(s++,s|=0),s+(w._mul(t.low,n.high)+w._mul(t.high,n.low)|0)|0),c=new E(s,u),a=_.make(0,P.parseInt(e.charAt(o))),l=c.high+a.high|0,s=c.low+a.low|0;w.ucompare(s,c.low)<0&&(l++,l|=0);t=new E(l,s)}return t},D.getHigh=function(e){return e.high},D.getLow=function(e){return e.low},D.idStr=function(e){return"_"+e.high+"_"+e.low},D.makeFromIdStr=function(e){var t=new v("^_(-?\\d*)_(-?\\d*)$","");return t.match(e)?_.make(P.parseInt(t.matched(1)),P.parseInt(t.matched(2))):null},D.fromNullableIdStr=function(e){return null!=e?D.makeFromIdStr(e):null},D.toStr=function(e){return Va.toString(e)},D.isNeg=function(e){return e.high<0},D.add=function(e,t){var n=e.high+t.high|0,t=e.low+t.low|0;return w.ucompare(t,e.low)<0&&(n++,n|=0),new E(n,t)},D.sub=function(e,t){var n=e.high-t.high|0,i=e.low-t.low|0;return w.ucompare(e.low,t.low)<0&&(n--,n|=0),new E(n,i)},D.compare=function(e,t){var n=e.high-t.high|0;return 0==n&&(n=w.ucompare(e.low,t.low)),e.high<0?t.high<0?n:-1:0<=t.high?n:1},D.eq=function(e,t){return null!=e&&null!=t&&e.high==t.high&&e.low==t.low},D.eqOrBothNull=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.high==t.high&&e.low==t.low},D.toFloat=function(e){var t=4294967296,n=e.high,e=e.low;return n*t+(0<=e?e:e+t)},D.idStrToInt64=function(e){e=e.split("_"