@lynx-js/web-rsbuild-server-middleware-canary 0.18.3 → 0.18.4-canary-20251111-eee83b60

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/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @lynx-js/web-rsbuild-server-middleware
2
2
 
3
+ ## 0.18.4-canary-20251111085403-eee83b601f4626c0576e376047356906886e5b59
4
+
3
5
  ## 0.18.3
4
6
 
5
7
  ## 0.18.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-rsbuild-server-middleware-canary",
3
- "version": "0.18.3",
3
+ "version": "0.18.4-canary-20251111-eee83b60",
4
4
  "private": false,
5
5
  "description": "a dev server middleware for rsbuild to serve Lynx Web Platform shell project",
6
6
  "keywords": [],
@@ -26,7 +26,7 @@
26
26
  "@rsbuild/core": "1.5.17",
27
27
  "rsbuild-plugin-arethetypeswrong": "0.1.1",
28
28
  "rsbuild-plugin-publint": "0.3.3",
29
- "@lynx-js/web-core": "npm:@lynx-js/web-core-canary@0.18.3",
29
+ "@lynx-js/web-core": "npm:@lynx-js/web-core-canary@0.18.4-canary-20251111-eee83b60",
30
30
  "@lynx-js/web-elements": "npm:@lynx-js/web-elements-canary@0.8.10"
31
31
  },
