29 lines
1.2 MiB
29 lines
1.2 MiB
function __vite__mapDeps(indexes) {
|
||
if (!__vite__mapDeps.viteFileDeps) {
|
||
__vite__mapDeps.viteFileDeps = ["assets/pages-index-index.C6Ww_Cv2.js","assets/_plugin-vue_export-helper.BCo6x5W8.js","assets/pages-news-ce.B142IuVm.js","assets/pages-login-open.BcLA5cWK.js","assets/openPage.BSRlUAts.js","assets/open-tZRm7_lB.css","assets/uni-icons-pnNqpnb9.css","assets/notice-jRS_RjMr.css","assets/pages-login-loginPhone.vO14hF_Z.js","assets/Jiu Yi.CzP6u72b.js","assets/notice.DZhLJz73.js","assets/uni-icons.CE6FQOeI.js","assets/uni-app.es.Cv5-J_i3.js","assets/loginPhone-Liw-j9Kh.css","assets/getCode-BdvWzMVC.css","assets/pages-shop-shop.CcE0rPeU.js","assets/footerMenu.DseV6FTP.js","assets/uni-popup.M4-7QhOy.js","assets/uni-popup.vue_vue_type_style_index_0_scoped_f0b957f8_lang.BhWYEB-t.js","assets/uni-popup-Btn5kTzj.css","assets/footerMenu-C27WJ2-1.css","assets/productList.CFRaMVYp.js","assets/handpicked-R.DAQbhy5_.js","assets/productList-B2AeeEec.css","assets/shop-B_4AxuTT.css","assets/index-BgAqq0vj.css","assets/index-C7KAdkhc.css","assets/index-Dg9TEF5U.css","assets/pages-merchant-business-operator-index.D0yW5FN3.js","assets/index.BeECK9Sd.js","assets/Mixins.DZwwZj4P.js","assets/index.Cp6heHZU.js","assets/uni-section.CrQ1Wm0g.js","assets/uni-section-bBtTvJlT.css","assets/uni-countdown.CY2xfx4u.js","assets/uni-countdown-FqwAf4xp.css","assets/index.CPy1_mXU.js","assets/uni-tag.Dc25ZYYL.js","assets/uni-tag-KneJsG_C.css","assets/index-C1yjjK9r.css","assets/index.C-jZJTfd.js","assets/index-C5R0E48_.css","assets/index.D69289eY.js","assets/index-BQq-B4KX.css","assets/index.v2RR0yH4.js","assets/address.XzajWGcL.js","assets/index-Bf_wvrVP.css","assets/uni-easyinput.Bm1GUSJ8.js","assets/uni-easyinput-tEToKo6I.css","assets/uni-forms.CzErZH4E.js","assets/uni-forms-c4Jx8y51.css","assets/index.GDw7f5Yx.js","assets/index-B2e0HMlf.css","assets/index-YG5iKEzf.css","assets/pages-merchant-order-index.Bc5jt8HU.js","assets/index.CIuCykgb.js","assets/index-B4Aoycoi.css","assets/pages-merchant-commodity-release-index.NhbGbX_Q.js","assets/uni-file-picker.Dkbqw_5V.js","assets/uni-cloud.es.t_RKYAwE.js","assets/uni-file-picker-CoNejpjl.css","assets/shop-upload-image.h6cF0wip.js","assets/index.Bcr2E-Cv.js","assets/index-D-ZC_R6J.css","assets/event-bus.hELIPZJH.js","assets/index-klzll8nq.css","assets/pages-merchant-specifications-index.D74vgTvy.js","assets/index-Duq3x0CJ.css","assets/pages-shop-search-index.Mmpfewjr.js","assets/index.Zr4W5J7j.js","assets/index-BqYxxA-m.css","assets/shop.tuYmzXry.js","assets/index-BukRjtmt.css","assets/pages-shop-commodity-index.CMMdznsS.js","assets/uni-rate.5LTY6Ji6.js","assets/uni-rate-DR8DaIUk.css","assets/statusBar.OmRlYHBn.js","assets/statusBar-B_SY1GJM.css","assets/index-DqCkJ2Mc.css","assets/pages-shop-continue-pay-index.UK_r7bqu.js","assets/qq.D0WNrmhi.js","assets/index-BBeVeU9A.css","assets/pages-shop-store-index.GgkZdMud.js","assets/index-D8gtXQ_9.css","assets/pages-shop-order-index.Y6Q9tmg5.js","assets/apex.RGyUGQCM.js","assets/apex-DEiZukjv.css","assets/index-C5T_lJx2.css","assets/pages-shop-sales-index.BoRH9ljo.js","assets/shop-sales.D81PAzdT.js","assets/index-BP_DuoMf.css","assets/pages-shop-refund-index.B9THIKxI.js","assets/index-BeuK9vsa.css","assets/pages-shop-money-whereabouts-index.irao7QOB.js","assets/index.CNIJhMgg.js","assets/index.BrRpiMZA.js","assets/index-BwG3e3jY.css","assets/index-DVMlkN_D.css","assets/index-CBKtafex.css","assets/pages-shop-after-sales-index.CNNMuexj.js","assets/uni-steps.BFcOSPoO.js","assets/uni-steps-Bm0CW5GU.css","assets/index.Cf_MMeXA.js","assets/index-CatNAq1S.css","assets/index-BahlzIlk.css","assets/pages-shop-transaction-completed-index.C2DxpssP.js","assets/pages-shop-waiting-delivery-index.D_TzKmot.js","assets/pages-shop-logistics-state-index.ZlEzS3Cg.js","assets/shop-document.DOVa0IAx.js","assets/index-DkblgCKK.css","assets/pages-news-news.QvCPAIDd.js","assets/noLogin.DS18wPIZ.js","assets/noLogin-BguQrLS4.css","assets/uni-swipe-action.BQfv4oYi.js","assets/uni-swipe-action-RLPa5okc.css","assets/news-BKohZoeB.css","assets/pages-news-group-chat-index.CzkhjWmF.js","assets/index-CSmBkIYB.css","assets/pages-news-question-answer-index.BwyCcR4K.js","assets/pause.BChT5pq5.js","assets/index-BcTw7NcF.css","assets/pages-news-red-envelope-index.Zyu0lFWu.js","assets/index-rleiDoXc.css","assets/pages-mine-mine.BBwPnG1j.js","assets/mine-dingdanguanli.DEi5p_Wp.js","assets/mine-Bx71nDX5.css","assets/pages-mine-setting.BYO4A0RO.js","assets/setting-BrQCw9Nq.css","assets/pages-mine-userinfo.DXuTGjmL.js","assets/userinfo-DBgopct_.css","assets/pages-mine-switch-accounts-index.BzSqZKI7.js","assets/index-C5t3wcEf.css","assets/pages-mine-pay-use-index.5Ioy9NkY.js","assets/index-h4cwtTFw.css","assets/pages-mine-realname.DmxTXGtf.js","assets/realname-C9H5ulAP.css","assets/pages-mine-delivery-address-index.n1lTy78D.js","assets/index-C8GhemTJ.css","assets/pages-mine-balance-details-index.B2kUFw1V.js","assets/index-Dz2EIpE3.css","assets/pages-mine-historical-browsing-index.2B3OlJFu.js","assets/apiMixins.DtnAybQ0.js","assets/index-Burqkv0H.css","assets/pages-mine-browsed-index.Bddct7yj.js","assets/index-B4MtUk-W.css","assets/pages-mine-collection-index.Bm4FB7t9.js","assets/index-CLu6ayyN.css","assets/pages-mine-target-store-index.DfGEb5JC.js","assets/pages-mine-coupon-index.BSudQnSx.js","assets/index-mn0qgEHm.css","assets/pages-mine-homepage.Bm5YZTiL.js","assets/videoMenu.CeB28kIv.js","assets/videoMenu-ugss_eod.css","assets/collectList.Bw4PX0UH.js","assets/collectList-CsECubzy.css","assets/homepage-BrYgRXe_.css","assets/pages-release-video.BnWq-Q8r.js","assets/video-Fp2BDejq.css","assets/pages-index-wallet.YmaJ8t8k.js","assets/wallet-sXKQuQ4B.css","assets/pages-index-myTeam.BycZNMpY.js","assets/myTeam-dposIlVl.css","assets/pages-index-search.DiXtn5Ja.js","assets/indexShare.CMAhXKtL.js","assets/indexLike1.BFuTKZF9.js","assets/search-DNhWCa4h.css","assets/pages-index-videoHome.twj1Njef.js","assets/copy.CU8_m4gR.js","assets/videoHome-c8QO6EYE.css","assets/pages-index-report.BVii8gq0.js","assets/report-D-rqFtqx.css","assets/pages-mine-collectsVideo.Bs3MMVCq.js","assets/collectsVideo-CG8GdyRe.css","assets/pages-index-promotion.DqjD06FY.js","assets/promotion-B9plNpg_.css","assets/pages-index-myQrCode.B48_oGza.js","assets/myQrCode-mrKVJyuz.css","assets/pages-index-deal.Bhucd7Hs.js","assets/durian.RfuJm3kO.js","assets/deal-BtA8NHPb.css","assets/pages-index-durian.DJuwjxzs.js","assets/sapling.CU-9wLV7.js","assets/tree.Ck-xGDT5.js","assets/fruit.Dgsn80ag.js","assets/durian-D-KrSC23.css","assets/pages-index-durainActivation.f7hQ5Oql.js","assets/durainActivation-gUQ4XDYB.css","assets/pages-index-trade.BCg-6N8r.js","assets/trade-Dl09K-Kw.css","assets/pages-index-orchard.D7BwsoI3.js","assets/orchard-Bo2JiQLA.css","assets/pages-index-durianLog.C7JocjXK.js","assets/pages-index-dataCenter-push.JMZ7hoah.js","assets/push-D8SuTyFO.css","assets/pages-index-dataCenter-pushVideoCollects.CbQgRNUl.js","assets/pushVideoCollects-BxlmN1TT.css","assets/pages-login-register.DiNpCmG5.js","assets/getCode.DZprfOqV.js","assets/register-CxBQ8wul.css","assets/pages-login-forget.D2dlq6mR.js","assets/forget-CAEfHb53.css","assets/pages-login-retrieve.CwmGuS3y.js","assets/retrieve-gURtxQtm.css","assets/pages-shop-settle.Te5IjZzs.js","assets/settle-zOwpWj08.css","assets/pages-index-integral.DgkOfD-0.js","assets/integral.6rN3MfCO.js","assets/copy2.Cp4XIHm6.js","assets/integralLog.CAoFVbir.js","assets/integral-B8BbNTp4.css","assets/pages-index-integralLog.YYhNviv3.js","assets/pages-index-integralMall.CA0ZTOHx.js","assets/integralMall-v7LZ5H57.css","assets/pages-index-appeal.CO-DqKCu.js","assets/appeal-CvYcHRY1.css","assets/pages-index-beInvited.B2ELZUkY.js","assets/beInvited-CFubm-Z8.css","assets/pages-index-videoDetail.DPs_j-QN.js","assets/privateLike.BFvAkl-P.js","assets/videoDetail-DoW7pSLF.css","assets/pages-news-newFriend.Cfw56ZxO.js","assets/newFriend-DHpDCZvY.css","assets/pages-news-newAttention.CNP9AgLI.js","assets/newAttention-CcGlgjwF.css","assets/pages-news-newFans.Bpbgp1Q8.js","assets/newFans-Bj5ds4E6.css","assets/pages-news-message.CnN4UL5T.js","assets/message-CwAvwNv-.css","assets/pages-index-article.DJ77BGGV.js","assets/pages-index-topUp.DN9VVB43.js","assets/topUp-CYioGOQL.css","assets/pages-news-addFriend.CpdHdfFL.js","assets/addFriend-BKb3z6wZ.css","assets/pages-news-redPacket.Du0i0Tyz.js","assets/redPacket-BCUYb4wG.css","assets/pages-news-audio-video-video.BqZ2rU3T.js","assets/pages-index-integralDetail.t3MuA47-.js","assets/integralDetail-D7Fhc2Kz.css","assets/pages-index-videoStatistics.09pyxccY.js","assets/pages-mine-myComment.7kGBf7EW.js","assets/myComment-DDSuaVi8.css","assets/pages-index-bill.BSGf107N.js","assets/bill-DQ1C6cv_.css","assets/pages-index-dataCenter-dataCenter.BQzqyFyi.js","assets/qiun-data-charts.BeM7kwI0.js","assets/qiun-data-charts-x2H1gVvT.css","assets/dataCenter-PfNik2lP.css","assets/pages-index-dataCenter-like.TydZ787X.js","assets/like-DfbzGVJm.css","assets/pages-index-dataCenter-otherPush.BRfoHCFQ.js","assets/otherPush-Cq_E4nAP.css","assets/pages-index-dataCenter-pushDetail.BYJDtGLl.js","assets/pushDetail-TRhHSSiU.css","assets/pages-index-dataCenter-pushHistory.C2eoD8EV.js","assets/pages-index-dataCenter-pushDetailUser.CWLkA7oS.js","assets/pushDetailUser-DYmky8ON.css","assets/pages-shop-commodity-evaluate.BJbv_AMd.js","assets/evaluate-D7l3_O64.css","assets/pages-shop-homepage.BBaiyil4.js","assets/homepage-BN-eqHLu.css","assets/pages-shop-order-detail.iCVUySTl.js","assets/logistics.DJJES4eE.js","assets/pages-shop-order-refundStar.BGKkQKYV.js","assets/refundStar-DTsRE9mj.css","assets/pages-shop-order-logistics.DymwT_vY.js","assets/logistics-BA1ihYKI.css","assets/pages-shop-order-evaluate.DMl6oZ5d.js","assets/evaluate-CVUvz5GS.css","assets/TUIKit-components-TUIConversation-index.DKBZ8YC8.js","assets/index.CiVoSkma.js","assets/adapter-vue.Dx-7uXvK.js","assets/index.BdsuejOh.js","assets/index-CaFwFdDx.css","assets/TUIKit-components-TUISearch-index.CvlNmILk.js","assets/down-icon.DejhYoTd.js","assets/video-play.frXuodO4.js","assets/constant.BaYkq7sJ.js","assets/right-icon.-uAfiCH7.js","assets/enableSampleTaskStatus.Brz40K5o.js","assets/index-CvO_fE_k.css","assets/index.BMUcGq1B.js","assets/index-CI7Biaph.css","assets/index.DYBEiOxD.js","assets/index-D3-qZFye.css","assets/index-MZIn3EoW.css","assets/TUIKit-components-TUIChat-index.BnbFlwsa.js","assets/index.BHng9ndJ.js","assets/index-D5zA6JPA.css","assets/lodash.KqwO8Zud.js","assets/documentLink.EyPR0R2v.js","assets/index-CqmDVw73.css","assets/TUIKit-components-TUIChat-video-play.MWZS87Ya.js","assets/video-play-DsWtHhb8.css","assets/TUIKit-components-TUIChat-web-view.De_qDwEi.js","assets/TUIKit-components-TUIContact-index.DnrX6SsM.js","assets/edit.D2CUf6G1.js","assets/index-CSgY9m-I.css","assets/TUIKit-components-TUIGroup-index.Dr7T14DQ.js","assets/index-CIXb8bwX.css"]
|
||
}
|
||
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
||
}
|
||
!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const e={},t=function(t,n,o){let i=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),s=(null==a?void 0:a.nonce)||(null==a?void 0:a.getAttribute("nonce"));i=Promise.all(n.map((n=>{if((n=function(e){return"/"+e}(n))in e)return;e[n]=!0;const i=n.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(!!o)for(let e=t.length-1;e>=0;e--){const o=t[e];if(o.href===n&&(!i||"stylesheet"===o.rel))return}else if(document.querySelector(`link[href="${n}"]${a}`))return;const r=document.createElement("link");return r.rel=i?"stylesheet":"modulepreload",i||(r.as="script",r.crossOrigin=""),r.href=n,s&&r.setAttribute("nonce",s),document.head.appendChild(r),i?new Promise(((e,t)=>{r.addEventListener("load",e),r.addEventListener("error",(()=>t(new Error(`Unable to preload CSS for ${n}`))))})):void 0})))}return i.then((()=>t())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))};
|
||
/**
|
||
* @vue/shared v3.4.21
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/
|
||
function n(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const o={},i=[],a=()=>{},s=()=>!1,r=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith("onUpdate:"),u=Object.assign,l=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,p=(e,t)=>d.call(e,t),h=Array.isArray,f=e=>"[object Map]"===T(e),g=e=>"[object Set]"===T(e),_=e=>"[object Date]"===T(e),m=e=>"function"==typeof e,v=e=>"string"==typeof e,y=e=>"symbol"==typeof e,I=e=>null!==e&&"object"==typeof e,M=e=>(I(e)||m(e))&&m(e.then)&&m(e.catch),C=Object.prototype.toString,T=e=>C.call(e),S=e=>"[object Object]"===T(e),E=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,D=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),k=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},L=/-(\w)/g,b=k((e=>e.replace(L,((e,t)=>t?t.toUpperCase():"")))),A=/\B([A-Z])/g,R=k((e=>e.replace(A,"-$1").toLowerCase())),O=k((e=>e.charAt(0).toUpperCase()+e.slice(1))),w=k((e=>e?`on${O(e)}`:"")),P=(e,t)=>!Object.is(e,t),N=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},G=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},U=e=>{const t=parseFloat(e);return isNaN(t)?e:t},x=e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t};let F;const q=()=>F||(F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),V=n("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function B(e){if(h(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=v(o)?$(o):B(o);if(i)for(const e in i)t[e]=i[e]}return t}if(v(e)||I(e))return e}const H=/;(?![^(]*\))/g,j=/:([^]+)/,K=/\/\*[^]*?\*\//g;function $(e){const t={};return e.replace(K,"").split(H).forEach((e=>{if(e){const n=e.split(j);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function z(e){let t="";if(v(e))t=e;else if(h(e))for(let n=0;n<e.length;n++){const o=z(e[n]);o&&(t+=o+" ")}else if(I(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const W=n("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Y(e){return!!e||""===e}function X(e,t){if(e===t)return!0;let n=_(e),o=_(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=y(e),o=y(t),n||o)return e===t;if(n=h(e),o=h(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=X(e[o],t[o]);return n}(e,t);if(n=I(e),o=I(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(o&&!i||!o&&i||!X(e[n],t[n]))return!1}}return String(e)===String(t)}function J(e,t){return e.findIndex((e=>X(e,t)))}const Z=e=>v(e)?e:null==e?"":h(e)||I(e)&&(e.toString===C||!m(e.toString))?JSON.stringify(e,Q,2):String(e),Q=(e,t)=>t&&t.__v_isRef?Q(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ee(t,o)+" =>"]=n,e)),{})}:g(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ee(e)))}:y(t)?ee(t):!I(t)||h(t)||S(t)?t:String(t),ee=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e},te=["ad","ad-content-page","ad-draw","audio","button","camera","canvas","checkbox","checkbox-group","cover-image","cover-view","editor","form","functional-page-navigator","icon","image","input","label","live-player","live-pusher","map","movable-area","movable-view","navigator","official-account","open-data","picker","picker-view","picker-view-column","progress","radio","radio-group","rich-text","scroll-view","slider","swiper","swiper-item","switch","text","textarea","video","view","web-view","location-picker","location-view"].map((e=>"uni-"+e)),ne=["list-view","list-item","sticky-section","sticky-header","cloud-db-element"].map((e=>"uni-"+e)),oe=["list-item"].map((e=>"uni-"+e));function ie(e){if(-1!==oe.indexOf(e))return!1;const t="uni-"+e.replace("v-uni-","");return-1!==te.indexOf(t)||-1!==ne.indexOf(t)}const ae="\n",se="UNI_LOCALE",re=["%","%"],ce="#007aff",ue=/^([a-z-]+:)?\/\//i,le=/^data:.*,.*/,de="onShow",pe="onHide",he="onError",fe="onThemeChange",ge="onPageNotFound",_e="onUnhandledRejection",me="onLoad",ve="onReady",ye="onUnload",Ie="onInit",Me="onSaveExitState",Ce="onResize",Te="onBackPress",Se="onPageScroll",Ee="onTabItemTap",De="onReachBottom",ke="onPullDownRefresh",Le="onShareTimeline",be="onShareChat",Ae="onAddToFavorites",Re="onShareAppMessage",Oe="onNavigationBarButtonTap",we="onNavigationBarSearchInputClicked",Pe="onNavigationBarSearchInputChanged",Ne="onNavigationBarSearchInputConfirmed",Ge="onNavigationBarSearchInputFocusChanged",Ue="onAppEnterForeground",xe="onAppEnterBackground",Fe="onWebInvokeAppService";function qe(e){return 0===e.indexOf("/")}function Ve(e){return qe(e)?e:"/"+e}function Be(e){return qe(e)?e.slice(1):e}function He(e,t){for(const n in t)e.style[n]=t[n]}function je(e,t=null){let n;return(...o)=>(e&&(n=e.apply(t,o),e=null),n)}const Ke=e=>e>9?e:"0"+e;function $e({date:e=new Date,mode:t="date"}){return"time"===t?Ke(e.getHours())+":"+Ke(e.getMinutes()):e.getFullYear()+"-"+Ke(e.getMonth()+1)+"-"+Ke(e.getDate())}function ze(e,t){e=e||{},v(t)&&(t={errMsg:t}),/:ok$/.test(t.errMsg)?m(e.success)&&e.success(t):m(e.fail)&&e.fail(t),m(e.complete)&&e.complete(t)}let We;function Ye(){return We||(We=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;function e(){return this}return void 0!==e()?e():new Function("return this")()}(),We)}function Xe(e){return e&&(e.appContext?e.proxy:e)}function Je(e){if(!e)return;let t=e.type.name;for(;t&&ie(R(t));)t=(e=e.parent).type.name;return e.proxy}function Ze(e){return 1===e.nodeType}function Qe(e){const t=Ye();if(t&&t.UTSJSONObject&&e instanceof t.UTSJSONObject){const n={};return t.UTSJSONObject.keys(e).forEach((t=>{n[t]=e[t]})),B(n)}if(e instanceof Map){const t={};return e.forEach(((e,n)=>{t[n]=e})),B(t)}if(v(e))return $(e);if(h(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=v(o)?$(o):Qe(o);if(i)for(const e in i)t[e]=i[e]}return t}return B(e)}function et(e){let t="";const n=Ye();if(n&&n.UTSJSONObject&&e instanceof n.UTSJSONObject)n.UTSJSONObject.keys(e).forEach((n=>{e[n]&&(t+=n+" ")}));else if(e instanceof Map)e.forEach(((e,n)=>{e&&(t+=n+" ")}));else if(h(e))for(let o=0;o<e.length;o++){const n=et(e[o]);n&&(t+=n+" ")}else t=z(e);return t.trim()}function nt(e){if(!e)return null;let{class:t,style:n}=e;return t&&!v(t)&&(e.class=et(t)),n&&(e.style=Qe(n)),e}function ot(e){return b(e.substring(5))}const it=je((()=>{const e=HTMLElement.prototype,t=e.setAttribute;e.setAttribute=function(e,n){if(e.startsWith("data-")&&this.tagName.startsWith("UNI-")){(this.__uniDataset||(this.__uniDataset={}))[ot(e)]=n}t.call(this,e,n)};const n=e.removeAttribute;e.removeAttribute=function(e){this.__uniDataset&&e.startsWith("data-")&&this.tagName.startsWith("UNI-")&&delete this.__uniDataset[ot(e)],n.call(this,e)}}));function at(e){return u({},e.dataset,e.__uniDataset)}const st=new RegExp("\"[^\"]+\"|'[^']+'|url\\([^)]+\\)|(\\d*\\.?\\d+)[r|u]px","g");function rt(e){return{passive:e}}function ct(e){const{id:t,offsetTop:n,offsetLeft:o}=e;return{id:t,dataset:at(e),offsetTop:n,offsetLeft:o}}function ut(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function lt(e={}){const t={};return Object.keys(e).forEach((n=>{try{t[n]=ut(e[n])}catch(Hw){t[n]=e[n]}})),t}const dt=/\+/g;function pt(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const e=n[o].replace(dt," ");let i=e.indexOf("="),a=ut(i<0?e:e.slice(0,i)),s=i<0?null:ut(e.slice(i+1));if(a in t){let e=t[a];h(e)||(e=t[a]=[e]),e.push(s)}else t[a]=s}return t}function ht(e,t,{clearTimeout:n,setTimeout:o}){let i;const a=function(){n(i);i=o((()=>e.apply(this,arguments)),t)};return a.cancel=function(){n(i)},a}class ft{constructor(e,t){this.id=e,this.listener={},this.emitCache=[],t&&Object.keys(t).forEach((e=>{this.on(e,t[e])}))}emit(e,...t){const n=this.listener[e];if(!n)return this.emitCache.push({eventName:e,args:t});n.forEach((e=>{e.fn.apply(e.fn,t)})),this.listener[e]=n.filter((e=>"once"!==e.type))}on(e,t){this._addListener(e,"on",t),this._clearCache(e)}once(e,t){this._addListener(e,"once",t),this._clearCache(e)}off(e,t){const n=this.listener[e];if(n)if(t)for(let o=0;o<n.length;)n[o].fn===t&&(n.splice(o,1),o--),o++;else delete this.listener[e]}_clearCache(e){for(let t=0;t<this.emitCache.length;t++){const n=this.emitCache[t],o=e?n.eventName===e?e:null:n.eventName;if(!o)continue;"number"!=typeof this.emit.apply(this,[o,...n.args])?(this.emitCache.splice(t,1),t--):this.emitCache.pop()}}_addListener(e,t,n){(this.listener[e]||(this.listener[e]=[])).push({fn:n,type:t})}}const gt=[Ie,me,de,pe,ye,Te,Se,Ee,De,ke,Le,Re,be,Ae,Me,Oe,we,Pe,Ne,Ge];const _t=[de,pe,"onLaunch",he,fe,ge,_e,"onExit",Ie,me,ve,ye,Ce,Te,Se,Ee,De,ke,Le,Ae,Re,be,Me,Oe,we,Pe,Ne,Ge];let mt;const vt=[];const yt=je(((e,t)=>{if(m(e._component.onError))return t(e)})),It=function(){};It.prototype={_id:1,on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n,_id:this._id}),this._id++},once:function(e,t,n){var o=this;function i(){o.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,i=n.length;o<i;o++)n[o].fn.apply(n[o].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),o=n[e],i=[];if(o&&t){for(var a=o.length-1;a>=0;a--)if(o[a].fn===t||o[a].fn._===t||o[a]._id===t){o.splice(a,1);break}i=o}return i.length?n[e]=i:delete n[e],this}};var Mt=It;const Ct={black:"rgba(0,0,0,0.4)",white:"rgba(255,255,255,0.4)"};function Tt(e,t,n){if(v(t)&&t.startsWith("@")){let i=e[t.replace("@","")]||t;switch(n){case"titleColor":i="black"===i?"#000000":"#ffffff";break;case"borderStyle":i=(o=i)&&o in Ct?Ct[o]:o}return i}var o;return t}function St(e,t={},n="light"){const o=t[n],i={};return void 0!==o&&e?(Object.keys(e).forEach((a=>{const s=e[a];i[a]=S(s)?St(s,t,n):h(s)?s.map((e=>"object"==typeof e?St(e,t,n):Tt(o,e))):Tt(o,s,a)})),i):e}
|
||
/**
|
||
* @dcloudio/uni-h5-vue v3.4.21
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let Et,Dt;class kt{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Et,!e&&Et&&(this.index=(Et.scopes||(Et.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Et;try{return Et=this,e()}finally{Et=t}}}on(){Et=this}off(){Et=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function Lt(e){return new kt(e)}function bt(e,t=Et){t&&t.active&&t.effects.push(e)}function At(){return Et}function Rt(e){Et&&Et.cleanups.push(e)}class Ot{constructor(e,t,n,o){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,bt(this,o)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,Vt();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(t.computed.value,this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),Bt()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=xt,t=Dt;try{return xt=!0,Dt=this,this._runnings++,wt(this),this.fn()}finally{Pt(this),this._runnings--,Dt=t,xt=e}}stop(){var e;this.active&&(wt(this),Pt(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function wt(e){e._trackId++,e._depsLength=0}function Pt(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Nt(e.deps[t],e);e.deps.length=e._depsLength}}function Nt(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function Gt(e,t){e.effect instanceof Ot&&(e=e.effect.fn);const n=new Ot(e,a,(()=>{n.dirty&&n.run()}));t&&(u(n,t),t.scope&&bt(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o}function Ut(e){e.effect.stop()}let xt=!0,Ft=0;const qt=[];function Vt(){qt.push(xt),xt=!1}function Bt(){const e=qt.pop();xt=void 0===e||e}function Ht(){Ft++}function jt(){for(Ft--;!Ft&&$t.length;)$t.shift()()}function Kt(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&Nt(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const $t=[];function zt(e,t,n){Ht();for(const o of e.keys()){let n;o._dirtyLevel<t&&(null!=n?n:n=e.get(o)===o._trackId)&&(o._shouldSchedule||(o._shouldSchedule=0===o._dirtyLevel),o._dirtyLevel=t),o._shouldSchedule&&(null!=n?n:n=e.get(o)===o._trackId)&&(o.trigger(),o._runnings&&!o.allowRecurse||2===o._dirtyLevel||(o._shouldSchedule=!1,o.scheduler&&$t.push(o.scheduler)))}jt()}const Wt=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Yt=new WeakMap,Xt=Symbol(""),Jt=Symbol("");function Zt(e,t,n){if(xt&&Dt){let t=Yt.get(e);t||Yt.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Wt((()=>t.delete(n)))),Kt(Dt,o)}}function Qt(e,t,n,o,i,a){const s=Yt.get(e);if(!s)return;let r=[];if("clear"===t)r=[...s.values()];else if("length"===n&&h(e)){const e=Number(o);s.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&r.push(t)}))}else switch(void 0!==n&&r.push(s.get(n)),t){case"add":h(e)?E(n)&&r.push(s.get("length")):(r.push(s.get(Xt)),f(e)&&r.push(s.get(Jt)));break;case"delete":h(e)||(r.push(s.get(Xt)),f(e)&&r.push(s.get(Jt)));break;case"set":f(e)&&r.push(s.get(Xt))}Ht();for(const c of r)c&&zt(c,4);jt()}const en=n("__proto__,__v_isRef,__isVue"),tn=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),nn=on();function on(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Yn(this);for(let t=0,i=this.length;t<i;t++)Zt(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(Yn)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){Vt(),Ht();const n=Yn(this)[t].apply(this,e);return jt(),Bt(),n}})),e}function an(e){const t=Yn(this);return Zt(t,0,e),t.hasOwnProperty(e)}class sn{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(o?i?xn:Un:i?Gn:Nn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const a=h(e);if(!o){if(a&&p(nn,t))return Reflect.get(nn,t,n);if("hasOwnProperty"===t)return an}const s=Reflect.get(e,t,n);return(y(t)?tn.has(t):en(t))?s:(o||Zt(e,0,t),i?s:no(s)?a&&E(t)?s:s.value:I(s)?o?Bn(s):qn(s):s)}}class rn extends sn{constructor(e=!1){super(!1,e)}set(e,t,n,o){let i=e[t];if(!this._isShallow){const t=$n(i);if(zn(n)||$n(n)||(i=Yn(i),n=Yn(n)),!h(e)&&no(i)&&!no(n))return!t&&(i.value=n,!0)}const a=h(e)&&E(t)?Number(t)<e.length:p(e,t),s=Reflect.set(e,t,n,o);return e===Yn(o)&&(a?P(n,i)&&Qt(e,"set",t,n):Qt(e,"add",t,n)),s}deleteProperty(e,t){const n=p(e,t);e[t];const o=Reflect.deleteProperty(e,t);return o&&n&&Qt(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return y(t)&&tn.has(t)||Zt(e,0,t),n}ownKeys(e){return Zt(e,0,h(e)?"length":Xt),Reflect.ownKeys(e)}}class cn extends sn{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const un=new rn,ln=new cn,dn=new rn(!0),pn=new cn(!0),hn=e=>e,fn=e=>Reflect.getPrototypeOf(e);function gn(e,t,n=!1,o=!1){const i=Yn(e=e.__v_raw),a=Yn(t);n||(P(t,a)&&Zt(i,0,t),Zt(i,0,a));const{has:s}=fn(i),r=o?hn:n?Zn:Jn;return s.call(i,t)?r(e.get(t)):s.call(i,a)?r(e.get(a)):void(e!==i&&e.get(t))}function _n(e,t=!1){const n=this.__v_raw,o=Yn(n),i=Yn(e);return t||(P(e,i)&&Zt(o,0,e),Zt(o,0,i)),e===i?n.has(e):n.has(e)||n.has(i)}function mn(e,t=!1){return e=e.__v_raw,!t&&Zt(Yn(e),0,Xt),Reflect.get(e,"size",e)}function vn(e){e=Yn(e);const t=Yn(this);return fn(t).has.call(t,e)||(t.add(e),Qt(t,"add",e,e)),this}function yn(e,t){t=Yn(t);const n=Yn(this),{has:o,get:i}=fn(n);let a=o.call(n,e);a||(e=Yn(e),a=o.call(n,e));const s=i.call(n,e);return n.set(e,t),a?P(t,s)&&Qt(n,"set",e,t):Qt(n,"add",e,t),this}function In(e){const t=Yn(this),{has:n,get:o}=fn(t);let i=n.call(t,e);i||(e=Yn(e),i=n.call(t,e)),o&&o.call(t,e);const a=t.delete(e);return i&&Qt(t,"delete",e,void 0),a}function Mn(){const e=Yn(this),t=0!==e.size,n=e.clear();return t&&Qt(e,"clear",void 0,void 0),n}function Cn(e,t){return function(n,o){const i=this,a=i.__v_raw,s=Yn(a),r=t?hn:e?Zn:Jn;return!e&&Zt(s,0,Xt),a.forEach(((e,t)=>n.call(o,r(e),r(t),i)))}}function Tn(e,t,n){return function(...o){const i=this.__v_raw,a=Yn(i),s=f(a),r="entries"===e||e===Symbol.iterator&&s,c="keys"===e&&s,u=i[e](...o),l=n?hn:t?Zn:Jn;return!t&&Zt(a,0,c?Jt:Xt),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:r?[l(e[0]),l(e[1])]:l(e),done:t}},[Symbol.iterator](){return this}}}}function Sn(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function En(){const e={get(e){return gn(this,e)},get size(){return mn(this)},has:_n,add:vn,set:yn,delete:In,clear:Mn,forEach:Cn(!1,!1)},t={get(e){return gn(this,e,!1,!0)},get size(){return mn(this)},has:_n,add:vn,set:yn,delete:In,clear:Mn,forEach:Cn(!1,!0)},n={get(e){return gn(this,e,!0)},get size(){return mn(this,!0)},has(e){return _n.call(this,e,!0)},add:Sn("add"),set:Sn("set"),delete:Sn("delete"),clear:Sn("clear"),forEach:Cn(!0,!1)},o={get(e){return gn(this,e,!0,!0)},get size(){return mn(this,!0)},has(e){return _n.call(this,e,!0)},add:Sn("add"),set:Sn("set"),delete:Sn("delete"),clear:Sn("clear"),forEach:Cn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=Tn(i,!1,!1),n[i]=Tn(i,!0,!1),t[i]=Tn(i,!1,!0),o[i]=Tn(i,!0,!0)})),[e,n,t,o]}const[Dn,kn,Ln,bn]=En();function An(e,t){const n=t?e?bn:Ln:e?kn:Dn;return(t,o,i)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(p(n,o)&&o in t?n:t,o,i)}const Rn={get:An(!1,!1)},On={get:An(!1,!0)},wn={get:An(!0,!1)},Pn={get:An(!0,!0)},Nn=new WeakMap,Gn=new WeakMap,Un=new WeakMap,xn=new WeakMap;function Fn(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>T(e).slice(8,-1))(e))}function qn(e){return $n(e)?e:jn(e,!1,un,Rn,Nn)}function Vn(e){return jn(e,!1,dn,On,Gn)}function Bn(e){return jn(e,!0,ln,wn,Un)}function Hn(e){return jn(e,!0,pn,Pn,xn)}function jn(e,t,n,o,i){if(!I(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const s=Fn(e);if(0===s)return e;const r=new Proxy(e,2===s?o:n);return i.set(e,r),r}function Kn(e){return $n(e)?Kn(e.__v_raw):!(!e||!e.__v_isReactive)}function $n(e){return!(!e||!e.__v_isReadonly)}function zn(e){return!(!e||!e.__v_isShallow)}function Wn(e){return Kn(e)||$n(e)}function Yn(e){const t=e&&e.__v_raw;return t?Yn(t):e}function Xn(e){return Object.isExtensible(e)&&G(e,"__v_skip",!0),e}const Jn=e=>I(e)?qn(e):e,Zn=e=>I(e)?Bn(e):e;class Qn{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ot((()=>e(this._value)),(()=>to(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=Yn(this);return e._cacheable&&!e.effect.dirty||!P(e._value,e._value=e.effect.run())||to(e,4),eo(e),e.effect._dirtyLevel>=2&&to(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function eo(e){var t;xt&&Dt&&(e=Yn(e),Kt(Dt,null!=(t=e.dep)?t:e.dep=Wt((()=>e.dep=void 0),e instanceof Qn?e:void 0)))}function to(e,t=4,n){const o=(e=Yn(e)).dep;o&&zt(o,t)}function no(e){return!(!e||!0!==e.__v_isRef)}function oo(e){return ao(e,!1)}function io(e){return ao(e,!0)}function ao(e,t){return no(e)?e:new so(e,t)}class so{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Yn(e),this._value=t?e:Jn(e)}get value(){return eo(this),this._value}set value(e){const t=this.__v_isShallow||zn(e)||$n(e);e=t?e:Yn(e),P(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Jn(e),to(this,4))}}function ro(e){to(e,4)}function co(e){return no(e)?e.value:e}function uo(e){return m(e)?e():co(e)}const lo={get:(e,t,n)=>co(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return no(i)&&!no(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function po(e){return Kn(e)?e:new Proxy(e,lo)}class ho{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>eo(this)),(()=>to(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function fo(e){return new ho(e)}function go(e){const t=h(e)?new Array(e.length):{};for(const n in e)t[n]=yo(e,n);return t}class _o{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Yn(this._object),t=this._key,null==(n=Yt.get(e))?void 0:n.get(t);var e,t,n}}class mo{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function vo(e,t,n){return no(e)?e:m(e)?new mo(e):I(e)&&arguments.length>1?yo(e,t,n):oo(e)}function yo(e,t,n){const o=e[t];return no(o)?o:new _o(e,t,n)}const Io={GET:"get",HAS:"has",ITERATE:"iterate"},Mo={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};function Co(e,t){}const To={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},So={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",ba:"beforeActivate hook",a:"activated hook",bda:"beforeDeactivate hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function Eo(e,t,n,o){try{return o?e(...o):e()}catch(i){ko(i,t,n)}}function Do(e,t,n,o){if(m(e)){const i=Eo(e,t,n,o);return i&&M(i)&&i.catch((e=>{ko(e,t,n)})),i}const i=[];for(let a=0;a<e.length;a++)i.push(Do(e[a],t,n,o));return i}function ko(e,t,n,o=!0){t&&t.vnode;if(t){let o=t.parent;const i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,i,a))return;o=o.parent}const s=t.appContext.config.errorHandler;if(s)return void Eo(s,null,10,[e,i,a])}!function(e){console.error(e)}(e,0,0,o)}let Lo=!1,bo=!1;const Ao=[];let Ro=0;const Oo=[];let wo=null,Po=0;const No=Promise.resolve();let Go=null;function Uo(e){const t=Go||No;return e?t.then(this?e.bind(this):e):t}function xo(e){Ao.length&&Ao.includes(e,Lo&&e.allowRecurse?Ro+1:Ro)||(null==e.id?Ao.push(e):Ao.splice(function(e){let t=Ro+1,n=Ao.length;for(;t<n;){const o=t+n>>>1,i=Ao[o],a=Ho(i);a<e||a===e&&i.pre?t=o+1:n=o}return t}(e.id),0,e),Fo())}function Fo(){Lo||bo||(bo=!0,Go=No.then(Ko))}function qo(e){h(e)?Oo.push(...e):wo&&wo.includes(e,e.allowRecurse?Po+1:Po)||Oo.push(e),Fo()}function Vo(e,t,n=(Lo?Ro+1:0)){for(;n<Ao.length;n++){const t=Ao[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;Ao.splice(n,1),n--,t()}}}function Bo(e){if(Oo.length){const e=[...new Set(Oo)].sort(((e,t)=>Ho(e)-Ho(t)));if(Oo.length=0,wo)return void wo.push(...e);for(wo=e,Po=0;Po<wo.length;Po++)wo[Po]();wo=null,Po=0}}const Ho=e=>null==e.id?1/0:e.id,jo=(e,t)=>{const n=Ho(e)-Ho(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ko(e){bo=!1,Lo=!0,Ao.sort(jo);try{for(Ro=0;Ro<Ao.length;Ro++){const e=Ao[Ro];e&&!1!==e.active&&Eo(e,null,14)}}finally{Ro=0,Ao.length=0,Bo(),Lo=!1,Go=null,(Ao.length||Oo.length)&&Ko()}}let $o,zo=[];function Wo(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||o;let a=n;const s=t.startsWith("update:"),r=s&&t.slice(7);if(r&&r in i){const e=`${"modelValue"===r?"model":r}Modifiers`,{number:t,trim:s}=i[e]||o;s&&(a=n.map((e=>v(e)?e.trim():e))),t&&(a=n.map(U))}let c,u=i[c=w(t)]||i[c=w(b(t))];!u&&s&&(u=i[c=w(R(t))]),u&&Do(u,e,6,Yo(e,u,a));const l=i[c+"Once"];if(l){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Do(l,e,6,Yo(e,l,a))}}function Yo(e,t,n){if(1!==n.length)return n;if(m(t)){if(t.length<2)return n}else if(!t.find((e=>e.length>=2)))return n;const o=n[0];if(o&&p(o,"type")&&p(o,"timeStamp")&&p(o,"target")&&p(o,"currentTarget")&&p(o,"detail")){const t=e.proxy,o=t.$gcd(t,!0);o&&n.push(o)}return n}function Xo(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(void 0!==i)return i;const a=e.emits;let s={},r=!1;if(!m(e)){const o=e=>{const n=Xo(e,t,!0);n&&(r=!0,u(s,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return a||r?(h(a)?a.forEach((e=>s[e]=null)):u(s,a),I(e)&&o.set(e,s),s):(I(e)&&o.set(e,null),null)}function Jo(e,t){return!(!e||!r(t))&&(t=t.slice(2).replace(/Once$/,""),p(e,t[0].toLowerCase()+t.slice(1))||p(e,R(t))||p(e,t))}let Zo=null,Qo=null;function ei(e){const t=Zo;return Zo=e,Qo=e&&e.type.__scopeId||null,t}function ti(e){Qo=e}function ni(){Qo=null}const oi=e=>ii;function ii(e,t=Zo,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&ar(-1);const i=ei(t);let a;try{a=e(...n)}finally{ei(i),o._d&&ar(1)}return a};return o._n=!0,o._c=!0,o._d=!0,o}function ai(e){const{type:t,vnode:n,proxy:o,withProxy:i,props:a,propsOptions:[s],slots:r,attrs:u,emit:l,render:d,renderCache:p,data:h,setupState:f,ctx:g,inheritAttrs:_}=e;let m,v;const y=ei(e);try{if(4&n.shapeFlag){const e=i||o,t=e;m=Cr(d.call(t,e,p,a,f,h,g)),v=u}else{const e=t;0,m=Cr(e.length>1?e(a,{attrs:u,slots:r,emit:l}):e(a,null)),v=t.props?u:si(u)}}catch(M){er.length=0,ko(M,e,1),m=_r(Zs)}let I=m;if(v&&!1!==_){const e=Object.keys(v),{shapeFlag:t}=I;e.length&&7&t&&(s&&e.some(c)&&(v=ri(v,s)),I=vr(I,v))}return n.dirs&&(I=vr(I),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&(I.transition=n.transition),m=I,ei(y),m}const si=e=>{let t;for(const n in e)("class"===n||"style"===n||r(n))&&((t||(t={}))[n]=e[n]);return t},ri=(e,t)=>{const n={};for(const o in e)c(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function ci(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const a=o[i];if(t[a]!==e[a]&&!Jo(n,a))return!0}return!1}function ui({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}const li="components";function di(e,t){return gi(li,e,!0,t)||e}const pi=Symbol.for("v-ndc");function hi(e){return v(e)?gi(li,e,!1)||e:e||pi}function fi(e){return gi("directives",e)}function gi(e,t,n=!0,o=!1){const i=Zo||Ar;if(i){const n=i.type;if(e===li){const e=zr(n,!1);if(e&&(e===t||e===b(t)||e===O(b(t))))return n}const a=_i(i[e]||n[e],t)||_i(i.appContext[e],t);return!a&&o?n:a}}function _i(e,t){return e&&(e[t]||e[b(t)]||e[O(b(t))])}const mi=e=>e.__isSuspense;let vi=0;const yi={name:"Suspense",__isSuspense:!0,process(e,t,n,o,i,a,s,r,c,u){if(null==e)!function(e,t,n,o,i,a,s,r,c){const{p:u,o:{createElement:l}}=c,d=l("div"),p=e.suspense=Mi(e,i,o,t,d,n,a,s,r,c);u(null,p.pendingBranch=e.ssContent,d,null,o,p,a,s),p.deps>0?(Ii(e,"onPending"),Ii(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,a,s),Si(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,i,a,s,r,c,u);else{if(a&&a.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,o,i,a,s,r,{p:c,um:u,o:{createElement:l}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:g,isInFallback:_,isHydrating:m}=d;if(g)d.pendingBranch=p,lr(p,g)?(c(g,p,d.hiddenContainer,null,i,d,a,s,r),d.deps<=0?d.resolve():_&&(m||(c(f,h,n,o,i,null,a,s,r),Si(d,h)))):(d.pendingId=vi++,m?(d.isHydrating=!1,d.activeBranch=g):u(g,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=l("div"),_?(c(null,p,d.hiddenContainer,null,i,d,a,s,r),d.deps<=0?d.resolve():(c(f,h,n,o,i,null,a,s,r),Si(d,h))):f&&lr(p,f)?(c(f,p,n,o,i,d,a,s,r),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,i,d,a,s,r),d.deps<=0&&d.resolve()));else if(f&&lr(p,f))c(f,p,n,o,i,d,a,s,r),Si(d,p);else if(Ii(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=vi++,c(null,p,d.hiddenContainer,null,i,d,a,s,r),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}(e,t,n,o,i,s,r,c,u)}},hydrate:function(e,t,n,o,i,a,s,r,c){const u=t.suspense=Mi(t,o,n,e.parentNode,document.createElement("div"),null,i,a,s,r,!0),l=c(e,u.pendingBranch=t.ssContent,n,u,a,s);0===u.deps&&u.resolve(!1,!0);return l},create:Mi,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Ci(o?n.default:n),e.ssFallback=o?Ci(n.fallback):_r(Zs)}};function Ii(e,t){const n=e.props&&e.props[t];m(n)&&n()}function Mi(e,t,n,o,i,a,s,r,c,u,l=!1){const{p:d,m:p,um:h,n:f,o:{parentNode:g,remove:_}}=u;let m;const v=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);v&&(null==t?void 0:t.pendingBranch)&&(m=t.pendingId,t.deps++);const y=e.props?x(e.props.timeout):void 0,I=a,M={vnode:e,parent:t,parentComponent:n,namespace:s,container:o,hiddenContainer:i,deps:0,pendingId:vi++,timeout:"number"==typeof y?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!l,isHydrating:l,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:i,pendingBranch:s,pendingId:r,effects:c,parentComponent:u,container:l}=M;let d=!1;M.isHydrating?M.isHydrating=!1:e||(d=i&&s.transition&&"out-in"===s.transition.mode,d&&(i.transition.afterLeave=()=>{r===M.pendingId&&(p(s,l,a===I?f(i):a,0),qo(c))}),i&&(g(i.el)!==M.hiddenContainer&&(a=f(i)),h(i,u,M,!0)),d||p(s,l,a,0)),Si(M,s),M.pendingBranch=null,M.isInFallback=!1;let _=M.parent,y=!1;for(;_;){if(_.pendingBranch){_.effects.push(...c),y=!0;break}_=_.parent}y||d||qo(c),M.effects=[],v&&t&&t.pendingBranch&&m===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),Ii(o,"onResolve")},fallback(e){if(!M.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:i,namespace:a}=M;Ii(t,"onFallback");const s=f(n),u=()=>{M.isInFallback&&(d(null,e,i,s,o,null,a,r,c),Si(M,e))},l=e.transition&&"out-in"===e.transition.mode;l&&(n.transition.afterLeave=u),M.isInFallback=!0,h(n,o,null,!0),l||u()},move(e,t,n){M.activeBranch&&p(M.activeBranch,e,t,n),M.container=e},next:()=>M.activeBranch&&f(M.activeBranch),registerDep(e,t){const n=!!M.pendingBranch;n&&M.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{ko(t,e,0)})).then((i=>{if(e.isUnmounted||M.isUnmounted||M.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:a}=e;Vr(e,i,!1),o&&(a.el=o);const r=!o&&e.subTree.el;t(e,a,g(o||e.subTree.el),o?null:f(e.subTree),M,s,c),r&&_(r),ui(e,a.el),n&&0==--M.deps&&M.resolve()}))},unmount(e,t){M.isUnmounted=!0,M.activeBranch&&h(M.activeBranch,n,e,t),M.pendingBranch&&h(M.pendingBranch,n,e,t)}};return M}function Ci(e){let t;if(m(e)){const n=ir&&e._c;n&&(e._d=!1,nr()),e=e(),n&&(e._d=!0,t=tr,or())}if(h(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!ur(o))return;if(o.type!==Zs||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=Cr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Ti(e,t){t&&t.pendingBranch?h(e)?t.effects.push(...e):t.effects.push(e):qo(e)}function Si(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,o&&o.subTree===n&&(o.vnode.el=i,ui(o,i))}const Ei=Symbol.for("v-scx"),Di=()=>gs(Ei);function ki(e,t){return Oi(e,null,t)}function Li(e,t){return Oi(e,null,{flush:"post"})}function bi(e,t){return Oi(e,null,{flush:"sync"})}const Ai={};function Ri(e,t,n){return Oi(e,t,n)}function Oi(e,t,{immediate:n,deep:i,flush:s,once:r,onTrack:c,onTrigger:u}=o){if(t&&r){const e=t;t=(...t)=>{e(...t),D()}}const d=Ar,p=e=>!0===i?e:Ni(e,!1===i?1:void 0);let f,g,_=!1,v=!1;if(no(e)?(f=()=>e.value,_=zn(e)):Kn(e)?(f=()=>p(e),_=!0):h(e)?(v=!0,_=e.some((e=>Kn(e)||zn(e))),f=()=>e.map((e=>no(e)?e.value:Kn(e)?p(e):m(e)?Eo(e,d,2):void 0))):f=m(e)?t?()=>Eo(e,d,2):()=>(g&&g(),Do(e,d,3,[I])):a,t&&i){const e=f;f=()=>Ni(e())}let y,I=e=>{g=S.onStop=()=>{Eo(e,d,4),g=S.onStop=void 0}};if(Fr){if(I=a,t?n&&Do(t,d,3,[f(),v?[]:void 0,I]):f(),"sync"!==s)return a;{const e=Di();y=e.__watcherHandles||(e.__watcherHandles=[])}}let M=v?new Array(e.length).fill(Ai):Ai;const C=()=>{if(S.active&&S.dirty)if(t){const e=S.run();(i||_||(v?e.some(((e,t)=>P(e,M[t]))):P(e,M)))&&(g&&g(),Do(t,d,3,[e,M===Ai?void 0:v&&M[0]===Ai?[]:M,I]),M=e)}else S.run()};let T;C.allowRecurse=!!t,"sync"===s?T=C:"post"===s?T=()=>Ps(C,d&&d.suspense):(C.pre=!0,d&&(C.id=d.uid),T=()=>xo(C));const S=new Ot(f,a,T),E=At(),D=()=>{S.stop(),E&&l(E.effects,S)};return t?n?C():M=S.run():"post"===s?Ps(S.run.bind(S),d&&d.suspense):S.run(),y&&y.push(D),D}function wi(e,t,n){const o=this.proxy,i=v(e)?e.includes(".")?Pi(o,e):()=>o[e]:e.bind(o,o);let a;m(t)?a=t:(a=t.handler,n=t);const s=Pr(this),r=Oi(i,a.bind(o),n);return s(),r}function Pi(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Ni(e,t,n=0,o){if(!I(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),no(e))Ni(e.value,t,n,o);else if(h(e))for(let i=0;i<e.length;i++)Ni(e[i],t,n,o);else if(g(e)||f(e))e.forEach((e=>{Ni(e,t,n,o)}));else if(S(e))for(const i in e)Ni(e[i],t,n,o);return e}function Gi(e,t){if(null===Zo)return e;const n=$r(Zo)||Zo.proxy,i=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[e,s,r,c=o]=t[a];e&&(m(e)&&(e={mounted:e,updated:e}),e.deep&&Ni(s),i.push({dir:e,instance:n,value:s,oldValue:void 0,arg:r,modifiers:c}))}return e}function Ui(e,t,n,o){const i=e.dirs,a=t&&t.dirs;for(let s=0;s<i.length;s++){const r=i[s];a&&(r.oldValue=a[s].value);let c=r.dir[o];c&&(Vt(),Do(c,n,8,[e.el,r,e,t]),Bt())}}const xi=Symbol("_leaveCb"),Fi=Symbol("_enterCb");function qi(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return va((()=>{e.isMounted=!0})),Ma((()=>{e.isUnmounting=!0})),e}const Vi=[Function,Array],Bi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vi,onEnter:Vi,onAfterEnter:Vi,onEnterCancelled:Vi,onBeforeLeave:Vi,onLeave:Vi,onAfterLeave:Vi,onLeaveCancelled:Vi,onBeforeAppear:Vi,onAppear:Vi,onAfterAppear:Vi,onAppearCancelled:Vi},Hi={name:"BaseTransition",props:Bi,setup(e,{slots:t}){const n=Rr(),o=qi();return()=>{const i=t.default&&Yi(t.default(),!0);if(!i||!i.length)return;let a=i[0];if(i.length>1)for(const e of i)if(e.type!==Zs){a=e;break}const s=Yn(e),{mode:r}=s;if(o.isLeaving)return $i(a);const c=zi(a);if(!c)return $i(a);const u=Ki(c,s,o,n);Wi(c,u);const l=n.subTree,d=l&&zi(l);if(d&&d.type!==Zs&&!lr(c,d)){const e=Ki(d,s,o,n);if(Wi(d,e),"out-in"===r)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},$i(a);"in-out"===r&&c.type!==Zs&&(e.delayLeave=(e,t,n)=>{ji(o,d)[String(d.key)]=d,e[xi]=()=>{t(),e[xi]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return a}}};function ji(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Ki(e,t,n,o){const{appear:i,mode:a,persisted:s=!1,onBeforeEnter:r,onEnter:c,onAfterEnter:u,onEnterCancelled:l,onBeforeLeave:d,onLeave:p,onAfterLeave:f,onLeaveCancelled:g,onBeforeAppear:_,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=t,I=String(e.key),M=ji(n,e),C=(e,t)=>{e&&Do(e,o,9,t)},T=(e,t)=>{const n=t[1];C(e,t),h(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},S={mode:a,persisted:s,beforeEnter(t){let o=r;if(!n.isMounted){if(!i)return;o=_||r}t[xi]&&t[xi](!0);const a=M[I];a&&lr(e,a)&&a.el[xi]&&a.el[xi](),C(o,[t])},enter(e){let t=c,o=u,a=l;if(!n.isMounted){if(!i)return;t=m||c,o=v||u,a=y||l}let s=!1;const r=e[Fi]=t=>{s||(s=!0,C(t?a:o,[e]),S.delayedLeave&&S.delayedLeave(),e[Fi]=void 0)};t?T(t,[e,r]):r()},leave(t,o){const i=String(e.key);if(t[Fi]&&t[Fi](!0),n.isUnmounting)return o();C(d,[t]);let a=!1;const s=t[xi]=n=>{a||(a=!0,o(),C(n?g:f,[t]),t[xi]=void 0,M[i]===e&&delete M[i])};M[i]=e,p?T(p,[t,s]):s()},clone:e=>Ki(e,t,n,o)};return S}function $i(e){if(ea(e))return(e=vr(e)).children=null,e}function zi(e){return ea(e)?e.children?e.children[0]:void 0:e}function Wi(e,t){6&e.shapeFlag&&e.component?Wi(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Yi(e,t=!1,n){let o=[],i=0;for(let a=0;a<e.length;a++){let s=e[a];const r=null==n?s.key:String(n)+String(null!=s.key?s.key:a);s.type===Xs?(128&s.patchFlag&&i++,o=o.concat(Yi(s.children,t,r))):(t||s.type!==Zs)&&o.push(null!=r?vr(s,{key:r}):s)}if(i>1)for(let a=0;a<o.length;a++)o[a].patchFlag=-2;return o}
|
||
/*! #__NO_SIDE_EFFECTS__ */function Xi(e,t){return m(e)?(()=>u({name:e.name},t,{setup:e}))():e}const Ji=e=>!!e.type.__asyncLoader
|
||
/*! #__NO_SIDE_EFFECTS__ */;function Zi(e){m(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:i=200,timeout:a,suspensible:s=!0,onError:r}=e;let c,u=null,l=0;const d=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),r)return new Promise(((t,n)=>{r(e,(()=>t((l++,u=null,d()))),(()=>n(e)),l+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return Xi({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return c},setup(){const e=Ar;if(c)return()=>Qi(c,e);const t=t=>{u=null,ko(t,e,13,!o)};if(s&&e.suspense||Fr)return d().then((t=>()=>Qi(t,e))).catch((e=>(t(e),()=>o?_r(o,{error:e}):null)));const r=oo(!1),l=oo(),p=oo(!!i);return i&&setTimeout((()=>{p.value=!1}),i),null!=a&&setTimeout((()=>{if(!r.value&&!l.value){const e=new Error(`Async component timed out after ${a}ms.`);t(e),l.value=e}}),a),d().then((()=>{r.value=!0,e.parent&&ea(e.parent.vnode)&&(e.parent.effect.dirty=!0,xo(e.parent.update))})).catch((e=>{t(e),l.value=e})),()=>r.value&&c?Qi(c,e):l.value&&o?_r(o,{error:l.value}):n&&!p.value?_r(n):void 0}})}function Qi(e,t){const{ref:n,props:o,children:i,ce:a}=t.vnode,s=_r(e,o,i);return s.ref=n,s.ce=a,delete t.vnode.ce,s}const ea=e=>e.type.__isKeepAlive;class ta{constructor(e){this.max=e,this._cache=new Map,this._keys=new Set,this._max=parseInt(e,10)}get(e){const{_cache:t,_keys:n,_max:o}=this,i=t.get(e);if(i)n.delete(e),n.add(e);else if(n.add(e),o&&n.size>o){const e=n.values().next().value;this.pruneCacheEntry(t.get(e)),this.delete(e)}return i}set(e,t){this._cache.set(e,t)}delete(e){this._cache.delete(e),this._keys.delete(e)}forEach(e,t){this._cache.forEach(e.bind(t))}}const na={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number],matchBy:{type:String,default:"name"},cache:Object},setup(e,{slots:t}){const n=Rr(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const i=e.cache||new ta(e.max);i.pruneCacheEntry=s;let a=null;function s(t){var o;!a||!lr(t,a)||"key"===e.matchBy&&t.key!==a.key?(da(o=t),l(o,n,r,!0)):a&&da(a)}const r=n.suspense,{renderer:{p:c,m:u,um:l,o:{createElement:d}}}=o,p=d("div");function h(t){i.forEach(((n,o)=>{const a=ha(n,e.matchBy);!a||t&&t(a)||(i.delete(o),s(n))}))}o.activate=(e,t,n,o,i)=>{const a=e.component;if(a.ba){const e=a.isDeactivated;a.isDeactivated=!1,N(a.ba),a.isDeactivated=e}u(e,t,n,0,r),c(a.vnode,e,t,n,a,r,o,e.slotScopeIds,i),Ps((()=>{a.isDeactivated=!1,a.a&&N(a.a);const t=e.props&&e.props.onVnodeMounted;t&&Dr(t,a.parent,e)}),r)},o.deactivate=e=>{const t=e.component;t.bda&&fa(t.bda),u(e,p,null,1,r),Ps((()=>{t.bda&&t.bda.forEach((e=>e.__called=!1)),t.da&&N(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Dr(n,t.parent,e),t.isDeactivated=!0}),r)},Ri((()=>[e.include,e.exclude,e.matchBy]),(([e,t])=>{e&&h((t=>ia(e,t))),t&&h((e=>!ia(t,e)))}),{flush:"post",deep:!0});let f=null;const g=()=>{null!=f&&i.set(f,pa(n.subTree))};return va(g),Ia(g),Ma((()=>{i.forEach(((t,o)=>{i.delete(o),s(t);const{subTree:a,suspense:r}=n,c=pa(a);if(t.type!==c.type||"key"===e.matchBy&&t.key!==c.key);else{c.component.bda&&N(c.component.bda),da(c);const e=c.component.da;e&&Ps(e,r)}}))})),()=>{if(f=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return a=null,n;if(!ur(o)||!(4&o.shapeFlag)&&!mi(o.type))return a=null,o;let s=pa(o);const r=s.type,c=ha(s,e.matchBy),{include:u,exclude:l}=e;if(u&&(!c||!ia(u,c))||l&&c&&ia(l,c))return a=s,o;const d=null==s.key?r:s.key,p=i.get(d);return s.el&&(s=vr(s),mi(o.type)&&(o.ssContent=s)),f=d,p&&(s.el=p.el,s.component=p.component,s.transition&&Wi(s,s.transition),s.shapeFlag|=512),s.shapeFlag|=256,a=s,mi(o.type)?o:s}}},oa=na;function ia(e,t){return h(e)?e.some((e=>ia(e,t))):v(e)?e.split(",").includes(t):"[object RegExp]"===T(e)&&e.test(t)}function aa(e,t){ua(e,"ba",t)}function sa(e,t){ua(e,"a",t)}function ra(e,t){ua(e,"bda",t)}function ca(e,t){ua(e,"da",t)}function ua(e,t,n=Ar){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(o.__called=!1,ga(t,o,n),n){let e=n.parent;for(;e&&e.parent;)ea(e.parent.vnode)&&la(o,t,n,e),e=e.parent}}function la(e,t,n,o){const i=ga(t,e,o,!0);Ca((()=>{l(o[t],i)}),n)}function da(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function pa(e){return mi(e.type)?e.ssContent:e}function ha(e,t){if("name"===t){const t=e.type;return zr(Ji(e)?t.__asyncResolved||{}:t)}return String(e.key)}function fa(e){for(let t=0;t<e.length;t++){const n=e[t];n.__called||(n(),n.__called=!0)}}function ga(e,t,n=Ar,o=!1){if(n){if(i=e,gt.indexOf(i)>-1&&n.$pageInstance){if(n.type.__reserved)return;if(n!==n.$pageInstance&&(n=n.$pageInstance,function(e){return[me,de].indexOf(e)>-1}(e))){const o=n.proxy;Do(t.bind(o),n,e,me===e?[o.$page.options]:[])}}const a=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Vt();const i=Pr(n),a=Do(t,n,e,o);return i(),Bt(),a});return o?a.unshift(s):a.push(s),s}var i}const _a=e=>(t,n=Ar)=>(!Fr||"sp"===e)&&ga(e,((...e)=>t(...e)),n),ma=_a("bm"),va=_a("m"),ya=_a("bu"),Ia=_a("u"),Ma=_a("bum"),Ca=_a("um"),Ta=_a("sp"),Sa=_a("rtg"),Ea=_a("rtc");function Da(e,t=Ar){ga("ec",e,t)}function ka(e,t,n,o){let i;const a=n&&n[o];if(h(e)||v(e)){i=new Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(e[n],n,void 0,a&&a[n])}else if("number"==typeof e){i=new Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(I(e))if(e[Symbol.iterator])i=Array.from(e,((e,n)=>t(e,n,void 0,a&&a[n])));else{const n=Object.keys(e);i=new Array(n.length);for(let o=0,s=n.length;o<s;o++){const s=n[o];i[o]=t(e[s],s,o,a&&a[o])}}else i=[];return n&&(n[o]=i),i}function La(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(h(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.key?(...e)=>{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function ba(e,t,n={},o,i){if(Zo.isCE||Zo.parent&&Ji(Zo.parent)&&Zo.parent.isCE)return"default"!==t&&(n.name=t),_r("slot",n,o&&o());let a=e[t];a&&a._c&&(a._d=!1),nr();const s=a&&Aa(a(n)),r=cr(Xs,{key:n.key||s&&s.key||`_${t}`},s||(o?o():[]),s&&1===e._?64:-2);return!i&&r.scopeId&&(r.slotScopeIds=[r.scopeId+"-s"]),a&&a._c&&(a._d=!0),r}function Aa(e){return e.some((e=>!ur(e)||e.type!==Zs&&!(e.type===Xs&&!Aa(e.children))))?e:null}function Ra(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:w(o)]=e[o];return n}const Oa=e=>{if(!e)return null;if(Gr(e)){return $r(e)||e.proxy}return Oa(e.parent)},wa=u(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Oa(e.parent),$root:e=>Oa(e.root),$emit:e=>e.emit,$options:e=>ns(e),$forceUpdate:e=>e.f||(e.f=(e=>function(){e.effect.dirty=!0,xo(e.update)})(e)),$nextTick:e=>e.n||(e.n=Uo.bind(e.proxy)),$watch:e=>wi.bind(e)}),Pa=(e,t)=>e!==o&&!e.__isScriptSetup&&p(e,t),Na={get({_:e},t){const{ctx:n,setupState:i,data:a,props:s,accessCache:r,type:c,appContext:u}=e;let l;if("$"!==t[0]){const c=r[t];if(void 0!==c)switch(c){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return s[t]}else{if(Pa(i,t))return r[t]=1,i[t];if(a!==o&&p(a,t))return r[t]=2,a[t];if((l=e.propsOptions[0])&&p(l,t))return r[t]=3,s[t];if(n!==o&&p(n,t))return r[t]=4,n[t];Za&&(r[t]=0)}}const d=wa[t];let h,f;return d?("$attrs"===t&&Zt(e,0,t),d(e)):(h=c.__cssModules)&&(h=h[t])?h:n!==o&&p(n,t)?(r[t]=4,n[t]):(f=u.config.globalProperties,p(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:i,setupState:a,ctx:s}=e;return Pa(a,t)?(a[t]=n,!0):i!==o&&p(i,t)?(i[t]=n,!0):!p(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,propsOptions:s}},r){let c;return!!n[r]||e!==o&&p(e,r)||Pa(t,r)||(c=s[0])&&p(c,r)||p(i,r)||p(wa,r)||p(a.config.globalProperties,r)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:p(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Ga=u({},Na,{get(e,t){if(t!==Symbol.unscopables)return Na.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!V(t)});function Ua(){return null}function xa(){return null}function Fa(e){}function qa(e){}function Va(){return null}function Ba(){}function Ha(e,t){return null}function ja(){return $a().slots}function Ka(){return $a().attrs}function $a(){const e=Rr();return e.setupContext||(e.setupContext=Kr(e))}function za(e){return h(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Wa(e,t){const n=za(e);for(const o in t){if(o.startsWith("__skip"))continue;let e=n[o];e?h(e)||m(e)?e=n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(e=n[o]={default:t[o]}),e&&t[`__skip_${o}`]&&(e.skipFactory=!0)}return n}function Ya(e,t){return e&&t?h(e)&&h(t)?e.concat(t):u({},za(e),za(t)):e||t}function Xa(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Ja(e){const t=Rr();let n=e();return Nr(),M(n)&&(n=n.catch((e=>{throw Pr(t),e}))),[n,()=>Pr(t)]}let Za=!0;function Qa(e){const t=ns(e),n=e.proxy,o=e.ctx;Za=!1,t.beforeCreate&&es(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:r,watch:c,provide:u,inject:l,created:d,beforeMount:p,mounted:f,beforeUpdate:g,updated:_,activated:v,deactivated:y,beforeDestroy:M,beforeUnmount:C,destroyed:T,unmounted:S,render:E,renderTracked:D,renderTriggered:k,errorCaptured:L,serverPrefetch:b,expose:A,inheritAttrs:R,components:O,directives:w,filters:P}=t;if(l&&function(e,t){h(e)&&(e=ss(e));for(const n in e){const o=e[n];let i;i=I(o)?"default"in o?gs(o.from||n,o.default,!0):gs(o.from||n):gs(o),no(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(l,o,null),r)for(const a in r){const e=r[a];m(e)&&(o[a]=e.bind(n))}if(i){const t=i.call(n,n);I(t)&&(e.data=qn(t))}if(Za=!0,s)for(const h in s){const e=s[h],t=m(e)?e.bind(n,n):m(e.get)?e.get.bind(n,n):a,i=!m(e)&&m(e.set)?e.set.bind(n):a,r=Wr({get:t,set:i});Object.defineProperty(o,h,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e})}if(c)for(const a in c)ts(c[a],o,n,a);if(u){const e=m(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{fs(t,e[t])}))}function N(e,t){h(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&es(d,e,"c"),N(ma,p),N(va,f),N(ya,g),N(Ia,_),N(sa,v),N(ca,y),N(Da,L),N(Ea,D),N(Sa,k),N(Ma,C),N(Ca,S),N(Ta,b),h(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===a&&(e.render=E),null!=R&&(e.inheritAttrs=R),O&&(e.components=O),w&&(e.directives=w);const G=e.appContext.config.globalProperties.$applyOptions;G&&G(t,e,n)}function es(e,t,n){Do(h(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function ts(e,t,n,o){const i=o.includes(".")?Pi(n,o):()=>n[o];if(v(e)){const n=t[e];m(n)&&Ri(i,n)}else if(m(e))Ri(i,e.bind(n));else if(I(e))if(h(e))e.forEach((e=>ts(e,t,n,o)));else{const o=m(e.handler)?e.handler.bind(n):t[e.handler];m(o)&&Ri(i,o,e)}}function ns(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:s}}=e.appContext,r=a.get(t);let c;return r?c=r:i.length||n||o?(c={},i.length&&i.forEach((e=>os(c,e,s,!0))),os(c,t,s)):c=t,I(t)&&a.set(t,c),c}function os(e,t,n,o=!1){const{mixins:i,extends:a}=t;a&&os(e,a,n,!0),i&&i.forEach((t=>os(e,t,n,!0)));for(const s in t)if(o&&"expose"===s);else{const o=is[s]||n&&n[s];e[s]=o?o(e[s],t[s]):t[s]}return e}const is={data:as,props:us,emits:us,methods:cs,computed:cs,beforeCreate:rs,created:rs,beforeMount:rs,mounted:rs,beforeUpdate:rs,updated:rs,beforeDestroy:rs,beforeUnmount:rs,destroyed:rs,unmounted:rs,activated:rs,deactivated:rs,errorCaptured:rs,serverPrefetch:rs,components:cs,directives:cs,watch:function(e,t){if(!e)return t;if(!t)return e;const n=u(Object.create(null),e);for(const o in t)n[o]=rs(e[o],t[o]);return n},provide:as,inject:function(e,t){return cs(ss(e),ss(t))}};function as(e,t){return t?e?function(){return u(m(e)?e.call(this,this):e,m(t)?t.call(this,this):t)}:t:e}function ss(e){if(h(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function rs(e,t){return e?[...new Set([].concat(e,t))]:t}function cs(e,t){return e?u(Object.create(null),e,t):t}function us(e,t){return e?h(e)&&h(t)?[...new Set([...e,...t])]:u(Object.create(null),za(e),za(null!=t?t:{})):t}function ls(){return{app:null,config:{isNativeTag:s,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ds=0;function ps(e,t){return function(n,o=null){m(n)||(n=u({},n)),null==o||I(o)||(o=null);const i=ls(),a=new WeakSet;let s=!1;const r=i.app={_uid:ds++,_component:n,_props:o,_container:null,_context:i,_instance:null,version:ec,get config(){return i.config},set config(e){},use:(e,...t)=>(a.has(e)||(e&&m(e.install)?(a.add(e),e.install(r,...t)):m(e)&&(a.add(e),e(r,...t))),r),mixin:e=>(i.mixins.includes(e)||i.mixins.push(e),r),component:(e,t)=>t?(i.components[e]=t,r):i.components[e],directive:(e,t)=>t?(i.directives[e]=t,r):i.directives[e],mount(a,c,u){if(!s){const l=_r(n,o);return l.appContext=i,!0===u?u="svg":!1===u&&(u=void 0),c&&t?t(l,a):e(l,a,u),s=!0,r._container=a,a.__vue_app__=r,r._instance=l.component,$r(l.component)||l.component.proxy}},unmount(){s&&(e(null,r._container),delete r._container.__vue_app__)},provide:(e,t)=>(i.provides[e]=t,r),runWithContext(e){const t=hs;hs=r;try{return e()}finally{hs=t}}};return r}}let hs=null;function fs(e,t){if(Ar){let n=Ar.provides;const o=Ar.parent&&Ar.parent.provides;o===n&&(n=Ar.provides=Object.create(o)),n[e]=t,"app"===Ar.type.mpType&&Ar.appContext.app.provide(e,t)}else;}function gs(e,t,n=!1){const o=Ar||Zo;if(o||hs){const i=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:hs._context.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&m(t)?t.call(o&&o.proxy):t}}function _s(){return!!(Ar||Zo||hs)}function ms(e,t,n,i){const[a,s]=e.propsOptions;let r,c=!1;if(t)for(let o in t){if(D(o))continue;const u=t[o];let l;a&&p(a,l=b(o))?s&&s.includes(l)?(r||(r={}))[l]=u:n[l]=u:Jo(e.emitsOptions,o)||o in i&&u===i[o]||(i[o]=u,c=!0)}if(s){const t=Yn(n),i=r||o;for(let o=0;o<s.length;o++){const r=s[o];n[r]=vs(a,t,r,i[r],e,!p(i,r))}}return c}function vs(e,t,n,o,i,a){const s=e[n];if(null!=s){const e=p(s,"default");if(e&&void 0===o){const e=s.default;if(s.type!==Function&&!s.skipFactory&&m(e)){const{propsDefaults:a}=i;if(n in a)o=a[n];else{const s=Pr(i);o=a[n]=e.call(null,t),s()}}else o=e}s[0]&&(a&&!e?o=!1:!s[1]||""!==o&&o!==R(n)||(o=!0))}return o}function ys(e,t,n=!1){const a=t.propsCache,s=a.get(e);if(s)return s;const r=e.props,c={},l=[];let d=!1;if(!m(e)){const o=e=>{d=!0;const[n,o]=ys(e,t,!0);u(c,n),o&&l.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!r&&!d)return I(e)&&a.set(e,i),i;if(h(r))for(let i=0;i<r.length;i++){const e=b(r[i]);Is(e)&&(c[e]=o)}else if(r)for(const o in r){const e=b(o);if(Is(e)){const t=r[o],n=c[e]=h(t)||m(t)?{type:t}:u({},t);if(n){const t=Ts(Boolean,n.type),o=Ts(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||p(n,"default"))&&l.push(e)}}}const f=[c,l];return I(e)&&a.set(e,f),f}function Is(e){return"$"!==e[0]&&!D(e)}function Ms(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function Cs(e,t){return Ms(e)===Ms(t)}function Ts(e,t){return h(t)?t.findIndex((t=>Cs(t,e))):m(t)&&Cs(t,e)?0:-1}const Ss=e=>"_"===e[0]||"$stable"===e,Es=e=>h(e)?e.map(Cr):[Cr(e)],Ds=(e,t,n)=>{if(t._n)return t;const o=ii(((...e)=>Es(t(...e))),n);return o._c=!1,o},ks=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Ss(i))continue;const n=e[i];if(m(n))t[i]=Ds(0,n,o);else if(null!=n){const e=Es(n);t[i]=()=>e}}},Ls=(e,t)=>{const n=Es(t);e.slots.default=()=>n};function bs(e,t,n,i,a=!1){if(h(e))return void e.forEach(((e,o)=>bs(e,t&&(h(t)?t[o]:t),n,i,a)));if(Ji(i)&&!a)return;const s=4&i.shapeFlag?$r(i.component)||i.component.proxy:i.el,r=a?null:s,{i:c,r:u}=e,d=t&&t.r,f=c.refs===o?c.refs={}:c.refs,g=c.setupState;if(null!=d&&d!==u&&(v(d)?(f[d]=null,p(g,d)&&(g[d]=null)):no(d)&&(d.value=null)),m(u))Eo(u,c,12,[r,f]);else{const t=v(u),o=no(u);if(t||o){const i=()=>{if(e.f){const n=t?p(g,u)?g[u]:f[u]:u.value;a?h(n)&&l(n,s):h(n)?n.includes(s)||n.push(s):t?(f[u]=[s],p(g,u)&&(g[u]=f[u])):(u.value=[s],e.k&&(f[e.k]=u.value))}else t?(f[u]=r,p(g,u)&&(g[u]=r)):o&&(u.value=r,e.k&&(f[e.k]=r))};r?(i.id=-1,Ps(i,n)):i()}}}let As=!1;const Rs=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,Os=e=>8===e.nodeType;function ws(e){const{mt:t,p:n,o:{patchProp:o,createText:i,nextSibling:a,parentNode:s,remove:c,insert:u,createComment:l}}=e,d=(n,o,r,c,l,y=!1)=>{const I=Os(n)&&"["===n.data,M=()=>g(n,o,r,c,l,I),{type:C,ref:T,shapeFlag:S,patchFlag:E}=o;let D=n.nodeType;o.el=n,-2===E&&(y=!1,o.dynamicChildren=null);let k=null;switch(C){case Js:3!==D?""===o.children?(u(o.el=i(""),s(n),n),k=n):k=M():(n.data!==o.children&&(As=!0,n.data=o.children),k=a(n));break;case Zs:v(n)?(k=a(n),m(o.el=n.content.firstChild,n,r)):k=8!==D||I?M():a(n);break;case Qs:if(I&&(D=(n=a(n)).nodeType),1===D||3===D){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=1===k.nodeType?k.outerHTML:k.data),t===o.staticCount-1&&(o.anchor=k),k=a(k);return I?a(k):k}M();break;case Xs:k=I?f(n,o,r,c,l,y):M();break;default:if(1&S)k=1===D&&o.type.toLowerCase()===n.tagName.toLowerCase()||v(n)?p(n,o,r,c,l,y):M();else if(6&S){o.slotScopeIds=l;const e=s(n);if(k=I?_(n):Os(n)&&"teleport start"===n.data?_(n,n.data,"teleport end"):a(n),t(o,e,null,r,c,Rs(e),y),Ji(o)){let t;I?(t=_r(Xs),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?yr(""):_r("div"),t.el=n,o.component.subTree=t}}else 64&S?k=8!==D?M():o.type.hydrate(n,o,r,c,l,y,e,h):128&S&&(k=o.type.hydrate(n,o,r,c,Rs(s(n)),l,y,e,d))}return null!=T&&bs(T,null,c,o),k},p=(e,t,n,i,a,s)=>{s=s||!!t.dynamicChildren;const{type:u,props:l,patchFlag:d,shapeFlag:p,dirs:f,transition:g}=t,_="input"===u||"option"===u;if(_||-1!==d){f&&Ui(t,null,n,"created");let u,y=!1;if(v(e)){y=qs(i,g)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;y&&g.beforeEnter(o),m(o,e,n),t.el=e=o}if(16&p&&(!l||!l.innerHTML&&!l.textContent)){let o=h(e.firstChild,t,e,n,i,a,s);for(;o;){As=!0;const e=o;o=o.nextSibling,c(e)}}else 8&p&&e.textContent!==t.children&&(As=!0,e.textContent=t.children);if(l)if(_||!s||48&d)for(const t in l)(_&&(t.endsWith("value")||"indeterminate"===t)||r(t)&&!D(t)||"."===t[0])&&o(e,t,null,l[t],void 0,void 0,n);else l.onClick&&o(e,"onClick",null,l.onClick,void 0,void 0,n);(u=l&&l.onVnodeBeforeMount)&&Dr(u,n,t),f&&Ui(t,null,n,"beforeMount"),((u=l&&l.onVnodeMounted)||f||y)&&Ti((()=>{u&&Dr(u,n,t),y&&g.enter(e),f&&Ui(t,null,n,"mounted")}),i)}return e.nextSibling},h=(e,t,o,i,a,s,r)=>{r=r||!!t.dynamicChildren;const c=t.children,u=c.length;for(let l=0;l<u;l++){const t=r?c[l]:c[l]=Cr(c[l]);if(e)e=d(e,t,i,a,s,r);else{if(t.type===Js&&!t.children)continue;As=!0,n(null,t,o,null,i,a,Rs(o),s)}}return e},f=(e,t,n,o,i,r)=>{const{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);const d=s(e),p=h(a(e),t,d,n,o,i,r);return p&&Os(p)&&"]"===p.data?a(t.anchor=p):(As=!0,u(t.anchor=l("]"),d,p),p)},g=(e,t,o,i,r,u)=>{if(As=!0,t.el=null,u){const t=_(e);for(;;){const n=a(e);if(!n||n===t)break;c(n)}}const l=a(e),d=s(e);return c(e),n(null,t,d,l,o,i,Rs(d),r),l},_=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=a(e))&&Os(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return a(e);o--}return e},m=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},v=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),Bo(),void(t._vnode=e);As=!1,d(t.firstChild,e,null,null,null),Bo(),t._vnode=e,As&&console.error("Hydration completed but contains mismatches.")},d]}const Ps=Ti;function Ns(e){return Us(e)}function Gs(e){return Us(e,ws)}function Us(e,t){q().__VUE__=!0;const{insert:n,remove:s,patchProp:r,forcePatchProp:c,createElement:l,createText:d,createComment:h,setText:f,setElementText:g,parentNode:_,nextSibling:m,setScopeId:v=a,insertStaticContent:y}=e,I=(e,t,n,o=null,i=null,a=null,s=void 0,r=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!lr(e,t)&&(o=J(e),$(e,i,a,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:u,ref:l,shapeFlag:d}=t;switch(u){case Js:M(e,t,n,o);break;case Zs:C(e,t,n,o);break;case Qs:null==e&&T(t,n,o,s);break;case Xs:P(e,t,n,o,i,a,s,r,c);break;default:1&d?S(e,t,n,o,i,a,s,r,c):6&d?G(e,t,n,o,i,a,s,r,c):(64&d||128&d)&&u.process(e,t,n,o,i,a,s,r,c,ee)}null!=l&&i&&bs(l,e&&e.ref,a,t||e,!t)},M=(e,t,o,i)=>{if(null==e)n(t.el=d(t.children),o,i);else{const n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},C=(e,t,o,i)=>{null==e?n(t.el=h(t.children||""),o,i):t.el=e.el},T=(e,t,n,o)=>{[e.el,e.anchor]=y(e.children,t,n,o,e.el,e.anchor)},S=(e,t,n,o,i,a,s,r,c)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?E(t,n,o,i,a,s,r,c):A(e,t,i,a,s,r,c)},E=(e,t,o,i,a,s,c,u)=>{let d,p;const{props:h,shapeFlag:f,transition:_,dirs:m}=e;if(d=e.el=l(e.type,s,h&&h.is,h),8&f?g(d,e.children):16&f&&L(e.children,d,null,i,a,xs(e,s),c,u),m&&Ui(e,null,i,"created"),k(d,e,e.scopeId,c,i),h){for(const t in h)"value"===t||D(t)||r(d,t,null,h[t],s,e.children,i,a,X);"value"in h&&r(d,"value",null,h.value,s),(p=h.onVnodeBeforeMount)&&Dr(p,i,e)}Object.defineProperty(d,"__vueParentComponent",{value:i,enumerable:!1}),m&&Ui(e,null,i,"beforeMount");const v=qs(a,_);v&&_.beforeEnter(d),n(d,t,o),((p=h&&h.onVnodeMounted)||v||m)&&Ps((()=>{p&&Dr(p,i,e),v&&_.enter(d),m&&Ui(e,null,i,"mounted")}),a)},k=(e,t,n,o,i)=>{if(n&&v(e,n),o)for(let a=0;a<o.length;a++)v(e,o[a]);if(i){if(t===i.subTree){const t=i.vnode;k(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},L=(e,t,n,o,i,a,s,r,c=0)=>{for(let u=c;u<e.length;u++){const c=e[u]=r?Tr(e[u]):Cr(e[u]);I(null,c,t,n,o,i,a,s,r)}},A=(e,t,n,i,a,s,u)=>{const l=t.el=e.el;let{patchFlag:d,dynamicChildren:p,dirs:h}=t;d|=16&e.patchFlag;const f=e.props||o,_=t.props||o;let m;if(n&&Fs(n,!1),(m=_.onVnodeBeforeUpdate)&&Dr(m,n,t,e),h&&Ui(t,e,n,"beforeUpdate"),n&&Fs(n,!0),p?O(e.dynamicChildren,p,l,n,i,xs(t,a),s):u||B(e,t,l,null,n,i,xs(t,a),s,!1),d>0){if(16&d)w(l,t,f,_,n,i,a);else if(2&d&&f.class!==_.class&&r(l,"class",null,_.class,a),4&d&&r(l,"style",f.style,_.style,a),8&d){const o=t.dynamicProps;for(let t=0;t<o.length;t++){const s=o[t],u=f[s],d=_[s];(d!==u||"value"===s||c&&c(l,s))&&r(l,s,u,d,a,e.children,n,i,X)}}1&d&&e.children!==t.children&&g(l,t.children)}else u||null!=p||w(l,t,f,_,n,i,a);((m=_.onVnodeUpdated)||h)&&Ps((()=>{m&&Dr(m,n,t,e),h&&Ui(t,e,n,"updated")}),i)},O=(e,t,n,o,i,a,s)=>{for(let r=0;r<t.length;r++){const c=e[r],u=t[r],l=c.el&&(c.type===Xs||!lr(c,u)||70&c.shapeFlag)?_(c.el):n;I(c,u,l,null,o,i,a,s,!0)}},w=(e,t,n,i,a,s,u)=>{if(n!==i){if(n!==o)for(const o in n)D(o)||o in i||r(e,o,n[o],null,u,t.children,a,s,X);for(const o in i){if(D(o))continue;const l=i[o],d=n[o];(l!==d&&"value"!==o||c&&c(e,o))&&r(e,o,d,l,u,t.children,a,s,X)}"value"in i&&r(e,"value",n.value,i.value,u)}},P=(e,t,o,i,a,s,r,c,u)=>{const l=t.el=e?e.el:d(""),p=t.anchor=e?e.anchor:d("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:g}=t;g&&(c=c?c.concat(g):g),null==e?(n(l,o,i),n(p,o,i),L(t.children||[],o,p,a,s,r,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(O(e.dynamicChildren,f,o,a,s,r,c),(null!=t.key||a&&t===a.subTree)&&Vs(e,t,!0)):B(e,t,o,p,a,s,r,c,u)},G=(e,t,n,o,i,a,s,r,c)=>{t.slotScopeIds=r,null==e?512&t.shapeFlag?i.ctx.activate(t,n,o,s,c):U(t,n,o,i,a,s,c):x(e,t,c)},U=(e,t,n,o,i,a,s)=>{const r=e.component=br(e,o,i);if(ea(e)&&(r.ctx.renderer=ee),qr(r),r.asyncDep){if(i&&i.registerDep(r,F),!e.el){const e=r.subTree=_r(Zs);C(null,e,t,n)}}else F(r,e,t,n,i,a,s)},x=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:i,component:a}=e,{props:s,children:r,patchFlag:c}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!i&&!r||r&&r.$stable)||o!==s&&(o?!s||ci(o,s,u):!!s);if(1024&c)return!0;if(16&c)return o?ci(o,s,u):!!s;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(s[n]!==o[n]&&!Jo(u,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void V(o,t,n);o.next=t,function(e){const t=Ao.indexOf(e);t>Ro&&Ao.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},F=(e,t,n,o,i,s,r)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:a,vnode:u}=e;{const n=Bs(e);if(n)return t&&(t.el=u.el,V(e,t,r)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let l,d=t;Fs(e,!1),t?(t.el=u.el,V(e,t,r)):t=u,n&&N(n),(l=t.props&&t.props.onVnodeBeforeUpdate)&&Dr(l,a,t,u),Fs(e,!0);const p=ai(e),h=e.subTree;e.subTree=p,I(h,p,_(h.el),J(h),e,i,s),t.el=p.el,null===d&&ui(e,p.el),o&&Ps(o,i),(l=t.props&&t.props.onVnodeUpdated)&&Ps((()=>Dr(l,a,t,u)),i)}else{let a;const{el:r,props:c}=t,{bm:u,m:l,parent:d}=e,p=Ji(t);if(Fs(e,!1),u&&N(u),!p&&(a=c&&c.onVnodeBeforeMount)&&Dr(a,d,t),Fs(e,!0),r&&ne){const n=()=>{e.subTree=ai(e),ne(r,e.subTree,e,i,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const a=e.subTree=ai(e);I(null,a,n,o,e,i,s),t.el=a.el}if(l&&Ps(l,i),!p&&(a=c&&c.onVnodeMounted)){const e=t;Ps((()=>Dr(a,d,e)),i)}(256&t.shapeFlag||d&&Ji(d.vnode)&&256&d.vnode.shapeFlag)&&(e.ba&&fa(e.ba),e.a&&Ps(e.a,i)),e.isMounted=!0,t=n=o=null}},u=e.effect=new Ot(c,a,(()=>xo(l)),e.scope),l=e.update=()=>{u.dirty&&u.run()};l.id=e.uid,Fs(e,!0),l()},V=(e,t,n)=>{t.component=e;const i=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:i,attrs:a,vnode:{patchFlag:s}}=e,r=Yn(i),[c]=e.propsOptions;let u=!1;if(!(o||s>0)||16&s){let o;ms(e,t,i,a)&&(u=!0);for(const a in r)t&&(p(t,a)||(o=R(a))!==a&&p(t,o))||(c?!n||void 0===n[a]&&void 0===n[o]||(i[a]=vs(c,r,a,void 0,e,!0)):delete i[a]);if(a!==r)for(const e in a)t&&p(t,e)||(delete a[e],u=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let s=n[o];if(Jo(e.emitsOptions,s))continue;const l=t[s];if(c)if(p(a,s))l!==a[s]&&(a[s]=l,u=!0);else{const t=b(s);i[t]=vs(c,r,t,l,e,!1)}else l!==a[s]&&(a[s]=l,u=!0)}}u&&Qt(e,"set","$attrs")}(e,t.props,i,n),((e,t,n)=>{const{vnode:i,slots:a}=e;let s=!0,r=o;if(32&i.shapeFlag){const e=t._;e?n&&1===e?s=!1:(u(a,t),n||1!==e||delete a._):(s=!t.$stable,ks(t,a)),r=t}else t&&(Ls(e,t),r={default:1});if(s)for(const o in a)Ss(o)||null!=r[o]||delete a[o]})(e,t.children,n),Vt(),Vo(e),Bt()},B=(e,t,n,o,i,a,s,r,c=!1)=>{const u=e&&e.children,l=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void j(u,d,n,o,i,a,s,r,c);if(256&p)return void H(u,d,n,o,i,a,s,r,c)}8&h?(16&l&&X(u,i,a),d!==u&&g(n,d)):16&l?16&h?j(u,d,n,o,i,a,s,r,c):X(u,i,a,!0):(8&l&&g(n,""),16&h&&L(d,n,o,i,a,s,r,c))},H=(e,t,n,o,a,s,r,c,u)=>{t=t||i;const l=(e=e||i).length,d=t.length,p=Math.min(l,d);let h;for(h=0;h<p;h++){const o=t[h]=u?Tr(t[h]):Cr(t[h]);I(e[h],o,n,null,a,s,r,c,u)}l>d?X(e,a,s,!0,!1,p):L(t,n,o,a,s,r,c,u,p)},j=(e,t,n,o,a,s,r,c,u)=>{let l=0;const d=t.length;let p=e.length-1,h=d-1;for(;l<=p&&l<=h;){const o=e[l],i=t[l]=u?Tr(t[l]):Cr(t[l]);if(!lr(o,i))break;I(o,i,n,null,a,s,r,c,u),l++}for(;l<=p&&l<=h;){const o=e[p],i=t[h]=u?Tr(t[h]):Cr(t[h]);if(!lr(o,i))break;I(o,i,n,null,a,s,r,c,u),p--,h--}if(l>p){if(l<=h){const e=h+1,i=e<d?t[e].el:o;for(;l<=h;)I(null,t[l]=u?Tr(t[l]):Cr(t[l]),n,i,a,s,r,c,u),l++}}else if(l>h)for(;l<=p;)$(e[l],a,s,!0),l++;else{const f=l,g=l,_=new Map;for(l=g;l<=h;l++){const e=t[l]=u?Tr(t[l]):Cr(t[l]);null!=e.key&&_.set(e.key,l)}let m,v=0;const y=h-g+1;let M=!1,C=0;const T=new Array(y);for(l=0;l<y;l++)T[l]=0;for(l=f;l<=p;l++){const o=e[l];if(v>=y){$(o,a,s,!0);continue}let i;if(null!=o.key)i=_.get(o.key);else for(m=g;m<=h;m++)if(0===T[m-g]&&lr(o,t[m])){i=m;break}void 0===i?$(o,a,s,!0):(T[i-g]=l+1,i>=C?C=i:M=!0,I(o,t[i],n,null,a,s,r,c,u),v++)}const S=M?function(e){const t=e.slice(),n=[0];let o,i,a,s,r;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(i=n[n.length-1],e[i]<c){t[o]=i,n.push(o);continue}for(a=0,s=n.length-1;a<s;)r=a+s>>1,e[n[r]]<c?a=r+1:s=r;c<e[n[a]]&&(a>0&&(t[o]=n[a-1]),n[a]=o)}}a=n.length,s=n[a-1];for(;a-- >0;)n[a]=s,s=t[s];return n}(T):i;for(m=S.length-1,l=y-1;l>=0;l--){const e=g+l,i=t[e],p=e+1<d?t[e+1].el:o;0===T[l]?I(null,i,n,p,a,s,r,c,u):M&&(m<0||l!==S[m]?K(i,n,p,2):m--)}}},K=(e,t,o,i,a=null)=>{const{el:s,type:r,transition:c,children:u,shapeFlag:l}=e;if(6&l)return void K(e.component.subTree,t,o,i);if(128&l)return void e.suspense.move(t,o,i);if(64&l)return void r.move(e,t,o,ee);if(r===Xs){n(s,t,o);for(let e=0;e<u.length;e++)K(u[e],t,o,i);return void n(e.anchor,t,o)}if(r===Qs)return void(({el:e,anchor:t},o,i)=>{let a;for(;e&&e!==t;)a=m(e),n(e,o,i),e=a;n(t,o,i)})(e,t,o);if(2!==i&&1&l&&c)if(0===i)c.beforeEnter(s),n(s,t,o),Ps((()=>c.enter(s)),a);else{const{leave:e,delayLeave:i,afterLeave:a}=c,r=()=>n(s,t,o),u=()=>{e(s,(()=>{r(),a&&a()}))};i?i(s,r,u):u()}else n(s,t,o)},$=(e,t,n,o=!1,i=!1)=>{const{type:a,props:s,ref:r,children:c,dynamicChildren:u,shapeFlag:l,patchFlag:d,dirs:p}=e;if(null!=r&&bs(r,null,n,e,!0),256&l)return void t.ctx.deactivate(e);const h=1&l&&p,f=!Ji(e);let g;if(f&&(g=s&&s.onVnodeBeforeUnmount)&&Dr(g,t,e),6&l)Y(e.component,n,o);else{if(128&l)return void e.suspense.unmount(n,o);h&&Ui(e,null,t,"beforeUnmount"),64&l?e.type.remove(e,t,n,i,ee,o):u&&(a!==Xs||d>0&&64&d)?X(u,t,n,!1,!0):(a===Xs&&384&d||!i&&16&l)&&X(c,t,n),o&&z(e)}(f&&(g=s&&s.onVnodeUnmounted)||h)&&Ps((()=>{g&&Dr(g,t,e),h&&Ui(e,null,t,"unmounted")}),n)},z=e=>{const{type:t,el:n,anchor:o,transition:i}=e;if(t===Xs)return void W(n,o);if(t===Qs)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),s(e),e=n;s(t)})(e);const a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:o}=i,s=()=>t(n,a);o?o(e.el,a,s):s()}else a()},W=(e,t)=>{let n;for(;e!==t;)n=m(e),s(e),e=n;s(t)},Y=(e,t,n)=>{const{bum:o,scope:i,update:a,subTree:s,um:r}=e;o&&N(o),i.stop(),a&&(a.active=!1,$(s,e,t,n)),r&&Ps(r,t),Ps((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,o=!1,i=!1,a=0)=>{for(let s=a;s<e.length;s++)$(e[s],t,n,o,i)},J=e=>6&e.shapeFlag?J(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Z=!1;const Q=(e,t,n)=>{null==e?t._vnode&&$(t._vnode,null,null,!0):I(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,Vo(),Bo(),Z=!1),t._vnode=e},ee={p:I,um:$,m:K,r:z,mt:U,mc:L,pc:B,pbc:O,n:J,o:e};let te,ne;return t&&([te,ne]=t(ee)),{render:Q,hydrate:te,createApp:ps(Q,te)}}function xs({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Fs({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function qs(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vs(e,t,n=!1){const o=e.children,i=t.children;if(h(o)&&h(i))for(let a=0;a<o.length;a++){const e=o[a];let t=i[a];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=i[a]=Tr(i[a]),t.el=e.el),n||Vs(e,t)),t.type===Js&&(t.el=e.el)}}function Bs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Bs(t)}const Hs=e=>e&&(e.disabled||""===e.disabled),js=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Ks=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,$s=(e,t)=>{const n=e&&e.to;if(v(n)){if(t){return t(n)}return null}return n};function zs(e,t,n,{o:{insert:o},m:i},a=2){0===a&&o(e.targetAnchor,t,n);const{el:s,anchor:r,shapeFlag:c,children:u,props:l}=e,d=2===a;if(d&&o(s,t,n),(!d||Hs(l))&&16&c)for(let p=0;p<u.length;p++)i(u[p],t,n,2);d&&o(r,t,n)}const Ws={name:"Teleport",__isTeleport:!0,process(e,t,n,o,i,a,s,r,c,u){const{mc:l,pc:d,pbc:p,o:{insert:h,querySelector:f,createText:g,createComment:_}}=u,m=Hs(t.props);let{shapeFlag:v,children:y,dynamicChildren:I}=t;if(null==e){const e=t.el=g(""),u=t.anchor=g("");h(e,n,o),h(u,n,o);const d=t.target=$s(t.props,f),p=t.targetAnchor=g("");d&&(h(p,d),"svg"===s||js(d)?s="svg":("mathml"===s||Ks(d))&&(s="mathml"));const _=(e,t)=>{16&v&&l(y,e,t,i,a,s,r,c)};m?_(n,u):d&&_(d,p)}else{t.el=e.el;const o=t.anchor=e.anchor,l=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Hs(e.props),_=g?n:l,v=g?o:h;if("svg"===s||js(l)?s="svg":("mathml"===s||Ks(l))&&(s="mathml"),I?(p(e.dynamicChildren,I,_,i,a,s,r),Vs(e,t,!0)):c||d(e,t,_,v,i,a,s,r,!1),m)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):zs(t,n,o,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=$s(t.props,f);e&&zs(t,e,null,u,0)}else g&&zs(t,l,h,u,1)}Ys(t)},remove(e,t,n,o,{um:i,o:{remove:a}},s){const{shapeFlag:r,children:c,anchor:u,targetAnchor:l,target:d,props:p}=e;if(d&&a(l),s&&a(u),16&r){const e=s||!Hs(p);for(let o=0;o<c.length;o++){const a=c[o];i(a,t,n,e,!!a.dynamicChildren)}}},move:zs,hydrate:function(e,t,n,o,i,a,{o:{nextSibling:s,parentNode:r,querySelector:c}},u){const l=t.target=$s(t.props,c);if(l){const c=l._lpa||l.firstChild;if(16&t.shapeFlag)if(Hs(t.props))t.anchor=u(s(e),t,r(e),n,o,i,a),t.targetAnchor=c;else{t.anchor=s(e);let r=c;for(;r;)if(r=s(r),r&&8===r.nodeType&&"teleport anchor"===r.data){t.targetAnchor=r,l._lpa=t.targetAnchor&&s(t.targetAnchor);break}u(c,t,l,n,o,i,a)}Ys(t)}return t.anchor&&s(t.anchor)}};function Ys(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Xs=Symbol.for("v-fgt"),Js=Symbol.for("v-txt"),Zs=Symbol.for("v-cmt"),Qs=Symbol.for("v-stc"),er=[];let tr=null;function nr(e=!1){er.push(tr=e?null:[])}function or(){er.pop(),tr=er[er.length-1]||null}let ir=1;function ar(e){ir+=e}function sr(e){return e.dynamicChildren=ir>0?tr||i:null,or(),ir>0&&tr&&tr.push(e),e}function rr(e,t,n,o,i,a){return sr(gr(e,t,n,o,i,a,!0))}function cr(e,t,n,o,i){return sr(_r(e,t,n,o,i,!0))}function ur(e){return!!e&&!0===e.__v_isVNode}function lr(e,t){return e.type===t.type&&e.key===t.key}function dr(e){}const pr="__vInternal",hr=({key:e})=>null!=e?e:null,fr=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||no(e)||m(e)?{i:Zo,r:e,k:t,f:!!n}:e:null);function gr(e,t=null,n=null,o=0,i=null,a=(e===Xs?0:1),s=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&hr(t),ref:t&&fr(t),scopeId:Qo,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Zo};return r?(Sr(c,n),128&a&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),ir>0&&!s&&tr&&(c.patchFlag>0||6&a)&&32!==c.patchFlag&&tr.push(c),c}const _r=function(e,t=null,n=null,o=0,i=null,a=!1){e&&e!==pi||(e=Zs);if(ur(e)){const o=vr(e,t,!0);return n&&Sr(o,n),ir>0&&!a&&tr&&(6&o.shapeFlag?tr[tr.indexOf(e)]=o:tr.push(o)),o.patchFlag|=-2,o}s=e,m(s)&&"__vccOpts"in s&&(e=e.__vccOpts);var s;if(t){t=mr(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=et(e)),I(n)&&(Wn(n)&&!h(n)&&(n=u({},n)),t.style=Qe(n))}const r=v(e)?1:mi(e)?128:(e=>e.__isTeleport)(e)?64:I(e)?4:m(e)?2:0;return gr(e,t,n,o,i,r,a,!0)};function mr(e){return e?Wn(e)||pr in e?u({},e):e:null}function vr(e,t,n=!1){const{props:o,ref:i,patchFlag:a,children:s}=e,r=t?Er(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:r,key:r&&hr(r),ref:t&&t.ref?n&&i?h(i)?i.concat(fr(t)):[i,fr(t)]:fr(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Xs?-1===a?16:16|a:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vr(e.ssContent),ssFallback:e.ssFallback&&vr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function yr(e=" ",t=0){return _r(Js,null,e,t)}function Ir(e,t){const n=_r(Qs,null,e);return n.staticCount=t,n}function Mr(e="",t=!1){return t?(nr(),cr(Zs,null,e)):_r(Zs,null,e)}function Cr(e){return null==e||"boolean"==typeof e?_r(Zs):h(e)?_r(Xs,null,e.slice()):"object"==typeof e?Tr(e):_r(Js,null,String(e))}function Tr(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:vr(e)}function Sr(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(h(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Sr(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||pr in t?3===o&&Zo&&(1===Zo.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Zo}}else m(t)?(t={default:t,_ctx:Zo},n=32):(t=String(t),64&o?(n=16,t=[yr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Er(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=et([t.class,o.class]));else if("style"===e)t.style=Qe([t.style,o.style]);else if(r(e)){const n=t[e],i=o[e];!i||n===i||h(n)&&n.includes(i)||(t[e]=n?[].concat(n,i):i)}else""!==e&&(t[e]=o[e])}return t}function Dr(e,t,n,o=null){Do(e,t,7,[n,o])}const kr=ls();let Lr=0;function br(e,t,n){const i=e.type,a=(t?t.appContext:e.appContext)||kr,s={uid:Lr++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new kt(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ys(i,a),emitsOptions:Xo(i,a),emit:null,emitted:null,propsDefaults:o,inheritAttrs:i.inheritAttrs,ctx:o,data:o,props:o,attrs:o,slots:o,refs:o,setupState:o,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,bda:null,da:null,ba:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=Wo.bind(null,s),s.$pageInstance=t&&t.$pageInstance,e.ce&&e.ce(s),s}let Ar=null;const Rr=()=>Ar||Zo;let Or,wr;{const e=q(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};Or=t("__VUE_INSTANCE_SETTERS__",(e=>Ar=e)),wr=t("__VUE_SSR_SETTERS__",(e=>Fr=e))}const Pr=e=>{const t=Ar;return Or(e),e.scope.on(),()=>{e.scope.off(),Or(t)}},Nr=()=>{Ar&&Ar.scope.off(),Or(null)};function Gr(e){return 4&e.vnode.shapeFlag}let Ur,xr,Fr=!1;function qr(e,t=!1){t&&wr(t);const{props:n,children:o}=e.vnode,i=Gr(e);!function(e,t,n,o=!1){const i={},a={};G(a,pr,1),e.propsDefaults=Object.create(null),ms(e,t,i,a);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:Vn(i):e.type.props?e.props=i:e.props=a,e.attrs=a}(e,n,i,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Yn(t),G(t,"_",n)):ks(t,e.slots={})}else e.slots={},t&&Ls(e,t);G(e.slots,pr,1)})(e,o);const a=i?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Xn(new Proxy(e.ctx,Na));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Kr(e):null,i=Pr(e);Vt();const a=Eo(o,e,0,[e.props,n]);if(Bt(),i(),M(a)){if(a.then(Nr,Nr),t)return a.then((n=>{Vr(e,n,t)})).catch((t=>{ko(t,e,0)}));e.asyncDep=a}else Vr(e,a,t)}else jr(e,t)}(e,t):void 0;return t&&wr(!1),a}function Vr(e,t,n){m(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:I(t)&&(e.setupState=po(t)),jr(e,n)}function Br(e){Ur=e,xr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Ga))}}const Hr=()=>!Ur;function jr(e,t,n){const o=e.type;if(!e.render){if(!t&&Ur&&!o.render){const t=o.template||ns(e).template;if(t){const{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:s}=o,r=u(u({isCustomElement:n,delimiters:a},i),s);o.render=Ur(t,r)}}e.render=o.render||a,xr&&xr(e)}{const t=Pr(e);Vt();try{Qa(e)}finally{Bt(),t()}}}function Kr(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Zt(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function $r(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(po(Xn(e.exposed)),{get:(t,n)=>n in t?t[n]:n in wa?wa[n](e):void 0,has:(e,t)=>t in e||t in wa}))}function zr(e,t=!0){return m(e)?e.displayName||e.name:e.name||t&&e.__name}const Wr=(e,t)=>{const n=function(e,t,n=!1){let o,i;const s=m(e);return s?(o=e,i=a):(o=e.get,i=e.set),new Qn(o,i,s||!i,n)}(e,0,Fr);return n};function Yr(e,t,n=o){const i=Rr(),a=b(t),s=R(t),r=fo(((o,r)=>{let c;return bi((()=>{const n=e[t];P(c,n)&&(c=n,r())})),{get:()=>(o(),n.get?n.get(c):c),set(e){const o=i.vnode.props;o&&(t in o||a in o||s in o)&&(`onUpdate:${t}`in o||`onUpdate:${a}`in o||`onUpdate:${s}`in o)||!P(e,c)||(c=e,r()),i.emit(`update:${t}`,n.set?n.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return r[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:r,done:!1}:{done:!0}}},r}function Xr(e,t,n){const o=arguments.length;return 2===o?I(t)&&!h(t)?ur(t)?_r(e,null,[t]):_r(e,t):_r(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&ur(n)&&(n=[n]),_r(e,t,n))}function Jr(){}function Zr(e,t,n,o){const i=n[o];if(i&&Qr(i,e))return i;const a=t();return a.memo=e.slice(),n[o]=a}function Qr(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(P(n[o],t[o]))return!1;return ir>0&&tr&&tr.push(e),!0}const ec="3.4.21",tc=a,nc=So,oc=$o,ic=function e(t,n){var o,i;if($o=t,$o)$o.enabled=!0,zo.forEach((({event:e,args:t})=>$o.emit(e,...t))),zo=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null==(i=null==(o=window.navigator)?void 0:o.userAgent)?void 0:i.includes("jsdom"))){(n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((t=>{e(t,n)})),setTimeout((()=>{$o||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,zo=[])}),3e3)}else zo=[]},ac={createComponentInstance:br,setupComponent:qr,renderComponentRoot:ai,setCurrentRenderingInstance:ei,isVNode:ur,normalizeVNode:Cr},sc=null,rc=null,cc=null,uc="undefined"!=typeof document?document:null,lc=uc&&uc.createElement("template"),dc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i="svg"===t?uc.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?uc.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?uc.createElement(e,{is:n}):uc.createElement(e);return"select"===e&&o&&null!=o.multiple&&i.setAttribute("multiple",o.multiple),i},createText:e=>uc.createTextNode(e),createComment:e=>uc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>uc.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,a){const s=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{lc.innerHTML="svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e;const i=lc.content;if("svg"===o||"mathml"===o){const e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pc="transition",hc="animation",fc=Symbol("_vtc"),gc=(e,{slots:t})=>Xr(Hi,Ic(e),t);gc.displayName="Transition";const _c={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},mc=gc.props=u({},Bi,_c),vc=(e,t=[])=>{h(e)?e.forEach((e=>e(...t))):e&&e(...t)},yc=e=>!!e&&(h(e)?e.some((e=>e.length>1)):e.length>1);function Ic(e){const t={};for(const u in e)u in _c||(t[u]=e[u]);if(!1===e.css)return t;const{name:n="v",type:o,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=s,appearToClass:d=r,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,g=function(e){if(null==e)return null;if(I(e))return[Mc(e.enter),Mc(e.leave)];{const t=Mc(e);return[t,t]}}(i),_=g&&g[0],m=g&&g[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:M,onLeave:C,onLeaveCancelled:T,onBeforeAppear:S=v,onAppear:E=y,onAppearCancelled:D=M}=t,k=(e,t,n)=>{Tc(e,t?d:r),Tc(e,t?l:s),n&&n()},L=(e,t)=>{e._isLeaving=!1,Tc(e,p),Tc(e,f),Tc(e,h),t&&t()},b=e=>(t,n)=>{const i=e?E:y,s=()=>k(t,e,n);vc(i,[t,s]),Sc((()=>{Tc(t,e?c:a),Cc(t,e?d:r),yc(i)||Dc(t,o,_,s)}))};return u(t,{onBeforeEnter(e){vc(v,[e]),Cc(e,a),Cc(e,s)},onBeforeAppear(e){vc(S,[e]),Cc(e,c),Cc(e,l)},onEnter:b(!1),onAppear:b(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>L(e,t);Cc(e,p),Ac(),Cc(e,h),Sc((()=>{e._isLeaving&&(Tc(e,p),Cc(e,f),yc(C)||Dc(e,o,m,n))})),vc(C,[e,n])},onEnterCancelled(e){k(e,!1),vc(M,[e])},onAppearCancelled(e){k(e,!0),vc(D,[e])},onLeaveCancelled(e){L(e),vc(T,[e])}})}function Mc(e){return x(e)}function Cc(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[fc]||(e[fc]=new Set)).add(t)}function Tc(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[fc];n&&(n.delete(t),n.size||(e[fc]=void 0))}function Sc(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Ec=0;function Dc(e,t,n,o){const i=e._endId=++Ec,a=()=>{i===e._endId&&o()};if(n)return setTimeout(a,n);const{type:s,timeout:r,propCount:c}=kc(e,t);if(!s)return o();const u=s+"end";let l=0;const d=()=>{e.removeEventListener(u,p),a()},p=t=>{t.target===e&&++l>=c&&d()};setTimeout((()=>{l<c&&d()}),r+1),e.addEventListener(u,p)}function kc(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),i=o(`${pc}Delay`),a=o(`${pc}Duration`),s=Lc(i,a),r=o(`${hc}Delay`),c=o(`${hc}Duration`),u=Lc(r,c);let l=null,d=0,p=0;t===pc?s>0&&(l=pc,d=s,p=a.length):t===hc?u>0&&(l=hc,d=u,p=c.length):(d=Math.max(s,u),l=d>0?s>u?pc:hc:null,p=l?l===pc?a.length:c.length:0);return{type:l,timeout:d,propCount:p,hasTransform:l===pc&&/\b(transform|all)(,|$)/.test(o(`${pc}Property`).toString())}}function Lc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>bc(t)+bc(e[n]))))}function bc(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Ac(){return document.body.offsetHeight}const Rc=Symbol("_vod"),Oc=Symbol("_vsh"),wc={beforeMount(e,{value:t},{transition:n}){e[Rc]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Pc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Pc(e,!0),o.enter(e)):o.leave(e,(()=>{Pc(e,!1)})):Pc(e,t))},beforeUnmount(e,{value:t}){Pc(e,t)}};function Pc(e,t){e.style.display=t?e[Rc]:"none",e[Oc]=!t}const Nc=Symbol("");function Gc(e){const t=Rr();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>xc(e,n)))},o=()=>{const o=e(t.proxy);Uc(t.subTree,o),n(o)};Li(o),va((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),Ca((()=>e.disconnect()))}))}function Uc(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Uc(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)xc(e.el,t);else if(e.type===Xs)e.children.forEach((e=>Uc(e,t)));else if(e.type===Qs){let{el:n,anchor:o}=e;for(;n&&(xc(n,t),n!==o);)n=n.nextSibling}}function xc(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t){const i=Jc(t[e]);n.setProperty(`--${e}`,i),o+=`--${e}: ${i};`}n[Nc]=o}}const Fc=/(^|;)\s*display\s*:/;const qc=/\s*!important$/;function Vc(e,t,n){if(h(n))n.forEach((n=>Vc(e,t,n)));else if(null==n&&(n=""),n=Jc(n),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Hc[t];if(n)return n;let o=b(t);if("filter"!==o&&o in e)return Hc[t]=o;o=O(o);for(let i=0;i<Bc.length;i++){const n=Bc[i]+o;if(n in e)return Hc[t]=n}return t}(e,t);qc.test(n)?e.setProperty(R(o),n.replace(qc,""),"important"):e[o]=n}}const Bc=["Webkit","Moz","ms"],Hc={};const{unit:jc,unitRatio:Kc,unitPrecision:$c}={unit:"rem",unitRatio:10/320,unitPrecision:5},zc=(Wc=jc,Yc=Kc,Xc=$c,e=>e.replace(st,((e,t)=>{if(!t)return e;if(1===Yc)return`${t}${Wc}`;const n=function(e,t){const n=Math.pow(10,t+1),o=Math.floor(e*n);return 10*Math.round(o/10)/n}(parseFloat(t)*Yc,Xc);return 0===n?"0":`${n}${Wc}`})));var Wc,Yc,Xc;const Jc=e=>v(e)?zc(e):e,Zc="http://www.w3.org/1999/xlink";function Qc(e,t,n,o){e.addEventListener(t,n,o)}const eu=Symbol("_vei");function tu(e,t,n,o,i=null){const a=e[eu]||(e[eu]={}),s=a[t];if(o&&s)s.value=o;else{const[n,r]=function(e){let t;if(nu.test(e)){let n;for(t={};n=e.match(nu);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):R(e.slice(2));return[n,t]}(t);if(o){const s=a[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();const o=t&&t.proxy,i=o&&o.$nne,{value:a}=n;if(i&&h(a)){const n=su(e,a);for(let o=0;o<n.length;o++){const a=n[o];Do(a,t,5,a.__wwe?[e]:i(e))}}else Do(su(e,n.value),t,5,i&&!a.__wwe?i(e,a,t):[e])};return n.value=e,n.attached=au(),n}(o,i);Qc(e,n,s,r)}else s&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,s,r),a[t]=void 0)}}const nu=/(?:Once|Passive|Capture)$/;let ou=0;const iu=Promise.resolve(),au=()=>ou||(iu.then((()=>ou=0)),ou=Date.now());function su(e,t){if(h(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>{const t=t=>!t._stopped&&e&&e(t);return t.__wwe=e.__wwe,t}))}return t}const ru=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;
|
||
/*! #__NO_SIDE_EFFECTS__ */
|
||
function cu(e,t){const n=Xi(e);class o extends du{constructor(e){super(n,e,t)}}return o.def=n,o}
|
||
/*! #__NO_SIDE_EFFECTS__ */const uu=e=>cu(e,Wu),lu="undefined"!=typeof HTMLElement?HTMLElement:class{};class du extends lu{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),Uo((()=>{this._connected||(zu(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let i;if(n&&!h(n))for(const a in n){const e=n[a];(e===Number||e&&e.type===Number)&&(a in this._props&&(this._props[a]=x(this._props[a])),(i||(i=Object.create(null)))[b(a)]=!0)}this._numberProps=i,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=h(t)?t:Object.keys(t||{});for(const o of Object.keys(this))"_"!==o[0]&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(b))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(e){this._setProp(o,e)}})}_setAttr(e){let t=this.hasAttribute(e)?this.getAttribute(e):void 0;const n=b(e);this._numberProps&&this._numberProps[n]&&(t=x(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(R(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(R(e),t+""):t||this.removeAttribute(R(e))))}_update(){zu(this._createVNode(),this.shadowRoot)}_createVNode(){const e=_r(this._def,u({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),R(e)!==e&&t(R(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof du){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function pu(e="$style"){{const t=Rr();if(!t)return o;const n=t.type.__cssModules;if(!n)return o;const i=n[e];return i||o}}const hu=new WeakMap,fu=new WeakMap,gu=Symbol("_moveCb"),_u=Symbol("_enterCb"),mu={name:"TransitionGroup",props:u({},mc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Rr(),o=qi();let i,a;return Ia((()=>{if(!i.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),i=e[fc];i&&i.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const a=1===t.nodeType?t:t.parentNode;a.appendChild(o);const{hasTransform:s}=kc(o);return a.removeChild(o),s}(i[0].el,n.vnode.el,t))return;i.forEach(yu),i.forEach(Iu);const o=i.filter(Mu);Ac(),o.forEach((e=>{const n=e.el,o=n.style;Cc(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const i=n[gu]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",i),n[gu]=null,Tc(n,t))};n.addEventListener("transitionend",i)}))})),()=>{const s=Yn(e),r=Ic(s);let c=s.tag||Xs;i=a,a=t.default?Yi(t.default()):[];for(let e=0;e<a.length;e++){const t=a[e];null!=t.key&&Wi(t,Ki(t,r,o,n))}if(i)for(let e=0;e<i.length;e++){const t=i[e];Wi(t,Ki(t,r,o,n)),hu.set(t,t.el.getBoundingClientRect())}return _r(c,null,a)}}},vu=mu;function yu(e){const t=e.el;t[gu]&&t[gu](),t[_u]&&t[_u]()}function Iu(e){fu.set(e,e.el.getBoundingClientRect())}function Mu(e){const t=hu.get(e),n=fu.get(e),o=t.left-n.left,i=t.top-n.top;if(o||i){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${i}px)`,t.transitionDuration="0s",e}}const Cu=e=>{const t=e.props["onUpdate:modelValue"]||!1;return h(t)?e=>N(t,e):t};function Tu(e){e.target.composing=!0}function Su(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Eu=Symbol("_assign"),Du={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[Eu]=Cu(i);const a=o||i.props&&"number"===i.props.type;Qc(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),a&&(o=U(o)),e[Eu](o)})),n&&Qc(e,"change",(()=>{e.value=e.value.trim()})),t||(Qc(e,"compositionstart",Tu),Qc(e,"compositionend",Su),Qc(e,"change",Su))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:i}},a){if(e[Eu]=Cu(a),e.composing)return;const s=null==t?"":t;if((i||"number"===e.type?U(e.value):e.value)!==s){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===s)return}e.value=s}}},ku={deep:!0,created(e,t,n){e[Eu]=Cu(n),Qc(e,"change",(()=>{const t=e._modelValue,n=Ou(e),o=e.checked,i=e[Eu];if(h(t)){const e=J(t,n),a=-1!==e;if(o&&!a)i(t.concat(n));else if(!o&&a){const n=[...t];n.splice(e,1),i(n)}}else if(g(t)){const e=new Set(t);o?e.add(n):e.delete(n),i(e)}else i(wu(e,o))}))},mounted:Lu,beforeUpdate(e,t,n){e[Eu]=Cu(n),Lu(e,t,n)}};function Lu(e,{value:t,oldValue:n},o){e._modelValue=t,h(t)?e.checked=J(t,o.props.value)>-1:g(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=X(t,wu(e,!0)))}const bu={created(e,{value:t},n){e.checked=X(t,n.props.value),e[Eu]=Cu(n),Qc(e,"change",(()=>{e[Eu](Ou(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Eu]=Cu(o),t!==n&&(e.checked=X(t,o.props.value))}},Au={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const i=g(t);Qc(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?U(Ou(e)):Ou(e)));e[Eu](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,Uo((()=>{e._assigning=!1}))})),e[Eu]=Cu(o)},mounted(e,{value:t,modifiers:{number:n}}){Ru(e,t,n)},beforeUpdate(e,t,n){e[Eu]=Cu(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Ru(e,t,n)}};function Ru(e,t,n){const o=e.multiple,i=h(t);if(!o||i||g(t)){for(let a=0,s=e.options.length;a<s;a++){const s=e.options[a],r=Ou(s);if(o)if(i){const e=typeof r;s.selected="string"===e||"number"===e?t.includes(n?U(r):r):J(t,r)>-1}else s.selected=t.has(r);else if(X(Ou(s),t))return void(e.selectedIndex!==a&&(e.selectedIndex=a))}o||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Ou(e){return"_value"in e?e._value:e.value}function wu(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Pu={created(e,t,n){Gu(e,t,n,null,"created")},mounted(e,t,n){Gu(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Gu(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Gu(e,t,n,o,"updated")}};function Nu(e,t){switch(e){case"SELECT":return Au;case"TEXTAREA":return Du;default:switch(t){case"checkbox":return ku;case"radio":return bu;default:return Du}}}function Gu(e,t,n,o,i){const a=Nu(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,o)}const Uu=["ctrl","shift","alt","meta"],xu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Uu.some((n=>e[`${n}Key`]&&!t.includes(n)))},Fu=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e<t.length;e++){const o=xu[t[e]];if(o&&o(n,t))return}return e(n,...o)})},qu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Vu=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=R(n.key);return t.some((e=>e===o||qu[e]===o))?e(n):void 0})},Bu=u({patchProp:(e,t,n,o,i,a,s,u,l)=>{if(0===t.indexOf("change:"))return function(e,t,n,o=null){if(!n||!o)return;const i=t.replace("change:",""),{attrs:a}=o,s=a[i],r=(e.__wxsProps||(e.__wxsProps={}))[i];if(r===s)return;e.__wxsProps[i]=s;const c=o.proxy;Uo((()=>{n(s,r,c.$gcd(c,!0),c.$gcd(c,!1))}))}(e,t,o,s);const d="svg"===i;"class"===t?function(e,t,n){const{__wxsAddClass:o,__wxsRemoveClass:i}=e;i&&i.length&&(t=(t||"").split(/\s+/).filter((e=>-1===i.indexOf(e))).join(" "),i.length=0),o&&o.length&&(t=(t||"")+" "+o.join(" "));const a=e[fc];a&&(t=(t?[t,...a]:[...a]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,d):"style"===t?function(e,t,n){const o=e.style,i=v(n);let a=!1;if(n&&!i){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Vc(o,t,"")}else for(const e in t)null==n[e]&&Vc(o,e,"");for(const e in n)"display"===e&&(a=!0),Vc(o,e,n[e])}else if(i){if(t!==n){const e=o[Nc];e&&(n+=";"+e),o.cssText=n,a=Fc.test(n)}}else t&&e.removeAttribute("style");Rc in e&&(e[Rc]=a?o.display:"",e[Oc]&&(o.display="none"));const{__wxsStyle:s}=e;if(s)for(const r in s)Vc(o,r,s[r])}(e,n,o):r(t)?c(t)||tu(e,t,0,o,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&ru(t)&&m(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(ru(t)&&v(n))return!1;return t in e}(e,t,o,d))?function(e,t,n,o,i,a,s){if("innerHTML"===t||"textContent"===t)return o&&s(o,i,a),void(e[t]=null==n?"":n);const r=e.tagName;if("value"===t&&"PROGRESS"!==r&&!r.includes("-")){const o=null==n?"":n;return("OPTION"===r?e.getAttribute("value")||"":e.value)===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=Y(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(Hw){}c&&e.removeAttribute(t)}(e,t,o,a,s,u,l):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(Zc,t.slice(6,t.length)):e.setAttributeNS(Zc,t,n);else{const o=W(t);null==n||o&&!Y(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,d))},forcePatchProp:(e,t)=>0===t.indexOf("change:")||("class"===t&&e.__wxsClassChanged?(e.__wxsClassChanged=!1,!0):!("style"!==t||!e.__wxsStyleChanged)&&(e.__wxsStyleChanged=!1,!0))},dc);let Hu,ju=!1;function Ku(){return Hu||(Hu=Ns(Bu))}function $u(){return Hu=ju?Hu:Gs(Bu),ju=!0,Hu}const zu=(...e)=>{Ku().render(...e)},Wu=(...e)=>{$u().hydrate(...e)},Yu=(...e)=>{const t=Ku().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Zu(e);if(!o)return;const i=t._component;m(i)||i.render||i.template||(i.template=o.innerHTML),o.innerHTML="";const a=n(o,!1,Ju(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t},Xu=(...e)=>{const t=$u().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Zu(e);if(t)return n(t,!0,Ju(t))},t};function Ju(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Zu(e){if(v(e)){return document.querySelector(e)}return e}let Qu=!1;const el=()=>{Qu||(Qu=!0,Du.getSSRProps=({value:e})=>({value:e}),bu.getSSRProps=({value:e},t)=>{if(t.props&&X(t.props.value,e))return{checked:!0}},ku.getSSRProps=({value:e},t)=>{if(h(e)){if(t.props&&J(e,t.props.value)>-1)return{checked:!0}}else if(g(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Pu.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Nu(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},wc.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},tl=()=>{},nl=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Hi,BaseTransitionPropsValidators:Bi,Comment:Zs,DeprecationTypes:null,EffectScope:kt,ErrorCodes:To,ErrorTypeStrings:nc,Fragment:Xs,KeepAlive:oa,ReactiveEffect:Ot,Static:Qs,Suspense:yi,Teleport:Ws,Text:Js,TrackOpTypes:Io,Transition:gc,TransitionGroup:vu,TriggerOpTypes:Mo,VueElement:du,assertNumber:Co,callWithAsyncErrorHandling:Do,callWithErrorHandling:Eo,camelize:b,capitalize:O,cloneVNode:vr,compatUtils:null,compile:tl,computed:Wr,createApp:Yu,createBlock:cr,createCommentVNode:Mr,createElementBlock:rr,createElementVNode:gr,createHydrationRenderer:Gs,createPropsRestProxy:Xa,createRenderer:Ns,createSSRApp:Xu,createSlots:La,createStaticVNode:Ir,createTextVNode:yr,createVNode:_r,createVueApp:Yu,customRef:fo,defineAsyncComponent:Zi,defineComponent:Xi,defineCustomElement:cu,defineEmits:xa,defineExpose:Fa,defineModel:Ba,defineOptions:qa,defineProps:Ua,defineSSRCustomElement:uu,defineSlots:Va,devtools:oc,effect:Gt,effectScope:Lt,getCurrentInstance:Rr,getCurrentScope:At,getTransitionRawChildren:Yi,guardReactiveProps:mr,h:Xr,handleError:ko,hasInjectionContext:_s,hydrate:Wu,initCustomFormatter:Jr,initDirectivesForSSR:el,inject:gs,injectHook:ga,get isInSSRComponentSetup(){return Fr},isMemoSame:Qr,isProxy:Wn,isReactive:Kn,isReadonly:$n,isRef:no,isRuntimeOnly:Hr,isShallow:zn,isVNode:ur,markRaw:Xn,mergeDefaults:Wa,mergeModels:Ya,mergeProps:Er,nextTick:Uo,normalizeClass:et,normalizeProps:nt,normalizeStyle:Qe,onActivated:sa,onBeforeActivate:aa,onBeforeDeactivate:ra,onBeforeMount:ma,onBeforeUnmount:Ma,onBeforeUpdate:ya,onDeactivated:ca,onErrorCaptured:Da,onMounted:va,onRenderTracked:Ea,onRenderTriggered:Sa,onScopeDispose:Rt,onServerPrefetch:Ta,onUnmounted:Ca,onUpdated:Ia,openBlock:nr,popScopeId:ni,provide:fs,proxyRefs:po,pushScopeId:ti,queuePostFlushCb:qo,reactive:qn,readonly:Bn,ref:oo,registerRuntimeCompiler:Br,render:zu,renderList:ka,renderSlot:ba,resolveComponent:di,resolveDirective:fi,resolveDynamicComponent:hi,resolveFilter:null,resolveTransitionHooks:Ki,setBlockTracking:ar,setDevtoolsHook:ic,setTransitionHooks:Wi,shallowReactive:Vn,shallowReadonly:Hn,shallowRef:io,ssrContextKey:Ei,ssrUtils:ac,stop:Ut,toDisplayString:Z,toHandlerKey:w,toHandlers:Ra,toRaw:Yn,toRef:vo,toRefs:go,toValue:uo,transformVNodeArgs:dr,triggerRef:ro,unref:co,useAttrs:Ka,useCssModule:pu,useCssVars:Gc,useModel:Yr,useSSRContext:Di,useSlots:ja,useTransitionState:qi,vModelCheckbox:ku,vModelDynamic:Pu,vModelRadio:bu,vModelSelect:Au,vModelText:Du,vShow:wc,version:ec,warn:tc,watch:Ri,watchEffect:ki,watchPostEffect:Li,watchSyncEffect:bi,withAsyncContext:Ja,withCtx:ii,withDefaults:Ha,withDirectives:Gi,withKeys:Vu,withMemo:Zr,withModifiers:Fu,withScopeId:oi},Symbol.toStringTag,{value:"Module"})),ol="undefined"!=typeof document;const il=Object.assign;function al(e,t){const n={};for(const o in t){const i=t[o];n[o]=rl(i)?i.map(e):e(i)}return n}const sl=()=>{},rl=Array.isArray,cl=/#/g,ul=/&/g,ll=/\//g,dl=/=/g,pl=/\?/g,hl=/\+/g,fl=/%5B/g,gl=/%5D/g,_l=/%5E/g,ml=/%60/g,vl=/%7B/g,yl=/%7C/g,Il=/%7D/g,Ml=/%20/g;function Cl(e){return encodeURI(""+e).replace(yl,"|").replace(fl,"[").replace(gl,"]")}function Tl(e){return Cl(e).replace(hl,"%2B").replace(Ml,"+").replace(cl,"%23").replace(ul,"%26").replace(ml,"`").replace(vl,"{").replace(Il,"}").replace(_l,"^")}function Sl(e){return null==e?"":function(e){return Cl(e).replace(cl,"%23").replace(pl,"%3F")}(e).replace(ll,"%2F")}function El(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const Dl=/\/$/;function kl(e,t,n="/"){let o,i={},a="",s="";const r=t.indexOf("#");let c=t.indexOf("?");return r<c&&r>=0&&(c=-1),c>-1&&(o=t.slice(0,c),a=t.slice(c+1,r>-1?r:t.length),i=e(a)),r>-1&&(o=o||t.slice(0,r),s=t.slice(r,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),i=o[o.length-1];".."!==i&&"."!==i||o.push("");let a,s,r=n.length-1;for(a=0;a<o.length;a++)if(s=o[a],"."!==s){if(".."!==s)break;r>1&&r--}return n.slice(0,r).join("/")+"/"+o.slice(a).join("/")}(null!=o?o:t,n),{fullPath:o+(a&&"?")+a+s,path:o,query:i,hash:El(s)}}function Ll(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function bl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Al(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Rl(e[n],t[n]))return!1;return!0}function Rl(e,t){return rl(e)?Ol(e,t):rl(t)?Ol(t,e):e===t}function Ol(e,t){return rl(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}var wl,Pl,Nl,Gl;function Ul(e){if(!e)if(ol){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(Dl,"")}(Pl=wl||(wl={})).pop="pop",Pl.push="push",(Gl=Nl||(Nl={})).back="back",Gl.forward="forward",Gl.unknown="";const xl=/^[^#]+#/;function Fl(e,t){return e.replace(xl,"#")+t}const ql=()=>({left:window.scrollX,top:window.scrollY});function Vl(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),i="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}function Bl(e,t){return(history.state?history.state.position-t:-1)+e}const Hl=new Map;function jl(e,t){const{pathname:n,search:o,hash:i}=t,a=e.indexOf("#");if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return"/"!==n[0]&&(n="/"+n),Ll(n,"")}return Ll(n,e)+o+i}function Kl(e,t,n,o=!1,i=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:i?ql():null}}function $l(e){const{history:t,location:n}=window,o={value:jl(e,n)},i={value:t.state};function a(o,a,s){const r=e.indexOf("#"),c=r>-1?(n.host&&document.querySelector("base")?e:e.slice(r))+o:location.protocol+"//"+location.host+e+o;try{t[s?"replaceState":"pushState"](a,"",c),i.value=a}catch(u){console.error(u),n[s?"replace":"assign"](c)}}return i.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:i,push:function(e,n){const s=il({},i.value,t.state,{forward:e,scroll:ql()});a(s.current,s,!0),a(e,il({},Kl(o.value,e,null),{position:s.position+1},n),!1),o.value=e},replace:function(e,n){a(e,il({},t.state,Kl(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),o.value=e}}}function zl(e){const t=$l(e=Ul(e)),n=function(e,t,n,o){let i=[],a=[],s=null;const r=({state:a})=>{const r=jl(e,location),c=n.value,u=t.value;let l=0;if(a){if(n.value=r,t.value=a,s&&s===c)return void(s=null);l=u?a.position-u.position:0}else o(r);i.forEach((e=>{e(n.value,c,{delta:l,type:wl.pop,direction:l?l>0?Nl.forward:Nl.back:Nl.unknown})}))};function c(){const{history:e}=window;e.state&&e.replaceState(il({},e.state,{scroll:ql()}),"")}return window.addEventListener("popstate",r),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:function(){s=n.value},listen:function(e){i.push(e);const t=()=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t},destroy:function(){for(const e of a)e();a=[],window.removeEventListener("popstate",r),window.removeEventListener("beforeunload",c)}}}(e,t.state,t.location,t.replace);const o=il({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:Fl.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Wl(e){return"string"==typeof e||"symbol"==typeof e}const Yl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Xl=Symbol("");var Jl,Zl;function Ql(e,t){return il(new Error,{type:e,[Xl]:!0},t)}function ed(e,t){return e instanceof Error&&Xl in e&&(null==t||!!(e.type&t))}(Zl=Jl||(Jl={}))[Zl.aborted=4]="aborted",Zl[Zl.cancelled=8]="cancelled",Zl[Zl.duplicated=16]="duplicated";const td="[^/]+?",nd={sensitive:!1,strict:!1,start:!0,end:!0},od=/[.+*?^${}()[\]/\\]/g;function id(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?1===e.length&&80===e[0]?-1:1:e.length>t.length?1===t.length&&80===t[0]?1:-1:0}function ad(e,t){let n=0;const o=e.score,i=t.score;for(;n<o.length&&n<i.length;){const e=id(o[n],i[n]);if(e)return e;n++}if(1===Math.abs(i.length-o.length)){if(sd(o))return 1;if(sd(i))return-1}return i.length-o.length}function sd(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const rd={type:0,value:""},cd=/[a-zA-Z0-9_]/;function ud(e,t,n){const o=function(e,t){const n=il({},nd,t),o=[];let i=n.start?"^":"";const a=[];for(const c of e){const e=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let t=0;t<c.length;t++){const o=c[t];let s=40+(n.sensitive?.25:0);if(0===o.type)t||(i+="/"),i+=o.value.replace(od,"\\$&"),s+=40;else if(1===o.type){const{value:e,repeatable:n,optional:u,regexp:l}=o;a.push({name:e,repeatable:n,optional:u});const d=l||td;if(d!==td){s+=10;try{new RegExp(`(${d})`)}catch(r){throw new Error(`Invalid custom RegExp for param "${e}" (${d}): `+r.message)}}let p=n?`((?:${d})(?:/(?:${d}))*)`:`(${d})`;t||(p=u&&c.length<2?`(?:/${p})`:"/"+p),u&&(p+="?"),i+=p,s+=20,u&&(s+=-8),n&&(s+=-20),".*"===d&&(s+=-50)}e.push(s)}o.push(e)}if(n.strict&&n.end){const e=o.length-1;o[e][o[e].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const s=new RegExp(i,n.sensitive?"":"i");return{re:s,score:o,keys:a,parse:function(e){const t=e.match(s),n={};if(!t)return null;for(let o=1;o<t.length;o++){const e=t[o]||"",i=a[o-1];n[i.name]=e&&i.repeatable?e.split("/"):e}return n},stringify:function(t){let n="",o=!1;for(const i of e){o&&n.endsWith("/")||(n+="/"),o=!1;for(const e of i)if(0===e.type)n+=e.value;else if(1===e.type){const{value:a,repeatable:s,optional:r}=e,c=a in t?t[a]:"";if(rl(c)&&!s)throw new Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);const u=rl(c)?c.join("/"):c;if(!u){if(!r)throw new Error(`Missing required param "${a}"`);i.length<2&&(n.endsWith("/")?n=n.slice(0,-1):o=!0)}n+=u}}return n||"/"}}}(function(e){if(!e)return[[]];if("/"===e)return[[rd]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(e){throw new Error(`ERR (${n})/"${u}": ${e}`)}let n=0,o=n;const i=[];let a;function s(){a&&i.push(a),a=[]}let r,c=0,u="",l="";function d(){u&&(0===n?a.push({type:0,value:u}):1===n||2===n||3===n?(a.length>1&&("*"===r||"+"===r)&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:u,regexp:l,repeatable:"*"===r||"+"===r,optional:"*"===r||"?"===r})):t("Invalid state to consume buffer"),u="")}function p(){u+=r}for(;c<e.length;)if(r=e[c++],"\\"!==r||2===n)switch(n){case 0:"/"===r?(u&&d(),s()):":"===r?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:"("===r?n=2:cd.test(r)?p():(d(),n=0,"*"!==r&&"?"!==r&&"+"!==r&&c--);break;case 2:")"===r?"\\"==l[l.length-1]?l=l.slice(0,-1)+r:n=3:l+=r;break;case 3:d(),n=0,"*"!==r&&"?"!==r&&"+"!==r&&c--,l="";break;default:t("Unknown state")}else o=n,n=4;return 2===n&&t(`Unfinished custom RegExp for param "${u}"`),d(),s(),i}(e.path),n),i=il(o,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function ld(e,t){const n=[],o=new Map;function i(e,n,o){const r=!o,c=function(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:pd(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}(e);c.aliasOf=o&&o.record;const u=gd(t,e),l=[c];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)l.push(il({},c,{components:o?o.record.components:c.components,path:e,aliasOf:o?o.record:c}))}let d,p;for(const t of l){const{path:l}=t;if(n&&"/"!==l[0]){const e=n.record.path,o="/"===e[e.length-1]?"":"/";t.path=n.record.path+(l&&o+l)}if(d=ud(t,n,u),o?o.alias.push(d):(p=p||d,p!==d&&p.alias.push(d),r&&e.name&&!hd(d)&&a(e.name)),c.children){const e=c.children;for(let t=0;t<e.length;t++)i(e[t],d,o&&o.children[t])}o=o||d,(d.record.components&&Object.keys(d.record.components).length||d.record.name||d.record.redirect)&&s(d)}return p?()=>{a(p)}:sl}function a(e){if(Wl(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(a),t.alias.forEach(a))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(a),e.alias.forEach(a))}}function s(e){let t=0;for(;t<n.length&&ad(e,n[t])>=0&&(e.record.path!==n[t].record.path||!_d(e,n[t]));)t++;n.splice(t,0,e),e.record.name&&!hd(e)&&o.set(e.record.name,e)}return t=gd({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>i(e))),{addRoute:i,resolve:function(e,t){let i,a,s,r={};if("name"in e&&e.name){if(i=o.get(e.name),!i)throw Ql(1,{location:e});s=i.record.name,r=il(dd(t.params,i.keys.filter((e=>!e.optional)).concat(i.parent?i.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&dd(e.params,i.keys.map((e=>e.name)))),a=i.stringify(r)}else if(null!=e.path)a=e.path,i=n.find((e=>e.re.test(a))),i&&(r=i.parse(a),s=i.record.name);else{if(i=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!i)throw Ql(1,{location:e,currentLocation:t});s=i.record.name,r=il({},t.params,e.params),a=i.stringify(r)}const c=[];let u=i;for(;u;)c.unshift(u.record),u=u.parent;return{name:s,path:a,params:r,matched:c,meta:fd(c)}},removeRoute:a,getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}function dd(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function pd(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]="object"==typeof n?n[o]:n;return t}function hd(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function fd(e){return e.reduce(((e,t)=>il(e,t.meta)),{})}function gd(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function _d(e,t){return t.children.some((t=>t===e||_d(e,t)))}function md(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const e=n[o].replace(hl," "),i=e.indexOf("="),a=El(i<0?e:e.slice(0,i)),s=i<0?null:El(e.slice(i+1));if(a in t){let e=t[a];rl(e)||(e=t[a]=[e]),e.push(s)}else t[a]=s}return t}function vd(e){let t="";for(let n in e){const o=e[n];if(n=Tl(n).replace(dl,"%3D"),null==o){void 0!==o&&(t+=(t.length?"&":"")+n);continue}(rl(o)?o.map((e=>e&&Tl(e))):[o&&Tl(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))}))}return t}function yd(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=rl(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const Id=Symbol(""),Md=Symbol(""),Cd=Symbol(""),Td=Symbol(""),Sd=Symbol("");function Ed(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function Dd(e,t,n,o,i,a=e=>e()){const s=o&&(o.enterCallbacks[i]=o.enterCallbacks[i]||[]);return()=>new Promise(((r,c)=>{const u=e=>{var a;!1===e?c(Ql(4,{from:n,to:t})):e instanceof Error?c(e):"string"==typeof(a=e)||a&&"object"==typeof a?c(Ql(2,{from:t,to:e})):(s&&o.enterCallbacks[i]===s&&"function"==typeof e&&s.push(e),r())},l=a((()=>e.call(o&&o.instances[i],t,n,u)));let d=Promise.resolve(l);e.length<3&&(d=d.then(u)),d.catch((e=>c(e)))}))}function kd(e,t,n,o,i=e=>e()){const a=[];for(const r of e)for(const e in r.components){let c=r.components[e];if("beforeRouteEnter"===t||r.instances[e])if("object"==typeof(s=c)||"displayName"in s||"props"in s||"__vccOpts"in s){const s=(c.__vccOpts||c)[t];s&&a.push(Dd(s,n,o,r,e,i))}else{let s=c();a.push((()=>s.then((a=>{if(!a)return Promise.reject(new Error(`Couldn't resolve component "${e}" at "${r.path}"`));const s=(c=a).__esModule||"Module"===c[Symbol.toStringTag]?a.default:a;var c;r.components[e]=s;const u=(s.__vccOpts||s)[t];return u&&Dd(u,n,o,r,e,i)()}))))}}var s;return a}function Ld(e){const t=gs(Cd),n=gs(Td),o=Wr((()=>t.resolve(co(e.to)))),i=Wr((()=>{const{matched:e}=o.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;const s=a.findIndex(bl.bind(null,i));if(s>-1)return s;const r=Ad(e[t-2]);return t>1&&Ad(i)===r&&a[a.length-1].path!==r?a.findIndex(bl.bind(null,e[t-2])):s})),a=Wr((()=>i.value>-1&&function(e,t){for(const n in t){const o=t[n],i=e[n];if("string"==typeof o){if(o!==i)return!1}else if(!rl(i)||i.length!==o.length||o.some(((e,t)=>e!==i[t])))return!1}return!0}(n.params,o.value.params))),s=Wr((()=>i.value>-1&&i.value===n.matched.length-1&&Al(n.params,o.value.params)));return{route:o,href:Wr((()=>o.value.href)),isActive:a,isExactActive:s,navigate:function(n={}){return function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;if(void 0!==e.button&&0!==e.button)return;if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}e.preventDefault&&e.preventDefault();return!0}(n)?t[co(e.replace)?"replace":"push"](co(e.to)).catch(sl):Promise.resolve()}}}const bd=Xi({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ld,setup(e,{slots:t}){const n=qn(Ld(e)),{options:o}=gs(Cd),i=Wr((()=>({[Rd(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rd(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:Xr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}});function Ad(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rd=(e,t,n)=>null!=e?e:null!=t?t:n;function Od(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const wd=Xi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=gs(Sd),i=Wr((()=>e.route||o.value)),a=gs(Md,0),s=Wr((()=>{let e=co(a);const{matched:t}=i.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),r=Wr((()=>i.value.matched[s.value]));fs(Md,Wr((()=>s.value+1))),fs(Id,r),fs(Sd,i);const c=oo();return Ri((()=>[c.value,r.value,e.name]),(([e,t,n],[o,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),!e||!t||i&&bl(t,i)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=i.value,a=e.name,s=r.value,u=s&&s.components[a];if(!u)return Od(n.default,{Component:u,route:o});const l=s.props[a],d=l?!0===l?o.params:"function"==typeof l?l(o):l:null,p=Xr(u,il({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(s.instances[a]=null)},ref:c}));return Od(n.default,{Component:p,route:o})||p}}});function Pd(e){const t=ld(e.routes,e),n=e.parseQuery||md,o=e.stringifyQuery||vd,i=e.history,a=Ed(),s=Ed(),r=Ed(),c=io(Yl);let u=Yl;ol&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const l=al.bind(null,(e=>""+e)),d=al.bind(null,Sl),p=al.bind(null,El);function h(e,a){if(a=il({},a||c.value),"string"==typeof e){const o=kl(n,e,a.path),s=t.resolve({path:o.path},a),r=i.createHref(o.fullPath);return il(o,s,{params:p(s.params),hash:El(o.hash),redirectedFrom:void 0,href:r})}let s;if(null!=e.path)s=il({},e,{path:kl(n,e.path,a.path).path});else{const t=il({},e.params);for(const e in t)null==t[e]&&delete t[e];s=il({},e,{params:d(t)}),a.params=d(a.params)}const r=t.resolve(s,a),u=e.hash||"";r.params=l(p(r.params));const h=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,il({},e,{hash:(f=u,Cl(f).replace(vl,"{").replace(Il,"}").replace(_l,"^")),path:r.path}));var f;const g=i.createHref(h);return il({fullPath:h,hash:u,query:o===vd?yd(e.query):e.query||{}},r,{redirectedFrom:void 0,href:g})}function f(e){return"string"==typeof e?kl(n,e,c.value.path):il({},e)}function g(e,t){if(u!==e)return Ql(8,{from:t,to:e})}function _(e){return v(e)}function m(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=f(o):{path:o},o.params={}),il({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function v(e,t){const n=u=h(e),i=c.value,a=e.state,s=e.force,r=!0===e.replace,l=m(n);if(l)return v(il(f(l),{state:"object"==typeof l?il({},a,l.state):a,force:s,replace:r}),t||n);const d=n;let p;return d.redirectedFrom=t,!s&&function(e,t,n){const o=t.matched.length-1,i=n.matched.length-1;return o>-1&&o===i&&bl(t.matched[o],n.matched[i])&&Al(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,i,n)&&(p=Ql(16,{to:d,from:i}),R(i,i,!0,!1)),(p?Promise.resolve(p):M(d,i)).catch((e=>ed(e)?ed(e,2)?e:A(e):b(e,d,i))).then((e=>{if(e){if(ed(e,2))return v(il({replace:r},f(e.to),{state:"object"==typeof e.to?il({},a,e.to.state):a,force:s}),t||d)}else e=T(d,i,!0,r,a);return C(d,i,e),e}))}function y(e,t){const n=g(e,t);return n?Promise.reject(n):Promise.resolve()}function I(e){const t=P.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function M(e,t){let n;const[o,i,r]=function(e,t){const n=[],o=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let s=0;s<a;s++){const a=t.matched[s];a&&(e.matched.find((e=>bl(e,a)))?o.push(a):n.push(a));const r=e.matched[s];r&&(t.matched.find((e=>bl(e,r)))||i.push(r))}return[n,o,i]}(e,t);n=kd(o.reverse(),"beforeRouteLeave",e,t);for(const a of o)a.leaveGuards.forEach((o=>{n.push(Dd(o,e,t))}));const c=y.bind(null,e,t);return n.push(c),G(n).then((()=>{n=[];for(const o of a.list())n.push(Dd(o,e,t));return n.push(c),G(n)})).then((()=>{n=kd(i,"beforeRouteUpdate",e,t);for(const o of i)o.updateGuards.forEach((o=>{n.push(Dd(o,e,t))}));return n.push(c),G(n)})).then((()=>{n=[];for(const o of r)if(o.beforeEnter)if(rl(o.beforeEnter))for(const i of o.beforeEnter)n.push(Dd(i,e,t));else n.push(Dd(o.beforeEnter,e,t));return n.push(c),G(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=kd(r,"beforeRouteEnter",e,t,I),n.push(c),G(n)))).then((()=>{n=[];for(const o of s.list())n.push(Dd(o,e,t));return n.push(c),G(n)})).catch((e=>ed(e,8)?e:Promise.reject(e)))}function C(e,t,n){r.list().forEach((o=>I((()=>o(e,t,n)))))}function T(e,t,n,o,a){const s=g(e,t);if(s)return s;const r=t===Yl,u=ol?history.state:{};n&&(o||r?i.replace(e.fullPath,il({scroll:r&&u&&u.scroll},a)):i.push(e.fullPath,a)),c.value=e,R(e,t,n,r),A()}let S;function E(){S||(S=i.listen(((e,t,n)=>{if(!N.listening)return;const o=h(e),a=m(o);if(a)return void v(il(a,{replace:!0}),o).catch(sl);u=o;const s=c.value;var r,l;ol&&(r=Bl(s.fullPath,n.delta),l=ql(),Hl.set(r,l)),M(o,s).catch((e=>ed(e,12)?e:ed(e,2)?(v(e.to,o).then((e=>{ed(e,20)&&!n.delta&&n.type===wl.pop&&i.go(-1,!1)})).catch(sl),Promise.reject()):(n.delta&&i.go(-n.delta,!1),b(e,o,s)))).then((e=>{(e=e||T(o,s,!1))&&(n.delta&&!ed(e,8)?i.go(-n.delta,!1):n.type===wl.pop&&ed(e,20)&&i.go(-1,!1)),C(o,s,e)})).catch(sl)})))}let D,k=Ed(),L=Ed();function b(e,t,n){A(e);const o=L.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function A(e){return D||(D=!e,E(),k.list().forEach((([t,n])=>e?n(e):t())),k.reset()),e}function R(t,n,o,i){const{scrollBehavior:a}=e;if(!ol||!a)return Promise.resolve();const s=!o&&function(e){const t=Hl.get(e);return Hl.delete(e),t}(Bl(t.fullPath,0))||(i||!o)&&history.state&&history.state.scroll||null;return Uo().then((()=>a(t,n,s))).then((e=>e&&Vl(e))).catch((e=>b(e,t,n)))}const O=e=>i.go(e);let w;const P=new Set,N={currentRoute:c,listening:!0,addRoute:function(e,n){let o,i;return Wl(e)?(o=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:h,options:e,push:_,replace:function(e){return _(il(f(e),{replace:!0}))},go:O,back:()=>O(-1),forward:()=>O(1),beforeEach:a.add,beforeResolve:s.add,afterEach:r.add,onError:L.add,isReady:function(){return D&&c.value!==Yl?Promise.resolve():new Promise(((e,t)=>{k.add([e,t])}))},install(e){e.component("RouterLink",bd),e.component("RouterView",wd),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>co(c)}),ol&&!w&&c.value===Yl&&(w=!0,_(i.location).catch((e=>{})));const t={};for(const o in Yl)Object.defineProperty(t,o,{get:()=>c.value[o],enumerable:!0});e.provide(Cd,this),e.provide(Td,Vn(t)),e.provide(Sd,c);const n=e.unmount;P.add(e),e.unmount=function(){P.delete(e),P.size<1&&(u=Yl,S&&S(),S=null,c.value=Yl,w=!1,D=!1),n()}}};function G(e){return e.reduce(((e,t)=>e.then((()=>I(t)))),Promise.resolve())}return N}function Nd(){return gs(Td)}const Gd=["{","}"];const Ud=/^(?:\d)+/,xd=/^(?:\w)+/;const Fd="zh-Hans",qd="zh-Hant",Vd="en",Bd="fr",Hd="es",Kd=Object.prototype.hasOwnProperty,$d=(e,t)=>Kd.call(e,t),zd=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=Gd){if(!t)return[e];let o=this._caches[e];return o||(o=function(e,[t,n]){const o=[];let i=0,a="";for(;i<e.length;){let s=e[i++];if(s===t){a&&o.push({type:"text",value:a}),a="";let t="";for(s=e[i++];void 0!==s&&s!==n;)t+=s,s=e[i++];const r=s===n,c=Ud.test(t)?"list":r&&xd.test(t)?"named":"unknown";o.push({value:t,type:c})}else a+=s}return a&&o.push({type:"text",value:a}),o}(e,n),this._caches[e]=o),function(e,t){const n=[];let o=0;const i=Array.isArray(t)?"list":(a=t,null!==a&&"object"==typeof a?"named":"unknown");var a;if("unknown"===i)return n;for(;o<e.length;){const a=e[o];switch(a.type){case"text":n.push(a.value);break;case"list":n.push(t[parseInt(a.value,10)]);break;case"named":"named"===i&&n.push(t[a.value])}o++}return n}(o,t)}};function Wd(e,t){if(!e)return;if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if("chinese"===(e=e.toLowerCase()))return Fd;if(0===e.indexOf("zh"))return e.indexOf("-hans")>-1?Fd:e.indexOf("-hant")>-1?qd:(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?qd:Fd);var n;let o=[Vd,Bd,Hd];t&&Object.keys(t).length>0&&(o=Object.keys(t));const i=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return i||void 0}class Yd{constructor({locale:e,fallbackLocale:t,messages:n,watcher:o,formater:i}){this.locale=Vd,this.fallbackLocale=Vd,this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=i||zd,this.messages=n||{},this.setLocale(e||Vd),o&&this.watchLocale(o)}setLocale(e){const t=this.locale;this.locale=Wd(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,n=!0){const o=this.messages[e];o?n?Object.assign(o,t):Object.keys(t).forEach((e=>{$d(o,e)||(o[e]=t[e])})):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let o=this.message;return"string"==typeof t?(t=Wd(t,this.messages))&&(o=this.messages[t]):n=t,$d(o,e)?this.formater.interpolate(o[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function Xd(e,t={},n,o){if("string"!=typeof e){const n=[t,e];e=n[0],t=n[1]}"string"!=typeof e&&(e="undefined"!=typeof uni&&uni.getLocale?uni.getLocale():"undefined"!=typeof global&&global.getLocale?global.getLocale():Vd),"string"!=typeof n&&(n="undefined"!=typeof __uniConfig&&__uniConfig.fallbackLocale||Vd);const i=new Yd({locale:e,fallbackLocale:n,messages:t,watcher:o});let a=(e,t)=>{{let e=!1;a=function(t,n){const o=CC().$vm;return o&&(o.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(o,i))),i.t(t,n)}}return a(e,t)};return{i18n:i,f:(e,t,n)=>i.f(e,t,n),t:(e,t)=>a(e,t),add:(e,t,n=!0)=>i.add(e,t,n),watch:e=>i.watchLocale(e),getLocale:()=>i.getLocale(),setLocale:e=>i.setLocale(e)}}function Jd(e,t){return e.indexOf(t[0])>-1}const Zd=je((()=>"undefined"!=typeof __uniConfig&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length));let Qd;function ep(e){return Jd(e,re)?op().f(e,function(){const e=uni.getLocale(),t=__uniConfig.locales;return t[e]||t[__uniConfig.fallbackLocale]||t.en||{}}(),re):e}function tp(e,t){if(1===t.length){if(e){const n=e=>v(e)&&Jd(e,re),o=t[0];let i=[];if(h(e)&&(i=e.filter((e=>n(e[o])))).length)return i;const a=e[t[0]];if(n(a))return e}return}const n=t.shift();return tp(e&&e[n],t)}function np(e,t){const n=tp(e,t);if(!n)return!1;const o=t[t.length-1];if(h(n))n.forEach((e=>np(e,[o])));else{let e=n[o];Object.defineProperty(n,o,{get:()=>ep(e),set(t){e=t}})}return!0}function op(){if(!Qd){let e;if(e=navigator.cookieEnabled&&window.localStorage&&localStorage[se]||__uniConfig.locale||navigator.language,Qd=Xd(e),Zd()){const t=Object.keys(__uniConfig.locales||{});t.length&&t.forEach((e=>Qd.add(e,__uniConfig.locales[e]))),Qd.setLocale(e)}}return Qd}function ip(e,t,n){return t.reduce(((t,o,i)=>(t[e+o]=n[i],t)),{})}const ap=je((()=>{const e="uni.async.",t=["error"];op().add(Vd,ip(e,t,["The connection timed out, click the screen to try again."]),!1),op().add(Hd,ip(e,t,["Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo."]),!1),op().add(Bd,ip(e,t,["La connexion a expiré, cliquez sur l'écran pour réessayer."]),!1),op().add(Fd,ip(e,t,["连接服务器超时,点击屏幕重试"]),!1),op().add(qd,ip(e,t,["連接服務器超時,點擊屏幕重試"]),!1)})),sp=je((()=>{const e="uni.showActionSheet.",t=["cancel"];op().add(Vd,ip(e,t,["Cancel"]),!1),op().add(Hd,ip(e,t,["Cancelar"]),!1),op().add(Bd,ip(e,t,["Annuler"]),!1),op().add(Fd,ip(e,t,["取消"]),!1),op().add(qd,ip(e,t,["取消"]),!1)})),rp=je((()=>{const e="uni.showToast.",t=["unpaired"];op().add(Vd,ip(e,t,["Please note showToast must be paired with hideToast"]),!1),op().add(Hd,ip(e,t,["Tenga en cuenta que showToast debe estar emparejado con hideToast"]),!1),op().add(Bd,ip(e,t,["Veuillez noter que showToast doit être associé à hideToast"]),!1),op().add(Fd,ip(e,t,["请注意 showToast 与 hideToast 必须配对使用"]),!1),op().add(qd,ip(e,t,["請注意 showToast 與 hideToast 必須配對使用"]),!1)})),cp=je((()=>{const e="uni.showLoading.",t=["unpaired"];op().add(Vd,ip(e,t,["Please note showLoading must be paired with hideLoading"]),!1),op().add(Hd,ip(e,t,["Tenga en cuenta que showLoading debe estar emparejado con hideLoading"]),!1),op().add(Bd,ip(e,t,["Veuillez noter que showLoading doit être associé à hideLoading"]),!1),op().add(Fd,ip(e,t,["请注意 showLoading 与 hideLoading 必须配对使用"]),!1),op().add(qd,ip(e,t,["請注意 showLoading 與 hideLoading 必須配對使用"]),!1)})),up=je((()=>{const e="uni.showModal.",t=["cancel","confirm"];op().add(Vd,ip(e,t,["Cancel","OK"]),!1),op().add(Hd,ip(e,t,["Cancelar","OK"]),!1),op().add(Bd,ip(e,t,["Annuler","OK"]),!1),op().add(Fd,ip(e,t,["取消","确定"]),!1),op().add(qd,ip(e,t,["取消","確定"]),!1)})),lp=je((()=>{const e="uni.chooseFile.",t=["notUserActivation"];op().add(Vd,ip(e,t,["File chooser dialog can only be shown with a user activation"]),!1),op().add(Hd,ip(e,t,["El cuadro de diálogo del selector de archivos solo se puede mostrar con la activación del usuario"]),!1),op().add(Bd,ip(e,t,["La boîte de dialogue du sélecteur de fichier ne peut être affichée qu'avec une activation par l'utilisateur"]),!1),op().add(Fd,ip(e,t,["文件选择器对话框只能在由用户激活时显示"]),!1),op().add(qd,ip(e,t,["文件選擇器對話框只能在由用戶激活時顯示"]),!1)})),dp=je((()=>{const e="uni.setClipboardData.",t=["success","fail"];op().add(Vd,ip(e,t,["Content copied","Copy failed, please copy manually"]),!1),op().add(Hd,ip(e,t,["Contenido copiado","Error al copiar, copie manualmente"]),!1),op().add(Bd,ip(e,t,["Contenu copié","Échec de la copie, copiez manuellement"]),!1),op().add(Fd,ip(e,t,["内容已复制","复制失败,请手动复制"]),!1),op().add(qd,ip(e,t,["內容已復制","復制失敗,請手動復製"]),!1)})),pp=je((()=>{const e="uni.getClipboardData.",t=["fail"];op().add(Vd,ip(e,t,["Reading failed, please paste manually"]),!1),op().add(Hd,ip(e,t,["Error de lectura, pegue manualmente"]),!1),op().add(Bd,ip(e,t,["Échec de la lecture, veuillez coller manuellement"]),!1),op().add(Fd,ip(e,t,["读取失败,请手动粘贴"]),!1),op().add(qd,ip(e,t,["讀取失敗,請手動粘貼"]),!1)})),hp=je((()=>{const e="uni.picker.",t=["done","cancel"];op().add(Vd,ip(e,t,["Done","Cancel"]),!1),op().add(Hd,ip(e,t,["OK","Cancelar"]),!1),op().add(Bd,ip(e,t,["OK","Annuler"]),!1),op().add(Fd,ip(e,t,["完成","取消"]),!1),op().add(qd,ip(e,t,["完成","取消"]),!1)})),fp=je((()=>{const e="uni.video.",t=["danmu","volume"];op().add(Vd,ip(e,t,["Danmu","Volume"]),!1),op().add(Hd,ip(e,t,["Danmu","Volumen"]),!1),op().add(Bd,ip(e,t,["Danmu","Le Volume"]),!1),op().add(Fd,ip(e,t,["弹幕","音量"]),!1),op().add(qd,ip(e,t,["彈幕","音量"]),!1)})),gp=je((()=>{const e="uni.chooseLocation.",t=["search","cancel"];op().add(Vd,ip(e,t,["Find Place","Cancel"]),!1),op().add(Hd,ip(e,t,["Encontrar","Cancelar"]),!1),op().add(Bd,ip(e,t,["Trouve","Annuler"]),!1),op().add(Fd,ip(e,t,["搜索地点","取消"]),!1),op().add(qd,ip(e,t,["搜索地點","取消"]),!1)}));function _p(e){const t=new Mt;return{on:(e,n)=>t.on(e,n),once:(e,n)=>t.once(e,n),off:(e,n)=>t.off(e,n),emit:(e,...n)=>t.emit(e,...n),subscribe(n,o,i=!1){t[i?"once":"on"](`${e}.${n}`,o)},unsubscribe(n,o){t.off(`${e}.${n}`,o)},subscribeHandler(n,o,i){t.emit(`${e}.${n}`,o,i)}}}const mp="invokeViewApi",vp="invokeServiceApi";let yp=1;const Ip=Object.create(null);function Mp(e,t){return e+"."+t}function Cp(e,t,n){t=Mp(e,t),Ip[t]||(Ip[t]=n)}function Tp({id:e,name:t,args:n},o){t=Mp(o,t);const i=t=>{e&&cL.publishHandler(mp+"."+e,t)},a=Ip[t];a?a(n,i):i({})}const Sp=u(_p("service"),{invokeServiceMethod:(e,t,n)=>{const{subscribe:o,publishHandler:i}=cL,a=n?yp++:0;n&&o(vp+"."+a,n,!0),i(vp,{id:a,name:e,args:t})}}),Ep=rt(!0);let Dp;function kp(){Dp&&(clearTimeout(Dp),Dp=null)}let Lp=0,bp=0;function Ap(e){if(kp(),1!==e.touches.length)return;const{pageX:t,pageY:n}=e.touches[0];Lp=t,bp=n,Dp=setTimeout((function(){const t=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget});t.touches=e.touches,t.changedTouches=e.changedTouches,e.target.dispatchEvent(t)}),350)}function Rp(e){if(!Dp)return;if(1!==e.touches.length)return kp();const{pageX:t,pageY:n}=e.touches[0];return Math.abs(t-Lp)>10||Math.abs(n-bp)>10?kp():void 0}function Op(e,t){const n=Number(e);return isNaN(n)?t:n}function wp(){const e=__uniConfig.globalStyle||{},t=Op(e.rpxCalcMaxDeviceWidth,960),n=Op(e.rpxCalcBaseDeviceWidth,375);function o(){let e=function(){const e=/^Apple/.test(navigator.vendor)&&"number"==typeof window.orientation,t=e&&90===Math.abs(window.orientation);var n=e?Math[t?"max":"min"](screen.width,screen.height):screen.width;return Math.min(window.innerWidth,document.documentElement.clientWidth,n)||n}();e=e<=t?e:n,document.documentElement.style.fontSize=e/23.4375+"px"}o(),document.addEventListener("DOMContentLoaded",o),window.addEventListener("load",o),window.addEventListener("resize",o)}function Pp(){wp(),it(),window.addEventListener("touchstart",Ap,Ep),window.addEventListener("touchmove",Rp,Ep),window.addEventListener("touchend",kp,Ep),window.addEventListener("touchcancel",kp,Ep)}function Np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gp,Up,xp=["top","left","right","bottom"],Fp={};function qp(){return Up="CSS"in window&&"function"==typeof CSS.supports?CSS.supports("top: env(safe-area-inset-top)")?"env":CSS.supports("top: constant(safe-area-inset-top)")?"constant":"":""}function Vp(){if(Up="string"==typeof Up?Up:qp()){var e=[],t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t={passive:!0}}});window.addEventListener("test",null,n)}catch(Hw){}var o=document.createElement("div");i(o,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),xp.forEach((function(e){s(o,e)})),document.body.appendChild(o),a(),Gp=!0}else xp.forEach((function(e){Fp[e]=0}));function i(e,t){var n=e.style;Object.keys(t).forEach((function(e){var o=t[e];n[e]=o}))}function a(t){t?e.push(t):e.forEach((function(e){e()}))}function s(e,n){var o=document.createElement("div"),s=document.createElement("div"),r=document.createElement("div"),c=document.createElement("div"),u={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:Up+"(safe-area-inset-"+n+")"};i(o,u),i(s,u),i(r,{transition:"0s",animation:"none",width:"400px",height:"400px"}),i(c,{transition:"0s",animation:"none",width:"250%",height:"250%"}),o.appendChild(r),s.appendChild(c),e.appendChild(o),e.appendChild(s),a((function(){o.scrollTop=s.scrollTop=1e4;var e=o.scrollTop,i=s.scrollTop;function a(){this.scrollTop!==(this===o?e:i)&&(o.scrollTop=s.scrollTop=1e4,e=o.scrollTop,i=s.scrollTop,function(e){Hp.length||setTimeout((function(){var e={};Hp.forEach((function(t){e[t]=Fp[t]})),Hp.length=0,jp.forEach((function(t){t(e)}))}),0);Hp.push(e)}(n))}o.addEventListener("scroll",a,t),s.addEventListener("scroll",a,t)}));var l=getComputedStyle(o);Object.defineProperty(Fp,n,{configurable:!0,get:function(){return parseFloat(l.paddingBottom)}})}}function Bp(e){return Gp||Vp(),Fp[e]}var Hp=[];var jp=[];const Kp=Np({get support(){return 0!=("string"==typeof Up?Up:qp()).length},get top(){return Bp("top")},get left(){return Bp("left")},get right(){return Bp("right")},get bottom(){return Bp("bottom")},onChange:function(e){qp()&&(Gp||Vp(),"function"==typeof e&&jp.push(e))},offChange:function(e){var t=jp.indexOf(e);t>=0&&jp.splice(t,1)}}),$p=Fu((()=>{}),["prevent"]),zp=Fu((e=>{}),["stop"]);function Wp(e,t){return parseInt((e.getPropertyValue(t).match(/\d+/)||["0"])[0])}function Yp(){const e=Wp(document.documentElement.style,"--window-top");return e?e+Kp.top:0}function Xp(){const e=document.documentElement.style,t=Yp(),n=Wp(e,"--window-bottom"),o=Wp(e,"--window-left"),i=Wp(e,"--window-right"),a=Wp(e,"--top-window-height");return{top:t,bottom:n?n+Kp.bottom:0,left:o?o+Kp.left:0,right:i?i+Kp.right:0,topWindowHeight:a||0}}function Jp(e){const t=document.documentElement.style;Object.keys(e).forEach((n=>{t.setProperty(n,e[n])}))}function Zp(e){return Jp(e)}function Qp(e){return Symbol(e)}function eh(e){return-1!==(e+="").indexOf("rpx")||-1!==e.indexOf("upx")}function th(e,t=!1){if(t)return function(e){if(!eh(e))return e;return e.replace(/(\d+(\.\d+)?)[ru]px/g,((e,t)=>uni.upx2px(parseFloat(t))+"px"))}(e);if(v(e)){const t=parseInt(e)||0;return eh(e)?uni.upx2px(t):t}return e}function nh(e){return e.$page}const oh="M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z",ih="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z",ah="M21.781 7.844l-9.063 8.594 9.063 8.594q0.25 0.25 0.25 0.609t-0.25 0.578q-0.25 0.25-0.578 0.25t-0.578-0.25l-9.625-9.125q-0.156-0.125-0.203-0.297t-0.047-0.359q0-0.156 0.047-0.328t0.203-0.297l9.625-9.125q0.25-0.25 0.578-0.25t0.578 0.25q0.25 0.219 0.25 0.578t-0.25 0.578z",sh="M17.25 16.156l7.375-7.313q0.281-0.281 0.281-0.641t-0.281-0.641q-0.25-0.25-0.625-0.25t-0.625 0.25l-7.375 7.344-7.313-7.344q-0.25-0.25-0.625-0.25t-0.625 0.25q-0.281 0.25-0.281 0.625t0.281 0.625l7.313 7.344-7.375 7.344q-0.281 0.25-0.281 0.625t0.281 0.625q0.125 0.125 0.281 0.188t0.344 0.063q0.156 0 0.328-0.063t0.297-0.188l7.375-7.344 7.375 7.406q0.125 0.156 0.297 0.219t0.328 0.063q0.188 0 0.344-0.078t0.281-0.203q0.281-0.25 0.281-0.609t-0.281-0.641l-7.375-7.406z",rh="M31.562 4.9966666659375q0.435 0.399 0.435 0.87 0.036 0.58-0.399 0.98l-18.61 19.917q-0.145 0.145-0.327 0.217-0.073 0.037-0.145 0.11-0.254 0.035-0.472 0.035-0.29 0-0.544-0.036l-0.145-0.072q-0.109-0.073-0.217-0.182l-0.11-0.072L0.363 16.2786666659375q-0.327-0.399-0.363-0.907 0-0.544 0.363-1.016 0.435-0.326 0.961-0.362 0.527-0.036 0.962 0.362l9.722 9.542L29.712 5.0326666659375q0.399-0.363 0.943-0.363 0.544-0.036 0.907 0.327z";function ch(e,t="#000",n=27){return _r("svg",{width:n,height:n,viewBox:"0 0 32 32"},[_r("path",{d:e,fill:t},null,8,["d","fill"])],8,["width","height"])}function uh(){{const{$pageInstance:e}=Rr();return e&&mh(e.proxy)}}function lh(e){const t=Xe(e);if(t.$page)return mh(t);if(!t.$)return;{const{$pageInstance:e}=t.$;if(e)return mh(e.proxy)}const n=t.$.root.proxy;return n&&n.$page?mh(n):void 0}function dh(){const e=Wv(),t=e.length;if(t)return e[t-1]}function ph(){var e;const t=null==(e=dh())?void 0:e.$page;if(t)return t.meta}function hh(){const e=ph();return e?e.id:-1}function fh(){const e=dh();if(e)return e.$vm}const gh=["navigationBar","pullToRefresh"];function _h(e,t){const n=JSON.parse(JSON.stringify(__uniConfig.globalStyle||{})),o=u({id:t},n,e);gh.forEach((t=>{o[t]=u({},n[t],e[t])}));const{navigationBar:i}=o;return i.titleText&&i.titleImage&&(i.titleText=""),o}function mh(e){var t,n;return(null==(t=e.$page)?void 0:t.id)||(null==(n=e.$basePage)?void 0:n.id)}function vh(e,t,n){if(v(e))n=t,t=e,e=fh();else if("number"==typeof e){const t=Wv().find((t=>nh(t).id===e));e=t?t.$vm:fh()}if(!e)return;const o=e.$[t];return o&&((e,t)=>{let n;for(let o=0;o<e.length;o++)n=e[o](t);return n})(o,n)}function yh(e){e.preventDefault()}let Ih,Mh=0;function Ch({onPageScroll:e,onReachBottom:t,onReachBottomDistance:n}){let o=!1,i=!1,a=!0;const s=()=>{function s(){if((()=>{const{scrollHeight:e}=document.documentElement,t=window.innerHeight,o=window.scrollY,a=o>0&&e>t&&o+t+n>=e,s=Math.abs(e-Mh)>n;return!a||i&&!s?(!a&&i&&(i=!1),!1):(Mh=e,i=!0,!0)})())return t&&t(),a=!1,setTimeout((function(){a=!0}),350),!0}e&&e(window.pageYOffset),t&&a&&(s()||(Ih=setTimeout(s,300))),o=!1};return function(){clearTimeout(Ih),o||requestAnimationFrame(s),o=!0}}function Th(e,t){if(0===t.indexOf("/"))return t;if(0===t.indexOf("./"))return Th(e,t.slice(2));const n=t.split("/"),o=n.length;let i=0;for(;i<o&&".."===n[i];i++);n.splice(0,i),t=n.join("/");const a=e.length>0?e.split("/"):[];return a.splice(a.length-i-1,i+1),Ve(a.concat(n).join("/"))}function Sh(e,t=!1){return t?__uniRoutes.find((t=>t.path===e||t.alias===e)):__uniRoutes.find((t=>t.path===e))}class Eh{constructor(e){this.$bindClass=!1,this.$bindStyle=!1,this.$vm=e,this.$el=function(e,t=!1){const{vnode:n}=e;if(Ze(n.el))return t?n.el?[n.el]:[]:n.el;const{subTree:o}=e;if(16&o.shapeFlag){const e=o.children.filter((e=>e.el&&Ze(e.el)));if(e.length>0)return t?e.map((e=>e.el)):e[0].el}return t?n.el?[n.el]:[]:n.el}(e.$),this.$el.getAttribute&&(this.$bindClass=!!this.$el.getAttribute("class"),this.$bindStyle=!!this.$el.getAttribute("style"))}selectComponent(e){if(!this.$el||!e)return;const t=bh(this.$el.querySelector(e));return t?Dh(t,!1):void 0}selectAllComponents(e){if(!this.$el||!e)return[];const t=[],n=this.$el.querySelectorAll(e);for(let o=0;o<n.length;o++){const e=bh(n[o]);e&&t.push(Dh(e,!1))}return t}forceUpdate(e){"class"===e?this.$bindClass?(this.$el.__wxsClassChanged=!0,this.$vm.$forceUpdate()):this.updateWxsClass():"style"===e&&(this.$bindStyle?(this.$el.__wxsStyleChanged=!0,this.$vm.$forceUpdate()):this.updateWxsStyle())}updateWxsClass(){const{__wxsAddClass:e}=this.$el;e.length&&(this.$el.className=e.join(" "))}updateWxsStyle(){const{__wxsStyle:e}=this.$el;e&&this.$el.setAttribute("style",function(e){let t="";if(!e||v(e))return t;for(const n in e){const o=e[n],i=n.startsWith("--")?n:R(n);(v(o)||"number"==typeof o)&&(t+=`${i}:${o};`)}return t}(e))}setStyle(e){return this.$el&&e?(v(e)&&(e=$(e)),S(e)&&(this.$el.__wxsStyle=e,this.forceUpdate("style")),this):this}addClass(e){if(!this.$el||!e)return this;const t=this.$el.__wxsAddClass||(this.$el.__wxsAddClass=[]);return-1===t.indexOf(e)&&(t.push(e),this.forceUpdate("class")),this}removeClass(e){if(!this.$el||!e)return this;const{__wxsAddClass:t}=this.$el;if(t){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const n=this.$el.__wxsRemoveClass||(this.$el.__wxsRemoveClass=[]);return-1===n.indexOf(e)&&(n.push(e),this.forceUpdate("class")),this}hasClass(e){return this.$el&&this.$el.classList.contains(e)}getDataset(){return this.$el&&this.$el.dataset}callMethod(e,t={}){const n=this.$vm[e];m(n)?n(JSON.parse(JSON.stringify(t))):this.$vm.ownerId&&cL.publishHandler("onWxsInvokeCallMethod",{nodeId:this.$el.__id,ownerId:this.$vm.ownerId,method:e,args:t})}requestAnimationFrame(e){return window.requestAnimationFrame(e)}getState(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}triggerEvent(e,t={}){return this.$vm.$emit(e,t),this}getComputedStyle(e){if(this.$el){const t=window.getComputedStyle(this.$el);return e&&e.length?e.reduce(((e,n)=>(e[n]=t[n],e)),{}):t}return{}}setTimeout(e,t){return window.setTimeout(e,t)}clearTimeout(e){return window.clearTimeout(e)}getBoundingClientRect(){return this.$el.getBoundingClientRect()}}function Dh(e,t=!0){if(t&&e&&(e=Je(e.$)),e&&e.$el)return e.$el.__wxsComponentDescriptor||(e.$el.__wxsComponentDescriptor=new Eh(e)),e.$el.__wxsComponentDescriptor}function kh(e,t){return Dh(e,t)}function Lh(e,t,n,o=!0){if(t){e.__instance||(e.__instance=!0,Object.defineProperty(e,"instance",{get:()=>kh(n.proxy,!1)}));const i=function(e,t,n=!0){if(!t)return!1;if(n&&e.length<2)return!1;const o=Je(t);if(!o)return!1;const i=o.$.type;return!(!i.$wxs&&!i.$renderjs)&&o}(t,n,o);if(i)return[e,kh(i,!1)]}}function bh(e){if(e)return e.__vueParentComponent&&e.__vueParentComponent.proxy}function Ah(e,t=!1){const{type:n,timeStamp:o,target:i,currentTarget:a}=e;let s,r;s=ct(t?i:function(e){for(;e&&0!==e.tagName.indexOf("UNI-");)e=e.parentElement;return e}(i)),r=ct(a);const c={type:n,timeStamp:o,target:s,detail:{},currentTarget:r};return e._stopped&&(c._stopped=!0),e.type.startsWith("touch")&&(c.touches=e.touches,c.changedTouches=e.changedTouches),function(e,t){u(e,{preventDefault:()=>t.preventDefault(),stopPropagation:()=>t.stopPropagation()})}(c,e),c}function Rh(e,t){return{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY-t,pageX:e.pageX,pageY:e.pageY-t}}function Oh(e,t){const n=[];for(let o=0;o<e.length;o++){const{identifier:i,pageX:a,pageY:s,clientX:r,clientY:c,force:u}=e[o];n.push({identifier:i,pageX:a,pageY:s-t,clientX:r,clientY:c-t,force:u||0})}return n}const wh=Object.defineProperty({__proto__:null,$nne:function(e,t,n){const{currentTarget:o}=e;if(!(e instanceof Event&&o instanceof HTMLElement))return[e];const i=0!==o.tagName.indexOf("UNI-");if(i)return Lh(e,t,n,!1)||[e];const a=Ah(e,i);if("click"===e.type)!function(e,t){const{x:n,y:o}=t,i=Yp();e.detail={x:n,y:o-i},e.touches=e.changedTouches=[Rh(t,i)]}(a,e);else if((e=>0===e.type.indexOf("mouse")||["contextmenu"].includes(e.type))(e))!function(e,t){const n=Yp();e.pageX=t.pageX,e.pageY=t.pageY-n,e.clientX=t.clientX,e.clientY=t.clientY-n,e.touches=e.changedTouches=[Rh(t,n)]}(a,e);else if((e=>"undefined"!=typeof TouchEvent&&e instanceof TouchEvent||0===e.type.indexOf("touch")||["longpress"].indexOf(e.type)>=0)(e)){const t=Yp();a.touches=Oh(e.touches,t),a.changedTouches=Oh(e.changedTouches,t)}else if((e=>!e.type.indexOf("key")&&e instanceof KeyboardEvent)(e)){["key","code"].forEach((t=>{Object.defineProperty(a,t,{get:()=>e[t]})}))}return Lh(a,t,n)||[a]},createNativeEvent:Ah},Symbol.toStringTag,{value:"Module"});function Ph(e){!function(e){const t=e.globalProperties;u(t,wh),t.$gcd=kh}(e._context.config)}let Nh=1;function Gh(e){return(e||hh())+"."+mp}const Uh=u(_p("view"),{invokeOnCallback:(e,t)=>lL.emit("api."+e,t),invokeViewMethod:(e,t,n,o)=>{const{subscribe:i,publishHandler:a}=lL,s=o?Nh++:0;o&&i(mp+"."+s,o,!0),a(Gh(n),{id:s,name:e,args:t},n)},invokeViewMethodKeepAlive:(e,t,n,o)=>{const{subscribe:i,unsubscribe:a,publishHandler:s}=lL,r=Nh++,c=mp+"."+r;return i(c,n),s(Gh(o),{id:r,name:e,args:t},o),()=>{a(c)}}});function xh(e){vh(dh(),Ce,e),lL.invokeOnCallback("onWindowResize",e)}function Fh(e){const t=dh();vh(CC(),de,e),vh(t,de)}function qh(){vh(CC(),pe),vh(dh(),pe)}const Vh=[Se,De];function Bh(){Vh.forEach((e=>lL.subscribe(e,function(e){return(t,n)=>{vh(parseInt(n),e,t)}}(e))))}function Hh(){!function(){const{on:e}=lL;e(Ce,xh),e(Ue,Fh),e(xe,qh)}(),Bh()}function jh(){if(this.$route){const e=this.$route.meta;return e.eventChannel||(e.eventChannel=new ft(this.$page.id)),e.eventChannel}}function Kh(e){e._context.config.globalProperties.getOpenerEventChannel=jh}function $h(){return{path:"",query:{},scene:1001,referrerInfo:{appId:"",extraData:{}}}}function zh(e){return/^-?\d+[ur]px$/i.test(e)?e.replace(/(^-?\d+)[ur]px$/i,((e,t)=>`${uni.upx2px(parseFloat(t))}px`)):/^-?[\d\.]+$/.test(e)?`${e}px`:e||""}function Wh(e){const t=e.animation;if(!t||!t.actions||!t.actions.length)return;let n=0;const o=t.actions,i=t.actions.length;function a(){const t=o[n],s=t.option.transition,r=function(e){const t=["matrix","matrix3d","scale","scale3d","rotate3d","skew","translate","translate3d"],n=["scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","translateX","translateY","translateZ"],o=["opacity","background-color"],i=["width","height","left","right","top","bottom"],a=e.animates,s=e.option,r=s.transition,c={},u=[];return a.forEach((e=>{let a=e.type,s=[...e.args];if(t.concat(n).includes(a))a.startsWith("rotate")||a.startsWith("skew")?s=s.map((e=>parseFloat(e)+"deg")):a.startsWith("translate")&&(s=s.map(zh)),n.indexOf(a)>=0&&(s.length=1),u.push(`${a}(${s.join(",")})`);else if(o.concat(i).includes(s[0])){a=s[0];const e=s[1];c[a]=i.includes(a)?zh(e):e}})),c.transform=c.webkitTransform=u.join(" "),c.transition=c.webkitTransition=Object.keys(c).map((e=>`${function(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)).replace("webkit","-webkit")}(e)} ${r.duration}ms ${r.timingFunction} ${r.delay}ms`)).join(","),c.transformOrigin=c.webkitTransformOrigin=s.transformOrigin,c}(t);Object.keys(r).forEach((t=>{e.$el.style[t]=r[t]})),n+=1,n<i&&setTimeout(a,s.duration+s.delay)}setTimeout((()=>{a()}),0)}const Yh={props:["animation"],watch:{animation:{deep:!0,handler(){Wh(this)}}},mounted(){Wh(this)}},Xh=e=>{e.__reserved=!0;const{props:t,mixins:n}=e;return t&&t.animation||(n||(e.mixins=[])).push(Yh),Jh(e)},Jh=e=>(e.__reserved=!0,e.compatConfig={MODE:3},Xi(e));function Zh(e){return e.__wwe=!0,e}function Qh(e,t){return(n,o,i)=>{e.value&&t(n,function(e,t,n,o){let i;return i=ct(n),{type:o.type||e,timeStamp:t.timeStamp||0,target:i,currentTarget:i,detail:o}}(n,o,e.value,i||{}))}}const ef={hoverClass:{type:String,default:"none"},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:400}};function tf(e){const t=oo(!1);let n,o,i=!1;function a(){requestAnimationFrame((()=>{clearTimeout(o),o=setTimeout((()=>{t.value=!1}),parseInt(e.hoverStayTime))}))}function s(o){o._hoverPropagationStopped||e.hoverClass&&"none"!==e.hoverClass&&!e.disabled&&(e.hoverStopPropagation&&(o._hoverPropagationStopped=!0),i=!0,n=setTimeout((()=>{t.value=!0,i||a()}),parseInt(e.hoverStartTime)))}function r(){i=!1,t.value&&a()}function c(){r(),window.removeEventListener("mouseup",c)}return{hovering:t,binding:{onTouchstartPassive:Zh((function(e){e.touches.length>1||s(e)})),onMousedown:Zh((function(e){i||(s(e),window.addEventListener("mouseup",c))})),onTouchend:Zh((function(){r()})),onMouseup:Zh((function(){i&&c()})),onTouchcancel:Zh((function(){i=!1,t.value=!1,clearTimeout(n)}))}}}function nf(e,t){return v(t)&&(t=[t]),t.reduce(((t,n)=>(e[n]&&(t[n]=!0),t)),Object.create(null))}const of=Qp("uf"),af=Xh({name:"Form",emits:["submit","reset"],setup(e,{slots:t,emit:n}){const o=oo(null);return function(e){const t=[];fs(of,{addField(e){t.push(e)},removeField(e){t.splice(t.indexOf(e),1)},submit(n){e("submit",n,{value:t.reduce(((e,t)=>{if(t.submit){const[n,o]=t.submit();n&&(e[n]=o)}return e}),Object.create(null))})},reset(n){t.forEach((e=>e.reset&&e.reset())),e("reset",n)}})}(Qh(o,n)),()=>_r("uni-form",{ref:o},[_r("span",null,[t.default&&t.default()])],512)}});const sf={for:{type:String,default:""}},rf=Qp("ul");const cf=Xh({name:"Label",props:sf,setup(e,{slots:t}){const n=oo(null),o=uh(),i=function(){const e=[];return fs(rf,{addHandler(t){e.push(t)},removeHandler(t){e.splice(e.indexOf(t),1)}}),e}(),a=Wr((()=>e.for||t.default&&t.default.length)),s=Zh((t=>{const n=t.target;let a=/^uni-(checkbox|radio|switch)-/.test(n.className);a||(a=/^uni-(checkbox|radio|switch|button)$|^(svg|path)$/i.test(n.tagName)),a||(e.for?cL.emit("uni-label-click-"+o+"-"+e.for,t,!0):i.length&&i[0](t,!0))}));return()=>_r("uni-label",{ref:n,class:{"uni-label-pointer":a},onClick:s},[t.default&&t.default()],10,["onClick"])}});function uf(e,t){lf(e.id,t),Ri((()=>e.id),((e,n)=>{df(n,t,!0),lf(e,t,!0)})),Ca((()=>{df(e.id,t)}))}function lf(e,t,n){const o=uh();n&&!e||S(t)&&Object.keys(t).forEach((i=>{n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&cL.on(`uni-${i}-${o}-${e}`,t[i]):0===i.indexOf("uni-")?cL.on(i,t[i]):e&&cL.on(`uni-${i}-${o}-${e}`,t[i])}))}function df(e,t,n){const o=uh();n&&!e||S(t)&&Object.keys(t).forEach((i=>{n?0!==i.indexOf("@")&&0!==i.indexOf("uni-")&&cL.off(`uni-${i}-${o}-${e}`,t[i]):0===i.indexOf("uni-")?cL.off(i,t[i]):e&&cL.off(`uni-${i}-${o}-${e}`,t[i])}))}const pf=Xh({name:"Button",props:{id:{type:String,default:""},hoverClass:{type:String,default:"button-hover"},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},hoverStopPropagation:{type:Boolean,default:!1},disabled:{type:[Boolean,String],default:!1},formType:{type:String,default:""},openType:{type:String,default:""},loading:{type:[Boolean,String],default:!1},plain:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=oo(null),o=gs(of,!1),{hovering:i,binding:a}=tf(e),s=Zh(((t,i)=>{if(e.disabled)return t.stopImmediatePropagation();i&&n.value.click();const a=e.formType;if(a){if(!o)return;"submit"===a?o.submit(t):"reset"===a&&o.reset(t)}else;})),r=gs(rf,!1);return r&&(r.addHandler(s),Ma((()=>{r.removeHandler(s)}))),uf(e,{"label-click":s}),()=>{const o=e.hoverClass,r=nf(e,"disabled"),c=nf(e,"loading"),u=nf(e,"plain"),l=o&&"none"!==o;return _r("uni-button",Er({ref:n,onClick:s,id:e.id,class:l&&i.value?o:""},l&&a,r,c,u),[t.default&&t.default()],16,["onClick","id"])}}}),hf=Qp("upm");function ff(){return gs(hf)}function gf(e){const t=function(e){return qn(function(e){{const{enablePullDownRefresh:t,navigationBar:n}=e;if(t){const t=function(e){return e.offset&&(e.offset=th(e.offset)),e.height&&(e.height=th(e.height)),e.range&&(e.range=th(e.range)),e}(u({support:!0,color:"#2BD009",style:"circle",height:70,range:150,offset:0},e.pullToRefresh)),{type:o,style:i}=n;"custom"!==i&&"transparent"!==o&&(t.offset+=44+Kp.top),e.pullToRefresh=t}}{const{navigationBar:t}=e,{titleSize:n,titleColor:o,backgroundColor:i}=t;t.titleText=t.titleText||"",t.type=t.type||"default",t.titleSize=n||"16px",t.titleColor=o||"#000000",t.backgroundColor=i||"#F8F8F8"}if(history.state){const t=history.state.__type__;"redirectTo"!==t&&"reLaunch"!==t||0!==Wv().length||(e.isEntry=!0,e.isQuit=!0)}return e}(JSON.parse(JSON.stringify(_h(Nd().meta,e)))))}(e);return fs(hf,t),t}function _f(){return Nd()}function mf(){return history.state&&history.state.__id__||1}var vf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yf=function(){const e=new Uint8Array(256);for(var t=0;t<64;t++)e[vf.charCodeAt(t)]=t;return e}();const If=["original","compressed"],Mf=["album","camera"],Cf=["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"];function Tf(e,t){return e&&-1!==t.indexOf(e)?e:t[0]}function Sf(e,t){return!h(e)||0===e.length||e.find((e=>-1===t.indexOf(e)))?t:e}function Ef(e){return function(){try{return e.apply(e,arguments)}catch(Hw){console.error(Hw)}}}let Df=1;const kf={};function Lf(e,t,n,o=!1){return kf[e]={name:t,keepAlive:o,callback:n},e}function bf(e,t,n){if("number"==typeof e){const o=kf[e];if(o)return o.keepAlive||delete kf[e],o.callback(t,n)}return t}function Af(e){for(const t in kf)if(kf[t].name===e)return!0;return!1}const Rf="success",Of="fail",wf="complete";function Pf(e,t={},{beforeAll:n,beforeSuccess:o}={}){S(t)||(t={});const{success:i,fail:a,complete:s}=function(e){const t={};for(const n in e){const o=e[n];m(o)&&(t[n]=Ef(o),delete e[n])}return t}(t),r=m(i),c=m(a),u=m(s),l=Df++;return Lf(l,e,(l=>{(l=l||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(l.errMsg,e),m(n)&&n(l),l.errMsg===e+":ok"?(m(o)&&o(l,t),r&&i(l)):c&&a(l),u&&s(l)})),l}const Nf="success",Gf="fail",Uf="complete",xf={},Ff={};function qf(e,t){return function(n){return e(n,t)||n}}function Vf(e,t,n){let o=!1;for(let i=0;i<e.length;i++){const a=e[i];if(o)o=Promise.resolve(qf(a,n));else{const e=a(t,n);if(M(e)&&(o=Promise.resolve(e)),!1===e)return{then(){},catch(){}}}}return o||{then:e=>e(t),catch(){}}}function Bf(e,t={}){return[Nf,Gf,Uf].forEach((n=>{const o=e[n];if(!h(o))return;const i=t[n];t[n]=function(e){Vf(o,e,t).then((e=>m(i)&&i(e)||e))}})),t}function Hf(e,t){const n=[];h(xf.returnValue)&&n.push(...xf.returnValue);const o=Ff[e];return o&&h(o.returnValue)&&n.push(...o.returnValue),n.forEach((e=>{t=e(t)||t})),t}function jf(e){const t=Object.create(null);Object.keys(xf).forEach((e=>{"returnValue"!==e&&(t[e]=xf[e].slice())}));const n=Ff[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Kf(e,t,n,o){const i=jf(e);if(i&&Object.keys(i).length){if(h(i.invoke)){return Vf(i.invoke,n).then((n=>t(Bf(jf(e),n),...o)))}return t(Bf(i,n),...o)}return t(n,...o)}function $f(e,t){return(n={},...o)=>function(e){return!(!S(e)||![Rf,Of,wf].find((t=>m(e[t]))))}(n)?Hf(e,Kf(e,t,n,o)):Hf(e,new Promise(((i,a)=>{Kf(e,t,u(n,{success:i,fail:a}),o)})))}function zf(e,t,n,o={}){const i=t+":fail";let a="";return a=n?0===n.indexOf(i)?n:i+" "+n:i,delete o.errCode,bf(e,u({errMsg:a},o))}function Wf(e,t,n,o){if(o&&o.beforeInvoke){const e=o.beforeInvoke(t);if(v(e))return e}const i=function(e,t){const n=e[0];if(!t||!t.formatArgs||!S(t.formatArgs)&&S(n))return;const o=t.formatArgs,i=Object.keys(o);for(let a=0;a<i.length;a++){const t=i[a],s=o[t];if(m(s)){const o=s(e[0][t],n);if(v(o))return o}else p(n,t)||(n[t]=s)}}(t,o);if(i)return i}function Yf(e){if(!m(e))throw new Error('Invalid args: type check failed for args "callback". Expected Function')}function Xf(e,t,n){return o=>{Yf(o);const i=Wf(0,[o],0,n);if(i)throw new Error(i);const a=!Af(e);!function(e,t){Lf(Df++,e,t,!0)}(e,o),a&&(!function(e){lL.on("api."+e,(t=>{for(const n in kf){const o=kf[n];o.name===e&&o.callback(t)}}))}(e),t())}}function Jf(e,t,n){return o=>{Yf(o);const i=Wf(0,[o],0,n);if(i)throw new Error(i);!function(e,t){for(const n in kf){const o=kf[n];o.callback===t&&o.name===e&&delete kf[n]}}(e=e.replace("off","on"),o);Af(e)||(!function(e){lL.off("api."+e)}(e),t())}}function Zf(e,t,n,o){return n=>{const i=Pf(e,n,o),a=Wf(0,[n],0,o);return a?zf(i,e,a):t(n,{resolve:t=>function(e,t,n){return bf(e,u(n||{},{errMsg:t+":ok"}))}(i,e,t),reject:(t,n)=>zf(i,e,function(e){return!e||v(e)?e:e.stack?("undefined"!=typeof globalThis&&globalThis.harmonyChannel||console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function Qf(e,t,n){return Xf(e,t,n)}function eg(e,t,n){return Jf(e,t,n)}function tg(e,t,n,o){return $f(e,Zf(e,t,0,o))}function ng(e,t,n,o){return function(e,t,n,o){return(...e)=>{const n=Wf(0,e,0,o);if(n)throw new Error(n);return t.apply(null,e)}}(0,t,0,o)}function og(e,t,n,o){return $f(e,function(e,t,n,o){return Zf(e,t,0,o)}(e,t,0,o))}function ig(e){return`method 'uni.${e}' not supported`}function ag(e){return()=>{console.error(ig(e))}}const sg=ag;function rg(e){return(t,{reject:n})=>n(ig(e))}const cg=ng(0,(e=>function(e){var t,n,o,i,a,s=.75*e.length,r=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),l=new Uint8Array(u);for(t=0;t<r;t+=4)n=yf[e.charCodeAt(t)],o=yf[e.charCodeAt(t+1)],i=yf[e.charCodeAt(t+2)],a=yf[e.charCodeAt(t+3)],l[c++]=n<<2|o>>4,l[c++]=(15&o)<<4|i>>2,l[c++]=(3&i)<<6|63&a;return u}(e))),ug=ng(0,(e=>function(e){var t,n=new Uint8Array(e),o=n.length,i="";for(t=0;t<o;t+=3)i+=vf[n[t]>>2],i+=vf[(3&n[t])<<4|n[t+1]>>4],i+=vf[(15&n[t+1])<<2|n[t+2]>>6],i+=vf[63&n[t+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)));let lg=!1,dg=0,pg=0,hg=960,fg=375,gg=750;function _g(){const{platform:e,pixelRatio:t,windowWidth:n}=function(){const e=Iy(),t=Ty(Cy(e,My(e)));return{platform:fy?"ios":"other",pixelRatio:window.devicePixelRatio,windowWidth:t}}();dg=n,pg=t,lg="ios"===e}function mg(e,t){const n=Number(e);return isNaN(n)?t:n}const vg=ng(0,((e,t)=>{if(0===dg&&(_g(),function(){const e=__uniConfig.globalStyle||{};hg=mg(e.rpxCalcMaxDeviceWidth,960),fg=mg(e.rpxCalcBaseDeviceWidth,375),gg=mg(e.rpxCalcBaseDeviceWidth,750)}()),0===(e=Number(e)))return 0;let n=t||dg;n=e===gg||n<=hg?n:fg;let o=e/750*n;return o<0&&(o=-o),o=Math.floor(o+1e-4),0===o&&(o=1!==pg&&lg?.5:1),e<0?-o:o}));function yg(e,t){Object.keys(t).forEach((n=>{m(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):h(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}(e[n],t[n]))}))}function Ig(e,t){e&&t&&Object.keys(t).forEach((n=>{const o=e[n],i=t[n];h(o)&&m(i)&&l(o,i)}))}const Mg=ng(0,((e,t)=>{v(e)&&S(t)?yg(Ff[e]||(Ff[e]={}),t):S(e)&&yg(xf,e)})),Cg=ng(0,((e,t)=>{v(e)?S(t)?Ig(Ff[e],t):delete Ff[e]:S(e)&&Ig(xf,e)}));const Tg=new class{constructor(){this.$emitter=new Mt}on(e,t){return this.$emitter.on(e,t)}once(e,t){return this.$emitter.once(e,t)}off(e,t){e?this.$emitter.off(e,t):this.$emitter.e={}}emit(e,...t){this.$emitter.emit(e,...t)}},Sg=ng(0,((e,t)=>(Tg.on(e,t),()=>Tg.off(e,t)))),Eg=ng(0,((e,t)=>(Tg.once(e,t),()=>Tg.off(e,t)))),Dg=ng(0,((e,t)=>{h(e)||(e=e?[e]:[]),e.forEach((e=>Tg.off(e,t)))})),kg=ng(0,((e,...t)=>{Tg.emit(e,...t)})),Lg=[.5,.8,1,1.25,1.5,2];class bg{constructor(e,t){this.id=e,this.pageId=t}play(){Sy(this.id,this.pageId,"play")}pause(){Sy(this.id,this.pageId,"pause")}stop(){Sy(this.id,this.pageId,"stop")}seek(e){Sy(this.id,this.pageId,"seek",{position:e})}sendDanmu(e){Sy(this.id,this.pageId,"sendDanmu",e)}playbackRate(e){~Lg.indexOf(e)||(e=1),Sy(this.id,this.pageId,"playbackRate",{rate:e})}requestFullScreen(e={}){Sy(this.id,this.pageId,"requestFullScreen",e)}exitFullScreen(){Sy(this.id,this.pageId,"exitFullScreen")}showStatusBar(){Sy(this.id,this.pageId,"showStatusBar")}hideStatusBar(){Sy(this.id,this.pageId,"hideStatusBar")}}const Ag=ng(0,((e,t)=>new bg(e,lh(t||fh())))),Rg=(e,t,n,o)=>{!function(e,t,n,o,i){lL.invokeViewMethod("map."+e,{type:n,data:o},t,i)}(e,t,n,o,(e=>{o&&((e,t)=>{const n=t.errMsg||"";new RegExp("\\:\\s*fail").test(n)?e.fail&&e.fail(t):e.success&&e.success(t),e.complete&&e.complete(t)})(o,e)}))};class Og{constructor(e,t){this.id=e,this.pageId=t}getCenterLocation(e){Rg(this.id,this.pageId,"getCenterLocation",e)}moveToLocation(e){Rg(this.id,this.pageId,"moveToLocation",e)}getScale(e){Rg(this.id,this.pageId,"getScale",e)}getRegion(e){Rg(this.id,this.pageId,"getRegion",e)}includePoints(e){Rg(this.id,this.pageId,"includePoints",e)}translateMarker(e){Rg(this.id,this.pageId,"translateMarker",e)}$getAppMap(){}addCustomLayer(e){Rg(this.id,this.pageId,"addCustomLayer",e)}removeCustomLayer(e){Rg(this.id,this.pageId,"removeCustomLayer",e)}addGroundOverlay(e){Rg(this.id,this.pageId,"addGroundOverlay",e)}removeGroundOverlay(e){Rg(this.id,this.pageId,"removeGroundOverlay",e)}updateGroundOverlay(e){Rg(this.id,this.pageId,"updateGroundOverlay",e)}initMarkerCluster(e){Rg(this.id,this.pageId,"initMarkerCluster",e)}addMarkers(e){Rg(this.id,this.pageId,"addMarkers",e)}removeMarkers(e){Rg(this.id,this.pageId,"removeMarkers",e)}moveAlong(e){Rg(this.id,this.pageId,"moveAlong",e)}setLocMarkerIcon(e){Rg(this.id,this.pageId,"setLocMarkerIcon",e)}openMapApp(e){Rg(this.id,this.pageId,"openMapApp",e)}on(e,t){Rg(this.id,this.pageId,"on",{name:e,callback:t})}}const wg=ng(0,((e,t)=>new Og(e,lh(t||fh()))));function Pg(e,t){return function(n,o){n?o[e]=Math.round(n):void 0!==t&&(o[e]=t)}}const Ng=Pg("width"),Gg=Pg("height"),Ug={formatArgs:{x:Pg("x"),y:Pg("y"),width:Ng,height:Gg}},xg={canvasId:{type:String,required:!0},x:{type:Number,required:!0},y:{type:Number,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},Fg=Ug,qg=(Uint8ClampedArray,{PNG:"png",JPG:"jpg",JPEG:"jpg"}),Vg={formatArgs:{x:Pg("x",0),y:Pg("y",0),width:Ng,height:Gg,destWidth:Pg("destWidth"),destHeight:Pg("destHeight"),fileType(e,t){e=(e||"").toUpperCase();let n=qg[e];n||(n=qg.PNG),t.fileType=n},quality(e,t){t.quality=e&&e>0&&e<1?e:1}}};function Bg(e,t,n,o,i){lL.invokeViewMethod(`canvas.${e}`,{type:n,data:o},t,(e=>{i&&i(e)}))}var Hg=["scale","rotate","translate","setTransform","transform"],jg=["drawImage","fillText","fill","stroke","fillRect","strokeRect","clearRect","strokeText"],Kg=["setFillStyle","setTextAlign","setStrokeStyle","setGlobalAlpha","setShadow","setFontSize","setLineCap","setLineJoin","setLineWidth","setMiterLimit","setTextBaseline","setLineDash"];const $g={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"#00000000"};function zg(e){let t=null;if(null!=(t=/^#([0-9|A-F|a-f]{6})$/.exec(e=e||"#000000"))){return[parseInt(t[1].slice(0,2),16),parseInt(t[1].slice(2,4),16),parseInt(t[1].slice(4),16),255]}if(null!=(t=/^#([0-9|A-F|a-f]{3})$/.exec(e))){let e=t[1].slice(0,1),n=t[1].slice(1,2),o=t[1].slice(2,3);return e=parseInt(e+e,16),n=parseInt(n+n,16),o=parseInt(o+o,16),[e,n,o,255]}if(null!=(t=/^rgb\((.+)\)$/.exec(e)))return t[1].split(",").map((function(e){return Math.min(255,parseInt(e.trim()))})).concat(255);if(null!=(t=/^rgba\((.+)\)$/.exec(e)))return t[1].split(",").map((function(e,t){return 3===t?Math.floor(255*parseFloat(e.trim())):Math.min(255,parseInt(e.trim()))}));var n=e.toLowerCase();if(p($g,n)){t=/^#([0-9|A-F|a-f]{6,8})$/.exec($g[n]);const e=parseInt(t[1].slice(0,2),16),o=parseInt(t[1].slice(2,4),16),i=parseInt(t[1].slice(4,6),16);let a=parseInt(t[1].slice(6,8),16);return a=a>=0?a:255,[e,o,i,a]}return console.error("unsupported color:"+e),[0,0,0,255]}class Wg{constructor(e,t){this.type=e,this.data=t,this.colorStop=[]}addColorStop(e,t){this.colorStop.push([e,zg(t)])}}class Yg{constructor(e,t){this.type="pattern",this.data=e,this.colorStop=t}}class Xg{constructor(e){this.width=e}}class Jg{constructor(e,t){this.id=e,this.pageId=t,this.actions=[],this.path=[],this.subpath=[],this.drawingState=[],this.state={lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}setFillStyle(e){console.log("initCanvasContextProperty implemented.")}setStrokeStyle(e){console.log("initCanvasContextProperty implemented.")}setShadow(e,t,n,o){console.log("initCanvasContextProperty implemented.")}addColorStop(e,t){console.log("initCanvasContextProperty implemented.")}setLineWidth(e){console.log("initCanvasContextProperty implemented.")}setLineCap(e){console.log("initCanvasContextProperty implemented.")}setLineJoin(e){console.log("initCanvasContextProperty implemented.")}setLineDash(e,t){console.log("initCanvasContextProperty implemented.")}setMiterLimit(e){console.log("initCanvasContextProperty implemented.")}fillRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}strokeRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}clearRect(e,t,n,o){console.log("initCanvasContextProperty implemented.")}fill(){console.log("initCanvasContextProperty implemented.")}stroke(){console.log("initCanvasContextProperty implemented.")}scale(e,t){console.log("initCanvasContextProperty implemented.")}rotate(e){console.log("initCanvasContextProperty implemented.")}translate(e,t){console.log("initCanvasContextProperty implemented.")}setFontSize(e){console.log("initCanvasContextProperty implemented.")}fillText(e,t,n,o){console.log("initCanvasContextProperty implemented.")}setTextAlign(e){console.log("initCanvasContextProperty implemented.")}setTextBaseline(e){console.log("initCanvasContextProperty implemented.")}drawImage(e,t,n,o,i,a,s,r,c){console.log("initCanvasContextProperty implemented.")}setGlobalAlpha(e){console.log("initCanvasContextProperty implemented.")}strokeText(e,t,n,o){console.log("initCanvasContextProperty implemented.")}setTransform(e,t,n,o,i,a){console.log("initCanvasContextProperty implemented.")}draw(e=!1,t){var n=[...this.actions];this.actions=[],this.path=[],Bg(this.id,this.pageId,"actionsChanged",{actions:n,reserve:e},t)}createLinearGradient(e,t,n,o){return new Wg("linear",[e,t,n,o])}createCircularGradient(e,t,n){return new Wg("radial",[e,t,n])}createPattern(e,t){if(void 0===t)console.error("Failed to execute 'createPattern' on 'CanvasContext': 2 arguments required, but only 1 present.");else{if(!(["repeat","repeat-x","repeat-y","no-repeat"].indexOf(t)<0))return new Yg(e,t);console.error("Failed to execute 'createPattern' on 'CanvasContext': The provided type ('"+t+"') is not one of 'repeat', 'no-repeat', 'repeat-x', or 'repeat-y'.")}}measureText(e,t){let n=0;return n=function(e,t){const n=document.createElement("canvas").getContext("2d");return n.font=t,n.measureText(e).width||0}(e,this.state.font),new Xg(n)}save(){this.actions.push({method:"save",data:[]}),this.drawingState.push(this.state)}restore(){this.actions.push({method:"restore",data:[]}),this.state=this.drawingState.pop()||{lineDash:[0,0],shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:[0,0,0,0],font:"10px sans-serif",fontSize:10,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"}}beginPath(){this.path=[],this.subpath=[],this.path.push({method:"beginPath",data:[]})}moveTo(e,t){this.path.push({method:"moveTo",data:[e,t]}),this.subpath=[[e,t]]}lineTo(e,t){0===this.path.length&&0===this.subpath.length?this.path.push({method:"moveTo",data:[e,t]}):this.path.push({method:"lineTo",data:[e,t]}),this.subpath.push([e,t])}quadraticCurveTo(e,t,n,o){this.path.push({method:"quadraticCurveTo",data:[e,t,n,o]}),this.subpath.push([n,o])}bezierCurveTo(e,t,n,o,i,a){this.path.push({method:"bezierCurveTo",data:[e,t,n,o,i,a]}),this.subpath.push([i,a])}arc(e,t,n,o,i,a=!1){this.path.push({method:"arc",data:[e,t,n,o,i,a]}),this.subpath.push([e,t])}rect(e,t,n,o){this.path.push({method:"rect",data:[e,t,n,o]}),this.subpath=[[e,t]]}arcTo(e,t,n,o,i){this.path.push({method:"arcTo",data:[e,t,n,o,i]}),this.subpath.push([n,o])}clip(){this.actions.push({method:"clip",data:[...this.path]})}closePath(){this.path.push({method:"closePath",data:[]}),this.subpath.length&&(this.subpath=[this.subpath.shift()])}clearActions(){this.actions=[],this.path=[],this.subpath=[]}getActions(){var e=[...this.actions];return this.clearActions(),e}set lineDashOffset(e){this.actions.push({method:"setLineDashOffset",data:[e]})}set globalCompositeOperation(e){this.actions.push({method:"setGlobalCompositeOperation",data:[e]})}set shadowBlur(e){this.actions.push({method:"setShadowBlur",data:[e]})}set shadowColor(e){this.actions.push({method:"setShadowColor",data:[e]})}set shadowOffsetX(e){this.actions.push({method:"setShadowOffsetX",data:[e]})}set shadowOffsetY(e){this.actions.push({method:"setShadowOffsetY",data:[e]})}set font(e){var t=this;this.state.font=e;var n=e.match(/^(([\w\-]+\s)*)(\d+r?px)(\/(\d+\.?\d*(r?px)?))?\s+(.*)/);if(n){var o=n[1].trim().split(/\s/),i=parseFloat(n[3]),a=n[7],s=[];o.forEach((function(e,n){["italic","oblique","normal"].indexOf(e)>-1?(s.push({method:"setFontStyle",data:[e]}),t.state.fontStyle=e):["bold","normal"].indexOf(e)>-1?(s.push({method:"setFontWeight",data:[e]}),t.state.fontWeight=e):0===n?(s.push({method:"setFontStyle",data:["normal"]}),t.state.fontStyle="normal"):1===n&&r()})),1===o.length&&r(),o=s.map((function(e){return e.data[0]})).join(" "),this.state.fontSize=i,this.state.fontFamily=a,this.actions.push({method:"setFont",data:[`${o} ${i}px ${a}`]})}else console.warn("Failed to set 'font' on 'CanvasContext': invalid format.");function r(){s.push({method:"setFontWeight",data:["normal"]}),t.state.fontWeight="normal"}}get font(){return this.state.font}set fillStyle(e){this.setFillStyle(e)}set strokeStyle(e){this.setStrokeStyle(e)}set globalAlpha(e){e=Math.floor(255*parseFloat(e)),this.actions.push({method:"setGlobalAlpha",data:[e]})}set textAlign(e){this.actions.push({method:"setTextAlign",data:[e]})}set lineCap(e){this.actions.push({method:"setLineCap",data:[e]})}set lineJoin(e){this.actions.push({method:"setLineJoin",data:[e]})}set lineWidth(e){this.actions.push({method:"setLineWidth",data:[e]})}set miterLimit(e){this.actions.push({method:"setMiterLimit",data:[e]})}set textBaseline(e){this.actions.push({method:"setTextBaseline",data:[e]})}}const Zg=je((()=>{[...Hg,...jg].forEach((function(e){Jg.prototype[e]=function(e){switch(e){case"fill":case"stroke":return function(){this.actions.push({method:e+"Path",data:[...this.path]})};case"fillRect":return function(e,t,n,o){this.actions.push({method:"fillPath",data:[{method:"rect",data:[e,t,n,o]}]})};case"strokeRect":return function(e,t,n,o){this.actions.push({method:"strokePath",data:[{method:"rect",data:[e,t,n,o]}]})};case"fillText":case"strokeText":return function(t,n,o,i){var a=[t.toString(),n,o];"number"==typeof i&&a.push(i),this.actions.push({method:e,data:a})};case"drawImage":return function(t,n,o,i,a,s,r,c,u){var l;function d(e){return"number"==typeof e}void 0===u&&(s=n,r=o,c=i,u=a,n=void 0,o=void 0,i=void 0,a=void 0),l=d(n)&&d(o)&&d(i)&&d(a)?[t,s,r,c,u,n,o,i,a]:d(c)&&d(u)?[t,s,r,c,u]:[t,s,r],this.actions.push({method:e,data:l})};default:return function(...t){this.actions.push({method:e,data:t})}}}(e)})),Kg.forEach((function(e){Jg.prototype[e]=function(e){switch(e){case"setFillStyle":case"setStrokeStyle":return function(t){"object"!=typeof t?this.actions.push({method:e,data:["normal",zg(t)]}):this.actions.push({method:e,data:[t.type,t.data,t.colorStop]})};case"setGlobalAlpha":return function(t){t=Math.floor(255*parseFloat(t)),this.actions.push({method:e,data:[t]})};case"setShadow":return function(t,n,o,i){i=zg(i),this.actions.push({method:e,data:[t,n,o,i]}),this.state.shadowBlur=o,this.state.shadowColor=i,this.state.shadowOffsetX=t,this.state.shadowOffsetY=n};case"setLineDash":return function(t,n){t=t||[0,0],n=n||0,this.actions.push({method:e,data:[t,n]}),this.state.lineDash=t};case"setFontSize":return function(t){this.state.font=this.state.font.replace(/\d+\.?\d*px/,t+"px"),this.state.fontSize=t,this.actions.push({method:e,data:[t]})};default:return function(...t){this.actions.push({method:e,data:t})}}}(e)}))})),Qg=ng(0,((e,t)=>{if(Zg(),t)return new Jg(e,lh(t));const n=lh(fh());if(n)return new Jg(e,n);lL.emit(he,"createCanvasContext:fail")})),e_=og("canvasGetImageData",(({canvasId:e,x:t,y:n,width:o,height:i},{resolve:a,reject:s})=>{const r=lh(fh());r?Bg(e,r,"getImageData",{x:t,y:n,width:o,height:i},(function(e){if(e.errMsg&&-1!==e.errMsg.indexOf("fail"))return void s("",e);let t=e.data;t&&t.length&&(e.data=new Uint8ClampedArray(t)),delete e.compressed,a(e)})):s()}),0,Ug),t_=og("canvasPutImageData",(({canvasId:e,data:t,x:n,y:o,width:i,height:a},{resolve:s,reject:r})=>{var c=lh(fh());if(!c)return void r();t=Array.prototype.slice.call(t),Bg(e,c,"putImageData",{data:t,x:n,y:o,width:i,height:a,compressed:void 0},(e=>{e.errMsg&&-1!==e.errMsg.indexOf("fail")?r():s(e)}))}),0,Fg),n_=og("canvasToTempFilePath",(({x:e=0,y:t=0,width:n,height:o,destWidth:i,destHeight:a,canvasId:s,fileType:r,quality:c},{resolve:u,reject:l})=>{var d=lh(fh());if(!d)return void l();Bg(s,d,"toTempFilePath",{x:e,y:t,width:n,height:o,destWidth:i,destHeight:a,fileType:r,quality:c,dirname:"/canvas"},(e=>{e.errMsg&&-1!==e.errMsg.indexOf("fail")?l("",e):u(e)}))}),0,Vg),o_=["onCanplay","onPlay","onPause","onStop","onEnded","onTimeUpdate","onError","onWaiting","onSeeking","onSeeked"],i_=["offCanplay","offPlay","offPause","offStop","offEnded","offTimeUpdate","offError","offWaiting","offSeeking","offSeeked"],a_={thresholds:[0],initialRatio:0,observeAll:!1},s_=["top","right","bottom","left"];let r_=1;function c_(e={}){return s_.map((t=>`${Number(e[t])||0}px`)).join(" ")}class u_{constructor(e,t){this._pageId=lh(e),this._component=e,this._options=u({},a_,t)}relativeTo(e,t){return this._options.relativeToSelector=e,this._options.rootMargin=c_(t),this}relativeToViewport(e){return this._options.relativeToSelector=void 0,this._options.rootMargin=c_(e),this}observe(e,t){m(t)&&(this._options.selector=e,this._reqId=r_++,function({reqId:e,component:t,options:n,callback:o}){const i=uy(t);(i.__io||(i.__io={}))[e]=function(e,t,n){_v();const o=t.relativeToSelector?e.querySelector(t.relativeToSelector):null,i=new IntersectionObserver((e=>{e.forEach((e=>{n({intersectionRatio:vv(e),intersectionRect:mv(e.intersectionRect),boundingClientRect:mv(e.boundingClientRect),relativeRect:mv(e.rootBounds),time:Date.now(),dataset:at(e.target),id:e.target.id})}))}),{root:o,rootMargin:t.rootMargin,threshold:t.thresholds});if(t.observeAll){i.USE_MUTATION_OBSERVER=!0;const n=e.querySelectorAll(t.selector);for(let e=0;e<n.length;e++)i.observe(n[e])}else{i.USE_MUTATION_OBSERVER=!1;const n=e.querySelector(t.selector);n?i.observe(n):console.warn(`Node ${t.selector} is not found. Intersection observer will not trigger.`)}return i}(i,n,o)}({reqId:this._reqId,component:this._component,options:this._options,callback:t},this._pageId))}disconnect(){this._reqId&&function({reqId:e,component:t}){const n=uy(t),o=n.__io&&n.__io[e];o&&(o.disconnect(),delete n.__io[e])}({reqId:this._reqId,component:this._component},this._pageId)}}const l_=ng(0,((e,t)=>((e=Xe(e))&&!lh(e)&&(t=e,e=null),new u_(e||fh(),t))));let d_=1;class p_{constructor(e){this._pageId=e.$page&&e.$page.id,this._component=e}observe(e,t){m(t)&&(this._reqId=d_++,function({reqId:e,component:t,options:n,callback:o}){const i=ky[e]=window.matchMedia(function(e){const t=[],n=["width","minWidth","maxWidth","height","minHeight","maxHeight","orientation"];for(const o of n)"orientation"!==o&&e[o]&&Number(e[o]>=0)&&t.push(`(${by(o)}: ${Number(e[o])}px)`),"orientation"===o&&e[o]&&t.push(`(${by(o)}: ${e[o]})`);return t.join(" and ")}(n)),a=Ly[e]=e=>o(e.matches);a(i),i.addListener(a)}({reqId:this._reqId,component:this._component,options:e,callback:t},this._pageId))}disconnect(){this._reqId&&function({reqId:e,component:t}){const n=Ly[e],o=ky[e];o&&(o.removeListener(n),delete Ly[e],delete ky[e])}({reqId:this._reqId,component:this._component},this._pageId)}}const h_=ng(0,(e=>((e=Xe(e))&&!lh(e)&&(e=null),new p_(e||fh()))));let f_=0,g_={};const __={canvas:Jg,map:Og,video:bg,editor:class{constructor(e,t){this.id=e,this.pageId=t}format(e,t){this._exec("format",{name:e,value:t})}insertDivider(){this._exec("insertDivider")}insertImage(e){this._exec("insertImage",e)}insertText(e){this._exec("insertText",e)}setContents(e){this._exec("setContents",e)}getContents(e){this._exec("getContents",e)}clear(e){this._exec("clear",e)}removeFormat(e){this._exec("removeFormat",e)}undo(e){this._exec("undo",e)}redo(e){this._exec("redo",e)}blur(e){this._exec("blur",e)}getSelectionText(e){this._exec("getSelectionText",e)}scrollIntoView(e){this._exec("scrollIntoView",e)}_exec(e,t){!function(e,t,n,o){const i={options:o},a=o&&("success"in o||"fail"in o||"complete"in o);if(a){const e=String(f_++);i.callbackId=e,g_[e]=o}lL.invokeViewMethod(`editor.${e}`,{type:n,data:i},t,(({callbackId:e,data:t})=>{a&&(ze(g_[e],t),delete g_[e])}))}(this.id,this.pageId,e,t)}}};function m_(e){if(e&&e.contextInfo){const{id:t,type:n,page:o}=e.contextInfo,i=__[n];e.context=new i(t,o),delete e.contextInfo}}class v_{constructor(e,t,n,o){this._selectorQuery=e,this._component=t,this._selector=n,this._single=o}boundingClientRect(e){return this._selectorQuery._push(this._selector,this._component,this._single,{id:!0,dataset:!0,rect:!0,size:!0},e),this._selectorQuery}fields(e,t){return this._selectorQuery._push(this._selector,this._component,this._single,e,t),this._selectorQuery}scrollOffset(e){return this._selectorQuery._push(this._selector,this._component,this._single,{id:!0,dataset:!0,scrollOffset:!0},e),this._selectorQuery}context(e){return this._selectorQuery._push(this._selector,this._component,this._single,{context:!0},e),this._selectorQuery}node(e){return this._selectorQuery._push(this._selector,this._component,this._single,{node:!0},e),this._selectorQuery}}class y_{constructor(e){this._component=void 0,this._page=e,this._queue=[],this._queueCb=[]}exec(e){return function(e,t,n){const o=[];t.forEach((({component:t,selector:n,single:i,fields:a})=>{null===t?o.push(function(e){const t={};e.id&&(t.id="");e.dataset&&(t.dataset={});e.rect&&(t.left=0,t.right=0,t.top=0,t.bottom=0);e.size&&(t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight);if(e.scrollOffset){const e=document.documentElement,n=document.body;t.scrollLeft=e.scrollLeft||n.scrollLeft||0,t.scrollTop=e.scrollTop||n.scrollTop||0,t.scrollHeight=e.scrollHeight||n.scrollHeight||0,t.scrollWidth=e.scrollWidth||n.scrollWidth||0}return t}(a)):o.push(function(e,t,n,o,i){const a=function(e,t){if(!e)return t.$el;return e.$el}(t,e),s=a.parentElement;if(!s)return o?null:[];const{nodeType:r}=a,c=3===r||8===r;if(o){const e=c?s.querySelector(n):Dy(a,n)?a:a.querySelector(n);return e?Ey(e,i):null}{let e=[];const t=(c?s:a).querySelectorAll(n);return t&&t.length&&[].forEach.call(t,(t=>{e.push(Ey(t,i))})),!c&&Dy(a,n)&&e.unshift(Ey(a,i)),e}}(e,t,n,i,a))})),n(o)}(this._page,this._queue,(t=>{const n=this._queueCb;t.forEach(((e,t)=>{h(e)?e.forEach(m_):m_(e);const o=n[t];m(o)&&o.call(this,e)})),m(e)&&e.call(this,t)})),this._nodesRef}in(e){return this._component=Xe(e),this}select(e){return this._nodesRef=new v_(this,this._component,e,!0)}selectAll(e){return this._nodesRef=new v_(this,this._component,e,!1)}selectViewport(){return this._nodesRef=new v_(this,null,"",!0)}_push(e,t,n,o,i){this._queue.push({component:t,selector:e,single:n,fields:o}),this._queueCb.push(i)}}const I_=ng(0,(e=>((e=Xe(e))&&!lh(e)&&(e=null),new y_(e||fh())))),M_={formatArgs:{}},C_={duration:400,timingFunction:"linear",delay:0,transformOrigin:"50% 50% 0"};class T_{constructor(e){this.actions=[],this.currentTransform={},this.currentStepAnimates=[],this.option=u({},C_,e)}_getOption(e){const t={transition:u({},this.option,e),transformOrigin:""};return t.transformOrigin=t.transition.transformOrigin,delete t.transition.transformOrigin,t}_pushAnimates(e,t){this.currentStepAnimates.push({type:e,args:t})}_converType(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}_getValue(e){return"number"==typeof e?`${e}px`:e}export(){const e=this.actions;return this.actions=[],{actions:e}}step(e){return this.currentStepAnimates.forEach((e=>{"style"!==e.type?this.currentTransform[e.type]=e:this.currentTransform[`${e.type}.${e.args[0]}`]=e})),this.actions.push({animates:Object.values(this.currentTransform),option:this._getOption(e)}),this.currentStepAnimates=[],this}}const S_=je((()=>{const e=["opacity","backgroundColor"],t=["width","height","left","right","top","bottom"];["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"].concat(e,t).forEach((n=>{T_.prototype[n]=function(...o){return e.concat(t).includes(n)?this._pushAnimates("style",[this._converType(n),t.includes(n)?this._getValue(o[0]):o[0]]):this._pushAnimates(n,o),this}}))})),E_=ng(0,(e=>(S_(),new T_(e))),0,M_),D_=Qf("onTabBarMidButtonTap",(()=>{})),k_=Qf("onWindowResize",(()=>{})),L_=eg("offWindowResize",(()=>{})),b_="onLocaleChange",A_=ng(0,(()=>{const e=CC();return e&&e.$vm?e.$vm.$locale:op().getLocale()})),R_=Qf(b_,(()=>{})),O_=ng(0,(e=>{const t=CC();if(!t)return!1;return t.$vm.$locale!==e&&(t.$vm.$locale=e,navigator.cookieEnabled&&window.localStorage&&(localStorage[se]=e),lL.invokeOnCallback(b_,{locale:e}),!0)})),w_=og("setPageMeta",((e,{resolve:t})=>{t(function(e,{pageStyle:t,rootFontSize:n}){if(t){(document.querySelector("uni-page-body")||document.body).setAttribute("style",t)}n&&document.documentElement.style.fontSize!==n&&(document.documentElement.style.fontSize=n)}(fh(),e))})),P_="getSelectedTextRange",N_=og(P_,((e,{resolve:t,reject:n})=>{lL.invokeViewMethod(P_,{},hh(),(e=>{void 0===e.end&&void 0===e.start?n("no focused"):t(e)}))})),G_={[_e]:[],[ge]:[],[he]:[],[de]:[],[pe]:[]};function U_(e,t){const n=CC();if(n&&n.$vm)return ga(e,t,n.$vm.$);G_[e].push(t)}function x_(e,t){const n=CC();if(n&&n.$vm)return function(e,t,n){const o=e.$[t];h(o)&&n.__weh&&l(o,n.__weh)}(n.$vm,e,t);l(G_[e],t)}const F_=ng(0,(()=>Uy())),q_=ng(0,(()=>u({},Ny)));let V_,B_,H_;function j_(e){try{return JSON.parse(e)}catch(Hw){}return e}const K_=[];function $_(e,t){K_.forEach((n=>{n(e,t)})),K_.length=0}const z_=og("getPushClientId",((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{void 0===H_&&(H_=!1,V_="",B_="uniPush is not enabled"),K_.push(((e,o)=>{e?t({cid:e}):n(o)})),void 0!==V_&&$_(V_,B_)}))})),W_=[],Y_={formatArgs:{showToast:!0},beforeInvoke(){dp()},beforeSuccess(e,t){if(!t.showToast)return;const{t:n}=op(),o=n("uni.setClipboardData.success");o&&uni.showToast({title:o,icon:"success",mask:!1})}},X_=(Boolean,"onAccelerometer"),J_="onCompass",Z_="removeStorage",Q_={formatArgs:{filePath(e,t){t.filePath=dy(e)}}},em={formatArgs:{filePath(e,t){t.filePath=dy(e)}}},tm=["wgs84","gcj02"],nm={formatArgs:{type(e,t){e=(e||"").toLowerCase(),-1===tm.indexOf(e)?t.type=tm[0]:t.type=e},altitude(e,t){t.altitude=e||!1}}},om=(Boolean,(e,t)=>{if(void 0===t)return`${e} should not be empty.`;if("number"!=typeof t){let e=typeof t;return e=e[0].toUpperCase()+e.substring(1),`Expected Number, got ${e} with value ${JSON.stringify(t)}.`}}),im={formatArgs:{latitude(e,t){const n=om("latitude",e);if(n)return n;t.latitude=e},longitude(e,t){const n=om("longitude",e);if(n)return n;t.longitude=e},scale(e,t){e=Math.floor(e),t.scale=e>=5&&e<=18?e:18}}},am={formatArgs:{count(e,t){(!e||e<=0)&&(t.count=9)},sizeType(e,t){t.sizeType=Sf(e,If)},sourceType(e,t){t.sourceType=Sf(e,Mf)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}},sm={formatArgs:{sourceType(e,t){t.sourceType=Sf(e,Mf)},compressed:!0,maxDuration:60,camera:"back",extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}},rm=(Boolean,["all","image","video"]),cm={formatArgs:{count(e,t){(!e||e<=0)&&(t.count=100)},sourceType(e,t){t.sourceType=Sf(e,Mf)},type(e,t){t.type=Tf(e,rm)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=[""])}}},um={formatArgs:{src(e,t){t.src=dy(e)}}},lm={formatArgs:{urls(e,t){t.urls=e.map((e=>v(e)&&e?dy(e):""))},current(e,t){"number"==typeof e?t.current=e>0&&e<t.urls.length?e:0:v(e)&&e&&(t.current=dy(e))}}},dm={formatArgs:{src(e,t){t.src=dy(e)}}},pm="saveImageToPhotosAlbum",hm="saveVideoToPhotosAlbum",fm="json",gm=["text","arraybuffer"],_m=encodeURIComponent;ArrayBuffer,Boolean;const mm={formatArgs:{method(e,t){t.method=Tf((e||"").toUpperCase(),Cf)},data(e,t){t.data=e||""},url(e,t){t.method===Cf[0]&&S(t.data)&&Object.keys(t.data).length&&(t.url=function(e,t){let n=e.split("#");const o=n[1]||"";n=n[0].split("?");let i=n[1]||"";e=n[0];const a=i.split("&").filter((e=>e)),s={};a.forEach((e=>{const t=e.split("=");s[t[0]]=t[1]}));for(const r in t)if(p(t,r)){let e=t[r];null==e?e="":S(e)&&(e=JSON.stringify(e)),s[_m(r)]=_m(e)}return i=Object.keys(s).map((e=>`${e}=${s[e]}`)).join("&"),e+(i?"?"+i:"")+(o?"#"+o:"")}(e,t.data))},header(e,t){const n=t.header=e||{};t.method!==Cf[0]&&(Object.keys(n).find((e=>"content-type"===e.toLowerCase()))||(n["Content-Type"]="application/json"))},dataType(e,t){t.dataType=(e||fm).toLowerCase()},responseType(e,t){t.responseType=(e||"").toLowerCase(),-1===gm.indexOf(t.responseType)&&(t.responseType="text")}}},vm={formatArgs:{header(e,t){t.header=e||{}}}},ym={formatArgs:{filePath(e,t){e&&(t.filePath=dy(e))},header(e,t){t.header=e||{}},formData(e,t){t.formData=e||{}}}},Im={formatArgs:{header(e,t){t.header=e||{}},method(e,t){t.method=Tf((e||"").toUpperCase(),Cf)},protocols(e,t){v(e)&&(t.protocols=[e])}}},Mm="onLocationChange",Cm="onLocationChangeError",Tm=["wgs84","gcj02"],Sm={formatArgs:{type(e,t){e=(e||"").toLowerCase(),-1===Tm.indexOf(e)?t.type=Tm[1]:t.type=e}}};const Em={url:{type:String,required:!0}},Dm="navigateTo",km="redirectTo",Lm="reLaunch",bm="switchTab",Am="preloadPage",Rm=(Gm(["slide-in-right","slide-in-left","slide-in-top","slide-in-bottom","fade-in","zoom-out","zoom-fade-out","pop-in","none"]),Gm(["slide-out-right","slide-out-left","slide-out-top","slide-out-bottom","fade-out","zoom-in","zoom-fade-in","pop-out","none"]),Fm(Dm)),Om=Fm(km),wm=Fm(Lm),Pm=Fm(bm),Nm={formatArgs:{delta(e,t){e=parseInt(e+"")||1,t.delta=Math.min(Wv().length-1,e)}}};function Gm(e){return{animationType:{type:String,validator(t){if(t&&-1===e.indexOf(t))return"`"+t+"` is not supported for `animationType` (supported values are: `"+e.join("`|`")+"`)"}},animationDuration:{type:Number}}}let Um;function xm(){Um=""}function Fm(e){return{formatArgs:{url:qm(e)},beforeAll:xm}}function qm(e){return function(t,n){if(!t)return'Missing required args: "url"';const o=(t=function(e){if(0===e.indexOf("/")||0===e.indexOf("uni:"))return e;let t="";const n=Wv();return n.length&&(t=nh(n[n.length-1]).route),Th(t,e)}(t)).split("?")[0],i=Sh(o,!0);if(!i)return"page `"+t+"` is not found";if(e===Dm||e===km){if(i.meta.isTabBar)return`can not ${e} a tabbar page`}else if(e===bm&&!i.meta.isTabBar)return"can not switch to no-tabBar page";if(e!==bm&&e!==Am||!i.meta.isTabBar||"appLaunch"===n.openType||(t=o),i.meta.isEntry&&(t=t.replace(i.alias,"/")),n.url=function(e){if(!v(e))return e;const t=e.indexOf("?");if(-1===t)return e;const n=e.slice(t+1).trim().replace(/^(\?|#|&)/,"");if(!n)return e;e=e.slice(0,t);const o=[];return n.split("&").forEach((e=>{const t=e.replace(/\+/g," ").split("="),n=t.shift(),i=t.length>0?t.join("="):"";o.push(n+"="+encodeURIComponent(i))})),o.length?e+"?"+o.join("&"):e}(t),"unPreloadPage"!==e)if(e!==Am){if(Um===t&&"appLaunch"!==n.openType)return`${Um} locked`;__uniConfig.ready&&(Um=t)}else if(i.meta.isTabBar){const e=Wv(),t=i.path.slice(1);if(e.find((e=>e.route===t)))return"tabBar page `"+t+"` already exists"}}}const Vm="setNavigationBarColor",Bm={formatArgs:{animation(e,t){e||(e={duration:0,timingFunc:"linear"}),t.animation={duration:e.duration||0,timingFunc:e.timingFunc||"linear"}}}},Hm="setNavigationBarTitle",jm="showNavigationBarLoading",Km="hideNavigationBarLoading",$m={formatArgs:{duration:300}},zm={formatArgs:{itemColor:"#000"}},Wm=(Boolean,{formatArgs:{title:"",mask:!1}}),Ym=(Boolean,{beforeInvoke(){up()},formatArgs:{title:"",content:"",placeholderText:"",showCancel:!0,editable:!1,cancelText(e,t){if(!p(t,"cancelText")){const{t:e}=op();t.cancelText=e("uni.showModal.cancel")}},cancelColor:"#000",confirmText(e,t){if(!p(t,"confirmText")){const{t:e}=op();t.confirmText=e("uni.showModal.confirm")}},confirmColor:ce}}),Xm=["success","loading","none","error"],Jm=(Boolean,{formatArgs:{title:"",icon(e,t){t.icon=Tf(e,Xm)},image(e,t){t.image=e?dy(e):""},duration:1500,mask:!1}}),Zm="startPullDownRefresh",Qm="stopPullDownRefresh",ev={beforeInvoke(){const e=ph();if(e&&!e.isTabBar)return"not TabBar page"},formatArgs:{index(e){if(!__uniConfig.tabBar.list[e])return"tabbar item not found"}}},tv="setTabBarItem",nv={beforeInvoke:ev.beforeInvoke,formatArgs:u({pagePath(e,t){e&&(t.pagePath=Be(e))}},ev.formatArgs)},ov="setTabBarStyle",iv=/^(linear|radial)-gradient\(.+?\);?$/,av={beforeInvoke:ev.beforeInvoke,formatArgs:{backgroundImage(e,t){e&&!iv.test(e)&&(t.backgroundImage=dy(e))},borderStyle(e,t){e&&(t.borderStyle="white"===e?"white":"black")}}},sv="hideTabBar",rv="showTabBar",cv="hideTabBarRedDot",uv=ev,lv="showTabBarRedDot",dv=ev,pv="removeTabBarBadge",hv=ev,fv="setTabBarBadge",gv={beforeInvoke:ev.beforeInvoke,formatArgs:u({text(e,t){(function(e=""){return(""+e).replace(/[^\x00-\xff]/g,"**").length})(e)>=4&&(t.text="...")}},ev.formatArgs)},_v=function(){if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=function(){for(var e=window.document,t=i(e);t;)t=i(e=t.ownerDocument);return e}(),t=[],n=null,o=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return n||(n=function(e,n){o=e&&n?d(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach((function(e){e._checkForIntersections()}))}),n},s._resetCrossOriginUpdater=function(){n=null,o=null},s.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},s.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},s.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},s.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var o=this._checkForIntersections,a=null,s=null;this.POLL_INTERVAL?a=n.setInterval(o,this.POLL_INTERVAL):(r(n,"resize",o,!0),r(t,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(s=new n.MutationObserver(o)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push((function(){var e=t.defaultView;e&&(a&&e.clearInterval(a),c(e,"resize",o,!0)),c(t,"scroll",o,!0),s&&s.disconnect()}));var u=this.root&&(this.root.ownerDocument||this.root)||e;if(t!=u){var l=i(t);l&&this._monitorIntersections(l.ownerDocument)}}},s.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var o=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some((function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=o;){var a=i(n);if((n=a&&a.ownerDocument)==t)return!0}return!1}))){var a=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),a(),t!=o){var s=i(t);s&&this._unmonitorIntersections(s.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},s.prototype._checkForIntersections=function(){if(this.root||!n||o){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(o){var i=o.element,s=u(i),r=this._rootContainsTarget(i),c=o.entry,l=e&&r&&this._computeTargetAndRootIntersection(i,s,t),d=null;this._rootContainsTarget(i)?n&&!this.root||(d=t):d={top:0,bottom:0,left:0,right:0,width:0,height:0};var p=o.entry=new a({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:s,rootBounds:d,intersectionRect:l});c?e&&r?this._hasCrossedThreshold(c,p)&&this._queuedEntries.push(p):c&&c.isIntersecting&&this._queuedEntries.push(p):this._queuedEntries.push(p)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(t,i,a){if("none"!=window.getComputedStyle(t).display){for(var s,r,c,l,p,f,g,_,m=i,v=h(t),y=!1;!y&&v;){var I=null,M=1==v.nodeType?window.getComputedStyle(v):{};if("none"==M.display)return null;if(v==this.root||9==v.nodeType)if(y=!0,v==this.root||v==e)n&&!this.root?!o||0==o.width&&0==o.height?(v=null,I=null,m=null):I=o:I=a;else{var C=h(v),T=C&&u(C),S=C&&this._computeTargetAndRootIntersection(C,T,a);T&&S?(v=C,I=d(T,S)):(v=null,m=null)}else{var E=v.ownerDocument;v!=E.body&&v!=E.documentElement&&"visible"!=M.overflow&&(I=u(v))}if(I&&(s=I,r=m,c=void 0,l=void 0,p=void 0,f=void 0,g=void 0,_=void 0,c=Math.max(s.top,r.top),l=Math.min(s.bottom,r.bottom),p=Math.max(s.left,r.left),f=Math.min(s.right,r.right),_=l-c,m=(g=f-p)>=0&&_>=0&&{top:c,bottom:l,left:p,right:f,width:g,height:_}||null),!m)break;v=v&&h(v)}return m}},s.prototype._getRootRect=function(){var t;if(this.root&&!f(this.root))t=u(this.root);else{var n=f(this.root)?this.root:e,o=n.documentElement,i=n.body;t={top:0,left:0,right:o.clientWidth||i.clientWidth,width:o.clientWidth||i.clientWidth,bottom:o.clientHeight||i.clientHeight,height:o.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},s.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},s.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,o=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==o)for(var i=0;i<this.thresholds.length;i++){var a=this.thresholds[i];if(a==n||a==o||a<n!=a<o)return!0}},s.prototype._rootIsInDom=function(){return!this.root||p(e,this.root)},s.prototype._rootContainsTarget=function(t){var n=this.root&&(this.root.ownerDocument||this.root)||e;return p(n,t)&&(!this.root||n==t.ownerDocument)},s.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},s.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=a}function i(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(Hw){return null}}function a(e){this.time=e.time,this.target=e.target,this.rootBounds=l(e.rootBounds),this.boundingClientRect=l(e.boundingClientRect),this.intersectionRect=l(e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,o=this.intersectionRect,i=o.width*o.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function s(e,t){var n,o,i,a=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(a.root&&1!=a.root.nodeType&&9!=a.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),o))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(a.rootMargin),this.thresholds=this._initThresholds(a.threshold),this.root=a.root||null,this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function r(e,t,n,o){"function"==typeof e.addEventListener?e.addEventListener(t,n,o):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function c(e,t,n,o){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,o):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function u(e){var t;try{t=e.getBoundingClientRect()}catch(n){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function d(e,t){var n=t.top-e.top,o=t.left-e.left;return{top:n,left:o,height:t.height,width:t.width,bottom:n+t.height,right:o+t.width}}function p(e,t){for(var n=t;n;){if(n==e)return!0;n=h(n)}return!1}function h(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?i(t):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function f(e){return e&&9===e.nodeType}};function mv(e){const{bottom:t,height:n,left:o,right:i,top:a,width:s}=e||{};return{bottom:t,height:n,left:o,right:i,top:a,width:s}}function vv(e){const{intersectionRatio:t,boundingClientRect:{height:n,width:o},intersectionRect:{height:i,width:a}}=e;return 0!==t?t:i===n?a/o:i/n}function yv(){const e=fh();if(!e)return;const t=zv(),n=t.keys();for(const o of n){const e=t.get(o);e.$.__isTabBar?e.$.__isActive=!1:Xv(o)}e.$.__isTabBar&&(e.$.__isVisible=!1,vh(e,pe))}function Iv(e,t){return e===t.fullPath||"/"===e&&t.meta.isEntry}function Mv(e){const t=zv().values();for(const n of t){const t=Vv(n);if(Iv(e,t))return n.$.__isActive=!0,t.id}}const Cv=og(bm,(({url:e,tabBarText:t,isAutomatedTesting:n},{resolve:o,reject:i})=>{if(Bv.handledBeforeEntryPageRoutes)return yv(),kv({type:bm,url:e,tabBarText:t,isAutomatedTesting:n},Mv(e)).then(o).catch(i);jv.push({args:{type:bm,url:e,tabBarText:t,isAutomatedTesting:n},resolve:o,reject:i})}),0,Pm);function Tv(){const e=dh();if(!e)return;const t=Vv(e);Xv(ey(t.path,t.id))}const Sv=og(km,(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>{if(Bv.handledBeforeEntryPageRoutes)return Tv(),kv({type:km,url:e,isAutomatedTesting:t}).then(n).catch(o);Kv.push({args:{type:km,url:e,isAutomatedTesting:t},resolve:n,reject:o})}),0,Om);function Ev(){const e=zv().keys();for(const t of e)Xv(t)}const Dv=og(Lm,(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>{if(Bv.handledBeforeEntryPageRoutes)return Ev(),kv({type:Lm,url:e,isAutomatedTesting:t}).then(n).catch(o);$v.push({args:{type:Lm,url:e,isAutomatedTesting:t},resolve:n,reject:o})}),0,wm);function kv({type:e,url:t,tabBarText:n,events:o,isAutomatedTesting:i},a){const s=CC().$router,{path:r,query:c}=function(e){const[t,n]=e.split("?",2);return{path:t,query:pt(n||"")}}(t);return new Promise(((t,u)=>{const l=function(e,t){return{__id__:t||++Jv,__type__:e}}(e,a);s["navigateTo"===e?"push":"replace"]({path:r,query:c,state:l,force:!0}).then((a=>{if(ed(a))return u(a.message);if("switchTab"===e&&(s.currentRoute.value.meta.tabBarText=n),"navigateTo"===e){const e=s.currentRoute.value.meta;return e.eventChannel?o&&(Object.keys(o).forEach((t=>{e.eventChannel._addListener(t,"on",o[t])})),e.eventChannel._clearCache()):e.eventChannel=new ft(l.__id__,o),t(i?{__id__:l.__id__}:{eventChannel:e.eventChannel})}return i?t({__id__:l.__id__}):t()}))}))}let Lv;function bv(){var e;return Lv||(Lv=__uniConfig.tabBar&&qn((e=__uniConfig.tabBar,Zd()&&e.list&&e.list.forEach((e=>{np(e,["text"])})),e))),Lv}function Av(e){const t=window.CSS&&window.CSS.supports;return t&&(t(e)||t.apply(window.CSS,e.split(":")))}const Rv=Av("--a:0"),Ov=Av("top:env(a)"),wv=Av("top:constant(a)"),Pv=Av("backdrop-filter:blur(10px)"),Nv={"css.var":Rv,"css.env":Ov,"css.constant":wv,"css.backdrop-filter":Pv},Gv=ng(0,(e=>!p(Nv,e)||Nv[e])),Uv=(()=>Ov?"env":wv?"constant":"")();function xv(e){return Uv?`calc(${e}px + ${Uv}(safe-area-inset-bottom))`:`${e}px`}const Fv="$$",qv=new Map;function Vv(e){return e.$page}const Bv={handledBeforeEntryPageRoutes:!1},Hv=[],jv=[],Kv=[],$v=[];function zv(){return qv}function Wv(){return Yv()}function Yv(){const e=[],t=qv.values();for(const n of t)n.$.__isTabBar?n.$.__isActive&&e.push(n):e.push(n);return e}function Xv(e,t=!0){const n=qv.get(e);n.$.__isUnload=!0,vh(n,ye),qv.delete(e),t&&function(e){const t=ty.get(e);t&&(ty.delete(e),ny.pruneCacheEntry(t))}(e)}let Jv=mf();function Zv(e){const t=ff();let n=e.fullPath;return e.meta.isEntry&&-1===n.indexOf(e.meta.route)&&(n="/"+e.meta.route+n.replace("/","")),function(e,t,n,o,i,a){const{id:s,route:r}=o,c=St(o.navigationBar,__uniConfig.themeConfig,a).titleColor;return{id:s,path:Ve(r),route:r,fullPath:t,options:n,meta:o,openType:e,eventChannel:i,statusBarStyle:"#ffffff"===c?"light":"dark"}}("navigateTo",n,{},t)}function Qv(e){const t=Zv(e.$route);!function(e,t){e.route=t.route,e.$vm=e,e.$page=t,e.$mpType="page",e.$fontFamilySet=new Set,t.meta.isTabBar&&(e.$.__isTabBar=!0,e.$.__isActive=!0)}(e,t),qv.set(ey(t.path,t.id),e),1===qv.size&&setTimeout((()=>{!function(){if(Bv.handledBeforeEntryPageRoutes)return;Bv.handledBeforeEntryPageRoutes=!0;const e=[...Hv];Hv.length=0,e.forEach((({args:e,resolve:t,reject:n})=>kv(e).then(t).catch(n)));const t=[...jv];jv.length=0,t.forEach((({args:e,resolve:t,reject:n})=>(yv(),kv(e,Mv(e.url)).then(t).catch(n))));const n=[...Kv];Kv.length=0,n.forEach((({args:e,resolve:t,reject:n})=>(Tv(),kv(e).then(t).catch(n))));const o=[...$v];$v.length=0,o.forEach((({args:e,resolve:t,reject:n})=>(Ev(),kv(e).then(t).catch(n))))}()}),0)}function ey(e,t){return e+Fv+t}const ty=new Map,ny={get:e=>ty.get(e),set(e,t){!function(e){const t=parseInt(e.split(Fv)[1]);if(!t)return;ny.forEach(((e,n)=>{const o=parseInt(n.split(Fv)[1]);if(o&&o>t){if(function(e){return"tabBar"===e.props.type}(e))return;ny.delete(n),ny.pruneCacheEntry(e),Uo((()=>{qv.forEach(((e,t)=>{e.$.isUnmounted&&qv.delete(t)}))}))}}))}(e),ty.set(e,t)},delete(e){ty.get(e)&&ty.delete(e)},forEach(e){ty.forEach(e)}};function oy(e,t){!function(e){const t=ay(e),{body:n}=document;sy&&n.removeAttribute(sy),t&&n.setAttribute(t,""),sy=t}(e),function(e){let t=0,n=0;if("custom"!==e.navigationBar.style&&["default","float"].indexOf(e.navigationBar.type)>-1&&(t=44),e.isTabBar){const e=bv();e.shown&&(n=parseInt(e.height))}var o;Zp({"--window-top":(o=t,Uv?`calc(${o}px + ${Uv}(safe-area-inset-top))`:`${o}px`),"--window-bottom":xv(n)})}(t),function(e){{const t="nvue-dir-"+__uniConfig.nvue["flex-direction"];e.isNVue?(document.body.setAttribute("nvue",""),document.body.setAttribute(t,"")):(document.body.removeAttribute("nvue"),document.body.removeAttribute(t))}}(t),cy(e,t)}function iy(e){const t=ay(e);t&&function(e){const t=document.querySelector("uni-page-body");t&&t.setAttribute(e,"")}(t)}function ay(e){return e.type.__scopeId}let sy,ry;function cy(e,t){if(document.removeEventListener("touchmove",yh),ry&&document.removeEventListener("scroll",ry),t.disableScroll)return document.addEventListener("touchmove",yh);const{onPageScroll:n,onReachBottom:o}=e,i="transparent"===t.navigationBar.type;if(!(null==n?void 0:n.length)&&!(null==o?void 0:o.length)&&!i)return;const a={},s=Vv(e.proxy).id;(n||i)&&(a.onPageScroll=function(e,t,n){return o=>{t&&cL.publishHandler(Se,{scrollTop:o},e),n&&cL.emit(e+"."+Se,{scrollTop:o})}}(s,n,i)),(null==o?void 0:o.length)&&(a.onReachBottomDistance=t.onReachBottomDistance||50,a.onReachBottom=()=>cL.publishHandler(De,{},s)),ry=Ch(a),requestAnimationFrame((()=>document.addEventListener("scroll",ry)))}function uy(e){return e.$el}function ly(e){const{base:t}=__uniConfig.router;return 0===Ve(e).indexOf(t)?Ve(e):t+e}function dy(e){const{base:t,assets:n}=__uniConfig.router;if("./"===t&&(0!==e.indexOf("./")||!e.includes("/static/")&&0!==e.indexOf("./"+(n||"assets")+"/")||(e=e.slice(1))),0===e.indexOf("/")){if(0!==e.indexOf("//"))return ly(e.slice(1));e="https:"+e}if(ue.test(e)||le.test(e)||0===e.indexOf("blob:"))return e;const o=Yv();return o.length?ly(Th(Vv(o[o.length-1]).route,e).slice(1)):e}const py=navigator.userAgent,hy=/android/i.test(py),fy=/iphone|ipad|ipod/i.test(py),gy=py.match(/Windows NT ([\d|\d.\d]*)/i),_y=/Macintosh|Mac/i.test(py),vy=/Linux|X11/i.test(py),yy=_y&&navigator.maxTouchPoints>0;function Iy(){return/^Apple/.test(navigator.vendor)&&"number"==typeof window.orientation}function My(e){return e&&90===Math.abs(window.orientation)}function Cy(e,t){return e?Math[t?"max":"min"](screen.width,screen.height):screen.width}function Ty(e){return Math.min(window.innerWidth,document.documentElement.clientWidth,e)||e}function Sy(e,t,n,o){lL.invokeViewMethod("video."+e,{videoId:e,type:n,data:o},t)}function Ey(e,t){const n={},{top:o,topWindowHeight:i}=Xp();if(t.node){const t=e.tagName.split("-")[1];t&&(n.node=e.querySelector(t))}if(t.id&&(n.id=e.id),t.dataset&&(n.dataset=at(e)),t.rect||t.size){const a=e.getBoundingClientRect();t.rect&&(n.left=a.left,n.right=a.right,n.top=a.top-o-i,n.bottom=a.bottom-o-i),t.size&&(n.width=a.width,n.height=a.height)}if(h(t.properties)&&t.properties.forEach((e=>{e=e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))})),t.scrollOffset)if("UNI-SCROLL-VIEW"===e.tagName){const t=e.children[0].children[0];n.scrollLeft=t.scrollLeft,n.scrollTop=t.scrollTop,n.scrollHeight=t.scrollHeight,n.scrollWidth=t.scrollWidth}else n.scrollLeft=0,n.scrollTop=0,n.scrollHeight=0,n.scrollWidth=0;if(h(t.computedStyle)){const o=getComputedStyle(e);t.computedStyle.forEach((e=>{n[e]=o[e]}))}return t.context&&(n.contextInfo=function(e){return e.__uniContextInfo}(e)),n}function Dy(e,t){return(e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){const t=this.parentElement.querySelectorAll(e);let n=t.length;for(;--n>=0&&t.item(n)!==this;);return n>-1}).call(e,t)}let ky={},Ly={};function by(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}const Ay={};function Ry(e,t){const n=Ay[e];return n?Promise.resolve(n):/^data:[a-z-]+\/[a-z-]+;base64,/.test(e)?Promise.resolve(function(e){const t=e.split(","),n=t[0].match(/:(.*?);/),o=n?n[1]:"",i=atob(t[1]);let a=i.length;const s=new Uint8Array(a);for(;a--;)s[a]=i.charCodeAt(a);return Oy(s,o)}(e)):t?Promise.reject(new Error("not find")):new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){t(this.response)},o.onerror=n,o.send()}))}function Oy(e,t){let n;if(e instanceof File)n=e;else{t=t||e.type||"";const i=`${Date.now()}${function(e){const t=e.split("/")[1];return t?`.${t}`:""}(t)}`;try{n=new File([e],i,{type:t})}catch(o){n=e=e instanceof Blob?e:new Blob([e],{type:t}),n.name=n.name||i}}return n}function wy(e){for(const n in Ay)if(p(Ay,n)){if(Ay[n]===e)return n}var t=(window.URL||window.webkitURL).createObjectURL(e);return Ay[t]=e,t}function Py(e){(window.URL||window.webkitURL).revokeObjectURL(e),delete Ay[e]}const Ny=$h(),Gy=$h();function Uy(){return u({},Gy)}const xy=Xh({name:"ResizeSensor",props:{initial:{type:Boolean,default:!1}},emits:["resize"],setup(e,{emit:t}){const n=oo(null),o=function(e){return()=>{const{firstElementChild:t,lastElementChild:n}=e.value;t.scrollLeft=1e5,t.scrollTop=1e5,n.scrollLeft=1e5,n.scrollTop=1e5}}(n),i=function(e,t,n){const o=qn({width:-1,height:-1});return Ri((()=>u({},o)),(e=>t("resize",e))),()=>{const t=e.value;t&&(o.width=t.offsetWidth,o.height=t.offsetHeight,n())}}(n,t,o);return function(e,t,n,o){sa(o),va((()=>{t.initial&&Uo(n);const i=e.value;i.offsetParent!==i.parentElement&&(i.parentElement.style.position="relative"),"AnimationEvent"in window||o()}))}(n,e,i,o),()=>_r("uni-resize-sensor",{ref:n,onAnimationstartOnce:i},[_r("div",{onScroll:i},[_r("div",null,null)],40,["onScroll"]),_r("div",{onScroll:i},[_r("div",null,null)],40,["onScroll"])],40,["onAnimationstartOnce"])}});const Fy=function(){if(navigator.userAgent.includes("jsdom"))return 1;const e=document.createElement("canvas");e.height=e.width=0;const t=e.getContext("2d"),n=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/n}();function qy(e,t=!0){const n=t?Fy:1;e.width=e.offsetWidth*n,e.height=e.offsetHeight*n,e.getContext("2d").__hidpi__=t}let Vy=!1;function By(){if(Vy)return;Vy=!0;const e={fillRect:"all",clearRect:"all",strokeRect:"all",moveTo:"all",lineTo:"all",arc:[0,1,2],arcTo:"all",bezierCurveTo:"all",isPointinPath:"all",isPointinStroke:"all",quadraticCurveTo:"all",rect:"all",translate:"all",createRadialGradient:"all",createLinearGradient:"all",transform:[4,5],setTransform:[4,5]},t=CanvasRenderingContext2D.prototype;t.drawImageByCanvas=function(e){return function(t,n,o,i,a,s,r,c,u,l){if(!this.__hidpi__)return e.apply(this,arguments);n*=Fy,o*=Fy,i*=Fy,a*=Fy,s*=Fy,r*=Fy,c=l?c*Fy:c,u=l?u*Fy:u,e.call(this,t,n,o,i,a,s,r,c,u)}}(t.drawImage),1!==Fy&&(!function(e,t){for(const n in e)p(e,n)&&t(e[n],n)}(e,(function(e,n){t[n]=function(t){return function(){if(!this.__hidpi__)return t.apply(this,arguments);let n=Array.prototype.slice.call(arguments);if("all"===e)n=n.map((function(e){return e*Fy}));else if(Array.isArray(e))for(let t=0;t<e.length;t++)n[e[t]]*=Fy;return t.apply(this,n)}}(t[n])})),t.stroke=function(e){return function(){if(!this.__hidpi__)return e.apply(this,arguments);this.lineWidth*=Fy,e.apply(this,arguments),this.lineWidth/=Fy}}(t.stroke),t.fillText=function(e){return function(){if(!this.__hidpi__)return e.apply(this,arguments);const t=Array.prototype.slice.call(arguments);t[1]*=Fy,t[2]*=Fy,t[3]&&"number"==typeof t[3]&&(t[3]*=Fy);var n=this.font;this.font=n.replace(/(\d+\.?\d*)(px|em|rem|pt)/g,(function(e,t,n){return t*Fy+n})),e.apply(this,t),this.font=n}}(t.fillText),t.strokeText=function(e){return function(){if(!this.__hidpi__)return e.apply(this,arguments);var t=Array.prototype.slice.call(arguments);t[1]*=Fy,t[2]*=Fy,t[3]&&"number"==typeof t[3]&&(t[3]*=Fy);var n=this.font;this.font=n.replace(/(\d+\.?\d*)(px|em|rem|pt)/g,(function(e,t,n){return t*Fy+n})),e.apply(this,t),this.font=n}}(t.strokeText),t.drawImage=function(e){return function(){if(!this.__hidpi__)return e.apply(this,arguments);this.scale(Fy,Fy),e.apply(this,arguments),this.scale(1/Fy,1/Fy)}}(t.drawImage))}const Hy=je((()=>By()));function jy(e){return e?dy(e):e}function Ky(e){return(e=e.slice(0))[3]=e[3]/255,"rgba("+e.join(",")+")"}function $y(e,t){Array.from(t).forEach((t=>{t.x=t.clientX-e.left,t.y=t.clientY-e.top}))}let zy;function Wy(e=0,t=0){return zy||(zy=document.createElement("canvas")),zy.width=e,zy.height=t,zy}const Yy=Xh({inheritAttrs:!1,name:"Canvas",compatConfig:{MODE:3},props:{canvasId:{type:String,default:""},disableScroll:{type:[Boolean,String],default:!1},hidpi:{type:Boolean,default:!0}},computed:{id(){return this.canvasId}},setup(e,{emit:t,slots:n}){Hy();const o=oo(null),i=oo(null),a=oo(null),s=oo(!1),r=function(e){return(t,n)=>{e(t,Ah(n))}}(t),{$attrs:c,$excludeAttrs:l,$listeners:d}=qI({excludeListeners:!0}),{_listeners:h}=function(e,t,n){const o=Wr((()=>{let o=["onTouchstart","onTouchmove","onTouchend"],i=t.value,a=u({},(()=>{let e={};for(const t in i)if(p(i,t)){const n=i[t];e[t]=n}return e})());return o.forEach((t=>{let o=[];a[t]&&o.push(Zh((e=>{const o=e.currentTarget.getBoundingClientRect();$y(o,e.touches),$y(o,e.changedTouches),n(t.replace("on","").toLocaleLowerCase(),e)}))),e.disableScroll&&"onTouchmove"===t&&o.push($p),a[t]=o})),a}));return{_listeners:o}}(e,d,r),{_handleSubscribe:f,_resize:g}=function(e,t,n){let o=[],i={};const a=Wr((()=>e.hidpi?Fy:1));function s(n){let o=t.value;if(!n||o.width!==Math.floor(n.width*a.value)||o.height!==Math.floor(n.height*a.value))if(o.width>0&&o.height>0){let t=o.getContext("2d"),n=t.getImageData(0,0,o.width,o.height);qy(o,e.hidpi),t.putImageData(n,0,0)}else qy(o,e.hidpi)}function r({actions:e,reserve:a},s){if(!e)return;if(n.value)return void o.push([e,a]);let r=t.value,u=r.getContext("2d");a||(u.fillStyle="#000000",u.strokeStyle="#000000",u.shadowColor="#000000",u.shadowBlur=0,u.shadowOffsetX=0,u.shadowOffsetY=0,u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,r.width,r.height)),c(e);for(let t=0;t<e.length;t++){const n=e[t];let o=n.method;const a=n.data,r=a[0];if(/^set/.test(o)&&"setTransform"!==o){const n=o[3].toLowerCase()+o.slice(4);let i;if("fillStyle"===n||"strokeStyle"===n){if("normal"===r)i=Ky(a[1]);else if("linear"===r){const e=u.createLinearGradient(...a[1]);a[2].forEach((function(t){const n=t[0],o=Ky(t[1]);e.addColorStop(n,o)})),i=e}else if("radial"===r){let e=a[1];const t=e[0],n=e[1],o=e[2],s=u.createRadialGradient(t,n,0,t,n,o);a[2].forEach((function(e){const t=e[0],n=Ky(e[1]);s.addColorStop(t,n)})),i=s}else if("pattern"===r){if(!l(a[1],e.slice(t+1),s,(function(e){e&&(u[n]=u.createPattern(e,a[2]))})))break;continue}u[n]=i}else if("globalAlpha"===n)u[n]=Number(r)/255;else if("shadow"===n){let e=["shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor"];a.forEach((function(t,n){u[e[n]]="shadowColor"===e[n]?Ky(t):t}))}else if("fontSize"===n){const e=u.__font__||u.font;u.__font__=u.font=e.replace(/\d+\.?\d*px/,r+"px")}else"lineDash"===n?(u.setLineDash(r),u.lineDashOffset=a[1]||0):"textBaseline"===n?("normal"===r&&(a[0]="alphabetic"),u[n]=r):"font"===n?u.__font__=u.font=r:u[n]=r}else if("fillPath"===o||"strokePath"===o)o=o.replace(/Path/,""),u.beginPath(),a.forEach((function(e){u[e.method].apply(u,e.data)})),u[o]();else if("fillText"===o)u.fillText.apply(u,a);else if("drawImage"===o){if("break"===function(){let n=[...a],o=n[0],r=n.slice(1);if(i=i||{},!l(o,e.slice(t+1),s,(function(e){e&&u.drawImage.apply(u,[e].concat([...r.slice(4,8)],[...r.slice(0,4)]))})))return"break"}())break}else"clip"===o?(a.forEach((function(e){u[e.method].apply(u,e.data)})),u.clip()):u[o].apply(u,a)}n.value||s({errMsg:"drawCanvas:ok"})}function c(e){e.forEach((function(e){let t=e.method,n=e.data,o="";function a(){const e=i[o]=new Image;e.onload=function(){e.ready=!0},function(e){const t=document.createElement("a");return t.href=e,t.origin===location.origin?Promise.resolve(e):Ry(e).then(wy)}(o).then((t=>{e.src=t})).catch((()=>{e.src=o}))}"drawImage"===t?(o=n[0],o=jy(o),n[0]=o):"setFillStyle"===t&&"pattern"===n[0]&&(o=n[1],o=jy(o),n[1]=o),o&&!i[o]&&a()}))}function l(e,t,a,s){let c=i[e];return c.ready?(s(c),!0):(o.unshift([t,!0]),n.value=!0,c.onload=function(){c.ready=!0,s(c),n.value=!1;let e=o.slice(0);o=[];for(let t=e.shift();t;)r({actions:t[0],reserve:t[1]},a),t=e.shift()},!1)}function d({x:e=0,y:n=0,width:o,height:i,destWidth:s,destHeight:r,hidpi:c=!0,dataType:u,quality:l=1,type:d="png"},p){const h=t.value;let f;const g=h.offsetWidth-e;o=o?Math.min(o,g):g;const _=h.offsetHeight-n;i=i?Math.min(i,_):_,c?(s=o,r=i):s||r?s?r||(r=Math.round(i/o*s)):(r||(r=Math.round(i*a.value)),s=Math.round(o/i*r)):(s=Math.round(o*a.value),r=Math.round(i*a.value));const m=Wy(s,r),v=m.getContext("2d");let y;"jpeg"!==d&&"jpg"!==d||(d="jpeg",v.fillStyle="#fff",v.fillRect(0,0,s,r)),v.__hidpi__=!0,v.drawImageByCanvas(h,e,n,o,i,0,0,s,r,!1);try{let e;if("base64"===u)f=m.toDataURL(`image/${d}`,l);else{const e=v.getImageData(0,0,s,r);f=Array.prototype.slice.call(e.data)}y={data:f,compressed:e,width:s,height:r}}catch(I){y={errMsg:`canvasGetImageData:fail ${I}`}}if(m.height=m.width=0,v.__hidpi__=!1,!p)return y;p(y)}function p({data:e,x:n,y:o,width:i,height:a,compressed:s},r){try{0,a||(a=Math.round(e.length/4/i));const s=Wy(i,a);s.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(e),i,a),0,0),t.value.getContext("2d").drawImage(s,n,o,i,a),s.height=s.width=0}catch(c){return void r({errMsg:"canvasPutImageData:fail"})}r({errMsg:"canvasPutImageData:ok"})}function h({x:e=0,y:t=0,width:n,height:o,destWidth:i,destHeight:a,fileType:s,quality:r,dirname:c},u){const l=d({x:e,y:t,width:n,height:o,destWidth:i,destHeight:a,hidpi:!1,dataType:"base64",type:s,quality:r});var p;l.errMsg?u({errMsg:l.errMsg.replace("canvasPutImageData","toTempFilePath")}):(p=l.data,((e,t)=>{let n="toTempFilePath:"+(e?"fail":"ok");e&&(n+=` ${e.message}`),u({errMsg:n,tempFilePath:t})})(null,p))}const f={actionsChanged:r,getImageData:d,putImageData:p,toTempFilePath:h};function g(e,t,n){let o=f[e];0!==e.indexOf("_")&&m(o)&&o(t,n)}return u(f,{_resize:s,_handleSubscribe:g})}(e,i,s);return QM(f,tC(e.canvasId),!0),va((()=>{g()})),()=>{const{canvasId:t,disableScroll:s}=e;return _r("uni-canvas",Er({ref:o,"canvas-id":t,"disable-scroll":s},c.value,l.value,h.value),[_r("canvas",{ref:i,class:"uni-canvas-canvas",width:"300",height:"150"},null,512),_r("div",{style:"position: absolute;top: 0;left: 0;width: 100%;height: 100%;overflow: hidden;"},[n.default&&n.default()]),_r(xy,{ref:a,onResize:g},null,8,["onResize"])],16,["canvas-id","disable-scroll"])}}});const Xy=Qp("ucg"),Jy=Xh({name:"CheckboxGroup",props:{name:{type:String,default:""}},emits:["change"],setup(e,{emit:t,slots:n}){const o=oo(null);return function(e,t){const n=[],o=()=>n.reduce(((e,t)=>(t.value.checkboxChecked&&e.push(t.value.value),e)),new Array);fs(Xy,{addField(e){n.push(e)},removeField(e){n.splice(n.indexOf(e),1)},checkboxChange(e){t("change",e,{value:o()})}});const i=gs(of,!1);i&&i.addField({submit:()=>{let t=["",null];return""!==e.name&&(t[0]=e.name,t[1]=o()),t}})}(e,Qh(o,t)),()=>_r("uni-checkbox-group",{ref:o},[n.default&&n.default()],512)}});const Zy=Xh({name:"Checkbox",props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},value:{type:String,default:""},color:{type:String,default:"#007aff"},backgroundColor:{type:String,default:""},borderColor:{type:String,default:""},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},iconColor:{type:String,default:""},foreColor:{type:String,default:""}},setup(e,{slots:t}){const n=oo(null),o=oo(e.checked),i=Wr((()=>"true"===o.value||!0===o.value)),a=oo(e.value);const s=Wr((()=>function(t){if(e.disabled)return{backgroundColor:"#E1E1E1",borderColor:"#D1D1D1"};const n={};return t?(e.activeBorderColor&&(n.borderColor=e.activeBorderColor),e.activeBackgroundColor&&(n.backgroundColor=e.activeBackgroundColor)):(e.borderColor&&(n.borderColor=e.borderColor),e.backgroundColor&&(n.backgroundColor=e.backgroundColor)),n}(i.value)));Ri([()=>e.checked,()=>e.value],(([e,t])=>{o.value=e,a.value=t}));const{uniCheckGroup:r,uniLabel:c}=function(e,t,n){const o=Wr((()=>({checkboxChecked:Boolean(e.value),value:t.value}))),i={reset:n},a=gs(Xy,!1);a&&a.addField(o);const s=gs(of,!1);s&&s.addField(i);const r=gs(rf,!1);return Ma((()=>{a&&a.removeField(o),s&&s.removeField(i)})),{uniCheckGroup:a,uniForm:s,uniLabel:r}}(o,a,(()=>{o.value=!1})),u=t=>{e.disabled||(o.value=!o.value,r&&r.checkboxChange(t),t.stopPropagation())};return c&&(c.addHandler(u),Ma((()=>{c.removeHandler(u)}))),uf(e,{"label-click":u}),()=>{const i=nf(e,"disabled");let a;return a=o.value,_r("uni-checkbox",Er(i,{id:e.id,onClick:u,ref:n}),[_r("div",{class:"uni-checkbox-wrapper",style:{"--HOVER-BD-COLOR":e.activeBorderColor}},[_r("div",{class:["uni-checkbox-input",{"uni-checkbox-input-disabled":e.disabled}],style:s.value},[a?ch(oh,e.disabled?"#ADADAD":e.foreColor||e.iconColor||e.color,22):""],6),t.default&&t.default()],4)],16,["id","onClick"])}}});function Qy(){}const eI={cursorSpacing:{type:[Number,String],default:0},showConfirmBar:{type:[Boolean,String],default:"auto"},adjustPosition:{type:[Boolean,String],default:!0},autoBlur:{type:[Boolean,String],default:!1}};function tI(e,t,n){function o(e){const t=Wr((()=>0===String(navigator.vendor).indexOf("Apple")));e.addEventListener("focus",(()=>{clearTimeout(undefined),document.addEventListener("click",Qy,!1)}));e.addEventListener("blur",(()=>{t.value&&e.blur(),document.removeEventListener("click",Qy,!1),t.value&&document.documentElement.scrollTo(document.documentElement.scrollLeft,document.documentElement.scrollTop)}))}Ri((()=>t.value),(e=>e&&o(e)))}var nI=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,oI=/^<\/([-A-Za-z0-9_]+)[^>]*>/,iI=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,aI=dI("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),sI=dI("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),rI=dI("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),cI=dI("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),uI=dI("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),lI=dI("script,style");function dI(e){for(var t={},n=e.split(","),o=0;o<n.length;o++)t[n[o]]=!0;return t}const pI={src:{type:String,default:""},mode:{type:String,default:"scaleToFill"},lazyLoad:{type:[Boolean,String],default:!1},draggable:{type:Boolean,default:!1}},hI={widthFix:["offsetWidth","height",(e,t)=>e/t],heightFix:["offsetHeight","width",(e,t)=>e*t]},fI={aspectFit:["center center","contain"],aspectFill:["center center","cover"],widthFix:[,"100% 100%"],heightFix:[,"100% 100%"],top:["center top"],bottom:["center bottom"],center:["center center"],left:["left center"],right:["right center"],"top left":["left top"],"top right":["right top"],"bottom left":["left bottom"],"bottom right":["right bottom"]},gI=Xh({name:"Image",props:pI,setup(e,{emit:t}){const n=oo(null),o=function(e,t){const n=oo(""),o=Wr((()=>{let e="auto",o="";const i=fI[t.mode];return i?(i[0]&&(o=i[0]),i[1]&&(e=i[1])):(o="0% 0%",e="100% 100%"),`background-image:${n.value?'url("'+n.value+'")':"none"};background-position:${o};background-size:${e};`})),i=qn({rootEl:e,src:Wr((()=>t.src?dy(t.src):"")),origWidth:0,origHeight:0,origStyle:{width:"",height:""},modeStyle:o,imgSrc:n});return va((()=>{const t=e.value;i.origWidth=t.clientWidth||0,i.origHeight=t.clientHeight||0})),i}(n,e),i=Qh(n,t),{fixSize:a}=function(e,t,n){const o=()=>{const{mode:o}=t,i=hI[o];if(!i)return;const{origWidth:a,origHeight:s}=n,r=a&&s?a/s:0;if(!r)return;const c=e.value,u=c[i[0]];u&&(c.style[i[1]]=function(e){_I&&e>10&&(e=2*Math.round(e/2));return e}(i[2](u,r))+"px")},i=()=>{const{style:t}=e.value,{origStyle:{width:o,height:i}}=n;t.width=o,t.height=i};return Ri((()=>t.mode),((e,t)=>{hI[t]&&i(),hI[e]&&o()})),{fixSize:o,resetSize:i}}(n,e,o);return function(e,t,n,o,i){let a,s;const r=(t=0,n=0,o="")=>{e.origWidth=t,e.origHeight=n,e.imgSrc=o},c=c=>{if(!c)return u(),void r();a=a||new Image,a.onload=e=>{const{width:l,height:d}=a;r(l,d,c),Uo((()=>{o()})),a.draggable=t.draggable,s&&s.remove(),s=a,n.value.appendChild(a),u(),i("load",e,{width:l,height:d})},a.onerror=t=>{r(),u(),i("error",t,{errMsg:`GET ${e.src} 404 (Not Found)`})},a.src=c},u=()=>{a&&(a.onload=null,a.onerror=null,a=null)};Ri((()=>e.src),(e=>c(e))),Ri((()=>e.imgSrc),(e=>{!e&&s&&(s.remove(),s=null)})),va((()=>c(e.src))),Ma((()=>u()))}(o,e,n,a,i),()=>_r("uni-image",{ref:n},[_r("div",{style:o.modeStyle},null,4),hI[e.mode]?_r(xy,{onResize:a},null,8,["onResize"]):_r("span",null,null)],512)}});const _I="Google Inc."===navigator.vendor;const mI=rt(!0),vI=[];let yI=0,II=!1;const MI=e=>vI.forEach((t=>t.userAction=e));function CI(e={userAction:!1}){if(!II){["touchstart","touchmove","touchend","mousedown","mouseup"].forEach((e=>{document.addEventListener(e,(function(){!yI&&MI(!0),yI++,setTimeout((()=>{! --yI&&MI(!1)}),0)}),mI)})),II=!0}vI.push(e)}const TI=()=>!!yI;function SI(){const e=qn({userAction:!1});return va((()=>{CI(e)})),Ma((()=>{!function(e){const t=vI.indexOf(e);t>=0&&vI.splice(t,1)}(e)})),{state:e}}function EI(){const e=qn({attrs:{}});return va((()=>{let t=Rr();for(;t;){const n=t.type.__scopeId;n&&(e.attrs[n]=""),t=t.proxy&&"page"===t.proxy.$mpType?null:t.parent}})),{state:e}}function DI(e,t){const n=document.activeElement;if(!n)return t({});const o={};["input","textarea"].includes(n.tagName.toLowerCase())&&(o.start=n.selectionStart,o.end=n.selectionEnd),t(o)}function kI(e,t,n){"number"===t&&isNaN(Number(e))&&(e="");return null==e?"":String(e)}const LI=["none","text","decimal","numeric","tel","search","email","url"],bI=u({},{name:{type:String,default:""},modelValue:{type:[String,Number]},value:{type:[String,Number]},disabled:{type:[Boolean,String],default:!1},autoFocus:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1},cursor:{type:[Number,String],default:-1},selectionStart:{type:[Number,String],default:-1},selectionEnd:{type:[Number,String],default:-1},type:{type:String,default:"text"},password:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:""},placeholderClass:{type:String,default:""},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},confirmHold:{type:Boolean,default:!1},ignoreCompositionEvent:{type:Boolean,default:!0},step:{type:String,default:"0.000000000000000001"},inputmode:{type:String,default:void 0,validator:e=>!!~LI.indexOf(e)},cursorColor:{type:String,default:""}},eI),AI=["input","focus","blur","update:value","update:modelValue","update:focus","compositionstart","compositionupdate","compositionend","keyboardheightchange"];function RI(e,t,n,o){let i=null;i=ht((n=>{t.value=kI(n,e.type)}),100,{setTimeout:setTimeout,clearTimeout:clearTimeout}),Ri((()=>e.modelValue),i),Ri((()=>e.value),i);const a=function(e,t){let n,o,i=0;const a=function(...a){const s=Date.now();clearTimeout(n),o=()=>{o=null,i=s,e.apply(this,a)},s-i<t?n=setTimeout(o,t-(s-i)):o()};return a.cancel=function(){clearTimeout(n),o=null},a.flush=function(){clearTimeout(n),o&&o()},a}(((e,t)=>{i.cancel(),n("update:modelValue",t.value),n("update:value",t.value),o("input",e,t)}),100);return ma((()=>{i.cancel(),a.cancel()})),{trigger:o,triggerInput:(e,t,n)=>{i.cancel(),a(e,t),n&&a.flush()}}}function OI(e,t){SI();const n=Wr((()=>e.autoFocus||e.focus));function o(){if(!n.value)return;const e=t.value;e?e.focus():setTimeout(o,100)}Ri((()=>e.focus),(e=>{e?o():function(){const e=t.value;e&&e.blur()}()})),va((()=>{n.value&&Uo(o)}))}function wI(e,t,n,o){Cp(hh(),"getSelectedTextRange",DI);const{fieldRef:i,state:a,trigger:s}=function(e,t,n){const o=oo(null),i=Qh(t,n),a=Wr((()=>{const t=Number(e.selectionStart);return isNaN(t)?-1:t})),s=Wr((()=>{const t=Number(e.selectionEnd);return isNaN(t)?-1:t})),r=Wr((()=>{const t=Number(e.cursor);return isNaN(t)?-1:t})),c=Wr((()=>{var t=Number(e.maxlength);return isNaN(t)?140:t}));let u="";u=kI(e.modelValue,e.type)||kI(e.value,e.type);const l=qn({value:u,valueOrigin:u,maxlength:c,focus:e.focus,composing:!1,selectionStart:a,selectionEnd:s,cursor:r});return Ri((()=>l.focus),(e=>n("update:focus",e))),Ri((()=>l.maxlength),(e=>l.value=l.value.slice(0,e)),{immediate:!1}),{fieldRef:o,state:l,trigger:i}}(e,t,n),{triggerInput:r}=RI(e,a,n,s);OI(e,i),tI(0,i);const{state:c}=EI();!function(e,t){const n=gs(of,!1);if(!n)return;const o=Rr(),i={submit(){const n=o.proxy;return[n[e],v(t)?n[t]:t.value]},reset(){v(t)?o.proxy[t]="":t.value=""}};n.addField(i),Ma((()=>{n.removeField(i)}))}("name",a),function(e,t,n,o,i,a){function s(){const n=e.value;n&&t.focus&&t.selectionStart>-1&&t.selectionEnd>-1&&"number"!==n.type&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd)}function r(){const n=e.value;n&&t.focus&&t.selectionStart<0&&t.selectionEnd<0&&t.cursor>-1&&"number"!==n.type&&(n.selectionEnd=n.selectionStart=t.cursor)}function c(e){return"number"===e.type?null:e.selectionEnd}Ri([()=>t.selectionStart,()=>t.selectionEnd],s),Ri((()=>t.cursor),r),Ri((()=>e.value),(function(){const u=e.value;if(!u)return;const l=function(e,o){e.stopPropagation(),m(a)&&!1===a(e,t)||(t.value=u.value,t.composing&&n.ignoreCompositionEvent||i(e,{value:u.value,cursor:c(u)},o))};function d(e){n.ignoreCompositionEvent||o(e.type,e,{value:e.data})}u.addEventListener("change",(e=>e.stopPropagation())),u.addEventListener("focus",(function(e){t.focus=!0,o("focus",e,{value:t.value}),s(),r()})),u.addEventListener("blur",(function(e){t.composing&&(t.composing=!1,l(e,!0)),t.focus=!1,o("blur",e,{value:t.value,cursor:c(e.target)})})),u.addEventListener("input",l),u.addEventListener("compositionstart",(e=>{e.stopPropagation(),t.composing=!0,d(e)})),u.addEventListener("compositionend",(e=>{e.stopPropagation(),t.composing&&(t.composing=!1,l(e)),d(e)})),u.addEventListener("compositionupdate",d)}))}(i,a,e,s,r,o);return{fieldRef:i,state:a,scopedAttrsState:c,fixDisabledColor:0===String(navigator.vendor).indexOf("Apple")&&CSS.supports("image-orientation:from-image"),trigger:s}}const PI=u({},bI,{placeholderClass:{type:String,default:"input-placeholder"},textContentType:{type:String,default:""}}),NI=je((()=>{{const e=navigator.userAgent;let t="";const n=e.match(/OS\s([\w_]+)\slike/);if(n)t=n[1].replace(/_/g,".");else if(/Macintosh|Mac/i.test(e)&&navigator.maxTouchPoints>0){const n=e.match(/Version\/(\S*)\b/);n&&(t=n[1])}return!!t&&parseInt(t)>=16&&parseFloat(t)<17.2}}));function GI(e,t,n,o,i){if(t.value)if("."===e.data){if("."===t.value.slice(-1))return n.value=o.value=t.value=t.value.slice(0,-1),!1;if(t.value&&!t.value.includes("."))return t.value+=".",i&&(i.fn=()=>{n.value=o.value=t.value=t.value.slice(0,-1),o.removeEventListener("blur",i.fn)},o.addEventListener("blur",i.fn)),!1}else if("deleteContentBackward"===e.inputType&&NI()&&"."===t.value.slice(-2,-1))return t.value=n.value=o.value=t.value.slice(0,-2),!0}const UI=Xh({name:"Input",props:PI,emits:["confirm",...AI],setup(e,{emit:t,expose:n}){const o=["text","number","idcard","digit","password","tel"],i=["off","one-time-code"],a=Wr((()=>{let t="";switch(e.type){case"text":t="text","search"===e.confirmType&&(t="search");break;case"idcard":t="text";break;case"digit":t="number";break;default:t=o.includes(e.type)?e.type:"text"}return e.password?"password":t})),s=Wr((()=>{const t=i.indexOf(e.textContentType),n=i.indexOf(R(e.textContentType));return i[-1!==t?t:-1!==n?n:0]}));let r=function(e,t){if("number"===t.value){const t=void 0===e.modelValue?e.value:e.modelValue,n=oo(null!=t?t.toLocaleString():"");return Ri((()=>e.modelValue),(e=>{n.value=null!=e?e.toLocaleString():""})),Ri((()=>e.value),(e=>{n.value=null!=e?e.toLocaleString():""})),n}return oo("")}(e,a),c={fn:null};const u=oo(null),{fieldRef:l,state:d,scopedAttrsState:p,fixDisabledColor:h,trigger:f}=wI(e,u,t,((t,n)=>{const o=t.target;if("number"===a.value){if(c.fn&&(o.removeEventListener("blur",c.fn),c.fn=null),o.validity&&!o.validity.valid){if((!r.value||!o.value)&&"-"===t.data||"-"===r.value[0]&&"deleteContentBackward"===t.inputType)return r.value="-",n.value="",c.fn=()=>{r.value=o.value=""},o.addEventListener("blur",c.fn),!1;const e=GI(t,r,n,o,c);return"boolean"==typeof e?e:(r.value=n.value=o.value="-"===r.value?"":r.value,!1)}{const e=GI(t,r,n,o,c);if("boolean"==typeof e)return e;r.value=o.value}const i=n.maxlength;if(i>0&&o.value.length>i){o.value=o.value.slice(0,i),n.value=o.value;return(void 0!==e.modelValue&&null!==e.modelValue?e.modelValue.toString():"")!==o.value}}}));Ri((()=>d.value),(t=>{"number"!==e.type||"-"===r.value&&""===t||(r.value=t.toString())}));const g=["number","digit"],_=Wr((()=>g.includes(e.type)?e.step:""));function m(t){if("Enter"!==t.key)return;const n=t.target;t.stopPropagation(),f("confirm",t,{value:n.value}),!e.confirmHold&&n.blur()}return n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),d.value=e.value}}),()=>{let t=e.disabled&&h?_r("input",{key:"disabled-input",ref:l,value:d.value,tabindex:"-1",readonly:!!e.disabled,type:a.value,maxlength:d.maxlength,step:_.value,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},onFocus:e=>e.target.blur()},null,44,["value","readonly","type","maxlength","step","onFocus"]):_r("input",{key:"input",ref:l,value:d.value,onInput:e=>{d.value=e.target.value.toString()},disabled:!!e.disabled,type:a.value,maxlength:d.maxlength,step:_.value,enterkeyhint:e.confirmType,pattern:"number"===e.type?"[0-9]*":void 0,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},autocomplete:s.value,onKeyup:m,inputmode:e.inputmode},null,44,["value","onInput","disabled","type","maxlength","step","enterkeyhint","pattern","autocomplete","onKeyup","inputmode"]);return _r("uni-input",{ref:u},[_r("div",{class:"uni-input-wrapper"},[Gi(_r("div",Er(p.attrs,{style:e.placeholderStyle,class:["uni-input-placeholder",e.placeholderClass]}),[e.placeholder],16),[[wc,!(d.value.length||"-"===r.value||r.value.includes("."))]]),"search"===e.confirmType?_r("form",{action:"",onSubmit:e=>e.preventDefault(),class:"uni-input-form"},[t],40,["onSubmit"]):t])],512)}}});const xI=["class","style"],FI=/^on[A-Z]+/,qI=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n=[]}=e,o=Rr(),i=io({}),a=io({}),s=io({}),r=n.concat(xI);return o.attrs=qn(o.attrs),ki((()=>{const e=(n=o.attrs,Object.keys(n).map((e=>[e,n[e]]))).reduce(((e,[n,o])=>(r.includes(n)?e.exclude[n]=o:FI.test(n)?(t||(e.attrs[n]=o),e.listeners[n]=o):e.attrs[n]=o,e)),{exclude:{},attrs:{},listeners:{}});var n;i.value=e.attrs,a.value=e.listeners,s.value=e.exclude})),{$attrs:i,$listeners:a,$excludeAttrs:s}};function VI(e){const t=[];return h(e)&&e.forEach((e=>{ur(e)?e.type===Xs?t.push(...VI(e.children)):t.push(e):h(e)&&t.push(...VI(e))})),t}const BI=Xh({inheritAttrs:!1,name:"MovableArea",props:{scaleArea:{type:Boolean,default:!1}},setup(e,{slots:t}){const n=oo(null),o=oo(!1);let{setContexts:i,events:a}=function(e,t){const n=oo(0),o=oo(0),i=qn({x:null,y:null}),a=oo(null);let s=null,r=[];function c(t){t&&1!==t&&(e.scaleArea?r.forEach((function(e){e._setScale(t)})):s&&s._setScale(t))}function u(e,n=r){let o=t.value;function i(e){for(let t=0;t<n.length;t++){const o=n[t];if(e===o.rootRef.value)return o}return e===o||e===document.body||e===document?null:i(e.parentNode)}return i(e)}const l=Zh((t=>{let n=t.touches;if(n&&n.length>1){let t={x:n[1].pageX-n[0].pageX,y:n[1].pageY-n[0].pageY};if(a.value=HI(t),i.x=t.x,i.y=t.y,!e.scaleArea){let e=u(n[0].target),t=u(n[1].target);s=e&&e===t?e:null}}})),d=Zh((e=>{let t=e.touches;if(t&&t.length>1){e.preventDefault();let n={x:t[1].pageX-t[0].pageX,y:t[1].pageY-t[0].pageY};if(null!==i.x&&a.value&&a.value>0){c(HI(n)/a.value)}i.x=n.x,i.y=n.y}})),p=Zh((t=>{let n=t.touches;n&&n.length||t.changedTouches&&(i.x=0,i.y=0,a.value=null,e.scaleArea?r.forEach((function(e){e._endScale()})):s&&s._endScale())}));function h(){f(),r.forEach((function(e,t){e.setParent()}))}function f(){let e=window.getComputedStyle(t.value),i=t.value.getBoundingClientRect();n.value=i.width-["Left","Right"].reduce((function(t,n){const o="padding"+n;return t+parseFloat(e["border"+n+"Width"])+parseFloat(e[o])}),0),o.value=i.height-["Top","Bottom"].reduce((function(t,n){const o="padding"+n;return t+parseFloat(e["border"+n+"Width"])+parseFloat(e[o])}),0)}return fs("movableAreaWidth",n),fs("movableAreaHeight",o),{setContexts(e){r=e},events:{_onTouchstart:l,_onTouchmove:d,_onTouchend:p,_resize:h}}}(e,n);const{$listeners:s,$attrs:r,$excludeAttrs:c}=qI(),u=s.value;["onTouchstart","onTouchmove","onTouchend"].forEach((e=>{let t=u[e],n=a[`_${e}`];u[e]=t?[].concat(t,n):n})),va((()=>{a._resize(),o.value=!0}));let l=[];const d=[];function p(){const e=[];for(let t=0;t<l.length;t++){let n=l[t];n=n.el;const o=d.find((e=>n===e.rootRef.value));o&&e.push(Xn(o))}i(e)}return fs("_isMounted",o),fs("movableAreaRootRef",n),fs("addMovableViewContext",(e=>{d.push(e),p()})),fs("removeMovableViewContext",(e=>{const t=d.indexOf(e);t>=0&&(d.splice(t,1),p())})),()=>{const e=t.default&&t.default();return l=VI(e),_r("uni-movable-area",Er({ref:n},r.value,c.value,u),[_r(xy,{onResize:a._resize},null,8,["onResize"]),l],16)}}});function HI(e){return Math.sqrt(e.x*e.x+e.y*e.y)}const jI=function(e,t,n,o){e.addEventListener(t,(e=>{m(n)&&!1===n(e)&&((void 0===e.cancelable||e.cancelable)&&e.preventDefault(),e.stopPropagation())}),{passive:!1})};let KI,$I;function zI(e,t,n){Ma((()=>{document.removeEventListener("mousemove",KI),document.removeEventListener("mouseup",$I)}));let o=0,i=0,a=0,s=0;const r=function(e,n,r,c){if(!1===t({cancelable:e.cancelable,target:e.target,currentTarget:e.currentTarget,preventDefault:e.preventDefault.bind(e),stopPropagation:e.stopPropagation.bind(e),touches:e.touches,changedTouches:e.changedTouches,detail:{state:n,x:r,y:c,dx:r-o,dy:c-i,ddx:r-a,ddy:c-s,timeStamp:e.timeStamp}}))return!1};let c,u,l=null;jI(e,"touchstart",(function(e){if(c=!0,1===e.touches.length&&!l)return l=e,o=a=e.touches[0].pageX,i=s=e.touches[0].pageY,r(e,"start",o,i)})),jI(e,"mousedown",(function(e){if(u=!0,!c&&!l)return l=e,o=a=e.pageX,i=s=e.pageY,r(e,"start",o,i)})),jI(e,"touchmove",(function(e){if(1===e.touches.length&&l){const t=r(e,"move",e.touches[0].pageX,e.touches[0].pageY);return a=e.touches[0].pageX,s=e.touches[0].pageY,t}}));const d=KI=function(e){if(!c&&u&&l){const t=r(e,"move",e.pageX,e.pageY);return a=e.pageX,s=e.pageY,t}};document.addEventListener("mousemove",d),jI(e,"touchend",(function(e){if(0===e.touches.length&&l)return c=!1,l=null,r(e,"end",e.changedTouches[0].pageX,e.changedTouches[0].pageY)}));const p=$I=function(e){if(u=!1,!c&&l)return l=null,r(e,"end",e.pageX,e.pageY)};document.addEventListener("mouseup",p),jI(e,"touchcancel",(function(e){if(l){c=!1;const t=l;return l=null,r(e,n?"cancel":"end",t.touches[0].pageX,t.touches[0].pageY)}}))}function WI(e,t,n){return e>t-n&&e<t+n}function YI(e,t){return WI(e,0,t)}function XI(){}function JI(e,t){this._m=e,this._f=1e3*t,this._startTime=0,this._v=0}function ZI(e,t,n){this._m=e,this._k=t,this._c=n,this._solution=null,this._endPosition=0,this._startTime=0}function QI(e,t,n){this._springX=new ZI(e,t,n),this._springY=new ZI(e,t,n),this._springScale=new ZI(e,t,n),this._startTime=0}XI.prototype.x=function(e){return Math.sqrt(e)},JI.prototype.setV=function(e,t){const n=Math.pow(Math.pow(e,2)+Math.pow(t,2),.5);this._x_v=e,this._y_v=t,this._x_a=-this._f*this._x_v/n,this._y_a=-this._f*this._y_v/n,this._t=Math.abs(e/this._x_a)||Math.abs(t/this._y_a),this._lastDt=null,this._startTime=(new Date).getTime()},JI.prototype.setS=function(e,t){this._x_s=e,this._y_s=t},JI.prototype.s=function(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),e>this._t&&(e=this._t,this._lastDt=e);let t=this._x_v*e+.5*this._x_a*Math.pow(e,2)+this._x_s,n=this._y_v*e+.5*this._y_a*Math.pow(e,2)+this._y_s;return(this._x_a>0&&t<this._endPositionX||this._x_a<0&&t>this._endPositionX)&&(t=this._endPositionX),(this._y_a>0&&n<this._endPositionY||this._y_a<0&&n>this._endPositionY)&&(n=this._endPositionY),{x:t,y:n}},JI.prototype.ds=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),e>this._t&&(e=this._t),{dx:this._x_v+this._x_a*e,dy:this._y_v+this._y_a*e}},JI.prototype.delta=function(){return{x:-1.5*Math.pow(this._x_v,2)/this._x_a||0,y:-1.5*Math.pow(this._y_v,2)/this._y_a||0}},JI.prototype.dt=function(){return-this._x_v/this._x_a},JI.prototype.done=function(){const e=WI(this.s().x,this._endPositionX)||WI(this.s().y,this._endPositionY)||this._lastDt===this._t;return this._lastDt=null,e},JI.prototype.setEnd=function(e,t){this._endPositionX=e,this._endPositionY=t},JI.prototype.reconfigure=function(e,t){this._m=e,this._f=1e3*t},ZI.prototype._solve=function(e,t){const n=this._c,o=this._m,i=this._k,a=n*n-4*o*i;if(0===a){const i=-n/(2*o),a=e,s=t/(i*e);return{x:function(e){return(a+s*e)*Math.pow(Math.E,i*e)},dx:function(e){const t=Math.pow(Math.E,i*e);return i*(a+s*e)*t+s*t}}}if(a>0){const i=(-n-Math.sqrt(a))/(2*o),s=(-n+Math.sqrt(a))/(2*o),r=(t-i*e)/(s-i),c=e-r;return{x:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),c*t+r*n},dx:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),c*i*t+r*s*n}}}const s=Math.sqrt(4*o*i-n*n)/(2*o),r=-n/2*o,c=e,u=(t-r*e)/s;return{x:function(e){return Math.pow(Math.E,r*e)*(c*Math.cos(s*e)+u*Math.sin(s*e))},dx:function(e){const t=Math.pow(Math.E,r*e),n=Math.cos(s*e),o=Math.sin(s*e);return t*(u*s*n-c*s*o)+r*t*(u*o+c*n)}}},ZI.prototype.x=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0},ZI.prototype.dx=function(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0},ZI.prototype.setEnd=function(e,t,n){if(n||(n=(new Date).getTime()),e!==this._endPosition||!YI(t,.1)){t=t||0;let o=this._endPosition;this._solution&&(YI(t,.1)&&(t=this._solution.dx((n-this._startTime)/1e3)),o=this._solution.x((n-this._startTime)/1e3),YI(t,.1)&&(t=0),YI(o,.1)&&(o=0),o+=this._endPosition),this._solution&&YI(o-e,.1)&&YI(t,.1)||(this._endPosition=e,this._solution=this._solve(o-this._endPosition,t),this._startTime=n)}},ZI.prototype.snap=function(e){this._startTime=(new Date).getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}},ZI.prototype.done=function(e){return e||(e=(new Date).getTime()),WI(this.x(),this._endPosition,.1)&&YI(this.dx(),.1)},ZI.prototype.reconfigure=function(e,t,n){this._m=e,this._k=t,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())},ZI.prototype.springConstant=function(){return this._k},ZI.prototype.damping=function(){return this._c},ZI.prototype.configuration=function(){return[{label:"Spring Constant",read:this.springConstant.bind(this),write:function(e,t){e.reconfigure(1,t,e.damping())}.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:function(e,t){e.reconfigure(1,e.springConstant(),t)}.bind(this,this),min:1,max:500}]},QI.prototype.setEnd=function(e,t,n,o){const i=(new Date).getTime();this._springX.setEnd(e,o,i),this._springY.setEnd(t,o,i),this._springScale.setEnd(n,o,i),this._startTime=i},QI.prototype.x=function(){const e=((new Date).getTime()-this._startTime)/1e3;return{x:this._springX.x(e),y:this._springY.x(e),scale:this._springScale.x(e)}},QI.prototype.done=function(){const e=(new Date).getTime();return this._springX.done(e)&&this._springY.done(e)&&this._springScale.done(e)},QI.prototype.reconfigure=function(e,t,n){this._springX.reconfigure(e,t,n),this._springY.reconfigure(e,t,n),this._springScale.reconfigure(e,t,n)};function eM(e,t){return+((1e3*e-1e3*t)/1e3).toFixed(1)}const tM=Xh({name:"MovableView",props:{direction:{type:String,default:"none"},inertia:{type:[Boolean,String],default:!1},outOfBounds:{type:[Boolean,String],default:!1},x:{type:[Number,String],default:0},y:{type:[Number,String],default:0},damping:{type:[Number,String],default:20},friction:{type:[Number,String],default:2},disabled:{type:[Boolean,String],default:!1},scale:{type:[Boolean,String],default:!1},scaleMin:{type:[Number,String],default:.5},scaleMax:{type:[Number,String],default:10},scaleValue:{type:[Number,String],default:1},animation:{type:[Boolean,String],default:!0}},emits:["change","scale"],setup(e,{slots:t,emit:n}){const o=oo(null),i=Qh(o,n),{setParent:a}=function(e,t,n){const o=gs("_isMounted",oo(!1)),i=gs("addMovableViewContext",(()=>{})),a=gs("removeMovableViewContext",(()=>{}));let s,r,c=oo(1),u=oo(1),l=oo(!1),d=oo(0),p=oo(0),h=null,f=null,g=!1,_=null,m=null;const v=new XI,y=new XI,I={historyX:[0,0],historyY:[0,0],historyT:[0,0]},M=Wr((()=>{let t=Number(e.friction);return isNaN(t)||t<=0?2:t})),C=new JI(1,M.value);Ri((()=>e.disabled),(()=>{K()}));const{_updateOldScale:T,_endScale:S,_setScale:E,scaleValueSync:D,_updateBoundary:k,_updateOffset:L,_updateWH:b,_scaleOffset:A,minX:R,minY:O,maxX:w,maxY:P,FAandSFACancel:N,_getLimitXY:G,_setTransform:U,_revise:x,dampingNumber:F,xMove:q,yMove:V,xSync:B,ySync:H,_STD:j}=function(e,t,n,o,i,a,s,r,c,u){const l=Wr((()=>{let t=Number(e.scaleMin);return isNaN(t)?.5:t})),d=Wr((()=>{let t=Number(e.scaleMax);return isNaN(t)?10:t})),p=oo(Number(e.scaleValue)||1);Ri(p,(e=>{U(e)})),Ri(l,(()=>{G()})),Ri(d,(()=>{G()})),Ri((()=>e.scaleValue),(e=>{p.value=Number(e)||0}));const{_updateBoundary:h,_updateOffset:f,_updateWH:g,_scaleOffset:_,minX:m,minY:v,maxX:y,maxY:I}=function(e,t,n){const o=gs("movableAreaWidth",oo(0)),i=gs("movableAreaHeight",oo(0)),a=gs("movableAreaRootRef"),s={x:0,y:0},r={x:0,y:0},c=oo(0),u=oo(0),l=oo(0),d=oo(0),p=oo(0),h=oo(0);function f(){let e=0-s.x+r.x,t=o.value-c.value-s.x-r.x;l.value=Math.min(e,t),p.value=Math.max(e,t);let n=0-s.y+r.y,a=i.value-u.value-s.y-r.y;d.value=Math.min(n,a),h.value=Math.max(n,a)}function g(){s.x=iM(e.value,a.value),s.y=aM(e.value,a.value)}function _(o){o=o||t.value,o=n(o);let i=e.value.getBoundingClientRect();u.value=i.height/t.value,c.value=i.width/t.value;let a=u.value*o,s=c.value*o;r.x=(s-c.value)/2,r.y=(a-u.value)/2}return{_updateBoundary:f,_updateOffset:g,_updateWH:_,_scaleOffset:r,minX:l,minY:d,maxX:p,maxY:h}}(t,o,N),{FAandSFACancel:M,_getLimitXY:C,_animationTo:T,_setTransform:S,_revise:E,dampingNumber:D,xMove:k,yMove:L,xSync:b,ySync:A,_STD:R}=function(e,t,n,o,i,a,s,r,c,u,l,d,p,h){const f=Wr((()=>{let e=Number(t.damping);return isNaN(e)?20:e})),g=Wr((()=>"all"===t.direction||"horizontal"===t.direction)),_=Wr((()=>"all"===t.direction||"vertical"===t.direction)),m=oo(rM(t.x)),v=oo(rM(t.y));Ri((()=>t.x),(e=>{m.value=rM(e)})),Ri((()=>t.y),(e=>{v.value=rM(e)})),Ri(m,(e=>{E(e)})),Ri(v,(e=>{D(e)}));const y=new QI(1,9*Math.pow(f.value,2)/40,f.value);function I(e,t){let n=!1;return e>i.value?(e=i.value,n=!0):e<s.value&&(e=s.value,n=!0),t>a.value?(t=a.value,n=!0):t<r.value&&(t=r.value,n=!0),{x:e,y:t,outOfBounds:n}}function M(){d&&d.cancel(),l&&l.cancel()}function C(e,n,i,a,s,r){M(),g.value||(e=c.value),_.value||(n=u.value),t.scale||(i=o.value);let d=I(e,n);e=d.x,n=d.y,t.animation?(y._springX._solution=null,y._springY._solution=null,y._springScale._solution=null,y._springX._endPosition=c.value,y._springY._endPosition=u.value,y._springScale._endPosition=o.value,y.setEnd(e,n,i,1),l=sM(y,(function(){let e=y.x();T(e.x,e.y,e.scale,a,s,r)}),(function(){l.cancel()}))):T(e,n,i,a,s,r)}function T(i,a,s,r="",l,d){null!==i&&"NaN"!==i.toString()&&"number"==typeof i||(i=c.value||0),null!==a&&"NaN"!==a.toString()&&"number"==typeof a||(a=u.value||0),i=Number(i.toFixed(1)),a=Number(a.toFixed(1)),s=Number(s.toFixed(1)),c.value===i&&u.value===a||l||h("change",{},{x:eM(i,n.x),y:eM(a,n.y),source:r}),t.scale||(s=o.value),s=+(s=p(s)).toFixed(3),d&&s!==o.value&&h("scale",{},{x:i,y:a,scale:s});let f="translateX("+i+"px) translateY("+a+"px) translateZ(0px) scale("+s+")";e.value&&(e.value.style.transform=f,e.value.style.webkitTransform=f,c.value=i,u.value=a,o.value=s)}function S(e){let t=I(c.value,u.value),n=t.x,i=t.y,a=t.outOfBounds;return a&&C(n,i,o.value,e),a}function E(e){if(g.value){if(e+n.x===c.value)return c;l&&l.cancel(),C(e+n.x,v.value+n.y,o.value)}return e}function D(e){if(_.value){if(e+n.y===u.value)return u;l&&l.cancel(),C(m.value+n.x,e+n.y,o.value)}return e}return{FAandSFACancel:M,_getLimitXY:I,_animationTo:C,_setTransform:T,_revise:S,dampingNumber:f,xMove:g,yMove:_,xSync:m,ySync:v,_STD:y}}(t,e,_,o,y,I,m,v,s,r,c,u,N,n);function O(t,n){if(e.scale){t=N(t),g(t),h();const e=C(s.value,r.value),o=e.x,i=e.y;n?T(o,i,t,"",!0,!0):oM((function(){S(o,i,t,"",!0,!0)}))}}function w(){a.value=!0}function P(e){i.value=e}function N(e){return e=Math.max(.5,l.value,e),e=Math.min(10,d.value,e)}function G(){if(!e.scale)return!1;O(o.value,!0),P(o.value)}function U(t){return!!e.scale&&(O(t=N(t),!0),P(t),t)}function x(){a.value=!1,P(o.value)}function F(e){e&&(e=i.value*e,w(),O(e))}return{_updateOldScale:P,_endScale:x,_setScale:F,scaleValueSync:p,_updateBoundary:h,_updateOffset:f,_updateWH:g,_scaleOffset:_,minX:m,minY:v,maxX:y,maxY:I,FAandSFACancel:M,_getLimitXY:C,_animationTo:T,_setTransform:S,_revise:E,dampingNumber:D,xMove:k,yMove:L,xSync:b,ySync:A,_STD:R}}(e,n,t,c,u,l,d,p,h,f);function K(){l.value||e.disabled||(N(),I.historyX=[0,0],I.historyY=[0,0],I.historyT=[0,0],q.value&&(s=d.value),V.value&&(r=p.value),n.value.style.willChange="transform",_=null,m=null,g=!0)}function $(t){if(!l.value&&!e.disabled&&g){let n=d.value,o=p.value;if(null===m&&(m=Math.abs(t.detail.dx/t.detail.dy)>1?"htouchmove":"vtouchmove"),q.value&&(n=t.detail.dx+s,I.historyX.shift(),I.historyX.push(n),V.value||null!==_||(_=Math.abs(t.detail.dx/t.detail.dy)<1)),V.value&&(o=t.detail.dy+r,I.historyY.shift(),I.historyY.push(o),q.value||null!==_||(_=Math.abs(t.detail.dy/t.detail.dx)<1)),I.historyT.shift(),I.historyT.push(t.detail.timeStamp),!_){t.preventDefault();let i="touch";n<R.value?e.outOfBounds?(i="touch-out-of-bounds",n=R.value-v.x(R.value-n)):n=R.value:n>w.value&&(e.outOfBounds?(i="touch-out-of-bounds",n=w.value+v.x(n-w.value)):n=w.value),o<O.value?e.outOfBounds?(i="touch-out-of-bounds",o=O.value-y.x(O.value-o)):o=O.value:o>P.value&&(e.outOfBounds?(i="touch-out-of-bounds",o=P.value+y.x(o-P.value)):o=P.value),oM((function(){U(n,o,c.value,i)}))}}}function z(){if(!l.value&&!e.disabled&&g&&(n.value.style.willChange="auto",g=!1,!_&&!x("out-of-bounds")&&e.inertia)){const e=1e3*(I.historyX[1]-I.historyX[0])/(I.historyT[1]-I.historyT[0]),t=1e3*(I.historyY[1]-I.historyY[0])/(I.historyT[1]-I.historyT[0]),n=d.value,o=p.value;C.setV(e,t),C.setS(n,o);const i=C.delta().x,a=C.delta().y;let s=i+n,r=a+o;s<R.value?(s=R.value,r=o+(R.value-n)*a/i):s>w.value&&(s=w.value,r=o+(w.value-n)*a/i),r<O.value?(r=O.value,s=n+(O.value-o)*i/a):r>P.value&&(r=P.value,s=n+(P.value-o)*i/a),C.setEnd(s,r),f=sM(C,(function(){let e=C.s(),t=e.x,n=e.y;U(t,n,c.value,"friction")}),(function(){f.cancel()}))}e.outOfBounds||e.inertia||N()}function W(){if(!o.value)return;N();let t=e.scale?D.value:1;L(),b(t),k();let n=G(B.value+A.x,H.value+A.y),i=n.x,a=n.y;U(i,a,t,"",!0),T(t)}return va((()=>{zI(n.value,(e=>{switch(e.detail.state){case"start":K();break;case"move":$(e);break;case"end":z()}})),W(),C.reconfigure(1,M.value),j.reconfigure(1,9*Math.pow(F.value,2)/40,F.value),n.value.style.transformOrigin="center";const e={rootRef:n,setParent:W,_endScale:S,_setScale:E};i(e),Ca((()=>{a(e)}))})),Ca((()=>{N()})),{setParent:W}}(e,i,o);return()=>_r("uni-movable-view",{ref:o},[_r(xy,{onResize:a},null,8,["onResize"]),t.default&&t.default()],512)}});let nM=!1;function oM(e){nM||(nM=!0,requestAnimationFrame((function(){e(),nM=!1})))}function iM(e,t){if(e===t)return 0;let n=e.offsetLeft;return e.offsetParent?n+=iM(e.offsetParent,t):0}function aM(e,t){if(e===t)return 0;let n=e.offsetTop;return e.offsetParent?n+=aM(e.offsetParent,t):0}function sM(e,t,n){let o={id:0,cancelled:!1};return function e(t,n,o,i){if(!t||!t.cancelled){o(n);let a=n.done();a||t.cancelled||(t.id=requestAnimationFrame(e.bind(null,t,n,o,i))),a&&i&&i(n)}}(o,e,t,n),{cancel:function(e){e&&e.id&&cancelAnimationFrame(e.id),e&&(e.cancelled=!0)}.bind(null,o),model:e}}function rM(e){return/\d+[ur]px$/i.test(e)?uni.upx2px(parseFloat(e)):Number(e)||0}const cM=["navigate","redirect","switchTab","reLaunch","navigateBack"],uM=["slide-in-right","slide-in-left","slide-in-top","slide-in-bottom","fade-in","zoom-out","zoom-fade-out","pop-in","none"],lM=["slide-out-right","slide-out-left","slide-out-top","slide-out-bottom","fade-out","zoom-in","zoom-fade-in","pop-out","none"],dM={hoverClass:{type:String,default:"navigator-hover"},url:{type:String,default:""},openType:{type:String,default:"navigate",validator:e=>Boolean(~cM.indexOf(e))},delta:{type:Number,default:1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:600},exists:{type:String,default:""},hoverStopPropagation:{type:Boolean,default:!1},animationType:{type:String,default:"",validator:e=>!e||uM.concat(lM).includes(e)},animationDuration:{type:[String,Number],default:300}};const pM=Xh({name:"Navigator",inheritAttrs:!1,compatConfig:{MODE:3},props:u({},dM,{renderLink:{type:Boolean,default:!0}}),setup(e,{slots:t}){const n=oo(null),o=Rr(),i=o&&o.vnode.scopeId||"",{hovering:a,binding:s}=tf(e),r=function(e){return()=>{if("navigateBack"!==e.openType&&!e.url)return void console.error("<navigator/> should have url attribute when using navigateTo, redirectTo, reLaunch or switchTab");const t=parseInt(e.animationDuration);switch(e.openType){case"navigate":uni.navigateTo({url:e.url,animationType:e.animationType||"pop-in",animationDuration:t});break;case"redirect":uni.redirectTo({url:e.url,exists:e.exists});break;case"switchTab":uni.switchTab({url:e.url});break;case"reLaunch":uni.reLaunch({url:e.url});break;case"navigateBack":uni.navigateBack({delta:e.delta,animationType:e.animationType||"pop-out",animationDuration:t})}}}(e);return()=>{const{hoverClass:c,url:u}=e,l=e.hoverClass&&"none"!==e.hoverClass,d=e.renderLink?_r("a",{class:"navigator-wrap",href:u,onClick:$p,onMousedown:$p},[t.default&&t.default()],40,["href","onClick","onMousedown"]):t.default&&t.default();return _r("uni-navigator",Er({class:l&&a.value?c:"",ref:n},l&&s,o?o.attrs:{},{[i]:""},{onClick:r}),[d],16,["onClick"])}}});const hM=Xh({name:"PickerView",props:{value:{type:Array,default:()=>[],validator:function(e){return h(e)&&e.filter((e=>"number"==typeof e)).length===e.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}},emits:["change","pickstart","pickend","update:value"],setup(e,{slots:t,emit:n}){const o=oo(null),i=oo(null),a=Qh(o,n),s=function(e){const t=qn([...e.value]),n=qn({value:t,height:34});return Ri((()=>e.value),((e,t)=>{n.value.length=e.length,e.forEach(((e,t)=>{e!==n.value[t]&&n.value.splice(t,1,e)}))})),n}(e),r=oo(null);va((()=>{const e=r.value;e&&(s.height=e.$el.offsetHeight)}));let c=oo([]),u=oo([]);function l(e){let t=u.value;t=t.filter((e=>e.type!==Zs));let n=t.indexOf(e);return-1!==n?n:c.value.indexOf(e)}return fs("getPickerViewColumn",(function(e){return Wr({get(){const t=l(e.vnode);return s.value[t]||0},set(t){const o=l(e.vnode);if(o<0)return;if(s.value[o]!==t){s.value[o]=t;const e=s.value.map((e=>e));n("update:value",e),a("change",{},{value:e})}}})})),fs("pickerViewProps",e),fs("pickerViewState",s),()=>{const e=t.default&&t.default();{const t=VI(e);c.value=t,Uo((()=>{u.value=t}))}return _r("uni-picker-view",{ref:o},[_r(xy,{ref:r,onResize:({height:e})=>s.height=e},null,8,["onResize"]),_r("div",{ref:i,class:"uni-picker-view-wrapper"},[e],512)],512)}}});class fM{constructor(e){this._drag=e,this._dragLog=Math.log(e),this._x=0,this._v=0,this._startTime=0}set(e,t){this._x=e,this._v=t,this._startTime=(new Date).getTime()}setVelocityByEnd(e){this._v=(e-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)}x(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._x+this._v*t/this._dragLog-this._v/this._dragLog}dx(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._v*t}done(){return Math.abs(this.dx())<3}reconfigure(e){const t=this.x(),n=this.dx();this._drag=e,this._dragLog=Math.log(e),this.set(t,n)}configuration(){const e=this;return[{label:"Friction",read:function(){return e._drag},write:function(t){e.reconfigure(t)},min:.001,max:.1,step:.001}]}}function gM(e,t,n){return e>t-n&&e<t+n}function _M(e,t){return gM(e,0,t)}class mM{constructor(e,t,n){this._m=e,this._k=t,this._c=n,this._solution=null,this._endPosition=0,this._startTime=0}_solve(e,t){const n=this._c,o=this._m,i=this._k,a=n*n-4*o*i;if(0===a){const i=-n/(2*o),a=e,s=t/(i*e);return{x:function(e){return(a+s*e)*Math.pow(Math.E,i*e)},dx:function(e){const t=Math.pow(Math.E,i*e);return i*(a+s*e)*t+s*t}}}if(a>0){const i=(-n-Math.sqrt(a))/(2*o),s=(-n+Math.sqrt(a))/(2*o),r=(t-i*e)/(s-i),c=e-r;return{x:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),c*t+r*n},dx:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,i*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),c*i*t+r*s*n}}}const s=Math.sqrt(4*o*i-n*n)/(2*o),r=-n/2*o,c=e,u=(t-r*e)/s;return{x:function(e){return Math.pow(Math.E,r*e)*(c*Math.cos(s*e)+u*Math.sin(s*e))},dx:function(e){const t=Math.pow(Math.E,r*e),n=Math.cos(s*e),o=Math.sin(s*e);return t*(u*s*n-c*s*o)+r*t*(u*o+c*n)}}}x(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0}dx(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0}setEnd(e,t,n){if(n||(n=(new Date).getTime()),e!==this._endPosition||!_M(t,.4)){t=t||0;let o=this._endPosition;this._solution&&(_M(t,.4)&&(t=this._solution.dx((n-this._startTime)/1e3)),o=this._solution.x((n-this._startTime)/1e3),_M(t,.4)&&(t=0),_M(o,.4)&&(o=0),o+=this._endPosition),this._solution&&_M(o-e,.4)&&_M(t,.4)||(this._endPosition=e,this._solution=this._solve(o-this._endPosition,t),this._startTime=n)}}snap(e){this._startTime=(new Date).getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}}done(e){return e||(e=(new Date).getTime()),gM(this.x(),this._endPosition,.4)&&_M(this.dx(),.4)}reconfigure(e,t,n){this._m=e,this._k=t,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())}springConstant(){return this._k}damping(){return this._c}configuration(){return[{label:"Spring Constant",read:this.springConstant.bind(this),write:function(e,t){e.reconfigure(1,t,e.damping())}.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:function(e,t){e.reconfigure(1,e.springConstant(),t)}.bind(this,this),min:1,max:500}]}}class vM{constructor(e,t,n){this._extent=e,this._friction=t||new fM(.01),this._spring=n||new mM(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}snap(e,t){this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(t)}set(e,t){this._friction.set(e,t),e>0&&t>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(0)):e<-this._extent&&t<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()}x(e){if(!this._startTime)return 0;if(e||(e=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;let t=this._friction.x(e),n=this.dx(e);return(t>0&&n>=0||t<-this._extent&&n<=0)&&(this._springing=!0,this._spring.setEnd(0,n),t<-this._extent?this._springOffset=-this._extent:this._springOffset=0,t=this._spring.x()+this._springOffset),t}dx(e){let t;return t=this._lastTime===e?this._lastDx:this._springing?this._spring.dx(e):this._friction.dx(e),this._lastTime=e,this._lastDx=t,t}done(){return this._springing?this._spring.done():this._friction.done()}setVelocityByEnd(e){this._friction.setVelocityByEnd(e)}configuration(){const e=this._friction.configuration();return e.push.apply(e,this._spring.configuration()),e}}class yM{constructor(e,t){t=t||{},this._element=e,this._options=t,this._enableSnap=t.enableSnap||!1,this._itemSize=t.itemSize||0,this._enableX=t.enableX||!1,this._enableY=t.enableY||!1,this._shouldDispatchScrollEvent=!!t.onScroll,this._enableX?(this._extent=(t.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=t.scrollWidth):(this._extent=(t.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=t.scrollHeight),this._position=0,this._scroll=new vM(this._extent,t.friction,t.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}onTouchStart(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()}onTouchMove(e,t){let n=this._startPosition;this._enableX?n+=e:this._enableY&&(n+=t),n>0?n*=.5:n<-this._extent&&(n=.5*(n+this._extent)-this._extent),this._position=n,this.updatePosition(),this.dispatchScroll()}onTouchEnd(e,t,n){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(t)<this._itemSize&&Math.abs(n.y)<300||Math.abs(n.y)<150))return void this.snap();if(this._enableX&&(Math.abs(e)<this._itemSize&&Math.abs(n.x)<300||Math.abs(n.x)<150))return void this.snap()}let o;if(this._enableX?this._scroll.set(this._position,n.x):this._enableY&&this._scroll.set(this._position,n.y),this._enableSnap){const e=this._scroll._friction.x(100),t=e%this._itemSize;o=Math.abs(t)>this._itemSize/2?e-(this._itemSize-Math.abs(t)):e-t,o<=0&&o>=-this._extent&&this._scroll.setVelocityByEnd(o)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=function(e,t,n){const o={id:0,cancelled:!1};return function e(t,n,o,i){if(!t||!t.cancelled){o(n);const a=n.done();a||t.cancelled||(t.id=requestAnimationFrame(e.bind(null,t,n,o,i))),a&&i&&i(n)}}(o,e,t,n),{cancel:function(e){e&&e.id&&cancelAnimationFrame(e.id),e&&(e.cancelled=!0)}.bind(null,o),model:e}}(this._scroll,(()=>{const e=Date.now(),t=(e-this._scroll._startTime)/1e3,n=this._scroll.x(t);this._position=n,this.updatePosition();const o=this._scroll.dx(t);this._shouldDispatchScrollEvent&&e-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/o),this._lastTime=e)}),(()=>{this._enableSnap&&(o<=0&&o>=-this._extent&&(this._position=o,this.updatePosition()),m(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1}))}onTransitionEnd(){this._element.style.webkitTransition="",this._element.style.transition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()}snap(){const e=this._itemSize,t=this._position%e,n=Math.abs(t)>this._itemSize/2?this._position-(e-Math.abs(t)):this._position-t;this._position!==n&&(this._snapping=!0,this.scrollTo(-n),m(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))}scrollTo(e,t){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"==typeof e&&(this._position=-e),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0);const n="transform "+(t||.2)+"s ease-out";this._element.style.webkitTransition="-webkit-"+n,this._element.style.transition=n,this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd)}dispatchScroll(){if(m(this._options.onScroll)&&Math.round(Number(this._lastPos))!==Math.round(this._position)){this._lastPos=this._position;const e={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(e)}}update(e,t,n){let o=0;const i=this._position;this._enableX?(o=this._element.childNodes.length?(t||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=t):(o=this._element.childNodes.length?(t||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=t),"number"==typeof e&&(this._position=-e),this._position<-o?this._position=-o:this._position>0&&(this._position=0),this._itemSize=n||this._itemSize,this.updatePosition(),i!==this._position&&(this.dispatchScroll(),m(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=o,this._scroll._extent=o}updatePosition(){let e="";this._enableX?e="translateX("+this._position+"px) translateZ(0)":this._enableY&&(e="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=e,this._element.style.transform=e}isScrolling(){return this._scrolling||this._snapping}}function IM(e,t){const n={trackingID:-1,maxDy:0,maxDx:0},o=new yM(e,t);function i(e){const t=e,o=e;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:o.screenX-n.x,y:o.screenY-n.y}}return{scroller:o,handleTouchStart:function(e){const t=e,i=e;"start"===t.detail.state?(n.trackingID="touch",n.x=t.detail.x,n.y=t.detail.y):(n.trackingID="mouse",n.x=i.screenX,n.y=i.screenY),n.maxDx=0,n.maxDy=0,n.historyX=[0],n.historyY=[0],n.historyTime=[t.detail.timeStamp||i.timeStamp],n.listener=o,o.onTouchStart&&o.onTouchStart(),("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault()},handleTouchMove:function(e){const t=e,o=e;if(-1!==n.trackingID){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault();const a=i(e);if(a){for(n.maxDy=Math.max(n.maxDy,Math.abs(a.y)),n.maxDx=Math.max(n.maxDx,Math.abs(a.x)),n.historyX.push(a.x),n.historyY.push(a.y),n.historyTime.push(t.detail.timeStamp||o.timeStamp);n.historyTime.length>10;)n.historyTime.shift(),n.historyX.shift(),n.historyY.shift();n.listener&&n.listener.onTouchMove&&n.listener.onTouchMove(a.x,a.y)}}},handleTouchEnd:function(e){if(-1!==n.trackingID){e.preventDefault();const t=i(e);if(t){const e=n.listener;n.trackingID=-1,n.listener=null;const o={x:0,y:0};if(n.historyTime.length>2)for(let t=n.historyTime.length-1,i=n.historyTime[t],a=n.historyX[t],s=n.historyY[t];t>0;){t--;const e=i-n.historyTime[t];if(e>30&&e<50){o.x=(a-n.historyX[t])/(e/1e3),o.y=(s-n.historyY[t])/(e/1e3);break}}n.historyTime=[],n.historyX=[],n.historyY=[],e&&e.onTouchEnd&&e.onTouchEnd(t.x,t.y,o)}}}}}const MM=Xh({name:"PickerViewColumn",setup(e,{slots:t,emit:n}){const o=oo(null),i=oo(null),a=gs("getPickerViewColumn"),s=Rr(),r=a?a(s):oo(0),c=gs("pickerViewProps"),u=gs("pickerViewState"),l=oo(34),d=oo(null);va((()=>{const e=d.value;l.value=e.$el.offsetHeight}));const p=Wr((()=>(u.height-l.value)/2)),{state:h}=EI();let f;const g=qn({current:r.value,length:0});let _;function m(){f&&!_&&(_=!0,Uo((()=>{_=!1;let e=Math.min(g.current,g.length-1);e=Math.max(e,0),f.update(e*l.value,void 0,l.value)})))}Ri((()=>r.value),(e=>{e!==g.current&&(g.current=e,m())})),Ri((()=>g.current),(e=>r.value=e)),Ri([()=>l.value,()=>g.length,()=>u.height],m);let v=0;function y(e){const t=v+e.deltaY;if(Math.abs(t)>10){v=0;let e=Math.min(g.current+(t<0?-1:1),g.length-1);g.current=e=Math.max(e,0),f.scrollTo(e*l.value)}else v=t;e.preventDefault()}function I({clientY:e}){const t=o.value;if(!f.isScrolling()){const n=e-t.getBoundingClientRect().top-u.height/2,o=l.value/2;if(!(Math.abs(n)<=o)){const e=Math.ceil((Math.abs(n)-o)/l.value),t=n<0?-e:e;let i=Math.min(g.current+t,g.length-1);g.current=i=Math.max(i,0),f.scrollTo(i*l.value)}}}return va((()=>{const e=o.value,t=i.value,{scroller:n,handleTouchStart:a,handleTouchMove:s,handleTouchEnd:r}=IM(t,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:l.value,friction:new fM(1e-4),spring:new mM(2,90,20),onSnap:e=>{isNaN(e)||e===g.current||(g.current=e)}});f=n,zI(e,(e=>{switch(e.detail.state){case"start":a(e);break;case"move":s(e),e.stopPropagation();break;case"end":case"cancel":r(e)}}),!0),function(e){let t=0,n=0;e.addEventListener("touchstart",(e=>{const o=e.changedTouches[0];t=o.clientX,n=o.clientY})),e.addEventListener("touchend",(e=>{const o=e.changedTouches[0];if(Math.abs(o.clientX-t)<20&&Math.abs(o.clientY-n)<20){const t={bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget},n=new CustomEvent("click",t);["screenX","screenY","clientX","clientY","pageX","pageY"].forEach((e=>{n[e]=o[e]})),e.target.dispatchEvent(n)}}))}(e),m()})),()=>{const e=t.default&&t.default();g.length=VI(e).length;const n=`${p.value}px 0`;return _r("uni-picker-view-column",{ref:o},[_r("div",{onWheel:y,onClick:I,class:"uni-picker-view-group"},[_r("div",Er(h.attrs,{class:["uni-picker-view-mask",c.maskClass],style:`background-size: 100% ${p.value}px;${c.maskStyle}`}),null,16),_r("div",Er(h.attrs,{class:["uni-picker-view-indicator",c.indicatorClass],style:c.indicatorStyle}),[_r(xy,{ref:d,onResize:({height:e})=>l.value=e},null,8,["onResize"])],16),_r("div",{ref:i,class:["uni-picker-view-content"],style:{padding:n,"--picker-view-column-indicator-height":`${l.value}px`}},[e],4)],40,["onWheel","onClick"])],512)}}}),CM=ce,TM="backwards",SM=Xh({name:"Progress",props:{percent:{type:[Number,String],default:0,validator:e=>!isNaN(parseFloat(e))},fontSize:{type:[String,Number],default:16},showInfo:{type:[Boolean,String],default:!1},strokeWidth:{type:[Number,String],default:6,validator:e=>!isNaN(parseFloat(e))},color:{type:String,default:CM},activeColor:{type:String,default:CM},backgroundColor:{type:String,default:"#EBEBEB"},active:{type:[Boolean,String],default:!1},activeMode:{type:String,default:TM},duration:{type:[Number,String],default:30,validator:e=>!isNaN(parseFloat(e))},borderRadius:{type:[Number,String],default:0}},setup(e){const t=oo(null),n=function(e){const t=oo(0),n=Wr((()=>`background-color: ${e.backgroundColor}; height: ${e.strokeWidth}px;`)),o=Wr((()=>{const n=e.color!==CM&&e.activeColor===CM?e.color:e.activeColor;return`width: ${t.value}%;background-color: ${n}`})),i=Wr((()=>{if("string"==typeof e.percent&&!/^-?\d*\.?\d*$/.test(e.percent))return 0;let t=parseFloat(e.percent);return Number.isNaN(t)||t<0?t=0:t>100&&(t=100),t})),a=qn({outerBarStyle:n,innerBarStyle:o,realPercent:i,currentPercent:t,strokeTimer:0,lastPercent:0});return a}(e);return EM(n,e),Ri((()=>n.realPercent),((t,o)=>{n.strokeTimer&&clearInterval(n.strokeTimer),n.lastPercent=o||0,EM(n,e)})),()=>{const{showInfo:o}=e,{outerBarStyle:i,innerBarStyle:a,currentPercent:s}=n;return _r("uni-progress",{class:"uni-progress",ref:t},[_r("div",{style:i,class:"uni-progress-bar"},[_r("div",{style:a,class:"uni-progress-inner-bar"},null,4)],4),o?_r("p",{class:"uni-progress-info"},[s+"%"]):""],512)}}});function EM(e,t){t.active?(e.currentPercent=t.activeMode===TM?0:e.lastPercent,e.strokeTimer=setInterval((()=>{e.currentPercent+1>e.realPercent?(e.currentPercent=e.realPercent,e.strokeTimer&&clearInterval(e.strokeTimer)):e.currentPercent+=1}),parseFloat(t.duration))):e.currentPercent=e.realPercent}const DM=Qp("ucg"),kM=Xh({name:"RadioGroup",props:{name:{type:String,default:""}},setup(e,{emit:t,slots:n}){const o=oo(null);return function(e,t){const n=[];va((()=>{r(n.length-1)}));const o=()=>{var e;return null==(e=n.find((e=>e.value.radioChecked)))?void 0:e.value.value};fs(DM,{addField(e){n.push(e)},removeField(e){n.splice(n.indexOf(e),1)},radioChange(e,i){r(n.indexOf(i),!0),t("change",e,{value:o()})}});const i=gs(of,!1),a={submit:()=>{let t=["",null];return""!==e.name&&(t[0]=e.name,t[1]=o()),t}};i&&(i.addField(a),Ma((()=>{i.removeField(a)})));function s(e,t){e.value={radioChecked:t,value:e.value.value}}function r(e,t){n.forEach(((o,i)=>{i!==e&&(t?s(n[i],!1):n.forEach(((e,t)=>{i>=t||n[t].value.radioChecked&&s(n[i],!1)})))}))}}(e,Qh(o,t)),()=>_r("uni-radio-group",{ref:o},[n.default&&n.default()],512)}});const LM=Xh({name:"Radio",props:{checked:{type:[Boolean,String],default:!1},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},value:{type:String,default:""},color:{type:String,default:"#007aff"},backgroundColor:{type:String,default:""},borderColor:{type:String,default:""},activeBackgroundColor:{type:String,default:""},activeBorderColor:{type:String,default:""},iconColor:{type:String,default:"#ffffff"}},setup(e,{slots:t}){const n=oo(null),o=oo(e.checked),i=oo(e.value);const a=Wr((()=>function(){if(e.disabled)return{backgroundColor:"#E1E1E1",borderColor:"#D1D1D1"};const t={};return o.value?(t.backgroundColor=e.activeBackgroundColor||e.color,t.borderColor=e.activeBorderColor||t.backgroundColor):(e.borderColor&&(t.borderColor=e.borderColor),e.backgroundColor&&(t.backgroundColor=e.backgroundColor)),t}(o.value)));Ri([()=>e.checked,()=>e.value],(([e,t])=>{o.value=e,i.value=t}));const{uniCheckGroup:s,uniLabel:r,field:c}=function(e,t,n){const o=Wr({get:()=>({radioChecked:Boolean(e.value),value:t.value}),set:({radioChecked:t})=>{e.value=t}}),i={reset:n},a=gs(DM,!1);a&&a.addField(o);const s=gs(of,!1);s&&s.addField(i);const r=gs(rf,!1);return Ma((()=>{a&&a.removeField(o),s&&s.removeField(i)})),{uniCheckGroup:a,uniForm:s,uniLabel:r,field:o}}(o,i,(()=>{o.value=!1})),u=t=>{e.disabled||o.value||(o.value=!0,s&&s.radioChange(t,c),t.stopPropagation())};return r&&(r.addHandler(u),Ma((()=>{r.removeHandler(u)}))),uf(e,{"label-click":u}),()=>{const i=nf(e,"disabled");let s;return s=o.value,_r("uni-radio",Er(i,{id:e.id,onClick:u,ref:n}),[_r("div",{class:"uni-radio-wrapper",style:{"--HOVER-BD-COLOR":o.value?a.value.borderColor:e.activeBorderColor}},[_r("div",{class:["uni-radio-input",{"uni-radio-input-disabled":e.disabled}],style:a.value},[s?ch(oh,e.disabled?"#ADADAD":e.iconColor,18):""],6),t.default&&t.default()],4)],16,["id","onClick"])}}});const bM={a:"",abbr:"",address:"",article:"",aside:"",b:"",bdi:"",bdo:["dir"],big:"",blockquote:"",br:"",caption:"",center:"",cite:"",code:"",col:["span","width"],colgroup:["span","width"],dd:"",del:"",div:"",dl:"",dt:"",em:"",fieldset:"",font:"",footer:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",header:"",hr:"",i:"",img:["alt","src","height","width"],ins:"",label:"",legend:"",li:"",mark:"",nav:"",ol:["start","type"],p:"",pre:"",q:"",rt:"",ruby:"",s:"",section:"",small:"",span:"",strong:"",sub:"",sup:"",table:["width"],tbody:"",td:["colspan","height","rowspan","width"],tfoot:"",th:["colspan","height","rowspan","width"],thead:"",tr:["colspan","height","rowspan","width"],tt:"",u:"",ul:""},AM={amp:"&",gt:">",lt:"<",nbsp:" ",quot:'"',apos:"'",ldquo:"“",rdquo:"”",yen:"¥",radic:"√",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",hellip:"…"};const RM=(e,t,n)=>!n||h(n)&&!n.length?[]:n.map((n=>{var o;if(S(n)){if(!p(n,"type")||"node"===n.type){let i={[e]:""};const a=null==(o=n.name)?void 0:o.toLowerCase();if(!p(bM,a))return;return function(e,t){if(S(t))for(const n in t)if(p(t,n)){const o=t[n];"img"===e&&"src"===n&&(t[n]=dy(o))}}(a,n.attrs),i=u(i,function(e,t){if(["a","img"].includes(e.name)&&t)return{onClick:n=>{t(n,{node:e}),n.stopPropagation(),n.preventDefault(),n.returnValue=!1}}}(n,t),n.attrs),Xr(n.name,i,RM(e,t,n.children))}return"text"===n.type&&v(n.text)&&""!==n.text?yr((n.text||"").replace(/&(([a-zA-Z]+)|(#x{0,1}[\da-zA-Z]+));/gi,(function(e,t){return p(AM,t)&&AM[t]?AM[t]:/^#[0-9]{1,4}$/.test(t)?String.fromCharCode(t.slice(1)):/^#x[0-9a-f]{1,4}$/i.test(t)?String.fromCharCode(0+t.slice(1)):e}))):void 0}}));function OM(e){e=function(e){return e.replace(/<\?xml.*\?>\n/,"").replace(/<!doctype.*>\n/,"").replace(/<!DOCTYPE.*>\n/,"")}(e);const t=[],n={node:"root",children:[]};return function(e,t){var n,o,i,a=[],s=e;for(a.last=function(){return this[this.length-1]};e;){if(o=!0,a.last()&&lI[a.last()])e=e.replace(new RegExp("([\\s\\S]*?)</"+a.last()+"[^>]*>"),(function(e,n){return n=n.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),t.chars&&t.chars(n),""})),u("",a.last());else if(0==e.indexOf("\x3c!--")?(n=e.indexOf("--\x3e"))>=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),o=!1):0==e.indexOf("</")?(i=e.match(oI))&&(e=e.substring(i[0].length),i[0].replace(oI,u),o=!1):0==e.indexOf("<")&&(i=e.match(nI))&&(e=e.substring(i[0].length),i[0].replace(nI,c),o=!1),o){var r=(n=e.indexOf("<"))<0?e:e.substring(0,n);e=n<0?"":e.substring(n),t.chars&&t.chars(r)}if(e==s)throw"Parse Error: "+e;s=e}function c(e,n,o,i){if(n=n.toLowerCase(),sI[n])for(;a.last()&&rI[a.last()];)u("",a.last());if(cI[n]&&a.last()==n&&u("",n),(i=aI[n]||!!i)||a.push(n),t.start){var s=[];o.replace(iI,(function(e,t){var n=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:uI[t]?t:"";s.push({name:t,value:n,escaped:n.replace(/(^|[^\\])"/g,'$1\\"')})})),t.start&&t.start(n,s,i)}}function u(e,n){if(n)for(o=a.length-1;o>=0&&a[o]!=n;o--);else var o=0;if(o>=0){for(var i=a.length-1;i>=o;i--)t.end&&t.end(a[i]);a.length=o}}u()}(e,{start:function(e,o,i){const a={name:e};if(0!==o.length&&(a.attrs=function(e){return e.reduce((function(e,t){let n=t.value;const o=t.name;return n.match(/ /)&&-1===["style","src"].indexOf(o)&&(n=n.split(" ")),e[o]?Array.isArray(e[o])?e[o].push(n):e[o]=[e[o],n]:e[o]=n,e}),{})}(o)),i){const e=t[0]||n;e.children||(e.children=[]),e.children.push(a)}else t.unshift(a)},end:function(e){const o=t.shift();if(o.name!==e&&console.error("invalid state: mismatch end tag"),0===t.length)n.children.push(o);else{const e=t[0];e.children||(e.children=[]),e.children.push(o)}},chars:function(e){const o={type:"text",text:e};if(0===t.length)n.children.push(o);else{const e=t[0];e.children||(e.children=[]),e.children.push(o)}},comment:function(e){const n={node:"comment",text:e},o=t[0];o&&(o.children||(o.children=[]),o.children.push(n))}}),n.children}const wM=Xh({name:"RichText",compatConfig:{MODE:3},props:{nodes:{type:[Array,String],default:function(){return[]}}},emits:["itemclick"],setup(e,{emit:t}){const n=Rr(),o=n&&n.vnode.scopeId||"",i=oo(null),a=oo([]),s=Qh(i,t);function r(e,t={}){s("itemclick",e,t)}return Ri((()=>e.nodes),(function(){let t=e.nodes;v(t)&&(t=OM(e.nodes)),a.value=RM(o,r,t)}),{immediate:!0}),()=>Xr("uni-rich-text",{ref:i},Xr("div",{},a.value))}}),PM=Xh({name:"Refresher",props:{refreshState:{type:String,default:""},refresherHeight:{type:Number,default:0},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"}},setup(e,{slots:t}){const n=oo(null),o=Wr((()=>{const t={backgroundColor:e.refresherBackground};switch(e.refreshState){case"pulling":t.height=e.refresherHeight+"px";break;case"refreshing":t.height=e.refresherThreshold+"px",t.transition="height 0.3s";break;case"":case"refresherabort":case"restore":t.height="0px",t.transition="height 0.3s"}return t})),i=Wr((()=>{const t=e.refresherHeight/e.refresherThreshold;return 360*(t>1?1:t)}));return()=>{const{refreshState:a,refresherDefaultStyle:s,refresherThreshold:r}=e;return _r("div",{ref:n,style:o.value,class:"uni-scroll-view-refresher"},["none"!==s?_r("div",{class:"uni-scroll-view-refresh"},[_r("div",{class:"uni-scroll-view-refresh-inner"},["pulling"==a?_r("svg",{key:"refresh__icon",style:{transform:"rotate("+i.value+"deg)"},fill:"#2BD009",class:"uni-scroll-view-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},[_r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null),_r("path",{d:"M0 0h24v24H0z",fill:"none"},null)],4):null,"refreshing"==a?_r("svg",{key:"refresh__spinner",class:"uni-scroll-view-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},[_r("circle",{cx:"50",cy:"50",r:"20",fill:"none",style:"color: #2bd009","stroke-width":"3"},null)]):null])]):null,"none"===s?_r("div",{class:"uni-scroll-view-refresher-container",style:{height:`${r}px`}},[t.default&&t.default()]):null],4)}}}),NM=rt(!0),GM=Xh({name:"ScrollView",compatConfig:{MODE:3},props:{direction:{type:[String],default:"vertical"},scrollX:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1},showScrollbar:{type:[Boolean,String],default:!0},upperThreshold:{type:[Number,String],default:50},lowerThreshold:{type:[Number,String],default:50},scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},scrollIntoView:{type:String,default:""},scrollWithAnimation:{type:[Boolean,String],default:!1},enableBackToTop:{type:[Boolean,String],default:!1},refresherEnabled:{type:[Boolean,String],default:!1},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"},refresherTriggered:{type:[Boolean,String],default:!1}},emits:["scroll","scrolltoupper","scrolltolower","refresherrefresh","refresherrestore","refresherpulling","refresherabort","update:refresherTriggered"],setup(e,{emit:t,slots:n,expose:o}){const i=oo(null),a=oo(null),s=oo(null),r=oo(null),c=Qh(i,t),{state:u,scrollTopNumber:l,scrollLeftNumber:d}=function(e){const t=Wr((()=>Number(e.scrollTop)||0)),n=Wr((()=>Number(e.scrollLeft)||0)),o=qn({lastScrollTop:t.value,lastScrollLeft:n.value,lastScrollToUpperTime:0,lastScrollToLowerTime:0,refresherHeight:0,refreshState:""});return{state:o,scrollTopNumber:t,scrollLeftNumber:n}}(e),{realScrollX:p,realScrollY:h,_scrollLeftChanged:f,_scrollTopChanged:g}=function(e,t,n,o,i,a,s,r,c){let u=!1,l=0,d=!1,p=()=>{};const h=Wr((()=>e.scrollX)),f=Wr((()=>e.scrollY)),g=Wr((()=>{let t=Number(e.upperThreshold);return isNaN(t)?50:t})),_=Wr((()=>{let t=Number(e.lowerThreshold);return isNaN(t)?50:t}));function m(e,t){const n=s.value;let o=0,i="";if(e<0?e=0:"x"===t&&e>n.scrollWidth-n.offsetWidth?e=n.scrollWidth-n.offsetWidth:"y"===t&&e>n.scrollHeight-n.offsetHeight&&(e=n.scrollHeight-n.offsetHeight),"x"===t?o=n.scrollLeft-e:"y"===t&&(o=n.scrollTop-e),0===o)return;let a=r.value;a.style.transition="transform .3s ease-out",a.style.webkitTransition="-webkit-transform .3s ease-out","x"===t?i="translateX("+o+"px) translateZ(0)":"y"===t&&(i="translateY("+o+"px) translateZ(0)"),a.removeEventListener("transitionend",p),a.removeEventListener("webkitTransitionEnd",p),p=()=>C(e,t),a.addEventListener("transitionend",p),a.addEventListener("webkitTransitionEnd",p),"x"===t?n.style.overflowX="hidden":"y"===t&&(n.style.overflowY="hidden"),a.style.transform=i,a.style.webkitTransform=i}function v(e){const n=e.target;i("scroll",e,{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,scrollWidth:n.scrollWidth,deltaX:t.lastScrollLeft-n.scrollLeft,deltaY:t.lastScrollTop-n.scrollTop}),f.value&&(n.scrollTop<=g.value&&t.lastScrollTop-n.scrollTop>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(i("scrolltoupper",e,{direction:"top"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollTop+n.offsetHeight+_.value>=n.scrollHeight&&t.lastScrollTop-n.scrollTop<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(i("scrolltolower",e,{direction:"bottom"}),t.lastScrollToLowerTime=e.timeStamp)),h.value&&(n.scrollLeft<=g.value&&t.lastScrollLeft-n.scrollLeft>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(i("scrolltoupper",e,{direction:"left"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollLeft+n.offsetWidth+_.value>=n.scrollWidth&&t.lastScrollLeft-n.scrollLeft<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(i("scrolltolower",e,{direction:"right"}),t.lastScrollToLowerTime=e.timeStamp)),t.lastScrollTop=n.scrollTop,t.lastScrollLeft=n.scrollLeft}function y(t){f.value&&(e.scrollWithAnimation?m(t,"y"):s.value.scrollTop=t)}function I(t){h.value&&(e.scrollWithAnimation?m(t,"x"):s.value.scrollLeft=t)}function M(t){if(t){if(!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(t))return void console.error(`id error: scroll-into-view=${t}`);let n=a.value.querySelector("#"+t);if(n){let t=s.value.getBoundingClientRect(),o=n.getBoundingClientRect();if(h.value){let n=o.left-t.left,i=s.value.scrollLeft+n;e.scrollWithAnimation?m(i,"x"):s.value.scrollLeft=i}if(f.value){let n=o.top-t.top,i=s.value.scrollTop+n;e.scrollWithAnimation?m(i,"y"):s.value.scrollTop=i}}}}function C(e,t){r.value.style.transition="",r.value.style.webkitTransition="",r.value.style.transform="",r.value.style.webkitTransform="";let n=s.value;"x"===t?(n.style.overflowX=h.value?"auto":"hidden",n.scrollLeft=e):"y"===t&&(n.style.overflowY=f.value?"auto":"hidden",n.scrollTop=e),r.value.removeEventListener("transitionend",p),r.value.removeEventListener("webkitTransitionEnd",p)}function T(n){if(e.refresherEnabled){switch(n){case"refreshing":t.refresherHeight=e.refresherThreshold,u||(u=!0,i("refresherpulling",{},{deltaY:t.refresherHeight,dy:t.refresherHeight}),i("refresherrefresh",{},{dy:E.y-S.y}),c("update:refresherTriggered",!0));break;case"restore":case"refresherabort":u=!1,t.refresherHeight=l=0,"restore"===n&&(d=!1,i("refresherrestore",{},{dy:E.y-S.y})),"refresherabort"===n&&d&&(d=!1,i("refresherabort",{},{dy:E.y-S.y}))}t.refreshState=n}}let S={x:0,y:0},E={x:0,y:e.refresherThreshold};return va((()=>{Uo((()=>{y(n.value),I(o.value)})),M(e.scrollIntoView);let a=function(e){e.preventDefault(),e.stopPropagation(),v(e)},r=null,c=function(n){if(null===S)return;let o=n.touches[0].pageX,a=n.touches[0].pageY,c=s.value;if(Math.abs(o-S.x)>Math.abs(a-S.y))if(h.value){if(0===c.scrollLeft&&o>S.x)return void(r=!1);if(c.scrollWidth===c.offsetWidth+c.scrollLeft&&o<S.x)return void(r=!1);r=!0}else r=!1;else if(f.value)if(0===c.scrollTop&&a>S.y)r=!1,e.refresherEnabled&&!1!==n.cancelable&&n.preventDefault();else{if(c.scrollHeight===c.offsetHeight+c.scrollTop&&a<S.y)return void(r=!1);r=!0}else r=!1;if(r&&n.stopPropagation(),0===c.scrollTop&&1===n.touches.length&&T("pulling"),e.refresherEnabled&&"pulling"===t.refreshState){const o=a-S.y;0===l&&(l=a),u?(t.refresherHeight=o+e.refresherThreshold,d=!1):(t.refresherHeight=a-l,t.refresherHeight>0&&(d=!0,i("refresherpulling",n,{deltaY:o,dy:o})))}},p=function(e){1===e.touches.length&&(S={x:e.touches[0].pageX,y:e.touches[0].pageY})},g=function(n){E={x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY},t.refresherHeight>=e.refresherThreshold?T("refreshing"):T("refresherabort"),S={x:0,y:0},E={x:0,y:e.refresherThreshold}};s.value.addEventListener("touchstart",p,NM),s.value.addEventListener("touchmove",c,rt(!1)),s.value.addEventListener("scroll",a,rt(!1)),s.value.addEventListener("touchend",g,NM),Ma((()=>{s.value.removeEventListener("touchstart",p),s.value.removeEventListener("touchmove",c),s.value.removeEventListener("scroll",a),s.value.removeEventListener("touchend",g)}))})),sa((()=>{f.value&&(s.value.scrollTop=t.lastScrollTop),h.value&&(s.value.scrollLeft=t.lastScrollLeft)})),Ri(n,(e=>{y(e)})),Ri(o,(e=>{I(e)})),Ri((()=>e.scrollIntoView),(e=>{M(e)})),Ri((()=>e.refresherTriggered),(e=>{!0===e?T("refreshing"):!1===e&&T("restore")})),{realScrollX:h,realScrollY:f,_scrollTopChanged:y,_scrollLeftChanged:I}}(e,u,l,d,c,i,a,r,t),_=Wr((()=>{let e="";return p.value?e+="overflow-x:auto;":e+="overflow-x:hidden;",h.value?e+="overflow-y:auto;":e+="overflow-y:hidden;",e})),m=Wr((()=>{let t="uni-scroll-view";return!1===e.showScrollbar&&(t+=" uni-scroll-view-scrollbar-hidden"),t}));return o({$getMain:()=>a.value}),()=>{const{refresherEnabled:t,refresherBackground:o,refresherDefaultStyle:c,refresherThreshold:l}=e,{refresherHeight:d,refreshState:p}=u;return _r("uni-scroll-view",{ref:i},[_r("div",{ref:s,class:"uni-scroll-view"},[_r("div",{ref:a,style:_.value,class:m.value},[t?_r(PM,{refreshState:p,refresherHeight:d,refresherThreshold:l,refresherDefaultStyle:c,refresherBackground:o},{default:()=>["none"==c?n.refresher&&n.refresher():null]},8,["refreshState","refresherHeight","refresherThreshold","refresherDefaultStyle","refresherBackground"]):null,_r("div",{ref:r,class:"uni-scroll-view-content"},[n.default&&n.default()],512)],6)],512)],512)}}});function UM(e,t,n,o,i,a){function s(){u&&(clearTimeout(u),u=null)}let r,c,u=null,l=!0,d=0,p=1,h=null,f=!1,g=0,_="";const m=Wr((()=>n.value.length>t.displayMultipleItems)),v=Wr((()=>e.circular&&m.value));function y(i){Math.floor(2*d)===Math.floor(2*i)&&Math.ceil(2*d)===Math.ceil(2*i)||v.value&&function(o){if(!l)for(let i=n.value,a=i.length,s=o+t.displayMultipleItems,r=0;r<a;r++){const t=i[r],n=Math.floor(o/a)*a+r,c=n+a,u=n-a,l=Math.max(o-(n+1),n-s,0),d=Math.max(o-(c+1),c-s,0),p=Math.max(o-(u+1),u-s,0),h=Math.min(l,d,p),f=[n,c,u][[l,d,p].indexOf(h)];t.updatePosition(f,e.vertical)}}(i);const s="translate("+(e.vertical?"0":100*-i*p+"%")+", "+(e.vertical?100*-i*p+"%":"0")+") translateZ(0)",c=o.value;if(c&&(c.style.webkitTransform=s,c.style.transform=s),d=i,!r){if(i%1==0)return;r=i}i-=Math.floor(r);const u=n.value;i<=-(u.length-1)?i+=u.length:i>=u.length&&(i-=u.length),i=r%1>.5||r<0?i-1:i,a("transition",{},{dx:e.vertical?0:i*c.offsetWidth,dy:e.vertical?i*c.offsetHeight:0})}function I(e){const o=n.value.length;if(!o)return-1;const i=(Math.round(e)%o+o)%o;if(v.value){if(o<=t.displayMultipleItems)return 0}else if(i>o-t.displayMultipleItems)return o-t.displayMultipleItems;return i}function M(){h=null}function C(){if(!h)return void(f=!1);const e=h,o=e.toPos,i=e.acc,s=e.endTime,u=e.source,l=s-Date.now();if(l<=0){y(o),h=null,f=!1,r=null;const e=n.value[t.current];if(e){const n=e.getItemId();a("animationfinish",{},{current:t.current,currentItemId:n,source:u})}return}y(o+i*l*l/2),c=requestAnimationFrame(C)}function T(e,o,i){M();const a=t.duration,s=n.value.length;let r=d;if(v.value)if(i<0){for(;r<e;)r+=s;for(;r-s>e;)r-=s}else if(i>0){for(;r>e;)r-=s;for(;r+s<e;)r+=s;r+s-e<e-r&&(r+=s)}else{for(;r+s<e;)r+=s;for(;r-s>e;)r-=s;r+s-e<e-r&&(r+=s)}else"click"===o&&(e=e+t.displayMultipleItems-1<s?e:0);h={toPos:e,acc:2*(r-e)/(a*a),endTime:Date.now()+a,source:o},f||(f=!0,c=requestAnimationFrame(C))}function S(){s();const e=n.value,o=function(){u=null,_="autoplay",v.value?t.current=I(t.current+1):t.current=t.current+t.displayMultipleItems<e.length?t.current+1:0,T(t.current,"autoplay",v.value?1:0),u=setTimeout(o,t.interval)};l||e.length<=t.displayMultipleItems||(u=setTimeout(o,t.interval))}function E(e){e?S():s()}return Ri([()=>e.current,()=>e.currentItemId,()=>[...n.value]],(()=>{let o=-1;if(e.currentItemId)for(let t=0,i=n.value;t<i.length;t++){if(i[t].getItemId()===e.currentItemId){o=t;break}}o<0&&(o=Math.round(e.current)||0),o=o<0?0:o,t.current!==o&&(_="",t.current=o)})),Ri([()=>e.vertical,()=>v.value,()=>t.displayMultipleItems,()=>[...n.value]],(function(){s(),h&&(y(h.toPos),h=null);const i=n.value;for(let t=0;t<i.length;t++)i[t].updatePosition(t,e.vertical);p=1;const a=o.value;if(1===t.displayMultipleItems&&i.length){const e=i[0].getBoundingClientRect(),t=a.getBoundingClientRect();p=e.width/t.width,p>0&&p<1||(p=1)}const r=d;d=-2;const c=t.current;c>=0?(l=!1,t.userTracking?(y(r+c-g),g=c):(y(c),e.autoplay&&S())):(l=!0,y(-t.displayMultipleItems-1))})),Ri((()=>t.interval),(()=>{u&&(s(),S())})),Ri((()=>t.current),((e,o)=>{!function(e,o){const i=_;_="";const s=n.value;if(!i){const t=s.length;T(e,"",v.value&&o+(t-e)%t>t/2?1:0)}const r=s[e];if(r){const e=t.currentItemId=r.getItemId();a("change",{},{current:t.current,currentItemId:e,source:i})}}(e,o),i("update:current",e)})),Ri((()=>t.currentItemId),(e=>{i("update:currentItemId",e)})),Ri((()=>e.autoplay&&!t.userTracking),E),E(e.autoplay&&!t.userTracking),va((()=>{let i=!1,a=0,r=0;function c(e){t.userTracking=!1;const n=a/Math.abs(a);let o=0;!e&&Math.abs(a)>.2&&(o=.5*n);const i=I(d+o);e?y(g):(_="touch",t.current=i,T(i,"touch",0!==o?o:0===i&&v.value&&d>=1?1:0))}zI(o.value,(u=>{if(!e.disableTouch&&!l){if("start"===u.detail.state)return t.userTracking=!0,i=!1,s(),g=d,a=0,r=Date.now(),void M();if("end"===u.detail.state)return c(!1);if("cancel"===u.detail.state)return c(!0);if(t.userTracking){if(!i){i=!0;const n=Math.abs(u.detail.dx),o=Math.abs(u.detail.dy);if((n>=o&&e.vertical||n<=o&&!e.vertical)&&(t.userTracking=!1),!t.userTracking)return void(e.autoplay&&S())}return function(i){const s=r;r=Date.now();const c=n.value.length-t.displayMultipleItems;function u(e){return.5-.25/(e+.5)}function l(e,t){let n=g+e;a=.6*a+.4*t,v.value||(n<0||n>c)&&(n<0?n=-u(-n):n>c&&(n=c+u(n-c)),a=0),y(n)}const d=r-s||1,p=o.value;e.vertical?l(-i.dy/p.offsetHeight,-i.ddy/d):l(-i.dx/p.offsetWidth,-i.ddx/d)}(u.detail),!1}}}))})),Ca((()=>{s(),cancelAnimationFrame(c)})),{onSwiperDotClick:function(e){T(t.current=e,_="click",v.value?1:0)},circularEnabled:v,swiperEnabled:m}}const xM=Xh({name:"Swiper",props:{indicatorDots:{type:[Boolean,String],default:!1},vertical:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},circular:{type:[Boolean,String],default:!1},interval:{type:[Number,String],default:5e3},duration:{type:[Number,String],default:500},current:{type:[Number,String],default:0},indicatorColor:{type:String,default:""},indicatorActiveColor:{type:String,default:""},previousMargin:{type:String,default:""},nextMargin:{type:String,default:""},currentItemId:{type:String,default:""},skipHiddenItemLayout:{type:[Boolean,String],default:!1},displayMultipleItems:{type:[Number,String],default:1},disableTouch:{type:[Boolean,String],default:!1},navigation:{type:[Boolean,String],default:!1},navigationColor:{type:String,default:"#fff"},navigationActiveColor:{type:String,default:"rgba(53, 53, 53, 0.6)"}},emits:["change","transition","animationfinish","update:current","update:currentItemId"],setup(e,{slots:t,emit:n}){const o=oo(null),i=Qh(o,n),a=oo(null),s=oo(null),r=function(e){return qn({interval:Wr((()=>{const t=Number(e.interval);return isNaN(t)?5e3:t})),duration:Wr((()=>{const t=Number(e.duration);return isNaN(t)?500:t})),displayMultipleItems:Wr((()=>{const t=Math.round(e.displayMultipleItems);return isNaN(t)?1:t})),current:Math.round(e.current)||0,currentItemId:e.currentItemId,userTracking:!1})}(e),c=Wr((()=>{let t={};return(e.nextMargin||e.previousMargin)&&(t=e.vertical?{left:0,right:0,top:th(e.previousMargin,!0),bottom:th(e.nextMargin,!0)}:{top:0,bottom:0,left:th(e.previousMargin,!0),right:th(e.nextMargin,!0)}),t})),u=Wr((()=>{const t=Math.abs(100/r.displayMultipleItems)+"%";return{width:e.vertical?"100%":t,height:e.vertical?t:"100%"}}));let l=[];const d=[],p=oo([]);function h(){const e=[];for(let t=0;t<l.length;t++){let n=l[t];n instanceof Element||(n=n.el);const o=d.find((e=>n===e.rootRef.value));o&&e.push(Xn(o))}p.value=e}fs("addSwiperContext",(function(e){d.push(e),h()}));fs("removeSwiperContext",(function(e){const t=d.indexOf(e);t>=0&&(d.splice(t,1),h())}));const{onSwiperDotClick:f,circularEnabled:g,swiperEnabled:_}=UM(e,r,p,s,n,i);let m=()=>null;return m=FM(o,e,r,f,p,g,_),()=>{const n=t.default&&t.default();return l=VI(n),_r("uni-swiper",{ref:o},[_r("div",{ref:a,class:"uni-swiper-wrapper"},[_r("div",{class:"uni-swiper-slides",style:c.value},[_r("div",{ref:s,class:"uni-swiper-slide-frame",style:u.value},[n],4)],4),e.indicatorDots&&_r("div",{class:["uni-swiper-dots",e.vertical?"uni-swiper-dots-vertical":"uni-swiper-dots-horizontal"]},[p.value.map(((t,n,o)=>_r("div",{onClick:()=>f(n),class:{"uni-swiper-dot":!0,"uni-swiper-dot-active":n<r.current+r.displayMultipleItems&&n>=r.current||n<r.current+r.displayMultipleItems-o.length},style:{background:n===r.current?e.indicatorActiveColor:e.indicatorColor}},null,14,["onClick"])))],2),m()],512)],512)}}}),FM=(e,t,n,o,i,a,s)=>{let r=!1,c=!1,l=!1,d=oo(!1);function p(e,n){const o=e.currentTarget;o&&(o.style.backgroundColor="over"===n?t.navigationActiveColor:"")}ki((()=>{r="auto"===t.navigation,d.value=!0!==t.navigation||r,y()})),ki((()=>{const e=i.value.length,t=!a.value;c=0===n.current&&t,l=n.current===e-1&&t||t&&n.current+n.displayMultipleItems>=e,s.value||(c=!0,l=!0,r&&(d.value=!0))}));const h={onMouseover:e=>p(e,"over"),onMouseout:e=>p(e,"out")};function f(e,t,s){if(e.stopPropagation(),s)return;const r=i.value.length;let c=n.current;switch(t){case"prev":c--,c<0&&a.value&&(c=r-1);break;case"next":c++,c>=r&&a.value&&(c=0)}o(c)}const g=()=>ch(ah,t.navigationColor,26);let _;const m=n=>{clearTimeout(_);const{clientX:o,clientY:i}=n,{left:a,right:s,top:r,bottom:c,width:u,height:l}=e.value.getBoundingClientRect();let p=!1;if(p=t.vertical?!(i-r<l/3||c-i<l/3):!(o-a<u/3||s-o<u/3),p)return _=setTimeout((()=>{d.value=p}),300);d.value=p},v=()=>{d.value=!0};function y(){e.value&&(e.value.removeEventListener("mousemove",m),e.value.removeEventListener("mouseleave",v),r&&(e.value.addEventListener("mousemove",m),e.value.addEventListener("mouseleave",v)))}return va(y),function(){const e={"uni-swiper-navigation-hide":d.value,"uni-swiper-navigation-vertical":t.vertical};return t.navigation?_r(Xs,null,[_r("div",Er({class:["uni-swiper-navigation uni-swiper-navigation-prev",u({"uni-swiper-navigation-disabled":c},e)],onClick:e=>f(e,"prev",c)},h),[g()],16,["onClick"]),_r("div",Er({class:["uni-swiper-navigation uni-swiper-navigation-next",u({"uni-swiper-navigation-disabled":l},e)],onClick:e=>f(e,"next",l)},h),[g()],16,["onClick"])]):null}},qM=Xh({name:"SwiperItem",props:{itemId:{type:String,default:""}},setup(e,{slots:t}){const n=oo(null),o={rootRef:n,getItemId:()=>e.itemId,getBoundingClientRect:()=>n.value.getBoundingClientRect(),updatePosition(e,t){const o=t?"0":100*e+"%",i=t?100*e+"%":"0",a=n.value,s=`translate(${o},${i}) translateZ(0)`;a&&(a.style.webkitTransform=s,a.style.transform=s)}};return va((()=>{const e=gs("addSwiperContext");e&&e(o)})),Ca((()=>{const e=gs("removeSwiperContext");e&&e(o)})),()=>_r("uni-swiper-item",{ref:n,style:{position:"absolute",width:"100%",height:"100%"}},[t.default&&t.default()],512)}}),VM=Xh({name:"Switch",props:{name:{type:String,default:""},checked:{type:[Boolean,String],default:!1},type:{type:String,default:"switch"},id:{type:String,default:""},disabled:{type:[Boolean,String],default:!1},color:{type:String,default:""}},emits:["change"],setup(e,{emit:t}){const n=oo(null),o=oo(e.checked),i=function(e,t){const n=gs(of,!1),o=gs(rf,!1),i={submit:()=>{const n=["",null];return e.name&&(n[0]=e.name,n[1]=t.value),n},reset:()=>{t.value=!1}};n&&(n.addField(i),Ca((()=>{n.removeField(i)})));return o}(e,o),a=Qh(n,t);Ri((()=>e.checked),(e=>{o.value=e}));const s=t=>{e.disabled||(o.value=!o.value,a("change",t,{value:o.value}))};return i&&(i.addHandler(s),Ma((()=>{i.removeHandler(s)}))),uf(e,{"label-click":s}),()=>{const{color:t,type:i}=e,a=nf(e,"disabled"),r={};let c;return t&&o.value&&(r.backgroundColor=t,r.borderColor=t),c=o.value,_r("uni-switch",Er({id:e.id,ref:n},a,{onClick:s}),[_r("div",{class:"uni-switch-wrapper"},[Gi(_r("div",{class:["uni-switch-input",[o.value?"uni-switch-input-checked":""]],style:r},null,6),[[wc,"switch"===i]]),Gi(_r("div",{class:"uni-checkbox-input"},[c?ch(oh,e.color,22):""],512),[[wc,"checkbox"===i]])])],16,["id","onClick"])}}});const BM={ensp:" ",emsp:" ",nbsp:" "};function HM(e,t){return function(e,{space:t,decode:n}){let o="",i=!1;for(let a of e)t&&BM[t]&&" "===a&&(a=BM[t]),i?(o+="n"===a?ae:"\\"===a?"\\":"\\"+a,i=!1):"\\"===a?i=!0:o+=a;return n?o.replace(/ /g,BM.nbsp).replace(/ /g,BM.ensp).replace(/ /g,BM.emsp).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'"):o}(e,t).split(ae)}const jM=Xh({name:"Text",props:{selectable:{type:[Boolean,String],default:!1},space:{type:String,default:""},decode:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=oo(null);return()=>{const o=[];return t.default&&t.default().forEach((t=>{if(8&t.shapeFlag&&t.type!==Zs){const n=HM(t.children,{space:e.space,decode:e.decode}),i=n.length-1;n.forEach(((e,t)=>{(0!==t||e)&&o.push(yr(e)),t!==i&&o.push(_r("br"))}))}else o.push(t)})),_r("uni-text",{ref:n,selectable:!!e.selectable||null},[_r("span",null,o)],8,["selectable"])}}}),KM=u({},bI,{placeholderClass:{type:String,default:"input-placeholder"},autoHeight:{type:[Boolean,String],default:!1},confirmType:{type:String,default:"return",validator:e=>zM.concat("return").includes(e)}});let $M=!1;const zM=["done","go","next","search","send"];const WM=Xh({name:"Textarea",props:KM,emits:["confirm","linechange",...AI],setup(e,{emit:t,expose:n}){const o=oo(null),i=oo(null),{fieldRef:a,state:s,scopedAttrsState:r,fixDisabledColor:c,trigger:u}=wI(e,o,t),l=Wr((()=>s.value.split(ae))),d=Wr((()=>zM.includes(e.confirmType))),p=oo(0),h=oo(null);function f({height:e}){p.value=e}function g(e){"Enter"===e.key&&d.value&&e.preventDefault()}function _(t){if("Enter"===t.key&&d.value){!function(e){u("confirm",e,{value:s.value})}(t);const n=t.target;!e.confirmHold&&n.blur()}}return Ri((()=>p.value),(t=>{const n=o.value,a=h.value,s=i.value;let r=parseFloat(getComputedStyle(n).lineHeight);isNaN(r)&&(r=a.offsetHeight);var c=Math.round(t/r);u("linechange",{},{height:t,heightRpx:750/window.innerWidth*t,lineCount:c}),e.autoHeight&&(n.style.height="auto",s.style.height=t+"px")})),function(){const e="(prefers-color-scheme: dark)";$M=0===String(navigator.platform).indexOf("iP")&&0===String(navigator.vendor).indexOf("Apple")&&window.matchMedia(e).media!==e}(),n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),s.value=e.value}}),()=>{let t=e.disabled&&c?_r("textarea",{key:"disabled-textarea",ref:a,value:s.value,tabindex:"-1",readonly:!!e.disabled,maxlength:s.maxlength,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":$M},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onFocus:e=>e.target.blur()},null,46,["value","readonly","maxlength","onFocus"]):_r("textarea",{key:"textarea",ref:a,value:s.value,disabled:!!e.disabled,maxlength:s.maxlength,enterkeyhint:e.confirmType,inputmode:e.inputmode,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":$M},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onKeydown:g,onKeyup:_},null,46,["value","disabled","maxlength","enterkeyhint","inputmode","onKeydown","onKeyup"]);return _r("uni-textarea",{ref:o},[_r("div",{ref:i,class:"uni-textarea-wrapper"},[Gi(_r("div",Er(r.attrs,{style:e.placeholderStyle,class:["uni-textarea-placeholder",e.placeholderClass]}),[e.placeholder],16),[[wc,!s.value.length]]),_r("div",{ref:h,class:"uni-textarea-line"},[" "],512),_r("div",{class:"uni-textarea-compute"},[l.value.map((e=>_r("div",null,[e.trim()?e:"."]))),_r(xy,{initial:!0,onResize:f},null,8,["initial","onResize"])]),"search"===e.confirmType?_r("form",{action:"",onSubmit:()=>!1,class:"uni-input-form"},[t],40,["onSubmit"]):t],512)],512)}}}),YM=Xh({name:"View",props:u({},ef),setup(e,{slots:t}){const n=oo(null),{hovering:o,binding:i}=tf(e);return()=>{const a=e.hoverClass;return a&&"none"!==a?_r("uni-view",Er({class:o.value?a:"",ref:n},i),[ba(t,"default")],16):_r("uni-view",{ref:n},[ba(t,"default")],512)}}});function XM(e,t){if(t||(t=e.id),t)return e.$options.name.toLowerCase()+"."+t}function JM(e,t,n){e&&Cp(n||hh(),e,(({type:e,data:n},o)=>{t(e,n,o)}))}function ZM(e,t){e&&function(e,t){t=Mp(e,t),delete Ip[t]}(t||hh(),e)}function QM(e,t,n,o){const i=Rr().proxy;va((()=>{JM(t||XM(i),e,o),!n&&t||Ri((()=>i.id),((t,n)=>{JM(XM(i,t),e,o),ZM(n&&XM(i,n))}))})),Ma((()=>{ZM(t||XM(i),o)}))}let eC=0;function tC(e){const t=uh(),n=Rr().proxy,o=n.$options.name.toLowerCase(),i=e||n.id||"context"+eC++;return va((()=>{n.$el.__uniContextInfo={id:i,type:o,page:t}})),`${o}.${i}`}function nC(e,t,n,o){m(t)&&ga(e,t.bind(n),o)}function oC(e,t,n){const o=e.mpType||n.$mpType;if(o&&"component"!==o&&(Object.keys(e).forEach((o=>{if(function(e,t,n=!0){return!(n&&!m(t))&&(_t.indexOf(e)>-1||0===e.indexOf("on"))}(o,e[o],!1)){const i=e[o];h(i)?i.forEach((e=>nC(o,e,n,t))):nC(o,i,n,t)}})),"page"===o)){t.__isVisible=!0;try{let e=t.attrs.__pageQuery;0,vh(n,me,e),delete t.attrs.__pageQuery;const o=n.$page;"preloadPage"!==(null==o?void 0:o.openType)&&vh(n,de)}catch(Hw){console.error(Hw.message+ae+Hw.stack)}}}function iC(e,t,n){oC(e,t,n)}function aC(e,t,n){return e[t]=n}function sC(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function rC(e){return function(t,n,o){if(!n)throw t;const i=e._instance;if(!i||!i.proxy)throw t;vh(i.proxy,he,t)}}function cC(e,t){return e?[...new Set([].concat(e,t))]:t}function uC(e){const t=e._context.config;var n;t.errorHandler=yt(e,rC),n=t.optionMergeStrategies,_t.forEach((e=>{n[e]=cC}));const o=t.globalProperties;o.$set=aC,o.$applyOptions=iC,o.$callMethod=sC,function(e){mt=e,vt.forEach((t=>t(e)))}(e)}function lC(e){const t=Pd({history:hC(),strict:!!__uniConfig.router.strict,routes:__uniRoutes,scrollBehavior:pC});t.beforeEach(((e,t)=>{var n;e&&t&&e.meta.isTabBar&&t.meta.isTabBar&&(n=t.meta.tabBarIndex,"undefined"!=typeof window&&(dC[n]={left:window.pageXOffset,top:window.pageYOffset}))})),e.router=t,e.use(t)}let dC=Object.create(null);const pC=(e,t,n)=>{if(n)return n;if(e&&t&&e.meta.isTabBar&&t.meta.isTabBar){const t=(o=e.meta.tabBarIndex,dC[o]);if(t)return t}return{left:0,top:0};var o};function hC(){let{routerBase:e}=__uniConfig.router;"/"===e&&(e="");const t=(n=e,(n=location.host?n||location.pathname+location.search:"").includes("#")||(n+="#"),zl(n));var n;return t.listen(((e,t,n)=>{"back"===n.direction&&function(e=1){const t=Yv(),n=t.length-1,o=n-e;for(let i=n;i>o;i--){const e=Vv(t[i]);Xv(ey(e.path,e.id),!1)}}(Math.abs(n.delta))})),t}const fC={install(e){uC(e),Ph(e),Kh(e),e.config.warnHandler||(e.config.warnHandler=gC),lC(e)}};function gC(e,t,n){if(t){if("PageMetaHead"===t.$.type.name)return;const e=t.$.parent;if(e&&"PageMeta"===e.type.name)return}const o=[`[Vue warn]: ${e}`];n.length&&o.push("\n",n),console.warn(...o)}const _C={class:"uni-async-loading"},mC=_r("i",{class:"uni-loading"},null,-1),vC=Jh({name:"AsyncLoading",render:()=>(nr(),cr("div",_C,[mC]))});function yC(){window.location.reload()}const IC=Jh({name:"AsyncError",setup(){ap();const{t:e}=op();return()=>_r("div",{class:"uni-async-error",onClick:yC},[e("uni.async.error")],8,["onClick"])}});let MC;function CC(){return MC}function TC(e){MC=e,Object.defineProperty(MC.$.ctx,"$children",{get:()=>Yv().map((e=>e.$vm))});const t=MC.$.appContext.app;t.component(vC.name)||t.component(vC.name,vC),t.component(IC.name)||t.component(IC.name,IC),function(e){e.$vm=e,e.$mpType="app";const t=oo(op().getLocale());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(MC),function(e,t){const n=e.$options||{};n.globalData=u(n.globalData||{},t),Object.defineProperty(e,"globalData",{get:()=>n.globalData,set(e){n.globalData=e}})}(MC),Hh(),Pp()}function SC(e,{clone:t,init:n,setup:o,before:i}){t&&(e=u({},e)),i&&i(e);const a=e.setup;return e.setup=(e,t)=>{const i=Rr();if(n(i.proxy),o(i),a)return a(e,t)},e}function EC(e,t){return e&&(e.__esModule||"Module"===e[Symbol.toStringTag])?SC(e.default,t):SC(e,t)}function DC(e){return EC(e,{clone:!0,init:Qv,setup(e){e.$pageInstance=e;const t=_f(),n=lt(t.query);e.attrs.__pageQuery=n,Vv(e.proxy).options=n,e.proxy.options=n;const o=ff();var i;return e.onReachBottom=qn([]),e.onPageScroll=qn([]),Ri([e.onReachBottom,e.onPageScroll],(()=>{const t=dh();e.proxy===t&&cy(e,o)}),{once:!0}),ma((()=>{oy(e,o)})),va((()=>{iy(e);const{onReady:n}=e;n&&N(n),AC(t)})),aa((()=>{if(!e.__isVisible){oy(e,o),e.__isVisible=!0;const{onShow:n}=e;n&&N(n),Uo((()=>{AC(t)}))}})),ra((()=>{if(e.__isVisible&&!e.__isUnload){e.__isVisible=!1;{const{onHide:t}=e;t&&N(t)}}})),i=o.id,cL.subscribe(Mp(i,mp),Tp),Ma((()=>{!function(e){cL.unsubscribe(Mp(e,mp)),Object.keys(Ip).forEach((t=>{0===t.indexOf(e+".")&&delete Ip[t]}))}(o.id)})),n}})}function kC(){const{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}=uni.getSystemInfoSync(),i=90===Math.abs(Number(window.orientation))?"landscape":"portrait";lL.emit(Ce,{deviceOrientation:i,size:{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}})}function LC(e){S(e.data)&&"WEB_INVOKE_APPSERVICE"===e.data.type&&lL.emit(Fe,e.data.data,e.data.pageId)}function bC(){const{emit:e}=lL;"visible"===document.visibilityState?e(Ue,Uy()):e(xe)}function AC(e){const{tabBarText:t,tabBarIndex:n,route:o}=e.meta;t&&vh("onTabItemTap",{index:n,text:t,pagePath:o})}function RC(e){e=e>0&&e<1/0?e:0;const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.floor(e%3600%60),i=(t<10?"0":"")+t;let a=(n<10?"0":"")+n+":"+((o<10?"0":"")+o);return"00"!==i&&(a=i+":"+a),a}function OC(e,t,n){const o=qn({gestureType:"none",volumeOld:0,volumeNew:0,currentTimeOld:0,currentTimeNew:0}),i={x:0,y:0};return{state:o,onTouchstart:function(e){const t=e.targetTouches[0];i.x=t.pageX,i.y=t.pageY,o.gestureType="none",o.volumeOld=0,o.currentTimeOld=o.currentTimeNew=0},onTouchmove:function(a){function s(){a.stopPropagation(),a.preventDefault()}n.fullscreen&&s();const r=o.gestureType;if("stop"===r)return;const c=a.targetTouches[0],u=c.pageX,l=c.pageY,d=i,p=t.value;if("progress"===r?function(e){const n=t.value,i=n.duration;let a=e/600*i+o.currentTimeOld;a<0?a=0:a>i&&(a=i);o.currentTimeNew=a}(u-d.x):"volume"===r&&function(e){const n=t.value,i=o.volumeOld;let a;"number"==typeof i&&(a=i-e/200,a<0?a=0:a>1&&(a=1),n.volume=a,o.volumeNew=a)}(l-d.y),"none"===r)if(Math.abs(u-d.x)>Math.abs(l-d.y)){if(!e.enableProgressGesture)return void(o.gestureType="stop");o.gestureType="progress",o.currentTimeOld=o.currentTimeNew=p.currentTime,n.fullscreen||s()}else{if(!e.pageGesture)return void(o.gestureType="stop");o.gestureType="volume",o.volumeOld=p.volume,n.fullscreen||s()}},onTouchend:function(e){const n=t.value;"none"!==o.gestureType&&"stop"!==o.gestureType&&(e.stopPropagation(),e.preventDefault()),"progress"===o.gestureType&&o.currentTimeOld!==o.currentTimeNew&&(n.currentTime=o.currentTimeNew),o.gestureType="none"}}}const wC=Xh({name:"Video",props:{id:{type:String,default:""},src:{type:String,default:""},duration:{type:[Number,String],default:""},controls:{type:[Boolean,String],default:!0},danmuList:{type:Array,default:()=>[]},danmuBtn:{type:[Boolean,String],default:!1},enableDanmu:{type:[Boolean,String],default:!1},autoplay:{type:[Boolean,String],default:!1},loop:{type:[Boolean,String],default:!1},muted:{type:[Boolean,String],default:!1},objectFit:{type:String,default:"contain"},poster:{type:String,default:""},direction:{type:[String,Number],default:""},showProgress:{type:Boolean,default:!0},initialTime:{type:[String,Number],default:0},showFullscreenBtn:{type:[Boolean,String],default:!0},pageGesture:{type:[Boolean,String],default:!1},enableProgressGesture:{type:[Boolean,String],default:!0},showPlayBtn:{type:[Boolean,String],default:!0},showCenterPlayBtn:{type:[Boolean,String],default:!0}},emits:["fullscreenchange","progress","loadedmetadata","waiting","error","play","pause","ended","timeupdate"],setup(e,{emit:t,attrs:n,slots:o}){const i=oo(null),a=oo(null),s=Qh(i,t),{state:r}=SI(),{$attrs:c}=qI({excludeListeners:!0}),{t:u}=op();fp();const{videoRef:l,state:d,play:p,pause:f,stop:g,seek:_,playbackRate:m,toggle:v,onDurationChange:y,onLoadedMetadata:I,onProgress:M,onWaiting:C,onVideoError:T,onPlay:S,onPause:E,onEnded:D,onTimeUpdate:k}=function(e,t,n){const o=oo(null),i=Wr((()=>dy(e.src))),a=Wr((()=>"true"===e.muted||!0===e.muted)),s=qn({start:!1,src:i,playing:!1,currentTime:0,duration:0,progress:0,buffered:0,muted:a});function r(e){const t=e.target,n=t.buffered;n.length&&(s.buffered=n.end(n.length-1)/t.duration*100)}function c(){o.value.pause()}function u(e){const t=o.value;"number"!=typeof(e=Number(e))||isNaN(e)||(t.currentTime=e)}return Ri((()=>i.value),(()=>{s.playing=!1,s.currentTime=0})),Ri((()=>s.buffered),(e=>{n("progress",{},{buffered:e})})),Ri((()=>a.value),(e=>{o.value.muted=e})),{videoRef:o,state:s,play:function(){const e=o.value;s.start=!0,e.play()},pause:c,stop:function(){u(0),c()},seek:u,playbackRate:function(e){o.value.playbackRate=e},toggle:function(){const e=o.value;s.playing?e.pause():e.play()},onDurationChange:function({target:e}){s.duration=e.duration},onLoadedMetadata:function(t){const o=Number(e.initialTime)||0,i=t.target;o>0&&(i.currentTime=o),n("loadedmetadata",t,{width:i.videoWidth,height:i.videoHeight,duration:i.duration}),r(t)},onProgress:r,onWaiting:function(e){n("waiting",e,{})},onVideoError:function(e){s.playing=!1,n("error",e,{})},onPlay:function(e){s.start=!0,s.playing=!0,n("play",e,{})},onPause:function(e){s.playing=!1,n("pause",e,{})},onEnded:function(e){s.playing=!1,n("ended",e,{})},onTimeUpdate:function(e){const t=e.target,o=s.currentTime=t.currentTime;n("timeupdate",e,{currentTime:o,duration:t.duration})}}}(e,0,s),{state:L,danmuRef:b,updateDanmu:A,toggleDanmu:R,sendDanmu:O}=function(e,t){const n=oo(null),o=qn({enable:Boolean(e.enableDanmu)});let i={time:0,index:-1};const a=h(e.danmuList)?JSON.parse(JSON.stringify(e.danmuList)):[];function s(e){const t=document.createElement("p");t.className="uni-video-danmu-item",t.innerText=e.text;let o=`bottom: ${100*Math.random()}%;color: ${e.color};`;t.setAttribute("style",o),n.value.appendChild(t),setTimeout((function(){o+="left: 0;-webkit-transform: translateX(-100%);transform: translateX(-100%);",t.setAttribute("style",o),setTimeout((function(){t.remove()}),4e3)}),17)}return a.sort((function(e,t){return(e.time||0)-(t.time||0)})),{state:o,danmuRef:n,updateDanmu:function(e){const n=e.target.currentTime,r=i,c={time:n,index:r.index};if(n>r.time)for(let i=r.index+1;i<a.length;i++){const e=a[i];if(!(n>=(e.time||0)))break;c.index=i,t.playing&&o.enable&&s(e)}else if(n<r.time)for(let t=r.index-1;t>-1&&n<=(a[t].time||0);t--)c.index=t-1;i=c},toggleDanmu:function(){o.enable=!o.enable},sendDanmu:function(e){a.splice(i.index+1,0,{text:String(e.text),color:e.color,time:t.currentTime||0})}}}(e,d),{state:w,onFullscreenChange:P,emitFullscreenChange:N,toggleFullscreen:G,requestFullScreen:U,exitFullScreen:x}=function(e,t,n,o,i){const a=qn({fullscreen:!1}),s=/^Apple/.test(navigator.vendor);function r(t){a.fullscreen=t,e("fullscreenchange",{},{fullScreen:t,direction:"vertical"})}function c(e){const a=i.value,c=t.value,u=n.value;let l;e?!document.fullscreenEnabled&&!document.webkitFullscreenEnabled||s&&!o.userAction?u.webkitEnterFullScreen?u.webkitEnterFullScreen():(l=!0,c.remove(),c.classList.add("uni-video-type-fullscreen"),document.body.appendChild(c)):c[document.fullscreenEnabled?"requestFullscreen":"webkitRequestFullscreen"]():document.fullscreenEnabled||document.webkitFullscreenEnabled?document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen():u.webkitExitFullScreen?u.webkitExitFullScreen():(l=!0,c.remove(),c.classList.remove("uni-video-type-fullscreen"),a.appendChild(c)),l&&r(e)}function u(){c(!1)}return Ma(u),{state:a,onFullscreenChange:function(e,t){t&&document.fullscreenEnabled||r(!(!document.fullscreenElement&&!document.webkitFullscreenElement))},emitFullscreenChange:r,toggleFullscreen:c,requestFullScreen:function(){c(!0)},exitFullScreen:u}}(s,a,l,r,i),{state:F,onTouchstart:q,onTouchend:V,onTouchmove:B}=OC(e,l,w),{state:H,progressRef:j,ballRef:K,clickProgress:$,toggleControls:z}=function(e,t,n){const o=oo(null),i=oo(null),a=Wr((()=>e.showCenterPlayBtn&&!t.start)),s=oo(!0),r=Wr((()=>!a.value&&e.controls&&s.value)),c=qn({touching:!1,controlsTouching:!1,centerPlayBtnShow:a,controlsShow:r,controlsVisible:s});let u;function l(){u=setTimeout((()=>{c.controlsVisible=!1}),3e3)}function d(){u&&(clearTimeout(u),u=null)}return Ma((()=>{u&&clearTimeout(u)})),Ri((()=>c.controlsShow&&t.playing&&!c.controlsTouching),(e=>{e?l():d()})),Ri([()=>t.currentTime,()=>{e.duration}],(function(){c.touching||(t.progress=t.currentTime/t.duration*100)})),va((()=>{const e=rt(!1);let a,s,r,u=!0;const l=i.value;function d(e){const n=e.targetTouches[0],i=n.pageX,c=n.pageY;if(u&&Math.abs(i-a)<Math.abs(c-s))return void p(e);u=!1;const l=o.value.offsetWidth;let d=r+(i-a)/l*100;d<0?d=0:d>100&&(d=100),t.progress=d,e.preventDefault(),e.stopPropagation()}function p(o){c.controlsTouching=!1,c.touching&&(l.removeEventListener("touchmove",d,e),u||(o.preventDefault(),o.stopPropagation(),n(t.duration*t.progress/100)),c.touching=!1)}l.addEventListener("touchstart",(n=>{c.controlsTouching=!0;const o=n.targetTouches[0];a=o.pageX,s=o.pageY,r=t.progress,u=!0,c.touching=!0,l.addEventListener("touchmove",d,e)})),l.addEventListener("touchend",p),l.addEventListener("touchcancel",p)})),{state:c,progressRef:o,ballRef:i,clickProgress:function(e){const i=o.value;let a=e.target,s=e.offsetX;for(;a&&a!==i;)s+=a.offsetLeft,a=a.parentNode;const r=i.offsetWidth;let c=0;s>=0&&s<=r&&(c=s/r,n(t.duration*c))},toggleControls:function(){c.controlsVisible=!c.controlsVisible},autoHideStart:l,autoHideEnd:d}}(e,d,_);return function(e,t,n,o,i,a,s,r){const c={play:e,stop:n,pause:t,seek:o,sendDanmu:i,playbackRate:a,requestFullScreen:s,exitFullScreen:r};QM(((e,t)=>{let n;switch(e){case"seek":n=t.position;break;case"sendDanmu":n=t;break;case"playbackRate":n=t.rate}e in c&&c[e](n)}),tC(),!0)}(p,f,g,_,O,m,U,x),()=>_r("uni-video",{ref:i,id:e.id,onClick:z},[_r("div",{ref:a,class:"uni-video-container",onTouchstart:q,onTouchend:V,onTouchmove:B,onFullscreenchange:Fu(P,["stop"]),onWebkitfullscreenchange:Fu((e=>P(e,!0)),["stop"])},[_r("video",Er({ref:l,style:{"object-fit":e.objectFit},muted:!!e.muted,loop:!!e.loop,src:d.src,poster:e.poster,autoplay:!!e.autoplay},c.value,{class:"uni-video-video","webkit-playsinline":!0,playsinline:!0,onDurationchange:y,onLoadedmetadata:I,onProgress:M,onWaiting:C,onError:T,onPlay:S,onPause:E,onEnded:D,onTimeupdate:e=>{k(e),A(e)},onWebkitbeginfullscreen:()=>N(!0),onX5videoenterfullscreen:()=>N(!0),onWebkitendfullscreen:()=>N(!1),onX5videoexitfullscreen:()=>N(!1)}),null,16,["muted","loop","src","poster","autoplay","webkit-playsinline","playsinline","onDurationchange","onLoadedmetadata","onProgress","onWaiting","onError","onPlay","onPause","onEnded","onTimeupdate","onWebkitbeginfullscreen","onX5videoenterfullscreen","onWebkitendfullscreen","onX5videoexitfullscreen"]),Gi(_r("div",{class:"uni-video-bar uni-video-bar-full",onClick:Fu((()=>{}),["stop"])},[_r("div",{class:"uni-video-controls"},[Gi(_r("div",{class:{"uni-video-control-button":!0,"uni-video-control-button-play":!d.playing,"uni-video-control-button-pause":d.playing},onClick:Fu(v,["stop"])},null,10,["onClick"]),[[wc,e.showPlayBtn]]),Gi(_r("div",{class:"uni-video-current-time"},[RC(d.currentTime)],512),[[wc,e.showProgress]]),Gi(_r("div",{ref:j,class:"uni-video-progress-container",onClick:Fu($,["stop"])},[_r("div",{class:"uni-video-progress"},[_r("div",{style:{width:d.buffered+"%"},class:"uni-video-progress-buffered"},null,4),_r("div",{ref:K,style:{left:d.progress+"%"},class:"uni-video-ball"},[_r("div",{class:"uni-video-inner"},null)],4)])],8,["onClick"]),[[wc,e.showProgress]]),Gi(_r("div",{class:"uni-video-duration"},[RC(Number(e.duration)||d.duration)],512),[[wc,e.showProgress]])]),Gi(_r("div",{class:{"uni-video-danmu-button":!0,"uni-video-danmu-button-active":L.enable},onClick:Fu(R,["stop"])},[u("uni.video.danmu")],10,["onClick"]),[[wc,e.danmuBtn]]),Gi(_r("div",{class:{"uni-video-fullscreen":!0,"uni-video-type-fullscreen":w.fullscreen},onClick:Fu((()=>G(!w.fullscreen)),["stop"])},null,10,["onClick"]),[[wc,e.showFullscreenBtn]])],8,["onClick"]),[[wc,H.controlsShow]]),Gi(_r("div",{ref:b,style:"z-index: 0;",class:"uni-video-danmu"},null,512),[[wc,d.start&&L.enable]]),H.centerPlayBtnShow&&_r("div",{class:"uni-video-cover",onClick:Fu((()=>{}),["stop"])},[_r("div",{class:"uni-video-cover-play-button",onClick:Fu(p,["stop"])},null,8,["onClick"]),_r("p",{class:"uni-video-cover-duration"},[RC(Number(e.duration)||d.duration)])],8,["onClick"]),_r("div",{class:{"uni-video-toast":!0,"uni-video-toast-volume":"volume"===F.gestureType}},[_r("div",{class:"uni-video-toast-title"},[u("uni.video.volume")]),_r("svg",{class:"uni-video-toast-icon",width:"200px",height:"200px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[_r("path",{d:"M475.400704 201.19552l0 621.674496q0 14.856192-10.856448 25.71264t-25.71264 10.856448-25.71264-10.856448l-190.273536-190.273536-149.704704 0q-14.856192 0-25.71264-10.856448t-10.856448-25.71264l0-219.414528q0-14.856192 10.856448-25.71264t25.71264-10.856448l149.704704 0 190.273536-190.273536q10.856448-10.856448 25.71264-10.856448t25.71264 10.856448 10.856448 25.71264zm219.414528 310.837248q0 43.425792-24.28416 80.851968t-64.2816 53.425152q-5.71392 2.85696-14.2848 2.85696-14.856192 0-25.71264-10.570752t-10.856448-25.998336q0-11.999232 6.856704-20.284416t16.570368-14.2848 19.427328-13.142016 16.570368-20.284416 6.856704-32.569344-6.856704-32.569344-16.570368-20.284416-19.427328-13.142016-16.570368-14.2848-6.856704-20.284416q0-15.427584 10.856448-25.998336t25.71264-10.570752q8.57088 0 14.2848 2.85696 39.99744 15.427584 64.2816 53.139456t24.28416 81.137664zm146.276352 0q0 87.422976-48.56832 161.41824t-128.5632 107.707392q-7.428096 2.85696-14.2848 2.85696-15.427584 0-26.284032-10.856448t-10.856448-25.71264q0-22.284288 22.284288-33.712128 31.997952-16.570368 43.425792-25.141248 42.283008-30.855168 65.995776-77.423616t23.712768-99.136512-23.712768-99.136512-65.995776-77.423616q-11.42784-8.57088-43.425792-25.141248-22.284288-11.42784-22.284288-33.712128 0-14.856192 10.856448-25.71264t25.71264-10.856448q7.428096 0 14.856192 2.85696 79.99488 33.712128 128.5632 107.707392t48.56832 161.41824zm146.276352 0q0 131.42016-72.566784 241.41312t-193.130496 161.989632q-7.428096 2.85696-14.856192 2.85696-14.856192 0-25.71264-10.856448t-10.856448-25.71264q0-20.570112 22.284288-33.712128 3.999744-2.285568 12.85632-5.999616t12.85632-5.999616q26.284032-14.2848 46.854144-29.140992 70.281216-51.996672 109.707264-129.705984t39.426048-165.132288-39.426048-165.132288-109.707264-129.705984q-20.570112-14.856192-46.854144-29.140992-3.999744-2.285568-12.85632-5.999616t-12.85632-5.999616q-22.284288-13.142016-22.284288-33.712128 0-14.856192 10.856448-25.71264t25.71264-10.856448q7.428096 0 14.856192 2.85696 120.563712 51.996672 193.130496 161.989632t72.566784 241.41312z"},null)]),_r("div",{class:"uni-video-toast-value"},[_r("div",{style:{width:100*F.volumeNew+"%"},class:"uni-video-toast-value-content"},[_r("div",{class:"uni-video-toast-volume-grids"},[ka(10,(()=>_r("div",{class:"uni-video-toast-volume-grids-item"},null)))])],4)])],2),_r("div",{class:{"uni-video-toast":!0,"uni-video-toast-progress":"progress"===F.gestureType}},[_r("div",{class:"uni-video-toast-title"},[RC(F.currentTimeNew)," / ",RC(d.duration)])],2),_r("div",{class:"uni-video-slots"},[o.default&&o.default()])],40,["onTouchstart","onTouchend","onTouchmove","onFullscreenchange","onWebkitfullscreenchange"])],8,["id","onClick"])}}),PC=({name:e,arg:t})=>{"postMessage"===e||uni[e](t)},NC=je((()=>lL.on(Fe,PC))),GC=Xh({inheritAttrs:!1,name:"WebView",props:{src:{type:String,default:""},fullscreen:{type:Boolean,default:!0}},setup(e){NC();const t=oo(null),n=oo(null),{$attrs:o,$excludeAttrs:i,$listeners:a}=qI({excludeListeners:!0});let s;return(()=>{const i=document.createElement("iframe");ki((()=>{for(const e in o.value)if(p(o.value,e)){const t=o.value[e];i[e]=t}})),ki((()=>{i.src=dy(e.src)})),n.value=i,s=function(e,t,n){const o=()=>{var o,i;if(n){const{top:n,left:o,width:i,height:a}=e.value.getBoundingClientRect();He(t.value,{position:"absolute",display:"block",border:"0",top:n+"px",left:o+"px",width:i+"px",height:a+"px"})}else He(t.value,{width:(null==(o=e.value)?void 0:o.style.width)||"300px",height:(null==(i=e.value)?void 0:i.style.height)||"150px"})};return o}(t,n,e.fullscreen),e.fullscreen&&document.body.appendChild(i)})(),va((()=>{var o;s(),!e.fullscreen&&(null==(o=t.value)||o.appendChild(n.value))})),sa((()=>{e.fullscreen&&(n.value.style.display="block")})),ca((()=>{e.fullscreen&&(n.value.style.display="none")})),Ma((()=>{e.fullscreen&&document.body.removeChild(n.value)})),()=>_r(Xs,null,[_r("uni-web-view",Er({class:e.fullscreen?"uni-webview--fullscreen":""},a.value,i.value,{ref:t}),[_r(xy,{onResize:s},null,8,["onResize"])],16)])}});let UC,xC=0;function FC(e,t,n,o){var i,a=document.createElement("script"),s=t.callback||"callback",r="__uni_jsonp_callback_"+xC++,c=t.timeout||3e4;function u(){clearTimeout(i),delete window[r],a.remove()}window[r]=e=>{m(n)&&n(e),u()},a.onerror=()=>{m(o)&&o(),u()},i=setTimeout((function(){m(o)&&o(),u()}),c),a.src=e+(e.indexOf("?")>=0?"&":"?")+s+"="+r,document.body.appendChild(a)}function qC(e){function t(){const e=this.div;this.getPanes().floatPane.appendChild(e)}function n(){const e=this.div.parentNode;e&&e.removeChild(this.div)}function o(){const t=this.option;this.Text=new e.Text({text:t.content,anchor:"bottom-center",offset:new e.Pixel(0,t.offsetY-16),style:{padding:(t.padding||8)+"px","line-height":(t.fontSize||14)+"px","border-radius":(t.borderRadius||0)+"px","border-color":`${t.bgColor||"#fff"} transparent transparent`,"background-color":t.bgColor||"#fff","box-shadow":"0 2px 6px 0 rgba(114, 124, 245, .5)","text-align":"center","font-size":(t.fontSize||14)+"px",color:t.color||"#000"},position:t.position});(e.event||e.Event).addListener(this.Text,"click",(()=>{this.callback()})),this.Text.setMap(t.map)}function i(){}function a(){this.Text&&this.option.map.remove(this.Text)}function s(){this.Text&&this.option.map.remove(this.Text)}class r{constructor(e={},r){this.createAMapText=o,this.removeAMapText=a,this.createBMapText=i,this.removeBMapText=s,this.onAdd=t,this.construct=t,this.onRemove=n,this.destroy=n,this.option=e||{};const c=this.visible=this.alwaysVisible="ALWAYS"===e.display;if(JC())this.callback=r,this.visible&&this.createAMapText();else if(ZC())this.visible&&this.createBMapText();else{const t=e.map;this.position=e.position,this.index=1;const n=this.div=document.createElement("div"),o=n.style;o.position="absolute",o.whiteSpace="nowrap",o.transform="translateX(-50%) translateY(-100%)",o.zIndex="1",o.boxShadow=e.boxShadow||"none",o.display=c?"block":"none";const i=this.triangle=document.createElement("div");i.setAttribute("style","position: absolute;white-space: nowrap;border-width: 4px;border-style: solid;border-color: #fff transparent transparent;border-image: initial;font-size: 12px;padding: 0px;background-color: transparent;width: 0px;height: 0px;transform: translate(-50%, 100%);left: 50%;bottom: 0;"),this.setStyle(e),n.appendChild(i),t&&this.setMap(t)}}set onclick(e){this.div.onclick=e}get onclick(){return this.div.onclick}setOption(e){this.option=e,"ALWAYS"===e.display?this.alwaysVisible=this.visible=!0:this.alwaysVisible=!1,JC()?this.visible&&this.createAMapText():ZC()?this.visible&&this.createBMapText():(this.setPosition(e.position),this.setStyle(e))}setStyle(e){const t=this.div,n=t.style;t.innerText=e.content||"",n.lineHeight=(e.fontSize||14)+"px",n.fontSize=(e.fontSize||14)+"px",n.padding=(e.padding||8)+"px",n.color=e.color||"#000",n.borderRadius=(e.borderRadius||0)+"px",n.backgroundColor=e.bgColor||"#fff",n.marginTop="-"+((e.top||0)+5)+"px",this.triangle.style.borderColor=`${e.bgColor||"#fff"} transparent transparent`}setPosition(e){this.position=e,this.draw()}draw(){const e=this.getProjection();if(!this.position||!this.div||!e)return;const t=e.fromLatLngToDivPixel(this.position),n=this.div.style;n.left=t.x+"px",n.top=t.y+"px"}changed(){this.div.style.display=this.visible?"block":"none"}}if(!JC()&&!ZC()){const t=new(e.OverlayView||e.Overlay);r.prototype.setMap=t.setMap,r.prototype.getMap=t.getMap,r.prototype.getPanes=t.getPanes,r.prototype.getProjection=t.getProjection,r.prototype.map_changed=t.map_changed,r.prototype.set=t.set,r.prototype.get=t.get,r.prototype.setOptions=t.setValues,r.prototype.bindTo=t.bindTo,r.prototype.bindsTo=t.bindsTo,r.prototype.notify=t.notify,r.prototype.setValues=t.setValues,r.prototype.unbind=t.unbind,r.prototype.unbindAll=t.unbindAll,r.prototype.addListener=t.addListener}return r}const VC={};function BC(e,t){const n=WC();if(!n.key)return void console.error("Map key not configured.");const o=VC[n.type]=VC[n.type]||[];if(UC)t(UC);else if(window[n.type]&&window[n.type].maps)UC=JC()||ZC()?window[n.type]:window[n.type].maps,UC.Callout=UC.Callout||qC(UC),t(UC);else if(o.length)o.push(t);else{o.push(t);const i=window,a="__map_callback__"+n.type;i[a]=function(){delete i[a],UC=JC()||ZC()?window[n.type]:window[n.type].maps,UC.Callout=qC(UC),o.forEach((e=>e(UC))),o.length=0},JC()&&function(e){window._AMapSecurityConfig={securityJsCode:e.securityJsCode||"",serviceHost:e.serviceHost||""}}(n);const s=document.createElement("script");let r=HC(n.type);n.type===zC.QQ&&e.push("geometry"),e.length&&(r+=`libraries=${e.join("%2C")}&`),n.type===zC.BMAP?s.src=`${r}ak=${n.key}&callback=${a}`:s.src=`${r}key=${n.key}&callback=${a}`,s.onerror=function(){console.error("Map load failed.")},document.body.appendChild(s)}}const HC=e=>({qq:"https://map.qq.com/api/js?v=2.exp&",google:"https://maps.googleapis.com/maps/api/js?",AMap:"https://webapi.amap.com/maps?v=2.0&",BMapGL:"https://api.map.baidu.com/api?type=webgl&v=1.0&"}[e]);const jC="M13.3334375 16 q0.033125 1.1334375 0.783125 1.8834375 q0.75 0.75 1.8834375 0.75 q1.1334375 0 1.8834375 -0.75 q0.75 -0.75 0.75 -1.8834375 q0 -1.1334375 -0.75 -1.8834375 q-0.75 -0.75 -1.8834375 -0.75 q-1.1334375 0 -1.8834375 0.75 q-0.75 0.75 -0.783125 1.8834375 ZM30.9334375 14.9334375 l-1.1334375 0 q-0.5 -5.2 -4.0165625 -8.716875 q-3.516875 -3.5165625 -8.716875 -4.0165625 l0 -1.1334375 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 l0 1.1334375 q-5.2 0.5 -8.716875 4.0165625 q-3.5165625 3.516875 -4.0165625 8.716875 l-1.1334375 0 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 l1.1334375 0 q0.5 5.2 4.0165625 8.716875 q3.516875 3.5165625 8.716875 4.0165625 l0 1.1334375 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 l0 -1.1334375 q5.2 -0.5 8.716875 -4.0165625 q3.5165625 -3.516875 4.0165625 -8.716875 l1.1334375 0 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 ZM17.0665625 27.6665625 l0 -2.0665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 l0 2.0665625 q-4.3 -0.4665625 -7.216875 -3.383125 q-2.916875 -2.916875 -3.3834375 -7.216875 l2.0665625 0 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 l-2.0665625 0 q0.4665625 -4.3 3.3834375 -7.216875 q2.9165625 -2.916875 7.216875 -3.3834375 l0 2.0665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 l0 -2.0665625 q4.3 0.4665625 7.216875 3.3834375 q2.9165625 2.9165625 3.383125 7.216875 l-2.0665625 0 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 l2.0665625 0 q-0.4665625 4.3 -3.383125 7.216875 q-2.916875 2.9165625 -7.216875 3.383125 Z",KC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef96quGStdqStdpbnujMzMzCyM7Gyc7Ky83MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwAef8GfP0yjfNWnOp0qOKKsdyYt9mju9aZt9mMstx1qeJYnekyjvIIfP0qivVmouaWttnMzMyat9lppOUujPQKffxhoOfNzc3Y2Njh4eHp6enu7u7y8vL19fXv7+/i4uLZ2dnOzs6auNgOf/sKff15quHR0dHx8fH9/f3////j4+N6quFdn+iywdPb29vw8PD+/v7c3NyywtLa2tr29vbS0tLd3d38/Pzf39/o6Ojc7f+q0v+HwP9rsf9dqv9Hnv9Vpv/q6urj8P+Vx/9Am/8Pgf8Iff/z8/OAvP95uf/n5+c5l//V6f+52v+y1//7+/vt7e0rkP/09PTQ0NDq9P8Whf+cy//W1tbe3t7A3v/m5ubs7OxOov/r6+vk5OQiaPjKAAAAknRSTlMACBZ9oB71/jiqywJBZATT6hBukRXv+zDCAVrkDIf4JbQsTb7eVeJLbwfa8Rh4G/OlPS/6/kxQ9/xdmZudoJxNVhng7B6wtWdzAtQOipcF1329wS44doK/BAkyP1pvgZOsrbnGXArAg34G2IsD1eMRe7bi7k5YnqFT9V0csyPedQyYD3p/Fje+hDpskq/MwpRBC6yKp2MAAAQdSURBVHja7Zn1exMxGIAPHbrhDsPdneHuNtzd3d3dIbjLh93o2o4i7TpgG1Jk0g0mMNwd/gTa5rq129reHnK5e/bk/TFNk/dJ7r5894XjGAwGg8GgTZasCpDIll1+hxw5vXLJLpEboTx5ZXbIhyzkl9fB28cqUaCgrBKFkI3CcjoUKYolihWXUSI7EihRUjaHXF52CVRKLoe8eZIdUOkyMknkRw6UlcehYAFHiXK+skgURk6Ul8OhQjFnCVRRBolKqRxQ5SzUHaqgNGSj7VCmalqJnDkoS5RF6ZCbroNvufQkUD6qEuXTdUA+3hQdqiEXVKfnUKOmK4latalJ1EEuoZZ6162HJ9x/4OChw0eOHj12/MTJU6dxG7XUu751tjNnz4ET5y9ctLZTSr0beKFLl89bpuUDrqgC1RqNWqsKuqqzNFw7e51S6u3tc+OmZUJ9kCHY6ECwOkRvab51iUrqXej2HYDQsHBjWgx3Ae7dppB6N2wEcF9jdMGDUIDGTaR2aNoM9FqjG7QmaN5CWgc/gIePjG559BigpZQOrYB/4jBfRGRUtDkmJjY6KjLCofkpD62lc2gDfMpWPIuLdwyV8XEpHgaddBZ+wBuSFcwJqSN2ovmZ/dfnOvCTxqGtwzq8SEjv4EhISn48eWgnhUP7DvDSvgzxrs6vV6+FLiro2EkCic4QKkzwJsH1KYreCp0eQhfyDl1B/w4P/xa5JVJ4U03QjbRD9x7wXlgH5IE3wmMBHXoSlugFAcI6f/AkkSi8q6HQm6xDn77wEQ8djTwSj3tqAMguRTe4ikeOQyJ4YV+KfkQl+oNW5GbY4gWOWgbwJ+kwAD6Fi90MK2ZsrIeBBCUGwRXbqJ+/iJMQliIEBhOU6AJhtlG/IpHE2bqrYQg5h6HA4yQiRqwEfkGCdTCMmMRw+IbPDCQaHCsCYAQxiZHw3TbmD/ESOHgHwShiEqPhp/gggYkSztIxxCRawy/bmEniJaJtfwiEscQkxkFgRqJESqQwwHhiEuMBp3Vm8RK/cZoHEzKXhCK2QxEPpiJe0YlKCFaKCNv/cYBNUsBRPlkJSc0U+dM7E9H0ThGJbgZT/iR7yj+VqMS06Qr4+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=",$C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAACcCAMAAAC3Fl5oAAAB3VBMVEVMaXH/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/EhL/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/Dw//AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/GRn/NTX/Dw//Fhb/AAD/AAD/AAD/GRn/GRn/Y2P/AAD/AAD/ExP/Ghr/AAD/AAD/MzP/GRn/AAD/Hh7/AAD/RUX/AAD/AAD/AAD/AAD/AAD/AAD/Dg7/AAD/HR3/Dw//FRX/SUn/AAD/////kJD/DQ3/Zmb/+/v/wMD/mJj/6en/vb3/1NT//Pz/ODj/+fn/3Nz/nJz/j4//9/f/7e3/9vb/7Oz/2Nj/x8f/Ozv/+Pj/3d3/nZ3/2dn//f3/6Oj/2tr/v7//09P/vr7/mZn/l5cdSvP3AAAAe3RSTlMAAhLiZgTb/vztB/JMRhlp6lQW86g8mQ4KFPs3UCH5U8huwlesWtTYGI7RsdVeJGfTW5rxnutLsvXWF8vQNdo6qQbuz7D4hgVIx2xtw8GC1TtZaIw0i84P98tU0/fsj7PKaAgiZZxeVfo8Z52eg1P0nESrENnjXVPUgw/uuSmDAAADsUlEQVR42u3aZ3cTRxgF4GtbYleSLdnGcsENG2ODjbExEHrvhAQCIb1Bem+QdkeuuFMNBBJIfmuOckzZI8/srHYmH3Lm+QNXK632LTvQ03Tu/IWeU/tTGTKT2n+q58L5c00wpXJd47DHEt5w47pKxLbhdLdPKb/7dBYxVLxw1GcI/2h1BcpzKNFHLX2JQ4gumaiitqpEEhEdOMJI9h5AFC3feYzI+7IF2tpSLEOqDXpObPRYFm/jCWho/4Ble7MdoT7fzhhq9yHEz28wltU1UPrJZ0wd66HwicfYvEFIfePTAP8tSLTupBHvtGJFH9bSkNrNWEHzERrT34xSH9Ogr1CijkbVAUH1KRqVqkdQAw07iIAaGlcTqI+/0LjeJJ5J0IIEnkpXMdzs4sTtW9dnZq7fuj2xOMtwVWk88RHDjBYejYvnjD8qjOpfQsUqhvj7oSjxcJIhVj3pyKqpNjYvVjQ/RrXq5YABKi3MCYm5BSrtWO5v11DlmlC4RpU1WRS9SJU7QukOVbpQ9JLu549+Dd0AUOlTbkGEuk85vxLAK5QbuytC3R2j3HoAjZSbFxrmKTcCoJdSk0LLJKV6gSaPMqNTQsvUKGW8JrxKqUWhaZFSeWyh1LTQNE2pHF6mzOy40DQ+S5mLimJcENoKlOnBWsr8KbRNUGYt5LXgd6HtD3lNQIoyN4S2G5RJIUOZm0LbTcqsBqVmhLYZSlkPsP4VWf+Rrd+m1v9o9h8Vv5p42C1R5qL1x7WRglOgVN52yfwNOBu76P+lLPoYidu23KPciIHGa07ZeIW1jvcNtI7q5vexCPGYCmf+m/Y9a3sAwQ5bI9T7ukPgPcn9GToEao+xk1OixJT+GIsvNAbx6eAgPq0xiF+KtkpYKhRXCQ8eFFcJhSWGu3rZ8jJkCM8kz9K4TUnrC6mAgzTsB9tLwQ2W15qfosQ2GrQNpZr7aczbzVjBZsvLcaC1g0bsbIVEnU8DOr6H1KDH2LwtUBi0/JII6Dxm9zUXkH+XMWzfh1Dte1i2Pe3QkC77Zel7aehpO8wyHG6Dtt0NjKxhN6I4uSli/TqJiJJDUQ4NDCURXTrXRy1XcumyD24M+AzhD1RXIIZsl/LoyZmurJHDM7s8lvB2FQ/PmPJ6PseAXP5HGMYAAC7ABbgAF+ACXIALcAEuwAW4ABfgAlyAC3ABLsAFuID/d8Cx4NEt8/byOf0wLnis8zjMq9/Kp7bWw4JOj8u8TlhRl+G/Mp2wpOX48GffvvZ1CyL4B53LAS6zb08EAAAAAElFTkSuQmCC";var zC=(e=>(e.QQ="qq",e.GOOGLE="google",e.AMAP="AMap",e.BMAP="BMapGL",e.UNKNOWN="",e))(zC||{});function WC(){return __uniConfig.bMapKey?{type:"BMapGL",key:__uniConfig.bMapKey}:__uniConfig.qqMapKey?{type:"qq",key:__uniConfig.qqMapKey}:__uniConfig.googleMapKey?{type:"google",key:__uniConfig.googleMapKey}:__uniConfig.aMapKey?{type:"AMap",key:__uniConfig.aMapKey,securityJsCode:__uniConfig.aMapSecurityJsCode,serviceHost:__uniConfig.aMapServiceHost}:{type:"",key:""}}let YC=!1,XC=!1;const JC=()=>XC?YC:(XC=!0,YC="AMap"===WC().type),ZC=()=>"BMapGL"===WC().type;function QC(e,t,n){const o=WC();return e&&"WGS84"===e.toUpperCase()||["google"].includes(o.type)||n?Promise.resolve(t):"qq"===o.type?new Promise((e=>{FC(`https://apis.map.qq.com/ws/coord/v1/translate?type=1&locations=${t.latitude},${t.longitude}&key=${o.key}&output=jsonp`,{callback:"callback"},(n=>{if("locations"in n&&n.locations.length){const{lng:o,lat:i}=n.locations[0];e({longitude:o,latitude:i,altitude:t.altitude,accuracy:t.accuracy,altitudeAccuracy:t.altitudeAccuracy,heading:t.heading,speed:t.speed})}else e(t)}),(()=>e(t)))})):"AMap"===o.type?new Promise((e=>{BC([],(()=>{window.AMap.convertFrom([t.longitude,t.latitude],"gps",((n,o)=>{if("ok"===o.info&&o.locations.length){const{lat:n,lng:i}=o.locations[0];e({longitude:i,latitude:n,altitude:t.altitude,accuracy:t.accuracy,altitudeAccuracy:t.altitudeAccuracy,heading:t.heading,speed:t.speed})}else e(t)}))}))})):Promise.reject(new Error("translate coordinate system faild"))}const eT=Jh({name:"MapMarker",props:{id:{type:[Number,String],default:""},latitude:{type:[Number,String],require:!0},longitude:{type:[Number,String],require:!0},title:{type:String,default:""},iconPath:{type:String,require:!0},rotate:{type:[Number,String],default:0},alpha:{type:[Number,String],default:1},width:{type:[Number,String],default:""},height:{type:[Number,String],default:""},callout:{type:Object,default:null},label:{type:Object,default:null},anchor:{type:Object,default:null},clusterId:{type:[Number,String],default:""},customCallout:{type:Object,default:null},ariaLabel:{type:String,default:""}},setup(e){const t=String(isNaN(Number(e.id))?"":e.id),n=gs("onMapReady"),o=function(e){const t="uni-map-marker-label-"+e,n=document.createElement("style");return n.id=t,document.head.appendChild(n),Ca((()=>{n.remove()})),function(e){const o=Object.assign({},e,{position:"absolute",top:"70px",borderStyle:"solid"}),i=document.createElement("div");return Object.keys(o).forEach((e=>{i.style[e]=o[e]||""})),n.innerText=`.${t}{${i.getAttribute("style")}}`,t}}(t);let i;function a(e){JC()?e.removeAMapText():e.setMap(null)}if(n(((n,s,r)=>{function c(e){const c=e.title;let u;u=JC()?new s.LngLat(e.longitude,e.latitude):ZC()?new s.Point(e.longitude,e.latitude):new s.LatLng(e.latitude,e.longitude);const l=new Image;let d=0;l.onload=()=>{const p=e.anchor||{};let h,f,g,_,m="number"==typeof p.x?p.x:.5,v="number"==typeof p.y?p.y:1;e.iconPath&&(e.width||e.height)?(f=e.width||l.width/l.height*e.height,g=e.height||l.height/l.width*e.width):(f=l.width/2,g=l.height/2),d=g,_=g-(g-v*g),h="MarkerImage"in s?new s.MarkerImage(l.src,null,null,new s.Point(m*f,v*g),new s.Size(f,g)):"Icon"in s?new s.Icon({image:l.src,size:new s.Size(f,g),imageSize:new s.Size(f,g),imageOffset:new s.Pixel(m*f,v*g)}):{url:l.src,anchor:new s.Point(m,v),size:new s.Size(f,g)},ZC()?(i=new s.Marker(new s.Point(u.lng,u.lat)),n.addOverlay(i)):(i.setPosition(u),i.setIcon(h)),"setRotation"in i&&i.setRotation(e.rotate||0);const y=e.label||{};let I;if("label"in i&&(i.label.setMap(null),delete i.label),y.content){const e={borderColor:y.borderColor,borderWidth:(Number(y.borderWidth)||0)+"px",padding:(Number(y.padding)||0)+"px",borderRadius:(Number(y.borderRadius)||0)+"px",backgroundColor:y.bgColor,color:y.color,fontSize:(y.fontSize||14)+"px",lineHeight:(y.fontSize||14)+"px",marginLeft:(Number(y.anchorX||y.x)||0)+"px",marginTop:(Number(y.anchorY||y.y)||0)+"px"};if("Label"in s)I=new s.Label({position:u,map:n,clickable:!1,content:y.content,style:e}),i.label=I;else if("setLabel"in i)if(JC()){const t=`<div style="\n margin-left:${e.marginLeft};\n margin-top:${e.marginTop};\n padding:${e.padding};\n background-color:${e.backgroundColor};\n border-radius:${e.borderRadius};\n line-height:${e.lineHeight};\n color:${e.color};\n font-size:${e.fontSize};\n\n ">\n ${y.content}\n <div>`;i.setLabel({content:t,direction:"bottom-right"})}else{const t=o(e);i.setLabel({text:y.content,color:e.color,fontSize:e.fontSize,className:t})}}const M=e.callout||{};let C,T=i.callout;if(M.content||c){JC()&&M.content&&(M.content=M.content.replaceAll("\n","<br/>"));const o="0px 0px 3px 1px rgba(0,0,0,0.5)";let a=-d/2;if((e.width||e.height)&&(a+=14-d/2),C=M.content?{position:u,map:n,top:_,offsetY:a,content:M.content,color:M.color,fontSize:M.fontSize,borderRadius:M.borderRadius,bgColor:M.bgColor,padding:M.padding,boxShadow:M.boxShadow||o,display:M.display}:{position:u,map:n,top:_,offsetY:a,content:c,boxShadow:o},T)T.setOption(C);else if(JC()){const e=()=>{""!==t&&r("callouttap",{},{markerId:Number(t)})};T=i.callout=new s.Callout(C,e)}else T=i.callout=new s.Callout(C),T.div.onclick=function(e){""!==t&&r("callouttap",e,{markerId:Number(t)}),e.stopPropagation(),e.preventDefault()},WC().type===zC.GOOGLE&&(T.div.ontouchstart=function(e){e.stopPropagation()},T.div.onpointerdown=function(e){e.stopPropagation()})}else T&&(a(T),delete i.callout)},e.iconPath?l.src=dy(e.iconPath):console.error("Marker.iconPath is required.")}!function(e){ZC()||(i=new s.Marker({map:n,flat:!0,autoRotation:!1})),c(e);const o=s.event||s.Event;ZC()||o.addListener(i,"click",(()=>{const n=i.callout;if(n&&!n.alwaysVisible)if(JC())n.visible=!n.visible,n.visible?i.callout.createAMapText():i.callout.removeAMapText();else if(n.set("visible",!n.visible),n.visible){const e=n.div,t=e.parentNode;t.removeChild(e),t.appendChild(e)}t&&r("markertap",{},{markerId:Number(t),latitude:e.latitude,longitude:e.longitude})}))}(e),Ri(e,c)})),t){const e=gs("addMapChidlContext"),o=gs("removeMapChidlContext"),a={id:t,translate(e){n(((t,n,o)=>{const a=e.destination,s=e.duration,r=!!e.autoRotate;let c=Number(e.rotate)||0,u=0;"getRotation"in i&&(u=i.getRotation());const l=i.getPosition(),d=new n.LatLng(a.latitude,a.longitude),p=n.geometry.spherical.computeDistanceBetween(l,d)/1e3/(("number"==typeof s?s:1e3)/36e5),h=n.event||n.Event,f=h.addListener(i,"moving",(e=>{const t=e.latLng,n=i.label;n&&n.setPosition(t);const o=i.callout;o&&o.setPosition(t)})),g=h.addListener(i,"moveend",(()=>{g.remove(),f.remove(),i.lastPosition=l,i.setPosition(d);const t=i.label;t&&t.setPosition(d);const n=i.callout;n&&n.setPosition(d);const o=e.animationEnd;m(o)&&o()}));let _=0;r&&(i.lastPosition&&(_=n.geometry.spherical.computeHeading(i.lastPosition,l)),c=n.geometry.spherical.computeHeading(l,d)-_),"setRotation"in i&&i.setRotation(u+c),"moveTo"in i?i.moveTo(d,p):(i.setPosition(d),h.trigger(i,"moveend",{}))}))}};e(a),Ca((()=>o(a)))}return Ca((function(){i&&(i.label&&"setMap"in i.label&&i.label.setMap(null),i.callout&&a(i.callout),i.setMap(null))})),()=>null}});function tT(e){if(!e)return{r:0,g:0,b:0,a:0};let t=e.slice(1);const n=t.length;if(![3,4,6,8].includes(n))return{r:0,g:0,b:0,a:0};3!==n&&4!==n||(t=t.replace(/(\w{1})/g,"$1$1"));let[o,i,a,s]=t.match(/(\w{2})/g);const r=parseInt(o,16),c=parseInt(i,16),u=parseInt(a,16);return s?{r:r,g:c,b:u,a:(`0x100${s}`-65536)/255}:{r:r,g:c,b:u,a:1}}const nT={points:{type:Array,require:!0},color:{type:String,default:"#000000"},width:{type:[Number,String],default:""},dottedLine:{type:[Boolean,String],default:!1},arrowLine:{type:[Boolean,String],default:!1},arrowIconPath:{type:String,default:""},borderColor:{type:String,default:"#000000"},borderWidth:{type:[Number,String],default:""},colorList:{type:Array,default:()=>[]},level:{type:String,default:""}},oT=Jh({name:"MapPolyline",props:nT,setup(e){let t,n;function o(){t&&t.setMap(null),n&&n.setMap(null)}return gs("onMapReady")(((i,a)=>{function s(e){const o=[];e.points.forEach((e=>{let t;t=JC()?[e.longitude,e.latitude]:ZC()?new a.Point(e.longitude,e.latitude):new a.LatLng(e.latitude,e.longitude),o.push(t)}));const s=Number(e.width)||1,{r:r,g:c,b:u,a:l}=tT(e.color),{r:d,g:p,b:h,a:f}=tT(e.borderColor),g={map:i,clickable:!1,path:o,strokeWeight:s,strokeColor:e.color||void 0,strokeDashStyle:e.dottedLine?"dash":"solid"},_=Number(e.borderWidth)||0,m={map:i,clickable:!1,path:o,strokeWeight:s+2*_,strokeColor:e.borderColor||void 0,strokeDashStyle:e.dottedLine?"dash":"solid"};"Color"in a?(g.strokeColor=new a.Color(r,c,u,l),m.strokeColor=new a.Color(d,p,h,f)):(g.strokeColor=`rgb(${r}, ${c}, ${u})`,g.strokeOpacity=l,m.strokeColor=`rgb(${d}, ${p}, ${h})`,m.strokeOpacity=f),_&&(n=new a.Polyline(m)),ZC()?(t=new a.Polyline(g.path,g),i.addOverlay(t)):t=new a.Polyline(g)}s(e),Ri(e,(function(e){o(),s(e)}))})),Ca(o),()=>null}}),iT=Jh({name:"MapCircle",props:{latitude:{type:[Number,String],require:!0},longitude:{type:[Number,String],require:!0},color:{type:String,default:"#000000"},fillColor:{type:String,default:"#00000000"},radius:{type:[Number,String],require:!0},strokeWidth:{type:[Number,String],default:""},level:{type:String,default:""}},setup(e){let t;function n(){t&&t.setMap(null)}return gs("onMapReady")(((o,i)=>{function a(e){const n=JC()||ZC()?[e.longitude,e.latitude]:new i.LatLng(e.latitude,e.longitude),a={map:o,center:n,clickable:!1,radius:e.radius,strokeWeight:Number(e.strokeWidth)||1,strokeDashStyle:"solid"};if(ZC())a.strokeColor=e.color,a.fillColor=e.fillColor||"#000",a.fillOpacity=1;else{const{r:t,g:n,b:o,a:s}=tT(e.fillColor),{r:r,g:c,b:u,a:l}=tT(e.color);"Color"in i?(a.fillColor=new i.Color(t,n,o,s),a.strokeColor=new i.Color(r,c,u,l)):(a.fillColor=`rgb(${t}, ${n}, ${o})`,a.fillOpacity=s,a.strokeColor=`rgb(${r}, ${c}, ${u})`,a.strokeOpacity=l)}if(ZC()){let e=new i.Point(a.center[0],a.center[1]);t=new i.Circle(e,a.radius,a),o.addOverlay(t)}else t=new i.Circle(a),JC()&&o.add(t)}a(e),Ri(e,(function(e){n(),a(e)}))})),Ca(n),()=>null}}),aT={id:{type:[Number,String],default:""},position:{type:Object,required:!0},iconPath:{type:String,required:!0},clickable:{type:[Boolean,String],default:""},trigger:{type:Function,required:!0}},sT=Jh({name:"MapControl",props:aT,setup(e){const t=Wr((()=>dy(e.iconPath))),n=Wr((()=>{let t=`top:${e.position.top||0}px;left:${e.position.left||0}px;`;return e.position.width&&(t+=`width:${e.position.width}px;`),e.position.height&&(t+=`height:${e.position.height}px;`),t})),o=t=>{e.clickable&&e.trigger("controltap",t,{controlId:e.id})};return()=>_r("div",{class:"uni-map-control"},[_r("img",{src:t.value,style:n.value,class:"uni-map-control-icon",onClick:o},null,12,["src","onClick"])])}}),rT=je((()=>{o_.forEach((e=>{cT.prototype[e]=function(t){m(t)&&this._events[e].push(t)}})),i_.forEach((e=>{cT.prototype[e]=function(t){var n=this._events[e.replace("off","on")],o=n.indexOf(t);o>=0&&n.splice(o,1)}}))}));class cT{constructor(){this._src="";var e=this._audio=new Audio;this._stoping=!1;["src","autoplay","loop","duration","currentTime","paused","volume"].forEach((t=>{Object.defineProperty(this,t,{set:"src"===t?t=>(e.src=dy(t),this._src=t,t):n=>(e[t]=n,n),get:"src"===t?()=>this._src:()=>e[t]})})),this.startTime=0,Object.defineProperty(this,"obeyMuteSwitch",{set:()=>!1,get:()=>!1}),Object.defineProperty(this,"buffered",{get(){var t=e.buffered;return t.length?t.end(t.length-1):0}}),this._events={},o_.forEach((e=>{this._events[e]=[]})),e.addEventListener("loadedmetadata",(()=>{var t=Number(this.startTime)||0;t>0&&(e.currentTime=t)}));var t=["canplay","pause","seeking","seeked","timeUpdate"];t.concat(["play","ended","error","waiting"]).forEach((n=>{e.addEventListener(n.toLowerCase(),(()=>{if(this._stoping&&t.indexOf(n)>=0)return;const e=`on${n.slice(0,1).toUpperCase()}${n.slice(1)}`;this._events[e].forEach((e=>{e()}))}),!1)})),rT()}play(){this._stoping=!1,this._audio.play()}pause(){this._audio.pause()}stop(){this._stoping=!0,this._audio.pause(),this._audio.currentTime=0,this._events.onStop.forEach((e=>{e()}))}seek(e){this._stoping=!1,"number"!=typeof(e=Number(e))||isNaN(e)||(this._audio.currentTime=e)}destroy(){this.stop()}}const uT=ng(0,(()=>new cT)),lT=og("makePhoneCall",(({phoneNumber:e},{resolve:t})=>(window.location.href=`tel:${e}`,t()))),dT="__DC_STAT_UUID",pT=navigator.cookieEnabled&&(window.localStorage||window.sessionStorage)||{};let hT;function fT(){if(hT=hT||pT[dT],!hT){hT=Date.now()+""+Math.floor(1e7*Math.random());try{pT[dT]=hT}catch(e){}}return hT}function gT(){if(!0!==__uniConfig.darkmode)return v(__uniConfig.darkmode)?__uniConfig.darkmode:"light";try{return window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}catch(e){return"light"}}function _T(){let e,t="0",n="",o="phone";const i=navigator.language;if(fy){e="iOS";const o=py.match(/OS\s([\w_]+)\slike/);o&&(t=o[1].replace(/_/g,"."));const i=py.match(/\(([a-zA-Z]+);/);i&&(n=i[1])}else if(hy){e="Android";const o=py.match(/Android[\s/]([\w\.]+)[;\s]/);o&&(t=o[1]);const i=py.match(/\((.+?)\)/),a=i?i[1].split(";"):py.split(" "),s=[/\bAndroid\b/i,/\bLinux\b/i,/\bU\b/i,/^\s?[a-z][a-z]$/i,/^\s?[a-z][a-z]-[a-z][a-z]$/i,/\bwv\b/i,/\/[\d\.,]+$/,/^\s?[\d\.,]+$/,/\bBrowser\b/i,/\bMobile\b/i];for(let e=0;e<a.length;e++){const t=a[e];if(t.indexOf("Build")>0){n=t.split("Build")[0].trim();break}let o;for(let e=0;e<s.length;e++)if(s[e].test(t)){o=!0;break}if(!o){n=t.trim();break}}}else if(yy){if(n="iPad",e="iOS",o="pad",t=m(window.BigInt)?"14.0":"13.0",14===parseInt(t)){const e=py.match(/Version\/(\S*)\b/);e&&(t=e[1])}}else if(gy||_y||vy){n="PC",e="PC",o="pc",t="0";let i=py.match(/\((.+?)\)/)[1];if(gy){switch(e="Windows",gy[1]){case"5.1":t="XP";break;case"6.0":t="Vista";break;case"6.1":t="7";break;case"6.2":t="8";break;case"6.3":t="8.1";break;case"10.0":t="10"}const n=i&&i.match(/[Win|WOW]([\d]+)/);n&&(t+=` x${n[1]}`)}else if(_y){e="macOS";const n=i&&i.match(/Mac OS X (.+)/)||"";t&&(t=n[1].replace(/_/g,"."),-1!==t.indexOf(";")&&(t=t.split(";")[0]))}else if(vy){e="Linux";const n=i&&i.match(/Linux (.*)/)||"";n&&(t=n[1],-1!==t.indexOf(";")&&(t=t.split(";")[0]))}}else e="Other",t="0",o="unknown";const a=`${e} ${t}`,s=e.toLocaleLowerCase();let r="",c=String(function(){const e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Edge")>-1&&!t,o=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);const t=parseFloat(RegExp.$1);return t>6?t:6}return n?-1:o?11:-1}());if("-1"!==c)r="IE";else{const e=["Version","Firefox","Chrome","Edge{0,1}"],t=["Safari","Firefox","Chrome","Edge"];for(let n=0;n<e.length;n++){const o=e[n],i=new RegExp(`(${o})/(\\S*)\\b`);i.test(py)&&(r=t[n],c=py.match(i)[2])}}let u="portrait";const l=void 0===window.screen.orientation?window.orientation:window.screen.orientation.angle;return u=90===Math.abs(l)?"landscape":"portrait",{deviceBrand:void 0,brand:void 0,deviceModel:n,deviceOrientation:u,model:n,system:a,platform:s,browserName:r.toLocaleLowerCase(),browserVersion:c,language:i,deviceType:o,ua:py,osname:e,osversion:t,theme:gT()}}const mT=ng(0,(()=>{const e=window.devicePixelRatio,t=Iy(),n=My(t),o=Cy(t,n),i=function(e,t){return e?Math[t?"min":"max"](screen.height,screen.width):screen.height}(t,n),a=Ty(o);let s=window.innerHeight;const r=Kp.top,c={left:Kp.left,right:a-Kp.right,top:Kp.top,bottom:s-Kp.bottom,width:a-Kp.left-Kp.right,height:s-Kp.top-Kp.bottom},{top:u,bottom:l}=Xp();return s-=u,s-=l,{windowTop:u,windowBottom:l,windowWidth:a,windowHeight:s,pixelRatio:e,screenWidth:o,screenHeight:i,statusBarHeight:r,safeArea:c,safeAreaInsets:{top:Kp.top,right:Kp.right,bottom:Kp.bottom,left:Kp.left},screenTop:i-s}}));let vT,yT=!0;function IT(){yT&&(vT=_T())}const MT=ng(0,(()=>{IT();const{deviceBrand:e,deviceModel:t,brand:n,model:o,platform:i,system:a,deviceOrientation:s,deviceType:r,osname:c,osversion:l}=vT;return u({brand:n,deviceBrand:e,deviceModel:t,devicePixelRatio:window.devicePixelRatio,deviceId:fT(),deviceOrientation:s,deviceType:r,model:o,platform:i,system:a,osName:c?c.toLocaleLowerCase():void 0,osVersion:l})})),CT=ng(0,(()=>{IT();const{theme:e,language:t,browserName:n,browserVersion:o}=vT;return u({appId:__uniConfig.appId,appName:__uniConfig.appName,appVersion:__uniConfig.appVersion,appVersionCode:__uniConfig.appVersionCode,appLanguage:A_?A_():t,enableDebug:!1,hostSDKVersion:void 0,hostPackageName:void 0,hostFontSizeSetting:void 0,hostName:n,hostVersion:o,hostTheme:e,hostLanguage:t,language:t,SDKVersion:"",theme:e,version:"",uniPlatform:"web",isUniAppX:!1,uniCompileVersion:__uniConfig.compilerVersion,uniCompilerVersion:__uniConfig.compilerVersion,uniRuntimeVersion:__uniConfig.compilerVersion},{})})),TT=ng(0,(()=>{yT=!0,IT(),yT=!1;const e=mT(),t=MT(),n=CT();yT=!0;const{ua:o,browserName:i,browserVersion:a,osname:s,osversion:r}=vT,c=u(e,t,n,{ua:o,browserName:i,browserVersion:a,uniPlatform:"web",uniCompileVersion:__uniConfig.compilerVersion,uniRuntimeVersion:__uniConfig.compilerVersion,fontSizeSetting:void 0,osName:s.toLocaleLowerCase(),osVersion:r,osLanguage:void 0,osTheme:void 0});return delete c.screenTop,delete c.enableDebug,__uniConfig.darkmode||delete c.theme,function(e){let t={};return S(e)&&Object.keys(e).sort().forEach((n=>{const o=n;t[o]=e[o]})),Object.keys(t)?t:e}(c)})),ST=og("getSystemInfo",((e,{resolve:t})=>t(TT()))),ET="onNetworkStatusChange";function DT(){AT().then((({networkType:e})=>{lL.invokeOnCallback(ET,{isConnected:"none"!==e,networkType:e})}))}function kT(){return navigator.connection||navigator.webkitConnection||navigator.mozConnection}const LT=Qf(ET,(()=>{const e=kT();e?e.addEventListener("change",DT):(window.addEventListener("offline",DT),window.addEventListener("online",DT))})),bT=eg("offNetworkStatusChange",(()=>{const e=kT();e?e.removeEventListener("change",DT):(window.removeEventListener("offline",DT),window.removeEventListener("online",DT))})),AT=og("getNetworkType",((e,{resolve:t})=>{const n=kT();let o="unknown";return n?(o=n.type,"cellular"===o&&n.effectiveType?o=n.effectiveType.replace("slow-",""):!o&&n.effectiveType?o=n.effectiveType:["none","wifi"].includes(o)||(o="unknown")):!1===navigator.onLine&&(o="none"),t({networkType:o})}));let RT=null;const OT=Qf(X_,(()=>{PT()})),wT=eg("offAccelerometer",(()=>{NT()})),PT=og("startAccelerometer",((e,{resolve:t,reject:n})=>{if(window.DeviceMotionEvent){if(!RT){if(DeviceMotionEvent.requestPermission)return void DeviceMotionEvent.requestPermission().then((e=>{"granted"===e?(o(),t()):n(`${e}`)})).catch((e=>{n(`${e}`)}));o()}t()}else n();function o(){RT=function(e){const t=e.acceleration||e.accelerationIncludingGravity;lL.invokeOnCallback(X_,{x:t&&t.x||0,y:t&&t.y||0,z:t&&t.z||0})},window.addEventListener("devicemotion",RT,!1)}})),NT=og("stopAccelerometer",((e,{resolve:t})=>{RT&&(window.removeEventListener("devicemotion",RT,!1),RT=null),t()}));let GT=null;const UT=Qf(J_,(()=>{FT()})),xT=eg("offCompass",(()=>{qT()})),FT=og("startCompass",((e,{resolve:t,reject:n})=>{if(window.DeviceOrientationEvent){if(!GT){if(DeviceOrientationEvent.requestPermission)return void DeviceOrientationEvent.requestPermission().then((e=>{"granted"===e?(o(),t()):n(`${e}`)})).catch((e=>{n(`${e}`)}));o()}t()}else n();function o(){GT=function(e){const t=360-(null!==e.alpha?e.alpha:360);lL.invokeOnCallback(J_,{direction:t})},window.addEventListener("deviceorientation",GT,!1)}})),qT=og("stopCompass",((e,{resolve:t})=>{GT&&(window.removeEventListener("deviceorientation",GT,!1),GT=null),t()})),VT=!!window.navigator.vibrate,BT=og("vibrateShort",((e,{resolve:t,reject:n})=>{VT&&window.navigator.vibrate(15)?t():n("vibrateLong:fail")})),HT=og("vibrateLong",((e,{resolve:t,reject:n})=>{VT&&window.navigator.vibrate(400)?t():n("vibrateLong:fail")}));var jT=(e,t,n)=>new Promise(((o,i)=>{var a=e=>{try{r(n.next(e))}catch(Hw){i(Hw)}},s=e=>{try{r(n.throw(e))}catch(Hw){i(Hw)}},r=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,s);r((n=n.apply(e,t)).next())}));const KT=og("getClipboardData",((e,t)=>jT(void 0,[e,t],(function*(e,{resolve:t,reject:n}){pp();const{t:o}=op();try{t({data:yield navigator.clipboard.readText()})}catch(i){!function(e,t){const n=document.getElementById("#clipboard"),o=n?n.value:void 0;o?e({data:o}):t()}(t,(()=>{n(`${i} ${o("uni.getClipboardData.fail")}`)}))}})))),$T=og("setClipboardData",((e,t)=>jT(void 0,[e,t],(function*({data:e},{resolve:t,reject:n}){try{yield navigator.clipboard.writeText(e),t()}catch(o){!function(e,t,n){const o=document.getElementById("#clipboard");o&&o.remove();const i=document.createElement("textarea");i.setAttribute("inputmode","none"),i.id="#clipboard",i.style.position="fixed",i.style.top="-9999px",i.style.zIndex="-9999",document.body.appendChild(i),i.value=e,i.select(),i.setSelectionRange(0,i.value.length);const a=document.execCommand("Copy",!1);i.blur(),a?t():n()}(e,t,n)}}))),0,Y_);const zT=e=>{lL.invokeOnCallback(fe,e)},WT=Qf(fe,(()=>{lL.on(fe,zT)})),YT=eg("offThemeChange",(()=>{lL.off(fe,zT)}));const XT=ng(0,((e,t)=>{const n=typeof t,o="string"===n?t:JSON.stringify({type:n,data:t});localStorage.setItem(e,o)})),JT=og("setStorage",(({key:e,data:t},{resolve:n,reject:o})=>{try{XT(e,t),n()}catch(i){o(i.message)}}));function ZT(e){const t=localStorage&&localStorage.getItem(e);if(!v(t))throw new Error("data not found");let n=t;try{const e=function(e){const t=["object","string","number","boolean","undefined"];try{const n=v(e)?JSON.parse(e):e,o=n.type;if(t.indexOf(o)>=0){const e=Object.keys(n);if(2===e.length&&"data"in n){if(typeof n.data===o)return n.data;if("object"===o&&/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/.test(n.data))return new Date(n.data)}else if(1===e.length)return""}}catch(n){}}(JSON.parse(t));void 0!==e&&(n=e)}catch(o){}return n}const QT=ng(0,(e=>{try{return ZT(e)}catch(t){return""}})),eS=og("getStorage",(({key:e},{resolve:t,reject:n})=>{try{t({data:ZT(e)})}catch(o){n(o.message)}})),tS=ng(0,(e=>{localStorage&&localStorage.removeItem(e)})),nS=og(Z_,(({key:e},{resolve:t})=>{tS(e),t()})),oS=ng(0,(()=>{localStorage&&localStorage.clear()})),iS=og("clearStorage",((e,{resolve:t})=>{oS(),t()})),aS=ng(0,(()=>{const e=localStorage&&localStorage.length||0,t=[];let n=0;for(let o=0;o<e;o++){const e=localStorage.key(o),i=localStorage.getItem(e)||"";n+=e.length+i.length,"uni-storage-keys"!==e&&t.push(e)}return{keys:t,currentSize:Math.ceil(2*n/1024),limitSize:Number.MAX_VALUE}})),sS=og("getStorageInfo",((e,{resolve:t})=>{t(aS())})),rS=og("getFileInfo",(({filePath:e},{resolve:t,reject:n})=>{Ry(e).then((e=>{t({size:e.size})})).catch((e=>{n(String(e))}))}),0,Q_),cS=og("openDocument",(({filePath:e},{resolve:t})=>(window.open(e),t())),0,em),uS=og("hideKeyboard",((e,{resolve:t,reject:n})=>{const o=document.activeElement;!o||"TEXTAREA"!==o.tagName&&"INPUT"!==o.tagName||(o.blur(),t())}));const lS=og("getImageInfo",(({src:e},{resolve:t,reject:n})=>{const o=new Image;o.onload=function(){t({width:o.naturalWidth,height:o.naturalHeight,path:0===e.indexOf("/")?window.location.protocol+"//"+window.location.host+e:e})},o.onerror=function(){n()},o.src=e}),0,um),dS=og("getVideoInfo",(({src:e},{resolve:t,reject:n})=>{Ry(e,!0).then((e=>e)).catch((()=>null)).then((o=>{const i=document.createElement("video");if(void 0!==i.onloadedmetadata){const a=setTimeout((()=>{i.onloadedmetadata=null,i.onerror=null,n()}),e.startsWith("data:")||e.startsWith("blob:")?300:3e3);i.onloadedmetadata=function(){clearTimeout(a),i.onerror=null,t({size:Math.ceil((o?o.size:0)/1024),duration:i.duration||0,width:i.videoWidth||0,height:i.videoHeight||0})},i.onerror=function(){clearTimeout(a),i.onloadedmetadata=null,n()},i.src=e}else n()}))}),0,dm),pS={image:{jpg:"jpeg",jpe:"jpeg",pbm:"x-portable-bitmap",pgm:"x-portable-graymap",pnm:"x-portable-anymap",ppm:"x-portable-pixmap",psd:"vnd.adobe.photoshop",pic:"x-pict",rgb:"x-rgb",svg:"svg+xml",svgz:"svg+xml",tif:"tiff",xif:"vnd.xiff",wbmp:"vnd.wap.wbmp",wdp:"vnd.ms-photo",xbm:"x-xbitmap",ico:"x-icon"},video:{"3g2":"3gpp2","3gp":"3gpp",avi:"x-msvideo",f4v:"x-f4v",flv:"x-flv",jpgm:"jpm",jpgv:"jpeg",m1v:"mpeg",m2v:"mpeg",mpe:"mpeg",mpg:"mpeg",mpg4:"mpeg",m4v:"x-m4v",mkv:"x-matroska",mov:"quicktime",qt:"quicktime",movie:"x-sgi-movie",mp4v:"mp4",ogv:"ogg",smv:"x-smv",wm:"x-ms-wm",wmv:"x-ms-wmv",wmx:"x-ms-wmx",wvx:"x-ms-wvx"}};function hS({count:e,sourceType:t,type:n,extension:o}){CI();const i=document.createElement("input");return i.type="file",He(i,{position:"absolute",visibility:"hidden",zIndex:"-999",width:"0",height:"0",top:"0",left:"0"}),i.accept=o.map((e=>{if("all"!==n){const t=e.replace(".","");return`${n}/${pS[n][t]||t}`}return function(){const e=window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i);return!(!e||"micromessenger"!==e[0])}()?".":0===e.indexOf(".")?e:`.${e}`})).join(","),e&&e>1&&(i.multiple=!0),"all"!==n&&t instanceof Array&&1===t.length&&"camera"===t[0]&&i.setAttribute("capture","camera"),i}let fS=null;const gS=og("chooseFile",(({count:e,sourceType:t,type:n,extension:o},{resolve:i,reject:a})=>{lp();const{t:s}=op();fS&&(document.body.removeChild(fS),fS=null),fS=hS({count:e,sourceType:t,type:n,extension:o}),document.body.appendChild(fS),fS.addEventListener("change",(function(t){const n=t.target,o=[];if(n&&n.files){const t=n.files.length;for(let i=0;i<t;i++){const t=n.files[i];let a;Object.defineProperty(t,"path",{get:()=>(a=a||wy(t),a)}),i<e&&o.push(t)}}i({get tempFilePaths(){return o.map((({path:e})=>e))},tempFiles:o})})),fS.click(),TI()||console.warn(s("uni.chooseFile.notUserActivation"))}),0,cm);let _S=null;const mS=og("chooseImage",(({count:e,sourceType:t,extension:n},{resolve:o,reject:i})=>{lp();const{t:a}=op();_S&&(document.body.removeChild(_S),_S=null),_S=hS({count:e,sourceType:t,extension:n,type:"image"}),document.body.appendChild(_S),_S.addEventListener("change",(function(t){const n=t.target,i=[];if(n&&n.files){const t=n.files.length;for(let o=0;o<t;o++){const t=n.files[o];let a;Object.defineProperty(t,"path",{get:()=>(a=a||wy(t),a)}),o<e&&i.push(t)}}o({get tempFilePaths(){return i.map((({path:e})=>e))},tempFiles:i})})),_S.click(),TI()||console.warn(a("uni.chooseFile.notUserActivation"))}),0,am),vS={esc:["Esc","Escape"],enter:["Enter"]},yS=Object.keys(vS);function IS(){const e=oo(""),t=oo(!1),n=n=>{if(t.value)return;const o=yS.find((e=>-1!==vS[e].indexOf(n.key)));o&&(e.value=o),Uo((()=>e.value=""))};return va((()=>{document.addEventListener("keyup",n)})),Ma((()=>{document.removeEventListener("keyup",n)})),{key:e,disable:t}}const MS=_r("div",{class:"uni-mask"},null,-1);function CS(e,t,n){return t.onClose=(...e)=>(t.visible=!1,n.apply(null,e)),Yu(Xi({setup:()=>()=>(nr(),cr(e,t,null,16))}))}function TS(e){let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.append(t)),t}function SS(e,{onEsc:t,onEnter:n}){const o=oo(e.visible),{key:i,disable:a}=IS();return Ri((()=>e.visible),(e=>o.value=e)),Ri((()=>o.value),(e=>a.value=!e)),ki((()=>{const{value:e}=i;"esc"===e?t&&t():"enter"===e&&n&&n()})),o}let ES=0,DS="";function kS(e){let t=ES;ES+=e?1:-1,ES=Math.max(0,ES),ES>0?0===t&&(DS=document.body.style.overflow,document.body.style.overflow="hidden"):(document.body.style.overflow=DS,DS="")}function LS(){va((()=>kS(!0))),Ca((()=>kS(!1)))}const bS=Jh({name:"ImageView",props:{src:{type:String,default:""}},setup(e){const t=qn({direction:"none"});let n=1,o=0,i=0,a=0,s=0;function r({detail:e}){n=e.scale}function c(e){const t=e.target.getBoundingClientRect();o=t.width,i=t.height}function u(e){const t=e.target.getBoundingClientRect();a=t.width,s=t.height,d(e)}function l(e){const r=n*o>a,c=n*i>s;t.direction=r&&c?"all":r?"horizontal":c?"vertical":"none",d(e)}function d(e){"all"!==t.direction&&"horizontal"!==t.direction||e.stopPropagation()}return()=>{const n={position:"absolute",left:"0",top:"0",width:"100%",height:"100%"};return _r(BI,{style:n,onTouchstart:Zh(u),onTouchmove:Zh(d),onTouchend:Zh(l)},{default:()=>[_r(tM,{style:n,direction:t.direction,inertia:!0,scale:!0,"scale-min":"1","scale-max":"4",onScale:r},{default:()=>[_r("img",{src:e.src,style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",maxHeight:"100%",maxWidth:"100%"},onLoad:c},null,40,["src","onLoad"])]},8,["style","direction","inertia","scale","onScale"])]},8,["style","onTouchstart","onTouchmove","onTouchend"])}}});function AS(e){let t="number"==typeof e.current?e.current:e.urls.indexOf(e.current);return t=t<0?0:t,t}const RS=Jh({name:"ImagePreview",props:{urls:{type:Array,default:()=>[]},current:{type:[Number,String],default:0}},emits:["close"],setup(e,{emit:t}){LS();const n=oo(null),o=oo(AS(e));let i;function a(){i||Uo((()=>{t("close")}))}function s(e){o.value=e.detail.current}Ri((()=>e.current),(()=>o.value=AS(e))),va((()=>{const e=n.value;let t=0,o=0;e.addEventListener("mousedown",(e=>{i=!1,t=e.clientX,o=e.clientY})),e.addEventListener("mouseup",(e=>{(Math.abs(e.clientX-t)>20||Math.abs(e.clientY-o)>20)&&(i=!0)}))}));const r={position:"absolute","box-sizing":"border-box",top:"0",right:"0",width:"60px",height:"44px",padding:"6px","line-height":"32px","font-size":"26px",color:"white","text-align":"center",cursor:"pointer"};return()=>{let t;return _r("div",{ref:n,style:{display:"block",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",zIndex:999,background:"rgba(0,0,0,0.8)"},onClick:a},[_r(xM,{navigation:"auto",current:o.value,onChange:s,"indicator-dots":!1,autoplay:!1,style:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}},(i=t=e.urls.map((e=>_r(qM,null,{default:()=>[_r(bS,{src:e},null,8,["src"])]}))),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!ur(i)?t:{default:()=>[t],_:1}),8,["current","onChange"]),_r("div",{style:r},[ch(sh,"#ffffff",26)],4)],8,["onClick"]);var i}}});let OS,wS=null;const PS=()=>{wS=null,Uo((()=>{null==OS||OS.unmount(),OS=null}))},NS=og("previewImage",((e,{resolve:t})=>{wS?u(wS,e):(wS=qn(e),Uo((()=>{OS=CS(RS,wS,PS),OS.mount(TS("u-a-p"))}))),t()}),0,lm),GS=og("closePreviewImage",((e,{resolve:t,reject:n})=>{OS?(PS(),t()):n()}));let US=null;const xS=og("chooseVideo",(({sourceType:e,extension:t},{resolve:n,reject:o})=>{lp();const{t:i}=op();US&&(document.body.removeChild(US),US=null),US=hS({sourceType:e,extension:t,type:"video"}),document.body.appendChild(US),US.addEventListener("change",(function(e){const t=e.target.files[0];let o="";const i={tempFilePath:o,tempFile:t,size:t.size,duration:0,width:0,height:0,name:t.name};Object.defineProperty(i,"tempFilePath",{get(){return o=o||wy(this.tempFile),o}});const a=document.createElement("video");if(void 0!==a.onloadedmetadata){const e=wy(t);a.onloadedmetadata=function(){Py(e),n(u(i,{duration:a.duration||0,width:a.videoWidth||0,height:a.videoHeight||0}))},setTimeout((()=>{a.onloadedmetadata=null,Py(e),n(i)}),300),a.src=e}else n(i)})),US.click(),TI()||console.warn(i("uni.chooseFile.notUserActivation"))}),0,sm),FS=tg("request",(({url:e,data:t,header:n={},method:o,dataType:i,responseType:a,withCredentials:s,timeout:r=__uniConfig.networkTimeout.request},{resolve:c,reject:u})=>{let l=null;const d=function(e){const t=Object.keys(e).find((e=>"content-type"===e.toLowerCase()));if(!t)return;const n=e[t];if(0===n.indexOf("application/json"))return"json";if(0===n.indexOf("application/x-www-form-urlencoded"))return"urlencoded";return"string"}(n);if("GET"!==o)if(v(t)||t instanceof ArrayBuffer)l=t;else if("json"===d)try{l=JSON.stringify(t)}catch(_){l=t.toString()}else if("urlencoded"===d){const e=[];for(const n in t)p(t,n)&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));l=e.join("&")}else l=t.toString();const h=new XMLHttpRequest,f=new qS(h);h.open(o,e);for(const m in n)p(n,m)&&h.setRequestHeader(m,n[m]);const g=setTimeout((function(){h.onload=h.onabort=h.onerror=null,f.abort(),u("timeout",{errCode:5})}),r);return h.responseType=a,h.onload=function(){clearTimeout(g);const e=h.status;let t="text"===a?h.responseText:h.response;if("text"===a&&"json"===i)try{t=JSON.parse(t)}catch(_){}c({data:t,statusCode:e,header:VS(h.getAllResponseHeaders()),cookies:[]})},h.onabort=function(){clearTimeout(g),u("abort",{errCode:600003})},h.onerror=function(){clearTimeout(g),u(void 0,{errCode:5})},h.withCredentials=s,h.send(l),f}),0,mm);class qS{constructor(e){this._xhr=e}abort(){this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}function VS(e){const t={};return e.split(ae).forEach((e=>{const n=e.match(/(\S+\s*):\s*(.*)/);n&&3===n.length&&(t[n[1]]=n[2])})),t}class BS{constructor(e){this._callbacks=[],this._xhr=e}onProgressUpdate(e){m(e)&&this._callbacks.push(e)}offProgressUpdate(e){const t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)}abort(){this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}const HS=tg("downloadFile",(({url:e,header:t={},timeout:n=__uniConfig.networkTimeout.downloadFile},{resolve:o,reject:i})=>{var a,s=new XMLHttpRequest,r=new BS(s);return s.open("GET",e,!0),Object.keys(t).forEach((e=>{s.setRequestHeader(e,t[e])})),s.responseType="blob",s.onload=function(){clearTimeout(a);const t=s.status,n=this.response;let i;const r=s.getResponseHeader("content-disposition");if(r){const e=r.match(/filename="?(\S+)"?\b/);e&&(i=e[1])}n.name=i||function(e){const t=(e=e.split("#")[0].split("?")[0]).split("/");return t[t.length-1]}(e),o({statusCode:t,tempFilePath:wy(n)})},s.onabort=function(){clearTimeout(a),i("abort",{errCode:600003})},s.onerror=function(){clearTimeout(a),i("",{errCode:602001})},s.onprogress=function(e){r._callbacks.forEach((t=>{var n=e.loaded,o=e.total;t({progress:Math.round(n/o*100),totalBytesWritten:n,totalBytesExpectedToWrite:o})}))},s.send(),a=setTimeout((function(){s.onprogress=s.onload=s.onabort=s.onerror=null,r.abort(),i("timeout",{errCode:5})}),n),r}),0,vm);class jS{constructor(e){this._callbacks=[],this._xhr=e}onProgressUpdate(e){m(e)&&this._callbacks.push(e)}offProgressUpdate(e){const t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)}abort(){this._isAbort=!0,this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}const KS=tg("uploadFile",(({url:e,file:t,filePath:n,name:o,files:i,header:a={},formData:s={},timeout:r=__uniConfig.networkTimeout.uploadFile},{resolve:c,reject:u})=>{var l=new jS;return h(i)&&i.length||(i=[{name:o,file:t,uri:n}]),Promise.all(i.map((({file:e,uri:t})=>e instanceof Blob?Promise.resolve(Oy(e)):Ry(t)))).then((function(t){var n,o=new XMLHttpRequest,d=new FormData;Object.keys(s).forEach((e=>{d.append(e,s[e])})),Object.values(i).forEach((({name:e},n)=>{const o=t[n];d.append(e||"file",o,o.name||`file-${Date.now()}`)})),o.open("POST",e),Object.keys(a).forEach((e=>{o.setRequestHeader(e,a[e])})),o.upload.onprogress=function(e){l._callbacks.forEach((t=>{var n=e.loaded,o=e.total;t({progress:Math.round(n/o*100),totalBytesSent:n,totalBytesExpectedToSend:o})}))},o.onerror=function(){clearTimeout(n),u("",{errCode:602001})},o.onabort=function(){clearTimeout(n),u("abort",{errCode:600003})},o.onload=function(){clearTimeout(n);const e=o.status;c({statusCode:e,data:o.responseText||o.response})},l._isAbort?u("abort",{errCode:600003}):(n=setTimeout((function(){o.upload.onprogress=o.onload=o.onabort=o.onerror=null,l.abort(),u("timeout",{errCode:5})}),r),o.send(d),l._xhr=o)})).catch((()=>{setTimeout((()=>{u("file error")}),0)})),l}),0,ym),$S=[],zS={open:"",close:"",error:"",message:""};class WS{constructor(e,t,n){let o;this._callbacks={open:[],close:[],error:[],message:[]};try{const n=this._webSocket=new WebSocket(e,t);n.binaryType="arraybuffer";["open","close","error","message"].forEach((e=>{this._callbacks[e]=[],n.addEventListener(e,(t=>{const{data:n,code:o,reason:i}=t,a="message"===e?{data:n}:"close"===e?{code:o,reason:i}:{};if(this._callbacks[e].forEach((t=>{try{t(a)}catch(Hw){console.error(`thirdScriptError\n${Hw};at socketTask.on${O(e)} callback function\n`,Hw)}})),this===$S[0]&&zS[e]&&lL.invokeOnCallback(zS[e],a),"error"===e||"close"===e){const e=$S.indexOf(this);e>=0&&$S.splice(e,1)}}))}));["CLOSED","CLOSING","CONNECTING","OPEN","readyState"].forEach((e=>{Object.defineProperty(this,e,{get:()=>n[e]})}))}catch(Hw){o=Hw}n&&n(o,this)}send(e){const t=(e||{}).data,n=this._webSocket;try{if(n.readyState!==n.OPEN)throw ze(e,{errMsg:"sendSocketMessage:fail SocketTask.readyState is not OPEN",errCode:10002}),new Error("SocketTask.readyState is not OPEN");n.send(t),ze(e,"sendSocketMessage:ok")}catch(o){ze(e,{errMsg:`sendSocketMessage:fail ${o}`,errCode:602001})}}close(e={}){const t=this._webSocket;try{const n=e.code||1e3,o=e.reason;v(o)?t.close(n,o):t.close(n),ze(e,"closeSocket:ok")}catch(n){ze(e,`closeSocket:fail ${n}`)}}onOpen(e){this._callbacks.open.push(e)}onMessage(e){this._callbacks.message.push(e)}onError(e){this._callbacks.error.push(e)}onClose(e){this._callbacks.close.push(e)}}const YS=tg("connectSocket",(({url:e,protocols:t},{resolve:n,reject:o})=>new WS(e,t,((e,t)=>{e?o(e.toString(),{errCode:600009}):($S.push(t),n())}))),0,Im);function XS(e,t,n,o,i){const a=e[t];m(a)&&a.call(e,u({},n,{success(){o()},fail({errMsg:e}){i(e.replace("sendSocketMessage:fail ",""))},complete:void 0}))}const JS=og("sendSocketMessage",((e,{resolve:t,reject:n})=>{const o=$S[0];o&&o.readyState===o.OPEN?XS(o,"send",e,t,n):n("WebSocket is not connected")})),ZS=og("closeSocket",((e,{resolve:t,reject:n})=>{const o=$S[0];o?XS(o,"close",e,t,n):n("WebSocket is not connected")}));function QS(e){const t=`onSocket${O(e)}`;return Qf(t,(()=>{zS[e]=t}))}const eE=QS("open"),tE=QS("error"),nE=QS("message"),oE=QS("close"),iE=og("getLocation",(({type:e,altitude:t,highAccuracyExpireTime:n,isHighAccuracy:o},{resolve:i,reject:a})=>{const s=WC();new Promise(((e,i)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition((t=>e({coords:t.coords})),i,{enableHighAccuracy:o||t,timeout:n||1e5}):i(new Error("device nonsupport geolocation"))})).catch((e=>new Promise(((t,n)=>{s.type===zC.QQ?FC(`https://apis.map.qq.com/ws/location/v1/ip?output=jsonp&key=${s.key}`,{callback:"callback"},(e=>{if("result"in e&&e.result.location){const n=e.result.location;t({coords:{latitude:n.lat,longitude:n.lng},skip:!0})}else n(new Error(e.message||JSON.stringify(e)))}),(()=>n(new Error("network error")))):s.type===zC.GOOGLE?FS({method:"POST",url:`https://www.googleapis.com/geolocation/v1/geolocate?key=${s.key}`,success(e){const o=e.data;"location"in o?t({coords:{latitude:o.location.lat,longitude:o.location.lng,accuracy:o.accuracy},skip:!0}):n(new Error(o.error&&o.error.message||JSON.stringify(e)))},fail(){n(new Error("network error"))}}):s.type===zC.AMAP?BC([],(()=>{window.AMap.plugin("AMap.Geolocation",(()=>{new window.AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4}).getCurrentPosition(((e,o)=>{"complete"===e?t({coords:{latitude:o.position.lat,longitude:o.position.lng,accuracy:o.accuracy},skip:!0}):n(new Error(o.message))}))}))})):n(e)})))).then((({coords:t,skip:n})=>{QC(e,t,n).then((e=>{i({latitude:e.latitude,longitude:e.longitude,accuracy:e.accuracy,speed:e.altitude||0,altitude:e.altitude||0,verticalAccuracy:e.altitudeAccuracy||0,horizontalAccuracy:e.accuracy||0})})).catch((e=>{a(e.message)}))})).catch((e=>{a(e.message||JSON.stringify(e))}))}),0,nm);const aE=Jh({name:"LocationView",props:{latitude:{type:Number},longitude:{type:Number},scale:{type:Number,default:18},name:{type:String,default:""},address:{type:String,default:""}},emits:["close"],setup(e,{emit:t}){const n=function(e){const t=qn({center:{latitude:0,longitude:0},marker:{id:1,latitude:0,longitude:0,iconPath:$C,width:32,height:52},location:{id:2,latitude:0,longitude:0,iconPath:KC,width:44,height:44}});function n(){e.latitude&&e.longitude&&(t.center.latitude=e.latitude,t.center.longitude=e.longitude,t.marker.latitude=e.latitude,t.marker.longitude=e.longitude)}return Ri([()=>e.latitude,()=>e.longitude],n),n(),t}(e);function o(e){const t=e.detail.centerLocation;t&&(n.center.latitude=t.latitude,n.center.longitude=t.longitude)}function i(){const t=WC();let o="";if(t.type===zC.GOOGLE){o=`https://www.google.com/maps/dir/?api=1${n.location.latitude?`&origin=${n.location.latitude}%2C${n.location.longitude}`:""}&destination=${e.latitude}%2C${e.longitude}`}else if(t.type===zC.QQ){o=`https://apis.map.qq.com/uri/v1/routeplan?type=drive${n.location.latitude?`&fromcoord=${n.location.latitude}%2C${n.location.longitude}&from=${encodeURIComponent("我的位置")}`:""}&tocoord=${e.latitude}%2C${e.longitude}&to=${encodeURIComponent(e.name||"目的地")}&ref=${t.key}`}else if(t.type===zC.AMAP){o=`https://uri.amap.com/navigation?${n.location.latitude?`from=${n.location.longitude},${n.location.latitude},${encodeURIComponent("我的位置")}&`:""}to=${e.longitude},${e.latitude},${encodeURIComponent(e.name||"目的地")}`}window.open(o)}function a(){t("close")}function s({latitude:e,longitude:t}){n.center.latitude=e,n.center.longitude=t}return LS(),iE({type:"gcj02",success:({latitude:e,longitude:t})=>{n.location.latitude=e,n.location.longitude=t}}),()=>_r("div",{class:"uni-system-open-location"},[_r(Xk,{latitude:n.center.latitude,longitude:n.center.longitude,class:"map",markers:[n.marker,n.location],onRegionchange:o},{default:()=>[_r("div",{class:"map-move",onClick:()=>s(n.location)},[ch(jC,"#000000",24)],8,["onClick"])]},8,["latitude","longitude","markers","onRegionchange"]),_r("div",{class:"info"},[_r("div",{class:"name",onClick:()=>s(n.marker)},[e.name],8,["onClick"]),_r("div",{class:"address",onClick:()=>s(n.marker)},[e.address],8,["onClick"]),_r("div",{class:"nav",onClick:i},[ch("M28 17c-6.49396875 0-12.13721875 2.57040625-15 6.34840625V5.4105l6.29859375 6.29859375c0.387875 0.387875 1.02259375 0.387875 1.4105 0 0.387875-0.387875 0.387875-1.02259375 0-1.4105L12.77853125 2.36803125a0.9978125 0.9978125 0 0 0-0.0694375-0.077125c-0.1944375-0.1944375-0.45090625-0.291375-0.70721875-0.290875l-0.00184375-0.0000625-0.00184375 0.0000625c-0.2563125-0.0005-0.51278125 0.09640625-0.70721875 0.290875a0.9978125 0.9978125 0 0 0-0.0694375 0.077125l-7.930625 7.9305625c-0.387875 0.387875-0.387875 1.02259375 0 1.4105 0.387875 0.387875 1.02259375 0.387875 1.4105 0L11 5.4105V29c0 0.55 0.45 1 1 1s1-0.45 1-1c0-5.52284375 6.71571875-10 15-10 0.55228125 0 1-0.44771875 1-1 0-0.55228125-0.44771875-1-1-1z","#ffffff",26)],8,["onClick"])]),_r("div",{class:"nav-btn-back",onClick:a},[ch(ah,"#ffffff",26)],8,["onClick"])])}});let sE=null;const rE=og("openLocation",((e,{resolve:t})=>{sE?u(sE,e):(sE=qn(e),Uo((()=>{const e=CS(aE,sE,(()=>{sE=null,Uo((()=>{e.unmount()}))}));e.mount(TS("u-a-o"))}))),t()}),0,im);const cE=Jh({name:"LoctaionPicker",props:{latitude:{type:Number},longitude:{type:Number}},emits:["close"],setup(e,{emit:t}){LS(),gp();const{t:n}=op(),o=function(e){const t=qn({latitude:0,longitude:0,keyword:"",searching:!1});function n(){e.latitude&&e.longitude&&(t.latitude=e.latitude,t.longitude=e.longitude)}return Ri([()=>e.latitude,()=>e.longitude],n),n(),t}(e),{list:i,listState:a,loadMore:s,reset:r,getList:c}=function(e){const t=__uniConfig.qqMapKey,n=qn([]),o=oo(-1),i=Wr((()=>n[o.value])),a=qn({loading:!0,pageSize:20,pageIndex:1,hasNextPage:!0,nextPage:null,selectedIndex:o,selected:i}),s=oo(""),r=Wr((()=>s.value?`region(${s.value},1,${e.latitude},${e.longitude})`:`nearby(${e.latitude},${e.longitude},5000)`));function c(e){e.forEach((e=>{n.push({name:e.title||e.name,address:e.address,distance:e._distance||e.distance,latitude:e.location.lat,longitude:e.location.lng})}))}function u(){a.loading=!0;const o=WC();if(o.type===zC.GOOGLE){if(a.pageIndex>1&&a.nextPage)return void a.nextPage();new google.maps.places.PlacesService(document.createElement("div"))[e.searching?"textSearch":"nearbySearch"]({location:{lat:e.latitude,lng:e.longitude},query:e.keyword,radius:5e3},((e,t,o)=>{a.loading=!1,e&&e.length&&e.forEach((e=>{n.push({name:e.name||"",address:e.vicinity||e.formatted_address||"",distance:0,latitude:e.geometry.location.lat(),longitude:e.geometry.location.lng()})})),o&&(o.hasNextPage?a.nextPage=()=>{o.nextPage()}:a.hasNextPage=!1)}))}else o.type===zC.QQ?FC(e.searching?`https://apis.map.qq.com/ws/place/v1/search?output=jsonp&key=${t}&boundary=${r.value}&keyword=${e.keyword}&page_size=${a.pageSize}&page_index=${a.pageIndex}`:`https://apis.map.qq.com/ws/geocoder/v1/?output=jsonp&key=${t}&location=${e.latitude},${e.longitude}&get_poi=1&poi_options=page_size=${a.pageSize};page_index=${a.pageIndex}`,{callback:"callback"},(t=>{if(a.loading=!1,e.searching&&"data"in t&&t.data.length)c(t.data);else if("result"in t){const e=t.result;s.value=e.ad_info?e.ad_info.adcode:"",e.pois&&c(e.pois)}n.length===a.pageSize*a.pageIndex&&(a.hasNextPage=!1)}),(()=>{a.loading=!1})):o.type===zC.AMAP&&window.AMap.plugin("AMap.PlaceSearch",(function(){const t=new window.AMap.PlaceSearch({city:"全国",pageSize:10,pageIndex:a.pageIndex}),n=e.searching?e.keyword:"",o=e.searching?5e4:5e3;t.searchNearBy(n,[e.longitude,e.latitude],o,(function(e,t){"error"===e?console.error(t):"no_data"===e?a.hasNextPage=!1:c(t.poiList.pois)})),a.loading=!1}))}return{listState:a,list:n,loadMore:function(){!a.loading&&a.hasNextPage&&(a.pageIndex++,u())},reset:function(){a.selectedIndex=-1,a.pageIndex=1,a.hasNextPage=!0,a.nextPage=null,n.splice(0,n.length)},getList:u}}(o),l=ht((()=>{r(),o.keyword&&c()}),1e3,{setTimeout:setTimeout,clearTimeout:clearTimeout});function d(e){o.keyword=e.detail.value,l()}function p(){t("close",u({},a.selected))}function h(){t("close")}function f(e){const t=e.detail.centerLocation;t&&_(t)}function g(){iE({type:"gcj02",success:_,fail:()=>{}})}function _({latitude:e,longitude:t}){o.latitude=e,o.longitude=t,o.searching||(r(),c())}return Ri((()=>o.searching),(e=>{r(),e||c()})),o.latitude&&o.longitude||g(),()=>{const e=i.map(((e,t)=>{return _r("div",{key:t,class:{"list-item":!0,selected:a.selectedIndex===t},onClick:()=>{a.selectedIndex=t,o.latitude=e.latitude,o.longitude=e.longitude}},[ch(rh,"#007aff",24),_r("div",{class:"list-item-title"},[e.name]),_r("div",{class:"list-item-detail"},[(n=e.distance,n>100?`${n>1e3?(n/1e3).toFixed(1)+"k":n.toFixed(0)}m | `:n>0?"<100m | ":""),e.address])],10,["onClick"]);var n}));return a.loading&&e.unshift(_r("div",{class:"list-loading"},[_r("i",{class:"uni-loading"},null)])),_r("div",{class:"uni-system-choose-location"},[_r(Xk,{latitude:o.latitude,longitude:o.longitude,class:"map","show-location":!0,libraries:["places"],onUpdated:c,onRegionchange:f},{default:()=>[_r("div",{class:"map-location",style:`background-image: url("${$C}")`},null),_r("div",{class:"map-move",onClick:g},[ch(jC,"#000000",24)],8,["onClick"])],_:1},8,["latitude","longitude","show-location","onUpdated","onRegionchange"]),_r("div",{class:"nav"},[_r("div",{class:"nav-btn back",onClick:h},[ch(sh,"#ffffff",26)],8,["onClick"]),_r("div",{class:{"nav-btn":!0,confirm:!0,disable:!a.selected},onClick:p},[ch(rh,"#ffffff",26)],10,["onClick"])]),_r("div",{class:"menu"},[_r("div",{class:"search"},[_r(UI,{value:o.keyword,class:"search-input",placeholder:n("uni.chooseLocation.search"),onFocus:()=>o.searching=!0,onInput:d},null,8,["value","placeholder","onFocus","onInput"]),o.searching&&_r("div",{class:"search-btn",onClick:()=>{o.searching=!1,o.keyword=""}},[n("uni.chooseLocation.cancel")],8,["onClick"])]),_r(GM,{"scroll-y":!0,class:"list",onScrolltolower:s},(t=e,"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!ur(t)?e:{default:()=>[e],_:2}),8,["scroll-y","onScrolltolower"])])]);var t}}});let uE=null;const lE=og("chooseLocation",((e,{resolve:t,reject:n})=>{uE?n("cancel"):(uE=qn(e),Uo((()=>{const e=CS(cE,uE,(o=>{uE=null,Uo((()=>{e.unmount()})),o?t(o):n("cancel")}));e.mount(TS("u-a-c"))})))}));let dE=!1,pE=0;const hE=og("startLocationUpdate",((e,{resolve:t,reject:n})=>{navigator.geolocation?(pE=pE||navigator.geolocation.watchPosition((n=>{dE=!0,QC(null==e?void 0:e.type,n.coords).then((e=>{lL.invokeOnCallback(Mm,e),t()})).catch((e=>{lL.invokeOnCallback(Cm,{errMsg:`onLocationChange:fail ${e.message}`})}))}),(e=>{dE||(n(e.message),dE=!0),lL.invokeOnCallback(Cm,{errMsg:`onLocationChange:fail ${e.message}`})})),setTimeout(t,100)):n()}),0,Sm),fE=og("stopLocationUpdate",((e,{resolve:t})=>{pE&&(navigator.geolocation.clearWatch(pE),dE=!1,pE=0),t()})),gE=Qf(Mm,(()=>{})),_E=eg("offLocationChange",(()=>{})),mE=Qf(Cm,(()=>{})),vE=eg("offLocationChangeError",(()=>{})),yE=og("navigateBack",((e,{resolve:t,reject:n})=>{let o=!0;return!0===vh(Te,{from:e.from||"navigateBack"})&&(o=!1),o?(CC().$router.go(-e.delta),t()):n(Te)}),0,Nm),IE=og(Dm,(({url:e,events:t,isAutomatedTesting:n},{resolve:o,reject:i})=>{if(Bv.handledBeforeEntryPageRoutes)return kv({type:Dm,url:e,events:t,isAutomatedTesting:n}).then(o).catch(i);Hv.push({args:{type:Dm,url:e,events:t,isAutomatedTesting:n},resolve:o,reject:i})}),0,Rm),ME=og(Am,(({url:e},{resolve:t,reject:n})=>{const o=Sh(e.split("?")[0]);o?o.loader&&o.loader().then((()=>{t({url:e,errMsg:"preloadPage:ok"})})).catch((t=>{n(`${e} ${String(t)}`)})):n(`${e}}`)}));function CE(e){__uniConfig.darkmode&&lL.on(fe,e)}function TE(e){lL.off(fe,e)}function SE(e){let t={};return __uniConfig.darkmode&&(t=St(e,__uniConfig.themeConfig,gT())),__uniConfig.darkmode?t:e}function EE(e,t){const n=Kn(e),o=n?qn(SE(e)):SE(e);return __uniConfig.darkmode&&n&&Ri(e,(e=>{const t=SE(e);for(const n in t)o[n]=t[n]})),t&&CE(t),o}const DE={light:{cancelColor:"#000000"},dark:{cancelColor:"rgb(170, 170, 170)"}},kE=Xi({props:{title:{type:String,default:""},content:{type:String,default:""},showCancel:{type:Boolean,default:!0},cancelText:{type:String,default:"Cancel"},cancelColor:{type:String,default:"#000000"},confirmText:{type:String,default:"OK"},confirmColor:{type:String,default:"#007aff"},visible:{type:Boolean},editable:{type:Boolean,default:!1},placeholderText:{type:String,default:""}},setup(e,{emit:t}){const n=oo(""),o=()=>s.value=!1,i=()=>(o(),t("close","cancel")),a=()=>(o(),t("close","confirm",n.value)),s=SS(e,{onEsc:i,onEnter:()=>{!e.editable&&a()}}),r=function(e){const t=oo(e.cancelColor),n=({theme:e})=>{((e,t)=>{t.value=DE[e].cancelColor})(e,t)};return ki((()=>{e.visible?(t.value=e.cancelColor,"#000"===e.cancelColor&&("dark"===gT()&&n({theme:"dark"}),CE(n))):TE(n)})),t}(e);return()=>{const{title:t,content:o,showCancel:c,confirmText:u,confirmColor:l,editable:d,placeholderText:p}=e;return n.value=o,_r(gc,{name:"uni-fade"},{default:()=>[Gi(_r("uni-modal",{onTouchmove:$p},[MS,_r("div",{class:"uni-modal"},[t?_r("div",{class:"uni-modal__hd"},[_r("strong",{class:"uni-modal__title",textContent:t||""},null,8,["textContent"])]):null,d?_r("textarea",{class:"uni-modal__textarea",rows:"1",placeholder:p,value:o,onInput:e=>n.value=e.target.value},null,40,["placeholder","value","onInput"]):_r("div",{class:"uni-modal__bd",onTouchmovePassive:zp,textContent:o},null,40,["onTouchmovePassive","textContent"]),_r("div",{class:"uni-modal__ft"},[c&&_r("div",{style:{color:r.value},class:"uni-modal__btn uni-modal__btn_default",onClick:i},[e.cancelText],12,["onClick"]),_r("div",{style:{color:l},class:"uni-modal__btn uni-modal__btn_primary",onClick:a},[u],12,["onClick"])])])],40,["onTouchmove"]),[[wc,s.value]])]})}}});let LE;const bE=je((()=>{lL.on("onHidePopup",(()=>LE.visible=!1))}));let AE;function RE(e,t){const n="confirm"===e,o={confirm:n,cancel:"cancel"===e};n&&LE.editable&&(o.content=t),AE&&AE(o)}const OE=og("showModal",((e,{resolve:t})=>{bE(),AE=t,LE?(u(LE,e),LE.visible=!0):(LE=qn(e),Uo((()=>(CS(kE,LE,RE).mount(TS("u-a-m")),Uo((()=>LE.visible=!0))))))}),0,Ym),wE={title:{type:String,default:""},icon:{default:"success",validator:e=>-1!==Xm.indexOf(e)},image:{type:String,default:""},duration:{type:Number,default:1500},mask:{type:Boolean,default:!1},visible:{type:Boolean}},PE="uni-toast__icon",NE={light:"#fff",dark:"rgba(255,255,255,0.9)"},GE=e=>NE[e],UE=Xi({name:"Toast",props:wE,setup(e){rp(),cp();const{Icon:t}=function(e){const t=oo(GE(gT())),n=({theme:e})=>t.value=GE(e);ki((()=>{e.visible?CE(n):TE(n)}));const o=Wr((()=>{switch(e.icon){case"success":return _r(ch(oh,t.value,38),{class:PE});case"error":return _r(ch(ih,t.value,38),{class:PE});case"loading":return _r("i",{class:[PE,"uni-loading"]},null,2);default:return null}}));return{Icon:o}}(e),n=SS(e,{});return()=>{const{mask:o,duration:i,title:a,image:s}=e;return _r(gc,{name:"uni-fade"},{default:()=>[Gi(_r("uni-toast",{"data-duration":i},[o?_r("div",{class:"uni-mask",style:"background: transparent;",onTouchmove:$p},null,40,["onTouchmove"]):"",s||t.value?_r("div",{class:"uni-toast"},[s?_r("img",{src:s,class:PE},null,10,["src"]):t.value,_r("p",{class:"uni-toast__content"},[a])]):_r("div",{class:"uni-sample-toast"},[_r("p",{class:"uni-simple-toast__text"},[a])])],8,["data-duration"]),[[wc,n.value]])]})}}});let xE,FE,qE="";const VE=Lt();function BE(e){xE?u(xE,e):(xE=qn(u(e,{visible:!1})),Uo((()=>{VE.run((()=>{Ri([()=>xE.visible,()=>xE.duration],(([e,t])=>{if(e){if(FE&&clearTimeout(FE),"onShowLoading"===qE)return;FE=setTimeout((()=>{WE("onHideToast")}),t)}else FE&&clearTimeout(FE)}))})),lL.on("onHidePopup",(()=>WE("onHidePopup"))),CS(UE,xE,(()=>{})).mount(TS("u-a-t"))}))),setTimeout((()=>{xE.visible=!0}),10)}const HE=og("showToast",((e,{resolve:t,reject:n})=>{BE(e),qE="onShowToast",t()}),0,Jm),jE={icon:"loading",duration:1e8,image:""},KE=og("showLoading",((e,{resolve:t,reject:n})=>{u(e,jE),BE(e),qE="onShowLoading",t()}),0,Wm),$E=og("hideToast",((e,{resolve:t,reject:n})=>{WE("onHideToast"),t()})),zE=og("hideLoading",((e,{resolve:t,reject:n})=>{WE("onHideLoading"),t()}));function WE(e){const{t:t}=op();if(!qE)return;let n="";if("onHideToast"===e&&"onShowToast"!==qE?n=t("uni.showToast.unpaired"):"onHideLoading"===e&&"onShowLoading"!==qE&&(n=t("uni.showLoading.unpaired")),n)return console.warn(n);qE="",setTimeout((()=>{xE.visible=!1}),10)}function YE(e){const t=oo(0),n=oo(0),o=Wr((()=>t.value>=500&&n.value>=500)),i=Wr((()=>{const t={content:{transform:"",left:"",top:"",bottom:""},triangle:{left:"",top:"",bottom:"","border-width":"","border-color":""}},i=t.content,a=t.triangle,s=e.popover;function r(e){return Number(e)||0}if(o.value&&s){u(a,{position:"absolute",width:"0",height:"0","margin-left":"-6px","border-style":"solid"});const e=r(s.left),t=r(s.width),o=r(s.top),c=r(s.height),l=e+t/2;i.transform="none !important";const d=Math.max(0,l-150);i.left=`${d}px`;let p=Math.max(12,l-d);p=Math.min(288,p),a.left=`${p}px`;const h=n.value/2;o+c-h>h-o?(i.top="auto",i.bottom=n.value-o+6+"px",a.bottom="-6px",a["border-width"]="6px 6px 0 6px",a["border-color"]="#fcfcfd transparent transparent transparent"):(i.top=`${o+c+6}px`,a.top="-6px",a["border-width"]="0 6px 6px 6px",a["border-color"]="transparent transparent #fcfcfd transparent")}return t}));return va((()=>{const e=()=>{const{windowWidth:e,windowHeight:o,windowTop:i}=uni.getSystemInfoSync();t.value=e,n.value=o+(i||0)};window.addEventListener("resize",e),e(),Ca((()=>{window.removeEventListener("resize",e)}))})),{isDesktop:o,popupStyle:i}}const XE={light:{listItemColor:"#000000",cancelItemColor:"#000000"},dark:{listItemColor:"rgba(255, 255, 255, 0.8)",cancelItemColor:"rgba(255, 255, 255)"}};const JE=Xi({name:"ActionSheet",props:{title:{type:String,default:""},itemList:{type:Array,default:()=>[]},itemColor:{type:String,default:"#000000"},popover:{type:Object,default:null},visible:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:t}){sp();const n=oo(260),o=oo(0),i=oo(0),a=oo(0),s=oo(0),r=oo(null),c=oo(null),{t:u}=op(),{_close:l}=function(e,t){function n(e){t("close",e)}const{key:o,disable:i}=IS();return Ri((()=>e.visible),(e=>i.value=!e)),ki((()=>{const{value:e}=o;"esc"===e&&n&&n(-1)})),{_close:n}}(e,t),{popupStyle:d}=YE(e);let p;function h(e){const t=a.value+e.deltaY;Math.abs(t)>10?(s.value+=t/3,s.value=s.value>=o.value?o.value:s.value<=0?0:s.value,p.scrollTo(s.value)):a.value=t,e.preventDefault()}va((()=>{const{scroller:e,handleTouchStart:t,handleTouchMove:n,handleTouchEnd:o}=IM(r.value,{enableY:!0,friction:new fM(1e-4),spring:new mM(2,90,20),onScroll:e=>{s.value=e.target.scrollTop}});p=e,zI(r.value,(i=>{if(e)switch(i.detail.state){case"start":t(i);break;case"move":n(i);break;case"end":case"cancel":o(i)}}),!0)})),Ri((()=>e.visible),(()=>{Uo((()=>{e.title&&(i.value=document.querySelector(".uni-actionsheet__title").offsetHeight),p.update(),r.value&&(o.value=r.value.clientHeight-n.value),document.querySelectorAll(".uni-actionsheet__cell").forEach((e=>{!function(e){const t=20;let n=0,o=0;e.addEventListener("touchstart",(e=>{const t=e.changedTouches[0];n=t.clientX,o=t.clientY})),e.addEventListener("touchend",(e=>{const i=e.changedTouches[0];if(Math.abs(i.clientX-n)<t&&Math.abs(i.clientY-o)<t){const t=e.target,n=e.currentTarget,o=new CustomEvent("click",{bubbles:!0,cancelable:!0,target:t,currentTarget:n});["screenX","screenY","clientX","clientY","pageX","pageY"].forEach((e=>{o[e]=i[e]})),e.target.dispatchEvent(o)}}))}(e)}))}))}));const f=function(e){const t=qn({listItemColor:"#000",cancelItemColor:"#000"}),n=({theme:e})=>{!function(e,t){["listItemColor","cancelItemColor"].forEach((n=>{t[n]=XE[e][n]}))}(e,t)};return ki((()=>{e.visible?(t.listItemColor=t.cancelItemColor=e.itemColor,"#000"===e.itemColor&&(n({theme:gT()}),CE(n))):TE(n)})),t}(e);return()=>_r("uni-actionsheet",{onTouchmove:$p},[_r(gc,{name:"uni-fade"},{default:()=>[Gi(_r("div",{class:"uni-mask uni-actionsheet__mask",onClick:()=>l(-1)},null,8,["onClick"]),[[wc,e.visible]])]}),_r("div",{class:["uni-actionsheet",{"uni-actionsheet_toggle":e.visible}],style:d.value.content},[_r("div",{ref:c,class:"uni-actionsheet__menu",onWheel:h},[e.title?_r(Xs,null,[_r("div",{class:"uni-actionsheet__cell",style:{height:`${i.value}px`}},null),_r("div",{class:"uni-actionsheet__title"},[e.title])]):"",_r("div",{style:{maxHeight:`${n.value}px`,overflow:"hidden"}},[_r("div",{ref:r},[e.itemList.map(((e,t)=>_r("div",{key:t,style:{color:f.listItemColor},class:"uni-actionsheet__cell",onClick:()=>l(t)},[e],12,["onClick"])))],512)])],40,["onWheel"]),_r("div",{class:"uni-actionsheet__action"},[_r("div",{style:{color:f.cancelItemColor},class:"uni-actionsheet__cell",onClick:()=>l(-1)},[u("uni.showActionSheet.cancel")],12,["onClick"])]),_r("div",{style:d.value.triangle},null,4)],6)],40,["onTouchmove"])}});let ZE,QE,eD;const tD=je((()=>{lL.on("onHidePopup",(()=>eD.visible=!1))}));function nD(e){-1===e?QE&&QE("cancel"):ZE&&ZE({tapIndex:e})}const oD=og("showActionSheet",((e,{resolve:t,reject:n})=>{tD(),ZE=t,QE=n,eD?(u(eD,e),eD.visible=!0):(eD=qn(e),Uo((()=>(CS(JE,eD,nD).mount(TS("u-s-a-s")),Uo((()=>eD.visible=!0))))))}),0,zm),iD=og("loadFontFace",(({family:e,source:t,desc:n},{resolve:o,reject:i})=>{(function(e,t,n){const o=document.fonts;if(o){const i=new FontFace(e,t,n);return i.load().then((()=>{o.add&&o.add(i)}))}return new Promise((o=>{const i=document.createElement("style"),a=[];if(n){const{style:e,weight:t,stretch:o,unicodeRange:i,variant:s,featureSettings:r}=n;e&&a.push(`font-style:${e}`),t&&a.push(`font-weight:${t}`),o&&a.push(`font-stretch:${o}`),i&&a.push(`unicode-range:${i}`),s&&a.push(`font-variant:${s}`),r&&a.push(`font-feature-settings:${r}`)}i.innerText=`@font-face{font-family:"${e}";src:${t};${a.join(";")}}`,document.head.appendChild(i),o()}))})(e,t=t.startsWith('url("')||t.startsWith("url('")?`url('${dy(t.substring(5,t.length-2))}')`:t.startsWith("url(")?`url('${dy(t.substring(4,t.length-1))}')`:dy(t),n).then((()=>{o()})).catch((e=>{i(`loadFontFace:fail ${e}`)}))}));function aD(e){function t(){var t;t=e.navigationBar.titleText,document.title=t,lL.emit("onNavigationBarChange",{titleText:t})}ki(t),sa(t)}function sD(e,t,n,o,i){if(!e)return i("page not found");const{navigationBar:a}=e;switch(t){case Vm:const{frontColor:e,backgroundColor:t,animation:o}=n,{duration:i,timingFunc:s}=o;e&&(a.titleColor="#000000"===e?"#000000":"#ffffff"),t&&(a.backgroundColor=t),a.duration=i+"ms",a.timingFunc=s;break;case jm:a.loading=!0;break;case Km:a.loading=!1;break;case Hm:const{title:r}=n;a.titleText=r}o()}const rD=og(Vm,((e,{resolve:t,reject:n})=>{sD(ph(),Vm,e,t,n)}),0,Bm),cD=og(jm,((e,{resolve:t,reject:n})=>{sD(ph(),jm,e||{},t,n)})),uD=og(Km,((e,{resolve:t,reject:n})=>{sD(ph(),Km,e||{},t,n)})),lD=og(Hm,((e,{resolve:t,reject:n})=>{sD(ph(),Hm,e,t,n)})),dD=og("pageScrollTo",(({scrollTop:e,selector:t,duration:n},{resolve:o})=>{!function(e,t){if(v(e)){const t=document.querySelector(e);if(t){const{top:n}=t.getBoundingClientRect();e=n+window.pageYOffset;const o=document.querySelector("uni-page-head");o&&(e-=o.offsetHeight)}}e<0&&(e=0);const n=document.documentElement,{clientHeight:o,scrollHeight:i}=n;if(e=Math.min(e,i-o),0===t)return void(n.scrollTop=document.body.scrollTop=e);if(window.scrollY===e)return;const a=t=>{if(t<=0)return void window.scrollTo(0,e);const n=e-window.scrollY;requestAnimationFrame((function(){window.scrollTo(0,window.scrollY+n/t*10),a(t-10)}))};a(t)}(t||e||0,n),o()}),0,$m),pD=og(Zm,((e,{resolve:t})=>{lL.invokeViewMethod(Zm,{},hh()),t()})),hD=og(Qm,((e,{resolve:t})=>{lL.invokeViewMethod(Qm,{},hh()),t()})),fD=["text","iconPath","iconfont","selectedIconPath","visible"],gD=["color","selectedColor","backgroundColor","borderStyle","borderColor","midButton"],_D=["badge","redDot"];function mD(e,t,n){t.forEach((function(t){p(n,t)&&(e[t]=n[t])}))}function vD(e,t,n,o){var i;let a=!1;const s=Yv();if(s.length&&Vv(s[s.length-1]).meta.isTabBar&&(a=!0),!a)return o("not TabBar page");const{index:r}=t;if("number"==typeof r){const e=null==(i=null==__uniConfig?void 0:__uniConfig.tabBar)?void 0:i.list.length;if(!e||r>=e)return o("tabbar item not found")}const c=bv();switch(e){case rv:c.shown=!0;break;case sv:c.shown=!1;break;case tv:const e=c.list[r],n=e.pagePath;mD(e,fD,t);const{pagePath:o}=t;if(o){const e=Ve(o);e!==n&&function(e,t,n){const o=Sh(Ve(t));if(o){const{meta:e}=o;delete e.tabBarIndex,e.isQuit=e.isTabBar=!1}const i=Sh(Ve(n));if(i){const{meta:t}=i;t.tabBarIndex=e,t.isQuit=t.isTabBar=!0;const o=__uniConfig.tabBar;o&&o.list&&o.list[e]&&(o.list[e].pagePath=Be(n))}}(r,n,e)}break;case ov:mD(c,gD,t);break;case lv:mD(c.list[r],_D,{badge:"",redDot:!0});break;case fv:mD(c.list[r],_D,{badge:t.text,redDot:!0});break;case cv:case pv:mD(c.list[r],_D,{badge:"",redDot:!1})}n()}const yD=og(tv,((e,{resolve:t,reject:n})=>{vD(tv,e,t,n)}),0,nv),ID=og(ov,((e,{resolve:t,reject:n})=>{vD(ov,e,t,n)}),0,av),MD=og(sv,((e,{resolve:t,reject:n})=>{vD(sv,e||{},t,n)})),CD=og(rv,((e,{resolve:t,reject:n})=>{vD(rv,e||{},t,n)})),TD=og(cv,((e,{resolve:t,reject:n})=>{vD(cv,e,t,n)}),0,uv),SD=og(lv,((e,{resolve:t,reject:n})=>{vD(lv,e,t,n)}),0,dv),ED=og(pv,((e,{resolve:t,reject:n})=>{vD(pv,e,t,n)}),0,hv),DD=og(fv,((e,{resolve:t,reject:n})=>{vD(fv,e,t,n)}),0,gv),kD=Jh({name:"TabBar",setup(){const e=oo([]),t=bv(),n=EE(t,(()=>{const e=SE(t);n.backgroundColor=e.backgroundColor,n.borderStyle=e.borderStyle,n.color=e.color,n.selectedColor=e.selectedColor,n.blurEffect=e.blurEffect,n.midButton=e.midButton,e.list&&e.list.length&&e.list.forEach(((e,t)=>{n.list[t].iconPath=e.iconPath,n.list[t].selectedIconPath=e.selectedIconPath}))}));!function(e,t){function n(){let n=[];n=e.list.filter((e=>!1!==e.visible)),t.value=n}oo(u({type:"midButton"},e.midButton)),ki(n)}(n,e),function(e){Ri((()=>e.shown),(t=>{Zp({"--window-bottom":xv(t?parseInt(e.height):0)})}))}(n);const o=function(e,t,n){return ki((()=>{const o=e.meta;if(o.isTabBar){const e=o.route,i=n.value.findIndex((t=>t.pagePath===e));t.selectedIndex=i}})),(t,n)=>()=>{const{pagePath:o,text:i}=t;let a=Ve(o);a===__uniRoutes[0].alias&&(a="/"),e.path!==a?uni.switchTab({from:"tabBar",url:a,tabBarText:i}):vh("onTabItemTap",{index:n,text:i,pagePath:o})}}(Nd(),n,e),{style:i,borderStyle:a,placeholderStyle:s}=function(e){const t=Wr((()=>{let t=e.backgroundColor;const n=e.blurEffect;return t||Pv&&n&&"none"!==n&&(t=RD[n]),{backgroundColor:t||LD,backdropFilter:"none"!==n?"blur(10px)":n}})),n=Wr((()=>{const{borderStyle:t,borderColor:n}=e;return n&&v(n)?{backgroundColor:n}:{backgroundColor:OD[t]||OD.black}})),o=Wr((()=>({height:e.height})));return{style:t,borderStyle:n,placeholderStyle:o}}(n);return va((()=>{n.iconfontSrc&&iD({family:"UniTabbarIconFont",source:`url("${n.iconfontSrc}")`})})),()=>{const t=function(e,t,n){const{selectedIndex:o,selectedColor:i,color:a}=e;return n.value.map(((n,s)=>{const r=o===s;return function(e,t,n,o,i,a,s,r){return _r("div",{key:s,class:"uni-tabbar__item",onClick:r(i,s)},[wD(e,t||"",n,o,i,a)],8,["onClick"])}(r?i:a,r&&n.selectedIconPath||n.iconPath||"",n.iconfont?r&&n.iconfont.selectedText||n.iconfont.text:void 0,n.iconfont?r&&n.iconfont.selectedColor||n.iconfont.color:void 0,n,e,s,t)}))}(n,o,e);return _r("uni-tabbar",{class:"uni-tabbar-"+n.position},[_r("div",{class:"uni-tabbar",style:i.value},[_r("div",{class:"uni-tabbar-border",style:a.value},null,4),t],4),_r("div",{class:"uni-placeholder",style:s.value},null,4)],2)}}});const LD="#f7f7fa",bD="rgb(0, 0, 0, 0.8)",AD="rgb(250, 250, 250, 0.8)",RD={dark:bD,light:AD,extralight:AD},OD={white:"rgba(255, 255, 255, 0.33)",black:"rgba(0, 0, 0, 0.33)"};function wD(e,t,n,o,i,a){const{height:s}=a;return _r("div",{class:"uni-tabbar__bd",style:{height:s}},[n?ND(n,o||bD,i,a):t&&PD(t,i,a),i.text&&GD(e,i,a),i.redDot&&UD(i.badge)],4)}function PD(e,t,n){const{type:o,text:i}=t,{iconWidth:a}=n;return _r("div",{class:"uni-tabbar__icon"+(i?" uni-tabbar__icon__diff":""),style:{width:a,height:a}},["midButton"!==o&&_r("img",{src:dy(e)},null,8,["src"])],6)}function ND(e,t,n,o){var i;const{type:a,text:s}=n,{iconWidth:r}=o,c="uni-tabbar__icon"+(s?" uni-tabbar__icon__diff":""),u={width:r,height:r},l={fontSize:(null==(i=n.iconfont)?void 0:i.fontSize)||r,color:t};return _r("div",{class:c,style:u},["midButton"!==a&&_r("div",{class:"uni-tabbar__iconfont",style:l},[e],4)],6)}function GD(e,t,n){const{iconPath:o,text:i}=t,{fontSize:a,spacing:s}=n;return _r("div",{class:"uni-tabbar__label",style:{color:e,fontSize:a,lineHeight:o?"normal":1.8,marginTop:o?s:"inherit"}},[i],4)}function UD(e){return _r("div",{class:"uni-tabbar__reddot"+(e?" uni-tabbar__badge":"")},[e],2)}const xD="0px";let FD;function qD(){return FD}const VD=Jh({name:"Layout",setup(e,{emit:t}){const n=oo(null);Jp({"--status-bar-height":xD,"--top-window-height":xD,"--window-left":xD,"--window-right":xD,"--window-margin":xD,"--tab-bar-height":xD});const o=function(){const e=Nd();return{routeKey:Wr((()=>ey("/"+e.meta.route,mf()))),isTabBar:Wr((()=>e.meta.isTabBar)),routeCache:ny}}(),{layoutState:i,windowState:a}=function(){_f();{const e=qn({marginWidth:0,leftWindowWidth:0,rightWindowWidth:0});return Ri((()=>e.marginWidth),(e=>Jp({"--window-margin":e+"px"}))),Ri((()=>e.leftWindowWidth+e.marginWidth),(e=>{Jp({"--window-left":e+"px"})})),Ri((()=>e.rightWindowWidth+e.marginWidth),(e=>{Jp({"--window-right":e+"px"})})),{layoutState:e,windowState:Wr((()=>({})))}}}();!function(e,t){const n=_f();function o(){const o=document.body.clientWidth,i=Yv();let a={};if(i.length>0){a=Vv(i[i.length-1]).meta}else{const e=Sh(n.path,!0);e&&(a=e.meta)}const s=parseInt(String((p(a,"maxWidth")?a.maxWidth:__uniConfig.globalStyle.maxWidth)||Number.MAX_SAFE_INTEGER));let r=!1;r=o>s,r&&s?(e.marginWidth=(o-s)/2,Uo((()=>{const e=t.value;e&&e.setAttribute("style","max-width:"+s+"px;margin:0 auto;")}))):(e.marginWidth=0,Uo((()=>{const e=t.value;e&&e.removeAttribute("style")})))}Ri([()=>n.path],o),va((()=>{o(),window.addEventListener("resize",o)}))}(i,n);const s=function(){const e=_f(),t=bv(),n=Wr((()=>e.meta.isTabBar&&t.shown));return Jp({"--tab-bar-height":t.height}),n}(),r=function(e){const t=oo(!1);return Wr((()=>({"uni-app--showtabbar":e&&e.value,"uni-app--maxwidth":t.value})))}(s);return FD=i,()=>{const e=function(e){const t=function({routeKey:e,isTabBar:t,routeCache:n}){return _r(wd,null,{default:ii((({Component:o})=>[(nr(),cr(oa,{matchBy:"key",cache:n},[(nr(),cr(hi(o),{type:t.value?"tabBar":"",key:e.value}))],1032,["cache"]))])),_:1})}(e);return t}(o),t=function(e){return Gi(_r(kD,null,null,512),[[wc,e.value]])}(s);return _r("uni-app",{ref:n,class:r.value},[e,t],2)}}});const BD=og("showTopWindow",((e,{resolve:t,reject:n})=>{const o=qD();o?(o.apiShowTopWindow=!0,Uo(t)):n()})),HD=og("hideTopWindow",((e,{resolve:t,reject:n})=>{const o=qD();o?(o.apiShowTopWindow=!1,Uo(t)):n()})),jD=og("showLeftWindow",((e,{resolve:t,reject:n})=>{const o=qD();o?(o.apiShowLeftWindow=!0,Uo(t)):n()})),KD=og("hideLeftWindow",((e,{resolve:t,reject:n})=>{const o=qD();o?(o.apiShowLeftWindow=!1,Uo(t)):n()})),$D=og("showRightWindow",((e,{resolve:t,reject:n})=>{const o=qD();o?(o.apiShowRightWindow=!0,Uo(t)):n()})),zD=og("hideRightWindow",((e,{resolve:t,reject:n})=>{const o=qD();o?(o.apiShowRightWindow=!1,Uo(t)):n()})),WD=ng(0,(()=>{const e=qD();return u({},e&&e.topWindowStyle)})),YD=ng(0,(e=>{const t=qD();t&&(t.topWindowStyle=e)})),XD=ng(0,(()=>{const e=qD();return u({},e&&e.leftWindowStyle)})),JD=ng(0,(e=>{const t=qD();t&&(t.leftWindowStyle=e)})),ZD=ng(0,(()=>{const e=qD();return u({},e&&e.rightWindowStyle)})),QD=ng(0,(e=>{const t=qD();t&&(t.rightWindowStyle=e)})),ek=ng(0,(e=>{const t=document.querySelector("uni-page-body");return t?t.querySelector(`#${e}`):null})),tk=og(pm,rg(pm)),nk="getRecorderManager",ok=ng(0,ag(nk)),ik=og(hm,rg(hm)),ak="createCameraContext",sk=ng(0,ag(ak)),rk="createLivePlayerContext",ck=ng(0,ag(rk)),uk="saveFile",lk=og(uk,rg(uk)),dk="getSavedFileList",pk=og(dk,rg(dk)),hk="getSavedFileInfo",fk=og(hk,rg(hk)),gk="removeSavedFile",_k=og(gk,rg(gk)),mk="onMemoryWarning",vk=Qf(mk,sg(mk)),yk="onGyroscopeChange",Ik=Qf(yk,sg(yk)),Mk="startGyroscope",Ck=og(Mk,rg(Mk)),Tk="stopGyroscope",Sk=og(Tk,rg(Tk)),Ek="scanCode",Dk=og(Ek,rg(Ek)),kk="setScreenBrightness",Lk=og(kk,rg(kk)),bk="getScreenBrightness",Ak=og(bk,rg(bk)),Rk="setKeepScreenOn",Ok=og(Rk,rg(Rk)),wk="onUserCaptureScreen",Pk=Qf(wk,sg(wk)),Nk="addPhoneContact",Gk=og(Nk,rg(Nk)),Uk="login",xk=og(Uk,rg(Uk)),Fk="getProvider",qk=og(Fk,rg(Fk)),Vk=Object.defineProperty({__proto__:null,$emit:kg,$off:Dg,$on:Sg,$once:Eg,addInterceptor:Mg,addPhoneContact:Gk,arrayBufferToBase64:ug,base64ToArrayBuffer:cg,canIUse:Gv,canvasGetImageData:e_,canvasPutImageData:t_,canvasToTempFilePath:n_,chooseFile:gS,chooseImage:mS,chooseLocation:lE,chooseVideo:xS,clearStorage:iS,clearStorageSync:oS,closePreviewImage:GS,closeSocket:ZS,connectSocket:YS,createAnimation:E_,createCameraContext:sk,createCanvasContext:Qg,createInnerAudioContext:uT,createIntersectionObserver:l_,createLivePlayerContext:ck,createMapContext:wg,createMediaQueryObserver:h_,createSelectorQuery:I_,createVideoContext:Ag,cssBackdropFilter:Pv,cssConstant:wv,cssEnv:Ov,cssVar:Rv,downloadFile:HS,getAppBaseInfo:CT,getClipboardData:KT,getDeviceInfo:MT,getElementById:ek,getEnterOptionsSync:F_,getFileInfo:rS,getImageInfo:lS,getLaunchOptionsSync:q_,getLeftWindowStyle:XD,getLocale:A_,getLocation:iE,getNetworkType:AT,getProvider:qk,getPushClientId:z_,getRecorderManager:ok,getRightWindowStyle:ZD,getSavedFileInfo:fk,getSavedFileList:pk,getScreenBrightness:Ak,getSelectedTextRange:N_,getStorage:eS,getStorageInfo:sS,getStorageInfoSync:aS,getStorageSync:QT,getSystemInfo:ST,getSystemInfoSync:TT,getTabBarPageId:Mv,getTopWindowStyle:WD,getVideoInfo:dS,getWindowInfo:mT,hideActionSheet:()=>{eD&&(eD.visible=!1)},hideKeyboard:uS,hideLeftWindow:KD,hideLoading:zE,hideModal:()=>{LE&&(LE.visible=!1)},hideNavigationBarLoading:uD,hideRightWindow:zD,hideTabBar:MD,hideTabBarRedDot:TD,hideToast:$E,hideTopWindow:HD,interceptors:{},invokePushCallback:function(e){if("enabled"===e.type)H_=!0;else if("clientId"===e.type)V_=e.cid,B_=e.errMsg,$_(V_,e.errMsg);else if("pushMsg"===e.type){const t={type:"receive",data:j_(e.message)};for(let e=0;e<W_.length;e++){if((0,W_[e])(t),t.stopped)break}}else"click"===e.type&&W_.forEach((t=>{t({type:"click",data:j_(e.message)})}))},loadFontFace:iD,login:xk,makePhoneCall:lT,navigateBack:yE,navigateTo:IE,offAccelerometerChange:wT,offAppHide:function(e){x_(pe,e)},offAppShow:function(e){x_(de,e)},offCompassChange:xT,offError:function(e){x_(he,e)},offLocationChange:_E,offLocationChangeError:vE,offNetworkStatusChange:bT,offPageNotFound:function(e){x_(ge,e)},offPushMessage:e=>{if(e){const t=W_.indexOf(e);t>-1&&W_.splice(t,1)}else W_.length=0},offThemeChange:YT,offUnhandledRejection:function(e){x_(_e,e)},offWindowResize:L_,onAccelerometerChange:OT,onAppHide:function(e){U_(pe,e)},onAppShow:function(e){U_(de,e)},onCompassChange:UT,onCreateVueApp:function(e){if(mt)return e(mt);vt.push(e)},onError:function(e){U_(he,e)},onGyroscopeChange:Ik,onLocaleChange:R_,onLocationChange:gE,onLocationChangeError:mE,onMemoryWarning:vk,onNetworkStatusChange:LT,onPageNotFound:function(e){U_(ge,e)},onPushMessage:e=>{-1===W_.indexOf(e)&&W_.push(e)},onSocketClose:oE,onSocketError:tE,onSocketMessage:nE,onSocketOpen:eE,onTabBarMidButtonTap:D_,onThemeChange:WT,onUnhandledRejection:function(e){U_(_e,e)},onUserCaptureScreen:Pk,onWindowResize:k_,openDocument:cS,openLocation:rE,pageScrollTo:dD,preloadPage:ME,previewImage:NS,reLaunch:Dv,redirectTo:Sv,removeAllPages:Ev,removeInterceptor:Cg,removeLastPage:Tv,removeNonTabBarPages:yv,removeSavedFile:_k,removeStorage:nS,removeStorageSync:tS,removeTabBarBadge:ED,request:FS,rpx2px:vg,saveFile:lk,saveImageToPhotosAlbum:tk,saveVideoToPhotosAlbum:ik,scanCode:Dk,sendSocketMessage:JS,setClipboardData:$T,setKeepScreenOn:Ok,setLeftWindowStyle:JD,setLocale:O_,setNavigationBarColor:rD,setNavigationBarTitle:lD,setPageMeta:w_,setRightWindowStyle:QD,setScreenBrightness:Lk,setStorage:JT,setStorageSync:XT,setTabBarBadge:DD,setTabBarItem:yD,setTabBarStyle:ID,setTopWindowStyle:YD,showActionSheet:oD,showLeftWindow:jD,showLoading:KE,showModal:OE,showNavigationBarLoading:cD,showRightWindow:$D,showTabBar:CD,showTabBarRedDot:SD,showToast:HE,showTopWindow:BD,startAccelerometer:PT,startCompass:FT,startGyroscope:Ck,startLocationUpdate:hE,startPullDownRefresh:pD,stopAccelerometer:NT,stopCompass:qT,stopGyroscope:Sk,stopLocationUpdate:fE,stopPullDownRefresh:hD,switchTab:Cv,uploadFile:KS,upx2px:vg,vibrateLong:HT,vibrateShort:BT},Symbol.toStringTag,{value:"Module"}),Bk="MAP_LOCATION",Hk=Jh({name:"MapLocation",setup(){const e=qn({latitude:0,longitude:0,rotate:0});{let t=function(t){e.rotate=t.direction},n=function(){iE({type:"gcj02",success:t=>{e.latitude=t.latitude,e.longitude=t.longitude},complete:()=>{a=setTimeout(n,3e4)}})},o=function(){a&&clearTimeout(a),xT(t)};const i=gs("onMapReady");let a;UT(t),i(n),Ca(o);const s=gs("addMapChidlContext"),r=gs("removeMapChidlContext"),c={id:Bk,state:e};s(c),Ca((()=>r(c)))}return()=>e.latitude?_r(eT,Er({anchor:{x:.5,y:.5},width:"44",height:"44",iconPath:KC},e),null,16,["iconPath"]):null}}),jk=Jh({name:"MapPolygon",props:{dashArray:{type:Array,default:()=>[0,0]},points:{type:Array,required:!0},strokeWidth:{type:Number,default:1},strokeColor:{type:String,default:"#000000"},fillColor:{type:String,default:"#00000000"},zIndex:{type:Number,default:0}},setup(e){let t;return gs("onMapReady")(((n,o,i)=>{function a(){const{points:i,strokeWidth:a,strokeColor:s,dashArray:r,fillColor:c,zIndex:u}=e,l=i.map((e=>{const{latitude:t,longitude:n}=e;return JC()?[n,t]:ZC()?new o.Point(n,t):new o.LatLng(t,n)})),{r:d,g:p,b:h,a:f}=tT(c),{r:g,g:_,b:m,a:v}=tT(s),y={clickable:!0,cursor:"crosshair",editable:!1,map:n,fillColor:"",path:l,strokeColor:"",strokeDashStyle:r.some((e=>e>0))?"dash":"solid",strokeWeight:a,visible:!0,zIndex:u};o.Color?(y.fillColor=new o.Color(d,p,h,f),y.strokeColor=new o.Color(g,_,m,v)):(y.fillColor=`rgb(${d}, ${p}, ${h})`,y.fillOpacity=f,y.strokeColor=`rgb(${g}, ${_}, ${m})`,y.strokeOpacity=v),t?t.setOptions(y):ZC()?(t=new o.Polygon(y.path,y),n.addOverlay(t)):t=new o.Polygon(y)}a(),Ri(e,a)})),Ca((()=>{t.setMap(null)})),()=>null}});function Kk(e){const t=[];return h(e)&&e.forEach((e=>{e&&e.latitude&&e.longitude&&t.push({latitude:e.latitude,longitude:e.longitude})})),t}function $k(e,t,n){return ZC()?function(e,t,n){return new e.Point(n,t)}(e,t,n):JC()?function(e,t,n){return new e.LngLat(n,t)}(e,t,n):function(e,t,n){return new e.LatLng(t,n)}(e,t,n)}function zk(e){return"getLat"in e?e.getLat():ZC()?e.lat:e.lat()}function Wk(e){return"getLng"in e?e.getLng():ZC()?e.lng:e.lng()}function Yk(e,t,n){const o=Qh(t,n),i=oo(null);let a,s;const r=qn({latitude:Number(e.latitude),longitude:Number(e.longitude),includePoints:Kk(e.includePoints)}),c=[];let l,d;function p(e){l?e(s,a,o):c.push(e)}const h=[];function f(e){d?e():c.push(e)}const g={};function _(){const e=s.getCenter();return{scale:s.getZoom(),centerLocation:{latitude:zk(e),longitude:Wk(e)}}}function m(){if(JC()){const e=[];r.includePoints.forEach((t=>{e.push([t.longitude,t.latitude])}));const t=new a.Bounds(...e);s.setBounds(t)}else if(ZC());else{const e=new a.LatLngBounds;r.includePoints.forEach((({latitude:t,longitude:n})=>{const o=new a.LatLng(t,n);e.extend(o)})),s.fitBounds(e)}}function v(){const t=i.value,c=$k(a,r.latitude,r.longitude),l=a.event||a.Event,p=new a.Map(t,{center:c,zoom:Number(e.scale),disableDoubleClickZoom:!0,mapTypeControl:!1,zoomControl:!1,scaleControl:!1,panControl:!1,fullscreenControl:!1,streetViewControl:!1,keyboardShortcuts:!1,minZoom:5,maxZoom:18,draggable:!0});if(ZC()&&(p.centerAndZoom(c,Number(e.scale)),p.enableScrollWheelZoom(),p._printLog&&p._printLog("uniapp")),Ri((()=>e.scale),(e=>{p.setZoom(Number(e)||16)})),f((()=>{r.includePoints.length&&(m(),function(){const e=$k(a,r.latitude,r.longitude);s.setCenter(e)}())})),ZC())p.addEventListener("click",(()=>{o("tap",{},{}),o("click",{},{})})),p.addEventListener("dragstart",(()=>{o("regionchange",{},{type:"begin",causedBy:"gesture"})})),p.addEventListener("dragend",(()=>{o("regionchange",{},u({type:"end",causedBy:"drag"},_()))}));else{const e=l.addListener(p,"bounds_changed",(()=>{e.remove(),d=!0,h.forEach((e=>e())),h.length=0}));l.addListener(p,"click",(()=>{o("tap",{},{}),o("click",{},{})})),l.addListener(p,"dragstart",(()=>{o("regionchange",{},{type:"begin",causedBy:"gesture"})})),l.addListener(p,"dragend",(()=>{o("regionchange",{},u({type:"end",causedBy:"drag"},_()))}));const t=()=>{n("update:scale",p.getZoom()),o("regionchange",{},u({type:"end",causedBy:"scale"},_()))};l.addListener(p,"zoom_changed",t),l.addListener(p,"zoomend",t),l.addListener(p,"center_changed",(()=>{const e=p.getCenter(),t=zk(e),o=Wk(e);n("update:latitude",t),n("update:longitude",o)}))}return p}Ri([()=>e.latitude,()=>e.longitude],(([e,t])=>{const n=Number(e),o=Number(t);if((n!==r.latitude||o!==r.longitude)&&(r.latitude=n,r.longitude=o,s)){const e=$k(a,r.latitude,r.longitude);s.setCenter(e)}})),Ri((()=>e.includePoints),(e=>{r.includePoints=Kk(e),d&&m()}),{deep:!0});try{QM(((e,t={})=>{switch(e){case"getCenterLocation":p((()=>{const n=s.getCenter();ze(t,{latitude:zk(n),longitude:Wk(n),errMsg:`${e}:ok`})}));break;case"moveToLocation":{let n=Number(t.latitude),o=Number(t.longitude);if(!n||!o){const e=g[Bk];e&&(n=e.state.latitude,o=e.state.longitude)}if(n&&o){if(r.latitude=n,r.longitude=o,s){const e=$k(a,n,o);s.setCenter(e)}p((()=>{ze(t,`${e}:ok`)}))}else ze(t,`${e}:fail`)}break;case"translateMarker":p((()=>{const n=g[t.markerId];if(n){try{n.translate(t)}catch(o){ze(t,`${e}:fail ${o.message}`)}ze(t,`${e}:ok`)}else ze(t,`${e}:fail not found`)}));break;case"includePoints":r.includePoints=Kk(t.includePoints),(d||JC())&&m(),f((()=>{ze(t,`${e}:ok`)}));break;case"getRegion":f((()=>{const n=s.getBounds(),o=n.getSouthWest(),i=n.getNorthEast();ze(t,{southwest:{latitude:zk(o),longitude:Wk(o)},northeast:{latitude:zk(i),longitude:Wk(i)},errMsg:`${e}:ok`})}));break;case"getScale":p((()=>{ze(t,{scale:s.getZoom(),errMsg:`${e}:ok`})}))}}),tC(),!0)}catch(y){}return va((()=>{BC(e.libraries,(e=>{a=e,s=v(),l=!0,c.forEach((e=>e(s,a,o))),c.length=0,o("updated",{},{})}))})),fs("onMapReady",p),fs("addMapChidlContext",(function(e){g[e.id]=e})),fs("removeMapChidlContext",(function(e){delete g[e.id]})),{state:r,mapRef:i,trigger:o}}const Xk=Xh({name:"Map",props:{id:{type:String,default:""},latitude:{type:[String,Number],default:0},longitude:{type:[String,Number],default:0},scale:{type:[String,Number],default:16},markers:{type:Array,default:()=>[]},includePoints:{type:Array,default:()=>[]},polyline:{type:Array,default:()=>[]},circles:{type:Array,default:()=>[]},controls:{type:Array,default:()=>[]},showLocation:{type:[Boolean,String],default:!1},libraries:{type:Array,default:()=>[]},polygons:{type:Array,default:()=>[]}},emits:["markertap","labeltap","callouttap","controltap","regionchange","tap","click","updated","update:scale","update:latitude","update:longitude"],setup(e,{emit:t,slots:n}){const o=oo(null),{mapRef:i,trigger:a}=Yk(e,o,t);return()=>_r("uni-map",{ref:o,id:e.id},[_r("div",{ref:i,style:"width: 100%; height: 100%; position: relative; overflow: hidden"},null,512),e.markers.map((e=>_r(eT,Er({key:e.id},e),null,16))),e.polyline.map((e=>_r(oT,e,null,16))),e.circles.map((e=>_r(iT,e,null,16))),e.controls.map((e=>_r(sT,Er(e,{trigger:a}),null,16,["trigger"]))),e.showLocation&&_r(Hk,null,null),e.polygons.map((e=>_r(jk,e,null,16))),_r("div",{style:"position: absolute;top: 0;width: 100%;height: 100%;overflow: hidden;pointer-events: none;"},[n.default&&n.default()])],8,["id"])}});function Jk(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!ur(e)}function Zk(e){if(e.mode===tL.TIME)return"00:00";if(e.mode===tL.DATE){const t=(new Date).getFullYear()-150;switch(e.fields){case nL.YEAR:return t.toString();case nL.MONTH:return t+"-01";default:return t+"-01-01"}}return""}function Qk(e){if(e.mode===tL.TIME)return"23:59";if(e.mode===tL.DATE){const t=(new Date).getFullYear()+150;switch(e.fields){case nL.YEAR:return t.toString();case nL.MONTH:return t+"-12";default:return t+"-12-31"}}return""}function eL(e,t,n,o){const i=e.mode===tL.DATE?"-":":",a=e.mode===tL.DATE?t.dateArray:t.timeArray;let s;if(e.mode===tL.TIME)s=2;else switch(e.fields){case nL.YEAR:s=1;break;case nL.MONTH:s=2;break;default:s=3}const r=String(n).split(i);let c=[];for(let u=0;u<s;u++){const e=r[u];c.push(a[u].indexOf(e))}return c.indexOf(-1)>=0&&(c=o?eL(e,t,o):c.map((()=>0))),c}const tL={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},nL={YEAR:"year",MONTH:"month",DAY:"day"},oL={PICKER:"picker",SELECT:"select"},iL=Xh({name:"Picker",compatConfig:{MODE:3},props:{name:{type:String,default:""},range:{type:Array,default:()=>[]},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:tL.SELECTOR,validator:e=>Object.values(tL).includes(e)},fields:{type:String,default:""},start:{type:String,default:e=>Zk(e)},end:{type:String,default:e=>Qk(e)},disabled:{type:[Boolean,String],default:!1},selectorType:{type:String,default:""}},emits:["change","cancel","columnchange"],setup(e,{emit:t,slots:n}){hp();const{t:o}=op(),i=oo(null),a=oo(null),s=oo(null),r=oo(null),c=oo(!1),{state:u,rangeArray:l}=function(e){const t=qn({valueSync:void 0,visible:!1,contentVisible:!1,popover:null,valueChangeSource:"",timeArray:[],dateArray:[],valueArray:[],oldValueArray:[],isDesktop:!1,popupStyle:{content:{},triangle:{}}}),n=Wr((()=>{let n=e.range;switch(e.mode){case tL.SELECTOR:return[n];case tL.MULTISELECTOR:return n;case tL.TIME:return t.timeArray;case tL.DATE:{const n=t.dateArray;switch(e.fields){case nL.YEAR:return[n[0]];case nL.MONTH:return[n[0],n[1]];default:return[n[0],n[1],n[2]]}}}return[]}));return{state:t,rangeArray:n}}(e),d=Qh(i,t),{system:p,selectorTypeComputed:f,_show:g,_l10nColumn:_,_l10nItem:m,_input:v,_fixInputPosition:y,_pickerViewChange:I,_cancel:M,_change:C,_resetFormData:T,_getFormData:S,_createTime:E,_createDate:D,_setValueSync:k}=function(e,t,n,o,i,a,s){const r=function(){const e=oo(!1);return e.value=aL(),e}(),c=function(){const e=oo("");return e.value=sL(),e}(),u=Wr((()=>{const t=e.selectorType;return Object.values(oL).includes(t)?t:r.value?oL.PICKER:oL.SELECT})),l=Wr((()=>e.mode===tL.DATE&&!Object.values(nL).includes(e.fields)&&t.isDesktop?c.value:"")),d=Wr((()=>eL(e,t,e.start,Zk(e)))),p=Wr((()=>eL(e,t,e.end,Qk(e))));function f(n){if(e.disabled)return;t.valueChangeSource="";let o=i.value,a=n.currentTarget;o.remove(),(document.querySelector("uni-app")||document.body).appendChild(o),o.style.display="block";const s=a.getBoundingClientRect();t.popover={top:s.top,left:s.left,width:s.width,height:s.height},setTimeout((()=>{t.visible=!0}),20)}function g(){return{value:t.valueSync,key:e.name}}function _(){switch(e.mode){case tL.SELECTOR:t.valueSync=0;break;case tL.MULTISELECTOR:t.valueSync=e.value.map((e=>0));break;case tL.DATE:case tL.TIME:t.valueSync=""}}function m(){let e=[],n=[];for(let t=0;t<24;t++)e.push((t<10?"0":"")+t);for(let t=0;t<60;t++)n.push((t<10?"0":"")+t);t.timeArray.push(e,n)}function v(){let t=(new Date).getFullYear(),n=t-150,o=t+150;if(e.start){const t=new Date(e.start).getFullYear();!isNaN(t)&&t<n&&(n=t)}if(e.end){const t=new Date(e.end).getFullYear();!isNaN(t)&&t>o&&(o=t)}return{start:n,end:o}}function y(){let e=[];const n=v();for(let t=n.start,a=n.end;t<=a;t++)e.push(String(t));let o=[];for(let t=1;t<=12;t++)o.push((t<10?"0":"")+t);let i=[];for(let t=1;t<=31;t++)i.push((t<10?"0":"")+t);t.dateArray.push(e,o,i)}function I(e){return 60*e[0]+e[1]}function M(e){const t=31;return e[0]*t*12+(e[1]||0)*t+(e[2]||0)}function C(e,t){for(let n=0;n<e.length&&n<t.length;n++)e[n]=t[n]}function T(){let n=e.value;switch(e.mode){case tL.MULTISELECTOR:{h(n)||(n=t.valueArray),h(t.valueSync)||(t.valueSync=[]);const o=t.valueSync.length=Math.max(n.length,e.range.length);for(let i=0;i<o;i++){const o=Number(n[i]),a=Number(t.valueSync[i]),s=isNaN(o)?isNaN(a)?0:a:o,r=e.range[i]?e.range[i].length-1:0;t.valueSync.splice(i,1,s<0||s>r?0:s)}}break;case tL.TIME:case tL.DATE:t.valueSync=String(n);break;default:{const e=Number(n);t.valueSync=e<0?0:e;break}}}function S(){let n,o=t.valueSync;switch(e.mode){case tL.MULTISELECTOR:n=[...o];break;case tL.TIME:n=eL(e,t,o,$e({mode:tL.TIME}));break;case tL.DATE:n=eL(e,t,o,$e({mode:tL.DATE}));break;default:n=[o]}t.oldValueArray=[...n],t.valueArray=[...n]}function E(){let n=t.valueArray;switch(e.mode){case tL.SELECTOR:return n[0];case tL.MULTISELECTOR:return n.map((e=>e));case tL.TIME:return t.valueArray.map(((e,n)=>t.timeArray[n][e])).join(":");case tL.DATE:return t.valueArray.map(((e,n)=>t.dateArray[n][e])).join("-")}}function D(){L(),t.valueChangeSource="click";const e=E();t.valueSync=h(e)?e.map((e=>e)):e,n("change",{},{value:e})}function k(e){if("firefox"===l.value&&e){const{top:n,left:o,width:i,height:a}=t.popover,{pageX:s,pageY:r}=e;if(s>o&&s<o+i&&r>n&&r<n+a)return}L(),n("cancel",{},{})}function L(){t.visible=!1,setTimeout((()=>{let e=i.value;e.remove(),o.value.prepend(e),e.style.display="none"}),260)}function b(){e.mode===tL.SELECTOR&&u.value===oL.SELECT&&(a.value.scrollTop=34*t.valueArray[0])}function A(e){const n=e.target;t.valueSync=n.value,Uo((()=>{D()}))}function R(e){if("chrome"===l.value){const t=o.value.getBoundingClientRect(),n=32;s.value.style.left=e.clientX-t.left-1.5*n+"px",s.value.style.top=e.clientY-t.top-.5*n+"px"}}function O(e){t.valueArray=w(e.detail.value,!0)}function w(t,n){const{getLocale:o}=op();if(e.mode===tL.DATE){const i=o();if(!i.startsWith("zh"))switch(e.fields){case nL.YEAR:return t;case nL.MONTH:return[t[1],t[0]];default:switch(i){case"es":case"fr":return[t[2],t[1],t[0]];default:return n?[t[2],t[0],t[1]]:[t[1],t[2],t[0]]}}}return t}function P(t,n){const{getLocale:o}=op();if(e.mode===tL.DATE){const i=o();if(i.startsWith("zh")){return t+["年","月","日"][n]}if(e.fields!==nL.YEAR&&n===(e.fields===nL.MONTH||"es"!==i&&"fr"!==i?0:1)){let e;switch(i){case"es":e=["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"];break;case"fr":e=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"];break;default:e=["January","February","March","April","May","June","July","August","September","October","November","December"]}return e[Number(t)-1]}}return t}return Ri((()=>t.visible),(e=>{e?(clearTimeout(rL),t.contentVisible=e,b()):rL=setTimeout((()=>{t.contentVisible=e}),300)})),Ri([()=>e.mode,()=>e.value,()=>e.range],T,{deep:!0}),Ri((()=>t.valueSync),S,{deep:!0}),Ri((()=>t.valueArray),(o=>{if(e.mode===tL.TIME||e.mode===tL.DATE){const n=e.mode===tL.TIME?I:M,o=t.valueArray,i=d.value,a=p.value;if(e.mode===tL.DATE){const e=t.dateArray,n=e[2].length,i=Number(e[2][o[2]])||1,a=new Date(`${e[0][o[0]]}/${e[1][o[1]]}/${i}`).getDate();a<i&&(o[2]-=a+n-i)}n(o)<n(i)?C(o,i):n(o)>n(a)&&C(o,a)}o.forEach(((o,i)=>{o!==t.oldValueArray[i]&&(t.oldValueArray[i]=o,e.mode===tL.MULTISELECTOR&&n("columnchange",{},{column:i,value:o}))}))})),{selectorTypeComputed:u,system:l,_show:f,_cancel:k,_change:D,_l10nColumn:w,_l10nItem:P,_input:A,_resetFormData:_,_getFormData:g,_createTime:m,_createDate:y,_setValueSync:T,_fixInputPosition:R,_pickerViewChange:O}}(e,u,d,i,a,s,r);!function(e,t,n){const{key:o,disable:i}=IS();ki((()=>{i.value=!e.visible})),Ri(o,(e=>{"esc"===e?t():"enter"===e&&n()}))}(u,M,C),function(e,t){const n=gs(of,!1);if(n){const o={reset:e,submit:()=>{const e=["",null],{key:n,value:o}=t();return""!==n&&(e[0]=n,e[1]=o),e}};n.addField(o),Ma((()=>{n.removeField(o)}))}}(T,S),E(),D(),k();const L=YE(u);return ki((()=>{u.isDesktop=L.isDesktop.value,u.popupStyle=L.popupStyle.value})),Ma((()=>{a.value&&a.value.remove()})),va((()=>{c.value=!0})),()=>{let t;const{visible:d,contentVisible:h,valueArray:T,popupStyle:S,valueSync:E}=u,{rangeKey:D,mode:k,start:L,end:b}=e,A=nf(e,"disabled");return _r("uni-picker",Er({ref:i},A,{onClick:Zh(g)}),[c.value?_r("div",{ref:a,class:["uni-picker-container",`uni-${k}-${f.value}`],onWheel:$p,onTouchmove:$p},[_r(gc,{name:"uni-fade"},{default:()=>[Gi(_r("div",{class:"uni-mask uni-picker-mask",onClick:Zh(M),onMousemove:y},null,40,["onClick","onMousemove"]),[[wc,d]])]}),p.value?null:_r("div",{class:[{"uni-picker-toggle":d},"uni-picker-custom"],style:S.content},[_r("div",{class:"uni-picker-header",onClick:zp},[_r("div",{class:"uni-picker-action uni-picker-action-cancel",onClick:Zh(M)},[o("uni.picker.cancel")],8,["onClick"]),_r("div",{class:"uni-picker-action uni-picker-action-confirm",onClick:C},[o("uni.picker.done")],8,["onClick"])],8,["onClick"]),h?_r(hM,{value:_(T),class:"uni-picker-content",onChange:I},Jk(t=ka(_(l.value),((e,t)=>{let n;return _r(MM,{key:t},Jk(n=ka(e,((e,n)=>_r("div",{key:n,class:"uni-picker-item"},["object"==typeof e?e[D]||"":m(e,t)]))))?n:{default:()=>[n],_:1})})))?t:{default:()=>[t],_:1},8,["value","onChange"]):null,_r("div",{ref:s,class:"uni-picker-select",onWheel:zp,onTouchmove:zp},[ka(l.value[0],((e,t)=>_r("div",{key:t,class:["uni-picker-item",{selected:T[0]===t}],onClick:()=>{T[0]=t,C()}},["object"==typeof e?e[D]||"":e],10,["onClick"])))],40,["onWheel","onTouchmove"]),_r("div",{style:S.triangle},null,4)],6)],40,["onWheel","onTouchmove"]):null,_r("div",null,[n.default&&n.default()]),p.value?_r("div",{class:"uni-picker-system",onMousemove:Zh(y)},[_r("input",{class:["uni-picker-system_input",p.value],ref:r,value:E,type:k,tabindex:"-1",min:L,max:b,onChange:e=>{v(e),zp(e)}},null,42,["value","type","min","max","onChange"])],40,["onMousemove"]):null],16,["onClick"])}}});const aL=()=>0===String(navigator.vendor).indexOf("Apple")&&navigator.maxTouchPoints>0;const sL=()=>{if(/win|mac/i.test(navigator.platform)){if("Google Inc."===navigator.vendor)return"chrome";if(/Firefox/.test(navigator.userAgent))return"firefox"}return""};let rL;const cL=u(Sp,{publishHandler(e,t,n){lL.subscribeHandler(e,t,n)}}),uL=Vk,lL=u(Uh,{publishHandler(e,t,n){cL.subscribeHandler(e,t,n)}}),dL=Jh({name:"PageHead",setup(){const e=oo(null),t=ff(),n=EE(t.navigationBar,(()=>{const e=SE(t.navigationBar);n.backgroundColor=e.backgroundColor,n.titleColor=e.titleColor})),{clazz:o,style:i}=function(e){const t=Wr((()=>{const{type:t,titlePenetrate:n,shadowColorType:o}=e,i={"uni-page-head":!0,"uni-page-head-transparent":"transparent"===t,"uni-page-head-titlePenetrate":"YES"===n,"uni-page-head-shadow":!!o};return o&&(i[`uni-page-head-shadow-${o}`]=!0),i})),n=Wr((()=>({backgroundColor:e.backgroundColor,color:e.titleColor,transitionDuration:e.duration,transitionTimingFunction:e.timingFunc})));return{clazz:t,style:n}}(n);return()=>{const a=function(e,t){if(!t)return _r("div",{class:"uni-page-head-btn",onClick:hL},[ch(ah,"transparent"===e.type?"#fff":e.titleColor,26)],8,["onClick"])}(n,t.isQuit),s=n.type||"default",r="transparent"!==s&&"float"!==s&&_r("div",{class:{"uni-placeholder":!0,"uni-placeholder-titlePenetrate":n.titlePenetrate}},null,2);return _r("uni-page-head",{"uni-page-head-type":s},[_r("div",{ref:e,class:o.value,style:i.value},[_r("div",{class:"uni-page-head-hd"},[a]),pL(n),_r("div",{class:"uni-page-head-ft"},[])],6),r],8,["uni-page-head-type"])}}});function pL(e,t){return function({type:e,loading:t,titleSize:n,titleText:o,titleImage:i}){return _r("div",{class:"uni-page-head-bd"},[_r("div",{style:{fontSize:n,opacity:"transparent"===e?0:1},class:"uni-page-head__title"},[t?_r("i",{class:"uni-loading"},null):i?_r("img",{src:i,class:"uni-page-head__title_image"},null,8,["src"]):o],4)])}(e)}function hL(){1===Wv().length?uni.reLaunch({url:"/"}):uni.navigateBack({from:"backbutton",success(){}})}const fL={name:"PageRefresh",setup(){const{pullToRefresh:e}=ff();return{offset:e.offset,color:e.color}}},gL=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},_L={class:"uni-page-refresh-inner"},mL=["fill"],vL=[gr("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1),gr("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1)],yL={class:"uni-page-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},IL=["stroke"];const ML=gL(fL,[["render",function(e,t,n,o,i,a){return nr(),rr("uni-page-refresh",null,[gr("div",{style:Qe({"margin-top":o.offset+"px"}),class:"uni-page-refresh"},[gr("div",_L,[(nr(),rr("svg",{fill:o.color,class:"uni-page-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},vL,8,mL)),(nr(),rr("svg",yL,[gr("circle",{stroke:o.color,class:"uni-page-refresh__path",cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"},null,8,IL)]))])],4)])}]]);function CL(e,t,n){const o=Array.prototype.slice.call(e.changedTouches).filter((e=>e.identifier===t))[0];return!!o&&(e.deltaY=o.pageY-n,!0)}const TL="pulling",SL="reached",EL="aborting",DL="refreshing",kL="restoring";function LL(e){const t=ff(),{id:n,pullToRefresh:o}=t,{range:i,height:a}=o;let s,r,c,u,l,d,p,h;QM((()=>{t.enablePullDownRefresh&&(h||(h=DL,m(),setTimeout((()=>{C()}),50)))}),Zm,!1,n),QM((()=>{t.enablePullDownRefresh&&h===DL&&(v(),h=kL,m(),function(e){if(!r)return;c.transition="-webkit-transform 0.3s",c.transform+=" scale(0.01)";const t=function(){n&&clearTimeout(n),r.removeEventListener("webkitTransitionEnd",t),c.transition="",c.transform="translate3d(-50%, 0, 0)",e()};r.addEventListener("webkitTransitionEnd",t);const n=setTimeout(t,350)}((()=>{v(),h=f=g=null})))}),Qm,!1,n),va((()=>{s=e.value.$el,r=s.querySelector(".uni-page-refresh"),c=r.style,u=r.querySelector(".uni-page-refresh-inner").style}));let f=null,g=null;function _(e){h&&s&&s.classList[e]("uni-page-refresh--"+h)}function m(){_("add")}function v(){_("remove")}const y=Zh((e=>{if(!t.enablePullDownRefresh)return;const n=e.changedTouches[0];l=n.identifier,d=n.pageY,p=!([EL,DL,kL].indexOf(h)>=0)})),I=Zh((e=>{if(!t.enablePullDownRefresh)return;if(!p)return;if(!CL(e,l,d))return;let{deltaY:n}=e;if(0!==(document.documentElement.scrollTop||document.body.scrollTop))return void(l=null);if(n<0&&!h)return;e.cancelable&&e.preventDefault(),null===f&&(g=n,h=TL,m()),n-=g,n<0&&(n=0),f=n;(n>=i&&h!==SL||n<i&&h!==TL)&&(v(),h=h===SL?TL:SL,m()),function(e){if(!r)return;let t=e/i;t>1?t=1:t*=t*t;const n=Math.round(e/(i/a))||0;u.transform="rotate("+360*t+"deg)",c.clip="rect("+(45-n)+"px,45px,45px,-5px)",c.transform="translate3d(-50%, "+n+"px, 0)"}(n)})),M=Zh((e=>{t.enablePullDownRefresh&&CL(e,l,d)&&null!==h&&(h===TL?(v(),h=EL,m(),function(e){if(!r)return;if(c.transform){c.transition="-webkit-transform 0.3s",c.transform="translate3d(-50%, 0, 0)";const t=function(){n&&clearTimeout(n),r.removeEventListener("webkitTransitionEnd",t),c.transition="",e()};r.addEventListener("webkitTransitionEnd",t);const n=setTimeout(t,350)}else e()}((()=>{v(),h=f=g=null}))):h===SL&&(v(),h=DL,m(),C()))}));function C(){r&&(c.transition="-webkit-transform 0.2s",c.transform="translate3d(-50%, "+a+"px, 0)",vh(n,ke))}return{onTouchstartPassive:y,onTouchmove:I,onTouchend:M,onTouchcancel:M}}const bL=Jh({name:"PageBody",setup(e,t){const n=ff(),o=oo(null),i=n.enablePullDownRefresh?LL(o):null,a=oo(null);return Ri((()=>n.enablePullDownRefresh),(()=>{a.value=n.enablePullDownRefresh?i:null}),{immediate:!0}),()=>{const e=function(e,t){if(!t.enablePullDownRefresh)return null;return _r(ML,{ref:e},null,512)}(o,n);return _r(Xs,null,[e,_r("uni-page-wrapper",a.value,[_r("uni-page-body",null,[ba(t.slots,"default")])],16)])}}});const AL=Jh({name:"Page",setup(e,t){const n=gf(mf()),o=n.navigationBar,i={};return aD(n),()=>_r("uni-page",{"data-page":n.route,style:i},"custom"!==o.style?[_r(dL),RL(t),null]:[RL(t),null])}});function RL(e){return nr(),cr(bL,{key:0},{default:ii((()=>[ba(e.slots,"page")])),_:3})}const OL={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0};window.getApp=CC,window.getCurrentPages=Wv,window.wx=uL,window.uni=uL,window.UniViewJSBridge=cL,window.UniServiceJSBridge=lL,window.rpx2px=vg,window.__setupPage=e=>DC(e);const wL=Object.assign({}),PL=Object.assign;window.__uniConfig=PL({tabBar:{position:"bottom",color:"#999",selectedColor:"#007aff",borderStyle:"black",blurEffect:"none",fontSize:"10px",iconWidth:"24px",spacing:"3px",height:"50px",list:[{text:"视频",pagePath:"pages/index/index"},{text:"商城",pagePath:"pages/shop/shop"},{text:"消息",pagePath:"pages/news/news"},{text:"个人中心",pagePath:"pages/mine/mine"},{text:"我的",pagePath:"pages/mine/homepage"}],selectedIndex:0,shown:!0},globalStyle:{backgroundColor:"#F8F8F8",bounce:"none",navigationBar:{backgroundColor:"#F8F8F8",titleText:"九亿",type:"default",titleColor:"#000000"},isNVue:!1},condition:{current:0,list:[{name:"test",path:"pages/shop/shop"}]},uniIdRouter:{},compilerVersion:"4.36"},{appId:"__UNI__08B31BC",appName:"九亿",appVersion:"1.0.0",appVersionCode:"100",async:OL,debug:!1,networkTimeout:{request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},sdkConfigs:{},qqMapKey:void 0,bMapKey:void 0,googleMapKey:void 0,aMapKey:void 0,aMapSecurityJsCode:void 0,aMapServiceHost:void 0,nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:Object.keys(wL).reduce(((e,t)=>{const n=t.replace(/\.\/locale\/(uni-app.)?(.*).json/,"$2");return PL(e[n]||(e[n]={}),wL[t].default),e}),{}),router:{mode:"hash",base:"/",assets:"assets",routerBase:"/"},darkmode:!1,themeConfig:{}}),window.__uniLayout=window.__uniLayout||{};const NL={delay:OL.delay,timeout:OL.timeout,suspensible:OL.suspensible};OL.loading&&(NL.loadingComponent={name:"SystemAsyncLoading",render:()=>_r(di(OL.loading))}),OL.error&&(NL.errorComponent={name:"SystemAsyncError",render:()=>_r(di(OL.error))});const GL=()=>t((()=>import("./pages-index-index.C6Ww_Cv2.js")),__vite__mapDeps([0,1])).then((e=>DC(e.default||e))),UL=Zi(PL({loader:GL},NL)),xL=()=>t((()=>import("./pages-news-ce.B142IuVm.js")),__vite__mapDeps([2,1])).then((e=>DC(e.default||e))),FL=Zi(PL({loader:xL},NL)),qL=()=>t((()=>import("./pages-login-open.BcLA5cWK.js")),__vite__mapDeps([3,4,1,5,6,7])).then((e=>DC(e.default||e))),VL=Zi(PL({loader:qL},NL)),BL=()=>t((()=>import("./pages-login-loginPhone.vO14hF_Z.js")),__vite__mapDeps([8,9,1,10,11,6,12,7,13,14])).then((e=>DC(e.default||e))),HL=Zi(PL({loader:BL},NL)),jL=()=>t((()=>import("./pages-shop-shop.CcE0rPeU.js")),__vite__mapDeps([15,11,1,6,12,16,17,18,19,20,21,22,23,24,25,26,27])).then((e=>DC(e.default||e))),KL=Zi(PL({loader:jL},NL)),$L=()=>t((()=>import("./pages-merchant-business-operator-index.D0yW5FN3.js")),__vite__mapDeps([28,12,29,11,1,6,30,25,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,17,18,19,52,53])).then((e=>DC(e.default||e))),zL=Zi(PL({loader:$L},NL)),WL=()=>t((()=>import("./pages-merchant-order-index.Bc5jt8HU.js")),__vite__mapDeps([54,47,11,1,6,12,48,29,30,25,55,27,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,49,50,51,17,18,19,52,53,56])).then((e=>DC(e.default||e))),YL=Zi(PL({loader:WL},NL)),XL=()=>t((()=>import("./pages-merchant-commodity-release-index.NhbGbX_Q.js")),__vite__mapDeps([57,58,59,1,60,12,49,50,47,11,6,48,61,62,30,63,51,17,18,19,52,64,65])).then((e=>DC(e.default||e))),JL=Zi(PL({loader:XL},NL)),ZL=()=>t((()=>import("./pages-merchant-specifications-index.D74vgTvy.js")),__vite__mapDeps([66,29,11,1,6,12,30,25,58,59,60,49,50,47,48,64,62,63,67])).then((e=>DC(e.default||e))),QL=Zi(PL({loader:ZL},NL)),eb=()=>t((()=>import("./pages-shop-search-index.Mmpfewjr.js")),__vite__mapDeps([68,69,59,11,1,6,12,70,29,30,25,71,72,26])).then((e=>DC(e.default||e))),tb=Zi(PL({loader:eb},NL)),nb=()=>t((()=>import("./pages-shop-commodity-index.CMMdznsS.js")),__vite__mapDeps([73,11,1,6,12,74,75,17,18,19,30,76,77,21,22,23,44,45,46,78,52])).then((e=>DC(e.default||e))),ob=Zi(PL({loader:nb},NL)),ib=()=>t((()=>import("./pages-shop-continue-pay-index.UK_r7bqu.js")),__vite__mapDeps([79,11,1,6,12,47,48,34,35,80,44,45,46,81,33,41,38,39])).then((e=>DC(e.default||e))),ab=Zi(PL({loader:ib},NL)),sb=()=>t((()=>import("./pages-shop-store-index.GgkZdMud.js")),__vite__mapDeps([82,74,11,1,6,12,75,17,18,19,69,59,70,80,30,29,25,83])).then((e=>DC(e.default||e))),rb=Zi(PL({loader:sb},NL)),cb=()=>t((()=>import("./pages-shop-order-index.Y6Q9tmg5.js")),__vite__mapDeps([84,11,1,6,12,85,76,77,86,55,27,87])).then((e=>DC(e.default||e))),ub=Zi(PL({loader:cb},NL)),lb=()=>t((()=>import("./pages-shop-sales-index.BoRH9ljo.js")),__vite__mapDeps([88,11,1,6,12,32,33,42,43,89,90])).then((e=>DC(e.default||e))),db=Zi(PL({loader:lb},NL)),pb=()=>t((()=>import("./pages-shop-refund-index.B9THIKxI.js")),__vite__mapDeps([91,11,1,6,12,32,33,47,48,58,59,60,17,18,19,36,37,38,39,61,62,30,63,92])).then((e=>DC(e.default||e))),hb=Zi(PL({loader:pb},NL)),fb=()=>t((()=>import("./pages-shop-money-whereabouts-index.irao7QOB.js")),__vite__mapDeps([93,32,1,33,12,94,36,37,38,39,40,41,95,11,6,96,97,29,30,25,98])).then((e=>DC(e.default||e))),gb=Zi(PL({loader:fb},NL)),_b=()=>t((()=>import("./pages-shop-after-sales-index.CNNMuexj.js")),__vite__mapDeps([99,11,1,6,12,32,33,100,101,94,36,37,38,39,40,41,95,96,97,29,30,25,102,22,103,104])).then((e=>DC(e.default||e))),mb=Zi(PL({loader:_b},NL)),vb=()=>t((()=>import("./pages-shop-transaction-completed-index.C2DxpssP.js")),__vite__mapDeps([105,42,11,1,6,12,32,33,43,94,36,37,38,39,40,41,95,96,97,102,22,103])).then((e=>DC(e.default||e))),yb=Zi(PL({loader:vb},NL)),Ib=()=>t((()=>import("./pages-shop-waiting-delivery-index.D_TzKmot.js")),__vite__mapDeps([106,42,11,1,6,12,32,33,43,94,36,37,38,39,40,41,95,96,97,44,45,46])).then((e=>DC(e.default||e))),Mb=Zi(PL({loader:Ib},NL)),Cb=()=>t((()=>import("./pages-shop-logistics-state-index.ZlEzS3Cg.js")),__vite__mapDeps([107,37,1,38,12,32,33,100,11,6,101,44,45,46,102,22,103,95,96,108,109])).then((e=>DC(e.default||e))),Tb=Zi(PL({loader:Cb},NL)),Sb=()=>t((()=>import("./pages-news-news.QvCPAIDd.js")),__vite__mapDeps([110,16,1,12,11,6,17,18,19,20,85,76,77,86,111,112,113,114,115])).then((e=>DC(e.default||e))),Eb=Zi(PL({loader:Sb},NL)),Db=()=>t((()=>import("./pages-news-group-chat-list-index.DnqNaJkV.js")),[]).then((e=>DC(e.default||e))),kb=Zi(PL({loader:Db},NL)),Lb=()=>t((()=>import("./pages-news-group-chat-index.CzkhjWmF.js")),__vite__mapDeps([116,11,1,6,12,117,77,86])).then((e=>DC(e.default||e))),bb=Zi(PL({loader:Lb},NL)),Ab=()=>t((()=>import("./pages-news-question-answer-index.BwyCcR4K.js")),__vite__mapDeps([118,47,11,1,6,12,48,17,18,19,119,36,37,38,32,33,39,30,120])).then((e=>DC(e.default||e))),Rb=Zi(PL({loader:Ab},NL)),Ob=()=>t((()=>import("./pages-news-red-envelope-index.Zyu0lFWu.js")),__vite__mapDeps([121,1,122])).then((e=>DC(e.default||e))),wb=Zi(PL({loader:Ob},NL)),Pb=()=>t((()=>import("./pages-mine-mine.BBwPnG1j.js")),__vite__mapDeps([123,11,1,6,12,16,17,18,19,20,124,76,77,21,22,23,125])).then((e=>DC(e.default||e))),Nb=Zi(PL({loader:Pb},NL)),Gb=()=>t((()=>import("./pages-mine-setting.BYO4A0RO.js")),__vite__mapDeps([126,11,1,6,12,127])).then((e=>DC(e.default||e))),Ub=Zi(PL({loader:Gb},NL)),xb=()=>t((()=>import("./pages-mine-userinfo.DXuTGjmL.js")),__vite__mapDeps([128,11,1,6,12,129])).then((e=>DC(e.default||e))),Fb=Zi(PL({loader:xb},NL)),qb=()=>t((()=>import("./pages-mine-switch-accounts-index.BzSqZKI7.js")),__vite__mapDeps([130,113,1,114,12,85,11,6,76,77,86,131,25])).then((e=>DC(e.default||e))),Vb=Zi(PL({loader:qb},NL)),Bb=()=>t((()=>import("./pages-mine-pay-use-index.5Ioy9NkY.js")),__vite__mapDeps([132,32,1,33,12,30,29,11,6,25,133])).then((e=>DC(e.default||e))),Hb=Zi(PL({loader:Bb},NL)),jb=()=>t((()=>import("./pages-mine-realname.DmxTXGtf.js")),__vite__mapDeps([134,1,135])).then((e=>DC(e.default||e))),Kb=Zi(PL({loader:jb},NL)),$b=()=>t((()=>import("./pages-mine-delivery-address-index.n1lTy78D.js")),__vite__mapDeps([136,37,1,38,12,11,6,49,50,47,48,51,17,18,19,30,52,137,25,63])).then((e=>DC(e.default||e))),zb=Zi(PL({loader:$b},NL)),Wb=()=>t((()=>import("./pages-mine-balance-details-index.B2kUFw1V.js")),__vite__mapDeps([138,29,11,1,6,12,30,25,139])).then((e=>DC(e.default||e))),Yb=Zi(PL({loader:Wb},NL)),Xb=()=>t((()=>import("./pages-mine-historical-browsing-index.2B3OlJFu.js")),__vite__mapDeps([140,32,1,33,12,36,37,38,39,141,71,142])).then((e=>DC(e.default||e))),Jb=Zi(PL({loader:Xb},NL)),Zb=()=>t((()=>import("./pages-mine-browsed-index.Bddct7yj.js")),__vite__mapDeps([143,36,37,1,38,12,32,33,39,62,30,63,64,144])).then((e=>DC(e.default||e))),Qb=Zi(PL({loader:Zb},NL)),eA=()=>t((()=>import("./pages-mine-collection-index.Bm4FB7t9.js")),__vite__mapDeps([145,36,37,1,38,12,32,33,39,40,41,30,141,71,146])).then((e=>DC(e.default||e))),tA=Zi(PL({loader:eA},NL)),nA=()=>t((()=>import("./pages-mine-target-store-index.DfGEb5JC.js")),__vite__mapDeps([147,37,1,38,12,40,32,33,41,141,71])).then((e=>DC(e.default||e))),oA=Zi(PL({loader:nA},NL)),iA=()=>t((()=>import("./pages-mine-coupon-index.BSudQnSx.js")),__vite__mapDeps([148,11,1,6,12,141,71,149])).then((e=>DC(e.default||e))),aA=Zi(PL({loader:iA},NL)),sA=()=>t((()=>import("./pages-mine-homepage.Bm5YZTiL.js")),__vite__mapDeps([150,16,1,12,11,6,17,18,19,20,151,152,76,77,111,112,153,113,114,154,155])).then((e=>DC(e.default||e))),rA=Zi(PL({loader:sA},NL)),cA=()=>t((()=>import("./pages-release-video.BnWq-Q8r.js")),__vite__mapDeps([156,11,1,6,12,17,18,19,157])).then((e=>DC(e.default||e))),uA=Zi(PL({loader:cA},NL)),lA=()=>t((()=>import("./pages-index-wallet.YmaJ8t8k.js")),__vite__mapDeps([158,11,1,6,12,17,18,19,159])).then((e=>DC(e.default||e))),dA=Zi(PL({loader:lA},NL)),pA=()=>t((()=>import("./pages-index-myTeam.BycZNMpY.js")),__vite__mapDeps([160,11,1,6,12,161])).then((e=>DC(e.default||e))),hA=Zi(PL({loader:pA},NL)),fA=()=>t((()=>import("./pages-index-search.DiXtn5Ja.js")),__vite__mapDeps([162,11,1,6,12,163,164,4,76,77,165])).then((e=>DC(e.default||e))),gA=Zi(PL({loader:fA},NL)),_A=()=>t((()=>import("./pages-index-videoHome.twj1Njef.js")),__vite__mapDeps([166,11,1,6,12,17,18,19,167,85,76,77,86,151,152,168])).then((e=>DC(e.default||e))),mA=Zi(PL({loader:_A},NL)),vA=()=>t((()=>import("./pages-index-report.BVii8gq0.js")),__vite__mapDeps([169,11,1,6,12,17,18,19,151,152,170])).then((e=>DC(e.default||e))),yA=Zi(PL({loader:vA},NL)),IA=()=>t((()=>import("./pages-mine-collectsVideo.Bs3MMVCq.js")),__vite__mapDeps([171,12,151,11,1,6,152,172])).then((e=>DC(e.default||e))),MA=Zi(PL({loader:IA},NL)),CA=()=>t((()=>import("./pages-index-promotion.DqjD06FY.js")),__vite__mapDeps([173,12,151,11,1,6,152,174])).then((e=>DC(e.default||e))),TA=Zi(PL({loader:CA},NL)),SA=()=>t((()=>import("./pages-index-myQrCode.B48_oGza.js")),__vite__mapDeps([175,12,1,176])).then((e=>DC(e.default||e))),EA=Zi(PL({loader:SA},NL)),DA=()=>t((()=>import("./pages-index-deal.Bhucd7Hs.js")),__vite__mapDeps([177,167,12,178,85,11,1,6,76,77,86,179])).then((e=>DC(e.default||e))),kA=Zi(PL({loader:DA},NL)),LA=()=>t((()=>import("./pages-index-durian.DJuwjxzs.js")),__vite__mapDeps([180,17,18,19,1,12,181,182,183,111,112,178,184])).then((e=>DC(e.default||e))),bA=Zi(PL({loader:LA},NL)),AA=()=>t((()=>import("./pages-index-durainActivation.f7hQ5Oql.js")),__vite__mapDeps([185,182,12,178,1,186])).then((e=>DC(e.default||e))),RA=Zi(PL({loader:AA},NL)),OA=()=>t((()=>import("./pages-index-trade.BCg-6N8r.js")),__vite__mapDeps([187,11,1,6,12,17,18,19,183,80,167,178,188,77,86])).then((e=>DC(e.default||e))),wA=Zi(PL({loader:OA},NL)),PA=()=>t((()=>import("./pages-index-orchard.D7BwsoI3.js")),__vite__mapDeps([189,17,18,19,1,12,181,183,182,85,11,6,76,77,86,178,190])).then((e=>DC(e.default||e))),NA=Zi(PL({loader:PA},NL)),GA=()=>t((()=>import("./pages-index-durianLog.C7JocjXK.js")),__vite__mapDeps([191,12,1,178,77,6,86])).then((e=>DC(e.default||e))),UA=Zi(PL({loader:GA},NL)),xA=()=>t((()=>import("./pages-index-dataCenter-push.JMZ7hoah.js")),__vite__mapDeps([192,11,1,6,12,17,18,19,85,76,77,86,151,152,193])).then((e=>DC(e.default||e))),FA=Zi(PL({loader:xA},NL)),qA=()=>t((()=>import("./pages-index-dataCenter-pushVideoCollects.CbQgRNUl.js")),__vite__mapDeps([194,11,1,6,12,17,18,19,153,113,114,154,151,152,195])).then((e=>DC(e.default||e))),VA=Zi(PL({loader:qA},NL)),BA=()=>t((()=>import("./pages-login-register.DiNpCmG5.js")),__vite__mapDeps([196,9,197,1,14,10,11,6,12,7,198])).then((e=>DC(e.default||e))),HA=Zi(PL({loader:BA},NL)),jA=()=>t((()=>import("./pages-login-forget.D2dlq6mR.js")),__vite__mapDeps([199,9,197,1,14,200,6,7])).then((e=>DC(e.default||e))),KA=Zi(PL({loader:jA},NL)),$A=()=>t((()=>import("./pages-login-retrieve.CwmGuS3y.js")),__vite__mapDeps([201,9,10,11,1,6,12,7,202])).then((e=>DC(e.default||e))),zA=Zi(PL({loader:$A},NL)),WA=()=>t((()=>import("./pages-shop-settle.Te5IjZzs.js")),__vite__mapDeps([203,11,1,6,12,178,204])).then((e=>DC(e.default||e))),YA=Zi(PL({loader:WA},NL)),XA=()=>t((()=>import("./pages-index-integral.DgkOfD-0.js")),__vite__mapDeps([205,206,207,12,208,1,209])).then((e=>DC(e.default||e))),JA=Zi(PL({loader:XA},NL)),ZA=()=>t((()=>import("./pages-index-integralLog.YYhNviv3.js")),__vite__mapDeps([210,12,1,208,77,6,86])).then((e=>DC(e.default||e))),QA=Zi(PL({loader:ZA},NL)),eR=()=>t((()=>import("./pages-index-integralMall.CA0ZTOHx.js")),__vite__mapDeps([211,11,1,6,12,206,212])).then((e=>DC(e.default||e))),tR=Zi(PL({loader:eR},NL)),nR=()=>t((()=>import("./pages-index-appeal.CO-DqKCu.js")),__vite__mapDeps([213,11,1,6,12,183,167,214])).then((e=>DC(e.default||e))),oR=Zi(PL({loader:nR},NL)),iR=()=>t((()=>import("./pages-index-beInvited.B2ELZUkY.js")),__vite__mapDeps([215,12,1,216])).then((e=>DC(e.default||e))),aR=Zi(PL({loader:iR},NL)),sR=()=>t((()=>import("./pages-index-videoDetail.DPs_j-QN.js")),__vite__mapDeps([217,12,11,1,6,119,163,164,218,4,76,77,17,18,19,153,113,114,154,219])).then((e=>DC(e.default||e))),rR=Zi(PL({loader:sR},NL)),cR=()=>t((()=>import("./pages-news-newFriend.Cfw56ZxO.js")),__vite__mapDeps([220,11,1,6,12,221])).then((e=>DC(e.default||e))),uR=Zi(PL({loader:cR},NL)),lR=()=>t((()=>import("./pages-news-newAttention.CNP9AgLI.js")),__vite__mapDeps([222,11,1,6,12,223])).then((e=>DC(e.default||e))),dR=Zi(PL({loader:lR},NL)),pR=()=>t((()=>import("./pages-news-newFans.Bpbgp1Q8.js")),__vite__mapDeps([224,11,1,6,12,225])).then((e=>DC(e.default||e))),hR=Zi(PL({loader:pR},NL)),fR=()=>t((()=>import("./pages-news-message.CnN4UL5T.js")),__vite__mapDeps([226,80,1,227])).then((e=>DC(e.default||e))),gR=Zi(PL({loader:fR},NL)),_R=()=>t((()=>import("./pages-index-article.DJ77BGGV.js")),__vite__mapDeps([228,12,1,77])).then((e=>DC(e.default||e))),mR=Zi(PL({loader:_R},NL)),vR=()=>t((()=>import("./pages-index-topUp.DN9VVB43.js")),__vite__mapDeps([229,11,1,6,12,230])).then((e=>DC(e.default||e))),yR=Zi(PL({loader:vR},NL)),IR=()=>t((()=>import("./pages-news-addFriend.CpdHdfFL.js")),__vite__mapDeps([231,11,1,6,12,232])).then((e=>DC(e.default||e))),MR=Zi(PL({loader:IR},NL)),CR=()=>t((()=>import("./pages-news-redPacket.Du0i0Tyz.js")),__vite__mapDeps([233,11,1,6,12,234])).then((e=>DC(e.default||e))),TR=Zi(PL({loader:CR},NL)),SR=()=>t((()=>import("./pages-news-audio-video-audio.DgY075Yk.js")),[]).then((e=>DC(e.default||e))),ER=Zi(PL({loader:SR},NL)),DR=()=>t((()=>import("./pages-news-audio-video-video.BqZ2rU3T.js")),__vite__mapDeps([235,1])).then((e=>DC(e.default||e))),kR=Zi(PL({loader:DR},NL)),LR=()=>t((()=>import("./pages-index-integralDetail.t3MuA47-.js")),__vite__mapDeps([236,206,207,12,208,1,237])).then((e=>DC(e.default||e))),bR=Zi(PL({loader:LR},NL)),AR=()=>t((()=>import("./pages-index-videoStatistics.09pyxccY.js")),__vite__mapDeps([238,1])).then((e=>DC(e.default||e))),RR=Zi(PL({loader:AR},NL)),OR=()=>t((()=>import("./pages-mine-myComment.7kGBf7EW.js")),__vite__mapDeps([239,4,12,1,240])).then((e=>DC(e.default||e))),wR=Zi(PL({loader:OR},NL)),PR=()=>t((()=>import("./pages-mine-secondpwd.CY-AgldK.js")),[]).then((e=>DC(e.default||e))),NR=Zi(PL({loader:PR},NL)),GR=()=>t((()=>import("./pages-index-bill.BSGf107N.js")),__vite__mapDeps([241,11,1,6,12,242])).then((e=>DC(e.default||e))),UR=Zi(PL({loader:GR},NL)),xR=()=>t((()=>import("./pages-index-billDetail.BFbmT0RU.js")),[]).then((e=>DC(e.default||e))),FR=Zi(PL({loader:xR},NL)),qR=()=>t((()=>import("./pages-index-dataCenter-dataCenter.BQzqyFyi.js")),__vite__mapDeps([243,244,59,1,12,245,164,218,4,183,85,11,6,76,77,86,246])).then((e=>DC(e.default||e))),VR=Zi(PL({loader:qR},NL)),BR=()=>t((()=>import("./pages-index-dataCenter-like.TydZ787X.js")),__vite__mapDeps([247,80,85,11,1,6,12,76,77,86,248])).then((e=>DC(e.default||e))),HR=Zi(PL({loader:BR},NL)),jR=()=>t((()=>import("./pages-index-dataCenter-otherPush.BRfoHCFQ.js")),__vite__mapDeps([249,80,1,250,6,77,86])).then((e=>DC(e.default||e))),KR=Zi(PL({loader:jR},NL)),$R=()=>t((()=>import("./pages-index-dataCenter-pushDetail.BYJDtGLl.js")),__vite__mapDeps([251,244,59,1,12,245,11,6,4,252,77,86])).then((e=>DC(e.default||e))),zR=Zi(PL({loader:$R},NL)),WR=()=>t((()=>import("./pages-index-dataCenter-pushHistory.C2eoD8EV.js")),__vite__mapDeps([253,151,11,1,6,12,152])).then((e=>DC(e.default||e))),YR=Zi(PL({loader:WR},NL)),XR=()=>t((()=>import("./pages-index-dataCenter-pushDetailUser.CWLkA7oS.js")),__vite__mapDeps([254,80,1,255])).then((e=>DC(e.default||e))),JR=Zi(PL({loader:XR},NL)),ZR=()=>t((()=>import("./pages-shop-commodity-evaluate.BJbv_AMd.js")),__vite__mapDeps([256,11,1,6,12,257])).then((e=>DC(e.default||e))),QR=Zi(PL({loader:ZR},NL)),eO=()=>t((()=>import("./pages-shop-homepage.BBaiyil4.js")),__vite__mapDeps([258,74,11,1,6,12,75,124,76,77,85,86,18,19,259,23,20])).then((e=>DC(e.default||e))),tO=Zi(PL({loader:eO},NL)),nO=()=>t((()=>import("./pages-shop-order-detail.iCVUySTl.js")),__vite__mapDeps([260,11,1,6,12,45,21,22,23,261])).then((e=>DC(e.default||e))),oO=Zi(PL({loader:nO},NL)),iO=()=>t((()=>import("./pages-shop-order-refundStar.BGKkQKYV.js")),__vite__mapDeps([262,11,1,6,12,89,61,261,263])).then((e=>DC(e.default||e))),aO=Zi(PL({loader:iO},NL)),sO=()=>t((()=>import("./pages-shop-order-logistics.DymwT_vY.js")),__vite__mapDeps([264,11,1,6,12,45,108,21,22,23,265])).then((e=>DC(e.default||e))),rO=Zi(PL({loader:sO},NL)),cO=()=>t((()=>import("./pages-shop-order-evaluate.DMl6oZ5d.js")),__vite__mapDeps([266,74,11,1,6,12,75,61,267])).then((e=>DC(e.default||e))),uO=Zi(PL({loader:cO},NL)),lO=()=>t((()=>import("./TUIKit-components-TUIConversation-index.DKBZ8YC8.js")),__vite__mapDeps([268,269,270,271,1,272,273,274,275,276,277,278,279,280,281,282,283,12,284])).then((e=>DC(e.default||e))),dO=Zi(PL({loader:lO},NL)),pO=()=>t((()=>import("./TUIKit-components-TUIChat-index.BnbFlwsa.js")),__vite__mapDeps([285,270,269,271,1,272,12,286,287,275,276,280,281,288,282,283,278,289,290])).then((e=>DC(e.default||e))),hO=Zi(PL({loader:pO},NL)),fO=()=>t((()=>import("./TUIKit-components-TUIChat-video-play.MWZS87Ya.js")),__vite__mapDeps([291,270,271,12,1,292])).then((e=>DC(e.default||e))),gO=Zi(PL({loader:fO},NL)),_O=()=>t((()=>import("./TUIKit-components-TUIChat-web-view.De_qDwEi.js")),__vite__mapDeps([293,270,12])).then((e=>DC(e.default||e))),mO=Zi(PL({loader:_O},NL)),vO=()=>t((()=>import("./TUIKit-components-TUIContact-index.DnrX6SsM.js")),__vite__mapDeps([294,269,270,271,1,272,295,280,281,286,287,288,274,277,276,296])).then((e=>DC(e.default||e))),yO=Zi(PL({loader:vO},NL)),IO=()=>t((()=>import("./TUIKit-components-TUIGroup-index.Dr7T14DQ.js")),__vite__mapDeps([297,269,270,271,1,272,289,286,287,277,280,281,295,278,298])).then((e=>DC(e.default||e))),MO=Zi(PL({loader:IO},NL)),CO=()=>t((()=>import("./TUIKit-components-TUISearch-index.CvlNmILk.js")),__vite__mapDeps([273,270,269,271,1,272,274,275,276,277,278,279])).then((e=>DC(e.default||e))),TO=Zi(PL({loader:CO},NL));function SO(e,t){return nr(),cr(AL,null,{page:ii((()=>[_r(e,PL({},t,{ref:"page"}),null,512)])),_:1})}function EO(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}window.__uniRoutes=[{path:"/",alias:"/pages/index/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(UL,t)}},loader:GL,meta:{isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0,disableScroll:!0,navigationBar:{titleText:"视频",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/news/ce",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(FL,t)}},loader:xL,meta:{navigationBar:{titleText:"视频",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/login/open",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(VL,t)}},loader:qL,meta:{navigationBar:{titleText:"开屏页",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/login/loginPhone",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(HL,t)}},loader:BL,meta:{bounce:"none",navigationBar:{titleText:"手机号登录",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/shop",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(KL,t)}},loader:jL,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:1,onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"商城",type:"default"},isNVue:!1}},{path:"/pages/merchant/business-operator/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(zL,t)}},loader:$L,meta:{onReachBottomDistance:100,navigationBar:{titleText:"商家管理",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/merchant/order/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(YL,t)}},loader:WL,meta:{onReachBottomDistance:100,navigationBar:{titleText:"商家订单",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/merchant/commodity-release/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(JL,t)}},loader:XL,meta:{navigationBar:{titleText:"发布商品",type:"default"},isNVue:!1}},{path:"/pages/merchant/specifications/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(QL,t)}},loader:ZL,meta:{navigationBar:{titleText:"规格",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/search/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(tb,t)}},loader:eb,meta:{onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{titleText:"搜索",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/commodity/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(ob,t)}},loader:nb,meta:{navigationBar:{titleText:"商品详情",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/shop/continue-pay/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(ab,t)}},loader:ib,meta:{navigationBar:{backgroundColor:"#fff",titleText:"继续付款",type:"default"},isNVue:!1}},{path:"/pages/shop/store/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(rb,t)}},loader:sb,meta:{navigationBar:{titleText:"店铺",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/shop/order/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(ub,t)}},loader:cb,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"订单",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/sales/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(db,t)}},loader:lb,meta:{navigationBar:{backgroundColor:"#fff",titleText:"售后类型",type:"default"},isNVue:!1}},{path:"/pages/shop/refund/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(hb,t)}},loader:pb,meta:{navigationBar:{backgroundColor:"#fff",titleText:"申请退货退款",type:"default"},isNVue:!1}},{path:"/pages/shop/money-whereabouts/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(gb,t)}},loader:fb,meta:{navigationBar:{titleText:"钱款去向",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/after-sales/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(mb,t)}},loader:_b,meta:{navigationBar:{titleText:"售后详情",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/transaction-completed/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(yb,t)}},loader:vb,meta:{navigationBar:{titleText:"交易完成",type:"default"},isNVue:!1}},{path:"/pages/shop/waiting-delivery/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Mb,t)}},loader:Ib,meta:{navigationBar:{titleText:"待发货",type:"default"},isNVue:!1}},{path:"/pages/shop/logistics-state/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Tb,t)}},loader:Cb,meta:{navigationBar:{titleText:"物流状态",type:"default"},isNVue:!1}},{path:"/pages/news/news",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Eb,t)}},loader:Sb,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:2,bounce:"none",navigationBar:{titleText:"消息",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/news/group-chat-list/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(kb,t)}},loader:Db,meta:{navigationBar:{titleText:"群聊列表",type:"default"},isNVue:!1}},{path:"/pages/news/group-chat/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(bb,t)}},loader:Lb,meta:{navigationBar:{backgroundColor:"#fff",titleText:"创建群聊",type:"default"},isNVue:!1}},{path:"/pages/news/question-answer/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Rb,t)}},loader:Ab,meta:{navigationBar:{titleText:"问答页",type:"default"},isNVue:!1}},{path:"/pages/news/red-envelope/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(wb,t)}},loader:Ob,meta:{navigationBar:{titleText:"红包详情",type:"default"},isNVue:!1}},{path:"/pages/mine/mine",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Nb,t)}},loader:Pb,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:3,navigationBar:{titleText:"我的",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/setting",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Ub,t)}},loader:Gb,meta:{navigationBar:{backgroundColor:"#fff",titleText:"设置",type:"default"},isNVue:!1}},{path:"/pages/mine/userinfo",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Fb,t)}},loader:xb,meta:{navigationBar:{backgroundColor:"#fff",titleText:"个人信息",type:"default"},isNVue:!1}},{path:"/pages/mine/switch-accounts/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Vb,t)}},loader:qb,meta:{navigationBar:{titleText:"切换账号",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/pay-use/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Hb,t)}},loader:Bb,meta:{navigationBar:{titleText:"先用后付",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/realname",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Kb,t)}},loader:jb,meta:{navigationBar:{backgroundColor:"#fff",titleText:"实名认证",type:"default"},isNVue:!1}},{path:"/pages/mine/delivery-address/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(zb,t)}},loader:$b,meta:{onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"收货地址",type:"default"},isNVue:!1}},{path:"/pages/mine/balance-details/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Yb,t)}},loader:Wb,meta:{onReachBottomDistance:100,navigationBar:{titleText:"余额明细",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/mine/historical-browsing/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Jb,t)}},loader:Xb,meta:{onReachBottomDistance:100,enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"历史浏览",type:"default"},isNVue:!1}},{path:"/pages/mine/browsed/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(Qb,t)}},loader:Zb,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"选择已浏览的商品",type:"default"},isNVue:!1}},{path:"/pages/mine/collection/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(tA,t)}},loader:eA,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"全部收藏",type:"default"},isNVue:!1}},{path:"/pages/mine/target-store/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(oA,t)}},loader:nA,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"关注店铺",type:"default"},isNVue:!1}},{path:"/pages/mine/coupon/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(aA,t)}},loader:iA,meta:{onReachBottomDistance:100,navigationBar:{backgroundColor:"#fff",titleText:"优惠券",type:"default"},isNVue:!1}},{path:"/pages/mine/homepage",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(rA,t)}},loader:sA,meta:{isQuit:!0,isTabBar:!0,tabBarIndex:4,navigationBar:{titleText:"个人主页",style:"custom",type:"default",titleColor:"#ffffff"},isNVue:!1}},{path:"/pages/release/video",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(uA,t)}},loader:cA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"发布视频",type:"default"},isNVue:!1}},{path:"/pages/index/wallet",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(dA,t)}},loader:lA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"我的钱包",type:"default"},isNVue:!1}},{path:"/pages/index/myTeam",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(hA,t)}},loader:pA,meta:{navigationBar:{titleText:"我的团队",type:"default"},isNVue:!1}},{path:"/pages/index/search",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(gA,t)}},loader:fA,meta:{enablePullDownRefresh:!0,navigationBar:{titleText:"搜索页",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/videoHome",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(mA,t)}},loader:_A,meta:{navigationBar:{titleText:"用户视频首页",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/report",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(yA,t)}},loader:vA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"举报",type:"default"},isNVue:!1}},{path:"/pages/mine/collectsVideo",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(MA,t)}},loader:IA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"收藏夹视频",type:"default"},isNVue:!1}},{path:"/pages/index/promotion",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(TA,t)}},loader:CA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"选择推广视频",type:"default"},isNVue:!1}},{path:"/pages/index/myQrCode",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(EA,t)}},loader:SA,meta:{navigationBar:{titleText:"我的分享",type:"default"},isNVue:!1}},{path:"/pages/index/deal",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(kA,t)}},loader:DA,meta:{navigationBar:{titleText:"我的交易",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/durian",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(bA,t)}},loader:LA,meta:{navigationBar:{titleText:"榴莲首页",type:"default"},isNVue:!1}},{path:"/pages/index/durainActivation",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(RA,t)}},loader:AA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"已激活",type:"default"},isNVue:!1}},{path:"/pages/index/trade",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(wA,t)}},loader:OA,meta:{enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"交易市场",type:"default"},isNVue:!1}},{path:"/pages/index/orchard",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(NA,t)}},loader:PA,meta:{navigationBar:{titleText:"榴莲果园",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/durianLog",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(UA,t)}},loader:GA,meta:{enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"榴莲果明细",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/push",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(FA,t)}},loader:xA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"投流推广",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/pushVideoCollects",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(VA,t)}},loader:qA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"选择投流视频",type:"default"},isNVue:!1}},{path:"/pages/login/register",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(HA,t)}},loader:BA,meta:{navigationBar:{titleText:"注册",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/login/forget",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(KA,t)}},loader:jA,meta:{navigationBar:{titleText:"忘记密码",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/login/retrieve",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(zA,t)}},loader:$A,meta:{navigationBar:{titleText:"找回账户",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/settle",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(YA,t)}},loader:WA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"商家入驻",type:"default"},isNVue:!1}},{path:"/pages/index/integral",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(JA,t)}},loader:XA,meta:{navigationBar:{backgroundColor:"#fff",titleText:"积分",type:"default"},isNVue:!1}},{path:"/pages/index/integralLog",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(QA,t)}},loader:ZA,meta:{enablePullDownRefresh:!0,navigationBar:{backgroundColor:"#fff",titleText:"积分变动明细",type:"default"},isNVue:!1}},{path:"/pages/index/integralMall",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(tR,t)}},loader:eR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"卷轴商城",type:"default"},isNVue:!1}},{path:"/pages/index/appeal",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(oR,t)}},loader:nR,meta:{navigationBar:{titleText:"交易申诉",type:"default"},isNVue:!1}},{path:"/pages/index/beInvited",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(aR,t)}},loader:iR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"受邀成功",type:"default"},isNVue:!1}},{path:"/pages/index/videoDetail",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(rR,t)}},loader:sR,meta:{navigationBar:{titleText:"视频详情",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/news/newFriend",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(uR,t)}},loader:cR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"新朋友",type:"default"},isNVue:!1}},{path:"/pages/news/newAttention",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(dR,t)}},loader:lR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"新的关注",type:"default"},isNVue:!1}},{path:"/pages/news/newFans",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(hR,t)}},loader:pR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"新的粉丝",type:"default"},isNVue:!1}},{path:"/pages/news/message",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(gR,t)}},loader:fR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"消息",type:"default"},isNVue:!1}},{path:"/pages/index/article",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(mR,t)}},loader:_R,meta:{navigationBar:{titleText:"",type:"default"},isNVue:!1}},{path:"/pages/index/topUp",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(yR,t)}},loader:vR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"余额充值",type:"default"},isNVue:!1}},{path:"/pages/news/addFriend",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(MR,t)}},loader:IR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"添加朋友",type:"default"},isNVue:!1}},{path:"/pages/news/redPacket",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(TR,t)}},loader:CR,meta:{navigationBar:{titleText:"红包",type:"default"},isNVue:!1}},{path:"/pages/news/audio-video/audio",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(ER,t)}},loader:SR,meta:{navigationBar:{titleText:"语音",type:"default"},isNVue:!1}},{path:"/pages/news/audio-video/video",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(kR,t)}},loader:DR,meta:{navigationBar:{titleText:"视频",type:"default"},isNVue:!1}},{path:"/pages/index/integralDetail",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(bR,t)}},loader:LR,meta:{enablePullDownRefresh:!0,navigationBar:{titleText:"卷轴详情",type:"default"},isNVue:!1}},{path:"/pages/index/videoStatistics",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(RR,t)}},loader:AR,meta:{navigationBar:{titleText:"视频统计",type:"default"},isNVue:!1}},{path:"/pages/mine/myComment",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(wR,t)}},loader:OR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"我的评论",type:"default"},isNVue:!1}},{path:"/pages/mine/secondpwd",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(NR,t)}},loader:PR,meta:{navigationBar:{titleText:"设置二级密码",type:"default"},isNVue:!1}},{path:"/pages/index/bill",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(UR,t)}},loader:GR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"我的账单",type:"default"},isNVue:!1}},{path:"/pages/index/billDetail",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(FR,t)}},loader:xR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"账单详情",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/dataCenter",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(VR,t)}},loader:qR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"数据中心",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/like",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(HR,t)}},loader:BR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"点赞统计",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/otherPush",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(KR,t)}},loader:jR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"他人推广",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/pushDetail",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(zR,t)}},loader:$R,meta:{navigationBar:{backgroundColor:"#fff",titleText:"推流详情",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/pushHistory",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(YR,t)}},loader:WR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"历史推流",type:"default"},isNVue:!1}},{path:"/pages/index/dataCenter/pushDetailUser",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(JR,t)}},loader:XR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"推流的用户",type:"default"},isNVue:!1}},{path:"/pages/shop/commodity/evaluate",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(QR,t)}},loader:ZR,meta:{navigationBar:{backgroundColor:"#fff",titleText:"商品评价",type:"default"},isNVue:!1}},{path:"/pages/shop/homepage",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(tO,t)}},loader:eO,meta:{navigationBar:{titleText:"店铺主页",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/shop/order/detail",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(oO,t)}},loader:nO,meta:{navigationBar:{backgroundColor:"#fff",titleText:"订单详情",type:"default"},isNVue:!1}},{path:"/pages/shop/order/refundStar",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(aO,t)}},loader:iO,meta:{navigationBar:{backgroundColor:"#fff",titleText:"发起售后",type:"default"},isNVue:!1}},{path:"/pages/shop/order/logistics",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(rO,t)}},loader:sO,meta:{navigationBar:{backgroundColor:"#fff",titleText:"物流状态",type:"default"},isNVue:!1}},{path:"/pages/shop/order/evaluate",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(uO,t)}},loader:cO,meta:{navigationBar:{backgroundColor:"#fff",titleText:"评价",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIConversation/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(dO,t)}},loader:lO,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIChat/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(hO,t)}},loader:pO,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIChat/video-play",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(gO,t)}},loader:fO,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIChat/web-view",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(mO,t)}},loader:_O,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIContact/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(yO,t)}},loader:vO,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUIGroup/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(MO,t)}},loader:IO,meta:{navigationBar:{titleText:"消息",type:"default"},isNVue:!1}},{path:"/TUIKit/components/TUISearch/index",component:{setup(){const e=CC(),t=e&&e.$route&&e.$route.query||{};return()=>SO(TO,t)}},loader:CO,meta:{navigationBar:{titleText:"聊天记录",type:"default"},isNVue:!1}}].map((e=>(e.meta.route=(e.alias||e.path).slice(1),e)));const DO="function"==typeof Proxy;class kO{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const a in e.settings){const t=e.settings[a];n[a]=t.defaultValue}const o=`__vue-devtools-plugin-settings__${e.id}`;let i={...n};try{const e=localStorage.getItem(o),t=JSON.parse(e);Object.assign(i,t)}catch(Hw){}this.fallbacks={getSettings:()=>i,setSettings(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(Hw){}i=e}},t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((n=>{this.targetQueue.push({method:t,args:e,resolve:n})}))})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function LO(e,t){const n=EO(),o=EO().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=DO&&e.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const a=i?new kO(e,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:e,setupFn:t,proxy:a}),a&&t(a.proxiedTarget)}else o.emit("devtools-plugin:setup",e,t)}
|
||
/*!
|
||
* vuex v4.1.0
|
||
* (c) 2022 Evan You
|
||
* @license MIT
|
||
*/var bO="store";function AO(e){return void 0===e&&(e=null),gs(null!==e?e:bO)}function RO(e,t){if(void 0===t&&(t=[]),null===e||"object"!=typeof e)return e;var n,o=(n=function(t){return t.original===e},t.filter(n)[0]);if(o)return o.copy;var i=Array.isArray(e)?[]:{};return t.push({original:e,copy:i}),Object.keys(e).forEach((function(n){i[n]=RO(e[n],t)})),i}function OO(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function wO(e){return null!==e&&"object"==typeof e}function PO(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function NO(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;UO(e,n,[],e._modules.root,!0),GO(e,n,t)}function GO(e,t,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,s={},r={},c=Lt(!0);c.run((function(){OO(a,(function(t,n){s[n]=function(e,t){return function(){return e(t)}}(t,e),r[n]=Wr((function(){return s[n]()})),Object.defineProperty(e.getters,n,{get:function(){return r[n].value},enumerable:!0})}))})),e._state=qn({data:t}),e._scope=c,e.strict&&function(e){Ri((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),i&&i.stop()}function UO(e,t,n,o,i){var a=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!a&&!i){var r=FO(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){r[c]=o.state}))}var u=o.context=function(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var a=qO(n,o,i),s=a.payload,r=a.options,c=a.type;return r&&r.root||(c=t+c),e.dispatch(c,s)},commit:o?e.commit:function(n,o,i){var a=qO(n,o,i),s=a.payload,r=a.options,c=a.type;r&&r.root||(c=t+c),e.commit(c,s,r)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return xO(e,t)}},state:{get:function(){return FO(e.state,n)}}}),i}(e,s,n);o.forEachMutation((function(t,n){!function(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}(e,s+n,t,u)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,i=t.handler||t;!function(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i,a=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(i=a)&&"function"==typeof i.then||(a=Promise.resolve(a)),e._devtoolHook?a.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):a}))}(e,o,i,u)})),o.forEachGetter((function(t,n){!function(e,t,n,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)}}(e,s+n,t,u)})),o.forEachChild((function(o,a){UO(e,t,n.concat(a),o,i)}))}function xO(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var a=i.slice(o);Object.defineProperty(n,a,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function FO(e,t){return t.reduce((function(e,t){return e[t]}),e)}function qO(e,t,n){return wO(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var VO="vuex:mutations",BO="vuex:actions",HO="vuex",jO=0;function KO(e,t){LO({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:VO,label:"Vuex Mutations",color:$O}),n.addTimelineLayer({id:BO,label:"Vuex Actions",color:$O}),n.addInspector({id:HO,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===HO)if(n.filter){var o=[];XO(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[YO(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===HO){var o=n.nodeId;xO(t,o),n.state=function(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var a=function(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var i=t,a=o.pop();o.forEach((function(e){i[e]||(i[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),i=i[e]._custom.value})),i[a]=JO((function(){return e[n]}))}else t[n]=JO((function(){return e[n]}))})),t}(t);i.getters=Object.keys(a).map((function(e){return{key:e.endsWith("/")?WO(e):e,editable:!1,value:JO((function(){return a[e]}))}}))}return i}((i=t._modules,(s=(a=o).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+a+'".');return n===s.length-1?o:o._children}),"root"===a?i:i.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var i,a,s})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===HO){var o=n.nodeId,i=n.path;"root"!==o&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit((function(){n.set(t._state.data,i,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(HO),n.sendInspectorState(HO),n.addTimelineEvent({layerId:VO,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=jO++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:BO,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},i=Date.now()-e._time;o.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:BO,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var $O=8702998,zO={label:"namespaced",textColor:16777215,backgroundColor:6710886};function WO(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function YO(e,t){return{id:t||"root",label:WO(t),tags:e.namespaced?[zO]:[],children:Object.keys(e._children).map((function(n){return YO(e._children[n],t+n+"/")}))}}function XO(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[zO]:[]}),Object.keys(t._children).forEach((function(i){XO(e,t._children[i],n,o+i+"/")}))}function JO(e){try{return e()}catch(Hw){return Hw}}var ZO=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},QO={namespaced:{configurable:!0}};QO.namespaced.get=function(){return!!this._rawModule.namespaced},ZO.prototype.addChild=function(e,t){this._children[e]=t},ZO.prototype.removeChild=function(e){delete this._children[e]},ZO.prototype.getChild=function(e){return this._children[e]},ZO.prototype.hasChild=function(e){return e in this._children},ZO.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},ZO.prototype.forEachChild=function(e){OO(this._children,e)},ZO.prototype.forEachGetter=function(e){this._rawModule.getters&&OO(this._rawModule.getters,e)},ZO.prototype.forEachAction=function(e){this._rawModule.actions&&OO(this._rawModule.actions,e)},ZO.prototype.forEachMutation=function(e){this._rawModule.mutations&&OO(this._rawModule.mutations,e)},Object.defineProperties(ZO.prototype,QO);var ew=function(e){this.register([],e,!1)};function tw(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;tw(e.concat(o),t.getChild(o),n.modules[o])}}function nw(e){return new ow(e)}ew.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},ew.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},ew.prototype.update=function(e){tw([],this.root,e)},ew.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new ZO(t,n);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&OO(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},ew.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},ew.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var ow=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var i=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new ew(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var a=this,s=this.dispatch,r=this.commit;this.dispatch=function(e,t){return s.call(a,e,t)},this.commit=function(e,t,n){return r.call(a,e,t,n)},this.strict=o;var c=this._modules.root.state;UO(this,c,[],this._modules.root),GO(this,c),n.forEach((function(e){return e(t)}))},iw={state:{configurable:!0}};ow.prototype.install=function(e,t){e.provide(t||bO,this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&KO(e,this)},iw.state.get=function(){return this._state.data},iw.state.set=function(e){},ow.prototype.commit=function(e,t,n){var o=this,i=qO(e,t,n),a=i.type,s=i.payload,r={type:a,payload:s},c=this._mutations[a];c&&(this._withCommit((function(){c.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(r,o.state)})))},ow.prototype.dispatch=function(e,t){var n=this,o=qO(e,t),i=o.type,a=o.payload,s={type:i,payload:a},r=this._actions[i];if(r){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(Hw){}var c=r.length>1?Promise.all(r.map((function(e){return e(a)}))):r[0](a);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(Hw){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(Hw){}t(e)}))}))}},ow.prototype.subscribe=function(e,t){return PO(e,this._subscribers,t)},ow.prototype.subscribeAction=function(e,t){return PO("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},ow.prototype.watch=function(e,t,n){var o=this;return Ri((function(){return e(o.state,o.getters)}),t,Object.assign({},n))},ow.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},ow.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),UO(this,this.state,e,this._modules.get(e),n.preserveState),GO(this,this.state)},ow.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete FO(t.state,e.slice(0,-1))[e[e.length-1]]})),NO(this)},ow.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},ow.prototype.hotUpdate=function(e){this._modules.update(e),NO(this,!0)},ow.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(ow.prototype,iw);var aw=lw((function(e,t){var n={};return uw(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=dw(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),sw=lw((function(e,t){var n={};return uw(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var o=this.$store.commit;if(e){var a=dw(this.$store,"mapMutations",e);if(!a)return;o=a.context.commit}return"function"==typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),rw=lw((function(e,t){var n={};return uw(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||dw(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),cw=lw((function(e,t){var n={};return uw(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var a=dw(this.$store,"mapActions",e);if(!a)return;o=a.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n}));function uw(e){return function(e){return Array.isArray(e)||wO(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function lw(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function dw(e,t,n){return e._modulesNamespaceMap[n]}function pw(e,t,n){var o=n?e.groupCollapsed:e.group;try{o.call(e,t)}catch(Hw){e.log(t)}}function hw(e){try{e.groupEnd()}catch(Hw){e.log("—— log end ——")}}function fw(){var e=new Date;return" @ "+gw(e.getHours(),2)+":"+gw(e.getMinutes(),2)+":"+gw(e.getSeconds(),2)+"."+gw(e.getMilliseconds(),3)}function gw(e,t){return n="0",o=t-e.toString().length,new Array(o+1).join(n)+e;var n,o}var _w={version:"4.1.0",Store:ow,storeKey:bO,createStore:nw,useStore:AO,mapState:aw,mapMutations:sw,mapGetters:rw,mapActions:cw,createNamespacedHelpers:function(e){return{mapState:aw.bind(null,e),mapGetters:rw.bind(null,e),mapMutations:sw.bind(null,e),mapActions:cw.bind(null,e)}},createLogger:function(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var o=e.transformer;void 0===o&&(o=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var a=e.actionFilter;void 0===a&&(a=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var r=e.logMutations;void 0===r&&(r=!0);var c=e.logActions;void 0===c&&(c=!0);var u=e.logger;return void 0===u&&(u=console),function(e){var l=RO(e.state);void 0!==u&&(r&&e.subscribe((function(e,a){var s=RO(a);if(n(e,l,s)){var r=fw(),c=i(e),d="mutation "+e.type+r;pw(u,d,t),u.log("%c prev state","color: #9E9E9E; font-weight: bold",o(l)),u.log("%c mutation","color: #03A9F4; font-weight: bold",c),u.log("%c next state","color: #4CAF50; font-weight: bold",o(s)),hw(u)}l=s})),c&&e.subscribeAction((function(e,n){if(a(e,n)){var o=fw(),i=s(e),r="action "+e.type+o;pw(u,r,t),u.log("%c action","color: #03A9F4; font-weight: bold",i),hw(u)}})))}}};const mw=nw({state:{userinfo:{},tabbarMode:"default",alarmTime:""},mutations:{setState(e,t){const n=t.key,o=t.value;e[n]=o},setUserInfo(e,t){e.userinfo=t},setTabbarMode(e,t){e.tabbarMode=t}},getters:{getUserInfo:e=>e.userinfo,getTabbarMode:e=>e.tabbarMode},actions:{updateUserInfo({commit:e},t){e("setUserInfo",t)},changeTabbarMode({commit:e},t){e("setTabbarMode",t)}}}),vw={applyVideo:e=>Mw.request({url:"/homecommon/applyVideo",query:e.query,data:e.data,method:"POST",load:!0}),pushVideo:e=>Mw.request({url:"/homecommon/pushVideo",query:e.query,method:"POST",load:!0}),getUserInfo:e=>Mw.request({url:"/home/getUserInfo",query:e.query,method:"POST",load:!0}),myVideoList:e=>Mw.request({url:"/home/myVideoList",query:e.query,method:"POST",load:!0}),getCollectList:e=>Mw.request({url:"/collect/getCollectList",query:e.query,method:"POST"}),saveCollectList:e=>Mw.request({url:"/collect/saveCollectList",query:e.query,method:"POST",load:!0}),updateCollectList:e=>Mw.request({url:"/collect/updateCollectList",query:e.query,method:"POST",load:!0}),deleteCollect:e=>Mw.request({url:"/collect/deleteCollect",query:e.query,load:!0,method:"POST"}),getCollectVideoList:e=>Mw.request({url:"/collect/getCollectVideoList",query:e.query,load:!0,method:"POST"}),collectVideo:e=>Mw.request({url:"/collect/collectVideo",query:e.query,method:"POST",load:!0}),cancelCollect:e=>Mw.request({url:"/collect/cancelCollect",query:e.query,method:"POST",load:!0}),homeVideo:e=>Mw.request({url:"/homecommon/homeVideo",query:e.query,method:"POST"}),businessHomeVideo:e=>Mw.request({url:"/homecommon/businessHomeVideo",query:e.query,method:"POST"}),otherHomeVideo:e=>Mw.request({url:"/homecommon/otherHomeVideo",query:e.query,method:"POST"}),followVideo:e=>Mw.request({url:"/homecommon/followVideo",query:e.query,method:"POST"}),getLabel:e=>Mw.request({url:"/home/getLabel",query:e.query,method:"POST"}),setLabel:e=>Mw.request({url:"/home/setLabel",data:e.data,method:"POST",load:!0}),publishVideo:e=>Mw.request({url:"/homecommon/publishVideo",data:e.data,method:"POST"}),updateVideo:e=>Mw.request({url:"/homecommon/updateVideo",data:e.data,method:"POST"}),commentList:e=>Mw.request({url:"/home/commentList",query:e.query,method:"POST"}),levelCommentList:e=>Mw.request({url:"/home/levelCommentList",query:e.query,method:"POST"}),thumbsUp:e=>Mw.request({url:"/home/thumbsUp",query:e.query,method:"POST"}),comment:e=>Mw.request({url:"/home/comment",query:e.query,method:"POST"}),videoLike:e=>Mw.request({url:"/home/videoLike",query:e.query,method:"POST"}),browseLog:e=>Mw.request({url:"/home/browseLog",query:e.query,method:"POST"}),hotVideos:e=>Mw.request({url:"/home/hotVideos",method:"POST"}),videoSearchLog:e=>Mw.request({url:"/home/videoSearchLog",method:"POST"}),videoSearch:e=>Mw.request({url:"/home/videoSearch",query:e.query,method:"POST"}),agreeFriend:e=>Mw.request({url:"/user/friend/agreeFriend",path:e.path,query:e.query,method:"POST"}),refuseFriend:e=>Mw.request({url:"/user/friend/refuseFriend",path:e.path,query:e.query,method:"POST"}),getFriendList:e=>Mw.request({url:"/user/friend/getFriendList",path:e.path,query:e.query,method:"GET"}),getFansList:e=>Mw.request({url:"/user/attention/getFansList",path:e.path,query:e.query,method:"GET"}),getAttentionList:e=>Mw.request({url:"/user/attention/getAttentionList",path:e.path,query:e.query,method:"GET"}),attention:e=>Mw.request({url:"/user/attention",path:e.path,data:e.data,method:"POST"}),videoBlock:e=>Mw.request({url:"/home/videoBlock",query:e.query,load:!0,method:"POST"}),reportVideo:e=>Mw.request({url:"/report/reportVideo",data:e.data,method:"POST"}),myLikeVideoList:e=>Mw.request({url:"/home/myLikeVideoList",query:e.query,method:"POST"}),getVideoById:e=>Mw.request({url:"/homecommon/getVideoById",query:e.query,method:"POST"}),videoShare:e=>Mw.request({url:"/home/videoShare",query:e.query,method:"POST"}),setAlarm:e=>Mw.request({url:"/home/setAlarm",query:e.query,method:"POST"}),getAlarm:()=>Mw.request({url:"/home/getAlarm",method:"POST"}),viewingTasks:()=>Mw.request({url:"/home/viewingTasks",method:"POST"})},yw={scrollList:e=>Mw.request({url:"/coreplay/app/scrollinfo/scroll-list",method:"GET",query:e.query,load:!0}),buyScrollList:e=>Mw.request({url:"/coreplay/app/scrollinfo/boughtListByUser",method:"GET",load:!0}),scrollinfo:e=>Mw.request({url:"/coreplay/app/scrollinfo",method:"GET",path:e.path,load:!0}),getDetailInfoByDate:e=>Mw.request({url:"/coreplay/app/scrollinfo/getDetailInfoByDate",method:"GET",query:e.query}),getDetailInfoByScrollId:e=>Mw.request({url:"/coreplay/app/scrollinfo/getDetailInfoByScrollId",method:"GET",path:e.path,query:e.query}),getDetailInfoByUserId:e=>Mw.request({url:"/coreplay/app/scrollinfo/getDetailInfoByUserId",method:"GET",query:e.query}),viewingTasks:e=>Mw.request({url:"/home/viewingTasks",method:"post",query:e.query}),buyScroll:e=>Mw.request({url:"/coreplay/app/scrollinfo/buyScroll",method:"post",data:e.data}),myQrcode:e=>Mw.request({url:"/user/team/getH5Link",method:"GET",query:e.query,responseType:"arraybuffer"}),nickname:e=>Mw.request({url:"/home/nickname",method:"post",query:e.query})},Iw={login:{userRegister:e=>Mw.request({url:"/user/register",data:e.data,load:!0}),getCaptcha:e=>Mw.request({url:"/user/sendVerifyCode",query:e.query,method:"GET"}),userLoginByPassword:e=>Mw.request({url:"/user/login",data:e.data,load:!0}),resetPassword:e=>Mw.request({url:"/user/login/resetPassword",data:e.data,path:e.path,method:"POST"}),getIMToken:e=>Mw.request({url:"/user/chat/getUserSig",query:e.query,method:"GET"})},mine:{getUserinfo:e=>Mw.request({url:"/user/getUserData",method:"GET"}),updateUserInfo:e=>Mw.request({url:"/user/updateUserData",data:e.data,method:"PUT",load:1}),myComment:e=>Mw.request({url:"/user/home/myComment",query:e.query,method:"POST"}),certification:e=>Mw.request({url:"/user/info/certification",data:e.data,method:"POST",load:!0}),pay:e=>Mw.request({url:"/home/pay",query:e.query,method:"POST"}),getBalanceLog:e=>Mw.request({url:"/home/getBalanceLog",query:e.query,method:"POST"}),selectPurse:e=>Mw.request({url:"/user/selectPurse",query:e.query,method:"GET"}),releasedList:e=>Mw.request({url:"/user/released/list",query:e.query,method:"GET"})},video:vw,news:{getUserSig:e=>Mw.request({url:"/user/chat/getUserSig",method:"GET",query:e.query}),setNotes:e=>Mw.request({url:"/user/friend/setNotes",method:"POST",query:e.query}),deleteFriend:e=>Mw.request({url:"/user/friend/deleteFriend",method:"POST",path:e.path}),addFriend:e=>Mw.request({url:"/user/friend/addFriend",method:"POST",path:e.path}),getFriendListPage:e=>Mw.request({url:"/user/friend/getFriendListPage",path:e.path,query:e.query,method:"GET"}),searchFriendByName:e=>Mw.request({url:"/user/friend/searchFriendByName",path:e.path,query:e.query,method:"GET"}),getImToken:e=>Mw.request({url:"/im/token/getUserAppToken",method:"get",query:e}),sendRedBag:e=>Mw.request({url:"/home/sendRedBag",method:"POST",data:e.data}),grabred:e=>Mw.request({url:"/home/grabred",method:"POST",data:e.data}),getRedbag:e=>Mw.request({url:"/home/getRedbag",method:"POST",query:e.data}),grabredLog:e=>Mw.request({url:"/home/grabredLog",method:"POST",query:e})},team:{myTeam:(e={})=>Mw.request({url:"/user/team/get",method:"GET"}),lowTeam:e=>Mw.request({url:"/home/lowTeam",method:"post",query:e.query})},intergral:yw,uploadImg:"/homecommon/upload",uploadVideo:"/homecommon/uploadVideo",getArticle:e=>Mw.request({url:"/home/getArticle",query:e.query,method:"POST"})},Mw={config:{host:"http://1.94.221.165:8101",uploadFilePath:"/homecommon/file/preview?fileName=",uploadVideoPath:"/homecommon/file/play?fileName=",img_size:5,video_size:300,h5:"",TChat:{SDKAppID:"1600057470",secretKey:"7d016821bf27a846739e209534abe4c4bba131559b3318e19f8ccf9294e08b29",userSig:""}},reg:{tel:/^1[3-9]\d{9}$/,idCard:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/},alert(e){if(null!=e&&null!=e)return"string"==typeof e||"number"==typeof e?(uni.showToast({title:""+e,icon:"none",duration:3e3}),null):(e.title=e.title?e.title:"",e.content=e.content?e.content:"",e.confirmText=e.confirmText?e.confirmText:"确定",e.showCancel=!1!==e.showCancel,e.cancelText=e.cancelText?e.cancelText:"取消",new Promise(((t,n)=>{uni.showModal({title:e.title,content:e.content,confirmText:e.confirmText,showCancel:e.showCancel,cancelText:e.cancelText,success:n=>{e.success&&e.success(n),t(n)},fail:t=>{e.fail&&e.fail(t),n(t)},complete:e=>{}})})))},upload:e=>new Promise(((t,n)=>{let o=uni.getStorageSync("token")||"";e.url=e.url?e.url:Iw[{img:"uploadImg",video:"uploadVideo"}[e.mode]],console.log("obj.url",e.url),e.file=e.file?e.file:"",e.data=e.data?e.data:{},e.header={"Access-Control-Allow-Origin":"*",...e.header},o&&(e.header.Authorization=`Bearer ${o}`),uni.showLoading({title:"正在上传"}),uni.uploadFile({url:Mw.config.host+e.url,filePath:e.file,header:e.header,formData:e.data,dataType:"json",name:"file",success:n=>{uni.hideLoading(),e.success&&e.success(JSON.parse(n.data)),t(JSON.parse(n.data))},fail:t=>{uni.hideLoading(),e.fail&&e.fail(t.data),n(t)}})})),request(e){let t=uni.getStorageSync("token")||"";return new Promise(((n,o)=>{let i=Mw.config.host+(e.url?e.url:"/api/index/index");e.path&&e.path instanceof Array&&e.path.forEach((e=>{i+=`/${e}`})),e.query&&(i=Mw.setUrl(i,e.query)),e.load&&uni.showLoading({title:"加载中",mask:!0}),e.header={"ngrok-skip-browser-warning":!0,"Content-Type":"application/json;charset=UTF-8","Access-Control-Allow-Headers":"Origin, X-Requested-With, Content-Type, Accept","Access-Control-Allow-Origin":"*",IS_APP_REQ:"APP_REQ",...e.header},t&&(e.header.Authorization=`Bearer ${t}`),console.log("request url",i),console.log("request data",e.data),console.log("request header",e.header),uni.request({url:i,method:e.method?e.method:"POST",sslVerify:!1,data:e.data,header:e.header,dataType:"json",responseType:e.responseType||"text",success:t=>{e.load&&uni.hideLoading(),401==t.data.code&&Mw.logout((()=>{Mw.alert("请先登录"),o(t.data)})),e.success&&e.success(t.data),n(t.data)},fail:t=>{console.log("fail",t),e.load&&uni.hideLoading(),e.fail&&e.fail(t),o(t)},complete(t){e.complete&&e.complete(t)}})}))},imgReplace:(e,t)=>(t||(e=e.replace(/<img src="/gi,'<img src="'+Mw.config.host)),e.replace(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/gi,"<p").replace(/<p>/gi,'<p style="font-size: 15px; line-height: 25px;">').replace(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(width="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(style="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(alt="[^"]+")))/gi,"<img$1").replace(/<img([\s\w"-=\/\.:;]+)/gi,'<img style="width: 100%;" $1')),routeWithParams(e,t={},n="navigateTo"){const o=Mw.setUrl("url",t);switch(n){case"navigateTo":uni.navigateTo({url:o});break;case"redirectTo":uni.redirectTo({url:o});break;case"reLaunch":uni.reLaunch({url:o});break;case"switchTab":uni.switchTab({url:o});break;default:throw new Error(`Unsupported method: ${n}`)}},set_param(e){let t="";e||(e=[]);for(let[n,o]of Object.entries(e))t+=`${n}=${o}&`;return t="&"==t.substring(t.length-1)?t.substring(0,t.length-1):t,t||t.substring(1)},setUrl:(e,t)=>e+=(e.indexOf("?")<0?"?":"&")+Mw.set_param(t),query_to_param(e){let t={};return decodeURIComponent(e).split("&").forEach((e=>{let[n,o]=e.split("=");t[n]=o})),t},countDownd(e){if(!e)return;e=Number(e);let t=Mw.timeFormin(parseInt(time/86400)),n=Mw.timeFormin(parseInt(time%86400/3600)),o=Mw.timeFormin(parseInt(time%86400%3600/60)),i=Mw.timeFormin(parseInt(time%86400%3600%60)),a="";return t&&(a+=t+"天"),a+=n||0==n?n>9?n+":":"0"+n+":":"00:",a+=o||0==o?o>9?o+":":"0"+o+":":"00:",a+=i?i>9?i:"0"+i:"00",a},timeFormin:e=>e<0?0:e,toTwo(e){let t=String(Number(e));return t.length<2&&(t="0"+t),t},formatTime(e,t){const n=new Date;e&&"string"==typeof e||(e="yyyy-MM-dd HH:mm:ss"),t?String(t).length<=10&&(t*=1e3):t=n.valueOf();const o=new Date(t);let i=o.getFullYear(),a=o.getMonth()+1,s=o.getDate(),r=o.getDay(),c=o.getHours(),u=o.getMinutes(),l=o.getSeconds();(e=(e=(e=(e=(e=(e=e.replace("yyyy",i)).replace("MM",this.toTwo(a))).replace("M",a)).replace("dd",this.toTwo(s))).replace("d",s)).replace("w",["日","一","二","三","四","五","六"][r])).match("h")?(c=c>12?c-12:c,e=(e=e.replace("hh",this.toTwo(c))).replace("h",c)):e.match("H")&&(e=(e=e.replace("HH",this.toTwo(c))).replace("H",c));let d=c>12?"am":"pm";return e=(e=(e=(e=(e=e.replace("mm",this.toTwo(u))).replace("m",u)).replace("ss",this.toTwo(l))).replace("s",l)).replace("a",d)},strtotime(e,t){if(t&&e.indexOf(" ")>-1){let n=e.split(" "),o=n[0],i=n[1];t?String(t).length<=10&&(t*=1e3):t=a.valueOf();let a=new Date(t);switch(i){case"year":a.setYear(a.getFullYear()+parseInt(o));break;case"month":a.setMonth(a.getMonth()+parseInt(o));break;case"day":a.setDate(a.getDate()+parseInt(o));break;case"week":a.setDate(a.getDate()+7*parseInt(o));break;case"hour":a.setHours(a.getHours()+parseInt(o));break;case"minute":a.setMinutes(a.getMinutes()+parseInt(o))}return a.getTime()}return new Date(t).getTime()},upload_image(e){const t=e.count?e.count:8;if(e.type||(e.type=2),""!=e.value&&null==e.value&&null==e.value&&(e.value=1==e.type?"":[]),e.value.length>=t&&2==e.type)return void Mw.alert("上传图片已达上限");uni.chooseImage({count:1==e.type?1:t-e.value.length,sourceType:e.sourceType||["album","camera"],success:t=>{t.tempFiles.forEach((n=>{let o=1048576*Mw.config.img_size;n.size>o&&!e.unlimited?Mw.alert(`大小超过${Mw.config.img_size}m`):Mw.upload({file:n.path,mode:"img",success(n){if(200===n.code)return 2==e.type?e.value.push(Mw.format_url(n.msg,"img")):1==e.type&&(e.value=Mw.format_url(n.msg,"img")),console.log("obj",e,e.value),void(e.success&&e.success({result:n.msg,value:e.value}));Mw.alert(t.msg)}})}))},fail(e){e.errMsg}})},upload_video(e){!e.count||e.count,uni.chooseVideo({compressed:!1,success(t){Mw.upload({file:t.tempFilePath,mode:"video",success(t){if(200!=t.code)Mw.alert(t.msg);else{const n=Mw.format_url(t.msg,"video");e.success&&e.success({result:t.msg,value:n})}}})},fail(e){e.errMsg}})},upload_files(e){const t=e.value;Mw.config.file_suffix;const n=e.count?e.count:1;t.length>=n?Mw.alert("上传数量已达上限"):(console.log("upload_files",e),Mw.alert("暂未开放"))},upload_audio(e){const t=e.value;Mw.config.audio_suffix;const n=e.count?e.count:1;t.length>=n?Mw.alert("上传数量已达上限"):Mw.alert("暂未开放")},video_coverImage:e=>`${e}?x-oss-process=video/snapshot,t_1,m_fast`,view_imgs(e,t){e&&0!=e.length?uni.previewImage({urls:e,current:t}):Mw.alert("暂无")},view_file(e){let t=Mw.get_file_suffix(e).id;if(!["doc","xls","ppt","pdf","docx","xlsx","pptx"].includes(t))return Mw.alert("操作需要在web端"),void console.log("Unsupported suffix",t);uni.downloadFile({url:e,success:e=>{uni.openDocument({filePath:e.tempFilePath,fail:e=>{console.log("rs",e)}})}})},get_file_suffix(e,t){t||(t="file");const n=Mw.config[{file:"file_suffix",audio:"audio_suffix"}[t]];let o="";return e&&(o=n.find((t=>t.id===e.split(".").pop().toLowerCase()))),o},get_audio_suffix(e){const t=Mw.config.audio_suffix;let n="";return e&&(n=t.find((t=>t.id===e.split(".").pop().toLowerCase()))),n},payment(e){(e=e||{}).data=e.data?e.data:{}},payment_request(e){if(e.debug&&console.log("params",e),!e.fn)throw"no function";function t(t){const n=e.cb;n&&uni.redirectTo({url:Mw.setUrl("/index/pay_result",{orderNumber:n.orderNumbers||"",result:t,styles:n.styles||"",price:n.price||"",url:n.url||""})})}e.fn(e.data).then((n=>{if(e.debug&&console.log("request success result",n),200==n.code)switch(e.data.payType){case"1":switch(e.method){case"mp":n.data&&n.data.paySign?uni.requestPayment({provider:"wxpay",timeStamp:n.data.timeStamp,package:n.data.package,nonceStr:n.data.nonceStr,paySign:n.data.paySign,signType:n.data.signType,success(o){e.success&&e.success(n),t("success")},fail(n){e.fail&&e.fail(n),t("fail")},complete(t){e.debug&&console.log("requestPayment complete",t),e.complete&&e.complete(t)}}):e.fail&&e.fail("no data");break;case"app":uni.requestPayment({provider:"wxpay",orderInfo:n.data,success(o){e.success&&e.success(n),t("success")},fail(n){e.fail&&e.fail(n),t("fail")},complete(t){e.debug&&console.log("requestPayment complete",t),e.complete&&e.complete(t)}})}break;case"2":if("app"===e.method)uni.requestPayment({provider:"alipay",orderInfo:n.msg,success(o){e.success&&e.success(n),t("success")},fail(n){e.fail&&e.fail(n),t("fail")},complete(t){e.debug&&console.log("requestPayment complete",t),e.complete&&e.complete(t)}});break;case"4":e.success&&e.success(n),t("success")}else Mw.alert(n.msg),e.fail&&e.fail(n)})).catch((e=>{console.log("request catch result",e)}))},weChatLogin(e){e=e||{};const t=uni.getStorageSync("parent_id"),n=uni.getStorageSync("admin_id");uni.getUserProfile({desc:"weixin",success:o=>{const i=o.userInfo;let a={nickName:i.nickName,avatarUrl:i.avatarUrl};uni.login({provider:"weixin",success:o=>{a.code=o.code,a.platform="wechatMini",t&&(a.parent_id=t),n&&(a.admin_id=n),"login:ok"==o.errMsg&&Mw.request({url:"/api/user/third",data:a,load:1}).then((t=>{200==t.code&&e.success&&e.success(t)}))}})},fail(t){Mw.alert("您拒绝了授权"),e.fail&&e.fail(t)},complete(){e.complete&&e.complete()}})},authorize(e){return new Promise(((t,n)=>{e||(e={});const o={location:{name:"定位服务",scope:"scope.userLocation",txt:"需要获取您的地理位置"},photosAlbum:{name:"相册",scope:"scope.writePhotosAlbum",txt:"需要访问您的相册"},camera:{name:"摄像头",scope:"scope.camera",txt:"需要访问您的摄像头"}};e.key&&(e={...e,...o[e.key]});this[""](e).then((n=>{e.success&&e.success(n),t(n)})).catch((t=>{e.fail&&e.fail(t),n(t)}))}))},appAuthorize(e){return new Promise(((t,n)=>{if(!1===uni.getSystemSetting().locationEnabled)return this.alert(e.txt),void n({msg:"未授权对应功能"});const o=uni.getAppAuthorizeSetting().locationAuthorized;if(console.log("locationAuthorized",o),"config error"!==o){if("denied"===o);else if("authorized"===o)return void t(e);if("android"!=uni.getSystemInfoSync().platform)return this.alert("请在设置里允许打开定位信息"),void t({msg:"用户未开启定位权限"});plus.android.requestPermissions(["android.permission.ACCESS_FINE_LOCATION"],(e=>{for(let t=0;t<e.granted.length;t++){let n=e.granted[t];console.log("已获取的权限:"+n)}for(let t=0;t<e.deniedPresent.length;t++){let n=e.deniedPresent[t];console.log("拒绝本次申请的权限:"+n)}for(let t=0;t<e.deniedAlways.length;t++){let n=e.deniedAlways[t];console.log("永久拒绝申请的权限:"+n)}[-1].includes(null)&&uni.openAppAuthorizeSetting({success:e=>{n({msg:"引导用户打开设置页面",info:e})},fail:e=>{n({msg:"用户设置页面打开失败",info:e})}})}),(e=>{console.log("申请权限错误:"+e.code+" = "+e.message),t({code:e.code,message:e.message})}))}else n({msg:"开发者未勾选定位服务模块"})}))},weChatAuthorize:e=>new Promise(((t,n)=>{["scope.userInfo","scope.userLocation","scope.userLocationBackground","scope.address","scope.record","scope.writePhotosAlbum","scope.camera","scope.invoice","scope.invoiceTitle","scope.werun"].includes(e.scope)?uni.authorize({scope:e.scope,success:e=>{t(e)},fail:t=>{n(t),Mw.alert({title:"系统提示",value:e.txt,success:e=>{e.confirm&&uni.openSetting()}})}}):t({msg:"不在限制范围内"})})),finalLogin(e,t){const n=e.msg;uni.setStorageSync("token",n),uni.showLoading({mask:!0}),Mw.getUserinfo((e=>{uni.$emit("login"),Mw.loginTencent(e),setTimeout((()=>{uni.switchTab({url:"/pages/index/index"})}),500),t&&t()}))},loginAccountManagement(e){let t=uni.getStorageSync("userInfoList")||[];const n=t.findIndex((t=>t.userId===e.userId));-1!==n&&t.splice(n,1),t.push(e),uni.setStorageSync("userInfoList",t)},loginTencent(e){Iw.login.getIMToken({}).then((t=>{Mw.config.TChat.SDKAppID,e.id,t.msg,uni.$chat.login({userID:e.id+"",userSig:t.msg}).then((e=>{console.log("im login success",e)}))}))},getUserinfo:e=>new Promise((t=>{Iw.mine.getUserinfo().then((n=>{if(200===n.code){const o=n.data;t(o),mw.commit("setState",{key:"userinfo",value:o}),uni.setStorageSync("userinfo",o),e&&e(o)}})).finally((()=>{uni.hideLoading()}))})),isLogin(e){let t=uni.$store.state.userinfo;return new Promise(((n,o)=>{t.id?(n(),e&&e()):o()}))},logout(e){mw.state.userinfo.userId&&(uni.$emit("logout"),uni.$chat.logout().then((e=>{console.log("tim logout rs")})).catch((e=>{console.log("tim logout error:",e)}))),mw.commit("setState",{key:"userinfo",value:{}}),uni.removeStorageSync("userinfo"),uni.removeStorageSync("token"),e&&e()},isAuth(e){Mw.isLogin((()=>{const t=uni.$store.state.userinfo;console.log("userinfo.userIdCard",t.userIdCard),t.userIdCard?e.success&&e.success(t):(e.noLink||uni.navigateTo({url:"/pages/mine/realname"}),e.fail&¶rm.fail(t))}))},makePhone(e){e||Mw.alert("暂无手机号"),uni.makePhoneCall({phoneNumber:e,fail(e){console.log("err",e)}})},format_url:(e,t)=>e?e.match(/^http/)?e:"https://9yvideo.oss-cn-beijing.aliyuncs.com/"+e:"",replace_url(e){if(!e||"string"!=typeof e)throw`${e} is not String`;return e.slice(e.indexOf("/images")+1)},formart_lnglat:e=>e?e=parseFloat(Number(e).toFixed(6)):e,checkLink(e,t="navigateTo"){const n=Wv(),o=e,i=n.findIndex((e=>e.route==o));i<0?uni[t]({url:`/${o}`}):uni.navigateBack({delta:n.length-i-1})},rp(e){var t=["零","一","二","三","四","五","六","七","八","九","十"],n="";e=""+e;for(var o=0;o<e.length;o++)n+=t[parseInt(e.charAt(o))];return 2==n.length&&(n.charAt(1)==t[0]?(n=n.charAt(0)+t[10])==t[1]+t[10]&&(n=t[10]):n.charAt(0)==t[1]?n=t[10]+n.charAt(1):n.charAt(0)==t[2]?n=t[2]+t[10]+n.charAt(1):n.charAt(0)==t[3]?n=t[3]+t[10]+n.charAt(1):n.charAt(0)==t[4]?n=t[4]+t[10]+n.charAt(1):n.charAt(0)==t[5]?n=t[5]+t[10]+n.charAt(1):n.charAt(0)==t[6]?n=t[6]+t[10]+n.charAt(1):n.charAt(0)==t[7]?n=t[7]+t[10]+n.charAt(1):n.charAt(0)==t[8]?n=t[8]+t[10]+n.charAt(1):n.charAt(0)==t[9]?n=t[9]+t[10]+n.charAt(1):n.charAt(0)==t[10]&&(n=t[10]+t[10]+n.charAt(1))),n},copyText(e){uni.setClipboardData({data:e,success:()=>{Mw.alert({title:"文本已复制到剪贴板"})}})},showToastAndRedirect(e,t="none",n=()=>{}){uni.showToast({title:e,icon:t,duration:2e3,complete:()=>{n(),uni.hideLoading()}})},toChat(e){uni.navigateTo({url:Mw.setUrl("/pages/news/question-answer/index",{name:e.name,msgId:e.msgId,type:e.type})})},scan(){uni.scanCode({success:e=>{if(e&&e.result){let t=JSON.parse(e.result);"user"==t.key&&uni.navigateTo({url:Mw.setUrl("/pages/news/applyFriend",{userId:t.userId,nickname:t.userNickname})})}},fail:e=>{Mw.alert("二维码扫描失败")}})}},Cw={onLaunch(){this.getUserinfo()},methods:{getUserinfo(){const e=uni.getStorageSync("token"),t=uni.getStorageSync("userinfo");e&&(t&&mw.commit("setState",{key:"userinfo",value:t}),Mw.getUserinfo((()=>{Mw.loginTencent(t),Mw.loginAccountManagement(t)})))}}};EC(Cw,{init:TC,setup(e){const t=_f(),n=()=>{var n;n=e,Object.keys(G_).forEach((e=>{G_[e].forEach((t=>{ga(e,t,n)}))}));const{onLaunch:o,onShow:i,onPageNotFound:a,onError:s}=e,r=function({path:e,query:t}){return u(Ny,{path:e,query:t}),u(Gy,Ny),u({},Ny)}({path:t.path.slice(1)||__uniRoutes[0].meta.route,query:lt(t.query)});if(o&&N(o,r),i&&N(i,r),!t.matched.length){const e={notFound:!0,openType:"appLaunch",path:t.path,query:{},scene:1001};a&&N(a,e)}s&&(e.appContext.config.errorHandler=e=>{N(s,e)})};return gs(Cd).isReady().then(n),va((()=>{window.addEventListener("resize",ht(kC,50,{setTimeout:setTimeout,clearTimeout:clearTimeout})),window.addEventListener("message",LC),document.addEventListener("visibilitychange",bC),function(){let e=null;try{e=window.matchMedia("(prefers-color-scheme: dark)")}catch(t){}if(e){let t=e=>{lL.emit(fe,{theme:e.matches?"dark":"light"})};e.addEventListener?e.addEventListener("change",t):e.addListener(t)}}()})),t.query},before(e){e.mpType="app";const{setup:t}=e,n=()=>(nr(),cr(VD));e.setup=(e,o)=>{const i=t&&t(e,o);return m(i)?n:i},e.render=n}});var Tw="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Sw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ew(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})})),n}var Dw={exports:{}};Dw.exports=function(){function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)),o}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){s(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,n){return(d=l()?Reflect.construct.bind():function(e,t,n){var o=[null];return o.push.apply(o,t),t=new(Function.bind.apply(e,o)),n&&u(t,n.prototype),t}).apply(null,arguments)}function p(e){var t="function"==typeof Map?new Map:void 0;return function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)}(e)}function h(e,t){if(null==e)return{};var n,o=function(e,t){if(null==e)return{};for(var n,o={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n]);return o}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t=l();return function(){var n,o=c(e);if(n=t?(n=c(this).constructor,Reflect.construct(o,arguments,n)):o.apply(this,arguments),o=this,n&&("object"==typeof n||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return f(o)}}function _(e,t){return v(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,a=[],s=!0,r=!1;try{for(n=n.call(e);!(s=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);s=!0);}catch(c){r=!0,i=c}finally{try{s||null==n.return||n.return()}finally{if(r)throw i}}return a}}(e,t)||I(e,t)||C()}function m(e){return function(e){if(Array.isArray(e))return M(e)}(e)||y(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){if(Array.isArray(e))return e}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function I(e,t){var n;if(e)return"string"==typeof e?M(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){var n,o,i,a,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return i=!(o=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return o=e.done,e},e:function(e){i=!0,n=e},f:function(){try{o||null==s.return||s.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(s=I(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var S={SDK_READY:"sdkStateReady",SDK_NOT_READY:"sdkStateNotReady",SDK_DESTROY:"sdkDestroy",MESSAGE_RECEIVED:"onMessageReceived",ROOM_CUSTOM_DATA_RECEIVED:"onRoomCustomDataReceived",MESSAGE_MODIFIED:"onMessageModified",MESSAGE_REVOKED:"onMessageRevoked",MESSAGE_READ_BY_PEER:"onMessageReadByPeer",MESSAGE_READ_RECEIPT_RECEIVED:"onMessageReadReceiptReceived",MESSAGE_EXTENSIONS_UPDATED:"onMessageExtensionsUpdated",MESSAGE_EXTENSIONS_DELETED:"onMessageExtensionsDeleted",MESSAGE_REACTIONS_UPDATED:"onMessageReactionsUpdated",CONVERSATION_LIST_UPDATED:"onConversationListUpdated",TOTAL_UNREAD_MESSAGE_COUNT_UPDATED:"onTotalUnreadMessageCountUpdated",CONVERSATION_GROUP_LIST_UPDATED:"onConversationGroupListUpdated",CONVERSATION_IN_GROUP_UPDATED:"onConversationInGroupUpdated",GROUP_LIST_UPDATED:"onGroupListUpdated",GROUP_ATTRIBUTES_UPDATED:"groupAttributesUpdated",GROUP_COUNTER_UPDATED:"onGroupCounterUpdated",TOPIC_CREATED:"onTopicCreated",TOPIC_DELETED:"onTopicDeleted",TOPIC_UPDATED:"onTopicUpdated",PROFILE_UPDATED:"onProfileUpdated",USER_STATUS_UPDATED:"onUserStatusUpdated",BLACKLIST_UPDATED:"blacklistUpdated",FRIEND_LIST_UPDATED:"onFriendListUpdated",FRIEND_GROUP_LIST_UPDATED:"onFriendGroupListUpdated",FRIEND_APPLICATION_LIST_UPDATED:"onFriendApplicationListUpdated",MY_FOLLOWERS_LIST_UPDATED:"onMyFollowersListUpdated",MY_FOLLOWING_LIST_UPDATED:"onMyFollowingListUpdated",MUTUAL_FOLLOWERS_LIST_UPDATED:"onMutualFollowersListUpdated",KICKED_OUT:"kickedOut",ERROR:"error",NET_STATE_CHANGE:"netStateChange",ALL_RECEIVE_MESSAGE_OPT_UPDATED:"onAllReceiveMessageOptUpdated"},E={MSG_TEXT:"TIMTextElem",MSG_IMAGE:"TIMImageElem",MSG_SOUND:"TIMSoundElem",MSG_AUDIO:"TIMSoundElem",MSG_FILE:"TIMFileElem",MSG_FACE:"TIMFaceElem",MSG_VIDEO:"TIMVideoFileElem",MSG_GEO:"TIMLocationElem",MSG_LOCATION:"TIMLocationElem",MSG_GRP_TIP:"TIMGroupTipElem",MSG_GRP_SYS_NOTICE:"TIMGroupSystemNoticeElem",MSG_CUSTOM:"TIMCustomElem",MSG_MERGER:"TIMRelayElem",MSG_PRIORITY_HIGH:"High",MSG_PRIORITY_NORMAL:"Normal",MSG_PRIORITY_LOW:"Low",MSG_PRIORITY_LOWEST:"Lowest",CONV_C2C:"C2C",CONV_GROUP:"GROUP",CONV_TOPIC:"TOPIC",CONV_SYSTEM:"@TIM#SYSTEM",CONV_AT_ME:1,CONV_AT_ALL:2,CONV_AT_ALL_AT_ME:3,CONV_MARK_TYPE_STAR:1,CONV_MARK_TYPE_UNREAD:2,CONV_MARK_TYPE_FOLD:4,CONV_MARK_TYPE_HIDE:8,GRP_PRIVATE:"Private",GRP_WORK:"Private",GRP_PUBLIC:"Public",GRP_CHATROOM:"ChatRoom",GRP_MEETING:"ChatRoom",GRP_AVCHATROOM:"AVChatRoom",GRP_COMMUNITY:"Community",GRP_ROOM:"Room",GRP_LIVE:"Live",GRP_MBR_ROLE_OWNER:"Owner",GRP_MBR_ROLE_ADMIN:"Admin",GRP_MBR_ROLE_MEMBER:"Member",GRP_MBR_ROLE_CUSTOM:"Custom",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,GRP_TIP_BAN_AVCHATROOM_MEMBER:10,GRP_TIP_UNBAN_AVCHATROOM_MEMBER:11,MSG_REMIND_ACPT_AND_NOTE:"AcceptAndNotify",MSG_REMIND_ACPT_NOT_NOTE:"AcceptNotNotify",MSG_REMIND_DISCARD:"Discard",RECEIVE_WITH_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT:"AcceptNotNotifyExceptAt",NOT_RECEIVE_MSG_EXCEPT_AT:"NotReceiveMsgExceptAt",GENDER_UNKNOWN:"Gender_Type_Unknown",GENDER_FEMALE:"Gender_Type_Female",GENDER_MALE:"Gender_Type_Male",KICKED_OUT_MULT_ACCOUNT:"multipleAccount",KICKED_OUT_MULT_DEVICE:"multipleDevice",KICKED_OUT_USERSIG_EXPIRED:"userSigExpired",KICKED_OUT_REST_API:"REST_API_Kick",ALLOW_TYPE_ALLOW_ANY:"AllowType_Type_AllowAny",ALLOW_TYPE_NEED_CONFIRM:"AllowType_Type_NeedConfirm",ALLOW_TYPE_DENY_ANY:"AllowType_Type_DenyAny",FORBID_TYPE_NONE:"AdminForbid_Type_None",FORBID_TYPE_SEND_OUT:"AdminForbid_Type_SendOut",JOIN_OPTIONS_FREE_ACCESS:"FreeAccess",JOIN_OPTIONS_NEED_PERMISSION:"NeedPermission",JOIN_OPTIONS_DISABLE_APPLY:"DisableApply",JOIN_STATUS_SUCCESS:"JoinedSuccess",JOIN_STATUS_ALREADY_IN_GROUP:"AlreadyInGroup",JOIN_STATUS_WAIT_APPROVAL:"WaitAdminApproval",INVITE_OPTIONS_DISABLE_INVITE:"DisableInvite",INVITE_OPTIONS_NEED_PERMISSION:"NeedPermission",INVITE_OPTIONS_FREE_ACCESS:"FreeAccess",GRP_PROFILE_OWNER_ID:"ownerID",GRP_PROFILE_CREATE_TIME:"createTime",GRP_PROFILE_LAST_INFO_TIME:"lastInfoTime",GRP_PROFILE_MEMBER_NUM:"memberNum",GRP_PROFILE_MAX_MEMBER_NUM:"maxMemberNum",GRP_PROFILE_JOIN_OPTION:"joinOption",GRP_PROFILE_INVITE_OPTION:"inviteOption",GRP_PROFILE_INTRODUCTION:"introduction",GRP_PROFILE_NOTIFICATION:"notification",GRP_PROFILE_MUTE_ALL_MBRS:"muteAllMembers",SNS_ADD_TYPE_SINGLE:"Add_Type_Single",SNS_ADD_TYPE_BOTH:"Add_Type_Both",SNS_DELETE_TYPE_SINGLE:"Delete_Type_Single",SNS_DELETE_TYPE_BOTH:"Delete_Type_Both",SNS_APPLICATION_TYPE_BOTH:"Pendency_Type_Both",SNS_APPLICATION_SENT_TO_ME:"Pendency_Type_ComeIn",SNS_APPLICATION_SENT_BY_ME:"Pendency_Type_SendOut",SNS_APPLICATION_AGREE:"Response_Action_Agree",SNS_APPLICATION_AGREE_AND_ADD:"Response_Action_AgreeAndAdd",SNS_CHECK_TYPE_BOTH:"CheckResult_Type_Both",SNS_CHECK_TYPE_SINGLE:"CheckResult_Type_Single",SNS_TYPE_NO_RELATION:"CheckResult_Type_NoRelation",SNS_TYPE_A_WITH_B:"CheckResult_Type_AWithB",SNS_TYPE_B_WITH_A:"CheckResult_Type_BWithA",SNS_TYPE_BOTH_WAY:"CheckResult_Type_BothWay",NET_STATE_CONNECTED:"connected",NET_STATE_CONNECTING:"connecting",NET_STATE_DISCONNECTED:"disconnected",MSG_AT_ALL:"__kImSDK_MesssageAtALL__",READ_ALL_C2C_MSG:"readAllC2CMessage",READ_ALL_GROUP_MSG:"readAllGroupMessage",READ_ALL_MSG:"readAllMessage",USER_STATUS_UNKNOWN:0,USER_STATUS_ONLINE:1,USER_STATUS_OFFLINE:2,USER_STATUS_UNLOGINED:3,IOS_OFFLINE_PUSH_NO_SOUND:"push.no_sound",IOS_OFFLINE_PUSH_DEFAULT_SOUND:"default"},D={NEW_INVITATION_RECEIVED:"newInvitationReceived",INVITEE_ACCEPTED:"ts_invitee_accepted",INVITEE_REJECTED:"ts_invitee_rejected",INVITATION_CANCELLED:"ts_invitation_cancelled",INVITATION_TIMEOUT:"ts_invitation_timeout",INVITATION_MODIFIED:"ts_invitation_modified",ACTION_TYPE_UNKNOWN:0,ACTION_TYPE_INVITE:1,ACTION_TYPE_CANCEL_INVITE:2,ACTION_TYPE_ACCEPT_INVITE:3,ACTION_TYPE_REJECT_INVITE:4,ACTION_TYPE_INVITE_TIMEOUT:5},k=(a(q,[{key:"use",value:function(e){if("function"!=typeof e)throw"middleware must be a function";return this.cache.push(e),this}},{key:"next",value:function(e){if(this.middlewares&&0<this.middlewares.length)return this.middlewares.shift().call(this,this.options,this.next.bind(this))}},{key:"run",value:function(e){return this.middlewares=this.cache.map((function(e){return e})),this.options=e,this.next()}}]),q),L=(a(F,[{key:"equal",value:function(e){return null!==e&&this.low===e.low&&this.high===e.high}},{key:"toString",value:function(){var e=Number(this.high).toString(16),t=Number(this.low).toString(16);if(t.length<8)for(var n=8-t.length;n;)t="0"+t,n--;return e+t}}]),F),b={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"},INDONESIA:{DEFAULT:"wss://wssidn-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT0:"wss://*w4s.my-imcloud.com",DEFAULT:"wss://wsssgp.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",STAT:"https://apisgp.my-imcloud.com",ANYCAST:"wss://162.14.19.159"},KOREA:{DEFAULT0:"wss://*w4k.my-imcloud.com",DEFAULT:"wss://wsskr.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",STAT:"https://apikr.my-imcloud.com",ANYCAST:"wss://162.14.13.104"},GERMANY:{DEFAULT0:"wss://*w4g.my-imcloud.com",DEFAULT:"wss://wssger.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",STAT:"https://apiger.my-imcloud.com",ANYCAST:"wss://162.14.3.17"},IND:{DEFAULT0:"wss://*w4i.my-imcloud.com",DEFAULT:"wss://wssind.my-imcloud.com",BACKUP:"wss://wssind.im.qcloud.com",STAT:"https://apiind.my-imcloud.com",ANYCAST:"wss://162.14.18.188"},JPN:{DEFAULT0:"wss://*w4j.my-imcloud.com",DEFAULT:"wss://wssjpn.im.qcloud.com",BACKUP:"wss://wssjpn.my-imcloud.com",STAT:"https://apijpn.my-imcloud.com"},USA:{DEFAULT0:"wss://*w4u.my-imcloud.com",DEFAULT:"wss://wssusa.im.qcloud.com",BACKUP:"wss://wssusa.my-imcloud.com",STAT:"https://apiusa.my-imcloud.com",ANYCAST:"wss://162.14.10.42"},INDONESIA:{DEFAULT0:"wss://*w4y.my-imcloud.com",DEFAULT:"wss://wssidn.im.qcloud.com",BACKUP:"wss://wssidn.my-imcloud.com",STAT:"https://apiidn.my-imcloud.com",ANYCAST:"wss://43.129.34.169"}}},A={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15,DONUT_NATIVE_APP:19,NS_NATIVE_APP:20,RN_NATIVE_APP:21},R="1.7.3",O=537048168,w="CHINA",P={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent:function(){this.CURRENT=b.PRODUCTION[0<arguments.length&&void 0!==arguments[0]?arguments[0]:w]}},NAME:{OPEN_IM:"openim",OPEN_IM_MSG_EXT:"openim_msg_ext_http_svc",GRP:"group_open_http_svc",GRP_AV:"group_open_avchatroom_http_svc",GRP_COMMUNITY:"million_group_open_http_svc",GRP_ATTR:"group_open_attr_http_svc",FD:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GRP_NO_AUTH:"group_open_http_noauth_svc",BIG_GRP_POLLING:"group_open_long_polling_http_svc",BIG_GRP_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MSG:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush",IM_MSG_AUDIT_MGR:"im_msg_audit_mgr",TUIROOM_SVR:"tui_room_svr",IM_OPEN_TRANSLATE:"im_open_translate",IM_OPEN_SPEECH:"im_open_speech",MSG_SEARCH:"message_search",FOLLOW:"follow",OFFLINE_PUSH_REPORT:"offline_push_report",IM_MSG_LOGIC:"im_msg_db_logic"}},N={SEARCH_GRP_SNS:new L(0,Math.pow(2,1)).toString(),AV_HISTORY_MSG:new L(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new L(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new L(0,Math.pow(2,4)).toString(),AV_MBR_LIST:new L(0,Math.pow(2,6)).toString(),USER_STATUS:new L(0,Math.pow(2,7)).toString(),CONV_MARK:new L(0,Math.pow(2,9)).toString(),CONV_GROUP:new L(0,Math.pow(2,10)).toString(),AV_BAN_MBR:new L(0,Math.pow(2,11)).toString(),MSG_EXT:new L(0,Math.pow(2,13)).toString(),GRP_COUNTER:new L(0,Math.pow(2,15)).toString(),PLUGIN_TRANSLATE:new L(Math.pow(2,6)).toString(),PLUGIN_VOICE_TO_TEXT:new L(Math.pow(2,7)).toString(),PLUGIN_CS:new L(Math.pow(2,8)).toString(),PLUGIN_PUSH:new L(Math.pow(2,9)).toString(),PLUGIN_BOT:new L(Math.pow(2,10)).toString(),MSG_REACTION:new L(Math.pow(2,16)).toString(),FOLLOW:new L(Math.pow(2,20)).toString()},G="group_profile",U=["Type","Name","Introduction","Notification","FaceUrl","Owner_Account","CreateTime","InfoSeq","LastInfoTime","LastMsgTime","MemberNum","MaxMemberNum","ApplyJoinOption","NextMsgSeq","ShutUpAllMember","InviteJoinOption"],x=["Role","JoinTime","MsgSeq","MsgFlag"];function F(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;o(this,F),this.high=e,this.low=t}function q(){o(this,q),this.cache=[],this.options=null}P.HOST.setCurrent(w);for(var V,B="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting),H=B&&"function"==typeof wx.createGamePortal,j="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),K="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),$="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),z="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),W="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,Y="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin,X=B&&"object"===n(wx.miniapp),J="undefined"!=typeof uni,Z=B||j||K||$||z||Y||W,Q="undefined"==typeof window&&!Z&&void 0!==Tw&&void 0!==Tw.NativeScriptGlobals,ee=void 0!==Tw&&(void 0!==Tw.nativeModuleProxy||void 0!==Tw.ReactNative),te="undefined"!=typeof uni?!Z:"undefined"!=typeof window&&!Z&&!ee,ne=j?qq:K?tt:$?swan:z?my:B?wx:Y?uni:W?jd:{},oe=te&&window&&window.navigator&&window.navigator.userAgent||"",ie=(W="WEB",/(micromessenger|webbrowser)/i.test(oe)?W="WEB":j?W="QQ_MP":K?W="TT_MP":$?W="BAIDU_MP":z?W="ALI_MP":B?W=X?"DONUT_NATIVE_APP":"WX_MP":Y?W="UNI_NATIVE_APP":Q?W="NS_NATIVE_APP":ee&&(W="RN_NATIVE_APP"),A[W]),ae=(X=/iPad/i.test(oe),Q=/iPhone/i.test(oe)&&!X,W=/iPod/i.test(oe),Q||X||W),se=(Q=oe.match(/OS (\d+)_/i))&&Q[1]?Q[1]:null,re=/Android/i.test(oe),ce=(X=oe.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i))?(W=X[1]&&parseFloat(X[1]),Q=X[2]&&parseFloat(X[2]),W&&Q?parseFloat(X[1]+"."+X[2]):W||null):null,ue=(X=!(Q=/Edge/i.test(oe))&&/Chrome/i.test(oe),/MSIE/.test(oe)||-1<oe.indexOf("Trident")&&-1<oe.indexOf("rv:11.0")),le=W=!(W=(W=/MSIE\s(\d+)\.\d/.exec(oe))&&parseFloat(W[1]))&&/Trident\/7.0/i.test(oe)&&/rv:11.0/.test(oe)?11:W,de=(W=/Safari/i.test(oe)&&!X&&!re&&!Q,/Windows/i.test(oe)),pe=/MAC OS X/i.test(oe),he=te&&"undefined"!=typeof Worker&&!ue,fe=re||ae,ge=te&&void 0!==window.tencent_cloud_im_csig_flutter_for_web_25F_cy,_e="undefined"!=typeof window&&void 0!==window.navigator&&(X=window.navigator.standalone,!(!ae||X||W)),me="undefined"!=typeof console?console:void 0!==Tw&&Tw.console?Tw.console:"undefined"!=typeof window&&window.console?window.console:{},ve=function(){},ye=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],Ie=ye.length;Ie--;)V=ye[Ie],console[V]||(me[V]=ve);function Me(){var e=new Date;return e.setTime(De()),e}function Ce(){Ee=0}function Te(){return Math.floor(De()/1e3)}var Se=me,Ee=0,De=function(){return(new Date).getTime()+Ee},ke=0;function Le(){return qt()?"%c Chat %c":"Chat"}function be(){var e=Me();return e.toLocaleTimeString("en-US",{hour12:!1})+"."+function(e){var t;switch(e.toString().length){case 1:t="00"+e;break;case 2:t="0"+e;break;default:t=e}return t}(e.getMilliseconds())}var Ae={arguments2String:function(e){var t="";if(1===e.length)t=e[0];else for(var n=0,o=e.length;n<o;n++){if(lt(e[n]))try{t+=dt(e[n])?JSON.stringify(e[n],["message","code"]):JSON.stringify(e[n])}catch(i){t+=i?i.message:"";break}else t+=e[n];t+=" "}return t},_exec:function(e,t){qt()?Se[e](Le(),"background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent",be(),t):Se[e]("".concat(Le()," ").concat(be()," ").concat(t))},d:function(){var e;ke<=-1&&(e=this.arguments2String(arguments),this._exec("debug",e))},l:function(){var e;ke<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},log:function(){var e;ke<=0&&(e=this.arguments2String(arguments),this._exec("log",e))},i:function(){var e;ke<=1&&(e=this.arguments2String(arguments),this._exec("info",e))},w:function(){var e;ke<=2&&(e=this.arguments2String(arguments),this._exec("warn",e))},e:function(){var e;ke<=3&&(e=this.arguments2String(arguments),this._exec("error",e))},setLevel:function(e){e<4&&this._exec("log","set level from "+ke+" to "+e),ke=e},getLevel:function(){return ke}},Re={JPG:1,JPEG:1,GIF:2,PNG:3,BMP:4,UNKNOWN:255},Oe={NICK:"".concat(Q="Tag_Profile_IM_","Nick"),GENDER:"".concat(Q,"Gender"),BIRTHDAY:"".concat(Q,"BirthDay"),LOCATION:"".concat(Q,"Location"),SELFSIGNATURE:"".concat(Q,"SelfSignature"),ALLOWTYPE:"".concat(Q,"AllowType"),LANGUAGE:"".concat(Q,"Language"),AVATAR:"".concat(Q,"Image"),MESSAGESETTINGS:"".concat(Q,"MsgSettings"),ADMINFORBIDTYPE:"".concat(Q,"AdminForbidType"),LEVEL:"".concat(Q,"Level"),ROLE:"".concat(Q,"Role")},we={GROUP:"".concat("Tag_SNS_IM_","Group"),REMARK:"".concat("Tag_SNS_IM_","Remark"),ADDSOURCE:"".concat("Tag_SNS_IM_","AddSource"),ADDWORDING:"".concat("Tag_SNS_IM_","Wording"),ADDTIME:"".concat("Tag_SNS_IM_","AddTime")},Pe={UNKNOWN:"".concat(X="Gender_Type_","Unknown"),FEMALE:"".concat(X,"Female"),MALE:"".concat(X,"Male")},Ne={NONE:"".concat("AdminForbid_Type_","None"),SEND_OUT:"".concat("AdminForbid_Type_","SendOut")},Ge={NEED_CONFIRM:"".concat("AllowType_Type_","NeedConfirm"),ALLOW_ANY:"".concat("AllowType_Type_","AllowAny"),DENY_ANY:"".concat("AllowType_Type_","DenyAny")},Ue="JoinedSuccess",xe="WaitAdminApproval",Fe="@TOPIC#_",qe=Object.prototype.hasOwnProperty;function Ve(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(ze(e)){for(var t in e)if(qe.call(e,t))return!1;return!0}return!!(Be(e)||He(e)||je(e))&&0===e.size}function Be(e){return"map"===pt(e)}function He(e){return"set"===pt(e)}function je(e){return"file"===pt(e)}function Ke(e){return null!==e&&("number"==typeof e&&!isNaN(+e)||"object"===n(e)&&e.constructor===Number)}function $e(e){return null!==e&&"object"===n(e)}function ze(e){if("object"===n(e)&&null!==e){if(null===(e=Object.getPrototypeOf(e)))return 1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return e===t}}function We(e){return"function"==typeof Array.isArray?Array.isArray(e):"array"===pt(e)}function Ye(e){return"function"==typeof e}function Xe(e){return"filelist"===pt(e)}function Je(e){return"string"==typeof e&&(e=e[0],!/[^a-zA-Z0-9]/.test(e))}function Ze(e,t,n,o){if(!lt(e)||!lt(t))return 0;for(var i,a=0,s=Object.keys(t),r=0,c=s.length;r<c;r++)if(i=s[r],!(ut(t[i])||n&&n.includes(i)))if(lt(e[i])&<(t[i]))a+=Ze(e[i],t[i],n,o);else{if(o&&o.includes(t[i]))continue;e[i]!==t[i]&&(e[i]=t[i],a+=1)}return a}function Qe(e,t){var n,o=new Map,i=T(e.entries());try{for(i.s();!(n=i.n()).done;){var a=_(n.value,2),s=a[0],r=a[1];r&&o.set(s,t?JSON.stringify(r):JSON.parse(JSON.stringify(r)))}}catch(c){i.e(c)}finally{i.f()}return o}function et(e){if(0===e.length)return 0;for(var t=0,n=0,o="undefined"!=typeof document&&void 0!==document.characterSet?document.characterSet:"UTF-8";void 0!==e[t];)n+=e[t++].charCodeAt[t]<=255?1:!1===o?3:2;return n}function nt(e){return e=e||99999999,Math.round(Math.random()*e)}function ot(){for(var e="",t=32;0<t;--t)e+=ht[Math.floor(Math.random()*ft)];return e}function it(e,t){for(var n in e)if(e[n]===t)return 1}function at(e){return-1===e.indexOf("http://")||-1===e.indexOf("https://")?"https://"+e:e.replace(/https|http/,"https")}function st(e){if(0===Object.getOwnPropertyNames(e).length)return Object.create(null);var t,o,i=Array.isArray(e)?[]:Object.create(null);for(o in e)null!==e[o]?void 0!==e[o]?(t=n(e[o]),0<=["string","number","function","boolean"].indexOf(t)?i[o]=e[o]:i[o]=st(e[o])):i[o]=void 0:i[o]=null;return i}var rt=["url"],ct=function(e){return"string"==typeof e},ut=function(e){return void 0===e},lt=function(e){return We(e)||$e(e)},dt=function(e){return e instanceof Error},pt=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},ht=(Date.now||(Date.now=function(){return(new Date).getTime()}),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),ft=ht.length,gt={};function _t(e,t){var n;return!(!We(e)||!We(t))&&(n=!1,t.forEach((function(t){var o=t.key,i=(t=t.value,e.find((function(e){return e.key===o})));i?i.value!==t&&(i.value=t,n=!0):(e.push({key:o,value:t}),n=!0)})),n)}function mt(e){return Ve(e)?[]:e.filter((function(e){return!0===e.isModified}))}function vt(e){return Ve(e)?[]:e.filter((function(e){return!1===e.isModified}))}function yt(e){return e===E.GRP_AVCHATROOM}function It(e){var t=e.type;return e=e.groupID,t===E.GRP_COMMUNITY||"".concat(e).startsWith("@TGS#_")&&!"".concat(e).includes(Fe)}function Mt(e){return"".concat(e).startsWith("@TGS#_")&&"".concat(e).includes(Fe)}function Ct(e){return ct(e)&&e.slice(0,3)===E.CONV_C2C}function Tt(e){return ct(e)&&e.slice(0,5)===E.CONV_GROUP}function St(e){return ct(e)&&e===E.CONV_SYSTEM}function Et(e,t){var n={};return Object.keys(e).forEach((function(o){n[o]=t(e[o],o)})),n}function Dt(e){return ee?Promise.resolve({width:0,height:0}):Z?new Promise((function(t,n){ne.getImageInfo({src:e,success:function(e){t({width:e.width,height:e.height})},fail:function(){t({width:0,height:0})}})})):ue&&9===le?Promise.resolve({width:0,height:0}):new Promise((function(t,n){var o=new Image;o.onload=function(){t({width:this.width,height:this.height}),o=null},o.onerror=function(){t({width:0,height:0}),o=null},o.src=e}))}function kt(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return"".concat(e()+e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e()).concat(e())}function Lt(){var e=re?"android":ae?"ios":de?"windows":pe?"mac":"unknown";if(Z)try{var t=ne.getSystemInfoSync().platform;void 0!==t&&(e=t)}catch(n){}return e}function bt(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.length<n;)e.push("0");for(;t.length<n;)t.push("0");for(var o=0;o<n;o++){var i=parseInt(e[o]),a=parseInt(t[o]);if(a<i)return 1;if(i<a)return-1}return 0}function At(e){var t=void 0===(t=e.originUrl)?void 0:t,n=e.originWidth,o=e.originHeight,i=(e=void 0===(e=e.min)?198:e,{url:void 0,width:0,height:0});return((n=parseInt(n))<=(o=parseInt(o))?n:o)<=e?(i.url=t,i.width=n,i.height=o):(o<=n?(i.width=Math.ceil(n*e/o),i.height=e):(i.width=e,i.height=Math.ceil(o*e/n)),o=t&&-1<t.indexOf("?")?"".concat(t,"&"):"".concat(t,"?"),i.url="".concat(o,198===e?"imageView2/3/w/198/h/198":"imageView2/3/w/720/h/720")),ut(t)?h(i,rt):i}function Rt(e){var t=e[2];e[2]=e[1],e[1]=t;for(var n=0;n<e.length;n++)e[n].setType(n)}function Ot(e){return(e=e.servcmd).slice(e.indexOf(".")+1)}function wt(e,t){return Math.round(Number(e)*Math.pow(10,t))/Math.pow(10,t)}function Pt(e,t){return e.includes(t)}function Nt(e,t){return e.includes(t)}function Gt(e){return e.split(Fe)[0]}var Ut=function(e,t,n){if(ut(t))return"";switch(e){case E.MSG_TEXT:return t.text;case E.MSG_IMAGE:return n?"[Image]":"[图片]";case E.MSG_LOCATION:return n?"[Location]":"[位置]";case E.MSG_AUDIO:return n?"[Voice]":"[语音]";case E.MSG_VIDEO:return n?"[Video]":"[视频]";case E.MSG_FILE:return n?"[File]":"[文件]";case E.MSG_CUSTOM:return n?"[Custom Messages]":"[自定义消息]";case E.MSG_GRP_TIP:return n?"[Group Notification]":"[群提示消息]";case E.MSG_GRP_SYS_NOTICE:return n?"[Group System Message]":"[群系统通知]";case E.MSG_FACE:return n?"[Animated Sticker]":"[动画表情]";case E.MSG_MERGER:return n?"[Chat Record]":"[聊天记录]";default:return""}};function xt(e){return e===E.MSG_TEXT||e===E.MSG_CUSTOM||e===E.MSG_LOCATION||e===E.MSG_FACE}function Ft(e){var t=[];if(ct(e)){var n=e.length;if(0!==n)for(var o=n-1;0<=o;o--)"1"===e[o]&&t.push(Math.pow(2,n-o-1))}return t}function qt(){return!ue&&!Z}function Vt(e){return"the length of userIDList cannot exceed ".concat(e)}function Bt(e){var t;if(We(e)&&0!==e.length)return t=0,e.forEach((function(e){t+=e})),t.toFixed(0)}function Ht(e){var t;if(We(e)&&0!==e.length)return t=0,e.forEach((function(e){t+=e})),(t/e.length).toFixed(0)}function jt(e,t,n){t=!(1<arguments.length&&void 0!==t)||t,n=!(2<arguments.length&&void 0!==n)||n;var o=Date.now();return t?n?"".concat(o-e," ms"):"".concat(Math.round((o-e)/1e3)," s"):n?o-e:Math.round((o-e)/1e3)}function Kt(e){return!!(e&&1<e)}function $t(e,t,n,o){var i,a,s;return void 0===t||(i=!0,t.required&&Ve(e)&&(Ae.e("[".concat(n,'] Missing required params: "').concat(o,'".')),i=!1),Ve(e)||(a=pt(e))===(s=t.type.toLowerCase())||"asyncfunction"===a&&"function"===s||(Ae.e("[".concat(n,'] Invalid params: type check failed for "').concat(o,'". Expected ').concat(t.type,".")),i=!1),t.validator&&!t.validator(e,n,o)&&(Ae.e("[".concat(n,'] Invalid params: custom validator check failed for "').concat(o,'".')),i=!1),i)}function zt(e){return!(!e||!(Ct(e)||Tt(e)||St(e))&&((e=An("InvalidConversationID",e))&&Ae.w(e),1))}function Wt(e){""!==e.desc&&""!==An("API_REFER")&&Ae.w("[".concat(e.api,"] | ").concat(e.paramName," | ").concat(e.desc,", ").concat(An("API_REFER")).concat(e.api))}function Yt(){return An("StringRequiredLog")}function Xt(e){return An("NonEmptyStringRequiredLog",e)}function Jt(){return An("NumberRequiredLog")}function Zt(){return An("UndefinedNotAllowedLog")}function Qt(){return An("FileRequiredLog")}function en(){return An("FunctionRequiredLog")}function tn(){return An("ArrayRequiredLog")}function nn(){return An("NonEmptyArrayLog")}function on(){return An("CallbackMissingLog")}function an(){return An("PositiveIntegerRequiredLog")}function sn(e,t){return An("StringNotLongerThanLog",e,t)}function rn(e,t){return An("NumberGreaterOrEqualLog",e,t)}function cn(e){return An("KeyValueStringRequiredLog",e)}function un(){return An("PlainObjectRequiredLog")}function ln(){return An("NonEmptyContentRequiredLog")}function dn(){return An("FileNotSelectedLog")}function pn(){return An("MessageInstanceRequiredLog")}function hn(){return An("NonAnonymousFunctionLog")}function fn(){return An("MessageExtensionNotAvailableLog")}function gn(){return An("MessageReactionRequiredLog")}function _n(e,t){return An("MaximumArrayLengthLog",e,t)}function mn(e){return{code:0,data:e||{}}}function vn(e){return Promise.resolve(mn(e))}function yn(e){var t,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return e instanceof wn?(n&&null!==Nn&&Nn.emit(S.ERROR,e),Promise.reject(e)):e instanceof Error?(t=new wn({code:Pn.UNCAUGHT_ERROR}),n&&null!==Nn&&Nn.emit(S.ERROR,t),Promise.reject(t)):ut(e)||ut(e.code)?Promise.reject(new wn({code:Pn.UNCAUGHT_ERROR})):(t=new wn(e),n&&null!==Nn&&Nn.emit(S.ERROR,t),Promise.reject(t))}var In,Mn="unSend",Cn="success",Tn="fail",Sn="notStart",En="pending",Dn="resolved",kn="rejected",Ln={type:"Boolean",required:!0},bn={type:"number",required:!0},An=null,Rn={hookGetAPITips:function(e){An=e},login:{userID:W={type:"String",required:!0},userSig:W},addToBlacklist:{userIDList:Q={type:"Array",required:!0}},removeFromBlacklist:{userIDList:Q},on:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Wt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Wt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Wt({api:t,paramName:n,desc:hn()}),!0)}}],once:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Wt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Wt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Wt({api:t,paramName:n,desc:hn()}),!0)}}],off:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Wt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Wt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Wt({api:t,paramName:n,desc:hn()}),!0)}}],sendMessage:[t({name:"message"},X={type:"Object",required:!0})],setMessageExtensions:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn&&!0===e.isSupportExtension||(Wt({api:t,paramName:n,desc:fn()}),!1)}}),t({name:"extensions"},Q)],getMessageExtensions:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn&&!0===e.isSupportExtension||(Wt({api:t,paramName:n,desc:fn()}),!1)}})],deleteMessageExtensions:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn&&!0===e.isSupportExtension||(Wt({api:t,paramName:n,desc:fn()}),!1)}})],addMessageReaction:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn||(Wt({api:t,paramName:n,desc:gn()}),!1)}}),t({name:"reactionID"},W)],removeMessageReaction:[t(t({name:"message"},X),{},{validator:function(e,t,n){return e.status===Cn||(Wt({api:t,paramName:n,desc:gn()}),!1)}}),t({name:"reactionID"},W)],getMessageReactions:{messageList:t({},Q)},getAllUserListOfMessageReaction:{message:t(t({},X),{},{validator:function(e,t,n){return e.status===Cn||(Wt({api:t,paramName:n,desc:gn()}),!1)}}),reactionID:t({},W),nextSeq:{type:"Number"},count:{type:"Number"}},getMessageList:{conversationID:t(t({},W),{},{validator:zt}),nextReqMessageID:{type:"String"},count:{type:"Number",validator:function(e,t,n){return!(!ut(e)&&!/^[1-9][0-9]*$/.test(e)&&(Wt({api:t,paramName:n,desc:an()}),1))}}},getMessageListHopping:{conversationID:t(t({},W),{},{validator:zt}),sequence:{type:"Number"},time:{type:"Number"},direction:{type:"Number",validator:function(e,t,n){return!(!ut(e)&&0!==e&&1!==e&&(Wt({api:t,paramName:n,desc:An("0Or1RequiredLog")}),1))}},count:{type:"Number",validator:function(e,t,n){return!(!ut(e)&&!/^[1-9][0-9]*$/.test(e)&&(Wt({api:t,paramName:n,desc:an}),1))}}},setMessageRead:{conversationID:t(t({},W),{},{validator:zt})},setAllMessageRead:{scope:{type:"String",required:!1,validator:function(e,t,n){return!e||-1!==[E.READ_ALL_C2C_MSG,E.READ_ALL_GROUP_MSG,E.READ_ALL_MSG].indexOf(e)||(Wt({api:t,paramName:n,desc:An("ValidScopeRequired")}),!1)}}},getConversationProfile:[t(t({name:"conversationID"},W),{},{validator:zt})],clearHistoryMessage:[t(t({name:"conversationID"},W),{},{validator:zt})],pinConversation:{conversationID:t(t({},W),{},{validator:zt}),isPinned:t({},Ln)},setConversationDraft:{conversationID:t(t({},W),{},{validator:zt}),draftText:{type:"String",validator:function(e,t,n){return!!ct(e)||(Wt({api:t,paramName:n,desc:Yt()}),!1)}}},setConversationCustomData:{conversationIDList:t({},Q),customData:{type:"String",validator:function(e,t,n){return ct(e)?!(256<e.length&&(Wt({api:t,paramName:n,desc:sn(n,256)}),1)):(Wt({api:t,paramName:n,desc:Yt()}),!1)}}},markConversation:{conversationIDList:t({},Q),markType:{type:"number",validator:function(e,t,n){return Ke(e)?e<=0?(Wt({api:t,paramName:n,desc:An("NumberGreaterThanLog",n,0)}),!1):!(e>=Math.pow(2,64)&&(Wt({api:t,paramName:n,desc:An("NumberLessThanLog",n,"Math.pow(2,64)")}),1)):(Wt({api:t,paramName:n,desc:Jt()}),!1)}},enableMark:t({},Ln)},createConversationGroup:{conversationIDList:t({},Q),groupName:t(t({},W),{},{validator:function(e,t,n){return!(!e||32<e.length&&(Wt({api:t,paramName:n,desc:sn(n,32)}),1))}})},deleteConversationGroup:[t({name:"groupName"},W)],renameConversationGroup:{oldName:t({},W),newName:t(t({},W),{},{validator:function(e,t,n){return!(!e||32<e.length&&(Wt({api:t,paramName:n,desc:sn(n,32)}),1))}})},addConversationsToGroup:{conversationIDList:t({},Q),groupName:t({},W)},deleteConversationsFromGroup:{conversationIDList:t({},Q),groupName:t({},W)},getGroupList:{groupProfileFilter:{type:"Array"}},getGroupProfile:{groupID:W,groupCustomFieldFilter:{type:"Array"},memberCustomFieldFilter:{type:"Array"}},getGroupProfileAdvance:{groupIDList:Q},createGroup:{name:W},joinGroup:{groupID:W,type:{type:"String"},applyMessage:{type:"String"}},quitGroup:[t({name:"groupID"},W)],handleApplication:{message:X,handleAction:W,handleMessage:{type:"String"}},changeGroupOwner:{groupID:W,newOwnerID:W},updateGroupProfile:{groupID:W,muteAllMembers:{type:"Boolean"}},dismissGroup:[t({name:"groupID"},W)],searchGroupByID:[t({name:"groupID"},W)],getGroupOnlineMemberCount:[t({name:"groupID"},W)],initGroupAttributes:{groupID:W,groupAttributes:t(t({},X),{},{validator:function(e,t,n){var o=!0;return Object.keys(e).forEach((function(i){if(!ct(e[i]))return Wt({api:t,paramName:n,desc:cn("value")}),o=!1})),o}})},setGroupAttributes:{groupID:W,groupAttributes:t(t({},X),{},{validator:function(e,t,n){var o=!0;return Object.keys(e).forEach((function(i){if(!ct(e[i]))return Wt({api:t,paramName:n,desc:cn("value")}),o=!1})),o}})},deleteGroupAttributes:{groupID:W,keyList:{type:"Array",validator:function(e,t,n){var o;return ut(e)||!We(e)?(Wt({api:t,paramName:n,desc:tn()}),!1):!!Ve(e)||(o=!0,e.forEach((function(e){if(!ct(e))return Wt({api:t,paramName:n,desc:An("StringArrayRequiredLog")}),o=!1})),o)}}},getGroupAttributes:{groupID:W,keyList:{type:"Array",validator:function(e,t,n){var o;return ut(e)||!We(e)?(Wt({api:t,paramName:n,desc:tn()}),!1):!!Ve(e)||(o=!0,e.forEach((function(e){if(!ct(e))return Wt({api:t,paramName:n,desc:cn("key")}),o=!1})),o)}}},setGroupCounters:{groupID:W,counters:X},increaseGroupCounter:{groupID:W,key:W,value:bn},decreaseGroupCounter:{groupID:W,key:W,value:bn},getGroupCounters:{groupID:W},getGroupMemberList:{groupID:W,count:{type:"Number"}},getGroupMemberProfile:{groupID:W,userIDList:Q,memberCustomFieldFilter:{type:"Array"}},addGroupMember:{groupID:W,userIDList:Q},setGroupMemberRole:{groupID:W,userID:W,role:W},setGroupMemberMuteTime:{groupID:W,userID:W,muteTime:{type:"Number",validator:function(e){return 0<=e}}},setGroupMemberNameCard:{groupID:W,userID:{type:"String"},nameCard:{type:"String",validator:function(e,t,n){return ct(e)?(e.length,!0):(Wt({api:t,paramName:n,desc:Yt()}),!1)}}},setGroupMemberCustomField:{groupID:W,userID:{type:"String"},memberCustomField:Q},deleteGroupMember:{groupID:W},markGroupMemberList:{groupID:W,markType:{type:"number",validator:function(e,t,n){return Ke(e)?!(e<1e3&&(Wt({api:t,paramName:n,desc:rn(n,1e3)}),1)):(Wt({api:t,paramName:n,desc:Jt()}),!1)}},userIDList:t({},Q),enableMark:t({},Ln)},createTextMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){return ze(e)?ct(e.text)?0!==e.text.length||(Wt({api:t,paramName:"payload.text",desc:ln()}),!1):(Wt({api:t,paramName:"payload.text",desc:Yt()}),!1):(Wt({api:t,paramName:n,desc:un()}),!1)}})},createTextAtMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){return ze(e)?ct(e.text)?0===e.text.length?(Wt({api:t,paramName:"payload.text",desc:ln()}),!1):!(e.atUserList&&!We(e.atUserList)&&(Wt({api:t,paramName:"payload.atUserList",desc:tn()}),1)):(Wt({api:t,paramName:"payload.text",desc:Yt()}),!1):(Wt({api:t,paramName:n,desc:un()}),!1)}})},createCustomMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){return ze(e)?e.data&&!ct(e.data)?(Wt({api:t,paramName:"payload.data",desc:Yt()}),!1):e.description&&!ct(e.description)?(Wt({api:t,paramName:"payload.description",desc:Yt()}),!1):!(e.extension&&!ct(e.extension)&&(Wt({api:t,paramName:"payload.extension",desc:Yt()}),1)):(Wt({api:t,paramName:"payload",desc:un()}),!1)}})},createImageMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){if(!ze(e))return Wt({api:t,paramName:n,desc:un()}),!1;if(ut(e.file))return Wt({api:t,paramName:"payload.file",desc:Zt()}),!1;if(te){if(!(e.file instanceof HTMLInputElement||je(e.file)))return ze(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(Wt({api:t,paramName:"payload.file",desc:dn()}),!1):(Wt({api:t,paramName:"payload.file",desc:Qt()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Wt({api:t,paramName:"payload.file",desc:dn()}),!1}return!0},onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:on()}),!0}}})},createAudioMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){return!!ze(e)||(Wt({api:t,paramName:n,desc:un()}),!1)}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:on()}),!0}}},createVideoMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){if(!ze(e))return Wt({api:t,paramName:n,desc:un()}),!1;if(ut(e.file))return Wt({api:t,paramName:"payload.file",desc:Zt()}),!1;if(te){if(!(e.file instanceof HTMLInputElement||je(e.file)))return ze(e.file)&&"undefined"!=typeof uni?!!je(e.file.tempFile)||(Wt({api:t,paramName:"payload.file",desc:dn()}),!1):(Wt({api:t,paramName:"payload.file",desc:Qt()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Wt({api:t,paramName:"payload.file",desc:dn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:on()}),!0}}},createFaceMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){return ze(e)?Ke(e.index)?!!ct(e.data)||(Wt({api:t,paramName:"payload.data",desc:Yt()}),!1):(Wt({api:t,paramName:"payload.index",desc:Jt()}),!1):(Wt({api:t,paramName:n,desc:un()}),!1)}})},createFileMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){if(!ze(e))return Wt({api:t,paramName:n,desc:un()}),!1;if(ut(e.file))return Wt({api:t,paramName:"payload.file",desc:Zt()}),!1;if(te){if(!(e.file instanceof HTMLInputElement||je(e.file)))return ze(e.file)&&"undefined"!=typeof uni?0!==e.file.tempFilePaths.length&&0!==e.file.tempFiles.length||(Wt({api:t,paramName:"payload.file",desc:dn()}),!1):(Wt({api:t,paramName:"payload.file",desc:Qt()}),!1);if(e.file instanceof HTMLInputElement&&0===e.file.files.length)return Wt({api:t,paramName:"payload.file",desc:dn()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:on()}),!0}}},createLocationMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){return ze(e)?ct(e.description)?Ke(e.longitude)?!!Ke(e.latitude)||(Wt({api:t,paramName:"payload.latitude",desc:Jt()}),!1):(Wt({api:t,paramName:"payload.longitude",desc:Jt()}),!1):(Wt({api:t,paramName:"payload.description",desc:Yt()}),!1):(Wt({api:t,paramName:n,desc:un()}),!1)}})},createMergerMessage:{to:W,conversationType:W,payload:t(t({},X),{},{validator:function(e,t,n){var o;return Ve(e.messageList)?(Wt({api:t,paramName:"payload.messageList",desc:nn()}),!1):Ve(e.compatibleText)?(Wt({api:t,paramName:"payload.compatibleText",desc:Xt("compatibleText")}),!1):(o=!1,e.messageList.forEach((function(e){e.status===Tn&&(o=!0)})),!o||(Wt({api:t,paramName:"payload.messageList",desc:An("MergeFailedMessageLog")}),!1))}})},revokeMessage:[t(t({name:"message"},X),{},{validator:function(e,t,n){return Ve(e)?(Wt({api:t,paramName:n,desc:pn()}),!1):e.conversationType===E.CONV_SYSTEM?(Wt({api:t,paramName:n,desc:An("MessageCanBeRevokedDesc")}),!1):!0!==e.isRevoked||(Wt({api:t,paramName:n,desc:An("MessageRevokedLog")}),!1)}})],deleteMessage:[t(t({name:"messageList"},Q),{},{validator:function(e,t,n){return!Ve(e)||(Wt({api:t,paramName:n,desc:nn()}),!1)}})],translateText:{sourceTextList:Q,sourceLanguage:W,targetLanguage:W},convertVoiceToText:{message:t(t({},X),{},{validator:function(e,t,n){return Ve(e)?(Wt({api:t,paramName:n,desc:pn()}),!1):e.type===E.MSG_AUDIO&&e.status===Cn||(Wt({api:t,paramName:n,desc:An("AudioMessageRequiredLog")}),!1)}})},modifyMessage:[t(t({name:"message"},X),{},{validator:function(e,t,n){return Ve(e)?(Wt({api:t,paramName:n,desc:pn()}),!1):e.conversationType===E.CONV_SYSTEM?(Wt({api:t,paramName:n,desc:An("MessageCanBeModifiedLog")}),!1):!0!==e._onlineOnlyFlag||(Wt({api:t,paramName:n,desc:An("OnlineMessageNotSupportLog")}),!1)}})],searchCloudMessages:{keywordList:{type:"Array",required:!1,validator:function(e,t,n){return!(e&&(We(e)?0===e.length?(Wt({api:t,paramName:n,desc:nn()}),1):5<e.length&&(Wt({api:t,paramName:n,desc:_n(n,5)}),1):(Wt({api:t,paramName:n,desc:tn()}),1)))}},keywordListMatchType:{type:"String",required:!1,validator:function(e,t,n){return!e||"or"===e||"and"===e||Wt({api:t,paramName:n,desc:"".concat(e," is invalid match type")})}},senderUserIDList:{type:"Array",required:!1,validator:function(e,t,n){return!(e&&(We(e)?(0===e.length&&Wt({api:t,paramName:n,desc:nn()}),5<e.length&&(Wt({api:t,paramName:n,desc:_n(n,5)}),1)):(Wt({api:t,paramName:n,desc:tn()}),1)))}},messageTypeList:{type:"Array",required:!1,validator:function(e,t,n){if(!e)return!0;if(!We(e))return Wt({api:t,paramName:n,desc:tn()}),!1;0===e.length&&Wt({api:t,paramName:n,desc:nn()});var o=[E.MSG_TEXT,E.MSG_IMAGE,E.MSG_AUDIO,E.MSG_FILE,E.MSG_VIDEO,E.MSG_LOCATION,E.MSG_CUSTOM,E.MSG_MERGER];return!(0<e.filter((function(e){return-1===o.indexOf(e)})).length&&(Wt({api:t,paramName:n,desc:An("ContainsUnsupportedMessageTypeLog",n)}),1))}},conversationID:{type:"String",required:!1,validator:function(e){return!e||zt(e)}},timePosition:{type:"number",required:!1,validator:function(e,t,n){return!(e&&e<0&&(Wt({api:t,paramName:n,desc:rn(n,0)}),1))}},timePeriod:{type:"number",required:!1,validator:function(e,t,n){return!(e&&e<0&&(Wt({api:t,paramName:n,desc:rn(n,0)}),1))}},cursor:{type:"String",required:!1}},getUserProfile:{userIDList:{type:"Array",validator:function(e,t,n){return We(e)?(0===e.length&&Wt({api:t,paramName:n,desc:nn()}),!0):(Wt({api:t,paramName:n,desc:tn()}),!1)}}},updateMyProfile:{profileCustomField:{type:"Array",validator:function(e,t,n){return!!ut(e)||!!We(e)||(Wt({api:t,paramName:n,desc:tn()}),!1)}}},setSelfStatus:{customStatus:{type:"String",validator:function(e,t,n){return!!ct(e)||(Wt({api:t,paramName:n,desc:Yt()}),!1)}}},getUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return We(e)?0!==e.length||(Wt({api:t,paramName:n,desc:nn()}),!1):(Wt({api:t,paramName:n,desc:tn()}),!1)}}},subscribeUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return We(e)?0!==e.length||(Wt({api:t,paramName:n,desc:nn()}),!1):(Wt({api:t,paramName:n,desc:tn()}),!1)}}},unsubscribeUserStatus:{userIDList:{type:"Array",validator:function(e,t,n){return!e||!!We(e)||(Wt({api:t,paramName:n,desc:tn()}),!1)}}},addFriend:{to:W,source:{type:"String",required:!0,validator:function(e,t,n){return!(!e||(e.startsWith("AddSource_Type_")?8<e.replace("AddSource_Type_","").length&&(Wt({api:t,paramName:n,desc:sn("keyword",8)}),1):(Wt({api:t,paramName:n,desc:An("SourcePrefixLog")}),1)))}},remark:{type:"String",required:!1,validator:function(e,t,n){return!(ct(e)&&96<e.length&&(Wt({api:t,paramName:n,desc:sn(n,96)}),1))}}},deleteFriend:{userIDList:Q},checkFriend:{userIDList:Q},getFriendProfile:{userIDList:Q},updateFriend:{userID:W,remark:{type:"String",required:!1,validator:function(e,t,n){return!(ct(e)&&96<e.length&&(Wt({api:t,paramName:n,desc:sn(n,96)}),1))}},friendCustomField:{type:"Array",required:!1,validator:function(e,t,n){var o;return!e||(We(e)?(o=!0,e.forEach((function(e){return ct(e.key)&&-1!==e.key.indexOf("Tag_SNS_Custom")?ct(e.value)?8<e.key.replace("Tag_SNS_Custom_","").length?(Wt({api:t,paramName:n,desc:sn("keyword",8)}),o=!1):void 0:(Wt({api:t,paramName:n,desc:cn("value")}),o=!1):(Wt({api:t,paramName:n,desc:An("FriendCustomFieldPrefixLog")}),o=!1)})),o):(Wt({api:t,paramName:n,desc:tn()}),!1))}}},acceptFriendApplication:{userID:W},refuseFriendApplication:{userID:W},deleteFriendApplication:{userID:W},createFriendGroup:{name:W},deleteFriendGroup:{name:W},addToFriendGroup:{name:W,userIDList:Q},removeFromFriendGroup:{name:W,userIDList:Q},renameFriendGroup:{oldName:W,newName:W},sendMessageReadReceipt:[{name:"messageList",type:"Array",validator:function(e,t,n){return We(e)?0!==e.length||(Wt({api:t,paramName:n,desc:nn()}),!1):(Wt({api:t,paramName:n,desc:tn()}),!1)}}],getMessageReadReceiptList:[{name:"messageList",type:"Array",validator:function(e,t,n){return We(e)?0!==e.length||(Wt({api:t,paramName:n,desc:nn()}),!1):(Wt({api:t,paramName:n,desc:tn()}),!1)}}],createTopicInCommunity:{groupID:W,topicName:W},deleteTopicFromCommunity:{groupID:W,topicIDList:{type:"Array",validator:function(e,t,n){return!e||!!We(e)||(Wt({api:t,paramName:n,desc:tn()}),!1)}}},updateTopicProfile:{groupID:W,topicID:W},getTopicList:{groupID:W,topicIDList:{type:"Array",validator:function(e,t,n){return!e||!!We(e)||(Wt({api:t,paramName:n,desc:tn()}),!1)}}},followUser:[t({name:"userIDList"},Q)],unfollowUser:[t({name:"userIDList"},Q)],getMyFollowingList:[t(t({name:"startIndex"},W),{},{required:!1})],getMyFollowersList:[t(t({name:"startIndex"},W),{},{required:!1})],getMutualFollowersList:[t(t({name:"startIndex"},W),{},{required:!1})],getUserFollowInfo:[t(t({name:"userIDList"},Q),{},{required:!1})],checkFollowType:[t({name:"userIDList"},Q)],addSignalingListener:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Wt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Wt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Wt({api:t,paramName:n,desc:hn()}),!0)}}],removeSignalingListener:[{name:"eventName",type:"String",validator:function(e,t,n){return"string"==typeof e&&0!==e.length||(Wt({api:t,paramName:n,desc:Xt(n)}),!1)}},{name:"handler",type:"Function",validator:function(e,t,n){return"function"!=typeof e?(Wt({api:t,paramName:n,desc:en()}),!1):(""===e.name&&Wt({api:t,paramName:n,desc:hn()}),!0)}}],invite:{userID:W},inviteSync:[t(t({},X),{},{validator:function(e,t,n){return ze(e)?!!ct(e.userID)||(Wt({api:t,paramName:"options.userID",desc:Yt()}),!1):(Wt({api:t,paramName:"options",desc:un()}),!1)}}),{name:"successCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:en()}),!0}},{name:"errorCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:en()}),!0}}],inviteInGroup:{groupID:W,inviteeList:Q},inviteInGroupSync:[t(t({},X),{},{validator:function(e,t,n){return ze(e)?ct(e.groupID)?!!We(e.inviteeList)||(Wt({api:t,paramName:"options.inviteeList",desc:tn()}),!1):(Wt({api:t,paramName:"options.groupID",desc:Yt()}),!1):(Wt({api:t,paramName:"options",desc:un()}),!1)}}),{name:"successCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:en()}),!0}},{name:"errorCb",type:"Function",required:!1,validator:function(e,t,n){return ut(e)&&Wt({api:t,paramName:n,desc:en()}),!0}}],accept:{inviteID:W},reject:{inviteID:W},getSignalingInfo:[t(t({name:"message"},X),{},{validator:function(e,t,n){return!Ve(e)||(Wt({api:t,paramName:n,desc:pn()}),!1)}})],modifyInvitation:{inviteID:W,data:W}},On={login:1,logout:1,getLoginUser:1,getServerTime:1,on:1,once:1,off:1,setLogLevel:1,registerPlugin:1,destroy:1,isReady:1,createTextMessage:1,createTextAtMessage:1,createImageMessage:1,createAudioMessage:1,createVideoMessage:1,createCustomMessage:1,createFaceMessage:1,createFileMessage:1,createLocationMessage:1,createMergerMessage:1,downloadMergerMessage:1,createForwardMessage:1,sendMessage:1,resendMessage:1,revokeMessage:1,deleteMessage:1,translateText:1,convertVoiceToText:1,modifyMessage:1,searchCloudMessages:1,sendMessageReadReceipt:1,getGroupMessageReadMemberList:1,getMessageReadReceiptList:1,setMessageExtensions:1,getMessageExtensions:1,deleteMessageExtensions:1,addMessageReaction:1,removeMessageReaction:1,getMessageReactions:1,getAllUserListOfMessageReaction:1,getMessageList:1,findMessage:1,getMessageListHopping:1,setMessageRead:1,setAllMessageRead:1,getConversationList:1,getConversationProfile:1,deleteConversation:1,setConversationDraft:1,pinConversation:1,getTotalUnreadMessageCount:1,setConversationCustomData:1,markConversation:1,createConversationGroup:1,getConversationGroupList:1,deleteConversationGroup:1,renameConversationGroup:1,addConversationsToGroup:1,deleteConversationsFromGroup:1,clearHistoryMessage:1,setMessageRemindType:1,setAllReceiveMessageOpt:1,getAllReceiveMessageOpt:1,getGroupList:1,getGroupProfile:1,createGroup:1,joinGroup:1,updateGroupProfile:1,quitGroup:1,dismissGroup:1,changeGroupOwner:1,searchGroupByID:1,getGroupApplicationList:1,handleGroupApplication:1,initGroupAttributes:1,setGroupAttributes:1,deleteGroupAttributes:1,getGroupAttributes:1,setGroupCounters:1,increaseGroupCounter:1,decreaseGroupCounter:1,getGroupCounters:1,getJoinedCommunityList:1,createTopicInCommunity:1,deleteTopicFromCommunity:1,updateTopicProfile:1,getTopicList:1,getGroupMemberProfile:1,getGroupMemberList:1,addGroupMember:1,deleteGroupMember:1,setGroupMemberNameCard:1,setGroupMemberMuteTime:1,setGroupMemberRole:1,setGroupMemberCustomField:1,getGroupOnlineMemberCount:1,markGroupMemberList:1,getMyProfile:1,getUserProfile:1,updateMyProfile:1,setSelfStatus:1,getUserStatus:1,subscribeUserStatus:1,unsubscribeUserStatus:1,getBlacklist:1,addToBlacklist:1,removeFromBlacklist:1,getFriendList:1,addFriend:1,deleteFriend:1,checkFriend:1,updateFriend:1,getFriendProfile:1,getFriendApplicationList:1,refuseFriendApplication:1,deleteFriendApplication:1,acceptFriendApplication:1,setFriendApplicationRead:1,getFriendGroupList:1,createFriendGroup:1,renameFriendGroup:1,deleteFriendGroup:1,addToFriendGroup:1,removeFromFriendGroup:1,followUser:1,unfollowUser:1,getMyFollowingList:1,getMyFollowersList:1,getMutualFollowersList:1,getUserFollowInfo:1,checkFollowType:1,callExperimentalAPI:1,addSignalingListener:1,removeSignalingListener:1,invite:1,inviteSync:1,inviteInGroup:1,inviteInGroupSync:1,cancel:1,accept:1,reject:1,getSignalingInfo:1,modifyInvitation:1},wn=(r(no,p(Error)),In=g(no),a(no)),Pn={NO_SDKAPPID:2e3,NO_ACCOUNT_TYPE:2001,NO_IDENTIFIER:2002,NO_USERSIG:2003,NO_TINYID:2022,NO_A2KEY:2023,USER_NOT_LOGGED_IN:2024,REPEAT_LOGIN:2025,COS_UNDETECTED:2040,COS_GET_SIG_FAIL:2041,MSG_SEND_FAIL:2100,MSG_SEND_FAIL_NOT_IN_AV:2101,MSG_INSTANCE_REQUIRED:2105,MSG_INVALID_CONV_TYPE:2106,MSG_F_IS_EMPTY:2108,MSG_ONPROGRESS_ERR:2109,MSG_REVOKE_FAIL:2110,MSG_DELETE_FAIL:2111,MSG_UNREAD_ALL_FAIL:2112,READ_RECEIPT_MSG_LIST_EMPTY:2114,MSG_SEND_GRP_WITH_TOPIC_FAIL:2115,CANNOT_DELETE_GRP_SYSTEM_NOTICE:2116,TRANSLATE_TEXT_FAIL:2117,VOICE_TO_TEXT_FAIL:2118,UNSUPPORTED_VOICE_FORMAT:2119,MSG_I_SELECT_F_FIRST:2251,MSG_I_TYPES_LIMIT:2252,MSG_I_SIZE_LIMIT:2253,MSG_A_UPLOAD_FAIL:2300,MSG_A_SIZE_LIMIT:2301,MSG_V_UPLOAD_FAIL:2350,MSG_V_SIZE_LIMIT:2351,MSG_V_TYPES_LIMIT:2352,MSG_F_UPLOAD_FAIL:2400,MSG_F_SELECT_F_FIRST:2401,MSG_F_SIZE_LIMIT:2402,MSG_F_URL_IS_EMPTY:2403,MSG_MERGER_TYPE_INVALID:2450,MSG_MERGER_KEY_INVALID:2451,MSG_MERGER_DOWNLOAD_FAIL:2452,MSG_FORWARD_TYPE_INVALID:2453,MSG_FORWARD_INVALID_ELEMENTS:2454,MSG_MODIFY_CONFLICT:2480,MSG_MODIFY_DISABLED_IN_AV:2481,CONV_NOT_FOUND:2500,USER_OR_GRP_NOT_FOUND:2501,CONV_UN_RECORDED_TYPE:2502,INVALID_CONV_ID:2503,ILLEGAL_GRP_TYPE:2600,ILLEGAL_GRP_ID:2602,CANNOT_FIND_GRP:2603,CANNOT_CHANGE_OWNER_IN_AV:2620,CANNOT_CHANGE_OWNER_TO_SELF:2621,MEMBER_NOT_IN_GRP:2623,JOIN_GRP_FAIL:2660,CANNOT_ADD_MEMBER_IN_AV:2661,CANNOT_JOIN_NON_AV_WITHOUT_LOGIN:2662,NOT_OWNER:2681,INVALID_MEMBER_ROLE:2683,CANNOT_SET_SELF_MEMBER_ROLE:2684,CANNOT_MUTE_SELF:2685,BAN_DURATION_INVALID:2686,OPERATION_NOT_SUPPORTED_IN_AV:2687,NOT_MY_FRIEND:2700,ALREADY_MY_FRIEND:2701,FRIEND_GRP_EXISTED:2710,FRIEND_GRP_NOT_EXIST:2711,FRIEND_APPLICATION_NOT_EXIST:2716,UPDATE_PROFILE_INVALID_PARAM:2721,UPDATE_PROFILE_NO_KEY:2722,CANNOT_ADD_SELF_TO_BLACKLIST:2742,NETWORK_ERROR:2800,NETWORK_TIMEOUT:2801,NO_NETWORK:2805,UNCAUGHT_ERROR:2903,INVALID_OPERATION:2905,INVALID_TRTC_CMD:2995,OVER_FREQUENCY_LIMIT:2996,NO_PROTOCOL:2997,NO_MODULE:2998,SDK_IS_NOT_READY:2999,LOGGING_IN:3e3,LOGIN_FAILED:3001,KICKED_OUT_MULT_DEVICE:3002,KICKED_OUT_MULT_ACCOUNT:3003,KICKED_OUT_USERSIG_EXPIRED:3004,LOGGED_OUT:3005,KICKED_OUT_REST_API:3006,ILLEGAL_TOPIC_ID:3021,NO_USE:3122,PROFANITY_FOUND:3123,OPTIONS_IS_EMPTY:3153,MSG_A2KEY_EXPIRED:20002,ACCOUNT_A2KEY_EXPIRED:70001,HELLO_ANSWER_KICKED_OUT:1002,OPEN_SERVICE_OVERLOAD_ERROR:60022,SIGNALING_INVALID_INVITE_ID:8010,SIGNALING_NO_PERMISSION:8011,SIGNALING_ALREADY_EXISTS:8012,INVALID_CANCEL_MESSAGE:8020,MSG_SEARCH_CURSOR_INVALID:27002,MSG_SEARCH_CURSOR_EXPIRED:27003},Nn=null,Gn=(a(to,[{key:"isLoggedIn",value:function(){return this._m.get(12).isLoggedIn()}},{key:"isOversea",value:function(){return this._m.get(12).isOversea()}},{key:"isPrivateNetWork",value:function(){var e=this._m.get(12);return e.isPrivateNetWork()&&!e.getFileDownloadProxy()}},{key:"getFileDownloadProxy",value:function(){return this._m.get(12).getFileDownloadProxy()}},{key:"getDowloadFileAuthKey",value:function(){return this._m.get(12).getDowloadFileAuthKey()}},{key:"getMyUserID",value:function(){return this._m.get(12).getUserID()}},{key:"getMyTinyID",value:function(){return this._m.get(12).getTinyID()}},{key:"getSDKAppID",value:function(){return this._m.get(12).getSDKAppID()}},{key:"isIntl",value:function(){return this._m.get(12).isIntl()}},{key:"isUsingChatCore",value:function(){return this._m.get(12).isUsingChatCore()}},{key:"isDevMode",value:function(){return this._m.get(12).isDevMode()}},{key:"get",value:function(e){return this._m.get(e)}},{key:"getPlatform",value:function(){return ie}},{key:"getCloudConfig",value:function(e){return this._m.get(23).getCloudConfig(e)}},{key:"emitOEvt",value:function(e,t){this._m.getOEmitInst().emit(e,t)}},{key:"emitIEvt",value:function(e,t){this._m.getIEmitInst().emit(e,t)}},{key:"getIEmitInst",value:function(){return this._m.getIEmitInst()}},{key:"req",value:function(e){return this._m.get(20).req(e)}},{key:"canIUse",value:function(e){return this._m.get(27).canIUse(e)}},{key:"getErrMsg",value:function(e,t,n){return this._m.getErrMsg(e,t,n)}},{key:"warn",value:function(e,t,n){(e=this.getErrMsg(e,t,n))&&Ae.w(e)}},{key:"noUse",value:function(e){var t=Pn.NO_USE;return yn({code:t,message:this.getErrMsg(t,e)})}}]),bn=to,{LOGIN:"wslogin",LOGOUT:"wslogout",HELLO:"wshello",KICK_OTHER:"KickOther",SYNC_UNREAD_MSG:"getmsg",SEND_C2C_MSG:"sendmsg",SEND_GRP_MSG:"send_group_msg",GET_USER_PROFILE:"portrait_get_all",UPDATE_MY_PROFILE:"portrait_set",GET_BL:"black_list_get",ADD_TO_BL:"black_list_add",RM_FROM_BL:"black_list_delete",GET_FD_LIST:"friend_get",GET_FD_PROFILE:"friend_get_specified",CHECK_FD:"friend_check",DEL_FD:"friend_delete",ADD_FD:"friend_add",UPDATE_FD:"friend_update",RESPOND_FD_APPLICATION:"friend_response",GET_FD_APPLICATION_LIST:"pendency_get",DEL_FD_APPLICATION:"pendency_delete",REFUSE_FD_APPLICATION:"pendency_refuse",REPORT_FD_APPLICATION:"pendency_report",GET_FD_GRP_LIST:"group_get",CREATE_FD_GRP:"group_add",DEL_FD_GRP:"group_delete",UPDATE_FD_GRP:"group_update",REVOKE_C2C_MSG:"msgwithdraw",SET_C2C_MSG_READ:"msgreaded",SET_C2C_PEER_MUTE_NOTIFICATIONS:"set_c2c_peer_mute_notifications",GET_C2C_PEER_MUTE_NOTIFICATIONS:"get_c2c_peer_mute_notifications",GET_C2C_ROAMING_MSG:"getroammsg",GET_C2C_PEER_READ_TIME:"get_peer_read_time",DEL_C2C_MSG:"delete_c2c_msg_ramble",MODIFY_C2C_MSG:"modify_c2c_msg",MODIFY_C2C_MSG_EXT:"set_key_values",GET_C2C_MSG_EXT:"get_key_values",ADD_C2C_MSG_REACTION:"reaction_add",RM_C2C_MSG_REACTION:"reaction_del",GET_C2C_MSG_REACTIONS:"reaction_multi_stat",GET_C2C_MSG_REACTION_USER_LIST:"reaction_iterate",PAGING_GET_CONV_LIST:"page_get",DEL_CONV:"batch_delete",CLEAR_HISTORY_MSG:"clear_msg",PIN_CONV:"top",DEL_GROUP_AT_TIPS:"deletemsg",SET_CONV_CUSTOM_DATA:"set_conv_custom_data",MARK_CONV:"mark_contact",CREATE_CONV_GRP:"create_contact_group",DEL_CONV_GRP:"del_contact_group",RENAME_CONV_GRP:"update_contact_group",ADD_CONV_TO_GRP:"add_conv_to_group",DEL_CONV_FROM_GRP:"del_conv_from_group",GET_CONV_GRP_LIST:"get_contact_group",SEARCH_CONV_GRP_MARK:"search_contact_group",GET_GRP_LIST:"get_joined_group_list",GET_GRP_PROFILE:"get_group_self_member_info",CREATE_GRP:"create_group",DISMISS_GRP:"destroy_group",UPDATE_GRP_PROFILE:"modify_group_base_info",APPLY_JOIN_GRP:"apply_join_group",APPLY_JOIN_GRP_NOAUTH:"apply_join_group_noauth",QUIT_GRP:"quit_group",SEARCH_GRP:"get_group_public_info",CHANGE_GRP_OWNER:"change_group_owner",HANDLE_GRP_APPLICATION:"handle_apply_join_group",HANDLE_INVITE_JOIN_GRP:"handle_invite_join_permission_group",HANDLE_GRP_INVITATION:"handle_invite_join_group",REVOKE_GRP_MSG:"group_msg_recall",SET_GRP_MSG_READ:"msg_read_report",SET_ALL_MSG_READ:"read_all_unread_msg",GET_GRP_ROAMING_MSG:"group_msg_get",GET_READ_RECEIPT:"get_group_msg_receipt",SEND_READ_RECEIPT:"group_msg_receipt",SEND_C2C_READ_RECEIPT:"c2c_msg_read_receipt",GET_READ_RECEIPT_DETAIL:"get_group_msg_receipt_detail",GET_GRP_PENDENCY:"get_pendency",DEL_GRP_SYSTEM_NOTICE:"deletemsg",AV_POLLING:"get_msg",AV_NOAUTH_POLLING:"get_msg_noauth",GET_ONLINE_MBR_NUM:"get_online_member_num",DEL_GRP_MSG:"delete_group_ramble_msg_by_seq",MODIFY_GRP_MSG:"modify_group_msg",SET_GRP_ATTR:"set_group_attr",MODIFY_GRP_ATTR:"modify_group_attr",DEL_GRP_ATTR:"delete_group_attr",CLEAR_GRP_ATTR:"clear_group_attr",GET_GRP_ATTR:"get_group_attr",MODIFY_GRP_MSG_EXT:"group_set_key_values",GET_GRP_MSG_EXT:"group_get_key_values",GET_GRP_NOTIFY:"batch_get_group_notify",UPDATE_GRP_COUNTER:"update_group_counter",GET_GRP_COUNTER:"get_group_counter",ADD_GRP_MSG_REACTION:"group_reaction_add",RM_GRP_MSG_REACTION:"group_reaction_del",GET_GRP_MSG_REACTIONS:"group_reaction_multi_stat",GET_GRP_MSG_REACTION_USER_LIST:"group_reaction_iterate",GET_GRP_MBR_LIST:"get_group_member_info",GET_AV_MBR_LIST:"get_members",GET_GRP_MBR_PROFILE:"get_specified_group_member_info",ADD_GRP_MBR:"add_group_member",DEL_GRP_MBR:"delete_group_member",BAN_AV_MBR:"ban_group_member",MODIFY_GRP_MBR_INFO:"modify_group_member_info",MARK_AV_MBR_INFO:"modify_user_info",COS_SIGN:"cos",COS_PRE_SIG:"pre_sig",SIMPLE_COS_PRE_SIG:"simple_sig",GET_IMAGE_INFO:"get_imageinfo",GET_IP:"get_final_ip",VIDEO_COVER:"video_cover",SSO_STAT:"tim_web_report_v2",PING:"alive",MSG_PUSH:"msg_push",MSG_CLOUD_SEARCH:"query",MULTI_MSG_PUSH:"multi_msg_push_ws",MSG_PUSH_ACK:"ws_msg_push_ack",STATUS_FORCE_OFFLINE:"stat_forceoffline",UPLOAD_MERGER_MSG:"save_relay_json_msg",DOWNLOAD_MERGER_MSG:"get_relay_json_msg",FETCH_CLOUD_CTRL_CONFIG:"fetch_config",PUSHED_CLOUD_CTRL_CONFIG:"push_configv2",FETCH_COMMERCIAL_CONFIG:"fetch_imsdk_purchase_bitsv2",PUSHED_COMMERCIAL_CONFIG:"push_imsdk_purchase_bitsv2",OVERLOAD_NOTIFY:"notify2",CREATE_TOPIC:"create_topic",DEL_TOPIC:"destroy_topic",UPDATE_TOPIC_PROFILE:"modify_topic",GET_TOPIC_LIST:"get_topic",SET_SELF_STATUS:"ws_set_custom_status",GET_USER_STATUS:"ws_get_user_status",SUB_USER_STATUS:"ws_status_subscribe",UNSUB_USER_STATUS:"ws_status_unsubscribe",STAT_BACKGROUND:"ws_stat_background",STAT_FOREGROUND:"ws_stat_foreground",SET_TOKEN:"ws_stat_settoken",PUSH_REPORT:"uniapp_sdk_report",GET_PROFANITY_LIST:"get_local_words",TRANSLATE_TEXT:"ws_batch_trans_text",VOICE_TO_TEXT:"ws_sentence_recognition",FOLLOW:"follow_add",UNFOLLOW:"follow_delete",GET_FOLLOW:"follow_get",GET_FOLLOW_INFO:"follow_get_info",CHECK_FOLLOW_TYPE:"follow_check",SET_ALL_RECEIVE_MSG_OPT:"ws_set_do_not_disturb",GET_ALL_RECEIVE_MSG_OPT:"ws_get_do_not_disturb"}),Un="networkRTT",xn="messageE2EDelay",Fn="sendMessageC2C",qn="sendMessageGroup",Vn="sendMessageGroupAV",Bn="sendMessageRichMedia",Hn="cosUpload",jn="messageReceivedGroup",Kn="messageReceivedGroupAVPush",$n="messageReceivedGroupAVPull",zn=(s(Ln={},Un,2),s(Ln,xn,3),s(Ln,Fn,4),s(Ln,qn,5),s(Ln,Vn,6),s(Ln,Bn,7),s(Ln,jn,8),s(Ln,Kn,9),s(Ln,$n,10),s(Ln,Hn,11),Ln),Wn={info:4,warning:5,error:6},Yn={wifi:1,"2g":2,"3g":3,"4g":4,"5g":5,unknown:6,none:7,online:8},Xn={login:4,plugin_search:16,plugin_translate:16,plugin_voice_to_text:16,plugin_cs:16,plugin_push:16,plugin_bot:16,plugin_emoji_reaction:16},Jn=(a(eo,[{key:"updateTimeStamp",value:function(){this.timestamp=De()}},{key:"start",value:function(e){return this._startts=e,this}},{key:"end",value:function(){var e,t=this,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this._sentFlag||(this._netMonitorModule&&(e=this._netMonitorModule.getNetworkType(),this.setNetworkType(e)),e=De(),0===this.costTime&&(this.costTime=e-this._startts),this.setMoreMessage("startts:".concat(this._startts," endts:").concat(e)),n?(this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)):setTimeout((function(){t._sentFlag=!0,t._eventStatModule&&t._eventStatModule.pushIn(t)}),0))}},{key:"setError",value:function(e){var t;return e instanceof Error?this._sentFlag||(t=!0,(t=this._netMonitorModule?this._netMonitorModule.isOnline():t)?(e.code&&this.setCode(e.code),e.message&&this.setMoreMessage(e.message)):this.setCode(Pn.NO_NETWORK),this.setLevel("error")):Ae.w("".concat(this._n,".setError value not instanceof Error, please check!")),this}},{key:"setCode",value:function(e){return ut(e)||this._sentFlag||("ECONNABORTED"===e&&(this.code=103),Ke(e)?this.code=e:Ae.w("".concat(this._n,".setCode value not a number, please check!"),e,n(e))),this}},{key:"setMessage",value:function(e){return ut(e)||this._sentFlag||(Ke(e)&&(this.message=e.toString()),ct(e)&&(this.message=e)),this}},{key:"setCostTime",value:function(e){return this.costTime=e,this}},{key:"setLevel",value:function(e){return ut(e)||this._sentFlag||(this.level=Wn[e]),this}},{key:"setMoreMessage",value:function(e){return Ve(this.moreMessage)?this.moreMessage="".concat(e):this.moreMessage+=" ".concat(e),this}},{key:"setNetworkType",value:function(e){return ut(e)?Ae.w("".concat(this._n,".setNetworkType value is undefined, please check!")):(e=Yn[e.toLowerCase()],ut(e)||(this.networkType=e)),this}},{key:"getStartTs",value:function(){return this._startts}},{key:"setUIPlatform",value:function(e){return this.uiPlatform=e,this}},{key:"setExtension",value:function(e){return this.extension=e,this}},{key:"setEventType",value:function(e){return this.eventType=e,this}}],[{key:"bindEventStatModule",value:function(e){eo.prototype._eventStatModule=e}},{key:"bindNetMonitorModule",value:function(e){eo.prototype._netMonitorModule=e}}]),eo),Zn=(a(Qn,[{key:"setText",value:function(e){this.content.text=e}},{key:"sendable",value:function(){return 0!==this.content.text.length}}]),Qn);function Qn(e){o(this,Qn),this.type=E.MSG_TEXT,this.content={text:e.text||""}}function eo(e){o(this,eo),this._n="SSOLogData",this.eventType=Xn[e]||0,this.timestamp=0,this.networkType=8,this.code=0,this.message="",this.moreMessage="",this.extension=e,this.costTime=0,this.duplicate=!1,this.level=4,this.uiPlatform=void 0,this._sentFlag=!1,this._startts=De()}function to(e){o(this,to),this._m=e,this._n=""}function no(e){o(this,no),t=In.call(this);var t,n=e.code,i=e.message;return e=e.data,t.code=n,i?t.message=i:t._getErrMsg&&(t.message=t._getErrMsg(t.code)),t.data=e||{},t}function oo(e,t,n,o){var i;if(o=3<arguments.length&&void 0!==o?o:[],e)return i=e,t&&(e.startsWith("http://")?i=e.replace(/^http:\/\/[^/]+/,t):e.startsWith("https://")&&(i=e.replace(/^https:\/\/[^/]+/,t))),n&&-1===i.indexOf("authKey=")&&so(i,o)?(-1<i.indexOf("?")?"".concat(i,"&authKey="):"".concat(i,"?authKey=")).concat(n):i}function io(e,t,n){return n=2<arguments.length&&void 0!==n?n:[],e===E.MSG_VIDEO?so((t[0].content||t[0].payload).snapshotUrl,n)&&(t[0].content?(t[0].content.snapshotUrl=ao(t[0].content.snapshotUrl),t[0].content.thumbUrl=ao(t[0].content.thumbUrl)):(t[0].payload.snapshotUrl=ao(t[0].payload.snapshotUrl),t[0].payload.thumbUrl=ao(t[0].payload.thumbUrl))):e===E.MSG_FILE?so((t[0].content||t[0].payload).fileUrl,n)&&(t[0].content?t[0].content.fileUrl=ao(t[0].content.fileUrl):t[0].payload.fileUrl=ao(t[0].payload.fileUrl)):e===E.MSG_MERGER&&(e=(n=t[0].content||t[0].payload).downloadKey,n=void 0===(n=n.messageList)?[]:n,Ve(void 0===e?"":e))&&n.forEach((function(e){io(e.messageBody[0].type,e.messageBody)})),t}function ao(e){if(!e)return e;if(-1===e.indexOf("authKey="))return e;for(var t=(e=e.split("?"))[1].split("&"),n=0,o=0;o<t.length;o++)if(-1<t[o].indexOf("authKey=")){n=o;break}return t.splice(n,1),0<t.length?"".concat(e[0],"?").concat(t.join("&")):e[0]}function so(e,t){var n=!1;if(e){var o=(e=e.match(/:\/\/([0-9]?\.)?(.[^/:]+)/))&&e[2]||"";if(o.includes("rich-dev"))return 1;for(var i=0;i<t.length;i++)if(o.endsWith(t[i])){n=!0;break}}return n}a(Po,[{key:"_initImageInfoModel",value:function(){var e=this;this._ImageInfoModel=function(t){this.instanceID=nt(9999999),this.sizeType=t.type||0,this.type=0,this.size=t.size||0,this.width=t.width||0,this.height=t.height||0,this.imageUrl=t.imageUrl||t.url||"",this.url=oo(t.url||e._imageMemoryURL,e._fileDownloadProxy,e._authKey,e._fileDNList)},this._ImageInfoModel.prototype={setSizeType:function(e){this.sizeType=e},setType:function(e){this.type=e},setImageUrl:function(e){e&&(this.imageUrl=e)},getImageUrl:function(){return this.imageUrl}}}},{key:"initImageInfoArray",value:function(e){for(var t,n=0,o=null;n<=2;)t=ut(e)||ut(e[n])?{type:0,size:0,width:0,height:0,url:""}:e[n],(o=new this._ImageInfoModel(t)).setSizeType(n+1),o.setType(n),this.addImageInfo(o),n++;this.updateAccessSideImageInfoArray()}},{key:"updateImageInfoArray",value:function(e){for(var t,n=this.content.imageInfoArray.length,o=0;o<n;o++)t=this.content.imageInfoArray[o],e[o].size&&(t.size=e[o].size),e[o].url&&t.setImageUrl(e[o].url),e[o].width&&(t.width=e[o].width),e[o].height&&(t.height=e[o].height)}},{key:"_autoFixUrl",value:function(){for(var e=this.content.imageInfoArray.length,t="",n="",o=["http","https"],i=null,a=0;a<e;a++)this.content.imageInfoArray[a].url&&""!==(i=this.content.imageInfoArray[a]).imageUrl&&(n=i.imageUrl.slice(0,i.imageUrl.indexOf("://")+1),t=i.imageUrl.slice(i.imageUrl.indexOf("://")+1),o.indexOf(n)<0&&(n="https:"),this.content.imageInfoArray[a].setImageUrl([n,t].join("")))}},{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateImageFormat",value:function(e){this.content.imageFormat=Re[e.toUpperCase()]||Re.UNKNOWN}},{key:"createImageDataASURLInWeb",value:function(e){void 0!==e&&0<e.files.length&&(this._imageMemoryURL=window.URL.createObjectURL(e.files[0]))}},{key:"createImageDataASURL",value:function(e){e&&e.url&&(this._imageMemoryURL=e.url)}},{key:"replaceImageInfo",value:function(e,t){this.content.imageInfoArray[t]instanceof this._ImageInfoModel||(this.content.imageInfoArray[t]=e)}},{key:"addImageInfo",value:function(e){3<=this.content.imageInfoArray.length||this.content.imageInfoArray.push(e)}},{key:"updateAccessSideImageInfoArray",value:function(){var e=this.content.imageInfoArray,t=void 0===(t=(n=e[0]).width)?0:t,n=void 0===(n=n.height)?0:n;0!==t&&0!==n&&(Rt(e),Object.assign(e[2],At({originWidth:t,originHeight:n,min:720})))}},{key:"sendable",value:function(){return 0!==this.content.imageInfoArray.length&&""!==this.content.imageInfoArray[0].imageUrl&&0!==this.content.imageInfoArray[0].size}}]);var ro=Po,co=(a(wo,[{key:"sendable",value:function(){return null!==this.content}}]),wo),uo=(a(Oo,[{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateAudioUrl",value:function(e){this.content.remoteAudioUrl=e}},{key:"sendable",value:function(){return""!==this.content.remoteAudioUrl}}]),Oo),lo={from:!0,groupID:!0,groupName:!0,to:!0},po=(a(Ro,[{key:"_initContent",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case"remarkInfo":case"memberExtraInfo":case"onlineMemberInfo":break;case"groupProfile":t.content.groupProfile={},t._initGroupProfile(e[n]);break;case"operatorInfo":t.content.operatorInfo={},t._initOperatorInfo(e[n]);break;case"memberInfoList":case"msgMemberInfo":t._updateMemberList(e[n]);break;case"memberNum":t.content[n]=e[n],t.content.memberCount=e[n];break;case"newGroupProfile":t.content.newGroupProfile={},t._initNewGroupProfile(e[n]);break;default:t.content[n]=e[n]}})),this.content.userIDList||(this.content.userIDList=[this.content.operatorID])}},{key:"_initGroupProfile",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];lo[o]&&(this.content.groupProfile[o]=e[o])}}},{key:"_initOperatorInfo",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];this.content.operatorInfo[o]=e[o]}}},{key:"_updateMemberList",value:function(e){Ve(this.content.memberList)?this.content.memberList=e:this.content.memberList.forEach((function(t){e.forEach((function(e){t.userID===e.userID&&Object.assign(t,e)}))}))}},{key:"_initNewGroupProfile",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];this.content.newGroupProfile[o]="muteAllMembers"!==o?e[o]:1===e[o]}}}]),Ro),ho={from:!0,groupID:!0,groupName:!0,to:!0,groupType:!0},fo=(a(Ao,[{key:"_initContent",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case"memberInfoList":break;case"remarkInfo":t.content.handleMessage=e[n];break;case"groupProfile":t.content.groupProfile={},t._initGroupProfile(e[n]);break;default:t.content[n]=e[n]}}))}},{key:"_initGroupProfile",value:function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var o=t[n];ho[o]&&("groupName"===o?this.content.groupProfile.name=e[o]:this.content.groupProfile[o]=e[o])}}}]),Ao),go=(a(bo,[{key:"_getFileInfo",value:function(e){var t,n;return ut(e.fileName)||ut(e.fileSize)?(t=e.file.files[0],Y&&(t.path&&-1!==t.path.indexOf(".")&&(n=t.path.slice(t.path.lastIndexOf(".")+1).toLowerCase(),t.type=n,t.name||(t.name="".concat(nt(999999),".").concat(n))),t.name||(t.type="",t.name=t.path.slice(t.path.lastIndexOf("/")+1).toLowerCase()),t.suffix&&(t.type=t.suffix),t.url||(t.url=t.path)),{size:t.size,name:t.name}):{size:e.fileSize,name:e.fileName}}},{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateFileUrl",value:function(e){this.content.fileUrl=e}},{key:"sendable",value:function(){return""!==this.content.fileUrl&&""!==this.content.fileName&&0!==this.content.fileSize}}]),bo),_o=(a(Lo,[{key:"setData",value:function(e){return this.content.data=e,this}},{key:"setDescription",value:function(e){return this.content.description=e,this}},{key:"setExtension",value:function(e){return this.content.extension=e,this}},{key:"sendable",value:function(){return 0!==this.content.data.length||0!==this.content.description.length||0!==this.content.extension.length}}]),Lo),mo=(a(ko,[{key:"updatePercent",value:function(e){this._percent=e,1<this._percent&&(this._percent=1)}},{key:"updateVideoUrl",value:function(e){e&&(this.content.remoteVideoUrl=e)}},{key:"updateSnapshotInfo",value:function(e){var t=e.snapshotUrl,n=e.snapshotWidth;e=e.snapshotHeight,Ve(t)||(this.content.thumbUrl=this.content.snapshotUrl=t),Ve(n)||(this.content.thumbWidth=this.content.snapshotWidth=Number(n)),Ve(e)||(this.content.thumbHeight=this.content.snapshotHeight=Number(e))}},{key:"sendable",value:function(){return""!==this.content.remoteVideoUrl}}]),ko),vo=(a(Do,[{key:"sendable",value:function(){return!0}}]),Do),yo=(a(Eo,[{key:"_patchRichMediaPayload",value:function(e,t){e===E.MSG_IMAGE?t.imageInfoArray.forEach((function(e){!e.imageUrl&&e.url&&(e.imageUrl=e.url,e.sizeType=e.type,1===e.type?e.type=0:3===e.type&&(e.type=1))})):e===E.MSG_VIDEO?!t.remoteVideoUrl&&t.videoUrl&&(t.remoteVideoUrl=t.videoUrl):e===E.MSG_AUDIO?!t.remoteAudioUrl&&t.url&&(t.remoteAudioUrl=t.url):e===E.MSG_FILE&&!t.fileUrl&&t.url&&(t.fileUrl=t.url,t.url=void 0)}},{key:"_updateRichMediaDownloadUrl",value:function(e,t,n,o,i){(n||o)&&(e===E.MSG_IMAGE?t.imageInfoArray.forEach((function(e){e.url=oo(e.url,n,o,i)})):e===E.MSG_VIDEO?(t.videoUrl=oo(t.videoUrl,n,o,i),t.snapshotUrl=oo(t.thumbUrl,n,o,i),t.snapshotHeight=t.thumbHeight,t.snapshotWidth=t.thumbWidth):e===E.MSG_AUDIO?t.url=oo(t.url,n,o,i):e===E.MSG_FILE&&(t.fileUrl=oo(t.fileUrl,n,o,i)))}}]),Eo),Io=(a(So,[{key:"sendable",value:function(){return!Ve(this.content.messageList)||!Ve(this.content.downloadKey)}}]),So),Mo={1:E.MSG_PRIORITY_HIGH,2:E.MSG_PRIORITY_NORMAL,3:E.MSG_PRIORITY_LOW,4:E.MSG_PRIORITY_LOWEST},Co=(a(To,[{key:"elements",get:function(){return this._elements}},{key:"getElements",value:function(){return this._elements}},{key:"extractGroupInfo",value:function(e){null!==e&&(ct(e.nick)&&(this.nick=e.nick),ct(e.avatar)&&(this.avatar=e.avatar),ze(e=e.messageFromAccountExtraInformation))&&ct(e.nameCard)&&(this.nameCard=e.nameCard)}},{key:"handleGroupAtInfo",value:function(e){var t=this;e.payload&&e.payload.atUserList&&e.payload.atUserList.forEach((function(e){e!==E.MSG_AT_ALL?(t._groupAtInfoList.push({groupAtAllFlag:0,groupAtUserID:e}),t.atUserList.push(e)):(t._groupAtInfoList.push({groupAtAllFlag:1}),t.atUserList.push(E.MSG_AT_ALL))})),We(e.groupAtInfo)&&e.groupAtInfo.forEach((function(e){0===e.groupAtAllFlag?t.atUserList.push(e.groupAtUserID):1===e.groupAtAllFlag&&t.atUserList.push(E.MSG_AT_ALL)}))}},{key:"getGroupAtInfoList",value:function(){return this._groupAtInfoList}},{key:"_initProxy",value:function(){this._elements[0]&&(this.payload=this._elements[0].content,this.type=this._elements[0].type)}},{key:"reInitialize",value:function(e){e&&(this.status=this.from?Cn:Mn,!this.from)&&(this.from=e),this._initFlow(e),this._initSequence(e),this._concatConversationID(e),this.generateMessageID()}},{key:"isSendable",value:function(){return 0!==this._elements.length&&(!0===this._relayFlag||"function"==typeof this._elements[0].sendable&&this._elements[0].sendable())}},{key:"_initTo",value:function(e){this.conversationType===E.CONV_GROUP&&(this.to=e.groupID)}},{key:"_initSequence",value:function(e){var t,n,o;0===this.clientSequence&&e&&(this.clientSequence=!!e&&(void 0===gt[e]&&(t="3".concat((o=new Date).getHours()).slice(-2),n="0".concat(o.getMinutes()).slice(-2),o="0".concat(o.getSeconds()).slice(-2),gt[e]=parseInt([t,n,o,"0001"].join("")),o=n=t=null,Ae.l("autoIncrementIndex start index:".concat(gt[e]))),gt[e]++)),0===this.sequence&&this.conversationType===E.CONV_C2C&&(this.sequence=this.clientSequence)}},{key:"generateMessageID",value:function(){this.from===E.CONV_SYSTEM&&(this.senderTinyID="144115198244471703"),this.ID="".concat(this.senderTinyID,"-").concat(this.clientTime,"-").concat(this.random)}},{key:"_initFlow",value:function(e){""!==e&&(e===this.from?(this.flow="out",this.isRead=!0):this.flow="in")}},{key:"_concatConversationID",value:function(e){var t=this.to,n=this.conversationType;n!==E.CONV_SYSTEM?(e=n===E.CONV_C2C?e===this.from?t:this.from:this.to,this.conversationID=e?"".concat(n).concat(e):null):this.conversationID=E.CONV_SYSTEM}},{key:"isElement",value:function(e){return e instanceof Zn||e instanceof ro||e instanceof co||e instanceof uo||e instanceof go||e instanceof mo||e instanceof po||e instanceof fo||e instanceof _o||e instanceof vo||e instanceof Io}},{key:"setElement",value:function(e,t,n,o){var i=this;if(this.isElement(e))this._elements=[e];else{var a=function(e){if(e.type&&e.content)switch(e.type){case E.MSG_TEXT:i.setTextElement(e.content);break;case E.MSG_IMAGE:i.setImageElement(e.content,t,n,o);break;case E.MSG_AUDIO:i.setAudioElement(e.content,t,n,o);break;case E.MSG_FILE:i.setFileElement(e.content,t,n,o);break;case E.MSG_VIDEO:i.setVideoElement(e.content,t,n,o);break;case E.MSG_CUSTOM:i.setCustomElement(e.content);break;case E.MSG_LOCATION:i.setLocationElement(e.content);break;case E.MSG_GRP_TIP:i.setGroupTipElement(e.content);break;case E.MSG_GRP_SYS_NOTICE:i.setGroupSystemNoticeElement(e.content);break;case E.MSG_FACE:i.setFaceElement(e.content);break;case E.MSG_MERGER:i.setMergerElement(e.content,t,n,o)}};if(We(e))for(var s=0;s<e.length;s++)a(e[s]);else a(e)}this._initProxy()}},{key:"clearElement",value:function(){this._elements.length=0}},{key:"setTextElement",value:function(e){e="string"==typeof e?e:e.text,e=new Zn({text:e}),this._elements.push(e)}},{key:"setImageElement",value:function(e,t,n,o){e=new ro(e,t,n,o),this._elements.push(e)}},{key:"setAudioElement",value:function(e,t,n,o){e=new uo(e,t,n,o),this._elements.push(e)}},{key:"setFileElement",value:function(e,t,n,o){e=new go(e,t,n,o),this._elements.push(e)}},{key:"setVideoElement",value:function(e,t,n,o){e=new mo(e,t,n,o),this._elements.push(e)}},{key:"setLocationElement",value:function(e){e=new vo(e),this._elements.push(e)}},{key:"setCustomElement",value:function(e){e=new _o(e),this._elements.push(e)}},{key:"setGroupTipElement",value:function(e){var t,n={},o=e.operationType;Ve(e.memberInfoList)?e.operatorInfo&&(n=e.operatorInfo):o!==E.GRP_TIP_MBR_JOIN&&o!==E.GRP_TIP_MBR_KICKED_OUT&&o!==E.GRP_TIP_MBR_SET_ADMIN&&o!==E.GRP_TIP_MBR_CANCELED_ADMIN||(n=e.memberInfoList[0]),Ve(e.memberExtraInfo)||(t=e.memberExtraInfo.reason,e.msgMemberInfo.forEach((function(e){e.reason=t}))),o=n.nick,n=n.avatar,ct(o)&&(this.nick=o),ct(n)&&(this.avatar=n),o=new po(e),this._elements.push(o)}},{key:"setGroupSystemNoticeElement",value:function(e){e=new fo(e),this._elements.push(e)}},{key:"setFaceElement",value:function(e){e=new co(e),this._elements.push(e)}},{key:"setMergerElement",value:function(e,t,n,o){e=new Io(e,t,n,o),this._elements.push(e)}},{key:"setIsRead",value:function(e){this.isRead=e}},{key:"setRelayFlag",value:function(e){this._relayFlag=e}},{key:"_computePriority",value:function(e){if(!ut(e)){if(ct(e)&&-1!==Object.values(Mo).indexOf(e))return e;if(Ke(e)&&(e=""+e,-1!==Object.keys(Mo).indexOf(e)))return Mo[e]}return E.MSG_PRIORITY_NORMAL}},{key:"setNickAndAvatar",value:function(e){var t=e.nick;e=e.avatar,ct(t)&&(this.nick=t),ct(e)&&(this.avatar=e)}},{key:"setNameCard",value:function(e){ct(e)&&(this.nameCard=e)}},{key:"initC2CReadReceiptInfo",value:function(e){var t=e.readReceiptSentByPeer;e=void 0===(e=e.timestamp)?0:e,this.conversationType===E.CONV_C2C&&!0===this.needReadReceipt&&(this.readReceiptInfo.isPeerRead=1===(void 0===t?void 0:t),this.readReceiptInfo.timestamp=e)}}]),To);function To(e){o(this,To),this.ID="",this.conversationID=e.conversationID||null,this.conversationType=e.conversationType||E.CONV_C2C,this.conversationSubType=e.conversationSubType,this.time=e.time||Math.ceil(Date.now()/1e3),this.sequence=e.sequence||0,this.clientSequence=e.clientSequence||e.sequence||0,this.random=e.random||0===e.random?e.random:nt(),this.priority=this._computePriority(e.priority),this.nick=e.nick||"",this.avatar=e.avatar||"",this.isPeerRead=!1,this.nameCard="",this.hasRiskContent=Kt(e.checkResult),this._elements=[],this.isPlaceMessage=e.isPlaceMessage||0,this.isRevoked=2===e.isPlaceMessage||8===e.msgFlagBits,this.from=e.from||null,this.to=e.to||null,this.flow="",this.isSystemMessage=e.isSystemMessage||!1,this.protocol=e.protocol||"JSON",this.isResend=!1,this.isRead=!1,this.status=e.status||Cn,this._onlineOnlyFlag=!1,this._groupAtInfoList=[],this._relayFlag=!1,this.atUserList=[],this.cloudCustomData=e.cloudCustomData||"",this.isDeleted=!1,this.isModified=!!e.messageVersion,this._isExcludedFromUnreadCount=!(!e.messageControlInfo||1!==e.messageControlInfo.excludedFromUnreadCount),this._isExcludedFromLastMessage=!(!e.messageControlInfo||1!==e.messageControlInfo.excludedFromLastMessage),this.clientTime=e.clientTime||Te()||0,this.senderTinyID=e.senderTinyID||e.tinyID||"",this.readReceiptInfo=e.readReceiptInfo||{readCount:void 0,unreadCount:void 0,isPeerRead:void 0,timestamp:0},this.needReadReceipt=!0===e.needReadReceipt||1===e.needReadReceipt,this.version=e.messageVersion||0,this.isBroadcastMessage=e.isBroadcastMessage||!1,this._receiverList=e.receiverList||void 0,this.isSupportExtension=!0===e.isSupportExtension||1===e.isSupportExtension,this._cmConfigID=e.customModerationConfigurationID,this.revoker=e.revokerInfo&&e.revokerInfo.revoker||"",this.revokerInfo=e.revokerInfo||{userID:"",nick:"",avatar:""},this.revokeReason=e.revokeReason||"",this.reInitialize(e.currentUser),this.extractGroupInfo(e.groupProfile||null),this.handleGroupAtInfo(e),this.initC2CReadReceiptInfo(e)}function So(e,t,n,i){var a,s,r,c,u,l,d;o(this,So),this.type=E.MSG_MERGER,this.content={downloadKey:"",pbDownloadKey:"",messageList:[],title:"",abstractList:[],compatibleText:"",version:0,layersOverLimit:!1},e.downloadKey?(s=e.downloadKey,r=e.pbDownloadKey,c=e.title,u=e.abstractList,l=e.compatibleText,a=e.version,this.content.downloadKey=s,this.content.pbDownloadKey=r,this.content.title=c,this.content.abstractList=u,this.content.compatibleText=l,this.content.version=a||0):Ve(e.messageList)?1===e.layersOverLimit&&(this.content.layersOverLimit=!0):(s=e.messageList,r=e.title,c=e.abstractList,u=e.compatibleText,l=e.version,d=[],s.forEach((function(e){Ve(e)||(e=new yo(e,t,n,i),d.push(e))})),this.content.messageList=d,this.content.title=r,this.content.abstractList=c,this.content.compatibleText=u,this.content.version=l||0)}function Eo(e,t,n,i){var a,s;o(this,Eo),this.from=e.from,this.messageSender=e.from,this.time=e.time,this.messageSequence=e.sequence,this.clientSequence=e.clientSequence||e.sequence,this.messageRandom=e.random,this.cloudCustomData=e.cloudCustomData||"",this.clientTime=e.clientTime||void 0,e.ID?(this.ID=e.ID||"",this.nick=e.nick||"",this.avatar=e.avatar||"",e.messageBody?this.messageBody=JSON.parse(JSON.stringify(e.messageBody)):this.messageBody=[{type:e.type,payload:e.payload}],e.conversationType?e.conversationType.startsWith(E.CONV_C2C)?this.receiverUserID=e.to:e.conversationType.startsWith(E.CONV_GROUP)&&(this.receiverGroupID=e.to):e.receiverGroupID?this.receiverGroupID=e.receiverGroupID:e.receiverUserID&&(this.receiverUserID=e.receiverUserID),this.messageReceiver=e.to||e.messageReceiver):(this.nick=e.nick||"",this.avatar=e.avatar||"",this.messageBody=[],a=e.elements[0].type,s=e.elements[0].content,this._patchRichMediaPayload(a,s),this._updateRichMediaDownloadUrl(a,s,t,n,i),a===E.MSG_MERGER?this.messageBody.push({type:a,payload:new Io(s,t,n,i).content}):this.messageBody.push({type:a,payload:s}),e.groupID&&(this.receiverGroupID=e.groupID,this.messageReceiver=e.groupID),e.to&&(this.receiverUserID=e.to,this.messageReceiver=e.to),this.ID="".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random))}function Do(e){o(this,Do),this.type=E.MSG_LOCATION;var t=e.description,n=e.longitude;e=e.latitude,this.content={description:t,longitude:n,latitude:e}}function ko(e,t,n,i){o(this,ko),this.type=E.MSG_VIDEO,this._percent=0,this.content={remoteVideoUrl:e.remoteVideoUrl||e.videoUrl||"",videoFormat:e.videoFormat,videoSecond:parseInt(e.videoSecond,10),videoSize:e.videoSize,videoUrl:oo(e.videoUrl,t,n,i),videoDownloadFlag:2,videoUUID:e.videoUUID,thumbUUID:e.thumbUUID,thumbFormat:e.thumbFormat,thumbWidth:e.thumbWidth,snapshotWidth:e.thumbWidth,thumbHeight:e.thumbHeight,snapshotHeight:e.thumbHeight,thumbSize:e.thumbSize,snapshotSize:e.thumbSize,thumbDownloadFlag:2,thumbUrl:oo(e.thumbUrl,t,n,i),snapshotUrl:oo(e.thumbUrl,t,n,i)}}function Lo(e){o(this,Lo),this.type=E.MSG_CUSTOM,this.content={data:e.data||"",description:e.description||"",extension:e.extension||""}}function bo(e,t,n,i){o(this,bo),this.type=E.MSG_FILE,this._percent=0;var a=this._getFileInfo(e);this.content={downloadFlag:2,fileUrl:oo(e.url||e.fileUrl,t,n,i)||"",uuid:e.uuid,fileName:a.name||"",fileSize:a.size||0}}function Ao(e){o(this,Ao),this.type=E.MSG_GRP_SYS_NOTICE,this.content={},this._initContent(e)}function Ro(e){o(this,Ro),this.type=E.MSG_GRP_TIP,this.content={},this._initContent(e)}function Oo(e,t,n,i){o(this,Oo),this.type=E.MSG_AUDIO,this._percent=0,this.content={downloadFlag:2,second:e.second,size:e.size,url:oo(e.url,t,n,i),remoteAudioUrl:e.url||"",uuid:e.uuid}}function wo(e){o(this,wo),this.type=E.MSG_FACE,this.content=e||null}function Po(e,t,n,i){o(this,Po),this._imageMemoryURL="",this._fileDownloadProxy=t,this._authKey=n,this._fileDNList=i,Z||ee?this.createImageDataASURL(e.file):this.createImageDataASURLInWeb(e.file),this._initImageInfoModel(),this.type=E.MSG_IMAGE,this._percent=0,this.content={imageFormat:e.imageFormat||Re.UNKNOWN,uuid:e.uuid,imageInfoArray:[]},this.initImageInfoArray(e.imageInfoArray),this._autoFixUrl()}function No(e){if(ze(e))return{pushFlag:!0===e.disablePush?1:0,title:e.title||"",desc:e.description||"",ext:e.extension||"",apnsInfo:(o=void 0===(o=(n=e).apnsInfo)?{}:o,i=n.ignoreIOSBadge,n=n.disableVoipPush,i=!0===o.ignoreIOSBadge||!0===(void 0!==i&&i)?1:0,a=void 0,ut(n)||(a=!1===n?1:0),ut(o.disableVoipPush)||(a=!1===o.disableVoipPush?1:0),t(t({},o),{},{badgeMode:i,isVoipPush:a})),androidInfo:(o=void 0===(o=(n=e).androidInfo)?{}:o,n=n.androidOPPOChannelID,n=o.OPPOChannelID||(void 0===n?"":n),t(t({},o),{},{Sound:-1===(a=(i=o.sound||"").lastIndexOf("."))?i:i.slice(0,a),OPPOChannelID:n,GoogleChannelID:o.FCMChannelID||""}))};var n,o,i,a}r(Vo,bn),Go=g(Vo),a(Vo,[{key:"onNewMessage",value:function(e){var t=e.dataList,n=e.isInstantMessage,o=e.C2CRemainingUnreadList,i=e.C2CPairUnreadList,a=(e=e.isSyncingEnded,o=(n||Ae.l("".concat(this._n,".onNewMessage C2CPairUnreadList:"),i,"C2CRemainingUnreadList:",o),t=this._assembly({dataList:t,C2CRemainingUnreadList:o,C2CPairUnreadList:i,isInstantMessage:n})).conversationOptionsList,i=t.messageList,t=t.isUnreadC2CMessage,0<(a=mt(i)).length&&this.emitOEvt(S.MESSAGE_MODIFIED,a),this.get(11).onNewMessage({conversationOptionsList:o,isInstantMessage:n,isUnreadC2CMessage:t,isSyncingEnded:e}),vt(i));n&&0<a.length&&this.emitOEvt(S.MESSAGE_RECEIVED,a),i.length=0}},{key:"_assembly",value:function(e){for(var t=e.dataList,n=e.C2CRemainingUnreadList,o=e.C2CPairUnreadList,i=e.isInstantMessage,a=null,s=[],r=[],c={},u=this.get(26),l=!1,d=this.get(11),p=this.get(4),h=(e=this.get(17),this.getFileDownloadProxy()),f=this.getDowloadFileAuthKey(),g=e.getFileDNList(),_=0,m=t.length;_<m;_++)if(this._isC2CNotice(t[_]))this._noticeFromUnreadDBList.push(t[_].eventArray[0].c2CNotifyMsgArray[0]);else{var v=t[_],y=(v.currentUser=this.getMyUserID(),v.conversationType=E.CONV_C2C,v.isSystemMessage=!!v.isSystemMessage,(ut(v.nick)||ut(v.avatar))&&(l=!0),(a=new Co(v)).setElement(v.elements,h,f,g),a.setNickAndAvatar({nick:v.nick,avatar:v.avatar}),a.conversationID);if(i){if(this._msgFromUnreadDBMap.get(a.ID))continue;var I,M,C=!1,T=(a.from!==this.getMyUserID()?(M=d.getLatestMessageSentByPeer(y))&&(I=M.nick,M=M.avatar,l?a.setNickAndAvatar({nick:I,avatar:M}):I===a.nick&&M===a.avatar||(C=!0)):(I=d.getLatestMessageSentByMe(y))&&(M=I.nick,T=I.avatar,M===a.nick&&T===a.avatar||(d.modifyMessageSentByMe({conversationID:y,latestNick:a.nick,latestAvatar:a.avatar}),p.mockOnNickAvatarModified(a.nick,a.avatar))),1===t[_].isModified);if(d.isMessageSentByCurrentInstance(a)?a.isModified=T:T=!1,0===v.msgLifeTime)a._onlineOnlyFlag=!0,d.isMessageSentByCurrentInstance(a)||r.push(a);else{if(!d.pushIntoMessageList(r,a,T))continue;C&&(d.modifyMessageSentByPeer({conversationID:y,latestNick:a.nick,latestAvatar:a.avatar}),d.updateUserProfileSpecifiedKey({conversationID:y,nick:a.nick,avatar:a.avatar}))}i&&0<a.clientTime&&u.addMessageDelay(a.clientTime)}else this._msgFromUnreadDBMap.set(a.ID,a);if(0!==v.msgLifeTime){if(!1===a._onlineOnlyFlag){if(Ke(C=d.getLastMessageTime(y))&&a.time<C)continue;i&&(ut(c[y])?(v=0,"in"!==a.flow||a._isExcludedFromUnreadCount||(v=1),c[y]=s.push({conversationID:y,unreadCount:v,type:a.conversationType,subType:a.conversationSubType,lastMessage:a._isExcludedFromLastMessage?"":a})-1):(v=c[y],s[v].type=a.conversationType,s[v].subType=a.conversationSubType,s[v].lastMessage=a._isExcludedFromLastMessage?"":a,"in"!==a.flow||a._isExcludedFromUnreadCount||s[v].unreadCount++))}}else a._onlineOnlyFlag=!0}this._handleNoticeFromUnreadDB();var S=!1;if(We(o)&&0<o.length)for(var D=0,k=o.length;D<k;D++)!function(e){if(o[e].from!==E.CONV_SYSTEM){S=!0;var t=s.find((function(t){return t.conversationID==="".concat(E.CONV_C2C).concat(o[e].from)}));t?t.unreadCount=o[e].unreadCount:s.push({conversationID:"".concat(E.CONV_C2C).concat(o[e].from),unreadCount:o[e].unreadCount,type:E.CONV_C2C})}}(D);if(We(n))for(var L=0,b=n.length;L<b;L++)!function(e){s.find((function(t){return t.conversationID==="".concat(E.CONV_C2C).concat(n[e].from)}))||s.push({conversationID:"".concat(E.CONV_C2C).concat(n[e].from),type:E.CONV_C2C,lastMsgTime:n[e].lastMsgTime})}(L);return{conversationOptionsList:s,messageList:r,isUnreadC2CMessage:S}}},{key:"getMessageListFromUnreadDB",value:function(){return m(this._msgFromUnreadDBMap.values())}},{key:"_isC2CNotice",value:function(e){return!(!We(e=e.eventArray)||10!==e[0].event)}},{key:"_handleNoticeFromUnreadDB",value:function(){var e,t=this._noticeFromUnreadDBList.length;0!==t&&(Ae.l("".concat(this._n,"._handleNoticeFromUnreadDB count:").concat(t)),e=[],this._noticeFromUnreadDBList.forEach((function(t){t.hasOwnProperty("c2cMessageRevokedNotify")&&e.push(t)})),this.onMsgRevoked({dataList:e}),this._noticeFromUnreadDBList.length=0,e.length=0)}},{key:"onMsgRevoked",value:function(e){var t,n=this,o=this.get(11),i=[];e.dataList.forEach((function(e){e.c2cMessageRevokedNotify&&(e=e.c2cMessageRevokedNotify.revokedInfos,ut(e)||e.forEach((function(e){var a=n.getMyUserID()===e.from?"".concat(E.CONV_C2C).concat(e.to):"".concat(E.CONV_C2C).concat(e.from);t=o.revoke(a,e.sequence,e.random);var s,r=e.revokerInfo&&e.revokerInfo.revoker,c=e.revokerInfo&&e.revokerInfo.reason||"";t?s=t:(s={conversationID:a,sequence:e.sequence},e.tinyID&&e.clientTime&&e.random&&(s.ID="".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random)),e.time&&(s.time=e.time)),s&&(s.revoker=r,s.revokeReason=c,s.revokerInfo={userID:r,nick:"",avatar:""},i.push(s))})))})),0!==i.length&&(o.onMessageRevoked(i),Ae.l("".concat(this._n,".onMsgRevoked count:").concat(i.length)),o.updateRevokerInfo(i).then((function(e){n.emitOEvt(S.MESSAGE_REVOKED,e)})))}},{key:"onMsgReadReceipt",value:function(e){var t=this;e.dataList.forEach((function(e){var n;Ve(e.c2cMessageReadReceipt)||(n=e.c2cMessageReadReceipt.to,e.c2cMessageReadReceipt.uinPairReadArray.forEach((function(e){e=e.peerReadTime;var o=(Ae.l("".concat(t._n,".onMsgReadReceipt to:").concat(n," peerReadTime:").concat(e)),"".concat(E.CONV_C2C).concat(n)),i=t.get(11);i.recordPeerReadTime(o,e),i.updateMsgIsPeerReadProp(o,e)})))}))}},{key:"onMsgReadNotice",value:function(e){var t=this;e.dataList.forEach((function(e){var n;Ve(e.c2cMessageReadNotice)||(n=t.get(11),e.c2cMessageReadNotice.uinPairReadArray.forEach((function(e){var o=e.from;e=e.peerReadTime,Ae.l("".concat(t._n,".onMsgReadNotice from:").concat(o," lastReadTime:").concat(e)),o="".concat(E.CONV_C2C).concat(o),n.updateIsReadAfterReadReport({conversationID:o,lastMessageTime:e}),n.updateUnreadCount(o)})))}))}},{key:"onMsgModified",value:function(e){Ae.l("".concat(this._n,".onMsgModified options:"),e);var n=this.get(11);e.dataList.forEach((function(e){n.onMessageModified(t(t({},e),{},{conversationType:E.CONV_C2C}))}))}},{key:"onReadReceiptList",value:function(e){Ae.l("".concat(this._n,".onReadReceiptList options:"),e),this.get(11).updateReadReceiptInfo(e.dataList)}},{key:"sendMessage",value:function(e,t){return e=this._createC2CMessagePack(e,t),this.req(e)}},{key:"_createC2CMessagePack",value:function(e,t){var n=null,o=(t&&(t.offlinePushInfo&&(n=t.offlinePushInfo),!0===t.onlineUserOnly)&&(n?n.disablePush=!0:n={disablePush:!0}),""),i=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(o=e.cloudCustomData),[]),a=(ze(t)&&ze(t.messageControlInfo)&&(a=(r=t.messageControlInfo).excludedFromUnreadCount,s=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===a&&i.push("NoUnread"),!0===s&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck"),this.isOnlineMessage(e,t)?0:void 0),s=JSON.parse(JSON.stringify(e.getElements())),r=this.get(17).getFileDNList();return{P:Gn.SEND_C2C_MSG,data:{fromAccount:this.getMyUserID(),toAccount:e.to,msgBody:io(e.type,s,r),cloudCustomData:o,msgSeq:e.sequence,msgRandom:e.random,msgLifeTime:a,nick:e.nick,avatar:e.avatar,offlinePushInfo:No(n),messageControlInfo:0!==a?i:void 0,clientTime:e.clientTime,needReadReceipt:!0===e.needReadReceipt?1:0,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0,cmConfigID:e._cmConfigID}}}},{key:"isOnlineMessage",value:function(e,t){return!(!t||!0!==t.onlineUserOnly)}},{key:"revokeMessage",value:function(e){return this.req({P:Gn.REVOKE_C2C_MSG,data:{msgInfo:{fromAccount:e.from,toAccount:e.to,msgSeq:e.sequence,msgRandom:e.random,msgTimeStamp:e.time}}})}},{key:"deleteMessage",value:function(e){var t=e.to;return e=e.keyList,Ae.l("".concat(this._n,".deleteMessage toAccount:").concat(t," count:").concat(e.length)),this.req({P:Gn.DEL_C2C_MSG,data:{fromAccount:this.getMyUserID(),to:t,keyList:e}})}},{key:"modifyRemoteMessage",value:function(e){var t=e.from,n=e.to,o=void 0===(o=e.version)?0:o,i=e.sequence,a=e.random,s=e.time,r=e.payload,c=e.type,u=e.cloudCustomData,l=void(e=e._elements);return xt(c)&&(1<e.length&&e.splice(0,1,{type:c,content:r}),l=e),this.req({P:Gn.MODIFY_C2C_MSG,data:{from:t,to:n,version:o,sequence:i,random:a,time:s,elements:l,cloudCustomData:u}})}},{key:"setMessageRead",value:function(e){var t=this,n=e.conversationID,o=e.lastMessageTime,i="".concat(this._n,".").concat("setMessageRead"),a=(e="convID:".concat(n," lastMessageTime:").concat(o),Ae.l("".concat(i," ").concat(e)),Ke(o)||this.warn("DoNotModifyLastTime"),new Jn("setMessageRead"));return a.setMessage(e),this.req({P:Gn.SET_C2C_MSG_READ,data:{C2CMsgReaded:{cookie:"",C2CMsgReadedItem:[{toAccount:n.replace("C2C",""),lastMessageTime:o,receipt:1}]}}}).then((function(){a.end(),Ae.l("".concat(i," ok"));var e=t.get(11);return e.updateIsReadAfterReadReport({conversationID:n,lastMessageTime:o}),e.updateUnreadCount(n),mn()})).catch((function(e){return a.setError(e).end(),Ae.l("".concat(i," failed. error:"),e),yn(e)}))}},{key:"getRoamingMessage",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessage"),o=e.peerAccount,i=e.conversationID,a=e.count,s=e.lastMessageTime,r=(e=e.messageKey,"peerAccount:".concat(o," count:").concat(a||15," lastMessageTime:").concat(s||0," messageKey:").concat(e)),c=(Ae.l("".concat(n," ").concat(r)),new Jn("getRoamingMessage"));return this.req({P:Gn.GET_C2C_ROAMING_MSG,data:{peerAccount:o,count:a||15,lastMessageTime:s||0,messageKey:e}}).then((function(e){var o=(e=e.data).complete,a=e.messageList,s=e.messageKey,u=(e=e.lastMessageTime,ut(a)?Ae.l("".concat(n," ok. complete:").concat(o," but messageList is undefined!")):Ae.l("".concat(n," ok. complete:").concat(o," count:").concat(a.length)),c.setMessage("".concat(r," complete:").concat(o," length:").concat(a.length)).end(),t.get(11)),l=((o=1===o)&&u.setCompleted(i),[]);return a=u.onRoamingMessage(a,i,!0,l),u.modifyMessageList(i),u.updateIsRead(i),u.updateRoamingMsgKeyAndTime(i,s,e),s=u.getPeerReadTime(i),Ae.l("".concat(n," update isPeerRead property. convID:").concat(i," peerReadTime:").concat(s)),s?u.updateMsgIsPeerReadProp(i,s):(e=i.replace(E.CONV_C2C,""),t.getRemotePeerReadTime([e]).then((function(){u.updateMsgIsPeerReadProp(i,u.getPeerReadTime(i))}))),s="",0<a.length?s=a[0].ID:(e=u.getLocalOldestMessage(i))&&(s=e.ID),Ae.l("".concat(n," nextReqID:").concat(s," storedMsgCount:").concat(a.length)),{nextReqID:s,storedMessageList:a,assembledMessageList:l,isPullingCompleted:o}})).catch((function(e){return c.setMessage(r).setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))}},{key:"getRoamingMessagesHopping",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessagesHopping"),o=e.peerAccount,i=void 0===(i=e.time)?0:i,a=e.count,s=e.direction,r="".concat(E.CONV_C2C).concat(o),c="peerAccount:".concat(o," count:").concat(a," time:").concat(i," direction:").concat(s),u=(Ae.l("".concat(n," ").concat(c)),new Jn("getRoamingMessagesHopping"));return this.req({P:Gn.GET_C2C_ROAMING_MSG,data:{peerAccount:o,count:a+1,lastMessageTime:i,direction:s}}).then((function(e){var o=(e=e.data).complete,i=void 0===(i=e.messageList)?[]:i,a=(e=e.lastMessageTime,"complete:".concat(o," count:").concat(i.length)),l=(Ae.l("".concat(n," ok. ").concat(a)),u.setMessage("".concat(c," ").concat(a)).end(),1!==o&&(1===s?i.pop():i.shift()),t.get(11));return a=l.onRoamingMessage(i,r,!1),t._modifyMessageList(r,a),i=t._computeResult({complete:o,lastMessageTime:e,resultList:a}),l.storeHoppingMessageList(i.messageList),o=l.getPeerReadTime(r),Ae.l("".concat(n," update isPeerRead property. convID:").concat(r," peerReadTime:").concat(o)),o?l.updateMsgIsPeerReadProp(r,o):(e=r.replace(E.CONV_C2C,""),t.getRemotePeerReadTime([e]).then((function(){l.updateMsgIsPeerReadProp(r,l.getPeerReadTime(r))}))),mn(i)})).catch((function(e){return u.setMessage(c).setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_computeResult",value:function(e){var t=void 0===(t=e.complete)?0:t,n=e.lastMessageTime;return e={messageList:m(void 0===(e=e.resultList)?[]:e),isCompleted:!1,nextMessageTime:""},1===t?e.isCompleted=!0:e.nextMessageTime=n,e}},{key:"_modifyMessageList",value:function(e,t){if(e=this.get(11).getLocalConversation(e))for(var n=e.userProfile.nick,o=e.userProfile.avatar,i=(e=this.get(4).getNickAndAvatarByUserID(this.getMyUserID())).nick,a=e.avatar,s=t.length-1;0<=s;s--){var r=t[s];"in"===r.flow&&(r.nick!==n&&r.setNickAndAvatar({nick:n}),r.avatar!==o)&&r.setNickAndAvatar({avatar:o}),"out"===r.flow&&(r.nick!==i&&r.setNickAndAvatar({nick:i}),r.avatar!==a)&&r.setNickAndAvatar({avatar:a})}}},{key:"getRemotePeerReadTime",value:function(e){var t,n=this,o="".concat(this._n,".").concat("getRemotePeerReadTime");return Ve(e)?Promise.resolve():(t=new Jn("getRemotePeerReadTime"),Ae.l("".concat(o," userIDList:").concat(e)),this.req({P:Gn.GET_C2C_PEER_READ_TIME,data:{userIDList:e}}).then((function(i){var a=i.data.peerReadTimeList;Ae.l("".concat(o," ok. peerReadTimeList:").concat(a));for(var s="",r=n.get(11),c=0;c<e.length;c++)s+="".concat(e[c],"-").concat(a[c]," "),0<a[c]&&r.recordPeerReadTime("".concat(E.CONV_C2C).concat(e[c]),a[c]);t.setMessage(s).end()})).catch((function(e){t.setError(e).end(),Ae.w("".concat(o," failed. error:"),e)})))}},{key:"sendReadReceipt",value:function(e){var t,n=e[0].conversationID.replace(E.CONV_C2C,""),o=new Jn("sendReadReceipt"),i=(o.setMessage("peerAccount:".concat(n)),this.getMyUserID());return 0===(e=e.filter((function(e){return e.from!==i&&!0===e.needReadReceipt})).map((function(e){return{fromAccount:e.from,toAccount:e.to,sequence:e.sequence,random:e.random,time:e.time,clientTime:e.clientTime}}))).length?yn({code:Pn.READ_RECEIPT_MSG_LIST_EMPTY}):(t="".concat(this._n,".").concat("sendReadReceipt"),Ae.l("".concat(t,". peerAccount:").concat(n," length:").concat(e.length)),this.req({P:Gn.SEND_C2C_READ_RECEIPT,data:{peerAccount:n,messageInfoList:e}}).then((function(e){return o.end(),Ae.l("".concat(t," ok")),mn()})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)})))}},{key:"getReadReceiptList",value:function(e){var t=e[0].conversationID.replace(E.CONV_C2C,"");return Ae.l("".concat(this._n,".getReadReceiptList peerAccount:").concat(t," msgCount:").concat(e.length)),vn({messageList:e})}},{key:"getMessageExtensions",value:function(e,t){return Ae.l("".concat(this._n,".getMessageExtensions startSequence:").concat(t)),this.req({P:Gn.GET_C2C_MSG_EXT,data:{from:e.from,to:e.to,messageKey:this.getMessageKey(e),startSequence:t}})}},{key:"modifyMsgExts",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return Ae.l("".concat(this._n,".modifyMsgExts operateType:").concat(n)),this.req({P:Gn.MODIFY_C2C_MSG_EXT,data:{from:e.from,to:e.to,messageKey:this.getMessageKey(e),extensionList:t,operateType:n}})}},{key:"getMessageKey",value:function(e){var t=e.clientSequence,n=e.random;return e=e.time,"".concat(t,"_").concat(n,"_").concat(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._msgFromUnreadDBMap.clear(),this._noticeFromUnreadDBList.length=0}}]);var Go,Uo=Vo,xo={A2KEY_AND_TINYID_UPDATED:"_inner".concat(1),CLOUD_CONFIG:"_inner".concat(2),PROFILE_UPDATED:"_inner".concat(3),CONV_SYNC_COMPLETED:"_inner".concat(4),C2C_UNREAD_HANDLE_COMPLETED:"_inner".concat(5)},Fo=(a(qo,[{key:"_onCloudConfig",value:function(){var e=this._convM.getCloudConfig("topic_msg_limit");ut(e)||(this.TOPIC_MSG_LIMIT=Number(e)),Ae.l("".concat(this._n,"._onCloudConfig topicMsgLimit:").concat(this.TOPIC_MSG_LIMIT))}},{key:"onCheckTimer",value:function(e){if(e%20==0&&0<this._map.size){var t,n=T(this._map);try{for(n.s();!(t=n.n()).done;){var o=_(t.value,2),i=o[0],a=o[1];i.includes(Fe)&&a.size>=this.TOPIC_MSG_LIMIT&&this._convM.clearMemMsg(i,!0)}}catch(s){n.e(s)}finally{n.f()}}}},{key:"pushIn",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=e.conversationID,o=!0,i=(this._map.has(n)||this._map.set(n,new Map),this._getUniqueIDOfMsg(e));if(this._map.get(n).has(i)){var a=this._map.get(n).get(i);if(!t||!0===a.isModified)return!1}return this._map.get(n).set(i,e),this._setLatestMsgSentByPeer(n,e),this._setLatestMsgSentByMe(n,e),o}},{key:"unshift",value:function(e,t){var n;if(We(e)?0<e.length&&(n=e[0].conversationID,this._unshiftMultipleMsgs(e,t)):(n=e.conversationID,this._unshiftSingleMsg(e,t)),n){var o=Array.from(this._map.get(n).values());if(0!==(e=o.length)){for(var i=e-1;0<=i;i--)if("out"===o[i].flow){this._setLatestMsgSentByMe(n,o[i]);break}if(n.startsWith(E.CONV_C2C))for(var a=e-1;0<=a;a--)if("in"===o[a].flow){this._setLatestMsgSentByPeer(n,o[a]);break}}}}},{key:"_unshiftSingleMsg",value:function(e,t){var n,o,i=e.conversationID,a=this._getUniqueIDOfMsg(e);this._map.has(i)?(n=this._map.get(i),o=Array.from(n),n.has(a)||(o.unshift([a,e]),this._map.set(i,new Map(o)),t.push(e))):(this._map.set(i,new Map),this._map.get(i).set(a,e),t.push(e))}},{key:"_unshiftMultipleMsgs",value:function(e,t){for(var n=e.length,o=[],i=e[0].conversationID,a=this._map.get(i),s=this._map.has(i)?Array.from(a):[],r=0;r<n;r++){var c=this._getUniqueIDOfMsg(e[r]);a&&a.has(c)||(o.push([c,e[r]]),t.push(e[r]))}this._map.set(i,new Map(o.concat(s)))}},{key:"remove",value:function(e){var t=e.conversationID;e=this._getUniqueIDOfMsg(e),this._map.has(t)&&this._map.get(t).delete(e)}},{key:"revoke",value:function(e,t,n){var o;return this._map.has(e)?(o=this._map.get(e),this._updateMsgIsRevoked(o,t,n)):this._hoppingMsgMap.has(e)?(o=this._hoppingMsgMap.get(e),this._updateMsgIsRevoked(o,t,n)):null}},{key:"_updateMsgIsRevoked",value:function(e,t,n){var o,i=T(e);try{for(i.s();!(o=i.n()).done;){var a=_(o.value,2)[1];if(a.sequence===t&&(ut(n)||a.random===n))return a.isRevoked||(a.isRevoked=!0),a}}catch(s){i.e(s)}finally{i.f()}}},{key:"removeByConvID",value:function(e){var t=this._map.has(e);Ae.l("".concat(this._n,".removeByConvID convID:").concat(e," has:").concat(t)),t&&(this._map.delete(e),this._latestMsgSentByPeerMap.delete(e),this._latestMsgSentByMeMap.delete(e))}},{key:"findMessage",value:function(e){return this._findMsg(e,this._map)||this._findMsg(e,this._hoppingMsgMap)}},{key:"_findMsg",value:function(e,t){var n,o=null,i=T(t);try{for(i.s();!(n=i.n()).done;)for(var a=m(_(n.value,2)[1].values()),s=a.length,r=0;r<s;r++)if(a[r].ID===e){o=a[r];break}}catch(c){i.e(c)}finally{i.f()}return o}},{key:"updateMsgIsPeerReadProp",value:function(e,t){var n,o=[];return this._map.has(e)?(n=this._map.get(e),o=this._updateMsgIsPeerReadProp(n,t)):this._hoppingMsgMap.has(e)&&(n=this._hoppingMsgMap.get(e),o=this._updateMsgIsPeerReadProp(n,t)),Ae.l("".concat(this._n,".updateMsgIsPeerReadProp convID:").concat(e," peerReadTime:").concat(t," count:").concat(o.length)),o}},{key:"_updateMsgIsPeerReadProp",value:function(e,t){var n,o=[],i=T(e);try{for(i.s();!(n=i.n()).done;){var a=_(n.value,2)[1];a.time<=t&&!a.isPeerRead&&"out"===a.flow&&(a.isPeerRead=!0,o.push(a))}}catch(s){i.e(s)}finally{i.f()}return o}},{key:"updateMsgIsModifiedProp",value:function(e){var t=e.conversationID;this._map.has(t)&&(e=this._getUniqueIDOfMsg(e),t=this._map.get(t).get(e))&&(t.isModified=!0)}},{key:"hasLocalMsgList",value:function(e){return this._map.has(e)}},{key:"getLocalMsgList",value:function(e){return this.hasLocalMsgList(e)?m(this._map.get(e).values()):[]}},{key:"getLocalMaxSeq",value:function(e){return this.hasLocalMsgList(e)?(e=m(this._map.get(e).values()).map((function(e){return e.sequence})),Math.max.apply(Math,m(e))):0}},{key:"getLocalMaxTime",value:function(e){return this.hasLocalMsgList(e)?(e=m(this._map.get(e).values()).map((function(e){return e.time})),Math.max.apply(Math,m(e))):0}},{key:"hasLocalMsg",value:function(e,t){for(var n=!1,o=this.getLocalMsgList(e),i=o.length,a=0;a<i;a++)o[a].ID===t&&(n=!0);return n}},{key:"getLocalMsg",value:function(e,t){for(var n=null,o=this.getLocalMsgList(e),i=o.length,a=0;a<i;a++)if(o[a].ID===t){n=o[a];break}return n}},{key:"getLocalLastMsg",value:function(e){return(e=this.getLocalMsgList(e))[e.length-1]}},{key:"getLocalSecondLastMsg",value:function(e){return(e=this.getLocalMsgList(e))[e.length-2]}},{key:"getLocalOldestMsg",value:function(e){return this.getLocalMsgList(e)[0]}},{key:"_setLatestMsgSentByPeer",value:function(e,t){e.startsWith(E.CONV_C2C)&&"in"===t.flow&&this._latestMsgSentByPeerMap.set(e,t)}},{key:"_setLatestMsgSentByMe",value:function(e,t){"out"===t.flow&&this._latestMsgSentByMeMap.set(e,t)}},{key:"getLatestMsgSentByPeer",value:function(e){return this._latestMsgSentByPeerMap.get(e)}},{key:"getLatestMsgSentByMe",value:function(e){return this._latestMsgSentByMeMap.get(e)}},{key:"modifyMsgSentByPeer",value:function(e){var t=e.conversationID,n=e.latestNick,o=e.latestAvatar;if(!Ve(e=this._map.get(t))){var i=Array.from(e.values());if(0!==(e=i.length)){for(var a=null,s=0,r=!1,c=e-1;0<=c;c--)"in"===i[c].flow&&((a=i[c]).nick!==n&&(a.setNickAndAvatar({nick:n}),r=!0),a.avatar!==o&&(a.setNickAndAvatar({avatar:o}),r=!0),r)&&(s+=1);Ae.l("".concat(this._n,".modifyMsgSentByPeer convID:").concat(t," count:").concat(s))}}}},{key:"modifyMsgSentByMe",value:function(e){var t=e.conversationID,n=e.latestNick,o=e.latestAvatar;if(!Ve(e=this._map.get(t))){var i=Array.from(e.values());if(0!==(e=i.length)){for(var a=null,s=0,r=!1,c=e-1;0<=c;c--)"out"===i[c].flow&&((a=i[c]).nick!==n&&(a.setNickAndAvatar({nick:n}),r=!0),a.avatar!==o&&(a.setNickAndAvatar({avatar:o}),r=!0),r)&&(s+=1);Ae.l("".concat(this._n,".modifyMsgSentByMe convID:").concat(t," count:").concat(s))}}}},{key:"getTopicConvIDList",value:function(e){return m(this._map.keys()).filter((function(t){return t.startsWith("".concat(E.CONV_GROUP).concat(e))}))}},{key:"onMsgModified",value:function(e,t){var n,o,i,a;return(this._map.has(e)||this._hoppingMsgMap.has(e))&&(n="".concat(this._n,".onMsgModified"),i=this._getUniqueIDOfMsg(t),a=!!(o=this._getTargetMsg(e,i)),Ae.l("".concat(n," convID:").concat(e," uniqueID:").concat(i," has:").concat(a)),a)?(e=t.messageVersion,i=t.elements,a=t.cloudCustomData,t=t.checkResult,Ae.l("".concat(n," localVersion:").concat(o.version," remoteVersion:").concat(e)),o.version<e?(o.version=e,o._elements=JSON.parse(JSON.stringify(i)),o.payload=JSON.parse(JSON.stringify(i[0].content)),o.type=i[0].type,o.cloudCustomData=a,o.isModified=!0,o.hasRiskContent=Kt(t),{isUpdated:!0,message:o}):{isUpdated:!1,message:o}):{isUpdated:!1,message:null}}},{key:"_getUniqueIDOfMsg",value:function(e){var t=e.from,n=e.to,o=e.random,i=e.sequence;return e=e.time,"".concat(t,"-").concat(n,"-").concat(o,"-").concat(i,"-").concat(e)}},{key:"_getTargetMsg",value:function(e,t){if(this._map.has(e))return this._map.get(e).get(t);var n=void 0;if(this._hoppingMsgMap.has(e))for(var o=m(this._hoppingMsgMap.get(e).values()),i=0;i<o.length;i++)if(this._getUniqueIDOfMsg(o[i])===t){n=o[i];break}return n}},{key:"storeHoppingMsgList",value:function(e){if(0!==e.length){var t=e[0].conversationID,n=e.length;this._hoppingMsgMap.has(t)||this._hoppingMsgMap.set(t,new Map);for(var o=this._hoppingMsgMap.get(t),i=0;i<n;i++){var a=e[i];o.has(a.ID)||o.set(a.ID,a)}}}},{key:"getHoppingMsg",value:function(e,t){if(this._hoppingMsgMap.has(e))return this._hoppingMsgMap.get(e).get(t)}},{key:"reset",value:function(){this._map.clear(),this._latestMsgSentByPeerMap.clear(),this._latestMsgSentByMeMap.clear(),this._hoppingMsgMap.clear()}}]),qo);function qo(e){o(this,qo),this._convM=e,this._map=new Map,this._n="MsgListHandler",this._latestMsgSentByPeerMap=new Map,this._latestMsgSentByMeMap=new Map,this._hoppingMsgMap=new Map,this.TOPIC_MSG_LIMIT=1e3,this._convM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function Vo(e){return o(this,Vo),(e=Go.call(this,e))._n="C2CModule",e._msgFromUnreadDBMap=new Map,e._noticeFromUnreadDBList=[],e}function Bo(e){this.mixin(e)}function Ho(e,n,o){return ut(e)?{lastTime:0,lastSequence:0,fromAccount:"",messageForShow:"",payload:null,type:"",isRevoked:!1,cloudCustomData:"",onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:!1,revoker:null}:o&&e.ID||e instanceof Co?{lastTime:e.time||0,lastSequence:e.sequence||0,fromAccount:e.from||"",messageForShow:Ut(e.type,e.payload,n),payload:e.payload||null,type:e.type||null,isRevoked:e.isRevoked||!1,cloudCustomData:e.cloudCustomData||"",onlineOnlyFlag:e._onlineOnlyFlag||!1,nick:e.nick||"",nameCard:e.nameCard||"",version:e.version||0,isPeerRead:e.isPeerRead||!1,revoker:e.revoker||null}:t(t({},e),{},{messageForShow:Ut(e.type,e.payload,n)})}function jo(e,t){return Ve(e)?{lastTime:0,lastSequence:0,fromAccount:"",payload:null,type:"",messageForShow:"",nick:"",avatar:"",version:0,cloudCustomData:"",isRevoked:!1,revoker:null}:{lastTime:e.time||0,lastSequence:e.sequence||0,fromAccount:e.from||"",payload:e.payload||null,type:e.type||"",messageForShow:Ut(e.type,e.payload,t),nick:e.nick||"",avatar:e.avatar||"",version:e.version||0,cloudCustomData:e.cloudCustomData||"",isRevoked:e.isRevoked||!1,revoker:e.revoker||null}}function Ko(e){var t=String(e).replace(/[=]+$/,""),n="";if(t.length%4==1)return"";for(var o,i,a=0,s=0;i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)&&(n+=String.fromCharCode(255&o>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);try{return decodeURIComponent(escape(n))}catch(r){return""}}Bo.mixin=function(e){(e=e.prototype||e)._isReady=!1,e.ready=function(e){if(e)return this._isReady?void(1<arguments.length&&void 0!==arguments[1]&&arguments[1]?e.call(this):setTimeout(e,1)):(this._readyQueue=this._readyQueue||[],void this._readyQueue.push(e))},e.triggerReady=function(){var e=this;this._isReady=!0,setTimeout((function(){var t=e._readyQueue;e._readyQueue=[],t&&0<t.length&&t.forEach((function(e){e.call(this)}),e)}),1)},e.resetReady=function(){this._isReady=!1,this._readyQueue=[]},e.isReady=function(){return this._isReady}};var $o,zo,Wo,Yo,Xo,Jo=["jpg","jpeg","gif","png","bmp","image","webp"],Zo=["mp4","quicktime","mov"],Qo=(a(na,[{key:"validate",value:function(e){var t,n=!0,o="";if(Ve(e))return{valid:!1,tips:"empty options"};if(e.profileCustomField)for(var i=e.profileCustomField.length,a=null,s=0;s<i;s++){if(a=e.profileCustomField[s],!ct(a.key)||-1===a.key.indexOf("Tag_Profile_Custom"))return{valid:!1,tips:"The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom"};if(!ct(a.value))return{valid:!1,tips:"The type of values of the custom profile key-value pairs (which is profileCustomField) must be String"}}for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if("profileCustomField"===t)continue;if(Ve(e[t])&&!ct(e[t])&&!Ke(e[t])){o="key:"+t+", invalid value:"+e[t],n=!1;continue}switch(t){case"nick":ct(e[t])||(n=!(o="nick must be a string")),500<et(e[t])&&(o="nick name limited: must less than or equal to ".concat(500," bytes, current size: ").concat(et(e[t])," bytes"),n=!1);break;case"gender":it(Pe,e.gender)||(o="key:gender, invalid value:"+e.gender,n=!1);break;case"birthday":Ke(e.birthday)||(n=!(o="birthday must be a number"));break;case"location":ct(e.location)||(n=!(o="location must be a string"));break;case"selfSignature":ct(e.selfSignature)||(n=!(o="selfSignature must be a string"));break;case"allowType":it(Ge,e.allowType)||(o="key:allowType, invalid value:"+e.allowType,n=!1);break;case"language":Ke(e.language)||(n=!(o="language must be a number"));break;case"avatar":ct(e.avatar)||(n=!(o="avatar must be a string"));break;case"messageSettings":0!==e.messageSettings&&1!==e.messageSettings&&(n=!(o="messageSettings must be 0 or 1"));break;case"adminForbidType":it(Ne,e.adminForbidType)||(o="key:adminForbidType, invalid value:"+e.adminForbidType,n=!1);break;case"level":Ke(e.level)||(n=!(o="level must be a number"));break;case"role":Ke(e.role)||(n=!(o="role must be a number"));break;default:o="unknown key:"+t+" "+e[t],n=!1}}return{valid:n,tips:o}}}]),na),ei=(a(ta,[{key:"set",value:function(e){var t;this.map.size>=this.MAX_LENGTH&&(t=this.map.entries().next().value[0],this.map.delete(t)),this.map.set(e,1)}},{key:"has",value:function(e){return this.map.has(e)}},{key:"delete",value:function(e){this.has(e)&&this.map.delete(e)}},{key:"reset",value:function(){this.map.clear()}}]),ta),ti=["groupID","name","avatar","type","introduction","notification","ownerID","selfInfo","createTime","infoSequence","lastInfoTime","lastMessage","nextMessageSeq","memberNum","maxMemberNum","memberList","joinOption","groupCustomField","muteAllMembers","isSupportTopic","inviteOption","_lastRevokedTime"],ni=(a(ea,[{key:"memberNum",get:function(){return this.memberCount},set:function(e){}},{key:"maxMemberNum",get:function(){return this.maxMemberCount},set:function(e){}},{key:"_initGroup",value:function(e){for(var t in e)ti.indexOf(t)<0||("selfInfo"!==t?("memberNum"===t&&(this.memberCount=e[t]),"maxMemberNum"===t&&(this.maxMemberCount=e[t]),"isSupportTopic"!==t?this[t]=e[t]:this.isSupportTopic=1===e[t]):this.updateSelfInfo(e[t]))}},{key:"updateGroup",value:function(e){var t=this;(e.appid=void 0,e.grossTopicNextMsgSeq=void 0,e.selfInfo&&(e.selfInfo.grossTopicReadSeq=void 0),e=JSON.parse(JSON.stringify(e))).lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),ut(e.muteAllMembers)||("On"===e.muteAllMembers?e.muteAllMembers=!0:e.muteAllMembers=!1),e.groupCustomField&&_t(this.groupCustomField,e.groupCustomField),ut(e.memberNum)||(this.memberCount=e.memberNum),ut(e.maxMemberNum)||(this.maxMemberCount=e.maxMemberNum),ut(e.isSupportTopic)||(this.isSupportTopic=Ke(e.isSupportTopic)?1===e.isSupportTopic:e.isSupportTopic),Ze(this,e,["members","errorCode","lastMsgTime","groupCustomField","memberNum","maxMemberNum","isSupportTopic"]),We(e.members)&&0<e.members.length&&e.members.forEach((function(e){e.userID===t.selfInfo.userID&&Ze(t.selfInfo,e,["sequence"])}))}},{key:"updateSelfInfo",value:function(e){e={nameCard:e.nameCard,joinTime:e.joinTime,role:e.role,messageRemindType:e.messageRemindType,readedSequence:e.readedSequence,excludedUnreadSequenceList:e.excludedUnreadSequenceList},Ze(this.selfInfo,t({},e),[],["",null,void 0,0,NaN])}},{key:"setSelfNameCard",value:function(e){this.selfInfo.nameCard=e}}]),ea),oi=(a(Qi,[{key:"toAccount",get:function(){return this.conversationID.startsWith(E.CONV_C2C)?this.conversationID.replace(E.CONV_C2C,""):this.conversationID.startsWith(E.CONV_GROUP)?this.conversationID.replace(E.CONV_GROUP,""):""}},{key:"_initProfile",value:function(e){var t=this;Object.keys(e).forEach((function(n){switch(n){case"userProfile":t.userProfile=e.userProfile;break;case"groupProfile":t.groupProfile=e.groupProfile}})),ut(this.userProfile)&&this.type===E.CONV_C2C?this.userProfile=new Qo({userID:e.conversationID.replace("C2C","")}):ut(this.groupProfile)&&this.type===E.CONV_GROUP&&(this.groupProfile=new ni({groupID:e.conversationID.replace("GROUP","")}))}},{key:"updateUnreadCount",value:function(e){var t=e.nextUnreadCount,n=e.isFromGetConversations;e=e.isUnreadC2CMessage,ut(t)||(yt(this.subType)?this.unreadCount=0:n&&this.type===E.CONV_GROUP||n&&this.type===E.CONV_TOPIC||e&&this.type===E.CONV_C2C?this.unreadCount=t:this.unreadCount=this.unreadCount+t)}},{key:"updateLastMessage",value:function(e){this.lastMessage=Ho(e)}},{key:"updateGroupAtInfoList",value:function(e){var t;this._isNeedMergeGroupAtInfo(e)||(-1!==(t=(v(t=e.groupAtType)||y(t)||I(t)||C()).slice(0)).indexOf(E.CONV_AT_ME)&&-1!==t.indexOf(E.CONV_AT_ALL)&&(t=[E.CONV_AT_ALL_AT_ME]),t={from:e.from,groupID:e.groupID,topicID:e.topicID,messageSequence:e.sequence,atTypeArray:t,__random:e.__random,__sequence:e.__sequence},this.groupAtInfoList.push(t))}},{key:"_isNeedMergeGroupAtInfo",value:function(e){var t,n=e.groupID,o=e.sequence;return!!It({groupID:n})&&(t=!1,this.groupAtInfoList.forEach((function(n){n.messageSequence===o&&(-1<n.atTypeArray.indexOf(E.CONV_AT_ME)&&-1<e.groupAtType.indexOf(E.CONV_AT_ALL)&&(n.atTypeArray=[E.CONV_AT_ALL_AT_ME]),-1<n.atTypeArray.indexOf(E.CONV_AT_ALL)&&-1<e.groupAtType.indexOf(E.CONV_AT_ME)&&(n.atTypeArray=[E.CONV_AT_ALL_AT_ME],n.__random=e.__random,n.__sequence=e.__sequence),t=!0)})),t)}},{key:"clearGroupAtInfoList",value:function(){this.groupAtInfoList.length=0}},{key:"reduceUnreadCount",value:function(){return 1<=this.unreadCount&&(--this.unreadCount,!0)}},{key:"isLastMessageRevoked",value:function(e){var t=e.sequence;return e=e.time,this.type===E.CONV_C2C&&t===this.lastMessage.lastSequence&&e===this.lastMessage.lastTime||this.type===E.CONV_GROUP&&t===this.lastMessage.lastSequence}},{key:"setLastMessageRevoked",value:function(e){this.lastMessage.isRevoked=e}},{key:"setLastMessageRevoker",value:function(e){this.lastMessage.revoker=e}},{key:"setDraftText",value:function(e){this.draftText=e}}]),Qi),ii=(s(Q={},E.MSG_REMIND_ACPT_AND_NOTE,0),s(Q,E.MSG_REMIND_DISCARD,1),s(Q,E.MSG_REMIND_ACPT_NOT_NOTE,2),Q),ai=(a(Zi,[{key:"onAllRcvMsgOptNotify",value:function(e){e=this._handleResult(e),this._convM.emitOEvt(S.ALL_RECEIVE_MESSAGE_OPT_UPDATED,e)}},{key:"getC2CMsgRemindType",value:function(e){var t=this,n="".concat(this._n,".getC2CMsgRemindType");return this._convM.req({P:Gn.GET_C2C_PEER_MUTE_NOTIFICATIONS,data:{toAccount:this._convM.getMyUserID(),userIDList:e}}).then((function(o){Ae.l("".concat(n," ok. userIDList:").concat(e)),o=o.data.muteFlagList,t._convM.onC2CMsgRemindTypeFetched(o)})).catch((function(e){Ae.e("".concat(n," failed. error:"),e)}))}},{key:"set",value:function(e){return e.groupID?this._setGroupMsgRemindType(e):We(e.userIDList)?this._setC2CMsgRemindType(e):void 0}},{key:"_setGroupMsgRemindType",value:function(e){var t=this,n="".concat(this._n,".").concat("_setGroupMsgRemindType"),o=e.groupID,i=e.messageRemindType,a="groupID:".concat(o," messageRemindType:").concat(i),s=new Jn("_setGroupMsgRemindType"),r=(s.setMessage(a),this._get(7));return r?r.modifyGroupMemberInfo({groupID:o,messageRemindType:i,userID:this._convM.getMyUserID()}).then((function(){s.end(),Ae.l("".concat(n," ok. ").concat(a));var o=t.onGroupMsgRemindTypeUpdated(e);return t._convM.onTotalUnreadCountUpdate(),mn(o)})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)})):yn({code:Pn.NO_MODULE})}},{key:"onGroupMsgRemindTypeUpdated",value:function(e){var t,n,o=e.groupID,i=(e=e.messageRemindType,Ae.l("".concat(this._n,".onGroupMsgRemindTypeUpdated groupID:").concat(o," messageRemindType:").concat(e)),this._get(7).getLocalGroupProfile(o));return i&&(i.selfInfo.messageRemindType=e),Mt(o)?(t=Gt(n=o),(n=this._get(10).getLocalTopic(t,n))&&n.updateSelfInfo({messageRemindType:e})&&this._convM.emitOEvt(S.TOPIC_UPDATED,{groupID:t,topic:n}),{topic:n}):(this._convM.patchMsgRemindType({ID:o,isC2CConversation:!1,messageRemindType:e})&&this._emitConvUpdate(),{group:i})}},{key:"_setC2CMsgRemindType",value:function(e){var t=this,n="".concat(this._n,".").concat("_setC2CMsgRemindType"),o=e.userIDList,i=e.messageRemindType,a=o.slice(0,30),s=(e=ii[i]||0,"userIDList:".concat(a," messageRemindType:").concat(i)),r=new Jn("_setC2CMsgRemindType");return r.setMessage(s),this._convM.req({P:Gn.SET_C2C_PEER_MUTE_NOTIFICATIONS,data:{userIDList:a,muteFlag:e}}).then((function(e){r.end(),e=e.data.errorList;var o=[],c=[],u=(We(e)&&e.forEach((function(e){o.push(e.userID),c.push({userID:e.userID,code:e.errorCode})})),e=a.filter((function(e){return-1===o.indexOf(e)})),Ae.l("".concat(n," ok. ").concat(s," successUserIDList:").concat(e," failureUserIDList:").concat(JSON.stringify(c))),0);return e.forEach((function(e){t._convM.patchMsgRemindType({ID:e,isC2CConversation:!0,messageRemindType:i})&&(u+=1)})),1<=u&&t._emitConvUpdate(),a.length=o.length=0,t._convM.onTotalUnreadCountUpdate(),vn({successUserIDList:e.map((function(e){return{userID:e}})),failureUserIDList:c})})).catch((function(e){return r.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_get",value:function(e){return this._convM.get(e)}},{key:"_emitConvUpdate",value:function(){this._convM.emitConvUpdate(!0,!1)}},{key:"setAllRcvMsgOpt",value:function(e){var t="".concat(this._n,".").concat("setAllRcvMsgOpt"),n=void 0===(n=e.messageRemindType)?E.MSG_REMIND_ACPT_NOT_NOTE:n,o=void 0===(o=e.isRepeated)||o,i=void 0===(i=(a=this._calcStartAndEndTime(e)).startTime)?0:i,a=void 0===(a=a.endTime)?0:a,s=(e=JSON.stringify(e),new Jn("setAllRcvMsgOpt"));return s.setMessage(e),Ae.l("".concat(t," options:").concat(e)),this._convM.req({P:Gn.SET_ALL_RECEIVE_MSG_OPT,data:{messageRemindType:ii[n],startTime:i,endTime:a,isRepeated:o?1:0}}).then((function(e){return s.end(),Ae.l("".concat(t," ok.")),mn(e)})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_calcStartAndEndTime",value:function(e){var t=void 0===(t=e.startHour)?0:t,n=void 0===(n=e.startMinute)?0:n,o=void 0===(o=e.startSecond)?0:o,i=void 0===(i=e.duration)?0:i,a=(e=void 0===(e=e.isRepeated)||e,(r=new Date).getFullYear()),s=r.getMonth(),r=r.getDate();return{startTime:a=Math.round(new Date(a,s,r,t,n,o).getTime()/1e3),endTime:e&&86400<=i?a+86400:a+i}}},{key:"getAllRcvMsgOpt",value:function(){var e=this,t="".concat(this._n,".").concat("getAllRcvMsgOpt"),n=new Jn("getAllRcvMsgOpt");return this._convM.req({P:Gn.GET_ALL_RECEIVE_MSG_OPT,data:{toAccount:this._convM.getMyUserID()}}).then((function(o){return o=o.data,n.setMessage(JSON.stringify(o)).end(),Ae.l("".concat(t," ok. data:").concat(JSON.stringify(o))),mn(o=e._handleResult(o))})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_handleResult",value:function(e){var t=e.messageRemindType,n=e.startTime,o=e.endTime,i=(e=e.isRepeated,E.MSG_REMIND_ACPT_AND_NOTE);return 1===t&&(i=E.MSG_REMIND_DISCARD),{messageRemindType:i=2===t?E.MSG_REMIND_ACPT_NOT_NOTE:i,startTime:n,endTime:o,isRepeated:1===e}}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Zi),si=(a(Ji,[{key:"setConvCustomData",value:function(e){var t=this,n="".concat(this._n,".").concat("setConvCustomData"),o=e.conversationIDList,i=e.customData,a=(Ae.l("".concat(n," options:"),e),new Jn("setConvCustomData")),s=(a.setMessage(JSON.stringify(e)),{fromAccount:this._getMyUserID(),itemList:[]}),r=[],c=[];return o.forEach((function(e){var n;return t._hasLocalConv(e)?Ct(e)||Tt(e)?(n={operationType:2,contactItem:void 0,customMark:i},Ct(e)?n.contactItem={type:1,toAccount:e.replace(E.CONV_C2C,"")}:Tt(e)&&(n.contactItem={type:2,groupID:e.replace(E.CONV_GROUP,"")}),void s.itemList.push(n)):(t._onConvIDInvalid(c,e),!0):(t._onConvNotFound(c,e),!0)})),c.length===o.length?vn({successConversationIDList:r,failureConversationIDList:c}):this._convM.req({P:Gn.SET_CONV_CUSTOM_DATA,data:s}).then((function(e){var o,s,u;return a.end(),Ae.l("".concat(n," ok")),We(e=e.data.resultItem)&&(u=!1,e.forEach((function(e){o=t._concatConvID(e.contactItem),0===e.resultCode?(r.push(o),(s=t._getLocalConv(o))&&s.customData!==i&&(s.customData=i,u=!0)):c.push({conversationID:o,code:e.resultCode,message:e.resultInfo})})),!0===u)&&t._emitConvUpdate(),mn({successConversationIDList:r,failureConversationIDList:c})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"markConv",value:function(e){var t,n,o,i,a,s,r,c,u,l,d=this;return this._convM.canIUse(N.CONV_MARK)?(t="".concat(this._n,".").concat("markConv"),n=e.conversationIDList,o=e.markType,i=e.enableMark,Ae.l("".concat(t," options:"),e),a=new Jn("markConv"),s=void a.setMessage(JSON.stringify(e)),r=void 0,e=this._getFlagBit(o),!0===i?r=[e]:s=[e],c={fromAccount:this._getMyUserID(),itemList:[]},u=[],l=[],n.forEach((function(e){var t;return d._hasLocalConv(e)?Ct(e)||Tt(e)?(t={operationType:1,contactItem:void 0,clearMark:s,setMark:r},Ct(e)?t.contactItem={type:1,toAccount:e.replace(E.CONV_C2C,"")}:Tt(e)&&(t.contactItem={type:2,groupID:e.replace(E.CONV_GROUP,"")}),void c.itemList.push(t)):(d._onConvIDInvalid(l,e),!0):(d._onConvNotFound(l,e),!0)})),l.length===n.length?vn({successConversationIDList:u,failureConversationIDList:l}):this._convM.req({P:Gn.MARK_CONV,data:c}).then((function(e){var n,s,r;return a.end(),Ae.l("".concat(t," ok")),We(e=e.data.resultItem)&&(r=!1,e.forEach((function(e){var t;n=d._concatConvID(e.contactItem),0===e.resultCode?(u.push(n),(s=d._getLocalConv(n))&&(t=s.markList.indexOf(o),!0===i?-1===t&&(s.markList.push(o),r=!0):-1!==t&&(s.markList.splice(t,1),r=!0))):l.push({conversationID:n,code:e.resultCode,message:e.resultInfo})})),!0===r)&&d._emitConvUpdate(),mn({successConversationIDList:u,failureConversationIDList:l})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("markConv")}},{key:"getLocalConvGroupList",value:function(){var e=this;return Ae.l("".concat(this._n,".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)),this._pagingStatus===kn?this.getRemoteConvGroupList().then((function(){return mn(m(e._convGroupMap.values()))})):vn(m(this._convGroupMap.values()))}},{key:"searchConvGroupAndMark",value:function(e,t){var n=this,o="".concat(this._n,".searchConvGroupAndMark"),i=[];return e.forEach((function(e){1===t?i.push({type:1,toAccount:e}):2===t&&i.push({type:2,groupID:e})})),Ae.l("".concat(o," type:").concat(t," list:"),e),this._convM.req({P:Gn.SEARCH_CONV_GRP_MARK,data:{fromAccount:this._getMyUserID(),contactItem:i}}).then((function(e){var t=(e=e.data).contactItem;e=e.groupItem,Ae.l("".concat(o," ok. contactItem:"),t,"groupItem:",e),n._fillConvGroupMap(e),n._handleContactItem(t),n._emitConvUpdate()})).catch((function(e){Ae.w("".concat(o," failed. error:"),e)}))}},{key:"_fillConvGroupMap",value:function(e){var t=this;We(e)&&e.forEach((function(e){var n=e.convGroupID;e=e.groupName,t._convGroupMap.set(n,e)}))}},{key:"_handleContactItem",value:function(e){var t,n=this;We(e)&&e.forEach((function(e){var o=[],i=e.standardMark,a=e.customData,s=e.convGroupIDList;We(s)&&s.forEach((function(e){n._convGroupMap.has(e)&&o.push(n._convGroupMap.get(e))})),t=n._concatConvID(e),(t=n._getLocalConv(t))&&(t.markList=Ft(i),t.customData=a||"",t.conversationGroupList=[].concat(o))}))}},{key:"getRemoteConvGroupList",value:function(){var e=this,t="".concat(this._n,".getRemoteConvGroupList");return this._pagingStatus=En,this._convM.req({P:Gn.GET_CONV_GRP_LIST,data:{fromAccount:this._getMyUserID(),startIndex:this._startIndex}}).then((function(n){var o=(n=n.data).completeFlag,i=n.contactItem,a=void 0===(a=n.nextStartIndex)?0:a;if(n=n.groupItem,e._startIndex=a,Ae.l("".concat(t," completeFlag:").concat(o," nextStartIndex:").concat(a,", groupItem:"),n,"contactItem:",i),e._fillConvGroupMap(n),e._handleContactItem(i),0===o)return e.getRemoteConvGroupList();1===o&&(e._pagingStatus=Dn,e._emitConvUpdate(),e._emitConvGroupListUpdate())})).catch((function(n){e._pagingStatus=kn,Ae.w("".concat(t," failed. error:"),n)}))}},{key:"createConvGroup",value:function(e){var t,n,o,i,a,s,r=this;return this._convM.canIUse(N.CONV_GROUP)?(t="".concat(this._n,".").concat("createConvGroup"),Ae.l("".concat(t," options:"),e),(n=new Jn("createConvGroup")).setMessage(JSON.stringify(e)),o=e.groupName,e=e.conversationIDList,i={fromAccount:this._getMyUserID(),itemList:[{groupName:o,contactItem:[]}]},a=[],s=[],e.forEach((function(e){return r._hasLocalConv(e)?Ct(e)||Tt(e)?void(Ct(e)?i.itemList[0].contactItem.push({type:1,toAccount:e.replace(E.CONV_C2C,"")}):Tt(e)&&i.itemList[0].contactItem.push({type:2,groupID:e.replace(E.CONV_GROUP,"")})):(r._onConvIDInvalid(s,e),!0):(r._onConvNotFound(s,e),!0)})),s.length===e.length?vn({successConversationIDList:a,failureConversationIDList:s}):this._convM.req({P:Gn.CREATE_CONV_GRP,data:i}).then((function(e){n.end(),Ae.l("".concat(t," ok"));var i,c,u,l=(e=e.data.groupResultItem[0]).groupItem;return e=e.resultItem,ze(l)&&(r._convGroupMap.set(l.convGroupID,l.groupName),r._emitConvGroupListUpdate()),We(e)&&(u=!1,e.forEach((function(e){i=r._concatConvID(e.contactItem),0===e.resultCode?(a.push(i),(c=r._getLocalConv(i))&&-1===c.conversationGroupList.indexOf(o)&&(c.conversationGroupList.push(o),u=!0)):s.push({conversationID:i,code:e.resultCode,message:e.resultInfo})})),!0===u)&&(r._emitConvUpdate(),r._emitConvGroupListUpdate()),mn({successConversationIDList:a,failureConversationIDList:s})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("createConvGroup")}},{key:"deleteConvGroup",value:function(e){var t,n,o=this;return this._convM.canIUse(N.CONV_GROUP)?(t="".concat(this._n,".").concat("deleteConvGroup"),Ae.l("".concat(t," groupName:").concat(e)),(n=new Jn("deleteConvGroup")).setMessage(e),this._convM.req({P:Gn.DEL_CONV_GRP,data:{fromAccount:this._getMyUserID(),groupName:[e]}}).then((function(i){var a;n.end(),Ae.l("".concat(t," ok")),We(i=i.data.groupItem)&&(a=!1,i.forEach((function(e){o._convGroupMap.has(e.convGroupID)&&(o._convGroupMap.delete(e.convGroupID),a=!0)})),!0===a)&&o._emitConvGroupListUpdate(),o._eraseFromConversationGroupList([e])})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("deleteConvGroup")}},{key:"renameConvGroup",value:function(e){var t,n,o,i,a=this;return this._convM.canIUse(N.CONV_GROUP)?(t="".concat(this._n,".").concat("renameConvGroup"),Ae.l("".concat(t," options:"),e),(n=new Jn("renameConvGroup")).setMessage(JSON.stringify(e)),o=e.oldName,i=e.newName,this._convM.req({P:Gn.RENAME_CONV_GRP,data:{fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:1,oldName:o,newName:i}}}).then((function(e){n.end(),Ae.l("".concat(t," ok")),e=e.data.updateGroupResult.convGroupID,a._convGroupMap.set(e,i),a._emitConvGroupListUpdate(),e=a._convM.getLocalConvList();var s,r,c=!1;e.forEach((function(e){s=e.conversationGroupList,-1!==(r=s.indexOf(o))&&(s.splice(r,1,i),c=!0)})),!0===c&&a._emitConvUpdate()})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("renameConvGroup")}},{key:"addConvsToGroup",value:function(e){var t,n,o,i,a,s,r,c=this;return this._convM.canIUse(N.CONV_GROUP)?(t="".concat(this._n,".").concat("addConvsToGroup"),Ae.l("".concat(t," options:"),e),(n=new Jn("addConvsToGroup")).setMessage(JSON.stringify(e)),o=e.conversationIDList,i=e.groupName,a={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:i,updateItem:[]}},s=[],r=[],o.forEach((function(e){return c._hasLocalConv(e)?Ct(e)||Tt(e)?void(Ct(e)?a.updateGroup.updateItem.push({operationType:1,contactItem:{type:1,toAccount:e.replace(E.CONV_C2C,"")}}):Tt(e)&&a.updateGroup.updateItem.push({operationType:1,contactItem:{type:2,groupID:e.replace(E.CONV_GROUP,"")}})):(c._onConvIDInvalid(r,e),!0):(c._onConvNotFound(r,e),!0)})),r.length===o.length?vn({successConversationIDList:s,failureConversationIDList:r}):this._convM.req({P:Gn.ADD_CONV_TO_GRP,data:a}).then((function(e){var o,a,u;return n.end(),Ae.l("".concat(t," ok")),We(e=e.data.updateGroupResult.contactResultItem)&&(u=!1,e.forEach((function(e){o=c._concatConvID(e.contactItem),0===e.resultCode?(a=c._getLocalConv(o))&&-1===a.conversationGroupList.indexOf(i)&&(a.conversationGroupList.push(i),s.push(o),u=!0):r.push({conversationID:o,code:e.resultCode,message:e.resultInfo})})),!0===u)&&(c._emitConvUpdate(),c._emitConvInGroupUpdate(i)),mn({successConversationIDList:s,failureConversationIDList:r})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse("addConvsToGroup")}},{key:"deleteConvsFromGroup",value:function(e){var t,n,o,i,a,s,r,c=this,u="deleteConvsFromGroup";return this._convM.canIUse(N.CONV_GROUP)?(t="".concat(this._n,".").concat(u),Ae.l("".concat(t," options:"),e),(n=new Jn(u)).setMessage(JSON.stringify(e)),o=e.conversationIDList,i=e.groupName,a={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:i,updateItem:[]}},s=[],r=[],o.forEach((function(e){return c._hasLocalConv(e)?Ct(e)||Tt(e)?void(Ct(e)?a.updateGroup.updateItem.push({operationType:2,contactItem:{type:1,toAccount:e.replace(E.CONV_C2C,"")}}):Tt(e)&&a.updateGroup.updateItem.push({operationType:2,contactItem:{type:2,groupID:e.replace(E.CONV_GROUP,"")}})):(c._onConvIDInvalid(r,e),!0):(c._onConvNotFound(r,e),!0)})),r.length===o.length?vn({successConversationIDList:s,failureConversationIDList:r}):this._convM.req({P:Gn.DEL_CONV_FROM_GRP,data:a}).then((function(e){var o,a,u;return n.end(),Ae.l("".concat(t," ok")),We(e=e.data.updateGroupResult.contactResultItem)&&(u=!1,e.forEach((function(e){var t;o=c._concatConvID(e.contactItem),0===e.resultCode?(a=c._getLocalConv(o))&&-1!==(t=a.conversationGroupList.indexOf(i))&&(a.conversationGroupList.splice(t,1),s.push(o),u=!0):r.push({conversationID:o,code:e.resultCode,message:e.resultInfo})})),!0===u)&&(c._emitConvUpdate(),c._emitConvInGroupUpdate(i)),mn({successConversationIDList:s,failureConversationIDList:r})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._convM.noUse(u)}},{key:"onConvMarkUpdated",value:function(e){var t,n,o=this;Ve(e)||(Ae.l("".concat(this._n,".onConvMarkUpdated markItemList:"),e),n=!1,e.forEach((function(e){var i=e.recentContactItem,a=e.optType,s=e.standardMark;e=e.customMark,t=o._concatConvID(i),(t=o._getLocalConv(t))&&(1===a?n=o._diffStandardMark(t,s):2===a?n=o._diffCustomMark(t,e):3===a&&(i=o._diffStandardMark(t,s),a=o._diffCustomMark(t,e),n=i||a))})),!0===n&&this._emitConvUpdate())}},{key:"_diffStandardMark",value:function(e,t){t=Ft(t);var n=!1;return!0!==function(e,t){if(e!==t){if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1}return!0}(e.markList,t)&&(e.markList=t,n=!0),n}},{key:"_diffCustomMark",value:function(e,t){var n=!1;return e.customData!==t&&void 0!==t&&(e.customData=t,n=!0),n}},{key:"onConvGroupCreated",value:function(e){var t=this,n=(Ae.l("".concat(this._n,".onConvGroupCreated resultList:"),e),!1),o=!1;We(e)&&(e.forEach((function(e){var i,a,s=(a=e.msgGroupItem).groupID,r=a.groupName;t._convGroupMap.get(s)!==r&&(t._convGroupMap.set(s,r),o=!0),We(a=e.msgRecentContactItem)&&a.forEach((function(e){i=t._concatConvID(e),(i=t._getLocalConv(i))&&-1===i.conversationGroupList.indexOf(r)&&(i.conversationGroupList.push(r),n=!0)}))})),!0===n&&this._emitConvUpdate(),!0===o)&&this._emitConvGroupListUpdate()}},{key:"onConvGroupDeleted",value:function(e){var t,n=this,o=(Ae.l("".concat(this._n,".onConvGroupDeleted groupItemList:"),e),[]);We(e)&&(t=!1,e.forEach((function(e){var i=e.groupID;e=e.groupName,n._convGroupMap.has(i)&&(n._convGroupMap.delete(i),t=!0,o.push(e))})),!0===t)&&this._emitConvGroupListUpdate(),this._eraseFromConversationGroupList(o)}},{key:"_eraseFromConversationGroupList",value:function(e){Ve(e)||(this._convM.getLocalConvList().forEach((function(t){t.conversationGroupList=t.conversationGroupList.filter((function(t){return!e.includes(t)}))})),this._emitConvUpdate())}},{key:"onConvGroupNameUpdated",value:function(e){Ae.l("".concat(this._n,".onConvGroupNameUpdated options:"),e);var t,n,o,i=e.groupID,a=e.groupName,s=e.oldGroupName;this._convGroupMap.get(i)!==a&&(this._convGroupMap.set(i,a),this._emitConvGroupListUpdate(),e=this._convM.getLocalConvList(),o=!1,e.forEach((function(e){t=e.conversationGroupList,-1!==(n=t.indexOf(s))&&(t.splice(n,1,a),o=!0)})),!0===o)&&this._emitConvUpdate()}},{key:"onConvInGroupUpdated",value:function(e){var t,n,o,i=this,a=(Ae.l("".concat(this._n,".onConvInGroupUpdated options:"),e),e.oldGroupName);We(e=e.recentContactUpdateGroupItem)&&(o=!1,e.forEach((function(e){var s=e.contactOptType;e=e.recentContactItem,t=i._concatConvID(e),(t=i._getLocalConv(t))&&(n=t.conversationGroupList.indexOf(a),1===s?-1===n&&(t.conversationGroupList.push(a),o=!0):2===s&&-1!==n&&(t.conversationGroupList.splice(n,1),o=!0))})),!0===o)&&(this._emitConvUpdate(),this._emitConvInGroupUpdate(a))}},{key:"onConvAddedToOrDeletedFromGroup",value:function(e){var t,n,o=this,i=(Ae.l("".concat(this._n,".onConvAddedToOrDeletedFromGroup options:"),e),e.msgRecentContactItem),a=(e=e.msgRecentContactUpdateContactItem,i=this._concatConvID(i),this._getLocalConv(i));a&&We(e)&&(n=!1,e.forEach((function(e){var i=e.groupOptType;e=e.recentContactGroupItem.groupName,t=a.conversationGroupList.indexOf(e),1===i?-1===t&&(a.conversationGroupList.push(e),n=!0):2===i&&-1!==t&&(a.conversationGroupList.splice(t,1),n=!0),!0===n&&o._emitConvInGroupUpdate(e)})),!0===n)&&this._emitConvUpdate()}},{key:"onConvGroupListSynced",value:function(e){We(e)&&0!==e.length&&(Ae.l("".concat(this._n,".onConvGroupListSynced groupItem:"),e),this._fillConvGroupMap(e))}},{key:"getConvGroupListByID",value:function(e){var t,n=this;if(!Ve(e))return t=[],e.forEach((function(e){n._convGroupMap.has(e)&&t.push(n._convGroupMap.get(e))})),t}},{key:"_onConvNotFound",value:function(e,t){e.push({conversationID:t,code:Pn.CONV_NOT_FOUND,message:this._convM.getErrMsg(Pn.CONV_NOT_FOUND)})}},{key:"_onConvIDInvalid",value:function(e,t){e.push({conversationID:t,code:Pn.INVALID_CONV_ID,message:this._convM.getErrMsg(Pn.INVALID_CONV_ID)})}},{key:"_getFlagBit",value:function(e){for(var t=e.toString(2),n=t.length,o=n-1;0<=o;o--)if("1"===t[o])return n-o-1}},{key:"_concatConvID",value:function(e){var t,n=e.type,o=e.to,i=e.groupID;return e=e.userID,1===n?ut(e)?ut(o)||(t="".concat(E.CONV_C2C).concat(o)):t="".concat(E.CONV_C2C).concat(e):2===n&&(t="".concat(E.CONV_GROUP).concat(i)),t}},{key:"_getMyUserID",value:function(){return this._convM.getMyUserID()}},{key:"_getLocalConv",value:function(e){return this._convM.getLocalConversation(e)}},{key:"_hasLocalConv",value:function(e){return this._convM.hasLocalConversation(e)}},{key:"_emitConvUpdate",value:function(){this._convM.emitConvUpdate(!0,!1)}},{key:"_emitConvGroupListUpdate",value:function(){this._convM.emitOEvt(S.CONVERSATION_GROUP_LIST_UPDATED,m(this._convGroupMap.values()))}},{key:"_emitConvInGroupUpdate",value:function(e){var t={groupName:e,conversationList:[]},n=this._convM.getLocalConvList();t.conversationList=n.filter((function(t){return t.conversationGroupList.includes(e)})),this._convM.emitOEvt(S.CONVERSATION_IN_GROUP_UPDATED,t)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._convGroupMap.clear(),this._startIndex=0,this._pagingStatus=Sn}}]),Ji),ri=(r(Xi,bn),Xo=g(Xi),a(Xi,[{key:"_initListeners",value:function(){var e=this.getIEmitInst();e.on(xo.A2KEY_AND_TINYID_UPDATED,this._init,this),e.on(xo.PROFILE_UPDATED,this._onProfileUpdated,this),e.on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}},{key:"_init",value:function(){var e=this,t=(Ae.l("".concat(this._n,"._init")),this.get(13).getItem("conversationMap")),n=this.isIntl(),o=this.isUsingChatCore();if(t){for(var i=t.length,a=0;a<i;a++){var s=t[a];if(s){if(this._isNonExistentAccount(s.conversationID))continue;if(s.groupProfile&&yt(s.groupProfile.type))continue}this._convMap.set(s.conversationID,new oi(t[a],n,o))}this.emitConvUpdate(!0,!1)}this.ready((function(){0<e._tmpGroupList.length&&(e.updateConvGroupProfile(e._tmpGroupList),e._tmpGroupList.length=0)})),this.syncConvList()}},{key:"_isNonExistentAccount",value:function(e){var t;return"@TLS#ERROR"===(t=e.startsWith(E.CONV_C2C)?e.replace(E.CONV_C2C,""):t)||"@TLS#NOT_FOUND"===t}},{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&this._msgListHandler.onCheckTimer(e)}},{key:"onMessageSent",value:function(e){this._onSendOrRcvMsg({conversationOptionsList:e.conversationOptionsList,isInstantMessage:!0})}},{key:"onNewMessage",value:function(e){this._onSendOrRcvMsg(e)}},{key:"_onSendOrRcvMsg",value:function(e){var t=this,n=e.conversationOptionsList,o=void 0===(o=e.isInstantMessage)||o,i=void 0!==(i=e.isUnreadC2CMessage)&&i,a=void 0===(a=e.updateUnreadCount)||a,s=void 0!==(s=e.isSyncingEnded)&&s;this._isReady?0!==n.length?(!0===o&&this._checkNewConv(n),this._updateLocalConvList({conversationOptionsList:n,isInstantMessage:o,isUnreadC2CMessage:i,isFromGetConversations:!1,updateUnreadCount:a}),o||(this._convIDFromUnreadDBMap=new Map([].concat(m(this._convIDFromUnreadDBMap),m(n.map((function(e){return[e.conversationID,1]}))))),this._diffAndDeleteConv(),s&&this.emitIEvt(xo.C2C_UNREAD_HANDLE_COMPLETED)),0<n.filter((function(e){return!t._isConvNeedShow(e.conversationID)})).length||this.emitConvUpdate()):s&&this.emitIEvt(xo.C2C_UNREAD_HANDLE_COMPLETED):this.ready((function(){t._onSendOrRcvMsg(e)}))}},{key:"updateConvGroupProfile",value:function(e){var t,n=this;We(e)&&0===e.length||(0!==this._convMap.size?(t=!1,e.forEach((function(e){var o="".concat(E.CONV_GROUP).concat(e.groupID);n._convMap.has(o)&&(t=!0,(o=n._convMap.get(o)).groupProfile=JSON.parse(JSON.stringify(e)),o.lastMessage.lastSequence<e.nextMessageSeq&&(o.lastMessage.lastSequence=e.nextMessageSeq-1),o.subType||(o.subType=e.type))})),t&&this.emitConvUpdate(!0,!1)):this._tmpGroupList=e)}},{key:"onMessageRevoked",value:function(e,t){var n,o,i,a=this;0!==e.length&&(n=null,o=!1,i=[],e.forEach((function(e){(n=a._convMap.get(e.conversationID))&&(t&&n.reduceUnreadCount()&&(o=n.type!==E.CONV_TOPIC),n.type===E.CONV_TOPIC?i.push(e):n.isLastMessageRevoked({sequence:e.sequence,time:e.time})&&(n.setLastMessageRevoked(!0),n.setLastMessageRevoker(e.revoker),o=!0))})),this.get(10).onMessageRevoked(i),o)&&this.emitConvUpdate(!0,!1)}},{key:"updateRevokerInfo",value:function(e){for(var t=new Set,n=0;n<e.length;n++){var o=e[n].revoker;t.add(o)}var i=m(t),a=this.get(4);return new Promise((function(t){a.getUserProfile({userIDList:i}).then((function(n){if(!We(n=n.data)||0===n.length)return t(e);var o,i={},a=T(n);try{for(a.s();!(o=a.n()).done;){var s=o.value,r=s.userID,c=s.nick,u=s.avatar;i[r]={nick:c,avatar:u}}}catch(l){a.e(l)}finally{a.f()}e.forEach((function(e){var t=e.revoker;i[t]&&(e.revokerInfo.nick=i[t].nick||"",e.revokerInfo.avatar=i[t].avatar||"")})),t(e)})).catch((function(){t(e)}))}))}},{key:"isLastMessageRevoked",value:function(e){var t=!1,n=e.conversationID,o=e.sequence,i=e.time,a=this._convMap.get(n);return a&&(t=a.type===E.CONV_TOPIC?this.get(10).isLastMessageRevoked({topicID:n.replace(E.CONV_GROUP,""),sequence:o}):a.isLastMessageRevoked({sequence:o,time:i})),Ae.l("".concat(this._n,".isLastMessageRevoked options:"),e,"ret:".concat(t)),t}},{key:"onMessageDeleted",value:function(e){var t=this;if(0!==e.length){var n=null;e.forEach((function(e){(n=t._msgListHandler.getLocalMsg(e.conversationID,e.ID))&&(n.isDeleted=!0),e!==n&&(e.isDeleted=!0)})),e=e[0].conversationID;for(var o=this._msgListHandler.getLocalMsgList(e),i={},a=o.length-1;0<=a;a--)if(!o[a].isDeleted){i=o[a];break}var s,r=this._convMap.get(e);r&&(s=!1,r.lastMessage.lastSequence===i.sequence&&r.lastMessage.lastTime===i.time||(Ve(i)&&(i=void 0),r.updateLastMessage(i),r.type!==E.CONV_TOPIC&&(s=!0),Ae.l("".concat(this._n,".onMessageDeleted. update convID:").concat(e," with lastMessage:"),r.lastMessage)),e.startsWith(E.CONV_C2C)&&this.updateUnreadCount(e),s)&&this.emitConvUpdate(!0,!1)}}},{key:"onMessageModified",value:function(e){var t="".concat(this._n,".onMessageModified"),n=e.conversationType,o=e.from,i=e.to,a=e.time,s=e.sequence,r=e.elements,c=e.cloudCustomData,u=e.messageVersion,l=this.getMyUserID(),d="".concat(n).concat(i),p=(n=(i===l&&n===E.CONV_C2C&&(d="".concat(n).concat(o)),l=this._msgListHandler.onMsgModified(d,e)).isUpdated,l=l.message,!0===n&&this.emitOEvt(S.MESSAGE_MODIFIED,[l]),this._isTopicConv(d));return null===l?Ae.l("".concat(t," message is null! options:"),e):Ae.l("".concat(t," isUpdated:").concat(n," isTopicMessage:").concat(p," from:").concat(o," to:").concat(i," sequence:").concat(l.sequence," time:").concat(l.time)),p?this.get(10).onMessageModified(e):(n=this._convMap.get(d))&&(o=n.lastMessage)&&o.lastTime===a&&o.lastSequence===s&&o.version!==u&&(Ae.l("".concat(t," convID:").concat(d," lastMessage updated")),o.type=r[0].type,o.payload=r[0].content,o.messageForShow=Ut(o.type,o.payload,this.isIntl()),o.cloudCustomData=c,o.version=u,this.emitConvUpdate(!0,!1)),l}},{key:"onNewGroupAtTips",value:function(e){var n=this,o=(e=e.dataList,null);e.forEach((function(e){e.groupAtTips?o=e.groupAtTips:e.elements?o=t(t({},e.elements),{},{sync:!0}):e.groupAtType&&(o=t(t({},e),{},{sync:!0})),o.__random=e.random,o.__sequence=e.clientSequence,n._tmpGroupAtTipsList.push(o)})),Ae.l("".concat(this._n,".onNewGroupAtTips isReady:").concat(this._isReady),this._tmpGroupAtTipsList),this._isReady&&this._handleGroupAtTipsList()}},{key:"_handleGroupAtTipsList",value:function(){var e,t=this;0!==this._tmpGroupAtTipsList.length&&(e=!1,this._tmpGroupAtTipsList.forEach((function(n){var o,i=n.groupID,a=n.from,s=void 0===(s=n.topicID)?void 0:s,r=void 0!==(r=n.sync)&&r;a!==t.getMyUserID()&&(ut(s)?(a=t._convMap.get("".concat(E.CONV_GROUP).concat(i)))&&(a.updateGroupAtInfoList(n),e=!0):((i=t._convMap.get("".concat(E.CONV_GROUP).concat(s)))&&(i.updateGroupAtInfoList(n),a=t.get(10),o=i.groupAtInfoList,a.onAtInfoUpdated({topicID:s,groupAtInfoList:o})),Ve(i)&&r&&(t.updateTopicConversation([{conversationID:"".concat(E.CONV_GROUP).concat(s),type:E.CONV_TOPIC}]),t._convMap.get("".concat(E.CONV_GROUP).concat(s)).updateGroupAtInfoList(n))))})),e&&this.emitConvUpdate(!0,!1),this._tmpGroupAtTipsList.length=0)}},{key:"_checkNewConv",value:function(e){var t=this,n=[],o=[];e.forEach((function(e){t._convMap.has(e.conversationID)||(e.type===E.CONV_C2C?n.push(e.conversationID.replace(E.CONV_C2C,"")):e.type===E.CONV_GROUP&&o.push(e.conversationID.replace(E.CONV_GROUP,"")))})),0<n.length&&(this._onNewC2CConv(n),n=null),0<o.length&&(this._onNewGroupConv(o),o=null)}},{key:"_onNewC2CConv",value:function(e){var t=this.get(6);return Promise.all([t.getRemotePeerReadTime(e),this._msgRemindHandler.getC2CMsgRemindType(e),this._convGroupHandler.searchConvGroupAndMark(e,1)])}},{key:"_onNewGroupConv",value:function(e){var t=this.get(7);return t?Promise.all([t.getMsgRemindType(e),this._convGroupHandler.searchConvGroupAndMark(e,2)]):Promise.resolve()}},{key:"_setStorageConvList",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.getLocalConvList().filter((function(e){return e.type===E.CONV_C2C||e.type===E.CONV_GROUP&&e.lastMessage.type!==E.MSG_GRP_TIP})).slice(0,20).map((function(e){return{conversationID:e.conversationID,type:e.type,subType:e.subType,lastMessage:e.lastMessage,groupProfile:e.groupProfile,userProfile:e.userProfile}}));this.get(13).setItem("conversationMap",t,e)}},{key:"emitConvUpdate",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this.getLocalConvList();t&&(t=this.get(7))&&t.updateGroupLastMessage(n),e&&(this.get(12).isPartialUpdatedConvs()?(this._diffConvMap(this._convMapForDiff,this._convMap),0<this._partialUpdatedConvMap.size&&(this.emitOEvt(S.CONVERSATION_LIST_UPDATED),this.onTotalUnreadCountUpdate(),this._convMapForDiff.clear(),this._convMapForDiff=Qe(this._convMap,!0)),0===this._convMapForDiff.size&&(this._convMapForDiff=Qe(this._convMap,!0))):(this.emitOEvt(S.CONVERSATION_LIST_UPDATED),this.onTotalUnreadCountUpdate()))}},{key:"_diffConvMap",value:function(e,t){var n,o=T(t);try{for(o.s();!(n=o.n()).done;){var i=_(n.value,2),a=i[0],s=i[1];e.has(a)&&JSON.stringify(s)===e.get(a)||this._partialUpdatedConvMap.set(a,s)}}catch(r){o.e(r)}finally{o.f()}}},{key:"getPartialUpdatedConvs",value:function(){var e=m(Qe(this._partialUpdatedConvMap,!1).values());return this._partialUpdatedConvMap.clear(),e}},{key:"getLocalConvList",value:function(){var e=this;return m(this._convMap.values()).filter((function(t){return e._isConvNeedShow(t.conversationID)}))}},{key:"getLocalConversation",value:function(e){return this._convMap.get(e)}},{key:"hasLocalConversation",value:function(e){return this._convMap.has(e)}},{key:"getLocalOldestMessage",value:function(e){return this._msgListHandler.getLocalOldestMsg(e)}},{key:"syncConvList",value:function(){var e=this,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],n="syncConvList",o=new Jn(n);return this._pagingStatus===Sn&&this._convMap.clear(),this._pagingGetConvList(t).then((function(t){var i=Ht(e._pagingGetCostList),a=Bt(e._pagingGetCostList);return e._pagingGetCostList.length=0,e._pagingStatus=Dn,e._diffAndDeleteConv(),e.emitConvUpdate(!0,!1),e._setStorageConvList(),e._handleC2CPeerReadTime(),e.emitIEvt(xo.CONV_SYNC_COMPLETED),a="count:".concat(e._convMap.size," sum:").concat(a," avg:").concat(i),Ae.l("".concat(e._n,".").concat(n,". ").concat(a)),o.setMessage(a).end(),t})).catch((function(t){return e._pagingStatus=kn,o.setMessage(e._pagingTs).setError(t).end(),yn(t)}))}},{key:"_diffAndDeleteConv",value:function(){var e,t=this;this._isSyncCompleted()&&(e=[],this._convMap.forEach((function(n,o){!t._pagingConvIDMap.has(o)&&t._convIDFromUnreadDBMap.has(o)&&(t._convMap.delete(o),e.push(o))})),Ae.l("".concat(this._n,"._diffAndDeleteConv list:").concat(e)),e=null)}},{key:"_pagingGetConvList",value:function(){var e=this,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],n="".concat(this._n,"._pagingGetConvList"),o=(Ae.l("".concat(n," incrementalPullFlag:").concat(t," ts:").concat(this._pagingTs," startIdx:").concat(this._pagingStartIdx)+" pinnedTs:".concat(this._pagingPinnedTs," pinnedStartIdx:").concat(this._pagingPinnedStartIdx)),Date.now());return this._pagingStatus=En,this.req({P:Gn.PAGING_GET_CONV_LIST,data:{fromAccount:this.getMyUserID(),timeStamp:t?this._pagingTs:0,startIndex:t?this._pagingStartIdx:0,pinnedTimeStamp:t?this._pagingPinnedTs:0,pinnedStartIndex:t?this._pagingPinnedStartIdx:0,orderType:1}}).then((function(t){var i=(t=t.data).completeFlag,a=void 0===(a=t.conversations)?[]:a,s=t.timeStamp,r=t.startIndex,c=t.pinnedTimeStamp,u=t.pinnedStartIndex;if(t=t.groupItem,e._pagingGetCostList.push(jt(o,!1)),Ae.l("".concat(n," ok. completeFlag:").concat(i," count:").concat(a.length," cost:").concat(jt(o))),e._convGroupHandler.onConvGroupListSynced(t),0<a.length&&(t=e._getConvOptions(a),e._pagingConvIDMap=new Map([].concat(m(e._pagingConvIDMap),m(t.map((function(e){return[e.conversationID,1]}))))),e._updateLocalConvList({conversationOptionsList:t,isFromGetConversations:!0,updateUnreadCount:!0}),e.isLoggedIn())&&e.emitConvUpdate(),!e._isReady){if(!e.isLoggedIn())return vn();e.triggerReady()}return e._pagingTs=s,e._pagingStartIdx=r,e._pagingPinnedTs=c,e._pagingPinnedStartIdx=u,1!==i?e._pagingGetConvList():(e._handleGroupAtTipsList(),e._convGroupHandler.getRemoteConvGroupList(),vn())})).catch((function(t){throw!e.isLoggedIn()||e._isReady||(Ae.w("".concat(n," failed. error:"),t),e.triggerReady()),t}))}},{key:"_updateLocalConvList",value:function(e){var t=e.isFromGetConversations,n=Date.now();e=this._getTmpConvListMapping(e).newConvList,this._convMap=new Map(this._sortConvList(m(this._convMap))),t||this._updateUserOrGroupProfile(e),Ae.l("".concat(this._n,"._updateLocalConvList cost:").concat(jt(n)))}},{key:"_getTmpConvListMapping",value:function(e){for(var t=e.conversationOptionsList,n=e.isFromGetConversations,o=e.isInstantMessage,i=e.isUnreadC2CMessage,a=void 0!==i&&i,s=e.updateUnreadCount,r=[],c=[],u=this.get(7),l=this.get(8),d=this.isIntl(),p=this.isUsingChatCore(),h=0,f=t.length;h<f;h++){var g=new oi(t[h],d,p),_=g.conversationID,m=g.type;if(!this._isNonExistentAccount(_)){if(this._convMap.has(_)){var v=this._convMap.get(_);if(n){this._convMap.set(_,g),m===E.CONV_C2C?g.unreadCount=v.unreadCount:m===E.CONV_GROUP&&(g.groupProfile=JSON.parse(JSON.stringify(v.groupProfile)));continue}var y=["unreadCount","allowType","adminForbidType","payload"],I=(!1===o&&y.push("lastMessage"),"boolean"==typeof o&&y.push("isPinned"),t[h].lastMessage),M=!ut(I);M||t[h].type===E.CONV_TOPIC||this._onLastMsgNotExist(t[h]),ut(o)&&M&&null===v.lastMessage.payload&&(v.lastMessage.payload=I.payload),Ve(v.lastMessage.revoker)||(v.lastMessage.revoker=null),Ze(v,g,y,[null,void 0,"",0,NaN]),!0===s&&v.updateUnreadCount({nextUnreadCount:g.unreadCount,isFromGetConversations:n,isUnreadC2CMessage:a}),o&&M&&(I.payload&&(v.lastMessage.payload=I.payload),v.type===E.CONV_GROUP)&&(v.lastMessage.nameCard=I.nameCard,v.lastMessage.nick=I.nick),M&&v.lastMessage.cloudCustomData!==I.cloudCustomData&&(v.lastMessage.cloudCustomData=I.cloudCustomData||"")}else m===E.CONV_GROUP&&u?(y=g.groupProfile.groupID,(M=u.getLocalGroupProfile(y))&&(g.groupProfile=M,!0===s)&&g.updateUnreadCount({nextUnreadCount:0})):m===E.CONV_C2C&&(v=_.replace(E.CONV_C2C,""),l)&&l.isMyFriend(v)&&(g.remark=l.getFriendRemark(v)),r.push(g),this._convMap.set(_,g);this._convMap.get(_).type===E.CONV_TOPIC&&c.push(this._convMap.get(_))}}for(var C=this.get(10),T=0,S=c.length;T<S;T++){var D,k=(D=c[T]).conversationID;Ve(D=D.groupAtInfoList)||C.onAtInfoUpdated({topicID:k.replace(E.CONV_GROUP,""),groupAtInfoList:D})}return{newConvList:r}}},{key:"_onLastMsgNotExist",value:function(e){new Jn("lastMsgNotExist").setMessage(JSON.stringify(e)).end()}},{key:"_sortConvList",value:function(e){var t=[],n=[],o=[],i=[];return e.forEach((function(e){(!0===e[1].isPinned?Ve(e[1].lastMessage.lastTime)?n:t:Ve(e[1].lastMessage.lastTime)?i:o).push(e)})),t.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime})).concat(n).concat(o.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime}))).concat(i)}},{key:"_sortConvListAndEmitEvent",value:function(){this._convMap=new Map(this._sortConvList(m(this._convMap))),this.emitConvUpdate(!0,!1)}},{key:"_updateUserOrGroupProfile",value:function(e){var t,n,o,i,a=this;0!==e.length&&(t=[],n=[],o=this.get(4),i=this.get(7),e.forEach((function(e){var o;e.type===E.CONV_C2C?t.push(e.toAccount):e.type===E.CONV_GROUP&&(o=e.toAccount,i.hasLocalGroup(o)?e.groupProfile=i.getLocalGroupProfile(o):n.push(o))})),Ae.l("".concat(this._n,"._updateUserOrGroupProfile userIDList:").concat(t," groupIDList:").concat(n)),0<t.length&&o.getUserProfile({userIDList:t}).then((function(e){We(e=e.data)?e.forEach((function(e){a._doUpdateUserProfile("".concat(E.CONV_C2C).concat(e.userID),e)})):a._doUpdateUserProfile("".concat(E.CONV_C2C).concat(e.userID),e)})),0<n.length)&&i.getGroupProfileAdvance({groupIDList:n,responseFilter:{groupBaseInfoFilter:["Type","Name","FaceUrl"]}}).then((function(e){e=e.data.successGroupList;var t=!1;e.forEach((function(e){var n="".concat(E.CONV_GROUP).concat(e.groupID);a._convMap.has(n)&&(Ze((n=a._convMap.get(n)).groupProfile,e,[],[null,void 0,"",0,NaN]),!n.subType&&e.type&&(n.subType=e.type),t=!0)})),t&&a.emitConvUpdate()}))}},{key:"_doUpdateUserProfile",value:function(e,t){this.hasLocalConversation(e)&&(this.getLocalConversation(e).userProfile=t,this.emitConvUpdate())}},{key:"_getConvOptions",value:function(e){var n=this,o=[],i=(e=e.filter((function(e){var t=e.type;return e=e.userID,1===t&&!n._isNonExistentAccount(e)||2===t})),this.getMyUserID());return e=e.map((function(e){var a;return ut(e.lastMsg)&&(e.lastMsg={elements:[]}),1===e.type?(a={userID:e.userID,nick:e.peerNick,avatar:e.peerAvatar},o.push(a),{conversationID:"".concat(E.CONV_C2C).concat(e.userID),type:E.CONV_C2C,lastMessage:{lastTime:e.time,lastSequence:e.sequence,fromAccount:e.lastC2CMsgFromAccount,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:null,payload:e.lastMsg.elements[0]?n._amendLayersOverLimitProp(e.lastMsg.elements[0].content):null,cloudCustomData:e.lastMsg.cloudCustomData||"",isRevoked:8===e.lastMessageFlag,onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:e.lastC2CMsgFromAccount===i&&e.time<=e.c2cPeerReadTime,revoker:e.lastMsg.revokerInfo?e.lastMsg.revokerInfo.revoker:null},unreadCount:0,userProfile:new Qo(a),peerReadTime:e.c2cPeerReadTime,isPinned:1===e.isPinned,customData:e.customMark||"",markList:Ft(e.standardMark),conversationGroupList:n._convGroupHandler.getConvGroupListByID(e.contactGroupId),remark:e.friendRemark||"",messageRemindType:n._transMsgRemindType(e.messageRemindType)}):{conversationID:"".concat(E.CONV_GROUP).concat(e.groupID),type:E.CONV_GROUP,lastMessage:t(t({lastTime:e.time,lastSequence:e.sequence,fromAccount:e.msgGroupFromAccount},n._patchTypeAndPayload(e)),{},{cloudCustomData:e.lastMsg.cloudCustomData||"",isRevoked:2===e.lastMessageFlag,onlineOnlyFlag:!1,nick:e.senderNick||"",nameCard:e.senderNameCard||"",revoker:e.lastMsg.revokerInfo?e.lastMsg.revokerInfo.revoker:null}),groupProfile:new ni({groupID:e.groupID,name:e.groupNick,avatar:e.groupImage,type:e.groupType,nextMessageSeq:e.nextMessageSeq}),unreadCount:n._computeGroupUnreadCount(e),peerReadTime:0,isPinned:1===e.isPinned,version:0,customData:e.customMark||"",markList:Ft(e.standardMark),conversationGroupList:n._convGroupHandler.getConvGroupListByID(e.contactGroupId),messageRemindType:n._transMsgRemindType(e.messageRemindType)}})),0<o.length&&this.get(4).onConvProfileUpdated(o),e}},{key:"_transMsgRemindType",value:function(e){var t="";return 0===e?t=E.MSG_REMIND_ACPT_AND_NOTE:1===e?t=E.MSG_REMIND_DISCARD:2===e?t=E.MSG_REMIND_ACPT_NOT_NOTE:3===e&&(t=E.NOT_RECEIVE_OFFLINE_PUSH_EXCEPT_AT),t}},{key:"_computeGroupUnreadCount",value:function(e){var t;return 0<(t=(void 0===(t=e.unreadCount)?0:t)-(void 0===(e=e.noUnreadCount)?0:e))?t:0}},{key:"_patchTypeAndPayload",value:function(e){var n=(e=e.lastMsg).event,o=void 0===(o=e.elements)?[]:o;return e=void 0===(e=e.groupTips)?{}:e,ut(void 0===n?void 0:n)||Ve(e)?{type:o[0]?o[0].type:null,payload:o[0]?this._amendLayersOverLimitProp(o[0].content):null}:((n=new Co(e)).setElement({type:E.MSG_GRP_TIP,content:t(t({},e.elements),{},{groupProfile:e.groupProfile})}),o=JSON.parse(JSON.stringify(n.payload)),n=null,{type:E.MSG_GRP_TIP,payload:o})}},{key:"_amendLayersOverLimitProp",value:function(e){var t=e.layersOverLimit;return 0===t?e.layersOverLimit=!1:1===t&&(e.layersOverLimit=!0),e}},{key:"getLocalMessageList",value:function(e){return this._msgListHandler.getLocalMsgList(e)}},{key:"deleteLocalMessage",value:function(e){e instanceof Co&&this._msgListHandler.remove(e)}},{key:"onConvDeleted",value:function(e){We(e)&&(e=e.map((function(e){var t=e.type,n=e.userID;return e=e.groupID,1===t?"".concat(E.CONV_C2C).concat(n):2===t?"".concat(E.CONV_GROUP).concat(e):void 0})),Ae.l("".concat(this._n,".onConvDeleted convIDList:").concat(e)),this.deleteLocalConvList(e))}},{key:"onConvPinnedStatus",value:function(e,t){var n,o=this;We(e)&&(n=!1,e.forEach((function(e){var i,a=e.type,s=e.userID;e=e.groupID,1===a?i=o.getLocalConversation("".concat(E.CONV_C2C).concat(s)):2===a&&(i=o.getLocalConversation("".concat(E.CONV_GROUP).concat(e))),i&&(Ae.l("".concat(o._n,".onConvPinnedStatus convID:").concat(i.conversationID," localPinned:").concat(i.isPinned," remotePinned:").concat(t)),t?i.isPinned||(i.isPinned=!0,n=!0):i.isPinned&&(i.isPinned=!1,n=!0))})),n)&&this._sortConvListAndEmitEvent()}},{key:"getMessageList",value:function(e){var t=this,n=e.conversationID,o=e.nextReqMessageID,i=(e=e.count,"".concat(this._n,".getMessageList")),a="";if((r=this.getLocalConversation(n))&&r.groupProfile&&(a=r.groupProfile.type),yt(a))return Ae.l("".concat(i," not available in ").concat(a,". convID:").concat(n)),vn({messageList:[],nextReqMessageID:"",isCompleted:!0});(ut(e)||15<e)&&(e=15),o||this._isMeInCommunity(n)||this.clearMemMsg(n);var s=this._computeRemainingCount({conversationID:n,nextReqMessageID:o}),r=this._completedMap.has(n);return Ae.l("".concat(i," convID:").concat(n," isEverCleared:").concat(this._isEverCleared(n)," nextReqMessageID:").concat(o)+" remainingCount:".concat(s," count:").concat(e," isCompleted:").concat(r)),this._needGetHistory({conversationID:n,remainingCount:s,count:e})?this.getHistoryMessages({conversationID:n,nextReqMessageID:o,count:20}).then((function(e){var o=e.nextReqID,a=e.storedMessageList,r=e.assembledMessageList,c=(e=e.isPullingCompleted,t._completedMap.has(n)),u=a,l=(0<s&&(u=t._msgListHandler.getLocalMsgList(n).slice(0,a.length+s)),{nextReqMessageID:void 0,messageList:void 0,isCompleted:void 0});return t._isEverCleared(n)?(l.nextReqMessageID=o,l.messageList=r,l.isCompleted=e):(l.nextReqMessageID=c?"":o,l.messageList=u,l.isCompleted=c),a=l.messageList.filter((function(e){return e.isRevoked}))||[],r=l.messageList.map((function(e){return e.sequence})),Ae.l("".concat(i," ret.nextReqMessageID:").concat(l.nextReqMessageID," ret.isCompleted:").concat(l.isCompleted," sequenceList:"),r),We(a)&&0!==a.length?t.updateRevokerInfo(a).then((function(e){return e.forEach((function(e){var t=e.revokerInfo;l.messageList=l.messageList.map((function(n){return n.ID===e.ID&&t&&(n.revokeReason=t.reason||"",n.revokerInfo={userID:t.revoker||n.revoker,nick:t.nick,avatar:t.avatar}),n}))})),mn(l)})):mn(l)})):(this.modifyMessageList(n),vn(a=this._getMsgListFromMem({conversationID:n,nextReqMessageID:o,count:e})))}},{key:"_isEverCleared",value:function(e){return this._everClearedMap.has(e)}},{key:"_getMsgListFromMem",value:function(e){var t=e.conversationID,n=e.nextReqMessageID,o=(e=e.count,"".concat(this._n,"._getMsgListFromMem")),i=this._msgListHandler.getLocalMsgList(t),a=i.length,s=Ct(t),r=0,c={isCompleted:!1,nextReqMessageID:"",messageList:[]};return n?(r=s?i.findIndex((function(e){return e.ID===n})):i.findIndex((function(e){return e.sequence+""===n})))>e?(c.messageList=i.slice(r-e,r),c.nextReqMessageID=s?i[r-e].ID:i[r-e].sequence+""):(c.messageList=i.slice(0,r),c.isCompleted=!0):e<a?(c.messageList=i.slice(r=a-e,a),c.nextReqMessageID=s?i[r].ID:i[r].sequence+""):(c.messageList=i.slice(0,a),c.isCompleted=!0),e=c.messageList.map((function(e){return e.sequence})),Ae.l("".concat(o," convID:").concat(t)+" ret.nextReqMessageID:".concat(c.nextReqMessageID," ret.isCompleted:").concat(c.isCompleted," sequenceList:").concat(e)),c}},{key:"getMessageListHopping",value:function(e){var t,n,o=e.conversationID,i=e.sequence,a=e.time,s=e.count;return e=void 0===(e=e.direction)?0:e,(ut(s)||15<s)&&(s=15),o.startsWith(E.CONV_C2C)?(t=this.get(6),n=o.replace(E.CONV_C2C,""),t.getRoamingMessagesHopping({peerAccount:n,time:a,count:s,direction:e})):o.startsWith(E.CONV_GROUP)?(t=this.get(7),n=o.replace(E.CONV_GROUP,""),t.getRoamingMessagesHopping({groupID:n,sequence:i,count:s,direction:e})):void 0}},{key:"_computeRemainingCount",value:function(e){var t,n=e.conversationID,o=e.nextReqMessageID,i=(e=this._msgListHandler.getLocalMsgList(n)).length;return Ae.l("".concat(this._n,"._computeRemainingCount convID:").concat(n," nextReqMessageID:").concat(o," length:").concat(i)),o?(t=0,Ct(n)?t=e.findIndex((function(e){return e.ID===o})):Tt(n)&&(t=-1!==o.indexOf("-")?e.findIndex((function(e){return e.ID===o})):e.findIndex((function(e){return e.sequence+""===o}))),-1===t?0:t):i}},{key:"_needGetHistory",value:function(e){var t=e.conversationID,n=e.remainingCount,o=(e=e.count,this.getLocalConversation(t)),i="";return o&&o.groupProfile&&(i=o.groupProfile.type),!(St(t)||yt(i)||!this._isEverCleared(t)&&(o=n<=e&&!this._completedMap.has(t),Ae.l("".concat(this._n,"._needGetHistory convID:").concat(t," ret:").concat(o)),!o))}},{key:"_isTopicConv",value:function(e){return Mt(e=e.replace(E.CONV_GROUP,""))}},{key:"getHistoryMessages",value:function(e){var t,n,o,i,a,s,r=e.conversationID,c=e.count;return e=e.nextReqMessageID,r===E.CONV_SYSTEM?vn():(c=20<c?20:15,t=null,Ct(r)?(s=0,n="",o=!1,a=this._roamingMsgKeyAndTimeMap.has(r),e&&(o=!0,a?(s=this._roamingMsgKeyAndTimeMap.get(r).lastMessageTime,n=this._roamingMsgKeyAndTimeMap.get(r).messageKey):(i=this._msgListHandler.findMessage(e))&&(s=i.time,Ae.l("".concat(this._n,".getHistoryMessages convID:").concat(r," isRelayInfoExisted:").concat(a," lastMessageTime:").concat(s)))),(t=this.get(6)).getRoamingMessage({conversationID:r,peerAccount:r.replace(E.CONV_C2C,""),count:c,lastMessageTime:o?s:0,messageKey:o?n:""})):Tt(r)?(t=this.get(7))?(i=r.replace(E.CONV_GROUP,""),a=null,this._convMap.has(r)&&!Mt(i)&&(a=this._convMap.get(r).lastMessage),s=0,e?s=Number(e):a&&(s=a.lastSequence),t.getRoamingMessage({conversationID:r,groupID:i,count:c,sequence:s})):yn({code:Pn.NO_MODULE}):vn())}},{key:"patchConvLastMessage",value:function(e){var t,n,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i=this.getLocalConversation(e);i&&(t=(n=i.lastMessage).messageForShow,n=n.payload,Ve(t)||Ve(n)||o)&&0!==(t=this._msgListHandler.getLocalMsgList(e)).length&&(n=t[t.length-1],Ae.l("".concat(this._n,".patchConvLastMessage bForceUpdate:").concat(o," convID:").concat(e," payload:"),n.payload),i.updateLastMessage(n))}},{key:"onRoamingMessage",value:function(){var e,n,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],a=3<arguments.length?arguments[3]:void 0,s=(u=1<arguments.length?arguments[1]:void 0).startsWith(E.CONV_C2C)?E.CONV_C2C:E.CONV_GROUP,r=null,c=[],u=[],l=0,d=o.length,p=s===E.CONV_GROUP,h=this.getFileDownloadProxy(),f=this.getDowloadFileAuthKey(),g=We(a),_=this.get(17).getFileDNList(),m=function(){p?--l:++l},v=function(){return p?d<=l:l<d};for(l=p?o.length-1:0,d=p?0:o.length;v();m())1!==o[l].isPlaceMessage&&((r=new Co(o[l])).to=o[l].to,s!==E.CONV_GROUP||ut(o[l].topicID)||(r.to=o[l].topicID),r.isSystemMessage=!!o[l].isSystemMessage,r.conversationType=s,e=4===o[l].event?{type:E.MSG_GRP_TIP,content:t(t({},o[l].elements),{},{groupProfile:o[l].groupProfile})}:o[l].elements,p||r.setNickAndAvatar({nick:o[l].nick,avatar:o[l].avatar}),Ve(e)?((n=new Jn("emptyMessageBody")).setMessage("from:".concat(r.from," to:").concat(r.to," sequence:").concat(r.sequence," event:").concat(o[l].event)),n.setLevel("warning").end()):(r.setElement(e,h,f,_),r.reInitialize(this.getMyUserID()),c.push(r),g&&a.push(r)));return m=v=null,i?(this._msgListHandler.unshift(c,u),c=null,u):c}},{key:"findMessage",value:function(e){return this._msgListHandler.findMessage(e)}},{key:"_isMeInCommunity",value:function(e){var t=!0;return this._isTopicConv(e)&&(e=Gt(e.replace(E.CONV_GROUP,"")),this.get(7).hasLocalGroup(e)||(t=!1,Ae.l("".concat(this._n,"._isMeInCommunity groupID:").concat(e," ret:").concat(t)))),t}},{key:"deleteTopicRoamingInfo",value:function(e){var t=this;It({groupID:e})&&this._msgListHandler.getTopicConvIDList(e).forEach((function(e){t.clearMemMsg(e)}))}},{key:"deleteGroupRoamingInfo",value:function(e){e="".concat(E.CONV_GROUP).concat(e),0<this._msgListHandler.getLocalMsgList(e).length&&this.clearMemMsg(e)}},{key:"setMessageRead",value:function(e){var t=e.conversationID,n=this.getLocalConversation(t);if(e="".concat(this._n,".setMessageRead"),Ae.l("".concat(e," convID:").concat(t," unreadCount:").concat(n?n.unreadCount:0)),!n)return vn();if(n.type!==E.CONV_GROUP&&n.type!==E.CONV_TOPIC||Ve(n.groupAtInfoList)||this.deleteGroupAtTips(t),0===n.unreadCount)return vn();var o=this._msgListHandler.getLocalLastMsg(t),i=n.lastMessage.lastTime,a=(i<(a=this._msgListHandler.getLocalMaxTime(t))&&(Ae.l("".concat(e," update lastMessageTime from ").concat(i," to ").concat(a)),i=a),this._msgListHandler.getLocalMaxSeq(t)),s=n.lastMessage.lastSequence,r=(s<a&&(Ae.l("".concat(e," update lastMessageSeq from ").concat(s," to ").concat(a)),s=a),n.type===E.CONV_TOPIC&&ut(o)&&(e=this.get(10),o=Gt(a=t.replace(E.CONV_GROUP,"")),e=e.getLocalTopic(o,a))&&(s=e.nextMessageSeq-1),null);switch(n.type){case E.CONV_C2C:return(r=this.get(6))?r.setMessageRead({conversationID:t,lastMessageTime:i}):yn({code:Pn.NO_MODULE});case E.CONV_GROUP:case E.CONV_TOPIC:return(r=this.get(7))?r.setMessageRead({conversationID:t,lastMessageSeq:s}):yn({code:Pn.NO_MODULE});case E.CONV_SYSTEM:return n.unreadCount=0,this.emitConvUpdate(!0,!1),vn();default:return vn()}}},{key:"setAllMessageRead",value:function(){var e,t=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o="setAllMessageRead",i="".concat(this._n,".").concat(o),a=(n.scope||(n.scope=E.READ_ALL_MSG),Ae.l("".concat(i," options:"),n),this._createSetAllMessageReadPack(n));return 0===a.readAllC2CMessage&&0===a.groupMessageReadInfoList.length?vn():(e=new Jn(o),this.req({P:Gn.SET_ALL_MSG_READ,data:a}).then((function(o){return o=o.data,o=t._handleAllMsgRead(o),e.setMessage("scope:".concat(n.scope," failureGroups:").concat(JSON.stringify(o))).end(),vn()})).catch((function(t){return e.setError(t).end(),Ae.w("".concat(i," failed. error:"),t),yn({code:t&&t.code?t.code:Pn.MSG_UNREAD_ALL_FAIL,message:t&&t.message?t.message:void 0})})))}},{key:"setConvCustomData",value:function(e){return this._convGroupHandler.setConvCustomData(e)}},{key:"markConv",value:function(e){return this._convGroupHandler.markConv(e)}},{key:"getConvGroupList",value:function(){return this._convGroupHandler.getLocalConvGroupList()}},{key:"createConvGroup",value:function(e){return this._convGroupHandler.createConvGroup(e)}},{key:"deleteConvGroup",value:function(e){return this._convGroupHandler.deleteConvGroup(e)}},{key:"renameConvGroup",value:function(e){return this._convGroupHandler.renameConvGroup(e)}},{key:"addConvsToGroup",value:function(e){return this._convGroupHandler.addConvsToGroup(e)}},{key:"deleteConvsFromGroup",value:function(e){return this._convGroupHandler.deleteConvsFromGroup(e)}},{key:"onConvMarkUpdated",value:function(e){this._convGroupHandler.onConvMarkUpdated(e)}},{key:"onConvGroupCreated",value:function(e){this._convGroupHandler.onConvGroupCreated(e)}},{key:"onConvGroupDeleted",value:function(e){this._convGroupHandler.onConvGroupDeleted(e)}},{key:"onConvGroupNameUpdated",value:function(e){this._convGroupHandler.onConvGroupNameUpdated(e)}},{key:"onConvInGroupUpdated",value:function(e){this._convGroupHandler.onConvInGroupUpdated(e)}},{key:"onConvAddedToOrDeletedFromGroup",value:function(e){this._convGroupHandler.onConvAddedToOrDeletedFromGroup(e)}},{key:"_getConvLastMessageSeq",value:function(e){var t=this._msgListHandler.getLocalLastMsg(e.conversationID);return e=e.lastMessage.lastSequence,t&&e<t.sequence?t.sequence:e}},{key:"_getConvLastMessageTime",value:function(e){var t=this._msgListHandler.getLocalLastMsg(e.conversationID);return e=e.lastMessage.lastTime,t&&e<t.time?t.time:e}},{key:"_createSetAllMessageReadPack",value:function(e){var t,n={readAllC2CMessage:0,groupMessageReadInfoList:[]},o=e.scope,i=T(this._convMap);try{for(i.s();!(t=i.n()).done;){var a,s=_(t.value,2)[1];if(0<s.unreadCount)if(s.type===E.CONV_C2C&&0===n.readAllC2CMessage){if(o===E.READ_ALL_MSG)n.readAllC2CMessage=1;else if(o===E.READ_ALL_C2C_MSG){n.readAllC2CMessage=1;break}}else s.type!==E.CONV_GROUP||o!==E.READ_ALL_GROUP_MSG&&o!==E.READ_ALL_MSG||(a=this._getConvLastMessageSeq(s),n.groupMessageReadInfoList.push({groupID:s.groupProfile.groupID,messageSequence:a}))}}catch(r){i.e(r)}finally{i.f()}return n}},{key:"onPushedAllMessageRead",value:function(e){this._handleAllMsgRead(e)}},{key:"_handleAllMsgRead",value:function(e){var t=e.groupMessageReadInfoList;return e=e.readAllC2CMessage,t=this._parseGroupReadInfo(t),1<=this._updateAllConvUnreadCount({readAllC2CMessage:e})&&this.emitConvUpdate(!0,!1),t}},{key:"_parseGroupReadInfo",value:function(e){var t=[];if(e&&e.length)for(var n=0,o=e.length;n<o;n++){var i=(r=e[n]).groupID,a=r.sequence,s=r.retCode,r=r.lastMessageSeq;ut(s)?this._remoteGroupReadSeqMap.set(i,r):(this._remoteGroupReadSeqMap.set(i,a),0!==s&&t.push("".concat(i,"-").concat(a,"-").concat(s)))}return t}},{key:"_updateAllConvUnreadCount",value:function(e){var t,n=e.readAllC2CMessage,o=0,i=T(this._convMap);try{for(i.s();!(t=i.n()).done;){var a,s,r,c,u=_(t.value,2),l=u[0],d=u[1];1<=d.unreadCount&&(1===n&&d.type===E.CONV_C2C?(a=this._getConvLastMessageTime(d),this.updateIsReadAfterReadReport({conversationID:l,lastMessageTime:a})):d.type===E.CONV_GROUP&&(s=l.replace(E.CONV_GROUP,""),this._remoteGroupReadSeqMap.has(s))&&(r=this._remoteGroupReadSeqMap.get(s),c=this._getConvLastMessageSeq(d),this.updateIsReadAfterReadReport({conversationID:l,remoteReadSequence:r}),r<=c)&&this._remoteGroupReadSeqMap.delete(s),this.updateUnreadCount(l,!1))&&(o+=1)}}catch(p){i.e(p)}finally{i.f()}return o}},{key:"isRemoteRead",value:function(e){var t,n=e.conversationID,o=(e=e.sequence,n.replace(E.CONV_GROUP,"")),i=!1;return this._remoteGroupReadSeqMap.has(o)&&(e<=(t=this._remoteGroupReadSeqMap.get(o))&&(i=!0,Ae.l("".concat(this._n,".isRemoteRead convID:").concat(n," msgSeq:").concat(e," remoteReadSeq:").concat(t))),t+10<=e)&&this._remoteGroupReadSeqMap.delete(o),i}},{key:"updateIsReadAfterReadReport",value:function(e){var t=e.conversationID,n=e.lastMessageSeq,o=e.lastMessageTime,i=this._msgListHandler.getLocalMsgList(t);if(0!==i.length)for(var a,s=i.length-1;0<=s;s--)if(a=i[s],!(o&&a.time>o||n&&a.sequence>n)){if("in"===a.flow&&a.isRead)break;a.setIsRead(!0)}}},{key:"updateUnreadCount",value:function(e){var t,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],o=!1,i=this.getLocalConversation(e),a=this._msgListHandler.getLocalMsgList(e);if(i)return(t=i.unreadCount)!==(a=a.filter((function(e){return!e.isRead&&!e._onlineOnlyFlag&&!e.isDeleted})).length)&&(i.unreadCount=a,o=!0,Ae.l("".concat(this._n,".updateUnreadCount from ").concat(t," to ").concat(a,", convID:").concat(e)),!0===n)&&this.emitConvUpdate(!0,!1),o&&i.type===E.CONV_TOPIC&&(t=i.unreadCount,a=this.get(10),n=e.replace(E.CONV_GROUP,""),a.onUnreadCountUpdatedFromConv(n,t)),o}},{key:"clearGroupAtInfoList",value:function(e){var t,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],o=this.getLocalConversation(e);o&&0<o.groupAtInfoList.length&&(o.clearGroupAtInfoList(),Ae.l("".concat(this._n,".clearGroupAtInfoList convID:").concat(e)),o.type===E.CONV_TOPIC&&(o=o.groupAtInfoList,t=this.get(10),e=e.replace(E.CONV_GROUP,""),t.onAtInfoUpdated({topicID:e,groupAtInfoList:o})),!0===n)&&this.emitConvUpdate(!0,!1)}},{key:"updateReadReceiptInfo",value:function(e){var t,n,o,i=this,a=void 0===(r=e.userID)?void 0:r,s=void 0===(r=e.groupID)?void 0:r,r=e.readReceiptList,c=void 0===(e=e.timestamp)?0:e;Ve(r)||(t=[],ut(a)?ut(s)||(n="".concat(E.CONV_GROUP).concat(s),r.forEach((function(e){var o=e.tinyID,a=e.clientTime,r=e.random,c=e.readCount;e=e.unreadCount,o="".concat(o,"-").concat(a,"-").concat(r),a=i._msgListHandler.getLocalMsg(n,o)||i._msgListHandler.getHoppingMsg(n,o),r={groupID:s,messageID:o,readCount:0,unreadCount:0},a&&(Ke(c)&&(a.readReceiptInfo.readCount=c,r.readCount=c),Ke(e)&&(a.readReceiptInfo.unreadCount=e,r.unreadCount=e),t.push(r))}))):(o="".concat(E.CONV_C2C).concat(a),r.forEach((function(e){var n=e.tinyID,s=e.clientTime;e=e.random,n="".concat(n,"-").concat(s,"-").concat(e),(s=i._msgListHandler.getLocalMsg(o,n)||i._msgListHandler.getHoppingMsg(o,n))&&!s.readReceiptInfo.isPeerRead&&(s.readReceiptInfo.isPeerRead=!0,s.readReceiptInfo.timestamp=c,t.push({userID:a,messageID:n,isPeerRead:!0,timestamp:c}))}))),0<t.length&&this.emitOEvt(S.MESSAGE_READ_RECEIPT_RECEIVED,t))}},{key:"updateIsRead",value:function(e){var t=this.getLocalConversation(e),n=this.getLocalMessageList(e);if(t&&0!==n.length&&!St(t.type)){for(var o=[],i=0,a=n.length;i<a;i++)"in"!==n[i].flow?"out"!==n[i].flow||n[i].isRead||n[i].setIsRead(!0):o.push(n[i]);var s=0;s=t.type===E.CONV_C2C?(e=o.slice(-t.unreadCount).filter((function(e){return e.isRevoked})).length,o.length-t.unreadCount-e):o.length-t.unreadCount;for(var r=0;r<s&&!o[r].isRead;r++)o[r].setIsRead(!0)}}},{key:"deleteGroupAtTips",value:function(e){var t,n,o,i=this,a="".concat(this._n,".deleteGroupAtTips"),s=(Ae.l("".concat(a)),this._convMap.get(e));return s&&0!==(t=s.groupAtInfoList).length?(s=void 0,e.startsWith(E.CONV_GROUP)&&(s=e.replace(E.CONV_GROUP,"")),n=m(t),(It({groupID:s})||Mt(s))&&0===(n=t.filter((function(e){return!e.atTypeArray.includes(E.CONV_AT_ALL)}))).length?(this.clearGroupAtInfoList(e,!1),Promise.resolve()):(o=this.getMyUserID(),this.req({P:Gn.DEL_GROUP_AT_TIPS,data:{messageListToDelete:n.map((function(e){return{from:e.from,to:o,messageSeq:e.__sequence,messageRandom:e.__random,groupID:ut(e.topicID)?e.groupID:e.topicID}}))}}).then((function(){return Ae.l("".concat(a," ok. count:").concat(t.length)),i.clearGroupAtInfoList(e,!1),Promise.resolve()})).catch((function(e){return Ae.e("".concat(a," failed. error:"),e),yn(e)})))):Promise.resolve()}},{key:"appendToMessageList",value:function(e){return this._msgListHandler.pushIn(e)}},{key:"setMessageRandom",value:function(e){this._sll.set(e.random)}},{key:"deleteMessageRandom",value:function(e){this._sll.delete(e.random)}},{key:"pushIntoMessageList",value:function(e,t,n){return!(!this._msgListHandler.pushIn(t,n)||this._sll.has(t.random)&&!n||(e.push(t),0))}},{key:"revoke",value:function(e,t,n){return this._msgListHandler.revoke(e,t,n)}},{key:"getPeerReadTime",value:function(e){return this._peerReadTimeMap.get(e)}},{key:"recordPeerReadTime",value:function(e,t){(!this._peerReadTimeMap.has(e)||this._peerReadTimeMap.get(e)<t)&&this._peerReadTimeMap.set(e,t)}},{key:"updateMsgIsPeerReadProp",value:function(e,t){var n;e.startsWith(E.CONV_C2C)&&0<t&&(0<(n=this._msgListHandler.updateMsgIsPeerReadProp(e,t)).length&&this.emitOEvt(S.MESSAGE_READ_BY_PEER,n),this._convMap.has(e))&&!Ve(n=this._convMap.get(e).lastMessage)&&n.fromAccount===this.getMyUserID()&&n.lastTime<=t&&!n.isPeerRead&&(n.isPeerRead=!0,this.emitConvUpdate(!0,!1))}},{key:"updateMsgIsModifiedProp",value:function(e){this._msgListHandler.updateMsgIsModifiedProp(e)}},{key:"setCompleted",value:function(e){Ae.l("".concat(this._n,".setCompleted convID:").concat(e)),this._completedMap.set(e,!0)}},{key:"updateRoamingMsgKeyAndTime",value:function(e,t,n){this._roamingMsgKeyAndTimeMap.set(e,{messageKey:t,lastMessageTime:n})}},{key:"getConvList",value:function(e){var t,n=this,o="".concat(this._n,".").concat("getConvList"),i="pagingStatus:".concat(this._pagingStatus,", local conversation count:").concat(this._convMap.size,", options:").concat(JSON.stringify(e));return Ae.l("".concat(o,". ").concat(i)),this._pagingStatus===kn?((t=new Jn("getConvList")).setMessage(i),this.syncConvList().then((function(){return t.end(),mn({conversationList:n._getConvList(e),isSyncCompleted:n._isSyncCompleted()})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)}))):(i=this._getConvList(e),Ae.l("".concat(o,". returned conversation count:").concat(i.length)),vn({conversationList:i,isSyncCompleted:this._isSyncCompleted()}))}},{key:"_getConvList",value:function(e){var t,n,o,i,a,s=this;return ut(e)?this.getLocalConvList():We(e)?0===e.length?[]:this.getLocalConvList().filter((function(t){return e.includes(t.conversationID)})):ze(e)?(t=e.type,n=e.markType,o=e.groupName,i=e.hasUnreadCount,a=e.hasGroupAtInfo,this.getLocalConvList().filter((function(e){return s._filterType(e,t)&&s._filterMarkType(e,n)&&s._filterGroupName(e,o)&&s._filterUnreadCount(e,i)&&s._filterGroupAtInfo(e,a)}))):[]}},{key:"_filterType",value:function(e,t){return t!==E.CONV_C2C&&t!==E.CONV_GROUP||e.type===t}},{key:"_filterGroupName",value:function(e,t){return!ct(t)||(""===t?0===e.conversationGroupList.length:e.conversationGroupList.includes(t))}},{key:"_filterMarkType",value:function(e,t){return!Ke(t)||(0===t?0===e.markList.length:e.markList.includes(t))}},{key:"_filterUnreadCount",value:function(e,t){var n=!0;return!0===t?n=1<=e.unreadCount:!1===t&&(n=0===e.unreadCount),n}},{key:"_filterGroupAtInfo",value:function(e,t){var n=!0;return!0===t?n=1<=e.groupAtInfoList.length:!1===t&&(n=0===e.groupAtInfoList.length),n}},{key:"_handleC2CPeerReadTime",value:function(){var e,t=T(this._convMap);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2),o=n[0],i=n[1];i.type===E.CONV_C2C&&this.recordPeerReadTime(o,i.peerReadTime)}}catch(a){t.e(a)}finally{t.f()}}},{key:"_isPagingGetGroupListCompleted",value:function(){var e=this.get(7);return!e||e.isPagingGetCompleted()}},{key:"_getLocalGroupCount",value:function(){var e=this.get(7);return e?e.getLocalGroupList().length:0}},{key:"_hasLocalGroup",value:function(e){var t=this.get(7);return!!t&&t.hasLocalGroup(e.replace(E.CONV_GROUP,""))}},{key:"getConversationProfile",value:function(e){var t,n=this,o=!1;if(this._convMap.has(e)?t=this._convMap.get(e):(t=new oi({conversationID:e,type:Ct(e)?E.CONV_C2C:E.CONV_GROUP},this.isIntl(),this.isUsingChatCore()),o=!0),t._isInfoCompleted||t.type===E.CONV_SYSTEM)return vn({conversation:t});if(Tt(e)){if(!this.get(7))return yn({code:Pn.NO_MODULE});if(!this._hasLocalGroup(e))return vn({conversation:t})}var i="".concat(this._n,".").concat("getConversationProfile"),a=new Jn("getConversationProfile");return Ae.l("".concat(i,". convID:").concat(e," remark:").concat(t.remark," lastMessage:"),t.lastMessage),this._getUserOrGroupProfile(t).then((function(s){a.setMessage("convID:".concat(e," unreadCount:").concat(s.data.conversation.unreadCount)).end();var r,c=n.get(8);if(c&&t.type===E.CONV_C2C&&(r=e.replace(E.CONV_C2C,""),c.isMyFriend(r))&&(c=c.getFriendRemark(r),t.remark!==c)&&(t.remark=c,Ae.l("".concat(i,". convID:").concat(e," patch remark:").concat(t.remark))),Ae.l("".concat(i," ok. isNewConv:").concat(o," convID:").concat(e)),o){if(t.type===E.CONV_C2C)return n._onNewC2CConv([e.replace(E.CONV_C2C,"")]).then((function(){return vn({conversation:t})}));if(t.type===E.CONV_GROUP)return n._onNewGroupConv([e.replace(E.CONV_GROUP,"")]).then((function(){return vn({conversation:t})}))}return s})).catch((function(t){return a.setError(t).setMessage("convID:".concat(e)).end(),Ae.e("".concat(i," failed. error:"),t),yn(t)}))}},{key:"_getUserOrGroupProfile",value:function(e){var t=this;return e.type===E.CONV_C2C?this.get(4).getUserProfile({userIDList:[e.toAccount]}).then((function(n){return 0===(n=n.data).length?yn({code:Pn.USER_OR_GRP_NOT_FOUND}):(e.userProfile=n[0],e._isInfoCompleted=!0,t._insertConvAfterTopmost(e),vn({conversation:e}))})):this.get(7).getGroupProfile({groupID:e.toAccount}).then((function(n){return e.groupProfile=n.data.group,e._isInfoCompleted=!0,t._insertConvAfterTopmost(e),vn({conversation:e})}))}},{key:"_insertConvAfterTopmost",value:function(e){var t,n;e instanceof oi&&!this._convMap.has(e.conversationID)&&(n=(t=m(this._convMap)).findIndex((function(e){return!1===e[1].isPinned})),t.splice(n,0,[e.conversationID,e]),this._convMap=new Map(t),this._setStorageConvList(),this.emitConvUpdate(!0,!1))}},{key:"_onProfileUpdated",value:function(e){var t=this;e.data.forEach((function(e){var n=e.userID;n===t.getMyUserID()?t._onMyProfileModified({latestNick:e.nick,latestAvatar:e.avatar}):(n=t._convMap.get("".concat(E.CONV_C2C).concat(n)))&&(n.userProfile=e)}))}},{key:"_onCloudConfig",value:function(e){"0"===this.getCloudConfig("pull_on_invite")&&(this._bPullOnInvite=!1),Ae.l("".concat(this._n,"._onCloudConfig bPullOnInvite:").concat(this._bPullOnInvite))}},{key:"disableMsgPullOnInvite",value:function(){this._bPullOnInvite=!1}},{key:"_isSyncCompleted",value:function(){return this._pagingStatus===Dn}},{key:"_errorLog",value:function(e,t,n,o){var i=new Error("Params validate failed."),a="".concat(this.getErrMsg("API_REFER")).concat(e);throw Ae.w("[".concat(e,"] | ").concat(t," | ").concat(this.getErrMsg(n,o),", ").concat(a)),Ae.e("[".concat(e,"] Invalid ").concat(t,": type check failed for ").concat(t,".")),i}},{key:"_isValidConvID",value:function(e){return Ct(e)||Tt(e)||St(e)}},{key:"deleteConversation",value:function(e){var t=this,n="deleteConversation";return ct(e)||$e(e)||this._errorLog(n,"options","StringOrObjectRequiredLog"),ct(e)?(this._isValidConvID(e)||this._errorLog(n,"options","InvalidConversationID",e),Ae.l("".concat(this._n,".").concat(n," convID:").concat(e)),this.deleteConvList({conversationIDList:[e],flag:1})):(We(e.conversationIDList)||this._errorLog(n,"conversationIDList","ArrayRequiredLog"),0===e.conversationIDList.length&&this._errorLog(n,"conversationIDList","NonEmptyArrayLog"),e.conversationIDList.forEach((function(e){t._isValidConvID(e)||t._errorLog(n,"conversationIDList","InvalidConversationID",e)})),"clearHistoryMessage"in e&&"boolean"!=typeof e.clearHistoryMessage&&this._errorLog(n,"clearHistoryMessage","BooleanRequiredLog"),100<e.conversationIDList.length&&(e.conversationIDList=e.conversationIDList.slice(0,100)),this.deleteConvList(e))}},{key:"deleteConvList",value:function(e){var t=void 0===(t=e.conversationIDList)?[]:t,n=void 0===(n=e.clearHistoryMessage)||n,o=void 0===(e=e.flag)?0:e,i="".concat(this._n,".").concat("deleteConvList"),a=(e="convIDList:".concat(t," clearHistoryMessage:").concat(n),Ae.l("".concat(i," ").concat(e)),new Jn("deleteConvList"));return a.setMessage(e),Promise.all([this.rmLocalOnlyConvList(t),this.rmLocalAndRemoteConvList(t,n)]).then((function(e){return a.end(),0===(e=[].concat(m(e[0]),m(e[1]))).length?yn(new wn({code:Pn.CONV_NOT_FOUND})):(Ae.l("".concat(i," ok")),vn(1===o?{conversationID:e[0]}:{conversationIDList:e}))})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)}))}},{key:"rmLocalOnlyConvList",value:function(e){var t=this;return e.filter((function(e){var n;return!!t._convMap.has(e)&&((n=t.getLocalConversation(e).type)!==E.CONV_GROUP||t._hasLocalGroup(e)?n===E.CONV_SYSTEM&&(t.get(7).deleteGroupSystemNotice({messageList:t._msgListHandler.getLocalMsgList(e)}),t.deleteLocalConv(e),!0):(t.deleteLocalConv(e),!0))}))}},{key:"rmLocalAndRemoteConvList",value:function(e,t){var n=this,o={fromAccount:this.getMyUserID(),conversationList:[],clearHistoryMessage:t?1:0};return e.forEach((function(e){var t;n._convMap.has(e)&&((t=n.getLocalConversation(e).type)===E.CONV_C2C?o.conversationList.push({toAccount:e.replace(t,""),type:1}):t===E.CONV_GROUP&&n._hasLocalGroup(e)&&o.conversationList.push({toGroupID:e.replace(t,""),type:2}))})),0===o.conversationList.length?[]:this.req({P:Gn.DEL_CONV,data:o}).then((function(e){var t=[];return 0<e.data.resultList.length&&e.data.resultList.map((function(e){0===e.code&&(e=1===e.type?"".concat(E.CONV_C2C).concat(e.to):"".concat(E.CONV_GROUP).concat(e.groupID),t.push(e))})),n.deleteLocalConvList(t),t}))}},{key:"setConvDraft",value:function(e){var t=e.conversationID,n=(e=e.draftText,"".concat(this._n,".").concat("setConvDraft"));return Ae.l("".concat(n," convID:").concat(t," draftText:").concat(e)),this._convMap.has(t)?((n=this._convMap.get(t)).setDraftText(e),this.emitConvUpdate(),vn({code:0,conversation:n})):yn({code:Pn.CONV_NOT_FOUND})}},{key:"clearHistoryMessage",value:function(e){var t=this,n={fromAccount:this.getMyUserID(),toAccount:void 0,type:void 0,toGroupID:void 0};if(!this._convMap.has(e))return yn({code:Pn.CONV_NOT_FOUND});var o=this._convMap.get(e).type;if(o===E.CONV_C2C)n.type=1,n.toAccount=e.replace(E.CONV_C2C,"");else{if(o!==E.CONV_GROUP)return o===E.CONV_SYSTEM?(this.get(7).deleteGroupSystemNotice({messageList:this._msgListHandler.getLocalMsgList(e)}),vn({conversationID:e})):yn({code:Pn.CONV_UN_RECORDED_TYPE});n.type=2,n.toGroupID=e.replace(E.CONV_GROUP,"")}var i="".concat(this._n,".").concat("clearHistoryMessage"),a=new Jn("clearHistoryMessage");return a.setMessage("convID:".concat(e)),Ae.l("".concat(i,". convID:").concat(e)),this.setMessageRead({conversationID:e}).then((function(){return t.req({P:Gn.CLEAR_HISTORY_MSG,data:n})})).then((function(){a.end(),Ae.l("".concat(i," ok")),t.clearMemMsg(e);var n=t.getLocalConversation(e);return n&&(n.updateLastMessage(),t._sortConvListAndEmitEvent()),vn({conversationID:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)}))}},{key:"pinConversation",value:function(e){var t,n,o,i=this,a=e.conversationID,s=e.isPinned,r=this.getLocalConversation(a);return r&&r.isPinned===s?vn({conversationID:a}):St(a)?(r&&(r.isPinned=s),this._sortConvListAndEmitEvent(),vn({conversationID:a})):(e=null,Ct(a)?e={type:1,toAccount:a.replace(E.CONV_C2C,"")}:Tt(a)&&(e={type:2,groupID:a.replace(E.CONV_GROUP,"")}),null===e?yn({code:Pn.INVALID_CONV_ID}):(t="".concat(this._n,".").concat("pinConversation"),n="convID:".concat(a," isPinned:").concat(s),(o=new Jn("pinConversation")).setMessage(n),Ae.l("".concat(t,". ").concat(n)),this.req({P:Gn.PIN_CONV,data:{fromAccount:this.getMyUserID(),operationType:!0===s?1:2,itemList:[e]}}).then((function(){return o.end(),Ae.l("".concat(t," ok")),r?r.isPinned!==s&&(r.isPinned=s):i._convMap.set(a,new oi({conversationID:a,type:Ct(a)?E.CONV_C2C:E.CONV_GROUP,isPinned:s},i.isIntl(),i.isUsingChatCore())),i._sortConvListAndEmitEvent(),mn({conversationID:a})})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))))}},{key:"setMessageRemindType",value:function(e){return this._msgRemindHandler.set(e)}},{key:"patchMsgRemindType",value:function(e){var t=e.ID,n=e.isC2CConversation,o=e.messageRemindType,i=!1;return(n=this.getLocalConversation("".concat(n?E.CONV_C2C:E.CONV_GROUP).concat(t)))&&n.messageRemindType!==o&&(n.messageRemindType=o,i=!0),Ae.l("".concat(this._n,".patchMsgRemindType options:"),e,"ret:".concat(i)),i}},{key:"onC2CMsgRemindTypeFetched",value:function(e){var t,n=this;We(e)&&0<e.length&&(t=0,e.forEach((function(e){var o=e.userID;e=e.muteFlag,e=n._transMsgRemindType(e),!0===n.patchMsgRemindType({ID:o,isC2CConversation:!0,messageRemindType:e})&&(t+=1)})),Ae.l("".concat(this._n,".onC2CMsgRemindTypeFetched updateCount:").concat(t)),1<=t)&&this.emitConvUpdate(!0,!1)}},{key:"onC2CMsgRemindTypeSynced",value:function(e){var t=this,n="".concat(this._n,".onC2CMsgRemindTypeSynced");e.dataList.forEach((function(e){var o;Ve(e.muteNotificationsSync)||(o=(e=e.muteNotificationsSync).to,e=e.muteFlag,e=t._transMsgRemindType(e),t.patchMsgRemindType({ID:o,isC2CConversation:!(o=0),messageRemindType:e})&&(o+=1),Ae.l("".concat(n," updateCount:").concat(o)),1<=o&&t.emitConvUpdate(!0,!1))}))}},{key:"onGroupMsgRemindTypeUpdated",value:function(e){this._msgRemindHandler.onGroupMsgRemindTypeUpdated(e)}},{key:"deleteLocalConv",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this._convMap.has(e);Ae.l("".concat(this._n,".deleteLocalConv convID:").concat(e," has:").concat(n)),n&&(this._convMap.delete(e),this._convMapForDiff.delete(e),this.clearMemMsg(e),this._setStorageConvList(!0),t)&&(n=!this._isTopicConv(e),this.emitConvUpdate(n,!1))}},{key:"pullMsgOnInvite",value:function(e){var t,n,o,i,a,s=this.get(7);s&&(t="".concat(this._n,".pullMsgOnInvite"),Ae.l("".concat(t," flag:").concat(this._bPullOnInvite)),this._bPullOnInvite)&&(a=this.getLocalLastMessage(e),n=this.getLocalSecondLastMessage(e),i=o=1,a&&(o=a.sequence),n&&(i=n.sequence),a=s.getGroupRemoteLastSeq(e.replace(E.CONV_GROUP,"")),Ae.l("".concat(t," convID:").concat(e," localLastSeq:").concat(o," localSecondLastSeq:").concat(i," remoteLastSeq:").concat(a)),this.clearMemMsg(e),1<o-i?this._recursiveGetMsgList([],e,!1,o,i):1<a-o&&this._recursiveGetMsgList([],e,!0,a,o))}},{key:"_recursiveGetMsgList",value:function(e,t,n,o,i,a){var s=this;this.getMessageList({conversationID:t,nextReqMessageID:a}).then((function(a){var r=(a=a.data).messageList,c=a.isCompleted,u=(a=a.nextReqMessageID,r.filter((function(e){return n?e.sequence>i&&e.sequence<=o:e.sequence>i&&e.sequence<o})));e.unshift.apply(e,m(u)),!c&&0<r.length&&r[0].sequence>i&&e.length<60?s._recursiveGetMsgList(e,t,n,o,i,a):s._emitMsgReceived(t,e)}))}},{key:"_emitMsgReceived",value:function(e,t){var n,o,i=this;0<t.length&&(t=t.filter((function(e,t,n){return t===n.findIndex((function(t){return t.sequence===e.sequence}))})),n=this.hasLocalConversation(e),o=t.map((function(e){return e.sequence})),Ae.l("".concat(this._n,"._emitMsgReceived convID:").concat(e," has:").concat(n," count:").concat(o.length," sequenceList:"),o),this.emitOEvt(S.MESSAGE_RECEIVED,t),n?this.patchConvLastMessage(e,!0):this.getConversationProfile(e).then((function(){i.patchConvLastMessage(e,!0)})))}},{key:"deleteLocalConvList",value:function(e){var t=this,n=!1;e.forEach((function(e){t._convMap.has(e)&&(t.deleteLocalConv(e,!1),n=!0)})),Ae.l("".concat(this._n,".deleteLocalConvList convID:").concat(e," isConvIDExisted:").concat(n)),n&&this.emitConvUpdate(!0,!1)}},{key:"isMessageSentByCurrentInstance",value:function(e){return!(!this._msgListHandler.hasLocalMsg(e.conversationID,e.ID)&&!this._sll.has(e.random))}},{key:"modifyMessageList",value:function(e){var t,n;e.startsWith(E.CONV_C2C)&&this._convMap.has(e)&&(n=this._convMap.get(e),t=Date.now(),this._msgListHandler.modifyMsgSentByPeer({conversationID:e,latestNick:n.userProfile.nick,latestAvatar:n.userProfile.avatar}),n=this.get(4).getNickAndAvatarByUserID(this.getMyUserID()),this._msgListHandler.modifyMsgSentByMe({conversationID:e,latestNick:n.nick,latestAvatar:n.avatar}),Ae.l("".concat(this._n,".modifyMessageList convID:").concat(e," cost:").concat(jt(t))))}},{key:"updateUserProfileSpecifiedKey",value:function(e){Ae.l("".concat(this._n,".updateUserProfileSpecifiedKey options:"),e);var t=e.conversationID,n=e.nick;e=e.avatar,this._convMap.has(t)&&(t=this._convMap.get(t).userProfile,ct(n)&&t.nick!==n&&(t.nick=n),ct(e)&&t.avatar!==e&&(t.avatar=e),this.emitConvUpdate(!0,!1))}},{key:"_onMyProfileModified",value:function(e){var n=this,o=this.getLocalConvList(),i=Date.now();o.forEach((function(o){n.modifyMessageSentByMe(t({conversationID:o.conversationID},e))})),Ae.l("".concat(this._n,"._onMyProfileModified. modify all messages sent by me, cost:").concat(jt(i)))}},{key:"modifyMessageSentByMe",value:function(e){this._msgListHandler.modifyMsgSentByMe(e)}},{key:"getLatestMessageSentByMe",value:function(e){return this._msgListHandler.getLatestMsgSentByMe(e)}},{key:"modifyMessageSentByPeer",value:function(e){this._msgListHandler.modifyMsgSentByPeer(e)}},{key:"getLatestMessageSentByPeer",value:function(e){return this._msgListHandler.getLatestMsgSentByPeer(e)}},{key:"pushIntoNoticeResult",value:function(e,t){return!(!this._msgListHandler.pushIn(t)||this._sll.has(t.random)||(e.push(t),0))}},{key:"getLocalLastMessage",value:function(e){return this._msgListHandler.getLocalLastMsg(e)}},{key:"getLocalSecondLastMessage",value:function(e){return this._msgListHandler.getLocalSecondLastMsg(e)}},{key:"checkAndPatchRemark",value:function(){var e,t,n=this.get(8);0!==this._convMap.size&&n&&0!==(e=m(this._convMap.values()).filter((function(e){return e.type===E.CONV_C2C}))).length&&(t=0,e.forEach((function(e){var o=e.conversationID.replace(E.CONV_C2C,"");n.isMyFriend(o)&&(o=n.getFriendRemark(o),e.remark!==o)&&(e.remark=o,t+=1)})),Ae.l("".concat(this._n,".checkAndPatchRemark. c2cConvCount:").concat(e.length," patchedCount:").concat(t)),0<t)&&this.emitConvUpdate(!0,!1)}},{key:"updateTopicConversation",value:function(e){this._updateLocalConvList({conversationOptionsList:e,isFromGetConversations:!0,updateUnreadCount:!0})}},{key:"sendReadReceipt",value:function(e){var t=e[0],n=null;return t.conversationType===E.CONV_C2C?n=this._m.get(6):t.conversationType===E.CONV_GROUP&&(n=this._m.get(7)),n?n.sendReadReceipt(e):yn({code:Pn.NO_MODULE})}},{key:"getReadReceiptList",value:function(e){var t=e[0],n=null;return t.conversationType===E.CONV_C2C?n=this._m.get(6):t.conversationType===E.CONV_GROUP&&(n=this._m.get(7)),n?n.getReadReceiptList(e):yn({code:Pn.NO_MODULE})}},{key:"getLastMessageTime",value:function(e){return(e=this.getLocalConversation(e))?e.lastMessage.lastTime:0}},{key:"getTotalUnreadCount",value:function(){var e=this.getLocalConvList(),t=0;return e.forEach((function(e){e.type===E.CONV_SYSTEM||""!==e.messageRemindType&&e.messageRemindType!==E.MSG_REMIND_ACPT_AND_NOTE||(t+=e.unreadCount)})),t}},{key:"onTotalUnreadCountUpdate",value:function(){var e=this.getTotalUnreadCount();this._convTotalUnreadCount!==e&&(Ae.l("".concat(this._n,".onTotalUnreadCountUpdate from ").concat(this._convTotalUnreadCount," to ").concat(e)),this._convTotalUnreadCount=e,this.emitOEvt(S.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED))}},{key:"_isConvNeedShow",value:function(e){var t,n;return e=this.getLocalConversation(e),!(!ut(e)&&(t=e.type===E.CONV_TOPIC,n=e.type===E.CONV_GROUP&&e.groupProfile.type===E.GRP_ROOM,e=e.type===E.CONV_GROUP&&e.groupProfile.type===E.GRP_LIVE,t||n||e))}},{key:"setAllRcvMsgOpt",value:function(e){return this._msgRemindHandler.setAllRcvMsgOpt(e)}},{key:"getAllRcvMsgOpt",value:function(){return this._msgRemindHandler.getAllRcvMsgOpt()}},{key:"onAllRcvMsgOptNotify",value:function(e){this._msgRemindHandler.onAllRcvMsgOptNotify(e)}},{key:"clearUnreadCount",value:function(e){(e=this.getLocalConversation(e))&&0<e.unreadCount&&(e.unreadCount=0,this.emitConvUpdate(!0,!1))}},{key:"storeHoppingMessageList",value:function(e){this._msgListHandler.storeHoppingMsgList(e)}},{key:"clearMemMsg",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];Ae.l("".concat(this._n,".clearMemMsg convID:").concat(e," isOverLimit:").concat(t)),this._msgListHandler.removeByConvID(e),this._completedMap.delete(e),this._roamingMsgKeyAndTimeMap.delete(e),this._everClearedMap.set(e,1)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._setStorageConvList(!0),this._pagingStatus=Sn,this._msgListHandler.reset(),this._msgRemindHandler.reset(),this._roamingMsgKeyAndTimeMap.clear(),this._sll.reset(),this._peerReadTimeMap.clear(),this._completedMap.clear(),this._convMap.clear(),this._pagingTs=0,this._pagingStartIdx=0,this._pagingPinnedTs=0,this._pagingPinnedStartIdx=0,this._remoteGroupReadSeqMap.clear(),this._convTotalUnreadCount=0,this._pagingGetCostList.length=0,this._pagingConvIDMap.clear(),this._convIDFromUnreadDBMap.clear(),this._pagingGetCostList.length=0,this._convMapForDiff.clear(),this._partialUpdatedConvMap.clear(),this._everClearedMap.clear(),this._bPullOnInvite=!0,this._convGroupHandler.reset(),this.resetReady()}}]),Xi),ci=(a(Yi,[{key:"onCheckTimer",value:function(e){e%1==0&&0<this._cachedGroupTipsMap.size&&this._check()}},{key:"_check",value:function(){var e=this;this._cachedGroupTipsMap.forEach((function(t,n){var o=e._checkCountMap.get(n),i=e._grpM.hasLocalGroup(n);Ae.l("".concat(e._n,"._check groupID:").concat(n," hasLocalGroup:").concat(i," checkCount:").concat(o)),i?(e._notifyCachedGroupTips(n),e._checkCountMap.delete(n),e._grpM.deleteUnjoinedAVChatRoom(n)):o>=e.MAX_CHECK_COUNT?(e._deleteCachedGroupTips(n),e._checkCountMap.delete(n)):e._checkCountMap.set(n,++o)}))}},{key:"onNewGroupTips",value:function(e){Ae.l("".concat(this._n,".onNewGroupTips options:").concat(JSON.stringify(e.dataList)));var t=(e=this._assembly(e)).eventDataList,n=e.result;0<(e=e.AVChatRoomMessageList).length&&this._grpM.onAVChatRoomMessage(e),0<n.length&&(this._grpM.emitOEvt(S.MESSAGE_RECEIVED,n),this._handleTips(n)),0<t.length&&(this._grpM.updateNextMessageSeq(t),this._grpM.get(11).onNewMessage({conversationOptionsList:t,isInstantMessage:!0}))}},{key:"_assembly",value:function(e){for(var n=e.event,o=e.dataList,i=null,a=[],s=[],r={},c=[],u=0,l=o.length;u<l;u++){var d=st(o[u]);if(6===n){if(this._grpM.isGroupAttributesUpdatedNotice(d))continue;if(this._grpM.isGroupCountersNotice(d))continue}var p=(_=d.groupProfile).groupID,h=void 0===(h=_.communityType)?0:h,f=void 0===(f=_.topicID)?void 0:f,g=_.invisible,_=void 0===(_=_.groupType)?void 0:_,m=void 0;if((y=this._grpM.isMessageFromTopic(h,f))&&(m=E.CONV_TOPIC,d.to=f),(v=this._grpM.hasLocalGroup(p))||!this._grpM.isUnjoinedAVChatRoom(p))if(v||y)if(this._grpM.isMessageFromOrToAVChatroom(p))d.event=n,c.push(d);else if(d.currentUser=this._grpM.getMyUserID(),d.conversationType=E.CONV_GROUP,(i=new Co(d)).setElement({type:E.MSG_GRP_TIP,content:t(t({},d.elements),{},{groupProfile:d.groupProfile})}),i.isSystemMessage=!1,1!==g){var v=this._grpM.get(11),y=(g=(y=i).conversationID,y.sequence);if(6===n)i._onlineOnlyFlag=!0,s.push(i);else if(!v.pushIntoNoticeResult(s,i))continue;this._grpM.isMessageFromCommunityOfTopic(h,f)||6===n&&v.getLocalConversation(g)||(6!==n&&this._qualityStat(i),h=v.isRemoteRead({conversationID:g,sequence:y}),ut(r[g])?(f=0,"in"!==i.flow||i._isExcludedFromUnreadCount||i._onlineOnlyFlag||h||(f=1),r[g]=a.push({conversationID:g,unreadCount:f,type:ut(m)?i.conversationType:m,subType:i.conversationSubType,lastMessage:i._isExcludedFromLastMessage?"":i})-1):(a[v=r[g]].type=i.conversationType,a[v].subType=i.conversationSubType,a[v].lastMessage=i._isExcludedFromLastMessage?"":i,"in"!==i.flow||i._isExcludedFromUnreadCount||i._onlineOnlyFlag||h||a[v].unreadCount++))}else this._qualityStat(i);else this._cacheAndCompare({groupID:p,event:n,item:d,groupType:_})}return{eventDataList:a,result:s,AVChatRoomMessageList:c}}},{key:"_qualityStat",value:function(e){this._grpM.get(26).addMessageSequence({key:jn,message:e})}},{key:"_handleTips",value:function(e){var t=this;e.forEach((function(e){switch(e.payload.operationType){case 1:t._onNewMemberComeIn(e);break;case 2:t._onMemberQuit(e);break;case 3:t._onMemberKickedOut(e);break;case 4:t._onMemberSetAdmin(e);break;case 5:t._onMemberCancelledAdmin(e);break;case 6:t._onGroupProfileModified(e);break;case 7:t._onMemberInfoModified(e);break;case 8:t._onTopicProfileUpdated(e);break;default:Ae.w("".concat(t._n,"._handleTips unknown operationType:").concat(e.payload.operationType))}}))}},{key:"_onNewMemberComeIn",value:function(e){var t=(e=e.payload).memberNum;e=e.groupProfile.groupID,(e=this._grpM.getLocalGroupProfile(e))&&Ke(t)&&e.memberCount!==t&&(e.memberCount=t,this._updateConvGroupProfile(e))}},{key:"_onMemberQuit",value:function(e){var t=(n=e.payload).memberNum,n=n.groupProfile.groupID,o=this._grpM.getLocalGroupProfile(n);o&&Ke(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(n,e.payload.userIDList)}},{key:"_onMemberKickedOut",value:function(e){var t=(n=e.payload).memberNum,n=n.groupProfile.groupID,o=this._grpM.getLocalGroupProfile(n);o&&Ke(t)&&o.memberCount!==t&&(o.memberCount=t,this._updateConvGroupProfile(o)),this._grpM.getGroupMemberHandler().deleteLocalGroupMembers(n,e.payload.userIDList)}},{key:"_updateConvGroupProfile",value:function(e){this._grpM.get(11).updateConvGroupProfile([e])}},{key:"_onMemberSetAdmin",value:function(e){var t=e.payload.groupProfile.groupID,n=(e=e.payload.userIDList,this._grpM.getGroupMemberHandler());e.forEach((function(e){(e=n.getLocalGroupMemberInfo(t,e))&&e.updateRole(E.GRP_MBR_ROLE_ADMIN)}))}},{key:"_onMemberCancelledAdmin",value:function(e){var t=e.payload.groupProfile.groupID,n=(e=e.payload.userIDList,this._grpM.getGroupMemberHandler());e.forEach((function(e){(e=n.getLocalGroupMemberInfo(t,e))&&e.updateRole(E.GRP_MBR_ROLE_MEMBER)}))}},{key:"_onGroupProfileModified",value:function(e){var t=this,n=(e=e.payload).newGroupProfile,o=e.groupProfile,i=e.operatorInfo,a=(e=o.groupID,this._grpM.getLocalGroupProfile(e));Object.keys(n).forEach((function(e){switch(e){case"ownerID":t._ownerChanged(a,n);break;case"groupName":a.name=n[e];break;default:a[e]=n[e]}})),ut(i)||Object.keys(i).forEach((function(e){"nameCard"===e?a.updateSelfInfo({nameCard:i[e]}):"role"===e&&a.updateSelfInfo({role:i[e]})})),o=!a.isSupportTopic,this._grpM.emitGroupListUpdate(!0,o)}},{key:"_ownerChanged",value:function(e,t){e=e.groupID;var n=this._grpM.getLocalGroupProfile(e),o=this._grpM.getMyUserID();o===t.ownerID&&(n.updateGroup({selfInfo:{role:E.GRP_MBR_ROLE_OWNER}}),n=(t=this._grpM.getGroupMemberHandler()).getLocalGroupMemberInfo(e,o),o=this._grpM.getLocalGroupProfile(e).ownerID,t=t.getLocalGroupMemberInfo(e,o),n&&n.updateRole(E.GRP_MBR_ROLE_OWNER),t)&&t.updateRole(E.GRP_MBR_ROLE_MEMBER)}},{key:"_onMemberInfoModified",value:function(e){var t=e.to,n=(o=e.payload).groupProfile,o=o.memberList,i=n.groupID,a=(Mt(t)&&this._updateTopicMuteTime(e),this._grpM.getGroupMemberHandler());o.forEach((function(e){var t=a.getLocalGroupMemberInfo(i,e.userID);t&&Ke(e.muteTime)&&t.updateMuteUntil(e.muteTime)}))}},{key:"_updateTopicMuteTime",value:function(e){var t=e.to,n=(e=e.payload).groupProfile,o=void 0===(e=e.memberList)?[]:e,i=(e=this._grpM.get(10),n=n.groupID,e.getLocalTopic(n,t));if(i){for(var a=!1,s=0;s<o.length;s++){var r=o[s];if(r.userID===this._grpM.getMyUserID()&&0<=r.muteTime){i.updateSelfInfo({muteTime:r.muteTime}),a=!0;break}}a&&this._grpM.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:i})}}},{key:"_onTopicProfileUpdated",value:function(e){var n=(o=e.payload).groupProfile.groupID,o=o.newTopicInfo;this._grpM.get(10).onTopicProfileUpdated(t({groupID:n,topicID:e.to},o))}},{key:"_cacheGroupTips",value:function(e,t){this._cachedGroupTipsMap.has(e)||this._cachedGroupTipsMap.set(e,[]),this._cachedGroupTipsMap.get(e).push(t)}},{key:"_deleteCachedGroupTips",value:function(e){this._cachedGroupTipsMap.has(e)&&this._cachedGroupTipsMap.delete(e)}},{key:"_notifyCachedGroupTips",value:function(e,t){var n=this,o=this._cachedGroupTipsMap.get(e)||[];Ae.l("".concat(this._n,"._notifyCachedGroupTips groupID:").concat(e," groupType:").concat(t," count:").concat(o.length)),o.forEach((function(e){n.onNewGroupTips(e)})),this._deleteCachedGroupTips(e)}},{key:"_cacheAndCompare",value:function(e){var t=e.groupID,n=e.event,o=e.item;e=e.groupType,Ae.l("".concat(this._n,"._cacheAndCompare groupID:").concat(t," groupType:").concat(e)),this._cacheGroupTips(t,{event:n,dataList:[o]}),n={groupID:t,type:e},e===E.GRP_AVCHATROOM?this._grpM.hasLocalGroup(t)?this._notifyCachedGroupTips(t,e):this._grpM.setUnjoinedAVChatRoom(t):(this._grpM.updateGroupMap([n]),this._notifyCachedGroupTips(t,e)),this._checkCountMap.has(t)||this._checkCountMap.set(t,0)}},{key:"reset",value:function(){this._cachedGroupTipsMap.clear(),this._checkCountMap.clear()}}]),Yi),ui=(a(Wi,[{key:"onCheckTimer",value:function(e){e%1==0&&0<this._cachedGroupMessageMap.size&&this._check()}},{key:"_check",value:function(){var e=this;this._cachedGroupMessageMap.forEach((function(t,n){var o=e._checkCountMap.get(n),i=e._grpM.hasLocalGroup(n);Ae.l("".concat(e._n,"._check groupID:").concat(n," hasLocalGroup:").concat(i," checkCount:").concat(o)),i?(e._notifyCachedGroupMessage(n),e._checkCountMap.delete(n),e._grpM.deleteUnjoinedAVChatRoom(n)):o>=e.MAX_CHECK_COUNT?(e._deleteCachedGroupMessage(n),e._checkCountMap.delete(n)):e._checkCountMap.set(n,++o)}))}},{key:"updateLastMsg",value:function(e){var n="".concat(this._n,".updateLastMsg");if(0!==this._grpM.getGroupMap().size){for(var o,i,a,s,r=!1,c=e.length,u=0;u<c;u++)(o=e[u]).type===E.CONV_GROUP&&0!==o.lastMessage.lastSequence&&null!==o.lastMessage.payload&&(i=o.conversationID.split(/^GROUP/)[1],i=this._grpM.getLocalGroupProfile(i))&&(a=i.lastMessage,s=o.lastMessage,JSON.stringify(a)!==JSON.stringify(s))&&(i.lastMessage=t({},o.lastMessage),r=!0);Ae.l("".concat(n," convCount:").concat(c," groupCount:").concat(this._grpM.getLocalGroupList().length," isUpdated:").concat(r)),r&&(this._grpM.sortLocalGroupList(),this._grpM.emitGroupListUpdate(!0,!1))}else this.tempConversationList=e}},{key:"onNewMessage",value:function(e){var t,n=(t=this._assembly(e)).conversationOptionsList,o=t.messageList;0<(0<(0<(t=t.AVChatRoomMessageList).length&&this._grpM.onAVChatRoomMessage(t),t=mt(o)).length&&this._grpM.emitOEvt(S.MESSAGE_MODIFIED,t),0<n.length&&(this._grpM.get(11).onNewMessage({conversationOptionsList:n,isInstantMessage:!1!==e.isInstantMessage,updateUnreadCount:!1!==e.updateUnreadCount}),this._grpM.updateNextMessageSeq(n)),t=vt(o)).length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t),o.length=0}},{key:"_assembly",value:function(e){var t=e.dataList,n=e.event,o=e.isInstantMessage,i=null,a=[],s=[],r=[],c={},u=this._grpM.getFileDownloadProxy(),l=this._grpM.getDowloadFileAuthKey(),d=this._grpM.get(17).getFileDNList(),p=t.length;1<p&&t.sort((function(e,t){return e.sequence-t.sequence}));for(var h=this._grpM.get(11),f=this._grpM.get(4),g=0;g<p;g++){var _,m=st(t[g]),v=(C=m.groupProfile).groupID,y=void 0===(y=C.communityType)?0:y,I=void 0===(I=C.topicID)?void 0:I,M=C.invisible,C=void 0===(C=C.groupType)?void 0:C,T=void 0,S=this._grpM.isMessageFromTopic(y,I),D=(S&&(T=E.CONV_TOPIC,m.to=I),this._grpM.hasLocalGroup(v));!D&&this._grpM.isUnjoinedAVChatRoom(v)||(D||S?this._grpM.isMessageFromOrToAVChatroom(v)?(m.event=n,r.push(m)):(m.currentUser=this._grpM.getMyUserID(),m.conversationType=E.CONV_GROUP,m.isSystemMessage=!!m.isSystemMessage,(i=new Co(m)).setElement(m.elements,u,l,d),1!==M?(D=1===t[g].isModified,h.isMessageSentByCurrentInstance(i)?i.isModified=D:D=!1,1===m.onlineOnlyFlag?(i._onlineOnlyFlag=!0,h.isMessageSentByCurrentInstance(i)||s.push(i)):this._grpM.isMessageFromCommunityOfTopic(y,I)?s.push(i):(i.from===this._grpM.getMyUserID()&&(S=h.getLatestMessageSentByMe(i.conversationID))&&(M=S.nick,y=S.avatar,M===i.nick&&y===i.avatar||(h.modifyMessageSentByMe({conversationID:_,latestNick:i.nick,latestAvatar:i.avatar}),f.mockOnNickAvatarModified(i.nick,i.avatar))),h.pushIntoMessageList(s,i,D)&&(this._qualityStat(o,i),_=(I=i).conversationID,S=I.sequence,M=h.isRemoteRead({conversationID:_,sequence:S}),ut(c[_])?(y=0,"in"!==i.flow||i._isExcludedFromUnreadCount||M||(y=1),c[_]=a.push({conversationID:_,unreadCount:y,type:ut(T)?i.conversationType:T,subType:i.conversationSubType,lastMessage:i._isExcludedFromLastMessage?"":i})-1):(a[D=c[_]].type=ut(T)?i.conversationType:T,a[D].subType=i.conversationSubType,a[D].lastMessage=i._isExcludedFromLastMessage?"":i,"in"!==i.flow||i._isExcludedFromUnreadCount||M||a[D].unreadCount++)))):this._qualityStat(o,i)):this._cacheAndCompare({groupID:v,event:n,item:m,groupType:C}))}return{conversationOptionsList:a,messageList:s,AVChatRoomMessageList:r}}},{key:"_qualityStat",value:function(e,t){var n=this._grpM.get(26);n.addMessageSequence({key:jn,message:t}),e&&0<t.clientTime&&n.addMessageDelay(t.clientTime)}},{key:"onMsgRevoked",value:function(e,t){var n=this,o=this._grpM.get(11),i=[],a=[];e.dataList.forEach((function(e){var t=e.elements.revokedInfos,n=e.revokerInfo,s=e.groupProfile,r=!1;s&&(r=It({groupID:s.groupID})||!Ve(s.topicID)),ut(t)||t.forEach((function(e){var t,c=Ve(e.topicID)?"GROUP".concat(e.groupID):"GROUP".concat(e.topicID),u=o.getLocalConversation(c),l=e.revokerInfo&&e.revokerInfo.revoker||n&&n.revoker,d=n&&n.reason||"";u&&yt(u.type)?t={conversationID:c,sequence:e.sequence,ID:"".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random)}:(u=o.revoke(c,e.sequence,e.random))?t=u:(t={conversationID:c,sequence:e.sequence},e.tinyID&&e.clientTime&&e.random&&(t.ID="".concat(e.tinyID,"-").concat(e.clientTime,"-").concat(e.random)),e.time&&(t.time=e.time)),t&&(t.revoker=l,t.revokeReason=d,t.revokerInfo={userID:l,nick:"",avatar:""},(r?(t.revokerInfo.nick=s.nick,t.revokerInfo.avatar=s.avatar,i):a).push(t))}))})),0===a.length&&0===i.length||(o.onMessageRevoked([].concat(i,a),t),0<i.length&&this._grpM.emitOEvt(S.MESSAGE_REVOKED,i),0<a.length&&o.updateRevokerInfo(a).then((function(e){n._grpM.emitOEvt(S.MESSAGE_REVOKED,e)})))}},{key:"_groupListTreeShaking",value:function(e){for(var t=new Map(m(this._grpM.getGroupMap())),n=0,o=e.length;n<o;n++)t.delete(e[n].groupID);this._grpM.hasJoinedAVChatRoom()&&this._grpM.getJoinedAVChatRoom().forEach((function(e){t.delete(e)})),this._grpM.getGroupMap().forEach((function(e,n){e.isSupportTopic&&t.delete(n)}));for(var i=m(t.keys()),a=0,s=i.length;a<s;a++)this._grpM.deleteGroup(i[a])}},{key:"syncGroupList",value:function(){var e,t,n=this,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0],i=(this._pagingStatus===Sn&&this._grpM.clearGroupMap(),m(U)),a=this.PAGING_GRP_COUNT_LIMIT,s=[];return!0===o?this._pagingGetGroupListWithTopic({limit:a,offset:0,groupBaseInfoFilter:i,groupList:s}):(o="syncGroupList",e="".concat(this._n,".").concat(o),t=new Jn(o),this._pagingGetGroupList({limit:a,offset:0,groupBaseInfoFilter:i,groupList:s}).then((function(){var o=Ht(n._pagingGetCostList),i=Bt(n._pagingGetCostList),a=(n._pagingGetCostList.length=0,n._pagingStatus=Dn,n._groupListTreeShaking(s),n._grpM.updateGroupMap(s),n._grpM.getLocalGroupList().length);return a="count:".concat(a," sum:").concat(i," avg:").concat(o),Ae.l("".concat(e," ok. ").concat(a)),t.setMessage(a).end(),n.tempConversationList&&(n.updateLastMsg(n.tempConversationList),n.tempConversationList=null),n._grpM.emitGroupListUpdate(!0,!0),mn({groupList:n._grpM.getLocalGroupList()})})).catch((function(o){return n._pagingStatus=kn,t.setError(o).end(),Ae.e("".concat(e," failed. error:"),o),yn(o)})))}},{key:"getGroupList",value:function(){var e,t=this,n="".concat(this._n,".").concat("getGroupList");return Ae.l("".concat(n," pagingStatus:").concat(this._pagingStatus)),this._pagingStatus===kn||this._pagingStatus===Sn?this.syncGroupList().then((function(){return mn({groupList:t._grpM.getLocalGroupList(),isSyncCompleted:t.isPagingGetCompleted()})})).catch((function(e){return Ae.e("".concat(n," failed. error:"),e),yn(e)})):(e=this._grpM.getLocalGroupList(),Ae.l("".concat(n,". returned group count:").concat(e.length)),vn({groupList:e,isSyncCompleted:this.isPagingGetCompleted()}))}},{key:"isPagingGetCompleted",value:function(){return this._pagingStatus===Dn}},{key:"_pagingGetGroupList",value:function(e){var t=this,n="".concat(this._n,".").concat("_pagingGetGroupList"),o=e.isCommunityRelay,i=void 0!==o&&o,a=e.limit,s=e.offset,r=e.groupBaseInfoFilter,c=e.groupList,u=Date.now();return this._grpM.req({P:Gn.GET_GRP_LIST,data:{type:i?E.GRP_COMMUNITY:void 0,memberAccount:this._grpM.getMyUserID(),limit:a,offset:s,responseFilter:{groupBaseInfoFilter:r,selfInfoFilter:["Role","JoinTime","MsgFlag","MsgSeq"]}}}).then((function(e){var o=void 0===(o=(e=e.data).groups)?[]:o,l=(e=e.totalCount,c.push.apply(c,m(o)),t._handleGroupAtInfoWithoutTopic(i,o),!((o=s+a)<e));return e="offset:".concat(s," limit:").concat(a," total:").concat(e," isCompleted:").concat(l," ")+"current:".concat(c.length," isCommunityRelay:").concat(i),t._pagingGetCostList.push(jt(u,!1)),Ae.l("".concat(n," ok. ").concat(e," cost:").concat(jt(u))),i||l?!i&&l?(Ae.l("".concat(n," start to get community list")),s=0,t._pagingGetGroupList({limit:a,offset:s,groupBaseInfoFilter:r,groupList:c,isCommunityRelay:!0})):i&&!l?(s=o,t._pagingGetGroupList({limit:a,offset:s,groupBaseInfoFilter:r,groupList:c,isCommunityRelay:!0})):mn({groupList:c}):(s=o,t._pagingGetGroupList({limit:a,offset:s,groupBaseInfoFilter:r,groupList:c}))})).catch((function(e){return 10018===e.code?(Ae.w("".concat(t.logPrefix," response size exceeds the limit, request count:").concat(a)),a=50,t._pagingGetGroupList({limit:a,offset:s,groupBaseInfoFilter:r,groupList:c,isCommunityRelay:i})):i?(11e3===e.code&&Ae.l("".concat(n," ok. community unavailable")),vn({groupList:c})):yn(e)}))}},{key:"_pagingGetGroupListWithTopic",value:function(e){var t=this,n="".concat(this._n,"._pagingGetGroupListWithTopic"),o=e.limit,i=e.offset,a=e.groupBaseInfoFilter,s=e.groupList,r=Date.now();return this._grpM.req({P:Gn.GET_GRP_LIST,data:{type:E.GRP_COMMUNITY,memberAccount:this._grpM.getMyUserID(),limit:o,offset:i,responseFilter:{groupBaseInfoFilter:a,selfInfoFilter:m(x)},isSupportTopic:1,needAppDefineData:1}}).then((function(e){var c=(e=e.data).groups,u=(e=e.totalCount,s.push.apply(s,m(void 0===c?[]:c)),!((c=i+o)<e));return Ae.l("".concat(n," ok. offset:").concat(i," limit:").concat(o," totalCount:").concat(e," isCompleted:").concat(u," currentCount:").concat(s.length," cost:").concat(jt(r))),u?(t._grpM.updateGroupMap(s),t._grpM.emitGroupListUpdate(!0,!1),mn({groupList:e=t._grpM.getLocalGroupList().filter((function(e){return!0===e.isSupportTopic}))})):(i=c,t._pagingGetGroupListWithTopic({limit:o,offset:i,groupBaseInfoFilter:a,groupList:s}))})).catch((function(e){return 10018===e.code?(Ae.w("".concat(t.logPrefix," response size exceeds the limit, request count:").concat(o)),o=50,t._pagingGetGroupListWithTopic({limit:o,offset:i,groupBaseInfoFilter:a,groupList:s})):yn(e)}))}},{key:"_cacheGroupMessage",value:function(e,t){this._cachedGroupMessageMap.has(e)||this._cachedGroupMessageMap.set(e,[]),this._cachedGroupMessageMap.get(e).push(t)}},{key:"_deleteCachedGroupMessage",value:function(e){this._cachedGroupMessageMap.has(e)&&this._cachedGroupMessageMap.delete(e)}},{key:"_notifyCachedGroupMessage",value:function(e,t){var n=this,o=this._cachedGroupMessageMap.get(e)||[];Ae.l("".concat(this._n,"._notifyCachedGroupMessage groupID:").concat(e," groupType:").concat(t," count:").concat(o.length)),o.forEach((function(e){n.onNewMessage(e)})),this._deleteCachedGroupMessage(e)}},{key:"_cacheAndCompare",value:function(e){var t=e.groupID,n=e.event,o=e.item;e=e.groupType,Ae.l("".concat(this._n,"._cacheAndCompare groupID:").concat(t," groupType:").concat(e)),this._cacheGroupMessage(t,{event:n,dataList:[o]}),n={groupID:t,type:e},e===E.GRP_AVCHATROOM?this._grpM.hasLocalGroup(t)?this._notifyCachedGroupMessage(t,e):this._grpM.setUnjoinedAVChatRoom(t):(this._grpM.updateGroupMap([n]),this._notifyCachedGroupMessage(t,e)),this._checkCountMap.has(t)||this._checkCountMap.set(t,0)}},{key:"_handleGroupAtInfoWithoutTopic",value:function(e,n){var o=this;e&&0!==n.length&&n.forEach((function(e){var n=e.groupID,i=(e=e.groupAtInfoList,[]);ut(e)||(e.forEach((function(e){i.push(t(t({},e),{},{groupID:n}))})),o._grpM.get(11).onNewGroupAtTips({dataList:i}))}))}},{key:"setPagingGroupCount",value:function(e){ut(e)||(this.PAGING_GRP_COUNT_LIMIT=parseInt(e,10))}},{key:"reset",value:function(){this.PAGING_GRP_COUNT_LIMIT=200,this._cachedGroupMessageMap.clear(),this._checkCountMap.clear(),this._pagingStatus=Sn,this._pagingGetCostList=[]}}]),Wi),li=(a(zi,[{key:"_onCloudConfig",value:function(){var e=this._grpM.getCloudConfig("grp_attr_cache_time");ut(e)||(this.CACHE_EXPIRE_TIME=Number(e))}},{key:"updateLocalMainSequenceOnReconnected",value:function(){this._groupAttributesMap.forEach((function(e){e.localMainSequence=0}))}},{key:"isGroupAttributesUpdatedNotice",value:function(e){var t=e.to,n=(e=e.elements.newGroupProfile,!ut(e)&&!Ve(e.groupAttributeOption));return n&&this._onGroupAttributesUpdated({groupID:t,groupAttributeOption:e.groupAttributeOption}),n}},{key:"_onGroupAttributesUpdated",value:function(e){var t,n=this,o=e.groupID,i=(e=e.groupAttributeOption).mainSequence,a=e.isWithChangedAttributeInfo,s=void 0===(s=e.groupAttributeList)?[]:s;e=e.operationType,Ae.l("".concat(this._n,".onGroupAttributesUpdated. ")+"groupID:".concat(o," isWithChangedAttributeInfo:").concat(a," operationType:").concat(e)),ut(e)||(this._groupAttributesCopy=this._getCachedAttributes({groupID:o}),0!=(t=i-this._getLocalGroupAttributes(o).localMainSequence)&&(1===a&&1==t?(this._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:i,groupAttributeList:s,operationType:e}),this._emitGroupAttributesUpdated(o)):this._hasLocalGroupAttributes(o)&&(a=this._getLocalGroupAttributes(o).avChatRoomKey,this._getGroupAttributes({groupID:o,avChatRoomKey:a}).then((function(){n._emitGroupAttributesUpdated(o)})))))}},{key:"initGroupAttributesCache",value:function(e){var t=e.groupID;e=void 0===(e=e.avChatRoomKey)?void 0:e,this._groupAttributesMap.set(t,{lastUpdateTime:0,localMainSequence:0,remoteMainSequence:0,attributes:new Map,avChatRoomKey:e}),Ae.l("".concat(this._n,".initGroupAttributesCache groupID:").concat(t," avChatRoomKey:").concat(e))}},{key:"initGroupAttributes",value:function(e){var t=this,n=e.groupID,o=e.groupAttributes,i=(e=this._getLocalGroupAttributes(n)).remoteMainSequence,a=(e=e.avChatRoomKey,new Jn("initGroupAttributes"));return a.setMessage("groupID:".concat(n," avChatRoomKey:").concat(e," mainSequence:").concat(i)),this._grpM.req({P:Gn.SET_GRP_ATTR,data:{groupID:n,avChatRoomKey:e,mainSequence:i,groupAttributeList:this._transformGroupAttributes(o)}}).then((function(e){Ae.l("".concat(t._n,".").concat("initGroupAttributes"," ok. groupID:").concat(n));var i=(e=e.data).mainSequence;return(e=m(e.groupAttributeList)).forEach((function(e){e.value=o[e.key]})),t._groupAttributesCopy=t._getCachedAttributes({groupID:n}),t._refreshCachedGroupAttributes({groupID:n,remoteMainSequence:i,groupAttributeList:e,operationType:1}),t._emitGroupAttributesUpdated(n),a.end(),mn({groupAttributes:o})})).catch((function(e){return a.setError(e).end(),yn(e)}))}},{key:"setGroupAttributes",value:function(e){var t=this,n="".concat(this._n,".").concat("setGroupAttributes"),o=e.groupID,i=e.groupAttributes,a=(e=this._getLocalGroupAttributes(o)).remoteMainSequence,s=e.avChatRoomKey,r=e.attributes,c=((e=this._transformGroupAttributes(i)).forEach((function(e){var t=e.key;e.sequence=0,r.has(t)&&(e.sequence=r.get(t).sequence)})),new Jn("setGroupAttributes"));return c.setMessage("groupID:".concat(o," groupAttributes:").concat(JSON.stringify(i))),Ae.l("".concat(n,". groupID:").concat(o," mainSequence:").concat(a)),this._grpM.req({P:Gn.MODIFY_GRP_ATTR,data:{groupID:o,avChatRoomKey:s,mainSequence:a,groupAttributeList:e}}).then((function(e){Ae.l("".concat(n," ok."));var a=(e=e.data).mainSequence;return(e=m(e.groupAttributeList)).forEach((function(e){e.value=i[e.key]})),t._groupAttributesCopy=t._getCachedAttributes({groupID:o}),t._refreshCachedGroupAttributes({groupID:o,remoteMainSequence:a,groupAttributeList:e,operationType:2}),t._emitGroupAttributesUpdated(o),c.end(),mn({groupAttributes:i})})).catch((function(e){return c.setError(e).end(),yn(e)}))}},{key:"deleteGroupAttributes",value:function(e){var t=this,n=e.groupID,o=(e=void 0===(e=e.keyList)?[]:e,(r=this._getLocalGroupAttributes(n)).remoteMainSequence),i=r.avChatRoomKey,a=r.attributes,s=m(a.keys()),r=Gn.CLEAR_GRP_ATTR,c=3,u=(i={groupID:n,avChatRoomKey:i,mainSequence:o},[]),l=(0<e.length&&(s=[],r=Gn.DEL_GRP_ATTR,c=4,e.forEach((function(e){var t=0;a.has(e)&&(t=a.get(e).sequence,s.push(e)),u.push({key:e,sequence:t})})),i.groupAttributeList=u),new Jn("deleteGroupAttributes"));return l.setMessage("groupID:".concat(n," mainSequence:").concat(o," keyList:").concat(e," proto:").concat(r)),this._grpM.req({P:r,data:i}).then((function(e){return Ae.l("".concat(t._n,".").concat("deleteGroupAttributes"," ok. groupID:").concat(n)),e=e.data.mainSequence,t._groupAttributesCopy=t._getCachedAttributes({groupID:n}),t._refreshCachedGroupAttributes({groupID:n,remoteMainSequence:e,groupAttributeList:u,operationType:c}),t._emitGroupAttributesUpdated(n),l.end(),mn({keyList:s})})).catch((function(e){return l.setError(e).end(),yn(e)}))}},{key:"getGroupAttributes",value:function(e){var t=this,n="".concat(this._n,".").concat("getGroupAttributes"),o=e.groupID,i=(r=this._getLocalGroupAttributes(o)).avChatRoomKey,a=r.lastUpdateTime,s=r.localMainSequence,r=r.remoteMainSequence,c=new Jn("getGroupAttributes");return c.setMessage("groupID:".concat(o," localMainSequence:").concat(s," remoteMainSequence:").concat(r," keyList:").concat(e.keyList)),Date.now()-a>=this.CACHE_EXPIRE_TIME||s<r?this._getGroupAttributes({groupID:o,avChatRoomKey:i}).then((function(i){return c.setMoreMessage("get attributes from remote. count:".concat(i.length)).end(),Ae.l("".concat(n," from remote. groupID:").concat(o)),mn({groupAttributes:i=t._getCachedAttributes(e)})})).catch((function(e){return c.setError(e).end(),yn(e)})):(c.setMoreMessage("get attributes from cache").end(),Ae.l("".concat(n," from cache. groupID:").concat(o)),vn({groupAttributes:a=this._getCachedAttributes(e)}))}},{key:"_getGroupAttributes",value:function(e){var n=this,o=0;return ut(e.avChatRoomKey)||(o=1),this._grpM.req({P:Gn.GET_GRP_ATTR,data:t(t({},e),{},{groupType:o})}).then((function(t){Ae.l("".concat(n._n,"._getGroupAttributes ok. groupID:").concat(e.groupID));var o=(t=t.data).mainSequence,i=m(t=t.groupAttributeList);return ut(o)||n._refreshCachedGroupAttributes({groupID:e.groupID,remoteMainSequence:o,groupAttributeList:i,operationType:5}),t})).catch((function(e){return yn(e)}))}},{key:"_refreshCachedGroupAttributes",value:function(e){var t=e.groupID,n=e.remoteMainSequence,o=e.groupAttributeList;if(e=e.operationType,this._hasLocalGroupAttributes(t)){var i=this._getLocalGroupAttributes(t),a=i.localMainSequence;if(5===e||n-a==1)i.remoteMainSequence=n,i.localMainSequence=n,i.lastUpdateTime=Date.now(),this._updateCachedAttributes({groupAttributes:i,groupAttributeList:o,operationType:e});else{if(a===n)return;i.remoteMainSequence=n}this._groupAttributesMap.set(t,i),o="operationType:".concat(e," localMainSequence:").concat(a," remoteMainSequence:").concat(n),Ae.l("".concat(this._n,"._refreshCachedGroupAttributes. ").concat(o))}}},{key:"_getCachedAttributes",value:function(e){var t=e.groupID,n=(e=void 0===(e=e.keyList)?[]:e,{});if(this._hasLocalGroupAttributes(t)){var o=this._getLocalGroupAttributes(t).attributes;if(0<e.length)e.forEach((function(e){o.has(e)&&(n[e]=o.get(e).value)}));else{var i,a=T(o.keys());try{for(a.s();!(i=a.n()).done;){var s=i.value;n[s]=o.get(s).value}}catch(r){a.e(r)}finally{a.f()}}}return n}},{key:"_updateCachedAttributes",value:function(e){var t=e.groupAttributes,n=e.groupAttributeList;3!==(e=e.operationType)?4!==e?(1===e&&t.attributes.clear(),n.forEach((function(e){var n=e.key,o=e.value;e=e.sequence,t.attributes.set(n,{value:o,sequence:e})}))):n.forEach((function(e){t.attributes.delete(e.key)})):t.attributes.clear()}},{key:"_hasLocalGroupAttributes",value:function(e){return this._groupAttributesMap.has(e)}},{key:"_getLocalGroupAttributes",value:function(e){return this._hasLocalGroupAttributes(e)||this.initGroupAttributesCache({groupID:e}),this._groupAttributesMap.get(e)}},{key:"_transformGroupAttributes",value:function(e){var t=[];return Object.keys(e).forEach((function(n){t.push({key:n,value:e[n]})})),t}},{key:"_emitGroupAttributesUpdated",value:function(e){var t=this._getCachedAttributes({groupID:e}),n=(o=this._computeAttrChangedInfo(t)).updatedKeyList,o=o.deletedKeyList;Ae.l("".concat(this._n,"._emitGroupAttributesUpdated update:").concat(n.length,", delete:").concat(o.length)),0===n.length&&0===o.length||this._grpM.emitOEvt(S.GROUP_ATTRIBUTES_UPDATED,{groupID:e,groupAttributes:t,updatedKeyList:n,deletedKeyList:o})}},{key:"_computeAttrChangedInfo",value:function(e){var t=this,n=[],o=[];return Object.keys(e).forEach((function(o){e[o]!==t._groupAttributesCopy[o]&&n.push(o)})),Object.keys(this._groupAttributesCopy).forEach((function(t){ut(e[t])&&o.push(t)})),this._groupAttributesCopy={},{updatedKeyList:n,deletedKeyList:o}}},{key:"deleteLocalGroupAttributes",value:function(e){this._hasLocalGroupAttributes(e)&&this._groupAttributesMap.delete(e)}},{key:"reset",value:function(){this._groupAttributesMap.clear(),this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4}}]),zi),di=(a($i,[{key:"_onCloudConfig",value:function(){var e=this._grpM.getCloudConfig("grp_counter_expire_time");ut(e)||(this.EXPIRE_TIME=Number(e))}},{key:"isGroupCountersNotice",value:function(e){var t=e.to,n=!1;return Ve(e=e.elements.groupCounterInfo)||(this._onGroupCountersUpdated({groupID:t,groupCounterInfo:e}),n=!0),n}},{key:"_onGroupCountersUpdated",value:function(e){var t=this,n=e.groupID;e.groupCounterInfo.forEach((function(e){var o=e.type,i=e.groupCounterSeq;e=void 0===(e=e.counterList)?[]:e,0!==o&&2!==o||(t._updateLocalGroupCounters({groupID:n,groupCounterSeq:i,counterList:e}),e.forEach((function(e){t._grpM.emitOEvt(S.GROUP_COUNTER_UPDATED,{groupID:n,key:e.key,value:e.value})}))),1===o&&t._deleteLocalGroupCounters({groupID:n,groupCounterSeq:i,counterList:e})})),Ae.l("".concat(this._n,"._onGroupCountersUpdated groupID:").concat(n))}},{key:"initGroupCountersCache",value:function(e){var t=e.groupID;e=e.avChatRoomKey,this._groupCountersMap.set(t,{lastUpdateTime:0,groupCounterSeq:0,counters:new Map,avChatRoomKey:e}),Ae.l("".concat(this._n,".initGroupCountersCache groupID:").concat(t," avChatRoomKey:").concat(e))}},{key:"setGroupCounters",value:function(e){var t,n,o,i,a;return this._grpM.canIUse(N.GRP_COUNTER)?(t="".concat(this._n,".").concat("setGroupCounters"),n=e.groupID,e=e.counters,e=this._convertObjectToList(e),o=this._getLocalGroupCounters(n).avChatRoomKey,i="groupID:".concat(n," count:").concat(e.length),(a=new Jn("setGroupCounters")).setMessage("".concat(i)),Ae.l("".concat(t,". ").concat(i)),this._updateGroupCounters({groupID:n,counterList:e,avChatRoomKey:o,mode:"Set"}).then((function(e){return a.end(),Ae.l("".concat(t," ok.")),mn({counters:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._grpM.noUse("setGroupCounters")}},{key:"increaseGroupCounter",value:function(e){var t,n,o,i,a,s,r="increaseGroupCounter";return this._grpM.canIUse(N.GRP_COUNTER)?(t="".concat(this._n,".").concat(r),n=e.groupID,o=e.key,e=e.value,i=this._getLocalGroupCounters(n).avChatRoomKey,a="groupID:".concat(n," key:").concat(o," value:").concat(e),(s=new Jn(r)).setMessage("".concat(a)),Ae.l("".concat(t,". ").concat(a)),this._updateGroupCounters({groupID:n,counterList:[{key:o,value:e}],avChatRoomKey:i,mode:"Increase"}).then((function(e){return s.end(),Ae.l("".concat(t," ok.")),mn({counters:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._grpM.noUse(r)}},{key:"decreaseGroupCounter",value:function(e){var t,n,o,i,a,s,r="decreaseGroupCounter";return this._grpM.canIUse(N.GRP_COUNTER)?(t="".concat(this._n,".").concat(r),n=e.groupID,o=e.key,e=e.value,i=this._getLocalGroupCounters(n).avChatRoomKey,a="groupID:".concat(n," key:").concat(o," value:").concat(e),(s=new Jn(r)).setMessage("".concat(a)),Ae.l("".concat(t,". ").concat(a)),this._updateGroupCounters({groupID:n,counterList:[{key:o,value:e}],avChatRoomKey:i,mode:"Decrease"}).then((function(e){return s.end(),Ae.l("".concat(t," ok.")),mn({counters:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._grpM.noUse(r)}},{key:"getGroupCounters",value:function(e){var t=this;if(!this._grpM.canIUse(N.GRP_COUNTER))return this._grpM.noUse("getGroupCounters");var n="".concat(this._n,".").concat("getGroupCounters"),o=e.groupID,i=void 0===(e=e.keyList)?[]:e,a=(e=this._getLocalGroupCounters(o)).avChatRoomKey,s=(e=e.lastUpdateTime,new Jn("getGroupCounters"));return s.setMessage("groupID:".concat(o)),Date.now()-e>=this.EXPIRE_TIME?this._getRemoteGroupCounters({groupID:o,avChatRoomKey:a}).then((function(e){return s.setMoreMessage("from remote. count:".concat(e.length)).end(),Ae.l("".concat(n," from remote. groupID:").concat(o)),mn({counters:e=t._getLocalCounters(o,i)})})).catch((function(e){return s.setError(e).end(),yn(e)})):(s.setMoreMessage("from cache").end(),Ae.l("".concat(n," from cache. groupID:").concat(o)),vn({counters:e=this._getLocalCounters(o,i)}))}},{key:"_getRemoteGroupCounters",value:function(e){var n=this;return this._grpM.req({P:Gn.GET_GRP_COUNTER,data:t({},e)}).then((function(t){var o=void 0===(o=(t=t.data).counterList)?[]:o;return t=t.groupCounterSeq,n._updateLocalGroupCounters({groupID:e.groupID,counterList:o,groupCounterSeq:t}),Ae.l("".concat(n._n,"._getRemoteGroupCounters ok. groupID:").concat(e.groupID)),o})).catch((function(e){return yn(e)}))}},{key:"_convertObjectToList",value:function(e){var t=[];return Object.keys(e).forEach((function(n){t.push({key:n,value:e[n]})})),t}},{key:"_updateGroupCounters",value:function(e){var n="".concat(this._n,"._updateGroupCounters"),o=e.groupID,i=e.avChatRoomKey,a=e.mode;return Ae.l("".concat(n,". groupID:").concat(o," avChatRoomKey:").concat(i," mode:").concat(a)),this._grpM.req({P:Gn.UPDATE_GRP_COUNTER,data:t({},e)}).then((function(e){Ae.l("".concat(n," ok.")),e=e.data.counterList;var t={};return(void 0===e?[]:e).forEach((function(e){var n=e.key;e=e.value,t[n]=e})),t})).catch((function(e){return yn(e)}))}},{key:"_hasLocalGroupCounters",value:function(e){return this._groupCountersMap.has(e)}},{key:"_getLocalGroupCounters",value:function(e){return this._hasLocalGroupCounters(e)||this.initGroupCountersCache({groupID:e}),this._groupCountersMap.get(e)}},{key:"_updateLocalGroupCounters",value:function(e){var t,n,o,i=e.groupID,a=void 0===(a=e.counterList)?[]:a;e=e.groupCounterSeq,this._hasLocalGroupCounters(i)&&(o=this._getLocalGroupCounters(i),t=o.counters,n=o.avChatRoomKey,o=o.groupCounterSeq,0<e&&e<o||(a.forEach((function(e){var n=e.key;e=e.value,t.set(n,e)})),this._groupCountersMap.set(i,{lastUpdateTime:Date.now(),groupCounterSeq:e,counters:t,avChatRoomKey:n})))}},{key:"_deleteLocalGroupCounters",value:function(e){var t,n,o=e.groupID,i=void 0===(i=e.counterList)?[]:i;e=e.groupCounterSeq,this._hasLocalGroupCounters(o)&&(n=this._getLocalGroupCounters(o),t=n.counters,n=n.avChatRoomKey,i.forEach((function(e){t.delete(e.key)})),this._groupCountersMap.set(o,{lastUpdateTime:Date.now(),groupCounterSeq:e,counters:t,avChatRoomKey:n}))}},{key:"_getLocalCounters",value:function(e,t){var n={};if(this._hasLocalGroupCounters(e)){var o=this._getLocalGroupCounters(e).counters;if(0<t.length)t.forEach((function(e){o.has(e)&&(n[e]=o.get(e))}));else{var i,a=T(o.keys());try{for(a.s();!(i=a.n()).done;){var s=i.value;n[s]=o.get(s)}}catch(r){a.e(r)}finally{a.f()}}}return n}},{key:"reset",value:function(){this._groupCountersMap.clear(),this.EXPIRE_TIME=3e4}}]),$i),pi=(a(Ki,[{key:"start",value:function(){var e=this._grpM.isLoggedIn();e||(this._proto=Gn.AV_NOAUTH_POLLING),Ae.l("".concat(this._n,".start pollingInterval:").concat(this._manager.getPollingInterval()," isLoggedIn:").concat(e)),this._isRunning=!0,this._request()}},{key:"isRunning",value:function(){return this._isRunning}},{key:"_request",value:function(){var e=this,t=this._onInit(this._groupID);this._grpM.req({P:this._proto,data:t}).then((function(t){e._onSuccess(e._groupID,t),e.isRunning()&&(clearTimeout(e._timeoutID),e._timeoutID=setTimeout(e._request.bind(e),e._manager.getPollingInterval()))})).catch((function(t){e._onFail(e._groupID,t),e.isRunning()&&(clearTimeout(e._timeoutID),e._timeoutID=setTimeout(e._request.bind(e),e._manager.MAX_POLLING_INTERVAL))}))}},{key:"stop",value:function(){Ae.l("".concat(this._n,".stop")),0<this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=-1),this._isRunning=!1}},{key:"getPollingTimerID",value:function(){return this._timeoutID}}]),Ki),hi={3:!0,4:!0,5:!0,6:!0,17:!0,20:!0,21:!0,100:!0},fi=(a(ji,[{key:"hasJoinedAVChatRoom",value:function(){var e=[];return 0<(e=0<this._joinedGroupMap.size?m(this._joinedGroupMap.values()).filter((function(e){return e.type===E.GRP_AVCHATROOM})):e).length}},{key:"getJoinedLiveList",value:function(){var e=[];return 0<this._joinedGroupMap.size?m(this._joinedGroupMap.values()).filter((function(e){return e.type===E.GRP_LIVE})):e}},{key:"checkJoinedAVChatRoomByID",value:function(e){return this._joinedGroupMap.has(e)}},{key:"getJoinedAVChatRoom",value:function(){return 0<this._joinedGroupMap.size?m(this._joinedGroupMap.keys()):[]}},{key:"_updatedata",value:function(e){var n=this._pollingRequestInfoMap.get(e);return e===m(this._pollingInstanceMap.keys())[0]?t(t({},n),{},{startBroadcastSeq:this._startBroadcastSeq,simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG}):t(t({},n),{},{simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG})}},{key:"_handleSuccess",value:function(e,t){var n,o=(c=t.data).key,i=c.nextSeq,a=c.rspMsgList,s=c.errorCode,r=c.nextBroadcastSeq,c=c.broadcastMessageList;0!==s?(s=this._pollingRequestInfoMap.get(e),n=new Jn("longPollingAVError"),s=s?"".concat(s.key,"-").concat(s.startSeq):"requestInfo is undefined",n.setMessage("".concat(e,"-").concat(s,"-").concat(t.errorInfo)).setCode(t.errorCode).end(!0)):this.checkJoinedAVChatRoomByID(e)&&(ct(o)&&Ke(i)&&this._pollingRequestInfoMap.set(e,{key:o,startSeq:i}),Ke(r)&&r>this._startBroadcastSeq&&(this._startBroadcastSeq=r),We(a)&&0<a.length?(a.forEach((function(e){e.to=e.groupID})),this.onMessage(a,e)):(this._pollingNoMessageCount+=1,this._pollingNoMessageCount===this.DEFAULT_POLLING_NO_MESSAGE_COUNT&&(this._pollingInterval=this.DEFAULT_POLLING_INTERVAL+this.DEFAULT_POLLING_INTERVAL_PLUS)),this._onBroadcastMessage(c))}},{key:"_handleFailure",value:function(e,t){}},{key:"onMessage",value:function(e,t){if(We(e)&&0!==e.length){var n="".concat(this._n,".onMessage"),o=(t&&(n+=" groupID:".concat(t)),0!==this._pollingNoMessageCount&&(this._pollingNoMessageCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL),null),i=[],a=this._get(11),s=this._get(26),r=e.length,c=(1<r&&e.sort((function(e,t){return e.sequence-t.sequence})),this._get(12).isUnlimitedAVChatRoom()),u=!1;Ae.getLevel()<=0&&(t=e.map((function(e){return e.sequence})),Ae.l("".concat(n," count:").concat(t.length," sequenceList:").concat(t)),t.length=0);for(var l=0;l<r;l++){var d=this.restoreMessageFromSimplified(e[l]);if(hi[d.event]){if(6===d.event){if(this._grpM.isGroupAttributesUpdatedNotice(d))continue;if(this._grpM.isGroupCountersNotice(d))continue}if(20!==d.event)if(21!==d.event)if(100!==d.event){o=this.packMessage(d,d.event);var p=1===d.isModified;if(u=1===d.isHistoryMessage,!c){if(this._seqSll.has(o.sequence))continue;this._seqSll.set(o.sequence)}var h=this._IDSll.has(o.ID);h?Ae.w("".concat(n," ID:").concat(o.ID," has:").concat(h)):(this._IDSll.set(o.ID),h=!1,!u&&this._isMessageSentByCurrentInstance(o)?p&&(h=!0,o.isModified=p,a.updateMsgIsModifiedProp(o)):h=!0,h&&(o.conversationType===E.CONV_SYSTEM&&5===o.payload.operationType&&this._onGroupDismissed(o.payload.groupProfile.groupID),u||o.conversationType===E.CONV_SYSTEM||(p=o.conversationID.replace(E.CONV_GROUP,""),this._pollingInstanceMap.has(p)?this._grpM.isLoggedIn()&&s.addMessageSequence({key:$n,message:o}):(o.type!==E.MSG_GRP_TIP&&0<o.clientTime&&s.addMessageDelay(o.clientTime),s.addMessageSequence({key:Kn,message:o}))),i.push(o)))}else this.onRoomCustomData(d);else this._get(34).onMessageReactionNotify({event:21,dataList:d.elements.messageReactionNotifyList});else this.handleMessageRevokedNotice(d)}else Ae.w("".concat(n,". unknown event:").concat(d.event))}0!==i.length&&(0<(t=mt(i)).length&&this._grpM.emitOEvt(S.MESSAGE_MODIFIED,t),u||0<(t=this.packConversationOption(i)).length&&a.onNewMessage({conversationOptionsList:t,isInstantMessage:!0}),this._checkMessageStacked(i),0<(t=vt(i)).length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t),i.length=0)}}},{key:"handleMessageRevokedNotice",value:function(e){var t=this,n=e.groupID,o=e.elements.revokeMsgList,i=e.revokerInfo,a=[];o.forEach((function(e){var t=e.tinyID,o=e.clientTime,s=e.random;e=e.sequence,t={conversationID:"".concat(E.CONV_GROUP).concat(n),ID:"".concat(t,"-").concat(o,"-").concat(s),revoker:i.revoker,revokeReason:i.reason||"",revokerInfo:{userID:i.revoker,nick:"",avatar:""},sequence:e},a.push(t)})),0!==a.length&&this._get(11).updateRevokerInfo(a).then((function(e){t._grpM.emitOEvt(S.MESSAGE_REVOKED,e)}))}},{key:"isBroadcastOrNormal",value:function(e){return 3===e||17===e}},{key:"isGroupTip",value:function(e){return 4===e||6===e}},{key:"isGroupSystemNotice",value:function(e){return 5===e}},{key:"restoreGroupTipElements",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=void 0===(t=e.operatorInfo)?{}:t,n=e.operatorID,o=void 0===(o=e.userIDList)?[]:o,i=e.operationType,a=(Ke(e.groupJoinType)||1!==i&&2!==i||(e.groupJoinType=2===i?0:1),i=t.userID,t.avatar);return t=t.nick,e.operatorInfo={userID:void 0===i?n:i,avatar:void 0===a?"":a,nick:void 0===t?"":t},n=o.map((function(e){return{userID:e}})),e.memberInfoList=e.memberInfoList||n,e}},{key:"restoreMessageFromSimplified",value:function(e){var n,o,i,a=e.event;return this.isBroadcastOrNormal(a)&&(e.cloudCustomData=e.cloudCustomData||"",e.elements=e.elements.map((function(e){var n;return e.type===E.MSG_CUSTOM&&(n=e.content,e.content=t({data:"",description:"",extension:""},void 0===n?{}:n)),e}))),(this.isGroupTip(a)||this.isGroupSystemNotice(a))&&(e.from=e.from||"@TIM#SYSTEM"),this.isGroupTip(a)&&(e.elements=this.restoreGroupTipElements(e.elements),o=(i=void 0===(i=e.elements)?{}:i).operationType,n=i.operatorInfo,1===o)&&(o=[{userID:(void 0===n?{}:n).userID}],i.memberInfoList=i.memberInfoList||o),this.isGroupSystemNotice(a)&&(i=(n=e.elements).memberInfoList,o=n.operatorInfo,e.elements.memberInfoList=t({userID:e.elements.operatorID,avatar:"",nick:""},i=i||(void 0===o?{}:o)),e.elements=t({authentication:"",remarkInfo:"",messageKey:1e3*e.time},e.elements),a=Object.keys(e.elements).filter((function(e){return"operatorInfo"!==e})).reduce((function(n,o){return t(t({},n),{},s({},o,e.elements[o]))}),{}),e.elements=a),e}},{key:"_onGroupDismissed",value:function(e){Ae.l("".concat(this._n,"._onGroupDismissed groupID:").concat(e)),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}},{key:"_checkMessageStacked",value:function(e){var t="MessageStacked";100<=(e=e.length)&&(this._grpM.warn(t,e),this._reportMessageStackedCount<5)&&(new Jn(t).setMessage("count:".concat(e," groupID:").concat(m(this._joinedGroupMap.keys()))).setLevel("warning").end(),this._reportMessageStackedCount+=1)}},{key:"_isMessageSentByCurrentInstance",value:function(e){return!!this._get(11).isMessageSentByCurrentInstance(e)}},{key:"packMessage",value:function(e,t){e.currentUser=this._grpM.getMyUserID(),e.conversationType=5===t?E.CONV_SYSTEM:E.CONV_GROUP,e.isSystemMessage=!!e.isSystemMessage;var n=new Co(e),o=(e=this.packElements(e,t),t=this._grpM.getFileDownloadProxy(),this._grpM.getDowloadFileAuthKey()),i=this._get(17).getFileDNList();return n.setElement(e,t,o,i),n}},{key:"packElements",value:function(e,n){return 4===n||6===n?(this._updateMemberCountByGroupTips(e),{type:E.MSG_GRP_TIP,content:t(t({},e.elements),{},{groupProfile:e.groupProfile})}):5===n?{type:E.MSG_GRP_SYS_NOTICE,content:t(t({},e.elements),{},{groupProfile:t(t({},e.groupProfile),{},{groupID:e.groupID})})}:e.elements}},{key:"packConversationOption",value:function(e){for(var t=new Map,n=0;n<e.length;n++){var o,i=e[n],a=i.conversationID;t.has(a)?"in"===((o=t.get(a)).lastMessage=i).flow&&o.unreadCount++:t.set(a,{conversationID:i.conversationID,unreadCount:"out"===i.flow?0:1,type:i.conversationType,subType:i.conversationSubType,lastMessage:i})}return m(t.values())}},{key:"_updateMemberCountByGroupTips",value:function(e){var t,n,o,i=e.groupProfile.groupID;Ve(e=void 0===(e=e.elements.onlineMemberInfo)?void 0:e)||(t=void 0===(t=e.onlineMemberNum)?0:t,e=void 0===(e=e.expireTime)?this.DEFAULT_EXPIRE_TIME:e,n=this._onlineMemberCountMap.get(i)||{},o=Date.now(),Ve(n)?Object.assign(n,{lastReqTime:0,lastSyncTime:0,latestUpdateTime:o,memberCount:t,expireTime:e}):(n.latestUpdateTime=o,n.memberCount=t),this._onlineMemberCountMap.set(i,n))}},{key:"_onBroadcastMessage",value:function(e){if(!Ve(e)){for(var t=[],n=e.length,o=null,i=0;i<n;i++){var a=this.restoreMessageFromSimplified(e[i]);hi[a.event]?((o=this.packMessage(a,a.event)).isBroadcastMessage=!0,this._broadcastMessageIDMap.has(o.ID)||(t.push(o),this._broadcastMessageIDMap.set(o.ID,1))):Ae.w("".concat(this._n,"._onBroadcastMessage unknown event:").concat(a.event))}0<t.length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t)}}},{key:"start",value:function(e){var t;this._pollingInstanceMap.has(e)?(t=this._pollingInstanceMap.get(e)).isRunning()||t.start():((t=new pi({manager:this,groupID:e,onInit:this._updatedata.bind(this),onSuccess:this._handleSuccess.bind(this),onFail:this._handleFailure.bind(this)})).start(),this._pollingInstanceMap.set(e,t),Ae.l("".concat(this._n,".start groupID:").concat(e)))}},{key:"handleJoinResult",value:function(e){var t=this;return this._preCheck(e.group).then((function(){var n=e.longPollingKey,o=e.group,i=o.groupID;return t._joinedGroupMap.set(i,o),t._grpM.updateGroupMap([o]),t._grpM.deleteUnjoinedAVChatRoom(i),t._grpM.emitGroupListUpdate(!0,!1),ut(n)?vn({status:Ue,group:o}):Promise.resolve()}))}},{key:"startRunLoop",value:function(e){var t=this;return this.handleJoinResult(e).then((function(){var n=e.longPollingKey,o=e.group,i=e.startSeq,a=o.groupID;return t._pollingRequestInfoMap.set(a,{key:n,startSeq:void 0===i?0:i}),t.start(a),t._grpM.isLoggedIn()?vn({status:Ue,group:o}):vn({status:Ue})}))}},{key:"_preCheck",value:function(e){if(!this._get(12).isUnlimitedAVChatRoom()&&this.hasJoinedAVChatRoom()&&e.type!==E.GRP_LIVE){var t=(e=_(this._joinedGroupMap.entries().next().value,2))[0];if(e=e[1],this._grpM.isLoggedIn()&&e.selfInfo.role!==E.GRP_MBR_ROLE_OWNER&&e.ownerID!==this._grpM.getMyUserID())return this._grpM.quitGroup(t);this._grpM.deleteLocalGroupAndConversation(t),this.reset(t)}return Promise.resolve()}},{key:"joinWithoutAuth",value:function(e){var t=this,n=e.groupID,o="".concat(this._n,".").concat("joinWithoutAuth"),i=new Jn("joinWithoutAuth");return this._grpM.req({P:Gn.APPLY_JOIN_GRP_NOAUTH,data:e}).then((function(e){if(e=e.data.longPollingKey,i.setMessage("groupID:".concat(n," longPollingKey:").concat(e)).end(!0),ut(e))return yn({code:Pn.CANNOT_JOIN_NON_AV_WITHOUT_LOGIN});Ae.l("".concat(o," ok. groupID:").concat(n)),t._get(11).setCompleted("".concat(E.CONV_GROUP).concat(n));var a=new ni({groupID:n});return t.startRunLoop({group:a,longPollingKey:e}),mn({status:Ue})})).catch((function(e){return Ae.e("".concat(o," failed. groupID:").concat(n," error:"),e),i.setError(e).setMessage("groupID:".concat(n)).end(!0),yn(e)})).finally((function(){t._grpM.get(14).reportAtOnce()}))}},{key:"getGroupOnlineMemberCount",value:function(e){var t=this._onlineMemberCountMap.get(e)||{},n=Date.now();return Ve(t)||n-t.lastSyncTime>1e3*t.expireTime&&1e4<n-t.latestUpdateTime&&3e3<n-t.lastReqTime?(t.lastReqTime=n,this._onlineMemberCountMap.set(e,t),this._getGroupOnlineMemberCount(e).then((function(e){return mn({memberCount:e.memberCount})})).catch((function(e){return yn(e)}))):vn({memberCount:t.memberCount})}},{key:"_getGroupOnlineMemberCount",value:function(e){var t=this,n="".concat(this._n,".").concat("_getGroupOnlineMemberCount"),o=new Jn("_getGroupOnlineMemberCount");return this._grpM.requestOnlineCount(e).then((function(o){var i=t._onlineMemberCountMap.get(e)||{},a=void 0===(a=(o=o.data).memberCount)?0:a,s=(o=void 0===(o=o.expireTime)?t.DEFAULT_EXPIRE_TIME:o,Ae.l("".concat(n," ok. groupID:").concat(e," memberCount:").concat(a," expireTime:").concat(o)),Date.now());return Ve(i)&&(i.lastReqTime=s),t._onlineMemberCountMap.set(e,Object.assign(i,{lastSyncTime:s,latestUpdateTime:s,memberCount:a,expireTime:o})),{memberCount:a}})).catch((function(t){return Ae.w("".concat(n," failed. error:"),t),o.setCode(t.code).setMessage("groupID:".concat(e," error:").concat(JSON.stringify(t))).end(),Promise.reject(t)}))}},{key:"_get",value:function(e){return this._grpM.get(e)}},{key:"setPollingInterval",value:function(e){ut(e)||(Ke(e)?this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=e:this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=parseInt(e,10))}},{key:"setPollingIntervalPlus",value:function(e){ut(e)||(Ke(e)?this.DEFAULT_POLLING_INTERVAL_PLUS=e:this.DEFAULT_POLLING_INTERVAL_PLUS=parseInt(e,10))}},{key:"setPollingNoMessageCount",value:function(e){ut(e)||(Ke(e)?this.DEFAULT_POLLING_NO_MESSAGE_COUNT=e:this.DEFAULT_POLLING_NO_MESSAGE_COUNT=parseInt(e,10))}},{key:"setPollingSimplifiedMessage",value:function(e){ut(e)||"0"!==e&&"1"!==e||(this.DEFAULT_POLLING_SIMPLIFIED_MSG=parseInt(e,10))}},{key:"getPollingInterval",value:function(){return this._pollingInterval}},{key:"onAVChatRoomMemberBanned",value:function(e){e=e.payload.groupProfile.groupID,Ae.l("".concat(this._n,".onAVChatRoomMemberBanned groupID:").concat(e)),this._grpM.deleteLocalGroupAndConversation(e),this.reset(e)}},{key:"restartPolling",value:function(){Ae.l("".concat(this._n,".restartPolling count:").concat(this._pollingInstanceMap.size));var e,t=T(this._pollingInstanceMap.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.stop(),n.start()}}catch(o){t.e(o)}finally{t.f()}}},{key:"getPollingTimerID",value:function(e){var t;return this._pollingInstanceMap.has(e)?(t=this._pollingInstanceMap.get(e).getPollingTimerID(),Ae.l("".concat(this._n,".getPollingTimerID groupID:").concat(e," timerID:").concat(t)),t):-1}},{key:"hasPollingInstance",value:function(e){return this._pollingInstanceMap.has(e)}},{key:"onRoomCustomData",value:function(e){var t=e.groupID,n=e.sequence,o=e.time;e=(e=e.elements)&&e.content,this._get(30).onRoomCustomDataReceived(e),Ae.l("".concat(this._n,".onRoomCustomData groupID:").concat(t," sequence:").concat(n," time:").concat(o," data:").concat(e))}},{key:"reset",value:function(e){if(e){Ae.l("".concat(this._n,".reset groupID:").concat(e));var t=this._pollingInstanceMap.get(e);t&&t.stop(),this._pollingInstanceMap.delete(e),this._joinedGroupMap.delete(e),this._pollingRequestInfoMap.delete(e),this._onlineMemberCountMap.delete(e)}else{Ae.l("".concat(this._n,".reset all"));var n,o=T(this._pollingInstanceMap.values());try{for(o.s();!(n=o.n()).done;)n.value.stop()}catch(i){o.e(i)}finally{o.f()}this._pollingInstanceMap.clear(),this._joinedGroupMap.clear(),this._pollingRequestInfoMap.clear(),this._onlineMemberCountMap.clear(),this._broadcastMessageIDMap.clear()}this._seqSll.reset(),this._IDSll.reset(),this._reportMessageStackedCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=300,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0}}]),ji),gi=(a(Hi,[{key:"updateMember",value:function(e){ut(e.onlineStatus)||(this.isOnline="Online"===e.onlineStatus);var t=[null,void 0,"",0,NaN];e.memberCustomField&&_t(this.memberCustomField,e.memberCustomField),Ze(this,e,["memberCustomField","marks","onlineStatus"],t)}},{key:"updateRole",value:function(e){["Owner","Admin","Member"].indexOf(e)<0||(this.role=e)}},{key:"updateMuteUntil",value:function(e){ut(e)||(this.muteUntil=Math.floor((Date.now()+1e3*e)/1e3))}},{key:"updateNameCard",value:function(e){ut(e)||(this.nameCard=e)}},{key:"updateMemberCustomField",value:function(e){e&&_t(this.memberCustomField,e)}}]),Hi),_i=(a(Bi,[{key:"_onProfileUpdated",value:function(e){for(var t=this,n=e.data,o=0;o<n.length;o++)!function(e){var o=n[e];t.groupMemberListMap.forEach((function(e){e.has(o.userID)&&e.get(o.userID).updateMember({nick:o.nick,avatar:o.avatar})}))}(o)}},{key:"deleteGroupMemberList",value:function(e){this.groupMemberListMap.delete(e)}},{key:"getGroupMemberList",value:function(e){var t,n=this,o=e.groupID,i=void 0===(i=e.role)?void 0:i,a=void 0===(c=e.offset)?0:c,s=void 0===(c=e.count)?15:c,r=(e=void 0===(c=e.filter)?void 0:c,"".concat(this._n,".").concat("getGroupMemberList")),c=this._grpM.hasLocalGroup(o);if(Ae.l("".concat(r," groupID:").concat(o," role:").concat(i," offset:").concat(a," count:").concat(s," hasLocalGroup:").concat(c)),!c)return vn({memberList:[],offset:0});if(this._grpM.getLocalGroupProfile(o).type===E.GRP_AVCHATROOM){if(this._grpM.canIUse(N.AV_MBR_LIST))return this._getAVChatRoomMemberList({groupID:o,offset:a,filter:e});this._grpM.warn("LiveOnlineMember")}i!==E.GRP_MBR_ROLE_ADMIN&&i!==E.GRP_MBR_ROLE_OWNER&&i!==E.GRP_MBR_ROLE_MEMBER||(t=i);var u=new Jn("getGroupMemberList"),l=0,d=(c={groupID:o,limit:100<s?100:s,memberRoleFilter:t?[t]:void 0,memberInfoFilter:this.DEFAULT_MEMBER_INFO_FILTER},It({groupID:o})?c.next="".concat(a):l=(c.offset=a)+s,[]);return this._grpM.req({P:Gn.GET_GRP_MBR_LIST,data:c}).then((function(e){var t=(e=e.data).members,i=e.memberNum;return e=e.next,ut(e=void 0===e?void 0:e)||(l=Ve(e)?0:e),We(t)&&0!==t.length?(n._grpM.hasLocalGroup(o)&&(n._grpM.getLocalGroupProfile(o).memberNum=i),d=n._updateLocalGroupMemberMap(o,t),n._grpM.get(4).getUserProfile({userIDList:t.map((function(e){return e.userID})),tagList:[Oe.NICK,Oe.AVATAR]})):(l=0,Promise.resolve([]))})).then((function(e){return We(e=e.data)&&0!==e.length?(e=e.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}})),n._updateLocalGroupMemberMap(o,e),d.length<s&&(l=0),u.setMessage("groupID:".concat(o," offset:").concat(a," count:").concat(s)).end(),Ae.l("".concat(r," ok.")),mn({memberList:d,offset:l})):vn({memberList:[],offset:l})})).catch((function(e){return u.setError(e).end(),Ae.e("".concat(r," failed. error:"),e),yn(e)}))}},{key:"_getAVChatRoomMemberList",value:function(e){var n=this,o=e.groupID,i=e.offset,a=(e=e.filter,"".concat(this._n,".").concat("_getAVChatRoomMemberList")),s=new Jn("_getAVChatRoomMemberList");return s.setMessage("groupID:".concat(o," offset:").concat(i," filter:").concat(e)),this._grpM.req({P:Gn.GET_AV_MBR_LIST,data:{groupID:o,offset:i,filter:e}}).then((function(e){var i=void 0===(i=(e=e.data).memberList)?[]:i;return e=void 0===(e=e.offset)?0:e,s.end(),Ae.l("".concat(a," ok. member count:").concat(i.length,", next request timestamp:").concat(e)),i=i.map((function(e){return t(t({},e),{},{onlineStatus:"Online"})})),mn({memberList:i=n._updateLocalGroupMemberMap(o,i),offset:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(a," failed. error:"),e),yn(e)}))}},{key:"getGroupMemberProfile",value:function(e){var n,o=this,i="getGroupMemberProfile",a="".concat(this._n,".").concat(i),s="groupID:".concat(e.groupID),r=(5<e.userIDList.length?s+=" userIDList.length:".concat(e.userIDList.length):s+=" userIDList:".concat(e.userIDList),Ae.l("".concat(a," ").concat(s)),50<e.userIDList.length&&(e.userIDList=e.userIDList.slice(0,50)),e.groupID),c=e.userIDList;return(a=this._grpM.getLocalGroupProfile(r))&&yt(a.type)?yn({code:a=Pn.OPERATION_NOT_SUPPORTED_IN_AV,message:this._grpM.getErrMsg(a,i)}):((n=new Jn(i)).setMessage(s),this._getGroupMemberProfileAdvance(t(t({},e),{},{userIDList:c})).then((function(e){return We(e=e.data.members)&&0!==e.length?(o._updateLocalGroupMemberMap(r,e),o._grpM.get(4).getUserProfile({userIDList:e.map((function(e){return e.userID})),tagList:[Oe.NICK,Oe.AVATAR]})):vn([])})).then((function(e){return e=e.data.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}})),o._updateLocalGroupMemberMap(r,e),e=c.filter((function(e){return o.hasLocalGroupMember(r,e)})).map((function(e){return o.getLocalGroupMemberInfo(r,e)})),n.end(),mn({memberList:e})})))}},{key:"addGroupMember",value:function(e){var t=this,n="".concat(this._n,".").concat("addGroupMember"),o=e.groupID,i=this._grpM.getLocalGroupProfile(o),a=i.type,s=new Jn("addGroupMember");return s.setMessage("groupID:".concat(o," groupType:").concat(a)),yt(a)?(a=new wn({code:Pn.CANNOT_ADD_MEMBER_IN_AV}),s.setError(a).end(),yn(a)):(e.userIDList=e.userIDList.map((function(e){return{userID:e}})),Ae.l("".concat(n," groupID:").concat(o)),this._grpM.req({P:Gn.ADD_GRP_MBR,data:e}).then((function(o){o=o.data.members;var a=(Ae.l("".concat(n," ok")),o.filter((function(e){return 1===e.result})).map((function(e){return e.userID}))),r=o.filter((function(e){return 0===e.result})).map((function(e){return e.userID})),c=o.filter((function(e){return 2===e.result})).map((function(e){return e.userID})),u=(o=o.filter((function(e){return 4===e.result})).map((function(e){return e.userID})),"groupID:".concat(e.groupID,", ")+"successUserIDList:".concat(a,", ")+"failureUserIDList:".concat(r,", ")+"existedUserIDList:".concat(c,", ")+"overLimitUserIDList:".concat(o));return s.setMoreMessage(u).end(),0===a.length?mn({successUserIDList:a,failureUserIDList:r,existedUserIDList:c,overLimitUserIDList:o}):(t._updateConvGroupProfile(i),mn({successUserIDList:a,failureUserIDList:r,existedUserIDList:c,overLimitUserIDList:o,group:i}))})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)})))}},{key:"deleteGroupMember",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("deleteGroupMember"),a=e.groupID,s=e.userIDList,r=this._grpM.getLocalGroupProfile(a);return ut(r)?yn({code:Pn.CANNOT_FIND_GRP}):yt(r.type)?this._grpM.canIUse(N.AV_BAN_MBR)?this._banAVChatRoomMember(e):this._grpM.noUse("deleteGroupMember"):(t="groupID:".concat(a," ").concat(5<s.length?"userIDList.length:".concat(s.length):"userIDList:".concat(s)),Ae.l("".concat(i," groupID:").concat(a," userIDList:"),s),(n=new Jn("deleteGroupMember")).setMessage(t),this._grpM.req({P:Gn.DEL_GRP_MBR,data:e}).then((function(){return n.end(),Ae.l("".concat(i," ok")),o._updateConvGroupProfile(r),o.deleteLocalGroupMembers(a,s),mn({group:r,userIDList:s})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"_updateConvGroupProfile",value:function(e){this._grpM.get(11).updateConvGroupProfile([e])}},{key:"_banAVChatRoomMember",value:function(e){var t=this,n="".concat(this._n,".").concat("_banAVChatRoomMember"),o=e.groupID,i=e.userIDList,a="groupID:".concat(o," ").concat(5<i.length?"userIDList.length:".concat(i.length):"userIDList:".concat(i)),s=new Jn("_banAVChatRoomMember"),r=(s.setMessage(a),Ae.l("".concat(n," groupID:").concat(o," userIDList:"),i),this._grpM.getLocalGroupProfile(o));return ut(e.duration)||0===e.duration?yn({code:Pn.BAN_DURATION_INVALID}):this._grpM.req({P:Gn.BAN_AV_MBR,data:e}).then((function(){return s.end(),Ae.l("".concat(n," ok")),t.deleteLocalGroupMembers(o,i),mn({group:r,userIDList:i})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"setGroupMemberMuteTime",value:function(e){var t,n,o=this,i=e.groupID,a=e.userID,s=(e=e.muteTime,"".concat(this._n,".").concat("setGroupMemberMuteTime"));return a===this._grpM.getMyUserID()?yn({code:Pn.CANNOT_MUTE_SELF}):(t="groupID:".concat(i," userID:").concat(a," muteTime:").concat(e),Ae.l("".concat(s," ").concat(t)),(n=new Jn("setGroupMemberMuteTime")).setMessage(t),this.modifyGroupMemberInfo({groupID:i,userID:a,muteTime:e}).then((function(e){return n.end(),Ae.l("".concat(s," ok")),mn({group:o._grpM.getLocalGroupProfile(i),member:e})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(s," failed. error:"),e),yn(e)})))}},{key:"setGroupMemberRole",value:function(e){var t,n,o="".concat(this._n,".").concat("setGroupMemberRole"),i=e.groupID,a=e.userID,s=(e=e.role,"groupID:".concat(i," userID:").concat(a," role:").concat(e)),r=this._grpM.getLocalGroupProfile(i);return r&&r.selfInfo.role!==E.GRP_MBR_ROLE_OWNER?yn({code:Pn.NOT_OWNER}):(t=[E.GRP_MBR_ROLE_ADMIN,E.GRP_MBR_ROLE_MEMBER],It({groupID:i})&&t.push(E.GRP_MBR_ROLE_CUSTOM),t.indexOf(e)<0?yn({code:Pn.INVALID_MEMBER_ROLE}):a===this._grpM.getMyUserID()?yn({code:Pn.CANNOT_SET_SELF_MEMBER_ROLE}):((n=new Jn("setGroupMemberRole")).setMessage(s),Ae.l("".concat(o," ").concat(s)),this.modifyGroupMemberInfo({groupID:i,userID:a,role:e}).then((function(e){return n.end(),Ae.l("".concat(o," ok")),mn({group:r,member:e})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)}))))}},{key:"_filterProfanity",value:function(e,t){var n,o=this._grpM.get(29);return!o||(n=(o=o.filterText(t[e],"group_member_profile")).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"setGroupMemberNameCard",value:function(e){var t,n,o,i,a,s=this,r="setGroupMemberNameCard",c="".concat(this._n,".").concat(r);return e.nameCard&&!1===this._filterProfanity("nameCard",e)?yn({code:Pn.PROFANITY_FOUND}):(t=e.groupID,i=e.userID,n=void 0===i?this._grpM.getMyUserID():i,o=e.nameCard,i="groupID:".concat(t," userID:").concat(n," nameCard:").concat(o),Ae.l("".concat(c," ").concat(i)),(e=this._grpM.getLocalGroupProfile(t))&&yt(e.type)?yn({code:e=Pn.OPERATION_NOT_SUPPORTED_IN_AV,message:this._grpM.getErrMsg(e,r)}):((a=new Jn(r)).setMessage(i),this.modifyGroupMemberInfo({groupID:t,userID:n,nameCard:o}).then((function(e){Ae.l("".concat(c," ok")),a.end();var i=s._grpM.getLocalGroupProfile(t);return n===s._grpM.getMyUserID()&&i&&i.setSelfNameCard(o),mn({group:i,member:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(c," failed. error:"),e),yn(e)}))))}},{key:"setGroupMemberCustomField",value:function(e){var t,n=this,o="setGroupMemberCustomField",i="".concat(this._n,".").concat(o),a=e.groupID,s=void 0===(s=e.userID)?this._grpM.getMyUserID():s,r=(e=e.memberCustomField,"groupID:".concat(a," userID:").concat(s," memberCustomField:").concat(JSON.stringify(e))),c=(Ae.l("".concat(i," ").concat(r)),this._grpM.getLocalGroupProfile(a));return c&&yt(c.type)?yn({code:c=Pn.OPERATION_NOT_SUPPORTED_IN_AV,message:this._grpM.getErrMsg(c,o)}):((t=new Jn(o)).setMessage(r),this.modifyGroupMemberInfo({groupID:a,userID:s,memberCustomField:e}).then((function(e){return t.end(),Ae.l("".concat(i," ok")),mn({group:n._grpM.getLocalGroupProfile(a),member:e})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"modifyGroupMemberInfo",value:function(e){var n=this,o=e.groupID,i=e.userID,a=void 0;return Mt(o)&&(o=Gt(a=o)),this._grpM.req({P:Gn.MODIFY_GRP_MBR_INFO,data:t(t({},e),{},{groupID:o,topicID:a})}).then((function(){var t;return n.hasLocalGroupMember(o,i)?(t=n.getLocalGroupMemberInfo(o,i),ut(e.muteTime)||t.updateMuteUntil(e.muteTime),ut(e.role)||t.updateRole(e.role),ut(e.nameCard)||t.updateNameCard(e.nameCard),ut(e.memberCustomField)||t.updateMemberCustomField(e.memberCustomField),t):(t=n._grpM.getLocalGroupProfile(o))&&!yt(t.type)?n.getGroupMemberProfile({groupID:o,userIDList:[i]}).then((function(e){return _(e.data.memberList,1)[0]})):void 0}))}},{key:"markGroupMemberList",value:function(e){var t="".concat(this._n,".").concat("markGroupMemberList"),n=e.groupID,o=e.markType,i=e.enableMark,a=void 0===(e=e.userIDList)?[]:e,s=(e="groupID:".concat(n," markType:").concat(o," enableMark:").concat(i," userIDList count:").concat(a.length),Ae.l("".concat(t," ").concat(e)),2),r=[],c=(!0===i&&(s=1),i=m(a),500<a.length&&(i=a.slice(0,500),Ae.w("".concat(t," ").concat(Vt(500)))),i.forEach((function(e){r.push({userID:e,markType:[o]})})),i=null,new Jn("markGroupMemberList"));return c.setMessage(e),this._grpM.req({P:Gn.MARK_AV_MBR_INFO,data:{groupID:n,operationType:s,memberList:r}}).then((function(e){e=e.data.memberList;var n=[],o=[];return(e=void 0===e?[]:e).length===a.length?n.push.apply(n,m(a)):(e.forEach((function(e){n.push(e.userID)})),a.forEach((function(e){n.includes(e)||o.push(e)}))),e="success count:".concat(n.length," fail count:").concat(o.length),c.setMessage(e).end(),Ae.l("".concat(t," ok. ").concat(e)),mn({successUserIDList:n,failureUserIDList:o})})).catch((function(e){return c.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_getGroupMemberProfileAdvance",value:function(e){return this._grpM.req({P:Gn.GET_GRP_MBR_PROFILE,data:t(t({},e),{},{memberInfoFilter:e.memberInfoFilter||this.DEFAULT_MEMBER_INFO_FILTER})})}},{key:"_updateLocalGroupMemberMap",value:function(e,t){var n=this;return We(t)&&0!==t.length?t.map((function(t){return n.hasLocalGroupMember(e,t.userID)?n.getLocalGroupMemberInfo(e,t.userID).updateMember(t):n.setLocalGroupMember(e,new gi(t)),n.getLocalGroupMemberInfo(e,t.userID)})):[]}},{key:"deleteLocalGroupMembers",value:function(e,t){var n=this.groupMemberListMap.get(e);n&&t.forEach((function(e){n.delete(e)}))}},{key:"getLocalGroupMemberInfo",value:function(e,t){return this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).get(t):null}},{key:"setLocalGroupMember",value:function(e,t){this.groupMemberListMap.has(e)?this.groupMemberListMap.get(e).set(t.userID,t):(t=(new Map).set(t.userID,t),this.groupMemberListMap.set(e,t))}},{key:"getLocalGroupMemberList",value:function(e){return this.groupMemberListMap.get(e)}},{key:"hasLocalGroupMember",value:function(e,t){return this.groupMemberListMap.has(e)&&this.groupMemberListMap.get(e).has(t)}},{key:"hasLocalGroupMemberMap",value:function(e){return this.groupMemberListMap.has(e)}},{key:"reset",value:function(){this.groupMemberListMap.clear()}}]),Bi),mi=[17,18,20],vi=(a(Vi,[{key:"onNewGroupSystemNotice",value:function(e){var t=e.dataList,n=e.isSyncingEnded,o=(e=e.isInstantMessage,(Ae.d("".concat(this._n,".onReceiveSystemNotice count:").concat(t.length)),t=this._assembly({notifiesList:t,isInstantMessage:e})).eventDataList);t=t.result,0<o.length&&(this._grpM.get(11).onNewMessage({conversationOptionsList:o,isInstantMessage:e}),this._onReceivedGroupSystemNotice({result:t,isInstantMessage:e})),e?0<t.length&&this._grpM.emitOEvt(S.MESSAGE_RECEIVED,t):!0===n&&this._clearGroupSystemNotice()}},{key:"_assembly",value:function(e){var n=e.notifiesList,o=e.isInstantMessage,i=null,a=n.length,s=0,r=[],c={conversationID:E.CONV_SYSTEM,unreadCount:0,type:E.CONV_SYSTEM,subType:null,lastMessage:null};for(s=0;s<a;s++){var u=n[s],l=(d=u.groupProfile).communityType,d=void 0===(d=d.topicID)?void 0:d,p=void 0===(p=(h=u.elements).topicIDList)?void 0:p,h=h.operationType;if(!(2!==(void 0===l?0:l)||Ve(d)&&Ve(p))){if(mi.includes(h)){this._handleTopicSystemNotice(u);continue}Ve(d)||(u.to=d)}15!==u.elements.operationType&&(u.currentUser=this._grpM.getMyUserID(),u.conversationType=E.CONV_SYSTEM,u.conversationID=E.CONV_SYSTEM,(i=new Co(u)).setElement({type:E.MSG_GRP_SYS_NOTICE,content:t(t({},u.elements),{},{groupProfile:t({},u.groupProfile)})}),i.isSystemMessage=!0,(1===i.sequence&&1===i.random||2===i.sequence&&2===i.random)&&(i.sequence=nt(),i.random=nt(),i.generateMessageID(),Ae.l("".concat(this._n,"._assembly regenerate ID:").concat(i.ID))),this._grpM.get(11).pushIntoNoticeResult(r,i))&&(o?c.unreadCount++:i.setIsRead(!0),c.subType=i.conversationSubType)}return c.lastMessage=r[r.length-1],{eventDataList:0<r.length?[c]:[],result:r}}},{key:"_clearGroupSystemNotice",value:function(){var e=this;this._getPendencyList().then((function(t){t.forEach((function(t){e.pendencyMap.set("".concat(t.from,"_").concat(t.groupID,"_").concat(t.to),t)})),t=e._grpM.get(11).getLocalMessageList(E.CONV_SYSTEM);var n=[];t.forEach((function(t){var o=(a=t.payload).operatorID,i=a.operationType,a=a.groupProfile;1===i&&(i="".concat(o,"_").concat(a.groupID,"_").concat(a.to),o=e.pendencyMap.get(i))&&Ke(o.handled)&&0!==o.handled&&n.push(t)})),e.deleteGroupSystemNotice({messageList:n})}))}},{key:"deleteGroupSystemNotice",value:function(e){var t=this,n="".concat(this._n,".deleteGroupSystemNotice");return We(e.messageList)&&0!==e.messageList.length?(Ae.l("".concat(n," ")+e.messageList.map((function(e){return e.ID}))),this._grpM.req({P:Gn.DEL_GRP_SYSTEM_NOTICE,data:{messageListToDelete:e.messageList.map((function(e){return{from:E.CONV_SYSTEM,messageSeq:e.clientSequence,messageRandom:e.random}}))}}).then((function(){Ae.l("".concat(n," ok"));var o=t._grpM.get(11);return e.messageList.forEach((function(e){o.deleteLocalMessage(e)})),mn()})).catch((function(e){return Ae.e("".concat(n," error:"),e),yn(e)}))):vn()}},{key:"_getPendencyList",value:function(){var e=this,t=(o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).type,n=o.startTime,o=o.limit;return this._grpM.req({P:Gn.GET_GRP_PENDENCY,data:{type:void 0===t?void 0:t,startTime:void 0===n?0:n,limit:void 0===o?20:o,handleAccount:this._grpM.getMyUserID()}}).then((function(t){var n=t.data.pendencyList;return 0!==t.data.nextStartTime?e._getPendencyList({startTime:t.data.nextStartTime}).then((function(e){return[].concat(m(n),m(e))})):n}))}},{key:"getGroupApplicationList",value:function(){var e=this;return this._getPendencyList().then((function(t){return e._getPendencyList({type:E.GRP_COMMUNITY}).then((function(n){return t.push.apply(t,m(n)),e._handlePendencyResult(t)})).catch((function(n){return e._handlePendencyResult(t)}))}))}},{key:"_handlePendencyResult",value:function(e){var t=this,n=[];return e.forEach((function(e){t.pendencyMap.set("".concat(e.from,"_").concat(e.groupID,"_").concat(e.to),e),0===e.handled&&n.push({applicant:e.from,applicantNick:e.fromUserNickName,groupName:e.groupName,groupID:e.groupID,authentication:e.authentication,messageKey:e.time,applicationType:e.applicationType,userID:e.userID,note:e.note})})),vn({applicationList:n})}},{key:"_onReceivedGroupSystemNotice",value:function(e){var t=this,n=e.result;e.isInstantMessage&&n.forEach((function(e){switch(e.payload.operationType){case 1:case 3:case 6:case 11:case 12:case 15:break;case 2:t._onApplyJoinGroup(e);break;case 4:t._onMemberKicked(e);break;case 5:t._onGroupDismissed(e);break;case 7:t._onInviteGroup(e);break;case 8:t._onQuitGroup(e);break;case 9:t._onSetManager(e);break;case 10:t._onDeleteManager(e);break;case 20:t._onMessageRemindTypeSynced(e);break;case 21:t._grpM.onAVChatRoomMemberBanned(e)}}))}},{key:"_onApplyJoinGroup",value:function(e){var t=this,n=(e=e.payload.groupProfile).groupID,o=(e=e.groupType,this._grpM.hasLocalGroup(n));Ae.l("".concat(this._n,"._onApplyJoinGroup groupID:").concat(n," groupType:").concat(e," hasGroup:").concat(o)),o||yt(e)||this._grpM.getGroupProfile({groupID:n}).then((function(e){(e=e.data.group)&&(t._grpM.updateGroupMap([e]),e=!e.isSupportTopic,t._grpM.emitGroupListUpdate(!0,e))}))}},{key:"_onMemberKicked",value:function(e){e=e.payload.groupProfile.groupID,this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e)}},{key:"_onGroupDismissed",value:function(e){e=e.payload.groupProfile.groupID;var t=(this._grpM.hasLocalGroup(e)&&this._grpM.deleteLocalGroupAndConversation(e),this._grpM._AVChatRoomHandler);t&&t.checkJoinedAVChatRoomByID(e)&&t.reset(e)}},{key:"_onInviteGroup",value:function(e){var t=this,n=e.payload.groupProfile.groupID;e=this._grpM.hasLocalGroup(n),Ae.l("".concat(this._n,"._onInviteGroup groupID:").concat(n," hasGroup:").concat(e)),this._grpM.getGroupProfile({groupID:n}).then((function(){t._grpM.emitGroupListUpdate(),t._grpM.get(11).pullMsgOnInvite("".concat(E.CONV_GROUP).concat(n))}))}},{key:"_onQuitGroup",value:function(e){var t=(e=e.payload.groupProfile).groupID,n=(e=e.groupType,this._grpM.hasLocalGroup(t));Ae.l("".concat(this._n,"._onQuitGroup groupID:").concat(t," groupType:").concat(e," hasGroup:").concat(n)),n&&this._grpM.deleteLocalGroupAndConversation(t)}},{key:"_onSetManager",value:function(e){var t=(e=e.payload.groupProfile).to;e=e.groupID,(e=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(e,t))&&e.updateRole(E.GRP_MBR_ROLE_ADMIN)}},{key:"_onDeleteManager",value:function(e){var t=(e=e.payload.groupProfile).to;e=e.groupID,(e=this._grpM.getGroupMemberHandler().getLocalGroupMemberInfo(e,t))&&e.updateRole(E.GRP_MBR_ROLE_MEMBER)}},{key:"_onMessageRemindTypeSynced",value:function(e){var t=e.payload.groupProfile.groupID;e=e.payload.messageRemindType,this._grpM.get(11).onGroupMsgRemindTypeUpdated({groupID:t,messageRemindType:e})}},{key:"_handleTopicSystemNotice",value:function(e){var t=(n=e.groupProfile).groupID,n=n.topicID,o=(e=e.elements).operationType,i=e.topicIDList,a=(e=e.messageRemindType,this._grpM.get(10));17===o?a.onTopicCreated({groupID:t,topicID:n}):18===o?a.onTopicDeleted({groupID:t,topicIDList:i}):20===o&&a.onMessageRemindTypeUpdated({groupID:t,topicID:n,messageRemindType:e})}},{key:"reset",value:function(){this.pendencyMap.clear()}}]),Vi),yi=["relayFlag"],Ii=(r(qi,bn),Yo=g(qi),a(qi,[{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("polling_interval"),t=this.getCloudConfig("polling_interval_plus"),n=this.getCloudConfig("polling_no_msg_count"),o=this.getCloudConfig("polling_simplified_msg"),i=this.getCloudConfig("paging_grp_count");Ae.l("".concat(this._n,"._onCloudConfig pollingInterval:").concat(e)+" pollingIntervalPlus:".concat(t," pollingNoMessageCount:").concat(n)+" pollingSimplifiedMessage:".concat(o," pagingGroupCount:").concat(i)),this._AVChatRoomHandler.setPollingInterval(e),this._AVChatRoomHandler.setPollingIntervalPlus(t),this._AVChatRoomHandler.setPollingNoMessageCount(n),this._AVChatRoomHandler.setPollingSimplifiedMessage(o),this._commonGroupHandler.setPagingGroupCount(i)}},{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&(this._commonGroupHandler.onCheckTimer(e),this._groupTipsHandler.onCheckTimer(e))}},{key:"guardForAVChatRoom",value:function(e){var t,n=this;return e.conversationType!==E.CONV_GROUP||(t=Mt(e.to)?Gt(e.to):e.to,this.hasLocalGroup(t))?vn():this.getGroupProfile({groupID:t}).then((function(o){return o=o.data.group.type,Ae.l("".concat(n._n,".guardForAVChatRoom. groupID:").concat(t," type:").concat(o)),o===E.GRP_AVCHATROOM?yn(new wn({code:o=Pn.MSG_SEND_FAIL_NOT_IN_AV,message:n.getErrMsg(o,e.from,t),data:{message:e}})):vn()}))}},{key:"checkJoinedAVChatRoomByID",value:function(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}},{key:"onNewMessage",value:function(e){this._commonGroupHandler.onNewMessage(e)}},{key:"updateNextMessageSeq",value:function(e){var t,n=this;We(e)&&(t=this.get(10),e.forEach((function(e){var o=e.conversationID.replace(E.CONV_GROUP,"");Mt(o)&&t.updateUnreadCountAndLastMsg(o,e.lastMessage),n.groupMap.has(o)&&(n.groupMap.get(o).nextMessageSeq=e.lastMessage.sequence+1)})))}},{key:"onNewGroupTips",value:function(e){this._groupTipsHandler.onNewGroupTips(e)}},{key:"onMsgRevoked",value:function(e){this._commonGroupHandler.onMsgRevoked(e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1])}},{key:"onNewGroupSystemNotice",value:function(e){this._groupSystemNoticeHandler.onNewGroupSystemNotice(e)}},{key:"onMsgReadNotice",value:function(e){var t=this;e.dataList.forEach((function(e){var n;e=e.elements.groupMessageReadNotice,ut(e)||(n=t.get(11),e.forEach((function(e){var o=e.groupID,i=void 0===(i=e.topicID)?void 0:i,a=(e=e.lastMessageSeq,Ae.l("".concat(t._n,".onMsgReadNotice groupID:").concat(o," lastMessageSeq:").concat(e)),o="".concat(E.CONV_GROUP).concat(o),!0);Ve(i)||(o="".concat(E.CONV_GROUP).concat(i),a=!1),n.updateIsReadAfterReadReport({conversationID:o,lastMessageSeq:e}),n.updateUnreadCount(o,a),n.clearGroupAtInfoList(o,a)})))}))}},{key:"onReadReceiptList",value:function(e){var t=this;Ae.l("".concat(this._n,".onReadReceiptList options:"),e),e.dataList.forEach((function(e){var n=e.groupProfile,o=(e=e.elements,n=n.groupID,t.get(11));e=e.readReceiptList,o.updateReadReceiptInfo({groupID:n,readReceiptList:e})}))}},{key:"onMsgModified",value:function(e){Ae.l("".concat(this._n,".onMsgModified options:"),e);var n=this.get(11);e.dataList.forEach((function(e){n.onMessageModified(t(t({},e),{},{conversationType:E.CONV_GROUP,to:e.topicID||e.groupID}))}))}},{key:"deleteGroupSystemNotice",value:function(e){this._groupSystemNoticeHandler.deleteGroupSystemNotice(e)}},{key:"initGroupMap",value:function(e){this.groupMap.set(e.groupID,new ni(e))}},{key:"clearGroupMap",value:function(){this.groupMap.clear()}},{key:"deleteGroup",value:function(e){this.groupMap.delete(e)}},{key:"updateGroupMap",value:function(e){var t,n=this,o=this.get(11);e.forEach((function(e){t=e.groupID,n.groupMap.has(t)?n.groupMap.get(t).updateGroup(e):(n.groupMap.set(t,new ni(e)),o.deleteGroupRoamingInfo(t))}));var i,a=this.getMyUserID(),s=T(this.groupMap);try{for(s.s();!(i=s.n()).done;){var r=_(i.value,2)[1];r.selfInfo.userID=a,"Owner"===r.selfInfo.role&&(r.ownerID=a)}}catch(c){s.e(c)}finally{s.f()}}},{key:"getGroupMap",value:function(){return this.groupMap}},{key:"getLocalGroupList",value:function(){return m(this.groupMap.values()).filter((function(e){return e.type!==E.GRP_ROOM&&e.type!==E.GRP_LIVE}))}},{key:"getLocalGroupProfile",value:function(e){return this.groupMap.get(e)}},{key:"sortLocalGroupList",value:function(){var e=m(this.groupMap).filter((function(e){return(e=_(e,2))[0],!Ve(e[1].lastMessage)}));e.sort((function(e,t){return t[1].lastMessage.lastTime-e[1].lastMessage.lastTime})),this.groupMap=new Map(m(e))}},{key:"updateGroupLastMessage",value:function(e){this._commonGroupHandler.updateLastMsg(e)}},{key:"emitGroupListUpdate",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this.getLocalGroupList();e&&this.emitOEvt(S.GROUP_LIST_UPDATED),t&&(e=JSON.parse(JSON.stringify(n)),this.get(11).updateConvGroupProfile(e))}},{key:"getMyNameCardByGroupID",value:function(e){return(e=this.getLocalGroupProfile(e))?e.selfInfo.nameCard:""}},{key:"isPagingGetCompleted",value:function(){return this._commonGroupHandler.isPagingGetCompleted()}},{key:"getMsgRemindType",value:function(e){var t=this;return We(e)&&0!==e.length&&0!==(e=e.filter((function(e){return!yt(t.getLocalGroupProfile(e).type)}))).length?(Ae.l("".concat(this._n,".getMsgRemindType groupIDList:").concat(e)),this.getGroupProfileAdvance({groupIDList:e,responseFilter:{memberInfoFilter:["MsgFlag"]}}).then((function(e){e=e.data.successGroupList;var n=t.get(11);e.forEach((function(e){n.onGroupMsgRemindTypeUpdated({groupID:e.groupID,messageRemindType:We(e.members)?e.members[0].messageRemindType:""})}))}))):Promise.resolve()}},{key:"getGroupList",value:function(){return this._commonGroupHandler.getGroupList()}},{key:"syncCommunityWithTopic",value:function(){return this._commonGroupHandler.syncGroupList(!0)}},{key:"getGroupProfile",value:function(e){var t=this,n="".concat(this._n,".").concat("getGroupProfile"),o=new Jn("getGroupProfile"),i=e.groupID,a=e.groupCustomFieldFilter;return Ae.l("".concat(n," groupID:").concat(i)),a={groupIDList:[i],responseFilter:{groupBaseInfoFilter:m(U),groupCustomFieldFilter:a,memberInfoFilter:[].concat(m(x),["NameCard"])}},this.getGroupProfileAdvance(a).then((function(e){var a=(e=e.data).successGroupList;return e=e.failureGroupList,Ae.l("".concat(n," ok")),0<e.length?yn(e[0]):((e=yt(a[0].type)&&!t.hasLocalGroup(i)?new ni(a[0]):(t.updateGroupMap(a),t.getLocalGroupProfile(i))).isSupportTopic||t.get(11).updateConvGroupProfile([e]),o.setMessage("groupID:".concat(i," type:").concat(e.type," muteAllMembers:").concat(e.muteAllMembers," ownerID:").concat(e.ownerID)).end(),mn({group:e}))})).catch((function(t){return o.setError(t).setMessage("groupID:".concat(e.groupID)).end(),Ae.e("".concat(n," failed. error:"),t),yn(t)}))}},{key:"getGroupProfileAdvance",value:function(e){var n,o="".concat(this._n,".getGroupProfileAdvance"),i=(We(s=e.groupIDList)&&50<s.length&&(this.warn("GetGroupProfileLimit"),s.length=50),[]),a=[],s=(s.forEach((function(e){(It({groupID:e})?a:i).push(e)})),[]);return 0<i.length&&(n=this._getGroupProfileAdvance(t(t({},e),{},{groupIDList:i})),s.push(n)),0<a.length&&(n=this._getGroupProfileAdvance(t(t({},e),{},{groupIDList:a,relayFlag:0<i.length})),s.push(n)),Promise.all(s).then((function(e){var t=[],n=[];return e.forEach((function(e){t.push.apply(t,m(e.successGroupList)),n.push.apply(n,m(e.failureGroupList))})),mn({successGroupList:t,failureGroupList:n})})).catch((function(e){return Ae.e("".concat(o," failed. error:"),e),yn(e)}))}},{key:"_getGroupProfileAdvance",value:function(e){var t=this,n=e.relayFlag,o=void 0!==n&&n,i=h(e,yi);return this.req({P:Gn.GET_GRP_PROFILE,data:i}).then((function(e){return Ae.l("".concat(t._n,"._getGroupProfileAdvance ok. options:"),i),{successGroupList:(e=e.data.groups).filter((function(e){return ut(e.errorCode)||0===e.errorCode})),failureGroupList:e.filter((function(e){return e.errorCode&&0!==e.errorCode})).map((function(e){return new wn({code:e.errorCode,message:e.errorInfo,data:{groupID:e.groupID}})}))}})).catch((function(t){return o&&It({groupID:e.groupIDList[0]})?{successGroupList:[],failureGroupList:[]}:yn(t)}))}},{key:"createGroup",value:function(e){var n=this,o=[E.GRP_PUBLIC,E.GRP_WORK,E.GRP_MEETING,E.GRP_AVCHATROOM,E.GRP_COMMUNITY],i="".concat(this._n,".").concat("createGroup"),a=e.type,s=e.groupID;if(e.name&&!1===this._filterProfanity("name",e))return yn({code:Pn.PROFANITY_FOUND});if(e.introduction&&!1===this._filterProfanity("introduction",e))return yn({code:Pn.PROFANITY_FOUND});if(e.notification&&!1===this._filterProfanity("notification",e))return yn({code:Pn.PROFANITY_FOUND});if(!o.includes(a))return yn({code:Pn.ILLEGAL_GRP_TYPE});if(!It({type:a})){if(!Ve(s)&&It({groupID:s}))return yn({code:Pn.ILLEGAL_GRP_ID});e.isSupportTopic=void 0}if(yt(a)&&!ut(e.memberList)&&0<e.memberList.length&&(e.memberList=void 0),this._canIUseJoinOption(a)||ut(e.joinOption)||(e.joinOption=void 0),It({type:a})){if(!Ve(s)&&!It({groupID:s}))return yn({code:Pn.ILLEGAL_GRP_ID});e.isSupportTopic=!0===e.isSupportTopic?1:0}var r=new Jn("createGroup"),c=(Ae.l("".concat(i," options:"),e),null),u=[];return this.req({P:Gn.CREATE_GRP,data:t(t({},e),{},{ownerID:this.getMyUserID(),webPushFlag:1})}).then((function(o){var a,s,l,d=(o=o.data).groupID,p=void 0===(o=o.overLimitUserIDList)?[]:o;return c=d,u=p,o="groupType:".concat(e.type," groupID:").concat(d," overLimitUserIDList:").concat(p),r.setMessage(o).end(),Ae.l("".concat(i," ok. ").concat(o)),e.type===E.GRP_AVCHATROOM||e.type===E.GRP_COMMUNITY&&1===e.isSupportTopic||(Ve(e.memberList)||Ve(p)||(e.memberList=e.memberList.filter((function(e){return-1===p.indexOf(e.userID)}))),n.updateGroupMap([t(t({},e),{},{groupID:d})]),o=n.get(2),l="",a=0,e.type===E.GRP_COMMUNITY?(l=n.isIntl()?"Create Community":"创建社群",a=1):l=n.isIntl()?"Create Group":"创建群组",s=n.get(4).getMyNick(),l=o.createCustomMessage({to:d,conversationType:E.CONV_GROUP,payload:{data:JSON.stringify({businessID:"group_create",content:l,cmd:a,opUser:s||n.getMyUserID(),version:4})}}),o.sendMessageInstance(l),n.emitGroupListUpdate()),n.getGroupProfile({groupID:d})})).then((function(e){var t=(n=(e=e.data.group).selfInfo).nameCard,n=n.joinTime;return e.updateSelfInfo({nameCard:t,joinTime:n,messageRemindType:E.MSG_REMIND_ACPT_AND_NOTE,role:E.GRP_MBR_ROLE_OWNER}),mn({group:e,overLimitUserIDList:u})})).catch((function(o){var a;return r.setMessage("groupType:".concat(e.type)).setError(o).end(),10010===o.code||10007===o.code?(n._silentlyGetGroupProfile(o.code,c),n.updateGroupMap([t(t({},e),{},{groupID:c})]),(a=n.getLocalGroupProfile(c)).selfInfo.role=E.GRP_MBR_ROLE_OWNER,mn({group:a,overLimitUserIDList:u})):(Ae.e("".concat(i," failed. error:"),o),yn(o))}))}},{key:"dismissGroup",value:function(e){var t=this,n="".concat(this._n,".").concat("dismissGroup"),o="groupID:".concat(e),i=new Jn("dismissGroup");return i.setMessage(o),Ae.l("".concat(n," ").concat(o)),this.req({P:Gn.DISMISS_GRP,data:{groupID:e}}).then((function(){return i.end(),Ae.l("".concat(n," ok")),t.deleteLocalGroupAndConversation(e),t.checkJoinedAVChatRoomByID(e)&&t._AVChatRoomHandler.reset(e),t._groupAttributesHandler.deleteLocalGroupAttributes(e),mn({groupID:e})})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"updateGroupProfile",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("updateGroupProfile");return this.hasLocalGroup(e.groupID)&&(t=this.getLocalGroupProfile(e.groupID).type,this._canIUseJoinOption(t)||ut(e.joinOption)||(Ae.w("".concat(i," joinOption is unavailable for Work/Meeting/AVChatRoom")),e.joinOption=void 0)),ut(e.muteAllMembers)||(e.muteAllMembers?e.muteAllMembers="On":e.muteAllMembers="Off"),e.name&&!1===this._filterProfanity("name",e)||e.introduction&&!1===this._filterProfanity("introduction",e)||e.notification&&!1===this._filterProfanity("notification",e)?yn({code:Pn.PROFANITY_FOUND}):((n=new Jn("updateGroupProfile")).setMessage(JSON.stringify(e)),Ae.l("".concat(i," groupID:").concat(e.groupID)),this.req({P:Gn.UPDATE_GRP_PROFILE,data:e}).then((function(){return n.end(),Ae.l("".concat(i," ok")),o.hasLocalGroup(e.groupID)&&o.groupMap.get(e.groupID).updateGroup(e),mn({group:o.groupMap.get(e.groupID)})})).catch((function(e){return n.setError(e).end(),Ae.l("".concat(i," failed. error:"),e),yn(e)})))}},{key:"_filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],G)).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"joinGroup",value:function(e){var t,n=this,o=e.groupID,i="".concat(this._n,".joinGroup");return this.deleteUnjoinedAVChatRoom(o),this.hasLocalGroup(o)?this.isLoggedIn()?(t=new Jn("applyJoinGroup"),this.getGroupProfile({groupID:o}).then((function(){return t.setMessage("groupID:".concat(o," joinedStatus:").concat(E.JOIN_STATUS_ALREADY_IN_GROUP)).end(),vn({status:E.JOIN_STATUS_ALREADY_IN_GROUP})})).catch((function(a){return t.setMessage("groupID:".concat(o," unjoined")).end(),Ae.w("".concat(i," ").concat(o," was unjoined, now join!")),n.groupMap.delete(o),n.applyJoinGroup(e)}))):vn({status:E.JOIN_STATUS_ALREADY_IN_GROUP}):(Ae.l("".concat(i," groupID:").concat(o)),this.isLoggedIn()?this.applyJoinGroup(e):this._AVChatRoomHandler.joinWithoutAuth(e))}},{key:"applyJoinGroup",value:function(e){var n,o,i=this,a="".concat(this._n,".").concat("applyJoinGroup"),s=e.groupID;return Ve(e.applyMessage)||!1!==this._filterProfanity("applyMessage",e)?(n=new Jn("applyJoinGroup"),e=t({},e),(o=this.canIUse(N.AV_HISTORY_MSG))&&(e.historyMessageFlag=1),this.get(11).deleteTopicRoamingInfo(s),this.req({P:Gn.APPLY_JOIN_GRP,data:e}).then((function(e){var t=(e=e.data).joinedStatus,r=e.longPollingKey,c=e.startSeq,u=e.avChatRoomFlag,l=e.avChatRoomKey,d=e.messageList;switch(e="groupID:".concat(s," joinedStatus:").concat(t," longPollingKey:").concat(r," startSeq:").concat(c)+" avChatRoomFlag:".concat(u," canGetAVChatRoomHistoryMsg:").concat(o,",")+" historyMsgCount:".concat(Ve(d)?0:d.length),n.setMessage(e).end(),Ae.l("".concat(a," ok. ").concat(e)),t){case xe:return mn({status:xe});case Ue:return i.getGroupProfile({groupID:s}).then((function(e){return e=e.data.group,i._handleJoinResult({group:e,avChatRoomFlag:u,longPollingKey:r,startSeq:c,avChatRoomKey:l,messageList:d})})).catch((function(e){var t;return 10010===e.code||10007===e.code?(i._silentlyGetGroupProfile(e.code,s),t=new ni({groupID:s}),i.updateGroupMap([t]),i._handleJoinResult({group:t,avChatRoomFlag:u,longPollingKey:r,startSeq:c,avChatRoomKey:l,messageList:d})):(Ae.e("".concat(a," failed. error:"),e),yn(e))}));default:var p=new wn({code:Pn.JOIN_GRP_FAIL});return Ae.e("".concat(a," failed. error:"),p),yn(p)}})).catch((function(e){return n.setMessage("groupID:".concat(s)).setError(e).end(),Ae.e("".concat(a," failed. error:"),e),yn(e)}))):yn({code:Pn.PROFANITY_FOUND})}},{key:"_handleJoinResult",value:function(e){var t=this,n=e.group,o=e.avChatRoomFlag,i=e.longPollingKey,a=e.startSeq,s=e.avChatRoomKey,r=e.messageList,c=n.groupID;return 1===o?(this.get(11).setCompleted("".concat(E.CONV_GROUP).concat(c)),this._groupAttributesHandler.initGroupAttributesCache({groupID:c,avChatRoomKey:s}),this._groupCountersHandler.initGroupCountersCache({groupID:c,avChatRoomKey:s}),(e=ut(i)?this._AVChatRoomHandler.handleJoinResult({group:n}):this._AVChatRoomHandler.startRunLoop({group:n,longPollingKey:i,startSeq:a})).then((function(){t._onAVChatRoomHistoryMessage(r,c)})),e):(this.emitGroupListUpdate(!0,!1),mn({status:Ue,group:n}))}},{key:"quitGroup",value:function(e){var t,n=this,o="".concat(this._n,".").concat("quitGroup"),i="groupID:".concat(e),a=(Ae.l("".concat(o," ").concat(i)),this.checkJoinedAVChatRoomByID(e));return a||this.hasLocalGroup(e)?a&&!this.isLoggedIn()?(Ae.l("".concat(o," anonymously ok. ").concat(i)),this.deleteLocalGroupAndConversation(e),this._AVChatRoomHandler.reset(e),vn({groupID:e})):((t=new Jn("quitGroup")).setMessage(i),this.req({P:Gn.QUIT_GRP,data:{groupID:e}}).then((function(){return t.end(),Ae.l("".concat(o," ok")),n.deleteLocalGroupAndConversation(e),a&&n._AVChatRoomHandler.reset(e),n._groupAttributesHandler.deleteLocalGroupAttributes(e),mn({groupID:e})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)}))):yn({code:Pn.MEMBER_NOT_IN_GRP})}},{key:"searchGroupByID",value:function(e){var t="".concat(this._n,".").concat("searchGroupByID"),n={groupIDList:[e]},o=new Jn("searchGroupByID");return o.setMessage("groupID:".concat(e)),Ae.l("".concat(t," groupID:").concat(e)),this.req({P:Gn.SEARCH_GRP,data:n}).then((function(e){if(0!==(e=e.data.groupProfile)[0].errorCode)throw new wn({code:e[0].errorCode,message:e[0].errorInfo});return o.end(),Ae.l("".concat(t," ok")),mn({group:new ni(e[0])})})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"changeGroupOwner",value:function(e){var t,n=this,o="".concat(this._n,".").concat("changeGroupOwner");return this.hasLocalGroup(e.groupID)&&this.getLocalGroupProfile(e.groupID).type===E.GRP_AVCHATROOM?yn({code:Pn.CANNOT_CHANGE_OWNER_IN_AV}):e.newOwnerID===this.getMyUserID()?yn({code:Pn.CANNOT_CHANGE_OWNER_TO_SELF}):((t=new Jn("changeGroupOwner")).setMessage("groupID:".concat(e.groupID," newOwnerID:").concat(e.newOwnerID)),Ae.l("".concat(o," groupID:").concat(e.groupID)),this.req({P:Gn.CHANGE_GRP_OWNER,data:e}).then((function(){t.end(),Ae.l("".concat(o," ok"));var i,a=e.groupID,s=e.newOwnerID,r=(n.groupMap.get(a).ownerID=s,n._groupMemberHandler.getLocalGroupMemberList(a));return r instanceof Map&&(i=r.get(n.getMyUserID()),ut(i)||(i.updateRole("Member"),n.groupMap.get(a).selfInfo.role="Member"),i=r.get(s),ut(i)||i.updateRole("Owner")),n.emitGroupListUpdate(!0,!1),mn({group:n.groupMap.get(a)})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)})))}},{key:"getGroupApplicationList",value:function(){return this._groupSystemNoticeHandler.getGroupApplicationList()}},{key:"handleGroupApplication",value:function(e){var t,n,o,i,a,s=this,r="".concat(this._n,".").concat("handleGroupApplication"),c=e.handleAction,u=e.handleMessage,l=e.message,d=e.application,p=(l?(t=l.payload.operatorID,n=l.payload.groupProfile.groupID,o=l.payload.authentication,i=l.payload.messageKey):d&&(t=d.applicant,n=d.groupID,o=d.authentication,i=d.messageKey),Gn.HANDLE_GRP_APPLICATION),h=(d&&2===d.applicationType&&(p=Gn.HANDLE_INVITE_JOIN_GRP,a=d.userID),new Jn("handleGroupApplication"));return h.setMessage("groupID:".concat(n)),Ae.l("".concat(r," groupID:").concat(n)),this.req({P:p,data:{handleAction:c,handleMessage:u,applicant:t,invitee:a,groupID:n,authentication:o,messageKey:i}}).then((function(){return h.end(),Ae.l("".concat(r," ok")),l&&s._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),mn({group:s.getLocalGroupProfile(n)})})).catch((function(e){return h.setError(e).end(),Ae.e("".concat(r," failed. error"),e),yn(e)}))}},{key:"handleGroupInvitation",value:function(e){var n=this,o="".concat(this._n,".").concat("handleGroupInvitation"),i=(r=e.message.payload).groupProfile.groupID,a=r.authentication,s=r.messageKey,r=r.operatorID,c=e.handleAction,u=new Jn("handleGroupInvitation");return u.setMessage("groupID:".concat(i," inviter:").concat(r," handleAction:").concat(c)),Ae.l("".concat(o," groupID:").concat(i," inviter:").concat(r," handleAction:").concat(c)),this.req({P:Gn.HANDLE_GRP_INVITATION,data:t(t({},e),{},{inviter:r,groupID:i,authentication:a,messageKey:s})}).then((function(){return u.end(),Ae.l("".concat(o," ok")),n._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[e.message]}),mn({group:n.getLocalGroupProfile(i)})})).catch((function(e){return u.setError(e).end(),Ae.e("".concat(o," failed. error"),e),yn(e)}))}},{key:"getGroupOnlineMemberCount",value:function(e){var t=this,n="".concat(this._n,".getGroupOnlineMemberCount"),o=this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e),i=this.hasLocalGroup(e);if(Ae.l("".concat(n," groupID:").concat(e," isAVChatRoom:").concat(o," has:").concat(i)),o)return this._AVChatRoomHandler.getGroupOnlineMemberCount(e);if(!i)return vn({memberCount:0});if(o=Date.now(),this._onlineMemberCountMap.has(e)){if(o-(i=this._onlineMemberCountMap.get(e)).lastReqTime<=6e4)return vn({memberCount:i.memberCount});i.lastReqTime=o}return this.requestOnlineCount(e).then((function(o){return o=void 0===(o=o.data.memberCount)?0:o,t._onlineMemberCountMap.set(e,{lastReqTime:Date.now(),memberCount:o}),Ae.l("".concat(n," ok. groupID:").concat(e," memberCount:").concat(o)),vn({memberCount:o})})).catch((function(e){return Ae.w("".concat(n," failed. error:"),e),Promise.reject(e)}))}},{key:"requestOnlineCount",value:function(e){return this.req({P:Gn.GET_ONLINE_MBR_NUM,data:{groupID:e}})}},{key:"hasLocalGroup",value:function(e){return this.groupMap.has(e)}},{key:"deleteLocalGroupAndConversation",value:function(e){var t=this.checkJoinedAVChatRoomByID(e),n=(Ae.l("".concat(this._n,".deleteLocalGroupAndConversation groupID:").concat(e," isJoinedAVChatRoom:").concat(t)),this.get(11)),o="".concat(E.CONV_GROUP).concat(e);t&&(this.stopMessageLongPolling({groupID:e}),n.deleteLocalConv(o)),It({groupID:e})&&(t=this.getLocalGroupProfile(e))&&!0===t.isSupportTopic&&this.get(10).deleteTopicListInCommunity(e),n.clearUnreadCount(o),n.setCompleted(o),this._deleteLocalGroup(e),this._onlineMemberCountMap.delete(e),this.emitGroupListUpdate(!0,!1)}},{key:"_deleteLocalGroup",value:function(e){this.groupMap.delete(e),this._groupMemberHandler.deleteGroupMemberList(e)}},{key:"sendMessage",value:function(e,t){return We(e._receiverList)&&0<e._receiverList.length&&!this.canIUse(N.MSG_TO_SPECIFIED_GRP_MBR)?this.noUse("Targeted Group Message"):(e=this.createGroupMessagePack(e,t),this.req(e))}},{key:"createGroupMessagePack",value:function(e,t){var n=null,o=(t&&t.offlinePushInfo&&(n=t.offlinePushInfo),""),i=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(o=e.cloudCustomData),[]),a=void(ze(t)&&ze(t.messageControlInfo)&&(a=(r=t.messageControlInfo).excludedFromUnreadCount,s=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===a&&i.push("NoUnread"),!0===s&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck")),s=(We(e._receiverList)&&0<e._receiverList.length&&(a=e._receiverList,50<e._receiverList.length)&&(a=e._receiverList.slice(0,50),this.warn("ReceiverListLimit")),this.isOnlineMessage(e,t)?1:0),r=JSON.parse(JSON.stringify(e.getElements())),c=(t=this.get(17).getFileDNList(),e.getGroupAtInfoList());return r={fromAccount:this.getMyUserID(),groupID:e.to,msgBody:io(e.type,r,t),cloudCustomData:o,random:e.random,priority:e.priority,clientSequence:e.clientSequence,groupAtInfo:e.type!==E.MSG_TEXT||Ve(c)?void 0:c,onlineOnlyFlag:s,clientTime:e.clientTime,offlinePushInfo:No(n),messageControlInfo:0==s?i:void 0,needReadReceipt:!0!==e.needReadReceipt||this.isMessageFromOrToAVChatroom(e.to)?0:1,receiverList:a,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0,cmConfigID:e._cmConfigID},Mt(e.to)&&(r.groupID=Gt(e.to),r.topicID=e.to),{P:Gn.SEND_GRP_MSG,data:r}}},{key:"revokeMessage",value:function(e){var t={groupID:e.to,msgSeqList:[{msgSeq:e.sequence}]};return Mt(e.to)&&(t.groupID=Gt(e.to),t.topicID=e.to),this.req({P:Gn.REVOKE_GRP_MSG,data:t})}},{key:"deleteMessage",value:function(e){var t=e.to;return e=e.keyList,Ae.l("".concat(this._n,".deleteMessage groupID:").concat(t," count:").concat(e.length)),e={groupID:t,deleter:this.getMyUserID(),keyList:e},Mt(t)&&(e.groupID=Gt(t),e.topicID=t),this.req({P:Gn.DEL_GRP_MSG,data:e})}},{key:"modifyRemoteMessage",value:function(e){var t=e.to,n=e.sequence,o=e.payload,i=e.type,a=void 0===(a=e.version)?0:a,s=e.cloudCustomData,r=(e=e._elements,t),c=void 0;return t=void(Mt(t)&&(r=Gt(t),c=t)),xt(i)&&(1<e.length&&e.splice(0,1,{type:i,content:o}),t=e),this.req({P:Gn.MODIFY_GRP_MSG,data:{groupID:r,topicID:c,sequence:n,version:a,elements:t,cloudCustomData:s}})}},{key:"getRoamingMessage",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessage"),o=e.conversationID,i=e.groupID,a=(e=e.sequence,new Jn("getRoamingMessage")),s=0,r=void 0;return Mt(i)&&(i=Gt(r=i)),this._computeLastSequence({groupID:i,topicID:r,sequence:e}).then((function(e){return s=e,Ae.l("".concat(n," groupID:").concat(i," startSequence:").concat(s)),t.req({P:Gn.GET_GRP_ROAMING_MSG,data:{groupID:i,count:21,sequence:s,topicID:r}})})).then((function(e){var c=(l=e.data).messageList,u=l.complete,l=void 0===(l=l.invisibleSequenceList)?[]:l,d=(e=void 0===(e=e.data.nextSequence)?0:e,ut(c)?Ae.l("".concat(n," ok. complete:").concat(u," nextSequence:").concat(e," but messageList is undefined!")):Ae.l("".concat(n," ok. complete:").concat(u," nextSequence:").concat(e," count:").concat(c.length)),a.setMessage("groupID:".concat(i," topicID:").concat(r," startSequence:").concat(s," complete:").concat(u," nextSequence:").concat(e)).end(),t.get(11)),p=[],h=[];return Ve(c)||(p=d.onRoamingMessage(c,o,!0,h),d.updateIsRead(o),d.patchConvLastMessage(o)),(c=2===u||e<1)&&(d.setCompleted(o),e=""),Ae.l("".concat(n," isPullingCompleted:").concat(c," nextReqID:").concat(e," storedMsgCount:").concat(p.length)+" invisibleSeqCount:".concat(l.length)),{nextReqID:e+"",storedMessageList:p,assembledMessageList:h,isPullingCompleted:c}})).catch((function(e){return a.setError(e).setMessage("groupID:".concat(i," topicID:").concat(r," startSequence:").concat(s)).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_getGroupIDOfMessage",value:function(e){return e.conversationID.replace(E.CONV_GROUP,"")}},{key:"getReadReceiptList",value:function(e){var t,n="".concat(this._n,".").concat("getReadReceiptList"),o=this._getGroupIDOfMessage(e[0]),i=this.getMyUserID(),a=e.filter((function(e){return e.from===i&&!0===e.needReadReceipt})).map((function(e){return{sequence:e.sequence}}));return Ae.l("".concat(n," groupID:").concat(o," sequenceList:").concat(JSON.stringify(a))),0===a.length?vn({messageList:e}):((t=new Jn("getReadReceiptList")).setMessage("groupID:".concat(o)),this.req({P:Gn.GET_READ_RECEIPT,data:{groupID:o,sequenceList:a}}).then((function(o){return t.end(),Ae.l("".concat(n," ok")),We(o=o.data.readReceiptList)&&o.forEach((function(t){e.forEach((function(e){0===t.code&&t.sequence===e.sequence&&(e.readReceiptInfo.readCount=t.readCount,e.readReceiptInfo.unreadCount=t.unreadCount)}))})),mn({messageList:e})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)})))}},{key:"sendReadReceipt",value:function(e){var t="".concat(this._n,".").concat("sendReadReceipt"),n=this._getGroupIDOfMessage(e[0]),o=new Jn("sendReadReceipt"),i=(o.setMessage("groupID:".concat(n)),this.getMyUserID());return 0===(e=e.filter((function(e){return e.from!==i&&!0===e.needReadReceipt})).map((function(e){return{sequence:e.sequence}}))).length?yn({code:Pn.READ_RECEIPT_MSG_LIST_EMPTY}):(Ae.l("".concat(t,". sequenceList:").concat(JSON.stringify(e))),this.req({P:Gn.SEND_READ_RECEIPT,data:{groupID:n,sequenceList:e}}).then((function(e){return o.end(),Ae.l("".concat(t," ok")),mn()})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)})))}},{key:"getReadReceiptDetail",value:function(e){var t=this,n=e.message,o=e.filter,i=e.cursor,a=(e=e.count,this._getGroupIDOfMessage(n)),s=n.ID,r=(n=n.sequence,"".concat(this._n,".").concat("getReadReceiptDetail")),c=this._receiptDetailCompleteMap.get(s)||!1,u=0!==o&&1!==o?0:o,l=(o=ct(i)?i:"",i=!Ke(e)||e<=0||100<=e?100:e,e="groupID:".concat(a," sequence:").concat(n," cursor:").concat(o," filter:").concat(u," completeFlag:").concat(c),Ae.l("".concat(r," ").concat(e)),{cursor:"",isCompleted:!1,messageID:s,unreadUserIDList:[],readUserIDList:[]}),d=new Jn("getReadReceiptDetail");return d.setMessage(e),this.req({P:Gn.GET_READ_RECEIPT_DETAIL,data:{groupID:a,sequence:n,flag:u,cursor:o,count:i}}).then((function(e){d.end();var n=(e=e.data).cursor,o=e.isCompleted,i=e.unreadUserIDList;return e=e.readUserIDList,l.cursor=n,1===o&&(l.isCompleted=!0,t._receiptDetailCompleteMap.set(s,!0)),0===u?l.readUserIDList=e.map((function(e){return e.userID})):1===u&&(l.unreadUserIDList=i.map((function(e){return e.userID}))),Ae.l("".concat(r," ok")),mn(l)})).catch((function(e){return d.setError(e).end(),Ae.w("".concat(r," failed. error:"),e),yn(e)}))}},{key:"getRoamingMessagesHopping",value:function(e){var t=this,n="".concat(this._n,".").concat("getRoamingMessagesHopping"),o=e.groupID,i=e.count,a=e.sequence,s=e.direction,r=void 0;return ut(a)&&1===s?vn({messageList:[],isCompleted:!0,nextMessageSeq:""}):(Mt(o)&&(o=Gt(r=o)),this._computeReqSeqHopping({groupID:o,topicID:r,sequence:a}).then((function(c){ut(a)||1!==s||(c=a+i-1);var u="".concat(r?"topicID:".concat(r):"groupID:".concat(o)," sequence:").concat(a," reqSeq:").concat(c," direction:").concat(s),l=(Ae.l("".concat(n," ").concat(u)),new Jn("getRoamingMessagesHopping"));return t.req({P:Gn.GET_GRP_ROAMING_MSG,data:{groupID:o,topicID:r,count:i,sequence:c}}).then((function(o){var i=void 0===(i=(o=o.data).messageList)?[]:i,r=o.complete,c=void 0===(c=o.nextSequence)?0:c,d=(o=void 0===(o=o.invisibleSequenceList)?[]:o,"complete:".concat(r," nextSequence:").concat(c," remoteMsgCount:").concat(i.length," invisibleSequenceList:").concat(o)),p=(l.setMessage("".concat(u," ").concat(d)).end(),Ae.l("".concat(n," ok. ").concat(d)),d="".concat(E.CONV_GROUP).concat(e.groupID),t.get(11));return d=p.onRoamingMessage(i,d,!1),i=t._computeResult({groupID:e.groupID,direction:s,sequence:a,remoteMessageList:i,processedMessageList:d,complete:r,nextSequence:c,invisibleSequenceList:o}),p.storeHoppingMessageList(i.messageList),mn(i)})).catch((function(e){return l.setError(e).setMessage("groupID:".concat(o," sequence:").concat(a," count:").concat(i)).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))})))}},{key:"_computeReqSeqHopping",value:function(e){var t=this,n=e.groupID,o=void 0===(o=e.topicID)?void 0:o;return 0<(e=void 0===(e=e.sequence)?void 0:e)?Promise.resolve(e):ut(o)?this.getGroupProfileAdvance({groupIDList:[n],responseFilter:{groupBaseInfoFilter:["NextMsgSeq"]}}).then((function(e){var o=0;return Ve(e=e.data.successGroupList)||(o=e[0].nextMessageSeq-1),Ae.l("".concat(t._n,"._computeReqSeqHopping groupID:").concat(n," lastSequence:").concat(o," from remote")),o})).catch((function(e){return yn(e)})):Promise.resolve(0)}},{key:"_computeResult",value:function(e){var t={messageList:[],isCompleted:!1,nextMessageSeq:""},n=e.groupID,o=e.direction,i=e.sequence,a=void 0===(a=e.remoteMessageList)?[]:a,s=void 0===(s=e.processedMessageList)?[]:s,r=e.complete,c=e.nextSequence;if(e=e.invisibleSequenceList,0===o)return t.nextMessageSeq=c,(2===r||c<1)&&(t.isCompleted=!0,t.nextMessageSeq=""),t.messageList=s,t;if(1===o){if(Ve(a)){if(Ve(e))return t.isCompleted=!0,t.nextMessageSeq="",t;t.nextMessageSeq=e[0]+1}else r=a[0].sequence,c=e[0]||0,t.nextMessageSeq=c<r?r+1:c+1;return s.forEach((function(e){e.sequence>=i&&t.messageList.push(e)})),(It({groupID:n})||Mt(n))&&0===t.messageList.length&&a[0].sequence<i&&(t.isCompleted=!0,t.nextMessageSeq=""),t}}},{key:"setMessageRead",value:function(e){var t=this,n=e.conversationID,o=e.lastMessageSeq,i="".concat(this._n,".").concat("setMessageRead"),a=(e="convID:".concat(n," lastMessageSeq:").concat(o),Ae.l("".concat(i," ").concat(e)),Ke(o)||this.warn("DoNotModifyLastSeq"),new Jn("setMessageRead")),s=(a.setMessage(e),n.replace(E.CONV_GROUP,"")),r=void 0;return Mt(s)&&(s=Gt(r=s)),this.req({P:Gn.SET_GRP_MSG_READ,data:{groupID:s,topicID:r,messageReadSeq:o}}).then((function(){a.end(),Ae.l("".concat(i," ok"));var e,c=t.get(11),u=(c.updateIsReadAfterReadReport({conversationID:n,lastMessageSeq:o}),!0);return!ut(r)&&(u=!1,e=t.get(10).getLocalTopic(s,r))&&e.updateSelfInfo({readedSequence:o}),c.updateUnreadCount(n,u),mn()})).catch((function(e){return a.setError(e).end(),Ae.l("".concat(i," failed. error:"),e),yn(e)}))}},{key:"_computeLastSequence",value:function(e){var t=e.groupID,n=void 0===(n=e.topicID)?void 0:n;return 0<(e=e.sequence)?Promise.resolve(e):ut(n)?this.getGroupLastSequence(t):Promise.resolve(0)}},{key:"getGroupLastSequence",value:function(e){var t="".concat(this._n,".").concat("getGroupLastSequence"),n=new Jn("getGroupLastSequence"),o=0,i="",a="groupID:".concat(e);if(this.hasLocalGroup(e)){var s=this.getLocalGroupProfile(e),r=s.lastMessage;if(0<r.lastSequence&&!1===r.onlineOnlyFlag)return o=r.lastSequence,i="".concat(a,", ").concat(o," from group.lastMessage.lastSequence"),Ae.l("".concat(t," ").concat(i)),n.setMessage(i).end(),Promise.resolve(o);if(1<s.nextMessageSeq)return o=s.nextMessageSeq-1,i="".concat(a,", ").concat(o," from group.nextMessageSeq"),Ae.l("".concat(t," ").concat(i)),n.setMessage(i).end(),Promise.resolve(o)}return(r=this.get(11).getLocalConversation("GROUP".concat(e)))&&r.lastMessage.lastSequence&&!1===r.lastMessage.onlineOnlyFlag?(o=r.lastMessage.lastSequence,i="".concat(a,", ").concat(o," from conversation.lastMessage.lastSequence"),Ae.l("".concat(t," ").concat(i)),n.setMessage(i).end(),Promise.resolve(o)):this.getGroupProfileAdvance({groupIDList:[e],responseFilter:{groupBaseInfoFilter:["NextMsgSeq"]}}).then((function(e){return Ve(e=e.data.successGroupList)?Ae.w("".concat(t," ").concat(a,", empty successGroupList")):(o=e[0].nextMessageSeq-1,i="".concat(a,", ").concat(o," from remote"),Ae.l("".concat(t," ").concat(i))),n.setMessage(i).end(),o})).catch((function(e){return n.setError(e).setMessage(a).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"isMessageFromOrToAVChatroom",value:function(e){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(e)}},{key:"hasJoinedAVChatRoom",value:function(){return this._AVChatRoomHandler.hasJoinedAVChatRoom()}},{key:"getJoinedAVChatRoom",value:function(){return this._AVChatRoomHandler.getJoinedAVChatRoom()}},{key:"getGroupRemoteLastSeq",value:function(e){return(e=this.getLocalGroupProfile(e))?e.nextMessageSeq-1:1}},{key:"isOnlineMessage",value:function(e,t){return!(!this._canIUseOnlineOnlyFlag(e)||!t||!0!==t.onlineUserOnly)}},{key:"_canIUseOnlineOnlyFlag",value:function(e){var t=this.getJoinedAVChatRoom();return!t||!t.includes(e.to)||e.conversationType!==E.CONV_GROUP}},{key:"_onAVChatRoomHistoryMessage",value:function(e,n){var o;Ve(e)||(Ae.l("".concat(this._n,"._onAVChatRoomHistoryMessage groupID:").concat(n," count:").concat(e.length)),o=[],e.forEach((function(e){o.push(t(t({},e),{},{isHistoryMessage:1}))})),this.onAVChatRoomMessage(o,n))}},{key:"onAVChatRoomMessage",value:function(e){this._AVChatRoomHandler.onMessage(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"")}},{key:"onAVChatRoomMemberBanned",value:function(e){this._AVChatRoomHandler.onAVChatRoomMemberBanned(e)}},{key:"setUnjoinedAVChatRoom",value:function(e){this._unjoinedAVChatRoomList.set(e,1)}},{key:"deleteUnjoinedAVChatRoom",value:function(e){this._unjoinedAVChatRoomList.has(e)&&this._unjoinedAVChatRoomList.delete(e)}},{key:"isUnjoinedAVChatRoom",value:function(e){return this._unjoinedAVChatRoomList.has(e)}},{key:"isGroupAttributesUpdatedNotice",value:function(e){return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(e)}},{key:"updateLocalMainSequenceOnReconnected",value:function(){this._groupAttributesHandler.updateLocalMainSequenceOnReconnected()}},{key:"initGroupAttributes",value:function(e){return this._groupAttributesHandler.initGroupAttributes(e)}},{key:"setGroupAttributes",value:function(e){return this._groupAttributesHandler.setGroupAttributes(e)}},{key:"deleteGroupAttributes",value:function(e){return this._groupAttributesHandler.deleteGroupAttributes(e)}},{key:"getGroupAttributes",value:function(e){return this._groupAttributesHandler.getGroupAttributes(e)}},{key:"isMessageFromTopic",value:function(e,t){return 2===e&&!Ve(t)}},{key:"isMessageFromCommunityOfTopic",value:function(e,t){return 2===e&&Ve(t)}},{key:"getMessageExtensions",value:function(e,t){return Ae.l("".concat(this._n,".getMessageExtensions startSequence:").concat(t)),this.req({P:Gn.GET_GRP_MSG_EXT,data:{groupID:e.to,messageSequence:e.sequence,startSequence:t}})}},{key:"modifyMsgExts",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return Ae.l("".concat(this._n,".modifyMsgExts operateType:").concat(n)),this.req({P:Gn.MODIFY_GRP_MSG_EXT,data:{groupID:e.to,messageSequence:e.sequence,extensionList:t,operateType:n}})}},{key:"_genNotifyReqList",value:function(e){for(var t,n,o,i,a=[],s=0,r=e.length;s<r;s++)t=e[s],i=this.getLocalGroupProfile(t).type,n=this._getGroupLastRevokedTime(t),o=1e3*De(),i={notifyType:1,limit:20,type:It({type:i,groupID:t})?E.GRP_COMMUNITY:void 0,groupID:t,beginTime:n,endTime:o},a.push(i);return a}},{key:"getNotice",value:function(e){var t=this,n="".concat(this._n,".getNotice");0!==(e=e.filter((function(e){var n;return!!t.hasLocalGroup(e)&&(n=(e=t.getLocalGroupProfile(e)).type,e=e.isSupportTopic,!yt(n))&&!e}))).length&&(Ae.l("".concat(n," list:").concat(e)),this.req({P:Gn.GET_GRP_NOTIFY,data:{notifyReqList:this._genNotifyReqList(e)}}).then((function(e){e=e.data.notifyRspList;var o,i,a=[];We(e)&&(o={dataList:[]},i="".concat(n," ok."),e.forEach((function(e){var n=e.nextRevokedTime,s=e.groupID,r=e.notifyList;i+=" groupID:".concat(s," nextRevokedTime:").concat(n," count:").concat(r.length,"\n"),o.dataList.push({elements:{revokedInfos:t._genRevokedInfos(e)}}),0!==n?(t._setGroupLastRevokedTime(s,n),a.push(s)):t._setGroupLastRevokedTime(s,1e3*De())})),Ae.l(i),t.onMsgRevoked(o,!1)),0<a.length&&t.getNotice(a)})).catch((function(e){Ae.e("".concat(n," failed. error:"),e)})))}},{key:"_genRevokedInfos",value:function(e){var n=e.notifyList,o=e.groupID,i=[];return We(n)&&n.forEach((function(e){i.push({groupID:o,sequence:e.sequence,random:e.random,revokerInfo:t({},e.revokerInfo)})})),i}},{key:"_getGroupLastRevokedTime",value:function(e){return this.hasLocalGroup(e)?this.getLocalGroupProfile(e)._lastRevokedTime:0}},{key:"_setGroupLastRevokedTime",value:function(e,t){this.hasLocalGroup(e)&&(this.getLocalGroupProfile(e)._lastRevokedTime=t)}},{key:"isGroupCountersNotice",value:function(e){return this._groupCountersHandler.isGroupCountersNotice(e)}},{key:"setGroupCounters",value:function(e){return this._groupCountersHandler.setGroupCounters(e)}},{key:"increaseGroupCounter",value:function(e){return this._groupCountersHandler.increaseGroupCounter(e)}},{key:"decreaseGroupCounter",value:function(e){return this._groupCountersHandler.decreaseGroupCounter(e)}},{key:"getGroupCounters",value:function(e){return this._groupCountersHandler.getGroupCounters(e)}},{key:"getGroupMemberHandler",value:function(){return this._groupMemberHandler}},{key:"getGroupMemberList",value:function(e){return this._groupMemberHandler.getGroupMemberList(e)}},{key:"getGroupMemberProfile",value:function(e){return this._groupMemberHandler.getGroupMemberProfile(e)}},{key:"addGroupMember",value:function(e){return this._groupMemberHandler.addGroupMember(e)}},{key:"deleteGroupMember",value:function(e){return this._groupMemberHandler.deleteGroupMember(e)}},{key:"setGroupMemberMuteTime",value:function(e){return this._groupMemberHandler.setGroupMemberMuteTime(e)}},{key:"setGroupMemberRole",value:function(e){return this._groupMemberHandler.setGroupMemberRole(e)}},{key:"setGroupMemberNameCard",value:function(e){return this._groupMemberHandler.setGroupMemberNameCard(e)}},{key:"setGroupMemberCustomField",value:function(e){return this._groupMemberHandler.setGroupMemberCustomField(e)}},{key:"markGroupMemberList",value:function(e){return this._groupMemberHandler.markGroupMemberList(e)}},{key:"modifyGroupMemberInfo",value:function(e){return this._groupMemberHandler.modifyGroupMemberInfo(e)}},{key:"restartPolling",value:function(){this._AVChatRoomHandler.restartPolling()}},{key:"getPollingTimerID",value:function(e){var t;return e&&(t=this.getLocalGroupProfile(e))&&yt(t.type)?this._AVChatRoomHandler.getPollingTimerID(e):-1}},{key:"_canIUseJoinOption",value:function(e){return e===E.GRP_PUBLIC||It({type:e})}},{key:"_silentlyGetGroupProfile",value:function(e,t){var n=setTimeout(this.getGroupProfile.bind(this,{groupID:t}),3e3);this._timeoutIDs.push(n),Ae.l("".concat(this._n,"._silentlyGetGroupProfile errorCode:").concat(e," groupID:").concat(t," timeoutIDs:").concat(this._timeoutIDs))}},{key:"_clearTimeoutIDs",value:function(){this._timeoutIDs.forEach((function(e){clearTimeout(e)})),this._timeoutIDs=[]}},{key:"startMessageLongPolling",value:function(e){var t=e.groupID,n=e.longPollingKey,o=(e=void 0===(e=e.longPollingSequence)?1:e,this.get(12).isUnlimitedAVChatRoom()),i=(this._AVChatRoomHandler.hasPollingInstance(t)&&this.stopMessageLongPolling({groupID:t}),this._AVChatRoomHandler.getJoinedLiveList());return!o&&0<i.length&&this.stopMessageLongPolling({groupID:i[0]}),o=new ni({groupID:t,type:E.GRP_LIVE}),Ae.l("".concat(this._n,".startMessageLongPolling groupID:").concat(t," longPollingKey:").concat(n," longPollingSequence:").concat(e)),this._AVChatRoomHandler.startRunLoop({group:o,longPollingKey:n,startSeq:e})}},{key:"stopMessageLongPolling",value:function(e){e=e.groupID;var t=this.get(11);return this._AVChatRoomHandler.reset(e),this._deleteLocalGroup(e),t.deleteLocalConv("".concat(E.CONV_GROUP).concat(e)),Ae.l("".concat(this._n,".stopMessageLongPolling ok, groupID:").concat(e)),vn({groupID:e})}},{key:"reset",value:function(){this.groupMap.clear(),this._unjoinedAVChatRoomList.clear(),this._receiptDetailCompleteMap.clear(),this._onlineMemberCountMap.clear(),this._commonGroupHandler.reset(),this._groupSystemNoticeHandler.reset(),this._groupTipsHandler.reset(),this._groupAttributesHandler.reset(),this._groupCountersHandler.reset(),this._AVChatRoomHandler.reset(),this._groupMemberHandler.reset(),this._clearTimeoutIDs()}}]),qi),Mi=["topicID","topicName","avatar","introduction","notification","unreadCount","muteAllMembers","customData","groupAtInfoList","nextMessageSeq","selfInfo"],Ci=(a(Fi,[{key:"_initTopic",value:function(e){for(var t in e)Mi.indexOf(t)<0||("selfInfo"===t?this.updateSelfInfo(e[t]):this[t]="muteAllMembers"===t?1===e[t]:e[t])}},{key:"updateUnreadCount",value:function(){this.unreadCount=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0}},{key:"updateNextMessageSeq",value:function(e){this.nextMessageSeq=e}},{key:"updateLastMessage",value:function(e){this.lastMessage=jo(e)}},{key:"updateGroupAtInfoList",value:function(e){this.groupAtInfoList=JSON.parse(JSON.stringify(e))}},{key:"updateTopic",value:function(e){ut(e.selfInfo)||this.updateSelfInfo(e.selfInfo),ut(e.muteAllMembers)||(this.muteAllMembers=1===e.muteAllMembers),Ze(this,e,["groupID","lastMessageTime","selfInfo","muteAllMembers","lastMsg"])}},{key:"updateSelfInfo",value:function(e){return 0===Ze(this.selfInfo,e,[],[""])}},{key:"reduceUnreadCount",value:function(){return 1<=this.unreadCount&&(--this.unreadCount,!0)}},{key:"isLastMessageRevoked",value:function(e){return e.sequence===this.lastMessage.lastSequence}},{key:"setLastMessageRevoked",value:function(e){this.lastMessage.isRevoked=e}},{key:"setLastMessageRevoker",value:function(e){this.lastMessage.revoker=e}}]),Fi),Ti=(r(xi,bn),Wo=g(xi),a(xi,[{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("topic_cache_time"),t=this.getCloudConfig("topic_last_active_time");ut(e)||(this.TOPIC_CACHE_TIME=Number(e)),ut(t)||(this.TOPIC_LAST_ACTIVE_TIME=Number(t))}},{key:"onTopicCreated",value:function(e){var t=e.groupID;this.resetGetTopicTime(t),this.emitOEvt(S.TOPIC_CREATED,e)}},{key:"onTopicDeleted",value:function(e){var t=this,n=e.groupID,o=e.topicIDList;(void 0===o?[]:o).forEach((function(e){t._deleteLocalTopic(n,e)})),this.emitOEvt(S.TOPIC_DELETED,e)}},{key:"onTopicProfileUpdated",value:function(e){var t=e.groupID,n=e.topicID;(n=this.getLocalTopic(t,n))&&(n.updateTopic(e),this.emitOEvt(S.TOPIC_UPDATED,{groupID:t,topic:n}))}},{key:"onTopicLatestMsg",value:function(e){var t,n,o=(e=e||{}).topicLatestMessage;e=e.excludedUnreadSequenceList,Ve(o)||(t=o.groupProfile.topicID,o.conversationType=E.CONV_GROUP,o.to=t,(n=new Co(o)).setElement(o.elements),this.updateUnreadCountAndLastMsg(t,n,e))}},{key:"onMessageRemindTypeUpdated",value:function(e){var t,n=e.groupID,o=e.topicID,i=(e=e.messageRemindType,this.getLocalTopic(n,o));i&&((t=i.updateSelfInfo({messageRemindType:e}))&&this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:i}),Ae.l("".concat(this._n,".onMessageRemindTypeUpdated topicID:").concat(o," messageRemindType:").concat(e," isUpdated:").concat(t)))}},{key:"onAtInfoUpdated",value:function(e){var t=e.topicID,n=(e=e.groupAtInfoList,Gt(t));(t=this.getLocalTopic(n,t))&&!ut(e)&&(t.updateGroupAtInfoList(e),this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:t}))}},{key:"onUnreadCountUpdatedFromConv",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=Gt(e);(e=this.getLocalTopic(n,e))&&e.unreadCount!==t&&(e.updateUnreadCount(t),0===t&&e.updateSelfInfo({readedSequence:e.lastMessage.lastSequence}),this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:e}))}},{key:"onMessageSent",value:function(e){var t,n,o=e.groupID,i=e.topicID;e=e.lastMessage,(i=this.getLocalTopic(o,i))&&(n=(t=void 0===(t=e.sequence)?0:t)+1)>i.nextMessageSeq&&(i.updateNextMessageSeq(n),i.updateLastMessage(e),i.updateSelfInfo({readedSequence:t}),i.updateUnreadCount(0),this.emitOEvt(S.TOPIC_UPDATED,{groupID:o,topic:i}))}},{key:"onMessageModified",value:function(e){var t,n=e.to,o=e.time,i=e.sequence,a=e.elements,s=e.cloudCustomData,r=e.messageVersion,c=Gt(n),u=this.getLocalTopic(c,n);u&&(t=u.lastMessage,Ae.d("".concat(this._n,".onMessageModified topicID:").concat(n," lastMessage:"),JSON.stringify(t),"options:",JSON.stringify(e)),t)&&(null===t.payload||t.lastTime===o&&t.lastSequence===i&&t.version!==r)&&(t.type=a[0].type,t.payload=a[0].content,t.messageForShow=Ut(t.type,t.payload,this.isIntl()),t.cloudCustomData=s,t.version=r,t.lastSequence=i,t.lastTime=o,this.emitOEvt(S.TOPIC_UPDATED,{groupID:c,topic:u}))}},{key:"onMessageRevoked",value:function(e){var t,n,o,i=this;0!==e.length&&(n=t=null,o=!1,e.forEach((function(e){var a=e.to;n=Gt(a),(t=i.getLocalTopic(n,a))&&(t.reduceUnreadCount()&&(o=!0),t.isLastMessageRevoked(e)&&(t.setLastMessageRevoked(!0),t.setLastMessageRevoker(e.revoker),o=!0),(a=t.selfInfo.excludedUnreadSequenceList||[]).push(e.sequence),t.updateSelfInfo({excludedUnreadSequenceList:a}))})),o)&&this.emitOEvt(S.TOPIC_UPDATED,{groupID:n,topic:t})}},{key:"isLastMessageRevoked",value:function(e){var t=e.topicID,n=(e=e.sequence,Gt(t));return n=this.getLocalTopic(n,t),t=!1,n?n.isLastMessageRevoked({sequence:e}):t}},{key:"updateUnreadCountAndLastMsg",value:function(e,t,n){var o,i=Gt(e),a=this.getLocalTopic(i,e);a&&(o=a.selfInfo.excludedUnreadSequenceList||[],ut(n)||(o=n),t._isExcludedFromUnreadCount&&o.push(t.sequence),a.updateSelfInfo({excludedUnreadSequenceList:o}),Ae.l("".concat(this._n,".updateUnreadCountAndLastMsg seq:").concat(t.sequence," lastSeq:").concat(a.lastMessage.lastSequence)),t.sequence>a.lastMessage.lastSequence)&&(a.updateLastMessage(t),n=t.sequence+1,a.updateNextMessageSeq(n),o=this._computeUnreadCount(a),a.updateUnreadCount(o),(t=this.get(11).getLocalConversation("".concat(E.CONV_GROUP).concat(e)))&&t.updateUnreadCount({nextUnreadCount:o,isFromGetConversations:!0}),this.emitOEvt(S.TOPIC_UPDATED,{groupID:i,topic:a}))}},{key:"getJoinedCommunityList",value:function(){return this.get(7).syncCommunityWithTopic()}},{key:"createTopicInCommunity",value:function(e){var n,o=this,i="".concat(this._n,".").concat("createTopicInCommunity"),a=e.topicID;return ut(a)||Mt(a)?e.topicName&&!1===this._filterProfanity("topicName",e)||e.introduction&&!1===this._filterProfanity("introduction",e)||e.notification&&!1===this._filterProfanity("notification",e)?yn({code:Pn.PROFANITY_FOUND}):(n=new Jn("createTopicInCommunity"),this.req({P:Gn.CREATE_TOPIC,data:t({},e)}).then((function(a){return a=a.data.topicID,n.setMessage("topicID:".concat(a)).end(),Ae.l("".concat(i," ok. topicID:").concat(a)),o._updateTopicMap([t(t({},e),{},{topicID:a})]),mn({topicID:a})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)}))):yn({code:Pn.ILLEGAL_TOPIC_ID})}},{key:"deleteTopicFromCommunity",value:function(e){var t=this,n="".concat(this._n,".").concat("deleteTopicFromCommunity"),o=e.groupID,i=(e=void 0===(e=e.topicIDList)?[]:e,new Jn("deleteTopicFromCommunity"));return i.setMessage("groupID:".concat(o," topicIDList:").concat(e)),this.req({P:Gn.DEL_TOPIC,data:{groupID:o,topicIDList:e}}).then((function(e){e=e.data.resultList;var a=[],s=[];return(void 0===e?[]:e).forEach((function(e){var t=e.topicID,n=e.errorCode;e=e.errorInfo,0===n?a.push({topicID:t}):s.push({topicID:t,code:n,message:e})})),e="success count:".concat(a.length,", fail count:").concat(s.length),i.setMoreMessage(e).end(),Ae.l("".concat(n," ok. ").concat(e)),a.forEach((function(e){t._deleteLocalTopic(o,e.topicID)})),mn({successTopicList:a,failureTopicList:s})})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"updateTopicProfile",value:function(e){var n,o=this,i="".concat(this._n,".").concat("updateTopicProfile");return Ae.l("".concat(i," options:"),e),e.topicName&&!1===this._filterProfanity("topicName",e)||e.introduction&&!1===this._filterProfanity("introduction",e)||e.notification&&!1===this._filterProfanity("notification",e)?yn({code:Pn.PROFANITY_FOUND}):((n=new Jn("updateTopicProfile")).setMessage("groupID:".concat(e.groupID," topicID:").concat(e.topicID)),ut(e.muteAllMembers)||(e.muteAllMembers=!0===e.muteAllMembers?"On":"Off"),this.req({P:Gn.UPDATE_TOPIC_PROFILE,data:t({},e)}).then((function(){return n.end(),Ae.l("".concat(i," ok")),o._updateTopicMap([e]),mn({topic:o.getLocalTopic(e.groupID,e.topicID)})})).catch((function(e){return n.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"getTopicList",value:function(e){var n=this,o="".concat(this._n,".").concat("getTopicList"),i=e.groupID,a=0===(e=void 0===(e=e.topicIDList)?[]:e).length,s=new Jn("getTopicList");if(s.setMessage("groupID:".concat(i)),this._getTopicTimeMap.has(i)){var r=(c=this._getTopicTimeMap.get(i)).isGetAll,c=c.time;if((r||!r&&!a)&&Date.now()-c<1e3*this.TOPIC_CACHE_TIME&&(r=this._getLocalTopicList(i,e),a||r.length===e.length))return s.setMoreMessage("from cache, topic count:".concat(r.length)).end(),Ae.l("".concat(o," groupID:").concat(i," from cache, topic count:").concat(r.length)),vn({successTopicList:r,failureTopicList:[]})}return this.req({P:Gn.GET_TOPIC_LIST,data:{groupID:i,topicIDList:e}}).then((function(e){e=e.data.topicInfoList;var r=[],c=[],u=[];return(void 0===e?[]:e).forEach((function(e){var n=e.topic,o=e.selfInfo,i=e.errorCode,a=(e=e.errorInfo,n.topicID);0===i?(r.push(t(t({},n),{},{selfInfo:o})),c.push(a)):u.push({topicID:a,code:i,message:e})})),n._updateTopicMap(r),n._handleTopicAtInfo(r),e="success count:".concat(c.length,", fail count:").concat(u.length),s.setMoreMessage(e).end(),Ae.l("".concat(o," groupID:").concat(i," from remote, ").concat(e)),e=[],Ve(c)||(n._getTopicTimeMap.set(i,{time:Date.now(),isGetAll:a}),e=n._getLocalTopicList(i,c)),mn({successTopicList:e,failureTopicList:u})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(o," failed. error:"),e),yn(e)}))}},{key:"hasLocalTopic",value:function(e,t){return!!this._topicMap.has(e)&&this._topicMap.get(e).has(t)}},{key:"getLocalTopic",value:function(e,t){var n=null;return this._topicMap.has(e)?this._topicMap.get(e).get(t):n}},{key:"_getLocalTopicList",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=[];return(e=this._topicMap.get(e))&&(n=m(e.values())),0===t.length?n:n.filter((function(e){return t.includes(e.topicID)}))}},{key:"_deleteLocalTopic",value:function(e,t){this._topicMap.has(e)&&this._topicMap.get(e).has(t)&&(this._topicMap.get(e).delete(t),Ae.l("".concat(this._n,"._deleteLocalTopic groupID:").concat(e," topicID:").concat(t)))}},{key:"_updateTopicMap",value:function(e){var t=this,n=[];e.forEach((function(e){var o=e.groupID,i=e.topicID,a=null;t._topicMap.has(o)||t._topicMap.set(o,new Map),t._topicMap.get(o).has(i)?(a=t._topicMap.get(o).get(i)).updateTopic(e):(t._getTopicLastMessage(e),a=new Ci(e,t.isIntl()),t._topicMap.get(o).set(i,a)),e=t._computeUnreadCount(a),a.updateUnreadCount(e),n.push({conversationID:"".concat(E.CONV_GROUP).concat(i),type:E.CONV_TOPIC,unreadCount:e})})),0<n.length&&this.get(11).updateTopicConversation(n)}},{key:"resetGetTopicTime",value:function(e){var t=this;ut(e)?m(this._getTopicTimeMap.keys()).forEach((function(e){t._getTopicTimeMap.set(e,0)})):this._getTopicTimeMap.set(e,0)}},{key:"getTopicListOnReconnected",value:function(){var e=this,t=m(this._topicMap.keys()),n=[],o=this.get(11);t.forEach((function(t){var i=[],a=e._getLocalTopicList(t);o.deleteTopicRoamingInfo(t),a.forEach((function(t){var n=void 0===(n=t.lastMessage.lastTime)?0:n;Date.now()-1e3*n<1e3*e.TOPIC_LAST_ACTIVE_TIME&&i.push(t.topicID)})),0<i.length&&n.push({groupID:t,topicIDList:i})})),Ae.l("".concat(this._n,".getTopicListOnReconnected. active community count:").concat(n.length)),this._relayGetTopicList(n)}},{key:"_relayGetTopicList",value:function(e){var t,n,o,i=this;0!==e.length&&(n=5<(t=e.shift()).topicIDList.length?"topicIDList.length:".concat(t.topicIDList.length):"topicIDList:".concat(t.topicIDList),(o=new Jn("relayGetTopicList")).setMessage(n),Ae.l("".concat(this._n,"._relayGetTopicList. ").concat(n)),this.getTopicList(t).then((function(){o.end(),i._relayGetTopicList(e)})).catch((function(t){o.setError(t).end(),i._relayGetTopicList(e)})))}},{key:"_handleTopicAtInfo",value:function(e){var n=this;0!==e.length&&e.forEach((function(e){var o=e.groupID,i=e.topicID,a=(e=e.groupAtInfoList,[]);ut(e)||(e.forEach((function(e){a.push(t(t({},e),{},{groupID:o,topicID:i}))})),n.get(11).onNewGroupAtTips({dataList:a}))}))}},{key:"_getTopicLastMessage",value:function(e){var t;ut(e.lastMsg)||(t={time:e.lastMsg.time,sequence:e.lastMsg.sequence,from:e.lastMsg.from,payload:e.lastMsg.elements[0]?e.lastMsg.elements[0].content:null,type:e.lastMsg.elements[0]?e.lastMsg.elements[0].type:"",nick:e.lastMsg.nick,avatar:e.lastMsg.avatar,version:e.lastMsg.messageVersion,cloudCustomData:e.lastMsg.cloudCustomData,isRevoked:2===e.lastMsg.isPlaceMessage,revoker:Ve(e.lastMsg.revokerInfo)?null:e.lastMsg.revokerInfo.revoker},e.lastMessage=t)}},{key:"deleteTopicListInCommunity",value:function(e){var t=this,n=this._getLocalTopicList(e),o=this.get(11);n.forEach((function(n){n=n.topicID,t._deleteLocalTopic(e,n),t._getTopicTimeMap.delete(e),o.deleteLocalConv("".concat(E.CONV_GROUP).concat(n))}))}},{key:"_computeUnreadCount",value:function(e){var t,n=(i=e.selfInfo).excludedUnreadSequenceList,o=i.readedSequence,i=e.nextMessageSeq-e.selfInfo.readedSequence-1;return We(n)&&(t=0,n.forEach((function(n){o<n&&n<=e.nextMessageSeq-1&&(t+=1)})),1<=t)&&(i-=t),i<0?0:i}},{key:"_filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],G)).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"getMessageExtensions",value:function(e,t){Ae.l("".concat(this._n,".getMessageExtensions startSequence:").concat(t));var n=Gt(e.to);return this.req({P:Gn.GET_GRP_MSG_EXT,data:{groupID:n,topicID:e.to,messageSequence:e.sequence,startSequence:t}})}},{key:"modifyMsgExts",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=(Ae.l("".concat(this._n,".modifyMsgExts operateType:").concat(n)),Gt(e.to));return this.req({P:Gn.MODIFY_GRP_MSG_EXT,data:{groupID:o,topicID:e.to,messageSequence:e.sequence,extensionList:t,operateType:n}})}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._topicMap.clear(),this._getTopicTimeMap.clear(),this.TOPIC_CACHE_TIME=300,this.TOPIC_LAST_ACTIVE_TIME=3600}}]),xi),Si=(a(Ui,[{key:"setExpirationTime",value:function(e){this.expirationTime=e}},{key:"getUserProfile",value:function(e){var t=this,n="".concat(this._n,".").concat("getUserProfile"),o=e.userIDList;e.fromAccount=this._userM.getMyAccount(),100<o.length&&(Ae.w("".concat(n," ").concat(Vt(100))),o.length=100);for(var i,a=[],s=[],r=0,c=o.length;r<c;r++)i=o[r],this._userM.isMyFriend(i)&&this._contains(i)?s.push(this._getProfileFromMap(i)):a.push(i);if(0===a.length)return vn(s);e.toAccount=a;var u=e.bFromGetMyProfile||!1,l=[],d=(e.toAccount.forEach((function(e){l.push({toAccount:e,standardSequence:0,customSequence:0})})),e.userItem=l,new Jn("getUserProfile"));return d.setMessage(5<o.length?"userIDList.length:".concat(o.length):"userIDList:".concat(o)),this._userM.req({P:Gn.GET_USER_PROFILE,data:e}).then((function(e){return d.end(),Ae.i("".concat(n," ok")),e=t._handleResponse(e).concat(s),mn(u?e[0]:e)})).catch((function(e){return d.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"getMyProfile",value:function(){var e,t=this._userM.getMyAccount(),n="".concat(this._n,".getMyProfile");return Ae.l("".concat(n," myAccount:").concat(t)),this._fill(),this._contains(t)?(e=this._getProfileFromMap(t),Ae.d("".concat(n," from cache, myProfile:").concat(JSON.stringify(e))),vn(e)):this.getUserProfile({fromAccount:t,userIDList:[t],bFromGetMyProfile:!0})}},{key:"_handleResponse",value:function(e){var t=e.data.userProfileItem;if(!We(t))return[];for(var n=[],o=(e=Date.now(),0),i=t.length;o<i;o++){var a=(s=t[o]).to,s=s.profileItem;"@TLS#NOT_FOUND"!==a&&""!==a&&(a=this._update(a,this._getLatestProfileFromResponse(a,s)).latestProfile,n.push(a))}return Ae.l("".concat(this._n,"._handleResponse cost:").concat(jt(e))),n}},{key:"_getLatestProfileFromResponse",value:function(e,t){var n={userID:e,profileCustomField:[]};if(!Ve(t))for(var o=0,i=t.length;o<i;o++)if(-1<t[o].tag.indexOf("Tag_Profile_Custom"))n.profileCustomField.push({key:t[o].tag,value:t[o].value});else switch(t[o].tag){case Oe.NICK:n.nick=t[o].value;break;case Oe.GENDER:n.gender=t[o].value;break;case Oe.BIRTHDAY:n.birthday=t[o].value;break;case Oe.LOCATION:n.location=t[o].value;break;case Oe.SELFSIGNATURE:n.selfSignature=t[o].value;break;case Oe.ALLOWTYPE:n.allowType=t[o].value;break;case Oe.LANGUAGE:n.language=t[o].value;break;case Oe.AVATAR:n.avatar=t[o].value;break;case Oe.MESSAGESETTINGS:n.messageSettings=t[o].value;break;case Oe.ADMINFORBIDTYPE:n.adminForbidType=t[o].value;break;case Oe.LEVEL:n.level=t[o].value;break;case Oe.ROLE:n.role=t[o].value;break;default:Ae.w("".concat(this._n,"._getLatestProfileFromResponse unknown tag:"),t[o].tag,t[o].value)}return n}},{key:"updateMyProfile",value:function(e){var t=this,n="".concat(this._n,".").concat("updateMyProfile");if(e.nick&&!1===this._userM.filterProfanity("nick",e))return yn({code:Pn.PROFANITY_FOUND});if(e.selfSignature&&!1===this._userM.filterProfanity("selfSignature",e))return yn({code:Pn.PROFANITY_FOUND});var o=new Jn("updateMyProfile"),i=(o.setMessage(JSON.stringify(e)),(new Qo).validate(e));if(!i.valid)return o.setCode(Pn.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(i.tips)).end(),Ae.e("".concat(n," info:").concat(i.tips)),yn({code:Pn.UPDATE_PROFILE_INVALID_PARAM});var a,s,r=[];for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&("profileCustomField"===a?e.profileCustomField.forEach((function(e){r.push({tag:e.key,value:e.value})})):r.push({tag:Oe[a.toUpperCase()],value:e[a]}));return 0===r.length?(i=new wn({code:Pn.UPDATE_PROFILE_NO_KEY}),o.setError(i).end(),Ae.e("".concat(n," failed. error:"),i),yn(i)):(s=this._userM.getMyAccount(),this._userM.req({P:Gn.UPDATE_MY_PROFILE,data:{fromAccount:s,profileItem:r}}).then((function(i){o.end(),Ae.i("".concat(n," ok"));var a=(r=t._update(s,e)).isProfileUpdated,r=r.latestProfile;return!0===a&&t._userM.emitOEvt(S.PROFILE_UPDATED,[r]),vn(r)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)})))}},{key:"onProfileModified",value:function(e){var t=e.dataList;if(!Ve(t)){var n=t.length;Ae.d("".concat(this._n,".onProfileModified count:").concat(n," dataList:"),e.dataList);for(var o=[],i=0;i<n;i++){var a=t[i].userID,s=(a=this._update(a,this._getLatestProfileFromResponse(a,t[i].profileList))).isProfileUpdated;a=a.latestProfile,!0===s&&o.push(a)}0<o.length&&(this._userM.emitIEvt(xo.PROFILE_UPDATED,o),this._userM.emitOEvt(S.PROFILE_UPDATED,o))}}},{key:"_fill",value:function(){if(0===this.accountProfileMap.size){for(var e=this._getCachedProfiles(),t=Date.now(),n=0,o=e.length;n<o;n++)t-e[n].lastUpdatedTime<this.expirationTime&&this.accountProfileMap.set(e[n].userID,e[n]);Ae.l("".concat(this._n,"._fill from cache, size:").concat(this.accountProfileMap.size))}}},{key:"_update",value:function(e,t){var n,o=!1,i=Date.now();return this._contains(e)?(n=this._getProfileFromMap(e),t.profileCustomField&&!0===_t(n.profileCustomField,t.profileCustomField)&&(n.lastUpdatedTime=i,o=!0),0<Ze(n,t,["profileCustomField"])&&(n.lastUpdatedTime=i,o=!0)):(n=new Qo(t),!this._userM.isMyFriend(e)&&e!==this._userM.getMyAccount()||(n.lastUpdatedTime=i,o=!0,this.accountProfileMap.set(e,n))),this._flush(e===this._userM.getMyAccount()),!0===o&&Ae.l("".concat(this._n,"._update account:").concat(e," isUpdated:").concat(o)),{isProfileUpdated:o,latestProfile:n}}},{key:"_flush",value:function(e){var t=m(this.accountProfileMap.values()),n=this._userM.getStorageModule();Ae.d("".concat(this._n,"._flush length:").concat(t.length," flushAtOnce:").concat(e)),n.setItem(this.TAG,t,e)}},{key:"_contains",value:function(e){return this.accountProfileMap.has(e)}},{key:"_getProfileFromMap",value:function(e){return this.accountProfileMap.get(e)}},{key:"_getCachedProfiles",value:function(){var e=this._userM.getStorageModule().getItem(this.TAG);return Ve(e)?[]:e}},{key:"onConvProfileUpdated",value:function(e){for(var t,n,o=[],i=0,a=e.length;i<a;i++)n=(t=e[i]).userID,this._userM.isMyFriend(n)&&(this._contains(n)?0<Ze(this._getProfileFromMap(n),t)&&o.push(n):o.push(t.userID));0!==o.length&&(Ae.l("".concat(this._n,".onConvProfileUpdated toAccountList:").concat(o)),this.getUserProfile({userIDList:o}))}},{key:"getNickAndAvatarByUserID",value:function(e){return this._contains(e)?{nick:(e=this._getProfileFromMap(e)).nick,avatar:e.avatar}:{nick:"",avatar:""}}},{key:"getUserNickAndAvatar",value:function(e){var t,n=this,o=m(new Set(e)),i=(Ae.l("".concat(this._n,".getUserNickAndAvatar userIDList.length:").concat(e.length," uniqueUserIDList.length:").concat(o.length)),[]);return 0===e.length?Promise.resolve(i):(e=this._createUserIDListGroup(o),t=[],e.forEach((function(e){t.push(n.getUserProfile({userIDList:e}))})),Promise.all(t).then((function(e){return e.forEach((function(e){e=e.data.map((function(e){return{userID:e.userID,nick:e.nick,avatar:e.avatar}})),i.push.apply(i,m(e))})),i})))}},{key:"_createUserIDListGroup",value:function(e){for(var t=[],n=0;n<e.length;)t.push(e.slice(n,n+=100));return t}},{key:"reset",value:function(){this._flush(!0),this.accountProfileMap.clear()}}]),Ui),Ei=a((function e(t){o(this,e)})),Di=(a(Gi,[{key:"getLocalBlacklist",value:function(){return m(this._blacklistMap.keys())}},{key:"getBlacklist",value:function(){var e=this,t="".concat(this._n,".getBlacklist"),n={fromAccount:this._userM.getMyAccount(),maxLimited:this.maxLimited,startIndex:0,lastSequence:this.currentSequence},o=new Jn("getBlacklist");return this._userM.req({P:Gn.GET_BL,data:n}).then((function(n){var i=(n=n.data).blackListItem,a=(n=n.currentSequence,Ve(i)?0:i.length);o.setMessage("count:".concat(a)).end(),Ae.i("".concat(t," ok")),e.currentSequence=n,e._handleResponse(i,!0),e._userM.emitOEvt(S.BLACKLIST_UPDATED,m(e._blacklistMap.keys()))})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"addBlacklist",value:function(e){var t,n,o=this,i=new Jn("addToBlacklist"),a="".concat(this._n,".addBlacklist"),s=this._userM.getMyAccount();return 1===e.userIDList.length&&e.userIDList[0]===s?(n=this._userM.getErrMsg(t=Pn.CANNOT_ADD_SELF_TO_BLACKLIST),i.setCode(t).setMessage(n).end(),n=new wn({code:t}),Ae.e("".concat(a," failed. error:"),n),yn(n)):(e.userIDList.includes(s)&&(e.userIDList=e.userIDList.filter((function(e){return e!==s}))),e.fromAccount=this._userM.getMyAccount(),e.toAccount=e.userIDList,this._userM.req({P:Gn.ADD_TO_BL,data:e}).then((function(t){return i.setMessage(5<e.userIDList.length?"userIDList.length:".concat(e.userIDList.length):"userIDList:".concat(e.userIDList)).end(),Ae.i("".concat(a," ok")),o._handleResponse(t.resultItem,!0),mn(m(o._blacklistMap.keys()))})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(a," failed. error:"),e),yn(e)})))}},{key:"_handleResponse",value:function(e,t){if(!Ve(e))for(var n,o,i,a=0,s=e.length;a<s;a++)o=e[a].to,i=e[a].resultCode,!ut(i)&&0!==i||(t?((n=this._blacklistMap.has(o)?this._blacklistMap.get(o):new Ei).userID=o,Ve(e[a].addBlackTimeStamp)||(n.timeStamp=e[a].addBlackTimeStamp),this._blacklistMap.set(o,n)):this._blacklistMap.has(o)&&(n=this._blacklistMap.get(o),this._blacklistMap.delete(o)));Ae.l("".concat(this._n,"._handleResponse total:").concat(this._blacklistMap.size," bAdd:").concat(t))}},{key:"deleteBlacklist",value:function(e){var t=this,n="".concat(this._n,".deleteBlacklist"),o=new Jn("removeFromBlacklist");return e.fromAccount=this._userM.getMyAccount(),e.toAccount=e.userIDList,this._userM.req({P:Gn.RM_FROM_BL,data:e}).then((function(i){return o.setMessage(5<e.userIDList.length?"userIDList.length:".concat(e.userIDList.length):"userIDList:".concat(e.userIDList)).end(),Ae.i("".concat(n," ok")),t._handleResponse(i.data.resultItem,!1),mn(m(t._blacklistMap.keys()))})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"onAccountDeleted",value:function(e){for(var t=0,n=e.length;t<n;t++){var o=e[t];this._blacklistMap.has(o)&&this._blacklistMap.delete(o)}var i=e.length;0<i&&(Ae.l("".concat(this._n,".onAccountDeleted count:").concat(i," ").concat(i<30?"userIDList:".concat(e):"")),this._userM.emitOEvt(S.BLACKLIST_UPDATED,m(this._blacklistMap.keys())))}},{key:"onAccountAdded",value:function(e){for(var t,n=[],o=0,i=e.length;o<i;o++)t=e[o],this._blacklistMap.has(t)||(this._blacklistMap.set(t,new Ei({userID:t})),n.push(t));0<n.length&&(Ae.l("".concat(this._n,".onAccountAdded count:").concat(n.length," userIDList:"),n),this._userM.emitOEvt(S.BLACKLIST_UPDATED,m(this._blacklistMap.keys())))}},{key:"reset",value:function(){this._blacklistMap.clear(),this.startIndex=0,this.maxLimited=100,this.currentSequence=0}}]),Gi),ki=(a(Ni,[{key:"_onCloudConfig",value:function(){var e=this._userM.getCloudConfig("status_query_count"),t=this._userM.getCloudConfig("status_sub_count"),n=this._userM.getCloudConfig("status_unsub_count");Ae.l("".concat(this._n,"._onCloudConfig statusQueryCount:").concat(e," statusSubscribeCount:").concat(t)+" statusUnsubscribeCount:".concat(n)),ut(e)||(this.MAX_QUERY_USER_COUNT=parseInt(e,10)),ut(e)||(this.MAX_SUBSCRIBE_USER_COUNT=parseInt(t,10)),ut(e)||(this.MAX_UNSUBSCRIBE_USER_COUNT=parseInt(n,10))}},{key:"onUserStatusUpdated",value:function(e){e=e.dataList;var t=this._userM.getMyUserID(),n=this._userM.get(12);e=e.map((function(e){var o=e.to,i=e.statusType;return e=Ko(e=e.customStatus),o===t&&n.setCustomStatus(e),{userID:o,statusType:i,customStatus:e}})),Ae.l("".concat(this._n,".onUserStatusUpdated list:").concat(JSON.stringify(e))),this._userM.emitOEvt(S.USER_STATUS_UPDATED,e)}},{key:"setSelfStatus",value:function(e){var t,n,o=this,i="".concat(this._n,".setSelfStatus");return!1===this._userM.filterProfanity("customStatus",e)?yn({code:Pn.PROFANITY_FOUND}):(t=new Jn("setSelfStatus"),n=e.customStatus,this._userM.req({P:Gn.SET_SELF_STATUS,data:{customStatus:n}}).then((function(e){return t.setMessage("customStatus:".concat(n)).end(),Ae.l("".concat(i," ok. customStatus:").concat(n)),o._userM.get(12).setCustomStatus(n),mn({userID:o._userM.getMyUserID(),statusType:1,customStatus:n})})).catch((function(e){return t.setError(e).end(),Ae.e("".concat(i," failed. error:"),e),yn(e)})))}},{key:"getUserStatus",value:function(e){var t="".concat(this._n,".").concat("getUserStatus"),n=void 0===(e=e.userIDList)?[]:e,o=(e=this._userM.getMyUserID(),m(n)),i=void 0,a=o.indexOf(e);if(-1<a&&(o.splice(a,1),i={userID:e,statusType:1,customStatus:this._userM.get(12).getCustomStatus()}),0===o.length)return vn({successUserList:[i],failureUserList:[]});if(!this._userM.canIUse(N.USER_STATUS))return this._userM.noUse("getUserStatus");o.length>this.MAX_QUERY_USER_COUNT&&(Ae.w("".concat(t," ").concat(Vt(this.MAX_QUERY_USER_COUNT))),o=n.slice(0,this.MAX_QUERY_USER_COUNT));var s=new Jn("getUserStatus");return this._userM.req({P:Gn.GET_USER_STATUS,data:{userIDList:o}}).then((function(e){var o=void 0===(o=(e=e.data).successUserList)?[]:o,a=(e=void 0===(e=e.failureUserList)?[]:e,o=o.map((function(e){return{userID:e.userID,statusType:e.statusType,customStatus:Ko(e=e.customStatus)}})),e=e.map((function(e){var t=e.userID,n=e.invalidUserID,o=e.errorCode;return e=e.errorInfo,{userID:Ve(n)?t:n,code:o,message:e}})),ut(i)||o.unshift(i),"userID count:".concat(n.length,", success count:").concat(o.length,", fail count:").concat(e.length));return s.setMessage("".concat(a)).end(),Ae.l("".concat(t," ok. ").concat(a,".")),mn({successUserList:o,failureUserList:e})})).catch((function(e){return s.setMessage("userID count:".concat(n.length)).setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))}},{key:"subscribeUserStatus",value:function(e){var t,n,o,i,a="subscribeUserStatus";return this._userM.canIUse(N.USER_STATUS)?(t="".concat(this._n,".").concat(a),(n=m(e=void 0===(e=e.userIDList)?[]:e)).length>this.MAX_SUBSCRIBE_USER_COUNT&&(Ae.w("".concat(t," ").concat(Vt(this.MAX_SUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_SUBSCRIBE_USER_COUNT)),o=new Jn(a),i="userID count:".concat(e.length),Ae.l("".concat(t," ").concat(i)),this._userM.req({P:Gn.SUB_USER_STATUS,data:{userIDList:n}}).then((function(e){return e=(void 0===(e=e.data.failureUserList)?[]:e).map((function(e){var t=e.userID,n=e.invalidUserID,o=e.errorCode;return e=e.errorInfo,{userID:Ve(n)?t:n,code:o,message:e}})),o.setMessage("".concat(i," fail count:").concat(e.length)).end(),Ae.l("".concat(t," ok. fail count:").concat(e.length,".")),mn({failureUserList:e})})).catch((function(e){return o.setMessage(i).setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._userM.noUse(a)}},{key:"unsubscribeUserStatus",value:function(e){var t,n,o,i,a="unsubscribeUserStatus";return this._userM.canIUse(N.USER_STATUS)?(t="".concat(this._n,".").concat(a),n=m(e=void 0===(e=(e||{}).userIDList)?[]:e),e.length>this.MAX_UNSUBSCRIBE_USER_COUNT&&(Ae.w("".concat(t," ").concat(Vt(this.MAX_UNSUBSCRIBE_USER_COUNT))),n=e.slice(0,this.MAX_UNSUBSCRIBE_USER_COUNT)),o=new Jn(a),i="userID count:".concat(e.length),Ae.l("".concat(t," ").concat(i)),e={userIDList:n},0===n.length&&(e.userIDList=void 0,e.unsubscribeAll=1),this._userM.req({P:Gn.UNSUB_USER_STATUS,data:e}).then((function(e){return e=(void 0===(e=e.data.failureUserList)?[]:e).map((function(e){var t=e.userID,n=e.invalidUserID,o=e.errorCode;return e=e.errorInfo,{userID:Ve(n)?t:n,code:o,message:e}})),o.setMessage("".concat(i," fail count:").concat(e.length)).end(),Ae.l("".concat(t," ok. fail count:").concat(e.length,".")),mn({failureUserList:e})})).catch((function(e){return o.setMessage("".concat(i)).setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this._userM.noUse(a)}},{key:"reset",value:function(){this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100}}]),Ni),Li=(r(Pi,bn),zo=g(Pi),a(Pi,[{key:"onContextUpdated",value:function(e){this._profileHandler.getMyProfile(),this._blacklistHandler.getBlacklist()}},{key:"mockOnNickAvatarModified",value:function(e,t){Ae.l("".concat(this._n,"._mockOnNickAvatarModified nick:").concat(e," avatar:").concat(t)),this.onProfileModified({dataList:[{pushType:1,userID:this.getMyUserID(),profileList:[{tag:Oe.NICK,value:e},{tag:Oe.AVATAR,value:t}]}]})}},{key:"onProfileModified",value:function(e){this._profileHandler.onProfileModified(e)}},{key:"onRelationChainModified",value:function(e){var t,n;Ve(e=e.dataList)||(t=[],e.forEach((function(e){e.blackListDelAccount&&t.push.apply(t,m(e.blackListDelAccount))})),0<t.length&&this._blacklistHandler.onAccountDeleted(t),n=[],e.forEach((function(e){e.blackListAddAccount&&n.push.apply(n,m(e.blackListAddAccount))})),0<n.length&&this._blacklistHandler.onAccountAdded(n))}},{key:"onConvProfileUpdated",value:function(e){this._profileHandler.onConvProfileUpdated(e)}},{key:"getMyAccount",value:function(){return this.getMyUserID()}},{key:"getMyNick",value:function(){return this._profileHandler.getNickAndAvatarByUserID(this.getMyUserID()).nick}},{key:"getMyProfile",value:function(){return this._profileHandler.getMyProfile()}},{key:"getStorageModule",value:function(){return this.get(13)}},{key:"filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],"user_profile")).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"isMyFriend",value:function(e){var t=this.get(8);return!!t&&t.isMyFriend(e)}},{key:"getUserProfile",value:function(e){return this._profileHandler.getUserProfile(e)}},{key:"updateMyProfile",value:function(e){return this._profileHandler.updateMyProfile(e)}},{key:"getNickAndAvatarByUserID",value:function(e){return this._profileHandler.getNickAndAvatarByUserID(e)}},{key:"getUserNickAndAvatar",value:function(e){return this._profileHandler.getUserNickAndAvatar(e)}},{key:"getLocalBlacklist",value:function(){return vn(this._blacklistHandler.getLocalBlacklist())}},{key:"addBlacklist",value:function(e){return this._blacklistHandler.addBlacklist(e)}},{key:"deleteBlacklist",value:function(e){return this._blacklistHandler.deleteBlacklist(e)}},{key:"onUserStatusUpdated",value:function(e){this._userStatusHandler.onUserStatusUpdated(e)}},{key:"setSelfStatus",value:function(e){return this._userStatusHandler.setSelfStatus(e)}},{key:"getUserStatus",value:function(e){return this._userStatusHandler.getUserStatus(e)}},{key:"subscribeUserStatus",value:function(e){return this._userStatusHandler.subscribeUserStatus(e)}},{key:"unsubscribeUserStatus",value:function(e){return this._userStatusHandler.unsubscribeUserStatus(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._profileHandler.reset(),this._blacklistHandler.reset(),this._userStatusHandler.reset()}}]),Pi),bi=(a(wi,[{key:"isLoggedIn",value:function(){return this._isLoggedIn}},{key:"isOversea",value:function(){return this._oversea}},{key:"isPrivateNetWork",value:function(){return this._proxyServer}},{key:"isDevMode",value:function(){return this._isDevMode}},{key:"isTestEnv",value:function(){return this._isTestEnv}},{key:"isPartialUpdatedConvs",value:function(){return this._isPartialUpdatedConvs}},{key:"isSingaporeSite",value:function(){return 2e7<=this._SDKAppID&&this._SDKAppID<3e7||172e7<=this._SDKAppID&&this._SDKAppID<173e7}},{key:"isKoreaSite",value:function(){return 3e7<=this._SDKAppID&&this._SDKAppID<4e7||173e7<=this._SDKAppID&&this._SDKAppID<174e7}},{key:"isGermanySite",value:function(){return 4e7<=this._SDKAppID&&this._SDKAppID<5e7||174e7<=this._SDKAppID&&this._SDKAppID<175e7}},{key:"isIndiaSite",value:function(){return 5e7<=this._SDKAppID&&this._SDKAppID<6e7||175e7<=this._SDKAppID&&this._SDKAppID<176e7}},{key:"isJapanSite",value:function(){return 6e7<=this._SDKAppID&&this._SDKAppID<7e7||176e7<=this._SDKAppID&&this._SDKAppID<177e7}},{key:"isUSASite",value:function(){return 7e7<=this._SDKAppID&&this._SDKAppID<8e7||177e7<=this._SDKAppID&&this._SDKAppID<178e7}},{key:"isIndonesiaSite",value:function(){return 8e7<=this._SDKAppID&&this._SDKAppID<9e7||178e7<=this._SDKAppID&&this._SDKAppID<179e7}},{key:"isIntl",value:function(){return 0===(e=this._SDKAppID)||2e7<=e&&e<9e7||172e7<=e&&e<179e7;var e}},{key:"isUnlimitedAVChatRoom",value:function(){return this._unlimitedAVChatRoom}},{key:"isUsingChatCore",value:function(){return this._isUsingChatCore}},{key:"setUsingChatCore",value:function(e){this._isUsingChatCore=e}},{key:"getUIPlatform",value:function(){return this._uiPlatform}},{key:"setUIPlatform",value:function(e){this._uiPlatform=e}},{key:"setUserID",value:function(e){this._userID=e}},{key:"getUserID",value:function(){return this._userID}},{key:"setUserSig",value:function(e){this._userSig=e}},{key:"getUserSig",value:function(){return this._userSig}},{key:"getSDKAppID",value:function(){return this._SDKAppID}},{key:"setTinyID",value:function(e){this._tinyID=e,this._isLoggedIn=!0}},{key:"getTinyID",value:function(){return this._tinyID}},{key:"setCustomStatus",value:function(e){this._customStatus=e}},{key:"getCustomStatus",value:function(){return this._customStatus}},{key:"getScene",value:function(){return ge?window.tencent_cloud_im_csig_flutter_for_web_25F_cy:this._isTUIKit()?"tuikit":this._scene}},{key:"getInstanceID",value:function(){return this._instanceID}},{key:"getStatusInstanceID",value:function(){return this._statusInstanceID}},{key:"setStatusInstanceID",value:function(e){this._statusInstanceID=e}},{key:"getVersion",value:function(){return this._version}},{key:"getA2Key",value:function(){return this._a2Key}},{key:"setA2Key",value:function(e){this._a2Key=e}},{key:"getContentType",value:function(){return this._contentType}},{key:"getProxyServer",value:function(){return this._proxyServer}},{key:"getFileUploadProxy",value:function(){return this._fileUploadProxy}},{key:"getFileDownloadProxy",value:function(){return this._fileDownloadProxy}},{key:"setApplicationID",value:function(e){this._applicationID=e}},{key:"getApplicationID",value:function(){return this._applicationID}},{key:"setDowloadFileAuthKey",value:function(e){this._authKey=e}},{key:"getDowloadFileAuthKey",value:function(){return this._authKey}},{key:"setCustomLoginInfo",value:function(e){this._customLoginInfo=e}},{key:"getCustomLoginInfo",value:function(){return this._customLoginInfo}},{key:"_isTUIKit",value:function(){var e=!1,t=!1,n=!1,o=!1,i=[];Z&&(i=Object.keys(ne));for(var a=0,s=(i=te?J?Object.keys(uni):Object.keys(window):i).length;a<s;a++)if(i[a].toLowerCase().includes("uikit")){e=!0;break}i=null;var r,c=(Z&&!Ye(ne.createGamePortal)&&Ye(CC)&&!ut(CC())&&ze(r=CC().globalData)&&!0===r.isTUIKit&&(t=!0),!0===this._m.get(13).getStorageSync("TIM_".concat(this._SDKAppID,"_isTUIKit"))&&(n=!0),null);if(B&&!K&&"undefined"==typeof uni&&__wxConfig&&(c=__wxConfig.pages),j&&"undefined"==typeof uni&&__qqConfig&&(c=__qqConfig.pages),We(c)&&0<c.length){for(var u=0,l=c.length;u<l;u++)if(c[u].toLowerCase().includes("tui")){o=!0;break}c=null}return e||t||n||o}},{key:"reset",value:function(){this._isLoggedIn=!1,this._userSig="",this._a2Key="",this._tinyID="",this._customStatus="",this._statusInstanceID=0}}]),wi),Ai={"k-vue2-pc":1,"k-vue2-h5":2,"k-vue2-h5-uni":3,"k-vue2-app-uni":4,"k-vue2-mp-uni":5,"k-vue2-pc-uni":6,"k-vue3-pc":7,"k-vue3-h5":8,"k-vue3-h5-uni":9,"k-vue3-app-uni":10,"k-vue3-mp-uni":11,"k-vue3-pc-uni":12,"k-rn":13},Ri=(r(Oi,bn),$o=g(Oi),a(Oi,[{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&e%this._helloInterval==0&&this._hello()}},{key:"getPushModule",value:function(){var e=void 0,t=this.get(36),n=this.get(28);return t.canIUseTIMPush()?e=t:n.canIUseOfflinePush()&&(e=n),e}},{key:"login",value:function(e){if(this.isLoggedIn())return n=this.getMyUserID(),(n=this.getErrMsg("RepeatLogin",n))&&Ae.w(n),vn({actionStatus:"OK",errorCode:0,errorInfo:n,repeatLogin:!0});if(Date.now()-this._lastLoginTs<=15e3)return this.warn("LoggingIn",e.userID),yn({code:Pn.REPEAT_LOGIN});Ae.l("".concat(this._n,".login userID:").concat(e.userID));var t,n=this._checkLoginInfo(e);return 0!==n.code?yn(n):(n=this.get(12),t=e.userID,e=e.userSig,n.setUserID(t),n.setUserSig(e),this.get(20).updateProtocolConfig(),this._login())}},{key:"_login",value:function(){var e=this,t=this.get(12),n=t.getScene(),o=0,i=n,a=(n&&n.startsWith("k-")&&(i=Ai[n],n="tuikit"),new Jn("login")),s=(a.setMessage("".concat(i)).setMoreMessage("identifier:".concat(this.getMyUserID())),"tuikit"===n),r=0,c=(J?r=s?3===i||4===i||5===i||6===i?31:9===i||10===i||11===i||12===i?32:4:3:Z?r=H?36:"tuikit"===n?12:11:te?r=ge?"flutter_web_uikit"===n?21:20:this._isReactUIKit()?fe?25:24:s?1===i||2===i?29:7===i||8===i?30:fe?17:14:fe?16:13:13===i&&(r=38),a.setUIPlatform(r),t.setUIPlatform(r),(s=this.getPushModule())&&(this._isWebUniapp=s.getUniAppPlatform(),i=this._getStatusInstanceID(),t.setStatusInstanceID(i),this.get(20).updateProtocolConfig(),o=s.getDeviceBrand()),"".concat(this._n,"._login"));return this._lastLoginTs=Date.now(),this.req({P:Gn.LOGIN,data:{deviceBrand:o,isWebUniapp:this._isWebUniapp,customInfo:t.getCustomLoginInfo()}}).then((function(o){e._lastLoginTs=0;var i=Date.now(),s=null,r=(g=o.data).a2Key,u=g.tinyID,l=g.helloInterval,d=g.instanceID,p=g.timeStamp,h=void 0===(h=g.customStatus)?"":h,f=g.purchaseBits,g=void 0===(g=g.authKey)?"":g,_=1e3*p,m=i-a.getStartTs();if(m=_+parseInt(m/2)-i,i=a.getStartTs()+m,a.start(i),i=_,Ee=m,(_=new Date).setTime(i),Ae.i("baseTime from server:".concat(_," offset:").concat(Ee)),u){if(r)return i=e.get(21).getSocketID(),_=Ko(h),h="socketID:".concat(i," scene:").concat(n," helloInterval:").concat(l," instanceID:").concat(d," timeStamp:").concat(p)+" offset:".concat(m," customStatus:").concat(_," isWebUniapp:").concat(e._isWebUniapp),Ae.l("".concat(c," ok. ").concat(h)),p=i="",B&&Ye(ne.getAccountInfoSync)&&(m=ne.getAccountInfoSync().miniProgram)&&(i=m.appId,p=m.envVersion),a.setMoreMessage("".concat(h," href:").concat(te?window.location.href:""," mpAppId:").concat(i," envVersion:").concat(p," authKey:").concat(g)).end(),t.setA2Key(r),t.setTinyID(u),t.setStatusInstanceID(d),t.setCustomStatus(_),t.setDowloadFileAuthKey(g),f&&e.get(27).onPushedConfig({errorCode:0,expiredTime:0,purchaseBits:f}),e.get(20).updateProtocolConfig(),e.emitIEvt(xo.A2KEY_AND_TINYID_UPDATED),e._helloInterval=l,e.triggerReady(),(m=e.getPushModule())&&(uni.setStorageSync("timUniAppInstanceID",d),m.init()),e._fetchCloudControlConfig(),e.get(29).init(),o;s=new wn({code:Pn.NO_A2KEY})}else s=new wn({code:Pn.NO_TINYID});throw a.setError(s).end(),s})).catch((function(t){return a.setError(t).end(!0),e._m.setNotReadyReason(Pn.LOGIN_FAILED),Ae.e("".concat(c," failed. error:"),t),e._lastLoginTs=0,e._m.onLoginFailed(),yn(t)}))}},{key:"logout",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,n="".concat(this._n,".logout"),o=this.isLoggedIn();return Ae.i("".concat(n," type:").concat(t," isLoggedIn:").concat(o," isWebUniapp:").concat(this._isWebUniapp)),o?(new Jn("logout").setMessage("identifier:".concat(this.getMyUserID())).end(!0),0===t&&this._m.setNotReadyReason(Pn.LOGGED_OUT),this.req({P:Gn.LOGOUT,data:{type:t,isWebUniapp:this._isWebUniapp}}).then((function(){return e.resetReady(),vn({})})).catch((function(t){return Ae.e("".concat(n," error:"),t),e.resetReady(),vn({})}))):yn({code:Pn.USER_NOT_LOGGED_IN})}},{key:"getLoginUser",value:function(){return this.isLoggedIn()?this.getMyUserID():""}},{key:"_fetchCloudControlConfig",value:function(){this.get(23).fetchConfig()}},{key:"_getStatusInstanceID",value:function(){return uni.getStorageSync("timUniAppInstanceID")||0}},{key:"_hello",value:function(){var e=this;this._lastWsHelloTs=Date.now(),this.req({P:Gn.HELLO,data:{isWebUniapp:this._isWebUniapp}}).catch((function(t){Ae.w("".concat(e._n,"._hello error:"),t)}))}},{key:"getLastWsHelloTs",value:function(){return this._lastWsHelloTs}},{key:"_checkLoginInfo",value:function(e){var t=0;return Ve(this.get(12).getSDKAppID())?t=Pn.NO_SDKAPPID:Ve(e.userID)?t=Pn.NO_IDENTIFIER:Ve(e.userSig)&&(t=Pn.NO_USERSIG),{code:t}}},{key:"_isReactUIKit",value:function(){return te&&void 0!==window.tencent_cloud_im_csig_react_uikit_23F_xa}},{key:"onMultipleAccountKickedOut",value:function(e){var t=this;new Jn("kickedOut").setMessage("type:".concat(E.KICKED_OUT_MULT_ACCOUNT," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),Ae.w("".concat(this._n,".onMultipleAccountKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),this.logout(1).then((function(){t.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_MULT_ACCOUNT}),t._m.setNotReadyReason(Pn.KICKED_OUT_MULT_ACCOUNT),t._m.reset()}))}},{key:"onMultipleDeviceKickedOut",value:function(e){var t=this;new Jn("kickedOut").setMessage("type:".concat(E.KICKED_OUT_MULT_DEVICE," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),Ae.w("".concat(this._n,".onMultipleDeviceKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),this.logout(1).then((function(){t.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_MULT_DEVICE}),t._m.setNotReadyReason(Pn.KICKED_OUT_MULT_DEVICE),t._m.reset()}))}},{key:"onUserSigExpired",value:function(){new Jn("kickedOut").setMessage(E.KICKED_OUT_USERSIG_EXPIRED).end(!0),Ae.w("".concat(this._n,".onUserSigExpired userID:").concat(this.getMyUserID())),0!==this.get(12).getStatusInstanceID()&&(this.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_USERSIG_EXPIRED}),this._m.setNotReadyReason(Pn.KICKED_OUT_USERSIG_EXPIRED),this._m.reset())}},{key:"onRestApiKickedOut",value:function(e){new Jn("kickedOut").setMessage("type:".concat(E.KICKED_OUT_REST_API," newInstanceInfo:").concat(JSON.stringify(e))).end(!0),Ae.w("".concat(this._n,".onRestApiKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),e),0!==this.get(12).getStatusInstanceID()&&(this.emitOEvt(S.KICKED_OUT,{type:E.KICKED_OUT_REST_API}),this._m.setNotReadyReason(Pn.KICKED_OUT_REST_API),this._m.reset(),this.get(21).onRestApiKickedOut())}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this.resetReady(),this._helloInterval=120,this._lastLoginTs=0,this._lastWsHelloTs=0,this._isWebUniapp=0}}]),Oi);function Oi(e){return o(this,Oi),(e=$o.call(this,e))._n="SignModule",e._helloInterval=120,e._lastLoginTs=0,e._lastWsHelloTs=0,e._isWebUniapp=0,Bo.mixin(f(e)),e}function wi(e,t){o(this,wi),this._m=e,this._isLoggedIn=!1,this._SDKAppID=t.SDKAppID,this._userID=t.userID||"",this._userSig=t.userSig||"",this._version="3.4.7",this._a2Key="",this._tinyID="",this._customStatus="",this._contentType="json",this._unlimitedAVChatRoom=t.unlimitedAVChatRoom,this._scene=t.scene||"",this._oversea=t.oversea,this._instanceID=t.instanceID,this._statusInstanceID=0,this._isDevMode=t.devMode,this._isTestEnv=t.testEnv,this._proxyServer=t.proxyServer,this._fileUploadProxy=t.fileUploadProxy,this._fileDownloadProxy=t.fileDownloadProxy,this._applicationID=0,this._isPartialUpdatedConvs=t.partialUpdatedConversations,this._isUsingChatCore=!1,this._uiPlatform=0,this._authKey="",this._customLoginInfo=""}function Pi(e){return o(this,Pi),(e=zo.call(this,e))._n="UserModule",e._profileHandler=new Si(f(e)),e._blacklistHandler=new Di(f(e)),e._userStatusHandler=new ki(f(e)),e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,e.onContextUpdated,f(e)),e}function Ni(e){o(this,Ni),this._userM=e,this._n="UserStatusHandler",this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100,this._userM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function Gi(e){o(this,Gi),this._userM=e,this._n="BlacklistHandler",this._blacklistMap=new Map,this.startIndex=0,this.maxLimited=100,this.currentSequence=0}function Ui(e){o(this,Ui),this._userM=e,this._n="ProfileHandler",this.TAG="profile",this.accountProfileMap=new Map,this.expirationTime=864e5}function xi(e){return o(this,xi),(e=Wo.call(this,e))._n="TopicModule",e._topicMap=new Map,e._getTopicTimeMap=new Map,e.TOPIC_CACHE_TIME=300,e.TOPIC_LAST_ACTIVE_TIME=3600,e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Fi(e,t){o(this,Fi),this.topicID="",this.topicName="",this.avatar="",this.introduction="",this.notification="",this.unreadCount=0,this.muteAllMembers=!1,this.customData="",this.groupAtInfoList=[],this.nextMessageSeq=0,this.lastMessage=jo(e.lastMessage,t),this.selfInfo={muteTime:0,readedSequence:0,messageRemindType:"",excludedUnreadSequenceList:void 0},this._initTopic(e)}function qi(e){return o(this,qi),(e=Yo.call(this,e))._n="GroupModule",e._commonGroupHandler=new ui(f(e)),e._groupAttributesHandler=new li(f(e)),e._groupCountersHandler=new di(f(e)),e._AVChatRoomHandler=new fi(f(e)),e._groupTipsHandler=new ci(f(e)),e._groupSystemNoticeHandler=new vi(f(e)),e._groupMemberHandler=new _i(f(e)),e.groupMap=new Map,e._unjoinedAVChatRoomList=new Map,e._receiptDetailCompleteMap=new Map,e._onlineMemberCountMap=new Map,e._timeoutIDs=[],e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Vi(e){o(this,Vi),this._grpM=e,this._n="GroupSystemNoticeHandler",this.pendencyMap=new Map}function Bi(e){o(this,Bi),this._grpM=e,this._n="GroupMemberHandler",this.groupMemberListMap=new Map,this.DEFAULT_MEMBER_INFO_FILTER=["Role","JoinTime","NameCard","ShutUpUntil","OnlineStatus"],this._grpM.getIEmitInst().on(xo.PROFILE_UPDATED,this._onProfileUpdated,this)}function Hi(e){o(this,Hi),this.userID="",this.avatar="",this.nick="",this.role="",this.joinTime="",this.lastSendMsgTime="",this.nameCard="",this.muteUntil=0,this.memberCustomField=[],this.isOnline=!1,this.updateMember(e)}function ji(e){o(this,ji),this._grpM=e,this._n="AVChatRoomHandler",this._joinedGroupMap=new Map,this._pollingRequestInfoMap=new Map,this._pollingInstanceMap=new Map,this._seqSll=new ei(200),this._IDSll=new ei(100),this._reportMessageStackedCount=0,this._onlineMemberCountMap=new Map,this.DEFAULT_EXPIRE_TIME=60,this.DEFAULT_POLLING_INTERVAL=300,this.MAX_POLLING_INTERVAL=2e3,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0,this._startBroadcastSeq=1,this._broadcastMessageIDMap=new Map,this.DEFAULT_POLLING_SIMPLIFIED_MSG=0}function Ki(e){o(this,Ki);var t=e.manager,n=e.groupID,i=e.onInit,a=e.onSuccess;e=e.onFail,this._n="Polling",this._manager=t,this._grpM=t._grpM,this._onInit=i,this._onSuccess=a,this._onFail=e,this._groupID=n,this._timeoutID=-1,this._isRunning=!1,this._proto=Gn.AV_POLLING}function $i(e){o(this,$i),this._grpM=e,this._n="GroupCountersHandler",this._groupCountersMap=new Map,this.EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function zi(e){o(this,zi),this._grpM=e,this._n="GroupAttributesHandler",this._groupAttributesMap=new Map,this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4,this._grpM.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function Wi(e){o(this,Wi),this._grpM=e,this._n="CommonGroupHandler",this.tempConversationList=null,this._cachedGroupMessageMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4,this.PAGING_GRP_COUNT_LIMIT=200,this._pagingStatus=Sn,this._pagingGetCostList=[],e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,this.syncGroupList,this)}function Yi(e){o(this,Yi),this._grpM=e,this._n="GroupTipsHandler",this._cachedGroupTipsMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4}function Xi(e){return o(this,Xi),(e=Xo.call(this,e))._n="ConvModule",Bo.mixin(f(e)),e._msgListHandler=new Fo(f(e)),e._msgRemindHandler=new ai(f(e)),e._convGroupHandler=new si(f(e)),e._sll=new ei(100),e._pagingStatus=Sn,e._pagingTs=0,e._pagingStartIdx=0,e._pagingPinnedTs=0,e._pagingPinnedStartIdx=0,e._pagingConvIDMap=new Map,e._convIDFromUnreadDBMap=new Map,e._convMap=new Map,e._tmpGroupList=[],e._tmpGroupAtTipsList=[],e._peerReadTimeMap=new Map,e._completedMap=new Map,e._roamingMsgKeyAndTimeMap=new Map,e._remoteGroupReadSeqMap=new Map,e._convTotalUnreadCount=0,e._pagingGetCostList=[],e._convMapForDiff=new Map,e._partialUpdatedConvMap=new Map,e._everClearedMap=new Map,e._bPullOnInvite=!0,e._initListeners(),e}function Ji(e){o(this,Ji),this._convM=e,this._n="ConvGroupHandler",this._convGroupMap=new Map,this._startIndex=0,this._pagingStatus=Sn}function Zi(e){o(this,Zi),this._convM=e,this._n="MsgRemindHandler"}function Qi(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];o(this,Qi),this.conversationID=e.conversationID||"",this.unreadCount=e.unreadCount||0,this.type=e.type||"",this.lastMessage=Ho(e.lastMessage,t,n),e.lastMsgTime&&(this.lastMessage.lastTime=e.lastMsgTime),this._isInfoCompleted=!1,this.peerReadTime=e.peerReadTime||0,this.groupAtInfoList=[],this.remark="",this.isPinned=e.isPinned||!1,this.messageRemindType=e.messageRemindType,this.markList=e.markList||[],this.customData=e.customData||"",this.conversationGroupList=e.conversationGroupList||[],this.draftText=e.draftText||"",this._initProfile(e),this.subType=this.groupProfile?this.groupProfile.type:""}function ea(e){o(this,ea),this.groupID="",this.name="",this.avatar="",this.type="",this.introduction="",this.notification="",this.ownerID="",this.createTime="",this.infoSequence="",this.lastInfoTime="",this.selfInfo={messageRemindType:"",joinTime:"",nameCard:"",role:"",userID:"",memberCustomField:void 0,readedSequence:0,excludedUnreadSequenceList:void 0},this.lastMessage={lastTime:"",lastSequence:"",fromAccount:"",messageForShow:""},this.nextMessageSeq="",this.memberNum="",this.memberCount="",this.maxMemberNum="",this.maxMemberCount="",this.joinOption="",this.inviteOption="",this.groupCustomField=[],this.muteAllMembers=!1,this.isSupportTopic=!1,this._lastRevokedTime=0,this._initGroup(e)}function ta(e){o(this,ta),this.MAX_LENGTH=e,this.map=new Map}function na(e){var t=this;o(this,na),Ve(e)||(this.userID=e.userID||"",this.nick=e.nick||"",this.gender=e.gender||"",this.birthday=e.birthday||0,this.location=e.location||"",this.selfSignature=e.selfSignature||"",this.allowType=e.allowType||E.ALLOW_TYPE_ALLOW_ANY,this.language=e.language||0,this.avatar=e.avatar||"",this.messageSettings=e.messageSettings||0,this.adminForbidType=e.adminForbidType||E.FORBID_TYPE_NONE,this.level=e.level||0,this.role=e.role||0,this.lastUpdatedTime=0,this.profileCustomField=[],Ve(e.profileCustomField))||e.profileCustomField.forEach((function(e){t.profileCustomField.push({key:e.key,value:e.value})}))}function oa(){return null}function ia(e){var t=e.get(12);return{SDKType:10,SDKAppID:t.getSDKAppID(),SDKVersion:t.getVersion(),tinyID:Number(t.getTinyID()),userID:t.getUserID(),platform:e.getPlatform(),instanceID:t.getInstanceID(),traceID:De()}}a(ga,[{key:"_errorTolerantHandle",value:function(){Z||"undefined"!=typeof window&&this._canIUseCookies()||(this.getItem=oa,this.setItem=oa,this.removeItem=oa,this.clear=oa)}},{key:"onCheckTimer",value:function(e){e%20==0&&0!==this._storageQueue.size&&this._doFlush()}},{key:"_doFlush",value:function(){try{var e,t=T(this._storageQueue);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2),o=n[0],i=n[1];this._setStorageSync(this._getKey(o),i)}}catch(a){t.e(a)}finally{t.f()}this._storageQueue.clear()}catch(a){Ae.w("".concat(this._n,"._doFlush error:"),a)}}},{key:"_getPrefix",value:function(){var e=this._m.get(12);return"TIM_".concat(e.getSDKAppID(),"_").concat(e.getUserID(),"_")}},{key:"_getKey",value:function(e){return"".concat(this._getPrefix()).concat(e)}},{key:"getItem",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];try{var n=t?this._getKey(e):e;return this.getStorageSync(n)}catch(o){return Ae.w("".concat(this._n,".getItem error:"),o),{}}}},{key:"setItem",value:function(e,t){var n;2<arguments.length&&void 0!==arguments[2]&&arguments[2]?(n=3<arguments.length&&void 0!==arguments[3]&&!arguments[3]?e:this._getKey(e),this._setStorageSync(n,t)):this._storageQueue.set(e,t)}},{key:"clear",value:function(){try{Z?ne.clearStorageSync():this._canIUseCookies()&&localStorage.clear()}catch(e){Ae.w("".concat(this._n,".clear error:"),e)}}},{key:"removeItem",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];try{var n=t?this._getKey(e):e;this._removeStorageSync(n)}catch(o){Ae.w("".concat(this._n,".removeItem error:"),o)}}},{key:"getSize",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"b";try{var o={size:0,limitSize:5242880,unit:n};if(Object.defineProperty(o,"leftSize",{enumerable:!0,get:function(){return o.limitSize-o.size}}),Z&&(o.limitSize=1024*ne.getStorageInfoSync().limitSize),e)o.size=JSON.stringify(this.getItem(e)).length+this._getKey(e).length;else if(Z)ne.getStorageInfoSync().keys.forEach((function(e){o.size+=JSON.stringify(t.getStorageSync(e)).length+t._getKey(e).length}));else if(this._canIUseCookies())for(var i in localStorage)localStorage.hasOwnProperty(i)&&(o.size+=localStorage.getItem(i).length+i.length);return this._convertUnit(o)}catch(a){Ae.w("".concat(this._n," error:"),a)}}},{key:"_convertUnit",value:function(e){var t,n={},o=e.unit;for(t in n.unit=o,e)"number"==typeof e[t]&&("kb"===o.toLowerCase()?n[t]=Math.round(e[t]/1024):"mb"===o.toLowerCase()?n[t]=Math.round(e[t]/1024/1024):n[t]=e[t]);return n}},{key:"_setStorageSync",value:function(e,t){Z?z?my.setStorageSync({key:e,data:t}):ne.setStorageSync(e,t):this._canIUseCookies()&&localStorage.setItem(e,JSON.stringify(t))}},{key:"getStorageSync",value:function(e){return Z?z?my.getStorageSync({key:e}).data:ne.getStorageSync(e):this._canIUseCookies()?JSON.parse(localStorage.getItem(e)):{}}},{key:"_removeStorageSync",value:function(e){Z?z?my.removeStorageSync({key:e}):ne.removeStorageSync(e):this._canIUseCookies()&&localStorage.removeItem(e)}},{key:"_canIUseCookies",value:function(){return"undefined"!=typeof window&&navigator&&navigator.cookieEnabled&&localStorage}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._doFlush()}}]);var aa,sa=ga,ra=(a(fa,[{key:"pushIn",value:function(e){Ae.d("".concat(this._n,".pushIn"),this._report.length,e),this._report.push(e)}},{key:"backfill",value:function(e){var t;We(e)&&0!==e.length&&(Ae.d("".concat(this._n,".backfill"),this._report.length,e.length),(t=this._report).unshift.apply(t,m(e)))}},{key:"getLogsNumInMemory",value:function(){return this._report.length}},{key:"isEmpty",value:function(){return 0===this._report.length}},{key:"_reset",value:function(){this._report.length=0,this._report=[]}},{key:"getLogsInMemory",value:function(){var e=this._report.slice();return this._reset(),e}}]),fa),ca=(r(ha,bn),aa=g(ha),a(ha,[{key:"reportAtOnce",value:function(){this._report()}},{key:"_onLoginSuccess",value:function(){var e=this,t=this.get(13),n=t.getItem(this.TAG,!1);!Ve(n)&&Ye(n.forEach)&&(Ae.l("".concat(this._n,"._onLoginSuccess. logs count:").concat(n.length)),n.forEach((function(t){e._reportBody.pushIn(t)})),t.removeItem(this.TAG,!1))}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("evt_rpt_threshold"),t=this.getCloudConfig("evt_rpt_waiting"),n=this.getCloudConfig("evt_rpt_level"),o=this.getCloudConfig("evt_rpt_sdkappid_bl"),i=this.getCloudConfig("evt_rpt_tinyid_wl");ut(e)||(this.MIN_THRESHOLD=Number(e)),ut(t)||(this.WAITING_TIME=Number(t)),ut(n)||(this.REPORT_LEVEL=n.split(",").map((function(e){return Number(e)}))),ut(o)||(this.REPORT_SDKAPPID_BLACKLIST=o.split(",").map((function(e){return Number(e)}))),ut(i)||(this.REPORT_TINYID_WHITELIST=i.split(","))}},{key:"pushIn",value:function(e){e instanceof Jn&&(e.updateTimeStamp(),this._reportBody.pushIn(e),this._reportBody.getLogsNumInMemory()>=this.MIN_THRESHOLD)&&this._report()}},{key:"onCheckTimer",value:function(){Date.now()<this._lastReportTime+this.WAITING_TIME||this._reportBody.isEmpty()||this._report()}},{key:"_filterLogs",value:function(e){var t=this,n=(o=this.get(12)).getSDKAppID(),o=o.getTinyID();return Pt(this.REPORT_SDKAPPID_BLACKLIST,n)&&!Nt(this.REPORT_TINYID_WHITELIST,o)?[]:e.filter((function(e){return t.REPORT_LEVEL.includes(e.level)}))}},{key:"_report",value:function(){var e,n,o=this;this._reportBody.isEmpty()||(e=this._reportBody.getLogsInMemory(),0!==(n=this._filterLogs(e)).length?(n={header:ia(this),event:n},this.req({P:Gn.SSO_STAT,data:t({},n)}).then((function(){o._lastReportTime=Date.now()})).catch((function(t){Ae.w("".concat(o._n,"._report failed. error:"),t),o._lastReportTime=Date.now(),o._reportBody.backfill(e),o._reportBody.getLogsNumInMemory()>o.MAX_THRESHOLD&&o._flushAtOnce()}))):this._lastReportTime=Date.now())}},{key:"_flushAtOnce",value:function(){var e=this.get(13),t=e.getItem(this.TAG,!1),n=this._reportBody.getLogsInMemory(),o="".concat(this._n,"._flushAtOnce");Ve(t)?(Ae.l("".concat(o," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1)):((n=n.concat(t)).length>this.MAX_THRESHOLD&&(n=n.slice(0,this.MAX_THRESHOLD)),Ae.l("".concat(o," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._lastReportTime=0,this._report(),this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[]}}]),ha),ua="none",la="online",da=(a(pa,[{key:"_startRN",value:function(){var e,t=this;ee&&(e=this._m.get(18).getPlugin("chat-network-monitor"))&&(this._removeListener=e.addEventListener((function(e){var n=e.isConnected;e=e.type,t._networkType!==e&&t._onNetworkStatusChange({isConnected:void 0!==n&&n,networkType:e})})))}},{key:"start",value:function(){var e=this,t="".concat(this._n,".start");Z?(ne.getNetworkType({success:function(n){e._networkType=n.networkType||n.subtype||"",n.networkType===ua?Ae.w("".concat(t," no network, please check!")):Ae.i("".concat(t," networkType:").concat(n.networkType))}}),this._mpNetworkStatusCallback=this._onNetworkStatusChange.bind(this),ne.onNetworkStatusChange(this._mpNetworkStatusCallback)):te&&(this._networkType=la,this._webOnlineCallback=this._onWebOnline.bind(this),this._webOfflineCallback=this._onWebOffline.bind(this),window.addEventListener("online",this._webOnlineCallback),window.addEventListener("offline",this._webOfflineCallback))}},{key:"_onWebOnline",value:function(){this._onNetworkStatusChange({isConnected:!0,networkType:la})}},{key:"_onWebOffline",value:function(){this._onNetworkStatusChange({isConnected:!1,networkType:ua})}},{key:"_onNetworkStatusChange",value:function(e){var t=e.isConnected,n=(e=e.networkType,"".concat(this._n,"._onNetworkStatusChange")),o=!1,i="previous:".concat(this._networkType," current:").concat(e);t?(Ae.i("".concat(n," ").concat(i)),this._networkType!==e&&(o=!0,this._networkType=e,this._m.get(21).reConnect(!0))):this._networkType!==e&&(o=!0,this._networkType=e,Ae.w("".concat(n," no network, please check!")),this._m.get(21).offline()),o&&new Jn("networkChange").setMessage("isConnected:".concat(t," ").concat(i)).end()}},{key:"isOnline",value:function(){return this._networkType!==ua}},{key:"getNetworkType",value:function(){return this._networkType}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),Z?null!==this._mpNetworkStatusCallback&&(ne.offNetworkStatusChange&&ne.offNetworkStatusChange(this._mpNetworkStatusCallback),this._mpNetworkStatusCallback=null):te?(null!==this._webOnlineCallback&&(window.removeEventListener("online",this._webOnlineCallback),this._webOnlineCallback=null),null!==this._onWebOffline&&(window.removeEventListener("offline",this._webOfflineCallback),this._webOfflineCallback=null)):ee&&this._removeListener&&(this._removeListener(),this._removeListener=null)}}]),pa);function pa(e){o(this,pa),this._m=e,this._networkType=la,this._n="NetMonitorModule",this._mpNetworkStatusCallback=null,this._webOnlineCallback=null,this._webOfflineCallback=null,this._removeListener=null,this._m.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,this._startRN,this)}function ha(e){o(this,ha),(e=aa.call(this,e))._n="EventStatModule",e.TAG="im-ssolog-event",e._reportBody=new ra,e.MIN_THRESHOLD=20,e.MAX_THRESHOLD=100,e.WAITING_TIME=6e4,e.REPORT_LEVEL=[4,5,6],e.REPORT_SDKAPPID_BLACKLIST=[],e.REPORT_TINYID_WHITELIST=[],e._lastReportTime=Date.now();var t=e.getIEmitInst();return t.on(xo.A2KEY_AND_TINYID_UPDATED,e._onLoginSuccess,f(e)),t.on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function fa(e){o(this,fa),this._n="SSOLogBody",this._report=[]}function ga(e){o(this,ga),this._m=e,this._n="StorageModule",this._storageQueue=new Map,this._errorTolerantHandle()}function _a(e,t){return e(t={exports:{}},t.exports),t.exports}var ma,va=_a((function(e){var t=Object.prototype.hasOwnProperty,n="~";function o(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,o,a,s){if("function"!=typeof o)throw new TypeError("The listener must be a function");return o=new i(o,a||e,s),a=n?n+t:t,e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],o]:e._events[a].push(o):(e._events[a]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function r(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(n=!1)),r.prototype.eventNames=function(){var e,o,i=[];if(0===this._eventsCount)return i;for(o in e=this._events)t.call(e,o)&&i.push(n?o.slice(1):o);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},r.prototype.listeners=function(e){e=n?n+e:e;var t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var o=0,i=t.length,a=new Array(i);o<i;o++)a[o]=t[o].fn;return a},r.prototype.listenerCount=function(e){return e=n?n+e:e,(e=this._events[e])?e.fn?1:e.length:0},r.prototype.emit=function(e,t,o,i,a,s){var r=n?n+e:e;if(!this._events[r])return!1;var c,u=this._events[r],l=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,o),!0;case 4:return u.fn.call(u.context,t,o,i),!0;case 5:return u.fn.call(u.context,t,o,i,a),!0;case 6:return u.fn.call(u.context,t,o,i,a,s),!0}for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];u.fn.apply(u.context,c)}else for(var d,p=u.length,h=0;h<p;h++)switch(u[h].once&&this.removeListener(e,u[h].fn,void 0,!0),l){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,t);break;case 3:u[h].fn.call(u[h].context,t,o);break;case 4:u[h].fn.call(u[h].context,t,o,i);break;default:if(!c)for(d=1,c=new Array(l-1);d<l;d++)c[d-1]=arguments[d];u[h].fn.apply(u[h].context,c)}return!0},r.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},r.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},r.prototype.removeListener=function(e,t,o,i){if(e=n?n+e:e,this._events[e])if(t){var a=this._events[e];if(a.fn)a.fn!==t||i&&!a.once||o&&a.context!==o||s(this,e);else{for(var r=0,c=[],u=a.length;r<u;r++)(a[r].fn!==t||i&&!a[r].once||o&&a[r].context!==o)&&c.push(a[r]);c.length?this._events[e]=1===c.length?c[0]:c:s(this,e)}}else s(this,e);return this},r.prototype.removeAllListeners=function(e){return e?(e=n?n+e:e,this._events[e]&&s(this,e)):(this._events=new o,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prefixed=n,e.exports=r.EventEmitter=r})),ya=["rich.my-imcloud.com","imrich.qcloud.com"],Ia=["requestSnapshotUrl"],Ma=(r(ka,bn),ma=g(ka),a(ka,[{key:"_init",value:function(){this._fileDownloadProxy=this.getFileDownloadProxy(),this._authKey=this.getDowloadFileAuthKey();var e=this.get(18);this.TIMUploadPlugin=e.getPlugin("tim-upload-plugin"),this.TIMUploadPlugin?this._initUploaderMethod():(this.COSSDK=e.getPlugin(e=Z?"cos-wx-sdk":"cos-js-sdk"),this.COSSDK?(this._getAuthorizationKey(),this.warn("CosReplacement",e)):this.warn("PluginUndetected"))}},{key:"_onCloudConfig",value:function(){var e=this,t="".concat(this._n,"._onCloudConfig"),n=this.getCloudConfig("upload_size_limit"),o=this.getCloudConfig("simple_cos"),i=this.getCloudConfig("file_dn_list");if(Ae.l("".concat(t," uploadSizeLimit:").concat(n," simpleCos:").concat(o)),!ut(n))try{var a=JSON.parse(n);this.UPLOAD_SIZE_LIMIT={A:a.a?1048576*parseInt(a.a):this.UPLOAD_SIZE_LIMIT.A,F:a.f?1048576*parseInt(a.f):this.UPLOAD_SIZE_LIMIT.F,I:a.i?1048576*parseInt(a.i):this.UPLOAD_SIZE_LIMIT.I,V:a.v?1048576*parseInt(a.v):this.UPLOAD_SIZE_LIMIT.V}}catch(s){}if(ut(o)||(this.isSimpleCos="1"===o),!ut(i))try{JSON.parse(i).forEach((function(t){e._fileDNList.includes(t)||e._fileDNList.push(t)}))}catch(s){}}},{key:"_getAuthorizationKey",value:function(){var e=this,t="".concat(this._n,".").concat("_getAuthorizationKey"),n=new Jn("_getAuthorizationKey"),o=Math.ceil(Date.now()/1e3);this.req({P:Gn.COS_SIGN,data:{duration:this.expiredTimeLimit}}).then((function(i){i=i.data;var a=(Ae.l("".concat(t," ok. data:"),i),i.expiredTime-o);n.setMessage("requestId:".concat(i.requestId," requestTime:").concat(o," expiredTime:").concat(i.expiredTime," diff:").concat(a,"s")).end(),!Z&&i.region&&(e.region=i.region),e.appid=i.appid,e.bucketName=i.bucketName,e.ciUrl=i.ciUrl,e.directory=i.directory,e.downloadUrl=i.downloadUrl,e.uploadUrl=i.uploadUrl,e.cosOptions={secretId:i.secretId,secretKey:i.secretKey,sessionToken:i.sessionToken,expiredTime:i.expiredTime},Ae.l("".concat(t," ok. region:").concat(e.region," bucketName:").concat(e.bucketName)),e._initUploaderMethod()})).catch((function(e){n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e)}))}},{key:"_getCosPreSigUrl",value:function(e){var t=this,n="".concat(this._n,".").concat("_getCosPreSigUrl"),o=Math.ceil(Date.now()/1e3),i=new Jn("_getCosPreSigUrl"),a={uploadMethod:e.uploadMethod,platform:this.getPlatform(),SDKAppID:this.getSDKAppID(),userID:e.userID,conversationType:e.conversationType,uploadConfig:[{fileID:1,fileType:e.fileType,fileName:e.fileName}]},s=Gn.SIMPLE_COS_PRE_SIG;return this.isSimpleCos||(a={fileType:e.fileType,fileName:e.fileName,uploadMethod:e.uploadMethod,duration:e.duration},s=Gn.COS_PRE_SIG),this.req({P:s,data:a}).then((function(e){t.tryCount=0,e=e.data||{};var a,s,r=(Ae.l("".concat(n," ok. isSimpleCos:").concat(t.isSimpleCos," data:"),e),"");return r=t.isSimpleCos?(a=(s=e.preSig[0]).uploadUrl,s=s.fileKey,"uploadIP:".concat(e.uploadIP," uploadUrl:").concat(a," fileKey:").concat(s," cost:").concat(jt(o))):"requestId:".concat(e.requestId," expiredTime:").concat(e.expiredTime," diff:").concat(e.expiredTime-o,"s"),i.setMessage(r).end(),e})).catch((function(o){return-1===o.code&&(o.code=Pn.COS_GET_SIG_FAIL),i.setError(o).end(),Ae.w("".concat(n," failed. error:"),o),t.tryCount<1?(t.tryCount++,t._getCosPreSigUrl(e)):(t.tryCount=0,yn({code:Pn.COS_GET_SIG_FAIL}))}))}},{key:"_initUploaderMethod",value:function(){var e=this;this.TIMUploadPlugin?(this.timUploadPlugin=new this.TIMUploadPlugin,this._cosUploadMethod=function(t,n){e.timUploadPlugin.uploadFile(t,n)}):this.appid&&(this.cos=Z?new this.COSSDK({ForcePathStyle:!0,getAuthorization:this._getAuthorization.bind(this)}):new this.COSSDK({getAuthorization:this._getAuthorization.bind(this)}),this._cosUploadMethod=Z?function(t,n){e.cos.postObject(t,n)}:function(t,n){e.cos.uploadFiles(t,n)})}},{key:"onCheckTimer",value:function(e){!this.COSSDK||this.TIMUploadPlugin||this.isLoggedIn()&&e%60==0&&Math.ceil(Date.now()/1e3)>=this.cosOptions.expiredTime-120&&this._getAuthorizationKey()}},{key:"getFileDNList",value:function(){return this._fileDNList}},{key:"_getAuthorization",value:function(e,t){t({TmpSecretId:this.cosOptions.secretId,TmpSecretKey:this.cosOptions.secretKey,XCosSecurityToken:this.cosOptions.sessionToken,ExpiredTime:this.cosOptions.expiredTime})}},{key:"upload",value:function(e){if(!0===e._relayFlag)return Promise.resolve();var t=this.get(26);switch(e.type){case E.MSG_IMAGE:return t.addTotalCount(Hn),this._uploadImage(e);case E.MSG_FILE:return t.addTotalCount(Hn),this._uploadFile(e);case E.MSG_AUDIO:return t.addTotalCount(Hn),this._uploadAudio(e);case E.MSG_VIDEO:return t.addTotalCount(Hn),this._uploadVideo(e);default:return Promise.resolve()}}},{key:"_uploadImage",value:function(e){var n=this,o=this.get(2),i=e.getElements()[0],a=o.getMessageOption(e.clientSequence);return this.doUploadImage({file:a.payload.file,to:a.to,message:e,onProgress:function(e){if(i.updatePercent(e),Ye(a.onProgress))try{a.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(o){var a=o.location,s=o.fileType,r=o.fileSize,c=o.width,u=o.height,l=o.smallImageUrl,d=o.smallImageWidth,p=o.smallImageHeight,h=o.largeImageUrl,f=o.largeImageWidth,g=o.largeImageHeight,_=o.imageInfoArray;o=n.isPrivateNetWork()?a:at(a),i.updateImageFormat(s);var m,v,y={size:r,url:o,width:c,height:u};if(_&&0<_.length)for(var I=0;I<_.length;I++){var M=_[I];1===M.type?m=M:2===M.type?v=M:y=t(t({},y),M)}else v=l&&h?(m={url:l,width:d,height:p},{url:h,width:f,height:g}):(m=At({originUrl:o,originWidth:c,originHeight:u,min:198}),At({originUrl:o,originWidth:c,originHeight:u,min:720}));return i.updateImageInfoArray([t({},y),t({},v),t({},m)]),e}))}},{key:"_uploadFile",value:function(e){var t=this,n=this.get(2),o=e.getElements()[0],i=n.getMessageOption(e.clientSequence);return this.doUploadFile({file:i.payload.file,to:i.to,message:e,onProgress:function(e){if(o.updatePercent(e),Ye(i.onProgress))try{i.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(n){var i=n=n.location;return t.isPrivateNetWork()||(i=oo(i=at(n),t._fileDownloadProxy,t._authKey,t._fileDNList)),o.updateFileUrl(i),e}))}},{key:"_uploadAudio",value:function(e){var t=this,n=this.get(2),o=e.getElements()[0],i=n.getMessageOption(e.clientSequence);return this.doUploadAudio({file:i.payload.file,to:i.to,message:e,onProgress:function(e){if(o.updatePercent(e),Ye(i.onProgress))try{i.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(n){return n=n.location,n=t.isPrivateNetWork()?n:at(n),o.updateAudioUrl(n),e}))}},{key:"_uploadVideo",value:function(e){var t=this,n=this.get(2),o=e.getElements()[0],i=n.getMessageOption(e.clientSequence);return this.doUploadVideo({file:i.payload.file,to:i.to,message:e,onProgress:function(e){if(o.updatePercent(e),Ye(i.onProgress))try{i.onProgress(e)}catch(t){return yn({code:Pn.MSG_ONPROGRESS_ERR})}}}).then((function(n){var i=n.location;return n=n.snapshotInfo,i=t.isPrivateNetWork()?i:at(i),o.updateVideoUrl(i),Ve(n)||o.updateSnapshotInfo(n),e}))}},{key:"_checkSizeError",value:function(e){var t="";return"A"===e?t="audio":"I"===e?t="image":"V"===e?t="video":"F"===e&&(t="file"),yn({code:Pn["MSG_".concat(e,"_SIZE_LIMIT")],message:this.getErrMsg("UploadSizeLimit",t,"".concat(this.UPLOAD_SIZE_LIMIT[e]/1048576,"MB"))})}},{key:"doUploadImage",value:function(e){var t,n,o=this;return!e.file||this._isEmptyFileList(e.file.files)?yn({code:Pn.MSG_I_SELECT_F_FIRST}):!0!==(t=this._checkImageType(e.file))||!0!==(t=this._checkImageSize(e.file))?t:(n=null,this._setUploadFileType(1),this.uploadByCOS(e).then((function(t){if(n=t,o.isPrivateNetWork())return Dt(a);if(We(n.imageInfoArray)){var i=n.imageInfoArray.find((function(e){return 3===e.type}));if(i)return i}var a;return ee?{width:e.file.width,height:e.file.height}:(a=at(t.location),o.COSSDK?Dt(a):Dt(a=oo(a,o._fileDownloadProxy,o._authKey,o._fileDNList)))})).then((function(e){return n.width=e.width,n.height=e.height,Promise.resolve(n)})))}},{key:"_checkImageType",value:function(e){var t="";return t=Z?e.url.slice(e.url.lastIndexOf(".")+1):ee?e.type.split("/")[1]:e.files[0].name.slice(e.files[0].name.lastIndexOf(".")+1),0<=Jo.indexOf(t.toLowerCase())||yn({code:Pn.MSG_I_TYPES_LIMIT})}},{key:"_checkImageSize",value:function(e){return 0===(e=(Z||ee?e:e.files[0]).size)?yn({code:Pn.MSG_F_IS_EMPTY}):e<this.UPLOAD_SIZE_LIMIT.I||this._checkSizeError("I")}},{key:"doUploadFile",value:function(e){return!e.file||this._isEmptyFileList(e.file.files)?yn({code:Pn.MSG_F_SELECT_F_FIRST}):e.file.files[0].size>this.UPLOAD_SIZE_LIMIT.F?this._checkSizeError("F"):0===e.file.files[0].size?yn({code:Pn.MSG_F_IS_EMPTY}):(this._setUploadFileType(255),this.uploadByCOS(e))}},{key:"doUploadVideo",value:function(e){return e.file.videoFile.size>this.UPLOAD_SIZE_LIMIT.V?this._checkSizeError("V"):0===e.file.videoFile.size?yn({code:Pn.MSG_F_IS_EMPTY}):-1===Zo.indexOf(e.file.videoFile.type)?yn({code:Pn.MSG_V_TYPES_LIMIT}):(this._setUploadFileType(2),Z||ee?this.handleVideoUpload(t(t({},e),{},{file:e.file.videoFile})):te?this.handleVideoUpload(e):void 0)}},{key:"handleVideoUpload",value:function(e){var t=this;return new Promise((function(n,o){t.uploadByCOS(e).then((function(e){n(e)})).catch((function(){t.uploadByCOS(e).then((function(e){n(e)})).catch((function(){o(new wn({code:Pn.MSG_V_UPLOAD_FAIL}))}))}))}))}},{key:"doUploadAudio",value:function(e){return e.file?e.file.size>this.UPLOAD_SIZE_LIMIT.A?this._checkSizeError("A"):0===e.file.size?yn({code:Pn.MSG_F_IS_EMPTY}):(this._setUploadFileType(3),this.uploadByCOS(e)):yn({code:Pn.MSG_A_UPLOAD_FAIL})}},{key:"uploadByCOS",value:function(e){var t,n,o,i,a=this;return Ye(this._cosUploadMethod)?this.timUploadPlugin?this._uploadWithPreSigUrl(e):(t=new Jn("upload"),n="".concat(this._n,".uploadByCOS"),o=Date.now(),i=this._getFile(e),new Promise((function(s,r){var c=Z?a._createCosOptionsWXMiniApp(e):a._createCosOptionsWeb(e),u=a;a._cosUploadMethod(c,(function(e,c){var l,d,p=Object.create(null);c?e||We(c.files)&&c.files[0].error?(l=new wn({code:Pn.MSG_F_UPLOAD_FAIL}),t.setError(l).end(),Ae.l("".concat(n," failed. error:"),c.files[0].error),403===c.files[0].error.statusCode&&a._getAuthorizationKey(),r(l)):(p.fileName=i.name,p.fileSize=i.size,p.fileType=i.type.slice(i.type.indexOf("/")+1).toLowerCase(),p.location=(Z?c:c.files[0].data).Location,l=Date.now()-o,c=u._formatFileSize(i.size),d=u._formatSpeed(1e3*i.size/l),c="size:".concat(c," time:").concat(l,"ms speed:").concat(d),Ae.l("".concat(n," success. name:").concat(i.name," ").concat(c)),s(p),(d=a.get(26)).addCost(Hn,l),d.addFileSize(Hn,i.size),t.setMessage(c).end()):(p=new wn({code:Pn.MSG_F_UPLOAD_FAIL}),t.setError(p).end(),Ae.w("".concat(n," failed. error:"),e),403===e.statusCode&&a._getAuthorizationKey(),r(p))}))}))):(this.warn("PluginUndetected"),yn({code:Pn.COS_UNDETECTED}))}},{key:"_uploadWithPreSigUrl",value:function(e){var t=this,n="".concat(this._n,"._uploadWithPreSigUrl"),o=this._getFile(e);return this._createCosOptionsPreSigUrl(e).then((function(e){return new Promise((function(i,a){var s=new Jn("upload"),r=e.requestSnapshotUrl,c=void 0===r?void 0:r,u=h(e,Ia),l=Date.now();t._cosUploadMethod(u,(function(r,d){if(r||403===d.statusCode)s.setError(new wn(r)).end(),h={HttpStatusCode:9999,CostTime:jt(l,!1),error:r,url:e.url},d.data&&d.data.uploadIP&&(h.uploadIP=d.data.uploadIP),t._uploadSSOLog(h),Ae.l("".concat(n," failed, error:"),r),a(new wn({code:Pn.MSG_F_UPLOAD_FAIL}));else{var p=Object.create(null),h=d.data.location||"",f=(t.isPrivateNetWork()||0!==h.indexOf("https://")&&0!==h.indexOf("http://")||(h=h.split("//")[1]),p.fileName=o.name,p.fileSize=o.size,p.fileType=o.type.slice(o.type.indexOf("/")+1).toLowerCase(),p.location=h,r=jt(l,!1),h=t._formatFileSize(o.size),t._formatSpeed(1e3*o.size/r));if(h="size:".concat(h," time:").concat(r,"ms speed:").concat(f," res:").concat(JSON.stringify(d.data)),Ae.l("".concat(n," ok. name:").concat(o.name," ").concat(h)),s.setMessage(h).end(),f={HttpStatusCode:d.statusCode,FileSize:o.size,CostTime:r,url:e.url},(d.data&&d.data.uploadIP&&(f.uploadIP=d.data.uploadIP),t._uploadSSOLog(f),h=t.get(26)).addCost(Hn,r),h.addFileSize(Hn,o.size),f=[],u.thumbUrl&&u.largeUrl&&f.push.apply(f,[t._getSmallImageInfoByUrl(u.thumbUrl,p),t._getLargeImageInfoByUrl(u.largeUrl,p)]),1===t.uploadFileType&&t.isSimpleCos&&!t.isPrivateNetWork()&&(f.push(t._getImageInfoArray(u.downloadUrl,p)),d.data.uploadIP)&&f.push(t._getDownloadIP(u.downloadUrl.split("//")[1].split("/")[0],p)),c&&f.push(t._getSnapshotInfoByUrl(c,p)),0<f.length)return Promise.all(f).then((function(){i(p)}));i(p)}}))}))}))}},{key:"_getDownloadIP",value:function(e,t){var n="".concat(this._n,"._getDownloadIP"),o=Date.now();return this.req({P:Gn.GET_IP,data:{domainName:e}}).then((function(e){var i;e.data&&e.data.ip&&(Ae.l("".concat(n," ok. downloadIP:").concat(e.data.ip," cost:").concat(jt(o))),(i=t.location.split("/"))[0]=e.data.ip,t.location=i.join("/"))})).catch((function(e){}))}},{key:"_getImageInfoArray",value:function(e,t){var n=this,o="".concat(this._n,"._getImageInfoArray"),i=Date.now();return this.req({P:Gn.GET_IMAGE_INFO,data:{imageUrl:e}}).then((function(e){return e=e.data||{},Ae.l("".concat(o," ok. data: ").concat(JSON.stringify(e)," cost:").concat(jt(i))),t.imageInfoArray=e.imageInfoArray,e})).catch((function(o){t.imageInfoArray=void 0,n._uploadSSOLog({HttpStatusCode:1e4,CostTime:jt(i,!1),url:e})}))}},{key:"_uploadSSOLog",value:function(e){var t,n;this.isSimpleCos&&((t=new Jn).setEventType(18),e.error&&t.setError(new wn(e.error)),n="HttpStatusCode:".concat(e.HttpStatusCode,"|CosRequestId:").concat(e.CosRequestId||"","|")+"FileAlreadyExist:".concat(e.FileAlreadyExist||0,"|FileSize:").concat(e.FileSize||0,"|CostTime:").concat(e.CostTime),e.uploadIP&&(n+="|FinalIP:".concat(e.uploadIP)),t.setMessage("OK").setMoreMessage(e.url).setExtension(n).end())}},{key:"_getRawOrUploadProxyUrl",value:function(e){var t=this.get(12).getFileUploadProxy(),n=e;return t?e.replace(/^https:\/\/[^/]+/,t):n}},{key:"_getFile",value:function(e){return We(e.file.files)||Xe(e.file.files)?e.file.files[0]:e.file}},{key:"_formatFileSize",value:function(e){return e<1024?e+"B":e<1048576?Math.floor(e/1024)+"KB":Math.floor(e/1048576)+"MB"}},{key:"_formatSpeed",value:function(e){return e<=1048576?wt(e/1024,1)+"KB/s":wt(e/1048576,1)+"MB/s"}},{key:"_createCosOptionsWeb",value:function(e){var t=this._getFile(e),n=(n=t.name).slice(n.lastIndexOf("."));return n=this._genFileName("".concat(nt(999999)).concat(n)),{files:[{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(n),Body:t}],SliceSize:1048576,onProgress:function(t){if("function"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(n){Ae.w("onProgress callback error:",n)}},onFileFinish:function(e,t,n){}}}},{key:"_createCosOptionsWXMiniApp",value:function(e){var t=this._getFile(e),n=this._genFileName(t.name);return t=t.url,{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(n),FilePath:t,onProgress:function(t){if(Ae.l(JSON.stringify(t)),"function"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(n){Ae.w("onProgress callback error:",n)}}}}},{key:"_createCosOptionsPreSigUrl",value:function(e){var t,n=this,o="",i="",a=0,s=this._getFile(e);return a=Z||ee?(o=e.message.type===E.MSG_FILE?(t=(t=s.name).slice(t.lastIndexOf(".")),this._genFileName("".concat(nt(999999)).concat(t))):this._genFileName(s.name),i=s.url,1):(t=(t=s.name).slice(t.lastIndexOf(".")),o=this._genFileName("".concat(nt(999999)).concat(t)),i=s,0),this._getCosPreSigUrl({fileType:this.uploadFileType,fileName:o,uploadMethod:a,duration:this.duration,userID:e.message.from,conversationType:Ct(e.message.conversationID)?1:2}).then((function(t){var a=(l=n.isSimpleCos?t.preSig[0]:t).uploadUrl,s=l.downloadUrl,r=void 0===(r=l.requestSnapshotUrl)?void 0:r,c=l.thumbUrl,u=l.largeUrl,l=l.fileKey;return t=void 0===(t=t.uploadIP)?"":t,{url:n._getRawOrUploadProxyUrl(a),fileType:n.uploadFileType,fileName:o,resources:i,downloadUrl:s,requestSnapshotUrl:r,thumbUrl:c,largeUrl:u,fileKey:l,uploadIP:!n.isPrivateNetWork()&&t,onProgress:function(t){if("function"==typeof e.onProgress)try{e.onProgress(t.percent)}catch(n){Ae.w("onProgress callback error:",n),Ae.e(n)}}}}))}},{key:"_genFileName",value:function(e){return"".concat(kt(),"-").concat(e)}},{key:"_setUploadFileType",value:function(e){this.uploadFileType=e}},{key:"_getSnapshotInfoByUrl",value:function(e,t){var n=this,o="_getSnapshotInfoByUrl",i=new Jn(o);return this.req({P:Gn.VIDEO_COVER,data:{platform:this.getPlatform(),coverName:this._genFileName(nt(99999)),requestSnapshotUrl:e}}).then((function(e){var a;return e=(e.data||{}).snapshotUrl,Ae.l("".concat(n._n,".").concat(o," ok. snapshotUrl:").concat(e)),i.setMessage("snapshotUrl:".concat(e)).end(),Ve(e)?{}:Dt(a=oo(e,n._fileDownloadProxy,n._authKey,n._fileDNList)).then((function(e){t.snapshotInfo={snapshotUrl:a,snapshotWidth:e.width,snapshotHeight:e.height}}))})).catch((function(e){return Ae.w("".concat(n._n,".").concat(o," failed. error:"),e),i.setCode(e.errorCode).setMessage(e.errorInfo).end(),{}}))}},{key:"_getSmallImageInfoByUrl",value:function(e,t){return Dt(oo(e,this._fileDownloadProxy,this._authKey,this._fileDNList)).then((function(n){t.smallImageUrl=e,t.smallImageWidth=n.width,t.smallImageHeight=n.height}))}},{key:"_getLargeImageInfoByUrl",value:function(e,t){return Dt(oo(e,this._fileDownloadProxy,this._authKey,this._fileDNList)).then((function(n){t.largeImageUrl=e,t.largeImageWidth=n.width,t.largeImageHeight=n.height}))}},{key:"_isEmptyFileList",value:function(e){return!(!Xe(e)||0!==e.length)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),ka),Ca=["downloadKey","pbDownloadKey","messageList"],Ta=(a(Da,[{key:"uploadMergerMessage",value:function(e,t){var n="".concat(this._n,".").concat("uploadMergerMessage"),o=(Ae.d("".concat(n," message:"),e,"messageBytes:".concat(t)),e=JSON.parse(JSON.stringify(e.payload)).messageList).length,i=this._msgM.get(17).getFileDNList(),a=new Jn("uploadMergerMessage");return e.forEach((function(e){io(e.messageBody[0].type,e.messageBody,i)})),this._msgM.req({P:Gn.UPLOAD_MERGER_MSG,data:{messageList:e}}).then((function(e){Ae.d("".concat(n," ok. response:"),e.data);var i={pbDownloadKey:i=(e=e.data).pbDownloadKey,downloadKey:e=e.downloadKey,messageNumber:o};return a.setMessage("".concat(o,"-").concat(t,"-").concat(e)).end(),i})).catch((function(e){throw Ae.w("".concat(n," failed. error:"),e),a.setError(e).end(),e}))}},{key:"downloadMergerMessage",value:function(e){var n=this,o="".concat(this._n,".").concat("downloadMergerMessage"),i=(Ae.d("".concat(o," message:"),e),e.payload.downloadKey),a=this._msgM.getFileDownloadProxy(),s=this._msgM.getDowloadFileAuthKey(),r=new Jn("downloadMergerMessage");return r.setMessage("downloadKey:".concat(i)),this._msgM.req({P:Gn.DOWNLOAD_MERGER_MSG,data:{downloadKey:i}}).then((function(i){Ae.d("".concat(o," ok. response:"),i.data);var c,u,l=n._msgM.get(17).getFileDNList();return Ye(e.clearElement)?((c=e.payload).downloadKey,c.pbDownloadKey,c.messageList,c=h(c,Ca),e.clearElement(),e.setElement({type:e.type,content:t({messageList:i.data.messageList},c)},a,s,l)):(u=[],i.data.messageList.forEach((function(e){Ve(e)||(e=new yo(e,a,s,l),u.push(e))})),e.payload.messageList=u,e.payload.downloadKey="",e.payload.pbDownloadKey=""),r.end(),e})).catch((function(e){throw Ae.w("".concat(o," failed. key:").concat(i," error:"),e),r.setError(e).end(),e}))}},{key:"createMergerMessagePack",value:function(e,t,n){return e.conversationType===E.CONV_C2C?this._createC2CMergerMessagePack(e,t,n):this._createGroupMergerMessagePack(e,t,n)}},{key:"_createC2CMergerMessagePack",value:function(e,t,n){var o=null,i=(t&&(t.offlinePushInfo&&(o=t.offlinePushInfo),!0===t.onlineUserOnly)&&(o?o.disablePush=!0:o={disablePush:!0}),[]),a=(ze(t)&&ze(t.messageControlInfo)&&(a=(r=t.messageControlInfo).excludedFromUnreadCount,s=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===a&&i.push("NoUnread"),!0===s&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck"),""),s=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(a=e.cloudCustomData),n.pbDownloadKey),r=n.downloadKey,c=(n=n.messageNumber,(l=e.payload).title),u=l.abstractList,l=l.compatibleText,d=(d=this._msgM.get(6))&&d.isOnlineMessage(e,t)?0:void 0;return{P:Gn.SEND_C2C_MSG,data:{fromAccount:this._msgM.getMyUserID(),toAccount:e.to,msgBody:[{msgType:e.type,msgContent:{pbDownloadKey:s,downloadKey:r,title:c,abstractList:u,compatibleText:l,messageNumber:n}}],cloudCustomData:a,clientTime:e.clientTime,msgSeq:e.sequence,msgRandom:e.random,msgLifeTime:d,offlinePushInfo:No(o),messageControlInfo:0!==d?i:void 0,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0}}}},{key:"_createGroupMergerMessagePack",value:function(e,t,n){var o=null,i=(t&&t.offlinePushInfo&&(o=t.offlinePushInfo),[]),a=(ze(t)&&ze(t.messageControlInfo)&&(a=(r=t.messageControlInfo).excludedFromUnreadCount,s=r.excludedFromLastMessage,r=r.excludedFromContentModeration,!0===a&&i.push("NoUnread"),!0===s&&i.push("NoLastMsg"),!0===r)&&i.push("NoMsgCheck"),""),s=(ct(e.cloudCustomData)&&0<e.cloudCustomData.length&&(a=e.cloudCustomData),n.pbDownloadKey),r=n.downloadKey,c=(n=n.messageNumber,(l=e.payload).title),u=l.abstractList,l=l.compatibleText,d=this._msgM.get(7);return t=d&&d.isOnlineMessage(e,t)?1:0,{P:Gn.SEND_GRP_MSG,data:{fromAccount:this._msgM.getMyUserID(),groupID:e.to,msgBody:[{msgType:e.type,msgContent:{pbDownloadKey:s,downloadKey:r,title:c,abstractList:u,compatibleText:l,messageNumber:n}}],random:e.random,priority:e.priority,clientSequence:e.clientSequence,groupAtInfo:void 0,cloudCustomData:a,onlineOnlyFlag:t,offlinePushInfo:No(o),clientTime:e.clientTime,needReadReceipt:!0!==e.needReadReceipt||d.isMessageFromOrToAVChatroom(e.to)?0:1,messageControlInfo:0==t?i:void 0,isSupportExtension:!0===e.isSupportExtension?1:0,isRelayMessage:!0===e._relayFlag?1:0}}}}]),Da),Sa={ERR_SVR_COMM_SENSITIVE_TEXT:80001,ERR_SVR_COMM_BODY_SIZE_LIMIT:80002,OPEN_SERVICE_OVERLOAD_ERROR:60022,ERR_SVR_MSG_PKG_PARSE_FAILED:20001,ERR_SVR_MSG_INTERNAL_AUTH_FAILED:20002,ERR_SVR_MSG_INVALID_ID:20003,ERR_SVR_MSG_PUSH_DENY:20006,ERR_SVR_MSG_IN_PEER_BLACKLIST:20007,ERR_SVR_MSG_BOTH_NOT_FRIEND:20009,ERR_SVR_MSG_NOT_PEER_FRIEND:20010,ERR_SVR_MSG_NOT_SELF_FRIEND:20011,ERR_SVR_MSG_SHUTUP_DENY:20012,ERR_SVR_GROUP_INVALID_PARAMETERS:10004,ERR_SVR_GROUP_PERMISSION_DENY:10007,ERR_SVR_GROUP_NOT_FOUND:10010,ERR_SVR_GROUP_INVALID_GROUPID:10015,ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY:10016,ERR_SVR_GROUP_SHUTUP_DENY:10017,MSG_SEND_FAIL:2100,OVER_FREQUENCY_LIMIT:2996},Ea=[Pn.MSG_ONPROGRESS_ERR,Pn.MSG_I_SELECT_F_FIRST,Pn.MSG_I_TYPES_LIMIT,Pn.MSG_F_IS_EMPTY,Pn.MSG_I_SIZE_LIMIT,Pn.MSG_F_SELECT_F_FIRST,Pn.MSG_F_SIZE_LIMIT,Pn.MSG_V_SIZE_LIMIT,Pn.MSG_V_TYPES_LIMIT,Pn.MSG_A_UPLOAD_FAIL,Pn.MSG_A_SIZE_LIMIT,Pn.COS_UNDETECTED];function Da(e){o(this,Da),this._n="MergerMessageHandler",this._msgM=e}function ka(e){o(this,ka),(e=ma.call(this,e))._n="UploadModule",e.TIMUploadPlugin=null,e.timUploadPlugin=null,e.COSSDK=null,e._cosUploadMethod=null,e.expiredTimeLimit=600,e.appid=0,e.bucketName="",e.ciUrl="",e.directory="",e.downloadUrl="",e.uploadUrl="",e.region="ap-shanghai",e.cos=null,e.cosOptions={secretId:"",secretKey:"",sessionToken:"",expiredTime:0},e.uploadFileType="",e.duration=900,e.tryCount=0,e.UPLOAD_SIZE_LIMIT={A:20971520,F:104857600,I:20971520,V:104857600},e.isSimpleCos=!1,e._fileDownloadProxy="",e._authKey="",e._fileDNList=ya;var t=e.getIEmitInst();return t.on(xo.A2KEY_AND_TINYID_UPDATED,e._init,f(e)),t.on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function La(e){var t=!1;return Object.values(Sa).includes(e)&&(t=!0),120001<=e&&e<=13e4||10100<=e&&e<=10200||t}var ba,Aa,Ra,Oa,wa,Pa,Na=["conversationID","timePosition","timePeriod"],Ga=(r(Wa,bn),Pa=g(Wa),a(Wa,[{key:"createTextMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=ct(e.payload)?e.payload:e.payload.text,e=new Zn({text:e}),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"createImageMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));if(Z){if(je(i=e.payload.file))return void this.warn("FileUnsupportedInMP","createImageMessage");var o=i.tempFiles[0].path||i.tempFiles[0].tempFilePath,i={url:o,name:o.slice(o.lastIndexOf("/")+1),size:i.tempFiles&&i.tempFiles[0].size||1,type:o.slice(o.lastIndexOf(".")+1).toLowerCase()};e.payload.file=i}else ee?(i={url:(o=e.payload.file).uri,name:o.fileName,size:o.fileSize||1,type:o.type,width:o.width,height:o.height},e.payload.file=i):te&&(je(e.payload.file)?(o=e.payload.file,e.payload.file={files:[o]}):ze(e.payload.file)&&"undefined"!=typeof uni&&(i=e.payload.file.tempFiles[0],e.payload.file={files:[i]}));return o=new ro({imageFormat:Re.UNKNOWN,uuid:this._generateUUID(e.payload.file),file:e.payload.file}),i=this._getNickAndAvatarByUserID(t),n.setElement(o),n.setNickAndAvatar(i),n.setNameCard(this._getNameCardByGroupID(n)),this._messageOptionsMap.set(n.clientSequence,e),n}},{key:"createAudioMessage",value:function(e){var t=e.payload.file,n=(Z&&(n={url:t.tempFilePath,name:t.tempFilePath.slice(t.tempFilePath.lastIndexOf("/")+1),size:t.fileSize,second:parseInt(t.duration)/1e3,type:t.tempFilePath.slice(t.tempFilePath.lastIndexOf(".")+1).toLowerCase()},e.payload.file=n),ee&&(n={url:t.uri,name:t.uri.slice(t.uri.lastIndexOf("/")+1),size:t.fileSize||1,second:Math.floor(t.duration/1e3),type:t.uri.slice(t.uri.lastIndexOf(".")+1).toLowerCase()},e.payload.file=n),this.getMyUserID()),o=(e.currentUser=n,e.senderTinyID=this.getMyTinyID(),new Co(e));return t=new uo({second:Math.floor(t.duration/1e3),size:t.fileSize||t.size||1,url:t.tempFilePath,uuid:this._generateUUID(e.payload.file)}),n=this._getNickAndAvatarByUserID(n),o.setElement(t),o.setNickAndAvatar(n),o.setNameCard(this._getNameCardByGroupID(o)),this._messageOptionsMap.set(o.clientSequence,e),o}},{key:"createVideoMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),e.payload.file.thumbUrl="",e.payload.file.thumbSize=0,{});if(Z){if(z)return void this.warn("VideoUnsupportedInAlipay");if(je(e.payload.file))return void this.warn("FileUnsupportedInMP","createVideoMessage");var o=e.payload.file;We(o.tempFiles)&&(o=o.tempFiles[0]),n.url=o.tempFilePath,n.name=o.tempFilePath.slice(o.tempFilePath.lastIndexOf("/")+1),n.size=o.size||1,n.second=o.duration||0,n.type=o.tempFilePath.slice(o.tempFilePath.lastIndexOf(".")+1).toLowerCase()}else ee?(o=e.payload.file,n.url=o.uri,n.name=o.fileName,n.size=o.fileSize||1,n.second=o.duration||0,n.type=o.type.split("/")[1]):te&&(je(e.payload.file)?(o=e.payload.file,e.payload.file.files=[o]):ze(e.payload.file)&&"undefined"!=typeof uni&&(o=e.payload.file.tempFile,e.payload.file.files=[o]),o=e.payload.file,n.url=window.URL.createObjectURL(o.files[0]),n.name=o.files[0].name,n.size=o.files[0].size||1,n.second=o.files[0].duration||0,n.type=o.files[0].type.split("/")[1]);return e.payload.file.videoFile=n,o=new Co(e),n=new mo({videoFormat:n.type,videoSecond:wt(n.second,0),videoSize:n.size,remoteVideoUrl:"",videoUrl:n.url,videoUUID:this._generateUUID(e.payload.file.videoFile),thumbUUID:this._generateUUID(e.payload.file.videoFile),thumbWidth:e.payload.file.width||200,thumbHeight:e.payload.file.height||200,thumbUrl:e.payload.file.thumbUrl,thumbSize:e.payload.file.thumbSize,thumbFormat:e.payload.file.thumbUrl.slice(e.payload.file.thumbUrl.lastIndexOf(".")+1).toLowerCase()}),t=this._getNickAndAvatarByUserID(t),o.setElement(n),o.setNickAndAvatar(t),o.setNameCard(this._getNameCardByGroupID(o)),this._messageOptionsMap.set(o.clientSequence,e),o}},{key:"createCustomMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=new _o({data:e.payload.data,description:e.payload.description,extension:e.payload.extension}),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"createFaceMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=new co(e.payload),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"createMergerMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),t=this._getNickAndAvatarByUserID(t),new Co(e));return e=new Io(e.payload),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n.setRelayFlag(!0),n}},{key:"createForwardMessage",value:function(e){var t,n,o=e.to,i=e.conversationType,a=e.priority,s=e.payload,r=e.needReadReceipt,c=e.receiverList;return We(s._elements)?(t=this.getMyUserID(),n=this._getNickAndAvatarByUserID(t),s.type===E.MSG_GRP_TIP?yn({code:Pn.MSG_FORWARD_TYPE_INVALID}):(i={to:o,conversationType:i,conversationID:"".concat(i).concat(o),priority:a,isPlaceMessage:0,status:Mn,currentUser:t,senderTinyID:this.getMyTinyID(),cloudCustomData:e.cloudCustomData||s.cloudCustomData||"",needReadReceipt:r,receiverList:c,isSupportExtension:e.isSupportExtension||!1},(o=new Co(i)).setElement(s._elements[0]),o.setNickAndAvatar(n),o.setNameCard(this._getNameCardByGroupID(s)),o.setRelayFlag(!0),o)):yn({code:Pn.MSG_FORWARD_INVALID_ELEMENTS})}},{key:"downloadMergerMessage",value:function(e){return this._mergerMessageHandler.downloadMergerMessage(e)}},{key:"createFileMessage",value:function(e){if(Z){if(!B&&!j&&!Y)return;var n=ne.getSystemInfoSync().SDKVersion;if(B&&bt(n,"2.5.0")<0)return void this.warn("WXChooseMessageFile");if(j&&bt(n,"1.18.0")<0)return void this.warn("QQChooseMessageFile")}te||Y?je(e.payload.file)?(n=e.payload.file,e.payload.file={files:[n]}):ze(e.payload.file)&&"undefined"!=typeof uni&&(i=(n=e.payload.file).tempFiles,n=n.files,o=null,We(i)?o=i[0]:We(n)&&(o=n[0]),e.payload.file={files:[o]}):B||j?(n=t(t({},(i=e.payload.file.tempFiles)[0]),{},{url:i[0].path}),e.payload.file={files:[n]}):ee&&(i=t(t({},o=e.payload.file),{},{url:o.uri}),e.payload.file={files:[i]}),n=this.getMyUserID();var o=(e.currentUser=n,e.senderTinyID=this.getMyTinyID(),new Co(e)),i=new go({uuid:this._generateUUID(e.payload.file),file:e.payload.file});return n=this._getNickAndAvatarByUserID(n),o.setElement(i),o.setNickAndAvatar(n),o.setNameCard(this._getNameCardByGroupID(o)),this._messageOptionsMap.set(o.clientSequence,e),o}},{key:"createLocationMessage",value:function(e){var t=this.getMyUserID(),n=(e.currentUser=t,e.senderTinyID=this.getMyTinyID(),new Co(e));return e=new vo(e.payload),t=this._getNickAndAvatarByUserID(t),n.setElement(e),n.setNickAndAvatar(t),n.setNameCard(this._getNameCardByGroupID(n)),n}},{key:"_onNoModule",value:function(){return yn({code:Pn.NO_MODULE})}},{key:"sendMessageInstance",value:function(e,t){var n=this;if(!1===this.get(29).filterMessage(e,t))return e.hasRiskContent=!0,this._onSendMessageFailed(e,new wn({code:Pn.PROFANITY_FOUND}));var o,i,a,s,r=null;if(e.conversationType===E.CONV_C2C)r=this.get(6);else{if(e.conversationType!==E.CONV_GROUP)return yn({code:Pn.MSG_INVALID_CONV_TYPE});r=this.get(7)}return r?(i="".concat(this._n,".sendMessageInstance"),a=this.get(11),s=r.isOnlineMessage(e,t),this.get(17).upload(e).then((function(){return n._getSendMessageSpecifiedKey(e)===Bn&&n.get(26).addSuccessCount(Hn),n._guardForGroup(e).then((function(){if(!e.isSendable())return yn({code:Pn.MSG_F_URL_IS_EMPTY});n._addSendMessageTotalCount(e),o=Date.now();var i=function(e){var t="utf-8";te&&document&&(t=document.charset.toLowerCase());var n,o=0,i=e.length;if("utf-8"===t||"utf8"===t)for(var a=0;a<i;a++)(n=e.codePointAt(a))<=127?o+=1:n<=2047?o+=2:n<=65535?o+=3:(o+=4,a++);else if("utf-16"===t||"utf16"===t)for(var s=0;s<i;s++)(n=e.codePointAt(s))<=65535?o+=2:(o+=4,s++);else o=e.replace(/[^\x00-\xff]/g,"aa").length;return o}(JSON.stringify(e));return e.type===E.MSG_MERGER&&11264<i?n._mergerMessageHandler.uploadMergerMessage(e,i).then((function(o){return o=n._mergerMessageHandler.createMergerMessagePack(e,t,o),n.req(o)})):(a.setMessageRandom(e),r.sendMessage(e,t))})).then((function(r){var c=(r=r.data).time,u=r.sequence,l=r.readReceiptCode;return r=r.messageDropReason,Ke(l)&&0!==l&&(new Jn("sendMessageWithReceipt").setMessage("from:".concat(e.from," to:").concat(e.to," sequence:").concat(u," readReceiptCode:").concat(l)).end(),Ae.w("".concat(i," readReceiptCode:").concat(l," message:").concat(n.getErrMsg(l)))),r&&(l=new Jn("messageDropReason"),r="from:".concat(e.from," to:").concat(e.to," sequence:").concat(u," messageDropReason:").concat(r),l.setMessage(r).end(),Ae.w("".concat(i," ").concat(r))),n._addSendMessageSuccessCount(e,o),n._messageOptionsMap.delete(e.clientSequence),!0===e.isResend&&(l=a.findMessage(e.ID))&&(Ae.l("".concat(i," resend ok. ID:").concat(l.ID)),a.deleteLocalMessage(l)),e.status=Cn,e.time=c,r=!1,e.conversationType===E.CONV_GROUP?e.sequence=u:e.conversationType===E.CONV_C2C&&(l=a.getLatestMessageSentByMe(e.conversationID))&&(c=l.nick,u=l.avatar,c===e.nick&&u===e.avatar||(r=!0)),r&&a.modifyMessageSentByMe({conversationID:e.conversationID,latestNick:e.nick,latestAvatar:e.avatar}),!0===s?e._onlineOnlyFlag=!0:(a.appendToMessageList(e),l=e,ze(t)&&ze(t.messageControlInfo)&&(!0===t.messageControlInfo.excludedFromLastMessage&&(e._isExcludedFromLastMessage=!0,l=""),!0===t.messageControlInfo.excludedFromUnreadCount)&&(e._isExcludedFromUnreadCount=!0),c=e.conversationType,Mt(e.to)&&(c=E.CONV_TOPIC,n.get(10).onMessageSent({groupID:Gt(e.to),topicID:e.to,lastMessage:l})),a.onMessageSent({conversationOptionsList:[{conversationID:e.conversationID,unreadCount:0,type:c,subType:e.conversationSubType,lastMessage:l}]})),e._relayFlag||"TIMImageElem"!==e.type||Rt(e.payload.imageInfoArray),mn({message:e})}))})).catch((function(t){return n._onSendMessageFailed(e,t,s)}))):this._onNoModule()}},{key:"_guardForGroup",value:function(e){if(e.conversationType!==E.CONV_GROUP)return Promise.resolve();var t=this.get(7);if(!t)return this._onNoModule();if(It({groupID:e.to})){var n=t.getLocalGroupProfile(e.to);if(n&&n.isSupportTopic)return yn({code:Pn.MSG_SEND_GRP_WITH_TOPIC_FAIL})}return t.guardForAVChatRoom(e)}},{key:"_onSendMessageFailed",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o="".concat(this._n,"._onSendMessageFailed"),i=(e.status=Tn,80001!==t.code&&80004!==t.code||(e.hasRiskContent=!0),this.get(11)),a=(i.deleteMessageRandom(e),10100<=t.code&&t.code<=10200||120001<=t.code&&t.code<=13e4);return n||a||!0===i.appendToMessageList(e)&&Ae.l("".concat(o," message stored, ID:").concat(e.ID)),this._addSendMessageFailCountOnUser(e,t),n=new Jn("sendMessage"),a="head.seq:".concat(t.data.headSeq," type:").concat(e.type," from:").concat(e.from," to:").concat(e.to),te&&("connection"in navigator&&(i=navigator.connection,a+=" downlink:".concat(i.downlink," effectiveType:").concat(i.effectiveType," rtt:").concat(i.rtt)),"memory"in window.performance)&&(i=window.performance.memory,a+=" usedJSHeapSize:".concat(i.usedJSHeapSize," totalJSHeapSize:").concat(i.totalJSHeapSize," jsHeapSizeLimit:").concat(i.jsHeapSizeLimit)),n.setMessage(a).setError(t).end(),Ae.e("".concat(o," ").concat(a," error:"),t),yn(new wn({code:t&&t.code?t.code:Pn.MSG_SEND_FAIL,message:t&&t.message?t.message:void 0,data:{message:e}}))}},{key:"_getSendMessageSpecifiedKey",value:function(e){if([E.MSG_IMAGE,E.MSG_AUDIO,E.MSG_VIDEO,E.MSG_FILE].includes(e.type))return Bn;if(e.conversationType===E.CONV_C2C)return Fn;if(e.conversationType===E.CONV_GROUP){var t=this.get(7);if(t&&(t=t.getLocalGroupProfile(e.to)))return yt(e=t.type)?Vn:qn}}},{key:"_addSendMessageTotalCount",value:function(e){(e=this._getSendMessageSpecifiedKey(e))&&this.get(26).addTotalCount(e)}},{key:"_addSendMessageSuccessCount",value:function(e,t){var n;(e=this._getSendMessageSpecifiedKey(e))&&((n=this.get(26)).addSuccessCount(e),n.addCost(e,jt(t,!1)))}},{key:"_addSendMessageFailCountOnUser",value:function(e,t){t=void 0===(t=t.code)?-1:t;var n,o=this.get(26);(e=this._getSendMessageSpecifiedKey(e))===Bn&&(n=!1,n=!!Ea.includes(t)||n)?o.addFailedCountOfUserSide(Hn):La(t)&&e&&o.addFailedCountOfUserSide(e)}},{key:"resendMessage",value:function(e,t){return e.isResend=!0,e.status=Mn,this.sendMessageInstance(e,t)}},{key:"revokeMessage",value:function(e){var t,n,o=this,i=null;return e.conversationType===E.CONV_C2C?i=this.get(6):e.conversationType===E.CONV_GROUP&&(i=this.get(7)),i?((t=new Jn("revokeMessage")).setMessage("type:".concat(e.type," from:").concat(e.from," to:").concat(e.to)),n="".concat(this._n,".").concat("revokeMessage"),i.revokeMessage(e).then((function(i){return Ve(i=i.data.recallRetList)||0===i[0].retCode?(Ae.i("".concat(n," ok. ID:").concat(e.ID)),e.isRevoked=!0,t.end(),o.get(11).onMessageRevoked([e]),mn({message:e})):(i=new wn({code:i[0].retCode,data:{message:e}}),t.setCode(i.code).setMoreMessage(i.message).end(),yn(i))})).catch((function(o){t.setError(o).end();var i=new wn({code:o&&o.code?o.code:Pn.MSG_REVOKE_FAIL,message:o&&o.message?o.message:void 0,data:{message:e}});return Ae.w("".concat(n," failed. error:"),o),yn(i)}))):this._onNoModule()}},{key:"deleteMessage",value:function(e){var t=this,n=null,o=e[0],i=o.conversationID,a="",s=[],r=[];if(o.conversationType===E.CONV_C2C)n=this.get(6),a=i.replace(E.CONV_C2C,""),e.forEach((function(e){e&&e.status===Cn&&e.conversationID===i&&(e._onlineOnlyFlag||s.push("".concat(e.sequence,"_").concat(e.random,"_").concat(e.time)),r.push(e))}));else if(o.conversationType===E.CONV_GROUP)n=this.get(7),a=i.replace(E.CONV_GROUP,""),e.forEach((function(e){e&&e.status===Cn&&e.conversationID===i&&(e._onlineOnlyFlag||s.push("".concat(e.sequence)),r.push(e))}));else if(o.conversationType===E.CONV_SYSTEM)return yn({code:Pn.CANNOT_DELETE_GRP_SYSTEM_NOTICE});if(!n)return this._onNoModule();if(0===s.length)return this._onMessageDeleted(r);30<s.length&&(s=s.slice(0,30),r=r.slice(0,30));var c=new Jn("deleteMessage"),u=(c.setMessage("to:".concat(a," count:").concat(s.length)),"".concat(this._n,".").concat("deleteMessage"));return n.deleteMessage({to:a,keyList:s}).then((function(e){return c.end(),Ae.i("".concat(u," ok")),t._onMessageDeleted(r)})).catch((function(e){return c.setError(e).end(),Ae.w("".concat(u," failed. error:"),e),yn(e=new wn({code:e&&e.code?e.code:Pn.MSG_DELETE_FAIL,message:e&&e.message?e.message:void 0}))}))}},{key:"_onMessageDeleted",value:function(e){return this.get(11).onMessageDeleted(e),vn({messageList:e})}},{key:"translateText",value:function(e){var n="".concat(this._n,".").concat("translateText"),o=e.sourceTextList,i=e.sourceLanguage,a=(e=e.targetLanguage,new Jn("translateText"));return a.setMessage("sourceLanguage:".concat(i," targetLanguage:").concat(e)),this.req({P:Gn.TRANSLATE_TEXT,data:{sourceTextList:o,source:i||"auto",target:e,from:this.getMyTinyID(),SDKAppID:this.getSDKAppID()}}).then((function(e){var o=(e=e.data).error,i=e.requestID;if(e=e.translatedTextList,0===o.code)return a.end(),Ae.i("".concat(n," ok. requestID:").concat(i)),mn({translatedTextList:e});throw t(t({},o),{},{requestID:i})})).catch((function(e){return a.setCode(e.code).setMoreMessage(e.requestID).end(),Ae.w("".concat(n," failed. error:"),e),yn({code:Pn.TRANSLATE_TEXT_FAIL})}))}},{key:"convertVoiceToText",value:function(e){var n,o,i,a=e.message,s=(e=e.language,a.payload.url);return(a.from===this.getMyUserID()&&"out"===a.flow&&(s=a.payload.remoteAudioUrl),a=/\.(wav|pcm|ogg-opus|speex|silk|mp3|m4a|aac|amr)/).test(s)?(a=a.exec(s)[1]||"mp3",n="16k_zh-PY",e?"zh (cmn-Hans-CN)"===e?n="16k_zh":"en-US"===e?n="16k_en":"yue-Hant-HK"===e?n="16k_yue":"ja-JP"===e&&(n="16k_ja"):n="16k_zh-PY",e="serviceType:".concat(n," url:").concat(s),o="".concat(this._n,".").concat("convertVoiceToText"),Ae.i("".concat(o," ").concat(e)),(i=new Jn("convertVoiceToText")).setMessage(e),this.req({P:Gn.VOICE_TO_TEXT,data:{url:s,language:n,SDKAppID:this.getSDKAppID(),format:a}}).then((function(e){var n=(e=e.data).error,a=e.requestID;if(e=e.result,0===n.code)return i.end(),Ae.i("".concat(o," ok. requestID:").concat(a)),mn({result:e});throw t(t({},n),{},{requestID:a})})).catch((function(e){return i.setCode(e.code).setMoreMessage(e.requestID||"").end(),Ae.w("".concat(o," failed. error:"),e),yn({code:Pn.VOICE_TO_TEXT_FAIL})}))):yn({code:Pn.UNSUPPORTED_VOICE_FORMAT})}},{key:"modifyRemoteMessage",value:function(e){var t=this,n=null,o=e.conversationType,i=e.to,a=this.get(7);if(!a)return this._onNoModule();if(a.isMessageFromOrToAVChatroom(i))return yn({code:Pn.MSG_MODIFY_DISABLED_IN_AV,data:{message:e}});if(!1===this.get(29).filterMessage(e))return e.hasRiskContent=!0,yn({code:Pn.PROFANITY_FOUND,data:{message:e}});o===E.CONV_C2C?n=this.get(6):o===E.CONV_GROUP&&(n=this.get(7));var s=new Jn("modifyMessage"),r=(s.setMessage("to:".concat(i)),"".concat(this._n,".modifyRemoteMessage"));return n.modifyRemoteMessage(e).then((function(n){return s.end(),Ae.i("".concat(r," ok")),mn({message:n=t._onModifyRemoteMessageResp(e,n.data)})})).catch((function(n){var o;return s.setCode(n.code).setMoreMessage(n.message).end(),Ae.w("".concat(r," failed. error:"),n),20027===n.code?(o=t._onModifyRemoteMessageResp(e,n.data),yn({code:Pn.MSG_MODIFY_CONFLICT,data:{message:o}})):yn({code:n.code,message:n.message,data:{message:e}})}))}},{key:"_generateSearchdata",value:function(e){var t=e.conversationID,n=e.timePosition,o=e.timePeriod;return e=h(e,Na),ut(t)||(Ct(t)&&(e.account=t.replace(E.CONV_C2C,"")),Tt(t)&&(e.groupID=t.replace(E.CONV_GROUP,""))),Ke(o)&&0<o&&(Ke(n)&&0<n?e.startTime=n-o:e.startTime=Te()-o),e.startTime&&e.startTime<0&&(e.startTime=void 0),Ke(n)&&0<n&&(e.endTime=n),e}},{key:"searchCloudMessages",value:function(e){var t=this,n="searchCloudMessages",o="".concat(this._n,".").concat(n);if(!e)return yn({code:Pn.OPTIONS_IS_EMPTY,message:this.getErrMsg(Pn.OPTIONS_IS_EMPTY,n)});var i,a,s,r=e.keywordList,c=e.keywordListMatchType,u=e.conversationID,l=e.cursor,d=We(e.senderUserIDList)&&0<e.senderUserIDList.length,p=We(e.messageTypeList)&&0<e.messageTypeList.length;if(r||d||p)return i=Date.now(),a=new Jn(n),s="keywordList:".concat(r," keywordListMatchType:").concat(c," ")+"convID:".concat(u," cursor:").concat(l),Ae.l("".concat(o," ").concat(s)),this.req({P:Gn.MSG_CLOUD_SEARCH,data:this._generateSearchdata(e)}).then((function(n){var r=(c=n.data).code,c=c.message;if(0!==r)return c=t.getErrMsg(60020===r?"SearchCloudMessagesUnavailable":r)||c,r=new wn({code:r,message:c}),a.setMessage(s).setError(r).end(),yn(r);t.get(27).isSearchCloudMessagesEnabled(),r=(c=n.data).cursor,n=c.totalCount,c=c.searchResult;var u="totalCount:".concat(n," cost:").concat(jt(i));return mn({searchResultList:(Ae.l("".concat(o," ok. cursor:").concat(r," ").concat(u)),a.setMessage("".concat(s," ").concat(u)).end(),u=t._handleSearchResults(c,!e.conversationID)),cursor:r,totalCount:n})})).catch((function(e){return a.setMessage(s).setError(e).end(),yn(e)}));throw Ae.e("[".concat(n,'] Missing required params: "keywordList".')),new Error("Params validate failed.")}},{key:"_handleSearchResults",value:function(e,t){var n=this.get(11);return We(e)&&0!==e.length?e.map((function(e){var o=e.groupID,i=e.userID,a=e.messageCount,s=(e=void 0===(e=e.messageList)?[]:e,{conversationID:i=o?"".concat(E.CONV_GROUP).concat(o):"".concat(E.CONV_C2C).concat(i),messageCount:a,messageList:[]});return t&&1<a||0<(a=e.filter((function(e){return!!e}))).length&&(e=n.onRoamingMessage(a,i,!1),o&&e.reverse(),s.messageList=e,s.messageCount=e.length),s})):[]}},{key:"_onModifyRemoteMessageResp",value:function(e,t){Ae.d("".concat(this._n,"._onModifyRemoteMessageResp options:"),t);var n=e.conversationType,o=e.from,i=e.to,a=e.random,s=e.sequence,r=(e=e.time,t.elements),c=t.messageVersion;return t=void 0===(t=t.cloudCustomData)?"":t,this.get(11).onMessageModified({conversationType:n,from:o,to:i,time:e,random:a,sequence:s,elements:r,cloudCustomData:t,messageVersion:c})}},{key:"_generateUUID",value:function(e){var t=this.get(12);return t="".concat(t.getSDKAppID(),"-").concat(t.getUserID(),"-").concat(ot()),(e=(e=e.name||e.value||e.url||e.tempFilePath)&&e.slice(e.lastIndexOf(".")+1))?"".concat(t,".").concat(e):t}},{key:"getMessageOption",value:function(e){return this._messageOptionsMap.get(e)}},{key:"_getNickAndAvatarByUserID",value:function(e){return this.get(4).getNickAndAvatarByUserID(e)}},{key:"_getNameCardByGroupID",value:function(e){if(e.conversationType===E.CONV_GROUP){var t=this.get(7);if(t)return t.getMyNameCardByGroupID(e.to)}return""}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._messageOptionsMap.clear()}}]),Wa),Ua=(r(za,bn),wa=g(za),a(za,[{key:"onMsgExtNotify",value:function(e){var t=this,n=(e=e.dataList).messageInfo,o=e.operateType,i=e.operateResultList,a=e.tinyID,s=(e=e.globalSequence,n.clientTime),r=(n=n.random,"".concat(a,"-").concat(s,"-").concat(n)),c=[],u=[],l=(Ae.l("".concat(this._n,".onMsgExtNotify messageID:").concat(r," operateType:").concat(o," globalSequence:").concat(e)),this._updateGlobalSeq(r,e),!1),d=!1;i.forEach((function(e){var n=void 0===(n=e.extensions)?[]:n,i=e.clearSequence;1===o?(l=!0,n.forEach((function(e){c.push({key:e.key,value:e.value})})),t._updateLocalExt(r,n)):2===o?(d=!0,n.forEach((function(e){u.push(e.key)})),t._updateLocalExt(r,n)):3===o&&(d=!0,t._hasLocalExt(r)&&t._getLocalExt(r).forEach((function(e,t){e.seq<=i&&!Ve(e.value)&&u.push(t)})),t._clearLocalExt(r,i))})),l&&this.emitOEvt(S.MESSAGE_EXTENSIONS_UPDATED,{messageID:r,extensions:c}),d&&this.emitOEvt(S.MESSAGE_EXTENSIONS_DELETED,{messageID:r,keyList:u})}},{key:"setMessageExtensions",value:function(e,t){var n,o,i,a,s,r,c,u="setMessageExtensions";return this.canIUse(N.MSG_EXT)?(n="".concat(this._n,".").concat(u),o=e.ID,i=e.conversationID,a=e.sequence,s=e.time,r=m(t),20<t.length&&(r=t.slice(0,20),Ae.w("".concat(n,". the length of extensions cannot exceed 20."))),t="convID:".concat(i," messageID:").concat(o," sequence:").concat(a," time:").concat(s," count:").concat(r.length),(c=new Jn(u)).setMessage(t),Ae.l("".concat(n," ").concat(t)),this._modifyMsgExts(e,r).then((function(e){var t=e.resultList,o=e.successCount;return e=e.failureCount,o="successCount:".concat(o," failCount:").concat(e),c.setMoreMessage(o).end(),Ae.l("".concat(n," ok. ").concat(o)),mn({extensions:t})})).catch((function(e){return c.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"getMessageExtensions",value:function(e){var t,n,o,i,a,s,r,c=this,u="getMessageExtensions";return this.canIUse(N.MSG_EXT)?(t="".concat(this._n,".").concat(u),n=e.ID,a=e.conversationID,o=e.sequence,i=e.time,a="convID:".concat(a," messageID:").concat(n," sequence:").concat(o," time:").concat(i),(s=new Jn(u)).setMessage(a),r=void Ae.l("".concat(t," ").concat(a)),this.getMsgExtsMap.has(n)&&(r=this._getGlobalSeq(n)),this._getMsgExts(e,r).then((function(e){return s.end(),Ae.l("".concat(t," ok. extCount:").concat(e.length)),ut(r)&&0<e.length&&c.getMsgExtsMap.set(n,1),mn({extensions:e})})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"deleteMessageExtensions",value:function(e,t){var n,o,i,a,s,r,c,u="deleteMessageExtensions";return this.canIUse(N.MSG_EXT)?(n="".concat(this._n,".").concat(u),o=[],i=3,Ve(t)||(i=2,t.forEach((function(e){o.push({key:e,value:"",seq:0})}))),t=e.ID,r=e.conversationID,a=e.sequence,s=e.time,r="convID:".concat(r," messageID:").concat(t," sequence:").concat(a," time:").concat(s," operateType:").concat(i),(c=new Jn(u)).setMessage(r),Ae.l("".concat(n," ").concat(r)),this._modifyMsgExts(e,o,i).then((function(e){var t=e.resultList,o=e.successCount,a=(e=e.failureCount,"");return 2===i&&(a="success count:".concat(o," fail count:").concat(e)),c.setMoreMessage("".concat(a)).end(),Ae.l("".concat(n," ok. ").concat(a)),mn({extensions:t})})).catch((function(e){return c.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"_modifyMsgExts",value:function(e,t){var n=this,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,i=Mt(e.to)?E.CONV_TOPIC:e.conversationType,a=void 0,s=(3!==o&&(a=this._getReqExts(e,t)),null);switch(i){case E.CONV_C2C:s=this.get(6);break;case E.CONV_GROUP:s=this.get(7);break;case E.CONV_TOPIC:s=this.get(10);break;default:return yn({code:Pn.NO_MODULE})}return s.modifyMsgExts(e,a,o).then((function(t){var o=(t=t.data).extensions,i=(t=t.seq,[]),a=0,s=0,r=[];return(o=Ve(o)?[]:o).forEach((function(e){var t=e.errorCode,n=(e=e.extension).key,o=e.value;e=e.seq,i.push({code:t,key:n,value:o}),0===t?a++:s++,r.push({key:n,value:o,seq:e})})),n._updateGlobalSeq(e.ID,t),0<r.length&&(n._updateLocalExt(e.ID,r),r=null),{resultList:i,successCount:a,failureCount:s}})).catch((function(e){return yn(e)}))}},{key:"_getReqExts",value:function(e,t){var n,o=[];return this._hasLocalExt(e.ID)?(n=this._getLocalExt(e.ID),t.forEach((function(e){var t=e.key,i=(e=e.value,0);n.has(t)&&(i=n.get(t).seq),o.push({key:t,value:e,seq:i})}))):t.forEach((function(e){var t=e.key;e=e.value,o.push({key:t,value:e,seq:0})})),o}},{key:"_getMsgExts",value:function(e,t){var n=this,o="".concat(this._n,"._getMsgExts"),i=e.ID,a=null;switch(Mt(e.to)?E.CONV_TOPIC:e.conversationType){case E.CONV_C2C:a=this.get(6);break;case E.CONV_GROUP:a=this.get(7);break;case E.CONV_TOPIC:a=this.get(10);break;default:return yn({code:Pn.NO_MODULE})}return a.getMessageExtensions(e,t).then((function(t){var a=(t=t.data).extensions,s=t.completeFlag,r=t.globalSequence;return t=t.clearSequence,a=Ve(a)?[]:a,Ae.l("".concat(o," ok. completeFlag:").concat(s," globalSequence:").concat(r," clearSequence:").concat(t," count:").concat(a.length)),n._updateLocalExt(i,a),n._clearLocalExt(i,t),n._updateGlobalSeq(i,r),1!==s?(t=a.slice(-1)[0].seq+1,n._getMsgExts(e,t)):n._getLocalExtList(i)})).catch((function(e){return yn(e)}))}},{key:"_hasLocalExt",value:function(e){return this.msgExtMap.has(e)}},{key:"_getLocalExt",value:function(e){return this.msgExtMap.get(e)}},{key:"_updateLocalExt",value:function(e,t){this._hasLocalExt(e)||this.msgExtMap.set(e,new Map);var n=this._getLocalExt(e);t.forEach((function(e){var t=e.key,o=e.value;e=e.seq,n.set(t,{value:void 0===o?"":o,seq:e})}))}},{key:"_clearLocalExt",value:function(e,t){var n;t<=0||!this._hasLocalExt(e)||(n=this._getLocalExt(e)).forEach((function(e,o){e.seq<=t&&n.delete(o)}))}},{key:"_getLocalExtList",value:function(e){var t=[];return this._hasLocalExt(e)&&this._getLocalExt(e).forEach((function(e,n){Ve(e=e.value)||t.push({key:n,value:e})})),t}},{key:"_getGlobalSeq",value:function(e){return this.globalSeqMap.get(e)}},{key:"_updateGlobalSeq",value:function(e,t){this.globalSeqMap.set(e,t)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this.msgExtMap.clear(),this.globalSeqMap.clear(),this.getMsgExtsMap.clear()}}]),za),xa=(r($a,bn),Oa=g($a),a($a,[{key:"onReactionNotifyList",value:function(e){var n=this;(void 0===(e=(e||{}).dataList)?[]:e).forEach((function(e){var o=e.C2CMessageInfo,i=void 0===(i=e.groupMessageInfo)?{}:i,a=(e=void 0===(e=e.reactionList)?[]:e,i=(o=t(t({},void 0===o?{}:o),i)).tinyID,o.clientTime),s=(o=o.random,i="".concat(i,"-").concat(a,"-").concat(o),[]);e.forEach((function(e){ut(e.userIDList)&&(e.userIDList=[],e.count=0),s.push.apply(s,m(e.userIDList))})),Ae.l("".concat(n._n,".onReactionNotifyList messageID:").concat(i," reactionList:").concat(e.length)),n._handleReactionSummary([{messageID:i,reactionList:e}],s).then((function(e){n.emitOEvt(S.MESSAGE_REACTIONS_UPDATED,t({},e[0]))}))}))}},{key:"onReactionNotify",value:function(e){var n=(e=e.dataList||{}).C2CMessageInfo,o=void 0===(o=e.groupMessageInfo)?{}:o,i=e.reactionID,a=(e=e.operateType,o=(n=t(t({},void 0===n?{}:n),o)).tinyID,n.clientTime);n=n.random,o="".concat(o,"-").concat(a,"-").concat(n),Ae.l("".concat(this._n,".onReactionNotify messageID:").concat(o," reactionID:").concat(i," operateType:").concat(e)),1===e?this._addReactedByMyselfMap(o,i):this._removeReactedByMyselfMap(o,i),a="".concat(o,"-").concat(i),this._reactionInfoMap.has(a)&&((n=this._reactionInfoMap.get(a)).reactedByMyself=1===e,this.emitOEvt(S.MESSAGE_REACTIONS_UPDATED,{messageID:o,reactionList:[n]}))}},{key:"addMessageReaction",value:function(e,t){var n,o,i,a,s=this,r="addMessageReaction";return this.canIUse(N.MSG_REACTION)?(n="".concat(this._n,".").concat(r),a=e.ID,o=e.conversationID,o="convID:".concat(o," messageID:").concat(a," reactionID:").concat(t),(i=new Jn(r)).setMessage(o),Ae.l("".concat(n," ").concat(o)),a=this._createReactionOperationPack(e,t,1),this._addReactedByMyselfMap(e.ID,t),this.req(a).then((function(){return i.end(),Ae.l("".concat(n," ok.")),mn()})).catch((function(o){return s._removeReactedByMyselfMap(e.ID,t),i.setError(o).end(),Ae.e("".concat(n," failed. error:"),o),yn(o)}))):this.noUse(r)}},{key:"removeMessageReaction",value:function(e,t){var n,o,i,a,s="removeMessageReaction";return this.canIUse(N.MSG_REACTION)?(n="".concat(this._n,".").concat(s),a=e.ID,o=e.conversationID,o="convID:".concat(o," messageID:").concat(a," reactionID:").concat(t),(i=new Jn(s)).setMessage(o),Ae.l("".concat(n," ").concat(o)),a=this._createReactionOperationPack(e,t,2),this._removeReactedByMyselfMap(e.ID,t),this.req(a).then((function(){return i.end(),Ae.l("".concat(n," ok.")),mn()})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(s)}},{key:"getMessageReactions",value:function(e){var n,o,i,a,s,r,c=this,u="getMessageReactions";return this.canIUse(N.MSG_REACTION)?(n="".concat(this._n,".").concat(u),o=e.messageList,r=e.maxUserCountPerReaction,i=o[0].conversationID,i="convID:".concat(i," maxUserCountPerReaction:").concat(r," msgCount:").concat(o.length),(a=new Jn(u)).setMessage(i),Ae.l("".concat(n," ").concat(i)),s=new Map,r=this._createReactionSummaryPack(t(t({},e),{},{messageIDMap:s})),this.req(r).then((function(e){e=e.data.resultList;var t=[],n=[];return(void 0===e?[]:e).forEach((function(e){var o=void 0===(o=e.messageKey)?void 0:o,i=void 0===(i=e.messageSequence)?void 0:i;e=void 0===(e=e.reactionList)?[]:e,i=ut(o)?s.get(i):s.get(o),t.push({messageID:i,reactionList:e}),e.forEach((function(e){n.push.apply(n,m(e.userIDList))}))})),c._handleReactionSummary(t,n)})).then((function(e){return a.end(),Ae.l("".concat(n," ok.")),s.clear(),mn({resultList:e})})).catch((function(e){return a.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))):this.noUse(u)}},{key:"getAllUserListOfMessageReaction",value:function(e){var t,n,o,i,a,s,r,c,u=this,l="getAllUserListOfMessageReaction";return this.canIUse(N.MSG_REACTION)?(t="".concat(this._n,".").concat(l),a=e.message,n=e.reactionID,o=e.nextSeq,i=e.count,c=a.ID,a=a.conversationID,a="convID:".concat(a," messageID:").concat(c," reactionID:").concat(n," nextSeq:").concat(o," count:").concat(i),(s=new Jn(l)).setMessage(a),Ae.l("".concat(t," ").concat(a)),r={userList:[],nextSeq:0,isCompleted:!1},c=this._createReactionUserListPack(e),this.req(c).then((function(e){var t=void 0===(t=(e=e.data).userIDList)?[]:t;return e=void 0===(e=e.nextSeq)?0:e,r.nextSeq=e,r.isCompleted=0===e,u.get(4).getUserNickAndAvatar(t)})).then((function(e){return r.userList=e,s.end(),Ae.l("".concat(t," ok.")),mn(r)})).catch((function(e){return s.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse(l)}},{key:"_createReactionOperationPack",value:function(e,t,n){var o,i,a=void 0;return t={reactionID:t,userIDList:[this.getMyUserID()]},e.conversationType===E.CONV_C2C&&(o=this.get(6),a=1===n?Gn.ADD_C2C_MSG_REACTION:Gn.RM_C2C_MSG_REACTION,t.from=e.from,t.to=e.to,t.messageKey=o.getMessageKey(e)),e.conversationType===E.CONV_GROUP&&(o=void 0,i=e.to,Mt(e.to)&&(i=Gt(o=e.to)),a=1===n?Gn.ADD_GRP_MSG_REACTION:Gn.RM_GRP_MSG_REACTION,t.groupID=i,t.topicID=o,t.messageSequence=e.sequence),{P:a,data:t}}},{key:"_createReactionSummaryPack",value:function(e){var t,n,o,i=e.messageList,a=void 0===(a=e.maxUserCountPerReaction)?10:a,s=e.messageIDMap,r=void 0,c=void 0;return(e=i[0]).conversationType===E.CONV_C2C&&(t=this.get(6),n=i.map((function(e){var n=t.getMessageKey(e);return s.set(n,e.ID),n})),r=Gn.GET_C2C_MSG_REACTIONS,c={from:e.from,to:e.to,messageKeyList:n,count:a}),e.conversationType===E.CONV_GROUP&&(n=void 0,o=e.to,Mt(e.to)&&(o=Gt(n=e.to)),e=i.map((function(e){return s.set(e.sequence,e.ID),e.sequence})),r=Gn.GET_GRP_MSG_REACTIONS,c={groupID:o,topicID:n,messageSequenceList:e,count:a}),{P:r,data:c}}},{key:"_createReactionUserListPack",value:function(e){var t=e.message,n=e.reactionID,o=e.nextSeq,i=void 0;return n={reactionID:n,nextSeq:void 0===o?0:o,count:100<(e=void 0===(e=e.count)?100:e)?100:e},t.conversationType===E.CONV_C2C&&(o=this.get(6),i=Gn.GET_C2C_MSG_REACTION_USER_LIST,n.from=t.from,n.to=t.to,n.messageKey=o.getMessageKey(t)),t.conversationType===E.CONV_GROUP&&(e=void 0,o=t.to,Mt(t.to)&&(o=Gt(e=t.to)),i=Gn.GET_GRP_MSG_REACTION_USER_LIST,n.groupID=o,n.topicID=e,n.messageSequence=t.sequence),{P:i,data:n}}},{key:"_handleReactionSummary",value:function(e,t){var n=this;return this.get(4).getUserNickAndAvatar(t).then((function(t){var o=[];return e.forEach((function(e){var i=[];e.reactionList.forEach((function(o){var a=o.reactionID,s=o.count,r=o.userIDList,c=(o=void 0===(o=o.reactedByMyself)?void 0:o,[]);r.forEach((function(e){t.forEach((function(t){e===t.userID&&c.push(t)}))})),r={reactionID:a,totalUserCount:s,partialUserList:c,reactedByMyself:n._computeReactedByMyself({reactedByMyself:o,messageID:e.messageID,reactionID:a})},i.push(r),ut(o)&&!n._reactedByMyselfMap.has(e.messageID)&&(s="".concat(e.messageID,"-").concat(a),n._reactionInfoMap.set(s,r))})),o.push({messageID:e.messageID,reactionList:i})})),o}))}},{key:"_addReactedByMyselfMap",value:function(e,t){this._reactedByMyselfMap.has(e)||this._reactedByMyselfMap.set(e,[]),-1===(e=this._reactedByMyselfMap.get(e)).indexOf(t)&&e.push(t)}},{key:"_removeReactedByMyselfMap",value:function(e,t){this._reactedByMyselfMap.has(e)&&-1<(t=(e=this._reactedByMyselfMap.get(e)).indexOf(t))&&e.splice(t,1)}},{key:"_computeReactedByMyself",value:function(e){var t=e.reactedByMyself,n=e.messageID;return e=e.reactionID,ut(t)?!!this._reactedByMyselfMap.has(n)&&this._reactedByMyselfMap.get(n).includes(e):1===t}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._reactedByMyselfMap.clear(),this._reactionInfoMap.clear()}}]),$a),Fa=(r(Ka,bn),Ra=g(Ka),a(Ka,[{key:"sendMessage",value:function(e){var t=this,n=this._createMsg(e);if(null===n)return yn({code:Pn.MSG_SEND_FAIL});this._addSendMessageTotalCount(n);var o=Date.now();return this.get(11).setMessageRandom(n),this._sendComboMessage(n,e).then((function(e){var i=(e=e.data).time,a=e.sequence;return Ke(e=e.readReceiptCode)&&0!==e&&(new Jn("sendMessageWithReceipt").setMessage("from:".concat(n.from," to:").concat(n.to," sequence:").concat(a," readReceiptCode:").concat(e)).end(),Ae.w("".concat(t._n,".sendMessage readReceiptCode:").concat(e," message:").concat(t.getErrMsg(e)))),t._addSendMessageSuccessCount(n,o),e=t.get(11),n.status=Cn,n.time=i,n.conversationType===E.CONV_GROUP&&(n.sequence=a),e.appendToMessageList(n),i=n,!0===n._isExcludedFromLastMessage&&(i=""),e.onMessageSent({conversationOptionsList:[{conversationID:n.conversationID,unreadCount:0,type:n.conversationType,subType:n.conversationSubType,lastMessage:i}]}),mn({message:n})})).catch((function(e){return t._onSendMessageFailed(n,e)}))}},{key:"_sendComboMessage",value:function(e,t){var n=this._m.get(20),o="";return e.conversationType===E.CONV_C2C&&(o="".concat(P.NAME.OPEN_IM,".").concat(Gn.SEND_C2C_MSG)),e.conversationType===E.CONV_GROUP&&(o="".concat(P.NAME.GRP,".").concat(Gn.SEND_GRP_MSG)),n.sendComboMessage({servcmd:o,data:t})}},{key:"_createMsg",value:function(e){var t="".concat(this._n,"._createMsg"),n=null;try{var o,i=this.getMyUserID(),a={};a.senderTinyID=this.getMyTinyID(),a.currentUser=i,a.from=e.From_Account||i,e.GroupId?(a.conversationID="".concat(E.CONV_GROUP).concat(e.GroupId),a.conversationType=E.CONV_GROUP,a.to=e.GroupId):e.To_Account&&(a.conversationID="".concat(E.CONV_C2C).concat(e.To_Account),a.conversationType=E.CONV_C2C,a.to=e.To_Account),a.time=e.MsgTimeStamp||0,a.random=e.Random||e.MsgRandom||0,a.priority=e.MsgPriority,ct(e.CloudCustomData)&&0<e.CloudCustomData.length&&(a.cloudCustomData=e.CloudCustomData),We(e.SendMsgControl)&&(a.messageControlInfo={},e.SendMsgControl.includes("NoUnread")&&(a.messageControlInfo.excludedFromUnreadCount=1),e.SendMsgControl.includes("NoLastMsg"))&&(a.messageControlInfo.excludedFromLastMessage=1),a.conversationType===E.CONV_GROUP&&We(e.To_Account)&&0<e.To_Account.length&&(o=e.To_Account,50<e.To_Account.length&&(o=e.To_Account.slice(0,50),Ae.w("".concat(t," To_Account must be less than or equal to 50."))),a.receiverList=m(o),e.To_Account=m(o)),1!==e.IsNeedReadReceipt&&1!==e.NeedReadReceipt||(a.needReadReceipt=!0),1===e.SupportMessageExtension&&(a.isSupportExtension=!0),(n=new Co(a)).status=Mn,e.MsgClientTime=n.clientTime,n.conversationType===E.CONV_C2C&&(e.MsgSeq=n.sequence);for(var s,r=e.MsgBody.length,c=0;c<r;c++)"TIMTextElem"===(s=e.MsgBody[c]).MsgType?n.setTextElement(s.MsgContent.Text):"TIMCustomElem"===s.MsgType?n.setCustomElement({data:s.MsgContent.Data||"",description:s.MsgContent.Desc||"",extension:s.MsgContent.Ext||""}):"TIMFaceElem"===s.MsgType&&n.setFaceElement({index:s.MsgContent.Index,data:s.MsgContent.Data});var u=n.getElements();n.payload=u[0].content,n.type=u[0].type}catch(l){n=null,Ae.e("".concat(t," failed. error:"),l)}return n}},{key:"_onSendMessageFailed",value:function(e,t){e.status=Tn,this.get(11).deleteMessageRandom(e),this._addSendMessageFailCountOnUser(e,t);var n=new Jn("sendMessage"),o="head.seq:".concat(t.data.headSeq," type:").concat(e.type," from:").concat(e.from," to:").concat(e.to);return n.setMessage(o).setError(t).end(),Ae.e("".concat(this._n,"._onSendMessageFailed ").concat(o," error:"),t),yn(new wn({code:t&&t.code?t.code:Pn.MSG_SEND_FAIL,message:t&&t.message?t.message:void 0,data:{message:e}}))}},{key:"_getSendMessageSpecifiedKey",value:function(e){return e.conversationType===E.CONV_C2C?Fn:e.conversationType===E.CONV_GROUP&&(e=this.get(7).getLocalGroupProfile(e.to))?yt(e=e.type)?Vn:qn:void 0}},{key:"_addSendMessageTotalCount",value:function(e){(e=this._getSendMessageSpecifiedKey(e))&&this.get(26).addTotalCount(e)}},{key:"_addSendMessageSuccessCount",value:function(e,t){var n;(e=this._getSendMessageSpecifiedKey(e))&&((n=this.get(26)).addSuccessCount(e),n.addCost(e,jt(t,!1)))}},{key:"_addSendMessageFailCountOnUser",value:function(e,t){t=void 0===(t=t.code)?-1:t;var n=this.get(26);e=this._getSendMessageSpecifiedKey(e),La(t)&&e&&n.addFailedCountOfUserSide(e)}}]),Ka),qa=(r(ja,bn),Aa=g(ja),a(ja,[{key:"registerPlugin",value:function(e){var t=this,n="0";Object.keys(e).forEach((function(o){t.plugins[o]=e[o],"tim-upload-plugin"===o&&"function"==typeof e[o].getVersion&&(n=e[o].getVersion())})),new Jn("registerPlugin").setMessage("".concat(Object.keys(e))).setMoreMessage("version:".concat(n)).end()}},{key:"getPlugin",value:function(e){return this.plugins[e]}},{key:"reset",value:function(){}}]),ja),Va=(r(Ha,bn),ba=g(Ha),a(Ha,[{key:"_init",value:function(){this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:0})}},{key:"_startSync",value:function(e){var n=this,o=e.cookie,i=e.syncFlag,a=e.isOnlineSync,s="".concat(this._n,"._startSync"),r=(Ae.l("".concat(s," options:"),e),new Jn("syncUnread"));r.setMessage(JSON.stringify(e)),this.req({P:Gn.SYNC_UNREAD_MSG,data:{cookie:o,syncFlag:i,isOnlineSync:a}}).then((function(e){var o=(i=e.data).cookie,i=i.syncFlag,a="$cookie:".concat(o," syncFlag:").concat(i);Ae.l("".concat(s," ok. ").concat(a)),n._cookie=o,r.setMoreMessage(a).end(),Ve(o)||(0===i||1===i?(n._dispatch(t(t({},e.data),{},{isSyncingEnded:!1})),n._startSync({cookie:o,syncFlag:i,isOnlineSync:0})):2===i&&n._dispatch(t(t({},e.data),{},{isSyncingEnded:!0})))})).catch((function(e){r.setError(e).end(),Ae.e("".concat(s," failed. error:"),e)}))}},{key:"_dispatch",value:function(e){e.eventArray&&this.get(20).onMessage({head:{},body:{eventArray:e.eventArray,isInstantMessage:this._onlineSyncFlag,isSyncingEnded:e.isSyncingEnded}}),this.get(6).onNewMessage({dataList:e.messageList,isInstantMessage:!!e.isSyncingEnded&&this._onlineSyncFlag,C2CRemainingUnreadList:e.C2CRemainingUnreadList,C2CPairUnreadList:e.C2CPairUnreadList,isSyncingEnded:e.isSyncingEnded})}},{key:"syncOnNeed",value:function(){Ae.l("".concat(this._n,".syncOnNeed cookie:").concat(this._cookie)),this._onlineSyncFlag=!0,this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:1})}},{key:"syncOnReconnected",value:function(){Ae.l("".concat(this._n,".syncOnReconnected cookie:").concat(this._cookie)),this._onlineSyncFlag=!0,this._startSync({cookie:this._cookie,syncFlag:0,isOnlineSync:0})}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._onlineSyncFlag=!1,this._cookie=""}}]),Ha),Ba={req:{toAccount:"To_Account",fromAccount:"From_Account",to:"To_Account",from:"From_Account",groupID:"GroupId",groupAtUserID:"GroupAt_Account",extension:"Ext",data:"Data",description:"Desc",elements:"MsgBody",sizeType:"Type",downloadFlag:"Download_Flag",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",videoUrl:"",imageUrl:"URL",fileUrl:"Url",uuid:"UUID",priority:"MsgPriority",receiverUserID:"To_Account",receiverGroupID:"GroupId",messageSender:"SenderId",messageReceiver:"ReceiverId",nick:"From_AccountNick",avatar:"From_AccountHeadurl",messageNumber:"MsgNum",pbDownloadKey:"PbMsgKey",downloadKey:"JsonMsgKey",applicationType:"PendencyType",userIDList:"To_Account",groupNameList:"GroupName",userID:"To_Account",groupAttributeList:"GroupAttr",mainSequence:"AttrMainSeq",avChatRoomKey:"BytesKey",attributeControl:"AttrControl",sequence:"seq",messageControlInfo:"SendMsgControl",updateSequence:"UpdateSeq",clientTime:"MsgClientTime",sequenceList:"MsgSeqList",topicID:"TopicId",customData:"CustomString",isSupportTopic:"SupportTopic",isWebUniapp:"is_web_uniapp",isSupportExtension:"SupportMessageExtension",messageSequence:"MsgSeq",messageKey:"MsgKey",startSequence:"startSeq",simplifiedMessage:"DownsizeFlag",isRelayMessage:"IsRelayMsg",reactionID:"Reaction",messageSequenceList:"MsgSeqList",messageKeyList:"MsgKeyList",cmConfigID:"CustomModerationConfigID"},res:{MsgPriority:"priority",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID",Download_Flag:"downloadFlag",GroupId:"groupID",Member_Account:"userID",MsgList:"messageList",SyncFlag:"syncFlag",To_Account:"to",From_Account:"from",MsgSeq:"sequence",MsgRandom:"random",MsgTime:"time",MsgTimeStamp:"time",MsgContent:"content",MsgBody:"elements",From_AccountNick:"nick",From_AccountHeadurl:"avatar",GroupWithdrawInfoArray:"revokedInfos",GroupReadInfoArray:"groupMessageReadNotice",LastReadMsgSeq:"lastMessageSeq",WithdrawC2cMsgNotify:"c2cMessageRevokedNotify",C2cWithdrawInfoArray:"revokedInfos",C2cReadedReceipt:"c2cMessageReadReceipt",ReadC2cMsgNotify:"c2cMessageReadNotice",LastReadTime:"peerReadTime",MsgRand:"random",MsgType:"type",MsgShow:"messageShow",NextMsgSeq:"nextMessageSeq",FaceUrl:"avatar",ProfileDataMod:"profileModify",Profile_Account:"userID",ValueBytes:"value",ValueNum:"value",NoticeSeq:"noticeSequence",NotifySeq:"notifySequence",MsgFrom_AccountExtraInfo:"messageFromAccountExtraInformation",Operator_Account:"operatorID",OpType:"operationType",ReportType:"operationType",UserId:"userID",User_Account:"userID",List_Account:"userIDList",MsgOperatorMemberExtraInfo:"operatorInfo",MsgMemberExtraInfo:"memberInfoList",ImageUrl:"avatar",NickName:"nick",MsgGroupNewInfo:"newGroupProfile",MsgAppDefinedData:"groupCustomField",Owner_Account:"ownerID",GroupFaceUrl:"avatar",GroupIntroduction:"introduction",GroupNotification:"notification",GroupApplyJoinOption:"joinOption",MsgKey:"messageKey",GroupInfo:"groupProfile",ShutupTime:"muteTime",Desc:"description",Ext:"extension",GroupAt_Account:"groupAtUserID",MsgNum:"messageNumber",PbMsgKey:"pbDownloadKey",JsonMsgKey:"downloadKey",MsgModifiedFlag:"isModified",PendencyItem:"applicationItem",PendencyType:"applicationType",AddTime:"time",AddSource:"source",AddWording:"wording",ProfileImImage:"avatar",PendencyAdd:"friendApplicationAdded",FrienPencydDel_Account:"friendApplicationDeletedUserIDList",Peer_Account:"userID",GroupAttr:"groupAttributeList",GroupAttrAry:"groupAttributeList",AttrMainSeq:"mainSequence",seq:"sequence",GroupAttrOption:"groupAttributeOption",BytesChangedKeys:"changedKeyList",GroupAttrInfo:"groupAttributeList",GroupAttrSeq:"mainSequence",PushChangedAttrValFlag:"isWithChangedAttributeInfo",SubKeySeq:"sequence",Val:"value",MsgGroupFromCardName:"senderNameCard",MsgGroupFromNickName:"senderNick",C2cNick:"peerNick",C2cImage:"peerAvatar",SendMsgControl:"messageControlInfo",NoLastMsg:"excludedFromLastMessage",NoUnread:"excludedFromUnreadCount",UpdateSeq:"updateSequence",MuteNotifications:"muteFlag",MsgClientTime:"clientTime",TinyId:"tinyID",GroupMsgReceiptList:"readReceiptList",ReadNum:"readCount",UnreadNum:"unreadCount",TopicId:"topicID",MillionGroupFlag:"communityType",SupportTopic:"isSupportTopic",MsgTopicNewInfo:"newTopicInfo",ShutupAll:"muteAllMembers",CustomString:"customData",TopicFaceUrl:"avatar",TopicIntroduction:"introduction",TopicNotification:"notification",TopicIdArray:"topicIDList",MsgVersion:"messageVersion",C2cMsgModNotifys:"c2cMessageModified",GroupMsgModNotifys:"groupMessageModified",ApplyJoinOption:"joinOption",MsgFlag:"messageRemindType",AtInfoList:"groupAtInfoList",AtFlagList:"groupAtType",AtMsgSeq:"sequence",BanDuration:"duration",BanDescription:"reason",NotVisible:"invisible",BytesTag:"tag",BytesValue:"value",RptBytesValue:"value",LatestSeq:"globalSequence",ClearSeq:"clearSequence",SupportMessageExtension:"isSupportExtension",ExtensionList:"extensions",GroupCounter:"counterList",Revoker_Account:"revoker",MsgExtensionNotify:"messageExtensionNotify",ExtensionC2cMsgInfo:"messageInfo",ExtensionGroupMsgInfo:"messageInfo",MsgOptType:"operateType",SetKVInfo:"operateResultList",DeleteKVInfo:"operateResultList",ClearKVInfo:"operateResultList",MsgKeyValue:"extensions",ClearMsgSeq:"clearSequence",MsgLastSeq:"globalSequence",InviteJoinOption:"inviteOption",MemberList_Account:"inviteeList",MsgMemberExtraInfoList:"inviteeInfoList",E:"event",GInf:"groupProfile",MCT:"clientTime",MR:"random",MP:"priority",MTS:"time",GId:"groupID",MS:"sequence",CCD:"cloudCustomData",F_Account:"from",F_Hd:"avatar",F_NN:"nick",GN:"groupName",GT:"groupType",IsSys:"isSystemMessage",OpInf:"operatorInfo",Img:"avatar",NN:"nick",OnlineInf:"onlineMemberInfo",ET:"expireTime",Num:"onlineMemberNum",Opt:"operationType",O_Account:"operatorID",RT:"operationType",UDF:"userDefinedField",L_Account:"userIDList",IsPlaceMsg:"isPlaceMessage",MsgCheckResult:"checkResult",Results:"resultList",Reaction:"reactionID",Reaction_Account:"userIDList",MsgReactionNotifyList:"messageReactionNotifyList",MsgReactionNotify:"messageReactionNotify",MsgReactionSummary:"reactionList",C2CMsgInfo:"C2CMessageInfo",GroupMsgInfo:"groupMessageInfo",int32_err_code:"errorCode",str_err_msg:"errorMsg",MsgDropReason:"messageDropReason",ReactedByMe:"reactedByMyself",Level:"messageRemindType",PeerReadTime:"timestamp",NoUnreadSeqList:"excludedUnreadSequenceList",NewMsg:"topicLatestMessage"},ignoreKeyWord:["C2C","ID","USP"]};function Ha(e){return o(this,Ha),(e=ba.call(this,e))._n="SyncUnreadMsgModule",e._cookie="",e._onlineSyncFlag=!1,e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,e._init,f(e)),e}function ja(e){return o(this,ja),(e=Aa.call(this,e))._n="PluginModule",e.plugins={},e}function Ka(e){return o(this,Ka),(e=Ra.call(this,e))._n="ComboMsgModule",e}function $a(e){return o(this,$a),(e=Oa.call(this,e))._n="MsgReactionModule",e._reactedByMyselfMap=new Map,e._reactionInfoMap=new Map,e}function za(e){return o(this,za),(e=wa.call(this,e))._n="MsgExtModule",e.msgExtMap=new Map,e.globalSeqMap=new Map,e.getMsgExtsMap=new Map,e}function Wa(e){return o(this,Wa),(e=Pa.call(this,e))._n="MessageModule",e._messageOptionsMap=new Map,e._mergerMessageHandler=new Ta(f(e)),e}function Ya(e,t){if("string"==typeof e||Array.isArray(e))return t=Object.assign({pascalCase:!1},t),0===(e=Array.isArray(e)?e.map((function(e){return e.trim()})).filter((function(e){return e.length})).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e=e=(e=e!==e.toLowerCase()?Xa(e):e).replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(function(e,t){return t.toUpperCase()})).replace(/\d+(\w|$)/g,(function(e){return e.toUpperCase()})),t.pascalCase?e.charAt(0).toUpperCase()+e.slice(1):e);throw new TypeError("Expected the input to be `string | string[]`")}var Xa=function(e){for(var t=!1,n=!1,o=!1,i=0;i<e.length;i++){var a=e[i];t&&/[a-zA-Z]/.test(a)&&a.toUpperCase()===a?(e=e.slice(0,i)+"-"+e.slice(i),o=n,n=!(t=!1),i++):n&&o&&/[a-zA-Z]/.test(a)&&a.toLowerCase()===a?(e=e.slice(0,i-1)+"-"+e.slice(i-1),o=n,t=!(n=!1)):(t=a.toLowerCase()===a&&a.toUpperCase()!==a,o=n,n=a.toUpperCase()===a&&a.toLowerCase()!==a)}return e};function Ja(e,t){var n=0;return function e(t,o){var i,a,s,r;return 100<++n?(n--,t):We(t)?(i=t.map((function(t){return $e(t)?e(t,o):t})),n--,i):$e(t)?(a=t,s=function(e,t){if(!Je(t))return!1;if(t!==Ya(t))for(var n=0;n<Ba.ignoreKeyWord.length&&!t.includes(Ba.ignoreKeyWord[n]);n++);var i;return ut(o[t])?"OPPOChannelID"===(i=t)?i:i[0].toUpperCase()+Ya(i).slice(1):o[t]},r=Object.create(null),Object.keys(a).forEach((function(e){var t=s(a[e],e);t&&(r[t]=a[e])})),i=Et(i=r,(function(t,n){return We(t)||$e(t)?e(t,o):t})),n--,i):void 0}(e,t)}for(var Za,Qa=String.fromCharCode,es=function(e){var t=0|e.charCodeAt(0);if(55296<=t)if(t<56320)if(56320<=(e=0|e.charCodeAt(1))&&e<=57343){if(65535<(t=(t<<10)+e-56613888|0))return Qa(240|t>>>18,128|t>>>12&63,128|t>>>6&63,128|63&t)}else t=65533;else t<=57343&&(t=65533);return t<=2047?Qa(192|t>>>6,128|63&t):Qa(224|t>>>12,128|t>>>6&63,128|63&t)},ts=function(e){for(var t=void 0===e?"":(""+e).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,es),n=0|t.length,o=new Uint8Array(n),i=0;i<n;i=i+1|0)o[i]=0|t.charCodeAt(i);return o},ns=(a(Es,[{key:"getID",value:function(){return this._id}},{key:"_onOpen",value:function(e){this._handler.onOpen({id:this._id,res:JSON.stringify(e)})}},{key:"_onClose",value:function(e){this._handler.onClose({id:this._id,e:e})}},{key:"_onMessage",value:function(e){e=this._canIUseBinaryFrame?this._isAppCompressedData(e.data)?this._handler.inflate(e.data):function(e){for(var t=new Uint8Array(e),n="",o=0,i=t.length;o<i;){var a=t[o],s=0,r=0;if(a<=127?(s=0,r=255&a):a<=223?(s=1,r=31&a):a<=239?(s=2,r=15&a):a<=244&&(s=3,r=7&a),0<i-o-s)for(var c=0;c<s;)r=r<<6|63&(a=t[o+c+1]),c+=1;else r=65533,s=i-o;n+=String.fromCodePoint(r),o+=s+1}return n}(e.data):e.data,this._handler.onMessage({data:e})}},{key:"_isAppCompressedData",value:function(e){return 67===(e=new Uint8Array(e))[0]&&79===e[1]&&77===e[2]&&80===e[3]}},{key:"_onError",value:function(e){this._handler.onError({id:this._id,e:e})}},{key:"setIsWorkerEnabled",value:function(e){this._isWorkerEnabled=!0}},{key:"close",value:function(e){this._workerSocket&&(this._workerSocket.postMessage({cmd:"stop",code:e}),this._workerSocket.terminate(),this._workerSocket=null),z?(ne.offSocketClose(),ne.offSocketMessage(),ne.offSocketOpen(),ne.offSocketError(),ne.closeSocket()):this._socket&&(Z?(this._socket.onClose((function(){})),this._socket.onOpen((function(){})),this._socket.onMessage((function(){})),this._socket.onError((function(){}))):(this._socket.onopen=null,this._socket.onmessage=null,this._socket.onclose=null,this._socket.onerror=null),$?this._socket.close({code:e}):this._socket.close(e),this._socket=null)}},{key:"send",value:function(e){this._workerSocket?this._workerSocket.postMessage({cmd:"sendMessage",data:this._canIUseBinaryFrame?ts(e.data).buffer:e.data}):z?ne.sendSocketMessage({data:e.data,fail:function(){e.fail&&e.requestID&&e.fail(e.requestID)}}):this._socket&&(Z?this._socket.send({data:this._canIUseBinaryFrame?ts(e.data).buffer:e.data,fail:function(){e.fail&&e.requestID&&e.fail(e.requestID)}}):this._socket.send(this._canIUseBinaryFrame?ts(e.data):e.data))}}]),Es),os=["keyMap"],is=["keyMap"],as="connected",ss="connecting",rs="disconnected",cs=(a(Ss,[{key:"_setWebsocketHost",value:function(){var e=this._chM.get(12);this._currentSite=w,this._chM.isOversea()&&(this._currentSite="OVERSEA"),e.isSingaporeSite()?this._currentSite="SINGAPORE":e.isKoreaSite()?this._currentSite="KOREA":e.isGermanySite()?this._currentSite="GERMANY":e.isIndiaSite()?this._currentSite="IND":e.isJapanSite()?this._currentSite="JPN":e.isUSASite()?this._currentSite="USA":e.isIndonesiaSite()&&(this._currentSite="INDONESIA"),P.HOST.setCurrent(this._currentSite)}},{key:"_initConnection",value:function(){var e=this._chM.get(12).getSDKAppID()+"",t=(ut(P.HOST.CURRENT.BACKUP)?this._url=P.HOST.CURRENT.DEFAULT:""===this._url?this._url=P.HOST.CURRENT.DEFAULT0.replace("*",e):-1<this._url.indexOf(e)?this._url=P.HOST.CURRENT.DEFAULT:this._url===P.HOST.CURRENT.DEFAULT?this._url=P.HOST.CURRENT.BACKUP:this._url===P.HOST.CURRENT.BACKUP?this._url=this._canIUseAnyCast()?P.HOST.CURRENT.ANYCAST:P.HOST.CURRENT.DEFAULT:this._url===P.HOST.CURRENT.ANYCAST&&(P.HOST.CURRENT.ANYCAST="",this._url=P.HOST.CURRENT.DEFAULT),e=this._chM.get(12)).getProxyServer();Ve(t)||(this._url=t),e.isTestEnv()&&(this._url=b.TEST[this._currentSite].DEFAULT),this._connect(),this._nextPingTs=0}},{key:"_canIUseAnyCast",value:function(){return te&&P.HOST.CURRENT.ANYCAST}},{key:"onCheckTimer",value:function(e){e%1==0&&(this._checkPromiseMap(),this._checkNativeAppWS())}},{key:"_checkPromiseMap",value:function(){var e=this;0!==this._promiseMap.size&&this._promiseMap.forEach((function(t,n){var o=t.reject,i=t.timestamp,a=(t=t.headSeq,15e3);-1!==n.indexOf(Gn.LOGIN)?a=9e4:-1!==n.indexOf(Gn.PING)&&(a=3e3),Date.now()-i>=a&&(Ae.l("".concat(e._n,"._checkPromiseMap request timeout, delete requestID:").concat(n)),e._promiseMap.delete(n),o(new wn({code:Pn.NETWORK_TIMEOUT,data:{headSeq:t}})),e._chM.onRequestTimeout())}))}},{key:"_checkNativeAppWS",value:function(){Y&&!this.isConnected()&&this._reConnect()}},{key:"onOpen",value:function(e){var t,n;this._readyState!==rs&&(this._onOpenTs=Date.now(),n=e.id,e=e.res,this._socketID=n,t=jt(this._startTs,!1),n="socketID:".concat(n," res:").concat(e),Ae.l("".concat(this._n,"._onOpen cost:").concat(t," ms. ").concat(n)),new Jn("wsOnOpen").setMessage(t).setCostTime(t).setMoreMessage(n).end(),this._readyState=as,this._reConnectCount=0,this._resend(),!0===this._reConnectFlag&&(this._chM.onReconnected(),this._reConnectFlag=!1),this._chM.onOpen())}},{key:"onClose",value:function(e){var t=new Jn("wsOnClose"),n=e.id,o=(e=e.e,"sourceSocketID:".concat(n," currentSocketID:").concat(this._socketID," code:").concat(e.code," reason:").concat(e.reason)),i=0;0!==this._onOpenTs&&(i=Date.now()-this._onOpenTs),t.setMessage(i).setCostTime(i).setMoreMessage(o).setCode(e.code).end(!0),Ae.l("".concat(this._n,"._onClose ").concat(o," onlineTime:").concat(i)),n===this._socketID&&(this._readyState=rs,i<1e3?this._chM.onReconnectFailed():this._chM.onClose())}},{key:"onError",value:function(e){var t=e.id,n=(e=e.e,"sourceSocketID:".concat(t," currentSocketID:").concat(this._socketID));new Jn("wsOnError").setMessage(e.errMsg||JSON.stringify(e,["message","code"])).setMoreMessage(n).setLevel("error").end(!0),Ae.w("".concat(this._n,"._onError"),e,n),t===this._socketID&&(this._readyState=rs,this._chM.onError())}},{key:"onMessage",value:function(e){var t,n,o,i,a,s;try{t=JSON.parse(e.data)}catch(r){new Jn("jsonParseError").setMessage(e.data).end()}t&&t.head&&(e=this._getRequestIDFromHead(t.head),n=t.body,this._chM.get(30).isTRTCCommand(e)||(s=Ot(t.head),n=function e(t,n){var o,i,a;return We(t)?t.map((function(t){return $e(t)?e(t,n):t})):$e(t)?(o=t,i=function(e,t){return ut(n[t])?Ya(t):n[t]},a={},Object.keys(o).forEach((function(e){a[i(o[e],e)]=o[e]})),Et(a,(function(t){return We(t)||$e(t)?e(t,n):t}))):void 0}(t.body,this._getResKeyMap(s))),Ae.d("".concat(this._n,".onMessage ret:").concat(JSON.stringify(n)," requestID:").concat(e," has:").concat(this._promiseMap.has(e))),this._setNextPingTs(),this._promiseMap.has(e)?(o=(s=this._promiseMap.get(e)).resolve,i=s.reject,a=s.timestamp,s=s.headSeq,this._promiseMap.delete(e),this._calcRTT(a),n.errorCode&&0!==n.errorCode?(this._chM.onErrorCodeNotZero(n),i(new wn({code:n.errorCode,message:n.errorInfo||"",data:e.includes(Gn.MODIFY_C2C_MSG)||e.includes(Gn.MODIFY_GRP_MSG)?{elements:n.elements,messageVersion:n.messageVersion,cloudCustomData:n.cloudCustomData,headSeq:s}:{headSeq:s}}))):o(mn(n))):this._chM.onMessage({head:t.head,body:n}))}},{key:"_calcRTT",value:function(e){e=Date.now()-e,this._chM.get(26).addRTT(e)}},{key:"_connect",value:function(){this._readyState!==ss&&this._readyState!==as&&(this._startTs=Date.now(),this._onOpenTs=0,this._readyState=ss,this._socket=new ns(this),this._socketID=this._socket.getID(),Ae.l("".concat(this._n,"._connect isWorkerEnabled:").concat(this.getIsWorkerEnabled()," socketID:").concat(this._socketID," url:").concat(this.getURL())),new Jn("wsConnect").setMessage("socketID:".concat(this._socketID," url:").concat(this.getURL())).end())}},{key:"getURL",value:function(){this._chM.isDevMode()&&(this._canIUseBinaryFrame=!1);var e=Lt(),t=((z||B&&"windows"===e||Y)&&(this._canIUseBinaryFrame=!1),-1),n=("ios"===e?t=se||-1:"android"===e&&(t=ce||-1),this._chM.get(12)),o=this._chM.getPlatform(),i=n.getSDKAppID();return n=n.getInstanceID(),i="sdkappid=".concat(i,"&instanceid=").concat(n,"&random=").concat(this._getRandom(),"&platform=").concat(o,"&host=").concat(e)+"&version=".concat(t,"&sdkversion=").concat("3.4.7"),H&&(i+="&isminigame=1"),this._chM.canIUseInflate()&&(i+="&compress=gzip"),(this._canIUseBinaryFrame?"".concat(this._url,"/binfo?"):"".concat(this._url,"/info?")).concat(i)}},{key:"_closeConnection",value:function(e){Ae.l("".concat(this._n,"._closeConnection socketID:").concat(this._socketID)),this._socket&&(this._socket.close(e),this._socketID=-1,this._socket=null,this._readyState=rs)}},{key:"_resend",value:function(){var e=this;if(Ae.l("".concat(this._n,"._resend reConnectFlag:").concat(this._reConnectFlag),"promiseMap.size:".concat(this._promiseMap.size," simpleRequestMap.size:").concat(this._simpleRequestMap.size)),0<this._promiseMap.size&&this._promiseMap.forEach((function(t,n){var o=t.uplinkData,i=t.resolve;t=t.reject,-1!==n.indexOf(Gn.AV_POLLING)?e._promiseMap.delete(n):(e._promiseMap.set(n,{resolve:i,reject:t,timestamp:Date.now(),uplinkData:o}),e._execute(n,o))})),0<this._simpleRequestMap.size){var t,n=T(this._simpleRequestMap);try{for(n.s();!(t=n.n()).done;){var o=_(t.value,2),i=o[0],a=o[1];this._execute(i,a)}}catch(s){n.e(s)}finally{n.f()}this._simpleRequestMap.clear()}}},{key:"send",value:function(e){var t=this,n=(e.head.seq=this._getSequence(),e.head.reqtime=Math.floor(Date.now()/1e3),e.keyMap,h(e,os)),o=this._getRequestIDFromHead(e.head),i=JSON.stringify(n);return new Promise((function(a,s){t._promiseMap.set(o,{resolve:a,reject:s,timestamp:Date.now(),uplinkData:i,headSeq:e.head.seq}),Ae.d("".concat(t._n,".send uplinkData:").concat(JSON.stringify(n)," requestID:").concat(o," readyState:").concat(t._readyState)),t._readyState!==as?t._reConnect():(t._execute(o,i),t._chM.get(26).addRequestCount())}))}},{key:"simplySend",value:function(e){e.head.seq=this._getSequence(),e.head.reqtime=Math.floor(Date.now()/1e3),e.keyMap;var t=h(e,is);e=this._getRequestIDFromHead(e.head),t=JSON.stringify(t),this._readyState!==as?(this._simpleRequestMap.size<this.MAX_SIZE?this._simpleRequestMap.set(e,t):Ae.l("".concat(this._n,".simplySend. simpleRequestMap is full, drop request!")),this._reConnect()):this._execute(e,t)}},{key:"_execute",value:function(e,t){this._socket.send({data:t,fail:Z?this._onSendFail.bind(this):void 0,requestID:e})}},{key:"_onSendFail",value:function(e){Ae.l("".concat(this._n,"._onSendFail requestID:").concat(e)),this._chM.onSendFail()}},{key:"_getSequence",value:function(){var e;if(this._startSequence<2415919103)return e=this._startSequence,this._startSequence+=1,2415919103===this._startSequence&&(this._startSequence=nt()),e}},{key:"_getRequestIDFromHead",value:function(e){return e.servcmd+e.seq}},{key:"_getResKeyMap",value:function(e){return e=this._chM.getKeyMap(e),t(t({},Ba.res),e.res)}},{key:"_reConnect",value:function(){this._readyState!==as&&this._readyState!==ss&&this.forcedReconnect()}},{key:"forcedReconnect",value:function(){var e="".concat(this._n,".forcedReconnect");Ae.l("".concat(e," count:").concat(this._reConnectCount," readyState:").concat(this._readyState)),this._reConnectFlag=!0,this._resetRandom(),this._reConnectCount<this.MAX_RECONNECT_COUNT?(this._reConnectCount+=1,this._closeConnection(4001),this._initConnection()):(this._reConnectCount=0,this._chM.get(15).isOnline()?(Ae.w("".concat(e," disconnected from wsserver but network is ok, continue...")),this._closeConnection(4001),this._initConnection()):this._chM.onReconnectFailed())}},{key:"getReconnectFlag",value:function(){return this._reConnectFlag}},{key:"_setNextPingTs",value:function(){this._nextPingTs=Y?Date.now()+5e3:Date.now()+1e4}},{key:"getNextPingTs",value:function(){return this._nextPingTs}},{key:"isConnected",value:function(){return this._readyState===as}},{key:"canIUseBinaryFrame",value:function(){return this._canIUseBinaryFrame}},{key:"getSocketID",value:function(){return this._socketID}},{key:"inflate",value:function(e){if(this._chM.canIUseInflate())return this._chM.get(37).inflate(e)}},{key:"setIsWorkerEnabled",value:function(e){Ae.l("".concat(this._n,".setIsWorkerEnabled flag:").concat(e)),this._isWorkerEnabled=e}},{key:"getIsWorkerEnabled",value:function(){return this._isWorkerEnabled&&he}},{key:"_getRandom",value:function(){return 0===this._random&&(this._random=Math.random()),this._random}},{key:"_resetRandom",value:function(){this._random=0}},{key:"close",value:function(){Ae.l("".concat(this._n,".close")),this._closeConnection(4e3),this._promiseMap.clear(),this._startSequence=nt(),this._readyState=rs,this._simpleRequestMap.clear(),this._reConnectFlag=!1,this._reConnectCount=0,this._onOpenTs=0,this._url="",this._random=0,this._canIUseBinaryFrame=!0,this._isWorkerEnabled=!0}}]),Ss),us=function(e,t,n){return new Promise((function(o,i){var a,s,r="application/x-www-form-urlencoded;charset=UTF-8";Z?ne.request({url:t,data:n,method:e,timeout:3e3,header:{"content-type":r},success:function(e){e&&e.data&&e.data.NetCheckInfo&&Ae.l("".concat("getconninfo ok in"," miniapp. ret:"),e.data),o()},fail:function(){i(new wn({code:Pn.NETWORK_ERROR}))}}):(a=new XMLHttpRequest,s=setTimeout((function(){a.abort(),i(new wn({code:Pn.NETWORK_TIMEOUT}))}),3e3),a.onreadystatechange=function(){4===a.readyState&&(clearTimeout(s),200===a.status||304===a.status?(a.responseText&&-1<a.responseText.indexOf("NetCheckInfo")&&Ae.l("".concat("getconninfo ok in"," web. ret:"),JSON.parse(a.responseText)),o()):i(new wn({code:Pn.NETWORK_ERROR})))},a.open(e,t,!0),a.setRequestHeader("Content-type",r),n?a.send(n):a.send())}))},ls=(r(Ts,bn),Za=g(Ts),a(Ts,[{key:"onCheckTimer",value:function(e){this._socketHandler&&(this.isLoggedIn()?(0<this._timerForNotLoggedIn&&(clearInterval(this._timerForNotLoggedIn),this._timerForNotLoggedIn=-1),this._socketHandler.onCheckTimer(e)):this._socketHandler.onCheckTimer(1),this._checkNextPing())}},{key:"onErrorCodeNotZero",value:function(e){this.get(20).onErrorCodeNotZero(e)}},{key:"onMessage",value:function(e){this.get(20).onMessage(e)}},{key:"send",value:function(e){return this._socketHandler?this._previousState!==E.NET_STATE_CONNECTED&&e.head.servcmd.includes(Gn.SSO_STAT)?(this.reConnect(),this.isPrivateNetWork()?Promise.resolve():this._sendLogViaHTTP(e)):this._socketHandler.send(e):Promise.reject()}},{key:"_sendLogViaHTTP",value:function(e){var t=P.HOST.CURRENT.STAT;return t="".concat(t,"/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(e.head.sdkappid,"&reqtime=").concat(Date.now()),e=JSON.stringify(e.body),us("POST",t,e)}},{key:"simplySend",value:function(e){return this._socketHandler?this._socketHandler.simplySend(e):Promise.reject()}},{key:"onOpen",value:function(){this._ping()}},{key:"onClose",value:function(){this._socketHandler&&this._socketHandler.getReconnectFlag()&&this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED),this.reConnect()}},{key:"onError",value:function(){Z&&!Y&&this.warn("DomainNameInMP"),this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"getKeyMap",value:function(e){return this.get(20).getKeyMap(e)}},{key:"onRequestTimeout",value:function(){3e4<=Date.now()-this._lastDiagnoseTS&&this.diagnose()}},{key:"onSendFail",value:function(){this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"onReconnected",value:function(){Ae.l("".concat(this._n,".onReconnected cost:").concat(jt(this._disconnectedTS,!0,!0))),this._m.restartTimer(),this.get(20).onReconnected(jt(this._disconnectedTS,!1,!1)),this._disconnectedTS=0,this._emitNetStateChangeEvent(E.NET_STATE_CONNECTED)}},{key:"onReconnectFailed",value:function(){Ae.l("".concat(this._n,".onReconnectFailed")),this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"setIsWorkerEnabled",value:function(e){this._socketHandler&&this._socketHandler.setIsWorkerEnabled(!1)}},{key:"offline",value:function(){this._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)}},{key:"reConnect",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=!1,n=(this._socketHandler&&(t=this._socketHandler.getReconnectFlag()),"forcedFlag:".concat(e," fatalErrorFlag:").concat(this._fatalErrorFlag," previousState:").concat(this._previousState," reconnectFlag:").concat(t));Ae.l("".concat(this._n,".reConnect ").concat(n)),this._fatalErrorFlag||!this._socketHandler||!0!==e&&this._previousState===E.NET_STATE_CONNECTING&&t||(this._socketHandler.forcedReconnect(),this._emitNetStateChangeEvent(E.NET_STATE_CONNECTING))}},{key:"_emitNetStateChangeEvent",value:function(e){this._previousState!==e&&(Ae.l("".concat(this._n,"._emitNetStateChangeEvent from ").concat(this._previousState," to ").concat(e)),e===E.NET_STATE_DISCONNECTED&&0===this._disconnectedTS&&(this._disconnectedTS=Date.now(),this.diagnose()),this._previousState=e,this.emitOEvt(S.NET_STATE_CHANGE,{state:e}))}},{key:"_ping",value:function(){var e,t=this;!0!==this._probing&&(this._probing=!0,e=this.get(20).getProtocolData({P:Gn.PING}),this.send(e).then((function(){t._probing=!1})).catch((function(e){t._probing=!1;var n=t.get(15).isOnline();Ae.w("".concat(t._n,"._ping failed. bOnline:").concat(n," error:"),e),e&&60002===e.code?(new Jn("error").setMessage("code:".concat(e.code," message:").concat(e.message)).end(),t._fatalErrorFlag=!0,t._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)):n?t.reConnect():t._emitNetStateChangeEvent(E.NET_STATE_DISCONNECTED)})))}},{key:"_checkNextPing",value:function(){this._socketHandler&&this._socketHandler.isConnected()&&Date.now()>=this._socketHandler.getNextPingTs()&&this._ping()}},{key:"dealloc",value:function(){this._socketHandler&&(this._socketHandler.close(),this._socketHandler=null),-1<this._timerForNotLoggedIn&&clearInterval(this._timerForNotLoggedIn)}},{key:"onRestApiKickedOut",value:function(){this._socketHandler&&(this._socketHandler.close(),this.reConnect(!0))}},{key:"canIUseInflate",value:function(){return this._m.canIUseInflate()}},{key:"getSocketID",value:function(){if(this._socketHandler)return this._socketHandler.getSocketID()}},{key:"diagnose",value:function(){this.isPrivateNetWork()||(this._lastDiagnoseTS=Date.now(),this._diagnoseBySSO(),this._diagnoseByCDN())}},{key:"_diagnoseBySSO",value:function(){var e=this,t=this._socketHandler.getURL(),n=t.split("/")[2];n.startsWith("ws")&&(t=t.slice(t.indexOf("info?")+5),n="https://".concat(n,"/v3/netcheck/getconninfo?").concat(t,"&reqtime=").concat(Date.now()),us("GET",n).catch((function(t){Ae.w("".concat(e._n,"._diagnoseBySSO failed. error:"),t)})))}},{key:"_diagnoseByCDN",value:function(){var e=this,t=(t=this._socketHandler.getURL()).slice(t.indexOf("info?")+5);t="https://boce-cdn.my-imcloud.com/v3/netcheck/getconninfo?".concat(t,"&reqtime=").concat(Date.now()),us("GET",t).catch((function(t){Ae.w("".concat(e._n,"._diagnoseByCDN failed. error:"),t)}))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._previousState=E.NET_STATE_CONNECTED,this._probing=!1,this._fatalErrorFlag=!1,this._timerForNotLoggedIn=setInterval(this.onCheckTimer.bind(this),1e3),this._disconnectedTS=0,this._lastDiagnoseTS=0}}]),Ts),ds=["a2","tinyid"],ps=["a2","tinyid"],hs=(a(Cs,[{key:"_fillMap",value:function(){this._map.clear();var e=this._sessionM.genCommonHead(),n=this._sessionM.genCosSpecifiedHead(),o=this._sessionM.genSSOReportHead();this._map.set(Gn.LOGIN,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.LOGIN)}),body:{state:"Online",isWebUniapp:0,deviceBrand:0,customInfo:""},keyMap:{req:{deviceBrand:"InstType"},res:{InstId:"instanceID",HelloInterval:"helloInterval",RichMsgAuthKey:"authKey"}}}),this._map.set(Gn.LOGOUT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.LOGOUT)}),body:{type:0,isWebUniapp:0},keyMap:{req:{type:"wslogout_type"}}}),this._map.set(Gn.HELLO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.HELLO)}),body:{isWebUniapp:0},keyMap:{res:{NewInstInfo:"newInstanceInfo"}}}),this._map.set(Gn.KICK_OTHER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.STAT_SERVICE,".").concat(Gn.KICK_OTHER)}),body:{}}),this._map.set(Gn.COS_SIGN,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.IM_COS_SIGN,".").concat(Gn.COS_SIGN)}),body:{cmd:"open_im_cos_svc",subCmd:"get_cos_token",duration:300,version:2},keyMap:{req:{userSig:"usersig",subCmd:"sub_cmd",cmd:"cmd",duration:"duration",version:"version"},res:{expired_time:"expiredTime",bucket_name:"bucketName",session_token:"sessionToken",tmp_secret_id:"secretId",tmp_secret_key:"secretKey"}}}),this._map.set(Gn.COS_PRE_SIG,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.COS_PRE_SIG)}),body:{fileType:void 0,fileName:void 0,uploadMethod:0,duration:900},keyMap:{req:{userSig:"usersig",fileType:"file_type",fileName:"file_name",uploadMethod:"upload_method"},res:{expired_time:"expiredTime",request_id:"requestId",head_url:"headUrl",upload_url:"uploadUrl",download_url:"downloadUrl",ci_url:"ciUrl",snapshot_url:"requestSnapshotUrl"}}}),this._map.set(Gn.SIMPLE_COS_PRE_SIG,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.SIMPLE_COS_PRE_SIG)}),body:{uploadMethod:0,platform:2,SDKAppID:0,userID:"",conversationType:1,uploadConfig:[{fileID:1,fileType:1,fileName:""}]},keyMap:{req:{platform:"uint32_platform",SDKAppID:"uint32_sdkappid",userID:"str_user_id",uploadMethod:"uint32_upload_method",conversationType:"uint32_scene",uploadConfig:"rpt_upload_object",fileID:"uint32_file_id",fileType:"uint32_file_type",fileName:"str_file_name"},res:{str_final_ip:"uploadIP",rpt_pre_sig:"preSig",uint32_file_id:"fileID",uint32_exist_flag:"existFlag",str_download_url:"downloadUrl",str_upload_url:"uploadUrl",str_snapshot_url:"requestSnapshotUrl",str_file_key:"fileKey"}}}),this._map.set(Gn.GET_IMAGE_INFO,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.GET_IMAGE_INFO)}),body:{imageUrl:""},keyMap:{req:{imageUrl:"str_image_url"},res:{rpt_msg_image_info:"imageInfoArray",uint32_image_type:"type",str_url:"url",uint32_width:"width",uint32_height:"height",str_image_format:"imageFormat"}}}),this._map.set(Gn.GET_IP,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.GET_IP)}),body:{domainName:""},keyMap:{req:{domainName:"str_domain"},res:{str_final_ip:"ip"}}}),this._map.set(Gn.VIDEO_COVER,{head:t(t({},n),{},{servcmd:"".concat(P.NAME.CUSTOM_UPLOAD,".").concat(Gn.VIDEO_COVER)}),body:{version:1,platform:void 0,coverName:void 0,requestSnapshotUrl:void 0},keyMap:{req:{version:"version",platform:"platform",coverName:"cover_name",requestSnapshotUrl:"snapshot_url"},res:{error_code:"errorCode",error_msg:"errorInfo",download_url:"snapshotUrl"}}}),this._map.set(Gn.FETCH_COMMERCIAL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.FETCH_COMMERCIAL_CONFIG)}),body:{SDKAppID:0},keyMap:{req:{SDKAppID:"uint32_sdkappid"},res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}}),this._map.set(Gn.PUSHED_COMMERCIAL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.PUSHED_COMMERCIAL_CONFIG)}),body:{},keyMap:{res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}}),this._map.set(Gn.FETCH_CLOUD_CTRL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.FETCH_CLOUD_CTRL_CONFIG)}),body:{SDKAppID:0,version:0},keyMap:{req:{SDKAppID:"uint32_sdkappid",version:"uint64_version"},res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}}),this._map.set(Gn.PUSHED_CLOUD_CTRL_CONFIG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_CONFIG_MANAGER,".").concat(Gn.PUSHED_CLOUD_CTRL_CONFIG)}),body:{},keyMap:{res:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}}),this._map.set(Gn.OVERLOAD_NOTIFY,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OVERLOAD_PUSH,".").concat(Gn.OVERLOAD_NOTIFY)}),body:{},keyMap:{res:{OverLoadServCmd:"overloadCommand",DelaySecs:"waitingTime"}}}),this._map.set(Gn.SYNC_UNREAD_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SYNC_UNREAD_MSG)}),body:{cookie:"",syncFlag:0,needAbstract:1,isOnlineSync:0,needSignaling:1,needCachedMsg:1},keyMap:{req:{fromAccount:"From_Account",toAccount:"To_Account",from:"From_Account",to:"To_Account",time:"MsgTimeStamp",sequence:"MsgSeq",random:"MsgRandom",elements:"MsgBody"},res:{MsgList:"messageList",SyncFlag:"syncFlag",To_Account:"to",From_Account:"from",ClientSeq:"clientSequence",MsgSeq:"sequence",NoticeSeq:"noticeSequence",NotifySeq:"notifySequence",MsgRandom:"random",MsgTimeStamp:"time",MsgContent:"content",ToGroupId:"to",MsgKey:"messageKey",GroupTips:"groupTips",MsgBody:"elements",MsgType:"type",C2CRemainingUnreadCount:"C2CRemainingUnreadList",C2CPairUnreadCount:"C2CPairUnreadList"}}}),this._map.set(Gn.GET_PROFANITY_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_MSG_AUDIT_MGR,".").concat(Gn.GET_PROFANITY_LIST)}),body:{version:0,deviceID:"",startIndex:void 0},keyMap:{req:{version:"uint64_version",deviceID:"str_device_id",startIndex:"uint64_start_index"},res:{msg_cmd_error_code:"errorInfo",str_err_msg:"errorMessage",uint32_code:"errorCode",msg_scene_ctl_config:"filterConfig",uint64_c2c_custom_msg_flag:"c2c_custom_message",uint64_c2c_text_msg_flag:"c2c_text_message",uint64_group_custom_msg_flag:"group_custom_message",uint64_group_text_msg_flag:"group_text_message",uint64_group_info_flag:"group_profile",uint64_group_member_info_flag:"group_member_profile",uint64_relation_chain_flag:"sns",uint64_user_info_flag:"user_profile",rpt_msg_dirty_word:"lexicon",str_dirty_word:"profanity",str_replaced_content:"replacement",uint64_filter_type:"filterType",uint64_id:"id",uint64_word_type:"profanityType",uint64_complete_flag:"completeFlag",uint64_next_start_index:"nextStartIndex",uint64_version:"version",uint64_expired_time:"expiredTime"}}}),this._map.set(Gn.SEND_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SEND_C2C_MSG)}),body:{fromAccount:"",toAccount:"",msgSeq:0,msgRandom:0,msgBody:[],cloudCustomData:void 0,nick:"",avatar:"",msgLifeTime:void 0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{sound:"",badgeMode:0,isVoipPush:void 0,image:""},androidInfo:{sound:"",XiaoMiChannelID:"",OPPOChannelID:"",GoogleChannelID:"",VIVOClassification:1,VIVOCategory:"",HuaWeiCategory:"",HuaWeiImage:"",HonorImage:"",GoogleImage:""}},messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0,isSupportExtension:0,isRelayMessage:0,cmConfigID:void 0},keyMap:{req:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",count:"MaxCnt",lastMessageTime:"LastMsgTime",messageKey:"MsgKey",peerAccount:"Peer_Account",data:"Data",description:"Desc",extension:"Ext",type:"MsgType",content:"MsgContent",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",nick:"From_AccountNick",avatar:"From_AccountHeadurl",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"IsNeedReadReceipt",GoogleChannelID:"GoogleChannelID",XiaoMiChannelID:"XiaoMiChannelID"}}}),this._map.set(Gn.SEND_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SEND_GRP_MSG)}),body:{fromAccount:"",groupID:"",random:0,clientSequence:0,priority:"",msgBody:[],cloudCustomData:void 0,onlineOnlyFlag:0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{sound:"",badgeMode:0,isVoipPush:void 0,image:""},androidInfo:{sound:"",XiaoMiChannelID:"",OPPOChannelID:"",GoogleChannelID:"",VIVOClassification:1,VIVOCategory:"",HuaWeiCategory:"",HuaWeiImage:"",HonorImage:"",GoogleImage:""}},groupAtInfo:[],messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0,topicID:void 0,receiverList:void 0,isSupportExtension:0,isRelayMessage:0,cmConfigID:void 0},keyMap:{req:{to:"GroupId",extension:"Ext",data:"Data",description:"Desc",random:"Random",sequence:"ReqMsgSeq",count:"ReqMsgNumber",type:"MsgType",priority:"MsgPriority",content:"MsgContent",elements:"MsgBody",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",clientSequence:"ClientSeq",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"NeedReadReceipt",receiverList:"To_Account",GoogleChannelID:"GoogleChannelID",XiaoMiChannelID:"XiaoMiChannelID"},res:{MsgTime:"time",MsgSeq:"sequence"}}}),this._map.set(Gn.REVOKE_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.REVOKE_C2C_MSG)}),body:{msgInfo:{fromAccount:"",toAccount:"",msgTimeStamp:0,msgSeq:0,msgRandom:0}},keyMap:{req:{msgInfo:"MsgInfo",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom"}}}),this._map.set(Gn.REVOKE_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.REVOKE_GRP_MSG)}),body:{groupID:"",msgSeqList:void 0,topicID:""},keyMap:{req:{msgSeqList:"MsgSeqList",msgSeq:"MsgSeq"}}}),this._map.set(Gn.GET_C2C_ROAMING_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.GET_C2C_ROAMING_MSG)}),body:{peerAccount:"",count:15,lastMessageTime:0,messageKey:"",withRecalledMessage:1,direction:0},keyMap:{req:{messageKey:"MsgKey",peerAccount:"Peer_Account",count:"MaxCnt",lastMessageTime:"LastMsgTime",withRecalledMessage:"WithRecalledMsg",direction:"GetDirection"},res:{LastMsgTime:"lastMessageTime",IsNeedReadReceipt:"needReadReceipt",IsPeerRead:"readReceiptSentByPeer"}}}),this._map.set(Gn.MODIFY_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.MODIFY_C2C_MSG)}),body:{from:"",to:"",sequence:0,random:0,time:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{req:{sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}}),this._map.set(Gn.GET_GRP_ROAMING_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_ROAMING_MSG)}),body:{withRecalledMsg:1,groupID:"",count:15,sequence:"",topicID:void 0},keyMap:{req:{sequence:"ReqMsgSeq",count:"ReqMsgNumber",withRecalledMessage:"WithRecalledMsg"},res:{Random:"random",MsgTime:"time",MsgSeq:"sequence",ReqMsgSeq:"sequence",RspMsgList:"messageList",IsSystemMsg:"isSystemMessage",ToGroupId:"to",EnumFrom_AccountType:"fromAccountType",EnumTo_AccountType:"toAccountType",GroupCode:"groupCode",MsgPriority:"priority",MsgBody:"elements",MsgType:"type",MsgContent:"content",IsFinished:"complete",Download_Flag:"downloadFlag",ClientSeq:"clientSequence",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID",ToTopicId:"topicID",InvisibleMsgSeq:"invisibleSequenceList",NextReqMsgSeq:"nextSequence"}}}),this._map.set(Gn.SET_C2C_MSG_READ,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SET_C2C_MSG_READ)}),body:{C2CMsgReaded:void 0},keyMap:{req:{lastMessageTime:"LastedMsgTime"}}}),this._map.set(Gn.SET_C2C_PEER_MUTE_NOTIFICATIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SET_C2C_PEER_MUTE_NOTIFICATIONS)}),body:{userIDList:void 0,muteFlag:0},keyMap:{req:{userIDList:"Peer_Account",muteFlag:"Mute_Notifications"}}}),this._map.set(Gn.GET_C2C_PEER_MUTE_NOTIFICATIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.GET_C2C_PEER_MUTE_NOTIFICATIONS)}),body:{toAccount:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Peer_Account"},res:{MuteNotificationsList:"muteFlagList"}}}),this._map.set(Gn.SET_GRP_MSG_READ,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SET_GRP_MSG_READ)}),body:{groupID:void 0,messageReadSeq:void 0,topicID:void 0},keyMap:{req:{messageReadSeq:"MsgReadedSeq"}}}),this._map.set(Gn.SET_ALL_MSG_READ,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SET_ALL_MSG_READ)}),body:{readAllC2CMessage:0,groupMessageReadInfoList:[]},keyMap:{req:{readAllC2CMessage:"C2CReadAllMsg",groupMessageReadInfoList:"GroupReadInfo",messageSequence:"MsgSeq"},res:{C2CReadAllMsg:"readAllC2CMessage",GroupReadInfoArray:"groupMessageReadInfoList"}}}),this._map.set(Gn.DEL_C2C_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.DEL_C2C_MSG)}),body:{fromAccount:"",to:"",keyList:void 0},keyMap:{req:{keyList:"MsgKeyList"}}}),this._map.set(Gn.DEL_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DEL_GRP_MSG)}),body:{groupID:"",deleter:"",keyList:void 0,topicID:void 0},keyMap:{req:{deleter:"Deleter_Account",keyList:"Seqs"}}}),this._map.set(Gn.TRANSLATE_TEXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_TRANSLATE,".").concat(Gn.TRANSLATE_TEXT)}),body:{sourceTextList:void 0,SDKAppID:0,from:0,source:"",target:""},keyMap:{req:{sourceTextList:"SourceText",SDKAppID:"SdkAppId",from:"FromAccount"},res:{TargetText:"translatedTextList",RequestId:"requestID",CmdErrorCode:"error",ErrorCode:"code",ErrorInfo:"message"}}}),this._map.set(Gn.VOICE_TO_TEXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_SPEECH,".").concat(Gn.VOICE_TO_TEXT)}),body:{url:"",SDKAppID:0,format:"",sourceType:0,language:""},keyMap:{req:{url:"BytesUrl",SDKAppID:"Uint32Sdkappid",format:"BytesVoiceFormat",sourceType:"Uint64SourceType",language:"BytesEngServiceType"},res:{BytesRequestid:"requestID",BytesResult:"result",CmdErrorCode:"error",ErrorCode:"code",ErrorInfo:"message"}}}),this._map.set(Gn.MODIFY_GRP_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.MODIFY_GRP_MSG)}),body:{groupID:"",topicID:void 0,sequence:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{req:{sequence:"MsgSeq",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}}),this._map.set(Gn.GET_READ_RECEIPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_READ_RECEIPT)}),body:{groupID:"",sequenceList:void 0},keyMap:{req:{sequence:"MsgSeq"}}}),this._map.set(Gn.SEND_C2C_READ_RECEIPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.SEND_C2C_READ_RECEIPT)}),body:{peerAccount:"",messageInfoList:void 0},keyMap:{req:{peerAccount:"Peer_Account",messageInfoList:"C2CMsgInfo",fromAccount:"From_Account",toAccount:"To_Account",sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",clientTime:"MsgClientTime"}}}),this._map.set(Gn.SEND_READ_RECEIPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SEND_READ_RECEIPT)}),body:{groupID:"",sequenceList:void 0},keyMap:{req:{sequenceList:"MsgSeqList",sequence:"MsgSeq"}}}),this._map.set(Gn.GET_READ_RECEIPT_DETAIL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_READ_RECEIPT_DETAIL)}),body:{groupID:"",sequence:void 0,flag:0,cursor:0,count:0},keyMap:{req:{sequence:"MsgSeq",count:"Num"},res:{ReadList:"readUserIDList",Read_Account:"userID",UnreadList:"unreadUserIDList",Unread_Account:"userID",IsFinish:"isCompleted"}}}),this._map.set(Gn.MODIFY_C2C_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.MODIFY_C2C_MSG_EXT)}),body:{from:void 0,to:void 0,messageKey:void 0,operateType:void 0,extensionList:void 0}}),this._map.set(Gn.GET_C2C_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_C2C_MSG_EXT)}),body:{from:void 0,to:void 0,messageKey:void 0,startSequence:void 0}}),this._map.set(Gn.MODIFY_GRP_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.MODIFY_GRP_MSG_EXT)}),body:{groupID:void 0,topicID:void 0,messageSequence:void 0,operateType:void 0,extensionList:void 0}}),this._map.set(Gn.GET_GRP_MSG_EXT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_GRP_MSG_EXT)}),body:{groupID:void 0,topicID:void 0,messageSequence:void 0,startSequence:void 0}}),this._map.set(Gn.MSG_CLOUD_SEARCH,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.MSG_SEARCH,".").concat(Gn.MSG_CLOUD_SEARCH)}),body:{keywordList:void 0,keywordListMatchType:"or",account:void 0,groupID:void 0,count:100,cursor:void 0,messageTypeList:void 0,senderUserIDList:void 0,startTime:void 0,endTime:void 0},keyMap:{req:{keywordListMatchType:"MatchType",account:"PeerAccount",groupID:"GroupID",messageTypeList:"MsgTypeList",senderUserIDList:"SendUserIDList"},res:{GroupID:"groupID",UserID:"userID",Count:"messageCount",LastMsgTime:"lastMessageTime",ConversationMsgs:"searchResult",IsNeedReadReceipt:"needReadReceipt",IsPeerRead:"readReceiptSentByPeer",MsgSeq:"sequence",ReqMsgSeq:"sequence",IsSystemMsg:"isSystemMessage",ToGroupId:"to",EnumFrom_AccountType:"fromAccountType",EnumTo_AccountType:"toAccountType",GroupCode:"groupCode",MsgContent:"content",ClientSeq:"clientSequence",ToTopicId:"topicID",InvisibleMsgSeq:"invisibleSequenceList",ErrorCode:"code",ErrorInfo:"message"}}}),this._map.set(Gn.ADD_C2C_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.ADD_C2C_MSG_REACTION)}),body:{from:void 0,to:void 0,reactionID:void 0,messageKey:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Add_Account"}}}),this._map.set(Gn.RM_C2C_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.RM_C2C_MSG_REACTION)}),body:{from:void 0,to:void 0,reactionID:void 0,messageKey:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Del_Account"}}}),this._map.set(Gn.GET_C2C_MSG_REACTIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_C2C_MSG_REACTIONS)}),body:{from:void 0,to:void 0,messageKeyList:void 0,count:void 0}}),this._map.set(Gn.GET_C2C_MSG_REACTION_USER_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_C2C_MSG_REACTION_USER_LIST)}),body:{from:void 0,to:void 0,reactionID:void 0,messageKey:void 0,count:void 0}}),this._map.set(Gn.ADD_GRP_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.ADD_GRP_MSG_REACTION)}),body:{groupID:void 0,topicID:void 0,reactionID:void 0,messageSequence:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Add_Account"}}}),this._map.set(Gn.RM_GRP_MSG_REACTION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.RM_GRP_MSG_REACTION)}),body:{groupID:void 0,topicID:void 0,reactionID:void 0,messageSequence:void 0,userIDList:void 0},keyMap:{req:{userIDList:"Del_Account"}}}),this._map.set(Gn.GET_GRP_MSG_REACTIONS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_GRP_MSG_REACTIONS)}),body:{groupID:void 0,topicID:void 0,messageSequenceList:void 0,count:void 0},keyMap:{res:{MsgSeq:"messageSequence"}}}),this._map.set(Gn.GET_GRP_MSG_REACTION_USER_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM_MSG_EXT,".").concat(Gn.GET_GRP_MSG_REACTION_USER_LIST)}),body:{groupID:void 0,topicID:void 0,reactionID:void 0,messageSequence:void 0,nextSeq:void 0,count:void 0}}),this._map.set(Gn.GET_C2C_PEER_READ_TIME,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.GET_C2C_PEER_READ_TIME)}),body:{userIDList:void 0},keyMap:{req:{userIDList:"To_Account"},res:{ReadTime:"peerReadTimeList"}}}),this._map.set(Gn.PAGING_GET_CONV_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.PAGING_GET_CONV_LIST)}),body:{fromAccount:void 0,timeStamp:void 0,startIndex:void 0,pinnedTimeStamp:void 0,pinnedStartIndex:void 0,orderType:void 0,messageAssistFlag:15,assistFlag:31},keyMap:{req:{messageAssistFlag:"MsgAssistFlags",assistFlag:"AssistFlags",pinnedTimeStamp:"TopTimeStamp",pinnedStartIndex:"TopStartIndex"},res:{SessionItem:"conversations",ToAccount:"groupID",To_Account:"userID",UnreadMsgCount:"unreadCount",MsgGroupReadedSeq:"messageReadSeq",C2cPeerReadTime:"c2cPeerReadTime",LastMsgFlags:"lastMessageFlag",TopFlags:"isPinned",TopTimeStamp:"pinnedTimeStamp",TopStartIndex:"pinnedStartIndex",GroupId:"convGroupID",C2cRemark:"friendRemark",MsgRecvOption:"messageRemindType",GroupIgnoredUnreadSeqCount:"noUnreadCount",GroupNextMsgSeq:"nextMessageSeq"}}}),this._map.set(Gn.DEL_CONV,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.DEL_CONV)}),body:{fromAccount:"",conversationList:void 0,clearHistoryMessage:void 0},keyMap:{req:{toGroupID:"ToGroupid",clearHistoryMessage:"ClearRamble",conversationList:"ContactItem"},res:{ResultItem:"resultList",ToGroupid:"groupID",ResultCode:"code",ResultInfo:"info"}}}),this._map.set(Gn.CLEAR_HISTORY_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.CLEAR_HISTORY_MSG)}),body:{fromAccount:"",toAccount:void 0,type:1,toGroupID:void 0},keyMap:{req:{toGroupID:"ToGroupid"}}}),this._map.set(Gn.PIN_CONV,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.PIN_CONV)}),body:{fromAccount:"",operationType:1,itemList:void 0},keyMap:{req:{itemList:"RecentContactItem"}}}),this._map.set(Gn.DEL_GROUP_AT_TIPS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.DEL_GROUP_AT_TIPS)}),body:{messageListToDelete:void 0},keyMap:{req:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}}),this._map.set(Gn.SET_CONV_CUSTOM_DATA,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.MARK_CONV)}),body:{fromAccount:"",itemList:void 0},keyMap:{req:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},res:{ToGroupId:"groupID",OptType:"operationType"}}}),this._map.set(Gn.MARK_CONV,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.MARK_CONV)}),body:{fromAccount:"",itemList:void 0},keyMap:{req:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},res:{ToGroupId:"groupID",OptType:"operationType"}}}),this._map.set(Gn.CREATE_CONV_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.CREATE_CONV_GRP)}),body:{fromAccount:"",itemList:void 0},keyMap:{req:{itemList:"GroupContactItem",groupID:"ToGroupId"},res:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType"}}}),this._map.set(Gn.DEL_CONV_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.DEL_CONV_GRP)}),body:{fromAccount:"",groupName:void 0},keyMap:{res:{GroupId:"convGroupID"}}}),this._map.set(Gn.RENAME_CONV_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.RENAME_CONV_GRP)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0},keyMap:{req:{oldName:"OldGroupName",newName:"NewGroupName",groupID:"ToGroupId",operationType:"ContactOptType",groupName:"OldGroupName",updateItem:"ContactUpdateItem"},res:{ContactOptType:"operationType",ToGroupId:"groupID",GroupId:"convGroupID"}}}),this._map.set(Gn.ADD_CONV_TO_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.RENAME_CONV_GRP)}),body:{fromAccount:"",updateType:void 0,updateGroup:{groupName:void 0,updateGroupType:void 0,updateItem:void 0}}}),this._map.set(Gn.DEL_CONV_FROM_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.RENAME_CONV_GRP)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0}}),this._map.set(Gn.GET_CONV_GRP_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.GET_CONV_GRP_LIST)}),body:{fromAccount:"",startIndex:void 0},keyMap:{res:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType",CustomMark:"customData",ContactGroupId:"convGroupIDList"}}}),this._map.set(Gn.SEARCH_CONV_GRP_MARK,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.RECENT_CONTACT,".").concat(Gn.SEARCH_CONV_GRP_MARK)}),body:{fromAccount:"",contactItem:void 0},keyMap:{req:{groupID:"ToGroupId"},res:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType",CustomMark:"customData",ContactGroupId:"convGroupIDList",ContactResultItem:"contactItem"}}}),this._map.set(Gn.GET_USER_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.PROFILE,".").concat(Gn.GET_USER_PROFILE)}),body:{fromAccount:"",userItem:[]},keyMap:{req:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}}),this._map.set(Gn.UPDATE_MY_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.PROFILE,".").concat(Gn.UPDATE_MY_PROFILE)}),body:{fromAccount:"",profileItem:[{tag:Oe.NICK,value:""},{tag:Oe.GENDER,value:""},{tag:Oe.ALLOWTYPE,value:""},{tag:Oe.AVATAR,value:""}]},keyMap:{req:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}}),this._map.set(Gn.GET_BL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_BL)}),body:{fromAccount:"",startIndex:0,maxLimited:30,lastSequence:0},keyMap:{res:{CurruentSequence:"currentSequence"}}}),this._map.set(Gn.ADD_TO_BL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.ADD_TO_BL)}),body:{fromAccount:"",toAccount:[]}}),this._map.set(Gn.RM_FROM_BL,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.RM_FROM_BL)}),body:{fromAccount:"",toAccount:[]}}),this._map.set(Gn.SET_SELF_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.SET_SELF_STATUS)}),body:{customStatus:""}}),this._map.set(Gn.GET_USER_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.GET_USER_STATUS)}),body:{userIDList:void 0},keyMap:{res:{UserStatusList:"successUserList",ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID",Status:"statusType"}}}),this._map.set(Gn.SUB_USER_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.SUB_USER_STATUS)}),body:{userIDList:void 0},keyMap:{res:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}}),this._map.set(Gn.UNSUB_USER_STATUS,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.UNSUB_USER_STATUS)}),body:{userIDList:void 0,unsubscribeAll:void 0},keyMap:{res:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}}),this._map.set(Gn.GET_FD_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_LIST)}),body:{fromAccount:"",startIndex:0,standardSequence:0,customSequence:0},keyMap:{res:{FriendNum:"friendCount",UserDataItem:"resultList",ValueItem:"tagValueList"}}}),this._map.set(Gn.ADD_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.ADD_FD)}),body:{fromAccount:"",addFriendItem:[],type:""},keyMap:{req:{source:"AddSource",wording:"AddWording",type:"AddType"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.UPDATE_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.UPDATE_FD)}),body:{fromAccount:"",updateItem:void 0},keyMap:{req:{snsItem:"SnsItem"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.DEL_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.DEL_FD)}),body:{fromAccount:"",userIDList:[],type:""},keyMap:{req:{type:"DeleteType"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.GET_FD_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_PROFILE)}),body:{fromAccount:"",userIDList:void 0},keyMap:{res:{InfoItem:"resultList",SnsProfileItem:"tagValueList"}}}),this._map.set(Gn.CHECK_FD,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.CHECK_FD)}),body:{fromAccount:"",userIDList:[],type:""},keyMap:{req:{type:"CheckType"},res:{InfoItem:"resultList"}}}),this._map.set(Gn.GET_FD_APPLICATION_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_APPLICATION_LIST)}),body:{fromAccount:"",applicationType:"",startTime:0,maxLimited:0,lastSequence:0},keyMap:{res:{PendencyItem:"resultList",AddSource:"source",AddTime:"time",AddWording:"wording",Image:"avatar",UnreadPendencyCount:"unreadCount",To_Account:"userID",PendencyType:"type"}}}),this._map.set(Gn.RESPOND_FD_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.RESPOND_FD_APPLICATION)}),body:{fromAccount:"",responseFriendItem:[]},keyMap:{req:{tag:"TagName",action:"ResponseAction"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.DEL_FD_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.DEL_FD_APPLICATION)}),body:{fromAccount:"",type:"",userIDList:void 0},keyMap:{req:{type:"PendencyType",userIDList:"To_Account"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.REPORT_FD_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.REPORT_FD_APPLICATION)}),body:{fromAccount:"",latestTimeStamp:""},keyMap:{req:{latestTimeStamp:"LatestPendencyTimeStamp"}}}),this._map.set(Gn.CREATE_FD_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.CREATE_FD_GRP)}),body:{fromAccount:"",groupName:void 0,userIDList:void 0},keyMap:{req:{groupName:"GroupName",userIDList:"To_Account"},res:{ResultItem:"resultList"}}}),this._map.set(Gn.DEL_FD_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.DEL_FD_GRP)}),body:{fromAccount:"",nameList:void 0},keyMap:{req:{nameList:"GroupName"}}}),this._map.set(Gn.GET_FD_GRP_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.GET_FD_GRP_LIST)}),body:{fromAccount:"",lastSequence:0,needFriend:"Need_Friend_Type_Yes"},keyMap:{res:{ResultItem:"resultList",GroupName:"name",FriendNumber:"friendCount",To_Account:"userIDList"}}}),this._map.set(Gn.UPDATE_FD_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FD,".").concat(Gn.UPDATE_FD_GRP)}),body:{fromAccount:"",oldName:"",newName:void 0,updateGroupItem:void 0},keyMap:{req:{oldName:"GroupOldName",newName:"GroupNewName"},res:{UpdateType:"type",ResultItem:"resultList"}}}),this._map.set(Gn.GET_GRP_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_LIST)}),body:{memberAccount:"",limit:void 0,offset:void 0,groupType:void 0,responseFilter:{groupBaseInfoFilter:void 0,selfInfoFilter:void 0},isSupportTopic:0,needAppDefineData:1},keyMap:{req:{memberAccount:"Member_Account"},res:{GroupIdList:"groups",MsgSeq:"readedSequence",LastRecallTime:"_lastRevokedTime",AppDefinedData:"groupCustomField"}}}),this._map.set(Gn.GET_GRP_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_PROFILE)}),body:{groupIDList:void 0,responseFilter:{groupBaseInfoFilter:void 0,groupCustomFieldFilter:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0}},keyMap:{req:{groupIDList:"GroupIdList",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData",groupCustomFieldFilter:"AppDefinedDataFilter_Group",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},res:{GroupIdList:"groups",AppDefinedData:"groupCustomField",AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_Group:"groupCustomFieldFilter",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",InfoSeq:"infoSequence",MemberList:"members",GroupInfo:"groups",ShutUpUntil:"muteUntil",ShutUpAllMember:"muteAllMembers"}}}),this._map.set(Gn.CREATE_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.CREATE_GRP)}),body:{type:void 0,name:void 0,groupID:void 0,ownerID:void 0,introduction:void 0,notification:void 0,maxMemberNum:void 0,joinOption:void 0,memberList:void 0,groupCustomField:void 0,memberCustomField:void 0,webPushFlag:1,avatar:"",isSupportTopic:void 0,inviteOption:void 0},keyMap:{req:{ownerID:"Owner_Account",userID:"Member_Account",avatar:"FaceUrl",maxMemberNum:"MaxMemberCount",joinOption:"ApplyJoinOption",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData",inviteOption:"InviteJoinOption"},res:{HugeGroupFlag:"avChatRoomFlag",OverJoinedGroupLimit_Account:"overLimitUserIDList"}}}),this._map.set(Gn.DISMISS_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DISMISS_GRP)}),body:{groupID:void 0}}),this._map.set(Gn.UPDATE_GRP_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.UPDATE_GRP_PROFILE)}),body:{groupID:void 0,name:void 0,introduction:void 0,notification:void 0,avatar:void 0,joinOption:void 0,groupCustomField:void 0,muteAllMembers:void 0,inviteOption:void 0},keyMap:{req:{groupCustomField:"AppDefinedData",muteAllMembers:"ShutUpAllMember",joinOption:"ApplyJoinOption",avatar:"FaceUrl",inviteOption:"InviteJoinOption"},res:{AppDefinedData:"groupCustomField",ShutUpAllMember:"muteAllMembers"}}}),this._map.set(Gn.APPLY_JOIN_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.APPLY_JOIN_GRP)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1,historyMessageFlag:void 0},keyMap:{req:{applyMessage:"ApplyMsg",historyMessageFlag:"HugeGroupHistoryMsgFlag"},res:{HugeGroupFlag:"avChatRoomFlag",AVChatRoomKey:"avChatRoomKey",RspMsgList:"messageList",ToGroupId:"to"}}}),this._map.set(Gn.APPLY_JOIN_GRP_NOAUTH,(e.a2,e.tinyid,{head:t(t({},h(e,ds)),{},{servcmd:"".concat(P.NAME.BIG_GRP_NO_AUTH,".").concat(Gn.APPLY_JOIN_GRP)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1},keyMap:{req:{applyMessage:"ApplyMsg"},res:{HugeGroupFlag:"avChatRoomFlag"}}})),this._map.set(Gn.QUIT_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.QUIT_GRP)}),body:{groupID:void 0}}),this._map.set(Gn.SEARCH_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SEARCH_GRP)}),body:{groupIDList:void 0,responseFilter:{groupBasePublicInfoFilter:["Type","Name","Introduction","Notification","FaceUrl","CreateTime","Owner_Account","LastInfoTime","LastMsgTime","NextMsgSeq","MemberNum","MaxMemberNum","ApplyJoinOption","InviteJoinOption"]}}}),this._map.set(Gn.CHANGE_GRP_OWNER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.CHANGE_GRP_OWNER)}),body:{groupID:void 0,newOwnerID:void 0},keyMap:{req:{newOwnerID:"NewOwner_Account"}}}),this._map.set(Gn.HANDLE_GRP_APPLICATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.HANDLE_GRP_APPLICATION)}),body:{groupID:void 0,applicant:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{req:{applicant:"Applicant_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}}),this._map.set(Gn.HANDLE_INVITE_JOIN_GRP,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.HANDLE_INVITE_JOIN_GRP)}),body:{groupID:void 0,applicant:void 0,invitee:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,userDefinedField:void 0},keyMap:{req:{applicant:"Applicant_Account",invitee:"Invited_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg"}}}),this._map.set(Gn.HANDLE_GRP_INVITATION,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.HANDLE_GRP_INVITATION)}),body:{groupID:void 0,inviter:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{req:{inviter:"Inviter_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}}),this._map.set(Gn.GET_GRP_PENDENCY,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_PENDENCY)}),body:{startTime:void 0,limit:void 0,handleAccount:void 0},keyMap:{req:{handleAccount:"Handle_Account"},res:{To_Account:"userID",ApplyInviteMsg:"note"}}}),this._map.set(Gn.DEL_GRP_SYSTEM_NOTICE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.DEL_GRP_SYSTEM_NOTICE)}),body:{messageListToDelete:void 0},keyMap:{req:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}}),this._map.set(Gn.AV_POLLING,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.BIG_GRP_POLLING,".").concat(Gn.AV_POLLING)}),body:{USP:1,startSeq:1,startBroadcastSeq:void 0,holdTime:90,key:void 0,simplifiedMessage:void 0},keyMap:{req:{USP:"USP"},res:{ToGroupId:"groupID",RspBroadcastMsgList:"broadcastMessageList",IsSystemMsg:"isSystemMessage"}}}),this._map.set(Gn.AV_NOAUTH_POLLING,(e.a2,e.tinyid,{head:t(t({},h(e,ps)),{},{servcmd:"".concat(P.NAME.BIG_GRP_POLLING_NO_AUTH,".").concat(Gn.AV_POLLING)}),body:{USP:1,startSeq:1,holdTime:90,key:void 0,simplifiedMessage:void 0},keyMap:{req:{USP:"USP"},res:{ToGroupId:"groupID",RspBroadcastMsgList:"broadcastMessageList",IsSystemMsg:"isSystemMessage"}}})),this._map.set(Gn.GET_ONLINE_MBR_NUM,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_ONLINE_MBR_NUM)}),body:{groupID:void 0},keyMap:{res:{OnlineMemberNum:"memberCount"}}}),this._map.set(Gn.SET_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.SET_GRP_ATTR)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{req:{key:"key",value:"value"}}}),this._map.set(Gn.MODIFY_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.MODIFY_GRP_ATTR)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{req:{key:"key",value:"value"}}}),this._map.set(Gn.DEL_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DEL_GRP_ATTR)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{req:{key:"key"}}}),this._map.set(Gn.CLEAR_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.CLEAR_GRP_ATTR)}),body:{groupID:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]}}),this._map.set(Gn.GET_GRP_ATTR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_ATTR,".").concat(Gn.GET_GRP_ATTR)}),body:{groupID:void 0,avChatRoomKey:void 0,groupType:1},keyMap:{req:{avChatRoomKey:"Key",groupType:"GroupType"}}}),this._map.set(Gn.GET_GRP_NOTIFY,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_NOTIFY)}),body:{notifyReqList:[]},keyMap:{req:{notifyReqList:"NotifyReqList"},res:{NextMsgTime:"nextRevokedTime",NotifyMsgList:"notifyList",NotifyRspList:"notifyRspList"}}}),this._map.set(Gn.UPDATE_GRP_COUNTER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.UPDATE_GRP_COUNTER)}),body:{groupID:void 0,counterList:void 0,avChatRoomKey:void 0,mode:void 0},keyMap:{req:{counterList:"GroupCounter"}}}),this._map.set(Gn.GET_GRP_COUNTER,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_COUNTER)}),body:{groupID:void 0,keyList:[],avChatRoomKey:void 0},keyMap:{req:{keyList:"GroupCounterKeys"}}}),this._map.set(Gn.CREATE_TOPIC,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.CREATE_TOPIC)}),body:{groupID:void 0,topicName:void 0,avatar:void 0,customData:void 0,topicID:void 0,notification:void 0,introduction:void 0},keyMap:{req:{avatar:"FaceUrl"}}}),this._map.set(Gn.DEL_TOPIC,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.DEL_TOPIC)}),body:{groupID:void 0,topicIDList:void 0},keyMap:{req:{topicIDList:"TopicIdList"},res:{DestroyResultItem:"resultList"}}}),this._map.set(Gn.UPDATE_TOPIC_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.UPDATE_TOPIC_PROFILE)}),body:{groupID:void 0,topicID:void 0,avatar:void 0,customData:void 0,notification:void 0,introduction:void 0,muteAllMembers:void 0,topicName:void 0},keyMap:{req:{avatar:"FaceUrl",muteAllMembers:"ShutUpAllMember"}}}),this._map.set(Gn.GET_TOPIC_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_COMMUNITY,".").concat(Gn.GET_TOPIC_LIST)}),body:{groupID:void 0,topicIDList:void 0,MemberInfoFilter:["NoUnreadSeqList"]},keyMap:{req:{topicIDList:"TopicIdList"},res:{TopicAndSelfInfo:"topicInfoList",TopicInfo:"topic",GroupID:"groupID",ShutUpTime:"muteTime",ShutUpAllFlag:"muteAllMembers",LastMsgTime:"lastMessageTime",MsgSeq:"readedSequence",LastMsgSeq:"sequence"}}}),this._map.set(Gn.GET_GRP_MBR_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_MBR_LIST)}),body:{groupID:void 0,limit:0,offset:void 0,next:void 0,memberRoleFilter:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0},keyMap:{req:{memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},res:{AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",MemberList:"members",ShutUpUntil:"muteUntil"}}}),this._map.set(Gn.GET_AV_MBR_LIST,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_AV,".").concat(Gn.GET_AV_MBR_LIST)}),body:{groupID:void 0,offset:void 0,filter:void 0},keyMap:{req:{offset:"Timestamp",filter:"Mark"},res:{NextTimestamp:"offset"}}}),this._map.set(Gn.GET_GRP_MBR_PROFILE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.GET_GRP_MBR_PROFILE)}),body:{groupID:void 0,userIDList:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0},keyMap:{req:{userIDList:"Member_List_Account",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},res:{MemberList:"members",ShutUpUntil:"muteUntil",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",AppMemberDefinedData:"memberCustomField"}}}),this._map.set(Gn.ADD_GRP_MBR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.ADD_GRP_MBR)}),body:{groupID:void 0,silence:void 0,userIDList:void 0},keyMap:{req:{userID:"Member_Account",userIDList:"MemberList"},res:{MemberList:"members"}}}),this._map.set(Gn.DEL_GRP_MBR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.DEL_GRP_MBR)}),body:{groupID:void 0,userIDList:void 0,reason:void 0},keyMap:{req:{userIDList:"MemberToDel_Account"}}}),this._map.set(Gn.BAN_AV_MBR,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.BAN_AV_MBR)}),body:{groupID:void 0,userIDList:void 0,duration:void 0,reason:""},keyMap:{req:{userIDList:"Members_Account",duration:"Duration",reason:"Description"}}}),this._map.set(Gn.MODIFY_GRP_MBR_INFO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP,".").concat(Gn.MODIFY_GRP_MBR_INFO)}),body:{groupID:void 0,topicID:void 0,userID:void 0,messageRemindType:void 0,nameCard:void 0,role:void 0,memberCustomField:void 0,muteTime:void 0},keyMap:{req:{userID:"Member_Account",memberCustomField:"AppMemberDefinedData",muteTime:"ShutUpTime",messageRemindType:"MsgFlag"}}}),this._map.set(Gn.MARK_AV_MBR_INFO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.GRP_AV,".").concat(Gn.MARK_AV_MBR_INFO)}),body:{groupID:void 0,operationType:1,memberList:[]},keyMap:{req:{operationType:"CommandType",memberList:"MemberList",markType:"Marks",userID:"Member_Account"},res:{CommandType:"operationType",Marks:"markType",Member_Account:"userID"}}}),this._map.set(Gn.SSO_STAT,{head:t(t({},o),{},{servcmd:"".concat(P.NAME.IM_OPEN_STAT,".").concat(Gn.SSO_STAT)}),body:{header:{},event:[],quality:[]},keyMap:{req:{SDKType:"sdk_type",SDKVersion:"sdk_version",deviceType:"device_type",platform:"platform",instanceID:"instance_id",traceID:"trace_id",SDKAppID:"sdk_app_id",userID:"user_id",tinyID:"tiny_id",extension:"extension",timestamp:"timestamp",networkType:"network_type",eventType:"event_type",code:"error_code",message:"error_message",moreMessage:"more_message",duplicate:"duplicate",costTime:"cost_time",level:"level",qualityType:"quality_type",reportIndex:"report_index",wholePeriod:"whole_period",totalCount:"total_count",rttCount:"success_count_business",successRateOfRequest:"percent_business",countLessThan1Second:"success_count_business",percentOfCountLessThan1Second:"percent_business",countLessThan3Second:"success_count_platform",percentOfCountLessThan3Second:"percent_platform",successCountOfBusiness:"success_count_business",successRateOfBusiness:"percent_business",successCountOfPlatform:"success_count_platform",successRateOfPlatform:"percent_platform",successCountOfMessageReceived:"success_count_business",successRateOfMessageReceived:"percent_business",avgRTT:"average_value",avgDelay:"average_value",avgValue:"average_value",uiPlatform:"ui_platform"}}}),this._map.set(Gn.PING,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.HEARTBEAT,".").concat(Gn.PING)}),body:{}}),this._map.set(Gn.MSG_PUSH,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_PUSH,".").concat(Gn.MSG_PUSH)}),body:{},keyMap:{res:{C2cMsgArray:"C2CMessageArray",GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",C2cNotifyMsgArray:"C2CNotifyMessageArray",C2cMsgInfo:"C2CReadReceiptArray",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyAdd_Account:"userID",ProfileImNick:"nick",PendencyType:"applicationType",C2CReadAllMsg:"readAllC2CMessage",IsNeedReadReceipt:"needReadReceipt",Status:"statusType"}}}),this._map.set(Gn.MULTI_MSG_PUSH,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_PUSH,".").concat(Gn.MULTI_MSG_PUSH)}),body:{},keyMap:{res:{GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyType:"applicationType"}}}),this._map.set(Gn.MSG_PUSH_ACK,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OPEN_IM,".").concat(Gn.MSG_PUSH_ACK)}),body:{sessionData:void 0},keyMap:{req:{sessionData:"SessionData"}}}),this._map.set(Gn.STATUS_FORCE_OFFLINE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.STATUS_FORCE_OFFLINE)}),body:{},keyMap:{res:{C2cNotifyMsgArray:"C2CNotifyMessageArray",NoticeSeq:"noticeSequence",KickoutMsgNotify:"kickoutMsgNotify",NewInstInfo:"newInstanceInfo"}}}),this._map.set(Gn.DOWNLOAD_MERGER_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_LONG_MSG,".").concat(Gn.DOWNLOAD_MERGER_MSG)}),body:{downloadKey:""},keyMap:{res:{Data:"data",Desc:"description",Ext:"extension",Download_Flag:"downloadFlag",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID"}}}),this._map.set(Gn.UPLOAD_MERGER_MSG,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_LONG_MSG,".").concat(Gn.UPLOAD_MERGER_MSG)}),body:{messageList:[]},keyMap:{req:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",type:"MsgType",content:"MsgContent",data:"Data",description:"Desc",extension:"Ext",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody"}}}),this._map.set(Gn.FOLLOW,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.FOLLOW)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"FollowItem"},res:{ResultItem:"resultList",To_Account:"userID"}}}),this._map.set(Gn.UNFOLLOW,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.UNFOLLOW)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"To_Account"},res:{ResultItem:"resultList",To_Account:"userID"}}}),this._map.set(Gn.GET_FOLLOW_INFO,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.GET_FOLLOW_INFO)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"To_Account"},res:{FollowInfo:"followInfoList",To_Account:"userID",FollowerCount:"followersCount",FollowingCount:"followingCount",MutualFollowingCount:"mutualFollowersCount"}}}),this._map.set(Gn.GET_FOLLOW,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.GET_FOLLOW)}),body:{fromAccount:"",type:1,nextCursor:"",count:500},keyMap:{req:{type:"FollowType",nextCursor:"StartCursor",count:"WantNum"},res:{FollowItem:"resultList",To_Account:"userID",ProfileItem:"profileList"}}}),this._map.set(Gn.CHECK_FOLLOW_TYPE,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.FOLLOW,".").concat(Gn.CHECK_FOLLOW_TYPE)}),body:{fromAccount:"",userIDList:[]},keyMap:{req:{userIDList:"To_Account"},res:{ResultItem:"resultList",To_Account:"userID"}}}),this._map.set(Gn.SET_TOKEN,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.SET_TOKEN)}),body:{tokenID:"",pushMsg:0,sdkAppID:0,businessID:"",deviceBrand:"",deviceToken:"",isTpns:0,isWebUniapp:0,notificationStatus:0,deviceModel:"",systemVersion:"",pushVersion:""},keyMap:{req:{tokenID:"TokenID",pushMsg:"PushMsg",sdkAppID:"EnterVersion",businessID:"BusiID",deviceBrand:"InstType",deviceToken:"VarToken",isTpns:"IsTpns",notificationStatus:"NotificationStatus",deviceModel:"DeviceModel",systemVersion:"SystemVersion",pushVersion:"PushPluginVersion"}}}),this._map.set(Gn.STAT_FOREGROUND,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.STAT_FOREGROUND)}),body:{isWebUniapp:0}}),this._map.set(Gn.STAT_BACKGROUND,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_OPEN_STATUS,".").concat(Gn.STAT_BACKGROUND)}),body:{C2CUnread:0,GroupUnread:0,isWebUniapp:0},keyMap:{req:{c2cUnreadCount:"C2cUnread",groupUnreadCount:"GrpUnread"}}}),this._map.set(Gn.PUSH_REPORT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.OFFLINE_PUSH_REPORT,".").concat(Gn.PUSH_REPORT)}),body:{eventList:[]},keyMap:{req:{eventList:"UinappPushEvents",type:"EventType",time:"EventTime",pushId:"ClickExt"}}}),this._map.set(Gn.SET_ALL_RECEIVE_MSG_OPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_MSG_LOGIC,".").concat(Gn.SET_ALL_RECEIVE_MSG_OPT)}),body:{startTime:0,endTime:0,isRepeated:0,messageRemindType:0},keyMap:{req:{messageRemindType:"Level"}}}),this._map.set(Gn.GET_ALL_RECEIVE_MSG_OPT,{head:t(t({},e),{},{servcmd:"".concat(P.NAME.IM_MSG_LOGIC,".").concat(Gn.GET_ALL_RECEIVE_MSG_OPT)}),body:{toAccount:void 0}})}},{key:"has",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){return this._map.get(e)}},{key:"update",value:function(){this._fillMap()}},{key:"getKeyMap",value:function(e){return this.has(e)?this.get(e).keyMap||{}:(Ae.w("".concat(this._n,".getKeyMap unknown P:").concat(e)),{})}},{key:"getProtocolData",value:function(e){var t=e.P,n=e.data;if(e=this.get(t),t=null,n){var o,i=this._simpleDeepCopy(e),a=(i=this._updateService(n,i)).body,s=Object.create(null);for(o in a)if(Object.prototype.hasOwnProperty.call(a,o)){if(s[o]=a[o],void 0===n[o])continue;s[o]=n[o]}i.body=s,t=this._getUplinkData(i)}else t=this._getUplinkData(e);return t}},{key:"_getUplinkData",value:function(e){var t=Ot((e=this._dataCleaner(e)).head);return t=Ja(e.body,this._getReqKeyMap(t)),e.body=t,e}},{key:"_updateService",value:function(e,t){var n,o,i=Ot(t.head);return this._isFromGroupRequest(t)&&(n=e.type,o=e.groupID,e=void 0===(e=e.groupIDList)?[]:e,ut(o=void 0===o?void 0:o)&&(o=e[0]||""),It({type:n,groupID:o}))&&(t.head.servcmd="".concat(P.NAME.GRP_COMMUNITY,".").concat(i)),t}},{key:"_isFromGroupRequest",value:function(e){return e.head.servcmd.includes(P.NAME.GRP)||e.head.servcmd.includes(P.NAME.GRP_ATTR)}},{key:"_getReqKeyMap",value:function(e){return e=this.getKeyMap(e),t(t({},Ba.req),e.req)}},{key:"_dataCleaner",value:function(e){var t,o=Array.isArray(e)?[]:Object.create(null);for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&Je(t)&&null!==e[t]&&void 0!==e[t]&&("object"!==n(e[t])?o[t]=e[t]:o[t]=this._dataCleaner.bind(this)(e[t]));return o}},{key:"_simpleDeepCopy",value:function(e){for(var t,n=Object.keys(e),o={},i=0,a=n.length;i<a;i++)We(e[t=n[i]])?o[t]=Array.from(e[t]):$e(e[t])?o[t]=this._simpleDeepCopy(e[t]):o[t]=e[t];return o}}]),Cs),fs=[Gn.MSG_PUSH_ACK],gs=(a(Ms,[{key:"_onC2CMsgArray",value:function(e){var t=this._sessionM.get(6);e.dataList.forEach((function(e){var t;1===e.isSyncMessage&&(t=e.from,e.from=e.to,e.to=t)})),1===e.needSync&&this._sessionM.get(19).syncOnNeed(),t.onNewMessage({dataList:e.dataList,isInstantMessage:!0})}},{key:"_onC2CMsgModified",value:function(e){this._sessionM.get(6).onMsgModified(e)}},{key:"_onGroupMsgArray",value:function(e){var t=this._sessionM.get(7);t&&t.onNewMessage({event:e.event,dataList:e.dataList,isInstantMessage:!0})}},{key:"_onGroupMsgModified",value:function(e){var t=this._sessionM.get(7);t&&t.onMsgModified(e)}},{key:"_onGroupTips",value:function(e){var t=this._sessionM.get(7);if(t){var n=e.event,o=e.dataList,i=e.isInstantMessage,a=void 0===i||i,s=e.isSyncingEnded;switch(n){case 4:case 6:t.onNewGroupTips({event:n,dataList:o});break;case 5:for(var r=0;r<o.length;r++)if(We(o[r].elements.revokedInfos))t.onMsgRevoked({dataList:o});else if(We(o[r].elements.groupMessageReadNotice))t.onMsgReadNotice({dataList:o});else{if(!We(o[r].elements.readReceiptList)){t.onNewGroupSystemNotice({dataList:o,isInstantMessage:a,isSyncingEnded:s});break}t.onReadReceiptList({dataList:o})}break;case 12:this._sessionM.get(11).onNewGroupAtTips({dataList:o});break;default:Ae.l("".concat(this._n,"._onGroupTips unknown event:").concat(n," dataList:"),o)}}}},{key:"_onC2CNotifyMsgArray",value:function(e){var t,n=this,o=e.dataList;We(o)&&(t=this._sessionM.get(6),o.forEach((function(e){var i,a;ze(e)&&(e.hasOwnProperty("kickoutMsgNotify")?(i=(a=e.kickoutMsgNotify).kickType,a=void 0===(a=a.newInstanceInfo)?{}:a,1===i?n._sessionM.onMultipleAccountKickedOut(a):2===i?n._sessionM.onMultipleDeviceKickedOut(a):3===i&&n._sessionM.onRestApiKickedOut(a)):e.hasOwnProperty("c2cMessageRevokedNotify")?t&&t.onMsgRevoked({dataList:o}):e.hasOwnProperty("c2cMessageReadReceipt")?t&&t.onMsgReadReceipt({dataList:o}):e.hasOwnProperty("c2cMessageReadNotice")?t&&t.onMsgReadNotice({dataList:o}):e.hasOwnProperty("muteNotificationsSync")&&n._sessionM.get(11).onC2CMsgRemindTypeSynced({dataList:o}))})))}},{key:"_onC2CReadReceiptArray",value:function(e){this._sessionM.get(6).onReadReceiptList(e)}},{key:"_onProfileModified",value:function(e){this._sessionM.get(4).onProfileModified({dataList:e.dataList});var t=this._sessionM.get(8);t&&t.onFriendProfileModified({dataList:e.dataList})}},{key:"_onRelationChainModified",value:function(e){this._sessionM.get(4).onRelationChainModified({dataList:e.dataList});var t=this._sessionM.get(8);t&&t.onRelationChainModified({dataList:e.dataList})}},{key:"_onRecentContact",value:function(e){var t;We(e=e.dataList)&&(t=this._sessionM.get(11))&&e.forEach((function(e){var n,o,i=e.pushType;1===i?(n=e.recentContactDeleteItem,t.onConvDeleted(n.recentContactList)):2===i?(n=e.recentContactTopItem,t.onConvPinnedStatus(n.recentContactList,!0)):3===i?(n=e.recentContactTopItem,t.onConvPinnedStatus(n.recentContactList,!1)):4===i?(n=e.recentContactMarkContact,t.onConvMarkUpdated(n.recentContactMarkContactItem)):5===i?(n=e.recentContactCreateContactGroup,t.onConvGroupCreated(n.msgContactGroupContactItem)):6===i?(n=e.recentContactDelContactGroup,t.onConvGroupDeleted(n.msgGroupItem)):7===i&&(i=(n=e.recentContactUpdateContactGroup).updateType,e=n.msgUpdateGroup,n=n.msgUpdateContact,1===i?1===(o=e.updateGroupType)?t.onConvGroupNameUpdated(e):2===o&&t.onConvInGroupUpdated(e):2===i&&t.onConvAddedToOrDeletedFromGroup(n))}))}},{key:"_onAllMsgRead",value:function(e){e=e.dataList;var t=this._sessionM.get(11);t&&t.onPushedAllMessageRead(e)}},{key:"_onUserStatusList",value:function(e){this._sessionM.get(4).onUserStatusUpdated(e)}},{key:"_onMsgExtNotify",value:function(e){this._sessionM.get(3).onMsgExtNotify(e)}},{key:"_onMsgReactionNotifyList",value:function(e){this._sessionM.get(34).onReactionNotifyList(e)}},{key:"_onMsgReactionNotify",value:function(e){this._sessionM.get(34).onReactionNotify(e)}},{key:"_onFollowNotify",value:function(e){this._sessionM.get(35).onFollowNotify(e)}},{key:"_onTopicLatestMsg",value:function(e){this._sessionM.get(10).onTopicLatestMsg(e)}},{key:"onMessage",value:function(e){var t=this,n=e.body;if(this._filterMsgFromIMOpenPush(e)){var o,i=n.eventArray,a=n.isInstantMessage,s=n.isSyncingEnded,r=n.needSync;if(We(i))for(var c,u,l,d=0,p=i.length;d<p;d++)100!==(l=(c=i[d]).event)?24!==l?26!==l?(o=Object.keys(c).find((function(e){return-1!==t._keys.indexOf(e)})))?(u=14===l?{readAllC2CMessage:c[o],groupMessageReadInfoList:c.groupMessageReadNotice||[]}:16===l?{userID:c.userID,timestamp:c.timestamp,readReceiptList:c[o]}:c[o],this._eventHandlerMap.get(o)({event:l,dataList:u,isInstantMessage:a,isSyncingEnded:s,needSync:r})):Ae.l("".concat(this._n,".onMessage unknown eventItem:"),c):this._onTopicLatestMsg(c):this._onAllRcvMsgOptNotify(c):this._onRoomCustomData(c.content)}}},{key:"_onRoomCustomData",value:function(e){this._sessionM.get(30).onRoomCustomDataReceived(e),Ae.l("".concat(this._n,"._onRoomCustomData data:").concat(e))}},{key:"_onAllRcvMsgOptNotify",value:function(e){this._sessionM.get(11).onAllRcvMsgOptNotify(e)}},{key:"_filterMsgFromIMOpenPush",value:function(e){var t=e.head,n=(e=e.body,t=t.servcmd,!1);return!(n=ut(t)?n:t.includes(P.NAME.IM_CONFIG_MANAGER)||t.includes(P.NAME.OVERLOAD_PUSH)||t.includes(P.NAME.STAT_SERVICE))||(t.includes(Gn.PUSHED_CLOUD_CTRL_CONFIG)?this._sessionM.get(23).onPushedConfig(e):t.includes(Gn.PUSHED_COMMERCIAL_CONFIG)?this._sessionM.get(27).onPushedConfig(e):t.includes(Gn.OVERLOAD_NOTIFY)?this._sessionM.onPushedServerOverload(e):t.includes(Gn.KICK_OTHER)&&(n=Date.now(),this._sessionM.reLoginOnKickOther(),e=new Jn("kickOther"),n-=t=this._sessionM.get(1).getLastWsHelloTs(),e.setMessage("last wshello time:".concat(t," diff:").concat(n,"ms")).end()),!1)}}]),Ms),_s=[{cmd:Gn.GET_GRP_PROFILE,interval:1,count:8},{cmd:Gn.UPDATE_GRP_PROFILE,interval:1,count:8},{cmd:Gn.GET_AV_MBR_LIST,interval:3,count:1},{cmd:Gn.GET_GRP_PENDENCY,interval:1,count:15},{cmd:Gn.GET_TOPIC_LIST,interval:1,count:10},{cmd:Gn.SET_GRP_ATTR,interval:5,count:10},{cmd:Gn.MODIFY_GRP_ATTR,interval:5,count:10},{cmd:Gn.DEL_GRP_ATTR,interval:5,count:10},{cmd:Gn.CLEAR_GRP_ATTR,interval:5,count:10},{cmd:Gn.GET_GRP_ATTR,interval:5,count:20},{cmd:Gn.UPDATE_GRP_COUNTER,interval:5,count:20},{cmd:Gn.GET_GRP_COUNTER,interval:5,count:20},{cmd:Gn.SET_ALL_MSG_READ,interval:1,count:1},{cmd:Gn.GET_USER_STATUS,interval:5,count:20},{cmd:Gn.SUB_USER_STATUS,interval:5,count:20},{cmd:Gn.UNSUB_USER_STATUS,interval:5,count:20},{cmd:Gn.MSG_CLOUD_SEARCH,interval:1,count:2},{cmd:Gn.CHECK_FOLLOW_TYPE,interval:5,count:20},{cmd:Gn.GET_GRP_ROAMING_MSG,interval:1,count:20},{cmd:Gn.GET_C2C_ROAMING_MSG,interval:1,count:20}],ms=new Map,vs=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],ys=0,Is=vs.length;ys<Is;ys++)ms.set(ys,vs[ys]);function Ms(e){o(this,Ms),this._sessionM=e,this._n="MsgDispatcher",this._eventHandlerMap=new Map,this._eventHandlerMap.set("C2CMessageArray",this._onC2CMsgArray.bind(this)),this._eventHandlerMap.set("groupMessageArray",this._onGroupMsgArray.bind(this)),this._eventHandlerMap.set("groupTips",this._onGroupTips.bind(this)),this._eventHandlerMap.set("C2CNotifyMessageArray",this._onC2CNotifyMsgArray.bind(this)),this._eventHandlerMap.set("C2CReadReceiptArray",this._onC2CReadReceiptArray.bind(this)),this._eventHandlerMap.set("profileModify",this._onProfileModified.bind(this)),this._eventHandlerMap.set("friendListMod",this._onRelationChainModified.bind(this)),this._eventHandlerMap.set("recentContactMod",this._onRecentContact.bind(this)),this._eventHandlerMap.set("readAllC2CMessage",this._onAllMsgRead.bind(this)),this._eventHandlerMap.set("c2cMessageModified",this._onC2CMsgModified.bind(this)),this._eventHandlerMap.set("groupMessageModified",this._onGroupMsgModified.bind(this)),this._eventHandlerMap.set("userStatusList",this._onUserStatusList.bind(this)),this._eventHandlerMap.set("messageExtensionNotify",this._onMsgExtNotify.bind(this)),this._eventHandlerMap.set("messageReactionNotifyList",this._onMsgReactionNotifyList.bind(this)),this._eventHandlerMap.set("messageReactionNotify",this._onMsgReactionNotify.bind(this)),this._eventHandlerMap.set("followChangeList",this._onFollowNotify.bind(this)),this._keys=m(this._eventHandlerMap.keys())}function Cs(e){o(this,Cs),this._n="PHandler",this._sessionM=e,this._map=new Map,this._fillMap()}function Ts(e){return o(this,Ts),(e=Za.call(this,e))._n="ChannelModule",e._socketHandler=new cs(f(e)),e._probing=!1,e._isAppShowing=!0,e._previousState=E.NET_STATE_CONNECTED,e._timerForNotLoggedIn=-1,e._timerForNotLoggedIn=setInterval(e.onCheckTimer.bind(f(e)),1e3),e._fatalErrorFlag=!1,e._disconnectedTS=0,e._lastDiagnoseTS=0,e}function Ss(e){o(this,Ss),this._chM=e,this._n="SocketHandler",this._promiseMap=new Map,this._readyState=rs,this._simpleRequestMap=new Map,this.MAX_SIZE=100,this._startSequence=nt(),this._startTs=0,this._reConnectFlag=!1,this._nextPingTs=0,this._reConnectCount=0,this.MAX_RECONNECT_COUNT=3,this._socketID=-1,this._random=0,this._socket=null,this._url="",this._onOpenTs=0,this._canIUseBinaryFrame=!0,this._isWorkerEnabled=!0,this._currentSite=w,this._setWebsocketHost(),this._initConnection()}function Es(e){o(this,Es);var t,n,i=(this._handler=e).getURL();this._socket=null,this._workerSocket=null,this._id=nt(),this._handler.getIsWorkerEnabled()?(t=URL.createObjectURL(new Blob([';let _socket = null;onmessage = function(event) { if (event.data.cmd === "start") { const url = event.data.url; _socket = new WebSocket(url); _socket.binaryType = "arraybuffer"; _socket.onopen = function() { postMessage({ callback: "onOpen", extensions: _socket.extensions }); }; _socket.onclose = function(e) { postMessage({ callback: "onOpen", e: { code: e.code, reason: e.reason } }); }; _socket.onmessage = function(e) { postMessage({ callback: "onMessage", data: e.data }); }; _socket.onerror = function(e) { postMessage({ callback: "onError", e: { isTrusted: "true" } }); }; } else if (event.data.cmd === "sendMessage") { if (_socket !== null) { _socket.send(event.data.data); } } else if (event.data.cmd === "stop") { if (_socket !== null) { _socket.close(event.data.code); _socket = null; } }};'],{type:"application/javascript; charset=utf-8"})),this._workerSocket=new Worker(t),(n=this)._workerSocket.onmessage=function(e){var t=(i=e.data).callback,o=i.e,i=i.extensions;"onOpen"===t?n._onOpen(i):"onClose"===t?n._onClose(o):"onError"===t?n._onError(o):"onMessage"===t&&n._onMessage(e.data)},this._workerSocket.postMessage({cmd:"start",id:this._id,url:i})):Z?z?(ne.connectSocket({url:i,header:{"content-type":"application/json"}}),ne.onSocketClose(this._onClose.bind(this)),ne.onSocketOpen(this._onOpen.bind(this)),ne.onSocketMessage(this._onMessage.bind(this)),ne.onSocketError(this._onError.bind(this))):(this._socket=ne.connectSocket({url:i,header:{"content-type":"application/json"},complete:function(){}}),this._socket.onClose(this._onClose.bind(this)),this._socket.onOpen(this._onOpen.bind(this)),this._socket.onMessage(this._onMessage.bind(this)),this._socket.onError(this._onError.bind(this))):(this._socket=new WebSocket(i),this._socket.binaryType="arraybuffer",this._socket.onopen=this._onOpen.bind(this,this._socket.extensions),this._socket.onmessage=this._onMessage.bind(this),this._socket.onclose=this._onClose.bind(this),this._socket.onerror=this._onError.bind(this)),this._canIUseBinaryFrame=e.canIUseBinaryFrame()}function Ds(e){for(var t,n,o=e,i="",a=0,s=(o=e.length%8!=0?"0".repeat(8-e.length%8)+e:o).length;a<s;a+=8)t=parseInt(o.slice(a,a+4),2),n=parseInt(o.slice(a+4,a+8),2),i+=ms.get(t)+ms.get(n);return i}function ks(e){var t;return e<0||53<e?NaN:(t=0|1073741824*Math.random(),30<e?t+1073741824*(0|Math.random()*(1<<e-30)):t>>>30-e)}function Ls(e,t){for(var n=e.toString(16),o=t-n.length,i="0";0<o;o>>>=1,i+=i)1&o&&(n=i+n);return n}r($r,bn),Fs=g($r),a($r,[{key:"_init",value:function(){this._updateCmdFreqLimitMap(_s)}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("cmd_frequency_limit");ut(e)||(e=JSON.parse(e),this._updateCmdFreqLimitMap(e))}},{key:"_updateCmdFreqLimitMap",value:function(e){var t=this;e.forEach((function(e){t._cmdFreqLimitMap.set(e.cmd,{interval:e.interval,count:e.count})}))}},{key:"updateProtocolConfig",value:function(){this._pHandler.update()}},{key:"req",value:function(e){Ae.d("".concat(this._n,".req options:"),e);var t,n,o=e.P;return this._pHandler.has(o)?(t=(e=this.getProtocolData(e)).head.servcmd,this._isFreqOverLimit(t)?yn({code:n=Pn.OVER_FREQUENCY_LIMIT,message:this.getErrMsg(n,this._getCmd(t))}):this._isServerOverload(t)?yn({code:n=Pn.OPEN_SERVICE_OVERLOAD_ERROR,message:this.getErrMsg(n,this._getCmd(t))}):(n=this.get(21),fs.includes(o)?n.simplySend(e):n.send(e))):(Ae.w("".concat(this._n,".req unknown P:").concat(o)),yn({code:Pn.NO_PROTOCOL}))}},{key:"getKeyMap",value:function(e){return this._pHandler.getKeyMap(e)}},{key:"genCommonHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:O,websdkversion:R,a2:e.getA2Key()||void 0,tinyid:e.getTinyID()||void 0,status_instid:e.getStatusInstanceID(),sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getA2Key()?void 0:e.getUserID(),usersig:e.getA2Key()?void 0:e.getUserSig(),sdkability:12775283,sdkability_ext:Ds(""),cappid:e.getApplicationID()}}},{key:"genCosSpecifiedHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:O,websdkversion:R,sdkappid:e.getSDKAppID(),contenttype:e.getContentType(),reqtime:0,identifier:e.getUserID(),usersig:e.getUserSig(),status_instid:e.getStatusInstanceID(),sdkability:12775283,sdkability_ext:Ds(""),cappid:e.getApplicationID()}}},{key:"genSSOReportHead",value:function(){var e=this.get(12);return{ver:"v4",platform:this._platform,websdkappid:O,websdkversion:R,sdkappid:e.getSDKAppID(),contenttype:"",reqtime:0,identifier:"",usersig:"",status_instid:e.getStatusInstanceID(),sdkability:12775283,sdkability_ext:Ds(""),cappid:e.getApplicationID()}}},{key:"getProtocolData",value:function(e){return this._pHandler.getProtocolData(e)}},{key:"trans",value:function(e){var n=e.servcmd;return e=e.data,n={head:t(t({},this.genCommonHead()),{},{servcmd:n}),body:e},this.get(21).send(n)}},{key:"sendComboMessage",value:function(e){var n=e.servcmd;return e=e.data,n={head:t(t({},this.genCommonHead()),{},{servcmd:n}),body:e},this.get(21).send(n)}},{key:"onErrorCodeNotZero",value:function(e){var t,n=e.errorCode;n===Pn.HELLO_ANSWER_KICKED_OUT&&(t=e.kickType,e=void 0===(e=e.newInstanceInfo)?{}:e,1===t?this.onMultipleAccountKickedOut(e):2===t?this.onMultipleDeviceKickedOut(e):3===t&&this.onRestApiKickedOut(e)),n!==Pn.MSG_A2KEY_EXPIRED&&n!==Pn.ACCOUNT_A2KEY_EXPIRED||(this._onUserSigExpired(),this.get(21).reConnect())}},{key:"onMessage",value:function(e){var t=(n=e.body).needAck,n=n.sessionData;1===(void 0===t?0:t)&&this._sendACK(n),this._msgDispatcher.onMessage(e)}},{key:"onReconnected",value:function(e){this._incrementalPullContactFlag=e<=300,this._reLoginOnReconnected()}},{key:"reLoginOnKickOther",value:function(){Ae.l("".concat(this._n,".reLoginOnKickOther")),this._reLogin()}},{key:"_reLoginOnReconnected",value:function(){Ae.l("".concat(this._n,"._reLoginOnReconnected")),this._reLogin()}},{key:"_reLogin",value:function(){var e,t,n,o=this,i="".concat(this._n,"._reLogin");this.isLoggedIn()&&(e=0,(t=this.get(1).getPushModule())&&(e=t.getUniAppPlatform()),n=new Jn("reLogin"),this.req({P:Gn.LOGIN,data:{isWebUniapp:e,customInfo:this.get(12).getCustomLoginInfo()}}).then((function(e){var t=(e=e.data).instanceID,a=(e=e.customStatus,o.get(12)),s=Ko(e),r=(a.setStatusInstanceID(t),o.get(21)),c=r.getSocketID();c="socketID:".concat(c," instanceID:").concat(t," customStatus:").concat(s),n.setMessage(c).end(!0),Ae.l("".concat(i," ok. ").concat(c)),a.getCustomStatus()!==s&&o.get(4).onUserStatusUpdated({dataList:[{to:o.getMyUserID(),statusType:E.USER_STATUS_ONLINE,customStatus:e}]}),r.diagnose(),o.get(11).syncConvList(o._incrementalPullContactFlag).then((function(){Ae.l("".concat(i,", sync conv list ok.")),o.get(25).start()})),((t=o.get(7))&&t.updateLocalMainSequenceOnReconnected(),c=o.get(10)).resetGetTopicTime(),c.getTopicListOnReconnected(),(a=o.get(35))&&a.clearCacheOnReconnected()})))}},{key:"onMultipleAccountKickedOut",value:function(e){this.get(1).onMultipleAccountKickedOut(e)}},{key:"onMultipleDeviceKickedOut",value:function(e){this.get(1).onMultipleDeviceKickedOut(e)}},{key:"_onUserSigExpired",value:function(){this.get(1).onUserSigExpired()}},{key:"onRestApiKickedOut",value:function(e){this.get(1).onRestApiKickedOut(e)}},{key:"_sendACK",value:function(e){this.req({P:Gn.MSG_PUSH_ACK,data:{sessionData:e}})}},{key:"_isFreqOverLimit",value:function(e){var t,n,o,i;return e=e.split(".")[1],!!this._cmdFreqLimitMap.has(e)&&(!this._cmdReqInfoMap.has(e)||(t=(n=this._cmdFreqLimitMap.get(e)).count,n=n.interval,o=(i=this._cmdReqInfoMap.get(e)).startTime,i=i.requestCount,Date.now()-o>1e3*n)?(this._cmdReqInfoMap.set(e,{startTime:Date.now(),requestCount:1}),!1):(this._cmdReqInfoMap.set(e,{startTime:o,requestCount:i+=1}),t<i))}},{key:"_isServerOverload",value:function(e){var t,n;return!!this._serverOverloadInfoMap.has(e)&&(t=(n=this._serverOverloadInfoMap.get(e)).overloadTime,n=n.waitingTime,Date.now()-t<=1e3*n||(this._serverOverloadInfoMap.delete(e),!1))}},{key:"_getCmd",value:function(e){var t="";if(e.includes(".")){var n,o=e.split(".")[1];for(n in Gn)if(Gn[n]===o){t=n;break}}return t}},{key:"onPushedServerOverload",value:function(e){var t=e.overloadCommand;e=e.waitingTime,this._serverOverloadInfoMap.set(t,{overloadTime:Date.now(),waitingTime:e}),Ae.w("".concat(this._n,".onPushedServerOverload waitingTime:").concat(e,"s cmd:").concat(this._getCmd(t)))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._updateCmdFreqLimitMap(_s),this._cmdReqInfoMap.clear(),this._serverOverloadInfoMap.clear(),this._incrementalPullContactFlag=!0}}]);var bs,As,Rs,Os,ws,Ps,Ns,Gs,Us,xs,Fs,qs=$r,Vs=(r(Kr,bn),xs=g(Kr),a(Kr,[{key:"getCloudConfig",value:function(e){return ut(e)?this._cloudConfig:this._cloudConfig.has(e)?this._cloudConfig.get(e):void 0}},{key:"getServerConfig",value:function(e){var t={code:0,data:""};return!ut(e)&&this._cloudConfig.has(e)&&(t.data=this._cloudConfig.get(e)),Promise.resolve(t)}},{key:"_canFetch",value:function(){return this.isLoggedIn()&&!this._isFetching&&Date.now()>=this._expiredTime}},{key:"fetchConfig",value:function(){var e,t=this,n="".concat(this._n,".fetchConfig"),o=this._canFetch();Ae.l("".concat(n," canFetch:").concat(o)),o&&(e=new Jn("fetchCloudCtrlConfig"),o=this.get(12).getSDKAppID(),this._isFetching=!0,this.req({P:Gn.FETCH_CLOUD_CTRL_CONFIG,data:{SDKAppID:o,version:this._version}}).then((function(o){t._isFetching=!1;var i=(a=o.data).version,a=a.cloudControlConfig;e.setMessage("version:".concat(t._version," newVersion:").concat(i," config:").concat(a)).end(),Ae.l("".concat(n," ok")),t._parse(o.data)})).catch((function(o){t._isFetching=!1,e.setError(o).end(),Ae.l("".concat(n," failed. error:"),o),t._setExpiredTime(12e4)})))}},{key:"onPushedConfig",value:function(e){Ae.l("".concat(this._n,".onPushedConfig config:"),e),new Jn("pushedCloudCtrlConfig").setMessage("newVersion:".concat(e.version," config:").concat(e.cloudControlConfig)).end(),this._parse(e)}},{key:"onCheckTimer",value:function(e){this._canFetch()&&this.fetchConfig()}},{key:"_parse",value:function(e){var t=this,n="".concat(this._n,"._parse"),o=e.errorCode,i=e.errorMessage,a=e.cloudControlConfig,s=e.version,r=e.expiredTime;if(0===o){if(this._version!==s){var c=null;try{c=JSON.parse(a)}catch(u){this.isPrivateNetWork()||Ae.e("".concat(n," failed. config:"),a)}c&&(this._cloudConfig.clear(),Object.keys(c).forEach((function(e){t._cloudConfig.set(e,c[e])})),this._version=s,this.emitIEvt(xo.CLOUD_CONFIG))}this._setExpiredTime(1e3*r)}else ut(o)?(Ae.l("".concat(n," failed. Invalid message format:"),e),this._setExpiredTime(36e5)):(Ae.e("".concat(n," errorCode:").concat(o," errorMessage:").concat(i)),this._setExpiredTime(12e4))}},{key:"_setExpiredTime",value:function(e){this._expiredTime=Date.now()+e}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._cloudConfig.clear(),this._expiredTime=0,this._version=0,this._isFetching=!1}}]),Kr),Bs=(r(jr,bn),Us=g(jr),a(jr,[{key:"start",value:function(){this._recoverGroupChat(),this._recoverC2CChat()}},{key:"_recoverGroupChat",value:function(){var e,t,n,o,i=this,a=this._getLocalConvList().filter((function(e){return e.type===E.CONV_GROUP&&e.groupProfile.type!==E.GRP_AVCHATROOM})),s=this.get(11),r=[];a.forEach((function(a){var c=a.conversationID;a=a.lastMessage,e=c.replace(E.CONV_GROUP,""),t=s.getLocalLastMessage(c),a&&0!==a.lastSequence&&t&&(n=a.lastSequence,t=t.sequence,o=n-t,0<t)&&1<=o&&o<300?i._recoverGroupMsg({groupID:e,localLastMessageSequence:t,remoteLastMessageSequence:n}):r.push(e)})),this._getGroupNotice(r)}},{key:"_recoverC2CChat",value:function(){var e,t,n,o=this,i=this._getLocalConvList().filter((function(e){return e.type===E.CONV_C2C})),a=this.get(11),s=[Promise.resolve()];i.forEach((function(i){var r=i.conversationID;i=i.lastMessage,e=a.getLocalLastMessage(r),i&&0!==i.lastTime&&e&&(t=i.lastTime,e=e.time,n=t-e,0<e)&&1<=n&&n<=600&&s.push(o._recoverC2CMsg({conversationID:r,localLastMessageTime:e,remoteLastMessageTime:t}))})),Promise.all(s).then((function(){Ae.l("".concat(o._n,"._recoverC2CChat all done")),o.get(19).syncOnReconnected()}))}},{key:"_getLocalConvList",value:function(){return this.get(11).getLocalConvList()}},{key:"_recoverGroupMsg",value:function(e){var t=this,n="".concat(this._n,".").concat("_recoverGroupMsg"),o=(Ae.l("".concat(n," options:"),e),e.groupID),i=e.localLastMessageSequence,a=e.remoteLastMessageSequence,s=JSON.stringify(e),r=new Jn("_recoverGroupMsg");r.setMessage(s),this._getGroupRoamingMsg({groupID:o,sequence:i}).then((function(e){var c=(e=e.data).complete,u=e.messageList;if(!ut(u)){e=u[0].sequence;var l=u.map((function(e){return e.sequence})),d=(l="".concat(s," complete:").concat(c," sequenceList:").concat(l),Ae.l("".concat(n," ").concat(l)),e!==i&&e<a&&2!==c&&t._recoverGroupMsg({groupID:o,localLastMessageSequence:e,remoteLastMessageSequence:a}),r.setMessage(l).end(),t.get(7));1<u.length&&u.sort((function(e,t){return e.sequence-t.sequence}));for(var p=!1,h=0,f=u.length;h<f;h++)if(u[h].from===E.CONV_SYSTEM){p=!0;break}if(p)for(var g=0,_=u.length;g<_;g++){var m=u[g];m.from!==E.CONV_SYSTEM?d.onNewMessage({dataList:[m],isInstantMessage:!1,updateUnreadCount:!1}):d.onNewGroupTips({event:m.event,dataList:[m]})}else d.onNewMessage({dataList:u,isInstantMessage:!1,updateUnreadCount:!1})}})).catch((function(e){r.setError(e).end(),Ae.w("".concat(n," failed. error:"),e)}))}},{key:"_getGroupNotice",value:function(e){var t=e.length;if(Ae.l("".concat(this._n,"._getGroupNotice length:").concat(t)),0!==t){var n=this.get(7);if(t<=10)n.getNotice(e);else{var o=Math.floor(t/10);5<=o&&(o=5);for(var i=0;i<=o;i++)n.getNotice(e.slice(10*i,10*(i+1)))}}}},{key:"_getGroupRoamingMsg",value:function(e){var t=e.groupID;return e=e.sequence,this.req({P:Gn.GET_GRP_ROAMING_MSG,data:{groupID:t,count:this.PULL_LIMIT_COUNT,sequence:e+this.PULL_LIMIT_COUNT-1}})}},{key:"_recoverC2CMsg",value:function(e){var t=this,n="".concat(this._n,".").concat("_recoverC2CMsg"),o=(Ae.l("".concat(n," options:"),e),e.conversationID),i=e.localLastMessageTime,a=e.remoteLastMessageTime,s=JSON.stringify(e),r=new Jn("_recoverC2CMsg");return r.setMessage(s),this._getC2CRoamingMsg({conversationID:o,time:i}).then((function(e){var i=(e=e.data).complete;if(e=e.messageList,!ut(e)){var c=e.length;if(t.get(6).onNewMessage({dataList:e,isInstantMessage:!0}),c=e[c-1].time,e=e.map((function(e){return e.random})),e="".concat(s," complete:").concat(i," randomList:").concat(e),Ae.l("".concat(n," ").concat(e)),r.setMessage(e).end(),c<a&&1!==i)return t._recoverC2CMsg({conversationID:o,localLastMessageTime:c,remoteLastMessageTime:a})}})).catch((function(e){r.setError(e).end(),Ae.w("".concat(n," failed. error:"),e)}))}},{key:"_getC2CRoamingMsg",value:function(e){var t=e.conversationID;return e=e.time,this.req({P:Gn.GET_C2C_ROAMING_MSG,data:{peerAccount:t.replace(E.CONV_C2C,""),count:this.PULL_LIMIT_COUNT+1,lastMessageTime:e,direction:1}})}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),jr),Hs=(a(Hr,[{key:"addMessageDelay",value:function(e){0<=(e=Te()-e)&&this._e2eDelayArray.push(e)}},{key:"_calcAvg",value:function(e,t){var n;return 0===t?0:(n=0,e.forEach((function(e){n+=e})),wt(n/t,1))}},{key:"_calcCountWithLimit",value:function(e){var t=e.e2eDelayArray,n=e.min,o=e.max;return t.filter((function(e){return n<=e&&e<o})).length}},{key:"_calcPercent",value:function(e,t){return 100<(e=wt(e/t*100,2))?100:e}},{key:"_checkE2EDelayException",value:function(e,t){var n,o,i,a=e.filter((function(e){return t<e}));0<a.length&&(n=a.length,o=Math.min.apply(Math,m(a)),i=Math.max.apply(Math,m(a)),a=this._calcAvg(a,n),50<(e=wt(n/e.length*100,2)))&&new Jn("messageE2EDelayException").setMessage("count:".concat(n," min:").concat(o," max:").concat(i," avg:").concat(a," percent:").concat(e)).setLevel("warning").end()}},{key:"getStatResult",value:function(){var e,t,n,o,i,a,s=this._e2eDelayArray.length;return 0===s?null:(e=m(this._e2eDelayArray),t=this._calcCountWithLimit({e2eDelayArray:e,min:0,max:1}),n=this._calcCountWithLimit({e2eDelayArray:e,min:1,max:3}),o=this._calcPercent(t,s),i=this._calcPercent(n,s),a=this._calcAvg(e,s),this._checkE2EDelayException(e,3),e.length=0,this.reset(),{totalCount:s,countLessThan1Second:t,percentOfCountLessThan1Second:o,countLessThan3Second:n,percentOfCountLessThan3Second:i,avgDelay:a})}},{key:"reset",value:function(){this._e2eDelayArray.length=0}}]),Hr),js=(a(Br,[{key:"addRequestCount",value:function(){this._requestCount+=1}},{key:"addRTT",value:function(e){this._rttArray.push(e)}},{key:"_calcTotalCount",value:function(){return this._requestCount}},{key:"_calcRTTCount",value:function(e){return e.length}},{key:"_calcSuccessRateOfRequest",value:function(e,t){return 0===t?0:100<(e=wt(e/t*100,2))?100:e}},{key:"_calcAvg",value:function(e,t){var n;return 0===t?0:(n=0,e.forEach((function(e){n+=e})),parseInt(n/t))}},{key:"_calcMax",value:function(){return Math.max.apply(Math,m(this._rttArray))}},{key:"_calcMin",value:function(){return Math.min.apply(Math,m(this._rttArray))}},{key:"getStatResult",value:function(){var e,t,n=this._calcTotalCount(),o=m(this._rttArray);return 0===n?null:(e=this._calcRTTCount(o),t=this._calcSuccessRateOfRequest(e,n),o=this._calcAvg(o,e),Ae.l("".concat(this._n,".getStatResult max:").concat(this._calcMax()," min:").concat(this._calcMin()," avg:").concat(o)),this.reset(),{totalCount:n,rttCount:e,successRateOfRequest:t,avgRTT:o})}},{key:"reset",value:function(){this._requestCount=0,this._rttArray.length=0}}]),Br),Ks=(a(Vr,[{key:"initMap",value:function(e){var t=this;e.forEach((function(e){t._map.set(e,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]})}))}},{key:"addTotalCount",value:function(e){return!(ut(e)||!this._map.has(e)||(this._map.get(e).totalCount+=1,0))}},{key:"addSuccessCount",value:function(e){return!(ut(e)||!this._map.has(e)||(this._map.get(e).successCount+=1,0))}},{key:"addFailedCountOfUserSide",value:function(e){return!(ut(e)||!this._map.has(e)||(this._map.get(e).failedCountOfUserSide+=1,0))}},{key:"addCost",value:function(e,t){return!(ut(e)||!this._map.has(e)||(this._map.get(e).costArray.push(t),0))}},{key:"addFileSize",value:function(e,t){return!(ut(e)||!this._map.has(e)||(this._map.get(e).fileSizeArray.push(t),0))}},{key:"_calcSuccessRateOfBusiness",value:function(e){return ut(e)||!this._map.has(e)?-1:100<(e=wt((e=this._map.get(e)).successCount/e.totalCount*100,2))?100:e}},{key:"_calcSuccessRateOfPlatform",value:function(e){var t;return ut(e)||!this._map.has(e)?-1:(t=this._map.get(e),100<(e=wt(e=this._calcSuccessCountOfPlatform(e)/t.totalCount*100,2))?100:e)}},{key:"_calcTotalCount",value:function(e){return ut(e)||!this._map.has(e)?-1:this._map.get(e).totalCount}},{key:"_calcSuccessCountOfBusiness",value:function(e){return ut(e)||!this._map.has(e)?-1:this._map.get(e).successCount}},{key:"_calcSuccessCountOfPlatform",value:function(e){return ut(e)||!this._map.has(e)?-1:(e=this._map.get(e)).successCount+e.failedCountOfUserSide}},{key:"_calcAvg",value:function(e){return ut(e)||!this._map.has(e)?-1:e===Hn?this._calcAvgSpeed(e):this._calcAvgCost(e)}},{key:"_calcAvgCost",value:function(e){var t,n=this._map.get(e).costArray.length;return 0===n?0:(t=0,this._map.get(e).costArray.forEach((function(e){t+=e})),parseInt(t/n))}},{key:"_calcAvgSpeed",value:function(e){var t=0,n=0;return this._map.get(e).costArray.forEach((function(e){t+=e})),this._map.get(e).fileSizeArray.forEach((function(e){n+=e})),parseInt(1e3*n/t)}},{key:"getStatResult",value:function(e){var t,n,o,i,a,s=this._calcTotalCount(e);return 0===s?null:(t=this._calcSuccessCountOfBusiness(e),n=this._calcSuccessRateOfBusiness(e),o=this._calcSuccessCountOfPlatform(e),i=this._calcSuccessRateOfPlatform(e),a=this._calcAvg(e),this.reset(e),{totalCount:s,successCountOfBusiness:t,successRateOfBusiness:n,successCountOfPlatform:o,successRateOfPlatform:i,avgValue:a})}},{key:"reset",value:function(e){ut(e)?this._map.clear():this._map.set(e,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]})}}]),Vr),$s=(a(qr,[{key:"initMap",value:function(e){var t=this;e.forEach((function(e){t._lastMap.set(e,new Map),t._currentMap.set(e,new Map)}))}},{key:"addMessageSequence",value:function(e){var t,n,o,i=e.key,a=e.message;return!(ut(i)||!this._lastMap.has(i)||!this._currentMap.has(i)||(t=a.conversationID,a=a.sequence,t=t.replace(E.CONV_GROUP,""),0!==this._lastMap.get(i).size&&this._lastMap.get(i).has(t)&&(o=(n=this._lastMap.get(i).get(t)).length-1,a>n[0])&&a<n[o]?(n.push(a),n.sort(),this._lastMap.get(i).set(t,n)):this._addCurrentMap(e),0))}},{key:"_addCurrentMap",value:function(e){var t=e.key,n=(e=e.message).conversationID;e=e.sequence,n=n.replace(E.CONV_GROUP,""),this._currentMap.get(t).has(n)||this._currentMap.get(t).set(n,[]),this._currentMap.get(t).get(n).push(e)}},{key:"_copyData",value:function(e){if(!ut(e)){this._lastMap.set(e,new Map);var t,n=this._lastMap.get(e),o=T(this._currentMap.get(e));try{for(o.s();!(t=o.n()).done;){var i=_(t.value,2),a=i[0],s=i[1];n.set(a,s)}}catch(r){o.e(r)}finally{o.f()}n=null,this._currentMap.set(e,new Map)}}},{key:"getStatResult",value:function(e){var t,n,o;return ut(this._currentMap.get(e))||ut(this._lastMap.get(e))?null:0===this._lastMap.get(e).size?(this._copyData(e),null):(n=t=0,this._lastMap.get(e).forEach((function(e,o){var i=(e=m(e.values())).length;e=e[i-1]-e[0]+1,t+=e,n+=i})),0===t?null:(100<(o=wt(n/t*100,2))&&(o=100),this._copyData(e),{totalCount:t,successCountOfMessageReceived:n,successRateOfMessageReceived:o}))}},{key:"reset",value:function(){this._currentMap.clear(),this._lastMap.clear()}}]),qr),zs=(r(Fr,bn),Gs=g(Fr),a(Fr,[{key:"_onLoginSuccess",value:function(){var e=this,t=(this._rateMessageSent.initMap(this._messageSentItems),this._rateMessageReceived.initMap(this._messageReceivedItems),this.get(13)),n=t.getItem(this.TAG,!1);!Ve(n)&&Ye(n.forEach)&&(Ae.l("".concat(this._n,"._onLoginSuccess. logs count:").concat(n.length)),n.forEach((function(t){e._statInfoArr.push(t)})),t.removeItem(this.TAG,!1))}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("q_rpt_interval"),t=this.getCloudConfig("q_rpt_sdkappid_bl"),n=this.getCloudConfig("q_rpt_tinyid_wl");ut(e)||(this.REPORT_INTERVAL=Number(e)),ut(t)||(this.REPORT_SDKAPPID_BLACKLIST=t.split(",").map((function(e){return Number(e)}))),ut(n)||(this.REPORT_TINYID_WHITELIST=n.split(","))}},{key:"onCheckTimer",value:function(e){this.isLoggedIn()&&e%this.REPORT_INTERVAL==0&&(this.wholePeriod=!0,this._report())}},{key:"addRequestCount",value:function(){this._avgRTT.addRequestCount()}},{key:"addRTT",value:function(e){this._avgRTT.addRTT(e)}},{key:"addMessageDelay",value:function(e){this._avgE2EDelay.addMessageDelay(e)}},{key:"addTotalCount",value:function(e){this._rateMessageSent.addTotalCount(e)||Ae.w("".concat(this._n,".addTotalCount invalid key:"),e)}},{key:"addSuccessCount",value:function(e){this._rateMessageSent.addSuccessCount(e)||Ae.w("".concat(this._n,".addSuccessCount invalid key:"),e)}},{key:"addFailedCountOfUserSide",value:function(e){this._rateMessageSent.addFailedCountOfUserSide(e)||Ae.w("".concat(this._n,".addFailedCountOfUserSide invalid key:"),e)}},{key:"addCost",value:function(e,t){this._rateMessageSent.addCost(e,t)||Ae.w("".concat(this._n,".addCost invalid key or cost:"),e,t)}},{key:"addFileSize",value:function(e,t){this._rateMessageSent.addFileSize(e,t)||Ae.w("".concat(this._n,".addFileSize invalid key or size:"),e,t)}},{key:"addMessageSequence",value:function(e){this._rateMessageReceived.addMessageSequence(e)||Ae.w("".concat(this._n,".addMessageSequence invalid key:"),e.key)}},{key:"_getQualityItem",value:function(e){var n={},o=Yn[this.get(15).getNetworkType()];switch(ut(o)&&(o=8),o={qualityType:zn[e],timestamp:De(),networkType:o,extension:""},e){case Un:n=this._avgRTT.getStatResult();break;case xn:n=this._avgE2EDelay.getStatResult();break;case Fn:case qn:case Vn:case Bn:case Hn:n=this._rateMessageSent.getStatResult(e);break;case jn:case Kn:case $n:n=this._rateMessageReceived.getStatResult(e)}return null===n?null:t(t({},o),n)}},{key:"_report",value:function(e){var t=this,n=[],o=null,i=(ut(e)?this._qualityItems.forEach((function(e){null!==(o=t._getQualityItem(e))&&(o.reportIndex=t.reportIndex,o.wholePeriod=t.wholePeriod,n.push(o))})):null!==(o=this._getQualityItem(e))&&(o.reportIndex=this.reportIndex,o.wholePeriod=this.wholePeriod,n.push(o)),Ae.d("".concat(this._n,"._report"),n),0<this._statInfoArr.length&&(n=n.concat(this._statInfoArr),this._statInfoArr=[]),e=this.get(12)).getSDKAppID();e=e.getTinyID(),0<(n=Pt(this.REPORT_SDKAPPID_BLACKLIST,i)&&!Nt(this.REPORT_TINYID_WHITELIST,e)?[]:n).length&&this._doReport(n)}},{key:"_doReport",value:function(e){var n=this,o={header:ia(this),quality:e};this.req({P:Gn.SSO_STAT,data:t({},o)}).then((function(){n.reportIndex++,n.wholePeriod=!1})).catch((function(t){Ae.w("".concat(n._n,"._doReport failed. error:"),t),n._statInfoArr=n._statInfoArr.concat(e),n._flushAtOnce()}))}},{key:"_flushAtOnce",value:function(){var e=this.get(13),t=e.getItem(this.TAG,!1),n=this._statInfoArr,o="".concat(this._n,"._flushAtOnce");Ve(t)?(Ae.l("".concat(o," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1)):(10<(n=n.concat(t)).length&&(n=n.slice(0,10)),Ae.l("".concat(o," count:").concat(n.length)),e.setItem(this.TAG,n,!0,!1)),this._statInfoArr=[]}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._report(),this.reportIndex=0,this.wholePeriod=!1,this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[],this._avgRTT.reset(),this._avgE2EDelay.reset(),this._rateMessageSent.reset(),this._rateMessageReceived.reset()}}]),Fr),Ws=a((function e(t){o(this,e),Ve(t)||(this.userID=t.userID||"",this.nick=t.nick||"",this.avatar=t.avatar||"",this.time=t.time||0,this.source=t.source||"",this.wording=t.wording||"",this.type=t.type||"")})),Ys=(a(xr,[{key:"getLocalApplicationList",value:function(){return{friendApplicationList:m(this._map.values()),unreadCount:this._unreadCount}}},{key:"_onApplicationListUpdated",value:function(){this._snsM.emitOEvt(S.FRIEND_APPLICATION_LIST_UPDATED,{friendApplicationList:m(this._map.values()),unreadCount:this._unreadCount})}},{key:"onApplicationRead",value:function(){this._unreadCount=0,this._onApplicationListUpdated()}},{key:"onApplicationAdded",value:function(e,n){var o,i,a=this;Ve(e)||(o="",o=n===this._snsM.getMyUserID()?E.SNS_APPLICATION_SENT_BY_ME:E.SNS_APPLICATION_SENT_TO_ME,i=!1,e.forEach((function(e){var n="".concat(e.userID,"_").concat(o);o!==E.SNS_APPLICATION_SENT_TO_ME||a._map.has(n)||(a._unreadCount+=1),a._map.set(n,new Ws(t(t({},e),{},{type:o}))),i=!0})),i&&this._onApplicationListUpdated())}},{key:"onApplicationDeleted",value:function(e){Ve(e)||(this._startTime=0,this._currentSeq=0,this.getApplicationList())}},{key:"getApplicationList",value:function(){var e=this,t="".concat(this._n,".").concat("getApplicationList"),n=new Jn("getApplicationList");return this._snsM.req({P:Gn.GET_FD_APPLICATION_LIST,data:{applicationType:E.SNS_APPLICATION_TYPE_BOTH,fromAccount:this._snsM.getMyUserID(),maxLimited:this._maxLimited,startTime:this._startTime,lastSequence:this._currentSeq}}).then((function(o){var i=(o=o.data).resultList,a=o.unreadCount,s=o.startTime,r=(o=o.currentSequence,e._startTime=s,e._currentSeq=o,e._unreadCount=a,We(i)?i.length:0);r="applicationCount:".concat(r," unreadCount:").concat(a," startTime:").concat(s," currentSequence:").concat(o),n.setMessage(r).end(),Ae.i("".concat(t," ok. ").concat(r)),e._map.clear(),We(i)&&i.forEach((function(t){var n=t.userID,o=t.type;t=new Ws(t),e._map.set("".concat(n,"_").concat(o),t)})),e._onApplicationListUpdated()})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"deleteApplication",value:function(e){var t,n="".concat(this._n,".").concat("deleteApplication"),o=e.userID,i=e.type;return i&&(i===E.SNS_APPLICATION_SENT_BY_ME||i===E.SNS_APPLICATION_SENT_TO_ME)||(i=E.SNS_APPLICATION_SENT_TO_ME),this._map.has("".concat(o,"_").concat(i))?((t=new Jn("deleteApplication")).setMessage("userID:".concat(o," type:").concat(i)),this._snsM.req({P:Gn.DEL_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),userIDList:[o],type:i}}).then((function(e){var a=(r=(e=e.data.resultList)[0]).to,s=r.resultCode,r=r.resultInfo;return t.setMoreMessage("resultList:".concat(JSON.stringify(e))).end(),Ae.i("".concat(n," ok. userID:").concat(o," type:").concat(i)),0===s?mn():yn({userID:a,code:s,message:r})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(n," failed. error:"),e),yn(e)}))):yn({code:Pn.FRIEND_APPLICATION_NOT_EXIST})}},{key:"acceptApplication",value:function(e){var t="".concat(this._n,".").concat("acceptApplication"),n=e.userID,o=e.remark,i=e.tag,a=e.type,s=(a&&(a===E.SNS_APPLICATION_AGREE||a===E.SNS_APPLICATION_AGREE_AND_ADD)||(a=E.SNS_APPLICATION_AGREE_AND_ADD),new Jn("acceptApplication"));return s.setMessage("userID:".concat(n," type:").concat(a)),this._snsM.req({P:Gn.RESPOND_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),responseFriendItem:[{userID:n,remark:o,tag:i,action:a}]}}).then((function(e){s.end();var o=(e=e.data.resultList[0]).resultCode;if(e=e.resultInfo,0!==o)return yn({code:o,message:e});Ae.i("".concat(t," ok. userID:").concat(n," type:").concat(a))})).catch((function(e){return s.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"refuseApplication",value:function(e){var t="".concat(this._n,".").concat("refuseApplication"),n=e.userID,o=new Jn("refuseApplication");return o.setMessage("userID:".concat(n)),this._snsM.req({P:Gn.RESPOND_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),responseFriendItem:[{userID:n,action:"Response_Action_Reject"}]}}).then((function(e){o.end();var i=(e=e.data.resultList[0]).resultCode;if(e=e.resultInfo,0!==i)return yn({code:i,message:e});Ae.i("".concat(t," ok. userID:").concat(n))})).catch((function(e){return o.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"setApplicationRead",value:function(){var e=this,t="".concat(this._n,".").concat("setApplicationRead"),n=new Jn("setApplicationRead");return this._snsM.req({P:Gn.REPORT_FD_APPLICATION,data:{fromAccount:this._snsM.getMyUserID(),latestTimeStamp:wt(De()/1e3,0)}}).then((function(o){n.end(),Ae.i("".concat(t," ok")),e._unreadCount=0})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"reset",value:function(){this._maxLimited=100,this._currentSeq=0,this._unreadCount=0,this._map.clear()}}]),xr),Xs=(a(Ur,[{key:"validate",value:function(e){var t,n=!0,o="";if(Ve(e))return{valid:!1,tips:"empty options"};if(e.profileCustomField)for(var i=e.profileCustomField.length,a=null,s=0;s<i;s++){if(a=e.profileCustomField[s],!ct(a.key)||-1===a.key.indexOf("Tag_Profile_Custom"))return{valid:!1,tips:"The prefix of keys of the custom profile key-value pairs (which is profileCustomField) must be Tag_Profile_Custom"};if(!ct(a.value))return{valid:!1,tips:"The type of values of the custom profile key-value pairs (which is profileCustomField) must be String"}}for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if("profileCustomField"===t)continue;if(Ve(e[t])&&!ct(e[t])&&!Ke(e[t])){o="key:"+t+", invalid value:"+e[t],n=!1;continue}switch(t){case"nick":ct(e[t])||(n=!(o="nick must be a string")),500<et(e[t])&&(o="nick name limited: must less than or equal to ".concat(500," bytes, current size: ").concat(et(e[t])," bytes"),n=!1);break;case"gender":it(Pe,e.gender)||(o="key:gender, invalid value:"+e.gender,n=!1);break;case"birthday":Ke(e.birthday)||(n=!(o="birthday must be a number"));break;case"location":ct(e.location)||(n=!(o="location must be a string"));break;case"selfSignature":ct(e.selfSignature)||(n=!(o="selfSignature must be a string"));break;case"allowType":it(Ge,e.allowType)||(o="key:allowType, invalid value:"+e.allowType,n=!1);break;case"language":Ke(e.language)||(n=!(o="language must be a number"));break;case"avatar":ct(e.avatar)||(n=!(o="avatar must be a string"));break;case"messageSettings":0!==e.messageSettings&&1!==e.messageSettings&&(n=!(o="messageSettings must be 0 or 1"));break;case"adminForbidType":it(Ne,e.adminForbidType)||(o="key:adminForbidType, invalid value:"+e.adminForbidType,n=!1);break;case"level":Ke(e.level)||(n=!(o="level must be a number"));break;case"role":Ke(e.role)||(n=!(o="role must be a number"));break;default:o="unknown key:"+t+" "+e[t],n=!1}}return{valid:n,tips:o}}},{key:"update",value:function(e){var t,n="",o=[];this.friendCustomField.forEach((function(e){o.push(e.key)}));for(var i=0,a=e.length;i<a;i++)if(n=e[i].tag,t=e[i].value,-1<n.indexOf("Tag_SNS_Custom"))-1<o.indexOf(n)?this.friendCustomField.forEach((function(e){e.key===n&&(e.value=t)})):this.friendCustomField.push({key:n,value:t});else if(-1<n.indexOf("Tag_Profile_Custom")){var s=!1;this.profile.profileCustomField.forEach((function(e){e.key===n&&(e.value=t,s=!0)})),s||this.profile.profileCustomField.push({key:n,value:t})}else switch(n){case Oe.NICK:this.profile.nick=t;break;case Oe.GENDER:this.profile.gender=t;break;case Oe.BIRTHDAY:this.profile.birthday=t;break;case Oe.LOCATION:this.profile.location=t;break;case Oe.SELFSIGNATURE:this.profile.selfSignature=t;break;case Oe.ALLOWTYPE:this.profile.allowType=t;break;case Oe.LANGUAGE:this.profile.language=t;break;case Oe.AVATAR:this.profile.avatar=t;break;case Oe.MESSAGESETTINGS:this.profile.messageSettings=t;break;case Oe.ADMINFORBIDTYPE:this.profile.adminForbidType=t;break;case Oe.LEVEL:this.profile.level=t;break;case Oe.ROLE:this.profile.role=t;break;case we.REMARK:this.remark=t;break;case we.ADDTIME:this.addTime=t;break;case we.GROUP:this.groupList=JSON.parse(JSON.stringify(t));break;case we.ADDSOURCE:this.source=t;break;case we.ADDWORDING:break;default:Ae.d("snsProfileItem unkown tag->",e[i].tag)}this.timestamp=Date.now(),o.length=0}},{key:"updateProfile",value:function(e){this.profile=JSON.parse(JSON.stringify(e)),this.timestamp=Date.now()}},{key:"addToGroupList",value:function(e){-1===this.groupList.indexOf(e)&&(this.groupList.push(e),this.count=this.groupList.length)}},{key:"removeFromGroupList",value:function(e){-1<(e=this.groupList.indexOf(e))&&(this.groupList.splice(e,1),this.count=this.groupList.length)}}]),Ur),Js=(a(Gr,[{key:"getLocalFriendList",value:function(){return m(this._map.values())}},{key:"getFriendRemark",value:function(e){return this._map.has(e)?this._map.get(e).remark:""}},{key:"onFriendProfileModified",value:function(e){var t,n=this;Ve(e=e.dataList)||(t=this._snsM.get(11),e.forEach((function(e){var o,i=e.userID;e=e.profileList,n.isMyFriend(i)&&(Ae.l("".concat(n._n,".onFriendProfileModified. friend account:").concat(i,", profileList:").concat(JSON.stringify(e))),(o=n._map.get(i)).update(e),t.modifyMessageSentByPeer({conversationID:"".concat(E.CONV_C2C).concat(i),latestNick:o.profile.nick,latestAvatar:o.profile.avatar}))})),this._onFriendListUpdated())}},{key:"onFriendAdded",value:function(e){var t=this;0!==e.length&&(Ae.l("".concat(this._n,".onFriendAdded userIDList:").concat(e)),e.forEach((function(e){t._map.set(e,new Xs(e))})),this.getFriendProfile({userIDList:e}).then((function(n){e.forEach((function(e){var n=t._map.get(e);0<n.groupList.length&&t._snsM.updateWhenFriendAdded({nameList:n.groupList,userID:e})})),t._onFriendListUpdated()})))}},{key:"onFriendDeleted",value:function(e){var t=this;0!==e.length&&(Ae.l("".concat(this._n,".onFriendDeleted userIDList:").concat(e)),e.forEach((function(e){var n=t._map.get(e);0<n.groupList.length&&t._snsM.updateWhenFriendDeleted({nameList:n.groupList,userID:e}),t._map.delete(e)})),this._onFriendListUpdated())}},{key:"_onFriendListUpdated",value:function(){this._snsM.emitOEvt(S.FRIEND_LIST_UPDATED),this._snsM.get(11).checkAndPatchRemark()}},{key:"getFriendProfile",value:function(e){var t,n=this,o="".concat(this._n,".").concat("getFriendProfile"),i=(e=e.userIDList,[]),a=[],s=[];return e.forEach((function(e){var t;n._map.has(e)?(t=n._map.get(e),Date.now()-t.timestamp<n._expirationTime?a.push(t):s.push(e)):i.push({userID:e,code:Pn.NOT_MY_FRIEND,message:n._snsM.getErrMsg(Pn.NOT_MY_FRIEND)})})),0===s.length?(Ae.i("".concat(o," newUserIDList is empty")),vn({friendList:a,failureUserIDList:i})):((t=new Jn("getFriendProfile")).setMessage("userIDList:".concat(s)),Ae.i("".concat(o," userIDList:").concat(s)),this._snsM.req({P:Gn.GET_FD_PROFILE,data:{fromAccount:this._snsM.getMyUserID(),userIDList:s}}).then((function(e){return t.end(),Ae.i("".concat(o," ok")),e.data.resultList.forEach((function(e){var t,o=e.to,s=e.resultCode,r=e.resultInfo;e=e.tagValueList,ut(s)||0===s?(n._map.has(o)?(t=n._map.get(o)).update(e):(t=new Xs(o,e),n._map.set(o,t)),a.push(t)):i.push({userID:o,code:s,message:r})})),mn({friendList:a,failureUserIDList:i})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(o," failed. error:"),e),yn(e)})))}},{key:"isMyFriend",value:function(e){return this._map.has(e)}},{key:"pagingGetFriendList",value:function(){var e=this,t="".concat(this._n,".").concat("getFriendList"),n=new Jn("getFriendList"),o=Date.now();this._snsM.req({P:Gn.GET_FD_LIST,data:{fromAccount:this._snsM.getMyUserID(),startIndex:this._startIdx,standardSequence:this._standardSeq,customSequence:this._customSeq}}).then((function(i){var a=(i=i.data).friendCount,s=i.resultList,r=i.nextStartIndex,c=i.standardSequence,u=i.customSequence;i=i.completeFlag,e._startIdx=r,e._standardSeq=c,e._customSeq=u,a="friendCount:".concat(a," nextStartIndex:").concat(r," standardSequence:").concat(c," ")+"customSequence:".concat(u," completeFlag:").concat(i," cost:").concat(jt(o)),n.setMessage(a).end(),Ae.i("".concat(t," ok."),a),Ve(s)||s.forEach((function(t){var n=t.to;t=t.tagValueList,e._map.set(n,new Xs(n,t))})),0===i?e.pagingGetFriendList():(e._snsM.emitOEvt(S.FRIEND_LIST_UPDATED),e._pagingGetFriendProfile())})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"_pagingGetFriendProfile",value:function(){var e=this,t=m(this._map.keys()),n=this._snsM.get(4),o=t.length,i=o<=100?1:Math.ceil(o/100);Ae.l("".concat(this._n,"._pagingGetFriendProfile friendCount:").concat(o," pageCount:").concat(i));for(var a=0;a<i;a++)n.getUserProfile({userIDList:t.slice(100*a,100*(a+1))}).then((function(t){t.data.forEach((function(t){var n=e._map.get(t.userID);n&&n.updateProfile(t)})),e._onFriendListUpdated()}))}},{key:"addFriend",value:function(e){var t,n,o,i,a,s,r,c=this,u="".concat(this._n,".").concat("addFriend");return this._map.has(e.to)?yn({code:Pn.ALREADY_MY_FRIEND}):e.wording&&!1===this._snsM.filterProfanity("wording",e)?yn({code:Pn.PROFANITY_FOUND}):(t=e.to,n=e.source,o=e.type,i=e.wording,a=e.remark,e=e.groupName,(s=o)&&(s===E.SNS_ADD_TYPE_SINGLE||s===E.SNS_ADD_TYPE_BOTH)||(s=E.SNS_ADD_TYPE_BOTH),(r=new Jn("addFriend")).setMessage("to:".concat(t," source:").concat(n," type:").concat(s)),this._snsM.req({P:Gn.ADD_FD,data:{fromAccount:this._snsM.getMyUserID(),addFriendItem:[{to:t,source:n,wording:i,remark:a,groupName:e}],type:s}}).then((function(e){e=e.data.resultList;var t=(r.setMoreMessage("resultList:".concat(JSON.stringify(e))).end(),e=e[0]).to,n=e.resultCode;return e=e.resultInfo,Ae.i("".concat(u," ok. to:").concat(t," type:").concat(s," code:").concat(n)),ut(n)||0===n?mn({userID:t,code:0}):30539===n?mn({userID:t,code:n,message:c._snsM.getErrMsg(n)}):yn({userID:t,code:n,message:c._snsM.getErrMsg(n)||e})})).catch((function(e){return r.setError(e).end(),Ae.w("".concat(u," failed. error:"),e),yn(e)})))}},{key:"deleteFriend",value:function(e){var t,n=this,o="".concat(this._n,".").concat("deleteFriend"),i=e.userIDList,a=(e=e.type,1e3<i.length&&(Ae.w("".concat(o," ").concat(Vt(1e3))),i.length=1e3),[]),s=[],r=[];return i.forEach((function(e){n._map.has(e)?r.push(e):a.push({userID:e,code:Pn.NOT_MY_FRIEND,message:n._snsM.getErrMsg(Pn.NOT_MY_FRIEND)})})),0===r.length?vn({successUserIDList:s,failureUserIDList:a}):((i=e)&&(i===E.SNS_DELETE_TYPE_SINGLE||i===E.SNS_DELETE_TYPE_BOTH)||(i=E.SNS_DELETE_TYPE_BOTH),(t=new Jn("deleteFriend")).setMessage("userIDList:".concat(r," type:").concat(i)),this._snsM.req({P:Gn.DEL_FD,data:{fromAccount:this._snsM.getMyUserID(),userIDList:r,type:i}}).then((function(e){return t.end(),Ae.i("".concat(o," ok")),Ve(e=e.data.resultList)||e.forEach((function(e){var t=e.to,n=e.resultCode;e=e.resultInfo,ut(n)||0===n?s.push({userID:t}):a.push({userID:t,code:n,message:e})})),mn({successUserIDList:s,failureUserIDList:a})})).catch((function(e){return t.setError(e).end(),Ae.w("".concat(o," error:"),e),yn(e)})))}},{key:"updateFriend",value:function(e){var t,n,o,i=this,a=e.userID,s=e.remark,r=e.friendCustomField;return this._map.has(a)?(t="".concat(this._n,".").concat("updateFriend"),(n=new Jn("updateFriend")).setMessage("userID:".concat(a," remark:").concat(s," friendCustomField:").concat(r)),o=[],ut(s)||o.push({tag:we.REMARK,value:s}),We(r)&&0<r.length&&r.forEach((function(e){o.push({tag:e.key,value:e.value})})),this._snsM.req({P:Gn.UPDATE_FD,data:{fromAccount:this._snsM.getMyUserID(),updateItem:[{to:a,snsItem:o}]}}).then((function(e){n.end(),Ae.i("".concat(t," ok"));var o=(e=e.data.resultList[0]).to,a=e.resultCode;return e=e.resultInfo,ut(a)||0===a?((o=i._map.get(o))&&(ut(s)||(o.remark=s),We(r)&&0<r.length&&_t(o.friendCustomField,r),i._onFriendListUpdated()),mn(o)):yn({code:a,message:e})})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))):yn({code:Pn.NOT_MY_FRIEND})}},{key:"checkFriend",value:function(e){var t="".concat(this._n,".").concat("checkFriend"),n=e.userIDList,o=e.type,i=(o&&(o===E.SNS_CHECK_TYPE_SINGLE||o===E.SNS_CHECK_TYPE_BOTH)||(o=E.SNS_CHECK_TYPE_BOTH),new Jn("checkFriend"));return i.setMessage("userIDList:".concat(n," type:").concat(o)),this._snsM.req({P:Gn.CHECK_FD,data:{fromAccount:this._snsM.getMyUserID(),userIDList:n,type:o}}).then((function(e){i.end(),Ae.i("".concat(t," ok. userIDList:").concat(n," type:").concat(o));var a=[],s=[];return We(e=e.data.resultList)&&e.forEach((function(e){var t=e.to,n=e.relation,o=e.resultCode;e=e.resultInfo,ut(o)||0===o?a.push({userID:t,code:0,relation:n}):s.push({userID:t,code:o,message:e})})),mn({successUserIDList:a,failureUserIDList:s})})).catch((function(e){return i.setError(e).end(),Ae.w("".concat(t," failed. error:"),e),yn(e)}))}},{key:"onAddedToFriendGroup",value:function(e){var t=this,n=e.name;e=e.userIDList,Ae.l("".concat(this._n,".onAddedToFriendGroup groupName:").concat(n," userIDList:").concat(e)),n&&!Ve(e)&&e.forEach((function(e){t._map.has(e)&&t._map.get(e).addToGroupList(n)}))}},{key:"onRemovedFromFriendGroup",value:function(e){var t=this,n=e.name;e=e.userIDList,Ae.l("".concat(this._n,".onRemovedFromFriendGroup groupName:").concat(n," userIDList:").concat(e)),n&&!Ve(e)&&e.forEach((function(e){t._map.has(e)&&t._map.get(e).removeFromGroupList(n)}))}},{key:"reset",value:function(){this._map.clear(),this._startIdx=0,this._standardSeq=0,this._customSeq=0}}]),Gr),Zs=(a(Nr,[{key:"addToUserIDList",value:function(e){-1===this.userIDList.indexOf(e)&&(this.userIDList.push(e),this.count=this.userIDList.length)}},{key:"removeFromUserIDList",value:function(e){-1<(e=this.userIDList.indexOf(e))&&(this.userIDList.splice(e,1),this.count=this.userIDList.length)}}]),Nr),Qs=(a(Pr,[{key:"getLocalGroupList",value:function(){return m(this._map.values())}},{key:"_onGroupListUpdated",value:function(){var e=m(this._map.values());this._snsM.emitOEvt(S.FRIEND_GROUP_LIST_UPDATED,e)}},{key:"getGroupList",value:function(){var e=this,t="".concat(this._n,".").concat("getGroupList"),n=new Jn("getGroupList");return this._snsM.req({P:Gn.GET_FD_GRP_LIST,data:{fromAccount:this._snsM.getMyUserID()}}).then((function(o){n.end(),Ve(o=o.data.resultList)?Ae.i("".concat(t," ok. count:0")):(Ae.i("".concat(t," ok. count:").concat(o.length)),e._map.clear(),o.forEach((function(t){var n=new Zs(t);e._map.set(t.name,n)})),e._onGroupListUpdated())})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(t," error:"),e),yn(e)}))}},{key:"createGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("createGroup"),a=e.name;return e=e.userIDList,this._map.has(a)?yn({code:Pn.FRIEND_GRP_EXISTED}):(t="name:".concat(a," userIDList:").concat(e),(n=new Jn("createGroup")).setMessage(t),this._snsM.req({P:Gn.CREATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),groupName:[a],userIDList:We(e)?e:void 0}}).then((function(e){n.end(),Ae.l("".concat(i," ok. ").concat(t)),e=e.data.resultList;var s=[],r=[];return e&&e.forEach((function(e){var t=e.to,n=e.resultCode,o=e.resultInfo;ut(n)||0===n?s.push(t):(t={userID:e.to,code:n,message:o},r.push(t))})),e=new Zs({name:a,userIDList:s}),o._map.set(a,e),o._snsM.onAddedToFriendGroup({name:a,userIDList:s}),o._onGroupListUpdated(),mn({friendGroup:e,failureUserIDList:r})})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)})))}},{key:"deleteGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("deleteGroup"),a=e.name;return this._map.has(a)?(t="name:".concat(a),(n=new Jn("deleteGroup")).setMessage(t),this._snsM.req({P:Gn.DEL_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),nameList:[a]}}).then((function(e){n.end(),Ae.l("".concat(i," ok. ").concat(t));var s=o._map.get(a);return s&&(o._snsM.onRemovedFromFriendGroup({name:a,userIDList:s.userIDList}),o._map.delete(a),s.userIDList.length=0),o._onGroupListUpdated(),mn(s)})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"renameGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("renameGroup"),a=e.oldName,s=e.newName;return this._map.has(a)?(t="oldName:".concat(a," newName:").concat(s),(n=new Jn("renameGroup")).setMessage(t),this._snsM.req({P:Gn.UPDATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),oldName:a,newName:s}}).then((function(){var e;return n.end(),Ae.l("".concat(i," ok. ").concat(t)),o._map.has(a)?((e=o._map.get(a)).name=s,o._map.delete(a),o._map.set(s,e),o._snsM.onRemovedFromFriendGroup({name:a,userIDList:e.userIDList}),o._snsM.onAddedToFriendGroup({name:s,userIDList:e.userIDList}),o._onGroupListUpdated(),mn(e)):mn()})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"addToGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("addToGroup"),a=e.name;return e=e.userIDList,this._map.has(a)?(t="name:".concat(a," userIDList:").concat(e),(n=new Jn("addToGroup")).setMessage(t),this._snsM.req({P:Gn.UPDATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),oldName:a,updateGroupItem:e.filter((function(e){return o._snsM.isMyFriend(e)})).map((function(e){return{to:e,updateType:"Update_Type_Add"}}))}}).then((function(e){return n.end(),Ae.l("".concat(i," ok. ").concat(t)),o._onGroupUpdated(a,e)})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"removeFromGroup",value:function(e){var t,n,o=this,i="".concat(this._n,".").concat("removeFromGroup"),a=e.name;return e=e.userIDList,this._map.has(a)?(t="name:".concat(a," userIDList:").concat(e),(n=new Jn("removeFromGroup")).setMessage(t),this._snsM.req({P:Gn.UPDATE_FD_GRP,data:{fromAccount:this._snsM.getMyUserID(),oldName:a,updateGroupItem:e.filter((function(e){return o._snsM.isMyFriend(e)})).map((function(e){return{to:e,updateType:"Update_Type_Delete"}}))}}).then((function(e){return n.end(),Ae.l("".concat(i," ok. ").concat(t)),o._onGroupUpdated(a,e)})).catch((function(e){return n.setError(e).end(),Ae.w("".concat(i," failed. error:"),e),yn(e)}))):this._onGroupNotExist()}},{key:"_onGroupUpdated",value:function(e,t){t=t.data.resultList;var n=this._map.get(e),o=[],i=[],a=[];return We(t)&&t.forEach((function(e){var t=e.to,s=e.resultCode,r=e.resultInfo,c=e.type;0===s?"Update_Type_Add"===c?n&&(n.addToUserIDList(t),i.push(t)):"Update_Type_Delete"===c&&n&&(n.removeFromUserIDList(t),a.push(t)):o.push({to:e.to,code:s,message:r})})),Ae.l("".concat(this._n,"._onGroupUpdated name:").concat(e," userIDList:").concat(n.userIDList)),0<i.length&&this._snsM.onAddedToFriendGroup({name:e,userIDList:i}),0<a.length&&this._snsM.onRemovedFromFriendGroup({name:e,userIDList:a}),mn({friendGroup:n,failureUserIDList:o})}},{key:"updateWhenFriendAdded",value:function(e){var t=this,n=e.nameList,o=e.userID;Ae.l("".concat(this._n,".updateWhenFriendAdded userID:").concat(o," nameList:").concat(n)),Ve(n)||n.forEach((function(e){t._map.has(e)&&t._map.get(e).addToUserIDList(o)}))}},{key:"updateWhenFriendDeleted",value:function(e){var t=this,n=e.nameList,o=e.userID;Ae.l("".concat(this._n,".updateWhenFriendDeleted userID:").concat(o," nameList:").concat(n)),Ve(n)||n.forEach((function(e){t._map.has(e)&&t._map.get(e).removeFromUserIDList(o)}))}},{key:"_onGroupNotExist",value:function(e){return yn({code:Pn.FRIEND_GRP_NOT_EXIST})}},{key:"reset",value:function(){this._map.clear()}}]),Pr),er=(r(wr,bn),Ns=g(wr),a(wr,[{key:"onContextUpdated",value:function(e){this._friendHandler.pagingGetFriendList(),this._friendGroupHandler.getGroupList(),this._friendApplicationHandler.getApplicationList()}},{key:"onRelationChainModified",value:function(e){var t,n,o,i,a,s,r=this;Ve(e=e.dataList)||(t=[],n=[],o=[],a=!(i=[]),s="",e.forEach((function(e){var c;3!==e.pushType&&4!==e.pushType||!e.from||(s=e.from),e.friendAddAccount&&(t.push.apply(t,m(e.friendAddAccount)),i.push.apply(i,m(e.friendAddAccount))),e.friendDelAccount&&n.push.apply(n,m(e.friendDelAccount)),e.friendApplicationAdded&&o.push.apply(o,m(e.friendApplicationAdded)),e.friendApplicationDeletedUserIDList&&i.push.apply(i,m(e.friendApplicationDeletedUserIDList)),e.reportTime&&7===e.pushType&&(a=!0),e.friendUpInfo&&(c={dataList:[]},e.friendUpInfo.forEach((function(e){c.dataList.push({userID:e.friendAccount,profileList:m(e.sns)})})),r.onFriendProfileModified(c))})),a&&this._friendApplicationHandler.onApplicationRead(),this._friendApplicationHandler.onApplicationAdded(o,s),this._friendApplicationHandler.onApplicationDeleted(i),this._friendHandler.onFriendAdded(t),this._friendHandler.onFriendDeleted(n))}},{key:"isMyFriend",value:function(e){return this._friendHandler.isMyFriend(e)}},{key:"filterProfanity",value:function(e,t){var n,o=this.get(29);return!o||(n=(o=o.filterText(t[e],"sns")).isAllowedToSend,o=o.modifiedText,!0===n&&(t[e]=o,!0))}},{key:"onFriendProfileModified",value:function(e){this._friendHandler.onFriendProfileModified(e)}},{key:"getLocalFriendList",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=this._friendHandler.getLocalFriendList();return e?vn(t):t}},{key:"getFriendRemark",value:function(e){return this._friendHandler.getFriendRemark(e)}},{key:"getFriendList",value:function(){return this._friendHandler.pagingGetFriendList()}},{key:"addFriend",value:function(e){return this._friendHandler.addFriend(e)}},{key:"deleteFriend",value:function(e){return this._friendHandler.deleteFriend(e)}},{key:"checkFriend",value:function(e){return this._friendHandler.checkFriend(e)}},{key:"getFriendProfile",value:function(e){return this._friendHandler.getFriendProfile(e)}},{key:"updateFriend",value:function(e){return this._friendHandler.updateFriend(e)}},{key:"onAddedToFriendGroup",value:function(e){this._friendHandler.onAddedToFriendGroup(e)}},{key:"onRemovedFromFriendGroup",value:function(e){this._friendHandler.onRemovedFromFriendGroup(e)}},{key:"getLocalFriendApplicationList",value:function(){return vn(this._friendApplicationHandler.getLocalApplicationList())}},{key:"deleteFriendApplication",value:function(e){return this._friendApplicationHandler.deleteApplication(e)}},{key:"refuseFriendApplication",value:function(e){return this._friendApplicationHandler.refuseApplication(e)}},{key:"acceptFriendApplication",value:function(e){return this._friendApplicationHandler.acceptApplication(e)}},{key:"setFriendApplicationRead",value:function(e){return this._friendApplicationHandler.setApplicationRead(e)}},{key:"getLocalFriendGroupList",value:function(){return vn(this._friendGroupHandler.getLocalGroupList())}},{key:"createFriendGroup",value:function(e){return this._friendGroupHandler.createGroup(e)}},{key:"deleteFriendGroup",value:function(e){return this._friendGroupHandler.deleteGroup(e)}},{key:"addToFriendGroup",value:function(e){return this._friendGroupHandler.addToGroup(e)}},{key:"removeFromFriendGroup",value:function(e){return this._friendGroupHandler.removeFromGroup(e)}},{key:"renameFriendGroup",value:function(e){return this._friendGroupHandler.renameGroup(e)}},{key:"updateWhenFriendAdded",value:function(e){this._friendGroupHandler.updateWhenFriendAdded(e)}},{key:"updateWhenFriendDeleted",value:function(e){this._friendGroupHandler.updateWhenFriendDeleted(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._friendHandler.reset(),this._friendGroupHandler.reset(),this._friendApplicationHandler.reset()}}]),wr),tr=(r(Or,bn),Ps=g(Or),a(Or,[{key:"isWorkerEnabled",value:function(){return this._isWorkerEnabled&&he}},{key:"startWorkerTimer",value:function(){Ae.l("".concat(this._n,".startWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("start")}},{key:"stopWorkerTimer",value:function(){Ae.l("".concat(this._n,".stopWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("stop")}},{key:"_init",value:function(){var e,t;he&&(e=URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'],{type:"application/javascript; charset=utf-8"})),this._workerTimer=new Worker(e),(t=this)._workerTimer.onmessage=function(e){e.data?(t._timerID=e.data,Ae.l("".concat(t._n,"._init seed:").concat(t._timerID))):t._m.onCheckTimer()})}},{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("enable_worker");Ae.l("".concat(this._n,"._onCloudConfig enableWorker:").concat(e)),ut(e)||"1"===e?!this._isWorkerEnabled&&he&&(this._isWorkerEnabled=!0,this.startWorkerTimer(),this._m.onWorkerTimerEnabled()):this._isWorkerEnabled&&he&&(this._isWorkerEnabled=!1,this.stopWorkerTimer(),this._m.onWorkerTimerDisabled())}},{key:"terminate",value:function(){Ae.l("".concat(this._n,".terminate")),this._workerTimer&&(this._workerTimer.terminate(),this._workerTimer=null,this._timerID=-1)}},{key:"getTimerID",value:function(){return this._timerID}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Or),nr=(a(Rr,[{key:"isValidPurchaseBits",value:function(e){return e&&"string"==typeof e&&1<=e.length&&e.length<=64&&/[01]{1,64}/.test(e)}},{key:"parsePurchaseBits",value:function(e){if(this.isValidPurchaseBits(e)){this._featureMap.clear();for(var t,n=e.length-1,o=0;0<=n;n--,o++)t=(o<32?new L(0,Math.pow(2,o)):new L(Math.pow(2,o-32),0)).toString(),"1"===e[n]?this._featureMap.set(t,!0):this._featureMap.set(t,!1)}else Ae.w("".concat(this._n,".parsePurchaseBits invalid purchasebits:").concat(e))}},{key:"hasPurchasedFeature",value:function(e){return!!this._featureMap.get(e)}},{key:"isFeatureEnabled",value:function(e){for(var t=parseInt(e).toString(2),n=void 0,o=!0,i=t.length-1,a=0;0<=i;i--,a++)if("1"===t.charAt(i)&&(n=(a<32?new L(0,Math.pow(2,a)):new L(Math.pow(2,a-32),0)).toString(),!this._featureMap.get(n))){o=!1;break}return Ae.l("".concat(this._n,".isFeatureEnabled decimalNumber:").concat(e," key:").concat(n," ret:").concat(o)),vn({enabled:o})}},{key:"isFeatureEnabledForStat",value:function(e){for(var t=parseInt(e).toString(2),n=t.length-1,o=0;0<=n;n--,o++)if("1"===t.charAt(n)){if(i=(o<32?new L(0,Math.pow(2,o)):new L(Math.pow(2,o-32),0)).toString(),!this._featureMap.get(i))break;var i,a="",s=0;i===N.PLUGIN_TRANSLATE?(a="plugin_translate",s=16):i===N.PLUGIN_VOICE_TO_TEXT?(a="plugin_voice_to_text",s=17):i===N.PLUGIN_CS?(a="plugin_cs",s=14):i===N.PLUGIN_PUSH?(a="plugin_push",s=13):i===N.PLUGIN_BOT?(a="plugin_bot",s=15):i===N.MSG_REACTION&&(a="plugin_emoji_reaction",s=18),""!==a&&(i=this._commercialConfigM.get(12).getUIPlatform(),new Jn(a).setCode(s).setUIPlatform(i).end(),Ae.l("".concat(this._n,".isFeatureEnabledForStat ").concat(a," code:").concat(s," uiPlatform:").concat(i)))}}},{key:"isSearchCloudMessagesEnabled",value:function(){var e;this._isSCMReported||(e=this._commercialConfigM.get(12).getUIPlatform(),new Jn("plugin_search").setCode(6).setUIPlatform(e).end(),this._isSCMReported=!0)}},{key:"clear",value:function(){this._featureMap.clear(),this._isSCMReported=!1}}]),Rr),or=(a(Ar,[{key:"_canFetch",value:function(){return this.get(12).isLoggedIn()?!this._isFetching&&Date.now()>=this._expiredTime:(this._expiredTime=Date.now()+2e3,!1)}},{key:"onCheckTimer",value:function(e){this._canFetch()&&this.fetchConfig()}},{key:"fetchConfig",value:function(){var e,t,n=this,o=this._canFetch(),i="".concat(this._n,".fetchConfig");Ae.l("".concat(i," canFetch:").concat(o)),o&&(e=new Jn("fetchCommercialConfig"),o=this.get(12).getSDKAppID(),t=this.get(20),this._isFetching=!0,t.req({P:Gn.FETCH_COMMERCIAL_CONFIG,data:{SDKAppID:o}}).then((function(t){e.setMessage("purchaseBits:".concat(t.data.purchaseBits)).end(),Ae.l("".concat(i," ok.")),n._parseConfig(t.data),n._isFetching=!1})).catch((function(t){e.setError(t).end(),n._isFetching=!1})))}},{key:"onPushedConfig",value:function(e){var t="".concat(this._n,".onPushedConfig data:").concat(JSON.stringify(e));Ae.l("".concat(t)),new Jn("pushedCommercialConfig").setMessage("purchaseBits:".concat(e.purchaseBits)).end(),this._parseConfig(e)}},{key:"_parseConfig",value:function(e){var t="".concat(this._n,"._parseConfig"),n=e.errorCode,o=e.errorMessage,i=e.purchaseBits,a=e.expiredTime;0===n?(this._purchasedFeatureHandler.parsePurchaseBits(i),this._expiredTime=Date.now()+1e3*a):ut(n)?(Ae.l("".concat(t," failed. Invalid message format:"),e),this._setExpiredTimeOnResponseError(36e5)):(Ae.e("".concat(t," errorCode:").concat(n," errorMessage:").concat(o)),this._setExpiredTimeOnResponseError(12e4))}},{key:"_setExpiredTimeOnResponseError",value:function(e){this._expiredTime=Date.now()+e}},{key:"canIUse",value:function(e){return this._purchasedFeatureHandler.hasPurchasedFeature(e)}},{key:"isFeatureEnabled",value:function(e){return this._purchasedFeatureHandler.isFeatureEnabled(e)}},{key:"isFeatureEnabledForStat",value:function(e){this._purchasedFeatureHandler.isFeatureEnabledForStat(e)}},{key:"isSearchCloudMessagesEnabled",value:function(){this._purchasedFeatureHandler.isSearchCloudMessagesEnabled()}},{key:"get",value:function(e){return this._m.get(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler.clear()}}]),Ar),ir=(r(br,bn),ws=g(br),a(br,[{key:"registerPlugin",value:function(e){var t,n,o,i,a,s,r,c,u,l,d,p,h;Y?(this._offlinePushPlugin=e["tim-offline-push-plugin"],t=(h=e.offlinePushConfig||{}).huaweiBusinessID,n=h.xiaomiBusinessID,o=h.xiaomiAppID,i=h.xiaomiAppKey,a=h.meizuBusinessID,s=h.meizuAppID,r=h.meizuAppKey,c=h.vivoBusinessID,u=h.oppoBusinessID,l=h.oppoAppKey,d=h.oppoAppSecret,p=h.honorBusinessID,h=h.iosBusinessID,this._androidPushConfig.huaweiPushBussinessId=t,this._androidPushConfig.xiaomiPushBussinessId=n,this._androidPushConfig.xiaomiPushAppId=o,this._androidPushConfig.xiaomiPushAppKey=i,this._androidPushConfig.meizuPushBussinessId=a,this._androidPushConfig.meizuPushAppId=s,this._androidPushConfig.meizuPushAppKey=r,this._androidPushConfig.vivoPushBussinessId=c,this._androidPushConfig.oppoPushBussinessId=u,this._androidPushConfig.oppoPushAppKey=l,this._androidPushConfig.oppoPushAppSecret=d,this._androidPushConfig.honorPushBussinessId=p,new Jn("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!ut(this._offlinePushPlugin))).end(!0),Ae.l("".concat(this._n,".").concat("registerPlugin"," ok. offlinePushConfig:").concat(JSON.stringify(e.offlinePushConfig))),this._iosBusinessID=h,this._setAppShowListener()):this.warn("OfflinePushInUniapp")}},{key:"init",value:function(){this._isWebUniapp=this.getUniAppPlatform(),this._getDeviceToken()}},{key:"_getDeviceToken",value:function(){var e,t=this,n="".concat(this._n,".").concat("_getDeviceToken");Ye(this._offlinePushPlugin.getDeviceToken)?(e="androidPushConfig:".concat(JSON.stringify(this._androidPushConfig),", iosBusinessID:").concat(this._iosBusinessID),Ae.l("".concat(n," start. ").concat(e)),new Jn("_getDeviceToken").setMessage("".concat(e)).end(!0),this._offlinePushPlugin.getDeviceToken(this._androidPushConfig,(function(o){var i,a,s,r,c=new Jn("getDeviceTokenRes"),u=o.code,l=o.msg;0===u?(i=(r=o.data).deviceToken,a=r.deviceBrand,s=r.deviceType,r=r.bussinessId,t._deviceToken=i,t._businessID=r||t._iosBusinessID,e="deviceToken:".concat(i,", deviceBrand:").concat(a||s,", businessID:").concat(t._businessID),Ae.l("".concat(n," ok. ").concat(e)),c.setMessage(e).end(!0),t._setToken()):(c.setMessage("code:".concat(u,", msg:").concat(l)).end(!0),Ae.e("".concat(n," failed. error:"),o))}))):Ae.e("".concat(n," getDeviceToken is not a function"))}},{key:"canIUseOfflinePush",value:function(){return Y&&!ut(this._offlinePushPlugin)}},{key:"_setAppShowListener",value:function(){var e=this,t="".concat(this._n,".").concat("_setAppShowListener");ut(this._offlinePushPlugin)?Ae.e("".concat(t," offlinePushPlugin is undefined")):Ye(this._offlinePushPlugin.setAppShowListener)?(new Jn("_setAppShowListener").end(!0),Ae.l("".concat(t," start")),this._offlinePushPlugin.setAppShowListener((function(n){n=(n||{}).appShow,new Jn("setAppShowListenerRes").setMessage("appShow:".concat(n)).end(!0),Ae.l("".concat(t," ok. appShow:").concat(n)),e._m.isReady()&&(0===n?(e._getConvUnreadCount(),e._onBackground()):1===n&&e._onForeground())}))):Ae.e("".concat(t," setAppShowListener is not a function"))}},{key:"getDeviceBrand",value:function(){var e;if(!ut(this._offlinePushPlugin)&&Ye(this._offlinePushPlugin.getDeviceType))return e=(this._offlinePushPlugin.getDeviceType()||{}).deviceType,Ae.l("".concat(this._n,".getDeviceBrand ok. deviceType:").concat(e)),e}},{key:"_setToken",value:function(){var e="".concat(this._n,"._setToken"),t=this.get(12),n=1,o="",i="",a=(Ve(this._deviceToken)&&(n=0),this.getUniAppPlatform()),s=this.getDeviceBrand(),r=(a===A.IOS||a===A.IPAD||a===A.MAC?i=this._deviceToken:a===A.ANDROID&&(o=this._deviceToken),new Jn("offlinePushSetToken"));return a="deviceToken:".concat(i||o,", businessID:").concat(this._businessID,", ")+"deviceBrand:".concat(s,", isWebUniapp:").concat(this._isWebUniapp,", pushMsg:").concat(n,", platform:").concat(a),r.setMessage("".concat(a)),Ae.l("".concat(e," ").concat(a)),this.req({P:Gn.SET_TOKEN,data:{tokenID:o,pushMsg:n,sdkAppID:t.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:s,deviceToken:i,isWebUniapp:this._isWebUniapp}}).then((function(t){return r.end(),Ae.l("".concat(e," ok")),t})).catch((function(t){return r.setError(t).end(),Ae.e("".concat(e," failed. error:"),t),yn(t)}))}},{key:"_getConvUnreadCount",value:function(){var e=this;this._c2cUnreadCount=0,this._groupUnreadCount=0,this.get(11).getLocalConvList().forEach((function(t){t.type===E.CONV_C2C&&(e._c2cUnreadCount+=t.unreadCount),t.type===E.CONV_GROUP&&(e._groupUnreadCount+=t.unreadCount)}))}},{key:"_onBackground",value:function(){var e=this,t="".concat(this._n,".").concat("_onBackground"),n=new Jn("_onBackground");this.req({P:Gn.STAT_BACKGROUND,data:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then((function(o){return n.setMessage("c2cUnreadCount: ".concat(e._c2cUnreadCount,", groupUnreadCount: ").concat(e._groupUnreadCount)).end(),Ae.l("".concat(t," ok")),o})).catch((function(e){n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e)}))}},{key:"_onForeground",value:function(){var e="".concat(this._n,".").concat("_onForeground"),t=new Jn("_onForeground");this.req({P:Gn.STAT_FOREGROUND,data:{isWebUniapp:this._isWebUniapp}}).then((function(n){return t.end(),Ae.l("".concat(e," ok")),n})).catch((function(n){t.setError(n).end(),Ae.e("".concat(e," failed. error:"),n)}))}},{key:"getUniAppPlatform",value:function(){var e=uni.getSystemInfoSync().platform,t=this.getDeviceBrand();return"ios"===e?A.IOS:"android"===e?A.ANDROID:1002===t?A.IPAD:1001===t?A.MAC:void 0}},{key:"reset",value:function(){this._deviceToken="",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,Ae.l("".concat(this._n,".reset"))}}]),br),ar=(r(Lr,bn),Os=g(Lr),a(Lr,[{key:"registerPlugin",value:function(e){var t,n,o;Y?(t="".concat(this._n,".").concat("registerPlugin"),this._pushPlugin=e["tim-push"],this._getDeviceInfo(),n=(o=e.pushConfig||{}).androidConfig,o=o.iOSConfig,$e(n)&&(this._androidPushConfig=n[this._deviceInfo.packageName]),n=(o||{}).iOSBusinessID,this._iOSBusinessID=n,o=!ut(this._pushPlugin),new Jn("registerPlugin").setMessage(this._pluginName).setMoreMessage("isExisted:".concat(o)).end(!0),Ae.l("".concat(t," ok. pushConfig:").concat(JSON.stringify(e.pushConfig))),o?(this._setAppShowListener(),this._setPushEventReportListener()):Ae.e("".concat(t," ").concat(this._pluginName," is undefined"))):this.warn("TIMPushInUniapp")}},{key:"init",value:function(){this._isWebUniapp=this.getUniAppPlatform(),this._reportEventCacheList(),this._getDeviceToken(),this.get(27).isFeatureEnabledForStat(Math.pow(2,41))}},{key:"_reportEventCacheList",value:function(){var e=this,n="".concat(this._n,".").concat("_reportEventCacheList");Ye(this._pushPlugin.getPushEventCacheList)?(new Jn("_reportEventCacheList").end(!0),this._pushPlugin.getPushEventCacheList((function(o){var i=o.code,a=o.data.eventList,s=new Jn("getPushEventCacheListRes");if(s.setCode(i),0!==i)s.setMessage("res:".concat(JSON.stringify(o))).end(!0),Ae.e("".concat(n," failed. error:").concat(JSON.stringify(o)));else{i=a.length<10?"eventList:".concat(JSON.stringify(a)):"eventList.length:".concat(a.length),Ae.l("".concat(n," ok. ").concat(i)),s.setMessage(i).end(!0);for(var r=t(t({},o.data),{},{eventList:[]});0<a.length;)r.eventList=a.splice(0,40),e._pushReport(r)}}))):Ae.e("".concat(this._pluginName,".getPushEventCacheList is not a function"))}},{key:"_getDeviceToken",value:function(){var e,t=this,n="".concat(this._n,".").concat("_getDeviceToken");Ye(this._pushPlugin.getDeviceToken)?(e="androidPushConfig:".concat(JSON.stringify(this._androidPushConfig)," iOSBusinessID:").concat(this._iOSBusinessID),Ae.l("".concat(n," start. ").concat(e)),new Jn("_getDeviceToken").setMessage("".concat(e)).end(!0),this._pushPlugin.getDeviceToken(this._androidPushConfig,(function(o){var i,a,s,r=o.code,c=o.msg,u=new Jn("getDeviceTokenRes");u.setCode(r),0===r?(i=(r=o.data).deviceToken,a=r.deviceBrand,s=r.deviceType,r=r.bussinessId,t._deviceToken=i,t._businessID=r||t._iOSBusinessID,e="deviceToken:".concat(i," deviceBrand:").concat(a||s," businessID:").concat(t._businessID),Ae.l("".concat(n," ok. ").concat(e)),u.setMessage(e).end(!0),t._setToken()):(u.setMessage(c).end(!0),Ae.e("".concat(n," failed. error:").concat(JSON.stringify(o))))}))):Ae.e("".concat(this._pluginName,".getDeviceToken is not a function"))}},{key:"_getDeviceInfo",value:function(){var e,n,o,i,a="".concat(this._n,".").concat("_getDeviceInfo");Ye(this._pushPlugin.getDeviceInfo)?(i=(e=this._pushPlugin.getDeviceInfo()).code,n=e.data,(o=new Jn("_getDeviceInfo")).setCode(i),0===i?(this._deviceInfo=t(t({},this._deviceInfo),n),this._deviceInfo.pushVersion||(this._deviceInfo.pushVersion="1.0.1"),i="deviceInfo:".concat(JSON.stringify(this._deviceInfo)),Ae.l("".concat(a," ok. ").concat(i)),o.setMessage(i).end(!0)):(o.setMessage("deviceInfoRes:".concat(JSON.stringify(e))).end(!0),Ae.e("".concat(a," failed. error:").concat(JSON.stringify(e))))):Ae.e("".concat(this._pluginName,".getDeviceInfo is not a function"))}},{key:"canIUseTIMPush",value:function(){return Y&&!ut(this._pushPlugin)}},{key:"_setAppShowListener",value:function(){var e=this,t="".concat(this._n,".").concat("_setAppShowListener");Ye(this._pushPlugin.setAppShowListener)?(new Jn("_setAppShowListener").end(!0),Ae.l("".concat(t," start")),this._pushPlugin.setAppShowListener((function(n){n=(n||{}).appShow,new Jn("setAppShowListenerRes").setMessage("appShow:".concat(n)).end(!0),Ae.l("".concat(t," ok. appShow:").concat(n)),e._m.isReady()&&(0===n?(e._getConvUnreadCount(),e._onBackground()):1===n&&e._onForeground())}))):Ae.e("".concat(this._pluginName,".setAppShowListener is not a function"))}},{key:"_setPushEventReportListener",value:function(){var e=this,t="".concat(this._n,".").concat("_setPushEventReportListener");Ye(this._pushPlugin.setPushEventReportListener)?(new Jn("_setPushEventReportListener").end(!0),this._pushPlugin.setPushEventReportListener((function(n){var o=n.code,i=n.data,a=i.eventList,s=new Jn("setPushEventReportListenerRes");s.setCode(o),0===o?(o="eventList:".concat(JSON.stringify(a)),Ae.l("".concat(t," ok. ").concat(o)),s.setMessage(o).end(!0),e._m.isReady()&&We(a)&&0<a.length&&e._pushReport(i)):(s.setMessage("res:".concat(JSON.stringify(n))).end(!0),Ae.e("".concat(t," failed. error:").concat(JSON.stringify(n))))}))):Ae.e("".concat(this._pluginName,".setPushEventReportListener is not a function"))}},{key:"getDeviceBrand",value:function(){var e;if(!ut(this._pushPlugin)&&Ye(this._pushPlugin.getDeviceType))return e=(this._pushPlugin.getDeviceType()||{}).deviceType,Ae.l("".concat(this._n,".getDeviceBrand ok. deviceType:").concat(e)),e}},{key:"_setToken",value:function(){var e="".concat(this._n,".").concat("_setToken"),n=this.get(12),o=1,i="",a="",s=(Ve(this._deviceToken)&&(o=0),this.getUniAppPlatform()),r=this.getDeviceBrand(),c=(s===A.IOS||s===A.IPAD||s===A.MAC?a=this._deviceToken:s===A.ANDROID&&(i=this._deviceToken),s=t({tokenID:i,pushMsg:o,sdkAppID:n.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:r,deviceToken:a,isWebUniapp:this._isWebUniapp},this._deviceInfo),new Jn("_setToken"));i="data:".concat(JSON.stringify(s)),c.setMessage("".concat(i)),Ae.l("".concat(e," ").concat(i)),this.req({P:Gn.SET_TOKEN,data:s}).then((function(){c.end(),Ae.w("".concat(e," ok"))})).catch((function(t){c.setError(t).end(),Ae.e("".concat(e," failed. error:"),t),yn(t)}))}},{key:"_getConvUnreadCount",value:function(){var e=this;this._c2cUnreadCount=0,this._groupUnreadCount=0,this.get(11).getLocalConvList().forEach((function(t){t.type===E.CONV_C2C&&(e._c2cUnreadCount+=t.unreadCount),t.type===E.CONV_GROUP&&(e._groupUnreadCount+=t.unreadCount)}))}},{key:"_onBackground",value:function(){var e=this,t="".concat(this._n,".").concat("_onBackground"),n=new Jn("_onBackground");this.req({P:Gn.STAT_BACKGROUND,data:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then((function(){n.setMessage("c2cUnreadCount:".concat(e._c2cUnreadCount," groupUnreadCount:").concat(e._groupUnreadCount)).end(),Ae.l("".concat(t," ok"))})).catch((function(e){n.setError(e).end(),Ae.e("".concat(t," failed. error:"),e)}))}},{key:"_onForeground",value:function(){var e="".concat(this._n,".").concat("_onForeground"),t=new Jn("_onForeground");this.req({P:Gn.STAT_FOREGROUND,data:{isWebUniapp:this._isWebUniapp}}).then((function(){t.end(),Ae.l("".concat(e," ok"))})).catch((function(n){t.setError(n).end(),Ae.e("".concat(e," failed. error:"),n)}))}},{key:"_pushReport",value:function(e){var t=this,n="".concat(this._n,".").concat("_pushReport"),o=new Jn("_pushReport");this.req({P:Gn.PUSH_REPORT,data:{eventList:e.eventList}}).then((function(){o.end(),t._notifyReportSuccess(e)})).catch((function(e){o.setError(e).end(),Ae.e("".concat(n," failed. error:"),e)}))}},{key:"_notifyReportSuccess",value:function(e){!ut(this._pushPlugin)&&Ye(this._pushPlugin.notifyReportSuccess)&&(this._pushPlugin.notifyReportSuccess(e),Ae.l("".concat(this._n,"._notifyReportSuccess ok")))}},{key:"getUniAppPlatform",value:function(){var e=uni.getSystemInfoSync().platform,t=this.getDeviceBrand();return"ios"===e?A.IOS:"android"===e?A.ANDROID:1002===t?A.IPAD:1001===t?A.MAC:void 0}},{key:"reset",value:function(){this._deviceToken="",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,Ae.l("".concat(this._n,".reset"))}}]),Lr),sr=(r(kr,bn),Rs=g(kr),a(kr,[{key:"init",value:function(){var e=this.get(18).getPlugin("tim-profanity-filter-plugin");e&&(this._plugin=new e({logger:Ae,isArray:We,isMap:Be,isDevMode:this.isDevMode()}),this._getLexicon())}},{key:"onCheckTimer",value:function(){this._plugin&&this._canIUseLexicon&&this.isLoggedIn()&&!this._isFetching&&Date.now()>=this._expiredTime&&this._getLexicon()}},{key:"filterMessage",value:function(e,t){var n=!0;if(this._plugin&&this._canIUseLexicon&&(!t||!t.messageControlInfo||!0!==t.messageControlInfo.excludedFromContentModeration)){t=e.type;var o=e.conversationType;if(t===E.MSG_TEXT||t===E.MSG_CUSTOM){var i,a="".concat(this._n,".filterMessage");if(Ae.l("".concat(a)),t===E.MSG_TEXT){if(o===E.CONV_C2C?i="c2c_text_message":o===E.CONV_GROUP&&(i="group_text_message"),!this._isConfigOn(i))return n;var s=(r=this._plugin.filter(e.payload.text)).type,r=r.modifiedText;1===s?n=!1:2===s&&(e.payload.text=r)}else if(t===E.MSG_CUSTOM){if(o===E.CONV_C2C?i="c2c_custom_message":o===E.CONV_GROUP&&(i="group_custom_message"),!this._isConfigOn(i))return n;s=this._plugin.filter(e.payload.data),r=this._plugin.filter(e.payload.description),t=this._plugin.filter(e.payload.extension),1===s.type||1===r.type||1===t.type?n=!1:(2===s.type&&(e.payload.data=s.modifiedText),2===r.type&&(e.payload.description=r.modifiedText),2===t.type&&(e.payload.extension=t.modifiedText))}Ae.l("".concat(a," done. isAllowedToSend:").concat(n))}}return n}},{key:"filterText",value:function(e,t){var n="".concat(this._n,".filterText"),o={isAllowedToSend:!0,modifiedText:e};return this._plugin&&this._canIUseLexicon&&this._isConfigOn(t)&&(Ae.l("".concat(n)),e=(t=this._plugin.filter(e)).type,t=t.modifiedText,1===e?o.isAllowedToSend=!1:2===e&&(o.modifiedText=t),Ae.l("".concat(n," done. ret:"),o)),o}},{key:"_getLexicon",value:function(){var e=this,t=new Jn("profanityFilter"),n="".concat(this._n,"._getLexicon");this._isFetching=!0,this.req({P:Gn.GET_PROFANITY_LIST,data:{startIndex:this._startIndex,version:this._version}}).then((function(o){var i=(o=o.data).errorInfo,a=o.filterConfig,s=o.lexicon,r=o.strToken,c=o.completeFlag,u=o.nextStartIndex,l=o.version,d=(o=o.expiredTime,i.errorCode),p=i.errorMessage;return 0!==d?(e._isFetching=!1,Ae.w("".concat(n," failed. error:"),i),void t.setCode(d).setMessage(p).end()):(e._onFilterConfig(a),e._getToken(r),1===c?(Ae.l("".concat(n," done. version:").concat(l," expiredTime:").concat(o)),e._version=l,e._canIUseLexicon=!0,e._isFetching=!1,e._expiredTime=Date.now()+1e3*o,void e._plugin.onLexiconCompleted(s)):(e._startIndex=u,e._plugin.onLexiconSliced(s),void e._getLexicon()))})).catch((function(o){t.setError(o).end(),e._isFetching=!1,Ae.l("".concat(n," failed. error:"),o)}))}},{key:"_onFilterConfig",value:function(e){var t=this;Ve(e)||(this._filterConfigMap.clear(),Object.keys(e).forEach((function(n){t._filterConfigMap.set(n,e[n])})),Ae.l("".concat(this._n,"._onFilterConfig. keys:").concat(Array.from(this._filterConfigMap.keys())," values:").concat(Array.from(this._filterConfigMap.values()))))}},{key:"_isConfigOn",value:function(e){return 1===this._filterConfigMap.get(e)}},{key:"_getToken",value:function(e){if(ct(e)){var t=e.length,n="";if(t%2==0)for(var o=0;o<=t-1;o+=2)n=(n+=e[o+1])+e[o];else{for(var i=0;i<t-1;i+=2)n=(n+=e[i+1])+e[i];n+=e[t-1]}this._plugin.onToken(n)}}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._plugin&&(this._plugin.reset(),this._plugin=null),this._filterConfigMap.clear(),this._startIndex=0,this._version=0,this._canIUseLexicon=!1,this._isFetching=!1,this._expiredTime=0}}]),kr),rr=(a(Dr,[{key:"_onCloudConfig",value:function(){var e=this,t=this._m.get(23).getCloudConfig("rtc_cmd");ut(t)||((t=JSON.parse(t)).forEach((function(t){e._TRTCCommandList.includes(t)||e._TRTCCommandList.push(t)})),this._setTRTCCommandMap())}},{key:"_setTRTCCommandMap",value:function(){for(var e,t=0,n=this._TRTCCommandList.length;t<n;t++)e=this._TRTCCommandList[t].split(".")[0],this._TRTCCommandMap.set(e,1)}},{key:"onRoomCustomDataReceived",value:function(e){this._m.getOEmitInst().emit(S.ROOM_CUSTOM_DATA_RECEIVED,e)}},{key:"sendTRTCCustomData",value:function(e){var t=e.serviceCommand,n=(e=e.data,"".concat(P.NAME.TUIROOM_SVR,".*"));return ut(t)||(n=t),this._isValidServiceCommand(n)?this._trans({servcmd:n,data:e}):yn({code:Pn.INVALID_TRTC_CMD})}},{key:"_trans",value:function(e){Ae.d("".concat(this._n,"._trans. options:").concat(JSON.stringify(e)));var t=e.servcmd;return e=e.data,this._m.get(20).trans({servcmd:t,data:ct(e)?JSON.parse(e):e})}},{key:"_isValidServiceCommand",value:function(e){return e.endsWith(".*")?this._TRTCCommandList.includes(e):(e=e.split(".")[0],this._TRTCCommandMap.has(e))}},{key:"isTRTCCommand",value:function(e){return e=e.split(".")[0],this._TRTCCommandMap.has(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Dr),cr=(a(Er,[{key:"_init",value:function(){var e,t=this._getStorageModule().getItem(this.TIM_ERROR_ASSISTANCE,!1);if(t){try{e=JSON.parse(t)}catch(n){this._getStorageModule().removeItem(this.TIM_ERROR_ASSISTANCE,!1),Ae.w("".concat(this._n,"._init error:"),n)}e&&(this._needToUpdate(e)?this._fetch():this._fillMap(e.message))}else this._fetch()}},{key:"_needToUpdate",value:function(e){var t=e.localSavedTime;return e=e.localSavedVersion,t=t&&(new Date).getTime()-t>=this.STORAGE_EXPIRES_TIME,e=!e||"3.4.7"!==e,Ae.l("".concat(this._n,"._needToUpdate isTimeout:").concat(t," isDifferentVersion:").concat(e)),t||e}},{key:"_fetch",value:function(){var e,t,n,o,i,a;this._m.get(12).isPrivateNetWork()||(e="https://web.sdk.qcloud.com/im/download/error-message/v3/0.0.6/tim-error-message.txt",t="application/x-www-form-urlencoded;charset=UTF-8",n="".concat(this._n,"._fetch ok in"),o=this,Z?ne.request({url:e,method:"GET",timeout:3e3,header:{"content-type":t},dataType:"text",success:function(e){o._fillAndSave(e.data),Ae.l("".concat(n," mini program"))},fail:function(){}}):(i=new XMLHttpRequest,a=setTimeout((function(){i.abort()}),3e3),i.onreadystatechange=function(){4===i.readyState&&(clearTimeout(a),200!==i.status&&304!==i.status||(Ae.l("".concat(n," browser")),o._fillAndSave(i.responseText)))},i.open("GET",e,!0),i.setRequestHeader("Content-type",t),i.send()))}},{key:"_fillAndSave",value:function(e){this._fillMap(e),this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE,JSON.stringify({message:e,localSavedTime:(new Date).getTime(),localSavedVersion:"3.4.7"}),!0,!1)}},{key:"_getStorageModule",value:function(){return this._m.get(13)}},{key:"_fillMap",value:function(e){this._map.clear();for(var t,n,o=e.split(";\n"),i=o.length,a=new RegExp(/'/g),s=0;s<i;s++)if(n=o[s].indexOf(":"),t=o[s].slice(0,n),n=o[s].slice(n+1,o[s].length),!t.startsWith("//")){if(ut(n))continue;this._map.set(t,n.replace(a,""))}}},{key:"get",value:function(e){var t=e.isIntl,n=e.key,o=e.replacement1;return e=e.replacement2,t="".concat(n,t?"_en":"_cn"),!this._map.has(t)&&this._map.has(n)&&(t=n),n="",this._map.has(t)&&(n=this._map.get(t),ut(o)||(n=n.replace("$replacement1",o)),ut(e)||(n=n.replace("$replacement2",e))),n}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset"))}}]),Er),ur=(a(Sr,[{key:"onNewMessageList",value:function(e){var t=this;e.forEach((function(e){var n=t.getPayloadData(e);n&&t._handleActionType(n,e)}))}},{key:"onMessageModified",value:function(e){var t=this;e.forEach((function(e){var n=t.getPayloadData(e);n&&t._onInvitationModified(n,e)}))}},{key:"getPayloadData",value:function(e){var t="".concat(this._n,".getPayloadData");e=e.payload.data;try{return JSON.parse(e)}catch(n){return Ae.e("".concat(t," JSON parse error. signalingData:").concat(e)),null}}},{key:"_handleActionType",value:function(e,t){switch(e.actionType){case D.ACTION_TYPE_INVITE:this._onNewInvitationReceived(e,t);break;case D.ACTION_TYPE_REJECT_INVITE:this._onInviteeRejected(e);break;case D.ACTION_TYPE_ACCEPT_INVITE:this._onInviteeAccepted(e);break;case D.ACTION_TYPE_CANCEL_INVITE:this._onInvitationCancelled(e);break;case D.ACTION_TYPE_INVITE_TIMEOUT:this._onInvitationTimeout(e)}}},{key:"_genBaseEmitData",value:function(e){return{inviteID:e.inviteID,inviter:e.inviter,groupID:e.groupID,data:e.data||""}}},{key:"_onNewInvitationReceived",value:function(e,n){var o="".concat(this._n,"._onNewInvitationReceived"),i=e.inviteID,a=e.inviteeList,s=e.groupID,r=e.inviter,c=this._sigM.getMyUserID(),u=a.includes(c),l=e.timeout,d=(Me().getTime()-1e3*n.time)/1e3;0<l&&0<d&&d<l&&(l-=d),o="".concat(o," myselfIncluded:").concat(u," groupID:").concat(s," signalObj:").concat(JSON.stringify(e)),Ae.l("".concat(o," timeout:").concat(l,"s delta:").concat(d,"s")),!(s&&u||!s)||(o=this._sigM.getInviteInfo(i))&&o===e||(o||this._sigM.setInviteInfo(i,t(t({},e),{},{message:n})),this._sigM.emitEvent(D.NEW_INVITATION_RECEIVED,t(t({},this._genBaseEmitData(e)),{},{inviteeList:a})),r!==c&&this._sigM.startTimer(t(t({},e),{},{timeout:l})))}},{key:"_onInviteeRejected",value:function(e){var n="".concat(this._n,"._onInviteeRejected"),o=e.inviteID,i=e.inviter,a=e.groupID,s=this._sigM.hasInviteInfo(o);Ae.l("".concat(n," inviteID:").concat(o," hasInviteID:").concat(s," inviter:").concat(i," groupID:").concat(a)),s&&(this._sigM.updateInviteInfo(e),this._sigM.emitEvent(D.INVITEE_REJECTED,t(t({},this._genBaseEmitData(e)),{},{invitee:e.inviteeList[0]})))}},{key:"_onInviteeAccepted",value:function(e){var n="".concat(this._n,"._onInviteeAccepted"),o=e.inviteID,i=e.inviter,a=e.groupID,s=this._sigM.hasInviteInfo(o);Ae.l("".concat(n," inviteID:").concat(o," hasInviteID:").concat(s," inviter:").concat(i," groupID:").concat(a)),s&&(this._sigM.updateInviteInfo(e),this._sigM.emitEvent(D.INVITEE_ACCEPTED,t(t({},this._genBaseEmitData(e)),{},{invitee:e.inviteeList[0]})))}},{key:"_onInvitationCancelled",value:function(e){var t="".concat(this._n,"._onInvitationCancelled"),n=e.inviteID,o=e.inviter,i=e.groupID,a=this._sigM.hasInviteInfo(n);Ae.l("".concat(t," inviteID:").concat(n," hasInviteID:").concat(a," inviter:").concat(o," groupID:").concat(i)),a&&(this._sigM.deleteInviteInfo(n),this._sigM.emitEvent(D.INVITATION_CANCELLED,this._genBaseEmitData(e)))}},{key:"_onInvitationTimeout",value:function(e){var n="".concat(this._n,"._onInvitationTimeout"),o=e.inviteID,i=e.inviter,a=e.groupID,s=e.inviteeList,r=this._sigM.hasInviteInfo(o);Ae.l("".concat(n," inviteID:").concat(o," hasInviteID:").concat(r," inviter:").concat(i," groupID:").concat(a," data:").concat(e.data)),r&&(this._sigM.updateInviteInfo(e),this._sigM.emitEvent(D.INVITATION_TIMEOUT,t(t({},this._genBaseEmitData(e)),{},{inviteeList:s,isSelfTimeout:!1})))}},{key:"_onInvitationModified",value:function(e,n){var o="".concat(this._n,"._onInvitationModified"),i=e.inviteID,a=e.data;Ae.l("".concat(o," inviteID:").concat(i," data:").concat(a)),this._sigM.setInviteInfo(i,t(t({},e),{},{message:n})),this._sigM.emitEvent(D.INVITATION_MODIFIED,{inviteID:i,data:a})}}]),Sr),lr=(a(Tr,[{key:"generateInviteID",value:function(){var e,t=(t=Ls)((e=ks)(32),8)+"-"+t(e(16),4)+"-"+t(16384|e(12),4)+"-"+t(32768|e(14),4)+"-"+t(e(48),12);return Ae.l("".concat(this._n,".generateInviteID inviteID:").concat(t)),t}},{key:"createInviteInfo",value:function(e){var n=this.generateInviteID(),o=(e=this.createInviteCustomData(t(t({},e),{},{inviteID:n}))).groupID,i=e.inviteeList;return o=o||i[0],{customData:e,message:this._sigM.createSignaling(e,o),inviteID:n}}},{key:"_genBaseCustomData",value:function(e){var t=e.data,n=e.inviteID;return{businessID:1,timeout:0,data:void 0===t?"":t,inviteID:void 0===n?"":n,groupID:void 0===(e=e.groupID)?"":e}}},{key:"createInviteCustomData",value:function(e){var n=e.userID,o=void 0===(o=e.timeout)?0:o,i=void 0===(i=e.groupID)?"":i,a=this._sigM.getMyUserID();return a=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_INVITE,inviter:a,inviteeList:i?e.inviteeList:[n],timeout:o}),Ae.l("".concat(this._n,".createInviteCustomData customData:"),a),a}},{key:"createCancelCustomData",value:function(e){var n,o="".concat(this._n,".createCancelCustomData"),i=e.inviteID,a=this._sigM.getMyUserID(),s=(i=this._sigM.getInviteInfo(i)).inviteeList,r=i.groupID;return(i=i.inviter)===a?n=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_CANCEL_INVITE,groupID:r,inviter:a,inviteeList:s}):Ae.e("".concat(o," unmatched inviter:").concat(i," and my userID:").concat(a)),Ae.l("".concat(o," customData:"),n),n}},{key:"createAcceptCustomData",value:function(e){var n,o="".concat(this._n,".createAcceptCustomData"),i=e.inviteID,a=this._sigM.getMyUserID(),s=this._sigM.getInviteInfo(i),r=s.inviter,c=s.groupID;return s.inviteeList.includes(a)?n=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_ACCEPT_INVITE,groupID:c,inviter:r,inviteeList:[a]}):Ae.e("".concat(o," userID:").concat(a," not in inviteeList. inviteID:").concat(i," groupID:").concat(c)),Ae.l("".concat(o," customData:"),n),n}},{key:"createRejectCustomData",value:function(e){var n,o="".concat(this._n,".createRejectCustomData"),i=e.inviteID,a=this._sigM.getMyUserID(),s=this._sigM.getInviteInfo(i),r=s.inviter,c=s.groupID;return s.inviteeList.includes(a)?n=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_REJECT_INVITE,groupID:c,inviter:r,inviteeList:[a]}):Ae.e("".concat(o," userID:").concat(a," not in inviteeList. inviteID:").concat(i," groupID:").concat(c)),Ae.l("".concat(o," customData:"),n),n}},{key:"createTimeoutCustomData",value:function(e){var n="".concat(this._n,".createTimeoutCustomData"),o=e.inviteeList,i=e.inviter,a=void 0!==(a=e.isInviter)&&a,s=this._sigM.getMyUserID();return e=t(t({},this._genBaseCustomData(e)),{},{actionType:D.ACTION_TYPE_INVITE_TIMEOUT,inviter:i,inviteeList:a?o:[s]}),Ae.l("".concat(n," customData:"),e),e}}]),Tr),dr=(a(Cr,[{key:"setCloudConfig",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:20,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:300;this.COUNT=e,this.EXPIRED_TIME=t,Ae.l("".concat(this._n,".setCloudConfig count:").concat(e,", time:").concat(t))}},{key:"getHistorySignaling",value:function(){var e=this,t=this._sigM.get(11).getLocalConvList();Ve(t)||(this._getC2CSignalingList(),t=this._getValidGroupConvList(t),this._getGroupSignalingList(t).then((function(t){e._handleSignalingList(t)})))}},{key:"_getC2CSignalingList",value:function(){var e=this._sigM.get(6).getMessageListFromUnreadDB();e=this._sigM.filterMessageList(e),this._getRelatedToMeMap(e)}},{key:"_getGroupSignalingList",value:function(e){var t=this;return 0===(e=this._createPromiseList(e)).length?Promise.resolve(this._sortSignaling(this._relatedToMeMap)):this._concurrentGetMessageList(e).then((function(e){var n=new Map;return e.forEach((function(e){e=e.list,e=t._getRelatedToMeMap(e),n=new Map([].concat(m(n),m(e)))})),t._sortSignaling(n)}))}},{key:"_handleSignalingList",value:function(e){Ve(e)||this._sigM.onNewMessageList(e)}},{key:"_getValidGroupConvList",value:function(e){for(var t=[],n=0,o=e.length;n<o;n++){var i=(s=e[n]).type,a=s.unreadCount,s=s.lastMessage;i=i===E.CONV_GROUP,s=this._isNotExpired(s),i&&a&&s&&t.push(e[n])}return t}},{key:"_isNotExpired",value:function(e){return!(!e||!e.lastTime)&&e.lastTime>Te()-this.EXPIRED_TIME}},{key:"_createPromiseList",value:function(e){for(var t=[],n=0;n<e.length;n++){var o=(i=e[n]).conversationID,i=(i=i.unreadCount)<this.COUNT?i:this.COUNT;this._map.set(o,{msgCount:i,list:[]}),i=this._sigM.get(11).getMessageList({conversationID:o}),t.push(i)}return t}},{key:"_concurrentGetMessageList",value:function(e){var t=this,n=[];return Promise.all(e).then((function(e){for(var o=0;o<e.length;o++){var i=(a=e[o]).code,a=a.data;0===i&&0!==a.messageList.length&&(t._handleMessageList(a.messageList),i=t._relayGetMessageList(a))&&n.push(i)}return 0<n.length?t._concurrentGetMessageList(n):t._map}))}},{key:"_relayGetMessageList",value:function(e){var t,n=e.messageList,o=e.nextReqMessageID;return e=e.isCompleted,0===n.length||(n=n[0].conversationID,0===(t=this._map.get(n).msgCount))||e?null:this._sigM.get(11).getMessageList({conversationID:n,nextReqMessageID:o,count:t})}},{key:"_handleMessageList",value:function(e){var t=e.length,n=e[0].conversationID,o=(i=this._map.get(n)).msgCount,i=i.list;this._map.set(n,{msgCount:0<o-t?o-t:0,list:i.concat(this._sigM.filterMessageList(e))})}},{key:"_getRelatedToMeMap",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];this._saveRelatedToMe(n)}return this._relatedToMeMap}},{key:"_saveRelatedToMe",value:function(e){var t,n=(t=this._sigM.getPayloadData(e)||{}).actionType,o=void 0===(t=t.inviteID)?"":t;switch(void 0===n?"":n){case D.ACTION_TYPE_INVITE:this._setHistoryInvite(e);break;case D.ACTION_TYPE_REJECT_INVITE:case D.ACTION_TYPE_ACCEPT_INVITE:this._updateHistoryInvite(e);break;case D.ACTION_TYPE_CANCEL_INVITE:this._delHistoryInvite(o);break;case D.ACTION_TYPE_INVITE_TIMEOUT:this._updateHistoryInvite(e)}}},{key:"_setHistoryInvite",value:function(e){var n=this._sigM.getPayloadData(e)||{},o=void 0===(o=n.inviteID)?"":o,i=void 0===(i=n.inviteeList)?[]:i,a=void 0===(a=n.timeout)?0:a,s=this._sigM.getMyUserID();i.includes(s)&&(i=Te()-e.time,0<a&&a<i&&0!==a||this._relatedToMeMap.set(o,t(t({},n),{},{messageList:[e]})))}},{key:"_delHistoryInvite",value:function(e){this._relatedToMeMap.has(e)&&this._relatedToMeMap.delete(e)}},{key:"_updateHistoryInvite",value:function(e){var t=void 0===(t=(i=this._sigM.getPayloadData(e)||{}).inviteID)?"":t,n=void 0===(i=i.inviteeList)?[]:i;if(this._relatedToMeMap.has(t)){for(var o=(i=this._relatedToMeMap.get(t)).inviteeList,i=i.messageList,a=0;a<n.length;a++){var s=n[a];o.includes(s)&&o.splice(o.indexOf(s),1)}0===o.length?this._delHistoryInvite(t):i.push(e)}else this._delHistoryInvite(t)}},{key:"_sortSignaling",value:function(e){var t=[];return e.forEach((function(e){t=[].concat(m(t),m(e.messageList))})),t.sort((function(e,t){return e.time-t.time}))}},{key:"reset",value:function(){this._map.clear(),this._relatedToMeMap.clear()}}]),Cr),pr=a((function e(t,n){o(this,e),this.businessID=t.businessID||1,this.inviteID=t.inviteID,this.groupID=t.groupID||"",this.inviter=t.inviter||"",this.inviteeList=t.inviteeList||[],this.data=t.data||"",this.actionType=t.actionType||D.ACTION_TYPE_INVITE,this.timeout=t.timeout||0})),hr=["message"],fr=["message"],gr=(r(Mr,bn),As=g(Mr),a(Mr,[{key:"onC2CUnreadHandleCompleted",value:function(){this._isC2CUnreadHandleCompleted=!0,this._isCloudConfigCompleted&&this._isConvSyncCompleted&&!this._isSyncCompleted&&this.onReady()}},{key:"onConvSyncCompleted",value:function(){this._isConvSyncCompleted=!0,this._isC2CUnreadHandleCompleted&&this._isCloudConfigCompleted&&!this._isSyncCompleted&&this.onReady()}},{key:"onCloudConfig",value:function(){this._isCloudConfigCompleted=!0;var e=this.getCloudConfig("history_s_count"),t=this.getCloudConfig("history_s_time");ut(e)||(e=Number(e)),ut(t)||(t=Number(t)),this._historySignalingHandler.setCloudConfig(e,t),this._isC2CUnreadHandleCompleted&&this._isConvSyncCompleted&&!this._isSyncCompleted&&this.onReady()}},{key:"_isListenerExisted",value:function(){return-1<this._m.getOEmitInst().eventNames().indexOf(D.NEW_INVITATION_RECEIVED)}},{key:"onReady",value:function(){this._isSyncCompleted=!0;var e=this._isListenerExisted();Ae.l("".concat(this._n,".onReady. isListenerExisted: ").concat(e)),e&&this._historySignalingHandler.getHistorySignaling()}},{key:"onNewMessageList",value:function(e){if(0<(e=this.filterMessageList(e)).length)return this._remoteSignalingHandler.onNewMessageList(e)}},{key:"onMessageModified",value:function(e){if(0<(e=this.filterMessageList(e)).length)return this._remoteSignalingHandler.onMessageModified(e)}},{key:"hasInviteInfo",value:function(e){return this._inviteInfoMap.has(e)}},{key:"getInviteInfo",value:function(e){return this._inviteInfoMap.get(e)}},{key:"setInviteInfo",value:function(e,n){var o=n.message;n=h(n,hr),Ae.l("".concat(this._n,".setInviteInfo inviteID:").concat(e," data:"),n),this._inviteInfoMap.set(e,t(t({},n),{},{message:o}))}},{key:"deleteInviteInfo",value:function(e){this.hasInviteInfo(e)&&(Ae.l("".concat(this._n,".deleteInviteInfo inviteID:").concat(e,".")),this._inviteInfoMap.delete(e))}},{key:"updateInviteInfo",value:function(e){var t="".concat(this._n,".updateInviteInfo"),n=e.inviteID,o=e.inviter,i=e.inviteeList;e=e.groupID,Ae.l("".concat(t," inviteID:").concat(n," inviter:").concat(o," groupID:").concat(e)),e&&this.hasInviteInfo(n)&&(o=i[0],(e=this.getInviteInfo(n).inviteeList).includes(o)&&(e.splice(e.indexOf(o),1),Ae.l("".concat(t," remove ").concat(o,". localInviteeList.length:").concat(e.length))),0!==e.length)||this.deleteInviteInfo(n)}},{key:"canIUseSignaling",value:function(){return this._canIUseSignaling}},{key:"emitEvent",value:function(e,t){this.emitOEvt(e,t)}},{key:"addSignalingListener",value:function(e,t,n){this._canIUseSignaling||(this._canIUseSignaling=!0),this._m.getOEmitInst().on(e,t,n)}},{key:"removeSignalingListener",value:function(e,t,n){this._m.getOEmitInst().off(e,t,n),this._isListenerExisted()||(this._canIUseSignaling=!1)}},{key:"invite",value:function(e){var n=this,o="".concat(this._n,".").concat("invite"),i=this._localSignalingHandler.createInviteInfo(e),a=i.message,s=i.customData,r=i.inviteID;return Ae.l("".concat(o," options:").concat(JSON.stringify(e)," inviteID:").concat(r)),this.sendSignaling(a,e).then((function(e){return e&&0===e.code?(n.setInviteInfo(r,t(t({},s),{},{message:a})),n.startTimer(t(t({},s),{},{inviteID:r})),t(t({},e),{},{inviteID:r})):e})).catch((function(e){return yn(e)}))}},{key:"inviteSync",value:function(e,n,o){var i=this,a="".concat(this._n,".").concat("inviteSync"),s=this._localSignalingHandler.createInviteInfo(e),r=s.message,c=s.customData,u=s.inviteID;return Ae.l("".concat(a," options:").concat(JSON.stringify(e)," inviteID:").concat(u)),this.sendSignaling(r,e).then((function(e){if(e&&0===e.code)return i.setInviteInfo(u,t(t({},c),{},{message:r})),i.startTimer(t(t({},c),{},{inviteID:u})),n&&n({inviteID:u}),{inviteID:u};o&&o(0===e.code,e.message||"")})).catch((function(e){return o&&o(e.code,e.message),yn(e)})),u}},{key:"_handleImResponse",value:function(e,t,n){t&&0===t.code&&(this._isHandling=!1,n?this.deleteInviteInfo(e.inviteID):this.updateInviteInfo(e))}},{key:"cancel",value:function(e){var n=this,o="".concat(this._n,".").concat("cancel");if(Ae.l("".concat(o," options:").concat(JSON.stringify(e))),!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.INVALID_CANCEL_MESSAGE});this._isHandling=!0;var i,a=this._localSignalingHandler.createCancelCustomData(e);return a?(o=a.groupID,i=a.inviteeList,o=o||i[0],i=this.createSignaling(a,o),this.sendSignaling(i,e).then((function(o){return n._handleImResponse(a,o,!0),0===o.code?t(t({},o),{},{inviteID:e.inviteID}):o})).catch((function(e){return yn(e)}))):(this._isHandling=!1,yn({code:Pn.SIGNALING_NO_PERMISSION}))}},{key:"accept",value:function(e){var n=this,o="".concat(this._n,".").concat("accept");if(Ae.l("".concat(o," options:").concat(JSON.stringify(e))),!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.SIGNALING_INVALID_INVITE_ID});this._isHandling=!0;var i=this._localSignalingHandler.createAcceptCustomData(e);return i?(o=this.createSignaling(i),this.sendSignaling(o,e).then((function(o){return n._handleImResponse(i,o),0===o.code?t(t({},o),{},{inviteID:e.inviteID}):o})).catch((function(e){return yn(e)}))):(this._isHandling=!1,yn({code:Pn.SIGNALING_NO_PERMISSION}))}},{key:"reject",value:function(e){var n=this,o="".concat(this._n,".").concat("reject");if(Ae.l("".concat(o," options:").concat(JSON.stringify(e))),!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.SIGNALING_INVALID_INVITE_ID});this._isHandling=!0;var i=this._localSignalingHandler.createRejectCustomData(e);return i?(o=this.createSignaling(i),this.sendSignaling(o,e).then((function(o){return n._handleImResponse(i,o,!0),0===o.code?t(t({},o),{},{inviteID:e.inviteID}):o})).catch((function(e){return yn(e)}))):(this._isHandling=!1,yn({code:Pn.SIGNALING_NO_PERMISSION}))}},{key:"getSignalingInfo",value:function(e){var t="".concat(this._n,".getSignalingInfo"),n=e.ID,o=e.from,i=e.to,a=this._filterSignaling(e),s=null;return a&&(e=this.getPayloadData(e),s=new pr(e)),e=a?"actionType:".concat(s.actionType):"",Ae.l("".concat(t," messageID:").concat(n," from:").concat(o," to:").concat(i," ")+"".concat(e," isSignaling:").concat(a)),s}},{key:"modifyInvitation",value:function(e){var n=this,o=e.inviteID,i=e.data;if(!this.hasInviteInfo(e.inviteID)||this._isHandling)return yn({code:Pn.SIGNALING_INVALID_INVITE_ID});this._isHandling=!0;var a=(e=this.getInviteInfo(o)).message,s=h(e,fr),r=a.payload.data;return s.data=i,a.payload.data=JSON.stringify(s),this.get(2).modifyRemoteMessage(a).then((function(e){return n.setInviteInfo(o,t(t({},s),{},{message:a})),n._isHandling=!1,e})).catch((function(e){return n._isHandling=!1,a.payload.data=r,yn(e)}))}},{key:"_genMsgCtrlInfo",value:function(){var e=void 0===(e=(i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).data)?"":e,t=i.onlineUserOnly,n=void 0===(n=i.inviteID)?"":n,o=i.offlinePushInfo,i=i.actionType,a={_onlineOnlyFlag:!1};return n={onlineUserOnly:(a=n&&this.getInviteInfo(n)?this.getInviteInfo(n).message:a)._onlineOnlyFlag||t||!1,offlinePushInfo:o,messageControlInfo:{excludedFromContentModeration:!0,excludedFromUnreadCount:!1,excludedFromLastMessage:!1}},i===D.ACTION_TYPE_INVITE_TIMEOUT?(a=!!e.match(/excludeTimeoutSignalingFromHistoryMessage/),n.messageControlInfo.excludedFromUnreadCount=a,n.messageControlInfo.excludedFromLastMessage=a):(t=!!e.match(/excludeFromHistoryMessage/),o=!!e.match(/excludeOriginalSignalingFromHistoryMessage/),n.messageControlInfo.excludedFromUnreadCount=t||o,n.messageControlInfo.excludedFromLastMessage=t||o),n}},{key:"sendSignaling",value:function(e,t){var n=this;return this.get(2).sendMessageInstance(e,this._genMsgCtrlInfo(t)).catch((function(e){return n._isHandling=!1,yn(e)}))}},{key:"filterMessageList",value:function(e){var t=this;return e.filter((function(e){return t._filterSignaling(e)}))}},{key:"getPayloadData",value:function(e){return this._remoteSignalingHandler.getPayloadData(e)}},{key:"createSignaling",value:function(e,t){var n=e.groupID,o=e.inviter;return t={to:t||n||o,conversationType:n?E.CONV_GROUP:E.CONV_C2C,priority:E.MSG_PRIORITY_HIGH,payload:{data:JSON.stringify(e)}},o=this.get(2).createCustomMessage(t),Ae.l("".concat(this._n,".createSignaling. message:"),o),o}},{key:"_filterSignaling",value:function(e){var t,n,o=!1;return e.type&&e.type===E.MSG_CUSTOM&&(t=e.cloudCustomData,e=void 0===(e=e.payload.data)?"":e,t=(void 0===t?"":t).match(/"type":"tsignaling"/),n=e.match(/inviteID/),e=e.match(/actionType/),o=t||n&&e),!!o}},{key:"startTimer",value:function(e){var t,n,o,i=this,a="".concat(this._n,".startTimer"),s=e.timeout,r=e.inviteID,c=e.inviter,u=e.groupID,l=c===this.getMyUserID();Ae.l("".concat(a," timeout:").concat(s," isInviter:").concat(l," groupID:").concat(u)),s<=0||(t=l?s+5:s,n=1,o=setInterval((function(){var s=i._hasLocalInviteInfo(e,l);n<t&&s?++n:(s&&i._sendTimeoutNotice(r,l),Ae.l("".concat(a," end.")),clearInterval(o))}),1e3))}},{key:"_hasLocalInviteInfo",value:function(e,t){var n,o,i=e.inviteID;return e=e.groupID,!!this.hasInviteInfo(i)&&(n="".concat(this._n,"._hasLocalInviteInfo"),o=this.getInviteInfo(i).inviteeList,Ae.l("".concat(n," inviteID:").concat(i," inviteeList:").concat(o," groupID:").concat(e)),!e||(t?0<o.length:0<o.length&&o.includes(this.getMyUserID())))}},{key:"_getReceiver",value:function(e,t){var n=t.groupID,o=t.inviteeList;return t=t.inviter,e?n||o[0]:n||t}},{key:"_sendTimeoutNotice",value:function(e,n){var o=this,i=this.getInviteInfo(e),a=this._getReceiver(n,i),s=(Ae.l("".concat(this._n,"._sendTimeoutNotice inviteID:").concat(e," to:").concat(a," isInviter:").concat(n)),this._localSignalingHandler.createTimeoutCustomData(t(t({},i),{},{isInviter:n}))),r=this.createSignaling(s,a);return this.sendSignaling(r,s).then((function(t){var i,a,c;t&&0===t.code&&(t=s.data,i=s.groupID,a=s.inviteeList,c=s.inviter,o.emitEvent(D.INVITATION_TIMEOUT,{data:t,groupID:i,inviteID:e,inviteeList:a,inviter:c,isSelfTimeout:!0,message:r}),n?o.deleteInviteInfo(e):o.updateInviteInfo(s))}))}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._inviteInfoMap.clear(),this._canIUseSignaling=!1,this._isHandling=!1,this._historySignalingHandler.reset(),this._isC2CUnreadHandleCompleted=!1,this._isConvSyncCompleted=!1,this._isSyncCompleted=!1,this._isCloudConfigCompleted=!1}}]),Mr),_r=["followDiffList"],mr={NONE:0,FOLLOWERS:1,FOLLOWING:2,MUTUAL:3},vr=(r(Ir,bn),bs=g(Ir),a(Ir,[{key:"_onCloudConfig",value:function(){var e=this.getCloudConfig("follow_req_count");ut(e)||(e=Number(e),this.DEFAULT_COUNT=e>this.MAX_COUNT?this.MAX_COUNT:e,this._clearFollowList())}},{key:"clearCacheOnReconnected",value:function(){this._clearFollowList(),this._followType.clear()}},{key:"onFollowNotify",value:function(e){var t=this;e=e.dataList||[],Ae.l("".concat(this._n,".onFollowNotify followChangeList:").concat(e.length)),e.forEach((function(e){var n=void 0===(n=e.followDiffList)?[]:n,o=h(e,_r);n.forEach((function(e){var n=e.isAdd,i=(e=void 0===(e=e.followType)?[]:e,t._initFollowInfo());i[e].userInfoList.push(o),i[e].isAdd=1===n,t._emitEvent(i)}))}))}},{key:"_initFollowInfo",value:function(){var e={};return Object.values(mr).forEach((function(t){t!==mr.NONE&&(e[t]={userInfoList:[],isAdd:!1})})),e}},{key:"_emitEvent",value:function(e){var t=this;Object.keys(e).forEach((function(n){n=Number(n);var o=e[n];0<o.userInfoList.length&&(n===mr.FOLLOWERS&&(t._clearFollowList(mr.FOLLOWERS),t.emitOEvt(S.MY_FOLLOWERS_LIST_UPDATED,o)),n===mr.FOLLOWING&&(t._clearFollowList(mr.FOLLOWING),t.emitOEvt(S.MY_FOLLOWING_LIST_UPDATED,o)),n===mr.MUTUAL)&&(t._clearFollowList(mr.MUTUAL),t.emitOEvt(S.MUTUAL_FOLLOWERS_LIST_UPDATED,o))}))}},{key:"followUser",value:function(e){var t,n,o;return this.canIUse(N.FOLLOW)?(t="".concat(this._n,".").concat("followUser"),n="userIDList:".concat(e.length),(o=new Jn("followUser")).setMessage(n),Ae.l("".concat(t," ").concat(n)),this.req({P:Gn.FOLLOW,data:{fromAccount:this.getMyUserID(),userIDList:e.map((function(e){return{userID:e}}))}}).then((function(e){return o.end(),Ae.l("".concat(t," ok.")),mn(e.data.resultList)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse("followUser")}},{key:"unfollowUser",value:function(e){var t,n,o;return this.canIUse(N.FOLLOW)?(t="".concat(this._n,".").concat("unfollowUser"),n="userIDList:".concat(e.length),(o=new Jn("unfollowUser")).setMessage(n),Ae.l("".concat(t," ").concat(n)),this.req({P:Gn.UNFOLLOW,data:{fromAccount:this.getMyUserID(),userIDList:e}}).then((function(e){return o.end(),Ae.l("".concat(t," ok.")),mn(e.data.resultList)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse("unfollowUser")}},{key:"getMyFollowersList",value:function(){var e=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",o="getMyFollowersList";if(!this.canIUse(N.FOLLOW))return this.noUse(o);var i=n||this.FIRST_PAGE_INDEX;if(this._myFollowersList.has(i)){var a=(r=this._myFollowersList.get(i)).resultList,s=r.nextCursor,r=r.lastUpdateTime;if(Date.now()-r<this.MAX_CATCH_TIME&&0<a.length)return Ae.l("".concat(this._n,".").concat(o," nextCursor:").concat(n," from local.")),vn({resultList:a,nextCursor:s})}return this._getFollowList(n,mr.FOLLOWERS).then((function(a){return e._myFollowersList.set(i,t(t({},a),{},{lastUpdateTime:Date.now()})),Ae.l("".concat(e._n,".").concat(o," nextCursor:").concat(n," from remote.")),mn(a)}))}},{key:"getMyFollowingList",value:function(){var e=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",o="getMyFollowingList";if(!this.canIUse(N.FOLLOW))return this.noUse(o);var i=n||this.FIRST_PAGE_INDEX;if(this._myFollowingList.has(i)){var a=(r=this._myFollowingList.get(i)).resultList,s=r.nextCursor,r=r.lastUpdateTime;if(Date.now()-r<this.MAX_CATCH_TIME&&0<a.length)return Ae.l("".concat(this._n,".").concat(o," nextCursor:").concat(n," from local.")),vn({resultList:a,nextCursor:s})}return this._getFollowList(n,mr.FOLLOWING).then((function(a){return e._myFollowingList.set(i,t(t({},a),{},{lastUpdateTime:Date.now()})),Ae.l("".concat(e._n,".").concat(o," nextCursor:").concat(n," from remote.")),mn(a)}))}},{key:"getMutualFollowersList",value:function(){var e=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",o="getMutualFollowersList";if(!this.canIUse(N.FOLLOW))return this.noUse(o);var i=n||this.FIRST_PAGE_INDEX;if(this._myMutualFollowersList.has(i)){var a=(r=this._myMutualFollowersList.get(i)).resultList,s=r.nextCursor,r=r.lastUpdateTime;if(Date.now()-r<this.MAX_CATCH_TIME&&0<a.length)return Ae.l("".concat(this._n,".").concat(o," nextCursor:").concat(n," from local.")),vn({resultList:a,nextCursor:s})}return this._getFollowList(n,mr.MUTUAL).then((function(a){return e._myMutualFollowersList.set(i,t(t({},a),{},{lastUpdateTime:Date.now()})),Ae.l("".concat(e._n,".").concat(o," nextCursor:").concat(n," from remote.")),mn(a)}))}},{key:"_getFollowList",value:function(e,n){var o=this,i=new Jn("_getFollowList");return i.setMessage("nextCursor:".concat(e," type:").concat(n)),this.req({P:Gn.GET_FOLLOW,data:{fromAccount:this.getMyUserID(),count:this.DEFAULT_COUNT,nextCursor:e,type:n}}).then((function(e){i.end();var n=void 0===(n=(e=e.data).resultList)?[]:n,a=(e=void 0===(e=e.nextCursor)?"":e,[]);return n.forEach((function(e){var n=e.userID,i=e.followTime;e=e.profileList,a.push(t({userID:n,followTime:i},o._handleProfileItem(void 0===e?[]:e)))})),{resultList:a,nextCursor:e}})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(o._n,"._getFollowList failed. error:"),e),yn(e)}))}},{key:"_handleProfileItem",value:function(e){var t={};return e.forEach((function(e){switch(e.tag){case Oe.NICK:t.nick=e.value;break;case Oe.GENDER:t.gender=e.value;break;case Oe.BIRTHDAY:t.birthday=e.value;break;case Oe.LOCATION:t.location=e.value;break;case Oe.SELFSIGNATURE:t.selfSignature=e.value;break;case Oe.ALLOWTYPE:t.allowType=e.value;break;case Oe.LANGUAGE:t.language=e.value;break;case Oe.AVATAR:t.avatar=e.value;break;case Oe.MESSAGESETTINGS:t.messageSettings=e.value;break;case Oe.ADMINFORBIDTYPE:t.adminForbidType=e.value;break;case Oe.LEVEL:t.level=e.value;break;case Oe.ROLE:t.role=e.value;break;default:t[e.tag]=e.value}})),t}},{key:"getUserFollowInfo",value:function(e){var t,n,o;return this.canIUse(N.FOLLOW)?(n=!1,ut(e)&&(e=[this.getMyUserID()],n=!0),t="".concat(this._n,".").concat("getUserFollowInfo"),n="userIDList:".concat(e.length," isGetMyFollowInfo:").concat(n),(o=new Jn("getUserFollowInfo")).setMessage(n),Ae.l("".concat(t," ").concat(n)),this.req({P:Gn.GET_FOLLOW_INFO,data:{fromAccount:this.getMyUserID(),userIDList:e}}).then((function(e){o.end(),Ae.l("".concat(t," ok.")),e=e.data.followInfoList;var n=[];return(void 0===e?[]:e).forEach((function(e){var t=e.followersCount,o=e.followingCount;e=e.mutualFollowersCount,n.push({followersCount:t,followingCount:o,mutualFollowersCount:e})})),mn(n)})).catch((function(e){return o.setError(e).end(),Ae.e("".concat(t," failed. error:"),e),yn(e)}))):this.noUse("getUserFollowInfo")}},{key:"checkFollowType",value:function(e){var t=this;if(!this.canIUse(N.FOLLOW))return this.noUse("checkFollowType");100<e.length&&(e=e.slice(0,100),Ae.w("".concat(n," ").concat(Vt(100))));var n="".concat(this._n,".").concat("checkFollowType"),o="userIDList length:".concat(e.length," "),i=new Jn("checkFollowType"),a=(i.setMessage(o),Ae.l("".concat(n," ").concat(o)),[]),s=[];return e.forEach((function(e){var n;t._followType.has(e)?(n=t._followType.get(e),a.push({userID:e,followType:n})):s.push(e)})),Ae.l("".concat(n," from local count:").concat(a.length,", from remote count:").concat(s.length,".")),0===s.length?vn(a):this.req({P:Gn.CHECK_FOLLOW_TYPE,data:{fromAccount:this.getMyUserID(),userIDList:s}}).then((function(e){return i.end(),Ae.l("".concat(n," ok.")),(void 0===(e=e.data.resultList)?[]:e).forEach((function(e){var n=e.userID;e=e.followType,t._setFollowType(n,e),a.push({userID:n,followType:e})})),mn(a)})).catch((function(e){return i.setError(e).end(),Ae.e("".concat(n," failed. error:"),e),yn(e)}))}},{key:"_setFollowType",value:function(e,t){this._followType.set(e,t)}},{key:"_clearFollowList",value:function(e){ut(e)?(this._myFollowersList.clear(),this._myFollowingList.clear(),this._myMutualFollowersList.clear()):e!==mr.FOLLOWERS?e!==mr.FOLLOWING?e===mr.MUTUAL&&this._myMutualFollowersList.clear():this._myFollowingList.clear():this._myFollowersList.clear()}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._clearFollowList(),this._followType.clear()}}]),Ir),yr=_a((function(e,t){var o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t,o,i=Array.prototype.slice.call(arguments,1);i.length;){var a=i.shift();if(a){if("object"!==n(a))throw new TypeError(a+"must be non-object");for(var s in a)t=a,o=s,Object.prototype.hasOwnProperty.call(t,o)&&(e[s]=a[s])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,o,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+o),i);else for(var a=0;a<o;a++)e[i+a]=t[n+a]},flattenChunks:function(e){for(var t,n,o,i=0,a=0,s=e.length;a<s;a++)i+=e[a].length;for(o=new Uint8Array(i),a=t=0,s=e.length;a<s;a++)n=e[a],o.set(n,t),t+=n.length;return o}},a={arraySet:function(e,t,n,o,i){for(var a=0;a<o;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(o)}));function Ir(e){return o(this,Ir),(e=bs.call(this,e))._n="FollowModule",e._myFollowersList=new Map,e._myFollowingList=new Map,e._myMutualFollowersList=new Map,e._followType=new Map,e.MAX_CATCH_TIME=6e5,e.FIRST_PAGE_INDEX=ot(),e.DEFAULT_COUNT=500,e.MAX_COUNT=1e3,e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function Mr(e){o(this,Mr),(e=As.call(this,e))._n="SignalingModule",e._inviteInfoMap=new Map,e._canIUseSignaling=!1,e._isHandling=!1,e._remoteSignalingHandler=new ur(f(e)),e._localSignalingHandler=new lr(f(e)),e._historySignalingHandler=new dr(f(e)),e._isC2CUnreadHandleCompleted=!1,e._isConvSyncCompleted=!1,e._isSyncCompleted=!1,e._isCloudConfigCompleted=!1;var t=e.getIEmitInst();return t.on(xo.C2C_UNREAD_HANDLE_COMPLETED,e.onC2CUnreadHandleCompleted,f(e)),t.on(xo.CONV_SYNC_COMPLETED,e.onConvSyncCompleted,f(e)),t.on(xo.CLOUD_CONFIG,e.onCloudConfig,f(e)),e}function Cr(e){o(this,Cr),this._n="HistorySignalingHandler",this._sigM=e,this.COUNT=20,this.EXPIRED_TIME=300,this._map=new Map,this._relatedToMeMap=new Map}function Tr(e){o(this,Tr),this._n="LocalSignalingHandler",this._sigM=e}function Sr(e){o(this,Sr),this._n="RemoteSignalingHandler",this._sigM=e}function Er(e){o(this,Er),this._m=e,this._n="ErrMsgModule",this.TIM_ERROR_ASSISTANCE="tim_error_assistance",this.STORAGE_EXPIRES_TIME=6048e5,this._map=new Map,this._init()}function Dr(e){o(this,Dr),this._m=e,this._n="TransCmdModule",this._TRTCCommandList=["tui_room_svr.*","callkit_records_svr.*","room_engine_srv.*","room_engine_http_srv.*","room_engine_mic.*","live_engine_srv.*","live_engine_http_srv.*","live_engine_pk.*","trtc_ai_service.*"],this._TRTCCommandMap=new Map,this._setTRTCCommandMap(),this._m.getIEmitInst().on(xo.CLOUD_CONFIG,this._onCloudConfig,this)}function kr(e){return o(this,kr),(e=Rs.call(this,e))._n="ProfanityFilterModule",e._plugin=null,e._filterConfigMap=new Map,e._startIndex=0,e._version=0,e._canIUseLexicon=!1,e._isFetching=!1,e._expiredTime=0,e}function Lr(e){var t;return o(this,Lr),(t=Os.call(this,e))._m=e,t._n="TIMPushModule",t._pluginName="TIMPush",t._pushPlugin=void 0,t._androidPushConfig={},t._deviceToken="",t._businessID=0,t._iOSBusinessID=0,t._c2cUnreadCount=0,t._groupUnreadCount=0,t._isWebUniapp=0,t._deviceInfo={notificationStatus:0,deviceModel:"",systemVersion:"",pushVersion:"1.0.1",packageName:""},t}function br(e){var t;return o(this,br),(t=ws.call(this,e))._m=e,t._n="OfflinePushModule",t._offlinePushPlugin=void 0,t._androidPushConfig={huaweiPushBussinessId:"",xiaomiPushBussinessId:"",xiaomiPushAppId:"",xiaomiPushAppKey:"",meizuPushBussinessId:"",meizuPushAppId:"",meizuPushAppKey:"",vivoPushBussinessId:"",fcmPushBussinessId:"",oppoPushBussinessId:"",oppoPushAppKey:"",oppoPushAppSecret:"",honorPushBussinessId:""},t._deviceToken="",t._businessID=0,t._iosBusinessID=0,t._c2cUnreadCount=0,t._groupUnreadCount=0,t._isWebUniapp=0,t}function Ar(e){o(this,Ar),this._m=e,this._n="CommercialConfigModule",this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler=new nr(this)}function Rr(e){o(this,Rr),this._commercialConfigM=e,this._n="PurchasedFeatureHandler",this._isSCMReported=!1,this._featureMap=new Map}function Or(e){return o(this,Or),(e=Ps.call(this,e))._n="WorkerTimerModule",e._isWorkerEnabled=!0,e._workerTimer=null,e._timerID=-1,e._init(),e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function wr(e){return o(this,wr),(e=Ns.call(this,e))._n="SnsModule",e._friendHandler=new Js(f(e)),e._friendApplicationHandler=new Ys(f(e)),e._friendGroupHandler=new Qs(f(e)),e.getIEmitInst().on(xo.A2KEY_AND_TINYID_UPDATED,e.onContextUpdated,f(e)),e}function Pr(e){o(this,Pr),this._snsM=e,this._n="FriendGroupHandler",this._map=new Map}function Nr(e){o(this,Nr),Ve(e)||(this.name=e.name||"",this.userIDList=e.userIDList||[],this.count=this.userIDList.length||0)}function Gr(e){o(this,Gr),this._snsM=e,this._n="FriendHandler",this._map=new Map,this._startIdx=0,this._standardSeq=0,this._customSeq=0,this._expirationTime=18e4}function Ur(e,n){o(this,Ur),this.userID=e,this.remark="",this.groupList=[],this.source="",this.addTime=0,this.friendCustomField=[],this.timestamp=0;var i={},a=[];if(i.userID=e,!Ve(n))for(var s,r="",c=0,u=n.length;c<u;c++)if(r=n[c].tag,s=n[c].value,-1<r.indexOf("Tag_SNS_Custom"))this.friendCustomField.push({key:r,value:s});else if(-1<r.indexOf("Tag_Profile_Custom"))a.push({key:r,value:s});else switch(r){case Oe.NICK:i.nick=s;break;case Oe.GENDER:i.gender=s;break;case Oe.BIRTHDAY:i.birthday=s;break;case Oe.LOCATION:i.location=s;break;case Oe.SELFSIGNATURE:i.selfSignature=s;break;case Oe.ALLOWTYPE:i.allowType=s;break;case Oe.LANGUAGE:i.language=s;break;case Oe.AVATAR:i.avatar=s;break;case Oe.MESSAGESETTINGS:i.messageSettings=s;break;case Oe.ADMINFORBIDTYPE:i.adminForbidType=s;break;case Oe.LEVEL:i.level=s;break;case Oe.ROLE:i.role=s;break;case we.REMARK:this.remark=s;break;case we.ADDTIME:this.addTime=s;break;case we.GROUP:this.groupList=JSON.parse(JSON.stringify(s));break;case we.ADDSOURCE:this.source=s;break;case we.ADDWORDING:break;default:Ae.l("snsProfileItem unknown tag->",n[c].tag)}this.profile=new Qo(t(t({},i),{},{profileCustomField:a}))}function xr(e){o(this,xr),this._snsM=e,this._n="FriendApplicationHandler",this._startTime=0,this._maxLimited=100,this._currentSeq=0,this._map=new Map,this._unreadCount=0}function Fr(e){o(this,Fr),(e=Gs.call(this,e))._n="QualityStatModule",e.TAG="im-ssolog-quality-stat",e.reportIndex=0,e.wholePeriod=!1,e._qualityItems=[Un,xn,Fn,qn,Vn,Bn,Hn,jn,Kn,$n],e._messageSentItems=[Fn,qn,Vn,Bn,Hn],e._messageReceivedItems=[jn,Kn,$n],e.REPORT_INTERVAL=120,e.REPORT_SDKAPPID_BLACKLIST=[],e.REPORT_TINYID_WHITELIST=[],e._statInfoArr=[],e._avgRTT=new js,e._avgE2EDelay=new Hs,e._rateMessageSent=new Ks,e._rateMessageReceived=new $s;var t=e.getIEmitInst();return t.on(xo.A2KEY_AND_TINYID_UPDATED,e._onLoginSuccess,f(e)),t.on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function qr(){o(this,qr),this._lastMap=new Map,this._currentMap=new Map}function Vr(){o(this,Vr),this._map=new Map}function Br(){o(this,Br),this._n="AvgRTT",this._requestCount=0,this._rttArray=[]}function Hr(){o(this,Hr),this._n="AvgE2EDelay",this._e2eDelayArray=[]}function jr(e){return o(this,jr),(e=Us.call(this,e))._n="RecoverMsgModule",e.PULL_LIMIT_COUNT=15,e}function Kr(e){return o(this,Kr),(e=xs.call(this,e))._n="CloudControlModule",e._cloudConfig=new Map,e._expiredTime=0,e._version=0,e._isFetching=!1,e}function $r(e){return o(this,$r),(e=Fs.call(this,e))._n="SessionModule",e._platform=e.getPlatform(),e._pHandler=new hs(f(e)),e._msgDispatcher=new gs(f(e)),e._cmdFreqLimitMap=new Map,e._cmdReqInfoMap=new Map,e._serverOverloadInfoMap=new Map,e._incrementalPullContactFlag=!0,e._init(),e.getIEmitInst().on(xo.CLOUD_CONFIG,e._onCloudConfig,f(e)),e}function zr(e,t,n,o){for(var i=65535&e,a=e>>>16&65535,s=0;0!==n;){for(n-=s=2e3<n?2e3:n;a=a+(i=i+t[o++]|0)|0,--s;);i%=65521,a%=65521}return i|a<<16}function Wr(e,t,n,o){var i=Xr,a=o+n;e^=-1;for(var s=o;s<a;s++)e=e>>>8^i[255&(e^t[s])];return~e}function Yr(e,t,n,o,i,a,s,r){var c,u,l,d,p,h,f,g,_,m=r.bits,v=0,y=0,I=0,M=0,C=0,T=0,S=0,E=0,D=0,k=0,L=null,b=0,A=new yr.Buf16(16),R=new yr.Buf16(16),O=null,w=0;for(v=0;v<=15;v++)A[v]=0;for(y=0;y<o;y++)A[t[n+y]]++;for(C=m,M=15;1<=M&&0===A[M];M--);if(M<C&&(C=M),0===M)i[a++]=20971520,i[a++]=20971520,r.bits=1;else{for(I=1;I<M&&0===A[I];I++);for(C<I&&(C=I),v=E=1;v<=15;v++)if((E=(E<<1)-A[v])<0)return-1;if(0<E&&(0===e||1!==M))return-1;for(R[1]=0,v=1;v<15;v++)R[v+1]=R[v]+A[v];for(y=0;y<o;y++)0!==t[n+y]&&(s[R[t[n+y]]++]=y);if(h=0===e?(L=O=s,19):1===e?(L=Jr,b-=257,O=Zr,w-=257,256):(L=Qr,O=ec,-1),v=I,p=a,S=y=k=0,l=-1,d=(D=1<<(T=C))-1,1===e&&852<D||2===e&&592<D)return 1;for(;;){for(_=s[y]<h?(g=0,s[y]):s[y]>h?(g=O[w+s[y]],L[b+s[y]]):(g=96,0),c=1<<(f=v-S),I=u=1<<T;i[p+(k>>S)+(u-=c)]=f<<24|g<<16|_,0!==u;);for(c=1<<v-1;k&c;)c>>=1;if(k=0!==c?(k&c-1)+c:0,y++,0==--A[v]){if(v===M)break;v=t[n+s[y]]}if(C<v&&(k&d)!==l){for(p+=I,E=1<<(T=v-(S=0===S?C:S));T+S<M&&!((E-=A[T+S])<=0);)T++,E<<=1;if(D+=1<<T,1===e&&852<D||2===e&&592<D)return 1;i[l=k&d]=C<<24|T<<16|p-a}}0!==k&&(i[p+k]=v-S<<24|64<<16),r.bits=C}return 0}yr.assign,yr.shrinkBuf,yr.setTyped,yr.Buf8,yr.Buf16,yr.Buf32;var Xr=function(){for(var e=[],t=0;t<256;t++){for(var n=t,o=0;o<8;o++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}(),Jr=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Zr=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Qr=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],ec=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function tc(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function nc(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new yr.Buf16(320),this.work=new yr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function oc(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new yr.Buf32(852),t.distcode=t.distdyn=new yr.Buf32(592),t.sane=1,t.back=-1,0):-2}function ic(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,oc(e)):-2}function ac(e,t){var n,o;return!e||!e.state||(o=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?-2:(null!==o.window&&o.wbits!==t&&(o.window=null),o.wrap=n,o.wbits=t,ic(e))}function sc(e,t){var n;return e?(n=new nc,(e.state=n).window=null,0!==(n=ac(e,t))&&(e.state=null),n):-2}var rc,cc,uc=!0;function lc(e,t,n,o){var i;return null===(e=e.state).window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new yr.Buf8(e.wsize)),o>=e.wsize?(yr.arraySet(e.window,t,n-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>o&&(i=o),yr.arraySet(e.window,t,n-o,i,e.wnext),(o-=i)?(yr.arraySet(e.window,t,n-o,o,0),e.wnext=o,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0}var dc={inflateReset:ic,inflateReset2:ac,inflateResetKeep:oc,inflateInit:function(e){return sc(e,15)},inflateInit2:sc,inflate:function(e,t){var n,o,i,a,s,r,c,u,l,d,p,h,f,g,_,m,v,y,I,M,C,T,S,E,D=0,k=new yr.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),s=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,o=e.input,r=e.avail_in,u=n.hold,l=n.bits,d=r,p=c,T=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap)n.mode=13;else{for(;l<16;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(2&n.wrap&&35615===u)k[n.check=0]=255&u,k[1]=u>>>8&255,n.check=Wr(n.check,k,2,0),l=u=0,n.mode=2;else if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31)e.msg="incorrect header check",n.mode=30;else if(8!=(15&u))e.msg="unknown compression method",n.mode=30;else{if(l-=4,C=8+(15&(u>>>=4)),0===n.wbits)n.wbits=C;else if(C>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<C,e.adler=n.check=1,n.mode=512&u?10:12,l=u=0}}break;case 2:for(;l<16;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(n.flags=u,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,n.check=Wr(n.check,k,2,0)),l=u=0,n.mode=3;case 3:for(;l<32;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}n.head&&(n.head.time=u),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,k[2]=u>>>16&255,k[3]=u>>>24&255,n.check=Wr(n.check,k,4,0)),l=u=0,n.mode=4;case 4:for(;l<16;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,n.check=Wr(n.check,k,2,0)),l=u=0,n.mode=5;case 5:if(1024&n.flags){for(;l<16;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&(k[0]=255&u,k[1]=u>>>8&255,n.check=Wr(n.check,k,2,0)),l=u=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((h=(h=n.length)>r?r:h)&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),yr.arraySet(n.head.extra,o,a,h,C)),512&n.flags&&(n.check=Wr(n.check,o,h,a)),r-=h,a+=h,n.length-=h),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===r)break e;for(h=0;C=o[a+h++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C)),C&&h<r;);if(512&n.flags&&(n.check=Wr(n.check,o,h,a)),r-=h,a+=h,C)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===r)break e;for(h=0;C=o[a+h++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C)),C&&h<r;);if(512&n.flags&&(n.check=Wr(n.check,o,h,a)),r-=h,a+=h,C)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;l<16;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}l=u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;l<32;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}e.adler=n.check=tc(u),l=u=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=r,n.hold=u,n.bits=l,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last)u>>>=7&l,l-=7&l,n.mode=27;else{for(;l<3;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}switch(n.last=1&u,--l,3&(u>>>=1)){case 0:n.mode=14;break;case 1:b=A=void 0;var b,A=n;if(uc){for(rc=new yr.Buf32(512),cc=new yr.Buf32(32),b=0;b<144;)A.lens[b++]=8;for(;b<256;)A.lens[b++]=9;for(;b<280;)A.lens[b++]=7;for(;b<288;)A.lens[b++]=8;for(Yr(1,A.lens,0,288,rc,0,A.work,{bits:9}),b=0;b<32;)A.lens[b++]=5;Yr(2,A.lens,0,32,cc,0,A.work,{bits:5}),uc=!1}if(A.lencode=rc,A.lenbits=9,A.distcode=cc,A.distbits=5,n.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}u>>>=2,l-=2}break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&u,l=u=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(h=n.length){if(0===(h=c<(h=r<h?r:h)?c:h))break e;yr.arraySet(i,o,a,h,s),r-=h,a+=h,c-=h,s+=h,n.length-=h}else n.mode=12;break;case 17:for(;l<14;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(n.nlen=257+(31&u),u>>>=5,l-=5,n.ndist=1+(31&u),u>>>=5,l-=5,n.ncode=4+(15&u),u>>>=4,l-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;l<3;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}n.lens[L[n.have++]]=7&u,u>>>=3,l-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},T=Yr(0,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,T){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;m=(D=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,v=65535&D,!((_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(v<16)u>>>=_,l-=_,n.lens[n.have++]=v;else{if(16===v){for(E=_+2;l<E;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(u>>>=_,l-=_,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}C=n.lens[n.have-1],h=3+(3&u),u>>>=2,l-=2}else if(17===v){for(E=_+3;l<E;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}C=0,h=3+(7&(u>>>=_)),u>>>=3,l=l-_-3}else{for(E=_+7;l<E;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}C=0,h=11+(127&(u>>>=_)),u>>>=7,l=l-_-7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;h--;)n.lens[n.have++]=C}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,S={bits:n.lenbits},T=Yr(1,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,T){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},T=Yr(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,T){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=r&&258<=c){e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=r,n.hold=u,n.bits=l,j=V=G=N=P=w=O=R=oe=ne=te=ee=Q=Z=J=X=Y=W=z=$=K=H=B=q=F=void 0;var R,O,w,P,N,G,U=e,x=p,F=U.state,q=U.next_in,V=U.input,B=q+(U.avail_in-5),H=U.next_out,j=U.output,K=H-(x-U.avail_out),$=H+(U.avail_out-257),z=F.dmax,W=F.wsize,Y=F.whave,X=F.wnext,J=F.window,Z=F.hold,Q=F.bits,ee=F.lencode,te=F.distcode,ne=(1<<F.lenbits)-1,oe=(1<<F.distbits)-1;t:do{for(Q<15&&(Z+=V[q++]<<Q,Q+=8,Z+=V[q++]<<Q,Q+=8),R=ee[Z&ne];;){if(Z>>>=O=R>>>24,Q-=O,0==(O=R>>>16&255))j[H++]=65535&R;else{if(!(16&O)){if(!(64&O)){R=ee[(65535&R)+(Z&(1<<O)-1)];continue}if(32&O){F.mode=12;break t}U.msg="invalid literal/length code",F.mode=30;break t}for(w=65535&R,(O&=15)&&(Q<O&&(Z+=V[q++]<<Q,Q+=8),w+=Z&(1<<O)-1,Z>>>=O,Q-=O),Q<15&&(Z+=V[q++]<<Q,Q+=8,Z+=V[q++]<<Q,Q+=8),R=te[Z&oe];;){if(Z>>>=O=R>>>24,Q-=O,!(16&(O=R>>>16&255))){if(!(64&O)){R=te[(65535&R)+(Z&(1<<O)-1)];continue}U.msg="invalid distance code",F.mode=30;break t}if(P=65535&R,Q<(O&=15)&&(Z+=V[q++]<<Q,(Q+=8)<O)&&(Z+=V[q++]<<Q,Q+=8),(P+=Z&(1<<O)-1)>z){U.msg="invalid distance too far back",F.mode=30;break t}if(Z>>>=O,Q-=O,P>(O=H-K)){if((O=P-O)>Y&&F.sane){U.msg="invalid distance too far back",F.mode=30;break t}if(G=J,(N=0)===X){if(N+=W-O,O<w){for(w-=O;j[H++]=J[N++],--O;);N=H-P,G=j}}else if(X<O){if(N+=W+X-O,(O-=X)<w){for(w-=O;j[H++]=J[N++],--O;);if(N=0,X<w){for(w-=O=X;j[H++]=J[N++],--O;);N=H-P,G=j}}}else if(N+=X-O,O<w){for(w-=O;j[H++]=J[N++],--O;);N=H-P,G=j}for(;2<w;)j[H++]=G[N++],j[H++]=G[N++],j[H++]=G[N++],w-=3;w&&(j[H++]=G[N++],1<w)&&(j[H++]=G[N++])}else{for(N=H-P;j[H++]=j[N++],j[H++]=j[N++],j[H++]=j[N++],2<(w-=3););w&&(j[H++]=j[N++],1<w)&&(j[H++]=j[N++])}break}}break}}while(q<B&&H<$);q-=w=Q>>3,Z&=(1<<(Q-=w<<3))-1,U.next_in=q,U.next_out=H,U.avail_in=q<B?B-q+5:5-(q-B),U.avail_out=H<$?$-H+257:257-(H-$),F.hold=Z,F.bits=Q,s=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,o=e.input,r=e.avail_in,u=n.hold,l=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;m=(D=n.lencode[u&(1<<n.lenbits)-1])>>>16&255,v=65535&D,!((_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(m&&!(240&m)){for(y=_,I=m,M=v;m=(D=n.lencode[M+((u&(1<<y+I)-1)>>y)])>>>16&255,v=65535&D,!(y+(_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}u>>>=y,l-=y,n.back+=y}if(u>>>=_,l-=_,n.back+=_,n.length=v,0===m){n.mode=26;break}if(32&m){n.back=-1,n.mode=12;break}if(64&m){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&m,n.mode=22;case 22:if(n.extra){for(E=n.extra;l<E;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;m=(D=n.distcode[u&(1<<n.distbits)-1])>>>16&255,v=65535&D,!((_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(!(240&m)){for(y=_,I=m,M=v;m=(D=n.distcode[M+((u&(1<<y+I)-1)>>y)])>>>16&255,v=65535&D,!(y+(_=D>>>24)<=l);){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}u>>>=y,l-=y,n.back+=y}if(u>>>=_,l-=_,n.back+=_,64&m){e.msg="invalid distance code",n.mode=30;break}n.offset=v,n.extra=15&m,n.mode=24;case 24:if(n.extra){for(E=n.extra;l<E;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===c)break e;if(n.offset>(h=p-c)){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}f=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),g=n.window}else g=i,f=s-n.offset,h=n.length;for(c-=h=c<h?c:h,n.length-=h;i[s++]=g[f++],--h;);0===n.length&&(n.mode=21);break;case 26:if(0===c)break e;i[s++]=n.length,c--,n.mode=21;break;case 27:if(n.wrap){for(;l<32;){if(0===r)break e;r--,u|=o[a++]<<l,l+=8}if(p-=c,e.total_out+=p,n.total+=p,p&&(e.adler=n.check=(n.flags?Wr:zr)(n.check,i,p,s-p)),p=c,(n.flags?u:tc(u))!==n.check){e.msg="incorrect data check",n.mode=30;break}l=u=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;l<32;){if(0===r)break e;r--,u+=o[a++]<<l,l+=8}if(u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}l=u=0}n.mode=29;case 29:T=1;break e;case 30:T=-3;break e;case 31:return-4;default:return-2}return e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=r,n.hold=u,n.bits=l,(n.wsize||p!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&lc(e,e.output,e.next_out,p-e.avail_out),d-=e.avail_in,p-=e.avail_out,e.total_in+=d,e.total_out+=p,n.total+=p,n.wrap&&p&&(e.adler=n.check=(n.flags?Wr:zr)(n.check,i,p,e.next_out-p)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0==d&&0===p||4===t)&&0===T?-5:T},inflateEnd:function(e){var t;return e&&e.state?((t=e.state).window&&(t.window=null),e.state=null,0):-2},inflateGetHeader:function(e,t){return e&&e.state&&2&(e=e.state).wrap?((e.head=t).done=!1,0):-2},inflateSetDictionary:function(e,t){var n,o=t.length;return!e||!e.state||0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&zr(1,t,o,0)!==n.check?-3:lc(e,t,o,o)?(n.mode=31,-4):(n.havedict=1,0)},inflateInfo:"pako inflate (from Nodeca project)"},pc=!0,hc=!0;try{String.fromCharCode.apply(null,[0])}catch(Nc){pc=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Nc){hc=!1}for(var fc=new yr.Buf8(256),gc=0;gc<256;gc++)fc[gc]=252<=gc?6:248<=gc?5:240<=gc?4:224<=gc?3:192<=gc?2:1;function _c(e,t){for(var n,o,i=t||e.length,a=new Array(2*i),s=0,r=0;r<i;)if((n=e[r++])<128)a[s++]=n;else if(4<(o=fc[n]))a[s++]=65533,r+=o-1;else{for(n&=2===o?31:3===o?15:7;1<o&&r<i;)n=n<<6|63&e[r++],o--;1<o?a[s++]=65533:n<65536?a[s++]=n:(n-=65536,a[s++]=55296|n>>10&1023,a[s++]=56320|1023&n)}var c=a,u=s;if(u<65534&&(c.subarray&&hc||!c.subarray&&pc))return String.fromCharCode.apply(null,yr.shrinkBuf(c,u));for(var l="",d=0;d<u;d++)l+=String.fromCharCode(c[d]);return l}function mc(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function vc(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}fc[254]=fc[254]=1;var yc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},Ic={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Mc=Object.prototype.toString;function Cc(e){if(!(this instanceof Cc))return new Cc(e);this.options=yr.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;if(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new mc,this.strm.avail_out=0,(e=dc.inflateInit2(this.strm,t.windowBits))!==yc.Z_OK)throw new Error(Ic[e]);if(this.header=new vc,dc.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=function(e){for(var t,n,o,i,a=e.length,s=0,r=0;r<a;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<a&&56320==(64512&(o=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(o-56320),r++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new yr.Buf8(s),r=i=0;i<s;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<a&&56320==(64512&(o=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(o-56320),r++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t}(t.dictionary):"[object ArrayBuffer]"===Mc.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=dc.inflateSetDictionary(this.strm,t.dictionary))!==yc.Z_OK)throw new Error(Ic[e])}function Tc(e,t){if((t=new Cc(t)).push(e,!0),t.err)throw t.msg||Ic[t.err];return t.result}Cc.prototype.push=function(e,t){var n,o,i,a,s,r=this.strm,c=this.options.chunkSize,u=this.options.dictionary,l=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?yc.Z_FINISH:yc.Z_NO_FLUSH,"string"==typeof e?r.input=function(e){for(var t=new yr.Buf8(e.length),n=0,o=t.length;n<o;n++)t[n]=e.charCodeAt(n);return t}(e):"[object ArrayBuffer]"===Mc.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new yr.Buf8(c),r.next_out=0,r.avail_out=c),(n=(n=dc.inflate(r,yc.Z_NO_FLUSH))===yc.Z_NEED_DICT&&u?dc.inflateSetDictionary(this.strm,u):n)===yc.Z_BUF_ERROR&&!0===l&&(n=yc.Z_OK,l=!1),n!==yc.Z_STREAM_END&&n!==yc.Z_OK)return this.onEnd(n),!(this.ended=!0);!r.next_out||0!==r.avail_out&&n!==yc.Z_STREAM_END&&(0!==r.avail_in||o!==yc.Z_FINISH&&o!==yc.Z_SYNC_FLUSH)||("string"===this.options.to?(i=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+fc[e[n]]>t?n:t}(r.output,r.next_out),a=r.next_out-i,s=_c(r.output,i),r.next_out=a,r.avail_out=c-a,a&&yr.arraySet(r.output,r.output,i,a,0),this.onData(s)):this.onData(yr.shrinkBuf(r.output,r.next_out))),0===r.avail_in&&0===r.avail_out&&(l=!0)}while((0<r.avail_in||0===r.avail_out)&&n!==yc.Z_STREAM_END);return(o=n===yc.Z_STREAM_END?yc.Z_FINISH:o)===yc.Z_FINISH?(n=dc.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===yc.Z_OK):o!==yc.Z_SYNC_FLUSH||(this.onEnd(yc.Z_OK),!(r.avail_out=0))},Cc.prototype.onData=function(e){this.chunks.push(e)},Cc.prototype.onEnd=function(e){e===yc.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=yr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},X={};var Sc=((0,yr.assign)(X,{Inflate:Cc,inflate:Tc,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Tc(e,t)},ungzip:Tc},yc),X),Ec=(a(wc,[{key:"inflate",value:function(e){e=new Uint8Array(e).slice(4);var t,n=Date.now();try{t=Sc.inflate(e,{to:"string"}),this._bLogForInflateOK||(this._bLogForInflateOK=!0,new Jn("inflateOK").end())}catch(i){return this._bLogForInflateError?void 0:(this._bLogForInflateError=!0,void new Jn("inflateError").setMessage(i).end())}e=e.length+4;var o=t.length;return Ae.d("inflate ok. zipped:".concat(e," unzipped:").concat(o)+" compression ratio:".concat(Math.round(100*(o-e)/o),"% cost:").concat(Date.now()-n)),t}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._bLogForInflateOK=!1,this._bLogForInflateError=!1}}]),wc),Dc=(a(Oc,[{key:"_startTimer",value:function(){var e=this._map.get(24),t=e.isWorkerEnabled();Ae.l("".concat(this._n,".startTimer isWorkerEnabled:").concat(t," seed:").concat(this._checkTimer)),t?e.startWorkerTimer():this._startMainThreadTimer()}},{key:"_startMainThreadTimer",value:function(){this._checkTimer<0&&(this._checkTimer=setInterval(this.onCheckTimer.bind(this),1e3)),Ae.l("".concat(this._n,"._startMainThreadTimer seed:").concat(this._checkTimer))}},{key:"stopTimer",value:function(){var e=this._map.get(24),t=e.isWorkerEnabled();Ae.l("".concat(this._n,".stopTimer isWorkerEnabled:").concat(t," seed:").concat(this._checkTimer)),t?e.stopWorkerTimer():this._stopMainThreadTimer()}},{key:"_stopMainThreadTimer",value:function(){Ae.l("".concat(this._n,"._stopMainThreadTimer")),0<this._checkTimer&&(clearInterval(this._checkTimer),this._checkTimer=-1,this._checkCount=0)}},{key:"_stopMainThreadSocket",value:function(){Ae.l("".concat(this._n,"._stopMainThreadSocket"));var e=this._map.get(21);e.setIsWorkerEnabled(!0),e.reConnect()}},{key:"_startMainThreadSocket",value:function(){Ae.l("".concat(this._n,"._startMainThreadSocket"));var e=this._map.get(21);e.setIsWorkerEnabled(!1),e.reConnect()}},{key:"onWorkerTimerEnabled",value:function(){Ae.l("".concat(this._n,".onWorkerTimerEnabled, disable main thread timer and socket")),this._stopMainThreadTimer(),this._stopMainThreadSocket()}},{key:"onWorkerTimerDisabled",value:function(){Ae.l("".concat(this._n,".onWorkerTimerDisabled, enable main thread timer and socket")),this._startMainThreadTimer(),this._startMainThreadSocket()}},{key:"onCheckTimer",value:function(){this._checkCount+=1;var e,t=T(this._map);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2)[1];n.onCheckTimer&&n.onCheckTimer(this._checkCount)}}catch(o){t.e(o)}finally{t.f()}}},{key:"_initReadyList",value:function(){var e=this;this._readyList=[this._map.get(1)],this._readyList.forEach((function(t){t.ready((function(){return e._onModuleReady()}))}))}},{key:"_onModuleReady",value:function(){var e,t,n=!0;this._readyList.forEach((function(e){e.isReady()||(n=!1)})),n&&!this._isReady&&(this._isReady=!0,this._oEmitter.emit(S.SDK_READY),e=Date.now()-this._startLoginTs,Ae.w("SDK is ready. cost ".concat(e," ms")),this._startLoginTs=Date.now(),t=this._ssoLogForReady.getStartTs()+Ee,this._ssoLogForReady.setMessage(e).start(t).end())}},{key:"login",value:function(){0===this._startLoginTs&&(Ce(),this._startLoginTs=Date.now(),this._startTimer(),this._map.get(15).start(),this._ssoLogForReady=new Jn("sdkReady"),this._reason=Pn.LOGGING_IN)}},{key:"onLoginFailed",value:function(){this._startLoginTs=0}},{key:"getOEmitInst",value:function(){return null===this._oEmitter&&(this._oEmitter=new va,e=this._oEmitter,Nn=e,this._oEmitter._emit=this._oEmitter.emit,this._oEmitter.emit=function(e,t){var n,o,i=this;this._canIUseSignaling()&&(e===S.MESSAGE_RECEIVED&&this.get(33).onNewMessageList(t),e===S.MESSAGE_MODIFIED)&&this.get(33).onMessageModified(t),e===S.CONVERSATION_LIST_UPDATED||e===S.FRIEND_LIST_UPDATED||e===S.GROUP_LIST_UPDATED||e===S.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED?!1!==this._eventThrottling?this._eventThrottleMap.has(e)?(n=Date.now())-(o=this._eventThrottleMap.get(e)).last<=1e3?(o.timeoutID&&clearTimeout(o.timeoutID),o.timeoutID=setTimeout((function(){o.last=Date.now(),i._oEmitter._emit.apply(i._oEmitter,[e,{name:e,data:i._getEventData(e)}])}),1e3)):(o.last=n,this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:this._getEventData(e)}])):(this._eventThrottleMap.set(e,{last:Date.now(),timeoutID:-1}),this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:this._getEventData(e)}])):this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:this._getEventData(e)}]):this._oEmitter._emit.apply(this._oEmitter,[e,{name:e,data:t}])}.bind(this)),this._oEmitter;var e}},{key:"_canIUseSignaling",value:function(){var e=this.get(33);return!!e&&e.canIUseSignaling()}},{key:"_getEventData",value:function(e){return e===S.CONVERSATION_LIST_UPDATED?this._map.get(12).isPartialUpdatedConvs()?this._map.get(11).getPartialUpdatedConvs():this._map.get(11).getLocalConvList():e===S.FRIEND_LIST_UPDATED?this._map.get(8).getLocalFriendList(!1):e===S.GROUP_LIST_UPDATED?this._map.get(7).getLocalGroupList():e===S.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED?this._map.get(11).getTotalUnreadCount():e===S.CONVERSATION_ID_LIST_UPDATED?this._map.get(11).getUpdatedConvIDList():void 0}},{key:"getIEmitInst",value:function(){return null===this._iEmitter&&(this._iEmitter=new va,this._iEmitter._emit=this._iEmitter.emit,this._iEmitter.emit=function(e,t){e=ze(t)&&t.data?[e,{name:e,data:t.data}]:[e,{name:e,data:t}],this._iEmitter._emit.apply(this._iEmitter,e)}.bind(this)),this._iEmitter}},{key:"hasModule",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){return this._map.get(e)}},{key:"canIUseModule",value:function(e){return!this._map.get(12).isUsingChatCore()||this._optionalModuleMap.has(e)}},{key:"canIUseInflate",value:function(){return!!this._map.get(37)}},{key:"isReady",value:function(){return this._isReady}},{key:"isIntl",value:function(){return this.get(12).isIntl()}},{key:"getNotReadyReason",value:function(){return this._reason}},{key:"setNotReadyReason",value:function(e){this._reason=e}},{key:"getErrMsg",value:function(e,t,n){return this._map.get(32).get({key:e,replacement1:t,replacement2:n,isIntl:this.isIntl()})}},{key:"warn",value:function(e,t,n){(e=this.getErrMsg(e,t,n))&&Ae.w(e)}},{key:"onError",value:function(e){var t="code:".concat(e.code," message:").concat(e.message);Ae.w("Oops! ".concat(t)),new Jn("error").setMessage(t).setLevel("error").end(),this.getOEmitInst().emit(S.ERROR,e)}},{key:"restartTimer",value:function(){Ae.l("".concat(this._n,".restartTimer")),this.stopTimer(),this._startTimer();var e=this.get(7);e&&e.restartPolling()}},{key:"getTimerID",value:function(){var e=this._map.get(24);return e.isWorkerEnabled()?e.getTimerID():this._checkTimer}},{key:"getPollingTimerID",value:function(e){return this._map.get(7).getPollingTimerID(e)}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),Ce();var e,t=T(this._map);try{for(t.s();!(e=t.n()).done;){var n=_(e.value,2)[1];n.reset&&n.reset()}}catch(s){t.e(s)}finally{t.f()}this._startLoginTs=0,this._initReadyList(),this._isReady=!1,this.stopTimer(),this._oEmitter.emit(S.SDK_NOT_READY);var o,i=T(this._eventThrottleMap);try{for(i.s();!(o=i.n()).done;){var a=_(o.value,2)[1];a.timeoutID&&clearTimeout(a.timeoutID)}}catch(s){i.e(s)}finally{i.f()}this._eventThrottleMap.clear()}}]),Oc),kc=(a(Rc,[{key:"defense",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;if("string"!=typeof e)return null;if(0===e.length)return null;if("function"!=typeof t)return null;if(this._funcMap.has(e)&&this._funcMap.get(e).has(t))return this._funcMap.get(e).get(t);this._funcMap.has(e)||this._funcMap.set(e,new Map);var o=null;return this._funcMap.get(e).has(t)?o=this._funcMap.get(e).get(t):(o=this._pack(e,t,n),this._funcMap.get(e).set(t,o)),o}},{key:"defenseOnce",value:function(e,t){return"function"!=typeof t?null:this._pack(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0)}},{key:"find",value:function(e,t){return"string"!=typeof e||0===e.length||"function"!=typeof t?null:this._funcMap.has(e)&&this._funcMap.get(e).has(t)?this._funcMap.get(e).get(t):(this._m.warn("ListenerFnNotFound",e),null)}},{key:"delete",value:function(e,t){return"function"==typeof t&&!!this._funcMap.has(e)&&!!this._funcMap.get(e).has(t)&&(this._funcMap.get(e).delete(t),0===this._funcMap.get(e).size&&this._funcMap.delete(e),!0)}},{key:"_pack",value:function(e,t,n){var o=this;return function(){try{t.apply(n,Array.from(arguments))}catch(s){var i=Object.values(S).indexOf(e),a="CallbackError";-1!==i&&(i=Object.keys(S)[i],o._m.warn(a,i,s)),o._reportCount<5&&(new Jn(a).setMessage("eventName:".concat(e)).setMoreMessage(s.message).end(),o._reportCount+=1)}}}},{key:"destroy",value:function(){this._funcMap.clear()}},{key:"reset",value:function(){Ae.l("".concat(this._n,".reset")),this._reportCount=0}}]),Rc),Lc=(a(Ac,[{key:"onError",value:function(e){this._m.onError(e)}},{key:"login",value:function(e){return this._m.login(),this._get(1).login(e)}},{key:"logout",value:function(){var e=this;return this._get(1).logout().then((function(t){return e._safetyCallbackFactory.reset(),e._m.reset(),t}))}},{key:"getLoginUser",value:function(){return this._get(1).getLoginUser()}},{key:"getServerTime",value:function(){return De()}},{key:"isReady",value:function(){return this._m.isReady()}},{key:"isIntl",value:function(){return this._m.isIntl()}},{key:"getNotReadyReason",value:function(){return this._m.getNotReadyReason()}},{key:"getErrMsg",value:function(e,t,n){return this._m.getErrMsg(e,t,n)}},{key:"_get",value:function(e){return this._m.get(e)}},{key:"destroy",value:function(){var e=this,t=this._get(12),n=t.getSDKAppID();return Ae.w("destroy ".concat(n," ").concat(t.getInstanceID())),this.logout().finally((function(){e._safetyCallbackFactory.destroy(),e._m.stopTimer(),e._get(24).terminate(),e._get(21).dealloc(),e._m.getOEmitInst().emit(S.SDK_DESTROY,{SDKAppID:n})}))}},{key:"on",value:function(e,t,n){Ae.d("on","eventName:".concat(e)),this._m.getOEmitInst().on(e,this._safetyCallbackFactory.defense(e,t,n),n)}},{key:"once",value:function(e,t,n){Ae.d("once","eventName:".concat(e)),this._m.getOEmitInst().once(e,this._safetyCallbackFactory.defenseOnce(e,t,n),n||this)}},{key:"off",value:function(e,t,n,o){Ae.d("off","eventName:".concat(e));var i=this._safetyCallbackFactory.find(e,t);null!==i&&(this._m.getOEmitInst().off(e,i,n,o),this._safetyCallbackFactory.delete(e,t))}},{key:"registerPlugin",value:function(e){(ut(e["tim-push"])?ut(e["tim-offline-push-plugin"])?this._get(18):this._get(28):this._get(36)).registerPlugin(e)}},{key:"setLogLevel",value:function(e){var t;e<=0&&((t=this.getErrMsg("TIM_ASCII_ART"))&&console.log(t),(t=this.getErrMsg("API_REFER"))&&(qt()?console.log("%c ".concat("IM SDK API ->"," %c"),"background:#ff9d00; padding:1px; border-radius:3px; color: #fff","background:transparent",t):console.log("IM SDK API ->",t)),(t=this.getErrMsg("DOCS_GUIDE"))&&console.log(t),t=this.getErrMsg("IOS_WEBVIEW_WARNING"),_e)&&t&&console.warn(t),Ae.setLevel(e)}},{key:"createTextMessage",value:function(e){return this._get(2).createTextMessage(e)}},{key:"createTextAtMessage",value:function(e){return this._get(2).createTextMessage(e)}},{key:"createImageMessage",value:function(e){return this._get(2).createImageMessage(e)}},{key:"createAudioMessage",value:function(e){return this._get(2).createAudioMessage(e)}},{key:"createVideoMessage",value:function(e){return this._get(2).createVideoMessage(e)}},{key:"createCustomMessage",value:function(e){return this._get(2).createCustomMessage(e)}},{key:"createFaceMessage",value:function(e){return this._get(2).createFaceMessage(e)}},{key:"createFileMessage",value:function(e){return this._get(2).createFileMessage(e)}},{key:"createLocationMessage",value:function(e){return this._get(2).createLocationMessage(e)}},{key:"createMergerMessage",value:function(e){return this._get(2).createMergerMessage(e)}},{key:"downloadMergerMessage",value:function(e){return e.type!==E.MSG_MERGER?yn({code:Pn.MSG_MERGER_TYPE_INVALID}):Ve(e.payload.downloadKey)?yn({code:Pn.MSG_MERGER_KEY_INVALID}):this._get(2).downloadMergerMessage(e).catch((function(e){return yn({code:Pn.MSG_MERGER_DOWNLOAD_FAIL})}))}},{key:"createForwardMessage",value:function(e){return this._get(2).createForwardMessage(e)}},{key:"sendMessage",value:function(e,t){return e instanceof Co?this._get(2).sendMessageInstance(e,t):yn({code:Pn.MSG_INSTANCE_REQUIRED})}},{key:"searchCloudMessages",value:function(e){return this._get(2).searchCloudMessages(e)}},{key:"callExperimentalAPI",value:function(e,t){return"sendComboMessage"===e?this._get(31).sendMessage(t):"handleGroupInvitation"===e?this._get(7).handleGroupInvitation(t):"isCommercialAbilityEnabled"===e?this._get(27).isFeatureEnabled(t):"isFeatureEnabledForStat"===e?this._get(27).isFeatureEnabledForStat(t):"isIntl"===e?this.isIntl():"sendTRTCCustomData"===e||"sendRoomCustomData"===e?this._get(30).sendTRTCCustomData(t):"getTimerID"===e?this._m.getTimerID():"getPollingTimerID"===e?this._m.getPollingTimerID(t):"setApplicationID"===e?(this._get(12).setApplicationID(t),void this._get(20).updateProtocolConfig()):"getServerConfig"===e?this._get(23).getServerConfig(t):"canIUseModule"===e?this._m.canIUseModule(t):"startMessageLongPolling"===e?this._get(7).startMessageLongPolling(t):"stopMessageLongPolling"===e?this._get(7).stopMessageLongPolling(t):"disableMessagePullOnInvite"===e?this._get(11).disableMsgPullOnInvite(t):"clearLocalMessage"===e?this._get(11).clearMemMsg(t,!1):"setCustomLoginInfo"===e?this._get(12).setCustomLoginInfo(t):yn({code:Pn.INVALID_OPERATION})}},{key:"revokeMessage",value:function(e){return this._get(2).revokeMessage(e)}},{key:"resendMessage",value:function(e,t){return e instanceof Co?this._get(2).resendMessage(e,t):yn({code:Pn.MSG_INSTANCE_REQUIRED})}},{key:"deleteMessage",value:function(e){return this._get(2).deleteMessage(e)}},{key:"translateText",value:function(e){return this._get(2).translateText(e)}},{key:"convertVoiceToText",value:function(e){return this._get(2).convertVoiceToText(e)}},{key:"setMessageExtensions",value:function(e,t){return this._get(3).setMessageExtensions(e,t)}},{key:"getMessageExtensions",value:function(e){return this._get(3).getMessageExtensions(e)}},{key:"deleteMessageExtensions",value:function(e,t){return this._get(3).deleteMessageExtensions(e,t)}},{key:"addMessageReaction",value:function(e,t){return this._get(34).addMessageReaction(e,t)}},{key:"removeMessageReaction",value:function(e,t){return this._get(34).removeMessageReaction(e,t)}},{key:"getMessageReactions",value:function(e){return this._get(34).getMessageReactions(e)}},{key:"getAllUserListOfMessageReaction",value:function(e){return this._get(34).getAllUserListOfMessageReaction(e)}},{key:"modifyMessage",value:function(e){return this._get(2).modifyRemoteMessage(e)}},{key:"getMessageList",value:function(e){return this._get(11).getMessageList(e)}},{key:"getMessageListHopping",value:function(e){return this._get(11).getMessageListHopping(e)}},{key:"sendMessageReadReceipt",value:function(e){return this._get(11).sendReadReceipt(e)}},{key:"getMessageReadReceiptList",value:function(e){return this._get(11).getReadReceiptList(e)}},{key:"getGroupMessageReadMemberList",value:function(e){var t=this._get(7);return t?t.getReadReceiptDetail(e):yn({code:Pn.NO_MODULE})}},{key:"findMessage",value:function(e){return this._get(11).findMessage(e)}},{key:"setMessageRead",value:function(e){return this._get(11).setMessageRead(e)}},{key:"getConversationList",value:function(e){return this._get(11).getConvList(e)}},{key:"getConversationProfile",value:function(e){return this._get(11).getConversationProfile(e)}},{key:"deleteConversation",value:function(e){return this._get(11).deleteConversation(e)}},{key:"setConversationDraft",value:function(e){return this._get(11).setConvDraft(e)}},{key:"clearHistoryMessage",value:function(e){return this._get(11).clearHistoryMessage(e)}},{key:"pinConversation",value:function(e){return this._get(11).pinConversation(e)}},{key:"setAllMessageRead",value:function(e){return this._get(11).setAllMessageRead(e)}},{key:"setMessageRemindType",value:function(e){return this._get(11).setMessageRemindType(e)}},{key:"setAllReceiveMessageOpt",value:function(e){return this._get(11).setAllRcvMsgOpt(e)}},{key:"getAllReceiveMessageOpt",value:function(){return this._get(11).getAllRcvMsgOpt()}},{key:"getTotalUnreadMessageCount",value:function(){return this._get(11).getTotalUnreadCount()}},{key:"setConversationCustomData",value:function(e){return this._get(11).setConvCustomData(e)}},{key:"markConversation",value:function(e){return this._get(11).markConv(e)}},{key:"getConversationGroupList",value:function(){return this._get(11).getConvGroupList()}},{key:"createConversationGroup",value:function(e){return this._get(11).createConvGroup(e)}},{key:"deleteConversationGroup",value:function(e){return this._get(11).deleteConvGroup(e)}},{key:"renameConversationGroup",value:function(e){return this._get(11).renameConvGroup(e)}},{key:"addConversationsToGroup",value:function(e){return this._get(11).addConvsToGroup(e)}},{key:"deleteConversationsFromGroup",value:function(e){return this._get(11).deleteConvsFromGroup(e)}},{key:"getMyProfile",value:function(){return this._get(4).getMyProfile()}},{key:"getUserProfile",value:function(e){return this._get(4).getUserProfile(e)}},{key:"updateMyProfile",value:function(e){return this._get(4).updateMyProfile(e)}},{key:"getBlacklist",value:function(){return this._get(4).getLocalBlacklist()}},{key:"addToBlacklist",value:function(e){return this._get(4).addBlacklist(e)}},{key:"removeFromBlacklist",value:function(e){return this._get(4).deleteBlacklist(e)}},{key:"setSelfStatus",value:function(e){return this._get(4).setSelfStatus(e)}},{key:"getUserStatus",value:function(e){return this._get(4).getUserStatus(e)}},{key:"subscribeUserStatus",value:function(e){return this._get(4).subscribeUserStatus(e)}},{key:"unsubscribeUserStatus",value:function(e){return this._get(4).unsubscribeUserStatus(e)}},{key:"getFriendList",value:function(){var e=this._get(8);return e?e.getLocalFriendList():yn({code:Pn.NO_MODULE})}},{key:"addFriend",value:function(e){var t=this._get(8);return t?t.addFriend(e):yn({code:Pn.NO_MODULE})}},{key:"deleteFriend",value:function(e){var t=this._get(8);return t?t.deleteFriend(e):yn({code:Pn.NO_MODULE})}},{key:"checkFriend",value:function(e){var t=this._get(8);return t?t.checkFriend(e):yn({code:Pn.NO_MODULE})}},{key:"getFriendProfile",value:function(e){var t=this._get(8);return t?t.getFriendProfile(e):yn({code:Pn.NO_MODULE})}},{key:"updateFriend",value:function(e){var t=this._get(8);return t?t.updateFriend(e):yn({code:Pn.NO_MODULE})}},{key:"getFriendApplicationList",value:function(){var e=this._get(8);return e?e.getLocalFriendApplicationList():yn({code:Pn.NO_MODULE})}},{key:"acceptFriendApplication",value:function(e){var t=this._get(8);return t?t.acceptFriendApplication(e):yn({code:Pn.NO_MODULE})}},{key:"refuseFriendApplication",value:function(e){var t=this._get(8);return t?t.refuseFriendApplication(e):yn({code:Pn.NO_MODULE})}},{key:"deleteFriendApplication",value:function(e){var t=this._get(8);return t?t.deleteFriendApplication(e):yn({code:Pn.NO_MODULE})}},{key:"setFriendApplicationRead",value:function(){var e=this._get(8);return e?e.setFriendApplicationRead():yn({code:Pn.NO_MODULE})}},{key:"getFriendGroupList",value:function(){var e=this._get(8);return e?e.getLocalFriendGroupList():yn({code:Pn.NO_MODULE})}},{key:"createFriendGroup",value:function(e){var t=this._get(8);return t?t.createFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"deleteFriendGroup",value:function(e){var t=this._get(8);return t?t.deleteFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"addToFriendGroup",value:function(e){var t=this._get(8);return t?t.addToFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"removeFromFriendGroup",value:function(e){var t=this._get(8);return t?t.removeFromFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"renameFriendGroup",value:function(e){var t=this._get(8);return t?t.renameFriendGroup(e):yn({code:Pn.NO_MODULE})}},{key:"followUser",value:function(e){var t=this._get(35);return t?t.followUser(e):yn({code:Pn.NO_MODULE})}},{key:"unfollowUser",value:function(e){var t=this._get(35);return t?t.unfollowUser(e):yn({code:Pn.NO_MODULE})}},{key:"getMyFollowersList",value:function(e){var t=this._get(35);return t?t.getMyFollowersList(e):yn({code:Pn.NO_MODULE})}},{key:"getMyFollowingList",value:function(e){var t=this._get(35);return t?t.getMyFollowingList(e):yn({code:Pn.NO_MODULE})}},{key:"getMutualFollowersList",value:function(e){var t=this._get(35);return t?t.getMutualFollowersList(e):yn({code:Pn.NO_MODULE})}},{key:"getUserFollowInfo",value:function(e){var t=this._get(35);return t?t.getUserFollowInfo(e):yn({code:Pn.NO_MODULE})}},{key:"checkFollowType",value:function(e){var t=this._get(35);return t?t.checkFollowType(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupList",value:function(){var e=this._get(7);return e?e.getGroupList():yn({code:Pn.NO_MODULE})}},{key:"getGroupProfile",value:function(e){var t=this._get(7);return t?t.getGroupProfile(e):yn({code:Pn.NO_MODULE})}},{key:"createGroup",value:function(e){var t=this._get(7);return t?t.createGroup(e):yn({code:Pn.NO_MODULE})}},{key:"dismissGroup",value:function(e){var t=this._get(7);return t?t.dismissGroup(e):yn({code:Pn.NO_MODULE})}},{key:"updateGroupProfile",value:function(e){var t=this._get(7);return t?t.updateGroupProfile(e):yn({code:Pn.NO_MODULE})}},{key:"joinGroup",value:function(e){var t=this._get(7);return t?t.joinGroup(e):yn({code:Pn.NO_MODULE})}},{key:"quitGroup",value:function(e){var t=this._get(7);return t?t.quitGroup(e):yn({code:Pn.NO_MODULE})}},{key:"searchGroupByID",value:function(e){var t=this._get(7);return t?t.searchGroupByID(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupOnlineMemberCount",value:function(e){var t=this._get(7);return t?t.getGroupOnlineMemberCount(e):yn({code:Pn.NO_MODULE})}},{key:"changeGroupOwner",value:function(e){var t=this._get(7);return t?t.changeGroupOwner(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupApplicationList",value:function(){var e=this._get(7);return e?e.getGroupApplicationList():yn({code:Pn.NO_MODULE})}},{key:"handleGroupApplication",value:function(e){var t=this._get(7);return t?t.handleGroupApplication(e):yn({code:Pn.NO_MODULE})}},{key:"initGroupAttributes",value:function(e){var t=this._get(7);return t?t.initGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupAttributes",value:function(e){var t=this._get(7);return t?t.setGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"deleteGroupAttributes",value:function(e){var t=this._get(7);return t?t.deleteGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupAttributes",value:function(e){var t=this._get(7);return t?t.getGroupAttributes(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupCounters",value:function(e){var t=this._get(7);return t?t.setGroupCounters(e):yn({code:Pn.NO_MODULE})}},{key:"increaseGroupCounter",value:function(e){var t=this._get(7);return t?t.increaseGroupCounter(e):yn({code:Pn.NO_MODULE})}},{key:"decreaseGroupCounter",value:function(e){var t=this._get(7);return t?t.decreaseGroupCounter(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupCounters",value:function(e){var t=this._get(7);return t?t.getGroupCounters(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupMemberList",value:function(e){var t=this._get(7);return t?t.getGroupMemberList(e):yn({code:Pn.NO_MODULE})}},{key:"getGroupMemberProfile",value:function(e){var t=this._get(7);return t?t.getGroupMemberProfile(e):yn({code:Pn.NO_MODULE})}},{key:"addGroupMember",value:function(e){var t=this._get(7);return t?t.addGroupMember(e):yn({code:Pn.NO_MODULE})}},{key:"deleteGroupMember",value:function(e){var t=this._get(7);return t?t.deleteGroupMember(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberMuteTime",value:function(e){var t=this._get(7);return t?t.setGroupMemberMuteTime(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberRole",value:function(e){var t=this._get(7);return t?t.setGroupMemberRole(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberNameCard",value:function(e){var t=this._get(7);return t?t.setGroupMemberNameCard(e):yn({code:Pn.NO_MODULE})}},{key:"setGroupMemberCustomField",value:function(e){var t=this._get(7);return t?t.setGroupMemberCustomField(e):yn({code:Pn.NO_MODULE})}},{key:"markGroupMemberList",value:function(e){var t=this._get(7);return t?t.markGroupMemberList(e):yn({code:Pn.NO_MODULE})}},{key:"getJoinedCommunityList",value:function(){return this._get(10).getJoinedCommunityList()}},{key:"createTopicInCommunity",value:function(e){return this._get(10).createTopicInCommunity(e)}},{key:"deleteTopicFromCommunity",value:function(e){return this._get(10).deleteTopicFromCommunity(e)}},{key:"updateTopicProfile",value:function(e){return this._get(10).updateTopicProfile(e)}},{key:"getTopicList",value:function(e){return this._get(10).getTopicList(e)}},{key:"addSignalingListener",value:function(e,t,n){var o=this._get(33);o&&o.addSignalingListener(e,this._safetyCallbackFactory.defense(e,t,n),n)}},{key:"removeSignalingListener",value:function(e,t,n){var o,i=this._safetyCallbackFactory.find(e,t);null!==i&&(o=this._get(33))&&(o.removeSignalingListener(e,i,n),this._safetyCallbackFactory.delete(e,t))}},{key:"invite",value:function(e){var t=this._get(33);return t?t.invite(e):yn({code:Pn.NO_MODULE})}},{key:"inviteSync",value:function(e,t,n){var o=this._get(33);return o?o.inviteSync(e,t,n):""}},{key:"inviteInGroup",value:function(e){var t=this._get(33);return t?t.invite(e):yn({code:Pn.NO_MODULE})}},{key:"inviteInGroupSync",value:function(e,t,n){var o=this._get(33);return o?o.inviteSync(e,t,n):""}},{key:"cancel",value:function(e){var t=this._get(33);return t?t.cancel(e):yn({code:Pn.NO_MODULE})}},{key:"accept",value:function(e){var t=this._get(33);return t?t.accept(e):yn({code:Pn.NO_MODULE})}},{key:"reject",value:function(e){var t=this._get(33);return t?t.reject(e):yn({code:Pn.NO_MODULE})}},{key:"getSignalingInfo",value:function(e){var t=this._get(33);return t?t.getSignalingInfo(e):null}},{key:"modifyInvitation",value:function(e){var t=this._get(33);return t?t.modifyInvitation(e):yn({code:Pn.NO_MODULE})}}]),Ac),bc={login:1,logout:1,getLoginUser:1,destroy:1,on:1,off:1,ready:1,setLogLevel:1,joinGroup:1,quitGroup:1,registerPlugin:1,getGroupOnlineMemberCount:1,isReady:1,addSignalingListener:1,removeSignalingListener:1,callExperimentalAPI:1};function Ac(e){o(this,Ac),e={SDKAppID:e.SDKAppID,unlimitedAVChatRoom:e.unlimitedAVChatRoom||!1,scene:e.scene||"",oversea:e.oversea||!1,instanceID:kt(),devMode:e.devMode||!1,testEnv:e.testEnv||!1,proxyServer:e.proxyServer||void 0,fileUploadProxy:e.fileUploadProxy||void 0,fileDownloadProxy:e.fileDownloadProxy||e.fileUploadProxy||void 0,eventThrottling:!1!==e.eventThrottling,partialUpdatedConversations:!0===e.partialUpdatedConversations,modules:e.modules||void 0},this._m=new Dc(e),this._safetyCallbackFactory=new kc(this._m)}function Rc(e){o(this,Rc),this._funcMap=new Map,this._m=e,this._n="SafetyCallback",this._reportCount=0}function Oc(e){var t=this;o(this,Oc);var n,i=new Jn("sdkConstruct"),a=(this._n="ModuleManager",this._isReady=!1,this._reason=Pn.USER_NOT_LOGGED_IN,this._startLoginTs=0,this._map=new Map,this._optionalModuleMap=new Map,this._iEmitter=null,this._oEmitter=null,this._checkCount=0,this._checkTimer=-1,this._map.set(12,new bi(this,e)),this._map.set(37,new Ec(this)),this._map.set(15,new da(this)),this._map.set(27,new or(this)),this._map.set(23,new Vs(this)),this._map.set(24,new tr(this)),this._map.set(26,new zs(this)),this._map.set(21,new ls(this)),this._map.set(20,new qs(this)),this._map.set(1,new Ri(this)),this._map.set(2,new Ga(this)),this._map.set(3,new Ua(this)),this._map.set(34,new xa(this)),this._map.set(31,new Fa(this)),this._map.set(4,new Li(this)),this._map.set(6,new Uo(this)),this._map.set(11,new ri(this)),this._map.set(7,new Ii(this)),this._map.set(10,new Ti(this)),this._map.set(13,new sa(this)),this._map.set(32,new cr(this)),this._map.set(14,new ca(this)),this._map.set(17,new Ma(this)),this._map.set(18,new qa(this)),this._map.set(19,new Va(this)),this._map.set(25,new Bs(this)),this._map.set(8,new er(this)),this._map.set(28,new ir(this)),this._map.set(36,new ar(this)),this._map.set(29,new sr(this)),this._map.set(30,new rr(this)),this._map.set(33,new gr(this)),this._map.set(35,new vr(this)),this._eventThrottleMap=new Map,this._eventThrottling=e.eventThrottling,this._map.get(12).isPartialUpdatedConvs()&&(this._eventThrottling=!1),ze(e.modules)?(Object.keys(e.modules).forEach((function(o){n=e.modules[o],"group-module"===o?t._map.set(7,new n(t)):"relationship-module"===o?t._map.set(8,new n(t)):"signaling-module"===o?t._map.set(33,new n(t)):"follow-module"===o&&t._map.set(35,new n(t)),t._optionalModuleMap.set(o,1)})),this._map.get(12).setUsingChatCore(!0)):this._map.has(7)||this._map.get(12).setUsingChatCore(!0),e.instanceID),s=e.SDKAppID,r=this._map.get(12).isIntl(),c=this._map.get(12).isUsingChatCore();a="instanceID:".concat(a," SDKAppID:").concat(s," isIntl:").concat(r," isUsingChatCore:").concat(c," host:").concat(Lt())+" isIOSWebView:".concat(_e," platform:").concat(ie," canIUseInflate:").concat(this.canIUseInflate())+" workerAvailable:".concat(he," eventThrottling:").concat(this._eventThrottling," UserAgent:").concat(oe),Jn.bindEventStatModule(this._map.get(14)),Jn.bindNetMonitorModule(this._map.get(15)),i.setMessage("".concat(a," ").concat(function(){var e="";if(Z)try{var t=ne.getSystemInfoSync(),n=t.model,o=t.version,i=t.system,a=t.platform,s=t.SDKVersion;e="model:".concat(n," version:").concat(o," system:").concat(i," platform:").concat(a," SDKVersion:").concat(s)}catch(r){e=""}return e}())).end(),Ae.i("SDK ".concat(a)),wn.prototype._getErrMsg=this.getErrMsg.bind(this),this._readyList=void 0,this._ssoLogForReady=null,this._initReadyList()}function wc(e){o(this,wc),this._m=e,this._n="InflateModule",this._bLogForInflateOK=!1,this._bLogForInflateError=!1}var Pc={};return(W={}).create=function(e){var n,o,i,a="TencentCloudChat.create",s=0;if(Ke(i=e.SDKAppID))s=i;else if(s=parseInt(i),isNaN(i))return Ae.e("".concat(a," failed. Failed to parse the SDKAppID, please check the arguments")),null;return s&&Pc[s]?Pc[s]:(Ae.l("".concat(a)),(i=new Lc(t(t({},e),{},{SDKAppID:s}))).on(S.SDK_DESTROY,(function(e){Pc[e.data.SDKAppID]=null,delete Pc[e.data.SDKAppID]})),n=i,o=Object.create(null),Object.keys(On).forEach((function(e){var t;n[e]&&(t=new k,o[e]=function(){var o=Array.from(arguments);return t.use((function(t,o){s=e;var i,a,s=!(!(i=n).isReady()&&1!==bc[s])||(a={code:a=i.getNotReadyReason(),message:"".concat(i.getErrMsg(a)," | ").concat(s," | ").concat(i.getErrMsg(Pn.SDK_IS_NOT_READY))},i.onError(a),a);return!0===s?o():yn(s)})).use((function(t,n){if(!0===function(e,t,n){if(void 0===t)return!0;var o=!0;if(ze(t))Object.keys(t).forEach((function(i){var a=1===e.length?e[0][i]:void 0;o=!!$t(a,t[i],n,i)&&o}));else if(We(t))for(var i=0;i<t.length;i++)o=!!$t(e[i],t[i],n,t[i].name)&&o;if(o)return o;throw new Error("Params validate failed.")}(t,Rn[e],e))return n()})).use((function(t,o){return n[e].apply(n,t)})),t.run(o)})})),e=o,Pc[s]=e,Rn.hookGetAPITips(i.getErrMsg.bind(i)),Ae.l("".concat(a," ok")),e)},W.TYPES=E,W.EVENT=S,W.TSignaling=D,W.VERSION="3.4.7",Ae.l("TencentCloudChat.VERSION:".concat(W.VERSION)),W}();const kw=Sw(Dw.exports);class Lw{constructor(e=0,t=0){this.high=e,this.low=t}equal(e){return null!==e&&this.low===e.low&&this.high===e.high}toString(){var e=Number(this.high).toString(16);let t=Number(this.low).toString(16);if(t.length<8){let e=8-t.length;for(;e;)t="0"+t,e--}return e+t}}const bw={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"},INDONESIA:{DEFAULT:"wss://wssidn-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT0:"wss://*w4c.my-imcloud.com",DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT0:"wss://*w4s.my-imcloud.com",DEFAULT:"wss://wsssgp.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",STAT:"https://apisgp.my-imcloud.com",ANYCAST:"wss://162.14.19.159"},KOREA:{DEFAULT0:"wss://*w4k.my-imcloud.com",DEFAULT:"wss://wsskr.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",STAT:"https://apikr.my-imcloud.com",ANYCAST:"wss://162.14.13.104"},GERMANY:{DEFAULT0:"wss://*w4g.my-imcloud.com",DEFAULT:"wss://wssger.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",STAT:"https://apiger.my-imcloud.com",ANYCAST:"wss://162.14.3.17"},IND:{DEFAULT0:"wss://*w4i.my-imcloud.com",DEFAULT:"wss://wssind.my-imcloud.com",BACKUP:"wss://wssind.im.qcloud.com",STAT:"https://apiind.my-imcloud.com",ANYCAST:"wss://162.14.18.188"},JPN:{DEFAULT0:"wss://*w4j.my-imcloud.com",DEFAULT:"wss://wssjpn.im.qcloud.com",BACKUP:"wss://wssjpn.my-imcloud.com",STAT:"https://apijpn.my-imcloud.com"},USA:{DEFAULT0:"wss://*w4u.my-imcloud.com",DEFAULT:"wss://wssusa.im.qcloud.com",BACKUP:"wss://wssusa.my-imcloud.com",STAT:"https://apiusa.my-imcloud.com",ANYCAST:"wss://162.14.10.42"},INDONESIA:{DEFAULT0:"wss://*w4y.my-imcloud.com",DEFAULT:"wss://wssidn.im.qcloud.com",BACKUP:"wss://wssidn.my-imcloud.com",STAT:"https://apiidn.my-imcloud.com",ANYCAST:"wss://43.129.34.169"}}},Aw="CHINA",Rw={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent(e=Aw){this.CURRENT=bw.PRODUCTION[e]}},NAME:{OPEN_IM:"openim",OPEN_IM_MSG_EXT:"openim_msg_ext_http_svc",GRP:"group_open_http_svc",GRP_AV:"group_open_avchatroom_http_svc",GRP_COMMUNITY:"million_group_open_http_svc",GRP_ATTR:"group_open_attr_http_svc",FD:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GRP_NO_AUTH:"group_open_http_noauth_svc",BIG_GRP_POLLING:"group_open_long_polling_http_svc",BIG_GRP_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MSG:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush",IM_MSG_AUDIT_MGR:"im_msg_audit_mgr",TUIROOM_SVR:"tui_room_svr",IM_OPEN_TRANSLATE:"im_open_translate",IM_OPEN_SPEECH:"im_open_speech",MSG_SEARCH:"message_search",FOLLOW:"follow",OFFLINE_PUSH_REPORT:"offline_push_report",IM_MSG_LOGIC:"im_msg_db_logic"}};new Lw(0,Math.pow(2,1)).toString(),new Lw(0,Math.pow(2,2)).toString(),new Lw(0,Math.pow(2,3)).toString(),new Lw(0,Math.pow(2,4)).toString(),new Lw(0,Math.pow(2,6)).toString(),new Lw(0,Math.pow(2,7)).toString(),new Lw(0,Math.pow(2,9)).toString(),new Lw(0,Math.pow(2,10)).toString(),new Lw(0,Math.pow(2,11)).toString(),new Lw(0,Math.pow(2,13)).toString(),new Lw(0,Math.pow(2,15)).toString(),new Lw(Math.pow(2,6)).toString(),new Lw(Math.pow(2,7)).toString(),new Lw(Math.pow(2,8)).toString(),new Lw(Math.pow(2,9)).toString(),new Lw(Math.pow(2,10)).toString(),new Lw(Math.pow(2,16)).toString(),new Lw(Math.pow(2,20)).toString();const Ow=(Rw.HOST.setCurrent(Aw),"undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting)),ww=(Ow&&wx.createGamePortal,"undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting)),Pw="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),Nw="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),Gw="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),Uw="undefined"!=typeof jd&&"function"==typeof jd.getSystemInfoSync,xw="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin;Ow&&wx.miniapp;const Fw=Ow||ww||Pw||Nw||Gw||xw||Uw,qw="undefined"!=typeof global&&(void 0!==global.nativeModuleProxy||void 0!==global.ReactNative),Vw="undefined"!=typeof uni?!Fw:"undefined"!=typeof window&&!Fw&&!qw,Bw=(ww?qq:Pw?tt:Nw?swan:Gw?my:Ow?wx:xw?uni:Uw&&jd,Vw&&window&&window.navigator&&window.navigator.userAgent||"");var Hw;let jw,Kw;(Hw=Bw.match(/OS (\d+)_/i))&&Hw[1]&&Hw[1],function(){var e,t,n=Bw.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);n&&(e=n[1]&&parseFloat(n[1]),t=n[2]&&parseFloat(n[2]),e)&&t&&parseFloat(n[1]+"."+n[2])}(),/MSIE/.test(Bw)||-1<Bw.indexOf("Trident")&&Bw.indexOf("rv:11.0"),function(){var e=(e=/MSIE\s(\d+)\.\d/.exec(Bw))&&parseFloat(e[1])}(),jw="undefined"!=typeof console?console:"undefined"!=typeof global&&global.console?global.console:"undefined"!=typeof window&&window.console?window.console:{};const $w=function(){},zw=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"];let Ww=zw.length;for(;Ww--;)Kw=zw[Ww],console[Kw]||(jw[Kw]=$w);const Yw=function(e){return void 0===e},Xw=function(e){return function(e){return"function"==typeof Array.isArray?Array.isArray(e):"array"===Jw(e)}(e)||null!==e&&"object"==typeof e},Jw=function(e){return Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase()},Zw=(Date.now||(Date.now=function(){return(new Date).getTime()}),function(e,t,n,o){if(!Xw(e)||!Xw(t))return 0;let i=0;var a,s=Object.keys(t);for(let r=0,c=s.length;r<c;r++)if(a=s[r],!(Yw(t[a])||n&&n.includes(a)))if(Xw(e[a])&&Xw(t[a]))i+=Zw(e[a],t[a],n,o);else{if(o&&o.includes(t[a]))continue;e[a]!==t[a]&&(e[a]=t[a],i+=1)}return i});var Qw={exports:{}};Qw.exports=function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){s(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=void 0!==Tw?Tw:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u="undefined"!=typeof wx&&"function"==typeof wx.getSystemInfoSync&&Boolean(wx.getSystemInfoSync().fontSizeSetting),l="undefined"!=typeof qq&&"function"==typeof qq.getSystemInfoSync&&Boolean(qq.getSystemInfoSync().fontSizeSetting),d="undefined"!=typeof tt&&"function"==typeof tt.getSystemInfoSync&&Boolean(tt.getSystemInfoSync().fontSizeSetting),p="undefined"!=typeof swan&&"function"==typeof swan.getSystemInfoSync&&Boolean(swan.getSystemInfoSync().fontSizeSetting),h="undefined"!=typeof my&&"function"==typeof my.getSystemInfoSync&&Boolean(my.getSystemInfoSync().fontSizeSetting),f="undefined"!=typeof uni&&"undefined"==typeof window&&"function"==typeof uni.requireNativePlugin,g=f&&"ios"===uni.getDeviceInfo().platform.toLocaleLowerCase(),_=(f&&uni.getDeviceInfo().platform.toLocaleLowerCase(),u||l||d||p||h||f),m=void 0!==c&&(void 0!==c.nativeModuleProxy||void 0!==c.ReactNative),v=l?qq:d?tt:p?swan:h?my:u?wx:f?uni:{},y=function(e){if("object"!==n(e)||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var o=t;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return t===o};function I(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(y(e)){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}return!1}var M=function(){function e(){o(this,e),this._n="WebRequest"}return a(e,[{key:"request",value:function(e,n){var o=this,i="".concat(this._n,".request"),a=e.downloadUrl||"",s=(e.method||"PUT").toUpperCase(),r=e.url;if(console.log("%c tim-upload-plugin %c","background:#0abf5b; padding:1px; border-radius:3px; color: #fff","background:transparent","".concat(i," URL:").concat(r)),e.qs){var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"=";return I(e)?"":y(e)?Object.keys(e).map((function(o){var i=encodeURIComponent(o)+n;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(e)})).join(t):i+encodeURIComponent(e[o])})).filter(Boolean).join(t):void 0}(e.qs);c&&(r+="".concat(-1===r.indexOf("?")?"?":"&").concat(c))}var u=new XMLHttpRequest;u.open(s,r,!0),u.responseType=e.dataType||"text";var l=e.headers||{};if(e.uploadByIP&&(l=t(t({},l),{},{host:e.uploadIP})),!I(l))for(var d in l)l.hasOwnProperty(d)&&"content-length"!==d.toLowerCase()&&"user-agent"!==d.toLowerCase()&&"origin"!==d.toLowerCase()&&"host"!==d.toLowerCase()&&u.setRequestHeader(d,l[d]);return u.onload=function(){if(200===u.status)n(null,o._xhrRes(u,o._xhrBody(u,a,e.uploadByIP&&e.uploadIP),l));else{if(e.uploadIP&&-1===e.url.indexOf(e.uploadIP))return e.url=(i=e.url,s=e.uploadIP,i.replace(/^http(s)?:\/\/(.*?)\//,"https://".concat(s,"/"))),e.uploadByIP=!0,o.request(e,n);var t={code:u.status,message:JSON.stringify(u.responseText)};n(t,o._xhrRes(u,o._xhrBody(u,a,e.uploadByIP&&e.uploadIP),l))}var i,s},u.onerror=function(t){var i=o._xhrBody(u,a,e.uploadByIP&&e.uploadIP),s={code:u.status,message:JSON.stringify(u.responseText)};i||u.statusText||0!==u.status||(t.message="CORS blocked or network error"),n(s,o._xhrRes(u,i)),s=null},e.onProgress&&u.upload&&(u.upload.onprogress=function(t){var n=t.total,o=t.loaded,i=Math.floor(100*o/n);e.onProgress({total:n,loaded:o,percent:(i>=100?100:i)/100})}),u.send(e.resources),u}},{key:"_xhrRes",value:function(e,t){var n={};return e.getAllResponseHeaders().trim().split("\n").forEach((function(e){if(e){var t=e.indexOf(":"),o=e.substr(0,t).trim().toLowerCase(),i=e.substr(t+1).trim();n[o]=i}})),{statusCode:e.status,statusMessage:e.statusText,headers:n,data:t}}},{key:"_xhrBody",value:function(e,t,n){return 200===e.status&&t?{location:t,uploadIP:n}:{response:e.responseText,uploadIP:n}}}]),e}(),C=["unknown","image","video","audio","log"],T=["name"],S=function(){function e(){o(this,e)}return a(e,[{key:"request",value:function(e,n){var o=this,i=e.resources,a=void 0===i?"":i,s=e.headers,c=void 0===s?{}:s,u=e.url,l=e.downloadUrl,d=void 0===l?"":l,p=u,f=null,_=d.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/),m=decodeURIComponent(_[3]),y=m.indexOf("?")>-1?m.split("?")[0]:m,I={key:e.fileKey?e.fileKey:y,success_action_status:200,"Content-Type":""},M={};if(g){var S=u.split("?sign=");if(S.length>1){var E=S[1];p="".concat(S[0],"?sign=").concat(encodeURIComponent("".concat(E))),M.sign=decodeURIComponent(E),M.signature=decodeURIComponent(E)}}var D={url:p,header:c,name:"file",filePath:a,formData:t(t({},I),M),timeout:e.timeout||3e5};if(h){var k=D;k.name,D=t(t({},r(k,T)),{},{fileName:"file",fileType:C[e.fileType]})}return(f=v.uploadFile(t(t({},D),{},{success:function(e){o._handleResponse({response:e,downloadUrl:d,callback:n})},fail:function(e){o._handleResponse({response:e,downloadUrl:d,callback:n})}}))).onProgressUpdate&&f.onProgressUpdate((function(t){e.onProgress&&e.onProgress({total:t.totalBytesExpectedToSend,loaded:t.totalBytesSent,percent:Math.floor(t.progress)/100})})),f}},{key:"_handleResponse",value:function(e){var n=e.downloadUrl,o=e.response,i=e.callback,a=o.header,s={};if(a)for(var r in a)a.hasOwnProperty(r)&&(s[r.toLowerCase()]=a[r]);var c=+o.statusCode;200===c?i(null,{statusCode:c,headers:s,data:t(t({},o.data),{},{location:n})}):i({code:c,message:JSON.stringify(o.data)},{statusCode:c,headers:s,data:void 0})}}]),e}(),E=function(){function e(){o(this,e)}return a(e,[{key:"request",value:function(e,t){var n=this,o=e.resources,i=void 0===o?"":o,a=e.fileKey,s=void 0===a?"":a,r=e.url,c=e.downloadUrl,u=void 0===c?"":c,l=new FormData;l.append("key",s),l.append("success_action_status",200),l.append("file",{uri:i,type:"application/octet-stream",name:"uploaded_file"}),fetch(r,{method:"POST",headers:{"Content-Type":"multipart/form-data"},body:l}).then((function(e){n._handleResponse({response:e,downloadUrl:u,callback:t})})).catch((function(e){n._handleResponse({response:e,downloadUrl:u,callback:t})}))}},{key:"_handleResponse",value:function(e){var t=e.downloadUrl,n=e.response,o=e.callback,i=n.headers,a=n.status,s=i&&i.map||{};200===a?o(null,{statusCode:200,headers:s,data:{location:t}}):o({code:a,message:JSON.stringify(n)},{statusCode:a,headers:s,data:void 0})}}]),e}();return function(){function e(){o(this,e),this.retry=1,this.tryCount=0,this.systemClockOffset=0,this.httpRequest=_?new S:m?new E:new M,console.log("TIMUploadPlugin.VERSION: ".concat("1.4.1"))}return a(e,[{key:"uploadFile",value:function(e,t){var n=this;return this.httpRequest.request(e,(function(o,i){o&&n.tryCount<n.retry&&n.allowRetry(o)?(n.tryCount++,n.uploadFile(e,t)):(n.tryCount=0,t(o,i))}))}},{key:"allowRetry",value:function(e){var t=!1,n=!1;if(e){var o=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var i=e.error&&e.error.Code,a=e.error&&e.error.Message;("RequestTimeTooSkewed"===i||"AccessDenied"===i&&"Request has expired"===a)&&(n=!0)}catch(c){}if(n&&o){var s=Date.now(),r=Date.parse(o);Math.abs(s+this.systemClockOffset-r)>=3e4&&(this.systemClockOffset=r-s,t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0)}return t}}],[{key:"getVersion",value:function(){return"1.4.1"}}]),e}()}();const eP=Sw(Qw.exports);uni.$store=mw,uni.$TIM=kw,uni.$chat=kw.create({SDKAppID:Mw.config.TChat.SDKAppID}),uni.$chat.setLogLevel(1),uni.$chat.registerPlugin({"tim-upload-plugin":eP}),function(){const e=Yu(Cw);return e.provide("util",Mw),e.use(mw),{app:e,Vuex:_w}}().app.use(fC).mount("#app");export{Fr as $,Qe as A,AO as B,Rr as C,wM as D,cf as E,Xs as F,kM as G,LM as H,UI as I,Xd as J,Fu as K,gr as L,di as M,ba as N,SM as O,Sw as P,Wr as Q,kw as R,xM as S,vw as T,CC as U,Ya as V,Yr as W,Uo as X,wC as Y,iL as Z,WM as _,rr as a,Ir as a$,ga as a0,de as a1,pe as a2,me as a3,ve as a4,ye as a5,Se as a6,De as a7,ke as a8,Gi as a9,kt as aA,To as aB,nc as aC,oa as aD,Ot as aE,Qs as aF,yi as aG,Ws as aH,Js as aI,Io as aJ,gc as aK,vu as aL,Mo as aM,du as aN,Co as aO,Do as aP,Eo as aQ,b as aR,O as aS,vr as aT,rc as aU,tl as aV,Yu as aW,Gs as aX,Xa as aY,Ns as aZ,Xu as a_,wc as aa,Wv as ab,La as ac,af as ad,MM as ae,hM as af,Zy as ag,Jy as ah,Ma as ai,VM as aj,yw as ak,Ew as al,Tw as am,no as an,Yy as ao,Ri as ap,Xi as aq,eP as ar,Vu as as,ma as at,ki as au,go as av,Hi as aw,Bi as ax,Zs as ay,cc as az,_r as b,Ut as b$,fo as b0,Zi as b1,cu as b2,xa as b3,Fa as b4,Ba as b5,qa as b6,Ua as b7,uu as b8,Va as b9,ya as bA,ca as bB,Da as bC,Ea as bD,Sa as bE,Rt as bF,Ta as bG,Ia as bH,ni as bI,fs as bJ,po as bK,ti as bL,qo as bM,Bn as bN,Br as bO,zu as bP,fi as bQ,sc as bR,Ki as bS,ar as bT,ic as bU,Wi as bV,Vn as bW,Hn as bX,io as bY,Ei as bZ,ac as b_,oc as ba,Gt as bb,Lt as bc,At as bd,Yi as be,mr as bf,Xr as bg,ko as bh,_s as bi,Wu as bj,Jr as bk,el as bl,Qr as bm,Wn as bn,Kn as bo,$n as bp,Hr as bq,zn as br,ur as bs,Xn as bt,Wa as bu,Er as bv,nt as bw,sa as bx,aa as by,ra as bz,cr as c,w as c0,Ra as c1,Yn as c2,vo as c3,uo as c4,dr as c5,ro as c6,Ka as c7,pu as c8,Gc as c9,Di as ca,ja as cb,qi as cc,ku as cd,Pu as ce,bu as cf,Au as cg,Du as ch,ec as ci,tc as cj,Li as ck,bi as cl,Ja as cm,Ha as cn,Zr as co,oi as cp,nl as cq,GC as cr,pf as d,yr as e,gI as f,qn as g,Mw as h,YM as i,Iw as j,pM as k,hi as l,ka as m,GM as n,nr as o,et as p,qM as q,oo as r,Mr as s,Z as t,co as u,jM as v,ii as w,gs as x,va as y,Ca as z};
|