@graview/guest 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +1 -1
- package/dist/client.generated.d.ts.map +1 -1
- package/dist/client.generated.js +2 -2
- package/dist/client.generated.js.map +1 -1
- package/dist/guest.d.ts.map +1 -1
- package/dist/guest.js +20 -2
- package/dist/guest.js.map +1 -1
- package/dist/host/frame.d.ts.map +1 -1
- package/dist/host/frame.js +35 -0
- package/dist/host/frame.js.map +1 -1
- package/dist/host/in-panel.d.ts +16 -0
- package/dist/host/in-panel.d.ts.map +1 -0
- package/dist/host/in-panel.js +35 -0
- package/dist/host/in-panel.js.map +1 -0
- package/dist/host/manifest.d.ts +1 -1
- package/dist/host/session.d.ts +13 -0
- package/dist/host/session.d.ts.map +1 -1
- package/dist/host/session.js +38 -0
- package/dist/host/session.js.map +1 -1
- package/dist/host/view-records.d.ts +17 -0
- package/dist/host/view-records.d.ts.map +1 -0
- package/dist/host/view-records.js +141 -0
- package/dist/host/view-records.js.map +1 -0
- package/dist/host/view-runtime.generated.js +1 -1
- package/dist/host/view.d.ts.map +1 -1
- package/dist/host/view.js +33 -0
- package/dist/host/view.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/protocol.d.ts +22 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -0
- package/dist/protocol.js.map +1 -1
- package/dist/record-report.d.ts +15 -0
- package/dist/record-report.d.ts.map +1 -0
- package/dist/record-report.js +84 -0
- package/dist/record-report.js.map +1 -0
- package/package.json +3 -3
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* A worker view's runtime as one classic script (FR-96): the host puts it in
|
|
4
4
|
* front of a view's own source. Carries Remote DOM (MIT, Shopify Inc.).
|
|
5
5
|
*/
|
|
6
|
-
export const VIEW_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var Pe=globalThis,Io=Pe.addEventListener,ko=Pe.removeEventListener,Do=Pe.postMessage,Lo=globalThis.queueMicrotask,Sn=globalThis.performance,Go=Sn?Sn.now.bind(Sn):Date.now,Me={listen:t=>Io.call(Pe,\"message\",t),unlisten:t=>ko.call(Pe,\"message\",t),post:t=>Do.call(Pe,t),microtask:t=>Lo.call(globalThis,t),now:()=>Go()};var x=Symbol(\"name\"),me=Symbol(\"prefix\"),pe=Symbol(\"value\"),O=Symbol(\"ns\"),q=Symbol(\"owner\"),D=Symbol(\"owner_document\"),se=Symbol(\"attributes\"),L=Symbol(\"prev\"),h=Symbol(\"next\"),A=Symbol(\"child\"),Y=Symbol(\"parent\"),he=Symbol(\"host\"),Q=Symbol(\"data\"),Se=Symbol(\"listeners\"),vn=Symbol(\"isTrusted\"),Ce=Symbol(\"path\"),Ie=Symbol(\"stop_immediate_propagation\"),ke=Symbol(\"dispatching\"),le=Symbol(\"content\"),G=Symbol(\"hooks\"),gt=Symbol(\"extensions\"),ve=Symbol(\"hooks_dispatch\"),B=Symbol(\"is_connected\"),De=Symbol(\"create_element\"),yr=0,W=1,Le=2,Ge=3,He=8,xe=9,Er=10,ge=11,_=\"http://www.w3.org/1999/xhtml\",J=\"http://www.w3.org/2000/svg\",br=\"http://www.w3.org/XML/1998/namespace\",Ke=\"http://www.w3.org/2000/xmlns/\";function yt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function H(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Nr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function M(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Tr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,wr=/[\\0\\t\\n\\f\\r />=]/u,Ho=/[\\0\\t\\n\\f\\r />]/u;function ce(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Sr(t){Tr.test(t)||On(t)}function xn(t){(t===\"\"||wr.test(t))&&On(t)}function Et(t,e,n){let r=ce(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||Ho.test(i))||(n===\"element\"?!Tr.test(l):l===\"\"||wr.test(l)))&&On(o),i!=null&&r==null)throw M(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==br)throw M(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Ke)throw M(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Ke&&o!==\"xmlns\"&&i!==\"xmlns\")throw M(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function On(t){throw M(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var bt=0,Nt=1,vr=2,Rn=3,Uo=typeof performance>\"u\"?Date.now:performance.now.bind(performance),V=class{static NONE=bt;static CAPTURING_PHASE=Nt;static AT_TARGET=vr;static BUBBLING_PHASE=Rn;timeStamp=Uo();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=bt;[Ce]=[];[Ie]=!1;[ke]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,vn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[vn]}composedPath(){return[...this[Ce]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Ie]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function An(t,e,n){if(t.cancelBubble)return;let o=e[Se]?.get(t.type)?.[n===Nt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?vr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(Bo,0,l)}if(t[Ie])break}}function Bo(t){throw t}var Ze=[],Tt=new WeakMap;function wt(t,e){let n=Tt.get(t);n?n.push(e):Tt.set(t,[e]),Ze[Ze.length-1].push(t)}function F(t){let e=[];Ze.push(e);let n;try{n=t()}catch(r){Ze.pop();try{xr(e)}catch{}throw r}return Ze.pop(),xr(e),n}function xr(t){let e,n=!1;for(let r of t){let o=Tt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Tt.delete(r)}}if(n)throw e}var St=[],Qe=[],_n=!1;function Oe(t){for(let e of t)St.push(e),e[1]&&Qe.push(e[1]);if(!_n){_n=!0;try{let e,n=!1;for(let r=0;r<St.length;r++){let[o,s]=St[r];s&&Qe.splice(Qe.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{St.length=0,Qe.length=0,_n=!1}}}function Je(t){let e=t;for(;e;){if(Qe.includes(e))return!0;e=e[Y]??e[he]}return!1}var et=Symbol(\"listenerRegistrations\"),ye=class{[Se]=void 0;[et]=void 0;[D]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=Pn(o),c=this[et];c||(c=new Map,this[et]=c);let u=c.get(e);u||(u={},c.set(e,u));let p=u[l];if(p||(p=new Map,u[l]=p),p.has(n))return;let g=this,b={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(b.normalizedListener=function(...C){if(b.signal?.aborted){vt(g,b);return}return b.once&&vt(g,b),typeof b.listener==\"object\"?b.listener.handleEvent(...C):b.listener.call(this,...C)});let N=this[Se];N||(N=new Map,this[Se]=N);let R=N.get(e);R||(R={},N.set(e,R));let T=R[l];if(T||(T=new Set,R[l]=T),p.set(n,b),T.add(b),i){let w=()=>{vt(g,b)};b.abortListener=w,i.addEventListener(\"abort\",w,{once:!0})}this[D]?.defaultView[ve].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Vo.call(this,e,n,r)}dispatchEvent(e){if(e[ke])throw M(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[ke]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ce]=n;for(let s=n.length;s--;)if(An(e,n[s],Nt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(An(e,o[s],Rn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[ke]=!1,e.cancelBubble=!1,e[Ie]=!1,e.eventPhase=bt,e.currentTarget=null,e[Ce]=[]}}};function Vo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Pn(!!r),s=this[et]?.get(t)?.[o]?.get(e);s&&vt(this,s)}function Pn(t){return t?\"capture\":\"bubble\"}function vt(t,e){let n=Pn(e.capture),r=t[et],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[Se],l=i?.get(e.type);if(!l)return;let c=l[n];c?.delete(e)&&(c.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[D]?.defaultView[ve].removeEventListener?.(t,e.type,e.listener,e.capture))}var ee=class extends Array{item(e){return this[e]??null}};var nt=0,Or=1,In=2,kn=3,rt=4,Rr=0,Ar=1,Rt=2,At=3,_r=4,Cn=5,Pr=6,Mr=7,xt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Fo(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function $(t){throw M(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function _t(t,e){let n=typeof e==\"string\"?ot(e):[{combinator:rt,matchers:e}],r=null,o=t[A];return o&&n[0].matchers.length&&Dn(o,n,s=>(r=s,!1)),r}function Pt(t,e){let n=typeof e==\"string\"?ot(e):[{combinator:rt,matchers:e}],r=new ee,o=t[A];return o&&n[0].matchers.length&&Dn(o,n,s=>{r.push(s)}),r}function ot(t,e=!1,n=!1){let r={combinator:rt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&$(t);let l=0,c;for(;c=s.exec(i);){c.index!==l&&$(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&$(t),c[1]===\">\"?r.combinator=Or:c[1]===\"+\"?r.combinator=kn:c[1]===\"~\"?r.combinator=In:r.combinator=nt,r={combinator:rt,matchers:[]},o.push(r));let u=c[8]?H(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&$(t);let g,b=c[4]??c[5]??c[7];if(c[2]){xt.test(u)||$(t);let N=c[5],R=N?.[0];if(c[3]==null&&(R==='\"'||R===\"'\")){let T=c[0].lastIndexOf(N);b=i.slice(c.index+T+1),s.lastIndex=i.length}else N!=null&&!xt.test(N)&&$(t);g=_r}else c[6]?(xt.test(u)||$(t),g=c[6]===\"#\"?Rt:At):c[8]?g=c[9]==null?Cn:Pr:c[7]===\"*\"?g=Rr:c[7]&&xt.test(c[7])?g=Ar:$(t);c[9]?([b,s.lastIndex]=Fo(i,s.lastIndex),u!==\"has\"&&u!==\"not\"&&$(t),u===\"has\"&&e&&$(t),ot(b,e||u===\"has\",u===\"has\")):g===Cn&&$(t),r.matchers.push({type:g,name:u,value:b}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&$(t),o}function jo(t,e){let n=ot(e);return n[0]?.matchers.length?tt(t,n):!1}function zo(t,e){let n=ot(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=nt,s={type:Mr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:nt,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===kn||o===In?t[h]:t[A];if(!i)return!1;let l=!1;return Dn(i,n,()=>(l=!0,!1),t),l}function Dn(t,e,n,r){let o=[],s=t;for(;s;){if(j(s)){if(tt(s,e,r)&&n(s)===!1)return!1;let i=s[A];if(i){let l=s[h];l&&o.push(l),s=i;continue}}s=s[h]??o.pop()??null}return!0}function tt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===rt){if(!Ot(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||tt(t,l,n)}let s=r===Or||r===nt?Y:L,i=t[s];if(!i)return!1;if(r===nt||r===In){for(;i;){if(j(i)&&Ot(i,o,n)){let l=e.slice(0,-1);if(l.length===0||tt(i,l,n))return!0}i=i[s]}return!1}else{if(r===kn&&!j(i)){for(;i&&!j(i);)i=i[s];if(!i)return!1}if(!j(i)||!Ot(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||tt(i,l,n)}}function Mn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Ot(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Ot(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Rr:return o===\"*\";case Ar:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Rt:return Mn(t,\"id\")===o;case At:let i=Mn(t,\"class\");return i?yt(i).includes(o):!1;case _r:let l=Mn(t,o);return s==null?l!=null:l===s;case Mr:return t===n;case Cn:$(`:${o}`);case Pr:switch(o){case\"has\":return zo(t,s||\"\");case\"not\":return!jo(t,s||\"\");default:$(`:${o}(${s})`)}}return!1}function qo(t){return t.nodeType===Le}function st(t){return Q in t}function Gn(t){return t.nodeType===Ge}function Yo(t){return t.nodeType===He}function j(t){return t.nodeType===W}function Ln(t){return t.nodeType===ge}function Dr(t){return\"appendChild\"in t}function Mt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let c of at(i)){if(o.has(c)||(o.add(c),e.push(c),l.push(c),!j(c)))continue;let u=c[se];if(u)for(let g of u)o.has(g)||(o.add(g),e.push(g));let p=c[le];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=l}return{nodes:e,treeNodes:s}}function it(t,e){for(let n of t)n[D]=e}function Cr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[D]=e,r}function Ir(t,e){if(Gn(t))return e.createTextNode(t.data);if(Yo(t))return e.createComment(t.data);if(qo(t))return Cr(t,e);if(j(t)){let n=e[De](t[x],t.namespaceURI,t[me],t.localName);if(t[se])for(let r=0;r<t[se].length;r++){let o=t[se].item(r);n.attributes.setNamedItem(Cr(o,e))}return n}else{if(Ln(t))return e.createDocumentFragment();{let n=new t.constructor;return n[D]=e,n}}}function Ct(t,e,n=t.ownerDocument){if(t.nodeType===xe)throw M(\"Cannot clone a document node\",\"NotSupportedError\");let r=Ir(t,n);if(!e||!j(t)&&!Ln(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],c=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,j(i.source)&&i.source.namespaceURI===_&&i.source.localName===\"template\"){let p=i.source[le];p&&(o.has(p)&&kr(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&kr(),o.add(l);let u=Ir(l,n);j(l)||Ln(l)?s.push({source:l,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function kr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function It(t,e){let n=String(e);return n===\"\"?null:_t(t,[{type:Rt,name:n}])}function kt(t,e){let n=[...new Set(yt(String(e)))];return Pt(t,n.map(r=>({type:At,name:r})))}function Dt(t,e){let n=String(e),r=H(n),o=[];for(let s of Lt(t))j(s)&&(n===\"*\"||(s.namespaceURI===_?s[x]===r:s[x]===n))&&o.push(s);return o}function Lt(t){let e=[],n=[],r=t[A];for(;r;){e.push(r);let o=r[A],s=r[h];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function at(t){let e=Lt(t);return e.unshift(t),e}var te=class extends ye{nodeType=yr;[x]=\"\";[Y]=null;[he]=null;[A]=null;[L]=null;[h]=null;[B]=!1;get[G](){return this[D].defaultView[ve]}get localName(){return this[x]}get nodeName(){return this[x]}get ownerDocument(){return this[D]}get isConnected(){return this[B]}isDefaultNamespace(e){let n=ce(e);return $o(this)===n}get parentNode(){return this[Y]}set parentNode(e){}get parentElement(){let e=this[Y];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[L]}set previousSibling(e){}get nextSibling(){return this[h]}set nextSibling(e){}get previousElementSibling(){let e=this[L];for(;e&&e.nodeType!==1;)e=e[L];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[h];for(;e&&e.nodeType!==1;)e=e[h];return e}set nextElementSibling(e){}get firstChild(){return this[A]}set firstChild(e){}get lastChild(){let e=this[A];for(;e;){let n=e[h];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return st(this)?this.data:null}set nodeValue(e){st(this)&&(this.data=e)}get textContent(){if(st(this))return this.data;let e=\"\";for(let n of Lt(this))Gn(n)&&(e+=n.data);return e}set textContent(e){if(st(this))this.data=e;else if(Dr(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Ct(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function $o(t){let e=t;for(;e;)switch(e.nodeType){case W:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Ke,\"xmlns\");if(r!=null&&r.prefix==null)return ce(r.value);e=n.parentElement;break}case xe:e=e.documentElement;break;case Er:case ge:return null;case Le:e=e.ownerElement;break;default:e=e.parentElement}return null}var ne=Symbol(\"insertNode\"),Bn=Symbol(\"preflightInsertions\"),Gt=Symbol(\"replaceNode\"),Ee=class extends te{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Re(e),r=this.parentNode;if(r)return Hn(o=>{ue(r,n);let s=this[h];for(;s&&n.includes(s);)s=s[h];let i=Un(r,n,o);this.parentNode===r?r[Gt](i,this,o):r[ne](i,s,o)})}before(...e){let n=Re(e),r=this.parentNode;if(r)return Hn(o=>{ue(r,n);let s=this[L];for(;s&&n.includes(s);)s=s[L];let i=Un(r,n,o);r[ne](i,s?s[h]:r.firstChild,o)})}after(...e){let n=Re(e),r=this.parentNode;if(r)return Hn(o=>{ue(r,n);let s=this[h];for(;s&&n.includes(s);)s=s[h];let i=Un(r,n,o);r[ne](i,s,o)})}};function Hn(t){return F(()=>{let e=[];try{t(e)}catch(n){try{Oe(e)}catch{}throw n}Oe(e)})}function Re(t){return t.map(e=>e instanceof te?e:String(e))}function lt(t,e){return e instanceof te?e:t.ownerDocument.createTextNode(String(e))}function ue(t,e){for(let n of e){if(!(n instanceof te))continue;let r=t;for(;r;){if(r===n)throw M(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[Y]??r[he]}}}function Un(t,e,n){let r=[];for(let s of e)r.push(lt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Bn](r);for(let s of r)o[ne](s,null,n);return o}var Ht,Vn=0,Lr=0,Gr=0,Hr=0,Ue=!1,jn=!1,ct=!1,Ut=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=Wo(n),o=Ht??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Vn++:Fn(i,-1),s.set(this,r),Fn(r,1),this.#e.add(e)}disconnect(){let e=Ht;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Vn--,Fn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Vn===0&&(Ht=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function re(t){let e=Ht;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new ee,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new ee,target:t.target,type:t.type})}function Bt(...t){let e=new ee;return e.push(...t),e}function Wo(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function Fn(t,e){t.attributes&&(Lr+=e),t.characterData&&(Gr+=e),t.childList&&(Hr+=e),Ue=Lr>0,jn=Gr>0,ct=Hr>0}var ie=class extends Ee{childNodes=new ee;children=new ee;appendChild(e){return F(()=>this[ne](e,null))}insertBefore(e,n){return F(()=>this[ne](e,n||null))}append(...e){return F(()=>{let n=Re(e.filter(r=>r!=null));n.length>1&&ue(this,n);for(let r of n)this[ne](lt(this,r),null)})}prepend(...e){return F(()=>{let n=Re(e.filter(o=>o!=null));n.length>1&&ue(this,n);let r=this.firstChild;for(let o of n)this[ne](lt(this,o),r)})}replaceChildren(...e){return F(()=>{let n=Re(e.filter(o=>o!=null));ue(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[ne](lt(this,o),null)})}removeChild(e){return F(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw M(\"The node is not a child of this node\",\"NotFoundError\");let n=this[B]?at(e):void 0,r=e[L],o=e[h],s=Vt(this,e);if(n)for(let i of n)i[B]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Oe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return F(()=>this[Gt](e,n))}[Gt](e,n,r){if(ue(this,[e]),n.parentNode!==this)throw M(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[L],s=n[h],i=this.prepareInsertion(e),l=this[B]?at(n):void 0,c=new Set(i.map(({node:b})=>b)),u=s;for(;u&&c.has(u);)u=u[h];let p=Vt(this,n);if(l){for(let N of l)N[B]=!1;let b=new Set(l);for(let N of i)b.has(N.node)&&(N.shouldDisconnect=!1)}this.commitInsertion(i,u);let g=this[B];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,g),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Pt(this,e)}querySelector(e){return _t(this,e)}[ne](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Bn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ue(this,[e]),n&&n.parentNode!==this)throw M(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[h]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[B];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Oe(e)}prepareInsertion(e){let n=[];if(e.nodeType===ge){let i=e[A];for(;i;)n.push(i),i=i[h]}else n.push(e);let r=this[B],o=this[D],s=[];for(let i of n){let l=i[B],c=l||r,u,p;if(i[D]===o)c&&(u=at(i));else{let g=Mt(i);p=g.nodes,c&&(u=g.treeNodes)}s.push({node:i,nodes:u,adoption:p,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[Y];if(i){let l=s.node[L],c=s.node[h];s.source={parent:i,index:Vt(i,s.node),previousSibling:l,nextSibling:c}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[D];for(let{adoption:s}of e)s&&it(s,r);let o=this[B];for(let{nodes:s}of e)if(s)for(let i of s)i[B]=o}attachChild(e,n){if(n){let s=n[L];e[h]=n,e[L]=s,s?s[h]=e:this[A]=e,n[L]=e}else{e[h]=null;let s=this[A];if(s){let i;for(;i=s[h];)s=i;s[h]=e,e[L]=s}else this[A]=e,e[L]=null}let r=j(e);e[Y]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!j(s);)s=s[h];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[L],nextSibling:e[h]}}queueRemovalMutationRecord(e,n,r,o){ct&&re({type:\"childList\",target:e,removedNodes:Bt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(ct)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),re({type:\"childList\",target:this,addedNodes:Bt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==W||Je(this)?[]:[[()=>this[G].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===W&&!Je(s.parent)&&n.push([()=>s.parent[G].removeChild?.(s.parent,o,s.index)]),this.nodeType===W&&!Je(this)&&n.push([()=>this[G].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){Br(e,n)}};function Ur(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[B]?n.treeNodes:void 0,s=e[L],i=e[h],l=Vt(t,e);if(o)for(let u of o)u[B]=!1;it(n.nodes,r),ct&&re({type:\"childList\",target:t,removedNodes:Bt(e),previousSibling:s,nextSibling:i}),o&&Br(o,\"disconnectedCallback\");let c=[];t.nodeType===W&&!Je(t)&&c.push([()=>t[G].removeChild?.(t,e,l)]),Oe(c)}function Vt(t,e){let n=e[L],r=e[h];n?n[h]=r:t[A]=r,r&&(r[L]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),j(e)&&t.children.splice(t.children.indexOf(e),1),e[Y]=null,e[h]=null,e[L]=null,o}function Br(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&wt(n,()=>r.call(n))}}function ut(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||wt(t,()=>i.call(t,e,n,r,o))}var Ft=class{[A]=null;constructor(e){this[q]=e}getNamedItem(e){let n=String(e),r=this[q][O]===_?H(n):n,o=this[A];for(;o;){if(o.name===r)return o;o=o[h]}return null}getNamedItemNS(e,n){let r=ce(e),o=String(n),s=this[A];for(;s;){if(s.localName===o&&s[O]===r)return s;s=s[h]}return null}item(e){let n=this[A],r=0;for(;n;){if(r++===e)return n;n=n[h]}return null}get length(){let e=0,n=this[A];for(;n;)e++,n=n[h];return e}removeNamedItem(e){let n=String(e),r=this[q][O]===_?H(n):n;return F(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ce(e),o=String(n);return F(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[O]===r))}removeNamedItemImmediately(e){let n=this[q],r=this[A],o=null;for(;r!=null;){if(e(r)){o&&(o[h]=r[h]),this[A]===r&&(this[A]=r[h]);let s=r.value;return r[h]=null,r[q]=null,Ue&&re({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[O],oldValue:s}),n[G].removeAttribute?.(n,r.name,r[O]),ut(n,r.localName,s,null,r[O]),r}o=r,r=r[h]}return null}setNamedItem(e){return F(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[q],r=e[q];if(r!=null&&r!==n)throw M(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[A],i=null;for(;s;){if(s.localName===e.localName&&s[O]===e[O]){if(s===e)return s;i?i[h]=e:this[A]=e,e[h]=s[h],s[h]=null,o=s;break}i=s,s=s[h]}o==null&&(i?i[h]=e:this[A]=e),e[q]=n,e[D]=n[D],o&&(o[q]=null);let l=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return l&&Ue&&re({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[O],oldValue:o?.value??null}),c&&n[G].removeAttribute?.(n,o.name,o[O]),(l||c)&&n[G].setAttribute?.(n,e.name,e.value,e[O]),l&&ut(n,e.localName,o?.value??null,e.value,e[O]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[A];for(;e;)yield e,e=e[h]}};var Ae=class extends te{nodeType=Le;[O]=null;[h]=null;[q]=null;constructor(e,n,r){super(),this[x]=e,this[pe]=n,r&&(this[O]=r)}get nodeName(){return this[x]}set nodeName(e){}get name(){return this[x]}set name(e){}get localName(){if(this[O]==null)return this[x];let e=this[x].indexOf(\":\");return e<0?this[x]:this[x].slice(e+1)}get prefix(){if(this[O]==null)return null;let e=this[x].indexOf(\":\");return e<0?null:this[x].slice(0,e)}get value(){return this[pe]}set value(e){let n=String(e),r=this[q];if(!r){this[pe]=n;return}F(()=>{let o=this[pe];this[pe]=n,Ue&&o!==n&&re({type:\"attributes\",target:r,attributeName:this[x],attributeNamespace:this[O],oldValue:o}),this[G].setAttribute?.(r,this[x],n,this[O]),ut(r,this.localName,o,n,this[O])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[q]}get namespaceURI(){return this[O]}get specified(){return!0}};var Xo={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Ko=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Zo=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,jr=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Qo=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",Jo=/^(?:color|face|size)$/i;function Vr(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return Xo[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function zr(t){return t.namespaceURI===_&&Ko.has(t.localName)}function Fr(t){let e=t.localName;return t[O]===J&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function es(t,e){if(Qo.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(jr))if(Jo.test(n[1]))return!0;return!1}function jt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Zo)){let l=i[1];if(l){let c=i[2],u=H(l),p=o[o.length-1]?.element??e,g=p[O]===J?J:_;if(u===\"svg\")g=J;else if(g===J){if(Fr(p))g=_;else if(es(u,c)){for(;o.length>0;){let R=o[o.length-1];if(R.element[O]!==J||Fr(R.element))break;o.pop(),s=R.target}g=_}}let b=g===_?u:l,N=n[De](b,g,null,b);for(let R of c.matchAll(jr))N.setAttribute(R[1],Vr(R[3]||R[4]||\"\"));if(s.append(N),zr(N)||g!==_&&i[4])continue;o.push({element:N,target:s}),s=g===_&&u===\"template\"?N.content:N}else if(i[5]){let c=H(i[5]);for(let u=o.length-1;u>=0;u--){let p=o[u],g=H(p.element[x]);if(g===c){s=p.target,o.length=u;break}if(p.element[O]===_&&g===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(Vr(i[7]))}return r}function zt(t){return Yr([{type:\"content\",child:t[A]}])}function qr(t){return Yr([{type:\"opening\",node:t}])}function Yr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case W:{let o=r;e.push(`<${o[x]}`);let s=o[se]?.[A];for(;s;){e.push(` ${s[x]}`);let l=s[pe];l!==\"\"&&(l=String(l).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${l}\"`)),s=s[h]}if(e.push(\">\"),zr(o))break;let i=o.namespaceURI===_&&o.localName===\"template\"?o[le]:o;t.push({type:\"closing\",name:o[x]}),t.push({type:\"content\",child:i?.[A]??null});break}case Ge:{let o=r;e.push(o[Q].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case He:{let o=r;e.push(`<!--${o[Q]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[h]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var U=class extends ie{nodeType=W;[O]=_;[me]=null;get namespaceURI(){return this[O]}get prefix(){return this[me]}get localName(){let e=this[me];return e==null?this[x]:this[x].slice(e.length+1)}get nodeName(){return this[O]===_?Nr(this[x]):this[x]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Ae(\"slot\",n))}get attributes(){let e=this[se];return e||(e=new Ft(this),this[se]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Dt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return kt(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);xn(r);let s=this[O]===_?H(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ae(s,o))}setAttributeNS(e,n,r){let o=ce(e),s=String(n),i=String(r),l=Et(o,s,\"attribute\"),c=this.attributes.getNamedItemNS(l.namespace,l.localName);c?c.value=i:this.attributes.setNamedItemNS(new Ae(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);xn(r);let o=this[O]===_?H(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Ae(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[O]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return qr(this)}get innerHTML(){return zt(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=jt(String(e),this);this.replaceChildren(n)}}};var Be=class t extends U{[O]=J;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var be=class extends Ee{[Q]=\"\";constructor(e){super(),this[Q]=e==null?\"\":String(e)}setData(e){let n=jn,r=n?this[Q]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Q]=o,n&&r!==o&&re({type:\"characterData\",target:this,oldValue:r}),this[G].setText?.(this,o)}get data(){return this[Q]}set data(e){this.setData(e)}};var Ve=class extends be{nodeType=Ge;[x]=\"#text\"};var Fe=class extends be{nodeType=He;[x]=\"#comment\"};var je=class extends ie{nodeType=ge;[x]=\"#document-fragment\";[D]=typeof window<\"u\"?window.document:null;getElementById(e){return It(this,e)}};var ze=class extends U{get content(){let e=this[le];return e||(e=this.ownerDocument.createDocumentFragment(),e[he]=this,this[le]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(jt(String(e),this))}get innerHTML(){let e=this[le];return e?zt(e):\"\"}};var qt=class extends U{};var Yt=class extends U{};var $t=class extends U{};var dt=class extends ie{nodeType=xe;[x]=\"#document\";[B]=!0;constructor(e){super(),this.defaultView=e,this[D]=this,this.documentElement=Xt(new $t,this,\"html\"),this.body=Xt(new qt,this,\"body\"),this.head=Xt(new Yt,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return kt(this,e)}createElement(e){let n=String(e);return Sr(n),zn(this,H(n))}createElementNS(e,n){let r=Et(e,n,\"element\");return zn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[De](e,n,r,o){return zn(this,e,n,r,o)}createTextNode(e){let n=Wt(new Ve(e),this);return this[G].createText?.(n,n.data),n}createComment(e){return Wt(new Fe(e),this)}createDocumentFragment(){return Wt(new je,this)}createEvent(){return new V(\"\")}getElementById(e){return It(this,e)}getElementsByTagName(e){return Dt(this,e)}importNode(e,n){if(e.nodeType===xe)throw M(\"Cannot import a document node\",\"NotSupportedError\");return Ct(e,n,this)}adoptNode(e){if(e[D]===this)return e;let n=Mt(e);return F(()=>{let r=e.parentNode;return r?Ur(r,e,n,this):it(n.nodes,this),e})}};function Wt(t,e){return Object.defineProperty(t,D,{value:e,writable:!0,enumerable:!1}),t}function zn(t,e,n=_,r=null,o=e){let s;if(n===J)s=new Be;else if(n===_&&o===\"template\")s=new ze;else if(n===_){let i=t.defaultView.customElements.get(o);s=i?new i:new U}else s=new U;return Xt(s,t,e,n,r)}function Xt(t,e,n,r=_,o=null){return Wt(t,e),Object.defineProperties(t,{[x]:{value:n},[O]:{value:r},[me]:{value:o}}),e[G].createElement?.(t,r),t}var Kt=class extends V{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Zt=class extends V{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Qt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Jt=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var en=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var tn=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var nn=class extends U{};var ts=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,ns=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function $r(t){return ts.test(t)&&!ns.has(t)}function Wr(t){return M(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var rn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!$r(e))throw Wr(e);if(this.registry.has(e))throw M(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw M(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!$r(e))return Promise.reject(Wr(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var rs=[\"onerror\",\"onunhandledrejection\"],Kr=Symbol.for(\"@remote-dom/polyfill/global-property\");function Zr(t){return Object.getOwnPropertyDescriptors(t)}function Qr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(ye.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=qn(r.value.bind(t)),e[n]=r);return e}function Jr(t){let e={};for(let n of rs)e[n]={configurable:!0,enumerable:!0,get:qn(()=>t[n]),set:qn(r=>{t[n]=r})};return e}function os(t){return Object.assign(Zr(t),Qr(t),Jr(t))}function qn(t){return Object.defineProperty(t,Kr,{value:!0}),t}function Xr(t,e){for(let n of Reflect.ownKeys(e)){let r=ss(t,n);(r==null||is(r))&&Object.defineProperty(t,n,e[n])}}function ss(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function is(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Kr]===!0)}var _e=class extends ye{[G]={};[gt]=[];[ve]=ls(this);name=\"\";window=this;parent=this;self=this;top=this;document=new dt(this);customElements=new rn;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=Zt;PromiseRejectionEvent=Qt;ToggleEvent=Jt;FocusEvent=en;ClipboardEvent=tn;EventTarget=ye;CustomEvent=Kt;Node=te;ParentNode=ie;ChildNode=Ee;DocumentFragment=je;Document=dt;CharacterData=be;Comment=Fe;Text=Ve;Element=U;HTMLElement=nn;SVGElement=Be;HTMLTemplateElement=ze;MutationObserver=Ut;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)as(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Zr(e),s=Object.assign(Qr(e),Jr(e));delete o.self,Object.defineProperties(globalThis,o),Xr(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Xr(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,os(e))}};function as(t,e){t[gt].push(e(t)??{})}function ls(t){return{createElement:de.bind(null,t,\"createElement\"),setAttribute:de.bind(null,t,\"setAttribute\"),removeAttribute:de.bind(null,t,\"removeAttribute\"),createText:de.bind(null,t,\"createText\"),setText:de.bind(null,t,\"setText\"),insertChild:de.bind(null,t,\"insertChild\"),removeChild:de.bind(null,t,\"removeChild\"),addEventListener:de.bind(null,t,\"addEventListener\"),removeEventListener:de.bind(null,t,\"removeEventListener\")}}function de(t,e,...n){for(let s of t[gt])s[e]?.apply(s,n);let r=t[G];r[e]?.apply(r,n)}var on=new _e;var Yn=\"~\";var Ne=new WeakMap;function qe(t){return Ne.get(t)}var Kn=new WeakMap,us=0;function X(t){let e=Kn.get(t);return e==null&&(e=String(us++),sn(t,e)),e}function sn(t,e){Kn.set(t,e)}var Wn=new WeakMap;function ds(t){return Wn.get(t)}var Xn=new WeakMap;function fs(t){let e=Xn.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var ms=new WeakMap;function ps(t){return ms.get(t)}function Zn(t,e,n){let r=Wn.get(t);if(r==null&&(r={},Wn.set(t,r)),r[e]===n)return;r[e]=n;let o=Ne.get(t);o?.mutate([[3,X(t),e,n,1]])}function Te(t,e,n){let r=Xn.get(t);if(r==null&&(r={},Xn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ne.get(t);o?.mutate([[3,X(t),e,n,2]])}function Ye(t,e){if(Ne.get(t)!==e&&(Ne.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Ye(t.childNodes[r],e)}function an(t){if(Ne.get(t)!=null&&(Ne.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)an(t.childNodes[n])}function $e(t){let{nodeType:e}=t;switch(e){case 1:return{id:X(t),type:e,element:t.localName,properties:$n(ds(t)),attributes:$n(fs(t)),eventListeners:$n(ps(t)),children:Array.from(t.childNodes).map($e)};case 3:case 8:return{id:X(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function $n(t){return t?{...t}:void 0}function Qn(t,e,...n){let r=Kn.get(t),o=Ne.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var We=on[G];We.insertChild=(t,e,n)=>{let r=qe(t);r!=null&&(Ye(e,r),r.mutate([[0,X(t),$e(e),n]]))};We.removeChild=(t,e,n)=>{let r=qe(t);r!=null&&(an(e),r.mutate([[1,X(t),n]]))};We.setText=(t,e)=>{let n=qe(t);n?.mutate([[2,X(t),e]])};We.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Te(t,e,n)};We.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Te(t,e)};_e.setGlobal(on);function ln(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var to=[\"wheel\",\"drag\",\"pinch\"];function no(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function oo(t,e={}){let n,r=\"\",o,s=0,i=new Set,l=new Map,c=[],u=T=>{n?n.postMessage({...T,nonce:r}):c.push(T)},p=T=>{let w=T.data;if(!(!w||typeof w!=\"object\")){if(w.type===\"props\"){o=w.props;for(let C of i)C(w.props)}else w.type===\"answer\"?(l.get(w.id)?.(w),l.delete(w.id)):w.type===\"event\"&&typeof w.listener==\"number\"?e.onEvent?.(w):w.type===\"heartbeat\"&&typeof w.beat==\"number\"&&u({type:\"heartbeat\",beat:w.beat});e.onMessage?.(w)}},g=()=>{},b=T=>{if(n||!t.fromHost(T)||!no(T.data)||T.data.protocol!==1)return;let w=T.ports[0];if(w){n=w,r=T.data.nonce,n.onmessage=p,n.start?.(),g();for(let C of c.splice(0))u(C)}};g=t.listen(b),t.ready({graview:\"guest-ready\",protocol:1});let N,R={get props(){return o},subscribe(T){return i.add(T),()=>i.delete(T)},act(T,w={}){let C=s+=1;return new Promise(I=>{l.set(C,I),u({type:\"act\",id:C,name:T,args:w})})},navigate(T){let w=ln(T);w&&u(w)},size(T){u({type:\"size\",height:T})},autoSize(T){let w=T??globalThis.document?.documentElement,C=globalThis.ResizeObserver;if(!w||!C||typeof w.getBoundingClientRect!=\"function\")return()=>{};N?.disconnect();let I=new C(()=>R.size(Math.ceil(w.getBoundingClientRect().height)));return I.observe(w),N=I,()=>I.disconnect()},close(){N?.disconnect(),g(),n?.close(),i.clear()}};return{guest:R,send:u}}var io=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],ao=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],lo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],co=[\"TEMPORARY\",\"PERSISTENT\"],Yl=Object.freeze([...io,...ao,...lo,...co]),$l=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),so=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function uo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...io,...ao,...lo,...e,\"constructor\",Symbol.toStringTag]),i=(S,P)=>{let z=Reflect.getOwnPropertyDescriptor(S,P);return z===void 0||!(\"value\"in z)||z.writable||z.configurable?!1:n.primitivesStay&&typeof P==\"symbol\"&&(typeof z.value!=\"object\"||z.value===null)&&typeof z.value!=\"function\"?!0:co.includes(P)&&typeof z.value==\"number\"},l=t,c=l.setTimeout,u=l.setInterval,p=l.crypto,g=(S,P)=>function(z,mt,...pt){if(typeof z!=\"function\")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return S.call(t,z,mt,...pt)},b=p?Object.freeze({getRandomValues:S=>p.getRandomValues(S)}):void 0,N=l.document?.defaultView;if(N&&N!==l)for(let S of Reflect.ownKeys(N))typeof S==\"symbol\"||s.has(S)||Reflect.deleteProperty(N,S)||o.push(`window.${S}`);let R=[];for(let S=t;S&&S!==Object.prototype;S=Object.getPrototypeOf(S))R.push(S);for(let S of R)for(let P of Reflect.ownKeys(S))s.has(P)||(Reflect.deleteProperty(S,P)?r.push(so(P)):i(S,P)||o.push(so(P)));let T=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},w=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let S of w){let P=T();Object.defineProperty(P,\"prototype\",{value:S,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(S,\"constructor\",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),S===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:P,writable:!0,enumerable:!1,configurable:!0})}let C=(S,P)=>{Reflect.defineProperty(t,S,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(S)};C(\"setTimeout\",g(c,\"setTimeout\")),C(\"setInterval\",g(u,\"setInterval\")),b&&C(\"crypto\",b);for(let S of R.slice(1))Object.freeze(S);for(let S of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,S);Reflect.defineProperty(t,S,\"value\"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let I;try{I=Reflect.preventExtensions(t)}catch{I=!1}return{removed:r,stuck:o,sealed:I}}var ft=class extends HTMLElement{constructor(){super(),sn(this,Yn)}connect(e){if(qe(this)===e||(Ye(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Yn,$e(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Zn(this,e,n)}callRemoteMethod(e,...n){return Qn(this,e,...n)}};var f={},Jn={empty:!0},hs={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},er={div:f,section:f,article:f,aside:f,header:f,footer:f,nav:f,hgroup:f,search:f,address:f,figure:f,figcaption:f,blockquote:f,p:f,pre:f,hr:Jn,br:Jn,wbr:Jn,h1:f,h2:f,h3:f,h4:f,h5:f,h6:f,span:f,strong:f,em:f,b:f,i:f,u:f,s:f,small:f,mark:f,abbr:f,cite:f,q:f,code:f,kbd:f,samp:f,var:f,sub:f,sup:f,dfn:f,bdi:f,bdo:f,ruby:f,rt:f,rp:f,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:f,menu:f,dl:f,dt:f,dd:f,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:f,caption:f,thead:f,tbody:f,tfoot:f,tr:f,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:f,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:f,output:f,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]},loading:{oneOf:[\"lazy\",\"eager\"]},fetchpriority:{oneOf:[\"high\",\"low\",\"auto\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\"}}},gs=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],ys={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(gs.map(t=>[t,\"css\"]))},fe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},cn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},fo={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},mo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},oe={...fe,in:\"text\",result:\"text\"},po={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},ho={svg:{attributes:{...fe,...cn}},g:f,defs:f,symbol:{attributes:{...fe,...cn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...fe,href:\"fragment\"}},title:f,desc:f,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...fe,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...po}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...po}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...fe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...fe,...cn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...cn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:f,filter:{attributes:{...fe,filterUnits:fo,primitiveUnits:fo}},feBlend:{attributes:{...oe,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...oe,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:oe},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...oe,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...oe,in2:\"text\",scale:\"number\",xChannelSelector:mo,yChannelSelector:mo}},feDropShadow:{attributes:{...oe,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:oe},feGaussianBlur:{attributes:{...oe,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:oe},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...oe,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...oe,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...fe,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var go={section:[\"aria-label\",\"title\"]};function Es(t){return/^aria-[a-z]+$/.test(t)}function bs(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Ns=new Map(Object.keys(ho).map(t=>[t.toLowerCase(),t]));function yo(t){return Ns.get(t.toLowerCase())}function Eo(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[er[e]?.attributes,hs]:[ho[e]?.attributes,ys],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,c]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:c}}if(Es(r)||bs(r))return{name:r,kind:\"text\"}}var bo=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var un=/^\\d{4}-\\d{2}-\\d{2}$/;function Ts(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!un.test(t)||!un.test(e))return;let n=Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5);return Number.isFinite(n)?n:void 0}function No(t,e,n={}){let r=Ts(t,e);if(r===void 0)return\"\";if(r===0)return\"today\";if(r===1)return\"tomorrow\";if(r<0&&n.due===!0)return\"overdue\";if(r===-1)return\"yesterday\";let o=Math.abs(r),[s,i]=o<14?[o,\"day\"]:o<60?[Math.round(o/7),\"week\"]:o<730?[Math.round(o/30.44),\"month\"]:[Math.round(o/365.25),\"year\"],l=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${l}`:`${l} ago`}function To(t,e){if(typeof t!=\"string\")return;if(un.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return un.test(t.slice(0,10))?t.slice(0,10):void 0;try{let r=new Intl.DateTimeFormat(\"en-CA\",{timeZone:e||\"UTC\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(n),o=s=>r.find(i=>i.type===s)?.value??\"\";return`${o(\"year\")}-${o(\"month\")}-${o(\"day\")}`}catch{return new Date(n).toISOString().slice(0,10)}}}var wo=\"~\",dn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ae=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>ae(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ae(r,e+1)]))};function So(){let t=new Map,e=new Map,n=new Map([[wo,{children:[],listeners:new Map}]]),r=0,o=u=>{let p=e.get(u);return p===void 0&&(p=r+=1,e.set(u,p),t.set(p,{listener:u,count:0})),t.get(p).count+=1,p},s=u=>{let p=t.get(u);p&&(p.count-=1,!(p.count>0)&&(t.delete(u),e.delete(p.listener)))},i=u=>{let p=n.get(u);if(p){n.delete(u);for(let g of p.listeners.values())s(g);for(let g of p.children)i(g)}},l=(u,p,g=0)=>{if(!dn(u)||g>64)return ae(u);let b=typeof u.id==\"string\"?u.id:void 0,N=p&&b!==void 0&&b!==wo;N&&i(b);let R={children:[],listeners:new Map};N&&n.set(b,R);let T={};for(let[w,C]of Object.entries(u))w===\"children\"&&Array.isArray(C)?T[w]=C.map(I=>{let S=l(I,N,g+1);return N&&dn(I)&&typeof I.id==\"string\"&&R.children.push(I.id),S}):w===\"eventListeners\"&&dn(C)?T[w]=Object.fromEntries(Object.entries(C).map(([I,S])=>{if(typeof S!=\"function\"||!N)return[I,void 0];let P=o(S);return R.listeners.set(I,P),[I,{listener:P}]})):T[w]=ae(C,g+1);return T},c=u=>{if(!Array.isArray(u))return ae(u);let[p,g]=u,b=typeof g==\"string\"?n.get(g):void 0;if(p===0){let N=l(u[2],b!==void 0),R=dn(u[2])?u[2].id:void 0;if(b&&typeof R==\"string\"&&n.has(R)){let T=Number(u[3]);b.children.splice(Number.isInteger(T)&&T>=0&&T<=b.children.length?T:b.children.length,0,R)}return[p,ae(g),N,ae(u[3])]}if(p===1){let N=Number(u[2]);return b&&Number.isInteger(N)&&N>=0&&N<b.children.length&&i(b.children.splice(N,1)[0]),ae(u)}if(p===3&&u[4]===3){let N=String(u[2]),R=u[3],T=b&&typeof R==\"function\"?o(R):void 0,w=b?.listeners.get(N);return w!==void 0&&s(w),T===void 0?b?.listeners.delete(N):b.listeners.set(N,T),[p,ae(g),N,T===void 0?void 0:{listener:T},3]}return ae(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var fn=\"graview-view-root\",Ss=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],vs=new Set([\"div\",\"li\",\"article\"]),nr=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),tr=t=>Object.freeze({html:t,toString:()=>t}),rr=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),xo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(xo).join(\"\"):rr(t)?t.html:nr(String(t));function Oo(t){customElements.get(fn)||customElements.define(fn,ft);let e=Event,n=So(),r=new Set,o=new Set,s,i=[],l=new Set;for(let a of[\"closest\",\"matches\",\"dataset\"]){let d=()=>{throw new TypeError(`A view's element has no ${a}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};a in Element.prototype||Object.defineProperty(Element.prototype,a,a===\"dataset\"?{get:d}:{value:d})}let c=document.createElement(fn),u=a=>{let d=m=>{for(let y of Array.from(m.childNodes)){if(y.nodeType!==1)continue;if(X(y)===a)return y;let E=d(y);if(E)return E}};return d(c)},p=a=>{let d=u(a.target);if(!d)return;let m=new e(a.event,{bubbles:!0}),y={};for(let E of Ss)a[E]!==void 0&&(y[E]=a[E]);for(let E of Object.keys(y))Object.defineProperty(m,E,{value:y[E],enumerable:!0});d.dispatchEvent(m);for(let E of o){if(E.type!==a.event)continue;let v;try{v=new Set(Array.from(c.querySelectorAll(E.selector)))}catch{continue}for(let k=d;k&&k!==c;k=k.parentNode)if(v.has(k)){E.listener(Object.freeze({type:a.event,target:d,element:k,...y}));break}}},g=Error,b=new Map,N=0,R=(a,d,m)=>new Promise((y,E)=>{let v=++N;b.set(v,k=>k.ok?y(k):E(new g(k.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:v,op:a,key:d,...a===\"set\"?{value:m}:{}})}),T=a=>(a.catch(()=>{}),a),w=Object.freeze({get(a){return T(R(\"get\",a).then(d=>typeof d.value==\"string\"?d.value:null))},set(a,d){return T(R(\"set\",a,d).then(()=>{}))}}),C=a=>{if(a.type===\"mine-answer\"){let E=b.get(a.id);return b.delete(a.id),E?.(a)}if(a.type===\"dom-event\"&&typeof a.target==\"string\")return p(a);if(a.type===\"notice\")return t.warn(a.text);if(a.type!==\"props\")return;s=a.props,typeof a.partMs==\"number\"&&a.partMs>0&&(mn=a.partMs),typeof a.partMark==\"string\"&&(pn=a.partMark),hn+=1,ht.clear(),Xe=0;let d=t.now();for(let E of r)try{E(a.props)}catch(v){t.threw(v)}let m=t.now()-d,y=a.push;typeof y==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:y,ms:m})))},I;c.connect({mutate(a){I||(I=[],t.microtask(()=>{let d=I??[];I=void 0,t.send({type:\"render\",records:n.encode(d)})})),I.push(...a)},call:()=>{}});let S=a=>a.nodeType===1?a.getAttribute(\"data-key\")??a.getAttribute(\"id\"):null,P=(a,d)=>a.nodeType===d.nodeType&&(a.nodeType!==1||a.localName===d.localName&&a.namespaceURI===d.namespaceURI&&S(a)===S(d));function z(a,d){let m=Array.from(d.childNodes),y=0;for(let E of m){let v=a.childNodes[y]??null;if(v&&P(v,E)){mt(v,E),y+=1;continue}if(S(E)!==null){let K=Array.from(a.childNodes).slice(y+1).find(we=>P(we,E));if(K){a.insertBefore(K,v),mt(K,E),y+=1;continue}}a.insertBefore(E,v),y+=1}for(;a.childNodes.length>y;)a.removeChild(a.lastChild)}function mt(a,d){if(a.nodeType!==1){a.data!==d.data&&(a.data=d.data);return}let m=a,y=d,E=pt(m);for(let v of m.getAttributeNames())y.hasAttribute(v)||(m.removeAttribute(v),E&&Te(m,v,void 0));for(let v of y.getAttributeNames()){let k=y.getAttribute(v);m.getAttribute(v)!==k&&m.setAttribute(v,k),E&&Te(m,v,k)}z(m,y)}let pt=a=>a.localName.includes(\"-\");function ar(a){for(let d of Array.from(a.childNodes)){if(d.nodeType!==1)continue;let m=d;if(pt(m))for(let y of m.getAttributeNames())Te(m,y,m.getAttribute(y)??void 0);ar(m)}}function lr(a,d,m){for(let y of Array.from(a.childNodes)){if(y.nodeType!==1)continue;let E=y,v=E.localName,k=d||v.toLowerCase()===\"svg\",K=k?yo(v):Object.prototype.hasOwnProperty.call(er,v.toLowerCase())?v.toLowerCase():void 0;if(!K){m.add(`<${v}>`);continue}for(let we of E.getAttributeNames())(!Eo(k?\"svg\":\"html\",K,we)||!k&&go[K]?.includes(we.toLowerCase()))&&m.add(`${K} ${we}`);lr(E,k,m)}}function Ao(a){let d=document.createElement(\"div\"),m=Array.isArray(a)?a:[a];for(let E of m)if(E!=null)if(typeof E==\"string\"||rr(E)){let v=document.createElement(\"div\");v.innerHTML=typeof E==\"string\"?E:E.html,d.append(...Array.from(v.childNodes))}else d.append(E);let y=new Set;lr(d,!1,y),i=[...y],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),ar(d),z(c,d),ht.clear()}let mn=1e3/4,pn=\"\",hn=0,gn=new Map,ht=new Map,Xe=0,yn=new Set,_o=a=>{try{return a instanceof Error?`${a.name}: ${a.message}`:String(a)}catch{return\"an error\"}},cr=a=>{if(a==null||a===!1)return\"\";if(typeof a==\"string\")return a;if(rr(a))return a.html;if(Array.isArray(a))return a.map(d=>cr(d)).join(\"\");throw new TypeError(\"a part's draw returns markup: a string, graview.html`\\u2026` or a list of them\")};function Po(a,d,m){if(typeof a!=\"string\"||!bo.test(a))throw new TypeError('graview.part names its part in letters, digits, - and _ (\"vendors\", \"budget-2026\"), at most 64 of them.');if(typeof d!=\"function\")throw new TypeError(`graview.part(\"${a}\", draw) is handed a function that returns the part's markup.`);let y=typeof m?.as==\"string\"&&vs.has(m.as)?m.as:\"div\",E=ht.get(a)??0;ht.set(a,E+1);let v=`${a}#${E}`,k=(Z,gr)=>{let Co=`The part \"${a}\" ${Z===\"threw\"?\"threw\":\"took too long\"}, so a note is drawn in its place and the rest of the view is drawn: ${gr}`;return!yn.has(`${a} ${Z}`)&&yn.size<100&&(yn.add(`${a} ${Z}`),t.warn(Co)),tr(`<${y} data-part=\"${a}\" data-part-failed=\"${Z}\" data-part-why=\"${nr(gr.slice(0,300))}\"${pn?` data-part-mark=\"${nr(pn)}\"`:\"\"}></${y}>`)},K=gn.get(v);if(K!==void 0&&hn<=K.until)return k(\"slow\",K.why);gn.delete(v);let we=Xe;Xe=0;let Mo=t.now(),hr,wn=0;try{hr=cr(d())}catch(Z){return k(\"threw\",_o(Z))}finally{let Z=t.now()-Mo;wn=Z-Xe,Xe=we+Z}if(wn>mn){let Z=`it took ${Math.round(wn).toLocaleString(\"en-US\")} ms, past the ${Math.round(mn).toLocaleString(\"en-US\")} ms a part may take of a push, and is left as a note for the next ${3} pushes.`;return gn.set(v,{why:Z,until:hn+3}),k(\"slow\",Z)}return tr(`<${y} data-part=\"${a}\">${hr}</${y}>`)}let En=[],bn=new Set(to),ur=\"[]\",Nn=!1,dr=()=>{Nn||(Nn=!0,t.microtask(()=>{Nn=!1;let a=[...new Map([...o].filter(m=>bn.has(m.type)).map(m=>[`${m.type} ${m.selector}`,{event:m.type,selector:m.selector}])).entries()].sort(([m],[y])=>m<y?-1:m>y?1:0).map(([,m])=>m),d=JSON.stringify(a);d!==ur&&(ur=d,t.send({type:\"gestures\",bound:a}))}))},fr=\"[[],[]]\",Tn=!1,mr=()=>{Tn||(Tn=!0,t.microtask(()=>{Tn=!1;let a=E=>[...new Set([...o].filter(v=>v.type===E&&typeof v.selector==\"string\").map(v=>v.selector))].sort().slice(0,200),d=a(\"click\"),m=a(\"acted\"),y=JSON.stringify([d,m]);y!==fr&&(fr=y,t.send({type:\"clicks\",selectors:d,...m.length>0?{acted:m}:{}}))}))},pr=Object.freeze({get props(){return s},onProps(a){return r.add(a),s&&a(s),()=>void r.delete(a)},render:Ao,style(a){typeof a!=\"string\"||En.includes(a)||(En.push(a),t.send({type:\"style\",sheets:[...En]}))},on(a,d,m){let y={type:a,selector:d,listener:m};return o.add(y),typeof a==\"string\"&&!l.has(a)&&(l.add(a),t.send({type:\"hears\",events:[a]})),bn.has(a)&&dr(),(a===\"click\"||a===\"acted\")&&mr(),()=>{o.delete(y),bn.has(a)&&dr(),(a===\"click\"||a===\"acted\")&&mr()}},act:(a,d={})=>t.act(a,d),mine:w,navigate(a){if(typeof a==\"string\")return t.navigate(a);let d=ln(a);d&&t.send(d)},part:Po,html(a,...d){return tr(a.reduce((m,y,E)=>m+y+(E<d.length?xo(d[E]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(a,d){let m=To(a,s?.timeZone);return m===void 0?\"\":No(m,pr.today,d)},get refused(){return i},get hardening(){return t.hardening()}});return{view:pr,hear:C,find:a=>{try{let d=c.querySelectorAll(a)[0];return d?X(d):void 0}catch{return}},listened:a=>{let d=new Set;for(let m of o)if(m.type===a)try{for(let y of Array.from(c.querySelectorAll(m.selector))){let E=X(y);E&&d.add(E)}}catch{}return[...d]}}}var ir={removed:[],stuck:[],sealed:!1,worker:!1},or=oo({listen(t){return Me.listen(t),()=>Me.unlisten(t)},fromHost:()=>!0,ready:t=>Me.post(t)},{onMessage:t=>Ro.hear(t)}),Ro=Oo({send:t=>or.send(t),act:(t,e)=>or.guest.act(t,e),navigate:t=>or.guest.navigate(t),microtask:Me.microtask,now:Me.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>ir}),xs=Ro.view;Object.defineProperty(globalThis,\"graview\",{value:xs,enumerable:!0,configurable:!0,writable:!1});var sr=\"WorkerGlobalScope\"in globalThis?uo(globalThis,[\"graview\"]):ir;ir=sr;if(sr.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${sr.stuck.join(\", \")} would not go.`);})();\n";
|
|
6
|
+
export const VIEW_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var Pe=globalThis,Io=Pe.addEventListener,ko=Pe.removeEventListener,Do=Pe.postMessage,Lo=globalThis.queueMicrotask,Sn=globalThis.performance,Go=Sn?Sn.now.bind(Sn):Date.now,Me={listen:t=>Io.call(Pe,\"message\",t),unlisten:t=>ko.call(Pe,\"message\",t),post:t=>Do.call(Pe,t),microtask:t=>Lo.call(globalThis,t),now:()=>Go()};var v=Symbol(\"name\"),me=Symbol(\"prefix\"),pe=Symbol(\"value\"),O=Symbol(\"ns\"),q=Symbol(\"owner\"),D=Symbol(\"owner_document\"),se=Symbol(\"attributes\"),L=Symbol(\"prev\"),h=Symbol(\"next\"),A=Symbol(\"child\"),Y=Symbol(\"parent\"),he=Symbol(\"host\"),Q=Symbol(\"data\"),Se=Symbol(\"listeners\"),xn=Symbol(\"isTrusted\"),Ce=Symbol(\"path\"),Ie=Symbol(\"stop_immediate_propagation\"),ke=Symbol(\"dispatching\"),le=Symbol(\"content\"),G=Symbol(\"hooks\"),gt=Symbol(\"extensions\"),xe=Symbol(\"hooks_dispatch\"),B=Symbol(\"is_connected\"),De=Symbol(\"create_element\"),yr=0,W=1,Le=2,Ge=3,He=8,ve=9,Er=10,ge=11,_=\"http://www.w3.org/1999/xhtml\",J=\"http://www.w3.org/2000/svg\",br=\"http://www.w3.org/XML/1998/namespace\",Ke=\"http://www.w3.org/2000/xmlns/\";function yt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function H(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Nr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function M(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Tr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,wr=/[\\0\\t\\n\\f\\r />=]/u,Ho=/[\\0\\t\\n\\f\\r />]/u;function ce(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Sr(t){Tr.test(t)||On(t)}function vn(t){(t===\"\"||wr.test(t))&&On(t)}function Et(t,e,n){let r=ce(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||Ho.test(i))||(n===\"element\"?!Tr.test(l):l===\"\"||wr.test(l)))&&On(o),i!=null&&r==null)throw M(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==br)throw M(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Ke)throw M(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Ke&&o!==\"xmlns\"&&i!==\"xmlns\")throw M(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function On(t){throw M(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var bt=0,Nt=1,xr=2,Rn=3,Uo=typeof performance>\"u\"?Date.now:performance.now.bind(performance),V=class{static NONE=bt;static CAPTURING_PHASE=Nt;static AT_TARGET=xr;static BUBBLING_PHASE=Rn;timeStamp=Uo();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=bt;[Ce]=[];[Ie]=!1;[ke]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,xn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[xn]}composedPath(){return[...this[Ce]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Ie]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function An(t,e,n){if(t.cancelBubble)return;let o=e[Se]?.get(t.type)?.[n===Nt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?xr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(Bo,0,l)}if(t[Ie])break}}function Bo(t){throw t}var Ze=[],Tt=new WeakMap;function wt(t,e){let n=Tt.get(t);n?n.push(e):Tt.set(t,[e]),Ze[Ze.length-1].push(t)}function F(t){let e=[];Ze.push(e);let n;try{n=t()}catch(r){Ze.pop();try{vr(e)}catch{}throw r}return Ze.pop(),vr(e),n}function vr(t){let e,n=!1;for(let r of t){let o=Tt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Tt.delete(r)}}if(n)throw e}var St=[],Qe=[],_n=!1;function Oe(t){for(let e of t)St.push(e),e[1]&&Qe.push(e[1]);if(!_n){_n=!0;try{let e,n=!1;for(let r=0;r<St.length;r++){let[o,s]=St[r];s&&Qe.splice(Qe.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{St.length=0,Qe.length=0,_n=!1}}}function Je(t){let e=t;for(;e;){if(Qe.includes(e))return!0;e=e[Y]??e[he]}return!1}var et=Symbol(\"listenerRegistrations\"),ye=class{[Se]=void 0;[et]=void 0;[D]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=Pn(o),c=this[et];c||(c=new Map,this[et]=c);let u=c.get(e);u||(u={},c.set(e,u));let p=u[l];if(p||(p=new Map,u[l]=p),p.has(n))return;let g=this,b={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(b.normalizedListener=function(...C){if(b.signal?.aborted){xt(g,b);return}return b.once&&xt(g,b),typeof b.listener==\"object\"?b.listener.handleEvent(...C):b.listener.call(this,...C)});let N=this[Se];N||(N=new Map,this[Se]=N);let R=N.get(e);R||(R={},N.set(e,R));let T=R[l];if(T||(T=new Set,R[l]=T),p.set(n,b),T.add(b),i){let w=()=>{xt(g,b)};b.abortListener=w,i.addEventListener(\"abort\",w,{once:!0})}this[D]?.defaultView[xe].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Vo.call(this,e,n,r)}dispatchEvent(e){if(e[ke])throw M(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[ke]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ce]=n;for(let s=n.length;s--;)if(An(e,n[s],Nt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(An(e,o[s],Rn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[ke]=!1,e.cancelBubble=!1,e[Ie]=!1,e.eventPhase=bt,e.currentTarget=null,e[Ce]=[]}}};function Vo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Pn(!!r),s=this[et]?.get(t)?.[o]?.get(e);s&&xt(this,s)}function Pn(t){return t?\"capture\":\"bubble\"}function xt(t,e){let n=Pn(e.capture),r=t[et],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[Se],l=i?.get(e.type);if(!l)return;let c=l[n];c?.delete(e)&&(c.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[D]?.defaultView[xe].removeEventListener?.(t,e.type,e.listener,e.capture))}var ee=class extends Array{item(e){return this[e]??null}};var nt=0,Or=1,In=2,kn=3,rt=4,Rr=0,Ar=1,Rt=2,At=3,_r=4,Cn=5,Pr=6,Mr=7,vt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Fo(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function $(t){throw M(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function _t(t,e){let n=typeof e==\"string\"?ot(e):[{combinator:rt,matchers:e}],r=null,o=t[A];return o&&n[0].matchers.length&&Dn(o,n,s=>(r=s,!1)),r}function Pt(t,e){let n=typeof e==\"string\"?ot(e):[{combinator:rt,matchers:e}],r=new ee,o=t[A];return o&&n[0].matchers.length&&Dn(o,n,s=>{r.push(s)}),r}function ot(t,e=!1,n=!1){let r={combinator:rt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&$(t);let l=0,c;for(;c=s.exec(i);){c.index!==l&&$(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&$(t),c[1]===\">\"?r.combinator=Or:c[1]===\"+\"?r.combinator=kn:c[1]===\"~\"?r.combinator=In:r.combinator=nt,r={combinator:rt,matchers:[]},o.push(r));let u=c[8]?H(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&$(t);let g,b=c[4]??c[5]??c[7];if(c[2]){vt.test(u)||$(t);let N=c[5],R=N?.[0];if(c[3]==null&&(R==='\"'||R===\"'\")){let T=c[0].lastIndexOf(N);b=i.slice(c.index+T+1),s.lastIndex=i.length}else N!=null&&!vt.test(N)&&$(t);g=_r}else c[6]?(vt.test(u)||$(t),g=c[6]===\"#\"?Rt:At):c[8]?g=c[9]==null?Cn:Pr:c[7]===\"*\"?g=Rr:c[7]&&vt.test(c[7])?g=Ar:$(t);c[9]?([b,s.lastIndex]=Fo(i,s.lastIndex),u!==\"has\"&&u!==\"not\"&&$(t),u===\"has\"&&e&&$(t),ot(b,e||u===\"has\",u===\"has\")):g===Cn&&$(t),r.matchers.push({type:g,name:u,value:b}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&$(t),o}function jo(t,e){let n=ot(e);return n[0]?.matchers.length?tt(t,n):!1}function zo(t,e){let n=ot(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=nt,s={type:Mr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:nt,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===kn||o===In?t[h]:t[A];if(!i)return!1;let l=!1;return Dn(i,n,()=>(l=!0,!1),t),l}function Dn(t,e,n,r){let o=[],s=t;for(;s;){if(j(s)){if(tt(s,e,r)&&n(s)===!1)return!1;let i=s[A];if(i){let l=s[h];l&&o.push(l),s=i;continue}}s=s[h]??o.pop()??null}return!0}function tt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===rt){if(!Ot(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||tt(t,l,n)}let s=r===Or||r===nt?Y:L,i=t[s];if(!i)return!1;if(r===nt||r===In){for(;i;){if(j(i)&&Ot(i,o,n)){let l=e.slice(0,-1);if(l.length===0||tt(i,l,n))return!0}i=i[s]}return!1}else{if(r===kn&&!j(i)){for(;i&&!j(i);)i=i[s];if(!i)return!1}if(!j(i)||!Ot(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||tt(i,l,n)}}function Mn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Ot(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Ot(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Rr:return o===\"*\";case Ar:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Rt:return Mn(t,\"id\")===o;case At:let i=Mn(t,\"class\");return i?yt(i).includes(o):!1;case _r:let l=Mn(t,o);return s==null?l!=null:l===s;case Mr:return t===n;case Cn:$(`:${o}`);case Pr:switch(o){case\"has\":return zo(t,s||\"\");case\"not\":return!jo(t,s||\"\");default:$(`:${o}(${s})`)}}return!1}function qo(t){return t.nodeType===Le}function st(t){return Q in t}function Gn(t){return t.nodeType===Ge}function Yo(t){return t.nodeType===He}function j(t){return t.nodeType===W}function Ln(t){return t.nodeType===ge}function Dr(t){return\"appendChild\"in t}function Mt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let c of at(i)){if(o.has(c)||(o.add(c),e.push(c),l.push(c),!j(c)))continue;let u=c[se];if(u)for(let g of u)o.has(g)||(o.add(g),e.push(g));let p=c[le];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=l}return{nodes:e,treeNodes:s}}function it(t,e){for(let n of t)n[D]=e}function Cr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[D]=e,r}function Ir(t,e){if(Gn(t))return e.createTextNode(t.data);if(Yo(t))return e.createComment(t.data);if(qo(t))return Cr(t,e);if(j(t)){let n=e[De](t[v],t.namespaceURI,t[me],t.localName);if(t[se])for(let r=0;r<t[se].length;r++){let o=t[se].item(r);n.attributes.setNamedItem(Cr(o,e))}return n}else{if(Ln(t))return e.createDocumentFragment();{let n=new t.constructor;return n[D]=e,n}}}function Ct(t,e,n=t.ownerDocument){if(t.nodeType===ve)throw M(\"Cannot clone a document node\",\"NotSupportedError\");let r=Ir(t,n);if(!e||!j(t)&&!Ln(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],c=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,j(i.source)&&i.source.namespaceURI===_&&i.source.localName===\"template\"){let p=i.source[le];p&&(o.has(p)&&kr(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&kr(),o.add(l);let u=Ir(l,n);j(l)||Ln(l)?s.push({source:l,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function kr(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function It(t,e){let n=String(e);return n===\"\"?null:_t(t,[{type:Rt,name:n}])}function kt(t,e){let n=[...new Set(yt(String(e)))];return Pt(t,n.map(r=>({type:At,name:r})))}function Dt(t,e){let n=String(e),r=H(n),o=[];for(let s of Lt(t))j(s)&&(n===\"*\"||(s.namespaceURI===_?s[v]===r:s[v]===n))&&o.push(s);return o}function Lt(t){let e=[],n=[],r=t[A];for(;r;){e.push(r);let o=r[A],s=r[h];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function at(t){let e=Lt(t);return e.unshift(t),e}var te=class extends ye{nodeType=yr;[v]=\"\";[Y]=null;[he]=null;[A]=null;[L]=null;[h]=null;[B]=!1;get[G](){return this[D].defaultView[xe]}get localName(){return this[v]}get nodeName(){return this[v]}get ownerDocument(){return this[D]}get isConnected(){return this[B]}isDefaultNamespace(e){let n=ce(e);return $o(this)===n}get parentNode(){return this[Y]}set parentNode(e){}get parentElement(){let e=this[Y];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[L]}set previousSibling(e){}get nextSibling(){return this[h]}set nextSibling(e){}get previousElementSibling(){let e=this[L];for(;e&&e.nodeType!==1;)e=e[L];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[h];for(;e&&e.nodeType!==1;)e=e[h];return e}set nextElementSibling(e){}get firstChild(){return this[A]}set firstChild(e){}get lastChild(){let e=this[A];for(;e;){let n=e[h];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return st(this)?this.data:null}set nodeValue(e){st(this)&&(this.data=e)}get textContent(){if(st(this))return this.data;let e=\"\";for(let n of Lt(this))Gn(n)&&(e+=n.data);return e}set textContent(e){if(st(this))this.data=e;else if(Dr(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Ct(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function $o(t){let e=t;for(;e;)switch(e.nodeType){case W:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Ke,\"xmlns\");if(r!=null&&r.prefix==null)return ce(r.value);e=n.parentElement;break}case ve:e=e.documentElement;break;case Er:case ge:return null;case Le:e=e.ownerElement;break;default:e=e.parentElement}return null}var ne=Symbol(\"insertNode\"),Bn=Symbol(\"preflightInsertions\"),Gt=Symbol(\"replaceNode\"),Ee=class extends te{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Re(e),r=this.parentNode;if(r)return Hn(o=>{ue(r,n);let s=this[h];for(;s&&n.includes(s);)s=s[h];let i=Un(r,n,o);this.parentNode===r?r[Gt](i,this,o):r[ne](i,s,o)})}before(...e){let n=Re(e),r=this.parentNode;if(r)return Hn(o=>{ue(r,n);let s=this[L];for(;s&&n.includes(s);)s=s[L];let i=Un(r,n,o);r[ne](i,s?s[h]:r.firstChild,o)})}after(...e){let n=Re(e),r=this.parentNode;if(r)return Hn(o=>{ue(r,n);let s=this[h];for(;s&&n.includes(s);)s=s[h];let i=Un(r,n,o);r[ne](i,s,o)})}};function Hn(t){return F(()=>{let e=[];try{t(e)}catch(n){try{Oe(e)}catch{}throw n}Oe(e)})}function Re(t){return t.map(e=>e instanceof te?e:String(e))}function lt(t,e){return e instanceof te?e:t.ownerDocument.createTextNode(String(e))}function ue(t,e){for(let n of e){if(!(n instanceof te))continue;let r=t;for(;r;){if(r===n)throw M(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[Y]??r[he]}}}function Un(t,e,n){let r=[];for(let s of e)r.push(lt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Bn](r);for(let s of r)o[ne](s,null,n);return o}var Ht,Vn=0,Lr=0,Gr=0,Hr=0,Ue=!1,jn=!1,ct=!1,Ut=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=Wo(n),o=Ht??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Vn++:Fn(i,-1),s.set(this,r),Fn(r,1),this.#e.add(e)}disconnect(){let e=Ht;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Vn--,Fn(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Vn===0&&(Ht=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function re(t){let e=Ht;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new ee,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new ee,target:t.target,type:t.type})}function Bt(...t){let e=new ee;return e.push(...t),e}function Wo(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function Fn(t,e){t.attributes&&(Lr+=e),t.characterData&&(Gr+=e),t.childList&&(Hr+=e),Ue=Lr>0,jn=Gr>0,ct=Hr>0}var ie=class extends Ee{childNodes=new ee;children=new ee;appendChild(e){return F(()=>this[ne](e,null))}insertBefore(e,n){return F(()=>this[ne](e,n||null))}append(...e){return F(()=>{let n=Re(e.filter(r=>r!=null));n.length>1&&ue(this,n);for(let r of n)this[ne](lt(this,r),null)})}prepend(...e){return F(()=>{let n=Re(e.filter(o=>o!=null));n.length>1&&ue(this,n);let r=this.firstChild;for(let o of n)this[ne](lt(this,o),r)})}replaceChildren(...e){return F(()=>{let n=Re(e.filter(o=>o!=null));ue(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[ne](lt(this,o),null)})}removeChild(e){return F(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw M(\"The node is not a child of this node\",\"NotFoundError\");let n=this[B]?at(e):void 0,r=e[L],o=e[h],s=Vt(this,e);if(n)for(let i of n)i[B]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Oe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return F(()=>this[Gt](e,n))}[Gt](e,n,r){if(ue(this,[e]),n.parentNode!==this)throw M(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[L],s=n[h],i=this.prepareInsertion(e),l=this[B]?at(n):void 0,c=new Set(i.map(({node:b})=>b)),u=s;for(;u&&c.has(u);)u=u[h];let p=Vt(this,n);if(l){for(let N of l)N[B]=!1;let b=new Set(l);for(let N of i)b.has(N.node)&&(N.shouldDisconnect=!1)}this.commitInsertion(i,u);let g=this[B];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,g),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Pt(this,e)}querySelector(e){return _t(this,e)}[ne](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Bn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ue(this,[e]),n&&n.parentNode!==this)throw M(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[h]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[B];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Oe(e)}prepareInsertion(e){let n=[];if(e.nodeType===ge){let i=e[A];for(;i;)n.push(i),i=i[h]}else n.push(e);let r=this[B],o=this[D],s=[];for(let i of n){let l=i[B],c=l||r,u,p;if(i[D]===o)c&&(u=at(i));else{let g=Mt(i);p=g.nodes,c&&(u=g.treeNodes)}s.push({node:i,nodes:u,adoption:p,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[Y];if(i){let l=s.node[L],c=s.node[h];s.source={parent:i,index:Vt(i,s.node),previousSibling:l,nextSibling:c}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[D];for(let{adoption:s}of e)s&&it(s,r);let o=this[B];for(let{nodes:s}of e)if(s)for(let i of s)i[B]=o}attachChild(e,n){if(n){let s=n[L];e[h]=n,e[L]=s,s?s[h]=e:this[A]=e,n[L]=e}else{e[h]=null;let s=this[A];if(s){let i;for(;i=s[h];)s=i;s[h]=e,e[L]=s}else this[A]=e,e[L]=null}let r=j(e);e[Y]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!j(s);)s=s[h];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[L],nextSibling:e[h]}}queueRemovalMutationRecord(e,n,r,o){ct&&re({type:\"childList\",target:e,removedNodes:Bt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(ct)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),re({type:\"childList\",target:this,addedNodes:Bt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==W||Je(this)?[]:[[()=>this[G].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===W&&!Je(s.parent)&&n.push([()=>s.parent[G].removeChild?.(s.parent,o,s.index)]),this.nodeType===W&&!Je(this)&&n.push([()=>this[G].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){Br(e,n)}};function Ur(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[B]?n.treeNodes:void 0,s=e[L],i=e[h],l=Vt(t,e);if(o)for(let u of o)u[B]=!1;it(n.nodes,r),ct&&re({type:\"childList\",target:t,removedNodes:Bt(e),previousSibling:s,nextSibling:i}),o&&Br(o,\"disconnectedCallback\");let c=[];t.nodeType===W&&!Je(t)&&c.push([()=>t[G].removeChild?.(t,e,l)]),Oe(c)}function Vt(t,e){let n=e[L],r=e[h];n?n[h]=r:t[A]=r,r&&(r[L]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),j(e)&&t.children.splice(t.children.indexOf(e),1),e[Y]=null,e[h]=null,e[L]=null,o}function Br(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&wt(n,()=>r.call(n))}}function ut(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||wt(t,()=>i.call(t,e,n,r,o))}var Ft=class{[A]=null;constructor(e){this[q]=e}getNamedItem(e){let n=String(e),r=this[q][O]===_?H(n):n,o=this[A];for(;o;){if(o.name===r)return o;o=o[h]}return null}getNamedItemNS(e,n){let r=ce(e),o=String(n),s=this[A];for(;s;){if(s.localName===o&&s[O]===r)return s;s=s[h]}return null}item(e){let n=this[A],r=0;for(;n;){if(r++===e)return n;n=n[h]}return null}get length(){let e=0,n=this[A];for(;n;)e++,n=n[h];return e}removeNamedItem(e){let n=String(e),r=this[q][O]===_?H(n):n;return F(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ce(e),o=String(n);return F(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[O]===r))}removeNamedItemImmediately(e){let n=this[q],r=this[A],o=null;for(;r!=null;){if(e(r)){o&&(o[h]=r[h]),this[A]===r&&(this[A]=r[h]);let s=r.value;return r[h]=null,r[q]=null,Ue&&re({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[O],oldValue:s}),n[G].removeAttribute?.(n,r.name,r[O]),ut(n,r.localName,s,null,r[O]),r}o=r,r=r[h]}return null}setNamedItem(e){return F(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[q],r=e[q];if(r!=null&&r!==n)throw M(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[A],i=null;for(;s;){if(s.localName===e.localName&&s[O]===e[O]){if(s===e)return s;i?i[h]=e:this[A]=e,e[h]=s[h],s[h]=null,o=s;break}i=s,s=s[h]}o==null&&(i?i[h]=e:this[A]=e),e[q]=n,e[D]=n[D],o&&(o[q]=null);let l=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return l&&Ue&&re({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[O],oldValue:o?.value??null}),c&&n[G].removeAttribute?.(n,o.name,o[O]),(l||c)&&n[G].setAttribute?.(n,e.name,e.value,e[O]),l&&ut(n,e.localName,o?.value??null,e.value,e[O]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[A];for(;e;)yield e,e=e[h]}};var Ae=class extends te{nodeType=Le;[O]=null;[h]=null;[q]=null;constructor(e,n,r){super(),this[v]=e,this[pe]=n,r&&(this[O]=r)}get nodeName(){return this[v]}set nodeName(e){}get name(){return this[v]}set name(e){}get localName(){if(this[O]==null)return this[v];let e=this[v].indexOf(\":\");return e<0?this[v]:this[v].slice(e+1)}get prefix(){if(this[O]==null)return null;let e=this[v].indexOf(\":\");return e<0?null:this[v].slice(0,e)}get value(){return this[pe]}set value(e){let n=String(e),r=this[q];if(!r){this[pe]=n;return}F(()=>{let o=this[pe];this[pe]=n,Ue&&o!==n&&re({type:\"attributes\",target:r,attributeName:this[v],attributeNamespace:this[O],oldValue:o}),this[G].setAttribute?.(r,this[v],n,this[O]),ut(r,this.localName,o,n,this[O])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[q]}get namespaceURI(){return this[O]}get specified(){return!0}};var Xo={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Ko=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Zo=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,jr=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Qo=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",Jo=/^(?:color|face|size)$/i;function Vr(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return Xo[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function zr(t){return t.namespaceURI===_&&Ko.has(t.localName)}function Fr(t){let e=t.localName;return t[O]===J&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function es(t,e){if(Qo.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(jr))if(Jo.test(n[1]))return!0;return!1}function jt(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Zo)){let l=i[1];if(l){let c=i[2],u=H(l),p=o[o.length-1]?.element??e,g=p[O]===J?J:_;if(u===\"svg\")g=J;else if(g===J){if(Fr(p))g=_;else if(es(u,c)){for(;o.length>0;){let R=o[o.length-1];if(R.element[O]!==J||Fr(R.element))break;o.pop(),s=R.target}g=_}}let b=g===_?u:l,N=n[De](b,g,null,b);for(let R of c.matchAll(jr))N.setAttribute(R[1],Vr(R[3]||R[4]||\"\"));if(s.append(N),zr(N)||g!==_&&i[4])continue;o.push({element:N,target:s}),s=g===_&&u===\"template\"?N.content:N}else if(i[5]){let c=H(i[5]);for(let u=o.length-1;u>=0;u--){let p=o[u],g=H(p.element[v]);if(g===c){s=p.target,o.length=u;break}if(p.element[O]===_&&g===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(Vr(i[7]))}return r}function zt(t){return Yr([{type:\"content\",child:t[A]}])}function qr(t){return Yr([{type:\"opening\",node:t}])}function Yr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case W:{let o=r;e.push(`<${o[v]}`);let s=o[se]?.[A];for(;s;){e.push(` ${s[v]}`);let l=s[pe];l!==\"\"&&(l=String(l).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${l}\"`)),s=s[h]}if(e.push(\">\"),zr(o))break;let i=o.namespaceURI===_&&o.localName===\"template\"?o[le]:o;t.push({type:\"closing\",name:o[v]}),t.push({type:\"content\",child:i?.[A]??null});break}case Ge:{let o=r;e.push(o[Q].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case He:{let o=r;e.push(`<!--${o[Q]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[h]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var U=class extends ie{nodeType=W;[O]=_;[me]=null;get namespaceURI(){return this[O]}get prefix(){return this[me]}get localName(){let e=this[me];return e==null?this[v]:this[v].slice(e.length+1)}get nodeName(){return this[O]===_?Nr(this[v]):this[v]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Ae(\"slot\",n))}get attributes(){let e=this[se];return e||(e=new Ft(this),this[se]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Dt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return kt(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);vn(r);let s=this[O]===_?H(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ae(s,o))}setAttributeNS(e,n,r){let o=ce(e),s=String(n),i=String(r),l=Et(o,s,\"attribute\"),c=this.attributes.getNamedItemNS(l.namespace,l.localName);c?c.value=i:this.attributes.setNamedItemNS(new Ae(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);vn(r);let o=this[O]===_?H(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Ae(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[O]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return qr(this)}get innerHTML(){return zt(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=jt(String(e),this);this.replaceChildren(n)}}};var Be=class t extends U{[O]=J;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var be=class extends Ee{[Q]=\"\";constructor(e){super(),this[Q]=e==null?\"\":String(e)}setData(e){let n=jn,r=n?this[Q]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Q]=o,n&&r!==o&&re({type:\"characterData\",target:this,oldValue:r}),this[G].setText?.(this,o)}get data(){return this[Q]}set data(e){this.setData(e)}};var Ve=class extends be{nodeType=Ge;[v]=\"#text\"};var Fe=class extends be{nodeType=He;[v]=\"#comment\"};var je=class extends ie{nodeType=ge;[v]=\"#document-fragment\";[D]=typeof window<\"u\"?window.document:null;getElementById(e){return It(this,e)}};var ze=class extends U{get content(){let e=this[le];return e||(e=this.ownerDocument.createDocumentFragment(),e[he]=this,this[le]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(jt(String(e),this))}get innerHTML(){let e=this[le];return e?zt(e):\"\"}};var qt=class extends U{};var Yt=class extends U{};var $t=class extends U{};var dt=class extends ie{nodeType=ve;[v]=\"#document\";[B]=!0;constructor(e){super(),this.defaultView=e,this[D]=this,this.documentElement=Xt(new $t,this,\"html\"),this.body=Xt(new qt,this,\"body\"),this.head=Xt(new Yt,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return kt(this,e)}createElement(e){let n=String(e);return Sr(n),zn(this,H(n))}createElementNS(e,n){let r=Et(e,n,\"element\");return zn(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[De](e,n,r,o){return zn(this,e,n,r,o)}createTextNode(e){let n=Wt(new Ve(e),this);return this[G].createText?.(n,n.data),n}createComment(e){return Wt(new Fe(e),this)}createDocumentFragment(){return Wt(new je,this)}createEvent(){return new V(\"\")}getElementById(e){return It(this,e)}getElementsByTagName(e){return Dt(this,e)}importNode(e,n){if(e.nodeType===ve)throw M(\"Cannot import a document node\",\"NotSupportedError\");return Ct(e,n,this)}adoptNode(e){if(e[D]===this)return e;let n=Mt(e);return F(()=>{let r=e.parentNode;return r?Ur(r,e,n,this):it(n.nodes,this),e})}};function Wt(t,e){return Object.defineProperty(t,D,{value:e,writable:!0,enumerable:!1}),t}function zn(t,e,n=_,r=null,o=e){let s;if(n===J)s=new Be;else if(n===_&&o===\"template\")s=new ze;else if(n===_){let i=t.defaultView.customElements.get(o);s=i?new i:new U}else s=new U;return Xt(s,t,e,n,r)}function Xt(t,e,n,r=_,o=null){return Wt(t,e),Object.defineProperties(t,{[v]:{value:n},[O]:{value:r},[me]:{value:o}}),e[G].createElement?.(t,r),t}var Kt=class extends V{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Zt=class extends V{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Qt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Jt=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var en=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var tn=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var nn=class extends U{};var ts=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,ns=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function $r(t){return ts.test(t)&&!ns.has(t)}function Wr(t){return M(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var rn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!$r(e))throw Wr(e);if(this.registry.has(e))throw M(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw M(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!$r(e))return Promise.reject(Wr(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var rs=[\"onerror\",\"onunhandledrejection\"],Kr=Symbol.for(\"@remote-dom/polyfill/global-property\");function Zr(t){return Object.getOwnPropertyDescriptors(t)}function Qr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(ye.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=qn(r.value.bind(t)),e[n]=r);return e}function Jr(t){let e={};for(let n of rs)e[n]={configurable:!0,enumerable:!0,get:qn(()=>t[n]),set:qn(r=>{t[n]=r})};return e}function os(t){return Object.assign(Zr(t),Qr(t),Jr(t))}function qn(t){return Object.defineProperty(t,Kr,{value:!0}),t}function Xr(t,e){for(let n of Reflect.ownKeys(e)){let r=ss(t,n);(r==null||is(r))&&Object.defineProperty(t,n,e[n])}}function ss(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function is(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Kr]===!0)}var _e=class extends ye{[G]={};[gt]=[];[xe]=ls(this);name=\"\";window=this;parent=this;self=this;top=this;document=new dt(this);customElements=new rn;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=Zt;PromiseRejectionEvent=Qt;ToggleEvent=Jt;FocusEvent=en;ClipboardEvent=tn;EventTarget=ye;CustomEvent=Kt;Node=te;ParentNode=ie;ChildNode=Ee;DocumentFragment=je;Document=dt;CharacterData=be;Comment=Fe;Text=Ve;Element=U;HTMLElement=nn;SVGElement=Be;HTMLTemplateElement=ze;MutationObserver=Ut;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)as(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Zr(e),s=Object.assign(Qr(e),Jr(e));delete o.self,Object.defineProperties(globalThis,o),Xr(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Xr(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,os(e))}};function as(t,e){t[gt].push(e(t)??{})}function ls(t){return{createElement:de.bind(null,t,\"createElement\"),setAttribute:de.bind(null,t,\"setAttribute\"),removeAttribute:de.bind(null,t,\"removeAttribute\"),createText:de.bind(null,t,\"createText\"),setText:de.bind(null,t,\"setText\"),insertChild:de.bind(null,t,\"insertChild\"),removeChild:de.bind(null,t,\"removeChild\"),addEventListener:de.bind(null,t,\"addEventListener\"),removeEventListener:de.bind(null,t,\"removeEventListener\")}}function de(t,e,...n){for(let s of t[gt])s[e]?.apply(s,n);let r=t[G];r[e]?.apply(r,n)}var on=new _e;var Yn=\"~\";var Ne=new WeakMap;function qe(t){return Ne.get(t)}var Kn=new WeakMap,us=0;function X(t){let e=Kn.get(t);return e==null&&(e=String(us++),sn(t,e)),e}function sn(t,e){Kn.set(t,e)}var Wn=new WeakMap;function ds(t){return Wn.get(t)}var Xn=new WeakMap;function fs(t){let e=Xn.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var ms=new WeakMap;function ps(t){return ms.get(t)}function Zn(t,e,n){let r=Wn.get(t);if(r==null&&(r={},Wn.set(t,r)),r[e]===n)return;r[e]=n;let o=Ne.get(t);o?.mutate([[3,X(t),e,n,1]])}function Te(t,e,n){let r=Xn.get(t);if(r==null&&(r={},Xn.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ne.get(t);o?.mutate([[3,X(t),e,n,2]])}function Ye(t,e){if(Ne.get(t)!==e&&(Ne.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Ye(t.childNodes[r],e)}function an(t){if(Ne.get(t)!=null&&(Ne.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)an(t.childNodes[n])}function $e(t){let{nodeType:e}=t;switch(e){case 1:return{id:X(t),type:e,element:t.localName,properties:$n(ds(t)),attributes:$n(fs(t)),eventListeners:$n(ps(t)),children:Array.from(t.childNodes).map($e)};case 3:case 8:return{id:X(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function $n(t){return t?{...t}:void 0}function Qn(t,e,...n){let r=Kn.get(t),o=Ne.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var We=on[G];We.insertChild=(t,e,n)=>{let r=qe(t);r!=null&&(Ye(e,r),r.mutate([[0,X(t),$e(e),n]]))};We.removeChild=(t,e,n)=>{let r=qe(t);r!=null&&(an(e),r.mutate([[1,X(t),n]]))};We.setText=(t,e)=>{let n=qe(t);n?.mutate([[2,X(t),e]])};We.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Te(t,e,n)};We.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Te(t,e)};_e.setGlobal(on);function ln(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var to=[\"wheel\",\"drag\",\"pinch\"];function no(t){let e=t;return typeof t==\"object\"&&t!==null&&e.graview===\"host-hello\"&&typeof e.nonce==\"string\"}function oo(t,e={}){let n,r=\"\",o,s=0,i=new Set,l=new Map,c=[],u=T=>{n?n.postMessage({...T,nonce:r}):c.push(T)},p=T=>{let w=T.data;if(!(!w||typeof w!=\"object\")){if(w.type===\"props\"){o=w.props;for(let C of i)C(w.props)}else w.type===\"answer\"?(l.get(w.id)?.(w),l.delete(w.id)):w.type===\"event\"&&typeof w.listener==\"number\"?e.onEvent?.(w):w.type===\"heartbeat\"&&typeof w.beat==\"number\"&&u({type:\"heartbeat\",beat:w.beat});e.onMessage?.(w)}},g=()=>{},b=T=>{if(n||!t.fromHost(T)||!no(T.data)||T.data.protocol!==1)return;let w=T.ports[0];if(w){n=w,r=T.data.nonce,n.onmessage=p,n.start?.(),g();for(let C of c.splice(0))u(C)}};g=t.listen(b),t.ready({graview:\"guest-ready\",protocol:1});let N,R={get props(){return o},subscribe(T){return i.add(T),()=>i.delete(T)},act(T,w={}){let C=s+=1;return new Promise(I=>{l.set(C,I),u({type:\"act\",id:C,name:T,args:w})})},navigate(T){let w=ln(T);w&&u(w)},size(T){u({type:\"size\",height:T})},autoSize(T){let w=T??globalThis.document?.documentElement,C=globalThis.ResizeObserver;if(!w||!C||typeof w.getBoundingClientRect!=\"function\")return()=>{};N?.disconnect();let I=new C(()=>R.size(Math.ceil(w.getBoundingClientRect().height)));return I.observe(w),N=I,()=>I.disconnect()},close(){N?.disconnect(),g(),n?.close(),i.clear()}};return{guest:R,send:u}}var io=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],ao=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],lo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],co=[\"TEMPORARY\",\"PERSISTENT\"],Yl=Object.freeze([...io,...ao,...lo,...co]),$l=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),so=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function uo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...io,...ao,...lo,...e,\"constructor\",Symbol.toStringTag]),i=(S,P)=>{let z=Reflect.getOwnPropertyDescriptor(S,P);return z===void 0||!(\"value\"in z)||z.writable||z.configurable?!1:n.primitivesStay&&typeof P==\"symbol\"&&(typeof z.value!=\"object\"||z.value===null)&&typeof z.value!=\"function\"?!0:co.includes(P)&&typeof z.value==\"number\"},l=t,c=l.setTimeout,u=l.setInterval,p=l.crypto,g=(S,P)=>function(z,mt,...pt){if(typeof z!=\"function\")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return S.call(t,z,mt,...pt)},b=p?Object.freeze({getRandomValues:S=>p.getRandomValues(S)}):void 0,N=l.document?.defaultView;if(N&&N!==l)for(let S of Reflect.ownKeys(N))typeof S==\"symbol\"||s.has(S)||Reflect.deleteProperty(N,S)||o.push(`window.${S}`);let R=[];for(let S=t;S&&S!==Object.prototype;S=Object.getPrototypeOf(S))R.push(S);for(let S of R)for(let P of Reflect.ownKeys(S))s.has(P)||(Reflect.deleteProperty(S,P)?r.push(so(P)):i(S,P)||o.push(so(P)));let T=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},w=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let S of w){let P=T();Object.defineProperty(P,\"prototype\",{value:S,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(S,\"constructor\",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),S===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:P,writable:!0,enumerable:!1,configurable:!0})}let C=(S,P)=>{Reflect.defineProperty(t,S,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(S)};C(\"setTimeout\",g(c,\"setTimeout\")),C(\"setInterval\",g(u,\"setInterval\")),b&&C(\"crypto\",b);for(let S of R.slice(1))Object.freeze(S);for(let S of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,S);Reflect.defineProperty(t,S,\"value\"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let I;try{I=Reflect.preventExtensions(t)}catch{I=!1}return{removed:r,stuck:o,sealed:I}}var ft=class extends HTMLElement{constructor(){super(),sn(this,Yn)}connect(e){if(qe(this)===e||(Ye(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Yn,$e(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Zn(this,e,n)}callRemoteMethod(e,...n){return Qn(this,e,...n)}};var f={},Jn={empty:!0},hs={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},er={div:f,section:f,article:f,aside:f,header:f,footer:f,nav:f,hgroup:f,search:f,address:f,figure:f,figcaption:f,blockquote:f,p:f,pre:f,hr:Jn,br:Jn,wbr:Jn,h1:f,h2:f,h3:f,h4:f,h5:f,h6:f,span:f,strong:f,em:f,b:f,i:f,u:f,s:f,small:f,mark:f,abbr:f,cite:f,q:f,code:f,kbd:f,samp:f,var:f,sub:f,sup:f,dfn:f,bdi:f,bdo:f,ruby:f,rt:f,rp:f,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:f,menu:f,dl:f,dt:f,dd:f,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:f,caption:f,thead:f,tbody:f,tfoot:f,tr:f,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:f,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:f,output:f,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]},loading:{oneOf:[\"lazy\",\"eager\"]},fetchpriority:{oneOf:[\"high\",\"low\",\"auto\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\"}}},gs=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],ys={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(gs.map(t=>[t,\"css\"]))},fe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},cn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},fo={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},mo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},oe={...fe,in:\"text\",result:\"text\"},po={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},ho={svg:{attributes:{...fe,...cn}},g:f,defs:f,symbol:{attributes:{...fe,...cn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...fe,href:\"fragment\"}},title:f,desc:f,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...fe,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...po}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...po}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...fe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...fe,...cn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...cn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:f,filter:{attributes:{...fe,filterUnits:fo,primitiveUnits:fo}},feBlend:{attributes:{...oe,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...oe,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:oe},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...oe,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...oe,in2:\"text\",scale:\"number\",xChannelSelector:mo,yChannelSelector:mo}},feDropShadow:{attributes:{...oe,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:oe},feGaussianBlur:{attributes:{...oe,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:oe},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...oe,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...oe,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...fe,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var go={section:[\"aria-label\",\"title\"]};function Es(t){return/^aria-[a-z]+$/.test(t)}function bs(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Ns=new Map(Object.keys(ho).map(t=>[t.toLowerCase(),t]));function yo(t){return Ns.get(t.toLowerCase())}function Eo(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[er[e]?.attributes,hs]:[ho[e]?.attributes,ys],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,c]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:c}}if(Es(r)||bs(r))return{name:r,kind:\"text\"}}var bo=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var un=/^\\d{4}-\\d{2}-\\d{2}$/;function Ts(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!un.test(t)||!un.test(e))return;let n=Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5);return Number.isFinite(n)?n:void 0}function No(t,e,n={}){let r=Ts(t,e);if(r===void 0)return\"\";if(r===0)return\"today\";if(r===1)return\"tomorrow\";if(r<0&&n.due===!0)return\"overdue\";if(r===-1)return\"yesterday\";let o=Math.abs(r),[s,i]=o<14?[o,\"day\"]:o<60?[Math.round(o/7),\"week\"]:o<730?[Math.round(o/30.44),\"month\"]:[Math.round(o/365.25),\"year\"],l=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${l}`:`${l} ago`}function To(t,e){if(typeof t!=\"string\")return;if(un.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return un.test(t.slice(0,10))?t.slice(0,10):void 0;try{let r=new Intl.DateTimeFormat(\"en-CA\",{timeZone:e||\"UTC\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(n),o=s=>r.find(i=>i.type===s)?.value??\"\";return`${o(\"year\")}-${o(\"month\")}-${o(\"day\")}`}catch{return new Date(n).toISOString().slice(0,10)}}}var wo=\"~\",dn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ae=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>ae(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ae(r,e+1)]))};function So(){let t=new Map,e=new Map,n=new Map([[wo,{children:[],listeners:new Map}]]),r=0,o=u=>{let p=e.get(u);return p===void 0&&(p=r+=1,e.set(u,p),t.set(p,{listener:u,count:0})),t.get(p).count+=1,p},s=u=>{let p=t.get(u);p&&(p.count-=1,!(p.count>0)&&(t.delete(u),e.delete(p.listener)))},i=u=>{let p=n.get(u);if(p){n.delete(u);for(let g of p.listeners.values())s(g);for(let g of p.children)i(g)}},l=(u,p,g=0)=>{if(!dn(u)||g>64)return ae(u);let b=typeof u.id==\"string\"?u.id:void 0,N=p&&b!==void 0&&b!==wo;N&&i(b);let R={children:[],listeners:new Map};N&&n.set(b,R);let T={};for(let[w,C]of Object.entries(u))w===\"children\"&&Array.isArray(C)?T[w]=C.map(I=>{let S=l(I,N,g+1);return N&&dn(I)&&typeof I.id==\"string\"&&R.children.push(I.id),S}):w===\"eventListeners\"&&dn(C)?T[w]=Object.fromEntries(Object.entries(C).map(([I,S])=>{if(typeof S!=\"function\"||!N)return[I,void 0];let P=o(S);return R.listeners.set(I,P),[I,{listener:P}]})):T[w]=ae(C,g+1);return T},c=u=>{if(!Array.isArray(u))return ae(u);let[p,g]=u,b=typeof g==\"string\"?n.get(g):void 0;if(p===0){let N=l(u[2],b!==void 0),R=dn(u[2])?u[2].id:void 0;if(b&&typeof R==\"string\"&&n.has(R)){let T=Number(u[3]);b.children.splice(Number.isInteger(T)&&T>=0&&T<=b.children.length?T:b.children.length,0,R)}return[p,ae(g),N,ae(u[3])]}if(p===1){let N=Number(u[2]);return b&&Number.isInteger(N)&&N>=0&&N<b.children.length&&i(b.children.splice(N,1)[0]),ae(u)}if(p===3&&u[4]===3){let N=String(u[2]),R=u[3],T=b&&typeof R==\"function\"?o(R):void 0,w=b?.listeners.get(N);return w!==void 0&&s(w),T===void 0?b?.listeners.delete(N):b.listeners.set(N,T),[p,ae(g),N,T===void 0?void 0:{listener:T},3]}return ae(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var fn=\"graview-view-root\",Ss=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],xs=new Set([\"div\",\"li\",\"article\"]),nr=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),tr=t=>Object.freeze({html:t,toString:()=>t}),rr=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),vo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(vo).join(\"\"):rr(t)?t.html:nr(String(t));function Oo(t){customElements.get(fn)||customElements.define(fn,ft);let e=Event,n=So(),r=new Set,o=new Set,s,i=[],l=new Set;for(let a of[\"closest\",\"matches\",\"dataset\"]){let d=()=>{throw new TypeError(`A view's element has no ${a}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};a in Element.prototype||Object.defineProperty(Element.prototype,a,a===\"dataset\"?{get:d}:{value:d})}let c=document.createElement(fn),u=a=>{let d=m=>{for(let y of Array.from(m.childNodes)){if(y.nodeType!==1)continue;if(X(y)===a)return y;let E=d(y);if(E)return E}};return d(c)},p=a=>{let d=u(a.target);if(!d)return;let m=new e(a.event,{bubbles:!0}),y={};for(let E of Ss)a[E]!==void 0&&(y[E]=a[E]);for(let E of Object.keys(y))Object.defineProperty(m,E,{value:y[E],enumerable:!0});d.dispatchEvent(m);for(let E of o){if(E.type!==a.event)continue;let x;try{x=new Set(Array.from(c.querySelectorAll(E.selector)))}catch{continue}for(let k=d;k&&k!==c;k=k.parentNode)if(x.has(k)){E.listener(Object.freeze({type:a.event,target:d,element:k,...y}));break}}},g=Error,b=new Map,N=0,R=(a,d,m)=>new Promise((y,E)=>{let x=++N;b.set(x,k=>k.ok?y(k):E(new g(k.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:x,op:a,key:d,...a===\"set\"?{value:m}:{}})}),T=a=>(a.catch(()=>{}),a),w=Object.freeze({get(a){return T(R(\"get\",a).then(d=>typeof d.value==\"string\"?d.value:null))},set(a,d){return T(R(\"set\",a,d).then(()=>{}))}}),C=a=>{if(a.type===\"mine-answer\"){let E=b.get(a.id);return b.delete(a.id),E?.(a)}if(a.type===\"dom-event\"&&typeof a.target==\"string\")return p(a);if(a.type===\"notice\")return t.warn(a.text);if(a.type!==\"props\")return;s=a.props,typeof a.partMs==\"number\"&&a.partMs>0&&(mn=a.partMs),typeof a.partMark==\"string\"&&(pn=a.partMark),hn+=1,ht.clear(),Xe=0;let d=t.now();for(let E of r)try{E(a.props)}catch(x){t.threw(x)}let m=t.now()-d,y=a.push;typeof y==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:y,ms:m})))},I;c.connect({mutate(a){I||(I=[],t.microtask(()=>{let d=I??[];I=void 0,t.send({type:\"render\",records:n.encode(d)})})),I.push(...a)},call:()=>{}});let S=a=>a.nodeType===1?a.getAttribute(\"data-key\")??a.getAttribute(\"id\"):null,P=(a,d)=>a.nodeType===d.nodeType&&(a.nodeType!==1||a.localName===d.localName&&a.namespaceURI===d.namespaceURI&&S(a)===S(d));function z(a,d){let m=Array.from(d.childNodes),y=0;for(let E of m){let x=a.childNodes[y]??null;if(x&&P(x,E)){mt(x,E),y+=1;continue}if(S(E)!==null){let K=Array.from(a.childNodes).slice(y+1).find(we=>P(we,E));if(K){a.insertBefore(K,x),mt(K,E),y+=1;continue}}a.insertBefore(E,x),y+=1}for(;a.childNodes.length>y;)a.removeChild(a.lastChild)}function mt(a,d){if(a.nodeType!==1){a.data!==d.data&&(a.data=d.data);return}let m=a,y=d,E=pt(m);for(let x of m.getAttributeNames())y.hasAttribute(x)||(m.removeAttribute(x),E&&Te(m,x,void 0));for(let x of y.getAttributeNames()){let k=y.getAttribute(x);m.getAttribute(x)!==k&&m.setAttribute(x,k),E&&Te(m,x,k)}z(m,y)}let pt=a=>a.localName.includes(\"-\");function ar(a){for(let d of Array.from(a.childNodes)){if(d.nodeType!==1)continue;let m=d;if(pt(m))for(let y of m.getAttributeNames())Te(m,y,m.getAttribute(y)??void 0);ar(m)}}function lr(a,d,m){for(let y of Array.from(a.childNodes)){if(y.nodeType!==1)continue;let E=y,x=E.localName,k=d||x.toLowerCase()===\"svg\",K=k?yo(x):Object.prototype.hasOwnProperty.call(er,x.toLowerCase())?x.toLowerCase():void 0;if(!K){m.add(`<${x}>`);continue}for(let we of E.getAttributeNames())(!Eo(k?\"svg\":\"html\",K,we)||!k&&go[K]?.includes(we.toLowerCase()))&&m.add(`${K} ${we}`);lr(E,k,m)}}function Ao(a){let d=document.createElement(\"div\"),m=Array.isArray(a)?a:[a];for(let E of m)if(E!=null)if(typeof E==\"string\"||rr(E)){let x=document.createElement(\"div\");x.innerHTML=typeof E==\"string\"?E:E.html,d.append(...Array.from(x.childNodes))}else d.append(E);let y=new Set;lr(d,!1,y),i=[...y],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),ar(d),z(c,d),ht.clear()}let mn=1e3/4,pn=\"\",hn=0,gn=new Map,ht=new Map,Xe=0,yn=new Set,_o=a=>{try{return a instanceof Error?`${a.name}: ${a.message}`:String(a)}catch{return\"an error\"}},cr=a=>{if(a==null||a===!1)return\"\";if(typeof a==\"string\")return a;if(rr(a))return a.html;if(Array.isArray(a))return a.map(d=>cr(d)).join(\"\");throw new TypeError(\"a part's draw returns markup: a string, graview.html`\\u2026` or a list of them\")};function Po(a,d,m){if(typeof a!=\"string\"||!bo.test(a))throw new TypeError('graview.part names its part in letters, digits, - and _ (\"vendors\", \"budget-2026\"), at most 64 of them.');if(typeof d!=\"function\")throw new TypeError(`graview.part(\"${a}\", draw) is handed a function that returns the part's markup.`);let y=typeof m?.as==\"string\"&&xs.has(m.as)?m.as:\"div\",E=ht.get(a)??0;ht.set(a,E+1);let x=`${a}#${E}`,k=(Z,gr)=>{let Co=`The part \"${a}\" ${Z===\"threw\"?\"threw\":\"took too long\"}, so a note is drawn in its place and the rest of the view is drawn: ${gr}`;return!yn.has(`${a} ${Z}`)&&yn.size<100&&(yn.add(`${a} ${Z}`),t.warn(Co)),tr(`<${y} data-part=\"${a}\" data-part-failed=\"${Z}\" data-part-why=\"${nr(gr.slice(0,300))}\"${pn?` data-part-mark=\"${nr(pn)}\"`:\"\"}></${y}>`)},K=gn.get(x);if(K!==void 0&&hn<=K.until)return k(\"slow\",K.why);gn.delete(x);let we=Xe;Xe=0;let Mo=t.now(),hr,wn=0;try{hr=cr(d())}catch(Z){return k(\"threw\",_o(Z))}finally{let Z=t.now()-Mo;wn=Z-Xe,Xe=we+Z}if(wn>mn){let Z=`it took ${Math.round(wn).toLocaleString(\"en-US\")} ms, past the ${Math.round(mn).toLocaleString(\"en-US\")} ms a part may take of a push, and is left as a note for the next ${3} pushes.`;return gn.set(x,{why:Z,until:hn+3}),k(\"slow\",Z)}return tr(`<${y} data-part=\"${a}\">${hr}</${y}>`)}let En=[],bn=new Set(to),ur=\"[]\",Nn=!1,dr=()=>{Nn||(Nn=!0,t.microtask(()=>{Nn=!1;let a=[...new Map([...o].filter(m=>bn.has(m.type)).map(m=>[`${m.type} ${m.selector}`,{event:m.type,selector:m.selector}])).entries()].sort(([m],[y])=>m<y?-1:m>y?1:0).map(([,m])=>m),d=JSON.stringify(a);d!==ur&&(ur=d,t.send({type:\"gestures\",bound:a}))}))},fr=\"[[],[]]\",Tn=!1,mr=()=>{Tn||(Tn=!0,t.microtask(()=>{Tn=!1;let a=E=>[...new Set([...o].filter(x=>x.type===E&&typeof x.selector==\"string\").map(x=>x.selector))].sort().slice(0,200),d=a(\"click\"),m=a(\"acted\"),y=JSON.stringify([d,m]);y!==fr&&(fr=y,t.send({type:\"clicks\",selectors:d,...m.length>0?{acted:m}:{}}))}))},pr=Object.freeze({get props(){return s},onProps(a){return r.add(a),s&&a(s),()=>void r.delete(a)},render:Ao,style(a){typeof a!=\"string\"||En.includes(a)||(En.push(a),t.send({type:\"style\",sheets:[...En]}))},on(a,d,m){let y={type:a,selector:d,listener:m};return o.add(y),typeof a==\"string\"&&!l.has(a)&&(l.add(a),t.send({type:\"hears\",events:[a]})),bn.has(a)&&dr(),(a===\"click\"||a===\"acted\")&&mr(),()=>{o.delete(y),bn.has(a)&&dr(),(a===\"click\"||a===\"acted\")&&mr()}},act:(a,d={})=>t.act(a,d),mine:w,navigate(a){if(typeof a==\"string\")return t.navigate(a);let d=ln(a);d&&t.send(d)},part:Po,html(a,...d){return tr(a.reduce((m,y,E)=>m+y+(E<d.length?vo(d[E]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(a,d){let m=To(a,s?.timeZone);return m===void 0?\"\":No(m,pr.today,d)},get refused(){return i},get hardening(){return t.hardening()}});return{view:pr,hear:C,find:a=>{try{let d=c.querySelectorAll(a)[0];return d?X(d):void 0}catch{return}},listened:a=>{let d=new Set;for(let m of o)if(m.type===a)try{for(let y of Array.from(c.querySelectorAll(m.selector))){let E=X(y);E&&d.add(E)}}catch{}return[...d]}}}var ir={removed:[],stuck:[],sealed:!1,worker:!1},or=oo({listen(t){return Me.listen(t),()=>Me.unlisten(t)},fromHost:()=>!0,ready:t=>Me.post(t)},{onMessage:t=>Ro.hear(t)}),Ro=Oo({send:t=>or.send(t),act:(t,e)=>or.guest.act(t,e),navigate:t=>or.guest.navigate(t),microtask:Me.microtask,now:Me.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>ir}),vs=Ro.view;Object.defineProperty(globalThis,\"graview\",{value:vs,enumerable:!0,configurable:!0,writable:!1});var sr=\"WorkerGlobalScope\"in globalThis?uo(globalThis,[\"graview\"]):ir;ir=sr;if(sr.stuck.length>0)throw new Error(`The view's worker could not be hardened: ${sr.stuck.join(\", \")} would not go.`);})();\n";
|
|
7
7
|
//# sourceMappingURL=view-runtime.generated.js.map
|
package/dist/host/view.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/host/view.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,KAAK,SAAS,EAAkB,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjL,OAAO,KAAK,EAAiB,UAAU,EAAc,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/host/view.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,KAAK,SAAS,EAAkB,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjL,OAAO,KAAK,EAAiB,UAAU,EAAc,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGxF,OAAO,EAAkG,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxJ,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAuD,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ3I,OAAO,EAAyC,KAAK,OAAO,EAAoB,MAAM,YAAY,CAAC;AAEnG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAOpD,OAAO,EAAmB,SAAS,EAA8B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAErG,OAAO,EAAU,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEhF,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA+BnE,MAAM,MAAM,iBAAiB;AAC3B,2GAA2G;AACzG,UAAU;AACZ,sEAAsE;GACpE,QAAQ;AACV;;;;GAIG;GACD,OAAO;AACT,uDAAuD;GACrD,OAAO;AACT,8FAA8F;GAC5F,QAAQ;AACV,oCAAoC;GAClC,OAAO;AACT,kEAAkE;GAChE,OAAO;AACT;;;;GAIG;GACD,MAAM,CAAC;AAEX,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,wGAAwG;IACxG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAwBD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,SAAS;IACzD,oHAAoH;IACpH,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,iGAAiG;IACjG,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,cAAc,CAAC;IACtC;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC;IACtD,2KAA2K;IAC3K,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,GAAG,SAAS,CAAC;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,SAAS,UAAU,EAAE,CAAC;IAC9C,6HAA6H;IAC7H,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,gBAAgB,GAAG,SAAS,CAAC;IAC1D;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,UAAU,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,UAAU,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IACnC,wFAAwF;IACxF,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,CAAC;IACvG,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACtD;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACrD;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IAC1D;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IACzD;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC;IACzD,oGAAoG;IACpG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,SAAS,GAAG,SAAS,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,WAAW,GAAG,SAAS,CAAC;IACrD,qIAAqI;IACrI,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAChE;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,UAAU;IACzB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,8DAA8D;IAC9D,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,8HAA8H;IAC9H,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,+HAA+H;IAC/H,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,UAAU,CAq+BzH"}
|
package/dist/host/view.js
CHANGED
|
@@ -7,6 +7,7 @@ import { createMine, keptForTheVisit, visitOf } from "./mine.js";
|
|
|
7
7
|
import { storedFilesOf } from "./marks.js";
|
|
8
8
|
import { retryingImport } from "@graview/core/retry";
|
|
9
9
|
import { PART_SHARE } from "../part.js";
|
|
10
|
+
import { createViewRecords } from "./view-records.js";
|
|
10
11
|
import { checkManifest, edgesReadWithoutTheirKindsSaid, readsComputed, workerViewProps } from "./manifest.js";
|
|
11
12
|
import { createGuestHost, createGuestLimiter } from "./session.js";
|
|
12
13
|
import { startWorker } from "./worker-start.js";
|
|
@@ -20,6 +21,7 @@ import { createLinks, listsOf, placeVocabulary } from "./links.js";
|
|
|
20
21
|
import { addressAt, arriveAt } from "./arrive-at.js";
|
|
21
22
|
import { createGuestLogo, readTheme, themeWithBrand, watchTheme } from "./theme.js";
|
|
22
23
|
import { codeOf } from "./code-of.js";
|
|
24
|
+
import { followInPanel } from "./in-panel.js";
|
|
23
25
|
/**
|
|
24
26
|
* Why a worker view is not shown (FR-94). Past any limit the host stops
|
|
25
27
|
* the worker, draws the plain face of what the view was shown in its place
|
|
@@ -137,6 +139,28 @@ export function mountWorkerView(element, options) {
|
|
|
137
139
|
let started;
|
|
138
140
|
let drawing;
|
|
139
141
|
let failed = false;
|
|
142
|
+
/*
|
|
143
|
+
* WHERE ITS RECORDS ARE (Graview HQ feature:f-one-face-lines-from-frame-views,
|
|
144
|
+
* view-records.ts): each element it drew marked with `data-record`, of a
|
|
145
|
+
* record it was handed as its seat sees it. A page that draws lines to
|
|
146
|
+
* records (the one face) reads it off the region (`RECORD_BOXES`), since
|
|
147
|
+
* what the view drew is in a shadow root the page's own reading does not
|
|
148
|
+
* reach. Nothing of it goes to the view.
|
|
149
|
+
*/
|
|
150
|
+
let seenFor;
|
|
151
|
+
const seenNow = new Map();
|
|
152
|
+
const seesHere = (id) => {
|
|
153
|
+
if (seenFor !== lastProps) {
|
|
154
|
+
seenNow.clear();
|
|
155
|
+
seenFor = lastProps;
|
|
156
|
+
}
|
|
157
|
+
let one = seenNow.get(id);
|
|
158
|
+
if (one === undefined)
|
|
159
|
+
seenNow.set(id, (one = seesNow(id)));
|
|
160
|
+
return one;
|
|
161
|
+
};
|
|
162
|
+
const records = createViewRecords(region, shadow, (id) => !failed && shown.has(id) && seesHere(id));
|
|
163
|
+
const recordsMoved = () => records.moved();
|
|
140
164
|
let counted = { applied: 0, refused: 0, dropped: 0 };
|
|
141
165
|
/* What came before the drawing's module did: drawn, in order, once it has. */
|
|
142
166
|
const waiting = [];
|
|
@@ -160,6 +184,8 @@ export function mountWorkerView(element, options) {
|
|
|
160
184
|
*/
|
|
161
185
|
let contentHeight;
|
|
162
186
|
let heights;
|
|
187
|
+
/* Whether the page it is drawn on is the one face's panel, carried onto its root (in-panel.ts). */
|
|
188
|
+
let unfollowPanel = () => { };
|
|
163
189
|
const watchHeight = () => {
|
|
164
190
|
const root = shadow.querySelector("[data-graview-view-root]");
|
|
165
191
|
const Observer = window.ResizeObserver;
|
|
@@ -215,12 +241,14 @@ export function mountWorkerView(element, options) {
|
|
|
215
241
|
failed = true;
|
|
216
242
|
stop();
|
|
217
243
|
unwatchHeight();
|
|
244
|
+
unfollowPanel();
|
|
218
245
|
drawing?.dispose();
|
|
219
246
|
const said = why(reason, limits, detail);
|
|
220
247
|
region.removeAttribute("data-worker-view-drawn");
|
|
221
248
|
region.setAttribute("data-worker-view-failed", reason);
|
|
222
249
|
if (options.fallback !== false)
|
|
223
250
|
(options.fallback ?? plainFace)(region, reason, said);
|
|
251
|
+
recordsMoved();
|
|
224
252
|
options.onFailure?.(reason, said);
|
|
225
253
|
};
|
|
226
254
|
/**
|
|
@@ -763,6 +791,7 @@ export function mountWorkerView(element, options) {
|
|
|
763
791
|
/* A part that threw or took too long (`graview.part`): the host's note in its place, and why said (parts.ts). */
|
|
764
792
|
const parts = createPartFallbacks(shadow, { view: `"${manifest.title ?? manifest.name}"`, mark: partMark, ...(options.onProblem ? { onProblem: options.onProblem } : {}) });
|
|
765
793
|
refill = () => {
|
|
794
|
+
recordsMoved();
|
|
766
795
|
parts.refresh();
|
|
767
796
|
/* A card bound to a record is a link once it is drawn whole: whether it holds a field is known only then (pressable.ts). */
|
|
768
797
|
links.refresh(shadow);
|
|
@@ -884,6 +913,8 @@ export function mountWorkerView(element, options) {
|
|
|
884
913
|
for (const one of waiting.splice(0))
|
|
885
914
|
draw(one);
|
|
886
915
|
watchHeight();
|
|
916
|
+
unfollowPanel();
|
|
917
|
+
unfollowPanel = followInPanel(region, () => shadow.querySelector("[data-graview-view-root]"));
|
|
887
918
|
mark();
|
|
888
919
|
},
|
|
889
920
|
// The drawing did not arrive (the network away as it was drawn): the plain face says so, and it is asked for again as the view is drawn again (FR-139).
|
|
@@ -1093,7 +1124,9 @@ export function mountWorkerView(element, options) {
|
|
|
1093
1124
|
failed = true;
|
|
1094
1125
|
stop();
|
|
1095
1126
|
heights?.disconnect();
|
|
1127
|
+
unfollowPanel();
|
|
1096
1128
|
drawing?.dispose();
|
|
1129
|
+
records.dispose();
|
|
1097
1130
|
region.remove();
|
|
1098
1131
|
author?.remove();
|
|
1099
1132
|
},
|