32
32
  "scripts": {
@@ -3,7 +3,7 @@
3
3
  --lynx-display-toggle: var(--lynx-display-flex);
4
4
  }`,`[lynx-default-overflow-visible="true"] x-view{
5
5
  overflow: visible;
6
- }`],v={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur",lynxinput:"input"},b={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus",input:"lynxinput"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus",input:"lynxinput"}},g={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function f(e,t,n=!0,a=!1,i){return{name:e,isSync:t,hasReturn:n,hasReturnTransfer:a,bufferSize:i}}let y=f("__postExposure",!1,!1),E=f("publicComponentEvent",!1,!1),S=f("publishEvent",!1,!1),w=f("postOffscreenEventEndpoint",!1,!1),x=f("switchExposureServiceEndpoint",!1,!1),C=f("mainThreadStart",!1,!1),T=f("updateData",!1,!0),O=f("sendGlobalEventEndpoint",!1,!1),I=f("dispose",!1,!0),L=f("start",!1,!0),k=f("reportError",!1,!1),A=f("flushElementTree",!1,!0),P=f("callLepusMethod",!1,!0),_=f("multiThreadExposureChangedEndpoint",!1,!1),M=f("__invokeUIMethod",!1,!0),R=f("__setNativeProps",!1,!0),N=f("__getPathInfo",!1,!0),D=f("nativeModulesCall",!1,!0),F=f("napiModulesCall",!1,!0,!0),H=f("getCustomSections",!1,!0),j=f("markTiming",!1,!1),z=f("postTimingFlags",!1,!1),U=f("__triggerComponentEvent",!1,!1),W=f("__selectComponent",!1,!0),V=f("dispatchLynxViewEvent",!1,!1),$=f("dispatchNapiModule",!1,!1),B=f("dispatchCoreContextOnBackground",!1,!1),X=f("dispatchJSContextOnMainThread",!1,!1),q=f("__triggerElementMethod",!1,!1),Y=f("updateGlobalProps",!1,!1),G=f("updateI18nResources",!1,!1),J=f("updateI18nResource",!1,!1),K=f("dispatchI18nResource",!1,!1),Z=f("queryComponent",!1,!0),Q=f("updateBTSTemplateCacheEndpoint",!1,!0),ee=f("loadTemplateMultiThread",!1,!0);(er=eh||(eh={}))[er.ID_SELECTOR=0]="ID_SELECTOR",er[er.REF_ID=1]="REF_ID",er[er.UNIQUE_ID=2]="UNIQUE_ID",(eo=eu||(eu={}))[eo.SUCCESS=0]="SUCCESS",eo[eo.UNKNOWN=1]="UNKNOWN",eo[eo.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",eo[eo.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",eo[eo.PARAM_INVALID=4]="PARAM_INVALID",eo[eo.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",eo[eo.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE",(ed=em||(em={}))[ed.UPDATE=0]="UPDATE",ed[ed.RESET=1]="RESET",(ec=ep||(ep={}))[ec.START=0]="START",ec[ec.PLAY=1]="PLAY",ec[ec.PAUSE=2]="PAUSE",ec[ec.CANCEL=3]="CANCEL",ec[ec.FINISH=4]="FINISH";let et=e=>`${e.locale}_${e.channel}_${e.fallback_url}`,en="i18nResourceMissed";class ea{data;constructor(e){this.data=e}setData(e){this.data=e}}class ei 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:n}=this._config;return t.invoke(n,[e]),3}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}let el=({timingKey:e,pipelineId:t,timeStamp:n,markTiming:a,cacheMarkTimings:i})=>{i.records.push({timingKey:e,pipelineId:t,timeStamp:n??performance.now()+performance.timeOrigin}),i.timeout||(i.timeout=setTimeout(()=>{a(i.records),i.records=[],i.timeout=null},500))},es=(e,t)=>{e(t.records),t.records=[],t.timeout&&(clearTimeout(t.timeout),t.timeout=null)};var er,eo,ed,ec,eh,eu,em,ep,ev=n(473)},473:function(e,t,n){n.d(t,{Y:()=>s});let a=["navigator","postMessage","window"],i=[e=>(e.appType=e.appType??(e.lepusCode.root.startsWith("(function (globDynamicComponentEntry")?"lazy":"card"),e.version=2,e.lepusCode=Object.fromEntries(Object.entries(e.lepusCode).filter(([e,t])=>"string"==typeof t)),e)];async function l(e,t,n,i,l){return Promise.all(Object.entries(e).filter(([e,t])=>"string"==typeof t).map(async([e,s])=>{let r;return[e,await t((r=`${l}/${e.replaceAll("/","_")}.js`,(n?"//# allFunctionsCalledOnLoad":"")+'\n(function() { "use strict"; const '+a.join("=void 0,")+"=void 0;\n"+("card"!==i?"module.exports=\n":"")+s+"\n})()\n//# sourceURL="+r),`${l}-${e.replaceAll("/","_")}.js`)]})).then(Object.fromEntries)}async function s(e,t,n){let a;if(e.version=e.version??1,e.version>2)throw Error("Unsupported template, please upgrade your web-platform dependencies");for(;e.version<2&&(a=i[e.version-1]);)e=a(e);return{...e,lepusCode:await l(e.lepusCode,t,!0,e.appType,n)}}},688:function(e,t,n){n.a(e,async function(e,t){try{var a=n(736),i=n(29),l=e([a]);a=(l.then?(await l)():l)[0];class s extends HTMLElement{static lynxViewCount=0;static tag="lynx-view";static observedAttributeAsProperties=["url","global-props","init-data"];static observedAttributes=s.observedAttributeAsProperties.map(e=>e.toLowerCase());#e;#t=!1;#n;get url(){return this.#n}set url(e){this.#n=e,this.#a()}#i={};get globalProps(){return this.#i}set globalProps(e){"string"==typeof e?this.#i=JSON.parse(e):this.#i=e}#l={};get initData(){return this.#l}set initData(e){"string"==typeof e?this.#l=JSON.parse(e):this.#l=e}#s=[];get initI18nResources(){return this.#s}set initI18nResources(e){"string"==typeof e?this.#s=JSON.parse(e):this.#s=e}updateI18nResources(e,t){this.#e?.updateI18nResources(e,t)}#r={page:"div"};get overrideLynxTagToHTMLTagMap(){return this.#r}set overrideLynxTagToHTMLTagMap(e){"string"==typeof e?this.#r=JSON.parse(e):this.#r=e}#o=[];#d;get onNativeModulesCall(){return this.#d}set onNativeModulesCall(e){for(let t of(this.#d=e,this.#o))t.resolve(e.apply(void 0,t.args));this.#o=[]}#c={};get nativeModulesMap(){return this.#c}set nativeModulesMap(e){this.#c=e}#h={};get napiModulesMap(){return this.#h}set napiModulesMap(e){this.#h=e}#u;get onNapiModulesCall(){return this.#u}set onNapiModulesCall(e){this.#u=(t,n,a,i)=>e(t,n,a,this,i)}get lynxGroupId(){return this.getAttribute("lynx-group-id")?Number(this.getAttribute("lynx-group-id")):void 0}set lynxGroupId(e){e?this.setAttribute("lynx-group-id",e.toString()):this.removeAttribute("lynx-group-id")}updateData(e,t,n){this.#e?.updateData(e,t,n)}updateGlobalProps(e){this.#e?.updateGlobalProps(e),this.globalProps=e}sendGlobalEvent(e,t){this.#e?.sendGlobalEvent(e,t)}reload(){this.removeAttribute("ssr"),this.#a()}setAttribute(e,t){"false"===t?this.removeAttribute(e):super.setAttribute(e,t)}attributeChangedCallback(e,t,n){if(t!==n)switch(e){case"url":this.#n=n;break;case"global-props":this.#i=JSON.parse(n);break;case"init-data":this.#l=JSON.parse(n)}}get threadStrategy(){return this.getAttribute("thread-strategy")}set threadStrategy(e){e?this.setAttribute("thread-strategy",e):this.removeAttribute("thread-strategy")}get injectHeadLinks(){return"false"!==this.getAttribute("inject-head-links")}set injectHeadLinks(e){e?this.setAttribute("inject-head-links","true"):this.removeAttribute("inject-head-links")}injectStyleRules=[];disconnectedCallback(){this.#e?.dispose(),this.#e=void 0,this.shadowRoot?.querySelector(`[${i.Gq}="page"]`)?.setAttribute(i.JA,""),this.shadowRoot&&(this.shadowRoot.innerHTML="")}customTemplateLoader;#m=!1;#a(){!this.#m&&this.#t&&(this.#m=!0,queueMicrotask(()=>{this.#m=!1;let e=this.getAttribute("ssr");if(this.#e&&this.disconnectedCallback(),this.#n){let t={page:"div",view:"x-view",text:"x-text",image:"x-image",list:"x-list",svg:"x-svg",input:"x-input",...this.overrideLynxTagToHTMLTagMap};this.shadowRoot||this.attachShadow({mode:"open"});let n=this.lynxGroupId,l=this.threadStrategy??"all-on-ui",s=(0,a.P)({threadStrategy:l,tagMap:t,shadowRoot:this.shadowRoot,templateUrl:this.#n,globalProps:this.#i,initData:this.#l,nativeModulesMap:this.#c,napiModulesMap:this.#h,lynxGroupId:n,initI18nResources:this.#s,callbacks:{nativeModulesCall:(...e)=>this.onNativeModulesCall?this.onNativeModulesCall(...e):new Promise(t=>{this.#o.push({args:e,resolve:t})}),napiModulesCall:(...e)=>this.onNapiModulesCall?.(...e),onError:(e,t,n)=>{this.dispatchEvent(new CustomEvent("error",{detail:{sourceMap:{offset:{line:2,col:0}},error:e,release:t,fileName:n}}))},customTemplateLoader:this.customTemplateLoader},ssr:e?JSON.parse(decodeURI(e)):void 0});if(this.#e=s,!e){let e=document.createElement("style");this.shadowRoot.append(e);let t=e.sheet;for(let e of i.OE)t.insertRule(e);for(let e of this.injectStyleRules)t.insertRule(e);"false"!==this.getAttribute("inject-head-links")&&document.head.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{let n=e.href;t.insertRule(`@import url("${n}");`)})}}}))}connectedCallback(){this.#t=!0,this.#a()}}customElements.get(s.tag)?console.warn(`[${s.tag}] has already been defined`):customElements.define(s.tag,s),t()}catch(e){t(e)}})},736:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{P:()=>s});var i=n(719),l=e([i]);i=(l.then?(await l)():l)[0];let r=window.devicePixelRatio,o=window.screen.availWidth*r,d=window.screen.availHeight*r;function s(e){let{shadowRoot:t,callbacks:n,templateUrl:a,globalProps:l,initData:s,nativeModulesMap:r,napiModulesMap:c,tagMap:h,lynxGroupId:u,threadStrategy:m="multi-thread",initI18nResources:p,ssr:v}=e;return(0,i.$)(a,{tagMap:h,initData:s,globalProps:l,nativeModulesMap:r,napiModulesMap:c,browserConfig:{pixelRatio:window.devicePixelRatio,pixelWidth:o,pixelHeight:d},initI18nResources:p},t,u,m,n,v)}a()}catch(e){a(e)}})},506:function(e,t,n){n.a(e,async function(e,t){try{var a=n(736),i=n(688),l=e([a,i]);[a,i]=l.then?(await l)():l,t()}catch(e){t(e)}})},778:function(e,t,n){n.d(t,{C:()=>r});var a=n(29);class i{port;name;incId=0;#p={};#v=new TextEncoder;#b=new TextDecoder;#g=new Map;constructor(e,t){this.port=e,this.name=t,e.onmessage=e=>this.#f(e.data)}get nextRetId(){return`ret_${this.name}_${this.incId++}`}static createRetEndpoint(e){return{name:e,hasReturn:!1,isSync:!1}}#f=async e=>{let t=this.#g.get(e.name);if(t){let n=e.sync?new Int32Array(e.lock):void 0,a=!e.sync&&e.retId?i.createRetEndpoint(e.retId):void 0;try{let i=await t(...e.data),l,s=[];if(e.sync?l=i:e.hasTransfer?{data:l,transfer:s}=i||{}:l=i,e.sync){if(e.buf){let t=JSON.stringify(l),n=new Uint32Array(e.buf,0,1),a=new Uint8Array(e.buf,4),i=new Uint8Array(e.buf.byteLength-4),{written:s}=this.#v.encodeInto(t,i);n[0]=s,a.set(i,0)}Atomics.store(n,0,1),Atomics.notify(n,0)}else e.retId&&this.invoke(a,[l,!1],s||[])}catch(t){console.error(t),e.sync?(Atomics.store(n,0,2),Atomics.notify(n,0),n[1]=2):this.invoke(a,[void 0,!0])}}else{let t=this.#p[e.name];t?t.push(e):this.#p[e.name]=[e]}};createCall(e){return(...t)=>this.invoke(e,t)}registerHandler(e,t){this.#g.set(e.name,t);let n=this.#p[e.name];if(n?.length)for(let t of(this.#p[e.name]=void 0,n))this.#f(t)}registerHandlerRef(e,t,n){this.registerHandler(e,(...e)=>t[n]?.call(t,...e))}registerHandlerLazy(e,t,n){if(t[n])this.registerHandlerRef(e,t,n);else{let a,i=this;Object.defineProperty(t,n,{get:()=>a,set(l){a=l,l&&i.registerHandlerRef(e,t,n)}})}}removeHandler(e){this.#g.delete(e.name)}invoke(e,t,n=[]){if(e.isSync){let a=e.bufferSize?new SharedArrayBuffer(e.bufferSize+4):void 0,i=new SharedArrayBuffer(4),l=new Int32Array(i);l[0]=0;let s={name:e.name,data:t,sync:!0,lock:i,buf:a};if(this.port.postMessage(s,{transfer:n}),Atomics.wait(l,0,0),2===l[0])throw null;if(!a)return;{let e=new Uint32Array(a,0,4)[0],t=new Uint8Array(a,4,e),n=new Uint8Array(e);return n.set(t,0),n?JSON.parse(this.#b.decode(n)):void 0}}if(e.hasReturn){let{promise:a,resolve:l,reject:s}=Promise.withResolvers(),r=i.createRetEndpoint(this.nextRetId);this.registerHandler(r,(e,t)=>{t&&s(),l(e)});let o={name:e.name,data:t,sync:!1,retId:r?.name,hasTransfer:e.hasReturnTransfer};return this.port.postMessage(o,{transfer:n}),a}{let a={name:e.name,data:t,sync:!1};this.port.postMessage(a,{transfer:n})}}createCallbackify(e,t){let n=this.createCall(e);return(...e)=>{let a=e.at(t);e.splice(t,1),n(...e).then(a)}}}let l=[],s=[];function r(e,t,n){var r,d,c;let h,u,m,p,v,b,g,f,y,E=(r=e,d=(y=t?{mainThreadRpc:new i((h=new MessageChannel).port1,"main-to-bg"),channelMainThreadWithBackground:h}:(u=new MessageChannel,m=new MessageChannel,p=o("lynx-main"),v={mode:"main",toUIThread:u.port2,toPeerThread:m.port1},p.postMessage(v,[u.port2,m.port1]),{mainThreadRpc:new i(u.port1,"ui-to-main"),mainThreadWorker:p,channelMainThreadWithBackground:m})).channelMainThreadWithBackground,c=n,g=new MessageChannel,r?(b=s[r]??o("lynx-bg"),s[r]=b):b=o("lynx-bg"),f={mode:"background",toUIThread:g.port2,toPeerThread:d.port2,systemInfo:{...a.c1,...c}},b.postMessage(f,[g.port2,d.port2]),{backgroundRpc:new i(g.port1,"ui-to-bg"),backgroundThreadWorker:b});return void 0!==e&&(l[e]?l[e]++:l[e]=1),{mainThreadRpc:y.mainThreadRpc,backgroundRpc:E.backgroundRpc,terminateWorkers:()=>{y.mainThreadWorker?.terminate(),void 0===e?E.backgroundThreadWorker.terminate():1===l[e]?(E.backgroundThreadWorker.terminate(),l[e]=0,s[e]=void 0):"number"==typeof l[e]&&l[e]>1&&l[e]--}}}function o(e){return new Worker(new URL(n.p+n.u("540"),n.b),Object.assign({},{type:"module",name:e},{type:void 0}))}},357:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{z:()=>o});var i=n(29),l=n(878),s=n(99);let{prepareMainThreadAPIs:e}=await n.e("361","high").then(n.bind(n,746));async function r(e){let t=document.createElement("iframe"),n=new Promise(e=>{let n=a=>{"lynx:mtsready"===a.data&&a.source===t.contentWindow&&(e(),globalThis.removeEventListener("message",n))};globalThis.addEventListener("message",n)});t.style.display="none",t.srcdoc='<!DOCTYPE html><html><head><script>parent.postMessage("lynx:mtsready","*")<\/script></head><body style="display:none"></body></html>',t.sandbox="allow-same-origin allow-scripts",t.loading="eager",e.appendChild(t),await n;let a=t.contentWindow,i=async e=>{let n=t.contentDocument.createElement("script");return n.fetchPriority="high",n.defer=!0,n.async=!1,t.contentDocument.head.appendChild(n),new Promise(async(t,i)=>{n.onload=()=>{let e=a?.module?.exports;a.module={exports:void 0},t(e)},n.onerror=t=>i(Error(`Failed to load script: ${e}`,{cause:t})),a.module={exports:void 0},n.src=e})};return{globalWindow:a,loadScript:i,loadScriptSync:e=>{let n=new XMLHttpRequest;if(n.open("GET",e,!1),n.send(null),200===n.status){let e=t.contentDocument.createElement("script");e.textContent=n.responseText,a.module={exports:void 0},t.contentDocument.head.appendChild(e);let i=a?.module?.exports;return a.module={exports:void 0},i}throw Error(`Failed to load script: ${e}`,{cause:n})}}}function o(t,n,a,o,d,c,h){globalThis.module||Object.assign(globalThis,{module:{}});let u=new i.gI,{exposureChangedCallback:m}=(0,s.e)(n),p=r(n),{startMainThread:v,handleUpdatedData:b}=e(t,n,document,p,m,o,d,(e,t,n)=>{c.onError?.(e,n,"lepus.js")},e=>{(0,l.D)(n,i.hv,e)},e=>(u.setData(e),u),a),g=async e=>{if(h){let t=[],a=n.querySelectorAll(`[${i.SP}]`),l=a.length;for(let e=0;e<l;e++){let n=a[e];t[Number(n.getAttribute(i.SP))]=new WeakRef(n)}let s=n.querySelector("style:nth-of-type(2)"),r=s?.sheet,o=[],d=r?.cssRules.length??0;for(let e=0;e<d;e++){let t=r?.cssRules[e];if(t?.constructor.name==="CSSStyleRule"){let n=parseFloat(t.selectorText.substring(i.SP.length+3));void 0===n||isNaN(n)||(o[n]=e)}}await v(e,{lynxUniqueIdToElement:t,lynxUniqueIdToStyleRulesIndex:o,...h,cardStyleElement:s})}else await v(e)},f=async(e,t)=>b(e,t);return{start:g,updateDataMainThread:f,updateI18nResourcesMainThread:e=>{u.setData(e)}}}a()}catch(e){a(e)}},1)},618:function(e,t,n){n.d(t,{k:()=>h});var a=n(29),i=n(334);let l={CreateElement:1,SetAttribute:2,RemoveAttribute:3,Append:4,Remove:5,ReplaceWith:6,InsertBefore:7,EnableEvent:8,RemoveChild:9,StyleDeclarationSetProperty:10,StyleDeclarationRemoveProperty:11,SetTextContent:12,sheetInsertRule:13,sheetRuleUpdateCssText:14};function s(){}let r=["detail","keyCode","charCode","elapsedTime","propertyName","pseudoElement","animationName","touches","targetTouches","changedTouches","x","y"],o=new Set(["isTrusted","target","currentTarget","type","bubbles","window","self","view","srcElement","eventPhase"]);var d=n(524),c=n(99);function h(e,t,n,h){(0,i.m)(e,"lepus.js",h.onError),function(e,t){let{shadowRoot:n}=t,{decodeOperation:i}=function(e){let{shadowRoot:t,onEvent:n}=e,a=new Set,i=[new WeakRef(t)],d=new WeakMap;function c(e){let t=i[e]?.deref();if(t)return t;throw Error(`[lynx-web] cannot find element with uniqueId: ${e}`)}function h(e){if(e.eventPhase!==Event.CAPTURING_PHASE&&e.currentTarget!==t)return;let a=e.target;if(a&&d.has(a)){let t=d.get(a),i=e.type,l={};for(let t of r)t in e&&(l[t]=function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||null==t)return t;if(t[Symbol.iterator])return[...t].map(e);if("object"==typeof t&&!(t instanceof EventTarget)){let n={};for(let a in t)o.has(a)||(n[a]=e(t[a]));return n}}(e[t]));n(i,t,e.bubbles,l)}}return{decodeOperation:function(e){let n;if(0===e.length)return;let r=0,{CreateElement:o,SetAttribute:u,RemoveAttribute:m,Append:p,Remove:v,ReplaceWith:b,InsertBefore:g,EnableEvent:f,RemoveChild:y,StyleDeclarationSetProperty:E,StyleDeclarationRemoveProperty:S,SetTextContent:w,sheetInsertRule:x,sheetRuleUpdateCssText:C}=l;for(;n=e[r++];){let l=e[r++];if(n===o){let t=document.createElement(e[r++]);i[l]=new WeakRef(t),d.set(t,l)}else{let i=c(l);switch(n){case u:{let t=e[r++],n=e[r++];i.setAttribute(t,n)}break;case m:i.removeAttribute(e[r++]);break;case p:{let t=e[r++];for(let n=0;n<t;n++){let t=c(e[r++]);i.appendChild(t)}}break;case v:i.remove();break;case b:{let t=e[r++],n=e.slice(r,r+t).map(e=>c(e));r+=t,i.replaceWith(...n)}break;case g:{let t=c(e[r++]),n=e[r++],a=n?c(n):null;i.insertBefore(t,a)}break;case f:let o=e[r++];i.addEventListener(o,s,{passive:!0}),a.has(o)||(t.addEventListener(o,h,{passive:!0,capture:!0}),a.add(o));break;case y:{let t=c(e[r++]);i.removeChild(t)}break;case E:i.style.setProperty(e[r++],e[r++],e[r++]);break;case S:i.style.removeProperty(e[r++]);break;case w:i.textContent=e[r++];break;case x:{let t=e[r++],n=e[r++];i.sheet.insertRule(n,t)}break;case C:{let t=e[r++];i.sheet.cssRules[t].style.cssText=e[r++]}}}}}}}({shadowRoot:n,onEvent:e.createCall(a.Zu)});e.registerHandler(a.E_,e=>{i(e)})}(e,{shadowRoot:t}),(0,d.c)(e,t),(0,c.g)(e,t),e.registerHandler(a.o3,n);let u=e.createCall(a.Hf);return{start:u,updateDataMainThread:e.createCall(a.Ve),updateI18nResourcesMainThread:e.createCall(a.k3)}}},218:function(e,t,n){n.d(t,{i:()=>i});var a=n(29);function i(e,t){return async()=>{await e.invoke(a.hh,[]),t()}}},99:function(e,t,n){function a(e,t,n){if(t){if((t=t.trim()).endsWith("px"))return Number(t.substring(0,t.length-2));if(t.endsWith("%")){let a=Number(t.substring(0,t.length-1)),{width:i,height:l}=e.getBoundingClientRect();return(n?i:l)*a/100}}return 0}n.d(t,{g:()=>r,e:()=>s});var i=n(29);let l=Symbol.for("lynx-scroll-container-dom");function s(e){let t=new WeakMap,n=new WeakMap,i=new WeakSet,s=(e,t,n)=>{let a=e.getAttribute("exposure-scene")??"",i={exposureID:n,exposureScene:a,"exposure-id":n,"exposure-scene":a},l=new CustomEvent(t?"uiappear":"uidisappear",{bubbles:!1,composed:!1,cancelable:!0,detail:i}),s=new CustomEvent(t?"exposure":"disexposure",{bubbles:!0,composed:!1,cancelable:!1,detail:i});Object.assign(l,i),e.dispatchEvent(l),e.dispatchEvent(s)},r=e=>{e.forEach(({target:e,isIntersecting:t})=>{t&&!i.has(e)?(s(e,!0,e.getAttribute("exposure-id")),i.add(e)):!t&&i.has(e)&&(s(e,!1,e.getAttribute("exposure-id")),i.delete(e))})};return{exposureChangedCallback:o=>{o.forEach(o=>{let d=n.get(o)??null,c=o.getAttribute("exposure-id");null!==d&&s(o,!1,d),n.set(o,c),t.get(o)?.disconnect(),t.delete(o),i.delete(o),null!==o.getAttribute("exposure-id")&&(n=>{let i=parseFloat(n.getAttribute("exposure-area")??"0")/100,s=a(n,n.getAttribute("exposure-screen-margin-top")),o=a(n,n.getAttribute("exposure-screen-margin-right")),d=a(n,n.getAttribute("exposure-screen-margin-bottom")),c=a(n,n.getAttribute("exposure-screen-margin-left")),h=a(n,n.getAttribute("exposure-ui-margin-top")),u=a(n,n.getAttribute("exposure-ui-margin-right")),m=a(n,n.getAttribute("exposure-ui-margin-bottom")),p=a(n,n.getAttribute("exposure-ui-margin-left")),v=n.parentElement;for(;v;)if(v[l]){v=v[l];break}else v=v.parentElement;let b=new IntersectionObserver(r,{rootMargin:`${(m?-1:1)*(s-m)}px ${(p?-1:1)*(o-p)}px ${(h?-1:1)*(d-h)}px ${(u?-1:1)*(c-u)}px`,root:v??e.parentElement,threshold:i});b.observe(n),t.set(n,b)})(o)})}}}function r(e,t){let{exposureChangedCallback:n}=s(t);e.registerHandler(i.gj,e=>{n(e.map(e=>t.querySelector(`[${i.SP}="${e}"]`)).filter(e=>null!==e))})}},682:function(e,t,n){n.d(t,{k:()=>a});function a(e){return(t,n,a)=>{e(t,{processorName:n}).then(()=>a?.())}}},524:function(e,t,n){n.d(t,{c:()=>l});var a=n(29),i=n(878);function l(e,t){e.registerHandler(a.gx,(e,n)=>{(0,i.D)(t,e,n)})}},334:function(e,t,n){n.d(t,{m:()=>i});var a=n(29);function i(e,t,n){e.registerHandler(a.o2,(e,a,i)=>{n?.(e,i,t)})}},555:function(e,t,n){n.d(t,{r:()=>o});var a=n(29);function i(e,t,n,i,l,s,r,o){let d,c=e;if(s){let t=e.querySelector(`[${a.SP}="${s}"]`);if(t)c=t;else{console.error(`[lynx-web] cannot find dom for root_unique_id: ${s}`),o?.(a.O4.NODE_NOT_FOUND);return}}else if(i){let t=e.querySelector(`[${a.pP}="${i}"]`);if(t)c=t;else{console.error(`[lynx-web] cannot find dom for component_id: ${i}`),o?.(a.O4.NODE_NOT_FOUND);return}}if(t===a.Wx.ID_SELECTOR)d=n;else if(t===a.Wx.UNIQUE_ID)d=`[${a.SP}="${n}"]`;else{console.error(`[lynx-web] NYI: setnativeprops type ${t}`),o?.(a.O4.UNKNOWN);return}if(l){let e=null;try{e=c.querySelector(d)}catch(e){console.error(`[lynx-web] cannot use selector: ${d}`),o?.(a.O4.SELECTOR_NOT_SUPPORTED);return}e?r(e):(console.error(`[lynx-web] cannot find from for selector ${n} under`,c),o?.(a.O4.NODE_NOT_FOUND))}else c.querySelectorAll(d).forEach(e=>{r(e)})}let l={boundingClientRect:e=>{let t=e.getBoundingClientRect();return{id:e.id,width:t.width,height:t.height,left:t.left,right:t.right,top:t.top,bottom:t.bottom}}};var s=n(524),r=n(334);function o(e,t,n){var o,d;let c,h,u,m,p;c=a.O4.UNKNOWN,e.registerHandler(a.zk,(e,n,s,r,o,d)=>(i(t,e,n,s,!0,d,e=>{try{let t=l[r],n="function"==typeof e[r];t||n?(h=t?t(e,o):e[r](o),c=a.O4.SUCCESS):c=a.O4.METHOD_NOT_FOUND}catch(t){console.error("[lynx-web] invokeUIMethod: apply method failed with",t,e),c=a.O4.PARAM_INVALID}},e=>{c=e}),{code:c,data:h})),e.registerHandler(a.PC,(e,n,a,l,s,r)=>{i(t,e,n,a,l,r,e=>{var t=e;for(let e in s){let n=s[e];"text"===e&&t?.tagName==="X-TEXT"&&t.firstElementChild&&"RAW-TEXT"==t.firstElementChild.tagName&&(t=t.firstElementChild),CSS.supports(e,n)&&t.style?t.style.setProperty(e,n):t.setAttribute(e,n)}})}),e.registerHandler(a.pT,(e,n)=>{let i=t.querySelector(`[${a.pP}="${n.componentId}"]`);i?.dispatchEvent(new CustomEvent(e,{...n.eventOption,detail:n.eventDetail}))}),e.registerHandler(a.vr,(e,n,l)=>(i(t,a.Wx.ID_SELECTOR,n,"card"===e?"0":e,l,void 0,e=>{u=e}),[u?.getAttribute(a.pP)??void 0])),o=n.nativeModulesCall,e.registerHandler(a.g,o),d=n.napiModulesCall,m=e.createCall(a.Sy),e.registerHandler(a.VK,(e,t,n)=>d(e,t,n,m)),e.registerHandler(a.ZU,(e,n,l,s,r)=>{let o,d=a.O4.UNKNOWN;return i(t,e,n,l,s,r,e=>{try{let n=[],i=e;for(;i;){let e=i.parentElement,l=e??t,s=Array.from(l.children),r=i.getAttribute(a.Gq),o="page"===r?0:s.indexOf(i),d=i.getAttribute("id")||void 0,c=i.getAttribute("class")||void 0,h=i.getAttribute(a.C6),u=h?JSON.parse(decodeURIComponent(h)):void 0;if(n.push({tag:r,id:d,class:c,dataSet:u,index:o}),"page"===r||i.parentNode===t)break;i=e}o={path:n},d=a.O4.SUCCESS}catch(t){console.error("[lynx-web] getPathInfo: failed with",t,e),d=a.O4.UNKNOWN}},e=>{d=e}),{code:d,data:o}}),(0,s.c)(e,t),p=new Map,e.registerHandler(a.vn,(e,n,i)=>{if("animate"===e)switch(i.operation){case a.Uc.START:p.set(i.id,t.querySelector(n)?.animate(i.keyframes,i.timingOptions));break;case a.Uc.PLAY:p.get(i.id)?.play();break;case a.Uc.PAUSE:p.get(i.id)?.pause();break;case a.Uc.CANCEL:p.get(i.id)?.cancel();break;case a.Uc.FINISH:p.get(i.id)?.finish()}}),(0,r.m)(e,"app-service.js",n.onError);let v=e.createCall(a.hO);return{sendGlobalEvent:v,markTiming:e.createCall(a.PM),updateI18nResourceBackground:(t,n)=>{let i=t.find(e=>(0,a.HO)(e.options)===(0,a.HO)(n));e.invoke(a.BE,[i?.resource])}}}},719:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{$:()=>m});var i=n(778),l=n(218),s=n(29),r=n(32),o=n(682),d=n(555),c=n(618),h=n(357),u=e([h]);function m(e,t,n,a,u,m,p){let v=performance.now()+performance.timeOrigin,b="all-on-ui"===u,{mainThreadRpc:g,backgroundRpc:f,terminateWorkers:y}=(0,i.C)(a,b,t.browserConfig),{markTiming:E,sendGlobalEvent:S,updateI18nResourceBackground:w}=(0,d.r)(f,n,m),x={records:[],timeout:null},C=(e,t,n)=>{(0,s.M$)({timingKey:e,pipelineId:t,timeStamp:n,markTiming:E,cacheMarkTimings:x})},T=()=>(0,s.qz)(E,x),O=(0,r._)(m.customTemplateLoader,C),{start:I,updateDataMainThread:L,updateI18nResourcesMainThread:k}=b?(0,h.z)(g,n,O,C,T,m,p):(0,c.k)(g,n,O,m);return C("create_lynx_start",void 0,v),O(e).then(e=>{T(),I({...t,template:e})}),{updateData:(0,o.k)(L),dispose:(0,l.i)(f,y),sendGlobalEvent:S,updateGlobalProps:f.createCall(s.yn),updateI18nResources:(...e)=>{k(e[0]),w(...e)}}}h=(u.then?(await u)():u)[0],a()}catch(e){a(e)}})},878:function(e,t,n){n.d(t,{D:()=>a});let a=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0,composed:!0}))}},32:function(e,t,n){n.d(t,{_:()=>s});var a=n(29);let i=new Map;function l(e){return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}function s(e,t){return async n=>{t("load_template_start");let s=i.get(n);if(s)return t("load_template_end"),s;{let s=new Promise(async(t,s)=>{try{let i=e?await e(n):await (await fetch(n,{method:"GET"})).json(),s=await (0,a.Yx)(i,l,encodeURIComponent(n));t(s)}catch(e){i.delete(n),s(e)}});return i.set(n,s),t("load_template_end"),s}}}},12:function(){var e,t,n,a;let i,l,s,r,o,d,c,h,u,m,p,v,b,g,f,y,E,S,w,x,C,T,O,I,L,k,A,P,_,M,R,N,D,F,H,j,z,U,W,V,$,B,X,q,Y,G,J,K,Z,Q,ee,et,en,ea,ei,el,es,er,eo,ed,ec,eh,eu,em,ep,ev,eb,eg,ef,ey,eE,eS,ew,ex,eC,eT,eO,eI,eL,ek,eA,eP,e_,eM,eR,eN,eD,eF,eH,ej,ez,eU,eW,eV,e$,eB,eX,eq,eY,eG,eJ,eK,eZ,eQ,e0,e1,e2,e3,e8,e4,e6,e9,e5,e7,te,tt,tn,ta,ti,tl,ts,tr,to,td,tc,th,tu,tm,tp,tv,tb,tg,tf,ty,tE,tS,tw,tx,tC,tT,tO,tI,tL,tk,tA,tP,t_,tM,tR,tN,tD,tF,tH,tj,tz,tU,tW,tV,t$,tB,tX,tq,tY,tG,tJ,tK,tZ,tQ,t0,t1,t2,t3,t8,t4,t6,t9,t5,t7,ne,nt,nn,na,ni,nl,ns,nr,no,nd,nc,nh,nu,nm,np,nv,nb,ng,nf,ny,nE,nS,nw,nx,nC,nT,nO,nI,nL,nk,nA,nP,n_,nM,nR,nN,nD,nF,nH,nj,nz,nU,nW,nV,n$,nB,nX,nq,nY,nG,nJ,nK,nZ,nQ,n0,n1,n2,n3,n8,n4,n6,n9,n5,n7,ae,at,an,aa,ai,al,as,ar,ao,ad,ac,ah,au,am,ap,av,ab,ag,af,ay,aE,aS,aw,ax,aC,aT,aO,aI,aL,ak,aA,aP,a_,aM,aR,aN,aD,aF,aH,aj,az,aU,aW,aV,a$,aB,aX,aq,aY,aG,aJ,aK,aZ,aQ,a0,a1,a2,a3,a8,a4,a6,a9,a5,a7,ie,it,ia,ii,il,is,ir,io,id,ic,ih,iu,im,ip,iv,ib,ig,iy,iE,iS,iw,ix,iC,iT,iO,iI,iL,ik,iA,iP,i_,iM,iR,iN,iD,iF,iH,ij,iz,iU,iW,iV,i$,iB,iX,iq,iY,iG,iJ,iK,iZ,iQ,i0,i1,i2,i3,i8,i4,i6,i9,i5,i7,le,lt,ln,la,li,ll,ls,lr,lo,ld,lc,lh,lu,lm,lp,lv,lb,lg,lf,ly,lE,lS,lw,lx,lC,lT,lO,lI,lL,lk,lA,lP,l_,lM,lR,lN,lD,lF,lH,lj,lz,lU,lW,lV,l$,lB,lX,lq,lY,lG,lJ,lK,lZ,lQ,l0,l1,l2,l3,l8;function l4(e,t,n,a,i,l){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var r,o=a.kind,d="getter"===o?"get":"setter"===o?"set":"value",c=!t&&e?a.static?e:e.prototype:null,h=t||(c?Object.getOwnPropertyDescriptor(c,a.name):{}),u=!1,m=n.length-1;m>=0;m--){var p={};for(var v in a)p[v]="access"===v?{}:a[v];for(var v in a.access)p.access[v]=a.access[v];p.addInitializer=function(e){if(u)throw TypeError("Cannot add initializers after decoration has completed");l.push(s(e||null))};var b=(0,n[m])("accessor"===o?{get:h.get,set:h.set}:h[d],p);if("accessor"===o){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(r=s(b.get))&&(h.get=r),(r=s(b.set))&&(h.set=r),(r=s(b.init))&&i.unshift(r)}else(r=s(b))&&("field"===o?i.unshift(r):h[d]=r)}c&&Object.defineProperty(c,a.name,h),u=!0}function l6(e,t,n){for(var a=arguments.length>2,i=0;i<t.length;i++)n=a?t[i].call(e,n):t[i].call(e);return a?n:void 0}function l9(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}let l5=[];function l7(){let e=l5;for(let[t,n]of(l5=[],e))n?t.call(n):t()}function se(e,t){0===l5.length&&queueMicrotask(l7),l5.push([e,t])}function st(e,t,n){let a;return(i,{addInitializer:l})=>{let s=new Set([...t.filter(e=>e.observedCSSProperties).map(e=>e.observedCSSProperties).reduce((e,t)=>e.concat(t),[])]);class r extends i{static registerPlugin(e){if(r.observedAttributes.push(...e.observedAttributes),e.observedCSSProperties)for(let t of e.observedCSSProperties)s.add(t);t.push(e)}static observedAttributes=[...i.observedAttributes??[],...t.map(e=>e.observedAttributes).reduce((e,t)=>e.concat(t),[]),"class"];#y=[];constructor(){if(super(),n&&!a&&((a=document.createElement("template")).innerHTML=n,document.body.appendChild(a)),a&&!this.shadowRoot){const e=this.attachShadow({mode:"open",delegatesFocus:!0}),t=a.content.cloneNode(!0);e.append(t)}this.#y=t.map(e=>new e(this)),this.#E()}#S=!1;#w=new Map;#x(){!this.#S&&s.size&&(this.#S=!0,se(this.#C,this))}#C(){let e=getComputedStyle(this);for(let n of s){var t;let a=e.getPropertyValue(n),i=e.getPropertyPriority(n),l=(t=a.trim(),i?t+" !important":t);if(this.#w.get(n)!==l)for(let e of this.#y)e.cssPropertyChangedHandler?.[n]?.call(e,l,n)}this.#S=!1}setAttribute(e,t){"false"!==t.toString()||i.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")?super.setAttribute(e,t):this.removeAttribute(e)}#E(){let e=this.attributes;for(let t=0,n;n=e.item(t);t++)"false"!==n.value||i.notToFilterFalseAttributes?.has(n.name)||n.name.startsWith("data-")||this.removeAttributeNode(n)}#t=!1;attributeChangedCallback(e,t,n){if(super.attributeChangedCallback&&super.attributeChangedCallback(e,t,n),i.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")||("false"===t&&(t=null),"false"===n&&(n=null,this.removeAttribute(e))),t!==n){for(let a of(this.#t&&("class"===e||"style"===e)&&this.#x(),this.#y))if(a.attributeChangedHandler?.[e]){let{handler:i,noDomMeasure:l}=a.attributeChangedHandler[e];l?i.call(a,n,t,e):this.#t&&se(()=>i.call(a,n,t,e))}}}#T(){this.getAttributeNames().forEach(e=>{for(let t of this.#y)if(t.attributeChangedHandler?.[e]){let{handler:n,noDomMeasure:a}=t.attributeChangedHandler[e];a||se(()=>n.call(t,this.getAttribute(e),null,e))}})}connectedCallback(){super.connectedCallback?.(),this.#y.forEach(e=>{e.connectedCallback?.()}),this.#x(),se(this.#T,this),this.#t=!0}disconnectedCallback(){super.disconnectedCallback?.(),this.#y.forEach(e=>{e.dispose?.()})}#O={};addEventListener(e,t,n){super.addEventListener(e,t,n),this.#O[e]??={count:0,listenerCount:new WeakMap,captureListenerCount:new WeakMap};let a=this.#O[e],i=("object"==typeof n?n.capture:n)?a.captureListenerCount:a.listenerCount,l=i.get(t)??0;if(i.set(t,l+1),0===a.count)for(let t of this.#y){let n=t.eventStatusChangedHandler?.[e];n&&n.call(t,!0,e)}a.count++}removeEventListener(e,t,n){super.removeEventListener(e,t,n);let a="object"==typeof n?n.capture:n,i=this.#O[e];if(i&&i.count>0&&1===(a?i?.captureListenerCount:i?.listenerCount).get(t)&&(i.listenerCount.delete(t),i.count--,0===i.count))for(let t of this.#y){let n=t.eventStatusChangedHandler?.[e];n&&n.call(t,!1,e)}}}return l(()=>{customElements.define(e,r)}),r}}s=[st("lynx-wrapper",[])],r=[],o=HTMLElement,class extends o{static{l=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;l4(null,i={value:l},s,{kind:"class",name:l.name,metadata:e},null,r),l=i.value,e&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),l6(l,r)}};let sn={bubbles:!1,composed:!1,cancelable:!0};function sa(e,t){return function(n,...a){return function(i,l){if("method"===l.kind)l.addInitializer(function(){this[e]??={},this[e][n]=t(i,a)});else if("field"===l.kind)return function(i){return this[e]??={},this[e][n]=t(i,a),i};else throw Error(`[lynx-web-components] decorator type ${l.kind} is not supported`)}}}let si=sa("eventStatusChangedHandler",e=>e),sl=Symbol("layoutChangeTarget"),ss=(d=[],c=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l4(null,null,[si("layoutchange")],{kind:"field",name:"__handleScrollUpperThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"__handleScrollUpperThresholdEventEnabled"in e,get:e=>e.__handleScrollUpperThresholdEventEnabled,set:(e,t)=>{e.__handleScrollUpperThresholdEventEnabled=t}},metadata:e},d,c),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#I;constructor(e){l6(this,c),this.#I=e}#L=!1;#k;__handleScrollUpperThresholdEventEnabled=l6(this,d,e=>{e&&this.#I[sl]?!this.#k&&(this.#k=new ResizeObserver(([e])=>{if(e){let t=this.#I.id,{top:n,bottom:a,left:i,right:l,width:s,height:r}=e.target.getBoundingClientRect();this.#I.dispatchEvent(new CustomEvent("layoutchange",{detail:{width:s,height:r,left:i,right:l,top:n,bottom:a,id:t},...sn}))}}),this.#L||(this.#k.observe(this.#I[sl]),this.#L=!0)):this.#k?.disconnect()});#A(){this.#k?.disconnect()}}),sr=sa("attributeChangedHandler",(e,[t])=>({handler:e,noDomMeasure:t})),so=sa("cssPropertyChangedHandler",e=>e);function sd(e,t){let n,a;return()=>(a||(a=e()),a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&n||(n=a.querySelector(t)),n)}function sc(e,t,n,a){return function(i){i?(n&&(i=n(i)),se(()=>e.call(this).style.setProperty(t,i,a?"important":void 0))):se(()=>e.call(this).style.removeProperty(t))}}let sh=(p=[],v=[],b=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;h=[sr("fading-edge-length",!0)],u=[so("background"),so("background-color")],l4(this,m={value:l9(function(e){this.#P().style.setProperty("--scroll-view-bg-color",e),this.#_().style.setProperty("--scroll-view-bg-color",e)},"#backgroundColorToVariable")},u,{kind:"method",name:"#backgroundColorToVariable",static:!1,private:!0,access:{has:e=>#M in e,get:e=>e.#M},metadata:e},null,p),l4(null,null,h,{kind:"field",name:"#handleFadingEdgeLength",static:!1,private:!0,access:{has:e=>#R in e,get:e=>e.#R,set:(e,t)=>{e.#R=t}},metadata:e},v,b),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I=l6(this,p);#P=sd(()=>this.#I.shadowRoot,"#top-fade-mask");#_=sd(()=>this.#I.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){l6(this,b),this.#I=e}#R=l6(this,v,sc(()=>this.#I,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));get #M(){return m.value}connectedCallback(){}dispose(){}}),su=(S=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;g=[sr("scroll-top",!1),sr("scroll-left",!1),sr("initial-scroll-offset",!1)],y=[sr("scroll-to-index",!1),sr("initial-scroll-to-index",!1)],l4(this,f={value:l9(function(e,t,n){if(e){let t=parseFloat(e),a=this.#I.getAttribute("scroll-orientation"),i=this.#I.getAttribute("scroll-y"),l=this.#I.getAttribute("scroll-x"),s=("scroll-top"===n||"initial-scroll-offset"===n)&&(""===i||"true"===i||"vertical"===a||"both"===a),r=("scroll-left"===n||"initial-scroll-offset"===n)&&(""===l||"true"===l||"vertical"===a||"both"===a);requestAnimationFrame(()=>{s&&this.#I.scrollTo(0,t),r&&(this.#I.scrollLeft=t)})}},"#handleInitialScrollOffset")},g,{kind:"method",name:"#handleInitialScrollOffset",static:!1,private:!0,access:{has:e=>#N in e,get:e=>e.#N},metadata:e},null,S),l4(this,E={value:l9(function(e){if(e){let t=parseFloat(e),n=this.#I.children.item(t);if(n&&n instanceof HTMLElement){let e=null!==this.#I.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#I.scrollLeft=n.offsetLeft:this.#I.scrollTop=n.offsetTop})}}},"#handleInitialScrollIndex")},y,{kind:"method",name:"#handleInitialScrollIndex",static:!1,private:!0,access:{has:e=>#D in e,get:e=>e.#D},metadata:e},null,S),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I=l6(this,S);static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){this.#I=e}get #N(){return f.value}get #D(){return E.value}dispose(){}});function sm(e,t,n){let a;return i=>{null!==i?a||(a=new IntersectionObserver(n,{root:e()})).observe(t()):a&&(a.disconnect(),a=void 0)}}let sp="onscrollend"in document,sv=window.navigator.userAgent;sv.includes("Chrome"),/\b(iPad|iPhone|iPod|OS X)\b/.test(sv)&&!/Edge/.test(sv)&&/WebKit/.test(sv)&&window.MSStream;let sb=Symbol.for("lynx-scroll-container-dom"),sg=(L=[],k=[],A=[],P=[],_=[],M=[],R=[],N=[],D=[],F=[],H=[],j=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;w=[si("scrolltoupper")],x=[si("scrolltolower")],C=[sr("upper-threshold",!0)],T=[sr("lower-threshold",!0)],O=[si("lynxscroll")],I=[si("lynxscrollend")],l4(null,null,w,{kind:"field",name:"#handleScrollUpperThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#F in e,get:e=>e.#F,set:(e,t)=>{e.#F=t}},metadata:e},L,k),l4(null,null,x,{kind:"field",name:"#handleScrollLowerThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#H in e,get:e=>e.#H,set:(e,t)=>{e.#H=t}},metadata:e},A,P),l4(null,null,C,{kind:"field",name:"#updateUpperThreshold",static:!1,private:!0,access:{has:e=>#j in e,get:e=>e.#j,set:(e,t)=>{e.#j=t}},metadata:e},_,M),l4(null,null,T,{kind:"field",name:"#updateLowerThreshold",static:!1,private:!0,access:{has:e=>#z in e,get:e=>e.#z,set:(e,t)=>{e.#z=t}},metadata:e},R,N),l4(null,null,O,{kind:"field",name:"#handleScrollEventEnabled",static:!1,private:!0,access:{has:e=>#U in e,get:e=>e.#U,set:(e,t)=>{e.#U=t}},metadata:e},D,F),l4(null,null,I,{kind:"field",name:"#handleScrollEndEventEnabled",static:!1,private:!0,access:{has:e=>#W in e,get:e=>e.#W,set:(e,t)=>{e.#W=t}},metadata:e},H,j),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I;#V;#$=0;#B=0;constructor(e){l6(this,j),this.#I=e}#X=()=>this.#I;#q=sd(()=>this.#I.shadowRoot,"#upper-threshold-observer");#Y=sd(()=>this.#I.shadowRoot,"#lower-threshold-observer");#G=e=>{let{isIntersecting:t,target:n}=e[0],a=n.id;t&&("upper-threshold-observer"===a?this.#I.dispatchEvent(new CustomEvent("scrolltoupper",{...sn,detail:this.#J()})):"lower-threshold-observer"===a&&this.#I.dispatchEvent(new CustomEvent("scrolltolower",{...sn,detail:this.#J()})))};static observedAttributes=["upper-threshold","lower-threshold"];#F=l6(this,L,e=>{e?this.#I.setAttribute("x-enable-scrolltoupper-event",""):this.#I.removeAttribute("x-enable-scrolltoupper-event"),this.#K(e)});#K=(l6(this,k),sm(this.#X,this.#q,this.#G));#H=l6(this,A,e=>{e?this.#I.setAttribute("x-enable-scrolltolower-event",""):this.#I.removeAttribute("x-enable-scrolltolower-event"),this.#Z(e)});#Z=(l6(this,P),sm(this.#X,this.#Y,this.#G));#j=l6(this,_,sc(this.#q,"flex-basis",e=>`${parseInt(e)}px`));#z=(l6(this,M),l6(this,R,sc(this.#Y,"flex-basis",e=>`${parseInt(e)}px`)));#J(){let{scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:a}=this.#X();0===e&&(e-=this.#I.scrollHeight/2-this.#I.scrollTop),0===t&&(t-=this.#I.scrollWidth/2-this.#I.scrollLeft);let i={scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:a,isDragging:!1,deltaX:t-this.#$,deltaY:e-this.#B};return this.#$=t,this.#B=e,i}#Q=(l6(this,N),()=>{this.#ee&&!sp&&(clearTimeout(this.#V),this.#V=setTimeout(()=>{this.#et()},100)),this.#I.dispatchEvent(new CustomEvent("lynxscroll",{...sn,detail:this.#J()}))});#et=()=>{this.#I.dispatchEvent(new CustomEvent("lynxscrollend",{...sn,detail:this.#J()}))};#en=!1;#U=l6(this,D,e=>{this.#en=e,this.#ea()});#ee=(l6(this,F),!1);#W=l6(this,H,e=>{this.#ee=e,this.#ea()});#ea(){this.#en||this.#ee?(this.#X().addEventListener("scroll",this.#Q),this.#X().addEventListener("scrollend",this.#et),this.#I.addEventListener("scroll",this.#Q),this.#I.addEventListener("scrollend",this.#et),this.#$=0,this.#B=0):(this.#I.removeEventListener("scroll",this.#Q),this.#I.removeEventListener("scrollend",this.#et))}connectedCallback(){}dispose(){}});class sf{static eventName="__scrollIntoView";static observedAttributes=[];#I;#ei=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),n=[],a=this.#I;for(let e of t){if(e===a)break;n.push(e)}let i=this.#I.getAttribute("scroll-orientation"),l=null!==this.#I.getAttribute("scroll-x")||"both"===i||"horizontal"===i,s=null!==this.#I.getAttribute("scroll-y")||"both"===i||"vertical"===i,r=0,o=0;for(let{offsetTop:e,offsetLeft:t}of n)l&&(o+=t),s&&(r+=e);if(l)switch(e.detail.inline){case"center":o+=(e.target.clientWidth-this.#I.clientWidth)/2;break;case"end":o+=e.target.clientWidth-this.#I.clientWidth}if(s)switch(e.detail.block){case"center":r+=(e.target.clientHeight-this.#I.clientHeight)/2;break;case"end":r+=e.target.clientHeight-this.#I.clientHeight}a.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:o,top:r})};constructor(e){this.#I=e,this.#I.addEventListener(sf.eventName,this.#ei,{passive:!1})}dispose(){this.#I.removeEventListener(sf.eventName,this.#ei)}}let sy=/<\s*script/g,sE=e=>{let{src:t}=e;if(t&&sy.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" loading="lazy" id="img" ${t?`src="${t}"`:""}/> `},sS=`<style>
6
+ }`],v={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur",lynxinput:"input"},b={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus",input:"lynxinput"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus",input:"lynxinput"}},g={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function f(e,t,n=!0,a=!1,i){return{name:e,isSync:t,hasReturn:n,hasReturnTransfer:a,bufferSize:i}}let y=f("__postExposure",!1,!1),E=f("publicComponentEvent",!1,!1),S=f("publishEvent",!1,!1),w=f("postOffscreenEventEndpoint",!1,!1),x=f("switchExposureServiceEndpoint",!1,!1),C=f("mainThreadStart",!1,!1),T=f("updateData",!1,!0),O=f("sendGlobalEventEndpoint",!1,!1),I=f("dispose",!1,!0),L=f("start",!1,!0),k=f("reportError",!1,!1),A=f("flushElementTree",!1,!0),P=f("callLepusMethod",!1,!0),_=f("multiThreadExposureChangedEndpoint",!1,!1),M=f("__invokeUIMethod",!1,!0),R=f("__setNativeProps",!1,!0),N=f("__getPathInfo",!1,!0),D=f("nativeModulesCall",!1,!0),F=f("napiModulesCall",!1,!0,!0),H=f("getCustomSections",!1,!0),j=f("markTiming",!1,!1),z=f("postTimingFlags",!1,!1),U=f("__triggerComponentEvent",!1,!1),W=f("__selectComponent",!1,!0),V=f("dispatchLynxViewEvent",!1,!1),$=f("dispatchNapiModule",!1,!1),B=f("dispatchCoreContextOnBackground",!1,!1),X=f("dispatchJSContextOnMainThread",!1,!1),q=f("__triggerElementMethod",!1,!1),Y=f("updateGlobalProps",!1,!1),G=f("updateI18nResources",!1,!1),J=f("updateI18nResource",!1,!1),K=f("dispatchI18nResource",!1,!1),Z=f("queryComponent",!1,!0),Q=f("updateBTSTemplateCacheEndpoint",!1,!0),ee=f("loadTemplateMultiThread",!1,!0);(er=eh||(eh={}))[er.ID_SELECTOR=0]="ID_SELECTOR",er[er.REF_ID=1]="REF_ID",er[er.UNIQUE_ID=2]="UNIQUE_ID",(eo=eu||(eu={}))[eo.SUCCESS=0]="SUCCESS",eo[eo.UNKNOWN=1]="UNKNOWN",eo[eo.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",eo[eo.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",eo[eo.PARAM_INVALID=4]="PARAM_INVALID",eo[eo.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",eo[eo.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE",(ed=em||(em={}))[ed.UPDATE=0]="UPDATE",ed[ed.RESET=1]="RESET",(ec=ep||(ep={}))[ec.START=0]="START",ec[ec.PLAY=1]="PLAY",ec[ec.PAUSE=2]="PAUSE",ec[ec.CANCEL=3]="CANCEL",ec[ec.FINISH=4]="FINISH";let et=e=>`${e.locale}_${e.channel}_${e.fallback_url}`,en="i18nResourceMissed";class ea{data;constructor(e){this.data=e}setData(e){this.data=e}}class ei 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:n}=this._config;return t.invoke(n,[e]),3}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}let el=({timingKey:e,pipelineId:t,timeStamp:n,markTiming:a,cacheMarkTimings:i})=>{i.records.push({timingKey:e,pipelineId:t,timeStamp:n??performance.now()+performance.timeOrigin}),i.timeout||(i.timeout=setTimeout(()=>{a(i.records),i.records=[],i.timeout=null},500))},es=(e,t)=>{e(t.records),t.records=[],t.timeout&&(clearTimeout(t.timeout),t.timeout=null)};var er,eo,ed,ec,eh,eu,em,ep,ev=n(473)},473:function(e,t,n){n.d(t,{Y:()=>s});let a=["navigator","postMessage","window"],i=[e=>(e.appType=e.appType??(e.lepusCode.root.startsWith("(function (globDynamicComponentEntry")?"lazy":"card"),e.version=2,e.lepusCode=Object.fromEntries(Object.entries(e.lepusCode).filter(([e,t])=>"string"==typeof t)),e)];async function l(e,t,n,i,l){return Promise.all(Object.entries(e).filter(([e,t])=>"string"==typeof t).map(async([e,s])=>{let r;return[e,await t((r=`${l}/${e.replaceAll("/","_")}.js`,(n?"//# allFunctionsCalledOnLoad":"")+'\n(function() { "use strict"; const '+a.join("=void 0,")+"=void 0;\n"+("card"!==i?"module.exports=\n":"")+s+"\n})()\n//# sourceURL="+r),`${l}-${e.replaceAll("/","_")}.js`)]})).then(Object.fromEntries)}async function s(e,t,n){let a;if(e.version=e.version??1,e.version>2)throw Error("Unsupported template, please upgrade your web-platform dependencies");for(;e.version<2&&(a=i[e.version-1]);)e=a(e);return{...e,lepusCode:await l(e.lepusCode,t,!0,e.appType,n)}}},688:function(e,t,n){n.a(e,async function(e,t){try{var a=n(736),i=n(29),l=e([a]);a=(l.then?(await l)():l)[0];class s extends HTMLElement{static lynxViewCount=0;static tag="lynx-view";static observedAttributeAsProperties=["url","global-props","init-data"];static observedAttributes=s.observedAttributeAsProperties.map(e=>e.toLowerCase());#e;#t=!1;#n;get url(){return this.#n}set url(e){this.#n=e,this.#a()}#i={};get globalProps(){return this.#i}set globalProps(e){"string"==typeof e?this.#i=JSON.parse(e):this.#i=e}#l={};get initData(){return this.#l}set initData(e){"string"==typeof e?this.#l=JSON.parse(e):this.#l=e}#s=[];get initI18nResources(){return this.#s}set initI18nResources(e){"string"==typeof e?this.#s=JSON.parse(e):this.#s=e}updateI18nResources(e,t){this.#e?.updateI18nResources(e,t)}#r={page:"div"};get overrideLynxTagToHTMLTagMap(){return this.#r}set overrideLynxTagToHTMLTagMap(e){"string"==typeof e?this.#r=JSON.parse(e):this.#r=e}#o=[];#d;get onNativeModulesCall(){return this.#d}set onNativeModulesCall(e){for(let t of(this.#d=e,this.#o))t.resolve(e.apply(void 0,t.args));this.#o=[]}#c={};get nativeModulesMap(){return this.#c}set nativeModulesMap(e){this.#c=e}#h={};get napiModulesMap(){return this.#h}set napiModulesMap(e){this.#h=e}#u;get onNapiModulesCall(){return this.#u}set onNapiModulesCall(e){this.#u=(t,n,a,i)=>e(t,n,a,this,i)}get lynxGroupId(){return this.getAttribute("lynx-group-id")?Number(this.getAttribute("lynx-group-id")):void 0}set lynxGroupId(e){e?this.setAttribute("lynx-group-id",e.toString()):this.removeAttribute("lynx-group-id")}updateData(e,t,n){this.#e?.updateData(e,t,n)}updateGlobalProps(e){this.#e?.updateGlobalProps(e),this.globalProps=e}sendGlobalEvent(e,t){this.#e?.sendGlobalEvent(e,t)}reload(){this.removeAttribute("ssr"),this.#a()}setAttribute(e,t){"false"===t?this.removeAttribute(e):super.setAttribute(e,t)}attributeChangedCallback(e,t,n){if(t!==n)switch(e){case"url":this.#n=n;break;case"global-props":this.#i=JSON.parse(n);break;case"init-data":this.#l=JSON.parse(n)}}get threadStrategy(){return this.getAttribute("thread-strategy")}set threadStrategy(e){e?this.setAttribute("thread-strategy",e):this.removeAttribute("thread-strategy")}get injectHeadLinks(){return"false"!==this.getAttribute("inject-head-links")}set injectHeadLinks(e){e?this.setAttribute("inject-head-links","true"):this.removeAttribute("inject-head-links")}injectStyleRules=[];disconnectedCallback(){this.#e?.dispose(),this.#e=void 0,this.shadowRoot?.querySelector(`[${i.Gq}="page"]`)?.setAttribute(i.JA,""),this.shadowRoot&&(this.shadowRoot.innerHTML="")}customTemplateLoader;#m=!1;#a(){!this.#m&&this.#t&&(this.#m=!0,queueMicrotask(()=>{this.#m=!1;let e=this.getAttribute("ssr");if(this.#e&&this.disconnectedCallback(),this.#n){let t={page:"div",view:"x-view",text:"x-text",image:"x-image",list:"x-list",svg:"x-svg",input:"x-input","x-input-ng":"x-input",...this.overrideLynxTagToHTMLTagMap};this.shadowRoot||this.attachShadow({mode:"open"});let n=this.lynxGroupId,l=this.threadStrategy??"all-on-ui",s=(0,a.P)({threadStrategy:l,tagMap:t,shadowRoot:this.shadowRoot,templateUrl:this.#n,globalProps:this.#i,initData:this.#l,nativeModulesMap:this.#c,napiModulesMap:this.#h,lynxGroupId:n,initI18nResources:this.#s,callbacks:{nativeModulesCall:(...e)=>this.onNativeModulesCall?this.onNativeModulesCall(...e):new Promise(t=>{this.#o.push({args:e,resolve:t})}),napiModulesCall:(...e)=>this.onNapiModulesCall?.(...e),onError:(e,t,n)=>{this.dispatchEvent(new CustomEvent("error",{detail:{sourceMap:{offset:{line:2,col:0}},error:e,release:t,fileName:n}}))},customTemplateLoader:this.customTemplateLoader},ssr:e?JSON.parse(decodeURI(e)):void 0});if(this.#e=s,!e){let e=document.createElement("style");this.shadowRoot.append(e);let t=e.sheet;for(let e of i.OE)t.insertRule(e);for(let e of this.injectStyleRules)t.insertRule(e);"false"!==this.getAttribute("inject-head-links")&&document.head.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{let n=e.href;t.insertRule(`@import url("${n}");`)})}}}))}connectedCallback(){this.#t=!0,this.#a()}}customElements.get(s.tag)?console.warn(`[${s.tag}] has already been defined`):customElements.define(s.tag,s),t()}catch(e){t(e)}})},736:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{P:()=>s});var i=n(719),l=e([i]);i=(l.then?(await l)():l)[0];let r=window.devicePixelRatio,o=window.screen.availWidth*r,d=window.screen.availHeight*r;function s(e){let{shadowRoot:t,callbacks:n,templateUrl:a,globalProps:l,initData:s,nativeModulesMap:r,napiModulesMap:c,tagMap:h,lynxGroupId:u,threadStrategy:m="multi-thread",initI18nResources:p,ssr:v}=e;return(0,i.$)(a,{tagMap:h,initData:s,globalProps:l,nativeModulesMap:r,napiModulesMap:c,browserConfig:{pixelRatio:window.devicePixelRatio,pixelWidth:o,pixelHeight:d},initI18nResources:p},t,u,m,n,v)}a()}catch(e){a(e)}})},506:function(e,t,n){n.a(e,async function(e,t){try{var a=n(736),i=n(688),l=e([a,i]);[a,i]=l.then?(await l)():l,t()}catch(e){t(e)}})},778:function(e,t,n){n.d(t,{C:()=>r});var a=n(29);class i{port;name;incId=0;#p={};#v=new TextEncoder;#b=new TextDecoder;#g=new Map;constructor(e,t){this.port=e,this.name=t,e.onmessage=e=>this.#f(e.data)}get nextRetId(){return`ret_${this.name}_${this.incId++}`}static createRetEndpoint(e){return{name:e,hasReturn:!1,isSync:!1}}#f=async e=>{let t=this.#g.get(e.name);if(t){let n=e.sync?new Int32Array(e.lock):void 0,a=!e.sync&&e.retId?i.createRetEndpoint(e.retId):void 0;try{let i=await t(...e.data),l,s=[];if(e.sync?l=i:e.hasTransfer?{data:l,transfer:s}=i||{}:l=i,e.sync){if(e.buf){let t=JSON.stringify(l),n=new Uint32Array(e.buf,0,1),a=new Uint8Array(e.buf,4),i=new Uint8Array(e.buf.byteLength-4),{written:s}=this.#v.encodeInto(t,i);n[0]=s,a.set(i,0)}Atomics.store(n,0,1),Atomics.notify(n,0)}else e.retId&&this.invoke(a,[l,!1],s||[])}catch(t){console.error(t),e.sync?(Atomics.store(n,0,2),Atomics.notify(n,0),n[1]=2):this.invoke(a,[void 0,!0])}}else{let t=this.#p[e.name];t?t.push(e):this.#p[e.name]=[e]}};createCall(e){return(...t)=>this.invoke(e,t)}registerHandler(e,t){this.#g.set(e.name,t);let n=this.#p[e.name];if(n?.length)for(let t of(this.#p[e.name]=void 0,n))this.#f(t)}registerHandlerRef(e,t,n){this.registerHandler(e,(...e)=>t[n]?.call(t,...e))}registerHandlerLazy(e,t,n){if(t[n])this.registerHandlerRef(e,t,n);else{let a,i=this;Object.defineProperty(t,n,{get:()=>a,set(l){a=l,l&&i.registerHandlerRef(e,t,n)}})}}removeHandler(e){this.#g.delete(e.name)}invoke(e,t,n=[]){if(e.isSync){let a=e.bufferSize?new SharedArrayBuffer(e.bufferSize+4):void 0,i=new SharedArrayBuffer(4),l=new Int32Array(i);l[0]=0;let s={name:e.name,data:t,sync:!0,lock:i,buf:a};if(this.port.postMessage(s,{transfer:n}),Atomics.wait(l,0,0),2===l[0])throw null;if(!a)return;{let e=new Uint32Array(a,0,4)[0],t=new Uint8Array(a,4,e),n=new Uint8Array(e);return n.set(t,0),n?JSON.parse(this.#b.decode(n)):void 0}}if(e.hasReturn){let{promise:a,resolve:l,reject:s}=Promise.withResolvers(),r=i.createRetEndpoint(this.nextRetId);this.registerHandler(r,(e,t)=>{t&&s(),l(e)});let o={name:e.name,data:t,sync:!1,retId:r?.name,hasTransfer:e.hasReturnTransfer};return this.port.postMessage(o,{transfer:n}),a}{let a={name:e.name,data:t,sync:!1};this.port.postMessage(a,{transfer:n})}}createCallbackify(e,t){let n=this.createCall(e);return(...e)=>{let a=e.at(t);e.splice(t,1),n(...e).then(a)}}}let l=[],s=[];function r(e,t,n){var r,d,c;let h,u,m,p,v,b,g,f,y,E=(r=e,d=(y=t?{mainThreadRpc:new i((h=new MessageChannel).port1,"main-to-bg"),channelMainThreadWithBackground:h}:(u=new MessageChannel,m=new MessageChannel,p=o("lynx-main"),v={mode:"main",toUIThread:u.port2,toPeerThread:m.port1},p.postMessage(v,[u.port2,m.port1]),{mainThreadRpc:new i(u.port1,"ui-to-main"),mainThreadWorker:p,channelMainThreadWithBackground:m})).channelMainThreadWithBackground,c=n,g=new MessageChannel,r?(b=s[r]??o("lynx-bg"),s[r]=b):b=o("lynx-bg"),f={mode:"background",toUIThread:g.port2,toPeerThread:d.port2,systemInfo:{...a.c1,...c}},b.postMessage(f,[g.port2,d.port2]),{backgroundRpc:new i(g.port1,"ui-to-bg"),backgroundThreadWorker:b});return void 0!==e&&(l[e]?l[e]++:l[e]=1),{mainThreadRpc:y.mainThreadRpc,backgroundRpc:E.backgroundRpc,terminateWorkers:()=>{y.mainThreadWorker?.terminate(),void 0===e?E.backgroundThreadWorker.terminate():1===l[e]?(E.backgroundThreadWorker.terminate(),l[e]=0,s[e]=void 0):"number"==typeof l[e]&&l[e]>1&&l[e]--}}}function o(e){return new Worker(new URL(n.p+n.u("540"),n.b),Object.assign({},{type:"module",name:e},{type:void 0}))}},357:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{z:()=>o});var i=n(29),l=n(878),s=n(99);let{prepareMainThreadAPIs:e}=await n.e("361","high").then(n.bind(n,746));async function r(e){let t=document.createElement("iframe"),n=new Promise(e=>{let n=a=>{"lynx:mtsready"===a.data&&a.source===t.contentWindow&&(e(),globalThis.removeEventListener("message",n))};globalThis.addEventListener("message",n)});t.style.display="none",t.srcdoc='<!DOCTYPE html><html><head><script>parent.postMessage("lynx:mtsready","*")<\/script></head><body style="display:none"></body></html>',t.sandbox="allow-same-origin allow-scripts",t.loading="eager",e.appendChild(t),await n;let a=t.contentWindow,i=async e=>{let n=t.contentDocument.createElement("script");return n.fetchPriority="high",n.defer=!0,n.async=!1,t.contentDocument.head.appendChild(n),new Promise(async(t,i)=>{n.onload=()=>{let e=a?.module?.exports;a.module={exports:void 0},t(e)},n.onerror=t=>i(Error(`Failed to load script: ${e}`,{cause:t})),a.module={exports:void 0},n.src=e})};return{globalWindow:a,loadScript:i,loadScriptSync:e=>{let n=new XMLHttpRequest;if(n.open("GET",e,!1),n.send(null),200===n.status){let e=t.contentDocument.createElement("script");e.textContent=n.responseText,a.module={exports:void 0},t.contentDocument.head.appendChild(e);let i=a?.module?.exports;return a.module={exports:void 0},i}throw Error(`Failed to load script: ${e}`,{cause:n})}}}function o(t,n,a,o,d,c,h){globalThis.module||Object.assign(globalThis,{module:{}});let u=new i.gI,{exposureChangedCallback:m}=(0,s.e)(n),p=r(n),{startMainThread:v,handleUpdatedData:b}=e(t,n,document,p,m,o,d,(e,t,n)=>{c.onError?.(e,n,"lepus.js")},e=>{(0,l.D)(n,i.hv,e)},e=>(u.setData(e),u),a),g=async e=>{if(h){let t=[],a=n.querySelectorAll(`[${i.SP}]`),l=a.length;for(let e=0;e<l;e++){let n=a[e];t[Number(n.getAttribute(i.SP))]=new WeakRef(n)}let s=n.querySelector("style:nth-of-type(2)"),r=s?.sheet,o=[],d=r?.cssRules.length??0;for(let e=0;e<d;e++){let t=r?.cssRules[e];if(t?.constructor.name==="CSSStyleRule"){let n=parseFloat(t.selectorText.substring(i.SP.length+3));void 0===n||isNaN(n)||(o[n]=e)}}await v(e,{lynxUniqueIdToElement:t,lynxUniqueIdToStyleRulesIndex:o,...h,cardStyleElement:s})}else await v(e)},f=async(e,t)=>b(e,t);return{start:g,updateDataMainThread:f,updateI18nResourcesMainThread:e=>{u.setData(e)}}}a()}catch(e){a(e)}},1)},618:function(e,t,n){n.d(t,{k:()=>h});var a=n(29),i=n(334);let l={CreateElement:1,SetAttribute:2,RemoveAttribute:3,Append:4,Remove:5,ReplaceWith:6,InsertBefore:7,EnableEvent:8,RemoveChild:9,StyleDeclarationSetProperty:10,StyleDeclarationRemoveProperty:11,SetTextContent:12,sheetInsertRule:13,sheetRuleUpdateCssText:14};function s(){}let r=["detail","keyCode","charCode","elapsedTime","propertyName","pseudoElement","animationName","touches","targetTouches","changedTouches","x","y"],o=new Set(["isTrusted","target","currentTarget","type","bubbles","window","self","view","srcElement","eventPhase"]);var d=n(524),c=n(99);function h(e,t,n,h){(0,i.m)(e,"lepus.js",h.onError),function(e,t){let{shadowRoot:n}=t,{decodeOperation:i}=function(e){let{shadowRoot:t,onEvent:n}=e,a=new Set,i=[new WeakRef(t)],d=new WeakMap;function c(e){let t=i[e]?.deref();if(t)return t;throw Error(`[lynx-web] cannot find element with uniqueId: ${e}`)}function h(e){if(e.eventPhase!==Event.CAPTURING_PHASE&&e.currentTarget!==t)return;let a=e.target;if(a&&d.has(a)){let t=d.get(a),i=e.type,l={};for(let t of r)t in e&&(l[t]=function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||null==t)return t;if(t[Symbol.iterator])return[...t].map(e);if("object"==typeof t&&!(t instanceof EventTarget)){let n={};for(let a in t)o.has(a)||(n[a]=e(t[a]));return n}}(e[t]));n(i,t,e.bubbles,l)}}return{decodeOperation:function(e){let n;if(0===e.length)return;let r=0,{CreateElement:o,SetAttribute:u,RemoveAttribute:m,Append:p,Remove:v,ReplaceWith:b,InsertBefore:g,EnableEvent:f,RemoveChild:y,StyleDeclarationSetProperty:E,StyleDeclarationRemoveProperty:S,SetTextContent:w,sheetInsertRule:x,sheetRuleUpdateCssText:C}=l;for(;n=e[r++];){let l=e[r++];if(n===o){let t=document.createElement(e[r++]);i[l]=new WeakRef(t),d.set(t,l)}else{let i=c(l);switch(n){case u:{let t=e[r++],n=e[r++];i.setAttribute(t,n)}break;case m:i.removeAttribute(e[r++]);break;case p:{let t=e[r++];for(let n=0;n<t;n++){let t=c(e[r++]);i.appendChild(t)}}break;case v:i.remove();break;case b:{let t=e[r++],n=e.slice(r,r+t).map(e=>c(e));r+=t,i.replaceWith(...n)}break;case g:{let t=c(e[r++]),n=e[r++],a=n?c(n):null;i.insertBefore(t,a)}break;case f:let o=e[r++];i.addEventListener(o,s,{passive:!0}),a.has(o)||(t.addEventListener(o,h,{passive:!0,capture:!0}),a.add(o));break;case y:{let t=c(e[r++]);i.removeChild(t)}break;case E:i.style.setProperty(e[r++],e[r++],e[r++]);break;case S:i.style.removeProperty(e[r++]);break;case w:i.textContent=e[r++];break;case x:{let t=e[r++],n=e[r++];i.sheet.insertRule(n,t)}break;case C:{let t=e[r++];i.sheet.cssRules[t].style.cssText=e[r++]}}}}}}}({shadowRoot:n,onEvent:e.createCall(a.Zu)});e.registerHandler(a.E_,e=>{i(e)})}(e,{shadowRoot:t}),(0,d.c)(e,t),(0,c.g)(e,t),e.registerHandler(a.o3,n);let u=e.createCall(a.Hf);return{start:u,updateDataMainThread:e.createCall(a.Ve),updateI18nResourcesMainThread:e.createCall(a.k3)}}},218:function(e,t,n){n.d(t,{i:()=>i});var a=n(29);function i(e,t){return async()=>{await e.invoke(a.hh,[]),t()}}},99:function(e,t,n){function a(e,t,n){if(t){if((t=t.trim()).endsWith("px"))return Number(t.substring(0,t.length-2));if(t.endsWith("%")){let a=Number(t.substring(0,t.length-1)),{width:i,height:l}=e.getBoundingClientRect();return(n?i:l)*a/100}}return 0}n.d(t,{g:()=>r,e:()=>s});var i=n(29);let l=Symbol.for("lynx-scroll-container-dom");function s(e){let t=new WeakMap,n=new WeakMap,i=new WeakSet,s=(e,t,n)=>{let a=e.getAttribute("exposure-scene")??"",i={exposureID:n,exposureScene:a,"exposure-id":n,"exposure-scene":a},l=new CustomEvent(t?"uiappear":"uidisappear",{bubbles:!1,composed:!1,cancelable:!0,detail:i}),s=new CustomEvent(t?"exposure":"disexposure",{bubbles:!0,composed:!1,cancelable:!1,detail:i});Object.assign(l,i),e.dispatchEvent(l),e.dispatchEvent(s)},r=e=>{e.forEach(({target:e,isIntersecting:t})=>{t&&!i.has(e)?(s(e,!0,e.getAttribute("exposure-id")),i.add(e)):!t&&i.has(e)&&(s(e,!1,e.getAttribute("exposure-id")),i.delete(e))})};return{exposureChangedCallback:o=>{o.forEach(o=>{let d=n.get(o)??null,c=o.getAttribute("exposure-id");null!==d&&s(o,!1,d),n.set(o,c),t.get(o)?.disconnect(),t.delete(o),i.delete(o),null!==o.getAttribute("exposure-id")&&(n=>{let i=parseFloat(n.getAttribute("exposure-area")??"0")/100,s=a(n,n.getAttribute("exposure-screen-margin-top")),o=a(n,n.getAttribute("exposure-screen-margin-right")),d=a(n,n.getAttribute("exposure-screen-margin-bottom")),c=a(n,n.getAttribute("exposure-screen-margin-left")),h=a(n,n.getAttribute("exposure-ui-margin-top")),u=a(n,n.getAttribute("exposure-ui-margin-right")),m=a(n,n.getAttribute("exposure-ui-margin-bottom")),p=a(n,n.getAttribute("exposure-ui-margin-left")),v=n.parentElement;for(;v;)if(v[l]){v=v[l];break}else v=v.parentElement;let b=new IntersectionObserver(r,{rootMargin:`${(m?-1:1)*(s-m)}px ${(p?-1:1)*(o-p)}px ${(h?-1:1)*(d-h)}px ${(u?-1:1)*(c-u)}px`,root:v??e.parentElement,threshold:i});b.observe(n),t.set(n,b)})(o)})}}}function r(e,t){let{exposureChangedCallback:n}=s(t);e.registerHandler(i.gj,e=>{n(e.map(e=>t.querySelector(`[${i.SP}="${e}"]`)).filter(e=>null!==e))})}},682:function(e,t,n){n.d(t,{k:()=>a});function a(e){return(t,n,a)=>{e(t,{processorName:n}).then(()=>a?.())}}},524:function(e,t,n){n.d(t,{c:()=>l});var a=n(29),i=n(878);function l(e,t){e.registerHandler(a.gx,(e,n)=>{(0,i.D)(t,e,n)})}},334:function(e,t,n){n.d(t,{m:()=>i});var a=n(29);function i(e,t,n){e.registerHandler(a.o2,(e,a,i)=>{n?.(e,i,t)})}},555:function(e,t,n){n.d(t,{r:()=>o});var a=n(29);function i(e,t,n,i,l,s,r,o){let d,c=e;if(s){let t=e.querySelector(`[${a.SP}="${s}"]`);if(t)c=t;else{console.error(`[lynx-web] cannot find dom for root_unique_id: ${s}`),o?.(a.O4.NODE_NOT_FOUND);return}}else if(i){let t=e.querySelector(`[${a.pP}="${i}"]`);if(t)c=t;else{console.error(`[lynx-web] cannot find dom for component_id: ${i}`),o?.(a.O4.NODE_NOT_FOUND);return}}if(t===a.Wx.ID_SELECTOR)d=n;else if(t===a.Wx.UNIQUE_ID)d=`[${a.SP}="${n}"]`;else{console.error(`[lynx-web] NYI: setnativeprops type ${t}`),o?.(a.O4.UNKNOWN);return}if(l){let e=null;try{e=c.querySelector(d)}catch(e){console.error(`[lynx-web] cannot use selector: ${d}`),o?.(a.O4.SELECTOR_NOT_SUPPORTED);return}e?r(e):(console.error(`[lynx-web] cannot find from for selector ${n} under`,c),o?.(a.O4.NODE_NOT_FOUND))}else c.querySelectorAll(d).forEach(e=>{r(e)})}let l={boundingClientRect:e=>{let t=e.getBoundingClientRect();return{id:e.id,width:t.width,height:t.height,left:t.left,right:t.right,top:t.top,bottom:t.bottom}}};var s=n(524),r=n(334);function o(e,t,n){var o,d;let c,h,u,m,p;c=a.O4.UNKNOWN,e.registerHandler(a.zk,(e,n,s,r,o,d)=>(i(t,e,n,s,!0,d,e=>{try{let t=l[r],n="function"==typeof e[r];t||n?(h=t?t(e,o):e[r](o),c=a.O4.SUCCESS):c=a.O4.METHOD_NOT_FOUND}catch(t){console.error("[lynx-web] invokeUIMethod: apply method failed with",t,e),c=a.O4.PARAM_INVALID}},e=>{c=e}),{code:c,data:h})),e.registerHandler(a.PC,(e,n,a,l,s,r)=>{i(t,e,n,a,l,r,e=>{var t=e;for(let e in s){let n=s[e];"text"===e&&t?.tagName==="X-TEXT"&&t.firstElementChild&&"RAW-TEXT"==t.firstElementChild.tagName&&(t=t.firstElementChild),CSS.supports(e,n)&&t.style?t.style.setProperty(e,n):t.setAttribute(e,n)}})}),e.registerHandler(a.pT,(e,n)=>{let i=t.querySelector(`[${a.pP}="${n.componentId}"]`);i?.dispatchEvent(new CustomEvent(e,{...n.eventOption,detail:n.eventDetail}))}),e.registerHandler(a.vr,(e,n,l)=>(i(t,a.Wx.ID_SELECTOR,n,"card"===e?"0":e,l,void 0,e=>{u=e}),[u?.getAttribute(a.pP)??void 0])),o=n.nativeModulesCall,e.registerHandler(a.g,o),d=n.napiModulesCall,m=e.createCall(a.Sy),e.registerHandler(a.VK,(e,t,n)=>d(e,t,n,m)),e.registerHandler(a.ZU,(e,n,l,s,r)=>{let o,d=a.O4.UNKNOWN;return i(t,e,n,l,s,r,e=>{try{let n=[],i=e;for(;i;){let e=i.parentElement,l=e??t,s=Array.from(l.children),r=i.getAttribute(a.Gq),o="page"===r?0:s.indexOf(i),d=i.getAttribute("id")||void 0,c=i.getAttribute("class")||void 0,h=i.getAttribute(a.C6),u=h?JSON.parse(decodeURIComponent(h)):void 0;if(n.push({tag:r,id:d,class:c,dataSet:u,index:o}),"page"===r||i.parentNode===t)break;i=e}o={path:n},d=a.O4.SUCCESS}catch(t){console.error("[lynx-web] getPathInfo: failed with",t,e),d=a.O4.UNKNOWN}},e=>{d=e}),{code:d,data:o}}),(0,s.c)(e,t),p=new Map,e.registerHandler(a.vn,(e,n,i)=>{if("animate"===e)switch(i.operation){case a.Uc.START:p.set(i.id,t.querySelector(n)?.animate(i.keyframes,i.timingOptions));break;case a.Uc.PLAY:p.get(i.id)?.play();break;case a.Uc.PAUSE:p.get(i.id)?.pause();break;case a.Uc.CANCEL:p.get(i.id)?.cancel();break;case a.Uc.FINISH:p.get(i.id)?.finish()}}),(0,r.m)(e,"app-service.js",n.onError);let v=e.createCall(a.hO);return{sendGlobalEvent:v,markTiming:e.createCall(a.PM),updateI18nResourceBackground:(t,n)=>{let i=t.find(e=>(0,a.HO)(e.options)===(0,a.HO)(n));e.invoke(a.BE,[i?.resource])}}}},719:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{$:()=>m});var i=n(778),l=n(218),s=n(29),r=n(32),o=n(682),d=n(555),c=n(618),h=n(357),u=e([h]);function m(e,t,n,a,u,m,p){let v=performance.now()+performance.timeOrigin,b="all-on-ui"===u,{mainThreadRpc:g,backgroundRpc:f,terminateWorkers:y}=(0,i.C)(a,b,t.browserConfig),{markTiming:E,sendGlobalEvent:S,updateI18nResourceBackground:w}=(0,d.r)(f,n,m),x={records:[],timeout:null},C=(e,t,n)=>{(0,s.M$)({timingKey:e,pipelineId:t,timeStamp:n,markTiming:E,cacheMarkTimings:x})},T=()=>(0,s.qz)(E,x),O=(0,r._)(m.customTemplateLoader,C),{start:I,updateDataMainThread:L,updateI18nResourcesMainThread:k}=b?(0,h.z)(g,n,O,C,T,m,p):(0,c.k)(g,n,O,m);return C("create_lynx_start",void 0,v),O(e).then(e=>{T(),I({...t,template:e})}),{updateData:(0,o.k)(L),dispose:(0,l.i)(f,y),sendGlobalEvent:S,updateGlobalProps:f.createCall(s.yn),updateI18nResources:(...e)=>{k(e[0]),w(...e)}}}h=(u.then?(await u)():u)[0],a()}catch(e){a(e)}})},878:function(e,t,n){n.d(t,{D:()=>a});let a=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0,composed:!0}))}},32:function(e,t,n){n.d(t,{_:()=>s});var a=n(29);let i=new Map;function l(e){return URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}function s(e,t){return async n=>{t("load_template_start");let s=i.get(n);if(s)return t("load_template_end"),s;{let s=new Promise(async(t,s)=>{try{let i=e?await e(n):await (await fetch(n,{method:"GET"})).json(),s=await (0,a.Yx)(i,l,encodeURIComponent(n));t(s)}catch(e){i.delete(n),s(e)}});return i.set(n,s),t("load_template_end"),s}}}},12:function(){var e,t,n,a;let i,l,s,r,o,d,c,h,u,m,p,v,b,g,f,y,E,S,w,x,C,T,O,I,L,k,A,P,_,M,R,N,D,F,H,j,z,U,W,V,$,B,X,q,Y,G,J,K,Z,Q,ee,et,en,ea,ei,el,es,er,eo,ed,ec,eh,eu,em,ep,ev,eb,eg,ef,ey,eE,eS,ew,ex,eC,eT,eO,eI,eL,ek,eA,eP,e_,eM,eR,eN,eD,eF,eH,ej,ez,eU,eW,eV,e$,eB,eX,eq,eY,eG,eJ,eK,eZ,eQ,e0,e1,e2,e3,e8,e4,e6,e9,e5,e7,te,tt,tn,ta,ti,tl,ts,tr,to,td,tc,th,tu,tm,tp,tv,tb,tg,tf,ty,tE,tS,tw,tx,tC,tT,tO,tI,tL,tk,tA,tP,t_,tM,tR,tN,tD,tF,tH,tj,tz,tU,tW,tV,t$,tB,tX,tq,tY,tG,tJ,tK,tZ,tQ,t0,t1,t2,t3,t8,t4,t6,t9,t5,t7,ne,nt,nn,na,ni,nl,ns,nr,no,nd,nc,nh,nu,nm,np,nv,nb,ng,nf,ny,nE,nS,nw,nx,nC,nT,nO,nI,nL,nk,nA,nP,n_,nM,nR,nN,nD,nF,nH,nj,nz,nU,nW,nV,n$,nB,nX,nq,nY,nG,nJ,nK,nZ,nQ,n0,n1,n2,n3,n8,n4,n6,n9,n5,n7,ae,at,an,aa,ai,al,as,ar,ao,ad,ac,ah,au,am,ap,av,ab,ag,af,ay,aE,aS,aw,ax,aC,aT,aO,aI,aL,ak,aA,aP,a_,aM,aR,aN,aD,aF,aH,aj,az,aU,aW,aV,a$,aB,aX,aq,aY,aG,aJ,aK,aZ,aQ,a0,a1,a2,a3,a8,a4,a6,a9,a5,a7,ie,it,ia,ii,il,is,ir,io,id,ic,ih,iu,im,ip,iv,ib,ig,iy,iE,iS,iw,ix,iC,iT,iO,iI,iL,ik,iA,iP,i_,iM,iR,iN,iD,iF,iH,ij,iz,iU,iW,iV,i$,iB,iX,iq,iY,iG,iJ,iK,iZ,iQ,i0,i1,i2,i3,i8,i4,i6,i9,i5,i7,le,lt,ln,la,li,ll,ls,lr,lo,ld,lc,lh,lu,lm,lp,lv,lb,lg,lf,ly,lE,lS,lw,lx,lC,lT,lO,lI,lL,lk,lA,lP,l_,lM,lR,lN,lD,lF,lH,lj,lz,lU,lW,lV,l$,lB,lX,lq,lY,lG,lJ,lK,lZ,lQ,l0,l1,l2,l3,l8;function l4(e,t,n,a,i,l){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var r,o=a.kind,d="getter"===o?"get":"setter"===o?"set":"value",c=!t&&e?a.static?e:e.prototype:null,h=t||(c?Object.getOwnPropertyDescriptor(c,a.name):{}),u=!1,m=n.length-1;m>=0;m--){var p={};for(var v in a)p[v]="access"===v?{}:a[v];for(var v in a.access)p.access[v]=a.access[v];p.addInitializer=function(e){if(u)throw TypeError("Cannot add initializers after decoration has completed");l.push(s(e||null))};var b=(0,n[m])("accessor"===o?{get:h.get,set:h.set}:h[d],p);if("accessor"===o){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(r=s(b.get))&&(h.get=r),(r=s(b.set))&&(h.set=r),(r=s(b.init))&&i.unshift(r)}else(r=s(b))&&("field"===o?i.unshift(r):h[d]=r)}c&&Object.defineProperty(c,a.name,h),u=!0}function l6(e,t,n){for(var a=arguments.length>2,i=0;i<t.length;i++)n=a?t[i].call(e,n):t[i].call(e);return a?n:void 0}function l9(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}let l5=[];function l7(){let e=l5;for(let[t,n]of(l5=[],e))n?t.call(n):t()}function se(e,t){0===l5.length&&queueMicrotask(l7),l5.push([e,t])}function st(e,t,n){let a;return(i,{addInitializer:l})=>{let s=new Set([...t.filter(e=>e.observedCSSProperties).map(e=>e.observedCSSProperties).reduce((e,t)=>e.concat(t),[])]);class r extends i{static registerPlugin(e){if(r.observedAttributes.push(...e.observedAttributes),e.observedCSSProperties)for(let t of e.observedCSSProperties)s.add(t);t.push(e)}static observedAttributes=[...i.observedAttributes??[],...t.map(e=>e.observedAttributes).reduce((e,t)=>e.concat(t),[]),"class"];#y=[];constructor(){if(super(),n&&!a&&((a=document.createElement("template")).innerHTML=n,document.body.appendChild(a)),a&&!this.shadowRoot){const e=this.attachShadow({mode:"open",delegatesFocus:!0}),t=a.content.cloneNode(!0);e.append(t)}this.#y=t.map(e=>new e(this)),this.#E()}#S=!1;#w=new Map;#x(){!this.#S&&s.size&&(this.#S=!0,se(this.#C,this))}#C(){let e=getComputedStyle(this);for(let n of s){var t;let a=e.getPropertyValue(n),i=e.getPropertyPriority(n),l=(t=a.trim(),i?t+" !important":t);if(this.#w.get(n)!==l)for(let e of this.#y)e.cssPropertyChangedHandler?.[n]?.call(e,l,n)}this.#S=!1}setAttribute(e,t){"false"!==t.toString()||i.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")?super.setAttribute(e,t):this.removeAttribute(e)}#E(){let e=this.attributes;for(let t=0,n;n=e.item(t);t++)"false"!==n.value||i.notToFilterFalseAttributes?.has(n.name)||n.name.startsWith("data-")||this.removeAttributeNode(n)}#t=!1;attributeChangedCallback(e,t,n){if(super.attributeChangedCallback&&super.attributeChangedCallback(e,t,n),i.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")||("false"===t&&(t=null),"false"===n&&(n=null,this.removeAttribute(e))),t!==n){for(let a of(this.#t&&("class"===e||"style"===e)&&this.#x(),this.#y))if(a.attributeChangedHandler?.[e]){let{handler:i,noDomMeasure:l}=a.attributeChangedHandler[e];l?i.call(a,n,t,e):this.#t&&se(()=>i.call(a,n,t,e))}}}#T(){this.getAttributeNames().forEach(e=>{for(let t of this.#y)if(t.attributeChangedHandler?.[e]){let{handler:n,noDomMeasure:a}=t.attributeChangedHandler[e];a||se(()=>n.call(t,this.getAttribute(e),null,e))}})}connectedCallback(){super.connectedCallback?.(),this.#y.forEach(e=>{e.connectedCallback?.()}),this.#x(),se(this.#T,this),this.#t=!0}disconnectedCallback(){super.disconnectedCallback?.(),this.#y.forEach(e=>{e.dispose?.()})}#O={};addEventListener(e,t,n){super.addEventListener(e,t,n),this.#O[e]??={count:0,listenerCount:new WeakMap,captureListenerCount:new WeakMap};let a=this.#O[e],i=("object"==typeof n?n.capture:n)?a.captureListenerCount:a.listenerCount,l=i.get(t)??0;if(i.set(t,l+1),0===a.count)for(let t of this.#y){let n=t.eventStatusChangedHandler?.[e];n&&n.call(t,!0,e)}a.count++}removeEventListener(e,t,n){super.removeEventListener(e,t,n);let a="object"==typeof n?n.capture:n,i=this.#O[e];if(i&&i.count>0&&1===(a?i?.captureListenerCount:i?.listenerCount).get(t)&&(i.listenerCount.delete(t),i.count--,0===i.count))for(let t of this.#y){let n=t.eventStatusChangedHandler?.[e];n&&n.call(t,!1,e)}}}return l(()=>{customElements.define(e,r)}),r}}s=[st("lynx-wrapper",[])],r=[],o=HTMLElement,class extends o{static{l=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;l4(null,i={value:l},s,{kind:"class",name:l.name,metadata:e},null,r),l=i.value,e&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),l6(l,r)}};let sn={bubbles:!1,composed:!1,cancelable:!0};function sa(e,t){return function(n,...a){return function(i,l){if("method"===l.kind)l.addInitializer(function(){this[e]??={},this[e][n]=t(i,a)});else if("field"===l.kind)return function(i){return this[e]??={},this[e][n]=t(i,a),i};else throw Error(`[lynx-web-components] decorator type ${l.kind} is not supported`)}}}let si=sa("eventStatusChangedHandler",e=>e),sl=Symbol("layoutChangeTarget"),ss=(d=[],c=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;l4(null,null,[si("layoutchange")],{kind:"field",name:"__handleScrollUpperThresholdEventEnabled",static:!1,private:!1,access:{has:e=>"__handleScrollUpperThresholdEventEnabled"in e,get:e=>e.__handleScrollUpperThresholdEventEnabled,set:(e,t)=>{e.__handleScrollUpperThresholdEventEnabled=t}},metadata:e},d,c),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static observedAttributes=[];#I;constructor(e){l6(this,c),this.#I=e}#L=!1;#k;__handleScrollUpperThresholdEventEnabled=l6(this,d,e=>{e&&this.#I[sl]?!this.#k&&(this.#k=new ResizeObserver(([e])=>{if(e){let t=this.#I.id,{top:n,bottom:a,left:i,right:l,width:s,height:r}=e.target.getBoundingClientRect();this.#I.dispatchEvent(new CustomEvent("layoutchange",{detail:{width:s,height:r,left:i,right:l,top:n,bottom:a,id:t},...sn}))}}),this.#L||(this.#k.observe(this.#I[sl]),this.#L=!0)):this.#k?.disconnect()});#A(){this.#k?.disconnect()}}),sr=sa("attributeChangedHandler",(e,[t])=>({handler:e,noDomMeasure:t})),so=sa("cssPropertyChangedHandler",e=>e);function sd(e,t){let n,a;return()=>(a||(a=e()),a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&n||(n=a.querySelector(t)),n)}function sc(e,t,n,a){return function(i){i?(n&&(i=n(i)),se(()=>e.call(this).style.setProperty(t,i,a?"important":void 0))):se(()=>e.call(this).style.removeProperty(t))}}let sh=(p=[],v=[],b=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;h=[sr("fading-edge-length",!0)],u=[so("background"),so("background-color")],l4(this,m={value:l9(function(e){this.#P().style.setProperty("--scroll-view-bg-color",e),this.#_().style.setProperty("--scroll-view-bg-color",e)},"#backgroundColorToVariable")},u,{kind:"method",name:"#backgroundColorToVariable",static:!1,private:!0,access:{has:e=>#M in e,get:e=>e.#M},metadata:e},null,p),l4(null,null,h,{kind:"field",name:"#handleFadingEdgeLength",static:!1,private:!0,access:{has:e=>#R in e,get:e=>e.#R,set:(e,t)=>{e.#R=t}},metadata:e},v,b),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I=l6(this,p);#P=sd(()=>this.#I.shadowRoot,"#top-fade-mask");#_=sd(()=>this.#I.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){l6(this,b),this.#I=e}#R=l6(this,v,sc(()=>this.#I,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));get #M(){return m.value}connectedCallback(){}dispose(){}}),su=(S=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;g=[sr("scroll-top",!1),sr("scroll-left",!1),sr("initial-scroll-offset",!1)],y=[sr("scroll-to-index",!1),sr("initial-scroll-to-index",!1)],l4(this,f={value:l9(function(e,t,n){if(e){let t=parseFloat(e),a=this.#I.getAttribute("scroll-orientation"),i=this.#I.getAttribute("scroll-y"),l=this.#I.getAttribute("scroll-x"),s=("scroll-top"===n||"initial-scroll-offset"===n)&&(""===i||"true"===i||"vertical"===a||"both"===a),r=("scroll-left"===n||"initial-scroll-offset"===n)&&(""===l||"true"===l||"vertical"===a||"both"===a);requestAnimationFrame(()=>{s&&this.#I.scrollTo(0,t),r&&(this.#I.scrollLeft=t)})}},"#handleInitialScrollOffset")},g,{kind:"method",name:"#handleInitialScrollOffset",static:!1,private:!0,access:{has:e=>#N in e,get:e=>e.#N},metadata:e},null,S),l4(this,E={value:l9(function(e){if(e){let t=parseFloat(e),n=this.#I.children.item(t);if(n&&n instanceof HTMLElement){let e=null!==this.#I.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#I.scrollLeft=n.offsetLeft:this.#I.scrollTop=n.offsetTop})}}},"#handleInitialScrollIndex")},y,{kind:"method",name:"#handleInitialScrollIndex",static:!1,private:!0,access:{has:e=>#D in e,get:e=>e.#D},metadata:e},null,S),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I=l6(this,S);static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){this.#I=e}get #N(){return f.value}get #D(){return E.value}dispose(){}});function sm(e,t,n){let a;return i=>{null!==i?a||(a=new IntersectionObserver(n,{root:e()})).observe(t()):a&&(a.disconnect(),a=void 0)}}let sp="onscrollend"in document,sv=window.navigator.userAgent;sv.includes("Chrome"),/\b(iPad|iPhone|iPod|OS X)\b/.test(sv)&&!/Edge/.test(sv)&&/WebKit/.test(sv)&&window.MSStream;let sb=Symbol.for("lynx-scroll-container-dom"),sg=(L=[],k=[],A=[],P=[],_=[],M=[],R=[],N=[],D=[],F=[],H=[],j=[],class{static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;w=[si("scrolltoupper")],x=[si("scrolltolower")],C=[sr("upper-threshold",!0)],T=[sr("lower-threshold",!0)],O=[si("lynxscroll")],I=[si("lynxscrollend")],l4(null,null,w,{kind:"field",name:"#handleScrollUpperThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#F in e,get:e=>e.#F,set:(e,t)=>{e.#F=t}},metadata:e},L,k),l4(null,null,x,{kind:"field",name:"#handleScrollLowerThresholdEventEnabled",static:!1,private:!0,access:{has:e=>#H in e,get:e=>e.#H,set:(e,t)=>{e.#H=t}},metadata:e},A,P),l4(null,null,C,{kind:"field",name:"#updateUpperThreshold",static:!1,private:!0,access:{has:e=>#j in e,get:e=>e.#j,set:(e,t)=>{e.#j=t}},metadata:e},_,M),l4(null,null,T,{kind:"field",name:"#updateLowerThreshold",static:!1,private:!0,access:{has:e=>#z in e,get:e=>e.#z,set:(e,t)=>{e.#z=t}},metadata:e},R,N),l4(null,null,O,{kind:"field",name:"#handleScrollEventEnabled",static:!1,private:!0,access:{has:e=>#U in e,get:e=>e.#U,set:(e,t)=>{e.#U=t}},metadata:e},D,F),l4(null,null,I,{kind:"field",name:"#handleScrollEndEventEnabled",static:!1,private:!0,access:{has:e=>#W in e,get:e=>e.#W,set:(e,t)=>{e.#W=t}},metadata:e},H,j),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#I;#V;#$=0;#B=0;constructor(e){l6(this,j),this.#I=e}#X=()=>this.#I;#q=sd(()=>this.#I.shadowRoot,"#upper-threshold-observer");#Y=sd(()=>this.#I.shadowRoot,"#lower-threshold-observer");#G=e=>{let{isIntersecting:t,target:n}=e[0],a=n.id;t&&("upper-threshold-observer"===a?this.#I.dispatchEvent(new CustomEvent("scrolltoupper",{...sn,detail:this.#J()})):"lower-threshold-observer"===a&&this.#I.dispatchEvent(new CustomEvent("scrolltolower",{...sn,detail:this.#J()})))};static observedAttributes=["upper-threshold","lower-threshold"];#F=l6(this,L,e=>{e?this.#I.setAttribute("x-enable-scrolltoupper-event",""):this.#I.removeAttribute("x-enable-scrolltoupper-event"),this.#K(e)});#K=(l6(this,k),sm(this.#X,this.#q,this.#G));#H=l6(this,A,e=>{e?this.#I.setAttribute("x-enable-scrolltolower-event",""):this.#I.removeAttribute("x-enable-scrolltolower-event"),this.#Z(e)});#Z=(l6(this,P),sm(this.#X,this.#Y,this.#G));#j=l6(this,_,sc(this.#q,"flex-basis",e=>`${parseInt(e)}px`));#z=(l6(this,M),l6(this,R,sc(this.#Y,"flex-basis",e=>`${parseInt(e)}px`)));#J(){let{scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:a}=this.#X();0===e&&(e-=this.#I.scrollHeight/2-this.#I.scrollTop),0===t&&(t-=this.#I.scrollWidth/2-this.#I.scrollLeft);let i={scrollTop:e,scrollLeft:t,scrollHeight:n,scrollWidth:a,isDragging:!1,deltaX:t-this.#$,deltaY:e-this.#B};return this.#$=t,this.#B=e,i}#Q=(l6(this,N),()=>{this.#ee&&!sp&&(clearTimeout(this.#V),this.#V=setTimeout(()=>{this.#et()},100)),this.#I.dispatchEvent(new CustomEvent("lynxscroll",{...sn,detail:this.#J()}))});#et=()=>{this.#I.dispatchEvent(new CustomEvent("lynxscrollend",{...sn,detail:this.#J()}))};#en=!1;#U=l6(this,D,e=>{this.#en=e,this.#ea()});#ee=(l6(this,F),!1);#W=l6(this,H,e=>{this.#ee=e,this.#ea()});#ea(){this.#en||this.#ee?(this.#X().addEventListener("scroll",this.#Q),this.#X().addEventListener("scrollend",this.#et),this.#I.addEventListener("scroll",this.#Q),this.#I.addEventListener("scrollend",this.#et),this.#$=0,this.#B=0):(this.#I.removeEventListener("scroll",this.#Q),this.#I.removeEventListener("scrollend",this.#et))}connectedCallback(){}dispose(){}});class sf{static eventName="__scrollIntoView";static observedAttributes=[];#I;#ei=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),n=[],a=this.#I;for(let e of t){if(e===a)break;n.push(e)}let i=this.#I.getAttribute("scroll-orientation"),l=null!==this.#I.getAttribute("scroll-x")||"both"===i||"horizontal"===i,s=null!==this.#I.getAttribute("scroll-y")||"both"===i||"vertical"===i,r=0,o=0;for(let{offsetTop:e,offsetLeft:t}of n)l&&(o+=t),s&&(r+=e);if(l)switch(e.detail.inline){case"center":o+=(e.target.clientWidth-this.#I.clientWidth)/2;break;case"end":o+=e.target.clientWidth-this.#I.clientWidth}if(s)switch(e.detail.block){case"center":r+=(e.target.clientHeight-this.#I.clientHeight)/2;break;case"end":r+=e.target.clientHeight-this.#I.clientHeight}a.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:o,top:r})};constructor(e){this.#I=e,this.#I.addEventListener(sf.eventName,this.#ei,{passive:!1})}dispose(){this.#I.removeEventListener(sf.eventName,this.#ei)}}let sy=/<\s*script/g,sE=e=>{let{src:t}=e;if(t&&sy.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" loading="lazy" id="img" ${t?`src="${t}"`:""}/> `},sS=`<style>
7
7
  #input:focus {
8
8
  outline: none;
9
9
  }