text: var m=t=>({get:e=>t.get(e),set:(e,n)=>(t.set(e,n),n)});const E=/([^\s\\>"'=]+)\s*=\s*(['"]?)$/,W=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,j=/<[a-z][^>]+$/i,R=/>[^<>]*$/,I=/<([a-z]+[a-z0-9:._-]*)([^>]*?)(\/>)/ig,F=/\s+$/,S=(t,e)=>0<e--&&(j.test(t[e])||!R.test(t[e])&&S(t,e)),G=(t,e,n)=>W.test(e)?t:`<${e}${n.replace(F,"")}></${e}>`;var _=(t,e,n)=>{const r=[],{length:o}=t;for(let l=1;l<o;l++){const a=t[l-1];r.push(E.test(a)&&S(t,l)?a.replace(E,(c,i,u)=>`${e}${l-1}=${u||'"'}${i}${u?"":'"'}`):`${a}<!--${e}${l-1}-->`)}r.push(t[o-1]);const s=r.join("").trim();return n?s:s.replace(I,G)};const{isArray:$}=Array,{indexOf:z,slice:T}=[],U=1,L=111,J=({firstChild:t,lastChild:e})=>{const n=document.createRange();return n.setStartAfter(t),n.setEndAfter(e),n.deleteContents(),t},K=(t,e)=>t.nodeType===L?1/e<0?e?J(t):t.lastChild:e?t.valueOf():t.firstChild:t,Q=t=>{const{childNodes:e}=t,{length:n}=e;if(n<2)return n?e[0]:t;const r=T.call(e,0),o=r[0],s=r[n-1];return{ELEMENT_NODE:U,nodeType:L,firstChild:o,lastChild:s,valueOf(){if(e.length!==n){let l=0;for(;l<n;)t.appendChild(r[l++])}return t}}};var X=(t,e,n,r,o)=>{const s=n.length;let l=e.length,a=s,c=0,i=0,u=null;for(;c<l||i<a;)if(l===c){const f=a<s?i?r(n[i-1],-0).nextSibling:r(n[a-i],0):o;for(;i<a;)t.insertBefore(r(n[i++],1),f)}else if(a===i)for(;c<l;)(!u||!u.has(e[c]))&&t.removeChild(r(e[c],-1)),c++;else if(e[c]===n[i])c++,i++;else if(e[l-1]===n[a-1])l--,a--;else if(e[c]===n[a-1]&&n[i]===e[l-1]){const f=r(e[--l],-1).nextSibling;t.insertBefore(r(n[i++],1),r(e[c++],-1).nextSibling),t.insertBefore(r(n[--a],1),f),e[l]=n[a]}else{if(!u){u=new Map;let f=i;for(;f<a;)u.set(n[f],f++)}if(u.has(e[c])){const f=u.get(e[c]);if(i<f&&f<a){let d=c,y=1;for(;++d<l&&d<a&&u.get(e[d])===f+y;)y++;if(y>f-i){const P=r(e[c],0);for(;i<f;)t.insertBefore(r(n[i++],1),P)}else t.replaceChild(r(n[i++],1),r(e[c++],-1))}else c++}else t.removeChild(r(e[c++],-1))}return n};const Y=t=>e=>{for(const n in e){const r=n==="role"?n:`aria-${n}`,o=e[n];o==null?t.removeAttribute(r):t.setAttribute(r,o)}},Z=(t,e)=>{let n,r=!0;const o=document.createAttributeNS(null,e);return s=>{n!==s&&(n=s,n==null?r||(t.removeAttributeNode(o),r=!0):(o.value=s,r&&(t.setAttributeNodeNS(o),r=!1)))}},q=(t,e,n)=>r=>{n!==!!r&&((n=!!r)?t.setAttribute(e,""):t.removeAttribute(e))},V=({dataset:t})=>e=>{for(const n in e){const r=e[n];r==null?delete t[n]:t[n]=r}},k=(t,e)=>{let n,r=e.slice(2);return!(e in t)&&e.toLowerCase()in t&&(r=r.toLowerCase()),o=>{const s=$(o)?o:[o,!1];n!==s[0]&&(n&&t.removeEventListener(r,n,s[1]),(n=s[0])&&t.addEventListener(r,n,s[1]))}},tt=t=>{let e;return n=>{e!==n&&(e=n,typeof n=="function"?n(t):n.current=t)}},et=(t,e)=>e==="dataset"?V(t):n=>{t[e]=n},nt=t=>{let e;return n=>{e!=n&&(e=n,t.textContent=n==null?"":n)}},rt=({childNodes:t},e)=>t[e],h=(t,e,n)=>X(t.parentNode,e,n,K,t),st=t=>{let e,n,r=[];const o=s=>{switch(typeof s){case"string":case"number":case"boolean":e!==s&&(e=s,n||(n=document.createTextNode("")),n.data=s,r=h(t,r,[n]));break;case"object":case"undefined":if(s==null){e!=s&&(e=s,r=h(t,r,[]));break}if($(s)){e=s,s.length===0?r=h(t,r,[]):typeof s[0]=="object"?r=h(t,r,s):o(String(s));break}e!==s&&"ELEMENT_NODE"in s&&(e=s,r=h(t,r,s.nodeType===11?T.call(s.childNodes):[s]));break;case"function":o(s(t));break}};return o},ot=(t,e)=>{switch(e[0]){case"?":return q(t,e.slice(1),!1);case".":return et(t,e.slice(1));case"@":return k(t,"on"+e.slice(1));case"o":if(e[1]==="n")return k(t,e)}switch(e){case"ref":return tt(t);case"aria":return Y(t)}return Z(t,e)};function it(t){const{type:e,path:n}=t,r=n.reduceRight(rt,this);return e==="node"?st(r):e==="attr"?ot(r,t.name):nt(r)}/*! (c) Andrea Giammarchi - ISC */var M=function(t){var e="fragment",n="template",r="content"in l(n),o=r?function(c){var i=l(n);return i.innerHTML=c,i.content}:function(c){var i=l(e),u=l(n),f=null;if(/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(c)){var d=RegExp.$1;u.innerHTML="<table>"+c+"</table>",f=u.querySelectorAll(d)}else u.innerHTML=c,f=u.childNodes;return s(i,f),i};return function(i,u){return(u==="svg"?a:o)(i)};function s(c,i){for(var u=i.length;u--;)c.appendChild(i[0])}function l(c){return c===e?t.createDocumentFragment():t.createElementNS("http://www.w3.org/1999/xhtml",c)}function a(c){var i=l(e),u=l("div");return u.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+c+"</svg>",s(i,u.firstChild.childNodes),i}}(document);const O=document.importNode.length!=1,ct=O?(t,e,n)=>document.importNode(M(t,e,n),!0):M,lt=O?t=>document.createTreeWalker(t,1|128,null,!1):t=>document.createTreeWalker(t,1|128),x=t=>{const e=[];let{parentNode:n}=t;for(;n;)e.push(z.call(n.childNodes,t)),t=n,n=t.parentNode;return e},p="is\xB5",w=m(new WeakMap),at=/^(?:plaintext|script|style|textarea|title|xmp)$/i,g=()=>({stack:[],entry:null,wire:null}),ut=(t,e)=>{const{content:n,updates:r}=dt(t,e);return{type:t,template:e,content:n,updates:r,wire:null}},ft=(t,e)=>{const n=_(e,p,t==="svg"),r=ct(n,t),o=lt(r),s=[],l=e.length-1;let a=0,c=`${p}${a}`;for(;a<l;){const i=o.nextNode();if(!i)throw`bad template: ${n}`;if(i.nodeType===8)i.data===c&&(s.push({type:"node",path:x(i)}),c=`${p}${++a}`);else{for(;i.hasAttribute(c);)s.push({type:"attr",path:x(i),name:i.getAttribute(c)}),i.removeAttribute(c),c=`${p}${++a}`;at.test(i.tagName)&&i.textContent.trim()===`<!--${c}-->`&&(i.textContent="",s.push({type:"text",path:x(i)}),c=`${p}${++a}`)}}return{content:r,nodes:s}},dt=(t,e)=>{const{content:n,nodes:r}=w.get(e)||w.set(e,ft(t,e)),o=document.importNode(n,!0),s=r.map(it,o);return{content:o,updates:s}},v=(t,{type:e,template:n,values:r})=>{const{length:o}=r;B(t,r,o);let{entry:s}=t;(!s||s.template!==n||s.type!==e)&&(t.entry=s=ut(e,n));const{content:l,updates:a,wire:c}=s;for(let i=0;i<o;i++)a[i](r[i]);return c||(s.wire=Q(l))},B=({stack:t},e,n)=>{for(let r=0;r<n;r++){const o=e[r];o instanceof C?e[r]=v(t[r]||(t[r]=g()),o):$(o)?B(t[r]||(t[r]=g()),o,o.length):t[r]=null}n<t.length&&t.splice(n)};function C(t,e,n){this.type=t,this.template=e,this.values=n}const{create:ht,defineProperties:pt}=Object,D=t=>{const e=m(new WeakMap),n=r=>(o,...s)=>v(r,{type:t,template:o,values:s});return pt((r,...o)=>new C(t,r,o),{for:{value(r,o){const s=e.get(r)||e.set(r,ht(null));return s[o]||(s[o]=n(g()))}},node:{value:(r,...o)=>v(g(),{type:t,template:r,values:o}).valueOf()}})},H=m(new WeakMap),bt=(t,e)=>{const n=typeof e=="function"?e():e,r=H.get(t)||H.set(t,g()),o=n instanceof C?v(r,n):n;return o!==r.wire&&(r.wire=o,t.textContent="",t.appendChild(o.valueOf())),t},yt=D("html");D("svg");function gt(){var t=!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent);if(!t||!indexedDB.databases)return Promise.resolve();var e;return new Promise(function(n){var r=function(){return indexedDB.databases().finally(n)};e=setInterval(r,100),r()}).finally(function(){return clearInterval(e)})}function b(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function vt(t,e){const n=gt().then(()=>{const r=indexedDB.open(t);return r.onupgradeneeded=()=>r.result.createObjectStore(e),b(r)});return(r,o)=>n.then(s=>o(s.transaction(e,r).objectStore(e)))}let A;function N(){return A||(A=vt("keyval-store","keyval")),A}function mt(t,e=N()){return e("readonly",n=>b(n.get(t)))}function $t(t,e,n=N()){return n("readwrite",r=>(r.put(e,t),b(r.transaction)))}function xt(t,e=N()){return e("readwrite",n=>(n.delete(t),b(n.transaction)))}export{xt as d,mt as g,yt as h,bt as r,$t as s};
  