@lynx-js/web-explorer-canary 0.0.7-canary-20250502-923f16fe → 0.0.7-canary-20250502-2c160293

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";var e={20:function(){},434:function(){},21:function(e,t,a){a.d(t,{Z:()=>n});class i{constructor(e,t,a,n,l){this._legacyCanvasSize=i.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),a&&"object"==typeof a?this._onDecode=t:(a||n||l?console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future"):console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=t),t="object"==typeof a?a:{},this._onDecodeError=t.onDecodeError||("function"==typeof a?a:this._onDecodeError),this._calculateScanRegion=t.calculateScanRegion||("function"==typeof n?n:this._calculateScanRegion),this._preferredCamera=t.preferredCamera||l||this._preferredCamera,this._legacyCanvasSize="number"==typeof a?a:"number"==typeof n?n:this._legacyCanvasSize,this._maxScansPerSecond=t.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let r=!1;if(e.hidden&&(e.hidden=!1,r=!0),document.body.contains(e)||(document.body.appendChild(e),r=!0),a=e.parentElement,t.highlightScanRegion||t.highlightCodeOutline){if(n=!!t.overlay,this.$overlay=t.overlay||document.createElement("div"),(l=this.$overlay.style).position="absolute",l.display="none",l.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!n&&t.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch(e){}a.insertBefore(this.$overlay,this.$video.nextSibling)}t.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let t=window.getComputedStyle(e);"none"===t.display&&(e.style.setProperty("display","block","important"),r=!0),"visible"!==t.visibility&&(e.style.setProperty("visibility","visible","important"),r=!0),r&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=i.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await i.listCameras(!1)).length}catch(e){return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let t=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(e=>"videoinput"===e.kind),a;try{e&&(await t()).every(e=>!e.label)&&(a=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch(e){}try{return(await t()).map((e,t)=>({id:e.deviceId,label:e.label||(0===t?"Default Camera":`Camera ${t+1}`)}))}finally{a&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),i._stopVideoStream(a))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch(e){return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),i._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),i._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&("https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:t}=await this._getCameraStream();!this._active||this._paused?i._stopVideoStream(e):(this._setVideoMirror(t),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let t=()=>{this.$video.srcObject instanceof MediaStream&&(i._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(t(),!0):(await new Promise(e=>setTimeout(e,300)),!!this._paused&&(t(),!0))}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,t,a,n,l=!1,r=!1){let s,o=!1;t&&("scanRegion"in t||"qrEngine"in t||"canvas"in t||"disallowCanvasResizing"in t||"alsoTryWithoutScanRegion"in t||"returnDetailedScanResult"in t)?(s=t.scanRegion,a=t.qrEngine,n=t.canvas,l=t.disallowCanvasResizing||!1,r=t.alsoTryWithoutScanRegion||!1,o=!0):t||a||n||l||r?console.warn("You're using a deprecated api for scanImage which will be removed in the future."):console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),t=!!a;try{let d,h,c;if([a,d]=await Promise.all([a||i.createQrEngine(),i._loadImage(e)]),[n,h]=i._drawToCanvas(d,s,n,l),a instanceof Worker){let e=a;t||i._postWorkerMessageSync(e,"inversionMode","both"),c=await new Promise((t,a)=>{let l,r,o,d=-1;r=n=>{n.data.id===d&&(e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),null!==n.data.data?t({data:n.data.data,cornerPoints:i._convertPoints(n.data.cornerPoints,s)}):a(i.NO_QR_CODE_FOUND))},o=t=>{e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),a("Scanner error: "+(t?t.message||t:"Unknown Error"))},e.addEventListener("message",r),e.addEventListener("error",o),l=setTimeout(()=>o("timeout"),1e4);let c=h.getImageData(0,0,n.width,n.height);d=i._postWorkerMessageSync(e,"decode",c,[c.data.buffer])})}else c=await Promise.race([new Promise((e,t)=>window.setTimeout(()=>t("Scanner error: timeout"),1e4)),(async()=>{try{var[t]=await a.detect(n);if(!t)throw i.NO_QR_CODE_FOUND;return{data:t.rawValue,cornerPoints:i._convertPoints(t.cornerPoints,s)}}catch(a){if(t=a.message||a,/not implemented|service unavailable/.test(t))return i._disableBarcodeDetector=!0,i.scanImage(e,{scanRegion:s,canvas:n,disallowCanvasResizing:l,alsoTryWithoutScanRegion:r});throw`Scanner error: ${t}`}})()]);return o?c:c.data}catch(d){if(!s||!r)throw d;let t=await i.scanImage(e,{qrEngine:a,canvas:n,disallowCanvasResizing:l});return o?t:t.data}finally{t||i._postWorkerMessage(a,"close")}}setGrayscaleWeights(e,t,a,n=!0){i._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:t,blue:a,useIntegerApproximation:n})}setInversionMode(e){i._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>a.e("605").then(a.bind(a,769)).then(e=>e.createWorker()),!(!i._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return e();let t=navigator.userAgentData;return t&&t.brands.some(({brand:e})=>/Chromium/i.test(e))&&/mac ?OS/i.test(t.platform)&&await t.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:e,platformVersion:t})=>/arm/i.test(e||"arm")&&13<=parseInt(t||"13")).catch(()=>!0)?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let t=Math.round(2/3*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-t)/2),y:Math.round((e.videoHeight-t)/2),width:t,height:t,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,t=e.videoWidth,a=e.videoHeight,i=e.offsetWidth,n=e.offsetHeight,l=e.offsetLeft,r=e.offsetTop,s=window.getComputedStyle(e),o=s.objectFit,d=t/a,h=i/n;switch(o){case"none":var c=t,u=a;break;case"fill":c=i,u=n;break;default:("cover"===o?d>h:d<h)?c=(u=n)*d:u=(c=i)/d,"scale-down"===o&&(c=Math.min(c,t),u=Math.min(u,a))}var[m,p]=s.objectPosition.split(" ").map((e,t)=>{let a=parseFloat(e);return e.endsWith("%")?(t?n-u:i-c)*a/100:a});s=this._scanRegion.width||t,h=this._scanRegion.height||a,o=this._scanRegion.x||0;var v=this._scanRegion.y||0;(d=this.$overlay.style).width=`${s/t*c}px`,d.height=`${h/a*u}px`,d.top=`${r+p+v/a*u}px`,a=/scaleX\(-1\)/.test(e.style.transform),d.left=`${l+(a?i-m-c:m)+(a?t-o-s:o)/t*c}px`,d.transform=e.style.transform}})}static _convertPoints(e,t){if(!t)return e;let a=t.x||0,i=t.y||0,n=t.width&&t.downScaledWidth?t.width/t.downScaledWidth:1;for(let l of(t=t.height&&t.downScaledHeight?t.height/t.downScaledHeight:1,e))l.x=l.x*n+a,l.y=l.y*t+i;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,t=1e3/this._maxScansPerSecond;e<t&&await new Promise(a=>setTimeout(a,t-e)),this._lastScanTimestamp=Date.now();try{var a=await i.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(e){if(!this._active)return;this._onDecodeError(e)}!i._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=i.createQrEngine()),a?(this._onDecode?this._onDecode(a):this._legacyOnDecode&&this._legacyOnDecode(a.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",a.cornerPoints.map(({x:e,y:t})=>`${e},${t}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==i.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",t=[{width:{min:1024}},{width:{min:768}},{}];for(let a of[...t.map(t=>Object.assign({},t,{[e]:{exact:this._preferredCamera}})),...t])try{let e=await navigator.mediaDevices.getUserMedia({video:a,audio:!1}),t=this._getFacingMode(e)||(a.facingMode?this._preferredCamera:"environment"===this._preferredCamera?"user":"environment");return{stream:e,facingMode:t}}catch(e){}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let t of e.getTracks())t.stop(),e.removeTrack(t)}_setVideoMirror(e){this.$video.style.transform="scaleX("+("user"===e?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,t,a,i=!1){a=a||document.createElement("canvas");let n=t&&t.x?t.x:0,l=t&&t.y?t.y:0,r=t&&t.width?t.width:e.videoWidth||e.width,s=t&&t.height?t.height:e.videoHeight||e.height;return i||(i=t&&t.downScaledWidth?t.downScaledWidth:r,t=t&&t.downScaledHeight?t.downScaledHeight:s,a.width!==i&&(a.width=i),a.height!==t&&(a.height=t)),(t=a.getContext("2d",{alpha:!1})).imageSmoothingEnabled=!1,t.drawImage(e,n,l,r,s,0,0,a.width,a.height),[a,t]}static async _loadImage(e){if(e instanceof Image)return await i._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||"string"==typeof e){let t=new Image;t.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await i._awaitImageLoad(t),t}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(t.src)}}throw"Unsupported image type."}static async _awaitImageLoad(e){e.complete&&0!==e.naturalWidth||await new Promise((t,a)=>{let i=n=>{e.removeEventListener("load",i),e.removeEventListener("error",i),n instanceof ErrorEvent?a("Image load error"):t()};e.addEventListener("load",i),e.addEventListener("error",i)})}static async _postWorkerMessage(e,t,a,n){return i._postWorkerMessageSync(await e,t,a,n)}static _postWorkerMessageSync(e,t,a,n){if(!(e instanceof Worker))return -1;let l=i._workerMessageId++;return e.postMessage({id:l,type:t,data:a},n),l}}i.DEFAULT_CANVAS_SIZE=400,i.NO_QR_CODE_FOUND="No QR code found",i._disableBarcodeDetector=!1,i._workerMessageId=0;let n=i},353:function(e,t,a){var i,n,l,r,s,o,d,h;a.d(t,{EN:()=>V,UK:()=>C,uE:()=>m,oc:()=>q,wg:()=>f,sr:()=>I,ZW:()=>z,eA:()=>S,eW:()=>A,wU:()=>O,G4:()=>B,YH:()=>$,fT:()=>i,i$:()=>j,jK:()=>n,bh:()=>N,Hs:()=>x,E3:()=>T,cZ:()=>L,gc:()=>W,Au:()=>_,RN:()=>v,Rz:()=>M,Oh:()=>P,E9:()=>G,EO:()=>K,jF:()=>X,bM:()=>H,nt:()=>k,Tt:()=>D,R1:()=>R,L9:()=>p,V_:()=>U,cx:()=>F,rd:()=>E,Xz:()=>c,$m:()=>b,mH:()=>y,Bq:()=>g,SH:()=>u});let c="lynx-unique-id",u="lynx-css-id",m="lynx-component-id",p="lynx-tag",v="lynx-default-display-linear",g="__lynx_timing_flag",b=["registerDataProcessor","registerWorkletInternal","lynxWorkletImpl","runWorklet"],f={platform:"web",lynxSdkVersion:"3.0"},y={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur"},E={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus"}},S={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function w(e,t,a=!0,i=!1,n){return{name:e,isSync:t,hasReturn:a,hasReturnTransfer:i,bufferSize:n}}let C=w("__postExposure",!1,!1),x=w("publicComponentEvent",!1,!1),T=w("publishEvent",!1,!1),O=w("postOffscreenEventEndpoint",!1,!1),I=w("switchExposureServiceEndpoint",!1,!1),L=w("mainThreadStart",!1,!1),_=w("updateData",!1,!0),k=w("sendGlobalEventEndpoint",!1,!1),A=w("dispose",!1,!0),M=w("start",!1,!0),P=w("reportError",!1,!1),R=w("flushElementTree",!1,!0),D=w("callLepusMethod",!1,!0),N=w("__invokeUIMethod",!1,!0),F=w("__setNativeProps",!1,!0),H=w("nativeModulesCall",!1,!0),j=w("napiModulesCall",!1,!0,!0),$=w("getCustomSections",!1,!0),U=w("markTiming",!1,!1),V=w("postTimingFlags",!1,!1),W=w("__triggerComponentEvent",!1,!1),z=w("__selectComponent",!1,!0),B=w("dispatchLynxViewEvent",!1,!1),q=w("dispatchNapiModule",!1,!1),X=w("dispatchCoreContextOnBackground",!1,!1),K=w("dispatchJSContextOnMainThread",!1,!1);(s=i||(i={}))[s.ID_SELECTOR=0]="ID_SELECTOR",s[s.REF_ID=1]="REF_ID",s[s.UNIQUE_ID=2]="UNIQUE_ID",(o=n||(n={}))[o.SUCCESS=0]="SUCCESS",o[o.UNKNOWN=1]="UNKNOWN",o[o.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",o[o.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",o[o.PARAM_INVALID=4]="PARAM_INVALID",o[o.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",o[o.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE",(d=l||(l={}))[d.UPDATE=0]="UPDATE",d[d.RESET=1]="RESET",(h=r||(r={}))[h.Unknown=0]="Unknown",h[h.UpdateExplictByUser=1]="UpdateExplictByUser",h[h.UpdateByKernelFromCtor=2]="UpdateByKernelFromCtor",h[h.UpdateByKernelFromRender=4]="UpdateByKernelFromRender",h[h.UpdateByKernelFromHydrate=8]="UpdateByKernelFromHydrate",h[h.UpdateByKernelFromGetDerived=16]="UpdateByKernelFromGetDerived",h[h.UpdateByKernelFromConflict=32]="UpdateByKernelFromConflict",h[h.UpdateByKernelFromHMR=64]="UpdateByKernelFromHMR";class G extends EventTarget{_config;constructor(e){super(),this._config=e}postMessage(...e){console.error("[lynx-web] postMessage not implemented, args:",...e)}dispatchEvent(e){let{rpc:t,sendEventEndpoint:a}=this._config;return t.invoke(a,[e]),3}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}},582:function(e,t,a){a.a(e,async function(e,t){try{var i=a(609);a(353);var n=a(185),l=e([i]);i=(l.then?(await l)():l)[0];class r extends HTMLElement{static lynxViewCount=0;static tag="lynx-view";static observedAttributeAsProperties=["url","global-props","init-data"];static observedAttributes=r.observedAttributeAsProperties.map(e=>e.toLowerCase());#e;#t;get url(){return this.#t}set url(e){this.#t=e,this.#a()}#i={};get globalProps(){return this.#i}set globalProps(e){"string"==typeof e?this.#i=JSON.parse(e):this.#i=e}#n={};get initData(){return this.#n}set initData(e){"string"==typeof e?this.#n=JSON.parse(e):this.#n=e}#l={page:"div"};get overrideLynxTagToHTMLTagMap(){return this.#l}set overrideLynxTagToHTMLTagMap(e){"string"==typeof e?this.#l=JSON.parse(e):this.#l=e}#r=[];#s;get onNativeModulesCall(){return this.#s}set onNativeModulesCall(e){if(this.#s=e,this.#r)for(let t of this.#r)e.apply(void 0,t)}#o={};get nativeModulesMap(){return this.#o}set nativeModulesMap(e){this.#o=e}#d={};get napiModulesMap(){return this.#d}set napiModulesMap(e){this.#d=e}#h;get onNapiModulesCall(){return this.#h}set onNapiModulesCall(e){this.#h=(t,a,i,n)=>e(t,a,i,this,n)}get lynxGroupId(){return this.getAttribute("lynx-group-id")?Number(this.getAttribute("lynx-group-id")):void 0}set lynxGroupId(e){e?this.setAttribute("lynx-group-id",e.toString()):this.removeAttribute("lynx-group-id")}updateData(e,t,a){this.#e?.updateData(e,t,a)}sendGlobalEvent(e,t){this.#e?.sendGlobalEvent(e,t)}reload(){this.#a()}setAttribute(e,t){"false"===t?this.removeAttribute(e):super.setAttribute(e,t)}attributeChangedCallback(e,t,a){if(t!==a)switch(e){case"url":this.#t=a;break;case"global-props":this.#i=JSON.parse(a);break;case"init-data":this.#n=JSON.parse(a)}}get threadStrategy(){return this.getAttribute("thread-strategy")}set threadStrategy(e){e?this.setAttribute("thread-strategy",e):this.removeAttribute("thread-strategy")}disconnectedCallback(){this.#e?.dispose(),this.#e=void 0,this.shadowRoot&&(this.shadowRoot.innerHTML="")}customTemplateLoader;#c=!1;#a(){this.#c||(this.#c=!0,queueMicrotask(()=>{if(this.#c=!1,this.#e&&this.disconnectedCallback(),this.#t){let e={page:"div",view:"x-view",text:"x-text",image:"x-image",list:"x-list",svg:"x-svg",...this.overrideLynxTagToHTMLTagMap};this.shadowRoot||this.attachShadow({mode:"open"});let t=this.lynxGroupId,a=this.threadStrategy??"multi-thread",l=(0,i.G)({threadStrategy:a,tagMap:e,shadowRoot:this.shadowRoot,templateUrl:this.#t,globalProps:this.#i,initData:this.#n,nativeModulesMap:this.#o,napiModulesMap:this.#d,lynxGroupId:t,callbacks:{nativeModulesCall:(...e)=>{if(this.#s)return this.#s(...e);this.#r?this.#r.push(e):this.#r=[e]},napiModulesCall:(...e)=>this.#h?.(...e),onError:()=>{this.dispatchEvent(new CustomEvent("error",{}))},customTemplateLoader:this.customTemplateLoader}});this.#e=l;let r=document.createElement("style");this.shadowRoot.append(r);let s=r.sheet;for(let e of n.k)s.insertRule(e);"false"!==this.getAttribute("inject-head-links")&&document.head.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{let t=e.href;s.insertRule(`@import url("${t}");`)})}}))}connectedCallback(){this.#a()}}customElements.get(r.tag)?console.warn(`[${r.tag}] has already been defined`):customElements.define(r.tag,r),t()}catch(e){t(e)}})},609:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{G:()=>r});var n=a(41),l=e([n]);n=(l.then?(await l)():l)[0];let s=window.devicePixelRatio,o=window.screen.availWidth*s,d=window.screen.availHeight*s;function r(e){let{shadowRoot:t,callbacks:a,templateUrl:i,globalProps:l,initData:r,nativeModulesMap:s,napiModulesMap:h,tagMap:c,lynxGroupId:u,threadStrategy:m="multi-thread"}=e;return(0,n.H)(i,{tagMap:c,initData:r,globalProps:l,nativeModulesMap:s,napiModulesMap:h,browserConfig:{pixelRatio:window.devicePixelRatio,pixelWidth:o,pixelHeight:d}},t,u,m,a)}i()}catch(e){i(e)}})},185:function(e,t,a){a.d(t,{k:()=>i});let i=[` [lynx-default-display-linear="false"] * {
1
+ (()=>{"use strict";var e={960:function(){},27:function(){},21:function(e,t,a){a.d(t,{Z:()=>n});class i{constructor(e,t,a,n,l){this._legacyCanvasSize=i.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),a&&"object"==typeof a?this._onDecode=t:(a||n||l?console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future"):console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=t),t="object"==typeof a?a:{},this._onDecodeError=t.onDecodeError||("function"==typeof a?a:this._onDecodeError),this._calculateScanRegion=t.calculateScanRegion||("function"==typeof n?n:this._calculateScanRegion),this._preferredCamera=t.preferredCamera||l||this._preferredCamera,this._legacyCanvasSize="number"==typeof a?a:"number"==typeof n?n:this._legacyCanvasSize,this._maxScansPerSecond=t.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let r=!1;if(e.hidden&&(e.hidden=!1,r=!0),document.body.contains(e)||(document.body.appendChild(e),r=!0),a=e.parentElement,t.highlightScanRegion||t.highlightCodeOutline){if(n=!!t.overlay,this.$overlay=t.overlay||document.createElement("div"),(l=this.$overlay.style).position="absolute",l.display="none",l.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!n&&t.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch(e){}a.insertBefore(this.$overlay,this.$video.nextSibling)}t.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let t=window.getComputedStyle(e);"none"===t.display&&(e.style.setProperty("display","block","important"),r=!0),"visible"!==t.visibility&&(e.style.setProperty("visibility","visible","important"),r=!0),r&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=i.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await i.listCameras(!1)).length}catch(e){return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let t=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(e=>"videoinput"===e.kind),a;try{e&&(await t()).every(e=>!e.label)&&(a=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch(e){}try{return(await t()).map((e,t)=>({id:e.deviceId,label:e.label||(0===t?"Default Camera":`Camera ${t+1}`)}))}finally{a&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),i._stopVideoStream(a))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch(e){return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),i._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),i._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&("https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:t}=await this._getCameraStream();!this._active||this._paused?i._stopVideoStream(e):(this._setVideoMirror(t),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let t=()=>{this.$video.srcObject instanceof MediaStream&&(i._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(t(),!0):(await new Promise(e=>setTimeout(e,300)),!!this._paused&&(t(),!0))}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,t,a,n,l=!1,r=!1){let s,o=!1;t&&("scanRegion"in t||"qrEngine"in t||"canvas"in t||"disallowCanvasResizing"in t||"alsoTryWithoutScanRegion"in t||"returnDetailedScanResult"in t)?(s=t.scanRegion,a=t.qrEngine,n=t.canvas,l=t.disallowCanvasResizing||!1,r=t.alsoTryWithoutScanRegion||!1,o=!0):t||a||n||l||r?console.warn("You're using a deprecated api for scanImage which will be removed in the future."):console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),t=!!a;try{let d,h,c;if([a,d]=await Promise.all([a||i.createQrEngine(),i._loadImage(e)]),[n,h]=i._drawToCanvas(d,s,n,l),a instanceof Worker){let e=a;t||i._postWorkerMessageSync(e,"inversionMode","both"),c=await new Promise((t,a)=>{let l,r,o,d=-1;r=n=>{n.data.id===d&&(e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),null!==n.data.data?t({data:n.data.data,cornerPoints:i._convertPoints(n.data.cornerPoints,s)}):a(i.NO_QR_CODE_FOUND))},o=t=>{e.removeEventListener("message",r),e.removeEventListener("error",o),clearTimeout(l),a("Scanner error: "+(t?t.message||t:"Unknown Error"))},e.addEventListener("message",r),e.addEventListener("error",o),l=setTimeout(()=>o("timeout"),1e4);let c=h.getImageData(0,0,n.width,n.height);d=i._postWorkerMessageSync(e,"decode",c,[c.data.buffer])})}else c=await Promise.race([new Promise((e,t)=>window.setTimeout(()=>t("Scanner error: timeout"),1e4)),(async()=>{try{var[t]=await a.detect(n);if(!t)throw i.NO_QR_CODE_FOUND;return{data:t.rawValue,cornerPoints:i._convertPoints(t.cornerPoints,s)}}catch(a){if(t=a.message||a,/not implemented|service unavailable/.test(t))return i._disableBarcodeDetector=!0,i.scanImage(e,{scanRegion:s,canvas:n,disallowCanvasResizing:l,alsoTryWithoutScanRegion:r});throw`Scanner error: ${t}`}})()]);return o?c:c.data}catch(d){if(!s||!r)throw d;let t=await i.scanImage(e,{qrEngine:a,canvas:n,disallowCanvasResizing:l});return o?t:t.data}finally{t||i._postWorkerMessage(a,"close")}}setGrayscaleWeights(e,t,a,n=!0){i._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:t,blue:a,useIntegerApproximation:n})}setInversionMode(e){i._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>a.e("605").then(a.bind(a,769)).then(e=>e.createWorker()),!(!i._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return e();let t=navigator.userAgentData;return t&&t.brands.some(({brand:e})=>/Chromium/i.test(e))&&/mac ?OS/i.test(t.platform)&&await t.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:e,platformVersion:t})=>/arm/i.test(e||"arm")&&13<=parseInt(t||"13")).catch(()=>!0)?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let t=Math.round(2/3*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-t)/2),y:Math.round((e.videoHeight-t)/2),width:t,height:t,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,t=e.videoWidth,a=e.videoHeight,i=e.offsetWidth,n=e.offsetHeight,l=e.offsetLeft,r=e.offsetTop,s=window.getComputedStyle(e),o=s.objectFit,d=t/a,h=i/n;switch(o){case"none":var c=t,u=a;break;case"fill":c=i,u=n;break;default:("cover"===o?d>h:d<h)?c=(u=n)*d:u=(c=i)/d,"scale-down"===o&&(c=Math.min(c,t),u=Math.min(u,a))}var[m,p]=s.objectPosition.split(" ").map((e,t)=>{let a=parseFloat(e);return e.endsWith("%")?(t?n-u:i-c)*a/100:a});s=this._scanRegion.width||t,h=this._scanRegion.height||a,o=this._scanRegion.x||0;var v=this._scanRegion.y||0;(d=this.$overlay.style).width=`${s/t*c}px`,d.height=`${h/a*u}px`,d.top=`${r+p+v/a*u}px`,a=/scaleX\(-1\)/.test(e.style.transform),d.left=`${l+(a?i-m-c:m)+(a?t-o-s:o)/t*c}px`,d.transform=e.style.transform}})}static _convertPoints(e,t){if(!t)return e;let a=t.x||0,i=t.y||0,n=t.width&&t.downScaledWidth?t.width/t.downScaledWidth:1;for(let l of(t=t.height&&t.downScaledHeight?t.height/t.downScaledHeight:1,e))l.x=l.x*n+a,l.y=l.y*t+i;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,t=1e3/this._maxScansPerSecond;e<t&&await new Promise(a=>setTimeout(a,t-e)),this._lastScanTimestamp=Date.now();try{var a=await i.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(e){if(!this._active)return;this._onDecodeError(e)}!i._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=i.createQrEngine()),a?(this._onDecode?this._onDecode(a):this._legacyOnDecode&&this._legacyOnDecode(a.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",a.cornerPoints.map(({x:e,y:t})=>`${e},${t}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==i.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",t=[{width:{min:1024}},{width:{min:768}},{}];for(let a of[...t.map(t=>Object.assign({},t,{[e]:{exact:this._preferredCamera}})),...t])try{let e=await navigator.mediaDevices.getUserMedia({video:a,audio:!1}),t=this._getFacingMode(e)||(a.facingMode?this._preferredCamera:"environment"===this._preferredCamera?"user":"environment");return{stream:e,facingMode:t}}catch(e){}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let t of e.getTracks())t.stop(),e.removeTrack(t)}_setVideoMirror(e){this.$video.style.transform="scaleX("+("user"===e?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,t,a,i=!1){a=a||document.createElement("canvas");let n=t&&t.x?t.x:0,l=t&&t.y?t.y:0,r=t&&t.width?t.width:e.videoWidth||e.width,s=t&&t.height?t.height:e.videoHeight||e.height;return i||(i=t&&t.downScaledWidth?t.downScaledWidth:r,t=t&&t.downScaledHeight?t.downScaledHeight:s,a.width!==i&&(a.width=i),a.height!==t&&(a.height=t)),(t=a.getContext("2d",{alpha:!1})).imageSmoothingEnabled=!1,t.drawImage(e,n,l,r,s,0,0,a.width,a.height),[a,t]}static async _loadImage(e){if(e instanceof Image)return await i._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||"string"==typeof e){let t=new Image;t.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await i._awaitImageLoad(t),t}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(t.src)}}throw"Unsupported image type."}static async _awaitImageLoad(e){e.complete&&0!==e.naturalWidth||await new Promise((t,a)=>{let i=n=>{e.removeEventListener("load",i),e.removeEventListener("error",i),n instanceof ErrorEvent?a("Image load error"):t()};e.addEventListener("load",i),e.addEventListener("error",i)})}static async _postWorkerMessage(e,t,a,n){return i._postWorkerMessageSync(await e,t,a,n)}static _postWorkerMessageSync(e,t,a,n){if(!(e instanceof Worker))return -1;let l=i._workerMessageId++;return e.postMessage({id:l,type:t,data:a},n),l}}i.DEFAULT_CANVAS_SIZE=400,i.NO_QR_CODE_FOUND="No QR code found",i._disableBarcodeDetector=!1,i._workerMessageId=0;let n=i},353:function(e,t,a){var i,n,l,r,s,o,d,h;a.d(t,{EN:()=>V,UK:()=>C,uE:()=>m,oc:()=>q,wg:()=>f,sr:()=>I,ZW:()=>z,eA:()=>S,eW:()=>A,wU:()=>O,G4:()=>B,YH:()=>$,fT:()=>i,i$:()=>j,jK:()=>n,bh:()=>N,Hs:()=>x,E3:()=>T,cZ:()=>L,gc:()=>W,Au:()=>_,RN:()=>v,Rz:()=>M,Oh:()=>P,E9:()=>G,EO:()=>K,jF:()=>X,bM:()=>H,nt:()=>k,Tt:()=>D,R1:()=>R,L9:()=>p,V_:()=>U,cx:()=>F,rd:()=>E,Xz:()=>c,$m:()=>b,mH:()=>y,Bq:()=>g,SH:()=>u});let c="lynx-unique-id",u="lynx-css-id",m="lynx-component-id",p="lynx-tag",v="lynx-default-display-linear",g="__lynx_timing_flag",b=["registerDataProcessor","registerWorkletInternal","lynxWorkletImpl","runWorklet"],f={platform:"web",lynxSdkVersion:"3.0"},y={click:"tap",lynxscroll:"scroll",lynxscrollend:"scrollend",overlaytouch:"touch",lynxfocus:"focus",lynxblur:"blur"},E={"X-INPUT":{blur:"lynxblur",focus:"lynxfocus"},"X-TEXTAREA":{blur:"lynxblur",focus:"lynxfocus"}},S={tap:"click",scroll:"lynxscroll",scrollend:"lynxscrollend",touch:"overlaytouch"};function w(e,t,a=!0,i=!1,n){return{name:e,isSync:t,hasReturn:a,hasReturnTransfer:i,bufferSize:n}}let C=w("__postExposure",!1,!1),x=w("publicComponentEvent",!1,!1),T=w("publishEvent",!1,!1),O=w("postOffscreenEventEndpoint",!1,!1),I=w("switchExposureServiceEndpoint",!1,!1),L=w("mainThreadStart",!1,!1),_=w("updateData",!1,!0),k=w("sendGlobalEventEndpoint",!1,!1),A=w("dispose",!1,!0),M=w("start",!1,!0),P=w("reportError",!1,!1),R=w("flushElementTree",!1,!0),D=w("callLepusMethod",!1,!0),N=w("__invokeUIMethod",!1,!0),F=w("__setNativeProps",!1,!0),H=w("nativeModulesCall",!1,!0),j=w("napiModulesCall",!1,!0,!0),$=w("getCustomSections",!1,!0),U=w("markTiming",!1,!1),V=w("postTimingFlags",!1,!1),W=w("__triggerComponentEvent",!1,!1),z=w("__selectComponent",!1,!0),B=w("dispatchLynxViewEvent",!1,!1),q=w("dispatchNapiModule",!1,!1),X=w("dispatchCoreContextOnBackground",!1,!1),K=w("dispatchJSContextOnMainThread",!1,!1);(s=i||(i={}))[s.ID_SELECTOR=0]="ID_SELECTOR",s[s.REF_ID=1]="REF_ID",s[s.UNIQUE_ID=2]="UNIQUE_ID",(o=n||(n={}))[o.SUCCESS=0]="SUCCESS",o[o.UNKNOWN=1]="UNKNOWN",o[o.NODE_NOT_FOUND=2]="NODE_NOT_FOUND",o[o.METHOD_NOT_FOUND=3]="METHOD_NOT_FOUND",o[o.PARAM_INVALID=4]="PARAM_INVALID",o[o.SELECTOR_NOT_SUPPORTED=5]="SELECTOR_NOT_SUPPORTED",o[o.NO_UI_FOR_NODE=6]="NO_UI_FOR_NODE",(d=l||(l={}))[d.UPDATE=0]="UPDATE",d[d.RESET=1]="RESET",(h=r||(r={}))[h.Unknown=0]="Unknown",h[h.UpdateExplictByUser=1]="UpdateExplictByUser",h[h.UpdateByKernelFromCtor=2]="UpdateByKernelFromCtor",h[h.UpdateByKernelFromRender=4]="UpdateByKernelFromRender",h[h.UpdateByKernelFromHydrate=8]="UpdateByKernelFromHydrate",h[h.UpdateByKernelFromGetDerived=16]="UpdateByKernelFromGetDerived",h[h.UpdateByKernelFromConflict=32]="UpdateByKernelFromConflict",h[h.UpdateByKernelFromHMR=64]="UpdateByKernelFromHMR";class G extends EventTarget{_config;constructor(e){super(),this._config=e}postMessage(...e){console.error("[lynx-web] postMessage not implemented, args:",...e)}dispatchEvent(e){let{rpc:t,sendEventEndpoint:a}=this._config;return t.invoke(a,[e]),3}__start(){let{rpc:e,receiveEventEndpoint:t}=this._config;e.registerHandler(t,({type:e,data:t})=>{super.dispatchEvent(new MessageEvent(e,{data:t??{}}))})}}},582:function(e,t,a){a.a(e,async function(e,t){try{var i=a(609);a(353);var n=a(185),l=e([i]);i=(l.then?(await l)():l)[0];class r extends HTMLElement{static lynxViewCount=0;static tag="lynx-view";static observedAttributeAsProperties=["url","global-props","init-data"];static observedAttributes=r.observedAttributeAsProperties.map(e=>e.toLowerCase());#e;#t;get url(){return this.#t}set url(e){this.#t=e,this.#a()}#i={};get globalProps(){return this.#i}set globalProps(e){"string"==typeof e?this.#i=JSON.parse(e):this.#i=e}#n={};get initData(){return this.#n}set initData(e){"string"==typeof e?this.#n=JSON.parse(e):this.#n=e}#l={page:"div"};get overrideLynxTagToHTMLTagMap(){return this.#l}set overrideLynxTagToHTMLTagMap(e){"string"==typeof e?this.#l=JSON.parse(e):this.#l=e}#r=[];#s;get onNativeModulesCall(){return this.#s}set onNativeModulesCall(e){if(this.#s=e,this.#r)for(let t of this.#r)e.apply(void 0,t)}#o={};get nativeModulesMap(){return this.#o}set nativeModulesMap(e){this.#o=e}#d={};get napiModulesMap(){return this.#d}set napiModulesMap(e){this.#d=e}#h;get onNapiModulesCall(){return this.#h}set onNapiModulesCall(e){this.#h=(t,a,i,n)=>e(t,a,i,this,n)}get lynxGroupId(){return this.getAttribute("lynx-group-id")?Number(this.getAttribute("lynx-group-id")):void 0}set lynxGroupId(e){e?this.setAttribute("lynx-group-id",e.toString()):this.removeAttribute("lynx-group-id")}updateData(e,t,a){this.#e?.updateData(e,t,a)}sendGlobalEvent(e,t){this.#e?.sendGlobalEvent(e,t)}reload(){this.#a()}setAttribute(e,t){"false"===t?this.removeAttribute(e):super.setAttribute(e,t)}attributeChangedCallback(e,t,a){if(t!==a)switch(e){case"url":this.#t=a;break;case"global-props":this.#i=JSON.parse(a);break;case"init-data":this.#n=JSON.parse(a)}}get threadStrategy(){return this.getAttribute("thread-strategy")}set threadStrategy(e){e?this.setAttribute("thread-strategy",e):this.removeAttribute("thread-strategy")}disconnectedCallback(){this.#e?.dispose(),this.#e=void 0,this.shadowRoot&&(this.shadowRoot.innerHTML="")}customTemplateLoader;#c=!1;#a(){this.#c||(this.#c=!0,queueMicrotask(()=>{if(this.#c=!1,this.#e&&this.disconnectedCallback(),this.#t){let e={page:"div",view:"x-view",text:"x-text",image:"x-image",list:"x-list",svg:"x-svg",...this.overrideLynxTagToHTMLTagMap};this.shadowRoot||this.attachShadow({mode:"open"});let t=this.lynxGroupId,a=this.threadStrategy??"multi-thread",l=(0,i.G)({threadStrategy:a,tagMap:e,shadowRoot:this.shadowRoot,templateUrl:this.#t,globalProps:this.#i,initData:this.#n,nativeModulesMap:this.#o,napiModulesMap:this.#d,lynxGroupId:t,callbacks:{nativeModulesCall:(...e)=>{if(this.#s)return this.#s(...e);this.#r?this.#r.push(e):this.#r=[e]},napiModulesCall:(...e)=>this.#h?.(...e),onError:()=>{this.dispatchEvent(new CustomEvent("error",{}))},customTemplateLoader:this.customTemplateLoader}});this.#e=l;let r=document.createElement("style");this.shadowRoot.append(r);let s=r.sheet;for(let e of n.k)s.insertRule(e);"false"!==this.getAttribute("inject-head-links")&&document.head.querySelectorAll('link[rel="stylesheet"]').forEach(e=>{let t=e.href;s.insertRule(`@import url("${t}");`)})}}))}connectedCallback(){this.#a()}}customElements.get(r.tag)?console.warn(`[${r.tag}] has already been defined`):customElements.define(r.tag,r),t()}catch(e){t(e)}})},609:function(e,t,a){a.a(e,async function(e,i){try{a.d(t,{G:()=>r});var n=a(41),l=e([n]);n=(l.then?(await l)():l)[0];let s=window.devicePixelRatio,o=window.screen.availWidth*s,d=window.screen.availHeight*s;function r(e){let{shadowRoot:t,callbacks:a,templateUrl:i,globalProps:l,initData:r,nativeModulesMap:s,napiModulesMap:h,tagMap:c,lynxGroupId:u,threadStrategy:m="multi-thread"}=e;return(0,n.H)(i,{tagMap:c,initData:r,globalProps:l,nativeModulesMap:s,napiModulesMap:h,browserConfig:{pixelRatio:window.devicePixelRatio,pixelWidth:o,pixelHeight:d}},t,u,m,a)}i()}catch(e){i(e)}})},185:function(e,t,a){a.d(t,{k:()=>i});let i=[` [lynx-default-display-linear="false"] * {
2
2
  --lynx-display: flex;
3
3
  --lynx-display-toggle: var(--lynx-display-flex);
4
4
  }`,`[lynx-default-overflow-visible="true"] x-view{
@@ -284,4 +284,4 @@
284
284
  id="lower-threshold-observer"
285
285
  ></div>
286
286
  </div>
287
- </div>`)],rt=[],ra=HTMLElement,class extends ra{static{l7=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ra[Symbol.metadata]??null):void 0;ri(null,l9={value:l7},re,{kind:"class",name:l7.name,metadata:e},null,rt),l7=l9.value,e&&Object.defineProperty(l7,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);#iV=rS(()=>this.shadowRoot,"#content");#i1={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#i2={};get scrollTop(){return this.#iV().scrollTop}set scrollTop(e){this.#iV().scrollTop=e}get scrollLeft(){return this.#iV().scrollTop}set scrollLeft(e){this.#iV().scrollLeft=e}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let a=parseFloat(e.offset);t={left:a,top:a}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.index){if(0===e.index)this.#iV().scrollTop=0,this.#iV().scrollLeft=0;else if(e.index>0&&e.index<this.childElementCount){let a=this.children.item(e.index);a instanceof HTMLElement&&(t=t?{left:a.offsetLeft+t.left,top:a.offsetTop+t.top}:{left:a.offsetLeft,top:a.offsetTop})}}t&&this.#iV().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#i3=e=>{if(!this.#i1.isScrolling)return;this.#i1.lastTimestamp||(this.#i1.lastTimestamp=e);let t=this.#iV(),a=(e-this.#i1.lastTimestamp)/1e3*this.#i1.rate;t.scrollBy({left:a,top:a,behavior:"smooth"}),this.#i1.lastTimestamp=e,t.scrollTop+t.clientHeight>=t.scrollHeight&&this.#i1.autoStop?(t.scrollTop=t.scrollHeight-t.clientHeight,this.#i1.isScrolling=!1):requestAnimationFrame(this.#i3)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#i1={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop},requestAnimationFrame(this.#i3)}else this.#i1.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#i2),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);return e.map(e=>{let a=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:a.bottom,top:a.top,left:a.left,right:a.right,index:t.indexOf(e)}})};#i8=()=>Object.values(this.#i2).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#i4=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,a=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(a&&!t){let e=this.#i8();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...rc,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#i8()}}))},100);return}if(i){let a=e.target?.getAttribute("item-key");if(!a)return;t?this.#i2[a]&&delete this.#i2[a]:this.#i2[a]=e.target;return}};connectedCallback(){this.#iV().addEventListener("contentvisibilityautostatechange",this.#i4,{passive:!0})}static{rn(l7,rt)}}},67:function(e,t,a){a.a(e,async function(e,t){try{var i=a(568);a(20),a(434),a(45);var n=a(21),l=e([i]);i=(l.then?(await l)():l)[0];let s=document.getElementById("qr-scanner"),o=document.getElementById("lynx-view"),d=document.getElementById("back-button"),h=document.getElementById("nav"),c="preinstalled/homepage.json";d.addEventListener("click",()=>{r(c)});let u=new n.Z(s,e=>{console.log("qr",e),o.style.visibility="visible",u.stop();let t=e.data;r(t)},{highlightScanRegion:!0,highlightCodeOutline:!0});function r(e){let t=window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light";if(o.onNativeModulesCall=(e,t)=>{"openScan"===e?(o.style.visibility="hidden",u.start()):"openSchema"===e&&r(t)},o.globalProps={theme:t},e===c)h.style.display="none",o.url=e,h.style.setProperty("--bar-color",null);else{let{searchParams:t}=new URL(e);t.has("bar_color")&&h.style.setProperty("--bar-color",`#${t.get("bar_color")}`),t.has("fullscreen")&&"true"===t.get("fullscreen")?h.style.display="none":h.style.display="flex",o.url=e}}r(c),window.addEventListener("message",e=>{if(e.data&&"setLynxViewUrl"===e.data.method&&e.data.url){let t=o.parentElement;o.remove(),(o=document.createElement("lynx-view")).setAttribute("style","flex: 0 1 100vh; height:100vh;width:100vw;"),t.append(o),r(e.data.url)}}),t()}catch(e){t(e)}})}},t={};function a(i){var n=t[i];if(void 0!==n)return n.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,a),l.exports}a.m=e,(()=>{var e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",i="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=e=>{e&&e.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))},l=a=>a.map(a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var l=[];l.d=0,a.then(e=>{r[t]=e,n(l)},e=>{r[i]=e,n(l)});var r={};return r[e]=e=>e(l),r}}var s={};return s[e]=function(){},s[t]=a,s});a.a=(a,r,s)=>{s&&((o=[]).d=-1);var o,d,h,c,u=new Set,m=a.exports,p=new Promise((e,t)=>{c=t,h=e});p[t]=m,p[e]=e=>{o&&e(o),u.forEach(e),p.catch(function(){})},a.exports=p,r(a=>{d=l(a);var n,r=()=>d.map(e=>{if(e[i])throw e[i];return e[t]}),s=new Promise(t=>{(n=()=>t(r)).r=0;var a=e=>e!==o&&!u.has(e)&&(u.add(e),e&&!e.d&&(n.r++,e.push(n)));d.map(t=>t[e](a))});return n.r?s:r()},e=>(e?c(p[i]=e):h(m),n(o))),o&&o.d<0&&(o.d=0)}})(),a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,i)=>(a.f[i](e,t),t),[])),a.u=e=>"static/js/async/"+e+".js",a.miniCssF=e=>""+e+".css",a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="@lynx-js/web-explorer:";a.l=function(i,n,l,r){if(e[i])return void e[i].push(n);if(void 0!==l)for(var s,o,d=document.getElementsByTagName("script"),h=0;h<d.length;h++){var c=d[h];if(c.getAttribute("src")==i||c.getAttribute("data-webpack")==t+l){s=c;break}}s||(o=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",t+l),s.src=i),e[i]=[n];var u=function(t,a){s.onerror=s.onload=null,clearTimeout(m);var n=e[i];if(delete e[i],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach(function(e){return e(a)}),t)return t(a)},m=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),o&&document.head.appendChild(s)}})(),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.rv=()=>"1.3.8",(()=>{a.g.importScripts&&(e=a.g.location+"");var e,t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw Error("Automatic publicPath is not supported in this browser");a.p=(e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"))+"../../"})(),(()=>{a.b=document.baseURI||self.location.href;var e={980:0};a.f.j=function(t,i){var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var l=new Promise((a,i)=>n=e[t]=[a,i]);i.push(n[2]=l);var r=a.p+a.u(t),s=Error();a.l(r,function(i){if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var l=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+l+": "+r+")",s.name="ChunkLoadError",s.type=l,s.request=r,n[1](s)}},"chunk-"+t,t)}};var t=(t,i)=>{var n,l,[r,s,o]=i,d=0;if(r.some(t=>0!==e[t])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);o&&o(a)}for(t&&t(i);d<r.length;d++)l=r[d],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0},i=globalThis.webpackChunk_lynx_js_web_explorer=globalThis.webpackChunk_lynx_js_web_explorer||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),a.ruid="bundler=rspack@1.3.8",a(67)})();
287
+ </div>`)],rt=[],ra=HTMLElement,class extends ra{static{l7=this}static{let e="function"==typeof Symbol&&Symbol.metadata?Object.create(ra[Symbol.metadata]??null):void 0;ri(null,l9={value:l7},re,{kind:"class",name:l7.name,metadata:e},null,rt),l7=l9.value,e&&Object.defineProperty(l7,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static notToFilterFalseAttributes=new Set(["enable-scroll"]);#iV=rS(()=>this.shadowRoot,"#content");#i1={rate:0,lastTimestamp:0,autoStop:!0,isScrolling:!1};#i2={};get scrollTop(){return this.#iV().scrollTop}set scrollTop(e){this.#iV().scrollTop=e}get scrollLeft(){return this.#iV().scrollTop}set scrollLeft(e){this.#iV().scrollLeft=e}get __scrollTop(){return super.scrollTop}get __scrollLeft(){return super.scrollTop}scrollToPosition(e){let t;if("string"==typeof e.offset){let a=parseFloat(e.offset);t={left:a,top:a}}else"number"==typeof e.offset&&(t={left:e.offset,top:e.offset});if("number"==typeof e.index){if(0===e.index)this.#iV().scrollTop=0,this.#iV().scrollLeft=0;else if(e.index>0&&e.index<this.childElementCount){let a=this.children.item(e.index);a instanceof HTMLElement&&(t=t?{left:a.offsetLeft+t.left,top:a.offsetTop+t.top}:{left:a.offsetLeft,top:a.offsetTop})}}t&&this.#iV().scrollTo({...t,behavior:e.smooth?"smooth":"auto"})}#i3=e=>{if(!this.#i1.isScrolling)return;this.#i1.lastTimestamp||(this.#i1.lastTimestamp=e);let t=this.#iV(),a=(e-this.#i1.lastTimestamp)/1e3*this.#i1.rate;t.scrollBy({left:a,top:a,behavior:"smooth"}),this.#i1.lastTimestamp=e,t.scrollTop+t.clientHeight>=t.scrollHeight&&this.#i1.autoStop?(t.scrollTop=t.scrollHeight-t.clientHeight,this.#i1.isScrolling=!1):requestAnimationFrame(this.#i3)};autoScroll(e){if(e.start){let t="number"==typeof e.rate?e.rate:parseFloat(e.rate);this.#i1={rate:t,lastTimestamp:0,isScrolling:!0,autoStop:!1!==e.autoStop},requestAnimationFrame(this.#i3)}else this.#i1.isScrolling=!1}getScrollContainerInfo(){return{scrollTop:this.scrollTop,scrollLeft:this.scrollLeft,scrollHeight:this.scrollHeight,scrollWidth:this.scrollWidth}}getVisibleCells=()=>{let e=Object.values(this.#i2),t=Array.from(this.children).filter(e=>"LIST-ITEM"===e.tagName);return e.map(e=>{let a=e.getBoundingClientRect();return{id:e.getAttribute("id"),itemKey:e.getAttribute("item-key"),bottom:a.bottom,top:a.top,left:a.left,right:a.right,index:t.indexOf(e)}})};#i8=()=>Object.values(this.#i2).map(e=>{let t=e.getBoundingClientRect();return{height:t.height,width:t.width,itemKey:e.getAttribute("item-key"),originX:t.x,originY:t.y}});#i4=e=>{if(!e.target||!(e.target instanceof HTMLElement))return;let t=e.skipped,a=e.target?.getAttribute("id")==="content"&&e.target?.getAttribute("part")==="content",i="LIST-ITEM"===e.target.tagName;if(a&&!t){let e=this.#i8();setTimeout(()=>{this.dispatchEvent(new CustomEvent("layoutcomplete",{...rc,detail:{visibleItemBeforeUpdate:e,visibleItemAfterUpdate:this.#i8()}}))},100);return}if(i){let a=e.target?.getAttribute("item-key");if(!a)return;t?this.#i2[a]&&delete this.#i2[a]:this.#i2[a]=e.target;return}};connectedCallback(){this.#iV().addEventListener("contentvisibilityautostatechange",this.#i4,{passive:!0})}static{rn(l7,rt)}}},67:function(e,t,a){a.a(e,async function(e,t){try{var i=a(568);a(960),a(27),a(45);var n=a(21),l=e([i]);i=(l.then?(await l)():l)[0];let s=document.getElementById("qr-scanner"),o=document.getElementById("lynx-view"),d=document.getElementById("back-button"),h=document.getElementById("nav"),c="preinstalled/homepage.json";d.addEventListener("click",()=>{r(c)});let u=new n.Z(s,e=>{console.log("qr",e),o.style.visibility="visible",u.stop();let t=e.data;r(t)},{highlightScanRegion:!0,highlightCodeOutline:!0});function r(e){let t=window.matchMedia("(prefers-color-scheme: dark)").matches?"Dark":"Light";if(o.onNativeModulesCall=(e,t)=>{"openScan"===e?(o.style.visibility="hidden",u.start()):"openSchema"===e&&r(t)},o.globalProps={theme:t},e===c)h.style.display="none",o.url=e,h.style.setProperty("--bar-color",null);else{let{searchParams:t}=new URL(e);t.has("bar_color")&&h.style.setProperty("--bar-color",`#${t.get("bar_color")}`),t.has("fullscreen")&&"true"===t.get("fullscreen")?h.style.display="none":h.style.display="flex",o.url=e}}r(c),window.addEventListener("message",e=>{if(e.data&&"setLynxViewUrl"===e.data.method&&e.data.url){let t=o.parentElement;o.remove(),(o=document.createElement("lynx-view")).setAttribute("style","flex: 0 1 100vh; height:100vh;width:100vw;"),t.append(o),r(e.data.url)}}),t()}catch(e){t(e)}})}},t={};function a(i){var n=t[i];if(void 0!==n)return n.exports;var l=t[i]={exports:{}};return e[i](l,l.exports,a),l.exports}a.m=e,(()=>{var e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",i="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=e=>{e&&e.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))},l=a=>a.map(a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var l=[];l.d=0,a.then(e=>{r[t]=e,n(l)},e=>{r[i]=e,n(l)});var r={};return r[e]=e=>e(l),r}}var s={};return s[e]=function(){},s[t]=a,s});a.a=(a,r,s)=>{s&&((o=[]).d=-1);var o,d,h,c,u=new Set,m=a.exports,p=new Promise((e,t)=>{c=t,h=e});p[t]=m,p[e]=e=>{o&&e(o),u.forEach(e),p.catch(function(){})},a.exports=p,r(a=>{d=l(a);var n,r=()=>d.map(e=>{if(e[i])throw e[i];return e[t]}),s=new Promise(t=>{(n=()=>t(r)).r=0;var a=e=>e!==o&&!u.has(e)&&(u.add(e),e&&!e.d&&(n.r++,e.push(n)));d.map(t=>t[e](a))});return n.r?s:r()},e=>(e?c(p[i]=e):h(m),n(o))),o&&o.d<0&&(o.d=0)}})(),a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,i)=>(a.f[i](e,t),t),[])),a.u=e=>"static/js/async/"+e+".js",a.miniCssF=e=>""+e+".css",a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="@lynx-js/web-explorer:";a.l=function(i,n,l,r){if(e[i])return void e[i].push(n);if(void 0!==l)for(var s,o,d=document.getElementsByTagName("script"),h=0;h<d.length;h++){var c=d[h];if(c.getAttribute("src")==i||c.getAttribute("data-webpack")==t+l){s=c;break}}s||(o=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",t+l),s.src=i),e[i]=[n];var u=function(t,a){s.onerror=s.onload=null,clearTimeout(m);var n=e[i];if(delete e[i],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach(function(e){return e(a)}),t)return t(a)},m=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror),s.onload=u.bind(null,s.onload),o&&document.head.appendChild(s)}})(),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.rv=()=>"1.3.8",(()=>{a.g.importScripts&&(e=a.g.location+"");var e,t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw Error("Automatic publicPath is not supported in this browser");a.p=(e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"))+"../../"})(),(()=>{a.b=document.baseURI||self.location.href;var e={980:0};a.f.j=function(t,i){var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var l=new Promise((a,i)=>n=e[t]=[a,i]);i.push(n[2]=l);var r=a.p+a.u(t),s=Error();a.l(r,function(i){if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var l=i&&("load"===i.type?"missing":i.type),r=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+l+": "+r+")",s.name="ChunkLoadError",s.type=l,s.request=r,n[1](s)}},"chunk-"+t,t)}};var t=(t,i)=>{var n,l,[r,s,o]=i,d=0;if(r.some(t=>0!==e[t])){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);o&&o(a)}for(t&&t(i);d<r.length;d++)l=r[d],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0},i=globalThis.webpackChunk_lynx_js_web_explorer=globalThis.webpackChunk_lynx_js_web_explorer||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),a.ruid="bundler=rspack@1.3.8",a(67)})();