UNPKG

@anywhichway/lazui

Version:

Single page apps and lazy loading sites with minimal JavaScript or client build processes.

1 lines 21.4 kB
(()=>{"use strict";var e,t,n,r,o={95:(e,t,n)=>{n.d(t,{S:()=>state});const state=async({el:e,attribute:t,root:n,window:r,document:o,lazui:a,args:s})=>{const{getState:i,setState:l,JSON:c}=a;let d,state;if(t.value.startsWith("{")?state=c.parse(t.value):d=t.value,e.id||e.setAttribute("id",d||`state${(Math.random()+"").substring(2)}`),state||(state=i(e.id,n)),!state)if(e.hasAttribute("data-lz:src")){const t=await fetch(e.getAttribute("data-lz:src")).then((e=>e.text()));state=c.parse(t)}else state=c.parse(e.innerText||e.innerHTML);state=l(e,state,n),"global"===s[0]?r.globalState=state:"document"===s[0]&&(o.documentState=state)}},679:(e,t,n)=>{n.r(t),(()=>{let e={};if(document?.currentScript){const t=new URL(document.currentScript.src);document.currentScript.hasAttribute("autofocus")&&(document.documentElement.style.display="none",document.addEventListener("DOMContentLoaded",(async()=>{const e=document.querySelector(`[${y}\\:usejson]`);e&&await A(e.attributes[`${y}:usejson`]);const n=document.querySelector(`[${y}\\:userouter]`),r=t.searchParams.get("router"),o=t.searchParams.get("allowRemote");if(n){const e=n.attributes[`${y}:userouter`];r&&document[r]&&console.warn(`Global router with name '${r}' being overruled by 'userouter="${e.value}"'`),await A(e)}else{const e=r&&document[r]?document[r]():null;e&&lazui.useRouter(e,{allowRemote:o})}for(const e of["head","body"])for(const state of[...document[e].querySelectorAll(`[${y}\\:state],[${y}\\:state\\:global],[${y}\\:state\\:document]`)])for(const e of[...state.attributes])e.name.startsWith(`${y}:`)&&await A(e);O(document.body,{root:document,state:{}}),document.documentElement.style.display="","undefined"!=typeof resizeFrame&&setTimeout((()=>resizeFrame(document)))})));const n=new URL(document.currentScript.getAttribute("src"),document.baseURI).searchParams;for(const[t,r]of n.entries())try{e[t]=JSON.parse(r)}catch{e[t]=""===r||r}}const t=e=>e&&"object"==typeof e,n=e=>t(e)&&"function"==typeof e.hook,r=e=>{if(t(e)&&Array.isArray(e.strings)&&Array.isArray(e.values)&&"function"==typeof e.raw)return!0},o=e=>{for(;e.parentElement;)e=e.parentElement;return e===document.documentElement?document:e},a=new WeakMap;let s;const i=(e,t=(()=>{}))=>{Array.isArray(e.observe)||(e.observe=e.observe?e.observe.split(","):[]);let n=s;s=e,t(),s=n},l=(e,n,r=[],o=[])=>{if(!t(e))throw new TypeError(`${typeof e}: ${e} can't be activated. It is not an object`);if(e.__isActivated__)return e;const a=new Map,c=new Proxy(e,{deleteProperty(e,t){if(t in e){const a=e[t];if(n){let e;if(n.dispatchEvent(e=new CustomEvent("delete",{bubbles:!0,detail:{property:t,oldValue:a,path:r,ancestors:o}})),e.defaultPrevented)return!0}delete e[t],c[t]=void 0}},set(e,t,s){const l=e[t];if(l!==s){if(n&&void 0!==s){let a;if(t in e?n.dispatchEvent(a=new CustomEvent("change",{bubbles:!0,detail:{property:t,value:s,oldValue:l,path:r,ancestors:o}})):n.dispatchEvent(a=new CustomEvent("set",{bubbles:!0,detail:{property:t,value:s,path:r,ancestors:o}})),a.defaultPrevented)return!0}const d=new Set([...a.get(t)||[],...a.get("__all__")||[]]);void 0!==l&&void 0!==s&&(e[t]=s);for(const e of d){const{nodes:t,observe:n,root:r,string:o,recurse:a,state}=e;0!==t.length&&r.isConnected?1===t.length&&t[0].nodeType===Node.ATTRIBUTE_NODE?i(e,(()=>t[0].value=T(o,state||c,r).toString())):i(e,(()=>{const n=T(o,state||c,r).toDocumentFragment();e.nodes=[...n.childNodes],t[0].replaceWith(...n.childNodes);for(const e of t)e.remove();if(a>0)for(const e of n.childNodes)e.nodeType!==Node.TEXT_NODE&&$(e,null,{root:r,state:state||c,recurse:a-1})})):d.delete(e)}n.resizeFrame&&n.resizeFrame()}return!0},get(e,d){let u=e[d];if("observeNodes"===d)return i;if("addEventListener"===d){if(!n||!n.isConnected)throw new Error("addEventListener not available. State not bound to a connected element");return n.addEventListener.bind(n)}if("removeEventListener"===d){if(!n||!n.isConnected)throw new Error("removeEventListener not available. State not bound to a connected element");return n.removeEventListener.bind(n)}if("__isActivated__"===d)return!0;if("symbol"==typeof d)return u;if(t(u)&&(u=e[d]=l(u,n,[...r,d],[...o,c])),s){const e=s,t=e.observe||[];if(t.includes(d)||t.includes("*")){let t=a.get(d);t||(t=[],a.set(d,t)),t.push(e)}}return u}});return c},c=(e,n=document,r)=>{t(e)&&e instanceof HTMLElement||(e=o(n).getElementById(e));const state=a.get(e);if(!state&&r)throw new Error(`Can't find state: ${e.id}`);return state},d=(e,t=[],n=`${y}:usestate`)=>{if(null===e)return document.documentState&&t.push(document.documentState),window.globalState&&t.push(window.globalState),t;if(e.hasAttribute(n)){const state=c(e.getAttribute(n));state?t.push(state):console.log(`Can't find state: ${e.getAttribute(n)} in ${e.outerHTML}`)}else e.state&&t.push(e.state);return d(e.parentElement,t,n),t},u=e=>{e=[...e];return new Proxy({},{get(t,n){if("set"===n)return(e,n)=>t[e]=n;const r=t[n];if(void 0!==r)return r;for(const state of e)if(n in state)return state[n]},has(t,n){if(void 0!==t[n])return!0;for(const state of e)if(n in state)return!0;return void 0===globalThis[n]&&!q[n]},ownKeys(t){const n=new Set;for(const state of e)for(const e of Object.keys(state))n.add(e);return[...n]},set(e,t,n){throw new Error(`Can't set value for, ${t}, inside string literal.`)}})},m=(e,t)=>{let n;n=e.name.includes(":")?e.name.split(":").find(((e,t,n)=>"on"==e?n[t]:void 0)):e.name.slice(2),e.name.includes(":")?e.ownerElement.addEventListener(n,t):(e.ownerElement[t.name]=t,e.value=`event.target.${t.name}(event)`)},f=(e,n)=>{let{hook:r,placeholder:o,delay:a,interval:s,where:i="outer"}=n;o="function"==typeof o?o():o||e.value||e.data||"...";let l=e.nodeType===Node.ATTRIBUTE_NODE?[]:$(e,o,{where:i});(s?setInterval:setTimeout)((async()=>{const e=l[0];"outer"===i&&l.length>0&&N((()=>l.forEach((e=>e.remove()))));let n=await r();if(t(n))try{n=JSON.stringify(n)}catch{}else n=n.toString();e.nodeType===Node.ATTRIBUTE_NODE?e.name.startsWith("on")||e.name.includes("on:")?m(e,n):e.value=n:l=$(e,n,{where:i})}),s||a||1e3)},p=(e,t,n=e,r=0)=>{if(e.nodeType==Node.TEXT_NODE)t&&t(e,r,n);else{if(e.nodeType==Node.ELEMENT_NODE&&e.ownerDocument instanceof XMLDocument){const t=document.createElement(e.tagName);for(const n of[...e.attributes])"xmlns"!==n.name&&t.setAttribute(n.name,n.value);t.append(...e.childNodes),e.replaceWith(t),e=t}if(e.nodeType==Node.ELEMENT_NODE)for(const o of[...e.attributes])!t||t(o,r,n);if("SCRIPT"!==e.tagName&&"CODE"!==e.tagName){t&&t(e,r,n);const o=[...e.childNodes?e.childNodes:e];for(const e of o)p(e,t,n,r+1)}}if(e instanceof XMLDocument){const t=document.createElement("div");t.append(...e.childNodes),e=t}return e},h={},w=new Map;new WeakMap;let g=window,b=JSON,y="data-lz";const E=function(e,...o){const{state,root:a}=t(l=this)&&t(l.state)&&t(l.root)?this:{state:{},root:document},s="__LOCATOR__",i={strings:e,values:o,toString(){return this.raw()},raw:()=>e.reduce(((e,t,n)=>{const a=o[n-1];return Array.isArray(a)?e+a.map((e=>r(e)?e.raw():e.toString?e.toString():e)).join(""):e+(r(a)?a.raw():a.toString?a.toString():a)+t})),nodes(){return this.toDocumentFragment().childNodes},toDocumentFragment(){const a=e=>!e.isConnected||e.ownerElement.removeAttribute(e.name);let i=w.get(e)||e.reduce(((e,t,n)=>n>=o.length?e+t:e+=t+s+n),""),l=i.startsWith("<template>")&&!i.startsWith("<head>");w.set(e,i),l&&(i="<div>"+i.slice(10).slice(0,-11)+"</div>");const c=(new DOMParser).parseFromString(i,"text/html");p(c,(e=>{if(e.nodeType==Node.ATTRIBUTE_NODE){const n=e.name;e.ownerElement;let r=e.value;if(r.startsWith(s)){const s=parseInt(r.substring(11));r=o[s],t(r)?e.value=r instanceof Date?r+"":JSON.stringify(r):"function"==typeof r?(e.value="${"+r.name+"}",(e.name.startsWith("on")||e.name.includes("on:"))&&m(e,r)):(e=>e.startsWith("?")||["checked","selected","disabled","readonly","multiple","ismap","defer","noresize","nowrap","noshade","compact","async","autofocus","autoplay","controls","default","formnovalidate","hidden","ismap","loop","muted","novalidate","open","reversed","scoped","seamless","truespeed","typemustmatch"].includes(e))(n)?r?e.value="":a(e):e.value=r,"undefined"===e.value&&a(e)}}else if(e.nodeType==Node.TEXT_NODE){if(0===e.data.trim().length||!e.data.includes("__LOCATOR__"))return;const a=e.data.split(/(?=__LOCATOR__\d+)/g).reduce(((e,t)=>(/\S__LOCATOR__\d+/.test(t)?(e.push(t[0]),e.push(t.slice(1))):e.push(t),e)),[]);e.data="";let i=e;e.parentElement;for(const l of a)if(l.startsWith(s)){const a=parseInt(l.substring(11)),s=o[a],c=Array.isArray(s)?s:[s];let d=l.substring(11+a.toString().length)||"";for(const o of c){if(r(o)){const e=[...o.toDocumentFragment().childNodes],t=e[e.length-1]||i;if(t){i.after(...e);const n=document.createTextNode(d+" ");t.after(i=n)}}else n(s)?f(e,s):t(o)?i.data+=(Array.isArray(o)?o.join(","):JSON.stringify(o))+" ":i.data+=o+d+" ";d=""}}else i.data+=""===l?" ":l}}));const d=i.startsWith("<head>")?c.head:c.body,u=document.createDocumentFragment();for(i.includes("<style>")&&!i.startsWith("<head>")&&u.append(...c.head.querySelectorAll("style")||[]);d.firstChild;)u.appendChild(d.firstChild);if(l){const e=document.createDocumentFragment(),t=document.createElement("template");return t.innerHTML=d.innerHTML,e.append(t),e}return u}};var l;return i},v=(e,t,n)=>{const r=n?e.replaceAll(/&gt;/g,">").replaceAll(/&lt;/g,"<").replaceAll(/&amp;/g,"&").replaceAll(/&quot;/g,'""').replaceAll(/&apos;/g,"'"):D(e,"${","}",(e=>e.replaceAll(/&gt;/g,">").replaceAll(/&lt;/g,"<").replaceAll(/&amp;/g,"&").replaceAll(/&quot;/g,'""').replaceAll(/&apos;/g,"'")));return Function("html","root","return (state) => { with(state) { return html`"+r+"`}}")(E,t)},T=(e,state={},t,n)=>v(e,t,n)(state);let S=[];const N=e=>{S.push(e),1===S.length&&requestAnimationFrame((async()=>{for(const e of S)await e();S=[],"undefined"!=typeof resizeFrame&&resizeFrame(document)}))},A=async(e,{state,window:t=globalThis,document:n=globalThis.document,root:r=n,recurse:o}={})=>{const{name:a,value:s}=e,i=a.substring(5).split(":");if(i.length>1){let[a,l,...c]=i;const m=u(d(e.ownerElement,state?[state]:void 0));if(h[a]&&h[a][l])await h[a][l]({namespace:a,handler:l,el:e.ownerElement,attribute:e,rawValue:s,args:c,state:m,root:r,window:t,document:n,recurse:o,lazui:{router:g,JSON:b,prefix:y,...L,state,root:r}});else try{const i=await import(`/directives/${a}/${l}.js`);if(i){const d=i[l]||i.default;h[a]||={},h[a][l]=d;try{await d({namespace:a,handler:l,el:e.ownerElement,attribute:e,rawValue:s,args:c,state:m,root:r,window:t,document:n,recurse:o,lazui:{router:g,JSON:b,prefix:y,...L}})}catch(e){console.warn(`Directive: ${a}/${l} threw an error ${e}`)}}}catch{console.warn(`Can't find directive: ${a}/${l}`)}}};function _(e){const t=e.body;this.style.height=(t.offsetHeight<t.scrollHeight?t.offsetHeight:t.scrollHeight+5)+"px",this.style.width=(t.offsetWidth<t.scrollWidth?t.offsetWidth:t.scrollWidth+18)+"px"}const O=(e,{state,root:t,recurse:r})=>{p(e,(e=>{if(e.nodeType===Node.ATTRIBUTE_NODE){const o=u(d(e.ownerElement,[state]));return e.value.includes("${")&&i({nodes:[e],observe:["*"],root:t,string:e.value,state:o},(()=>{const r=T(e.value,o,t);"function"==typeof r.values[0]&&(e.name.startsWith("on")||e.name.includes("on:"))?m(e,r.values[0]):n(r)?f(e,r):e.value=r.values[0].toString()})),void(e.name.startsWith(y)&&A(e,{state:o,root:t,recurse:r}))}if(e.nodeType===Node.TEXT_NODE&&e.data.includes("${")&&"HTMLTemplateElement"!==e.parentElement.constructor.name){const n=u(d(e.parentElement,[state])),o={nodes:[e],observe:["*"],root:t,string:e.data,recurse:r,state:n};i(o,(()=>{const r=T(e.data,n,t,"SCRIPT"===e.parentElement?.tagName).toDocumentFragment();o.nodes=[...r.childNodes],e.replaceWith(...r.childNodes)}))}}))},$=(e,n,{node:r=e||document.createDocumentFragment(),where:o="inner",root:a=document,state=document.documentState||window.globalState||{},forElement:s,sanitizer:l,sanitizerOptions:c={},animator:d=(e=>N(e)),recurse:u=0}={})=>{if(r===document)return void document.addEventListener("DOMContentLoaded",(()=>{m&&console.warn("String argument ignored when rendering to document on initial load. Existing document content will be used"),$(r.head,null,{where:"outer",state,sanitizer:l,sanitizerOptions:c,update:C}),$(r.body,null,{node:state,sanitizer:l,sanitizerOptions:c,update:C})}));l="function"==typeof l?new l(c):l,l||=null!==l&&"undefined"!=typeof Sanitizer?new Sanitizer(c):l;const m="string"==typeof n?n:n||r.nodeType!==Node.TEXT_NODE?null:r.data;if(m?i({nodes:[r],observe:["*"],root:a,string:m,state},(()=>n=T(m,state,a).toDocumentFragment())):(t(n)&&n.toDocumentFragment&&(n=n.toDocumentFragment()),n||(n=r.cloneNode(!0)),n instanceof DocumentFragment||n instanceof NodeList||(n.innerHTML=D(r.innerHTML,"`","`",(e=>e.replaceAll(/</g,"&lt;")))),O(n,{state,root:a,recurse:u})),null===o)return n;return C({node:r,content:n,state,root:a,where:o,animator:d,callback:u>0?({childNodes:e})=>{for(const t of e)t.nodeType!==Node.TEXT_NODE&&$(t,null,{root:a,state,sanitizer:l,sanitizerOptions:c,animator:d,recurse:u-1})}:void 0})};function D(e,t,n,r){const o=[];let a,s=e.indexOf(t);for(;-1!==s&&(a=e.indexOf(n,s+t.length),-1!==a);){{const i=r(e.substring(s+t.length,a)),l=`__PLACEHOLDER_${o.length}__`;o.push({placeholder:l,replacementText:i}),e=e.substring(0,s)+l+e.substring(a+n.length)}s=e.indexOf(t,a+1)}for(;e.includes("__PLACEHOLDER_");)o.forEach((({placeholder:r,replacementText:o})=>e=e.replace(r,t+o+n)));return e}const C=({node:e,content:t,state=document.documentState||window.globalState||{},where:n="inner",root:r=document.documentElement,animator:o=(e=>N(e)),callback:a})=>{const s=e.nodeType===Node.ELEMENT_NODE?e.getAttribute(`${y}:mode`):null;if(s){if("inner"!==n)throw new Error(`${s} must use where="inner" not where="${n}"`);if("open"!==s&&"frame"!==s)throw new Error(`${y}:${s}, is not currently supported`)}const i=[],l=e=>e.childNodes?e.childNodes:e,c=()=>{let o=[...l(t)];if("inner"===n)if(e.nodeType===Node.TEXT_NODE){if(s)throw new Error(`Shadow dom mode: ${s} for text nodes, is not supported`);i.push(...l(t)),e.after(...l(t)),e.remove()}else if("open"===s){const n=e.shadowRoot||e.attachShadow({mode:s});n.state=state,i.push(...l(t)),n.replaceChildren(...l(t));const r=e.getAttribute(`${y}:src`);r&&r.startsWith("http")||(e=>{for(const t of e.querySelectorAll("script")){const n=t.cloneNode(!0);n.innerHTML=t.innerHTML,window.self=e.host?e.host:e.parentElement,window.currentScript=n,t.after(n),n.remove(),delete window.currentScript}})(n)}else"frame"===s?(i.push(...l(t)),((e,t,state)=>{const n=document.createElement("iframe");for(;e.firstChild;)e.removeChild(e.firstChild);e.hasAttribute("title")&&n.setAttribute("title",e.getAttribute("title")),n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen","false"),n.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),n.setAttribute("sandbox","allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation"),n.srcdoc=`<head>\n <base href="${document.baseURI}">\n ${e.hasAttribute("title")?"<title>"+e.getAttribute("title")+"</title>":""}\n <script src="${document.querySelector('script[src*="/lazui.js"]').getAttribute("src")}" autofocus><\/script>\n <script>\n window.top = window.parent = window.self = window.globalState = window;\n window.frameElement = null;\n <\/script>\n <style>\n html,body {\n margin:0;\n padding:0;\n width:100%;\n display:table;\n }\n </style>\n </head>\n <body>\n ${t}\n </body>`,e.append(n),n.contentWindow.resizeFrame=_.bind(n),state&&(n.contentDocument.documentState=state)})(e,l(t),state)):(i.push(e),e.replaceChildren(...l(t)));else if("outer"===n){const n=r instanceof DocumentFragment&&r.host?r.host:e;i.push(...l(t)),n.replaceWith(...l(t))}else if("beforeBegin"===n){const n=r instanceof DocumentFragment&&r.host?r.host:e;i.push(...l(t)),n.before(...l(t))}else if("afterBegin"===n)i.push(...t.childNodes),e.nodeType===Node.TEXT_NODE?e.after(...l(t)):e.prepend(...l(t));else if("firstChild"===n)i.push(...l(t)),e.firstChild?e.firstChild.replaceWith(...l(t)):e.append(...l(t));else if("lastChild"===n)i.push(...l(t)),e.lastChild?e.lastChild.replaceWith(...l(t)):e.append(...l(t));else if("beforeEnd"===n)i.push(...l(t)),e.nodeType===Node.TEXT_NODE?e.before(...l(t)):e.append(...t.childNodes);else if("afterEnd"===n){i.push(...l(t));(r instanceof DocumentFragment&&r.host?r.host:e).after(...l(t))}else if("_top"===n){let e;if("HTML"!==t.firstElementChild.tagName)if(e=document.createElement("html"),"HEAD"===t.firstElementChild.tagName){const n=document.createElement("head");e.append(n),n.append(...t.firstElementChild.childNodes)}else{if("BODY"!==t.firstElementChild.tagName)throw new Error("Invalid top level element");{const n=document.createElement("body");e.append(n),n.append(...t.firstElementChild.childNodes)}}o=[...e.childNodes],i.push(...o),r.replaceChildren(...o)}else{const[e,o]=n.startsWith("#")?n.split("."):[n,"inner"],a=r.querySelector(e);if(!a)throw new Error(`Target element ${n} not found`);if(i.push(a),"inner"===o)a.replaceChildren(...l(t));else if("beforeBegin"===o)a.before(...l(t));else if("afterBegin"===o)a.prepend(...l(t));else if("beforeEnd"===o)a.append(...l(t));else{if("afterEnd"!==o)throw new Error(`Invalid where: ${n}`);a.after(...l(t))}}a&&setTimeout((()=>a({childNodes:o,root:r,animate:N})))};return"function"==typeof o?o(c):c(),i},L={render:$,update:C,html:E,compile:v,interpolate:T,getState:c,setState:(e,state,t=document)=>{let n=e;return"string"==typeof e&&(n=o(t).getElementById(n),n||(n=document.createElement("template"),n.setAttribute("id",e),t===document?t.head.append(n):t.append(n))),state=l(state,n),a.set(n,state),n.state=state,state},observeNodes:i,handleDirective:A,useJSON:e=>b=e,useRouter:(t,{root:n=document.documentElement,allowRemote:r=e.allowRemote,all:o=(e=>"document"===e.req.raw.mode?new Response("Not Found",{status:404}):fetch(e.req.raw))}={})=>(t.all("*",(async(e,t,o)=>{let a=e.req?e:{req:e},s="function"==typeof t?t:"function"==typeof o?o:null;const i=new URL(a.req.url,document.baseURI);let l,c;if((c=a.req.url.startsWith(document.location.origin))?l=n.querySelector(`[${y}\\:url="${a.req.url}"],[${y}\\:url="${i.pathname}"]`):r&&/^(http|https):/i.test(a.req.url)&&(l=n.querySelector(`[${y}\\:url="${a.req.url}"]`)),!l&&"POST"===a.req.method&&(c||r)){l=document.createElement("template");const e=n.querySelector("head")||n.querySelector("body");l.setAttribute(`${y}:url`,a.req.url),e.appendChild(l)}if(l){if("PUT"===a.req.method||"POST"===a.req.method){const e=await a.req.text();l.innerHTML=e}if(["GET","PUT","POST","PATCH"].includes(a.req.method)){const e={"content-type":"text/html"};for(const t of[...l.attributes])t.name.startsWith(`${y}:header-`)?e[t.name.substring(12)]=t.value:t.name===`${y}:headers`&&Object.assign(e,b.parse(t.value));const t=document.createElement("html");t.innerHTML=l.innerHTML;const n=t.querySelector("head");let r="",o="";if(n){for(const t of n.querySelectorAll("meta[http-equiv]"))e[t.getAttribute("http-equiv")]=t.getAttribute("content");for(const e of n.querySelectorAll("style"))r+=e.outerHTML;for(const e of n.querySelectorAll("link[rel=stylesheet]"))o+=e.outerHTML}const a=l.getAttribute(`${y}:status`)||200;return new Response(r+o+(l.querySelector("body")||l).innerHTML,{status:a,headers:e})}}if("document"===a.req.raw.mode)return new Response("Not Found",{status:404});s&&await s()})),o&&t.all("*",o),g=t),replaceBetween:D},q={...L,useDirectives:(e,...t)=>{const n=h[e]||={};t.forEach((e=>{if("function"==typeof e){const t=e.name;t&&(n[t]=e)}else"object"==typeof e&&Object.assign(n,e)}))}};"undefined"!=typeof module?module.exports=q:"undefined"!=typeof window&&(globalThis.lazui=q)})()},711:(e,t,n)=>{n.a(e,(async(e,t)=>{try{var r=n(95);await Promise.resolve().then(n.bind(n,679)),lazui.useDirectives("lz",r.S);t()}catch(e){t(e)}}),1)}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return o[e](n,n.exports,s),n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},s.a=(o,a,s)=>{var i;s&&((i=[]).d=-1);var l,c,d,u=new Set,m=o.exports,f=new Promise(((e,t)=>{d=t,c=e}));f[t]=m,f[e]=e=>(i&&e(i),u.forEach(e),f.catch((e=>{}))),o.exports=f,a((o=>{var a;l=(o=>o.map((o=>{if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){var a=[];a.d=0,o.then((e=>{s[t]=e,r(a)}),(e=>{s[n]=e,r(a)}));var s={};return s[e]=e=>e(a),s}}var i={};return i[e]=e=>{},i[t]=o,i})))(o);var s=()=>l.map((e=>{if(e[n])throw e[n];return e[t]})),c=new Promise((t=>{(a=()=>t(s)).r=0;var n=e=>e!==i&&!u.has(e)&&(u.add(e),e&&!e.d&&(a.r++,e.push(a)));l.map((t=>t[e](n)))}));return a.r?c:s()}),(e=>(e?d(f[n]=e):c(m),r(i)))),i&&i.d<0&&(i.d=0)},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};s(711)})();