@lynx-js/web-core-wasm 0.0.4 → 0.0.6

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.
@@ -1,4 +1,4 @@
1
- "use strict";(globalThis.webpackChunk_lynx_js_web_core_wasm=globalThis.webpackChunk_lynx_js_web_core_wasm||[]).push([["724"],{1384(){var e,t,s,i,o,r,n,l,a,h,d,c,u,p,m,v,g,b,f,E,w,y,x,S,T,C,L,_,I,A,O,R,M,k,D,F,N,H,P,z,V,W,X,$,B,U,q,Y,j,K,G,J,Q,Z,ee,et,es,ei,eo,er,en,el,ea,eh,ed,ec,eu,ep,em,ev,eg,eb,ef,eE,ew,ey,ex,eS,eT,eC,eL,e_,eI,eA,eO,eR,eM,ek,eD,eF,eN,eH,eP,ez,eV,eW,eX,e$,eB,eU,eq,eY,ej,eK,eG,eJ,eQ,eZ,e0,e1,e2,e3,e4,e5,e8,e9,e6,e7,te,tt,ts,ti,to,tr,tn,tl,ta,th,td,tc,tu,tp,tm,tv,tg,tb,tf,tE,tw,ty,tx,tS,tT,tC,tL,t_,tI,tA,tO,tR,tM,tk,tD,tF,tN,tH,tP,tz,tV,tW,tX,t$,tB,tU,tq,tY,tj,tK,tG,tJ,tQ,tZ,t0,t1,t2,t3,t4,t5,t8,t9,t6,t7,se,st,ss,si,so,sr,sn,sl,sa,sh,sd,sc,su,sp,sm,sv,sg,sb,sf,sE,sw,sy,sx,sS,sT,sC,sL,s_,sI,sA,sO,sR,sM,sk,sD,sF,sN,sH,sP,sz,sV,sW,sX,s$,sB,sU,sq,sY,sj,sK,sG,sJ,sQ,sZ,s0,s1,s2,s3,s4,s5,s8,s9,s6,s7,ie,it,is,ii,io,ir,il,ia,ih,id,ic,iu,ip,im,iv,ig,ib,iE,iw,iy,ix,iS,iT,iC,iL,i_,iI,iA,iO,iR,iM,ik,iD,iF,iN,iH,iP,iz,iV,iW,iX,i$,iB,iU,iq,iY,ij,iK,iG,iJ,iQ,iZ;let i0,i1,i2,i3,i4,i5,i8,i9,i6,i7,oe,ot,os,oi,oo,or,on,ol,oa,oh,od,oc,ou,op,om,ov,og,ob,of,oE,ow,oy;function ox(e,t,s,i){function o(e,t){return function(s){(function(e,t){if(e.v)throw Error("attempted to call "+t+" after decoration was finished")})(t,"addInitializer"),n(s,"An initializer"),e.push(s)}}function r(e,t,s,i,r,n,l,a,h){switch(r){case 1:d="accessor";break;case 2:d="method";break;case 3:d="getter";break;case 4:d="setter";break;default:d="field"}var d,c,u,p={kind:d,name:l?"#"+t:t,static:n,private:l,metadata:a},m={v:!1};p.addInitializer=o(i,m),0===r?l?(c=s.get,u=s.set):(c=function(){return this[t]},u=function(e){this[t]=e}):2===r?c=function(){return s.value}:((1===r||3===r)&&(c=function(){return s.get.call(this)}),(1===r||4===r)&&(u=function(e){s.set.call(this,e)})),p.access=c&&u?{get:c,set:u}:c?{get:c}:{set:u};try{return e(h,p)}finally{m.v=!0}}function n(e,t){if("function"!=typeof e)throw TypeError(t+" must be a function")}function l(e,t){var s=typeof t;if(1===e){if("object"!==s||null===t)throw TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&n(t.get,"accessor.get"),void 0!==t.set&&n(t.set,"accessor.set"),void 0!==t.init&&n(t.init,"accessor.init")}else if("function"!==s)throw TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function a(e,t){t&&e.push(function(e){for(var s=0;s<t.length;s++)t[s].call(e);return e})}function h(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:t})}return(ox=function(e,t,s,i){if(void 0!==i)var n=i[Symbol.metadata||Symbol.for("Symbol.metadata")];var d=Object.create(void 0===n?null:n),c=function(e,t,s){for(var i=[],o=new Map,n=new Map,h=0;h<t.length;h++){var d,c,u,p,m=t[h];if(Array.isArray(m)){var v=m[1],g=m[2],b=m.length>3,f=v>=5;if(f?(u=e,v-=5,p=c=c||[]):(u=e.prototype,p=d=d||[]),0!==v&&!b){var E=f?n:o,w=E.get(g)||0;if(!0===w||3===w&&4!==v||4===w&&3!==v)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+g);!w&&v>2?E.set(g,v):E.set(g,!0)}!function(e,t,s,i,o,n,a,h,d){var c,u,p,m,v,g,b=s[0];if(a?c=0===o||1===o?{get:s[3],set:s[4]}:3===o?{get:s[3]}:4===o?{set:s[3]}:{value:s[3]}:0!==o&&(c=Object.getOwnPropertyDescriptor(t,i)),1===o?p={get:c.get,set:c.set}:2===o?p=c.value:3===o?p=c.get:4===o&&(p=c.set),"function"==typeof b)void 0!==(m=r(b,i,c,h,o,n,a,d,p))&&(l(o,m),0===o?u=m:1===o?(u=m.init,p={get:v=m.get||p.get,set:m.set||p.set}):p=m);else for(var f=b.length-1;f>=0;f--)void 0!==(m=r(b[f],i,c,h,o,n,a,d,p))&&(l(o,m),0===o?g=m:1===o?(g=m.init,p={get:v=m.get||p.get,set:m.set||p.set}):p=m,void 0!==g&&(void 0===u?u=g:"function"==typeof u?u=[u,g]:u.push(g)));if(0===o||1===o){if(void 0===u)u=function(e,t){return t};else if("function"!=typeof u){var E=u;u=function(e,t){for(var s=t,i=0;i<E.length;i++)s=E[i].call(e,s);return s}}else{var w=u;u=function(e,t){return w.call(e,t)}}e.push(u)}0!==o&&(1===o?(c.get=p.get,c.set=p.set):2===o?c.value=p:3===o?c.get=p:4===o&&(c.set=p),a?1===o?(e.push(function(e,t){return p.get.call(e,t)}),e.push(function(e,t){return p.set.call(e,t)})):2===o?e.push(p):e.push(function(e,t){return p.call(e,t)}):Object.defineProperty(t,i,c))}(i,u,m,g,v,f,b,p,s)}}return a(i,d),a(i,c),i}(e,t,d);return s.length||h(e,d),{e:c,get c(){return function(e,t,s){if(t.length>0){for(var i=[],r=e,n=e.name,a=t.length-1;a>=0;a--){var d={v:!1};try{var c=t[a](r,{kind:"class",name:n,addInitializer:o(i,d),metadata:s})}finally{d.v=!0}void 0!==c&&(l(10,c),r=c)}return[h(r,s),function(){for(var e=0;e<i.length;e++)i[e].call(r)}]}}(e,s,d)}}})(e,t,s,i)}let oS=[];function oT(){let e=oS;for(let[t,s]of(oS=[],e))s?t.call(s):t()}function oC(e,t){0===oS.length&&queueMicrotask(oT),oS.push([e,t])}function oL(e,t,s,i){let o=!1;return function(r){if(r!==o){let n=e.call(this);r?(oC(()=>n.addEventListener(t,s,i)),o=!0):(oC(()=>n.removeEventListener(t,s)),o=!1)}}}function o_(e,t,s){return function(i){s&&(i=s(i));let o=e.call(this);o.getAttribute(t)!==i&&(null!==i?oC(()=>{o.setAttribute(t,i)}):oC(()=>{o.removeAttribute(t)}))}}function oI(e,t,s,i){return function(o){o?(s&&(o=s(o)),oC(()=>e.call(this).style.setProperty(t,o,i?"important":void 0))):oC(()=>e.call(this).style.removeProperty(t))}}function oA(e,t){let s,i;return()=>(i||(i=e()),i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&s||(s=i.querySelector(t)),s)}function oO(e,t,s){let i,o=t.filter(e=>!!e);return(t,{addInitializer:r})=>{let n=new Set([...o.filter(e=>e.observedCSSProperties).map(e=>e.observedCSSProperties).reduce((e,t)=>e.concat(t),[])]);class l extends t{static registerPlugin(e){if(l.observedAttributes.push(...e.observedAttributes),e.observedCSSProperties)for(let t of e.observedCSSProperties)n.add(t);o.push(e)}static observedAttributes=[...t.observedAttributes??[],...o.map(e=>e.observedAttributes).reduce((e,t)=>e.concat(t),[]),"class"];#e=[];constructor(){if(super(),s&&!i&&((i=document.createElement("template")).innerHTML=s,document.body.appendChild(i)),i&&!this.shadowRoot){const e=this.attachShadow({mode:"open",delegatesFocus:!0}),t=i.content.cloneNode(!0);e.append(t)}this.#e=o.map(e=>new e(this)),this.#t()}#s=!1;#i=new Map;#o(){!this.#s&&n.size&&(this.#s=!0,oC(this.#r,this))}#r(){let e=getComputedStyle(this);for(let s of n){var t;let i=e.getPropertyValue(s),o=e.getPropertyPriority(s),r=(t=i.trim(),o?t+" !important":t);if(this.#i.get(s)!==r)for(let e of this.#e)e.cssPropertyChangedHandler?.[s]?.call(e,r,s)}this.#s=!1}setAttribute(e,s){"false"!==s.toString()||t.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")?super.setAttribute(e,s):this.removeAttribute(e)}#t(){let e=this.attributes;for(let s=0,i;i=e.item(s);s++)"false"!==i.value||t.notToFilterFalseAttributes?.has(i.name)||i.name.startsWith("data-")||this.removeAttributeNode(i)}#n=!1;attributeChangedCallback(e,s,i){if(super.attributeChangedCallback&&super.attributeChangedCallback(e,s,i),t.notToFilterFalseAttributes?.has(e)||e.startsWith("data-")||("false"===s&&(s=null),"false"===i&&(i=null,this.removeAttribute(e))),s!==i){for(let t of(this.#n&&("class"===e||"style"===e)&&this.#o(),this.#e))if(t.attributeChangedHandler?.[e]){let{handler:o,noDomMeasure:r}=t.attributeChangedHandler[e];r?o.call(t,i,s,e):this.#n&&oC(()=>o.call(t,i,s,e))}}}#l(){this.getAttributeNames().forEach(e=>{for(let t of this.#e)if(t.attributeChangedHandler?.[e]){let{handler:s,noDomMeasure:i}=t.attributeChangedHandler[e];i||oC(()=>s.call(t,this.getAttribute(e),null,e))}})}connectedCallback(){super.connectedCallback?.(),this.#e.forEach(e=>{e.connectedCallback?.()}),this.#o(),oC(this.#l,this),this.#n=!0}disconnectedCallback(){super.disconnectedCallback?.(),this.#e.forEach(e=>{e.dispose?.()})}#a={};enableEvent(e){this.#a[e]??={count:0,listenerCount:new WeakMap,captureListenerCount:new WeakMap};let t=this.#a[e];if(0===t.count)for(let t of this.#e){let s=t.eventStatusChangedHandler?.[e];s&&s.call(t,!0,e)}t.count++}disableEvent(e){let t=this.#a[e];if(t&&t.count>0&&(t.count--,0===t.count))for(let t of this.#e){let s=t.eventStatusChangedHandler?.[e];s&&s.call(t,!1,e)}}addEventListener(e,t,s){super.addEventListener(e,t,s),this.enableEvent(e);let i=this.#a[e],o=("object"==typeof s?s.capture:s)?i.captureListenerCount:i.listenerCount,r=o.get(t)??0;o.set(t,r+1)}removeEventListener(e,t,s){super.removeEventListener(e,t,s);let i="object"==typeof s?s.capture:s,o=this.#a[e];if(o&&o.count>0){let s=i?o.captureListenerCount:o.listenerCount;1===s.get(t)&&(s.delete(t),this.disableEvent(e))}}}return r(()=>{customElements.define(e,l)}),l}}function oR(e,t){return function(s,...i){return function(o,r){if("method"===r.kind)r.addInitializer(function(){this[e]??={},this[e][s]=t(o,i)});else if("field"===r.kind)return function(o){return this[e]??={},this[e][s]=t(o,i),o};else throw Error(`[lynx-web-components] decorator type ${r.kind} is not supported`)}}}let oM=oR("attributeChangedHandler",(e,[t])=>({handler:e,noDomMeasure:t})),ok=oR("cssPropertyChangedHandler",e=>e),oD=oR("eventStatusChangedHandler",e=>e);e=oO("lynx-wrapper",[]);class oF extends(s=HTMLElement){static #h={c:[i0,t]}=ox(this,[],[e],s);static #d=t()}function oN(e){return e}let oH={bubbles:!1,composed:!1,cancelable:!0},oP=Symbol("layoutChangeTarget");i=oD("layoutchange");class oz{static #h={e:[o]}=ox(this,[[i,0,"__handleScrollUpperThresholdEventEnabled"]],[]);static observedAttributes=[];#c;constructor(e){this.#c=e}#u=!1;#p;__handleScrollUpperThresholdEventEnabled=o(this,e=>{e&&this.#c[oP]?!this.#p&&(this.#p=new ResizeObserver(([e])=>{if(e){let t=this.#c.id,{top:s,bottom:i,left:o,right:r,width:n,height:l}=e.target.getBoundingClientRect();this.#c.dispatchEvent(new CustomEvent("layoutchange",{detail:{width:n,height:l,left:o,right:r,top:s,bottom:i,id:t},...oH}))}}),this.#u||(this.#p.observe(this.#c[oP]),this.#u=!0)):(this.#p?.disconnect(),this.#p=void 0,this.#u=!1)});dispose(){this.#p?.disconnect(),this.#p=void 0,this.#u=!1}}r=oM("fading-edge-length",!0),n=ok("background"),l=ok("background-color");class oV{static #h={e:[a,h]}=ox(this,[[[n,l],2,"_backgroundColorToVariable"],[r,0,"_handleFadingEdgeLength"]],[]);#c;#m=(h(this),oA(()=>this.#c.shadowRoot,"#top-fade-mask"));#v=oA(()=>this.#c.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){this.#c=e}_handleFadingEdgeLength=a(this,oI(()=>this.#c,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));_backgroundColorToVariable(e){this.#m().style.setProperty("--scroll-view-bg-color",e),this.#v().style.setProperty("--scroll-view-bg-color",e)}connectedCallback(){}dispose(){}}d=oM("scroll-top",!1),c=oM("scroll-left",!1),u=oM("initial-scroll-offset",!1),p=oM("scroll-to-index",!1),m=oM("initial-scroll-to-index",!1);class oW{static #h={e:[v]}=ox(this,[[[d,c,u],2,"_handleInitialScrollOffset"],[[p,m],2,"_handleInitialScrollIndex"]],[]);#c;static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){v(this),this.#c=e}_handleInitialScrollOffset(e,t,s){if(e){let t=parseFloat(e),i=this.#c.getAttribute("scroll-orientation"),o=this.#c.getAttribute("scroll-y"),r=this.#c.getAttribute("scroll-x"),n=("scroll-top"===s||"initial-scroll-offset"===s)&&(""===o||"true"===o||"vertical"===i||"both"===i),l=("scroll-left"===s||"initial-scroll-offset"===s)&&(""===r||"true"===r||"vertical"===i||"both"===i);requestAnimationFrame(()=>{n&&this.#c.scrollTo(0,t),l&&(this.#c.scrollLeft=t)})}}_handleInitialScrollIndex(e){if(e){let t=parseFloat(e),s=this.#c.children.item(t);if(s&&s instanceof HTMLElement){let e=null!==this.#c.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#c.scrollLeft=s.offsetLeft:this.#c.scrollTop=s.offsetTop})}}}dispose(){}}function oX(e,t,s){let i;return o=>{null!==o?i||(i=new IntersectionObserver(s,{root:e()})).observe(t()):i&&(i.disconnect(),i=void 0)}}let o$="onscrollend"in document,oB=Symbol.for("lynx-scroll-container-dom");g=oD("scrolltoupper"),b=oD("scrolltolower"),f=oM("upper-threshold",!0),E=oM("lower-threshold",!0),w=oD("lynxscroll"),y=oD("lynxscrollend");class oU{static #h={e:[x,S,T,C,L,_]}=ox(this,[[g,0,"_handleScrollUpperThresholdEventEnabled"],[b,0,"_handleScrollLowerThresholdEventEnabled"],[f,0,"_updateUpperThreshold"],[E,0,"_updateLowerThreshold"],[w,0,"_handleScrollEventEnabled"],[y,0,"_handleScrollEndEventEnabled"]],[]);#c;#g;#b=0;#f=0;constructor(e){this.#c=e}#E=()=>this.#c;#w=oA(()=>this.#c.shadowRoot,"#upper-threshold-observer");#y=oA(()=>this.#c.shadowRoot,"#lower-threshold-observer");#x=e=>{let{isIntersecting:t,target:s}=e[0],i=s.id;t&&("upper-threshold-observer"===i?this.#c.dispatchEvent(new CustomEvent("scrolltoupper",{...oH,detail:this.#S()})):"lower-threshold-observer"===i&&this.#c.dispatchEvent(new CustomEvent("scrolltolower",{...oH,detail:this.#S()})))};static observedAttributes=["upper-threshold","lower-threshold"];_handleScrollUpperThresholdEventEnabled=x(this,e=>{e?this.#c.setAttribute("x-enable-scrolltoupper-event",""):this.#c.removeAttribute("x-enable-scrolltoupper-event"),this.#T(e)});#T=oX(this.#E,this.#w,this.#x);_handleScrollLowerThresholdEventEnabled=S(this,e=>{e?this.#c.setAttribute("x-enable-scrolltolower-event",""):this.#c.removeAttribute("x-enable-scrolltolower-event"),this.#C(e)});#C=oX(this.#E,this.#y,this.#x);_updateUpperThreshold=T(this,oI(this.#w,"flex-basis",e=>`${parseInt(e)}px`));_updateLowerThreshold=C(this,oI(this.#y,"flex-basis",e=>`${parseInt(e)}px`));#S(){let{scrollTop:e,scrollLeft:t,scrollHeight:s,scrollWidth:i}=this.#E();0===e&&(e-=this.#c.scrollHeight/2-this.#c.scrollTop),0===t&&(t-=this.#c.scrollWidth/2-this.#c.scrollLeft);let o={scrollTop:e,scrollLeft:t,scrollHeight:s,scrollWidth:i,isDragging:!1,deltaX:t-this.#b,deltaY:e-this.#f};return this.#b=t,this.#f=e,o}#L=()=>{this.#_&&!o$&&(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#I()},100)),this.#c.dispatchEvent(new CustomEvent("lynxscroll",{...oH,detail:this.#S()}))};#I=()=>{this.#c.dispatchEvent(new CustomEvent("lynxscrollend",{...oH,detail:this.#S()}))};#A=!1;_handleScrollEventEnabled=L(this,e=>{this.#A=e,this.#O()});#_=!1;_handleScrollEndEventEnabled=_(this,e=>{this.#_=e,this.#O()});#O(){this.#A||this.#_?(this.#E().addEventListener("scroll",this.#L),this.#E().addEventListener("scrollend",this.#I),this.#c.addEventListener("scroll",this.#L),this.#c.addEventListener("scrollend",this.#I),this.#b=0,this.#f=0):(this.#c.removeEventListener("scroll",this.#L),this.#c.removeEventListener("scrollend",this.#I))}connectedCallback(){}dispose(){}}class oq{static eventName="__scrollIntoView";static observedAttributes=[];#c;#R=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),s=[],i=this.#c;for(let e of t){if(e===i)break;s.push(e)}let o=this.#c.getAttribute("scroll-orientation"),r=null!==this.#c.getAttribute("scroll-x")||"both"===o||"horizontal"===o,n=null!==this.#c.getAttribute("scroll-y")||"both"===o||"vertical"===o,l=0,a=0;for(let{offsetTop:e,offsetLeft:t}of s)r&&(a+=t),n&&(l+=e);if(r)switch(e.detail.inline){case"center":a+=(e.target.clientWidth-this.#c.clientWidth)/2;break;case"end":a+=e.target.clientWidth-this.#c.clientWidth}if(n)switch(e.detail.block){case"center":l+=(e.target.clientHeight-this.#c.clientHeight)/2;break;case"end":l+=e.target.clientHeight-this.#c.clientHeight}i.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:a,top:l})};constructor(e){this.#c=e,this.#c.addEventListener(oq.eventName,this.#R,{passive:!1})}dispose(){this.#c.removeEventListener(oq.eventName,this.#R)}}let oY=`<style>
1
+ "use strict";(globalThis.webpackChunk_lynx_js_web_core_wasm=globalThis.webpackChunk_lynx_js_web_core_wasm||[]).push([["724"],{7242(e,t,s){let i,o,l,n,r,a,h,d,c,u,m,p,g,v,b,E,f,y,_,w,x,S,T,C,L,I,A,O,R,M,k,D;var H,F,N,$,P,V,z,U,W,B,X,Z,Y,q,j,K,G,J,Q,ee,et,es,ei,eo,el,en,er,ea,eh,ed,ec,eu,em,ep,eg,ev,eb,eE,ef,ey,e_,ew,ex,eS,eT,eC,eL,eI,eA,eO,eR,eM,ek,eD,eH,eF,eN,e$,eP,eV,ez,eU,eW,eB,eX,eZ,eY,eq,ej,eK,eG,eJ,eQ,e0,e1,e2,e8,e3,e9,e4,e5,e6,e7,te,tt,ts,ti,to,tl,tn,tr,ta,th,td,tc,tu,tm,tp,tg,tv,tb,tE,tf,ty,t_,tw,tx,tS,tT,tC,tL,tI,tA,tO,tR,tM,tk,tD,tH,tF,tN,t$,tP,tV,tz,tU,tW,tB,tX,tZ,tY,tq,tj,tK,tG,tJ,tQ,t0,t1,t2,t8,t3,t9,t4,t5,t6,t7,se,st,ss,si,so,sl,sn,sr,sa,sh,sd,sc,su,sm,sp,sg,sv,sb,sE,sf,sy,s_,sw,sx,sS,sT,sC,sL,sI,sA,sO,sR,sM,sk,sD,sH,sF,sN,s$,sP,sV,sz,sU,sW,sB,sX,sZ,sY,sq,sj,sK,sG,sJ,sQ,s0,s1,s2,s8,s3,s9,s4,s5,s6,s7,ie,it,is,ii,io,il,ir,ia,ih,id,ic,iu,im,ip,ig,iv,ib,iE,iy,i_,iw,ix,iS,iT,iC,iL,iI,iA,iO,iR,iM,ik,iD,iH,iF,iN,i$,iP,iV,iz,iU,iW,iB,iX,iZ,iY,iq,ij,iK,iG,iJ,iQ,i0,i1,i2,i8,i3,i9,i4,i5,i6,i7,oe,ot,os,oi,oo,ol,on,or,oa,oh,od,oc,ou,om,op,og,ov,ob,oE,of,oy,o_,ow,ox,oS,oT,oC,oL,oI,oA,oO,oR,oM,ok,oD=s(9698),oH=s(167);H=(0,oH.uA)("lynx-wrapper",[]);class oF extends(N=HTMLElement){static #e={c:[i,F]}=(0,oD._)(this,[],[H],N);static #t=F()}function oN(e){return e}var o$=s(1916);$=(0,oH._y)("fading-edge-length",!0),P=(0,oH.h3)("background"),V=(0,oH.h3)("background-color");class oP{static #e={e:[z,U]}=(0,oD._)(this,[[[P,V],2,"_backgroundColorToVariable"],[$,0,"_handleFadingEdgeLength"]],[]);#s;#i=(U(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#top-fade-mask"));#o=(0,oH.Ut)(()=>this.#s.shadowRoot,"#bot-fade-mask");static observedAttributes=["fading-edge-length"];static observedCSSProperties=["background","background-color"];constructor(e){this.#s=e}_handleFadingEdgeLength=z(this,(0,oH._8)(()=>this.#s,"--scroll-view-fading-edge-length",e=>`${parseFloat(e)}px`));_backgroundColorToVariable(e){this.#i().style.setProperty("--scroll-view-bg-color",e),this.#o().style.setProperty("--scroll-view-bg-color",e)}connectedCallback(){}dispose(){}}W=(0,oH._y)("scroll-top",!1),B=(0,oH._y)("scroll-left",!1),X=(0,oH._y)("initial-scroll-offset",!1),Z=(0,oH._y)("scroll-to-index",!1),Y=(0,oH._y)("initial-scroll-to-index",!1);class oV{static #e={e:[q]}=(0,oD._)(this,[[[W,B,X],2,"_handleInitialScrollOffset"],[[Z,Y],2,"_handleInitialScrollIndex"]],[]);#s;static observedAttributes=["scroll-top","scroll-left","initial-scroll-offset","scroll-to-index","initial-scroll-to-index"];constructor(e){q(this),this.#s=e}_handleInitialScrollOffset(e,t,s){if(e){let t=parseFloat(e),i=this.#s.getAttribute("scroll-orientation"),o=this.#s.getAttribute("scroll-y"),l=this.#s.getAttribute("scroll-x"),n=("scroll-top"===s||"initial-scroll-offset"===s)&&(""===o||"true"===o||"vertical"===i||"both"===i),r=("scroll-left"===s||"initial-scroll-offset"===s)&&(""===l||"true"===l||"vertical"===i||"both"===i);requestAnimationFrame(()=>{n&&this.#s.scrollTo(0,t),r&&(this.#s.scrollLeft=t)})}}_handleInitialScrollIndex(e){if(e){let t=parseFloat(e),s=this.#s.children.item(t);if(s&&s instanceof HTMLElement){let e=null!==this.#s.getAttribute("scroll-x");requestAnimationFrame(()=>{e?this.#s.scrollLeft=s.offsetLeft:this.#s.scrollTop=s.offsetTop})}}}dispose(){}}var oz=s(2032);function oU(e,t,s){let i;return o=>{null!==o?i||(i=new IntersectionObserver(s,{root:e()})).observe(t()):i&&(i.disconnect(),i=void 0)}}var oW=s(6372);j=(0,oH.ZR)("scrolltoupper"),K=(0,oH.ZR)("scrolltolower"),G=(0,oH._y)("upper-threshold",!0),J=(0,oH._y)("lower-threshold",!0),Q=(0,oH.ZR)("lynxscroll"),ee=(0,oH.ZR)("lynxscrollend");class oB{static #e={e:[et,es,ei,eo,el,en,er]}=(0,oD._)(this,[[j,0,"_handleScrollUpperThresholdEventEnabled"],[K,0,"_handleScrollLowerThresholdEventEnabled"],[G,0,"_updateUpperThreshold"],[J,0,"_updateLowerThreshold"],[Q,0,"_handleScrollEventEnabled"],[ee,0,"_handleScrollEndEventEnabled"]],[]);#s;#l;#n=(er(this),0);#r=0;constructor(e){this.#s=e}#a=()=>this.#s;#h=(0,oH.Ut)(()=>this.#s.shadowRoot,"#upper-threshold-observer");#d=(0,oH.Ut)(()=>this.#s.shadowRoot,"#lower-threshold-observer");#c=e=>{let{isIntersecting:t,target:s}=e[0],i=s.id;t&&("upper-threshold-observer"===i?this.#s.dispatchEvent(new CustomEvent("scrolltoupper",{...oz.$,detail:this.#u()})):"lower-threshold-observer"===i&&this.#s.dispatchEvent(new CustomEvent("scrolltolower",{...oz.$,detail:this.#u()})))};static observedAttributes=["upper-threshold","lower-threshold"];_handleScrollUpperThresholdEventEnabled=et(this,e=>{e?this.#s.setAttribute("x-enable-scrolltoupper-event",""):this.#s.removeAttribute("x-enable-scrolltoupper-event"),this.#m(e)});#m=oU(this.#a,this.#h,this.#c);_handleScrollLowerThresholdEventEnabled=es(this,e=>{e?this.#s.setAttribute("x-enable-scrolltolower-event",""):this.#s.removeAttribute("x-enable-scrolltolower-event"),this.#p(e)});#p=oU(this.#a,this.#d,this.#c);_updateUpperThreshold=ei(this,(0,oH._8)(this.#h,"flex-basis",e=>`${parseInt(e)}px`));_updateLowerThreshold=eo(this,(0,oH._8)(this.#d,"flex-basis",e=>`${parseInt(e)}px`));#u(){let{scrollTop:e,scrollLeft:t,scrollHeight:s,scrollWidth:i}=this.#a();0===e&&(e-=this.#s.scrollHeight/2-this.#s.scrollTop),0===t&&(t-=this.#s.scrollWidth/2-this.#s.scrollLeft);let o={scrollTop:e,scrollLeft:t,scrollHeight:s,scrollWidth:i,isDragging:!1,deltaX:t-this.#n,deltaY:e-this.#r};return this.#n=t,this.#r=e,o}#g=()=>{this.#v&&!oW.k&&(clearTimeout(this.#l),this.#l=setTimeout(()=>{this.#b()},100)),this.#s.dispatchEvent(new CustomEvent("lynxscroll",{...oz.$,detail:this.#u()}))};#b=()=>{this.#s.dispatchEvent(new CustomEvent("lynxscrollend",{...oz.$,detail:this.#u()}))};#E=!1;_handleScrollEventEnabled=el(this,e=>{this.#E=e,this.#f()});#v=!1;_handleScrollEndEventEnabled=en(this,e=>{this.#v=e,this.#f()});#f(){this.#E||this.#v?(this.#a().addEventListener("scroll",this.#g),this.#a().addEventListener("scrollend",this.#b),this.#s.addEventListener("scroll",this.#g),this.#s.addEventListener("scrollend",this.#b),this.#n=0,this.#r=0):(this.#s.removeEventListener("scroll",this.#g),this.#s.removeEventListener("scrollend",this.#b))}connectedCallback(){}dispose(){}}class oX{static eventName="__scrollIntoView";static observedAttributes=[];#s;#y=e=>{e.stopPropagation();let t=e.composedPath().filter(e=>e instanceof HTMLElement),s=[],i=this.#s;for(let e of t){if(e===i)break;s.push(e)}let o=this.#s.getAttribute("scroll-orientation"),l=null!==this.#s.getAttribute("scroll-x")||"both"===o||"horizontal"===o,n=null!==this.#s.getAttribute("scroll-y")||"both"===o||"vertical"===o,r=0,a=0;for(let{offsetTop:e,offsetLeft:t}of s)l&&(a+=t),n&&(r+=e);if(l)switch(e.detail.inline){case"center":a+=(e.target.clientWidth-this.#s.clientWidth)/2;break;case"end":a+=e.target.clientWidth-this.#s.clientWidth}if(n)switch(e.detail.block){case"center":r+=(e.target.clientHeight-this.#s.clientHeight)/2;break;case"end":r+=e.target.clientHeight-this.#s.clientHeight}i.scrollTo({behavior:"smooth"===e.detail.behavior?"smooth":"instant",left:a,top:r})};constructor(e){this.#s=e,this.#s.addEventListener(oX.eventName,this.#y,{passive:!1})}dispose(){this.#s.removeEventListener(oX.eventName,this.#y)}}let oZ=`<style>
2
2
  .placeholder-dom {
3
3
  display: none;
4
4
  flex: 0 0 0;
@@ -80,7 +80,7 @@
80
80
  class="mask placeholder-dom"
81
81
  id="bot-fade-mask"
82
82
  part="bot-fade-mask"
83
- ></div>`,oj=/<\s*script/,oK=e=>{let{src:t}=e;if(t&&oj.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" id="img" ${t?`src="${t}"`:""}/> `},oG=`<style>
83
+ ></div>`,oY=/<\s*script/,oq=e=>{let{src:t}=e;if(t&&oY.test(t))throw Error("detected <script, this is a potential XSS attack, please check your src");return`<img part="img" alt="" id="img" ${t?`src="${t}"`:""}/> `},oj=`<style>
84
84
  #input:focus {
85
85
  outline: none;
86
86
  }
@@ -97,7 +97,7 @@
97
97
  inputmode="text"
98
98
  spell-check="true"
99
99
  />
100
- </form>`,oJ=`<style>
100
+ </form>`,oK=`<style>
101
101
  .placeholder-dom {
102
102
  display: none;
103
103
  flex: 0 0 0;
@@ -133,7 +133,7 @@
133
133
  id="lower-threshold-observer"
134
134
  ></div>
135
135
  </div>
136
- </div>`,oQ=`<style>
136
+ </div>`,oG=`<style>
137
137
  #dialog[open] {
138
138
  top: 0;
139
139
  left: 0;
@@ -169,7 +169,7 @@
169
169
  <slot></slot>
170
170
  </div>
171
171
  <div class="overlay-placeholder"></div>
172
- </dialog>`,oZ=`<style>
172
+ </dialog>`,oJ=`<style>
173
173
  .bounce-container {
174
174
  overflow: scroll;
175
175
  overscroll-behavior: contain;
@@ -214,7 +214,7 @@
214
214
  class="overflow-placeholder bounce-item"
215
215
  part="placeholder-bot"
216
216
  ></div>
217
- </div>`,o0=`<style>
217
+ </div>`,oQ=`<style>
218
218
  #bounce-padding {
219
219
  display: none;
220
220
  flex: 0 0 0;
@@ -264,7 +264,7 @@
264
264
  <slot part="slot-start" name="circular-start" id="circular-start"></slot>
265
265
  <slot part="slot"></slot>
266
266
  <slot part="slot-end" name="circular-end" id="circular-end"></slot>
267
- </div>`,o1=`<style>
267
+ </div>`,o0=`<style>
268
268
  #textarea:focus,
269
269
  #textarea:focus-visible {
270
270
  border: inherit;
@@ -273,7 +273,7 @@
273
273
  </style>
274
274
  <form id="form" part="form" method="dialog">
275
275
  <textarea id="textarea" part="textarea"></textarea>
276
- </form>`,o2=`<style>
276
+ </form>`,o1=`<style>
277
277
  #bounce-padding {
278
278
  display: none;
279
279
  flex: 0 0 0;
@@ -299,11 +299,11 @@
299
299
  <div id="bounce-padding" part="bounce-padding"></div>
300
300
  <div id="content" part="content">
301
301
  <slot></slot>
302
- </div>`,o3=`<style>
302
+ </div>`,o2=`<style>
303
303
  iframe {
304
304
  width: 100%;
305
305
  height: 100%;
306
306
  border: none;
307
307
  }
308
308
  </style>
309
- <iframe id="webview" part="webview"></iframe>`,o4=CSS.supports("-webkit-box-reflect: above")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto");class o5{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#c;constructor(e){this.#c=e,this.cssPropertyChangedHandler={"--lynx-display":this.#M,"--lynx-linear-orientation":this.#k}}#M=o_(()=>this.#c,"lynx-computed-display");#k=o_(()=>this.#c,"lynx-linear-orientation")}let o8=o4?void 0:o5;I=oO("scroll-view",[o8,oz,oW,oV,oU,oq],oY),new class extends oN{constructor(){super(i1),A()}static #h=(()=>{class e extends(O=HTMLElement){static #h={c:[i1,A]}=ox(this,[],[I],O);static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#D;scrollTo(...e){let t;if("string"==typeof e[0].offset){let s=parseFloat(e[0].offset);t={left:s,top:s}}else"number"==typeof e[0].offset&&(t={left:e[0].offset,top:e[0].offset});if("number"==typeof e[0].index){let s=e[0].index;if(0===s)this.scrollTop=0,this.scrollLeft=0;else if(s>0&&s<this.childElementCount){let e=this.children.item(s);e instanceof HTMLElement&&(t=t?{left:e.offsetLeft+t.left,top:e.offsetTop+t.top}:{left:e.offsetLeft,top:e.offsetTop})}}t?this.scrollTo({...t,behavior:e[0].smooth?"smooth":"auto"}):super.scrollTo(...e)}autoScroll(t){if(clearInterval(this.#D),t.start){let s=("number"==typeof t.rate?t.rate:parseFloat(t.rate))*e.scrollInterval/1e3;this.#D=setInterval(e=>{e.scrollBy({left:s,top:s,behavior:"smooth"})},e.scrollInterval,this)}}get[oB](){return this}}})()};let o9=Symbol("__src"),o6=Symbol("__src"),o7={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},re={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};R=oM("src",!0),M=oM("loop",!0),k=oM("pause-on-hide",!0);class rt{static #h={e:[D,F]}=ox(this,[[R,2,"_handleSrc"],[k,2,"_handlePauseOnHide"],[M,0,"_handleLoop"]],[]);static observedAttributes=["src","loop","pause-on-hide"];#c;#F=(F(this),oA(()=>this.#c.shadowRoot,"#audio"));_handleSrc(e){let t;try{t=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),t={}}null===e?this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:-1,msg:"",from:"res loader",currentSrcID:this.#c[o9]?.id}})):(t?.id===void 0||t?.play_url===void 0)&&this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:-2,msg:"",from:"res loader",currentSrcID:this.#c[o9]?.id}})),this.#c[o9]=t,this.#c[o6]=void 0,this.#c.stop()}_handleLoop=D(this,o_(this.#F,"loop"));#N=()=>{"hidden"===document.visibilityState&&this.#c.pause()};_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#N,{passive:!0}):document.removeEventListener("visibilitychange",this.#N)}constructor(e){this.#c=e}}class rs{static observedAttributes=[];#c;#H;#F=oA(()=>this.#c.shadowRoot,"#audio");#P=e=>{let t=Number(this.#c.getAttribute("interval")),s=Number.isNaN(t)?0:t;this.#H=setInterval(()=>{this.#c.dispatchEvent(new CustomEvent("timeupdate",{...oH,detail:{currentTime:this.#F().currentTime,currentSrcID:this.#c[o9]?.id}}))},s);let i=re[e.type];this.#c.dispatchEvent(new CustomEvent("playbackstatechanged",{...oH,detail:{code:i?.code,type:i?.type,currentSrcID:this.#c[o9]?.id}}))};#z=e=>{clearInterval(this.#H);let t=re[e.type];this.#c.dispatchEvent(new CustomEvent("playbackstatechanged",{...oH,detail:{code:t?.code,type:t?.type,currentSrcID:this.#c[o9]?.id}}))};#V=e=>{let t=o7[e.type];this.#c.dispatchEvent(new CustomEvent("loadingstatechanged",{...oH,detail:{code:t?.code,type:t?.type,currentSrcID:this.#c[o9]?.id}}))};#W=e=>{this.#V(e);let t=e.target?.error?.code,s=t===MediaError.MEDIA_ERR_DECODE?-5:-6;t===MediaError.MEDIA_ERR_DECODE&&(s=-5),this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:s,msg:"",from:"player",currentSrcID:this.#c[o9]?.id}}))};#X=()=>{let e=null!==this.#c.getAttribute("loop");this.#c.dispatchEvent(new CustomEvent("finished",{...oH,detail:{loop:e,currentSrcID:this.#c[o9]?.id}}))};constructor(e){this.#c=e}connectedCallback(){let e=this.#F();e.addEventListener("play",this.#P,{passive:!0}),e.addEventListener("pause",this.#z,{passive:!0}),e.addEventListener("ended",this.#X,{passive:!0}),e.addEventListener("loadstart",this.#V,{passive:!0}),e.addEventListener("canplay",this.#V,{passive:!0}),e.addEventListener("stalled",this.#V,{passive:!0}),e.addEventListener("error",this.#W,{passive:!0})}}N=oO("x-audio-tt",[oz,rt,rs],'<audio id="audio"></audio>');class ri extends(P=HTMLElement){static #h={c:[i2,H]}=ox(this,[],[N],P);#$=oA(()=>this.shadowRoot,"#audio");#F=oA(()=>this.shadowRoot,"#audio");#B=o_(this.#F,"src");[o9];[o6];#U=()=>{let e,t=this[o9];if(t&&t.id&&t.play_url){try{e=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(t){console.error(`JSON.parse headers error: ${t}`),e={}}this[o6]=new Promise(async(s,i)=>{this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...oH,detail:{code:0,type:"loading",currentSrcID:t.id}}));let o=await fetch(t.play_url,{headers:e});o.ok||(this.dispatchEvent(new CustomEvent("error",{...oH,detail:{code:-3,msg:"",from:"res loader",currentSrcID:t.id}})),i()),this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...oH,detail:{code:1,type:"success",currentSrcID:t.id}}));let r=await o.blob(),n=URL.createObjectURL(r);this.#B(n),s()})}};play(){return this[o6]||this.#U(),this[o6]?.then(()=>{let e=this.#$();e.currentTime=0,e.play()}),{currentSrcID:this[o9]?.id,loadingSrcID:""}}stop(){let e=this.#$(),t=re.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...oH,detail:{code:t?.code,type:t?.type,currentSrcID:this[o9]?.id}})),e.currentTime=0,e.pause(),{currentSrcID:this[o9]?.id}}pause(){return this.#$().pause(),{currentSrcID:this[o9]?.id}}resume(){return this.#$().play(),{currentSrcID:this[o9]?.id,loadingSrcID:""}}seek(e){return this.#$().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...oH,detail:{seekresult:1,currentSrcID:this[o9]?.id}})),{currentSrcID:this[o9]?.id}}mute(e){return this.#$().muted=e.mute,{currentSrcID:this[o9]?.id}}playerInfo(){var e;let t=this.#$(),s=t.buffered,i=s.end(s.length-1);return{currentSrcID:this[o9]?.id,duration:1e3*t.duration,playbackState:(e=t)?e.paused?2*!e.ended:e.currentTime>0?1:3:-1,currentTime:t.currentTime,cacheTime:i}}prepare(){this[o6]||this.#U()}setVolume(e){return this.#$().volume=e.volume,{code:1}}static #d=H()}z=oM("name",!0),V=oM("height",!0),W=oM("width",!0);class ro{static #h={e:[X,$,B]}=ox(this,[[z,0,"handleName"],[V,0,"handleHeight"],[W,0,"handleWidth"]],[]);static observedAttributes=["name","height","width"];#c;#p;#q=oA(()=>this.#c.shadowRoot,"#canvas");constructor(e){this.#c=e}handleName=X(this,o_(this.#q,"name"));handleHeight=$(this,o_(this.#q,"height"));handleWidth=B(this,o_(this.#q,"width"));#Y=e=>{let{contentRect:t}=e[0],s=this.#c.shadowRoot.firstElementChild;if(s){let{height:e,width:i}=t;e*=window.devicePixelRatio,i*=window.devicePixelRatio;let o=new CustomEvent("resize",{...oH,detail:{height:e,width:i}});o.height=e,o.width=i,s.dispatchEvent(o)}};#j(){this.#p||(this.#p=new ResizeObserver(this.#Y),this.#p.observe(this.#c))}#K(){this.#p?.disconnect(),this.#p=void 0}connectedCallback(){this.#j()}dispose(){this.#K()}}U=oO("x-canvas",[oz,ro],((e,...t)=>String.raw({raw:e},...t))`<canvas id="canvas" part="canvas"></canvas>`);class rr extends(Y=HTMLElement){static #h={c:[i3,q]}=ox(this,[],[U],Y);static #d=q()}j=oM("granularity",!0),K=oD("offset");class rn{static #h={e:[G]}=ox(this,[[j,2,"_handleGranularity"],[K,2,"_enableOffsetEvent"]],[]);#c;#G=(G(this),.01);#J=0;constructor(e){this.#c=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#G=parseFloat(e):this.#G=.01}_enableOffsetEvent(e){e?this.#c.addEventListener("scroll",this.#L,{passive:!0}):this.#c.removeEventListener("scroll",this.#L)}#L=()=>{let e=this.#c.scrollTop;(Math.abs(this.#J-e)>this.#G||0===this.#c.scrollTop||1>=Math.abs(this.#c.scrollHeight-this.#c.clientHeight-this.#c.scrollTop))&&(this.#J=e,this.#c.dispatchEvent(new CustomEvent("offset",{...oH,detail:{offset:e,height:this.#c[rl]}})))}}let rl=Symbol("scrollableLength"),ra=Symbol("isHeaderShowing"),rh=Symbol("resizeObserver"),rd=Symbol("slotKid");J=oO("x-foldview-ng",[o8,oz,rn]),new class extends oN{constructor(){super(i4),Q()}static #h=(()=>{class e extends(Z=HTMLElement){static #h={c:[i4,Q]}=ox(this,[],[J],Z);static notToFilterFalseAttributes=new Set(["scroll-enable"]);[rd];[rh]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#Q=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#Z=t.contentRect.height);this[rd]&&(this[rd].style.top=`${this.#Q-this.#Z}px`)});#Q=0;#Z=0;get[rl](){return this.#Q-this.#Z}get[ra](){return this[rl]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[rl]?e=this[rl]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:s=!0}=e,i=parseFloat(t);this.scrollTo({top:i,behavior:s?"smooth":"instant"})}get[oB](){return this}disconnectedCallback(){this[rh]?.disconnect(),this[rh]=void 0}}})()};let rc=(e,t)=>{let s=e.parentElement;if(s?.tagName==="LYNX-WRAPPER"&&(s=s.parentElement),s?.tagName===t)return s};ee=oO("x-foldview-header-ng",[o8,oz]);class ru extends(es=HTMLElement){static #h={c:[i5,et]}=ox(this,[],[ee],es);#ee=void 0;connectedCallback(){let e=rc(this,"X-FOLDVIEW-NG");this.#ee=e?.[rh],this.#ee?.observe(this)}dispose(){this.#ee?.unobserve(this)}static #d=et()}ei=oO("x-foldview-slot-drag-ng",[o8,oz]);class rp extends(er=HTMLElement){static #h={c:[i8,eo]}=ox(this,[],[ei],er);static #d=eo()}class rm{#et=0;#es=new WeakMap;#ei;#eo=0;#er=0;#en=null;#el;#ea=0;#c;static observedAttributes=[];constructor(e){this.#c=e,this.#c.addEventListener("touchmove",this.#eh,{passive:!1}),this.#c.addEventListener("touchstart",this.#ed,{passive:!0}),this.#c.addEventListener("touchend",this.#ec,{passive:!0}),this.#c.addEventListener("wheel",this.#eu,{passive:!1})}#ep(e){return this.#ei?.find(t=>{if(t.scrollHeight>t.clientHeight){let s=e<0&&0!==t.scrollTop,i=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return s||i}return!1})}#em(e,t){let s=this.#es.get(e)??0;s+=t,this.#es.set(e,s),e.scrollTop=s}#eh=e=>{let t=this.#ev();if(!t)return;let{pageY:s,pageX:i}=e.touches.item(0),o=this.#eo-s;if(null===this.#en){let e=this.#er-i;this.#en=Math.abs(o)>Math.abs(e)}!1!==this.#en&&(e.cancelable&&e.preventDefault(),this.#eg(o,t),this.#eo=s)};#eu=e=>{let t=this.#ev();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let s=e.composedPath().filter(e=>e instanceof Element&&this.#c.contains(e)),{clientX:i,clientY:o}=e,r=document.elementsFromPoint(i,o).filter(e=>this.#c.contains(e));if(this.#ei=[...new Set([...s,...r])],this.#et=t.scrollTop,this.#ei)for(let e of this.#ei)this.#es.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#eg(e.deltaY,t)};#ev(){let e=this.#c.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#ed=e=>{let{pageX:t,pageY:s}=e.touches.item(0);for(let e of(this.#ei=document.elementsFromPoint(t,s).filter(e=>this.#c.contains(e)),this.#eo=s,this.#er=t,this.#et=this.#ev()?.scrollTop??0,this.#ei))this.#es.set(e,e.scrollTop);this.#en=null,this.#el=void 0};#ec=()=>{if(this.#en=null,this.#el){let e=this.#ev();(this.#el!==e||e[ra])&&this.#el.scrollBy({top:4*this.#ea,behavior:"smooth"})}};#eg(e,t){let s=this.#ep(e);t[ra]&&e>0||e<0&&!s||!t[ra]&&!s?(t.scrollBy({top:e,behavior:"smooth"}),this.#et+=e,t.scrollTop=this.#et,this.#el=t):s&&(this.#el=s,this.#em(s,e)),this.#ea=e}}en=oO("x-foldview-slot-ng",[o8,oz,rm]);class rv extends(ea=HTMLElement){static #h={c:[i9,el]}=ox(this,[],[en],ea);connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[rd]=this)}static #d=el()}eh=oO("x-foldview-toolbar-ng",[o8,oz]);class rg extends(ec=HTMLElement){static #h={c:[i6,ed]}=ox(this,[],[eh],ec);#ee=void 0;connectedCallback(){let e=rc(this,"X-FOLDVIEW-NG");this.#ee=e?.[rh],this.#ee?.observe(this)}dispose(){this.#ee?.unobserve(this)}static #d=ed()}eu=oM("drop-shadow",!0);class rb{static #h={e:[ep]}=ox(this,[[eu,0,"_handleBlurRadius"]],[]);static observedAttributes=["drop-shadow"];#c;#eb=oA(()=>this.#c.shadowRoot,"#img");_handleBlurRadius=ep(this,oI(this.#eb,"--drop-shadow",void 0,!0));constructor(e){this.#c=e}}em=oM("src",!0),ev=oM("placeholder",!0),eg=oM("blur-radius",!0),eb=oM("crossorigin",!0),ef=oM("referrerpolicy",!0);class rf{static #h={e:[eE,ew,ey,ex,eS]}=ox(this,[[ev,2,"_preloadPlaceholder"],[em,0,"_handleSrc"],[eg,0,"_handleBlurRadius"],[eb,0,"_handleCrossorigin"],[ef,0,"_handleReferrerpolicy"]],[]);static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#c;#eb=(eS(this),oA(()=>this.#c.shadowRoot,"#img"));_handleSrc=eE(this,o_(this.#eb,"src",e=>e||this.#c.getAttribute("placeholder")));_preloadPlaceholder(e){e&&(new Image().src=e)}_handleBlurRadius=ew(this,oI(this.#eb,"--blur-radius",void 0,!0));_handleCrossorigin=ey(this,o_(this.#eb,"crossorigin"));_handleReferrerpolicy=ex(this,o_(this.#eb,"referrerpolicy"));#ef=()=>{let e=this.#eb().src,t=this.#c.getAttribute("placeholder");t&&e!==t&&(this.#eb().src=t)};constructor(e){this.#c=e,this.#eb().addEventListener("error",this.#ef)}connectedCallback(){(null===this.#c.getAttribute("src")||""===this.#c.getAttribute("src"))&&this._handleSrc(null)}}eT=oD("load"),eC=oD("error");class rE{static #h={e:[eL]}=ox(this,[[eT,2,"_enableLoadEvent"],[eC,2,"_enableErrorEvent"]],[]);static observedAttributes=[];#c;#eb=(eL(this),oA(()=>this.#c.shadowRoot,"#img"));_enableLoadEvent(e){e?this.#eb().addEventListener("load",this.#eE,{passive:!0}):this.#eb().removeEventListener("load",this.#eE)}_enableErrorEvent(e){e?this.#eb().addEventListener("error",this.#ew,{passive:!0}):this.#eb().removeEventListener("error",this.#ew)}#eE=()=>{this.#c.dispatchEvent(new CustomEvent("load",{...oH,detail:{width:this.#eb().naturalWidth,height:this.#eb().naturalHeight}}))};#ew=()=>{this.#c.dispatchEvent(new CustomEvent("error",{...oH,detail:{}}))};constructor(e){this.#c=e}}e_=oO("filter-image",[oz,rf,rb,rE],oK({}));class rw extends(eA=HTMLElement){static #h={c:[i7,eI]}=ox(this,[],[e_],eA);static #d=eI()}eO=oO("x-image",[oz,rf,rE],oK({}));class ry extends(eM=HTMLElement){static #h={c:[oe,eR]}=ox(this,[],[eO],eM);static #d=eR()}ek=oM("confirm-type",!0),eD=oM("maxlength",!0),eF=oM("readonly",!0),eN=oM("type",!0),eH=oM("ios-spell-check",!0),eP=oM("spell-check",!0);class rx{static #h={e:[ez,eV,eW,eX,e$]}=ox(this,[[eN,2,"_handleType"],[ek,0,"_handlerConfirmType"],[eD,0,"_handlerMaxlength"],[eF,0,"_handleReadonly"],[[eH,eP],0,"_handleSpellCheck"]],[]);static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#c;#ey=(e$(this),oA(()=>this.#c.shadowRoot,"#input"));_handlerConfirmType=ez(this,o_(this.#ey,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=eV(this,o_(this.#ey,"maxlength",e=>null===e?"140":e));_handleReadonly=eW(this,o_(this.#ey,"readonly",e=>null!==e?"":null));#ex=o_(this.#ey,"type");#eS=o_(this.#ey,"inputmode");_handleType(e){let t="text",s="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":s=e,this.#eS(t),this.#ex(s)}_handleSpellCheck=eX(this,o_(this.#ey,"spellcheck",e=>null===e?"false":"true"));constructor(e){this.#c=e}}eB=oM("placeholder",!0),eU=oM("placeholder-color",!0),eq=oM("placeholder-font-family",!0),eY=oM("placeholder-font-size",!0),ej=oM("placeholder-font-weight",!0);class rS{static #h={e:[eK,eG,eJ,eQ,eZ]}=ox(this,[[eB,0,"_handlerPlaceholder"],[eU,0,"_handlerPlaceholderColor"],[eq,0,"_handlerPlaceholderFontFamily"],[eY,0,"_handlerPlaceholderFontSize"],[ej,0,"_handlerPlaceholderFontWeight"]],[]);static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#c;#ey=oA(()=>this.#c.shadowRoot,"#input");_handlerPlaceholder=eK(this,o_(this.#ey,"placeholder"));_handlerPlaceholderColor=eG(this,oI(this.#ey,"--placeholder-color",void 0,!0));_handlerPlaceholderFontFamily=eJ(this,oI(this.#ey,"--placeholder-font-family",void 0,!0));_handlerPlaceholderFontSize=eQ(this,oI(this.#ey,"--placeholder-font-size",void 0,!0));_handlerPlaceholderFontWeight=eZ(this,oI(this.#ey,"--placeholder-font-weight",void 0,!0));constructor(e){this.#c=e}}e0=oM("value",!1),e1=oM("disabled",!0),e2=oM("autocomplete",!0);class rT{static #h={e:[e3,e4,e5]}=ox(this,[[e0,2,"_handleValue"],[e1,0,"_handleDisabled"],[e2,0,"_handleAutocomplete"]],[]);static observedAttributes=["value","disabled","autocomplete"];#c;#ey=(e5(this),oA(()=>this.#c.shadowRoot,"#input"));_handleValue(e){if(e){let t=parseFloat(this.#c.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#ey();t.value!==e&&(t.value=e)}_handleDisabled=e3(this,o_(this.#ey,"disabled",e=>null!==e?"":null));_handleAutocomplete=e4(this,o_(this.#ey,"autocomplete"));constructor(e){this.#c=e}}let rC={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"};e8=oM("input-filter",!0),e9=oD("lynxinput"),e6=oM("send-composing-input",!0),e7=oD("selection");class rL{static #h={e:[te]}=ox(this,[[[e8,e9],2,"_handleEnableInputEvent"],[e6,2,"_handleSendComposingInput"],[e7,2,"_handleEnableSelectionEvent"]],[]);static observedAttributes=["send-composing-input","input-filter"];#c;#eT=(te(this),!1);#eC=/[^0-9.]|\.(?=.*\.)/g;#ey=oA(()=>this.#c.shadowRoot,"#input");#eL=oA(()=>this.#c.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#ey();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eI,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eI))}_handleSendComposingInput(e){this.#eT=null!==e}#eA=e=>{let t=rC[e.type]??e.type;this.#c.dispatchEvent(new CustomEvent(t,{...oH,detail:{value:this.#ey().value}}))};#e_=e=>{let t=this.#ey(),s=this.#eO(t.value),i=e.isComposing;t.value=s,(!i||this.#eT)&&this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:s,textLength:s.length,cursor:t.selectionStart,isComposing:i,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eI=()=>{let e=this.#ey(),t=this.#eO(e.value);e.value=t,this.#eT||this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:t,textLength:t.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eO(e){let t=e;"number"===this.#c.getAttribute("type")&&(t=t.replace(this.#eC,""));let s=this.#c.getAttribute("input-filter");return s&&(t=t.replace(RegExp(s,"g"),"")),t}_handleEnableSelectionEvent(e){e?this.#ey().addEventListener("select",this.#eR,{passive:!0}):this.#ey().removeEventListener("select",this.#eR)}#eR=()=>{let e=this.#ey();this.#c.dispatchEvent(new CustomEvent("selection",{...oH,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eM=e=>{e.target===this.#ey()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#c=e;const t=this.#ey(),s=this.#eL();t.addEventListener("blur",this.#eA,{passive:!0}),t.addEventListener("focus",this.#eA,{passive:!0}),s.addEventListener("submit",this.#eA,{passive:!0}),s.addEventListener("input",this.#eM,{passive:!0})}}tt=oO("x-input",[oz,rS,rT,rx,rL],oG);class r_ extends(ti=HTMLElement){static #h={c:[ot,ts]}=ox(this,[],[tt],ti);#ek=oA(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,s=this.#ek(),i=s.selectionStart;if(null===i)s.value=t;else{let e=s.value;s.value=e.slice(0,i)+t+e.slice(i)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,s=this.#ek();s.value=e.value,(t=e.index)&&s.setSelectionRange(t,t)}getValue(){let e=this.#ek();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:s}=e,i=this.#ek();1===t&&(s=1);let o=i.selectionStart;if(null===o){let e=i.value;i.value=i.value.substring(0,e.length-s)}else{let e=i.value;i.value=e.slice(0,o-s)+e.slice(o)}}setInputFilter(e){this.#ek().setAttribute("pattern",e.pattern)}select(){let e=this.#ek();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#ek().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#ek().focus(e)}blur(){this.#ek().blur()}connectedCallback(){let e=this.#ek();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}static #d=ts()}to=oM("events-pass-through",!0),tr=oM("visible",!1);class rI{static #h={e:[tn]}=ox(this,[[to,2,"_handleEventsPassThrough"],[tr,2,"_handleVisible"]],[]);static observedAttributes=["visible","events-pass-through"];#c;#eD=(tn(this),!!window.HTMLDialogElement);#eF=!1;constructor(e){this.#c=e}#eN=oA(()=>this.#c.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#eN().addEventListener("click",this.#eH,{passive:!1}),this.#c.addEventListener("click",this.#eH,{passive:!1})):(this.#eN().removeEventListener("click",this.#eH),this.#c.removeEventListener("click",this.#eH))}_handleVisible(e){this.#eF=null!==e,this.#eD&&(this.#eF?(this.#eN().showModal(),this.#c.dispatchEvent(new CustomEvent("showoverlay",oH))):(this.#eN().close(),this.#c.dispatchEvent(new CustomEvent("dismissoverlay",oH))))}#eH=e=>{e.stopPropagation();let t=this.#eN();if(e.target===this.#c||e.target===t){t.close();let{clientX:s,clientY:i}=e,o=document.elementFromPoint(s,i);o?.tagName==="LYNX-VIEW"&&o.shadowRoot&&(o=o.shadowRoot.elementFromPoint(s,i)??o),o?.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#eF&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#eD||(this.#eN().style.display="none")}}tl=oO("x-overlay-ng",[oz,rI],oQ);class rA extends(th=HTMLElement){static #h={c:[os,ta]}=ox(this,[],[tl],th);get[oP](){return this.shadowRoot.firstElementChild}static #d=ta()}class rO extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(rO.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class rR{#c;static observedAttributes=[];#eP;constructor(e){this.#c=e}connectedCallback(){if(IntersectionObserver&&!this.#eP){let e=this.#c.parentElement;e&&(this.#eP=new IntersectionObserver(e=>{let t=!1,s=!1;e.forEach(e=>{t=e.intersectionRatio>0,s=e.intersectionRatio>.9}),this.#c.dispatchEvent(new rO(t,s)),s&&this.#c.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eP.observe(this.#c))}}dispose(){this.#eP&&(this.#eP.disconnect(),this.#eP=void 0)}}td=oO("x-refresh-footer",[o8,oz,rR]);class rM extends(tu=HTMLElement){static #h={c:[oi,tc]}=ox(this,[],[td],tu);connectedCallback(){this.setAttribute("slot","footer")}static #d=tc()}tp=oO("x-refresh-header",[o8,oz,rR]);class rk extends(tv=HTMLElement){static #h={c:[oo,tm]}=ox(this,[],[tp],tv);connectedCallback(){this.setAttribute("slot","header")}static #d=tm()}tg=oD("headeroffset"),tb=oD("headershow"),tf=oD("footeroffset"),tE=oD("startrefresh"),tw=oD("headerreleased"),ty=oD("startloadmore"),tx=oD("footerreleased");class rD{static #h={e:[tS]}=ox(this,[[[tg,tb,tf],2,"_handleComplexEventEnableAttributes"],[[tE,tw,ty,tx],2,"_handleXEnableHeaderOffsetEvent"]],[]);#c;static observedAttributes=[];#ez=(tS(this),oA(()=>this.#c,"x-refresh-view > x-refresh-header:first-of-type"));#eV=oA(()=>this.#c,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#c=e,this.#c.addEventListener(rO.EventName,this.#eW)}#eX={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#eX[t]=e;let{headeroffset:s,headershow:i,footeroffset:o}=this.#eX;s||i||o?this.#e$():this.#eB()}_handleXEnableHeaderOffsetEvent(e,t){this.#eX[t]=e;let{startrefresh:s,headerreleased:i,startloadmore:o,footerreleased:r}=this.#eX;i||r||o||s?this.#eU():this.#eq()}#eY=!1;#ej=!1;#eK=!1;#eG=!1;#eW=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#eY=e.startShowing,this.#ej=e.fullyShowing):(this.#eK=e.startShowing,this.#eG=e.fullyShowing)};#eJ=!1;#eU(){this.#eJ||(this.#c.addEventListener("touchend",this.#eQ),this.#eJ=!0)}#eQ=()=>{this.#ej?(this.#c.dispatchEvent(new CustomEvent("headerreleased",oH)),this.#c.dispatchEvent(new CustomEvent("startrefresh",{...oH,detail:{isManual:this.#c._nextRefreshIsManual}})),this.#c._nextRefreshIsManual=!0):("true"===this.#c.getAttribute("enable-auto-loadmore")&&this.#eK||this.#eG)&&(this.#c.dispatchEvent(new CustomEvent("footerreleased",oH)),this.#c.dispatchEvent(new CustomEvent("startloadmore",oH)))};#eq(){this.#eJ&&this.#c.removeEventListener("touchend",this.#eQ)}#eZ=!1;#e0=!1;#e$(){this.#e0||(this.#c.addEventListener("touchstart",this.#e1),this.#c.addEventListener("touchend",this.#e2),this.#c.addEventListener("touchcancel",this.#e2),this.#c.shadowRoot.querySelector("#container").addEventListener("scroll",this.#L))}#e2=()=>{this.#eZ=!1};#e1=()=>{this.#eZ=!0};#L=()=>{if(this.#eY&&(this.#eX.headershow||this.#eX.headeroffset)){let e=this.#ez();if(e){let t=parseFloat(getComputedStyle(e).height),s=this.#c.shadowRoot.querySelector("#container").scrollTop;this.#c.dispatchEvent(new CustomEvent("headershow",{...oH,detail:{isDragging:this.#eZ,offsetPercent:1-s/t}})),this.#c.dispatchEvent(new CustomEvent("headeroffset",{...oH,detail:{isDragging:this.#eZ,offsetPercent:1-s/t}}))}}else if(this.#eK&&this.#eX.footeroffset){let e=this.#eV();if(e){let t=this.#c.shadowRoot.querySelector("#container").scrollTop,s=parseFloat(getComputedStyle(e).height);this.#c.dispatchEvent(new CustomEvent("footeroffset",{...oH,detail:{isDragging:this.#eZ,offsetPercent:1-t/s}}))}}};#eB(){this.#e0&&(this.#c.removeEventListener("touchstart",this.#e1),this.#c.removeEventListener("touchend",this.#e2),this.#c.removeEventListener("touchcancel",this.#e2),this.#c.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#L))}dispose(){this.#eq(),this.#eB()}}tT=oO("x-refresh-view",[o8,oz,rD],oZ),new class extends oN{constructor(){super(or),tC()}static #h=(()=>{class e extends(tL=HTMLElement){static #h={c:[or,tC]}=ox(this,[],[tT],tL);static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.removeAttribute("x-magnet-enable")}finishLoadMore(){this.querySelector("x-refresh-view > x-refresh-footer:first-of-type")?.removeAttribute("x-magnet-enable")}autoStartRefresh(){let e=this.shadowRoot.querySelector("#container");this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,e.scroll({top:0,behavior:"smooth"})}#e3=oA(()=>this.shadowRoot,"#container");#e4=oA(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#e3(),t=this.#e4();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#e3(),s=this.#e4();e>0?s.scrollTop=e:t.scrollTop=s.offsetTop+e}get scrollHeight(){return this.#e4().scrollHeight}get[oB](){return this}}})()},t_=oM("src",!0),tI=oM("content",!0),tA=oD("load");class rF{static #h={e:[tO]}=ox(this,[[t_,2,"_handleSrc"],[tI,2,"_handleContent"],[tA,2,"_enableLoadEvent"]],[]);static observedAttributes=["src","content"];#c;#e5=(tO(this),null);#eb=oA(()=>this.#c.shadowRoot,"#img");_handleSrc(e){e?this.#eb().src=e:this.#eb().src=""}_handleContent(e){if(this.#e5&&URL.revokeObjectURL(this.#e5),!e){this.#e5="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),s=URL.createObjectURL(t);this.#e5=s,this.#eb().src=s}_enableLoadEvent(e){e?this.#eb().addEventListener("load",this.#eE,{passive:!0}):this.#eb().removeEventListener("load",this.#eE)}#eE=()=>{this.#c.dispatchEvent(new CustomEvent("load",{...oH,detail:{width:this.#eb().naturalWidth,height:this.#eb().naturalHeight}}))};constructor(e){this.#c=e}}tR=oO("x-svg",[oz,rF],'<img part="img" alt="" loading="lazy" id="img" /> ');class rN extends(tk=HTMLElement){static #h={c:[on,tM]}=ox(this,[],[tR],tk);static #d=tM()}tD=oO("x-swiper-item",[o8,oz]);class rH extends(tN=HTMLElement){static #h={c:[ol,tF]}=ox(this,[],[tD],tN);static #d=tF()}tH=oD("transition"),tP=oD("scrollstart"),tz=oD("lynxscrollend"),tV=oD("change"),tW=oD("change-event-for-indicator");class rP{static #h={e:[tX,t$]}=ox(this,[[[tP,tz,tV,tW],2,"_enableScrollEventProcessor"],[tH,0,"_handleEnableTransitionEvent"]],[]);static observedAttributes=[];#c;#e8=(t$(this),0);#e9=0;#eZ=!1;#g;#e6=!1;constructor(e){this.#c=e}#e4=oA(()=>this.#c.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=tX(this,oL(this.#e4,"scroll",this.#e7,{passive:!0}));#L(){o$||(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#I()},100)),this.#e6||(this.#c.dispatchEvent(new CustomEvent("scrollstart",{...oH,detail:{current:this.#e8,isDragged:this.#eZ}})),this.#e6=!0);let e=this.#e4(),t=this.#c.isVertical,s=t?e.scrollTop:e.scrollLeft,i=t?e.clientHeight:e.clientWidth,o=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#e9-s)>i/4||s<10||Math.abs(s-o)<=i){let e=this.#c.currentIndex;e!==this.#e8&&(this.#c.dispatchEvent(new CustomEvent("change",{...oH,detail:{current:e,isDragged:this.#eZ}})),this.#e8=e),this.#e9=s}}#I(){this.#c.dispatchEvent(new CustomEvent("lynxscrollend",{...oH,detail:{current:this.#e8}})),this.#e6=!1}#te(){this.#eZ=!0}#tt(){this.#eZ=!1}#e7(){this.#c.dispatchEvent(new CustomEvent("transition",{...oH,detail:{dx:this.#e4().scrollLeft,dy:this.#e4().scrollTop}}))}#ts=[oL(this.#e4,"scroll",this.#L.bind(this),{passive:!0}),oL(this.#e4,"touchstart",this.#te.bind(this),{passive:!0}),oL(this.#e4,"touchend",this.#tt.bind(this),{passive:!0}),oL(this.#e4,"touchcancel",this.#tt.bind(this),{passive:!0}),oL(this.#e4,"scrollend",this.#I.bind(this),{passive:!0})];#eX={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#eX[t]=e;let{lynxscrollend:s,scrollstart:i,change:o}=this.#eX,r=o||s||i||this.#eX["change-event-for-indicator"];this.#ts.forEach(e=>e(r))}connectedCallback(){this.#e8=parseFloat(this.#c.getAttribute("current")??"0");let e=this.#c.isVertical;this.#e9=e?this.#e4().scrollTop:this.#e4().scrollLeft}}tB=oM("current",!1),tU=oM("interval",!1),tq=oM("autoplay",!1);class rz{static #h={e:[tY]}=ox(this,[[tB,2,"_handleCurrentChange"],[[tU,tq],2,"_handleAutoplay"]],[]);static observedAttributes=["current","interval","autoplay"];#c;constructor(e){this.#c=e}#ti(){this.#c.currentIndex===this.#c.childElementCount-1?this.#c.circularPlay&&(this.#c.currentIndex=0):this.#c.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#c.currentIndex=t)}#to;#tr=(tY(this),(()=>{this.#ti()}).bind(this));#tn(e){this.#tl(),this.#to=setInterval(this.#tr,e)}#tl(){this.#to&&clearInterval(this.#to)}_handleAutoplay(){if(null!==this.#c.getAttribute("autoplay")){let e=this.#c.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#tn(t)}}dispose(){this.#tl()}}tj=oM("circular",!1),tK=oM("vertical",!0);class rV{static #h={e:[tG]}=ox(this,[[tj,2,"_handleCircular"],[tK,2,"_handleVerticalChange"]],[]);static observedAttributes=["circular","vertical"];#c;#ta=(tG(this),!1);#th;#td=0;#e4=oA(()=>this.#c.shadowRoot,"#content").bind(this);constructor(e){this.#c=e}#tc=oA(()=>this.#c.shadowRoot,"#circular-start").bind(this);#tu=oA(()=>this.#c.shadowRoot,"#circular-end").bind(this);#tp(e){let t=this.#c.childElementCount;if(t>2){let{current:s,isDragged:i,__isFirstLayout:o}=e.detail;if(0===s||s===t-1||2===s||s===t-2){let e,r=this.#e4(),n=this.#tc().assignedElements(),l=this.#tu().assignedElements(),a=this.#c.firstElementChild,h=this.#c.lastElementChild,d=this.#c.snapDistance;if(0===s?(l.forEach(e=>e.removeAttribute("slot")),h.setAttribute("slot","circular-start"),e=a):s===t-1?(n.forEach(e=>e.removeAttribute("slot")),a.setAttribute("slot","circular-end"),e=h):(n.forEach(e=>e.removeAttribute("slot")),l.forEach(e=>e.removeAttribute("slot")),e=this.#c.children[s]),this.#ta){let t="carousel"===this.#c.getAttribute("mode")?.8*r.clientHeight/2:r.clientHeight/2;this.#td=e.offsetTop+e.offsetHeight/2-d-t,r.scrollTop=this.#td}else{let t="carousel"===this.#c.getAttribute("mode")?.8*r.clientWidth/2:r.clientWidth/2;this.#td=e.offsetLeft+e.offsetWidth/2-d-t,r.scrollLeft=this.#td}if(!i){let e=this.#c.getAttribute("mode");if(o&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#tm(o?"instant":"smooth")}}}}#tm(e){let t=this.#e4(),s=this.#c.snapDistance;t.scrollBy({top:this.#ta?s:0,left:this.#ta?0:s,behavior:e??"smooth"})}#ts=[oL(()=>this.#c,"change",this.#tp.bind(this),{passive:!0}),oL(()=>this.#c,"touchmove",this.#tv.bind(this),{passive:!1}),oL(()=>this.#c,"touchend",this.#tg.bind(this),{passive:!1}),oL(()=>this.#c,"touchcancel",this.#tg.bind(this),{passive:!1})];_handleCircular(e){this.#ts.forEach(t=>t(null!=e)),null!==e&&this.#tp({detail:{current:this.#c.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#tv(e){let t=e.touches.item(0);if(t){let e=this.#ta?t.pageY:t.pageX;if(void 0!==this.#th){this.#tb();let t=this.#th-e;this.#td+=t}this.#th=e}}#tg(e){this.#tf(),this.#tm(),this.#th=void 0}_handleVerticalChange(e){this.#ta=null!==e}#tE;#tb(){if(!this.#tE){let e=this.#e4();this.#td=this.#ta?e.scrollTop:e.scrollLeft,this.#tE=setInterval(()=>{this.#ta?e.scrollTop=this.#td:e.scrollLeft=this.#td},10)}}#tf(){this.#tE&&(clearInterval(this.#tE),this.#tE=void 0)}dispose(){this.#tf()}}tJ=oM("indicator-color",!0),tQ=oM("indicator-active-color",!0),tZ=oM("page-margin",!0),t0=oM("previous-margin",!0),t1=oM("next-margin",!0);class rW{static #h={e:[t2,t3,t4,t5,t8]}=ox(this,[[tJ,0,"_handleIndicatorColor"],[tQ,0,"_handleIndicatorActiveColor"],[tZ,0,"_handlePageMargin"],[t0,0,"_handlePreviousMargin"],[t1,0,"_handleNextMargin"]],[]);static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#c;#tw=0;#ty=oA(()=>this.#c.shadowRoot,"#indicator-container");#tx=oA(()=>this.#c.shadowRoot,"#indicator-style");#tS;constructor(e){this.#c=e}_handleIndicatorColor=t2(this,oI(this.#ty,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=t3(this,oI(this.#ty,"--indicator-active-color",void 0,!0));_handlePageMargin=t4(this,oI(this.#ty,"--page-margin",void 0,!0));_handlePreviousMargin=t5(this,oI(this.#ty,"--previous-margin",void 0,!0));_handleNextMargin=t8(this,oI(this.#ty,"--next-margin",void 0,!0));#tT(){let e=this.#c.childElementCount;if(e!==this.#tw){let t="";for(let s=0;s<e;s++)t+=`<div style="animation-timeline:--x-swiper-item-${s};" part="indicator-item"></div>`;if(this.#ty().innerHTML=t,e>5){for(let t=0;t<e;t++)this.#c.children.item(t)?.style.setProperty("view-timeline-name",`--x-swiper-item-${t}`);this.#tx().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#tw=e}connectedCallback(){if(this.#tT(),this.#tS=new MutationObserver(this.#tT.bind(this)),this.#tS.observe(this.#c,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),!CSS.supports("timeline-scope","--a, --b")){this.#c.addEventListener("change",(({detail:e})=>{let t=e.current,s=this.#c.childElementCount,i=this.#ty();for(let e=0;e<s;e++){let s=i.children[e];s&&(e===t?s.style.setProperty("background-color","var(--indicator-active-color)","important"):s.style.removeProperty("background-color"))}}).bind(this));let e=parseFloat(this.#c.getAttribute("current")??"0");this.#ty().children[e]?.style.setProperty("background-color","var(--indicator-active-color)","important")}}dispose(){this.#tS?.disconnect(),this.#tS=void 0}}t9=oO("x-swiper",[oz,rW,rP,rV,rz],o0),new class extends oN{constructor(){super(oa),t6()}static #h=(()=>{class e extends(t7=HTMLElement){static #h={c:[oa,t6]}=ox(this,[],[t9],t7);static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#e4=oA(()=>this.shadowRoot,"#content").bind(this);#tC(){let e=0,t=Number.MAX_SAFE_INTEGER,s=0;if(this.childElementCount>0){let i=this.#e4(),o=this.isVertical,r=this.childElementCount,n=o?i.scrollTop:i.scrollLeft,l=o?i.clientHeight:i.clientWidth,a=o?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,h=n+("carousel"===this.getAttribute("mode")?.8*l/2:l/2);for(let i=0;i<r;i++){let r=this.children[i];if(r){let n=(o?r.offsetTop:r.offsetLeft)+a/2-h,l=Math.abs(n);l<t&&(e=i,t=l,s=n)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:s}}get currentIndex(){return this.#tC().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tL(e,t?"smooth":"instant")}#tL(e,t){let s=this.children.item(e);if(s){let e=this.isVertical,i=0;i="flat-coverflow"===this.getAttribute("mode")?e?s.offsetTop-s.offsetHeight/3:s.offsetLeft-s.offsetWidth/3:e?s.offsetTop:s.offsetLeft,this.#e4().scrollTo({left:e?0:i,top:e?i:0,behavior:t})}}get snapDistance(){return this.#tC().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollTo(...e){if(e.length>0&&"object"==typeof e[0]&&null!==e[0]&&"index"in e[0]){let{index:t,smooth:s=!0}=e[0];if("number"==typeof t)return void this.#tL(t,s?"smooth":"instant")}super.scrollTo(...e)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tL(Number(e),"instant")}get[oB](){return this}}})()},se=oM("src",!0);class rX{static #h={e:[st]}=ox(this,[[se,2,"_handleSrc"]],[]);static observedAttributes=["src"];#c;constructor(e){this.#c=e}#t_=(st(this),oA(()=>this.#c.shadowRoot,"#img"));_handleSrc(e){e?this.#t_().setAttribute("src",e):this.#t_().removeAttribute("src")}}ss=oO("inline-image",[rX],oK({}));class r$ extends(so=HTMLElement){static #h={c:[oh,si]}=ox(this,[],[ss],so);static #d=si()}sr=oO("inline-text",[]);class rB extends(sl=HTMLElement){static #h={c:[od,sn]}=ox(this,[],[sr],sl);static #d=sn()}sa=oO("inline-truncation",[]),new class extends oN{constructor(){super(oc),sh()}static #h=(()=>{class e extends(sd=HTMLElement){static #h={c:[oc,sh]}=ox(this,[],[sa],sd);static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){CSS.supports("selector(:has(inline-truncation))")||this.parentElement?.tagName!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(e.XEnableCustomTruncation,""),this.setAttribute("slot","inline-truncation")}disconnectedCallback(){this.parentElement?.removeAttribute(e.XEnableCustomTruncation)}}})()},sc=oM("text",!0);class rU{static #h={e:[su]}=ox(this,[[sc,2,"_handleText"]],[]);static observedAttributes=["text"];#c;#tI;constructor(e){su(this),this.#c=e}_handleText(e){this.#tI?.remove(),e&&(this.#tI=new Text(e),this.#c.append(this.#tI))}}sp=oO("raw-text",[rU]);class rq extends(sv=HTMLElement){static #h={c:[ou,sm]}=ox(this,[],[sp],sv);static #d=sm()}sg=oM("text-maxlength",!0),sb=oM("text-maxline",!0),sf=oM("tail-color-convert",!0),sE=oD("layout");class rY{static #h={e:[sw]}=ox(this,[[[sg,sb,sf],2,"_handleAttributeChange"],[sE,2,"_handleEnableLayoutEvent"]],[]);static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#tA=(sw(this),!1);#tO=!1;#tR=new Map;#tM;#p;#tk;#tD;#tF=!1;#tN=NaN;#tH=NaN;#tP=!0;#tz=!1;get #tV(){return!this.#tW&&!this.#tP}get #tW(){if(CSS.supports("selector(:has(inline-truncation))"))return this.#c.matches(":has(inline-truncation)");{let e=this.#c.querySelector("inline-truncation");if(e?.parentElement===this.#c)return!0}return!1}get #tX(){return!isNaN(this.#tH)&&(this.#tW||!this.#tP)}#c;constructor(e){this.#c=e}#t$=oA(()=>this.#c.shadowRoot,"#inner-box");#tB(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tR.delete(e)}),"characterData"===e.type&&void 0!==this.#tR.get(e.target)&&this.#tR.set(e.target,e.target.data)})}#tU(){for(let[e,t]of this.#tR)e.nodeType===Node.TEXT_NODE?void 0!==t&&(e.data=t):e.removeAttribute(rY.exceedMathLengthAttribute);this.#c.removeAttribute(rY.exceedMathLengthAttribute),this.#c.removeAttribute(rY.showInlineTruncation)}#tq(e){let t=[],s=e;for(;s=s.nextSibling;)(s.nodeType===Node.TEXT_NODE||s.nodeType===Node.ELEMENT_NODE)&&t.push(s);return t}#tY(){!this.#tO||this.#c.matches("x-text>x-text")||this.#tA||(this.#tA=!0,oC(async()=>{await this.#tj(),this.#tK(),this.#tA=!1}))}async #tj(){if(this.#tk?.parentElement?.removeChild(this.#tk),this.#tU(),!this.#tX&&isNaN(this.#tN))return;await document.fonts.ready;let e=this.#t$().getBoundingClientRect();this.#tD=new rj(this.#c,e);let t=this.#tD,s=(isNaN(this.#tN)?void 0:t.getNodeInfoByCharIndex(this.#tN))?this.#tN:1/0,i=this.#tX&&t.getLineInfo(this.#tH)?t.getLineInfo(this.#tH-1):void 0,o=1/0,r=3;if(i){let{start:s,end:n}=i,l=n-s;if(this.#tW){this.#c.setAttribute(rY.showInlineTruncation,"");let i=this.#c.querySelector("inline-truncation").getBoundingClientRect(),r=e.width,l=i.width;if(r>l){o=n-1;let e=document.createRange(),s=t.getNodeInfoByCharIndex(o),i=n-s.start;for(e.setEnd(s.node,i),e.setStart(s.node,i);e.getBoundingClientRect().width<l&&(o-=1)&&(s=t.getNodeInfoByCharIndex(o));)e.setStart(s.node,o-s.start)}else o=s,this.#c.removeAttribute(rY.showInlineTruncation)}else l<3?(r=l,o=s):o=n-3}let n=Math.min(s,o);if(n<1/0){let e=t.getNodeInfoByCharIndex(n);if(e){let s=n-e.start,i=e.node,o=[];i.nodeType===Node.TEXT_NODE?(this.#tR.set(i,i.data),i.data=i.data.substring(0,s)):o.push(i),o=o.concat(this.#tq(i));let l=i.parentElement;for(;l!==this.#c;)o=o.concat(this.#tq(l)),l=l.parentElement;if(o.forEach(e=>{e.nodeType===Node.TEXT_NODE&&0!==e.data.length?(this.#tR.set(e,e.data),e.data=""):e.nodeType===Node.ELEMENT_NODE&&(this.#tR.set(e,""),e.setAttribute(rY.exceedMathLengthAttribute,""))}),this.#tV){let o=(0===s?t.nodelist.at(e.nodeIndex-1)?.parentElement:i.parentElement)??i.parentElement;this.#tk=new Text(Array(r).fill(".").join("")),o.append(this.#tk)}this.#c.setAttribute(rY.exceedMathLengthAttribute,"")}this.#tG(n)}}#tJ=e=>{this.#tB(e),this.#tY()};#tQ=()=>{if(this.#tF){this.#tF=!1;return}this.#tY()};#tK(){this.#tO&&((this.#tN||this.#tH)&&!this.#tM&&(this.#tM=new MutationObserver(this.#tJ),this.#tM.observe(this.#c,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tH&&!this.#p&&(this.#p=new ResizeObserver(this.#tQ),this.#tF=!0,this.#p.observe(this.#t$(),{box:"content-box"})))}#tZ(){this.#tM?.disconnect(),this.#tM=void 0,this.#p?.disconnect(),this.#p=void 0}_handleAttributeChange(){this.#tN=parseFloat(this.#c.getAttribute("text-maxlength")??""),this.#tH=parseFloat(this.#c.getAttribute("text-maxline")??""),this.#tP="false"!==this.#c.getAttribute("tail-color-convert"),this.#tN<0&&(this.#tN=NaN),this.#tH<1&&(this.#tH=NaN),isNaN(this.#tH)?this.#t$().style.removeProperty("-webkit-line-clamp"):this.#t$().style.webkitLineClamp=this.#tH.toString(),this.#tY()}_handleEnableLayoutEvent(e){this.#tz=e}#tG(e){if(!this.#tz)return;let t=new Proxy(this,{get:(t,s)=>"lineCount"===s?(t.#tD||(t.#tD=new rj(t.#c,t.#c.getBoundingClientRect())),t.#tD.getLineCount()):"lines"===s?new Proxy(t,{get(t,s){let i=parseFloat(s.toString());if(!isNaN(i)){t.#tD||(t.#tD=new rj(t.#c,t.#c.getBoundingClientRect()));let s=t.#tD.getLineInfo(i);if(s)return new Proxy(s,{get(t,s){switch(s){case"start":case"end":return t[s];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#c.dispatchEvent(new CustomEvent("layout",{...oH,detail:t}))}dispose(){this.#tZ()}connectedCallback(){this.#tO=!0,this._handleEnableLayoutEvent(this.#tz),this._handleAttributeChange(),oC(()=>{this.#tG()})}}class rj{#t0=[{start:0}];#t1=[];#t2=[];#c;#t3;nodelist;constructor(e,t){this.#c=e,this.nodelist=new rK(this.#c),this.#t3=t}#t4(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:s}=e,i=e.node,o=document.createRange();o.selectNode(i);for(let e=0;e<i.data.length;e++){o.setEnd(i,e);let r=o.getClientRects().item(s);if(r&&r.right===t.right)return e}return i.data.length}}#t5(e){if(this.#t1[e])return;let{left:t}=this.#t3,s=this.#t1[this.#t1.length-1],i=s?.[s.length-1],o=i?.nodeIndex?i?.nodeIndex+1:0;for(let s=o,i;(i=this.#t8(s))&&e>=this.#t1.length;s++){let e,{node:s}=i;if(s.nodeType===Node.ELEMENT_NODE)e=s.getClientRects();else{let t=document.createRange();t.selectNode(s),e=t.getClientRects()}if(e.length>0){let s=this.#t1[this.#t1.length-1],o=e[0];if(.2>Math.abs(o.left-t)||!s?this.#t1.push([{...i,rect:o,rectIndex:0}]):s.push({...i,rect:o,rectIndex:0}),e.length>1)for(let s=1;s<e.length;s++){let r=e[s];(r.left!==o.left||r.bottom!==o.bottom)&&(.2>Math.abs(r.left-t)?this.#t1.push([{...i,rect:r,rectIndex:s}]):this.#t1[this.#t1.length-1].push({...i,rect:r,rectIndex:s}))}}}}getLineCount(){return this.#t5(1/0),this.#t1.length}getLineInfo(e){if(this.#t5(e+1),e<this.#t1.length){let t=e>0?this.#t0[e-1]??{}:void 0,s=this.#t0[e]??{},i=e<this.#t1.length-1?this.#t0[e+1]??{}:void 0;if(void 0===s.start){let i=this.#t1[e-1],o=i[i.length-1],r=this.#t4(o),n=o.start+r;t&&(t.end=n),s.start=n+1}if(void 0===s.end){let t=this.#t1[e],o=t[t.length-1];if(e===this.#t1.length-1){let e=o.node.nodeType===Node.TEXT_NODE?o.node.data.length:1;s.end=o.start+e}else{let e=this.#t4(o);s.end=o.start+e,i.start=s.end+1}}return s}}#t8(e){let t=this.#t2.length-1,s=this.#t2[t],i=s?s.start+s.length:0;for(let t=this.#t2.length,s;(s=this.nodelist.at(t))&&e>=this.#t2.length;t++){let e=s.nodeType===Node.ELEMENT_NODE?1:s.data.length,o={node:s,length:e,start:i,nodeIndex:t};this.#t2.push(o)}return this.#t2[e]}getNodeInfoByCharIndex(e){let t,s=0,i=this.#t2.length-1;for(;s<=i;){let o=Math.floor((s+i)/2),r=this.#t2[o],n=r.node,l=n.nodeType===Node.TEXT_NODE?n.data.length:1,a=r.start;if(e>=a&&e<a+l){t=r;break}e<a?i=o-1:s=o+1}if(t)return t;for(let t=this.#t2.length,s;s=this.#t8(t);t++)if(e<s.start+s.length)return s}}class rK{#t9=[];#t6;constructor(e){this.#t6=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.tagName;if("X-TEXT"===t||"INLINE-TEXT"===t||"RAW-TEXT"===t||"LYNX-WRAPPER"===t)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#t9[e]||this.#t7(e),this.#t9[e]}#t7(e){let t=null;for(;e>=this.#t9.length&&(t=this.#t6.nextNode());){this.#t9.push(t);break}}}sy=oO("x-text",[oz,rY,rU],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>'),new class extends oN{constructor(){super(op),sx()}static #h=(()=>{class e extends(sS=HTMLElement){static #h={c:[op,sx]}=ox(this,[],[sy],sS);static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(oq.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[oP]=this}})()},sT=oM("placeholder-color",!0),sC=oM("placeholder-font-size",!0),sL=oM("placeholder-font-weight",!0),s_=oM("placeholder-font-family",!0),sI=oM("placeholder",!0);class rG{static #h={e:[sA,sO,sR,sM,sk]}=ox(this,[[sT,0,"_updatePlaceholderColor"],[sC,0,"_updatePlaceholderFontSize"],[sL,0,"_updatePlaceholderFontWeight"],[s_,0,"_updatePlaceholderFontFamily"],[sI,0,"_handlePlaceholder"]],[]);static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#se=oA(()=>this.#c.shadowRoot,"#textarea");_updatePlaceholderColor=sA(this,oI(this.#se,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=sO(this,oI(this.#se,"--placeholder-font-size",void 0,!0));_updatePlaceholderFontWeight=sR(this,oI(this.#se,"--placeholder-font-weight",void 0,!0));_updatePlaceholderFontFamily=sM(this,oI(this.#se,"--placeholder-font-family",void 0,!0));_handlePlaceholder=sk(this,o_(this.#se,"placeholder"));#c;constructor(e){this.#c=e}}sD=oM("confirm-type",!0),sF=oM("maxlength",!0),sN=oM("readonly",!0),sH=oM("ios-spell-check",!0),sP=oM("show-soft-input-onfocus",!0);class rJ{static #h={e:[sz,sV,sW,sX,s$]}=ox(this,[[sD,0,"_handlerConfirmType"],[sF,0,"_handlerMaxlength"],[sN,0,"_handleReadonly"],[sH,0,"_handleSpellCheck"],[sP,0,"_handleShowSoftInputOnfocus"]],[]);static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#c;#st=oA(()=>this.#c.shadowRoot,"#textarea");_handlerConfirmType=sz(this,o_(this.#st,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=sV(this,o_(this.#st,"maxlength",e=>null===e?"140":e));_handleReadonly=sW(this,o_(this.#st,"readonly",e=>null!==e?"":null));_handleSpellCheck=sX(this,o_(this.#st,"spellcheck",e=>null===e?"false":"true"));_handleShowSoftInputOnfocus=s$(this,o_(this.#st,"virtualkeyboardpolicy",e=>null===e?"manual":"auto"));constructor(e){this.#c=e}}sB=oM("confirm-enter",!0),sU=oM("disabled",!0),sq=oM("max-height",!0),sY=oM("min-height",!0),sj=oM("value",!1);class rQ{static #h={e:[sK,sG,sJ,sQ]}=ox(this,[[sB,2,"_handleConfirmEnter"],[sj,2,"_handleValue"],[sU,0,"_handleDisabled"],[sq,0,"_handleMaxHeight"],[sY,0,"_handleMinHeight"]],[]);static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#c;#st=(sQ(this),oA(()=>this.#c.shadowRoot,"#textarea"));#eL=oA(()=>this.#c.shadowRoot,"#form");#ss=!1;_handleConfirmEnter(e){this.#ss=null!==e}_handleDisabled=sK(this,o_(this.#st,"disabled",e=>null!==e?"":null));_handleMaxHeight=sG(this,oI(this.#st,"max-height"));_handleMinHeight=sJ(this,oI(this.#st,"min-height"));_handleValue(e){if(e){let t=parseFloat(this.#c.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#st();t.value!==e&&(t.value=e)}#si=e=>{this.#ss&&"Enter"===e.key&&this.#eL().dispatchEvent(new SubmitEvent("submit"))};constructor(e){this.#c=e,this.#st().addEventListener("keyup",this.#si)}}sZ=oM("input-filter",!0),s0=oD("lynxinput"),s1=oM("send-composing-input",!0),s2=oD("selection");class rZ{static #h={e:[s3]}=ox(this,[[[sZ,s0],2,"_handleEnableConfirmEvent"],[s1,2,"_handleSendComposingInput"],[s2,2,"_handleEnableSelectionEvent"]],[]);static observedAttributes=["send-composing-input","input-filter"];#c;#eT=(s3(this),!1);#st=oA(()=>this.#c.shadowRoot,"#textarea");#eL=oA(()=>this.#c.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#st();e?(t.addEventListener("input",this.#e_,{passive:!0}),t.addEventListener("compositionend",this.#eI,{passive:!0})):(t.removeEventListener("input",this.#e_),t.removeEventListener("compositionend",this.#eI))}_handleSendComposingInput(e){this.#eT=null!==e}#eA=e=>{let t=rC[e.type]??e.type;this.#c.dispatchEvent(new CustomEvent(t,{...oH,detail:{value:this.#st().value}}))};#e_=e=>{let t=this.#st(),s=this.#c.getAttribute("input-filter"),i=s?t.value.replace(RegExp(s,"g"),""):t.value,o=e.isComposing;t.value=i,(!o||this.#eT)&&this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:i,textLength:i.length,cursor:t.selectionStart,isComposing:o,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#eI=()=>{let e=this.#st(),t=this.#c.getAttribute("input-filter"),s=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=s,this.#eT||this.#c.dispatchEvent(new CustomEvent("lynxinput",{...oH,detail:{value:s,textLength:s.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#st().addEventListener("select",this.#eR,{passive:!0}):this.#st().removeEventListener("select",this.#eR)}#eR=()=>{let e=this.#st();this.#c.dispatchEvent(new CustomEvent("selection",{...oH,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#eM=e=>{e.target===this.#st()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#c=e;const t=this.#st(),s=this.#eL();t.addEventListener("blur",this.#eA,{passive:!0}),t.addEventListener("focus",this.#eA,{passive:!0}),s.addEventListener("submit",this.#eA,{passive:!0}),s.addEventListener("input",this.#eM,{passive:!0})}}s4=oO("x-textarea",[oz,rG,rJ,rQ,rZ],o1);class r0 extends(s8=HTMLElement){static #h={c:[om,s5]}=ox(this,[],[s4],s8);#se=oA(()=>this.shadowRoot,"#textarea");get value(){return this.#se().value}set value(e){this.#se().value=e}addText(e){let{text:t}=e,s=this.#se(),i=s.selectionStart;if(null===i)s.value=t;else{let e=s.value;s.value=e.slice(0,i)+t+e.slice(i)}}setValue(e){let t,s=this.#se();s.value=e.value,(t=e.index)&&s.setSelectionRange(t,t)}getValue(){let e=this.#se();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:s}=e,i=this.#se();1===t&&(s=1);let o=i.selectionStart;if(null===o){let e=i.value;i.value=i.value.substring(0,e.length-s)}else{let e=i.value;i.value=e.slice(0,o-s)+e.slice(o)}}select(){let e=this.#se();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#se().setSelectionRange(e.selectionStart,e.selectionEnd)}static #d=s5()}s9=oO("x-view",[o8,oz]);class r1 extends(s7=HTMLElement){static #h={c:[ov,s6]}=ox(this,[],[s9],s7);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(oq.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[oP]=this;static #d=s6()}ie=oM("blur-radius",!0);class r2{static #h={e:[it]}=ox(this,[[ie,2,"_handleBlurRadius"]],[]);static observedAttributes=["blur-radius"];#c;#so=(it(this),oA(()=>this.#c.shadowRoot,"#dynamic-style"));_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#so().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#so().innerHTML=""}constructor(e){this.#c=e}}is=oO("x-blur-view",[oz,r2],'<style id="dynamic-style"></style><slot></slot>');class r3 extends(io=HTMLElement){static #h={c:[og,ii]}=ox(this,[],[is],io);static #d=ii()}ir=oD("change"),il=oD("offsetchange");class r4{static #h={e:[ia]}=ox(this,[[ir,2,"_enableChangeEvent"],[il,2,"_enableOffsetChangeEvent"]],[]);static observedAttributes=[];#c;#sr=(ia(this),!1);#n=!1;#sn=0;#g;constructor(e){this.#c=e}#E=oA(()=>this.#c.shadowRoot,"#content");#sl=()=>{if(!this.#n)return;let e=this.#E(),t=this.#c.clientWidth,s=e.scrollLeft;this.#sa&&!o$&&(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#sh()},100)),this.#c.dispatchEvent(new CustomEvent("offsetchange",{...oH,detail:{offset:s/t}}))};#sh=()=>{if(this.#n){let e=this.#E(),t=this.#c.clientWidth,s=Math.floor(e.scrollLeft/t);s!==this.#sn&&(this.#c.dispatchEvent(new CustomEvent("change",{...oH,detail:{index:s,isDragged:this.#sr}})),this.#sn=s)}};#sd=()=>{this.#sr=!0};#sc=()=>{this.#sr=!1};#sa=!1;_enableChangeEvent(e){this.#sa=e,this.#su()}#sp=!1;_enableOffsetChangeEvent(e){this.#sp=e,this.#su()}#su(){let e=this.#E();this.#sp||this.#sa?e.addEventListener("scroll",this.#sl,{passive:!0}):e.removeEventListener("scroll",this.#sl),o$&&this.#sa?e.addEventListener("scrollend",this.#sh,{passive:!0}):e.removeEventListener("scrollend",this.#sh)}connectedCallback(){this.#n=!0;let e=this.#E();this.#c.addEventListener("touchstart",this.#sd,{passive:!0}),e.addEventListener("touchend",this.#sc,{passive:!0}),e.addEventListener("touchcancel",this.#sc,{passive:!0})}dispose(){let e=this.#E();e.removeEventListener("scroll",this.#sl),e.removeEventListener("scrollend",this.#sh)}}ih=oO("x-viewpager-ng",[o8,oz,r4],o2),new class extends oN{constructor(){super(ob),id()}static #h=(()=>{class e extends(ic=HTMLElement){static #h={c:[ob,id]}=ox(this,[],[ih],ic);static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:s}=e;void 0===s&&(s=!0);let i=this.shadowRoot.children.item(2),o=i.clientWidth*t;i.scrollTo({left:o,behavior:s?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),s=this.shadowRoot.children.item(2),i=()=>{0===s.clientWidth?requestAnimationFrame(i):this.selectTab({index:t,smooth:!1})};oC(i)}}get[oB](){return this}}})()},iu=oO("x-viewpager-item-ng",[o8,oz]);class r5 extends(im=HTMLElement){static #h={c:[of,ip]}=ox(this,[],[iu],im);static #d=ip()}iv=oM("estimated-main-axis-size-px",!0);class r8{static #h={e:[ig]}=ox(this,[[iv,0,"_handlerEstimatedMainAxisSizePx"]],[]);static observedAttributes=["estimated-main-axis-size-px"];#c;_handlerEstimatedMainAxisSizePx=ig(this,oI(()=>this.#c,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`));constructor(e){this.#c=e}}ib=oO("list-item",[oz,r8]),new class extends oN{constructor(){super(oE),iE()}static #h=(()=>{class e extends(iw=HTMLElement){static #h={c:[oE,iE]}=ox(this,[],[ib],iw);static notToFilterFalseAttributes=new Set(["recyclable"])}})()},iy=oM("sticky-offset",!0),ix=oM("span-count",!0),iS=oM("column-count",!0);class r9{static #h={e:[iT,iC]}=ox(this,[[iy,0,"_handlerStickyOffset"],[[ix,iS],0,"_handlerCount"]],[]);static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#c;_handlerStickyOffset=iT(this,oI(()=>this.#c,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`));_handlerCount=iC(this,oI(()=>this.#c,"--list-item-span-count",e=>`${parseFloat(e)}`));constructor(e){this.#c=e}connectedCallback(){let e=this.#c.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),s=()=>{0===this.#c.clientHeight?requestAnimationFrame(s):this.#c.scrollToPosition({position:t})};oC(s)}}}let r6=function(e,t,s){let i,o,r,n,l=0;var a=function(){l=s?.leading===!1?0:new Date().getTime(),i=null,n=e.apply(o,r),i||(o=r=null)};return function(){var h=new Date().getTime();l||s?.leading!==!1||(l=h);var d=t-(h-l);return o=this,r=arguments,d<=0||d>t?(i&&(clearTimeout(i),i=null),l=h,n=e.apply(o,r),i||(o=r=null)):i||s?.trailing===!1||(i=setTimeout(a,d)),n}};iL=oD("scrolltoupper"),i_=oM("upper-threshold-item-count",!0),iI=oD("scrolltolower"),iA=oM("lower-threshold-item-count",!0),iO=oD("lynxscroll"),iR=oD("lynxscrollend"),iM=oD("snap"),ik=oD("scrolltoupperedge"),iD=oD("scrolltoloweredge");class r7{static #h={e:[iF,iN,iH,iP,iz,iV]}=ox(this,[[i_,2,"_handleUpperThresholdItemCountChange"],[iA,2,"_handleLowerThresholdItemCountChange"],[iL,0,"_updateEventSwitches"],[iI,0,"_updateScrollToLowerEventSwitches"],[[iO,iR,iM],0,"_handleScrollEventsSwitches"],[ik,0,"_handleScrollToUpperEdgeEventEnable"],[iD,0,"_handleScrollToLowerEdgeEventEnable"]],[]);static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#c;#sm=(iV(this),oA(()=>this.#c.shadowRoot,"#content"));#sv;#sg;#sb;#b=0;#f=0;#sf=!1;#g;#w=oA(()=>this.#c.shadowRoot,"#upper-threshold-observer");#y=oA(()=>this.#c.shadowRoot,"#lower-threshold-observer");#S(){let e=null!==this.#c.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:s,scrollHeight:i,scrollWidth:o}=this.#sm(),r={scrollTop:t,scrollLeft:s,scrollHeight:i,scrollWidth:o,deltaX:s-this.#b,deltaY:t-this.#f,attachedCells:e?this.#c.getVisibleCells():void 0};return this.#b=s,this.#f=t,r}#sE=e=>{let{isIntersecting:t}=e[0];t&&this.#c.dispatchEvent(new CustomEvent("scrolltoupper",{...oH,detail:this.#S()}))};_updateEventSwitches=iF(this,e=>{if(e?this.#c.setAttribute("x-enable-scrolltoupper-event",""):this.#c.removeAttribute("x-enable-scrolltoupper-event"),this.#eX.scrolltoupper=e,e){this.#sv||(this.#sv=new IntersectionObserver(this.#sE,{root:this.#sm()})),this.#sb||(this.#sb=new MutationObserver(this.#sw));let e=this.#c.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#w():this.#c.children[t-1];s&&this.#sv.observe(s),this.#sb.observe(this.#c,{childList:!0})}else this.#sv&&(this.#sv.disconnect(),this.#sv=void 0),this.#sb&&(this.#sb.disconnect(),this.#sb=void 0)});_handleUpperThresholdItemCountChange(e,t){let s=null!==t?parseFloat(t):0,i=0===s?this.#w():this.#c.children[s-1];i&&this.#sv?.unobserve(i);let o=null!==e?parseFloat(e):0,r=0===o?this.#w():this.#c.children[o-1];r&&this.#sv?.observe(r)}#sy=e=>{let{isIntersecting:t}=e[0];t&&this.#c.dispatchEvent(new CustomEvent("scrolltolower",{...oH,detail:this.#S()}))};#eX={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=iN(this,e=>{if(this.#eX.scrolltolower=e,e?this.#c.setAttribute("x-enable-scrolltolower-event",""):this.#c.removeAttribute("x-enable-scrolltolower-event"),e){this.#sg||(this.#sg=new IntersectionObserver(this.#sy,{root:this.#sm()})),this.#sb||(this.#sb=new MutationObserver(this.#sw));let e=this.#c.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#y():this.#c.children[this.#c.children.length-t];s&&this.#sg.observe(s),this.#sb.observe(this.#c,{childList:!0})}else this.#sg&&(this.#sg.disconnect(),this.#sg=void 0),this.#sb&&(this.#sb.disconnect(),this.#sb=void 0)});_handleLowerThresholdItemCountChange(e,t){let s=null!==t?parseFloat(t):0,i=0===s?this.#y():this.#c.children[this.#c.children.length-s];i&&this.#sg?.unobserve(i);let o=null!==e?parseFloat(e):0,r=0===o?this.#y():this.#c.children[this.#c.children.length-o];r&&this.#sg?.observe(r)}#sw=e=>{let t=e?.[0];if(t?.type==="childList"){if(this.#eX.scrolltolower){this.#sg&&(this.#sg.disconnect(),this.#sg=void 0),this.#sg=new IntersectionObserver(this.#sy,{root:this.#sm()});let e=this.#c.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#y():this.#c.children[this.#c.children.length-t];s&&this.#sg.observe(s)}if(null!==this.#c.getAttribute("x-enable-scrolltoupper-event")){this.#sv&&(this.#sv.disconnect(),this.#sv=void 0),this.#sv=new IntersectionObserver(this.#sE,{root:this.#sm()});let e=this.#c.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#w():this.#c.children[t-1];s&&this.#sv.observe(s)}}};#sx=null;#L=()=>{this.#sf&&!o$&&(clearTimeout(this.#g),this.#g=setTimeout(()=>{this.#I()},100)),this.#c.dispatchEvent(new CustomEvent("lynxscroll",{...oH,detail:this.#S()}))};_handleScrollEventsSwitches=iH(this,(e,t)=>{this.#eX[t]=e;let{lynxscroll:s,lynxscrollend:i,snap:o}=this.#eX,r=this.#c.getAttribute("scroll-event-throttle");this.#sf=null!==i||null!==o;let n=this.#sm();if(this.#sx&&n.removeEventListener("scroll",this.#sx),null!==s||this.#sf){let e=null!==r?parseFloat(r):0,t=r6(this.#L,e,{leading:!0,trailing:!1});this.#sx=t,n.addEventListener("scroll",this.#sx),this.#b=0,this.#f=0}o$&&this.#sf?n.addEventListener("scrollend",this.#I):n.removeEventListener("scrollend",this.#I)});#x=e=>{let{isIntersecting:t,target:s}=e[0],i=s.id;t&&("upper-threshold-observer"===i?this.#c.dispatchEvent(new CustomEvent("scrolltoupperedge",{...oH,detail:this.#S()})):"lower-threshold-observer"===i&&this.#c.dispatchEvent(new CustomEvent("scrolltoloweredge",{...oH,detail:this.#S()})))};_handleScrollToUpperEdgeEventEnable=iP(this,e=>{e?this.#c.setAttribute("x-enable-scrolltoupperedge-event",""):this.#c.removeAttribute("x-enable-scrolltoupperedge-event"),this.#sS(e)});#sS=oX(this.#sm,this.#w,this.#x);_handleScrollToLowerEdgeEventEnable=iz(this,e=>{e?this.#c.setAttribute("x-enable-scrolltoloweredge-event",""):this.#c.removeAttribute("x-enable-scrolltoloweredge-event"),this.#sT(e)});#sT=oX(this.#sm,this.#y,this.#x);#I=()=>{let e=this.#c.getAttribute("item-snap");if(this.#c.dispatchEvent(new CustomEvent("lynxscrollend",{...oH})),null!==e){let e=Array.from(this.#c.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#sm().scrollTop,s=this.#sm().scrollLeft,i=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#c.dispatchEvent(new CustomEvent("snap",{...oH,detail:{position:i&&e.indexOf(i),scrollTop:t,scrollLeft:s}}))}};constructor(e){this.#c=e}}let ne="waterfall-slot",nt="waterfall-style";iW=oD("scrolltolower"),iX=oM("list-type",!0);class ns{static #h={e:[i$]}=ox(this,[[iW,2,"_handleXEnableHeaderOffsetEvent"],[iX,2,"_handlerListType"]],[]);static observedAttributes=["list-type"];#c;#sm=(i$(this),oA(()=>this.#c.shadowRoot,"#content"));#sC=oA(()=>this.#c.shadowRoot,'div[part="lower-threshold-observer"]');#p;#sb;_handleXEnableHeaderOffsetEvent(e){if(e?this.#c.setAttribute("x-enable-scrolltolower-event",""):this.#c.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#sC(),t=this.#c.getAttribute("scroll-orientation")||"vertical",s=this.#sm();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(s.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(s.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#sL=()=>{let e=document.createElement("slot");e.setAttribute("name",`${ne}`),this.#c.shadowRoot?.querySelector("[part=upper-threshold-observer]")?.insertAdjacentElement("afterend",e)};#s_=()=>{let e=parseFloat(this.#c.getAttribute("span-count")||this.#c.getAttribute("column-count")||"")||1,t="vertical"===(this.#c.getAttribute("scroll-orientation")||"vertical"),s=Array(e).fill(0);for(let i=0;i<this.#c.children.length;i++){let o=this.#c.children[i],r=getComputedStyle(o).getPropertyValue("--list-main-axis-gap"),n=getComputedStyle(o).getPropertyValue("--list-cross-axis-gap"),l=t?o.getBoundingClientRect().height+parseFloat(r):o.getBoundingClientRect().width+parseFloat(r);if(null!==o.getAttribute("full-span")){let i=s[0];for(let t=1;t<e;t++)s[t]>i&&(i=s[t]);for(let t=0;t<e;t++)s[t]=i+l;t?(o.setAttribute(`${nt}-left`,"0"),o.setAttribute(`${nt}-top`,`${i}px`)):(o.setAttribute(`${nt}-left`,`${i}px`),o.setAttribute(`${nt}-top`,"0"))}else{let i=0,r=s[0];for(let t=1;t<e;t++)s[t]<r&&(i=t,r=s[t]);let a=`calc(${i} * (100% - ${n} * (${e} - 1))/ ${e} + ${Math.max(0,i)} * ${n})`;t?(o.setAttribute(`${nt}-left`,a),o.setAttribute(`${nt}-top`,`${r}px`)):(o.setAttribute(`${nt}-left`,`${r}px`),o.setAttribute(`${nt}-top`,a)),s[i]+=l}}for(let e=0;e<this.#c.children.length;e++){let t=this.#c.children[e];t.style.setProperty("left",t.getAttribute(`${nt}-left`)),t.style.setProperty("top",t.getAttribute(`${nt}-top`)),t.setAttribute("slot",ne)}};constructor(e){this.#c=e}#sI=()=>{this.#p?.disconnect(),this.#p=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#s_()})}),Array.from(this.#c.children).forEach(e=>{this.#p?.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#sL(),this.#p||this.#sI(),this.#sb||(this.#sb=new MutationObserver(e=>{let t=e?.[0];t?.type==="childList"&&this.#sI()}),this.#sb.observe(this.#c,{childList:!0}));else{this.#p?.disconnect(),this.#p=void 0,this.#sb?.disconnect(),this.#sb=void 0;for(let e=0;e<this.#c.children.length;e++)this.#c.children[e].removeAttribute("slot");this.#c.shadowRoot?.querySelector(`slot[name=${ne}]`)?.remove()}}}iB=oO("x-list",[oz,r9,r7,ns],oJ),new class extends oN{constructor(){super(ow),iU()}static #h=(()=>{class e extends(iq=HTMLElement){static #h={c:[ow,iU]}=ox(this,[],[iB],iq);static notToFilterFalseAttributes=new Set(["enable-scroll"]);#sm=oA(()=>this.shadowRoot,"#content");#sA={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#sO={};get scrollTop(){return this.#sm().scrollTop}set scrollTop(e){this.#sm().scrollTop=e}get scrollLeft(){return this.#sm().scrollTop}set scrollLeft(e){this.#sm().scrollLeft=e}get scrollHeight(){return this.#sm().scrollHeight}get scrollWidth(){return this.#sm().scrollWidth}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let s=parseFloat(e.offset);t={left:s,top:s}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#sm().scrollTop=0,this.#sm().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let s=this.children.item(e.position);s instanceof HTMLElement&&(t=t?{left:s.offsetLeft+t.left,top:s.offsetTop+t.top}:{left:s.offsetLeft,top:s.offsetTop})}}t&&this.#sm().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#sR=e=>{if(!this.#sA.isScrolling)return;if(!this.#sA.lastTimestamp){this.#sA.lastTimestamp=e,requestAnimationFrame(this.#sR);return}let t=this.#sm(),s=(e-this.#sA.lastTimestamp)/1e3*this.#sA.rate;t.scrollBy({left:s,top:s,behavior:"auto"}),this.#sA.lastTimestamp=e;let i="vertical"===(this.getAttribute("scroll-orientation")||"vertical");(i?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#sA.autoStop?(i?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#sA.isScrolling=!1):requestAnimationFrame(this.#sR)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#sA={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let s=this.#sm(),i="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?s.clientHeight<=s.scrollHeight:s.clientWidth<=s.scrollWidth;this.#sA.lastTimestamp=0,i?setTimeout(()=>requestAnimationFrame(this.#sR),0):requestAnimationFrame(this.#sR)}else this.#sA.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#sO),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);return e.map(e=>{let s=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:s.bottom,top:s.top,left:s.left,right:s.right,index:t.indexOf(e)}})};#sM=()=>Object.values(this.#sO).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#sk=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,s=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(s&&!t){let e=this.#sM();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...oH,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#sM()}}))},100);return}if(i){let s=e.target?.getAttribute("item-key");if(!s)return;t?this.#sO[s]&&delete this.#sO[s]:this.#sO[s]=e.target;return}};connectedCallback(){this.#sm().addEventListener("contentvisibilityautostatechange",this.#sk,{passive:!0})}}})()},iY=oM("src",!0),ij=oM("html",!0);class ni{static #h={e:[iK,iG]}=ox(this,[[iY,0,"_handleSrc"],[ij,0,"_handleHtml"]],[]);static observedAttributes=["src","html"];#c;#sD=oA(()=>this.#c.shadowRoot,"#webview");constructor(e){this.#c=e}_handleSrc=iK(this,o_(this.#sD,"src"));_handleHtml=iG(this,o_(this.#sD,"srcdoc"))}iJ=oO("x-webview",[oz,ni],o3);class no extends(iZ=HTMLElement){static #h={c:[oy,iQ]}=ox(this,[],[iJ],iZ);#sD=oA(()=>this.shadowRoot,"#webview");#sF=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#sD().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#sD().src}}))};#sN=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}})),this.dispatchEvent(new CustomEvent("binderror",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}}))};#sH=e=>{e.source===this.#sD().contentWindow&&(this.dispatchEvent(new CustomEvent("message",{bubbles:!0,composed:!0,detail:{msg:e.data,data:e.data}})),this.dispatchEvent(new CustomEvent("bindmessage",{bubbles:!0,composed:!0,detail:{msg:e.data}})))};connectedCallback(){this.#sD().addEventListener("load",this.#sF),this.#sD().addEventListener("error",this.#sN),window.addEventListener("message",this.#sH)}disconnectedCallback(){this.#sD().removeEventListener("load",this.#sF),this.#sD().removeEventListener("error",this.#sN),window.removeEventListener("message",this.#sH)}get src(){return this.getAttribute("src")}set src(e){null===e?this.removeAttribute("src"):this.setAttribute("src",e)}get html(){return this.getAttribute("html")}set html(e){null===e?this.removeAttribute("html"):this.setAttribute("html",e)}reload(){this.#sD().src=this.#sD().src}static #d=iQ()}}}]);
309
+ <iframe id="webview" part="webview"></iframe>`,o8=CSS.supports("-webkit-box-reflect: above")&&CSS.supports("transition-behavior:allow-discrete")&&CSS.supports("content-visibility: auto");class o3{static observedAttributes=[];static observedCSSProperties=["--lynx-display","--lynx-linear-orientation"];#s;constructor(e){this.#s=e,this.cssPropertyChangedHandler={"--lynx-display":this.#_,"--lynx-linear-orientation":this.#w}}#_=(0,oH.H$)(()=>this.#s,"lynx-computed-display");#w=(0,oH.H$)(()=>this.#s,"lynx-linear-orientation")}let o9=o8?void 0:o3;ea=(0,oH.uA)("scroll-view",[o9,o$.O,oV,oP,oB,oX],oZ),new class extends oN{constructor(){super(o),eh()}static #e=(()=>{class e extends(ed=HTMLElement){static #e={c:[o,eh]}=(0,oD._)(this,[],[ea],ed);static notToFilterFalseAttributes=new Set(["enable-scroll"]);static scrollInterval=100;#x;scrollTo(...e){let t;if("string"==typeof e[0].offset){let s=parseFloat(e[0].offset);t={left:s,top:s}}else"number"==typeof e[0].offset&&(t={left:e[0].offset,top:e[0].offset});if("number"==typeof e[0].index){let s=e[0].index;if(0===s)this.scrollTop=0,this.scrollLeft=0;else if(s>0&&s<this.childElementCount){let e=this.children.item(s);e instanceof HTMLElement&&(t=t?{left:e.offsetLeft+t.left,top:e.offsetTop+t.top}:{left:e.offsetLeft,top:e.offsetTop})}}t?this.scrollTo({...t,behavior:e[0].smooth?"smooth":"auto"}):super.scrollTo(...e)}autoScroll(t){if(clearInterval(this.#x),t.start){let s=("number"==typeof t.rate?t.rate:parseFloat(t.rate))*e.scrollInterval/1e3;this.#x=setInterval(e=>{e.scrollBy({left:s,top:s,behavior:"smooth"})},e.scrollInterval,this)}}get[oW.l](){return this}}})()};let o4=Symbol("__src"),o5=Symbol("__src"),o6={loadstart:{code:0,type:"init"},canplay:{code:1,type:"playable"},stalled:{code:2,type:"stalled"},error:{code:3,type:"error"}},o7={stop:{code:0,type:"stopped"},play:{code:1,type:"playing"},pause:{code:2,type:"paused"}};ec=(0,oH._y)("src",!0),eu=(0,oH._y)("loop",!0),em=(0,oH._y)("pause-on-hide",!0);class le{static #e={e:[ep,eg]}=(0,oD._)(this,[[ec,2,"_handleSrc"],[em,2,"_handlePauseOnHide"],[eu,0,"_handleLoop"]],[]);static observedAttributes=["src","loop","pause-on-hide"];#s;#S=(eg(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#audio"));_handleSrc(e){let t;try{t=JSON.parse(e||"")||{}}catch(e){console.error(`JSON.parse src error: ${e}`),t={}}null===e?this.#s.dispatchEvent(new CustomEvent("error",{...oz.$,detail:{code:-1,msg:"",from:"res loader",currentSrcID:this.#s[o4]?.id}})):(t?.id===void 0||t?.play_url===void 0)&&this.#s.dispatchEvent(new CustomEvent("error",{...oz.$,detail:{code:-2,msg:"",from:"res loader",currentSrcID:this.#s[o4]?.id}})),this.#s[o4]=t,this.#s[o5]=void 0,this.#s.stop()}_handleLoop=ep(this,(0,oH.H$)(this.#S,"loop"));#T=()=>{"hidden"===document.visibilityState&&this.#s.pause()};_handlePauseOnHide(e){null!==e?document.addEventListener("visibilitychange",this.#T,{passive:!0}):document.removeEventListener("visibilitychange",this.#T)}constructor(e){this.#s=e}}class lt{static observedAttributes=[];#s;#C;#S=(0,oH.Ut)(()=>this.#s.shadowRoot,"#audio");#L=e=>{let t=Number(this.#s.getAttribute("interval")),s=Number.isNaN(t)?0:t;this.#C=setInterval(()=>{this.#s.dispatchEvent(new CustomEvent("timeupdate",{...oz.$,detail:{currentTime:this.#S().currentTime,currentSrcID:this.#s[o4]?.id}}))},s);let i=o7[e.type];this.#s.dispatchEvent(new CustomEvent("playbackstatechanged",{...oz.$,detail:{code:i?.code,type:i?.type,currentSrcID:this.#s[o4]?.id}}))};#I=e=>{clearInterval(this.#C);let t=o7[e.type];this.#s.dispatchEvent(new CustomEvent("playbackstatechanged",{...oz.$,detail:{code:t?.code,type:t?.type,currentSrcID:this.#s[o4]?.id}}))};#A=e=>{let t=o6[e.type];this.#s.dispatchEvent(new CustomEvent("loadingstatechanged",{...oz.$,detail:{code:t?.code,type:t?.type,currentSrcID:this.#s[o4]?.id}}))};#O=e=>{this.#A(e);let t=e.target?.error?.code,s=t===MediaError.MEDIA_ERR_DECODE?-5:-6;t===MediaError.MEDIA_ERR_DECODE&&(s=-5),this.#s.dispatchEvent(new CustomEvent("error",{...oz.$,detail:{code:s,msg:"",from:"player",currentSrcID:this.#s[o4]?.id}}))};#R=()=>{let e=null!==this.#s.getAttribute("loop");this.#s.dispatchEvent(new CustomEvent("finished",{...oz.$,detail:{loop:e,currentSrcID:this.#s[o4]?.id}}))};constructor(e){this.#s=e}connectedCallback(){let e=this.#S();e.addEventListener("play",this.#L,{passive:!0}),e.addEventListener("pause",this.#I,{passive:!0}),e.addEventListener("ended",this.#R,{passive:!0}),e.addEventListener("loadstart",this.#A,{passive:!0}),e.addEventListener("canplay",this.#A,{passive:!0}),e.addEventListener("stalled",this.#A,{passive:!0}),e.addEventListener("error",this.#O,{passive:!0})}}ev=(0,oH.uA)("x-audio-tt",[o$.O,le,lt],'<audio id="audio"></audio>');class ls extends(eE=HTMLElement){static #e={c:[l,eb]}=(0,oD._)(this,[],[ev],eE);#M=(0,oH.Ut)(()=>this.shadowRoot,"#audio");#S=(0,oH.Ut)(()=>this.shadowRoot,"#audio");#k=(0,oH.H$)(this.#S,"src");[o4];[o5];#D=()=>{let e,t=this[o4];if(t&&t.id&&t.play_url){try{e=JSON.parse(this.getAttribute("headers")||"{}")||{}}catch(t){console.error(`JSON.parse headers error: ${t}`),e={}}this[o5]=new Promise(async(s,i)=>{this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...oz.$,detail:{code:0,type:"loading",currentSrcID:t.id}}));let o=await fetch(t.play_url,{headers:e});o.ok||(this.dispatchEvent(new CustomEvent("error",{...oz.$,detail:{code:-3,msg:"",from:"res loader",currentSrcID:t.id}})),i()),this.dispatchEvent(new CustomEvent("srcloadingstatechanged",{...oz.$,detail:{code:1,type:"success",currentSrcID:t.id}}));let l=await o.blob(),n=URL.createObjectURL(l);this.#k(n),s()})}};play(){return this[o5]||this.#D(),this[o5]?.then(()=>{let e=this.#M();e.currentTime=0,e.play()}),{currentSrcID:this[o4]?.id,loadingSrcID:""}}stop(){let e=this.#M(),t=o7.stop;return this.dispatchEvent(new CustomEvent("playbackstatechanged",{...oz.$,detail:{code:t?.code,type:t?.type,currentSrcID:this[o4]?.id}})),e.currentTime=0,e.pause(),{currentSrcID:this[o4]?.id}}pause(){return this.#M().pause(),{currentSrcID:this[o4]?.id}}resume(){return this.#M().play(),{currentSrcID:this[o4]?.id,loadingSrcID:""}}seek(e){return this.#M().currentTime=(e.currentTime||0)/1e3,this.dispatchEvent(new CustomEvent("seek",{...oz.$,detail:{seekresult:1,currentSrcID:this[o4]?.id}})),{currentSrcID:this[o4]?.id}}mute(e){return this.#M().muted=e.mute,{currentSrcID:this[o4]?.id}}playerInfo(){var e;let t=this.#M(),s=t.buffered,i=s.end(s.length-1);return{currentSrcID:this[o4]?.id,duration:1e3*t.duration,playbackState:(e=t)?e.paused?2*!e.ended:e.currentTime>0?1:3:-1,currentTime:t.currentTime,cacheTime:i}}prepare(){this[o5]||this.#D()}setVolume(e){return this.#M().volume=e.volume,{code:1}}static #t=eb()}ef=(0,oH._y)("name",!0),ey=(0,oH._y)("height",!0),e_=(0,oH._y)("width",!0);class li{static #e={e:[ew,ex,eS,eT]}=(0,oD._)(this,[[ef,0,"handleName"],[ey,0,"handleHeight"],[e_,0,"handleWidth"]],[]);static observedAttributes=["name","height","width"];#s;#H;#F=(eT(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#canvas"));constructor(e){this.#s=e}handleName=ew(this,(0,oH.H$)(this.#F,"name"));handleHeight=ex(this,(0,oH.H$)(this.#F,"height"));handleWidth=eS(this,(0,oH.H$)(this.#F,"width"));#N=e=>{let{contentRect:t}=e[0],s=this.#s.shadowRoot.firstElementChild;if(s){let{height:e,width:i}=t;e*=window.devicePixelRatio,i*=window.devicePixelRatio;let o=new CustomEvent("resize",{...oz.$,detail:{height:e,width:i}});o.height=e,o.width=i,s.dispatchEvent(o)}};#$(){this.#H||(this.#H=new ResizeObserver(this.#N),this.#H.observe(this.#s))}#P(){this.#H?.disconnect(),this.#H=void 0}connectedCallback(){this.#$()}dispose(){this.#P()}}eC=(0,oH.uA)("x-canvas",[o$.O,li],(0,oH.qy)`<canvas id="canvas" part="canvas"></canvas>`);class lo extends(eI=HTMLElement){static #e={c:[n,eL]}=(0,oD._)(this,[],[eC],eI);static #t=eL()}eA=(0,oH._y)("granularity",!0),eO=(0,oH.ZR)("offset");class ll{static #e={e:[eR]}=(0,oD._)(this,[[eA,2,"_handleGranularity"],[eO,2,"_enableOffsetEvent"]],[]);#s;#V=(eR(this),.01);#z=0;constructor(e){this.#s=e}static observedAttributes=["granularity"];_handleGranularity(e){e&&""!==e?this.#V=parseFloat(e):this.#V=.01}_enableOffsetEvent(e){e?this.#s.addEventListener("scroll",this.#g,{passive:!0}):this.#s.removeEventListener("scroll",this.#g)}#g=()=>{let e=this.#s.scrollTop;(Math.abs(this.#z-e)>this.#V||0===this.#s.scrollTop||1>=Math.abs(this.#s.scrollHeight-this.#s.clientHeight-this.#s.scrollTop))&&(this.#z=e,this.#s.dispatchEvent(new CustomEvent("offset",{...oz.$,detail:{offset:e,height:this.#s[ln]}})))}}let ln=Symbol("scrollableLength"),lr=Symbol("isHeaderShowing"),la=Symbol("resizeObserver"),lh=Symbol("slotKid");eM=(0,oH.uA)("x-foldview-ng",[o9,o$.O,ll]),new class extends oN{constructor(){super(r),ek()}static #e=(()=>{class e extends(eD=HTMLElement){static #e={c:[r,ek]}=(0,oD._)(this,[],[eM],eD);static notToFilterFalseAttributes=new Set(["scroll-enable"]);[lh];[la]=new ResizeObserver(e=>{for(let t of e)"X-FOLDVIEW-HEADER-NG"===t.target.tagName?this.#U=t.contentRect.height:"X-FOLDVIEW-TOOLBAR-NG"===t.target.tagName&&(this.#W=t.contentRect.height);this[lh]&&(this[lh].style.top=`${this.#U-this.#W}px`)});#U=0;#W=0;get[ln](){return this.#U-this.#W}get[lr](){return this[ln]-this.scrollTop>=1}get scrollTop(){return super.scrollTop}set scrollTop(e){e>this[ln]?e=this[ln]:e<0&&(e=0),super.scrollTop=e}setFoldExpanded(e){let{offset:t,smooth:s=!0}=e,i=parseFloat(t);this.scrollTo({top:i,behavior:s?"smooth":"instant"})}get[oW.l](){return this}disconnectedCallback(){this[la]?.disconnect(),this[la]=void 0}}})()};let ld=(e,t)=>{let s=e.parentElement;if(s?.tagName==="LYNX-WRAPPER"&&(s=s.parentElement),s?.tagName===t)return s};eH=(0,oH.uA)("x-foldview-header-ng",[o9,o$.O]);class lc extends(eN=HTMLElement){static #e={c:[a,eF]}=(0,oD._)(this,[],[eH],eN);#B=void 0;connectedCallback(){let e=ld(this,"X-FOLDVIEW-NG");this.#B=e?.[la],this.#B?.observe(this)}dispose(){this.#B?.unobserve(this)}static #t=eF()}e$=(0,oH.uA)("x-foldview-slot-drag-ng",[o9,o$.O]);class lu extends(eV=HTMLElement){static #e={c:[h,eP]}=(0,oD._)(this,[],[e$],eV);static #t=eP()}class lm{#X=0;#Z=new WeakMap;#Y;#q=0;#j=0;#K=null;#G;#J=0;#s;static observedAttributes=[];constructor(e){this.#s=e,this.#s.addEventListener("touchmove",this.#Q,{passive:!1}),this.#s.addEventListener("touchstart",this.#ee,{passive:!0}),this.#s.addEventListener("touchend",this.#et,{passive:!0}),this.#s.addEventListener("wheel",this.#es,{passive:!1})}#ei(e){let t;if("function"==typeof e.computedStyleMap)try{t=e.computedStyleMap().get("overflow-y")?.toString()??"visible"}catch{t=getComputedStyle(e).overflowY||"visible"}else t=getComputedStyle(e).overflowY||"visible";return"auto"===t||"scroll"===t||"hidden"===t||"overlay"===t}#eo(e){return this.#Y?.find(t=>{if(this.#ei(t)&&t.scrollHeight>t.clientHeight){let s=e<0&&0!==t.scrollTop,i=e>0&&Math.abs(t.scrollHeight-t.clientHeight-t.scrollTop)>1;return s||i}return!1})}#el(e,t){let s=this.#Z.get(e)??0;s+=t,this.#Z.set(e,s),e.scrollTop=s}#Q=e=>{let t=this.#en();if(!t)return;let{pageY:s,pageX:i}=e.touches.item(0),o=this.#q-s;if(null===this.#K){let e=this.#j-i;this.#K=Math.abs(o)>Math.abs(e)}!1!==this.#K&&(e.cancelable&&e.preventDefault(),this.#er(o,t),this.#q=s)};#es=e=>{let t=this.#en();if(!t||Math.abs(e.deltaY)<=Math.abs(e.deltaX))return;let s=e.composedPath().filter(e=>e instanceof Element&&this.#s.contains(e)&&e!==this.#s),{clientX:i,clientY:o}=e,l=document.elementsFromPoint(i,o).filter(e=>this.#s.contains(e));if(this.#Y=[...new Set([...s,...l])],this.#X=t.scrollTop,this.#Y)for(let e of this.#Y)this.#Z.set(e,e.scrollTop);e.cancelable&&e.preventDefault(),this.#er(e.deltaY,t)};#en(){let e=this.#s.parentElement;if(e&&"X-FOLDVIEW-NG"===e.tagName)return e}#ee=e=>{let{pageX:t,pageY:s}=e.touches.item(0);for(let e of(this.#Y=document.elementsFromPoint(t,s).filter(e=>this.#s.contains(e)&&e!==this.#s),this.#q=s,this.#j=t,this.#X=this.#en()?.scrollTop??0,this.#Y))this.#Z.set(e,e.scrollTop);this.#K=null,this.#G=void 0};#et=()=>{if(this.#K=null,this.#G){let e=this.#en();(this.#G!==e||e[lr])&&this.#G.scrollBy({top:4*this.#J,behavior:"smooth"})}};#er(e,t){let s=this.#eo(e);t[lr]&&e>0||e<0&&!s||!t[lr]&&!s?(t.scrollBy({top:e,behavior:"smooth"}),this.#X+=e,t.scrollTop=this.#X,this.#G=t):s&&(this.#G=s,this.#el(s,e)),this.#J=e}}ez=(0,oH.uA)("x-foldview-slot-ng",[o9,o$.O,lm]);class lp extends(eW=HTMLElement){static #e={c:[d,eU]}=(0,oD._)(this,[],[ez],eW);connectedCallback(){this.matches("x-foldview-ng>x-foldview-slot-ng:first-of-type")&&(this.parentElement[lh]=this)}static #t=eU()}eB=(0,oH.uA)("x-foldview-toolbar-ng",[o9,o$.O]);class lg extends(eZ=HTMLElement){static #e={c:[c,eX]}=(0,oD._)(this,[],[eB],eZ);#B=void 0;connectedCallback(){let e=ld(this,"X-FOLDVIEW-NG");this.#B=e?.[la],this.#B?.observe(this)}dispose(){this.#B?.unobserve(this)}static #t=eX()}eY=(0,oH._y)("drop-shadow",!0);class lv{static #e={e:[eq,ej]}=(0,oD._)(this,[[eY,0,"_handleBlurRadius"]],[]);static observedAttributes=["drop-shadow"];#s;#ea=(ej(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#img"));_handleBlurRadius=eq(this,(0,oH._8)(this.#ea,"--drop-shadow",void 0,!0));constructor(e){this.#s=e}}eK=(0,oH._y)("src",!0),eG=(0,oH._y)("placeholder",!0),eJ=(0,oH._y)("blur-radius",!0),eQ=(0,oH._y)("crossorigin",!0),e0=(0,oH._y)("referrerpolicy",!0);class lb{static #e={e:[e1,e2,e8,e3,e9]}=(0,oD._)(this,[[eG,2,"_preloadPlaceholder"],[eK,0,"_handleSrc"],[eJ,0,"_handleBlurRadius"],[eQ,0,"_handleCrossorigin"],[e0,0,"_handleReferrerpolicy"]],[]);static observedAttributes=["src","placeholder","blur-radius","crossorigin","referrerpolicy"];#s;#ea=(e9(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#img"));_handleSrc=e1(this,(0,oH.H$)(this.#ea,"src",e=>e||this.#s.getAttribute("placeholder")));_preloadPlaceholder(e){e&&(new Image().src=e)}_handleBlurRadius=e2(this,(0,oH._8)(this.#ea,"--blur-radius",void 0,!0));_handleCrossorigin=e8(this,(0,oH.H$)(this.#ea,"crossorigin"));_handleReferrerpolicy=e3(this,(0,oH.H$)(this.#ea,"referrerpolicy"));#eh=()=>{let e=this.#ea().src,t=this.#s.getAttribute("placeholder");t&&e!==t&&(this.#ea().src=t)};constructor(e){this.#s=e,this.#ea().addEventListener("error",this.#eh)}connectedCallback(){(null===this.#s.getAttribute("src")||""===this.#s.getAttribute("src"))&&this._handleSrc(null)}}e4=(0,oH.ZR)("load"),e5=(0,oH.ZR)("error");class lE{static #e={e:[e6]}=(0,oD._)(this,[[e4,2,"_enableLoadEvent"],[e5,2,"_enableErrorEvent"]],[]);static observedAttributes=[];#s;#ea=(e6(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#img"));_enableLoadEvent(e){e?this.#ea().addEventListener("load",this.#ed,{passive:!0}):this.#ea().removeEventListener("load",this.#ed)}_enableErrorEvent(e){e?this.#ea().addEventListener("error",this.#ec,{passive:!0}):this.#ea().removeEventListener("error",this.#ec)}#ed=()=>{this.#s.dispatchEvent(new CustomEvent("load",{...oz.$,detail:{width:this.#ea().naturalWidth,height:this.#ea().naturalHeight}}))};#ec=()=>{this.#s.dispatchEvent(new CustomEvent("error",{...oz.$,detail:{}}))};constructor(e){this.#s=e}}e7=(0,oH.uA)("filter-image",[o$.O,lb,lv,lE],oq({}));class lf extends(tt=HTMLElement){static #e={c:[u,te]}=(0,oD._)(this,[],[e7],tt);static #t=te()}ts=(0,oH.uA)("x-image",[o$.O,lb,lE],oq({}));class ly extends(to=HTMLElement){static #e={c:[m,ti]}=(0,oD._)(this,[],[ts],to);static #t=ti()}tl=(0,oH._y)("confirm-type",!0),tn=(0,oH._y)("maxlength",!0),tr=(0,oH._y)("readonly",!0),ta=(0,oH._y)("type",!0),th=(0,oH._y)("ios-spell-check",!0),td=(0,oH._y)("spell-check",!0);class l_{static #e={e:[tc,tu,tm,tp,tg]}=(0,oD._)(this,[[ta,2,"_handleType"],[tl,0,"_handlerConfirmType"],[tn,0,"_handlerMaxlength"],[tr,0,"_handleReadonly"],[[th,td],0,"_handleSpellCheck"]],[]);static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check"];#s;#eu=(tg(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#input"));_handlerConfirmType=tc(this,(0,oH.H$)(this.#eu,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=tu(this,(0,oH.H$)(this.#eu,"maxlength",e=>null===e?"140":e));_handleReadonly=tm(this,(0,oH.H$)(this.#eu,"readonly",e=>null!==e?"":null));#em=(0,oH.H$)(this.#eu,"type");#ep=(0,oH.H$)(this.#eu,"inputmode");_handleType(e){let t="text",s="text";"digit"===e?t="numeric":"number"===e?t="decimal":"email"===e?t="email":"tel"===e?t="tel":s=e,this.#ep(t),this.#em(s)}_handleSpellCheck=tp(this,(0,oH.H$)(this.#eu,"spellcheck",e=>null===e?"false":"true"));constructor(e){this.#s=e}}tv=(0,oH._y)("placeholder",!0),tb=(0,oH._y)("placeholder-color",!0),tE=(0,oH._y)("placeholder-font-family",!0),tf=(0,oH._y)("placeholder-font-size",!0),ty=(0,oH._y)("placeholder-font-weight",!0);class lw{static #e={e:[t_,tw,tx,tS,tT,tC]}=(0,oD._)(this,[[tv,0,"_handlerPlaceholder"],[tb,0,"_handlerPlaceholderColor"],[tE,0,"_handlerPlaceholderFontFamily"],[tf,0,"_handlerPlaceholderFontSize"],[ty,0,"_handlerPlaceholderFontWeight"]],[]);static observedAttributes=["placeholder","placeholder-color","placeholder-font-family","placeholder-font-size","placeholder-font-weight"];#s;#eu=(tC(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#input"));_handlerPlaceholder=t_(this,(0,oH.H$)(this.#eu,"placeholder"));_handlerPlaceholderColor=tw(this,(0,oH._8)(this.#eu,"--placeholder-color",void 0,!0));_handlerPlaceholderFontFamily=tx(this,(0,oH._8)(this.#eu,"--placeholder-font-family",void 0,!0));_handlerPlaceholderFontSize=tS(this,(0,oH._8)(this.#eu,"--placeholder-font-size",void 0,!0));_handlerPlaceholderFontWeight=tT(this,(0,oH._8)(this.#eu,"--placeholder-font-weight",void 0,!0));constructor(e){this.#s=e}}tL=(0,oH._y)("value",!1),tI=(0,oH._y)("disabled",!0),tA=(0,oH._y)("autocomplete",!0);class lx{static #e={e:[tO,tR,tM]}=(0,oD._)(this,[[tL,2,"_handleValue"],[tI,0,"_handleDisabled"],[tA,0,"_handleAutocomplete"]],[]);static observedAttributes=["value","disabled","autocomplete"];#s;#eu=(tM(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#input"));_handleValue(e){if(e){let t=parseFloat(this.#s.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#eu();t.value!==e&&(t.value=e)}_handleDisabled=tO(this,(0,oH.H$)(this.#eu,"disabled",e=>null!==e?"":null));_handleAutocomplete=tR(this,(0,oH.H$)(this.#eu,"autocomplete"));constructor(e){this.#s=e}}let lS={submit:"confirm",blur:"lynxblur",focus:"lynxfocus"};tk=(0,oH._y)("input-filter",!0),tD=(0,oH.ZR)("lynxinput"),tH=(0,oH._y)("send-composing-input",!0),tF=(0,oH.ZR)("selection");class lT{static #e={e:[tN]}=(0,oD._)(this,[[[tk,tD],2,"_handleEnableInputEvent"],[tH,2,"_handleSendComposingInput"],[tF,2,"_handleEnableSelectionEvent"]],[]);static observedAttributes=["send-composing-input","input-filter"];#s;#eg=(tN(this),!1);#ev=/[^0-9.]|\.(?=.*\.)/g;#eu=(0,oH.Ut)(()=>this.#s.shadowRoot,"#input");#eb=(0,oH.Ut)(()=>this.#s.shadowRoot,"#form");_handleEnableInputEvent(e){let t=this.#eu();e?(t.addEventListener("input",this.#eE,{passive:!0}),t.addEventListener("compositionend",this.#ef,{passive:!0})):(t.removeEventListener("input",this.#eE),t.removeEventListener("compositionend",this.#ef))}_handleSendComposingInput(e){this.#eg=null!==e}#ey=e=>{let t=lS[e.type]??e.type;this.#s.dispatchEvent(new CustomEvent(t,{...oz.$,detail:{value:this.#eu().value}}))};#eE=e=>{let t=this.#eu(),s=this.#e_(t.value),i=e.isComposing;t.value=s,(!i||this.#eg)&&this.#s.dispatchEvent(new CustomEvent("lynxinput",{...oz.$,detail:{value:s,textLength:s.length,cursor:t.selectionStart,isComposing:i,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#ef=()=>{let e=this.#eu(),t=this.#e_(e.value);e.value=t,this.#eg||this.#s.dispatchEvent(new CustomEvent("lynxinput",{...oz.$,detail:{value:t,textLength:t.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#e_(e){let t=e;"number"===this.#s.getAttribute("type")&&(t=t.replace(this.#ev,""));let s=this.#s.getAttribute("input-filter");return s&&(t=t.replace(RegExp(s,"g"),"")),t}_handleEnableSelectionEvent(e){e?this.#eu().addEventListener("select",this.#ew,{passive:!0}):this.#eu().removeEventListener("select",this.#ew)}#ew=()=>{let e=this.#eu();this.#s.dispatchEvent(new CustomEvent("selection",{...oz.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#ex=e=>{e.target===this.#eu()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#s=e;const t=this.#eu(),s=this.#eb();t.addEventListener("blur",this.#ey,{passive:!0}),t.addEventListener("focus",this.#ey,{passive:!0}),s.addEventListener("submit",this.#ey,{passive:!0}),s.addEventListener("input",this.#ex,{passive:!0})}}t$=(0,oH.uA)("x-input",[o$.O,lw,lx,l_,lT],oj);class lC extends(tV=HTMLElement){static #e={c:[p,tP]}=(0,oD._)(this,[],[t$],tV);#eS=(0,oH.Ut)(()=>this.shadowRoot,"#input");addText(e){let{text:t}=e,s=this.#eS(),i=s.selectionStart;if(null===i)s.value=t;else{let e=s.value;s.value=e.slice(0,i)+t+e.slice(i)}}controlKeyBoard(e){let{action:t}=e;0===t||1===t?this.focus():(2===t||3===t)&&this.blur()}setValue(e){let t,s=this.#eS();s.value=e.value,(t=e.index)&&s.setSelectionRange(t,t)}getValue(){let e=this.#eS();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:s}=e,i=this.#eS();1===t&&(s=1);let o=i.selectionStart;if(null===o){let e=i.value;i.value=i.value.substring(0,e.length-s)}else{let e=i.value;i.value=e.slice(0,o-s)+e.slice(o)}}setInputFilter(e){this.#eS().setAttribute("pattern",e.pattern)}select(){let e=this.#eS();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#eS().setSelectionRange(e.selectionStart,e.selectionEnd)}focus(e){this.#eS().focus(e)}blur(){this.#eS().blur()}connectedCallback(){let e=this.#eS();null===this.getAttribute("confirm-type")&&e.setAttribute("confirm-type","send"),null===this.getAttribute("maxlength")&&e.setAttribute("maxlength","140")}static #t=tP()}tz=(0,oH._y)("events-pass-through",!0),tU=(0,oH._y)("visible",!1);class lL{static #e={e:[tW]}=(0,oD._)(this,[[tz,2,"_handleEventsPassThrough"],[tU,2,"_handleVisible"]],[]);static observedAttributes=["visible","events-pass-through"];#s;#eT=(tW(this),!!window.HTMLDialogElement);#eC=!1;constructor(e){this.#s=e}#eL=(0,oH.Ut)(()=>this.#s.shadowRoot,"#dialog");_handleEventsPassThrough(e){null!==e?(this.#eL().addEventListener("click",this.#eI,{passive:!1}),this.#s.addEventListener("click",this.#eI,{passive:!1})):(this.#eL().removeEventListener("click",this.#eI),this.#s.removeEventListener("click",this.#eI))}_handleVisible(e){this.#eC=null!==e,this.#eT&&(this.#eC?(this.#eL().showModal(),this.#s.dispatchEvent(new CustomEvent("showoverlay",oz.$))):(this.#eL().close(),this.#s.dispatchEvent(new CustomEvent("dismissoverlay",oz.$))))}#eI=e=>{e.stopPropagation();let t=this.#eL();if(e.target===this.#s||e.target===t){t.close();let{clientX:s,clientY:i}=e,o=document.elementFromPoint(s,i);o?.tagName==="LYNX-VIEW"&&o.shadowRoot&&(o=o.shadowRoot.elementFromPoint(s,i)??o),o?.dispatchEvent(new MouseEvent("click",e)),requestAnimationFrame(()=>{this.#eC&&t.isConnected&&t.showModal()})}};connectedCallback(){this.#eT||(this.#eL().style.display="none")}}tB=(0,oH.uA)("x-overlay-ng",[o$.O,lL],oG);class lI extends(tZ=HTMLElement){static #e={c:[g,tX]}=(0,oD._)(this,[],[tB],tZ);get[o$.v](){return this.shadowRoot.firstElementChild}static #t=tX()}class lA extends Event{startShowing;fullyShowing;static EventName="x-refresh-view-intersecting";constructor(e,t){super(lA.EventName,{composed:!1,cancelable:!0,bubbles:!0}),this.startShowing=e,this.fullyShowing=t}}class lO{#s;static observedAttributes=[];#eA;constructor(e){this.#s=e}connectedCallback(){if(IntersectionObserver&&!this.#eA){let e=this.#s.parentElement;e&&(this.#eA=new IntersectionObserver(e=>{let t=!1,s=!1;e.forEach(e=>{t=e.intersectionRatio>0,s=e.intersectionRatio>.9}),this.#s.dispatchEvent(new lA(t,s)),s&&this.#s.setAttribute("x-magnet-enable","")},{root:e,threshold:[.1,.9]}),this.#eA.observe(this.#s))}}dispose(){this.#eA&&(this.#eA.disconnect(),this.#eA=void 0)}}tY=(0,oH.uA)("x-refresh-footer",[o9,o$.O,lO]);class lR extends(tj=HTMLElement){static #e={c:[v,tq]}=(0,oD._)(this,[],[tY],tj);connectedCallback(){this.setAttribute("slot","footer")}static #t=tq()}tK=(0,oH.uA)("x-refresh-header",[o9,o$.O,lO]);class lM extends(tJ=HTMLElement){static #e={c:[b,tG]}=(0,oD._)(this,[],[tK],tJ);connectedCallback(){this.setAttribute("slot","header")}static #t=tG()}tQ=(0,oH.ZR)("headeroffset"),t0=(0,oH.ZR)("headershow"),t1=(0,oH.ZR)("footeroffset"),t2=(0,oH.ZR)("startrefresh"),t8=(0,oH.ZR)("headerreleased"),t3=(0,oH.ZR)("startloadmore"),t9=(0,oH.ZR)("footerreleased");class lk{static #e={e:[t4]}=(0,oD._)(this,[[[tQ,t0,t1],2,"_handleComplexEventEnableAttributes"],[[t2,t8,t3,t9],2,"_handleXEnableHeaderOffsetEvent"]],[]);#s;static observedAttributes=[];#eO=(t4(this),(0,oH.Ut)(()=>this.#s,"x-refresh-view > x-refresh-header:first-of-type"));#eR=(0,oH.Ut)(()=>this.#s,"x-refresh-view > x-refresh-footer:first-of-type");constructor(e){this.#s=e,this.#s.addEventListener(lA.EventName,this.#eM)}#ek={headeroffset:!1,headerreleased:!1,startrefresh:!1,footeroffset:!1,headershow:!1,footerreleased:!1,startloadmore:!1};_handleComplexEventEnableAttributes(e,t){this.#ek[t]=e;let{headeroffset:s,headershow:i,footeroffset:o}=this.#ek;s||i||o?this.#eD():this.#eH()}_handleXEnableHeaderOffsetEvent(e,t){this.#ek[t]=e;let{startrefresh:s,headerreleased:i,startloadmore:o,footerreleased:l}=this.#ek;i||l||o||s?this.#eF():this.#eN()}#e$=!1;#eP=!1;#eV=!1;#ez=!1;#eM=e=>{e.stopPropagation(),"X-REFRESH-HEADER"===e.target.tagName?(this.#e$=e.startShowing,this.#eP=e.fullyShowing):(this.#eV=e.startShowing,this.#ez=e.fullyShowing)};#eU=!1;#eF(){this.#eU||(this.#s.addEventListener("touchend",this.#eW),this.#eU=!0)}#eW=()=>{this.#eP?(this.#s.dispatchEvent(new CustomEvent("headerreleased",oz.$)),this.#s.dispatchEvent(new CustomEvent("startrefresh",{...oz.$,detail:{isManual:this.#s._nextRefreshIsManual}})),this.#s._nextRefreshIsManual=!0):("true"===this.#s.getAttribute("enable-auto-loadmore")&&this.#eV||this.#ez)&&(this.#s.dispatchEvent(new CustomEvent("footerreleased",oz.$)),this.#s.dispatchEvent(new CustomEvent("startloadmore",oz.$)))};#eN(){this.#eU&&this.#s.removeEventListener("touchend",this.#eW)}#eB=!1;#eX=!1;#eD(){this.#eX||(this.#s.addEventListener("touchstart",this.#eZ),this.#s.addEventListener("touchend",this.#eY),this.#s.addEventListener("touchcancel",this.#eY),this.#s.shadowRoot.querySelector("#container").addEventListener("scroll",this.#g))}#eY=()=>{this.#eB=!1};#eZ=()=>{this.#eB=!0};#g=()=>{if(this.#e$&&(this.#ek.headershow||this.#ek.headeroffset)){let e=this.#eO();if(e){let t=parseFloat(getComputedStyle(e).height),s=this.#s.shadowRoot.querySelector("#container").scrollTop;this.#s.dispatchEvent(new CustomEvent("headershow",{...oz.$,detail:{isDragging:this.#eB,offsetPercent:1-s/t}})),this.#s.dispatchEvent(new CustomEvent("headeroffset",{...oz.$,detail:{isDragging:this.#eB,offsetPercent:1-s/t}}))}}else if(this.#eV&&this.#ek.footeroffset){let e=this.#eR();if(e){let t=this.#s.shadowRoot.querySelector("#container").scrollTop,s=parseFloat(getComputedStyle(e).height);this.#s.dispatchEvent(new CustomEvent("footeroffset",{...oz.$,detail:{isDragging:this.#eB,offsetPercent:1-t/s}}))}}};#eH(){this.#eX&&(this.#s.removeEventListener("touchstart",this.#eZ),this.#s.removeEventListener("touchend",this.#eY),this.#s.removeEventListener("touchcancel",this.#eY),this.#s.shadowRoot.querySelector("#container").removeEventListener("scroll",this.#g))}dispose(){this.#eN(),this.#eH()}}t5=(0,oH.uA)("x-refresh-view",[o9,o$.O,lk],oJ),new class extends oN{constructor(){super(E),t6()}static #e=(()=>{class e extends(t7=HTMLElement){static #e={c:[E,t6]}=(0,oD._)(this,[],[t5],t7);static notToFilterFalseAttributes=new Set(["enable-refresh","enable-loadmore","enable-auto-loadmore"]);_nextRefreshIsManual=!0;finishRefresh(){this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.removeAttribute("x-magnet-enable")}finishLoadMore(){this.querySelector("x-refresh-view > x-refresh-footer:first-of-type")?.removeAttribute("x-magnet-enable")}autoStartRefresh(){let e=this.shadowRoot.querySelector("#container");this.querySelector("x-refresh-view > x-refresh-header:first-of-type")?.setAttribute("x-magnet-enable",""),this._nextRefreshIsManual=!1,e.scroll({top:0,behavior:"smooth"})}#eq=(0,oH.Ut)(()=>this.shadowRoot,"#container");#ej=(0,oH.Ut)(()=>this.shadowRoot,"#content");get scrollTop(){let e=this.#eq(),t=this.#ej();return t.scrollTop+t.offsetTop-e.scrollTop}set scrollTop(e){console.log(e);let t=this.#eq(),s=this.#ej();e>0?s.scrollTop=e:t.scrollTop=s.offsetTop+e}get scrollHeight(){return this.#ej().scrollHeight}get[oW.l](){return this}}})()},se=(0,oH._y)("src",!0),st=(0,oH._y)("content",!0),ss=(0,oH.ZR)("load");class lD{static #e={e:[si]}=(0,oD._)(this,[[se,2,"_handleSrc"],[st,2,"_handleContent"],[ss,2,"_enableLoadEvent"]],[]);static observedAttributes=["src","content"];#s;#eK=(si(this),null);#ea=(0,oH.Ut)(()=>this.#s.shadowRoot,"#img");_handleSrc(e){e?this.#ea().src=e:this.#ea().src=""}_handleContent(e){if(this.#eK&&URL.revokeObjectURL(this.#eK),!e){this.#eK="";return}let t=new Blob([e],{type:"image/svg+xml;charset=UTF-8"}),s=URL.createObjectURL(t);this.#eK=s,this.#ea().src=s}_enableLoadEvent(e){e?this.#ea().addEventListener("load",this.#ed,{passive:!0}):this.#ea().removeEventListener("load",this.#ed)}#ed=()=>{this.#s.dispatchEvent(new CustomEvent("load",{...oz.$,detail:{width:this.#ea().naturalWidth,height:this.#ea().naturalHeight}}))};constructor(e){this.#s=e}}so=(0,oH.uA)("x-svg",[o$.O,lD],'<img part="img" alt="" loading="lazy" id="img" /> ');class lH extends(sn=HTMLElement){static #e={c:[f,sl]}=(0,oD._)(this,[],[so],sn);static #t=sl()}sr=(0,oH.uA)("x-swiper-item",[o9,o$.O]);class lF extends(sh=HTMLElement){static #e={c:[y,sa]}=(0,oD._)(this,[],[sr],sh);static #t=sa()}sd=(0,oH.ZR)("transition"),sc=(0,oH.ZR)("scrollstart"),su=(0,oH.ZR)("lynxscrollend"),sm=(0,oH.ZR)("change"),sp=(0,oH.ZR)("change-event-for-indicator");class lN{static #e={e:[sg,sv]}=(0,oD._)(this,[[[sc,su,sm,sp],2,"_enableScrollEventProcessor"],[sd,0,"_handleEnableTransitionEvent"]],[]);static observedAttributes=[];#s;#eG=(sv(this),0);#eJ=0;#eB=!1;#l;#eQ=!1;constructor(e){this.#s=e}#ej=(0,oH.Ut)(()=>this.#s.shadowRoot,"#content").bind(this);_handleEnableTransitionEvent=sg(this,(0,oH.LB)(this.#ej,"scroll",this.#e0,{passive:!0}));#g(){oW.k||(clearTimeout(this.#l),this.#l=setTimeout(()=>{this.#b()},100)),this.#eQ||(this.#s.dispatchEvent(new CustomEvent("scrollstart",{...oz.$,detail:{current:this.#eG,isDragged:this.#eB}})),this.#eQ=!0);let e=this.#ej(),t=this.#s.isVertical,s=t?e.scrollTop:e.scrollLeft,i=t?e.clientHeight:e.clientWidth,o=t?e.scrollHeight:e.scrollWidth;if(Math.abs(this.#eJ-s)>i/4||s<10||Math.abs(s-o)<=i){let e=this.#s.currentIndex;e!==this.#eG&&(this.#s.dispatchEvent(new CustomEvent("change",{...oz.$,detail:{current:e,isDragged:this.#eB}})),this.#eG=e),this.#eJ=s}}#b(){this.#s.dispatchEvent(new CustomEvent("lynxscrollend",{...oz.$,detail:{current:this.#eG}})),this.#eQ=!1}#e1(){this.#eB=!0}#e2(){this.#eB=!1}#e0(){this.#s.dispatchEvent(new CustomEvent("transition",{...oz.$,detail:{dx:this.#ej().scrollLeft,dy:this.#ej().scrollTop}}))}#e8=[(0,oH.LB)(this.#ej,"scroll",this.#g.bind(this),{passive:!0}),(0,oH.LB)(this.#ej,"touchstart",this.#e1.bind(this),{passive:!0}),(0,oH.LB)(this.#ej,"touchend",this.#e2.bind(this),{passive:!0}),(0,oH.LB)(this.#ej,"touchcancel",this.#e2.bind(this),{passive:!0}),(0,oH.LB)(this.#ej,"scrollend",this.#b.bind(this),{passive:!0})];#ek={scrollstart:!1,lynxscrollend:!1,change:!1,"change-event-for-indicator":!1};_enableScrollEventProcessor(e,t){this.#ek[t]=e;let{lynxscrollend:s,scrollstart:i,change:o}=this.#ek,l=o||s||i||this.#ek["change-event-for-indicator"];this.#e8.forEach(e=>e(l))}connectedCallback(){this.#eG=parseFloat(this.#s.getAttribute("current")??"0");let e=this.#s.isVertical;this.#eJ=e?this.#ej().scrollTop:this.#ej().scrollLeft}}sb=(0,oH._y)("current",!1),sE=(0,oH._y)("interval",!1),sf=(0,oH._y)("autoplay",!1);class l${static #e={e:[sy]}=(0,oD._)(this,[[sb,2,"_handleCurrentChange"],[[sE,sf],2,"_handleAutoplay"]],[]);static observedAttributes=["current","interval","autoplay"];#s;constructor(e){this.#s=e}#e3(){this.#s.currentIndex===this.#s.childElementCount-1?this.#s.circularPlay&&(this.#s.currentIndex=0):this.#s.currentIndex+=1}_handleCurrentChange(e){let t=Number(e);Number.isNaN(t)||(this.#s.currentIndex=t)}#e9;#e4=(sy(this),(()=>{this.#e3()}).bind(this));#e5(e){this.#e6(),this.#e9=setInterval(this.#e4,e)}#e6(){this.#e9&&clearInterval(this.#e9)}_handleAutoplay(){if(null!==this.#s.getAttribute("autoplay")){let e=this.#s.getAttribute("interval"),t=e?parseFloat(e):5e3;Number.isNaN(t)&&(t=5e3),this.#e5(t)}}dispose(){this.#e6()}}s_=(0,oH._y)("circular",!1),sw=(0,oH._y)("vertical",!0);class lP{static #e={e:[sx]}=(0,oD._)(this,[[s_,2,"_handleCircular"],[sw,2,"_handleVerticalChange"]],[]);static observedAttributes=["circular","vertical"];#s;#e7=(sx(this),!1);#te;#tt=0;#ej=(0,oH.Ut)(()=>this.#s.shadowRoot,"#content").bind(this);constructor(e){this.#s=e}#ts=(0,oH.Ut)(()=>this.#s.shadowRoot,"#circular-start").bind(this);#ti=(0,oH.Ut)(()=>this.#s.shadowRoot,"#circular-end").bind(this);#to(e){let t=this.#s.childElementCount;if(t>2){let{current:s,isDragged:i,__isFirstLayout:o}=e.detail;if(0===s||s===t-1||2===s||s===t-2){let e,l=this.#ej(),n=this.#ts().assignedElements(),r=this.#ti().assignedElements(),a=this.#s.firstElementChild,h=this.#s.lastElementChild,d=this.#s.snapDistance;if(0===s?(r.forEach(e=>e.removeAttribute("slot")),h.setAttribute("slot","circular-start"),e=a):s===t-1?(n.forEach(e=>e.removeAttribute("slot")),a.setAttribute("slot","circular-end"),e=h):(n.forEach(e=>e.removeAttribute("slot")),r.forEach(e=>e.removeAttribute("slot")),e=this.#s.children[s]),this.#e7){let t="carousel"===this.#s.getAttribute("mode")?.8*l.clientHeight/2:l.clientHeight/2;this.#tt=e.offsetTop+e.offsetHeight/2-d-t,l.scrollTop=this.#tt}else{let t="carousel"===this.#s.getAttribute("mode")?.8*l.clientWidth/2:l.clientWidth/2;this.#tt=e.offsetLeft+e.offsetWidth/2-d-t,l.scrollLeft=this.#tt}if(!i){let e=this.#s.getAttribute("mode");if(o&&(null===e||"normal"===e||"carousel"===e||"carry"===e))return;this.#tl(o?"instant":"smooth")}}}}#tl(e){let t=this.#ej(),s=this.#s.snapDistance;t.scrollBy({top:this.#e7?s:0,left:this.#e7?0:s,behavior:e??"smooth"})}#e8=[(0,oH.LB)(()=>this.#s,"change",this.#to.bind(this),{passive:!0}),(0,oH.LB)(()=>this.#s,"touchmove",this.#tn.bind(this),{passive:!1}),(0,oH.LB)(()=>this.#s,"touchend",this.#tr.bind(this),{passive:!1}),(0,oH.LB)(()=>this.#s,"touchcancel",this.#tr.bind(this),{passive:!1})];_handleCircular(e){this.#e8.forEach(t=>t(null!=e)),null!==e&&this.#to({detail:{current:this.#s.currentIndex,isDragged:!1,__isFirstLayout:!0}})}#tn(e){let t=e.touches.item(0);if(t){let e=this.#e7?t.pageY:t.pageX;if(void 0!==this.#te){this.#ta();let t=this.#te-e;this.#tt+=t}this.#te=e}}#tr(e){this.#th(),this.#tl(),this.#te=void 0}_handleVerticalChange(e){this.#e7=null!==e}#td;#ta(){if(!this.#td){let e=this.#ej();this.#tt=this.#e7?e.scrollTop:e.scrollLeft,this.#td=setInterval(()=>{this.#e7?e.scrollTop=this.#tt:e.scrollLeft=this.#tt},10)}}#th(){this.#td&&(clearInterval(this.#td),this.#td=void 0)}dispose(){this.#th()}}sS=(0,oH._y)("indicator-color",!0),sT=(0,oH._y)("indicator-active-color",!0),sC=(0,oH._y)("page-margin",!0),sL=(0,oH._y)("previous-margin",!0),sI=(0,oH._y)("next-margin",!0);class lV{static #e={e:[sA,sO,sR,sM,sk,sD]}=(0,oD._)(this,[[sS,0,"_handleIndicatorColor"],[sT,0,"_handleIndicatorActiveColor"],[sC,0,"_handlePageMargin"],[sL,0,"_handlePreviousMargin"],[sI,0,"_handleNextMargin"]],[]);static observedAttributes=["indicator-color","indicator-active-color","page-margin","previous-margin","next-margin"];#s;#tc=(sD(this),0);#tu=(0,oH.Ut)(()=>this.#s.shadowRoot,"#indicator-container");#tm=(0,oH.Ut)(()=>this.#s.shadowRoot,"#indicator-style");#tp;constructor(e){this.#s=e}_handleIndicatorColor=sA(this,(0,oH._8)(this.#tu,"--indicator-color",void 0,!0));_handleIndicatorActiveColor=sO(this,(0,oH._8)(this.#tu,"--indicator-active-color",void 0,!0));_handlePageMargin=sR(this,(0,oH._8)(this.#tu,"--page-margin",void 0,!0));_handlePreviousMargin=sM(this,(0,oH._8)(this.#tu,"--previous-margin",void 0,!0));_handleNextMargin=sk(this,(0,oH._8)(this.#tu,"--next-margin",void 0,!0));#tg(){let e=this.#s.childElementCount;if(e!==this.#tc){let t="";for(let s=0;s<e;s++)t+=`<div style="animation-timeline:--x-swiper-item-${s};" part="indicator-item"></div>`;if(this.#tu().innerHTML=t,e>5){for(let t=0;t<e;t++)this.#s.children.item(t)?.style.setProperty("view-timeline-name",`--x-swiper-item-${t}`);this.#tm().innerHTML=`:host { timeline-scope: ${Array.from({length:e},(e,t)=>`--x-swiper-item-${t}`).join(",")} !important; }`}}this.#tc=e}connectedCallback(){if(this.#tg(),this.#tp=new MutationObserver(this.#tg.bind(this)),this.#tp.observe(this.#s,{attributes:!1,characterData:!1,childList:!0,subtree:!1}),!CSS.supports("timeline-scope","--a, --b")){this.#s.addEventListener("change",(({detail:e})=>{let t=e.current,s=this.#s.childElementCount,i=this.#tu();for(let e=0;e<s;e++){let s=i.children[e];s&&(e===t?s.style.setProperty("background-color","var(--indicator-active-color)","important"):s.style.removeProperty("background-color"))}}).bind(this));let e=parseFloat(this.#s.getAttribute("current")??"0");this.#tu().children[e]?.style.setProperty("background-color","var(--indicator-active-color)","important")}}dispose(){this.#tp?.disconnect(),this.#tp=void 0}}sH=(0,oH.uA)("x-swiper",[o$.O,lV,lN,lP,l$],oQ),new class extends oN{constructor(){super(_),sF()}static #e=(()=>{class e extends(sN=HTMLElement){static #e={c:[_,sF]}=(0,oD._)(this,[],[sH],sN);static notToFilterFalseAttributes=new Set(["smooth-scroll","indicator-dots"]);#ej=(0,oH.Ut)(()=>this.shadowRoot,"#content").bind(this);#tv(){let e=0,t=Number.MAX_SAFE_INTEGER,s=0;if(this.childElementCount>0){let i=this.#ej(),o=this.isVertical,l=this.childElementCount,n=o?i.scrollTop:i.scrollLeft,r=o?i.clientHeight:i.clientWidth,a=o?this.firstElementChild.offsetHeight:this.firstElementChild.offsetWidth,h=n+("carousel"===this.getAttribute("mode")?.8*r/2:r/2);for(let i=0;i<l;i++){let l=this.children[i];if(l){let n=(o?l.offsetTop:l.offsetLeft)+a/2-h,r=Math.abs(n);r<t&&(e=i,t=r,s=n)}}}return{current:e,minDistanceToMid:t,minOffsetToMid:s}}get currentIndex(){return this.#tv().current}set currentIndex(e){if(this.currentIndex===e)return;let t=null===this.getAttribute("smooth-scroll");this.#tb(e,t?"smooth":"instant")}#tb(e,t){let s=this.children.item(e);if(s){let e=this.isVertical,i=0;i="flat-coverflow"===this.getAttribute("mode")?e?s.offsetTop-s.offsetHeight/3:s.offsetLeft-s.offsetWidth/3:e?s.offsetTop:s.offsetLeft,this.#ej().scrollTo({left:e?0:i,top:e?i:0,behavior:t})}}get snapDistance(){return this.#tv().minOffsetToMid}get isVertical(){return null!==this.getAttribute("vertical")}get circularPlay(){return null!==this.getAttribute("circular")}scrollTo(...e){if(e.length>0&&"object"==typeof e[0]&&null!==e[0]&&"index"in e[0]){let{index:t,smooth:s=!0}=e[0];if("number"==typeof t)return void this.#tb(t,s?"smooth":"instant")}super.scrollTo(...e)}connectedCallback(){let e=this.getAttribute("current");null!==e&&this.#tb(Number(e),"instant")}get[oW.l](){return this}}})()},s$=(0,oH._y)("src",!0);class lz{static #e={e:[sP]}=(0,oD._)(this,[[s$,2,"_handleSrc"]],[]);static observedAttributes=["src"];#s;constructor(e){this.#s=e}#tE=(sP(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#img"));_handleSrc(e){e?this.#tE().setAttribute("src",e):this.#tE().removeAttribute("src")}}sV=(0,oH.uA)("inline-image",[lz],oq({}));class lU extends(sU=HTMLElement){static #e={c:[w,sz]}=(0,oD._)(this,[],[sV],sU);static #t=sz()}sW=(0,oH.uA)("inline-text",[]);class lW extends(sX=HTMLElement){static #e={c:[x,sB]}=(0,oD._)(this,[],[sW],sX);static #t=sB()}sZ=(0,oH.uA)("inline-truncation",[]),new class extends oN{constructor(){super(S),sY()}static #e=(()=>{class e extends(sq=HTMLElement){static #e={c:[S,sY]}=(0,oD._)(this,[],[sZ],sq);static XEnableCustomTruncation="x-text-custom-overflow";connectedCallback(){CSS.supports("selector(:has(>inline-truncation))")||this.parentElement?.tagName!=="X-TEXT"||this.matches("inline-truncation ~ inline-truncation")||this.parentElement.setAttribute(e.XEnableCustomTruncation,""),this.setAttribute("slot","inline-truncation")}disconnectedCallback(){this.parentElement?.removeAttribute(e.XEnableCustomTruncation)}}})()},sj=(0,oH._y)("text",!0);class lB{static #e={e:[sK]}=(0,oD._)(this,[[sj,2,"_handleText"]],[]);static observedAttributes=["text"];#s;#tf;constructor(e){sK(this),this.#s=e}_handleText(e){this.#tf?.remove(),e&&(this.#tf=new Text(e),this.#s.append(this.#tf))}}sG=(0,oH.uA)("raw-text",[lB]);class lX extends(sQ=HTMLElement){static #e={c:[T,sJ]}=(0,oD._)(this,[],[sG],sQ);static #t=sJ()}s0=(0,oH._y)("text-maxlength",!0),s1=(0,oH._y)("text-maxline",!0),s2=(0,oH._y)("tail-color-convert",!0),s8=(0,oH.ZR)("layout");class lZ{static #e={e:[s3]}=(0,oD._)(this,[[[s0,s1,s2],2,"_handleAttributeChange"],[s8,2,"_handleEnableLayoutEvent"]],[]);static exceedMathLengthAttribute="x-text-clipped";static showInlineTruncation="x-show-inline-truncation";static observedAttributes=["text-maxlength","text-maxline","tail-color-convert"];#ty=(s3(this),!1);#t_=!1;#tw=new Map;#tx;#H;#tS;#tT;#tC=!1;#tL=NaN;#tI=NaN;#tA=!0;#tO=!1;get #tR(){return!this.#tM&&!this.#tA}get #tM(){return!!this.#tk()}#tk(){return this.#s.querySelector(":scope > inline-truncation")}get #tD(){return!isNaN(this.#tI)&&(this.#tM||!this.#tA)}#s;constructor(e){this.#s=e}#tH=(0,oH.Ut)(()=>this.#s.shadowRoot,"#inner-box");#tF(e){e.forEach(e=>{e.removedNodes.forEach(e=>{this.#tw.delete(e)}),"characterData"===e.type&&void 0!==this.#tw.get(e.target)&&this.#tw.set(e.target,e.target.data)})}#tN(){for(let[e,t]of this.#tw)e.nodeType===Node.TEXT_NODE?void 0!==t&&(e.data=t):e.removeAttribute(lZ.exceedMathLengthAttribute);this.#s.removeAttribute(lZ.exceedMathLengthAttribute),this.#s.removeAttribute(lZ.showInlineTruncation)}#t$(e){let t=[],s=e;for(;s=s.nextSibling;)(s.nodeType===Node.TEXT_NODE||s.nodeType===Node.ELEMENT_NODE)&&t.push(s);return t}#tP(){!this.#t_||this.#s.matches("x-text>x-text")||this.#ty||(this.#ty=!0,(0,oH.JS)(async()=>{await this.#tV(),this.#tz(),this.#ty=!1}))}async #tV(){if(this.#tS?.parentElement?.removeChild(this.#tS),this.#tN(),!this.#tD&&isNaN(this.#tL))return;await document.fonts.ready;let e=this.#tH().getBoundingClientRect();this.#tT=new lY(this.#s,e);let t=this.#tT,s=(isNaN(this.#tL)?void 0:t.getNodeInfoByCharIndex(this.#tL))?this.#tL:1/0,i=this.#tD&&t.getLineInfo(this.#tI)?t.getLineInfo(this.#tI-1):void 0,o=1/0,l=3;if(i){let{start:s,end:n}=i,r=n-s;if(this.#tM){this.#s.setAttribute(lZ.showInlineTruncation,"");let i=this.#tk().getBoundingClientRect(),l=e.width,r=i.width;if(l>r){o=n-1;let e=document.createRange(),s=t.getNodeInfoByCharIndex(o),i=n-s.start;for(e.setEnd(s.node,i),e.setStart(s.node,i);e.getBoundingClientRect().width<r&&(o-=1)&&(s=t.getNodeInfoByCharIndex(o));)e.setStart(s.node,o-s.start)}else o=s,this.#s.removeAttribute(lZ.showInlineTruncation)}else r<3?(l=r,o=s):o=n-3}let n=Math.min(s,o);if(n<1/0){let e=t.getNodeInfoByCharIndex(n);if(e){let s=n-e.start,i=e.node,o=[];i.nodeType===Node.TEXT_NODE?(this.#tw.set(i,i.data),i.data=i.data.substring(0,s)):o.push(i),o=o.concat(this.#t$(i));let r=i.parentElement;for(;r!==this.#s;)o=o.concat(this.#t$(r)),r=r.parentElement;if(o.forEach(e=>{e.nodeType===Node.TEXT_NODE&&0!==e.data.length?(this.#tw.set(e,e.data),e.data=""):e.nodeType===Node.ELEMENT_NODE&&(this.#tw.set(e,""),e.setAttribute(lZ.exceedMathLengthAttribute,""))}),this.#tR){let o=(0===s?t.nodelist.at(e.nodeIndex-1)?.parentElement:i.parentElement)??i.parentElement;this.#tS=new Text(Array(l).fill(".").join("")),o.append(this.#tS)}this.#s.setAttribute(lZ.exceedMathLengthAttribute,"")}this.#tU(n)}}#tW=e=>{this.#tF(e),this.#tP()};#tB=()=>{if(this.#tC){this.#tC=!1;return}this.#tP()};#tz(){this.#t_&&((this.#tL||this.#tI)&&!this.#tx&&(this.#tx=new MutationObserver(this.#tW),this.#tx.observe(this.#s,{subtree:!0,childList:!0,attributes:!1,characterData:!0})),this.#tI&&!this.#H&&(this.#H=new ResizeObserver(this.#tB),this.#tC=!0,this.#H.observe(this.#tH(),{box:"content-box"})))}#tX(){this.#tx?.disconnect(),this.#tx=void 0,this.#H?.disconnect(),this.#H=void 0}_handleAttributeChange(){this.#tL=parseFloat(this.#s.getAttribute("text-maxlength")??""),this.#tI=parseFloat(this.#s.getAttribute("text-maxline")??""),this.#tA="false"!==this.#s.getAttribute("tail-color-convert"),this.#tL<0&&(this.#tL=NaN),this.#tI<1&&(this.#tI=NaN),isNaN(this.#tI)?this.#tH().style.removeProperty("-webkit-line-clamp"):this.#tH().style.webkitLineClamp=this.#tI.toString(),this.#tP()}_handleEnableLayoutEvent(e){this.#tO=e}#tU(e){if(!this.#tO)return;let t=new Proxy(this,{get:(t,s)=>"lineCount"===s?(t.#tT||(t.#tT=new lY(t.#s,t.#s.getBoundingClientRect())),t.#tT.getLineCount()):"lines"===s?new Proxy(t,{get(t,s){let i=parseFloat(s.toString());if(!isNaN(i)){t.#tT||(t.#tT=new lY(t.#s,t.#s.getBoundingClientRect()));let s=t.#tT.getLineInfo(i);if(s)return new Proxy(s,{get(t,s){switch(s){case"start":case"end":return t[s];case"ellipsisCount":if(void 0!==e&&e>=t.start&&e<t.end)return t.end-e;return 0}}})}}}):void 0});this.#s.dispatchEvent(new CustomEvent("layout",{...oz.$,detail:t}))}dispose(){this.#tX()}connectedCallback(){this.#t_=!0,this._handleEnableLayoutEvent(this.#tO),this._handleAttributeChange(),(0,oH.JS)(()=>{this.#tU()})}}class lY{#tZ=[{start:0}];#tY=[];#tq=[];#s;#tj;nodelist;constructor(e,t){this.#s=e,this.nodelist=new lq(this.#s),this.#tj=t}#tK(e){if(e.node.nodeType!==Node.TEXT_NODE)return 1;{let{rect:t,rectIndex:s}=e,i=e.node,o=document.createRange();o.selectNode(i);for(let e=0;e<i.data.length;e++){o.setEnd(i,e);let l=o.getClientRects().item(s);if(l&&l.right===t.right)return e}return i.data.length}}#tG(e){if(this.#tY[e])return;let{left:t}=this.#tj,s=this.#tY[this.#tY.length-1],i=s?.[s.length-1],o=i?.nodeIndex?i?.nodeIndex+1:0;for(let s=o,i;(i=this.#tJ(s))&&e>=this.#tY.length;s++){let e,{node:s}=i;if(s.nodeType===Node.ELEMENT_NODE)e=s.getClientRects();else{let t=document.createRange();t.selectNode(s),e=t.getClientRects()}if(e.length>0){let s=this.#tY[this.#tY.length-1],o=e[0];if(.2>Math.abs(o.left-t)||!s?this.#tY.push([{...i,rect:o,rectIndex:0}]):s.push({...i,rect:o,rectIndex:0}),e.length>1)for(let s=1;s<e.length;s++){let l=e[s];(l.left!==o.left||l.bottom!==o.bottom)&&(.2>Math.abs(l.left-t)?this.#tY.push([{...i,rect:l,rectIndex:s}]):this.#tY[this.#tY.length-1].push({...i,rect:l,rectIndex:s}))}}}}getLineCount(){return this.#tG(1/0),this.#tY.length}getLineInfo(e){if(this.#tG(e+1),e<this.#tY.length){let t=e>0?this.#tZ[e-1]??{}:void 0,s=this.#tZ[e]??{},i=e<this.#tY.length-1?this.#tZ[e+1]??{}:void 0;if(void 0===s.start){let i=this.#tY[e-1],o=i[i.length-1],l=this.#tK(o),n=o.start+l;t&&(t.end=n),s.start=n+1}if(void 0===s.end){let t=this.#tY[e],o=t[t.length-1];if(e===this.#tY.length-1){let e=o.node.nodeType===Node.TEXT_NODE?o.node.data.length:1;s.end=o.start+e}else{let e=this.#tK(o);s.end=o.start+e,i.start=s.end+1}}return s}}#tJ(e){let t=this.#tq.length-1,s=this.#tq[t],i=s?s.start+s.length:0;for(let t=this.#tq.length,s;(s=this.nodelist.at(t))&&e>=this.#tq.length;t++){let e=s.nodeType===Node.ELEMENT_NODE?1:s.data.length,o={node:s,length:e,start:i,nodeIndex:t};this.#tq.push(o)}return this.#tq[e]}getNodeInfoByCharIndex(e){let t,s=0,i=this.#tq.length-1;for(;s<=i;){let o=Math.floor((s+i)/2),l=this.#tq[o],n=l.node,r=n.nodeType===Node.TEXT_NODE?n.data.length:1,a=l.start;if(e>=a&&e<a+r){t=l;break}e<a?i=o-1:s=o+1}if(t)return t;for(let t=this.#tq.length,s;s=this.#tJ(t);t++)if(e<s.start+s.length)return s}}class lq{#tQ=[];#t0;constructor(e){this.#t0=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.tagName;if("X-TEXT"===t||"INLINE-TEXT"===t||"RAW-TEXT"===t||"LYNX-WRAPPER"===t)return NodeFilter.FILTER_SKIP}return NodeFilter.FILTER_ACCEPT})}at(e){return this.#tQ[e]||this.#t1(e),this.#tQ[e]}#t1(e){let t=null;for(;e>=this.#tQ.length&&(t=this.#t0.nextNode());){this.#tQ.push(t);break}}}s9=(0,oH.uA)("x-text",[o$.O,lZ,lB],'<div id="inner-box" part="inner-box"><slot part="slot"></slot><slot name="inline-truncation"></slot></div>'),new class extends oN{constructor(){super(C),s4()}static #e=(()=>{class e extends(s5=HTMLElement){static #e={c:[C,s4]}=(0,oD._)(this,[],[s9],s5);static notToFilterFalseAttributes=new Set(["tail-color-convert"]);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(oX.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[o$.v]=this}})()},s6=(0,oH._y)("placeholder-color",!0),s7=(0,oH._y)("placeholder-font-size",!0),ie=(0,oH._y)("placeholder-font-weight",!0),it=(0,oH._y)("placeholder-font-family",!0),is=(0,oH._y)("placeholder",!0);class lj{static #e={e:[ii,io,il,ir,ia,ih]}=(0,oD._)(this,[[s6,0,"_updatePlaceholderColor"],[s7,0,"_updatePlaceholderFontSize"],[ie,0,"_updatePlaceholderFontWeight"],[it,0,"_updatePlaceholderFontFamily"],[is,0,"_handlePlaceholder"]],[]);static observedAttributes=["placeholder","placeholder-color","placeholder-font-size","placeholder-font-weight","placeholder-font-family"];#t2=(ih(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#textarea"));_updatePlaceholderColor=ii(this,(0,oH._8)(this.#t2,"--placeholder-color",void 0,!0));_updatePlaceholderFontSize=io(this,(0,oH._8)(this.#t2,"--placeholder-font-size",void 0,!0));_updatePlaceholderFontWeight=il(this,(0,oH._8)(this.#t2,"--placeholder-font-weight",void 0,!0));_updatePlaceholderFontFamily=ir(this,(0,oH._8)(this.#t2,"--placeholder-font-family",void 0,!0));_handlePlaceholder=ia(this,(0,oH.H$)(this.#t2,"placeholder"));#s;constructor(e){this.#s=e}}id=(0,oH._y)("confirm-type",!0),ic=(0,oH._y)("maxlength",!0),iu=(0,oH._y)("readonly",!0),im=(0,oH._y)("ios-spell-check",!0),ip=(0,oH._y)("show-soft-input-onfocus",!0);class lK{static #e={e:[ig,iv,ib,iE,iy,i_]}=(0,oD._)(this,[[id,0,"_handlerConfirmType"],[ic,0,"_handlerMaxlength"],[iu,0,"_handleReadonly"],[im,0,"_handleSpellCheck"],[ip,0,"_handleShowSoftInputOnfocus"]],[]);static observedAttributes=["confirm-type","maxlength","readonly","type","ios-spell-check","spell-check","show-soft-input-onfocus"];#s;#t8=(i_(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#textarea"));_handlerConfirmType=ig(this,(0,oH.H$)(this.#t8,"enterkeyhint",e=>null===e?"send":e));_handlerMaxlength=iv(this,(0,oH.H$)(this.#t8,"maxlength",e=>null===e?"140":e));_handleReadonly=ib(this,(0,oH.H$)(this.#t8,"readonly",e=>null!==e?"":null));_handleSpellCheck=iE(this,(0,oH.H$)(this.#t8,"spellcheck",e=>null===e?"false":"true"));_handleShowSoftInputOnfocus=iy(this,(0,oH.H$)(this.#t8,"virtualkeyboardpolicy",e=>null===e?"manual":"auto"));constructor(e){this.#s=e}}iw=(0,oH._y)("confirm-enter",!0),ix=(0,oH._y)("disabled",!0),iS=(0,oH._y)("max-height",!0),iT=(0,oH._y)("min-height",!0),iC=(0,oH._y)("value",!1);class lG{static #e={e:[iL,iI,iA,iO]}=(0,oD._)(this,[[iw,2,"_handleConfirmEnter"],[iC,2,"_handleValue"],[ix,0,"_handleDisabled"],[iS,0,"_handleMaxHeight"],[iT,0,"_handleMinHeight"]],[]);static observedAttributes=["confirm-enter","disabled","max-height","min-height","value"];#s;#t8=(iO(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#textarea"));#eb=(0,oH.Ut)(()=>this.#s.shadowRoot,"#form");#t3=!1;_handleConfirmEnter(e){this.#t3=null!==e}_handleDisabled=iL(this,(0,oH.H$)(this.#t8,"disabled",e=>null!==e?"":null));_handleMaxHeight=iI(this,(0,oH._8)(this.#t8,"max-height"));_handleMinHeight=iA(this,(0,oH._8)(this.#t8,"min-height"));_handleValue(e){if(e){let t=parseFloat(this.#s.getAttribute("maxlength")??"");isNaN(t)||(e=e.substring(0,t))}else e="";let t=this.#t8();t.value!==e&&(t.value=e)}#t9=e=>{this.#t3&&"Enter"===e.key&&this.#eb().dispatchEvent(new SubmitEvent("submit"))};constructor(e){this.#s=e,this.#t8().addEventListener("keyup",this.#t9)}}iR=(0,oH._y)("input-filter",!0),iM=(0,oH.ZR)("lynxinput"),ik=(0,oH._y)("send-composing-input",!0),iD=(0,oH.ZR)("selection");class lJ{static #e={e:[iH]}=(0,oD._)(this,[[[iR,iM],2,"_handleEnableConfirmEvent"],[ik,2,"_handleSendComposingInput"],[iD,2,"_handleEnableSelectionEvent"]],[]);static observedAttributes=["send-composing-input","input-filter"];#s;#eg=(iH(this),!1);#t8=(0,oH.Ut)(()=>this.#s.shadowRoot,"#textarea");#eb=(0,oH.Ut)(()=>this.#s.shadowRoot,"#form");_handleEnableConfirmEvent(e){let t=this.#t8();e?(t.addEventListener("input",this.#eE,{passive:!0}),t.addEventListener("compositionend",this.#ef,{passive:!0})):(t.removeEventListener("input",this.#eE),t.removeEventListener("compositionend",this.#ef))}_handleSendComposingInput(e){this.#eg=null!==e}#ey=e=>{let t=lS[e.type]??e.type;this.#s.dispatchEvent(new CustomEvent(t,{...oz.$,detail:{value:this.#t8().value}}))};#eE=e=>{let t=this.#t8(),s=this.#s.getAttribute("input-filter"),i=s?t.value.replace(RegExp(s,"g"),""):t.value,o=e.isComposing;t.value=i,(!o||this.#eg)&&this.#s.dispatchEvent(new CustomEvent("lynxinput",{...oz.$,detail:{value:i,textLength:i.length,cursor:t.selectionStart,isComposing:o,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd}}))};#ef=()=>{let e=this.#t8(),t=this.#s.getAttribute("input-filter"),s=t?e.value.replace(RegExp(t,"g"),""):e.value;e.value=s,this.#eg||this.#s.dispatchEvent(new CustomEvent("lynxinput",{...oz.$,detail:{value:s,textLength:s.length,cursor:e.selectionStart,isComposing:!1,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};_handleEnableSelectionEvent(e){e?this.#t8().addEventListener("select",this.#ew,{passive:!0}):this.#t8().removeEventListener("select",this.#ew)}#ew=()=>{let e=this.#t8();this.#s.dispatchEvent(new CustomEvent("selection",{...oz.$,detail:{selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}}))};#ex=e=>{e.target===this.#t8()&&"number"==typeof e.detail&&e.stopImmediatePropagation()};constructor(e){this.#s=e;const t=this.#t8(),s=this.#eb();t.addEventListener("blur",this.#ey,{passive:!0}),t.addEventListener("focus",this.#ey,{passive:!0}),s.addEventListener("submit",this.#ey,{passive:!0}),s.addEventListener("input",this.#ex,{passive:!0})}}iF=(0,oH.uA)("x-textarea",[o$.O,lj,lK,lG,lJ],o0);class lQ extends(i$=HTMLElement){static #e={c:[L,iN]}=(0,oD._)(this,[],[iF],i$);#t2=(0,oH.Ut)(()=>this.shadowRoot,"#textarea");get value(){return this.#t2().value}set value(e){this.#t2().value=e}addText(e){let{text:t}=e,s=this.#t2(),i=s.selectionStart;if(null===i)s.value=t;else{let e=s.value;s.value=e.slice(0,i)+t+e.slice(i)}}setValue(e){let t,s=this.#t2();s.value=e.value,(t=e.index)&&s.setSelectionRange(t,t)}getValue(){let e=this.#t2();return{value:e.value,selectionBegin:e.selectionStart,selectionEnd:e.selectionEnd}}sendDelEvent(e){let{action:t,length:s}=e,i=this.#t2();1===t&&(s=1);let o=i.selectionStart;if(null===o){let e=i.value;i.value=i.value.substring(0,e.length-s)}else{let e=i.value;i.value=e.slice(0,o-s)+e.slice(o)}}select(){let e=this.#t2();e.setSelectionRange(0,e.value.length)}setSelectionRange(e){this.#t2().setSelectionRange(e.selectionStart,e.selectionEnd)}static #t=iN()}iP=(0,oH.uA)("x-view",[o9,o$.O]);class l0 extends(iz=HTMLElement){static #e={c:[I,iV]}=(0,oD._)(this,[],[iP],iz);superScrollIntoView(e){super.scrollIntoView(e)}scrollIntoView(e){"object"==typeof e&&e.scrollIntoViewOptions?this.dispatchEvent(new CustomEvent(oX.eventName,{bubbles:!0,composed:!0,detail:e.scrollIntoViewOptions})):super.scrollIntoView(e)}[o$.v]=this;static #t=iV()}iU=(0,oH._y)("blur-radius",!0);class l1{static #e={e:[iW]}=(0,oD._)(this,[[iU,2,"_handleBlurRadius"]],[]);static observedAttributes=["blur-radius"];#s;#t4=(iW(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#dynamic-style"));_handleBlurRadius(e){e?(e=`blur(${parseFloat(e)}px)`,this.#t4().innerHTML=`:host { backdrop-filter: ${e}; -webkit-backdrop-filter: ${e}}`):this.#t4().innerHTML=""}constructor(e){this.#s=e}}iB=(0,oH.uA)("x-blur-view",[o$.O,l1],'<style id="dynamic-style"></style><slot></slot>');class l2 extends(iZ=HTMLElement){static #e={c:[A,iX]}=(0,oD._)(this,[],[iB],iZ);static #t=iX()}iY=(0,oH.ZR)("change"),iq=(0,oH.ZR)("willchange"),ij=(0,oH.ZR)("offsetchange");class l8{static #e={e:[iK]}=(0,oD._)(this,[[iY,2,"_enableChangeEvent"],[iq,2,"_enableWillChangeEvent"],[ij,2,"_enableOffsetChangeEvent"]],[]);static observedAttributes=[];#s;#t5=(iK(this),!1);#t6=!1;#t7=0;#l;constructor(e){this.#s=e}#a=(0,oH.Ut)(()=>this.#s.shadowRoot,"#content");#se=()=>{if(!this.#t6)return;let e=this.#a(),t=this.#s.clientWidth,s=e.scrollLeft;this.#st&&!oW.k&&(clearTimeout(this.#l),this.#l=setTimeout(()=>{this.#ss()},100)),this.#s.dispatchEvent(new CustomEvent("offsetchange",{...oz.$,detail:{offset:s/t}}))};#ss=()=>{if(this.#t6){let e=this.#a(),t=this.#s.clientWidth,s=Math.floor(e.scrollLeft/t);s!==this.#t7&&(this.#s.dispatchEvent(new CustomEvent("change",{...oz.$,detail:{index:s,isDragged:this.#t5}})),this.#t7=s)}};#si=()=>{this.#t5=!0};#so=()=>{if(this.#t5=!1,this.#sl){let e=this.#a(),t=this.#s.clientWidth;if(t>0){let s=Math.round(e.scrollLeft/t);s=Math.max(0,Math.min(s,this.#s.children.length-1)),this.#s.dispatchEvent(new CustomEvent("willchange",{...oz.$,detail:{index:s}}))}}};#st=!1;_enableChangeEvent(e){this.#st=e,this.#sn()}#sl=!1;_enableWillChangeEvent(e){this.#sl=e}#sr=!1;_enableOffsetChangeEvent(e){this.#sr=e,this.#sn()}#sn(){let e=this.#a();this.#sr||this.#st?e.addEventListener("scroll",this.#se,{passive:!0}):e.removeEventListener("scroll",this.#se),oW.k&&this.#st?e.addEventListener("scrollend",this.#ss,{passive:!0}):e.removeEventListener("scrollend",this.#ss)}connectedCallback(){this.#t6=!0;let e=this.#a();this.#s.addEventListener("touchstart",this.#si,{passive:!0}),e.addEventListener("touchend",this.#so,{passive:!0}),e.addEventListener("touchcancel",this.#so,{passive:!0})}dispose(){let e=this.#a();e.removeEventListener("scroll",this.#se),e.removeEventListener("scrollend",this.#ss)}}iG=(0,oH.uA)("x-viewpager-ng",[o9,o$.O,l8],o1),new class extends oN{constructor(){super(O),iJ()}static #e=(()=>{class e extends(iQ=HTMLElement){static #e={c:[O,iJ]}=(0,oD._)(this,[],[iG],iQ);static notToFilterFalseAttributes=new Set(["allow-horizontal-gesture","enable-scroll"]);selectTab(e){let{index:t,smooth:s}=e;void 0===s&&(s=!0);let i=this.shadowRoot.children.item(2),o=i.clientWidth*t;i.scrollTo({left:o,behavior:s?"smooth":"instant"})}connectedCallback(){let e=this.getAttribute("select-index")||this.getAttribute("initial-select-index");if(null!==e){let t=Number(e),s=this.shadowRoot.children.item(2),i=()=>{0===s.clientWidth?requestAnimationFrame(i):this.selectTab({index:t,smooth:!1})};(0,oH.JS)(i)}}get[oW.l](){return this}}})()},i0=(0,oH.uA)("x-viewpager-item-ng",[o9,o$.O]);class l3 extends(i2=HTMLElement){static #e={c:[R,i1]}=(0,oD._)(this,[],[i0],i2);static #t=i1()}i8=(0,oH._y)("estimated-main-axis-size-px",!0);class l9{static #e={e:[i3,i9]}=(0,oD._)(this,[[i8,0,"_handlerEstimatedMainAxisSizePx"]],[]);static observedAttributes=["estimated-main-axis-size-px"];#s;_handlerEstimatedMainAxisSizePx=(i9(this),i3(this,(0,oH._8)(()=>this.#s,"--estimated-main-axis-size-px",e=>`${parseFloat(e)}px`)));constructor(e){this.#s=e}}i4=(0,oH.uA)("list-item",[o$.O,l9]),new class extends oN{constructor(){super(M),i5()}static #e=(()=>{class e extends(i6=HTMLElement){static #e={c:[M,i5]}=(0,oD._)(this,[],[i4],i6);static notToFilterFalseAttributes=new Set(["recyclable"])}})()},i7=(0,oH._y)("sticky-offset",!0),oe=(0,oH._y)("span-count",!0),ot=(0,oH._y)("column-count",!0);class l4{static #e={e:[os,oi,oo]}=(0,oD._)(this,[[i7,0,"_handlerStickyOffset"],[[oe,ot],0,"_handlerCount"]],[]);static observedAttributes=["sticky-offset","initial-scroll-index","span-count","column-count"];#s;_handlerStickyOffset=(oo(this),os(this,(0,oH._8)(()=>this.#s,"--list-item-sticky-offset",e=>`${parseFloat(e)}px`)));_handlerCount=oi(this,(0,oH._8)(()=>this.#s,"--list-item-span-count",e=>`${parseFloat(e)}`));constructor(e){this.#s=e}connectedCallback(){let e=this.#s.getAttribute("initial-scroll-index");if(null!==e){let t=parseFloat(e),s=()=>{0===this.#s.clientHeight?requestAnimationFrame(s):this.#s.scrollToPosition({position:t})};(0,oH.JS)(s)}}}let l5=function(e,t,s){let i,o,l,n,r=0;var a=function(){r=s?.leading===!1?0:new Date().getTime(),i=null,n=e.apply(o,l),i||(o=l=null)};return function(){var h=new Date().getTime();r||s?.leading!==!1||(r=h);var d=t-(h-r);return o=this,l=arguments,d<=0||d>t?(i&&(clearTimeout(i),i=null),r=h,n=e.apply(o,l),i||(o=l=null)):i||s?.trailing===!1||(i=setTimeout(a,d)),n}};ol=(0,oH.ZR)("scrolltoupper"),on=(0,oH._y)("upper-threshold-item-count",!0),or=(0,oH.ZR)("scrolltolower"),oa=(0,oH._y)("lower-threshold-item-count",!0),oh=(0,oH.ZR)("lynxscroll"),od=(0,oH.ZR)("lynxscrollend"),oc=(0,oH.ZR)("snap"),ou=(0,oH.ZR)("scrolltoupperedge"),om=(0,oH.ZR)("scrolltoloweredge");class l6{static #e={e:[op,og,ov,ob,oE,of]}=(0,oD._)(this,[[on,2,"_handleUpperThresholdItemCountChange"],[oa,2,"_handleLowerThresholdItemCountChange"],[ol,0,"_updateEventSwitches"],[or,0,"_updateScrollToLowerEventSwitches"],[[oh,od,oc],0,"_handleScrollEventsSwitches"],[ou,0,"_handleScrollToUpperEdgeEventEnable"],[om,0,"_handleScrollToLowerEdgeEventEnable"]],[]);static observedAttributes=["upper-threshold-item-count","lower-threshold-item-count"];#s;#sa=(of(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#content"));#sh;#sd;#sc;#n=0;#r=0;#su=!1;#l;#h=(0,oH.Ut)(()=>this.#s.shadowRoot,"#upper-threshold-observer");#d=(0,oH.Ut)(()=>this.#s.shadowRoot,"#lower-threshold-observer");#u(){let e=null!==this.#s.getAttribute("need-visible-item-info"),{scrollTop:t,scrollLeft:s,scrollHeight:i,scrollWidth:o}=this.#sa(),l={scrollTop:t,scrollLeft:s,scrollHeight:i,scrollWidth:o,deltaX:s-this.#n,deltaY:t-this.#r,attachedCells:e?this.#s.getVisibleCells():void 0};return this.#n=s,this.#r=t,l}#sm=e=>{let{isIntersecting:t}=e[0];t&&this.#s.dispatchEvent(new CustomEvent("scrolltoupper",{...oz.$,detail:this.#u()}))};_updateEventSwitches=op(this,e=>{if(e?this.#s.setAttribute("x-enable-scrolltoupper-event",""):this.#s.removeAttribute("x-enable-scrolltoupper-event"),this.#ek.scrolltoupper=e,e){this.#sh||(this.#sh=new IntersectionObserver(this.#sm,{root:this.#sa()})),this.#sc||(this.#sc=new MutationObserver(this.#sp));let e=this.#s.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#h():this.#s.children[t-1];s&&this.#sh.observe(s),this.#sc.observe(this.#s,{childList:!0})}else this.#sh&&(this.#sh.disconnect(),this.#sh=void 0),this.#sc&&(this.#sc.disconnect(),this.#sc=void 0)});_handleUpperThresholdItemCountChange(e,t){let s=null!==t?parseFloat(t):0,i=0===s?this.#h():this.#s.children[s-1];i&&this.#sh?.unobserve(i);let o=null!==e?parseFloat(e):0,l=0===o?this.#h():this.#s.children[o-1];l&&this.#sh?.observe(l)}#sg=e=>{let{isIntersecting:t}=e[0];t&&this.#s.dispatchEvent(new CustomEvent("scrolltolower",{...oz.$,detail:this.#u()}))};#ek={lynxscroll:!1,lynxscrollend:!1,snap:!1,scrolltolower:!1,scrolltoupper:!1};_updateScrollToLowerEventSwitches=og(this,e=>{if(this.#ek.scrolltolower=e,e?this.#s.setAttribute("x-enable-scrolltolower-event",""):this.#s.removeAttribute("x-enable-scrolltolower-event"),e){this.#sd||(this.#sd=new IntersectionObserver(this.#sg,{root:this.#sa()})),this.#sc||(this.#sc=new MutationObserver(this.#sp));let e=this.#s.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#d():this.#s.children[this.#s.children.length-t];s&&this.#sd.observe(s),this.#sc.observe(this.#s,{childList:!0})}else this.#sd&&(this.#sd.disconnect(),this.#sd=void 0),this.#sc&&(this.#sc.disconnect(),this.#sc=void 0)});_handleLowerThresholdItemCountChange(e,t){let s=null!==t?parseFloat(t):0,i=0===s?this.#d():this.#s.children[this.#s.children.length-s];i&&this.#sd?.unobserve(i);let o=null!==e?parseFloat(e):0,l=0===o?this.#d():this.#s.children[this.#s.children.length-o];l&&this.#sd?.observe(l)}#sp=e=>{let t=e?.[0];if(t?.type==="childList"){if(this.#ek.scrolltolower){this.#sd&&(this.#sd.disconnect(),this.#sd=void 0),this.#sd=new IntersectionObserver(this.#sg,{root:this.#sa()});let e=this.#s.getAttribute("lower-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#d():this.#s.children[this.#s.children.length-t];s&&this.#sd.observe(s)}if(null!==this.#s.getAttribute("x-enable-scrolltoupper-event")){this.#sh&&(this.#sh.disconnect(),this.#sh=void 0),this.#sh=new IntersectionObserver(this.#sm,{root:this.#sa()});let e=this.#s.getAttribute("upper-threshold-item-count"),t=null!==e?parseFloat(e):0,s=0===t?this.#h():this.#s.children[t-1];s&&this.#sh.observe(s)}}};#sv=null;#g=()=>{this.#su&&!oW.k&&(clearTimeout(this.#l),this.#l=setTimeout(()=>{this.#b()},100)),this.#s.dispatchEvent(new CustomEvent("lynxscroll",{...oz.$,detail:this.#u()}))};_handleScrollEventsSwitches=ov(this,(e,t)=>{this.#ek[t]=e;let{lynxscroll:s,lynxscrollend:i,snap:o}=this.#ek,l=this.#s.getAttribute("scroll-event-throttle");this.#su=null!==i||null!==o;let n=this.#sa();if(this.#sv&&n.removeEventListener("scroll",this.#sv),null!==s||this.#su){let e=null!==l?parseFloat(l):0,t=l5(this.#g,e,{leading:!0,trailing:!1});this.#sv=t,n.addEventListener("scroll",this.#sv),this.#n=0,this.#r=0}oW.k&&this.#su?n.addEventListener("scrollend",this.#b):n.removeEventListener("scrollend",this.#b)});#c=e=>{let{isIntersecting:t,target:s}=e[0],i=s.id;t&&("upper-threshold-observer"===i?this.#s.dispatchEvent(new CustomEvent("scrolltoupperedge",{...oz.$,detail:this.#u()})):"lower-threshold-observer"===i&&this.#s.dispatchEvent(new CustomEvent("scrolltoloweredge",{...oz.$,detail:this.#u()})))};_handleScrollToUpperEdgeEventEnable=ob(this,e=>{e?this.#s.setAttribute("x-enable-scrolltoupperedge-event",""):this.#s.removeAttribute("x-enable-scrolltoupperedge-event"),this.#sb(e)});#sb=oU(this.#sa,this.#h,this.#c);_handleScrollToLowerEdgeEventEnable=oE(this,e=>{e?this.#s.setAttribute("x-enable-scrolltoloweredge-event",""):this.#s.removeAttribute("x-enable-scrolltoloweredge-event"),this.#sE(e)});#sE=oU(this.#sa,this.#d,this.#c);#b=()=>{let e=this.#s.getAttribute("item-snap");if(this.#s.dispatchEvent(new CustomEvent("lynxscrollend",{...oz.$})),null!==e){let e=Array.from(this.#s.children).filter(e=>"LIST-ITEM"===e.tagName),t=this.#sa().scrollTop,s=this.#sa().scrollLeft,i=e.find(e=>t>=e.offsetTop&&t<e.offsetTop+e.offsetHeight);this.#s.dispatchEvent(new CustomEvent("snap",{...oz.$,detail:{position:i&&e.indexOf(i),scrollTop:t,scrollLeft:s}}))}};constructor(e){this.#s=e}}let l7="waterfall-slot",ne="waterfall-style";oy=(0,oH.ZR)("scrolltolower"),o_=(0,oH._y)("list-type",!0);class nt{static #e={e:[ow]}=(0,oD._)(this,[[oy,2,"_handleXEnableHeaderOffsetEvent"],[o_,2,"_handlerListType"]],[]);static observedAttributes=["list-type"];#s;#sa=(ow(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#content"));#sf=(0,oH.Ut)(()=>this.#s.shadowRoot,'div[part="lower-threshold-observer"]');#H;#sc;_handleXEnableHeaderOffsetEvent(e){if(e?this.#s.setAttribute("x-enable-scrolltolower-event",""):this.#s.removeAttribute("x-enable-scrolltolower-event"),e){let e=this.#sf(),t=this.#s.getAttribute("scroll-orientation")||"vertical",s=this.#sa();setTimeout(()=>{"vertical"===t?(e.style.setProperty("top",`${String(s.scrollHeight-1)}px`,"important"),e.style.setProperty("bottom","unset","important")):(e.style.setProperty("left",`${String(s.scrollWidth-1)}px`,"important"),e.style.setProperty("right","unset","important"))},100)}}#sy=()=>{let e=document.createElement("slot");e.setAttribute("name",`${l7}`),this.#s.shadowRoot?.querySelector("[part=upper-threshold-observer]")?.insertAdjacentElement("afterend",e)};#s_=()=>{let e=parseFloat(this.#s.getAttribute("span-count")||this.#s.getAttribute("column-count")||"")||1,t="vertical"===(this.#s.getAttribute("scroll-orientation")||"vertical"),s=Array(e).fill(0);for(let i=0;i<this.#s.children.length;i++){let o=this.#s.children[i],l=getComputedStyle(o).getPropertyValue("--list-main-axis-gap"),n=getComputedStyle(o).getPropertyValue("--list-cross-axis-gap"),r=t?o.getBoundingClientRect().height+parseFloat(l):o.getBoundingClientRect().width+parseFloat(l);if(null!==o.getAttribute("full-span")){let i=s[0];for(let t=1;t<e;t++)s[t]>i&&(i=s[t]);for(let t=0;t<e;t++)s[t]=i+r;t?(o.setAttribute(`${ne}-left`,"0"),o.setAttribute(`${ne}-top`,`${i}px`)):(o.setAttribute(`${ne}-left`,`${i}px`),o.setAttribute(`${ne}-top`,"0"))}else{let i=0,l=s[0];for(let t=1;t<e;t++)s[t]<l&&(i=t,l=s[t]);let a=`calc(${i} * (100% - ${n} * (${e} - 1))/ ${e} + ${Math.max(0,i)} * ${n})`;t?(o.setAttribute(`${ne}-left`,a),o.setAttribute(`${ne}-top`,`${l}px`)):(o.setAttribute(`${ne}-left`,`${l}px`),o.setAttribute(`${ne}-top`,a)),s[i]+=r}}for(let e=0;e<this.#s.children.length;e++){let t=this.#s.children[e];t.style.setProperty("left",t.getAttribute(`${ne}-left`)),t.style.setProperty("top",t.getAttribute(`${ne}-top`)),t.setAttribute("slot",l7)}};constructor(e){this.#s=e}#sw=()=>{this.#H?.disconnect(),this.#H=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.#s_()})}),Array.from(this.#s.children).forEach(e=>{this.#H?.observe(e)})};_handlerListType(e){if("waterfall"===e)this.#sy(),this.#H||this.#sw(),this.#sc||(this.#sc=new MutationObserver(e=>{let t=e?.[0];t?.type==="childList"&&this.#sw()}),this.#sc.observe(this.#s,{childList:!0}));else{this.#H?.disconnect(),this.#H=void 0,this.#sc?.disconnect(),this.#sc=void 0;for(let e=0;e<this.#s.children.length;e++)this.#s.children[e].removeAttribute("slot");this.#s.shadowRoot?.querySelector(`slot[name=${l7}]`)?.remove()}}}ox=(0,oH.uA)("x-list",[o$.O,l4,l6,nt],oK),new class extends oN{constructor(){super(k),oS()}static #e=(()=>{class e extends(oT=HTMLElement){static #e={c:[k,oS]}=(0,oD._)(this,[],[ox],oT);static notToFilterFalseAttributes=new Set(["enable-scroll"]);#sa=(0,oH.Ut)(()=>this.shadowRoot,"#content");#sx={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#sS={};get scrollTop(){return this.#sa().scrollTop}set scrollTop(e){this.#sa().scrollTop=e}get scrollLeft(){return this.#sa().scrollTop}set scrollLeft(e){this.#sa().scrollLeft=e}get scrollHeight(){return this.#sa().scrollHeight}get scrollWidth(){return this.#sa().scrollWidth}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let s=parseFloat(e.offset);t={left:s,top:s}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.position){if(0===e.position)this.#sa().scrollTop=0,this.#sa().scrollLeft=0;else if(e.position>0&&e.position<this.childElementCount){let s=this.children.item(e.position);s instanceof HTMLElement&&(t=t?{left:s.offsetLeft+t.left,top:s.offsetTop+t.top}:{left:s.offsetLeft,top:s.offsetTop})}}t&&this.#sa().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#sT=e=>{if(!this.#sx.isScrolling)return;if(!this.#sx.lastTimestamp){this.#sx.lastTimestamp=e,requestAnimationFrame(this.#sT);return}let t=this.#sa(),s=(e-this.#sx.lastTimestamp)/1e3*this.#sx.rate;t.scrollBy({left:s,top:s,behavior:"auto"}),this.#sx.lastTimestamp=e;let i="vertical"===(this.getAttribute("scroll-orientation")||"vertical");(i?t.scrollTop+t.clientHeight>=t.scrollHeight:t.scrollLeft+t.clientWidth>=t.scrollWidth)&&this.#sx.autoStop?(i?t.scrollTop=t.scrollHeight-t.clientHeight:t.scrollLeft=t.scrollWidth-t.clientWidth,this.#sx.isScrolling=!1):requestAnimationFrame(this.#sT)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#sx={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop};let s=this.#sa(),i="vertical"===(this.getAttribute("scroll-orientation")||"vertical")?s.clientHeight<=s.scrollHeight:s.clientWidth<=s.scrollWidth;this.#sx.lastTimestamp=0,i?setTimeout(()=>requestAnimationFrame(this.#sT),0):requestAnimationFrame(this.#sT)}else this.#sx.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#sS),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);if(0===e.length){let s=this.#sa().getBoundingClientRect();e=t.filter(e=>{let t=e.getBoundingClientRect();return t.bottom>=s.top&&t.top<=s.bottom&&t.right>=s.left&&t.left<=s.right})}return e.map(e=>{let s=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:s.bottom,top:s.top,left:s.left,right:s.right,index:t.indexOf(e)}})};#sC=()=>Object.values(this.#sS).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#sL=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,s=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(s&&!t){let e=this.#sC();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...oz.$,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#sC()}}))},100);return}if(i){let s=e.target?.getAttribute("item-key");if(!s)return;t?this.#sS[s]&&delete this.#sS[s]:this.#sS[s]=e.target;return}};connectedCallback(){this.#sa().addEventListener("contentvisibilityautostatechange",this.#sL,{passive:!0})}}})()},oC=(0,oH._y)("src",!0),oL=(0,oH._y)("html",!0);class ns{static #e={e:[oI,oA,oO]}=(0,oD._)(this,[[oC,0,"_handleSrc"],[oL,0,"_handleHtml"]],[]);static observedAttributes=["src","html"];#s;#sI=(oO(this),(0,oH.Ut)(()=>this.#s.shadowRoot,"#webview"));constructor(e){this.#s=e}_handleSrc=oI(this,(0,oH.H$)(this.#sI,"src"));_handleHtml=oA(this,(0,oH.H$)(this.#sI,"srcdoc"))}oR=(0,oH.uA)("x-webview",[o$.O,ns],o2);class ni extends(ok=HTMLElement){static #e={c:[D,oM]}=(0,oD._)(this,[],[oR],ok);#sI=(0,oH.Ut)(()=>this.shadowRoot,"#webview");#sA=()=>{this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0,detail:{url:this.#sI().src}})),this.dispatchEvent(new CustomEvent("bindload",{bubbles:!0,composed:!0,detail:{url:this.#sI().src}}))};#sO=e=>{this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}})),this.dispatchEvent(new CustomEvent("binderror",{bubbles:!0,composed:!0,detail:{errorMsg:e.message||"unknown error"}}))};#sR=e=>{e.source===this.#sI().contentWindow&&(this.dispatchEvent(new CustomEvent("message",{bubbles:!0,composed:!0,detail:{msg:e.data,data:e.data}})),this.dispatchEvent(new CustomEvent("bindmessage",{bubbles:!0,composed:!0,detail:{msg:e.data}})))};connectedCallback(){this.#sI().addEventListener("load",this.#sA),this.#sI().addEventListener("error",this.#sO),window.addEventListener("message",this.#sR)}disconnectedCallback(){this.#sI().removeEventListener("load",this.#sA),this.#sI().removeEventListener("error",this.#sO),window.removeEventListener("message",this.#sR)}get src(){return this.getAttribute("src")}set src(e){null===e?this.removeAttribute("src"):this.setAttribute("src",e)}get html(){return this.getAttribute("html")}set html(e){null===e?this.removeAttribute("html"):this.setAttribute("html",e)}reload(){this.#sI().src=this.#sI().src}static #t=oM()}}}]);