@lynx-js/web-explorer-canary 0.0.7-canary-20250429-f4ac0f1b → 0.0.7-canary-20250429-e563441f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/static/js/async/45.js +1 -1
- package/dist/static/js/index.js +9 -9
- package/dist/stats.json +2045 -1922
- package/package.json +4 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(()=>{"use strict";var __webpack_modules__={413:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{callDestroyLifetimeFun:()=>Oe,destroyCard:()=>be,loadCard:()=>Ae});var Ee=function(){return this||(0,eval)("this")}(),d=Ee;function ce(e){let t=typeof e;return"object"!==t?t:Array.isArray(e)?"array":null==e?"null":e instanceof Date?"date":e instanceof RegExp?"regExp":"object"}function x(e){return"string"==typeof e}function M(e){return"object"===ce(e)}function X(e){return"function"===ce(e)}function D(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ge(e,Error)}}function ge(e,t){try{return e instanceof t}catch{return!1}}function U(e){return nativeConsole}var ye=function(){return this||(0,eval)("this")}(),De=U(`groupId:${ye.groupId||"-1"}`),Z=nativeConsole,_=Z,w=class extends Error{constructor(e,t){super(e),t&&(this.stack=t)}},k=class extends w{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},ee=class extends w{constructor(){super(...arguments),this.kind="USER_ERROR"}},E=class extends ee{constructor(){super(...arguments),this.name="USER_RUNTIME_ERROR"}},g=class extends k{constructor(){super(...arguments),this.name="INTERNAL_RUNTIME_ERROR"}},F=class extends k{constructor(){super(...arguments),this.name="INVOKE_ERROR"}},m="__Card__",B="app-service.js",pe="LynxGetSourceMapReleaseError",te={filename:"lynx_core",slot:"cacb96a8f906f8e29917cae2ed3799f4c6cab324",release:"unknown_version"},q=class{constructor(){this.observersFunc=[]}registerObserver(e){if(this.observersFunc.includes(e))return _.log("Subject: Observer has been attached already.");this.observersFunc.push(e)}removeObserver(e){let t=this.observersFunc.indexOf(e);if(-1===t)return _.log("Subject: Nonexistent observer.");this.observersFunc.splice(t,1)}notifyDataChange(e){this.observersFunc.forEach(t=>{if("function"==typeof t)try{t(e)}catch(e){_.log("SharedData change and notifyDataChange error info:"+e)}})}};d.multiApps={},d.currentAppId="",d.globComponentRegistPath="",d.sharedData={},d.globDynamicComponentEntry=m,d.shareDataSubject=new q,d.TaroLynx={},d.bundleSupportLoadScript=!0;var{loadScript:Xe}=d,l=d,ve=/\d+/,y=class r{constructor(e){this.major=0,this.minor=0,this.revision=0,this.build=0,e=String(e),[this.major=0,this.minor=0,this.revision=0,this.build=0]=e.split(".").map(e=>{let t=ve.exec(e);return t&&t.length>0?+t[0]:0})}gt(e){return"string"==typeof e&&(e=new r(e)),this.major>e.major||!(this.major<e.major)&&(this.minor>e.minor||!(this.minor<e.minor)&&(this.revision>e.revision||!(this.revision<e.revision)&&(this.build>e.build||(this.build<e.build,!1))))}eq(e){return"string"==typeof e&&(e=new r(e)),this.major===e.major&&this.minor===e.minor&&this.revision===e.revision&&this.build===e.build}lt(e){return!this.eq(e)&&!this.gt(e)}gte(e){return this.eq(e)||this.gt(e)}lte(e){return this.eq(e)||this.lt(e)}},ot=new y("2.4"),it=new y("2.7"),st=new y("2.9"),at=new y("2.12"),lt=new y("2.14");function h(e,t,r){let{originError:i,errorCode:s,errorLevel:n,runType:o=te}=r??{};_.error("The following error occurred in the JSRuntime:"),_.error(`${e?.message}
|
|
2
2
|
${e?.stack}`),e.cause=M(e.cause)?JSON.stringify(e.cause):e.cause;try{t.reportException(e,{...o,buildVersion:"unknown_version",versionCode:"unknown_version",errorCode:s,errorLevel:n})}catch(e){_.error(`reportError err:
|
|
3
|
-
`,e)}}var b=class{constructor(e,t){this.getApp=e,this.getNativeApp=t,this.setSourceMapRelease=e=>{if(D(e)&&e.name===u.kGetSourceMapReleaseErrorName&&x(e.message)&&x(e.stack))return void this.getNativeApp().__SetSourceMapRelease({name:e.name,message:e.message,stack:e.stack});JSON.stringify(e)},this.getSourceMapRelease=e=>{let t=this.getNativeApp().__GetSourceMapRelease(e);return t||(t=this.getNativeApp().__GetSourceMapRelease(u.kDefaultSourceMapURL)),t},this.getApp=e,this.getNativeApp=t}rebind(e){this.getApp=e}},j=class r{static{this.count=0}constructor(e){this.effect=e,this.id="__lynx-inner-js-animation-"+r.count++}cancel(){this.effect.target.cancelAnimate(this)}pause(){this.effect.target.pauseAnimate(this)}play(){this.effect.target.playAnimate(this)}},G=class{constructor(e,t,r){this.target=e,this.keyframes=t,this.options=r}},O=class{constructor(e,t,r){this._root=e,this._idSelector="#"+t,this._lynx=r,this._element=void 0}ensureElement(){this._element||(this._element=this._lynx.createElement(this._root,this._idSelector))}animate(e,t){this.ensureElement();let r=new j(new G(this,e,t));return this._element.animate(0,r.id,e,t),r}playAnimate(e){this._element.animate(1,e.id,void 0,void 0)}pauseAnimate(e){this._element.animate(2,e.id,void 0,void 0)}cancelAnimate(e){this._element.animate(3,e.id,void 0,void 0)}finishAnimate(e){this._element.animate(4,e.id,void 0,void 0)}setProperty(e,t){if(this.ensureElement(),"string"==typeof e&&"string"==typeof t)this._element.setProperty({[e]:t});else if("object"==typeof e)this._element.setProperty(e);else throw Error(`setProperty's param must be string or object. While current type is ${typeof e} and ${typeof t}.`)}},ue=O,S=class r{constructor(e,t,r){this._component=e,this._taskQueue=t,this._native_proxy=r,this._fire_immediately=!1,this._root_unique_id=void 0}static fromQuery(e,t){return new r(t??e._component,e._taskQueue.slice(),e._native_proxy)}static newEmptyQuery(e,t){return new r(t??"",[],e)}commitTask(e){let t=r.fromQuery(this,this._component);return(t._taskQueue.push(e),this._fire_immediately)?void t.exec():t}in(e){return e.createSelectorQuery(this)}select(e){return new R(this,{type:0,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}selectAll(e){return new R(this,{type:0,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!1})}selectReactRef(e){if(this._taskQueue.length){let e="selectReactRef() should be called before any other selector query methods";nativeConsole.warn(e);let t=Error(e);h(new F(e,t.stack),this._native_proxy.nativeApp);return}return this._fire_immediately=!0,new R(this,{type:1,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}selectRoot(){return this.select("")}selectUniqueID(e){return new R(this,{type:2,identifier:e.toString(),component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}exec(){for(let e=0;e<this._taskQueue.length;++e)this._taskQueue[e](this._native_proxy)}setRoot(e){return this._root_unique_id=Number(e),this}},R=class{static{this.nodePool={}}constructor(e,t){this._nodeSelectToken=t,this._selectorQuery=e}invoke(e){let t=t=>{let r=t=>{0===t.code?e.success&&e.success(t.data):e.fail&&e.fail(t)};if(!this._nodeSelectToken.first_only)return void r({code:5,data:"selectAll not supported for invoke method"});t.nativeApp.invokeUIMethod(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,e.method,e.params??{},r,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}path(e){let t=t=>{let r=t=>{e&&e(t.data,t.status)};t.nativeApp.getPathInfo(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,r,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}fields(e,t){let r=r=>{let i=i=>{if(e.query){let t=t=>{t.query=S.newEmptyQuery(r),t.query.setRoot(t.unique_id.toString()),e.unique_id||delete t.unique_id};if(this._nodeSelectToken.first_only){let e=i.data;e&&t(e)}else for(let e of i.data)t(e)}t&&t(i.data,i.status)},s=[];for(let t in e){if("query"==t&&!0==e[t]&&!e.unique_id){s.push("unique_id");continue}e[t]&&s.push(t)}r.nativeApp.getFields(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,s,i,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(r)}setNativeProps(e){let t=t=>{t.nativeApp.setNativeProps(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,e,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}},T=class r{constructor(e,t,i,s){this.getNativeApp=e,this.getApp=t,this.Promise=i,this.getNativeLynx=s,this.setTimeout=this.getApp().wrapReport(this.getNativeApp().setTimeout,"setTimeout Error"),this.setInterval=this.getApp().wrapReport(this.getNativeApp().setInterval,"setInterval Error"),this.clearInterval=this.getNativeApp().clearInterval,this.clearTimeout=this.getNativeApp().clearTimeout,this.resumeExposure=this.getApp()._apiList.resumeExposure,this.requireModule=(e,t,i)=>{if(this.requireModule.cache[e])return this.requireModule.cache[e];let s=this.getApp().requireModule(e,t,i);return this.requireModule.cache[e]=s,s},this.requireModuleAsync=(e,t)=>{if(t??=e=>{e&&this.getApp().handleUserError(e)},this.requireModuleAsync.cache[e])return void t(null,this.requireModuleAsync.cache[e]);this.getApp().requireModuleAsync(e,(i,s)=>{i||(this.requireModuleAsync.cache[e]=s),t(i,s)})},this.createElement=(e,t)=>this.getNativeLynx().createElement(e,t),this.getElementById=e=>new ue("",e,this),this.reportError=(e,t)=>{let i;if(D(e))i=e;else{let t;i=Error(t="string"!=typeof e?JSON.stringify(e):e)}let{level:s="error"}=t||{},n;switch(s){case"error":default:n=1;break;case"warning":n=2;break;case"fatal":n=0}this.getApp().handleUserError(i,void 0,n)},this.registerModule=(e,t)=>this.getApp().registerModule(e,t),this.getJSModule=e=>this.getApp().getJSModule(e),this.getTextInfo=this.getApp()._apiList.getTextInfo,this.addFont=(e,t)=>{if(!M(e))throw Error("The first argument must be object type");if(!x(e["font-family"])||!x(e.src))throw Error("The font value must have font-family and src");if(!X(t))throw Error("The second argument must be function type");this.getNativeLynx().addFont(e,t)},this.stopExposure=this.getApp()._apiList.stopExposure,this.setObserverFrameRate=this.getApp()._apiList.setObserverFrameRate,this.performance=this.getApp().performance,this.beforePublishEvent=this.getApp()._aopManager._beforePublishEvent,this.setSessionStorageItem=(e,t)=>{this.dispatchSessionStorageEvent({type:"__SetSessionStorageItem",data:{key:e,value:t}})},this.getSessionStorageItem=(e,t)=>{this.getNativeApp().getSessionStorageItem(e,t)},this.subscribeSessionStorage=(e,t)=>{let i=r.__registerSharedDataCounter++;return this.getNativeApp().subscribeSessionStorage(e,i,t),i},this.unsubscribeSessionStorage=(e,t)=>{this.dispatchSessionStorageEvent({type:"__UnSubscribeSessionStorage",data:{key:e,listenerId:t}})},this.getDevtool=this.getNativeLynx().getDevtool,this.getCoreContext=this.getNativeLynx().getCoreContext,this.getJSContext=this.getNativeLynx().getJSContext,this.getUIContext=this.getNativeLynx().getUIContext,this.getCustomSectionSync=this.getNativeLynx().getCustomSectionSync,this.accessibilityAnnounce=this.getNativeApp().nativeModuleProxy.LynxAccessibilityModule?.accessibilityAnnounce,this.requestResourcePrefetch=this.getNativeApp().nativeModuleProxy.LynxResourceModule?.requestResourcePrefetch,this.cancelResourcePrefetch=this.getNativeApp().nativeModuleProxy.LynxResourceModule?.cancelResourcePrefetch,this.setSharedData=(e,t)=>{l.sharedData[e]=t;let i={};i[e]=t,l.shareDataSubject.notifyDataChange(i)},this.getSharedData=e=>l.sharedData[e],this.registerSharedDataObserver=e=>l.shareDataSubject.registerObserver(e),this.removeSharedDataObserver=e=>l.shareDataSubject.removeObserver(e),this.triggerLepusGlobalEvent=(e,t)=>this.getNativeApp().triggerLepusGlobalEvent(e,t),this.reload=(e,t)=>{this.getNativeLynx().reload(e,t)},this.fetchDynamicComponent=(e,t,i,s)=>this.getNativeLynx().fetchDynamicComponent(e,t,i,s),this.QueryComponent=(e,t)=>{let i=()=>{t({code:0,data:{url:e,sync:!0,error_message:"",mode:"cache"},detail:{schema:e,cache:!1,errMsg:""}})};if(this.getApp().loadedDynamicComponentsSet.has(e))return void i();let s=s=>{!0===s.__hasReady?(l.loadDynamicComponent(this.getApp(),e),i()):t(s)};this.getNativeLynx().QueryComponent(e,s)},this.loadDynamicComponent=(e,t,i={})=>new this.Promise((s,n)=>{let o=[],a;if(Array.isArray(e)?(o=e,a=t):"string"==typeof t?(o=[e],a=t):(a=e,i=t),this.getApp().loadedDynamicComponentsSet.has(a))return void s({code:0,data:{url:a,sync:!1,error_message:"",mode:"normal"},detail:{schema:a,cache:!1,errMsg:""}});this.getNativeLynx().fetchDynamicComponent(a,i,e=>{e&&0==e.code?s(e):n(e)},o)}),this.fetch=(e,t)=>new this.Promise((i,s)=>{let n=new(this.getApp())._RequestClass(e,t),o=n.signal;if(o.aborted)return s(o.reason);o.addEventListener("abort",e=>{s(o.reason)});let a={method:n.method,url:n.url,origin:this.getNativeApp().__pageUrl,headers:Object.fromEntries(n.headers.entries()),body:n._arrayBuffer,lynx:n.lynxExtension};this.getApp().NativeModules.LynxFetchModule.fetch(a,e=>{if(!o.aborted)try{let t=new(this.getApp())._ResponseClass(e.body,e);i(t)}catch{s(TypeError(e.statusText))}},e=>{o.aborted||s(TypeError(e.message))})}),this.createSelectorQuery=()=>S.newEmptyQuery({nativeApp:this.getNativeApp(),lynx:this}),this.requestAnimationFrame=e=>this.getNativeApp().requestAnimationFrame(e),this.cancelAnimationFrame=e=>this.getNativeApp().cancelAnimationFrame(e),this.__addReporterCustomInfo=e=>{this.getNativeApp().__addReporterCustomInfo(e)},this.init(void 0)}static{this.__registerSharedDataCounter=0}rebind(e){this.init(e)}init(e){if(e)this.getApp=e,this.__globalProps=this.getNativeLynx().__globalProps||{},this.__presetData=this.getNativeLynx().__presetData||{};else{let e={};this.requireModule.cache=e,this.requireModuleAsync.cache=e,this.__globalProps=this.getNativeLynx().__globalProps||{},this.__presetData=this.getNativeLynx().__presetData||{},this._switches={}}}dispatchSessionStorageEvent(e){0!=this.getCoreContext().dispatchEvent(e)&&this.getJSContext().dispatchEvent(e)}queueMicrotask(e){this.getNativeLynx().queueMicrotask(e)}},v=class{constructor(e){this._internal_callLynxSetModule=e,this._events=new Map}getEventsSize(e){return this._events.get(e)?.length}setCallLynxSetModule(e){this._internal_callLynxSetModule=e}addListener(e,t,r){let i=this._events.get(e);"keyboardstatuschanged"==e&&this._internal_callLynxSetModule&&this._internal_callLynxSetModule("switchKeyBoardDetect",[!0]),i?i.push({listener:t,context:r}):this._events.set(e,[{listener:t,context:r}])}removeListener(e,t){if("function"!=typeof t)throw Error("removeListener only takes instances of Function");let r=this._events.get(e),i=0;Array.isArray(r)&&r.some(e=>{if(t===e.listener)return!0;i++})&&r.splice(i,1),"keyboardstatuschanged"==e&&this._internal_callLynxSetModule&&this._internal_callLynxSetModule("switchKeyBoardDetect",[!1])}emit(e,t){let r=this._events.get(e);Array.isArray(r)&&r.forEach(e=>{let{listener:r,context:i}=e;"function"==typeof r&&r.apply(i||this,t)})}removeAllListeners(e){if("string"==typeof e)return void this._events.delete(e);this._events=new Map}trigger(e,t){let r=this._events.get(e);Array.isArray(r)&&("string"==typeof t&&(t=JSON.parse(t)),r.forEach(e=>{let{listener:r,context:i}=e;"function"==typeof r&&r.call(i||this,t)}))}toggle(e,...t){this.emit(e,t)}},V=class{constructor(){this._beforePublishEvent=new re}},re=class extends v{add(e,t,r){return super.addListener(e,t,r),this}remove(e,t){return super.removeListener(e,t),this}},$=v,Q=class{constructor(e){this._textInfoModule=void 0,this.getTextInfo=(e,t)=>(void 0===this._textInfoModule&&(this._textInfoModule=this._nativeModules.LynxTextInfoModule),this._textInfoModule&&this._textInfoModule.getTextInfo?this._textInfoModule.getTextInfo(e,t):{width:e.length}),this._nativeModules=e}},Y=class{constructor(e){this.resumeExposure=()=>{this._exposureModule.resumeExposure()},this.stopExposure=e=>{this._exposureModule.stopExposure(e)},this.setObserverFrameRate=e=>{this._exposureModule.setObserverFrameRate(e)},this._nativeModules=e,this._exposureModule=this._nativeModules.LynxExposureModule}},ne=class{constructor(e,t){this._selector=e,this._callback=t}invokeCallback(e){this._callback(e)}},oe=class{constructor(e,t,r){this._id=e,this._intersectionObserverModule=t,this._manager=r,this._observationTargets=[],this._defaultMargins={left:0,right:0,top:0,bottom:0}}relativeTo(e,t){return this._intersectionObserverModule.relativeTo(this._id,e,t||this._defaultMargins),this}relativeToViewport(e){return this._intersectionObserverModule.relativeToViewport(this._id,e||this._defaultMargins),this}relativeToScreen(e){return this._intersectionObserverModule.relativeToScreen(this._id,e||this._defaultMargins),this}observe(e,t){this._observationTargets.push(new ne(e,t)),this._intersectionObserverModule.observe(this._id,e,this._observationTargets.length-1)}disconnect(){this._intersectionObserverModule.disconnect(this._id),this._manager.removeObserver(this._id)}invokeCallback(e,t){e<this._observationTargets.length&&this._observationTargets[e].invokeCallback(t)}},J=class{constructor(e){this._nativeModules=e,this._observerId=0,this._observers={},this._defaultOptions={thresholds:[0],initialRatio:0,observeAll:!1}}createIntersectionObserver(e,t){let r=this._nativeModules.IntersectionObserverModule,i=new oe(this._observerId,r,this);return this._observers[this._observerId]=i,r.createIntersectionObserver(this._observerId,e,t||this._defaultOptions),this._observerId++,i}getObserver(e){return this._observers[e]}removeObserver(e){this._observers[e]=null}},de={onPerformance:"lynx.performance.onPerformanceEvent"},H=class{constructor(e,t){this._emitter=e,this._onPerformance=t,this._observedNames=[]}observe(e){this._observedNames.length>0||(this._observedNames=e,this._emitter.addListener(de.onPerformance,this.onPerformanceEvent.bind(this)))}disconnect(){this._observedNames=[],this._emitter.removeListener(de.onPerformance,this.onPerformanceEvent.bind(this))}onPerformanceEvent(e){if(0===this._observedNames.length)return;let t=e.entryType+"."+e.name;(this._observedNames.includes(t)||this._observedNames.includes(e.entryType))&&this._onPerformance(e)}},N={onSetup:"lynx.performance.timing.onSetup",onUpdate:"lynx.performance.timing.onUpdate"},C=class{constructor(e,t){this._emitter=e,this._generatePipelineOptions=t.generatePipelineOptions,this._onPipelineStart=t.onPipelineStart,this._markTiming=t.markPipelineTiming,this._profileStart=t.profileStart,this._profileEnd=t.profileEnd,this._profileMark=t.profileMark,this._profileFlowId=t.profileFlowId,this._isProfileRecording=t.isProfileRecording,this._bindPipelineIdWithTimingFlag=t.bindPipelineIdWithTimingFlag}profileStart(e,t){this._profileStart(e,t)}profileEnd(){this._profileEnd()}profileMark(e,t){this._profileMark(e,t)}profileFlowId(){return this._profileFlowId()}createObserver(e){return new H(this._emitter,e)}isProfileRecording(){return this._isProfileRecording()}addTimingListener(e){this._emitter.addListener(N.onSetup,e.onSetup,e),this._emitter.addListener(N.onUpdate,e.onUpdate,e)}removeTimingListener(e){this._emitter.removeListener(N.onSetup,e.onSetup),this._emitter.removeListener(N.onUpdate,e.onUpdate)}removeAllTimingListener(){this._emitter.removeAllListeners(N.onSetup),this._emitter.removeAllListeners(N.onUpdate)}_initializeAndStartPipeline(){let e=this._generatePipelineOptions();return e&&this._onPipelineStart(e.pipelineID),e}_checkAndBindTimingFlag(e,t){if(!e)return;let r="__lynx_timing_flag";t[r]&&(this._bindPipelineIdWithTimingFlag(e.pipelineID,t[r]),this._markTiming(e.pipelineID,"update_set_state_trigger"),e.needTimestamps=!0)}},_e=C,me=l.LynxJSBI,f=class r{constructor(e){for(let t in this._cachedFunctions={},e)Object.defineProperty(this,t,{get(){if(this._cachedFunctions[t])return this._cachedFunctions[t];let r=e[t];return"function"==typeof r&&(this._cachedFunctions[t]=r),r}})}static create(e){return new r(e)}};function he(e,t,r,i,s=!1){let{getPromise:n}=l;return"function"==typeof n?n({nextTick:s?i:t=>e(t,0),setTimeout:e,onUnhandled:t,clearTimeout:r}):l.Promise}var I=class{constructor(){}decode(e){return 0===e.byteLength?"":(e instanceof DataView?e=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):ArrayBuffer.isView(e)&&(e=e.buffer),globalThis.TextCodecHelper.decode(e))}encodeInto(){throw TypeError("TextEncoder().encodeInto not supported")}get encoding(){return"utf-8"}get fatal(){return!1}get ignoreBOM(){return!0}},W=class{constructor(){}encode(e){return new Uint8Array(globalThis.TextCodecHelper.encode(e))}encodeInto(){throw TypeError("TextEncoder().encodeInto not supported")}get encoding(){return"utf-8"}},A=class r{constructor(){this._arrayBuffer=new ArrayBuffer(0),this._bodyUsed=!1}safeUseBody(e){if(this._bodyUsed)return;let t=e(this._arrayBuffer);return this._bodyUsed=!0,this._arrayBuffer=null,t}cloneArrayBuffer(e){return e.slice(0)}setBody(e){e instanceof r?e._bodyUsed||(this._arrayBuffer=this.cloneArrayBuffer(e._arrayBuffer)):e instanceof ArrayBuffer?this._arrayBuffer=this.cloneArrayBuffer(e):e instanceof DataView?this._arrayBuffer=this.cloneArrayBuffer(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):ArrayBuffer.isView(e)?this._arrayBuffer=this.cloneArrayBuffer(e.buffer):e&&(this._arrayBuffer=new W().encode(e.toString()).buffer)}arrayBuffer(){return Promise.resolve(this.safeUseBody(e=>e))}text(){return Promise.resolve(this.safeUseBody(e=>new I().decode(e)))}json(){return Promise.resolve(this.safeUseBody(e=>JSON.parse(new I().decode(e))))}get bodyUsed(){return this._bodyUsed}};Se=Symbol.toStringTag,_computedKey=Symbol.iterator;var _computedKey,_computedKey1,Se,P=class r{constructor(e){if(this._headers_map=new Map,this[Se]="Headers",null===e||"number"==typeof e)throw TypeError("Headers init with null/number");if(e instanceof r)for(let[t,i]of e)this.append(t,i);else Array.isArray(e)?e.forEach(([e,t])=>{this.append(e,Array.isArray(t)?t.join(" "):t)}):e&&Object.getOwnPropertyNames(e).forEach(t=>{let i=e[t];this.append(t,Array.isArray(i)?i.join(" "):i)})}[_computedKey](){return this.entries()}*keys(){for(let[e,t]of this._headers_map)yield e}*values(){for(let[e,t]of this._headers_map)yield t}*entries(){for(let e of this._headers_map)yield e}has(e){return this._headers_map.has(e)}get(e){return this._headers_map.get(e)??null}set(e,t){this._headers_map.set(e,String(t))}append(e,t){let r=this.has(e)?`${this.get(e)}, ${t}`:t;this.set(e,r)}delete(e){this.has(e)&&this._headers_map.delete(e)}forEach(e,t){for(let[r,i]of this.entries())e.call(t,i,r,this)}};_computedKey1=Symbol.toStringTag;var K=class r extends ${get aborted(){return this._aborted}get reason(){return this._reason}constructor(){super(),this._aborted=!1}get[_computedKey1](){return"[object AbortSignal]"}dispatchEvent(e){"abort"===e.type&&(this._aborted=!0,this._reason=e.reason,"function"==typeof this.onabort&&this.onabort.call(this,e)),super.emit(e.type,e)}addEventListener(e,t){super.addListener(e,t)}static __create(){return new r}};function se(e){return class e extends A{get url(){return this._url}get headers(){return this._headers}get method(){return this._method}get signal(){return this._signal}get lynxExtension(){return this._lynxExtension}constructor(t,r){if(super(),r=r||{},t instanceof e){if(t.bodyUsed)throw TypeError("Already read");this._url=t.url,r.headers||(this._headers=new P(t.headers)),this._method=t.method,this._signal=t.signal,this.setBody(t._arrayBuffer)}else this._url=String(t);if((r.headers||!this.headers)&&(this._headers=new P(r.headers)),this._method=r.method||this.method||"GET",this._method=this._method.toUpperCase(),("GET"===this.method||"HEAD"===this.method)&&r.body)throw TypeError("Body not allowed for GET or HEAD requests");"u">typeof r.signal&&(this._signal=r.signal),this._signal=this._signal||K.__create(),this._lynxExtension=r.lynxExtension||{},this._headers.get("Content-Type")||("string"==typeof r.body?this._headers.set("Content-Type","text/plain;charset=UTF-8"):globalThis.URLSearchParams&&r.body instanceof URLSearchParams?this._headers.set("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"):r.body instanceof ArrayBuffer||this._headers.set("Content-Type","text/plain;charset=UTF-8")),this.setBody(r.body)}clone(){let t=new e(this,{method:this.method});return t.setBody(this),t}}}function ae(e){return class e extends A{get url(){return this._url}get status(){return this._status}get statusText(){return this._statusText}get ok(){return this._ok}get headers(){return this._headers}get lynxExtension(){return this._lynxExtension}constructor(e,t){if(super(),t=t||{},this._status=void 0===t.status?200:t.status,this._status<200||this._status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this._ok=this._status>=200&&this._status<300,this._statusText=void 0===t.statusText?"":""+t.statusText,this._headers=new Headers(t.headers),this._url=t.url||"",this._lynxExtension=t.lynxExtension||{},this.setBody(e)}clone(){let t=new e(null,{status:this._status,statusText:this._statusText,headers:new Headers(this._headers),url:this._url});return t.setBody(this),t}}}var u=class _BaseApp{constructor(e,t){this.dataTypeSet=new Set(["string","number","array","object","boolean","null","function"]),this.removeInternalEventListenersCallbacks=[],this.setSourceMapRelease=e=>{this.Reporter.setSourceMapRelease(e)},this.getSourceMapRelease=e=>this.Reporter.getSourceMapRelease(e),this.setupGetTextInfoApi=()=>{this._apiList.getTextInfo=(e,t)=>this._textInfoManager.getTextInfo(e,t)},this.setupExposureApi=()=>{this._apiList.resumeExposure=()=>{this._exposureManager.resumeExposure()},this._apiList.stopExposure=e=>{this._exposureManager.stopExposure(e||{sendEvent:!0})},this._apiList.setObserverFrameRate=e=>{this._exposureManager.setObserverFrameRate(e||{forPageRect:20,forExposureCheck:20})}},this.requestAnimationFrame=e=>this._nativeApp.requestAnimationFrame(e),this.cancelAnimationFrame=e=>this._nativeApp.cancelAnimationFrame(e),this.__removeInternalEventListeners=()=>{this.removeInternalEventListenersCallbacks.forEach(e=>{e()})},this.initBase(e),t?t.transferSingletonData(this,this.__internal__callLynxSetModule.bind(this)):this.initExtra(e),this.setTimeout=this.nativeApp.setTimeout,this.setInterval=this.nativeApp.setInterval,this.clearInterval=this.nativeApp.clearInterval,this.clearTimeout=this.nativeApp.clearTimeout,this.addInternalEventListeners()}initExtra(e){let{lynx:t}=e;this.modules={},this._lazyCallableModules=new Map,this._nativeApp=f.create(this._nativeApp),this.sharedConsole=U(`runtimeId:${this.nativeAppId}`),this.dynamicComponentExports={},this.loadedDynamicComponentsSet=new Set,this._lazyCallableModules=new Map,this.Reporter=new b(()=>this,()=>this.nativeApp),this.GlobalEventEmitter=new $(this.__internal__callLynxSetModule.bind(this)),this._intersectionObserverManager=new J(this.NativeModules),this._exposureManager=new Y(this.NativeModules),this.setupExposureApi(),this._aopManager=new V,this.beforePublishEvent=this._aopManager._beforePublishEvent,this.performance=new _e(this.GlobalEventEmitter,this.nativeApp);let r=this.setupPromise(this.nativeApp.setTimeout,this.nativeApp.clearTimeout,t);this.lynx=this.createLynx(t,r),this.setupJSModule(),this.setupIntersectionApi(),this.setupFetchAPI(r)}initBase(e){let{nativeApp:t,params:r}=e;this.nativeAppId=t.id,this._params=r,this._nativeApp=t,this.NativeModules=t.nativeModuleProxy,this.LynxUIMethodModule=t.nativeModuleProxy.LynxUIMethodModule,this.LynxTestModule=t.nativeModuleProxy.LynxTestModule,this.LynxResourceModule=t.nativeModuleProxy.LynxResourceModule,this.LynxAccessibilityModule=t.nativeModuleProxy.LynxAccessibilityModule,this.LynxSetModule=t.nativeModuleProxy.LynxSetModule,this._apiList={},this._textInfoManager=new Q(this.NativeModules),this.setupGetTextInfoApi()}static{this.kDefaultSourceMapURL="default"}static{this.kGetSourceMapReleaseErrorName=pe}set __sourcemap__release__(e){let t=Error();t.name="LynxGetSourceMapReleaseError",t.message=e,t.stack=`at <anonymous> (${_BaseApp.kDefaultSourceMapURL}:1:1)`,this.setSourceMapRelease(t)}destroy(){this.__removeInternalEventListeners(),this._nativeApp=null,this._params=null,this._lazyCallableModules=null,this.GlobalEventEmitter=null}registerModule(e,t){this._lazyCallableModules[e]=t}getJSModule(e){return this._lazyCallableModules[e]}setupJSModule(){this.registerModule("GlobalEventEmitter",this.GlobalEventEmitter),this.registerModule("Reporter",this.Reporter)}setupFetchAPI(e){this._createResponseClass=ae,this._createRequestClass=se,this._RequestClass=l.Request??se(e),this._ResponseClass=l.Response??ae(e),l.Request||(l.Request=this._RequestClass),l.Response||(l.Response=this._ResponseClass)}__internal__callLynxSetModule(e,t){let r=this.LynxSetModule[e];r&&Function.prototype.apply.call(r,void 0,t)}get nativeApp(){return this._nativeApp}set nativeApp(e){this._nativeApp=e}get params(){return this._params}set apiList(e){this._apiList={...this._apiList,...e}}setupIntersectionApi(){let e=this;this._apiList.createIntersectionObserver=function(t,r){let{componentId:i=""}=t;return e._intersectionObserverManager.createIntersectionObserver(i,r)},this.lynx.createIntersectionObserver=this._apiList.createIntersectionObserver}onIntersectionObserverEvent(e,t,r){let i=this._intersectionObserverManager.getObserver(e);i&&i.invokeCallback(t,r)}reportError(e){return this.lynx.reportError(e)}handleError(e,t,r){h(e,this.nativeApp,{originError:t,getSourceMapRelease:this.getSourceMapRelease,errorLevel:r})}handleUserError(e,t,r,i){let{message:s,name:n,stack:o}=e||{};s||({message:s,name:n,stack:o}=Error(JSON.stringify(e)));let a=new E(i?`${i} ${n}: ${s}`:`${n}: ${s}`,o);a.cause=t,this.handleError(a,e,r)}handleInternalError(e,t){let{message:r,name:i,stack:s}=e||{};r||({message:r,name:i,stack:s}=Error(JSON.stringify(e)));let n=new g(`${i}: ${r}`,s);n.cause=t,this.handleError(n,e)}getBoolEnv(e){return this.nativeApp.getEnv(e)?.toLowerCase()==="true"}static{this._$factoryCache={}}_$executeInit(e,{path:t,entryName:r}){let i;if(e&&e.init)i=e.init.bind(e);else if(l.initBundle)i=l.initBundle.bind(l.initBundle),delete l.initBundle;else throw new E(`load failed. path:${t},entryName:${r}`);try{this.lynx.performance.profileStart("executeLoadedScript",{args:{path:t}});let e=i({tt:this});return _BaseApp._$factoryCache[t]=i,e}finally{this.lynx.performance.profileEnd()}}_$executeJSON(e,{path:t}){let r=JSON.parse(e),i=()=>r;return _BaseApp._$factoryCache[t]=i,r}requireModule(e,t,r){let i=_BaseApp._$factoryCache[e];if(i)return this._$executeInit({init:i},{path:e,entryName:t});if(e.split("?")[0].endsWith(".json")){let i=this.nativeApp.readScript(e,{dynamicComponentEntry:t??m,...r});return this._$executeJSON(i,{path:e,entryName:t})}let s=this.nativeApp.loadScript(e,t,r);return this._$executeInit(s,{path:e,entryName:t})}requireModuleAsync(e,t){let r=_BaseApp._$factoryCache[e];if(r)return void t(null,this._$executeInit({init:r},{path:e}));if(e.split("?")[0].endsWith(".json")){try{let r=this.nativeApp.readScript(e),i=this._$executeJSON(r,{path:e});t(null,i)}catch(e){t(e)}return}let i=Error();this.nativeApp.loadScriptAsync(e,(r,s)=>{if(r)return i.message=r,t(i);try{return t(null,this._$executeInit(s,{path:e}))}catch(e){return t(e)}})}require(path,params){let that=this;if("string"!=typeof path)throw Error("require args must be a string");let entryName=params&¶ms.dynamicComponentEntry?params.dynamicComponentEntry:m;that.modules[entryName]||(that.modules[entryName]={});let module=that.modules[entryName][path];if(!module){try{let tt=that,jsContent=that._nativeApp.readScript(path,{dynamicComponentEntry:entryName});eval(jsContent),module=that.modules[entryName][path]}catch(r){this.handleError(new E(`eval user: ${that._nativeApp.id} error: ${r.message}`,r.stack),r)}if(!that.modules[entryName][path])throw Error(`module ${path} in ${entryName} is not defined in card: ${that._nativeApp.id}`)}if(!module.hasRun){let{factory:r}=module,e={exports:{}},t;if(module.hasRun=!0,module.exports=e.exports,"function"==typeof r){let n=Ne.call(that,path),o=that;t=r(n,e,e.exports,that.Card.bind(o),that.setTimeout,that.setInterval,that.clearInterval,that.clearTimeout,that.NativeModules,that._apiList,that.sharedConsole,that.Component.bind(o),params?.ReactLynx,that.nativeAppId,that.Behavior.bind(o),me,that.lynx,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,that.lynx.fetch,void 0,void 0,void 0,void 0,void 0,void 0,that.requestAnimationFrame,that.cancelAnimationFrame),module.exports=e.exports||t}}return module.exports}define(e,t,r){r=r||m,this.modules[r]||(this.modules[r]={}),this.modules[r][e]={hasRun:!1,factory:t.bind(this)}}callFunction(e,t,r){try{let i=this.getJSModule(e);"function"==typeof i[t]&&i[t].apply(i,r)}catch(r){this.handleUserError(r,{by:`${e}.${t}`})}}onAppError(e,t){this.handleInternalError(t)}saveDynamicComponentExports(e,t){this.dynamicComponentExports[e]=t}getDynamicComponentExports(e){return this.dynamicComponentExports[e]}Component(...e){}Card(...e){}Behavior(...e){}wrapReport(e,t){let r=this;function i(e){return function(...i){try{return e.apply(this,i)}catch(e){r.handleUserError(e,{by:t})}}}return function(t,...r){return Function.prototype.apply.call(e,void 0,[i(t),...r])}}setupPromise(e,t,r){let i=he(e,(e,t)=>{try{t&&(t.stack||(t=Error(JSON.stringify(t))),t.name="unhandled rejection",this.handleUserError(t))}catch{}},t,r.queueMicrotask,this._params?.pageConfigSubset?.enableMicrotaskPromisePolyfill??!1);return this.resolvedPromise=i.resolve(),i}addInternalEventListener(e,t,r){this.contextProxyTypeToMethod[e]().addEventListener(t,r),this.removeInternalEventListenersCallbacks.push(()=>{this.contextProxyTypeToMethod[e]().removeEventListener(t,r)})}addInternalEventListeners(){this.contextProxyTypeToMethod||(this.contextProxyTypeToMethod={0:()=>this.lynx.getCoreContext(),1:()=>this.lynx.getDevtool(),2:()=>this.lynx.getJSContext(),3:()=>this.lynx.getUIContext()}),this.addInternalEventListener(0,"__OnNativeAppReady",()=>{this.onNativeAppReady()}),this.addInternalEventListener(0,"__NotifyGlobalPropsUpdated",e=>{this.updateGlobalProps(e.data)}),this.addInternalEventListener(0,"__OnLifecycleEvent",e=>{this.OnLifecycleEvent(e.data)}),this.addInternalEventListener(0,"__OnAppFirstScreen",()=>{this.onAppFirstScreen()}),this.addInternalEventListener(0,"__OnDynamicJSSourcePrepared",e=>{l.loadDynamicComponent(this,e.data)}),this.addInternalEventListener(0,"__OnAppEnterForeground",()=>{this.onAppEnterForeground()}),this.addInternalEventListener(0,"__OnAppEnterBackground",()=>{this.onAppEnterBackground()})}updateGlobalProps(e){}OnLifecycleEvent(e){}onNativeAppReady(){}onAppFirstScreen(){}onAppEnterBackground(){}onAppEnterForeground(){}};function Te(e){let t=e.match(/(.*)\/([^/]+)?$/);return t?.[1]?t[1]:"./"}function Ne(e){let t=this,r=Te(e);return function(e){let i=[],s=`${r}/${e}`.split("/"),n=s.length;if("string"!=typeof e)throw Error("require args must be a string");for(let r=0;r<n;++r){let o=s[r];if(""!==o&&"."!==o)if(".."===o){if(0===i.length)throw Error(`can't find module ${e} in app: ${t._nativeApp.id}`);i.pop()}else r+1<n&&".."===s[r+1]?r++:i.push(o)}let o=i.join("/");return o.endsWith(".js")||(o+=".js"),t.require(o)}}var z=class extends u{createLynx(e,t){let r=f.create(e);return new T(()=>this.nativeApp,()=>this,t,()=>r)}callBeforePublishEvent(e){if(0!==this._aopManager._beforePublishEvent.getEventsSize(e.type)){let t={...e};try{this._aopManager._beforePublishEvent.emit(t.type,[t])}catch(e){this.handleUserError(e,{by:"callBeforePublishEvent",type:t.type})}}}},le=class{transferSingletonData(e,t){e.nativeApp=this.nativeApp,e.sharedConsole=this.sharedConsole,e.dynamicComponentExports=this.dynamicComponentExports,e.loadedDynamicComponentsSet=this.loadedDynamicComponentsSet,e._intersectionObserverManager=this.intersectionObserverManager,e._exposureManager=this.exposureManager,e._textInfoManager=this.textInfoManager,this.globalEventEmitter.setCallLynxSetModule(t),e.GlobalEventEmitter=this.globalEventEmitter,e._aopManager=this.aopManager,e.performance=this.performance,e.modules=this.modules,e._lazyCallableModules=this.lazyCallableModules,e.lynx=this.lynx,this.lynx.rebind(()=>e),e._apiList=this.apiList,this.Reporter.rebind(()=>e),e.Reporter=this.Reporter,e.resolvedPromise=this.resolvedPromise}},L=class extends u{constructor(e,t){super(e,void 0),this.fillSingletonData();try{t.srcName&&(delete this.lynx.requireModule.cache[t.srcName],delete u._$factoryCache[t.srcName],this.lynx.requireModule(t.srcName,m),this.dataTypeSet.add("undefined"))}catch(e){this.handleUserError(e)}}createLynx(e,t){let r=f.create(e);return new T(()=>this.nativeApp,()=>this,t,()=>r)}fillSingletonData(){this.singletonData=new le,this.singletonData.nativeApp=this._nativeApp,this.singletonData.sharedConsole=this.sharedConsole,this.singletonData.dynamicComponentExports=this.dynamicComponentExports,this.singletonData.loadedDynamicComponentsSet=this.loadedDynamicComponentsSet,this.singletonData.intersectionObserverManager=this._intersectionObserverManager,this.singletonData.exposureManager=this._exposureManager,this.singletonData.textInfoManager=this._textInfoManager,this.singletonData.globalEventEmitter=this.GlobalEventEmitter,this.singletonData.aopManager=this._aopManager,this.singletonData.performance=this.performance,this.singletonData.modules=this.modules,this.singletonData.lazyCallableModules=this._lazyCallableModules,this.singletonData.lynx=this.lynx,this.singletonData.apiList=this._apiList,this.singletonData.Reporter=this.Reporter,this.singletonData.resolvedPromise=this.resolvedPromise}};function Ae(e,t,r){let{id:i}=e,{cardType:s}=t,n=!0,o;try{if(o="standalone"==s?new L({nativeApp:e,params:t,lynx:r},t):new z({nativeApp:e,params:t,lynx:r}),l.currentAppId=i,l.multiApps[i]=o,"standalone"===s)return e.setCard(o),!0;t.bundleSupportLoadScript,n=!0;try{delete o.lynx.requireModule.cache[B],delete u._$factoryCache[B],o.lynx.requireModule(B,m),o.lynx._switches.allowUndefinedInNativeDataTypeSet&&o.dataTypeSet.add("undefined")}catch(e){n=!1,o.handleUserError(e,void 0,void 0,"loadCard failed")}e.setCard(o)}catch(t){Ce(e,t),n=!1}return n}function be(e){l.multiApps[e].destroy(),delete l.multiApps[e]}function Oe(e){l.multiApps[e].callDestroyLifetimeFun()}function Ce(e,t,r){let{message:i,name:s,stack:n}=t||{};i||({message:i,name:s,stack:n}=Error(JSON.stringify(t)));let o=new g(`loadCard failed ${s}: ${i}`,n);o.cause=r,h(o,e,{originError:t,getSourceMapRelease:t=>{if(!e.__GetSourceMapRelease(t))return e.__GetSourceMapRelease(u.kDefaultSourceMapURL)}})}},133:function(e,t,r){r.d(t,{B:()=>f,J:()=>b});let i={CreateElement:1,SetAttribute:2,RemoveAttribute:3,Append:4,Remove:5,ReplaceWith:6,InsertBefore:7,EnableEvent:8,RemoveChild:9,StyleDeclarationSetProperty:10,StyleDeclarationRemoveProperty:11,SetInnerHTML:12},s=Symbol("uniqueId");Symbol("ancestorDocument");class n extends EventTarget{_enableEvent;_parentElement=null;_children=[];[s];constructor(e,t){super(),this._enableEvent=t,this[s]=e}get children(){return this._children.slice()}get parentElement(){return this._parentElement}get parentNode(){return this._parentElement}get firstElementChild(){return this._children[0]??null}get lastElementChild(){return this._children[this._children.length-1]??null}get nextElementSibling(){let e=this._parentElement;if(e){let t=e._children.indexOf(this);if(t>=0)return e._children[t+1]||null}return null}append(...e){for(let t of e)t._remove(),t._parentElement=this;this._children.push(...e)}replaceWith(...e){if(this._parentElement){let t=this._parentElement;this._parentElement=null;let r=t._children.indexOf(this);for(let i of(t._children.splice(r,1,...e),e))i._parentElement=t}}_remove(){if(this._parentElement){let e=this._parentElement._children.indexOf(this);this._parentElement._children.splice(e,1),this._parentElement=null}}insertBefore(e,t){if(e._remove(),t){let r=this._children.indexOf(t);r>=0&&(e._parentElement=this,this._children.splice(r,0,e))}else e._parentElement=this,this._children.push(e);return e}removeChild(e){if(!e||e._parentElement!==this)throw new DOMException("The node to be removed is not a child of this node.","NotFoundError");return e._remove(),e}addEventListener(e,t,r){this._enableEvent(e,this[s]),super.addEventListener(e,t,r)}}class o{_parent;constructor(e){this._parent=e}setProperty(e,t,r){this._parent[a][m].push({type:i.StyleDeclarationSetProperty,uid:this._parent[s],property:e,value:t,priority:r})}removeProperty(e){this._parent[a][m].push({type:i.StyleDeclarationRemoveProperty,uid:this._parent[s],property:e})}}let a=Symbol("ancestorDocument"),l=Symbol("_style"),h=Symbol("_attributes");class c extends n{[l];[h]={};[a];tagName;constructor(e,t,r){super(r,t[_]),this.tagName=e.toUpperCase(),this[a]=t}get style(){return this[l]||(this[l]=new o(this)),this[l]}get id(){return this[h].id??""}set id(e){this[h].id=e,this.setAttribute("id",e)}get className(){return this[h].class??""}setAttribute(e,t){this[h][e]=t,this[a][m].push({type:i.SetAttribute,uid:this[s],key:e,value:t})}getAttribute(e){return this[h][e]??null}removeAttribute(e){delete this[h][e],this[a][m].push({type:i.RemoveAttribute,uid:this[s],key:e})}append(...e){this[a][m].push({type:i.Append,uid:this[s],cid:e.map(e=>e[s])}),super.append(...e)}replaceWith(...e){return this[a][m].push({type:i.ReplaceWith,uid:this[s],nid:e.map(e=>e[s])}),super.replaceWith(...e)}getAttributeNames(){return Object.keys(this[h])}remove(){this.parentElement&&(this[a][m].push({type:i.Remove,uid:this[s]}),super._remove())}insertBefore(e,t){let r=super.insertBefore(e,t);return this[a][m].push({type:i.InsertBefore,uid:this[s],cid:e[s],ref:t?.[s]}),r}removeChild(e){let t=super.removeChild(e);return this[a][m].push({type:i.RemoveChild,uid:this[s],cid:e[s]}),t}set innerHTML(e){this[a][m].push({type:i.SetInnerHTML,text:e,uid:this[s]})}}let u=Symbol("propagationStopped"),p=Symbol("eventPhase");class d extends Event{_target;[p]=Event.CAPTURING_PHASE;constructor(e,t){super(e),this._target=t}get target(){return this._target}[u]=!1;stopImmediatePropagation(){this[u]=!0,super.stopImmediatePropagation()}stopPropagation(){this[u]=!0,super.stopPropagation()}get eventPhase(){return this[p]}}let m=Symbol("operations"),_=Symbol("enableEvent"),y=Symbol("getElementByUniqueId"),f=Symbol("_onEvent"),g=Symbol("uniqueIdInc"),v=Symbol("_uniqueIdToElement");class b extends n{_callbacks;[g]=1;[v]=[];[m]=[];[y](e){return this[v][e]?.deref()}[_];constructor(e){let t=(e,t)=>{this[m].push({type:i.EnableEvent,eventType:e,uid:t})};super(0,t),this._callbacks=e,this[_]=t}commit(){let e=this[m];this[m]=[],this._callbacks.onCommit(e)}append(e){this[m].push({type:i.Append,uid:0,cid:[e[s]]}),super.append(e)}createElement(e){let t=this[g]++,r=new c(e,this,t);return this[v][t]=new WeakRef(r),this[m].push({type:i.CreateElement,uid:t,tag:e}),r}[f]=(e,t,r,i)=>{let s=this[y](t);if(s){let t=[],n=s;for(;n.parentElement;)t.push(n.parentElement),n=n.parentElement;let o=new d(e,s);Object.assign(o,i),o[p]=Event.CAPTURING_PHASE;for(let e=t.length-1;e>=0;e--)if(t[e].dispatchEvent(o),o[u])return;if(o[p]=Event.AT_TARGET,s.dispatchEvent(o),r){for(let e of(o[p]=Event.BUBBLING_PHASE,t))if(e.dispatchEvent(o),o[u])return}}}}},353:function(e,t,r){var i,s,n,o;r.d(t,{EN:()=>F,UK:()=>v,uE:()=>h,oc:()=>$,wg:()=>m,sr:()=>S,ZW:()=>q,eA:()=>f,eW:()=>w,wU:()=>x,G4:()=>j,YH:()=>D,bh:()=>k,jK:()=>s,i$:()=>P,Hs:()=>b,E3:()=>E,gc:()=>B,cZ:()=>A,Au:()=>M,RN:()=>u,Rz:()=>C,Oh:()=>I,E9:()=>W,EO:()=>G,jF:()=>H,bM:()=>N,nt:()=>T,Tt:()=>L,R1:()=>R,L9:()=>c,V_:()=>U,cx:()=>O,rd:()=>y,Xz:()=>a,$m:()=>d,mH:()=>_,Bq:()=>p,SH:()=>l});let a="lynx-unique-id",l="lynx-css-id",h="lynx-component-id",c="lynx-tag",u="lynx-default-display-linear",p="__lynx_timing_flag",d=["registerDataProcessor","registerWorkletInternal","lynxWorkletImpl","runWorklet"],m={platform:"web",lynxSdkVersion:"3.0"},_={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur"},y={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus"}},f={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function g(e,t,r=!0,i=!1,s){return{name:e,isSync:t,hasReturn:r,hasReturnTransfer:i,bufferSize:s}}let v=g("__postExposure",!1,!1),b=g("publicComponentEvent",!1,!1),E=g("publishEvent",!1,!1),x=g("postOffscreenEventEndpoint",!1,!1),S=g("switchExposureServiceEndpoint",!1,!1),A=g("mainThreadStart",!1,!1),M=g("updateData",!1,!0),T=g("sendGlobalEventEndpoint",!1,!1),w=g("dispose",!1,!0),C=g("start",!1,!0),I=g("reportError",!1,!1),R=g("flushElementTree",!1,!0),L=g("callLepusMethod",!1,!0),k=g("__invokeUIMethod",!1,!0),O=g("__setNativeProps",!1,!0),N=g("nativeModulesCall",!1,!0),P=g("napiModulesCall",!1,!0,!0),D=g("getCustomSections",!1,!0),U=g("markTiming",!1,!1),F=g("postTimingFlags",!1,!1),B=g("__triggerComponentEvent",!1,!1),q=g("__selectComponent",!1,!0),j=g("dispatchLynxViewEvent",!1,!1),$=g("dispatchNapiModule",!1,!1),H=g("dispatchCoreContextOnBackground",!1,!1),G=g("dispatchJSContextOnMainThread",!1,!1);!function(e){e[e.ID_SELECTOR=0]="ID_SELECTOR",e[e.REF_ID=1]="REF_ID",e[e.UNIQUE_ID=2]="UNIQUE_ID"}(i||(i={})),function(e){e[e.SUCCESS=0]="SUCCESS",e[e.UNKNOWN=1]="UNKNOWN",e[e.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",e[e.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",e[e.PARAM_INVALID=4]="PARAM_INVALID",e[e.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",e[e.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE"}(s||(s={})),function(e){e[e.UPDATE=0]="UPDATE",e[e.RESET=1]="RESET"}(n||(n={})),function(e){e[e.Unknown=0]="Unknown",e[e.UpdateExplictByUser=1]="UpdateExplictByUser",e[e.UpdateByKernelFromCtor=2]="UpdateByKernelFromCtor",e[e.UpdateByKernelFromRender=4]="UpdateByKernelFromRender",e[e.UpdateByKernelFromHydrate=8]="UpdateByKernelFromHydrate",e[e.UpdateByKernelFromGetDerived=16]="UpdateByKernelFromGetDerived",e[e.UpdateByKernelFromConflict=32]="UpdateByKernelFromConflict",e[e.UpdateByKernelFromHMR=64]="UpdateByKernelFromHMR"}(o||(o={}));let J=3;class W extends EventTarget{_config;constructor(e){super(),this._config=e}postMessage(...e){console.error("[lynx-web] postMessage not implemented, args:",...e)}dispatchEvent(e){let{rpc:t,sendEventEndpoint:r}=this._config;return t.invoke(r,[e]),J}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}},665:function(e,t,r){r.d(t,{W:()=>i});class i{port;name;incId=0;#e={};#t=new TextEncoder;#r=new TextDecoder;#i=new Map;constructor(e,t){this.port=e,this.name=t,e.onmessage=e=>this.#s(e.data)}get nextRetId(){return`ret_${this.name}_${this.incId++}`}static createRetEndpoint(e){return{name:e,hasReturn:!1,isSync:!1}}#s=async e=>{let t=this.#i.get(e.name);if(t){let r=e.sync?new Int32Array(e.lock):void 0,s=!e.sync&&e.retId?i.createRetEndpoint(e.retId):void 0;try{let i=await t(...e.data),n,o=[];if(e.sync?n=i:e.hasTransfer?{data:n,transfer:o}=i||{}:n=i,e.sync){if(e.buf){let t=JSON.stringify(n),r=new Uint32Array(e.buf,0,1),i=new Uint8Array(e.buf,4),s=new Uint8Array(e.buf.byteLength-4),{written:o}=this.#t.encodeInto(t,s);r[0]=o,i.set(s,0)}Atomics.store(r,0,1),Atomics.notify(r,0)}else e.retId&&this.invoke(s,[n,!1],o||[])}catch(t){console.error(t),e.sync?(Atomics.store(r,0,2),Atomics.notify(r,0),r[1]=2):this.invoke(s,[void 0,!0])}}else{let t=this.#e[e.name];t?t.push(e):this.#e[e.name]=[e]}};createCall(e){return(...t)=>this.invoke(e,t)}registerHandler(e,t){this.#i.set(e.name,t);let r=this.#e[e.name];if(r?.length)for(let t of(this.#e[e.name]=void 0,r))this.#s(t)}registerHandlerRef(e,t,r){this.registerHandler(e,(...e)=>t[r]?.call(t,...e))}registerHandlerLazy(e,t,r){if(t[r])this.registerHandlerRef(e,t,r);else{let i,s=this;Object.defineProperty(t,r,{get:()=>i,set(n){i=n,n&&s.registerHandlerRef(e,t,r)}})}}removeHandler(e){this.#i.delete(e.name)}invoke(e,t,r=[]){if(e.isSync){let i=e.bufferSize?new SharedArrayBuffer(e.bufferSize+4):void 0,s=new SharedArrayBuffer(4),n=new Int32Array(s);n[0]=0;let o={name:e.name,data:t,sync:!0,lock:s,buf:i};if(this.port.postMessage(o,{transfer:r}),Atomics.wait(n,0,0),2===n[0])throw null;if(!i)return;{let e=new Uint32Array(i,0,4)[0],t=new Uint8Array(i,4,e),r=new Uint8Array(e);return r.set(t,0),r?JSON.parse(this.#r.decode(r)):void 0}}if(e.hasReturn){let{promise:s,resolve:n,reject:o}=Promise.withResolvers(),a=i.createRetEndpoint(this.nextRetId);this.registerHandler(a,(e,t)=>{t&&o(),n(e)});let l={name:e.name,data:t,sync:!1,retId:a?.name,hasTransfer:e.hasReturnTransfer};return this.port.postMessage(l,{transfer:r}),s}{let i={name:e.name,data:t,sync:!1};this.port.postMessage(i,{transfer:r})}}createCallbackify(e,t){let r=this.createCall(e);return(...e)=>{let i=e.at(t);e.splice(t,1),r(...e).then(i)}}}},660:function(e,t,r){r.d(t,{O:()=>A});var i=r(665),s=r(353);function n(e,t){let r=e.createCall(s.YH);return(e,i)=>{t[e]&&i(t[e]),r(e).then(i)}}function o(e,t,r){let i=new s.E9({rpc:r,receiveEventEndpoint:s.jF,sendEventEndpoint:s.EO});return{__globalProps:e.globalProps,getJSModule(e){},getNativeApp:()=>t,getCoreContext:()=>i,getCustomSectionSync:t=>e.customSections[t],getCustomSection:n(r,e.customSections)}}function a(e){return(t,r,i,n,o,a,l)=>{e.invoke(s.bh,[t,r,i,n,o,l]).then(a).catch(e=>{console.error("[lynx-web] invokeUIMethod failed",e),a({code:s.jK.UNKNOWN,data:""})})}}function l(e,t){e.registerHandlerLazy(s.Hs,t,"publicComponentEvent")}function h(e,t){e.registerHandler(s.UK,({exposures:e,disExposures:r})=>{e.length>0&&t.GlobalEventEmitter.emit("exposure",[e.map(e=>Object.assign(e,e.detail,{dataset:e.target.dataset}))]),r.length>0&&t.GlobalEventEmitter.emit("disexposure",[r.map(e=>Object.assign(e,e.detail,{dataset:e.target.dataset}))])})}async function c(e,t,r){let i=t.createCall(s.sr),n=e.createCall(s.bM),o={resumeExposure(){i(!0,!0)},stopExposure(e){i(!1,e.sendEvent??!0)}},a={call(e,t,r){n(e,t,"bridge").then(r)}},l={},h={};return await Promise.all(Object.entries(r).map(([e,t])=>import(t).then(t=>h[e]=t?.default?.(l,(t,r)=>n(t,r,e))))),Object.assign(l,{bridge:a,LynxExposureModule:o,...h})}function u(e,t){e.registerHandlerLazy(s.Au,t,"updateCardData")}function p(e,t){e.registerHandlerLazy(s.E3,t,"publishEvent")}function d(e){let t=0;return{generatePipelineOptions:()=>({pipelineID:"_pipeline_"+t++,needTimestamps:!1}),onPipelineStart:function(){},markPipelineTiming:function(t,r){e.markTimingInternal(r,t)},bindPipelineIdWithTimingFlag:function(t,r){e.pipelineIdToTimingFlags.has(t)||e.pipelineIdToTimingFlags.set(t,[]),e.pipelineIdToTimingFlags.get(t).push(r)},profileStart:()=>{console.error("NYI: profileStart. This is an issue of lynx-core.")},profileEnd:()=>{console.error("NYI: profileEnd. This is an issue of lynx-core.")}}}function m(e,t){e.registerHandler(s.nt,(...e)=>{t.GlobalEventEmitter.emit(...e)})}function _(){let e=new FinalizationRegistry(e=>e());return t=>{let r={};return e.register(r,t),r}}let y=0,f={};async function g(e){let{mainThreadRpc:t,uiThreadRpc:r,template:i,nativeModulesMap:n,timingSystem:o,browserConfig:g}=e,v=d(o),b=t.createCallbackify(s.Tt,2),E=r.createCall(s.cx),x=r.createCall(s.gc),S=r.createCallbackify(s.ZW,3),A=()=>{let e=globalThis.module.exports;return{init:t=>(t.tt.lynxCoreInject=t,t.tt.globalThis??=t,Object.assign(t.tt,{SystemInfo:{...s.wg,...g}}),e?.(t.tt))}};return{id:(y++).toString(),...v,setTimeout:setTimeout,setInterval:setInterval,clearTimeout:clearTimeout,clearInterval:clearInterval,nativeModuleProxy:await c(r,t,n),loadScriptAsync:function(e,t){let r=i.manifest[`/${e}`];r&&(e=r),import(e).catch(t).then(async()=>{t(null,A())})},loadScript:e=>{let t=i.manifest[`/${e}`];return t&&(e=t),importScripts(e),A()},requestAnimationFrame:e=>requestAnimationFrame(e),cancelAnimationFrame:e=>cancelAnimationFrame(e),callLepusMethod:b,setNativeProps:E,invokeUIMethod:a(r),setCard(e){l(t,e),p(t,e),h(t,e),u(r,e),m(r,e),o.registerGlobalEmitter(e.GlobalEventEmitter),e.lynx.getCoreContext().__start()},triggerComponentEvent:x,selectComponent:S,createJSObjectDestructionObserver:_(),setSharedData(e,t){f[e]=t},getSharedData:e=>f[e]}}function v(e,t,r,i){e.registerHandler(s.eW,()=>{let e=t.id;i(e),r(e)})}let b=async(e,t)=>{let r=e.createCall(s.i$),i={};return await Promise.all(Object.entries(t).map(([t,n])=>import(n).then(n=>i[t]=n?.default?.(i,(e,i)=>r(e,i,t),t=>{e.registerHandler(s.oc,e=>t(e))})))),{load:e=>i[e]}},E={onSetup:"lynx.performance.timing.onSetup",onUpdate:"lynx.performance.timing.onUpdate"};function x(e,t){let r=!0,i={},n=new Map,o=new Map,a=t.createCall(s.G4),l=[];function h(e,t,r){if(r||(r=performance.now()+performance.timeOrigin),!t){i[e]=r;return}n.has(t)||n.set(t,{}),n.get(t)[e]=r}let c=t=>{e.registerHandler(s.EN,(e,s)=>{if(s?e=e.concat(l):l=l.concat(e),r){let e={extra_timing:{},setup_timing:i,update_timings:{},metrics:{},has_reload:!1,thread_strategy:0,url:""};t.emit(E.onSetup,[e]),a("timing",i)}else{let r=(s?n.get(s):void 0)??{},i={extra_timing:{},setup_timing:{},update_timings:Object.fromEntries([...e,...o.get(s)??[]].map(e=>[e,r])),metrics:{},has_reload:!1,thread_strategy:0,url:""};t.emit(E.onUpdate,[i]),a("timing",r)}s&&(o.delete(s),n.delete(s)),r&&(r=!1)})};return e.registerHandler(s.V_,h),t.registerHandler(s.V_,h),{markTimingInternal:h,registerGlobalEmitter:c,pipelineIdToTimingFlags:o}}let S=Promise.resolve().then(r.bind(r,413));function A(e,t){let r=new i.W(e,"bg-to-ui"),n=new i.W(t,"bg-to-main"),a=x(n,r);a.markTimingInternal("load_core_start"),n.registerHandler(s.Rz,async e=>{a.markTimingInternal("load_core_end");let t=await g({...e,uiThreadRpc:r,mainThreadRpc:n,timingSystem:a});globalThis["napiLoaderOnRT"+t.id]=await b(r,e.napiModulesMap);let i=o(e,t,n);S.then(({loadCard:s,destroyCard:n,callDestroyLifetimeFun:o})=>{s(t,e,i),v(r,t,n,o)})})}globalThis.nativeConsole=console},212:function(e,t,r){r.a(e,async function(e,t){try{var i=r(660),s=r(506),n=e([s]);s=(n.then?(await n)():n)[0],self.onmessage=e=>{let{mode:t,toPeerThread:r,toUIThread:n}=e.data;"main"===t?(0,s.T)(n,r):(0,i.O)(n,r)},Object.assign(globalThis,{module:{exports:null}}),t()}catch(e){t(e)}})},994:function(e,t,r){r.d(t,{s:()=>s});var i=r(353);function s(e){return(t,r)=>{e.invoke(i.V_,[t,r,performance.now()+performance.timeOrigin])}}},139:function(e,t,r){r.d(t,{R:()=>s});var i=r(353);function s(e,t){e.registerHandler(i.Au,(...e)=>{t.updatePage?.(...e)})}},506:function(e,t,r){r.a(e,async function(e,i){try{r.d(t,{T:()=>h});var s=r(353),n=r(665),o=r(994),a=r(133),l=r(139);let{loadMainThread:e}=await r.e("579").then(r.bind(r,996));function h(t,r){let i=new n.W(t,"main-to-ui"),h=new n.W(r,"main-to-bg"),c=(0,o.s)(h),u=i.createCall(s.R1),p=i.createCall(s.Oh),d=new a.J({onCommit:u});i.registerHandler(s.wU,d[a.B]);let{startMainThread:m}=e(h,d,d.commit.bind(d),c,p);i.registerHandler(s.cZ,e=>{m(e).then(e=>{(0,l.R)(i,e)})})}i()}catch(e){i(e)}},1)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,(()=>{var e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",r="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",i=e=>{e&&e.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))},s=s=>s.map(s=>{if(null!==s&&"object"==typeof s){if(s[e])return s;if(s.then){var n=[];n.d=0,s.then(e=>{o[t]=e,i(n)},e=>{o[r]=e,i(n)});var o={};return o[e]=e=>e(n),o}}var a={};return a[e]=function(){},a[t]=s,a});__webpack_require__.a=(n,o,a)=>{a&&((l=[]).d=-1);var l,h,c,u,p=new Set,d=n.exports,m=new Promise((e,t)=>{u=t,c=e});m[t]=d,m[e]=e=>{l&&e(l),p.forEach(e),m.catch(function(){})},n.exports=m,o(i=>{h=s(i);var n,o=()=>h.map(e=>{if(e[r])throw e[r];return e[t]}),a=new Promise(t=>{(n=()=>t(o)).r=0;var r=e=>e!==l&&!p.has(e)&&(p.add(e),e&&!e.d&&(n.r++,e.push(n)));h.map(t=>t[e](r))});return n.r?a:o()},e=>(e?u(m[r]=e):c(d),i(l))),l&&l.d<0&&(l.d=0)}})(),(()=>{__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((t,r)=>(__webpack_require__.f[r](e,t),t),[]))})(),(()=>{__webpack_require__.u=e=>"static/js/async/"+e+".js"})(),(()=>{__webpack_require__.miniCssF=e=>""+e+".css"})(),(()=>{__webpack_require__.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})()})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{__webpack_require__.rv=()=>"1.3.6"})(),(()=>{__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var e,t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw Error("Automatic publicPath is not supported in this browser");__webpack_require__.p=(e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"))+"../../../"})(),(()=>{var e={45:1},t=t=>{var[r,s,n]=t;for(var o in s)__webpack_require__.o(s,o)&&(__webpack_require__.m[o]=s[o]);for(n&&n(__webpack_require__);r.length;)e[r.pop()]=1;i(t)};__webpack_require__.f.i=(t,r)=>{e[t]||importScripts(__webpack_require__.p+__webpack_require__.u(t))};var r=globalThis.webpackChunk_lynx_js_web_explorer=globalThis.webpackChunk_lynx_js_web_explorer||[],i=r.push.bind(r);r.push=t})(),(()=>{__webpack_require__.ruid="bundler=rspack@1.3.6"})();var __webpack_exports__=__webpack_require__(212)})();
|
|
3
|
+
`,e)}}var b=class{constructor(e,t){this.getApp=e,this.getNativeApp=t,this.setSourceMapRelease=e=>{if(D(e)&&e.name===u.kGetSourceMapReleaseErrorName&&x(e.message)&&x(e.stack))return void this.getNativeApp().__SetSourceMapRelease({name:e.name,message:e.message,stack:e.stack});JSON.stringify(e)},this.getSourceMapRelease=e=>{let t=this.getNativeApp().__GetSourceMapRelease(e);return t||(t=this.getNativeApp().__GetSourceMapRelease(u.kDefaultSourceMapURL)),t},this.getApp=e,this.getNativeApp=t}rebind(e){this.getApp=e}},j=class r{static{this.count=0}constructor(e){this.effect=e,this.id="__lynx-inner-js-animation-"+r.count++}cancel(){this.effect.target.cancelAnimate(this)}pause(){this.effect.target.pauseAnimate(this)}play(){this.effect.target.playAnimate(this)}},G=class{constructor(e,t,r){this.target=e,this.keyframes=t,this.options=r}},O=class{constructor(e,t,r){this._root=e,this._idSelector="#"+t,this._lynx=r,this._element=void 0}ensureElement(){this._element||(this._element=this._lynx.createElement(this._root,this._idSelector))}animate(e,t){this.ensureElement();let r=new j(new G(this,e,t));return this._element.animate(0,r.id,e,t),r}playAnimate(e){this._element.animate(1,e.id,void 0,void 0)}pauseAnimate(e){this._element.animate(2,e.id,void 0,void 0)}cancelAnimate(e){this._element.animate(3,e.id,void 0,void 0)}finishAnimate(e){this._element.animate(4,e.id,void 0,void 0)}setProperty(e,t){if(this.ensureElement(),"string"==typeof e&&"string"==typeof t)this._element.setProperty({[e]:t});else if("object"==typeof e)this._element.setProperty(e);else throw Error(`setProperty's param must be string or object. While current type is ${typeof e} and ${typeof t}.`)}},ue=O,S=class r{constructor(e,t,r){this._component=e,this._taskQueue=t,this._native_proxy=r,this._fire_immediately=!1,this._root_unique_id=void 0}static fromQuery(e,t){return new r(t??e._component,e._taskQueue.slice(),e._native_proxy)}static newEmptyQuery(e,t){return new r(t??"",[],e)}commitTask(e){let t=r.fromQuery(this,this._component);return(t._taskQueue.push(e),this._fire_immediately)?void t.exec():t}in(e){return e.createSelectorQuery(this)}select(e){return new R(this,{type:0,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}selectAll(e){return new R(this,{type:0,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!1})}selectReactRef(e){if(this._taskQueue.length){let e="selectReactRef() should be called before any other selector query methods";nativeConsole.warn(e);let t=Error(e);h(new F(e,t.stack),this._native_proxy.nativeApp);return}return this._fire_immediately=!0,new R(this,{type:1,identifier:e,component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}selectRoot(){return this.select("")}selectUniqueID(e){return new R(this,{type:2,identifier:e.toString(),component_id:this._component,root_unique_id:this._root_unique_id,first_only:!0})}exec(){for(let e=0;e<this._taskQueue.length;++e)this._taskQueue[e](this._native_proxy)}setRoot(e){return this._root_unique_id=Number(e),this}},R=class{static{this.nodePool={}}constructor(e,t){this._nodeSelectToken=t,this._selectorQuery=e}invoke(e){let t=t=>{let r=t=>{0===t.code?e.success&&e.success(t.data):e.fail&&e.fail(t)};if(!this._nodeSelectToken.first_only)return void r({code:5,data:"selectAll not supported for invoke method"});t.nativeApp.invokeUIMethod(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,e.method,e.params??{},r,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}path(e){let t=t=>{let r=t=>{e&&e(t.data,t.status)};t.nativeApp.getPathInfo(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,r,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}fields(e,t){let r=r=>{let i=i=>{if(e.query){let t=t=>{t.query=S.newEmptyQuery(r),t.query.setRoot(t.unique_id.toString()),e.unique_id||delete t.unique_id};if(this._nodeSelectToken.first_only){let e=i.data;e&&t(e)}else for(let e of i.data)t(e)}t&&t(i.data,i.status)},s=[];for(let t in e){if("query"==t&&!0==e[t]&&!e.unique_id){s.push("unique_id");continue}e[t]&&s.push(t)}r.nativeApp.getFields(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,s,i,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(r)}setNativeProps(e){let t=t=>{t.nativeApp.setNativeProps(this._nodeSelectToken.type,this._nodeSelectToken.identifier,this._nodeSelectToken.component_id,this._nodeSelectToken.first_only,e,this._nodeSelectToken.root_unique_id)};return this._selectorQuery.commitTask(t)}},T=class r{constructor(e,t,i,s){this.getNativeApp=e,this.getApp=t,this.Promise=i,this.getNativeLynx=s,this.setTimeout=this.getApp().wrapReport(this.getNativeApp().setTimeout,"setTimeout Error"),this.setInterval=this.getApp().wrapReport(this.getNativeApp().setInterval,"setInterval Error"),this.clearInterval=this.getNativeApp().clearInterval,this.clearTimeout=this.getNativeApp().clearTimeout,this.resumeExposure=this.getApp()._apiList.resumeExposure,this.requireModule=(e,t,i)=>{if(this.requireModule.cache[e])return this.requireModule.cache[e];let s=this.getApp().requireModule(e,t,i);return this.requireModule.cache[e]=s,s},this.requireModuleAsync=(e,t)=>{if(t??=e=>{e&&this.getApp().handleUserError(e)},this.requireModuleAsync.cache[e])return void t(null,this.requireModuleAsync.cache[e]);this.getApp().requireModuleAsync(e,(i,s)=>{i||(this.requireModuleAsync.cache[e]=s),t(i,s)})},this.createElement=(e,t)=>this.getNativeLynx().createElement(e,t),this.getElementById=e=>new ue("",e,this),this.reportError=(e,t)=>{let i;if(D(e))i=e;else{let t;i=Error(t="string"!=typeof e?JSON.stringify(e):e)}let{level:s="error"}=t||{},n;switch(s){case"error":default:n=1;break;case"warning":n=2;break;case"fatal":n=0}this.getApp().handleUserError(i,void 0,n)},this.registerModule=(e,t)=>this.getApp().registerModule(e,t),this.getJSModule=e=>this.getApp().getJSModule(e),this.getTextInfo=this.getApp()._apiList.getTextInfo,this.addFont=(e,t)=>{if(!M(e))throw Error("The first argument must be object type");if(!x(e["font-family"])||!x(e.src))throw Error("The font value must have font-family and src");if(!X(t))throw Error("The second argument must be function type");this.getNativeLynx().addFont(e,t)},this.stopExposure=this.getApp()._apiList.stopExposure,this.setObserverFrameRate=this.getApp()._apiList.setObserverFrameRate,this.performance=this.getApp().performance,this.beforePublishEvent=this.getApp()._aopManager._beforePublishEvent,this.setSessionStorageItem=(e,t)=>{this.dispatchSessionStorageEvent({type:"__SetSessionStorageItem",data:{key:e,value:t}})},this.getSessionStorageItem=(e,t)=>{this.getNativeApp().getSessionStorageItem(e,t)},this.subscribeSessionStorage=(e,t)=>{let i=r.__registerSharedDataCounter++;return this.getNativeApp().subscribeSessionStorage(e,i,t),i},this.unsubscribeSessionStorage=(e,t)=>{this.dispatchSessionStorageEvent({type:"__UnSubscribeSessionStorage",data:{key:e,listenerId:t}})},this.getDevtool=this.getNativeLynx().getDevtool,this.getCoreContext=this.getNativeLynx().getCoreContext,this.getJSContext=this.getNativeLynx().getJSContext,this.getUIContext=this.getNativeLynx().getUIContext,this.getCustomSectionSync=this.getNativeLynx().getCustomSectionSync,this.accessibilityAnnounce=this.getNativeApp().nativeModuleProxy.LynxAccessibilityModule?.accessibilityAnnounce,this.requestResourcePrefetch=this.getNativeApp().nativeModuleProxy.LynxResourceModule?.requestResourcePrefetch,this.cancelResourcePrefetch=this.getNativeApp().nativeModuleProxy.LynxResourceModule?.cancelResourcePrefetch,this.setSharedData=(e,t)=>{l.sharedData[e]=t;let i={};i[e]=t,l.shareDataSubject.notifyDataChange(i)},this.getSharedData=e=>l.sharedData[e],this.registerSharedDataObserver=e=>l.shareDataSubject.registerObserver(e),this.removeSharedDataObserver=e=>l.shareDataSubject.removeObserver(e),this.triggerLepusGlobalEvent=(e,t)=>this.getNativeApp().triggerLepusGlobalEvent(e,t),this.reload=(e,t)=>{this.getNativeLynx().reload(e,t)},this.fetchDynamicComponent=(e,t,i,s)=>this.getNativeLynx().fetchDynamicComponent(e,t,i,s),this.QueryComponent=(e,t)=>{let i=()=>{t({code:0,data:{url:e,sync:!0,error_message:"",mode:"cache"},detail:{schema:e,cache:!1,errMsg:""}})};if(this.getApp().loadedDynamicComponentsSet.has(e))return void i();let s=s=>{!0===s.__hasReady?(l.loadDynamicComponent(this.getApp(),e),i()):t(s)};this.getNativeLynx().QueryComponent(e,s)},this.loadDynamicComponent=(e,t,i={})=>new this.Promise((s,n)=>{let o=[],a;if(Array.isArray(e)?(o=e,a=t):"string"==typeof t?(o=[e],a=t):(a=e,i=t),this.getApp().loadedDynamicComponentsSet.has(a))return void s({code:0,data:{url:a,sync:!1,error_message:"",mode:"normal"},detail:{schema:a,cache:!1,errMsg:""}});this.getNativeLynx().fetchDynamicComponent(a,i,e=>{e&&0==e.code?s(e):n(e)},o)}),this.fetch=(e,t)=>new this.Promise((i,s)=>{let n=new(this.getApp())._RequestClass(e,t),o=n.signal;if(o.aborted)return s(o.reason);o.addEventListener("abort",e=>{s(o.reason)});let a={method:n.method,url:n.url,origin:this.getNativeApp().__pageUrl,headers:Object.fromEntries(n.headers.entries()),body:n._arrayBuffer,lynx:n.lynxExtension};this.getApp().NativeModules.LynxFetchModule.fetch(a,e=>{if(!o.aborted)try{let t=new(this.getApp())._ResponseClass(e.body,e);i(t)}catch{s(TypeError(e.statusText))}},e=>{o.aborted||s(TypeError(e.message))})}),this.createSelectorQuery=()=>S.newEmptyQuery({nativeApp:this.getNativeApp(),lynx:this}),this.requestAnimationFrame=e=>this.getNativeApp().requestAnimationFrame(e),this.cancelAnimationFrame=e=>this.getNativeApp().cancelAnimationFrame(e),this.__addReporterCustomInfo=e=>{this.getNativeApp().__addReporterCustomInfo(e)},this.init(void 0)}static{this.__registerSharedDataCounter=0}rebind(e){this.init(e)}init(e){if(e)this.getApp=e,this.__globalProps=this.getNativeLynx().__globalProps||{},this.__presetData=this.getNativeLynx().__presetData||{};else{let e={};this.requireModule.cache=e,this.requireModuleAsync.cache=e,this.__globalProps=this.getNativeLynx().__globalProps||{},this.__presetData=this.getNativeLynx().__presetData||{},this._switches={}}}dispatchSessionStorageEvent(e){0!=this.getCoreContext().dispatchEvent(e)&&this.getJSContext().dispatchEvent(e)}queueMicrotask(e){this.getNativeLynx().queueMicrotask(e)}},v=class{constructor(e){this._internal_callLynxSetModule=e,this._events=new Map}getEventsSize(e){return this._events.get(e)?.length}setCallLynxSetModule(e){this._internal_callLynxSetModule=e}addListener(e,t,r){let i=this._events.get(e);"keyboardstatuschanged"==e&&this._internal_callLynxSetModule&&this._internal_callLynxSetModule("switchKeyBoardDetect",[!0]),i?i.push({listener:t,context:r}):this._events.set(e,[{listener:t,context:r}])}removeListener(e,t){if("function"!=typeof t)throw Error("removeListener only takes instances of Function");let r=this._events.get(e),i=0;Array.isArray(r)&&r.some(e=>{if(t===e.listener)return!0;i++})&&r.splice(i,1),"keyboardstatuschanged"==e&&this._internal_callLynxSetModule&&this._internal_callLynxSetModule("switchKeyBoardDetect",[!1])}emit(e,t){let r=this._events.get(e);Array.isArray(r)&&r.forEach(e=>{let{listener:r,context:i}=e;"function"==typeof r&&r.apply(i||this,t)})}removeAllListeners(e){if("string"==typeof e)return void this._events.delete(e);this._events=new Map}trigger(e,t){let r=this._events.get(e);Array.isArray(r)&&("string"==typeof t&&(t=JSON.parse(t)),r.forEach(e=>{let{listener:r,context:i}=e;"function"==typeof r&&r.call(i||this,t)}))}toggle(e,...t){this.emit(e,t)}},V=class{constructor(){this._beforePublishEvent=new re}},re=class extends v{add(e,t,r){return super.addListener(e,t,r),this}remove(e,t){return super.removeListener(e,t),this}},$=v,Q=class{constructor(e){this._textInfoModule=void 0,this.getTextInfo=(e,t)=>(void 0===this._textInfoModule&&(this._textInfoModule=this._nativeModules.LynxTextInfoModule),this._textInfoModule&&this._textInfoModule.getTextInfo?this._textInfoModule.getTextInfo(e,t):{width:e.length}),this._nativeModules=e}},Y=class{constructor(e){this.resumeExposure=()=>{this._exposureModule.resumeExposure()},this.stopExposure=e=>{this._exposureModule.stopExposure(e)},this.setObserverFrameRate=e=>{this._exposureModule.setObserverFrameRate(e)},this._nativeModules=e,this._exposureModule=this._nativeModules.LynxExposureModule}},ne=class{constructor(e,t){this._selector=e,this._callback=t}invokeCallback(e){this._callback(e)}},oe=class{constructor(e,t,r){this._id=e,this._intersectionObserverModule=t,this._manager=r,this._observationTargets=[],this._defaultMargins={left:0,right:0,top:0,bottom:0}}relativeTo(e,t){return this._intersectionObserverModule.relativeTo(this._id,e,t||this._defaultMargins),this}relativeToViewport(e){return this._intersectionObserverModule.relativeToViewport(this._id,e||this._defaultMargins),this}relativeToScreen(e){return this._intersectionObserverModule.relativeToScreen(this._id,e||this._defaultMargins),this}observe(e,t){this._observationTargets.push(new ne(e,t)),this._intersectionObserverModule.observe(this._id,e,this._observationTargets.length-1)}disconnect(){this._intersectionObserverModule.disconnect(this._id),this._manager.removeObserver(this._id)}invokeCallback(e,t){e<this._observationTargets.length&&this._observationTargets[e].invokeCallback(t)}},J=class{constructor(e){this._nativeModules=e,this._observerId=0,this._observers={},this._defaultOptions={thresholds:[0],initialRatio:0,observeAll:!1}}createIntersectionObserver(e,t){let r=this._nativeModules.IntersectionObserverModule,i=new oe(this._observerId,r,this);return this._observers[this._observerId]=i,r.createIntersectionObserver(this._observerId,e,t||this._defaultOptions),this._observerId++,i}getObserver(e){return this._observers[e]}removeObserver(e){this._observers[e]=null}},de={onPerformance:"lynx.performance.onPerformanceEvent"},H=class{constructor(e,t){this._emitter=e,this._onPerformance=t,this._observedNames=[]}observe(e){this._observedNames.length>0||(this._observedNames=e,this._emitter.addListener(de.onPerformance,this.onPerformanceEvent.bind(this)))}disconnect(){this._observedNames=[],this._emitter.removeListener(de.onPerformance,this.onPerformanceEvent.bind(this))}onPerformanceEvent(e){if(0===this._observedNames.length)return;let t=e.entryType+"."+e.name;(this._observedNames.includes(t)||this._observedNames.includes(e.entryType))&&this._onPerformance(e)}},N={onSetup:"lynx.performance.timing.onSetup",onUpdate:"lynx.performance.timing.onUpdate"},C=class{constructor(e,t){this._emitter=e,this._generatePipelineOptions=t.generatePipelineOptions,this._onPipelineStart=t.onPipelineStart,this._markTiming=t.markPipelineTiming,this._profileStart=t.profileStart,this._profileEnd=t.profileEnd,this._profileMark=t.profileMark,this._profileFlowId=t.profileFlowId,this._isProfileRecording=t.isProfileRecording,this._bindPipelineIdWithTimingFlag=t.bindPipelineIdWithTimingFlag}profileStart(e,t){this._profileStart(e,t)}profileEnd(){this._profileEnd()}profileMark(e,t){this._profileMark(e,t)}profileFlowId(){return this._profileFlowId()}createObserver(e){return new H(this._emitter,e)}isProfileRecording(){return this._isProfileRecording()}addTimingListener(e){this._emitter.addListener(N.onSetup,e.onSetup,e),this._emitter.addListener(N.onUpdate,e.onUpdate,e)}removeTimingListener(e){this._emitter.removeListener(N.onSetup,e.onSetup),this._emitter.removeListener(N.onUpdate,e.onUpdate)}removeAllTimingListener(){this._emitter.removeAllListeners(N.onSetup),this._emitter.removeAllListeners(N.onUpdate)}_initializeAndStartPipeline(){let e=this._generatePipelineOptions();return e&&this._onPipelineStart(e.pipelineID),e}_checkAndBindTimingFlag(e,t){if(!e)return;let r="__lynx_timing_flag";t[r]&&(this._bindPipelineIdWithTimingFlag(e.pipelineID,t[r]),this._markTiming(e.pipelineID,"update_set_state_trigger"),e.needTimestamps=!0)}},_e=C,me=l.LynxJSBI,f=class r{constructor(e){for(let t in this._cachedFunctions={},e)Object.defineProperty(this,t,{get(){if(this._cachedFunctions[t])return this._cachedFunctions[t];let r=e[t];return"function"==typeof r&&(this._cachedFunctions[t]=r),r}})}static create(e){return new r(e)}};function he(e,t,r,i,s=!1){let{getPromise:n}=l;return"function"==typeof n?n({nextTick:s?i:t=>e(t,0),setTimeout:e,onUnhandled:t,clearTimeout:r}):l.Promise}var I=class{constructor(){}decode(e){return 0===e.byteLength?"":(e instanceof DataView?e=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):ArrayBuffer.isView(e)&&(e=e.buffer),globalThis.TextCodecHelper.decode(e))}encodeInto(){throw TypeError("TextEncoder().encodeInto not supported")}get encoding(){return"utf-8"}get fatal(){return!1}get ignoreBOM(){return!0}},W=class{constructor(){}encode(e){return new Uint8Array(globalThis.TextCodecHelper.encode(e))}encodeInto(){throw TypeError("TextEncoder().encodeInto not supported")}get encoding(){return"utf-8"}},A=class r{constructor(){this._arrayBuffer=new ArrayBuffer(0),this._bodyUsed=!1}safeUseBody(e){if(this._bodyUsed)return;let t=e(this._arrayBuffer);return this._bodyUsed=!0,this._arrayBuffer=null,t}cloneArrayBuffer(e){return e.slice(0)}setBody(e){e instanceof r?e._bodyUsed||(this._arrayBuffer=this.cloneArrayBuffer(e._arrayBuffer)):e instanceof ArrayBuffer?this._arrayBuffer=this.cloneArrayBuffer(e):e instanceof DataView?this._arrayBuffer=this.cloneArrayBuffer(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):ArrayBuffer.isView(e)?this._arrayBuffer=this.cloneArrayBuffer(e.buffer):e&&(this._arrayBuffer=new W().encode(e.toString()).buffer)}arrayBuffer(){return Promise.resolve(this.safeUseBody(e=>e))}text(){return Promise.resolve(this.safeUseBody(e=>new I().decode(e)))}json(){return Promise.resolve(this.safeUseBody(e=>JSON.parse(new I().decode(e))))}get bodyUsed(){return this._bodyUsed}};Se=Symbol.toStringTag,_computedKey=Symbol.iterator;var _computedKey,_computedKey1,Se,P=class r{constructor(e){if(this._headers_map=new Map,this[Se]="Headers",null===e||"number"==typeof e)throw TypeError("Headers init with null/number");if(e instanceof r)for(let[t,i]of e)this.append(t,i);else Array.isArray(e)?e.forEach(([e,t])=>{this.append(e,Array.isArray(t)?t.join(" "):t)}):e&&Object.getOwnPropertyNames(e).forEach(t=>{let i=e[t];this.append(t,Array.isArray(i)?i.join(" "):i)})}[_computedKey](){return this.entries()}*keys(){for(let[e,t]of this._headers_map)yield e}*values(){for(let[e,t]of this._headers_map)yield t}*entries(){for(let e of this._headers_map)yield e}has(e){return this._headers_map.has(e)}get(e){return this._headers_map.get(e)??null}set(e,t){this._headers_map.set(e,String(t))}append(e,t){let r=this.has(e)?`${this.get(e)}, ${t}`:t;this.set(e,r)}delete(e){this.has(e)&&this._headers_map.delete(e)}forEach(e,t){for(let[r,i]of this.entries())e.call(t,i,r,this)}};_computedKey1=Symbol.toStringTag;var K=class r extends ${get aborted(){return this._aborted}get reason(){return this._reason}constructor(){super(),this._aborted=!1}get[_computedKey1](){return"[object AbortSignal]"}dispatchEvent(e){"abort"===e.type&&(this._aborted=!0,this._reason=e.reason,"function"==typeof this.onabort&&this.onabort.call(this,e)),super.emit(e.type,e)}addEventListener(e,t){super.addListener(e,t)}static __create(){return new r}};function se(e){return class e extends A{get url(){return this._url}get headers(){return this._headers}get method(){return this._method}get signal(){return this._signal}get lynxExtension(){return this._lynxExtension}constructor(t,r){if(super(),r=r||{},t instanceof e){if(t.bodyUsed)throw TypeError("Already read");this._url=t.url,r.headers||(this._headers=new P(t.headers)),this._method=t.method,this._signal=t.signal,this.setBody(t._arrayBuffer)}else this._url=String(t);if((r.headers||!this.headers)&&(this._headers=new P(r.headers)),this._method=r.method||this.method||"GET",this._method=this._method.toUpperCase(),("GET"===this.method||"HEAD"===this.method)&&r.body)throw TypeError("Body not allowed for GET or HEAD requests");"u">typeof r.signal&&(this._signal=r.signal),this._signal=this._signal||K.__create(),this._lynxExtension=r.lynxExtension||{},this._headers.get("Content-Type")||("string"==typeof r.body?this._headers.set("Content-Type","text/plain;charset=UTF-8"):globalThis.URLSearchParams&&r.body instanceof URLSearchParams?this._headers.set("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"):r.body instanceof ArrayBuffer||this._headers.set("Content-Type","text/plain;charset=UTF-8")),this.setBody(r.body)}clone(){let t=new e(this,{method:this.method});return t.setBody(this),t}}}function ae(e){return class e extends A{get url(){return this._url}get status(){return this._status}get statusText(){return this._statusText}get ok(){return this._ok}get headers(){return this._headers}get lynxExtension(){return this._lynxExtension}constructor(e,t){if(super(),t=t||{},this._status=void 0===t.status?200:t.status,this._status<200||this._status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this._ok=this._status>=200&&this._status<300,this._statusText=void 0===t.statusText?"":""+t.statusText,this._headers=new Headers(t.headers),this._url=t.url||"",this._lynxExtension=t.lynxExtension||{},this.setBody(e)}clone(){let t=new e(null,{status:this._status,statusText:this._statusText,headers:new Headers(this._headers),url:this._url});return t.setBody(this),t}}}var u=class _BaseApp{constructor(e,t){this.dataTypeSet=new Set(["string","number","array","object","boolean","null","function"]),this.removeInternalEventListenersCallbacks=[],this.setSourceMapRelease=e=>{this.Reporter.setSourceMapRelease(e)},this.getSourceMapRelease=e=>this.Reporter.getSourceMapRelease(e),this.setupGetTextInfoApi=()=>{this._apiList.getTextInfo=(e,t)=>this._textInfoManager.getTextInfo(e,t)},this.setupExposureApi=()=>{this._apiList.resumeExposure=()=>{this._exposureManager.resumeExposure()},this._apiList.stopExposure=e=>{this._exposureManager.stopExposure(e||{sendEvent:!0})},this._apiList.setObserverFrameRate=e=>{this._exposureManager.setObserverFrameRate(e||{forPageRect:20,forExposureCheck:20})}},this.requestAnimationFrame=e=>this._nativeApp.requestAnimationFrame(e),this.cancelAnimationFrame=e=>this._nativeApp.cancelAnimationFrame(e),this.__removeInternalEventListeners=()=>{this.removeInternalEventListenersCallbacks.forEach(e=>{e()})},this.initBase(e),t?t.transferSingletonData(this,this.__internal__callLynxSetModule.bind(this)):this.initExtra(e),this.setTimeout=this.nativeApp.setTimeout,this.setInterval=this.nativeApp.setInterval,this.clearInterval=this.nativeApp.clearInterval,this.clearTimeout=this.nativeApp.clearTimeout,this.addInternalEventListeners()}initExtra(e){let{lynx:t}=e;this.modules={},this._lazyCallableModules=new Map,this._nativeApp=f.create(this._nativeApp),this.sharedConsole=U(`runtimeId:${this.nativeAppId}`),this.dynamicComponentExports={},this.loadedDynamicComponentsSet=new Set,this._lazyCallableModules=new Map,this.Reporter=new b(()=>this,()=>this.nativeApp),this.GlobalEventEmitter=new $(this.__internal__callLynxSetModule.bind(this)),this._intersectionObserverManager=new J(this.NativeModules),this._exposureManager=new Y(this.NativeModules),this.setupExposureApi(),this._aopManager=new V,this.beforePublishEvent=this._aopManager._beforePublishEvent,this.performance=new _e(this.GlobalEventEmitter,this.nativeApp);let r=this.setupPromise(this.nativeApp.setTimeout,this.nativeApp.clearTimeout,t);this.lynx=this.createLynx(t,r),this.setupJSModule(),this.setupIntersectionApi(),this.setupFetchAPI(r)}initBase(e){let{nativeApp:t,params:r}=e;this.nativeAppId=t.id,this._params=r,this._nativeApp=t,this.NativeModules=t.nativeModuleProxy,this.LynxUIMethodModule=t.nativeModuleProxy.LynxUIMethodModule,this.LynxTestModule=t.nativeModuleProxy.LynxTestModule,this.LynxResourceModule=t.nativeModuleProxy.LynxResourceModule,this.LynxAccessibilityModule=t.nativeModuleProxy.LynxAccessibilityModule,this.LynxSetModule=t.nativeModuleProxy.LynxSetModule,this._apiList={},this._textInfoManager=new Q(this.NativeModules),this.setupGetTextInfoApi()}static{this.kDefaultSourceMapURL="default"}static{this.kGetSourceMapReleaseErrorName=pe}set __sourcemap__release__(e){let t=Error();t.name="LynxGetSourceMapReleaseError",t.message=e,t.stack=`at <anonymous> (${_BaseApp.kDefaultSourceMapURL}:1:1)`,this.setSourceMapRelease(t)}destroy(){this.__removeInternalEventListeners(),this._nativeApp=null,this._params=null,this._lazyCallableModules=null,this.GlobalEventEmitter=null}registerModule(e,t){this._lazyCallableModules[e]=t}getJSModule(e){return this._lazyCallableModules[e]}setupJSModule(){this.registerModule("GlobalEventEmitter",this.GlobalEventEmitter),this.registerModule("Reporter",this.Reporter)}setupFetchAPI(e){this._createResponseClass=ae,this._createRequestClass=se,this._RequestClass=l.Request??se(e),this._ResponseClass=l.Response??ae(e),l.Request||(l.Request=this._RequestClass),l.Response||(l.Response=this._ResponseClass)}__internal__callLynxSetModule(e,t){let r=this.LynxSetModule[e];r&&Function.prototype.apply.call(r,void 0,t)}get nativeApp(){return this._nativeApp}set nativeApp(e){this._nativeApp=e}get params(){return this._params}set apiList(e){this._apiList={...this._apiList,...e}}setupIntersectionApi(){let e=this;this._apiList.createIntersectionObserver=function(t,r){let{componentId:i=""}=t;return e._intersectionObserverManager.createIntersectionObserver(i,r)},this.lynx.createIntersectionObserver=this._apiList.createIntersectionObserver}onIntersectionObserverEvent(e,t,r){let i=this._intersectionObserverManager.getObserver(e);i&&i.invokeCallback(t,r)}reportError(e){return this.lynx.reportError(e)}handleError(e,t,r){h(e,this.nativeApp,{originError:t,getSourceMapRelease:this.getSourceMapRelease,errorLevel:r})}handleUserError(e,t,r,i){let{message:s,name:n,stack:o}=e||{};s||({message:s,name:n,stack:o}=Error(JSON.stringify(e)));let a=new E(i?`${i} ${n}: ${s}`:`${n}: ${s}`,o);a.cause=t,this.handleError(a,e,r)}handleInternalError(e,t){let{message:r,name:i,stack:s}=e||{};r||({message:r,name:i,stack:s}=Error(JSON.stringify(e)));let n=new g(`${i}: ${r}`,s);n.cause=t,this.handleError(n,e)}getBoolEnv(e){return this.nativeApp.getEnv(e)?.toLowerCase()==="true"}static{this._$factoryCache={}}_$executeInit(e,{path:t,entryName:r}){let i;if(e&&e.init)i=e.init.bind(e);else if(l.initBundle)i=l.initBundle.bind(l.initBundle),delete l.initBundle;else throw new E(`load failed. path:${t},entryName:${r}`);try{this.lynx.performance.profileStart("executeLoadedScript",{args:{path:t}});let e=i({tt:this});return _BaseApp._$factoryCache[t]=i,e}finally{this.lynx.performance.profileEnd()}}_$executeJSON(e,{path:t}){let r=JSON.parse(e),i=()=>r;return _BaseApp._$factoryCache[t]=i,r}requireModule(e,t,r){let i=_BaseApp._$factoryCache[e];if(i)return this._$executeInit({init:i},{path:e,entryName:t});if(e.split("?")[0].endsWith(".json")){let i=this.nativeApp.readScript(e,{dynamicComponentEntry:t??m,...r});return this._$executeJSON(i,{path:e,entryName:t})}let s=this.nativeApp.loadScript(e,t,r);return this._$executeInit(s,{path:e,entryName:t})}requireModuleAsync(e,t){let r=_BaseApp._$factoryCache[e];if(r)return void t(null,this._$executeInit({init:r},{path:e}));if(e.split("?")[0].endsWith(".json")){try{let r=this.nativeApp.readScript(e),i=this._$executeJSON(r,{path:e});t(null,i)}catch(e){t(e)}return}let i=Error();this.nativeApp.loadScriptAsync(e,(r,s)=>{if(r)return i.message=r,t(i);try{return t(null,this._$executeInit(s,{path:e}))}catch(e){return t(e)}})}require(path,params){let that=this;if("string"!=typeof path)throw Error("require args must be a string");let entryName=params&¶ms.dynamicComponentEntry?params.dynamicComponentEntry:m;that.modules[entryName]||(that.modules[entryName]={});let module=that.modules[entryName][path];if(!module){try{let tt=that,jsContent=that._nativeApp.readScript(path,{dynamicComponentEntry:entryName});eval(jsContent),module=that.modules[entryName][path]}catch(r){this.handleError(new E(`eval user: ${that._nativeApp.id} error: ${r.message}`,r.stack),r)}if(!that.modules[entryName][path])throw Error(`module ${path} in ${entryName} is not defined in card: ${that._nativeApp.id}`)}if(!module.hasRun){let{factory:r}=module,e={exports:{}},t;if(module.hasRun=!0,module.exports=e.exports,"function"==typeof r){let n=Ne.call(that,path),o=that;t=r(n,e,e.exports,that.Card.bind(o),that.setTimeout,that.setInterval,that.clearInterval,that.clearTimeout,that.NativeModules,that._apiList,that.sharedConsole,that.Component.bind(o),params?.ReactLynx,that.nativeAppId,that.Behavior.bind(o),me,that.lynx,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,that.lynx.fetch,void 0,void 0,void 0,void 0,void 0,void 0,that.requestAnimationFrame,that.cancelAnimationFrame),module.exports=e.exports||t}}return module.exports}define(e,t,r){r=r||m,this.modules[r]||(this.modules[r]={}),this.modules[r][e]={hasRun:!1,factory:t.bind(this)}}callFunction(e,t,r){try{let i=this.getJSModule(e);"function"==typeof i[t]&&i[t].apply(i,r)}catch(r){this.handleUserError(r,{by:`${e}.${t}`})}}onAppError(e,t){this.handleInternalError(t)}saveDynamicComponentExports(e,t){this.dynamicComponentExports[e]=t}getDynamicComponentExports(e){return this.dynamicComponentExports[e]}Component(...e){}Card(...e){}Behavior(...e){}wrapReport(e,t){let r=this;function i(e){return function(...i){try{return e.apply(this,i)}catch(e){r.handleUserError(e,{by:t})}}}return function(t,...r){return Function.prototype.apply.call(e,void 0,[i(t),...r])}}setupPromise(e,t,r){let i=he(e,(e,t)=>{try{t&&(t.stack||(t=Error(JSON.stringify(t))),t.name="unhandled rejection",this.handleUserError(t))}catch{}},t,r.queueMicrotask,this._params?.pageConfigSubset?.enableMicrotaskPromisePolyfill??!1);return this.resolvedPromise=i.resolve(),i}addInternalEventListener(e,t,r){this.contextProxyTypeToMethod[e]().addEventListener(t,r),this.removeInternalEventListenersCallbacks.push(()=>{this.contextProxyTypeToMethod[e]().removeEventListener(t,r)})}addInternalEventListeners(){this.contextProxyTypeToMethod||(this.contextProxyTypeToMethod={0:()=>this.lynx.getCoreContext(),1:()=>this.lynx.getDevtool(),2:()=>this.lynx.getJSContext(),3:()=>this.lynx.getUIContext()}),this.addInternalEventListener(0,"__OnNativeAppReady",()=>{this.onNativeAppReady()}),this.addInternalEventListener(0,"__NotifyGlobalPropsUpdated",e=>{this.updateGlobalProps(e.data)}),this.addInternalEventListener(0,"__OnLifecycleEvent",e=>{this.OnLifecycleEvent(e.data)}),this.addInternalEventListener(0,"__OnAppFirstScreen",()=>{this.onAppFirstScreen()}),this.addInternalEventListener(0,"__OnDynamicJSSourcePrepared",e=>{l.loadDynamicComponent(this,e.data)}),this.addInternalEventListener(0,"__OnAppEnterForeground",()=>{this.onAppEnterForeground()}),this.addInternalEventListener(0,"__OnAppEnterBackground",()=>{this.onAppEnterBackground()})}updateGlobalProps(e){}OnLifecycleEvent(e){}onNativeAppReady(){}onAppFirstScreen(){}onAppEnterBackground(){}onAppEnterForeground(){}};function Te(e){let t=e.match(/(.*)\/([^/]+)?$/);return t?.[1]?t[1]:"./"}function Ne(e){let t=this,r=Te(e);return function(e){let i=[],s=`${r}/${e}`.split("/"),n=s.length;if("string"!=typeof e)throw Error("require args must be a string");for(let r=0;r<n;++r){let o=s[r];if(""!==o&&"."!==o)if(".."===o){if(0===i.length)throw Error(`can't find module ${e} in app: ${t._nativeApp.id}`);i.pop()}else r+1<n&&".."===s[r+1]?r++:i.push(o)}let o=i.join("/");return o.endsWith(".js")||(o+=".js"),t.require(o)}}var z=class extends u{createLynx(e,t){let r=f.create(e);return new T(()=>this.nativeApp,()=>this,t,()=>r)}callBeforePublishEvent(e){if(0!==this._aopManager._beforePublishEvent.getEventsSize(e.type)){let t={...e};try{this._aopManager._beforePublishEvent.emit(t.type,[t])}catch(e){this.handleUserError(e,{by:"callBeforePublishEvent",type:t.type})}}}},le=class{transferSingletonData(e,t){e.nativeApp=this.nativeApp,e.sharedConsole=this.sharedConsole,e.dynamicComponentExports=this.dynamicComponentExports,e.loadedDynamicComponentsSet=this.loadedDynamicComponentsSet,e._intersectionObserverManager=this.intersectionObserverManager,e._exposureManager=this.exposureManager,e._textInfoManager=this.textInfoManager,this.globalEventEmitter.setCallLynxSetModule(t),e.GlobalEventEmitter=this.globalEventEmitter,e._aopManager=this.aopManager,e.performance=this.performance,e.modules=this.modules,e._lazyCallableModules=this.lazyCallableModules,e.lynx=this.lynx,this.lynx.rebind(()=>e),e._apiList=this.apiList,this.Reporter.rebind(()=>e),e.Reporter=this.Reporter,e.resolvedPromise=this.resolvedPromise}},L=class extends u{constructor(e,t){super(e,void 0),this.fillSingletonData();try{t.srcName&&(delete this.lynx.requireModule.cache[t.srcName],delete u._$factoryCache[t.srcName],this.lynx.requireModule(t.srcName,m),this.dataTypeSet.add("undefined"))}catch(e){this.handleUserError(e)}}createLynx(e,t){let r=f.create(e);return new T(()=>this.nativeApp,()=>this,t,()=>r)}fillSingletonData(){this.singletonData=new le,this.singletonData.nativeApp=this._nativeApp,this.singletonData.sharedConsole=this.sharedConsole,this.singletonData.dynamicComponentExports=this.dynamicComponentExports,this.singletonData.loadedDynamicComponentsSet=this.loadedDynamicComponentsSet,this.singletonData.intersectionObserverManager=this._intersectionObserverManager,this.singletonData.exposureManager=this._exposureManager,this.singletonData.textInfoManager=this._textInfoManager,this.singletonData.globalEventEmitter=this.GlobalEventEmitter,this.singletonData.aopManager=this._aopManager,this.singletonData.performance=this.performance,this.singletonData.modules=this.modules,this.singletonData.lazyCallableModules=this._lazyCallableModules,this.singletonData.lynx=this.lynx,this.singletonData.apiList=this._apiList,this.singletonData.Reporter=this.Reporter,this.singletonData.resolvedPromise=this.resolvedPromise}};function Ae(e,t,r){let{id:i}=e,{cardType:s}=t,n=!0,o;try{if(o="standalone"==s?new L({nativeApp:e,params:t,lynx:r},t):new z({nativeApp:e,params:t,lynx:r}),l.currentAppId=i,l.multiApps[i]=o,"standalone"===s)return e.setCard(o),!0;t.bundleSupportLoadScript,n=!0;try{delete o.lynx.requireModule.cache[B],delete u._$factoryCache[B],o.lynx.requireModule(B,m),o.lynx._switches.allowUndefinedInNativeDataTypeSet&&o.dataTypeSet.add("undefined")}catch(e){n=!1,o.handleUserError(e,void 0,void 0,"loadCard failed")}e.setCard(o)}catch(t){Ce(e,t),n=!1}return n}function be(e){l.multiApps[e].destroy(),delete l.multiApps[e]}function Oe(e){l.multiApps[e].callDestroyLifetimeFun()}function Ce(e,t,r){let{message:i,name:s,stack:n}=t||{};i||({message:i,name:s,stack:n}=Error(JSON.stringify(t)));let o=new g(`loadCard failed ${s}: ${i}`,n);o.cause=r,h(o,e,{originError:t,getSourceMapRelease:t=>{if(!e.__GetSourceMapRelease(t))return e.__GetSourceMapRelease(u.kDefaultSourceMapURL)}})}},133:function(e,t,r){r.d(t,{B:()=>f,J:()=>b});let i={CreateElement:1,SetAttribute:2,RemoveAttribute:3,Append:4,Remove:5,ReplaceWith:6,InsertBefore:7,EnableEvent:8,RemoveChild:9,StyleDeclarationSetProperty:10,StyleDeclarationRemoveProperty:11,SetInnerHTML:12},s=Symbol("uniqueId");Symbol("ancestorDocument");class n extends EventTarget{_enableEvent;_parentElement=null;_children=[];[s];constructor(e,t){super(),this._enableEvent=t,this[s]=e}get children(){return this._children.slice()}get parentElement(){return this._parentElement}get parentNode(){return this._parentElement}get firstElementChild(){return this._children[0]??null}get lastElementChild(){return this._children[this._children.length-1]??null}get nextElementSibling(){let e=this._parentElement;if(e){let t=e._children.indexOf(this);if(t>=0)return e._children[t+1]||null}return null}append(...e){for(let t of e)t._remove(),t._parentElement=this;this._children.push(...e)}replaceWith(...e){if(this._parentElement){let t=this._parentElement;this._parentElement=null;let r=t._children.indexOf(this);for(let i of(t._children.splice(r,1,...e),e))i._parentElement=t}}_remove(){if(this._parentElement){let e=this._parentElement._children.indexOf(this);this._parentElement._children.splice(e,1),this._parentElement=null}}insertBefore(e,t){if(e._remove(),t){let r=this._children.indexOf(t);r>=0&&(e._parentElement=this,this._children.splice(r,0,e))}else e._parentElement=this,this._children.push(e);return e}removeChild(e){if(!e||e._parentElement!==this)throw new DOMException("The node to be removed is not a child of this node.","NotFoundError");return e._remove(),e}addEventListener(e,t,r){this._enableEvent(e,this[s]),super.addEventListener(e,t,r)}}class o{_parent;constructor(e){this._parent=e}setProperty(e,t,r){this._parent[a][m].push({type:i.StyleDeclarationSetProperty,uid:this._parent[s],property:e,value:t,priority:r})}removeProperty(e){this._parent[a][m].push({type:i.StyleDeclarationRemoveProperty,uid:this._parent[s],property:e})}}let a=Symbol("ancestorDocument"),l=Symbol("_style"),h=Symbol("_attributes");class c extends n{[l];[h]={};[a];tagName;constructor(e,t,r){super(r,t[_]),this.tagName=e.toUpperCase(),this[a]=t}get style(){return this[l]||(this[l]=new o(this)),this[l]}get id(){return this[h].id??""}set id(e){this[h].id=e,this.setAttribute("id",e)}get className(){return this[h].class??""}setAttribute(e,t){this[h][e]=t,this[a][m].push({type:i.SetAttribute,uid:this[s],key:e,value:t})}getAttribute(e){return this[h][e]??null}removeAttribute(e){delete this[h][e],this[a][m].push({type:i.RemoveAttribute,uid:this[s],key:e})}append(...e){this[a][m].push({type:i.Append,uid:this[s],cid:e.map(e=>e[s])}),super.append(...e)}replaceWith(...e){return this[a][m].push({type:i.ReplaceWith,uid:this[s],nid:e.map(e=>e[s])}),super.replaceWith(...e)}getAttributeNames(){return Object.keys(this[h])}remove(){this.parentElement&&(this[a][m].push({type:i.Remove,uid:this[s]}),super._remove())}insertBefore(e,t){let r=super.insertBefore(e,t);return this[a][m].push({type:i.InsertBefore,uid:this[s],cid:e[s],ref:t?.[s]}),r}removeChild(e){let t=super.removeChild(e);return this[a][m].push({type:i.RemoveChild,uid:this[s],cid:e[s]}),t}set innerHTML(e){this[a][m].push({type:i.SetInnerHTML,text:e,uid:this[s]})}}let u=Symbol("propagationStopped"),p=Symbol("eventPhase");class d extends Event{_target;[p]=Event.CAPTURING_PHASE;constructor(e,t){super(e),this._target=t}get target(){return this._target}[u]=!1;stopImmediatePropagation(){this[u]=!0,super.stopImmediatePropagation()}stopPropagation(){this[u]=!0,super.stopPropagation()}get eventPhase(){return this[p]}}let m=Symbol("operations"),_=Symbol("enableEvent"),y=Symbol("getElementByUniqueId"),f=Symbol("_onEvent"),g=Symbol("uniqueIdInc"),v=Symbol("_uniqueIdToElement");class b extends n{_callbacks;[g]=1;[v]=[];[m]=[];[y](e){return this[v][e]?.deref()}[_];constructor(e){let t=(e,t)=>{this[m].push({type:i.EnableEvent,eventType:e,uid:t})};super(0,t),this._callbacks=e,this[_]=t}commit(){let e=this[m];this[m]=[],this._callbacks.onCommit(e)}append(e){this[m].push({type:i.Append,uid:0,cid:[e[s]]}),super.append(e)}createElement(e){let t=this[g]++,r=new c(e,this,t);return this[v][t]=new WeakRef(r),this[m].push({type:i.CreateElement,uid:t,tag:e}),r}[f]=(e,t,r,i)=>{let s=this[y](t);if(s){let t=[],n=s;for(;n.parentElement;)t.push(n.parentElement),n=n.parentElement;let o=new d(e,s);Object.assign(o,i),o[p]=Event.CAPTURING_PHASE;for(let e=t.length-1;e>=0;e--)if(t[e].dispatchEvent(o),o[u])return;if(o[p]=Event.AT_TARGET,s.dispatchEvent(o),r){for(let e of(o[p]=Event.BUBBLING_PHASE,t))if(e.dispatchEvent(o),o[u])return}}}}},353:function(e,t,r){var i,s,n,o;r.d(t,{EN:()=>F,UK:()=>v,uE:()=>h,oc:()=>$,wg:()=>m,sr:()=>S,ZW:()=>q,eA:()=>f,eW:()=>w,wU:()=>x,G4:()=>j,YH:()=>D,bh:()=>k,jK:()=>s,i$:()=>P,Hs:()=>b,E3:()=>E,gc:()=>B,cZ:()=>A,Au:()=>M,RN:()=>u,Rz:()=>C,Oh:()=>I,E9:()=>W,EO:()=>G,jF:()=>H,bM:()=>N,nt:()=>T,Tt:()=>L,R1:()=>R,L9:()=>c,V_:()=>U,cx:()=>O,rd:()=>y,Xz:()=>a,$m:()=>d,mH:()=>_,Bq:()=>p,SH:()=>l});let a="lynx-unique-id",l="lynx-css-id",h="lynx-component-id",c="lynx-tag",u="lynx-default-display-linear",p="__lynx_timing_flag",d=["registerDataProcessor","registerWorkletInternal","lynxWorkletImpl","runWorklet"],m={platform:"web",lynxSdkVersion:"3.0"},_={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur"},y={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus"}},f={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function g(e,t,r=!0,i=!1,s){return{name:e,isSync:t,hasReturn:r,hasReturnTransfer:i,bufferSize:s}}let v=g("__postExposure",!1,!1),b=g("publicComponentEvent",!1,!1),E=g("publishEvent",!1,!1),x=g("postOffscreenEventEndpoint",!1,!1),S=g("switchExposureServiceEndpoint",!1,!1),A=g("mainThreadStart",!1,!1),M=g("updateData",!1,!0),T=g("sendGlobalEventEndpoint",!1,!1),w=g("dispose",!1,!0),C=g("start",!1,!0),I=g("reportError",!1,!1),R=g("flushElementTree",!1,!0),L=g("callLepusMethod",!1,!0),k=g("__invokeUIMethod",!1,!0),O=g("__setNativeProps",!1,!0),N=g("nativeModulesCall",!1,!0),P=g("napiModulesCall",!1,!0,!0),D=g("getCustomSections",!1,!0),U=g("markTiming",!1,!1),F=g("postTimingFlags",!1,!1),B=g("__triggerComponentEvent",!1,!1),q=g("__selectComponent",!1,!0),j=g("dispatchLynxViewEvent",!1,!1),$=g("dispatchNapiModule",!1,!1),H=g("dispatchCoreContextOnBackground",!1,!1),G=g("dispatchJSContextOnMainThread",!1,!1);!function(e){e[e.ID_SELECTOR=0]="ID_SELECTOR",e[e.REF_ID=1]="REF_ID",e[e.UNIQUE_ID=2]="UNIQUE_ID"}(i||(i={})),function(e){e[e.SUCCESS=0]="SUCCESS",e[e.UNKNOWN=1]="UNKNOWN",e[e.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",e[e.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",e[e.PARAM_INVALID=4]="PARAM_INVALID",e[e.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",e[e.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE"}(s||(s={})),function(e){e[e.UPDATE=0]="UPDATE",e[e.RESET=1]="RESET"}(n||(n={})),function(e){e[e.Unknown=0]="Unknown",e[e.UpdateExplictByUser=1]="UpdateExplictByUser",e[e.UpdateByKernelFromCtor=2]="UpdateByKernelFromCtor",e[e.UpdateByKernelFromRender=4]="UpdateByKernelFromRender",e[e.UpdateByKernelFromHydrate=8]="UpdateByKernelFromHydrate",e[e.UpdateByKernelFromGetDerived=16]="UpdateByKernelFromGetDerived",e[e.UpdateByKernelFromConflict=32]="UpdateByKernelFromConflict",e[e.UpdateByKernelFromHMR=64]="UpdateByKernelFromHMR"}(o||(o={}));let J=3;class W extends EventTarget{_config;constructor(e){super(),this._config=e}postMessage(...e){console.error("[lynx-web] postMessage not implemented, args:",...e)}dispatchEvent(e){let{rpc:t,sendEventEndpoint:r}=this._config;return t.invoke(r,[e]),J}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}},665:function(e,t,r){r.d(t,{W:()=>i});class i{port;name;incId=0;#e={};#t=new TextEncoder;#r=new TextDecoder;#i=new Map;constructor(e,t){this.port=e,this.name=t,e.onmessage=e=>this.#s(e.data)}get nextRetId(){return`ret_${this.name}_${this.incId++}`}static createRetEndpoint(e){return{name:e,hasReturn:!1,isSync:!1}}#s=async e=>{let t=this.#i.get(e.name);if(t){let r=e.sync?new Int32Array(e.lock):void 0,s=!e.sync&&e.retId?i.createRetEndpoint(e.retId):void 0;try{let i=await t(...e.data),n,o=[];if(e.sync?n=i:e.hasTransfer?{data:n,transfer:o}=i||{}:n=i,e.sync){if(e.buf){let t=JSON.stringify(n),r=new Uint32Array(e.buf,0,1),i=new Uint8Array(e.buf,4),s=new Uint8Array(e.buf.byteLength-4),{written:o}=this.#t.encodeInto(t,s);r[0]=o,i.set(s,0)}Atomics.store(r,0,1),Atomics.notify(r,0)}else e.retId&&this.invoke(s,[n,!1],o||[])}catch(t){console.error(t),e.sync?(Atomics.store(r,0,2),Atomics.notify(r,0),r[1]=2):this.invoke(s,[void 0,!0])}}else{let t=this.#e[e.name];t?t.push(e):this.#e[e.name]=[e]}};createCall(e){return(...t)=>this.invoke(e,t)}registerHandler(e,t){this.#i.set(e.name,t);let r=this.#e[e.name];if(r?.length)for(let t of(this.#e[e.name]=void 0,r))this.#s(t)}registerHandlerRef(e,t,r){this.registerHandler(e,(...e)=>t[r]?.call(t,...e))}registerHandlerLazy(e,t,r){if(t[r])this.registerHandlerRef(e,t,r);else{let i,s=this;Object.defineProperty(t,r,{get:()=>i,set(n){i=n,n&&s.registerHandlerRef(e,t,r)}})}}removeHandler(e){this.#i.delete(e.name)}invoke(e,t,r=[]){if(e.isSync){let i=e.bufferSize?new SharedArrayBuffer(e.bufferSize+4):void 0,s=new SharedArrayBuffer(4),n=new Int32Array(s);n[0]=0;let o={name:e.name,data:t,sync:!0,lock:s,buf:i};if(this.port.postMessage(o,{transfer:r}),Atomics.wait(n,0,0),2===n[0])throw null;if(!i)return;{let e=new Uint32Array(i,0,4)[0],t=new Uint8Array(i,4,e),r=new Uint8Array(e);return r.set(t,0),r?JSON.parse(this.#r.decode(r)):void 0}}if(e.hasReturn){let{promise:s,resolve:n,reject:o}=Promise.withResolvers(),a=i.createRetEndpoint(this.nextRetId);this.registerHandler(a,(e,t)=>{t&&o(),n(e)});let l={name:e.name,data:t,sync:!1,retId:a?.name,hasTransfer:e.hasReturnTransfer};return this.port.postMessage(l,{transfer:r}),s}{let i={name:e.name,data:t,sync:!1};this.port.postMessage(i,{transfer:r})}}createCallbackify(e,t){let r=this.createCall(e);return(...e)=>{let i=e.at(t);e.splice(t,1),r(...e).then(i)}}}},660:function(e,t,r){r.d(t,{O:()=>A});var i=r(665),s=r(353);function n(e,t){let r=e.createCall(s.YH);return(e,i)=>{t[e]&&i(t[e]),r(e).then(i)}}function o(e,t,r){let i=new s.E9({rpc:r,receiveEventEndpoint:s.jF,sendEventEndpoint:s.EO});return{__globalProps:e.globalProps,getJSModule(e){},getNativeApp:()=>t,getCoreContext:()=>i,getCustomSectionSync:t=>e.customSections[t],getCustomSection:n(r,e.customSections)}}function a(e){return(t,r,i,n,o,a,l)=>{e.invoke(s.bh,[t,r,i,n,o,l]).then(a).catch(e=>{console.error("[lynx-web] invokeUIMethod failed",e),a({code:s.jK.UNKNOWN,data:""})})}}function l(e,t){e.registerHandlerLazy(s.Hs,t,"publicComponentEvent")}function h(e,t){e.registerHandler(s.UK,({exposures:e,disExposures:r})=>{e.length>0&&t.GlobalEventEmitter.emit("exposure",[e.map(e=>Object.assign(e,e.detail,{dataset:e.target.dataset}))]),r.length>0&&t.GlobalEventEmitter.emit("disexposure",[r.map(e=>Object.assign(e,e.detail,{dataset:e.target.dataset}))])})}async function c(e,t,r){let i=t.createCall(s.sr),n=e.createCall(s.bM),o={resumeExposure(){i(!0,!0)},stopExposure(e){i(!1,e.sendEvent??!0)}},a={call(e,t,r){n(e,t,"bridge").then(r)}},l={},h={};return await Promise.all(Object.entries(r).map(([e,t])=>import(t).then(t=>h[e]=t?.default?.(l,(t,r)=>n(t,r,e))))),Object.assign(l,{bridge:a,LynxExposureModule:o,...h})}function u(e,t){e.registerHandlerLazy(s.Au,t,"updateCardData")}function p(e,t){e.registerHandlerLazy(s.E3,t,"publishEvent")}function d(e){let t=0;return{generatePipelineOptions:()=>({pipelineID:"_pipeline_"+t++,needTimestamps:!1}),onPipelineStart:function(){},markPipelineTiming:function(t,r){e.markTimingInternal(r,t)},bindPipelineIdWithTimingFlag:function(t,r){e.pipelineIdToTimingFlags.has(t)||e.pipelineIdToTimingFlags.set(t,[]),e.pipelineIdToTimingFlags.get(t).push(r)},profileStart:()=>{console.error("NYI: profileStart. This is an issue of lynx-core.")},profileEnd:()=>{console.error("NYI: profileEnd. This is an issue of lynx-core.")}}}function m(e,t){e.registerHandler(s.nt,(...e)=>{t.GlobalEventEmitter.emit(...e)})}function _(){let e=new FinalizationRegistry(e=>e());return t=>{let r={};return e.register(r,t),r}}let y=0,f={};async function g(e){let{mainThreadRpc:t,uiThreadRpc:r,template:i,nativeModulesMap:n,timingSystem:o,browserConfig:g}=e,v=d(o),b=t.createCallbackify(s.Tt,2),E=r.createCall(s.cx),x=r.createCall(s.gc),S=r.createCallbackify(s.ZW,3),A=()=>{let e=globalThis.module.exports;return{init:t=>(t.tt.lynxCoreInject=t,t.tt.globalThis??=t,Object.assign(t.tt,{SystemInfo:{...s.wg,...g}}),e?.(t.tt))}};return{id:(y++).toString(),...v,setTimeout:setTimeout,setInterval:setInterval,clearTimeout:clearTimeout,clearInterval:clearInterval,nativeModuleProxy:await c(r,t,n),loadScriptAsync:function(e,t){let r=i.manifest[`/${e}`];r&&(e=r),import(e).catch(t).then(async()=>{t(null,A())})},loadScript:e=>{let t=i.manifest[`/${e}`];return t&&(e=t),importScripts(e),A()},requestAnimationFrame:e=>requestAnimationFrame(e),cancelAnimationFrame:e=>cancelAnimationFrame(e),callLepusMethod:b,setNativeProps:E,invokeUIMethod:a(r),setCard(e){l(t,e),p(t,e),h(t,e),u(r,e),m(r,e),o.registerGlobalEmitter(e.GlobalEventEmitter),e.lynx.getCoreContext().__start()},triggerComponentEvent:x,selectComponent:S,createJSObjectDestructionObserver:_(),setSharedData(e,t){f[e]=t},getSharedData:e=>f[e]}}function v(e,t,r,i){e.registerHandler(s.eW,()=>{let e=t.id;i(e),r(e)})}let b=async(e,t)=>{let r=e.createCall(s.i$),i={};return await Promise.all(Object.entries(t).map(([t,n])=>import(n).then(n=>i[t]=n?.default?.(i,(e,i)=>r(e,i,t),t=>{e.registerHandler(s.oc,e=>t(e))})))),{load:e=>i[e]}},E={onSetup:"lynx.performance.timing.onSetup",onUpdate:"lynx.performance.timing.onUpdate"};function x(e,t){let r=!0,i={},n=new Map,o=new Map,a=t.createCall(s.G4),l=[];function h(e,t,r){if(r||(r=performance.now()+performance.timeOrigin),!t){i[e]=r;return}n.has(t)||n.set(t,{}),n.get(t)[e]=r}let c=t=>{e.registerHandler(s.EN,(e,s)=>{if(s?e=e.concat(l):l=l.concat(e),r){let e={extra_timing:{},setup_timing:i,update_timings:{},metrics:{},has_reload:!1,thread_strategy:0,url:""};t.emit(E.onSetup,[e]),a("timing",i)}else{let r=(s?n.get(s):void 0)??{},i={extra_timing:{},setup_timing:{},update_timings:Object.fromEntries([...e,...o.get(s)??[]].map(e=>[e,r])),metrics:{},has_reload:!1,thread_strategy:0,url:""};t.emit(E.onUpdate,[i]),a("timing",r)}s&&(o.delete(s),n.delete(s)),r&&(r=!1)})};return e.registerHandler(s.V_,h),t.registerHandler(s.V_,h),{markTimingInternal:h,registerGlobalEmitter:c,pipelineIdToTimingFlags:o}}let S=Promise.resolve().then(r.bind(r,413));function A(e,t){let r=new i.W(e,"bg-to-ui"),n=new i.W(t,"bg-to-main"),a=x(n,r);a.markTimingInternal("load_core_start"),n.registerHandler(s.Rz,async e=>{a.markTimingInternal("load_core_end");let t=await g({...e,uiThreadRpc:r,mainThreadRpc:n,timingSystem:a});globalThis["napiLoaderOnRT"+t.id]=await b(r,e.napiModulesMap);let i=o(e,t,n);S.then(({loadCard:s,destroyCard:n,callDestroyLifetimeFun:o})=>{s(t,e,i),v(r,t,n,o)})})}globalThis.nativeConsole=console},212:function(e,t,r){r.a(e,async function(e,t){try{var i=r(660),s=r(506),n=e([s]);s=(n.then?(await n)():n)[0],self.onmessage=e=>{let{mode:t,toPeerThread:r,toUIThread:n}=e.data;"main"===t?(0,s.T)(n,r):(0,i.O)(n,r)},Object.assign(globalThis,{module:{exports:null}}),t()}catch(e){t(e)}})},994:function(e,t,r){r.d(t,{s:()=>s});var i=r(353);function s(e){return(t,r)=>{e.invoke(i.V_,[t,r,performance.now()+performance.timeOrigin])}}},139:function(e,t,r){r.d(t,{R:()=>s});var i=r(353);function s(e,t){e.registerHandler(i.Au,(...e)=>{t.updatePage?.(...e)})}},506:function(e,t,r){r.a(e,async function(e,i){try{r.d(t,{T:()=>h});var s=r(353),n=r(665),o=r(994),a=r(133),l=r(139);let{loadMainThread:e}=await r.e("579").then(r.bind(r,996));function h(t,r){let i=new n.W(t,"main-to-ui"),h=new n.W(r,"main-to-bg"),c=(0,o.s)(h),u=i.createCall(s.R1),p=i.createCall(s.Oh),d=new a.J({onCommit:u});i.registerHandler(s.wU,d[a.B]);let{startMainThread:m}=e(h,d,d.commit.bind(d),c,p);i.registerHandler(s.cZ,e=>{m(e).then(e=>{(0,l.R)(i,e)})})}i()}catch(e){i(e)}},1)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.m=__webpack_modules__,(()=>{var e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",r="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",i=e=>{e&&e.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))},s=s=>s.map(s=>{if(null!==s&&"object"==typeof s){if(s[e])return s;if(s.then){var n=[];n.d=0,s.then(e=>{o[t]=e,i(n)},e=>{o[r]=e,i(n)});var o={};return o[e]=e=>e(n),o}}var a={};return a[e]=function(){},a[t]=s,a});__webpack_require__.a=(n,o,a)=>{a&&((l=[]).d=-1);var l,h,c,u,p=new Set,d=n.exports,m=new Promise((e,t)=>{u=t,c=e});m[t]=d,m[e]=e=>{l&&e(l),p.forEach(e),m.catch(function(){})},n.exports=m,o(i=>{h=s(i);var n,o=()=>h.map(e=>{if(e[r])throw e[r];return e[t]}),a=new Promise(t=>{(n=()=>t(o)).r=0;var r=e=>e!==l&&!p.has(e)&&(p.add(e),e&&!e.d&&(n.r++,e.push(n)));h.map(t=>t[e](r))});return n.r?a:o()},e=>(e?u(m[r]=e):c(d),i(l))),l&&l.d<0&&(l.d=0)}})(),(()=>{__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((t,r)=>(__webpack_require__.f[r](e,t),t),[]))})(),(()=>{__webpack_require__.u=e=>"static/js/async/"+e+".js"})(),(()=>{__webpack_require__.miniCssF=e=>""+e+".css"})(),(()=>{__webpack_require__.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})()})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{__webpack_require__.rv=()=>"1.3.8"})(),(()=>{__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var e,t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw Error("Automatic publicPath is not supported in this browser");__webpack_require__.p=(e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"))+"../../../"})(),(()=>{var e={45:1},t=t=>{var[r,s,n]=t;for(var o in s)__webpack_require__.o(s,o)&&(__webpack_require__.m[o]=s[o]);for(n&&n(__webpack_require__);r.length;)e[r.pop()]=1;i(t)};__webpack_require__.f.i=(t,r)=>{e[t]||importScripts(__webpack_require__.p+__webpack_require__.u(t))};var r=globalThis.webpackChunk_lynx_js_web_explorer=globalThis.webpackChunk_lynx_js_web_explorer||[],i=r.push.bind(r);r.push=t})(),(()=>{__webpack_require__.ruid="bundler=rspack@1.3.8"})();var __webpack_exports__=__webpack_require__(212)})();
|