@graview/guest 0.1.72 → 0.1.73
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/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +40 -1
- package/dist/cli.js.map +1 -1
- package/dist/client.generated.js +2 -2
- package/dist/headless/draw.d.ts +5 -0
- package/dist/headless/draw.d.ts.map +1 -1
- package/dist/headless/draw.js +4 -2
- package/dist/headless/draw.js.map +1 -1
- package/dist/headless/index.d.ts +2 -0
- package/dist/headless/index.d.ts.map +1 -1
- package/dist/headless/index.js +3 -1
- package/dist/headless/index.js.map +1 -1
- package/dist/headless/judge.d.ts +2 -0
- package/dist/headless/judge.d.ts.map +1 -1
- package/dist/headless/judge.js +25 -1
- package/dist/headless/judge.js.map +1 -1
- package/dist/headless/runtime.generated.d.ts.map +1 -1
- package/dist/headless/runtime.generated.js +1 -1
- package/dist/headless/runtime.generated.js.map +1 -1
- package/dist/headless/runtime.js +2 -1
- package/dist/headless/runtime.js.map +1 -1
- package/dist/headless/seats.d.ts +80 -0
- package/dist/headless/seats.d.ts.map +1 -0
- package/dist/headless/seats.js +96 -0
- package/dist/headless/seats.js.map +1 -0
- package/dist/host/css.d.ts +2 -2
- package/dist/host/css.d.ts.map +1 -1
- package/dist/host/css.js +1 -1
- package/dist/host/css.js.map +1 -1
- package/dist/host/fonts.d.ts +19 -1
- package/dist/host/fonts.d.ts.map +1 -1
- package/dist/host/fonts.js +102 -30
- package/dist/host/fonts.js.map +1 -1
- package/dist/host/index.d.ts +1 -1
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/manifest.d.ts +5 -0
- package/dist/host/manifest.d.ts.map +1 -1
- package/dist/host/manifest.js +14 -3
- package/dist/host/manifest.js.map +1 -1
- package/dist/host/open-draw.d.ts +12 -3
- package/dist/host/open-draw.d.ts.map +1 -1
- package/dist/host/open-draw.js +14 -3
- package/dist/host/open-draw.js.map +1 -1
- package/dist/host/open-judge.d.ts +2 -0
- package/dist/host/open-judge.d.ts.map +1 -1
- package/dist/host/open-judge.js +4 -2
- package/dist/host/open-judge.js.map +1 -1
- package/dist/host/parts.d.ts +17 -0
- package/dist/host/parts.d.ts.map +1 -0
- package/dist/host/parts.js +66 -0
- package/dist/host/parts.js.map +1 -0
- package/dist/host/picture-thumb.d.ts +5 -0
- package/dist/host/picture-thumb.d.ts.map +1 -0
- package/dist/host/picture-thumb.js +15 -0
- package/dist/host/picture-thumb.js.map +1 -0
- package/dist/host/pictures.d.ts +25 -2
- package/dist/host/pictures.d.ts.map +1 -1
- package/dist/host/pictures.js +56 -13
- package/dist/host/pictures.js.map +1 -1
- package/dist/host/session.d.ts.map +1 -1
- package/dist/host/session.js +10 -2
- package/dist/host/session.js.map +1 -1
- package/dist/host/unseen.d.ts +17 -0
- package/dist/host/unseen.d.ts.map +1 -0
- package/dist/host/unseen.js +80 -0
- package/dist/host/unseen.js.map +1 -0
- package/dist/host/view-runtime.generated.d.ts.map +1 -1
- package/dist/host/view-runtime.generated.js +1 -1
- package/dist/host/view-runtime.generated.js.map +1 -1
- package/dist/host/view.d.ts +15 -2
- package/dist/host/view.d.ts.map +1 -1
- package/dist/host/view.js +144 -12
- package/dist/host/view.js.map +1 -1
- package/dist/host/worker-react.d.ts +1 -0
- package/dist/host/worker-react.d.ts.map +1 -1
- package/dist/host/worker-react.js +15 -5
- package/dist/host/worker-react.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/open-kit.d.ts +4 -1
- package/dist/open-kit.d.ts.map +1 -1
- package/dist/open-kit.js +5 -2
- package/dist/open-kit.js.map +1 -1
- package/dist/part.d.ts +7 -0
- package/dist/part.d.ts.map +1 -0
- package/dist/part.js +12 -0
- package/dist/part.js.map +1 -0
- package/dist/protocol.d.ts +29 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/worker/view-global.d.ts +16 -0
- package/dist/worker/view-global.d.ts.map +1 -1
- package/dist/worker/view-global.js +103 -0
- package/dist/worker/view-global.js.map +1 -1
- package/dist/worker/view.d.ts +1 -1
- package/dist/worker/view.d.ts.map +1 -1
- package/dist/worker/view.js +1 -0
- package/dist/worker/view.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* it in front of a view's own source, for an isolate the host picked.
|
|
5
5
|
* Carries Remote DOM (MIT, Shopify Inc.).
|
|
6
6
|
*/
|
|
7
|
-
export const HEADLESS_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 M=Symbol(\"name\"),Ce=Symbol(\"prefix\"),Ie=Symbol(\"value\"),L=Symbol(\"ns\"),se=Symbol(\"owner\"),B=Symbol(\"owner_document\"),we=Symbol(\"attributes\"),Y=Symbol(\"prev\"),A=Symbol(\"next\"),U=Symbol(\"child\"),ie=Symbol(\"parent\"),De=Symbol(\"host\"),fe=Symbol(\"data\"),ze=Symbol(\"listeners\"),pr=Symbol(\"isTrusted\"),tt=Symbol(\"path\"),nt=Symbol(\"stop_immediate_propagation\"),rt=Symbol(\"dispatching\"),ve=Symbol(\"content\"),W=Symbol(\"hooks\"),tn=Symbol(\"extensions\"),Fe=Symbol(\"hooks_dispatch\"),Q=Symbol(\"is_connected\"),ot=Symbol(\"create_element\"),go=0,le=1,st=2,it=3,at=8,Ve=9,ho=10,Me=11,G=\"http://www.w3.org/1999/xhtml\",pe=\"http://www.w3.org/2000/svg\",yo=\"http://www.w3.org/XML/1998/namespace\",kt=\"http://www.w3.org/2000/xmlns/\";function nn(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function K(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function bo(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function z(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 Eo=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,wo=/[\\0\\t\\n\\f\\r />=]/u,Si=/[\\0\\t\\n\\f\\r />]/u;function ke(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function No(t){Eo.test(t)||gr(t)}function mr(t){(t===\"\"||wo.test(t))&&gr(t)}function rn(t,e,n){let r=ke(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||Si.test(i))||(n===\"element\"?!Eo.test(a):a===\"\"||wo.test(a)))&&gr(o),i!=null&&r==null)throw z(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==yo)throw z(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==kt)throw z(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===kt&&o!==\"xmlns\"&&i!==\"xmlns\")throw z(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function gr(t){throw z(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var on=0,sn=1,To=2,hr=3,vi=typeof performance>\"u\"?Date.now:performance.now.bind(performance),ee=class{static NONE=on;static CAPTURING_PHASE=sn;static AT_TARGET=To;static BUBBLING_PHASE=hr;timeStamp=vi();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=on;[tt]=[];[nt]=!1;[rt]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,pr,{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[pr]}composedPath(){return[...this[tt]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[nt]=!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 yr(t,e,n){if(t.cancelBubble)return;let o=e[ze]?.get(t.type)?.[n===sn?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?To:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(ki,0,a)}if(t[nt])break}}function ki(t){throw t}var Ot=[],an=new WeakMap;function ln(t,e){let n=an.get(t);n?n.push(e):an.set(t,[e]),Ot[Ot.length-1].push(t)}function te(t){let e=[];Ot.push(e);let n;try{n=t()}catch(r){Ot.pop();try{xo(e)}catch{}throw r}return Ot.pop(),xo(e),n}function xo(t){let e,n=!1;for(let r of t){let o=an.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}an.delete(r)}}if(n)throw e}var cn=[],At=[],br=!1;function Be(t){for(let e of t)cn.push(e),e[1]&&At.push(e[1]);if(!br){br=!0;try{let e,n=!1;for(let r=0;r<cn.length;r++){let[o,s]=cn[r];s&&At.splice(At.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{cn.length=0,At.length=0,br=!1}}}function Rt(t){let e=t;for(;e;){if(At.includes(e))return!0;e=e[ie]??e[De]}return!1}var _t=Symbol(\"listenerRegistrations\"),Le=class{[ze]=void 0;[_t]=void 0;[B]=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 a=Er(o),l=this[_t];l||(l=new Map,this[_t]=l);let c=l.get(e);c||(c={},l.set(e,c));let g=c[a];if(g||(g=new Map,c[a]=g),g.has(n))return;let h=this,w={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(w.normalizedListener=function(...y){if(w.signal?.aborted){dn(h,w);return}return w.once&&dn(h,w),typeof w.listener==\"object\"?w.listener.handleEvent(...y):w.listener.call(this,...y)});let b=this[ze];b||(b=new Map,this[ze]=b);let f=b.get(e);f||(f={},b.set(e,f));let R=f[a];if(R||(R=new Set,f[a]=R),g.set(n,w),R.add(w),i){let u=()=>{dn(h,w)};w.abortListener=u,i.addEventListener(\"abort\",u,{once:!0})}this[B]?.defaultView[Fe].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Oi.call(this,e,n,r)}dispatchEvent(e){if(e[rt])throw z(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[rt]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[tt]=n;for(let s=n.length;s--;)if(yr(e,n[s],sn),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(yr(e,o[s],hr),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[rt]=!1,e.cancelBubble=!1,e[nt]=!1,e.eventPhase=on,e.currentTarget=null,e[tt]=[]}}};function Oi(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Er(!!r),s=this[_t]?.get(t)?.[o]?.get(e);s&&dn(this,s)}function Er(t){return t?\"capture\":\"bubble\"}function dn(t,e){let n=Er(e.capture),r=t[_t],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[ze],a=i?.get(e.type);if(!a)return;let l=a[n];l?.delete(e)&&(l.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[B]?.defaultView[Fe].removeEventListener?.(t,e.type,e.listener,e.capture))}var me=class extends Array{item(e){return this[e]??null}};var Ct=0,So=1,Tr=2,xr=3,It=4,vo=0,ko=1,pn=2,mn=3,Oo=4,Nr=5,Ao=6,Ro=7,un=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Ai(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 ae(t){throw z(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function gn(t,e){let n=typeof e==\"string\"?Dt(e):[{combinator:It,matchers:e}],r=null,o=t[U];return o&&n[0].matchers.length&&Sr(o,n,s=>(r=s,!1)),r}function hn(t,e){let n=typeof e==\"string\"?Dt(e):[{combinator:It,matchers:e}],r=new me,o=t[U];return o&&n[0].matchers.length&&Sr(o,n,s=>{r.push(s)}),r}function Dt(t,e=!1,n=!1){let r={combinator:It,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===\"\"&&ae(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ae(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ae(t),l[1]===\">\"?r.combinator=So:l[1]===\"+\"?r.combinator=xr:l[1]===\"~\"?r.combinator=Tr:r.combinator=Ct,r={combinator:It,matchers:[]},o.push(r));let c=l[8]?K(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ae(t);let h,w=l[4]??l[5]??l[7];if(l[2]){un.test(c)||ae(t);let b=l[5],f=b?.[0];if(l[3]==null&&(f==='\"'||f===\"'\")){let R=l[0].lastIndexOf(b);w=i.slice(l.index+R+1),s.lastIndex=i.length}else b!=null&&!un.test(b)&&ae(t);h=Oo}else l[6]?(un.test(c)||ae(t),h=l[6]===\"#\"?pn:mn):l[8]?h=l[9]==null?Nr:Ao:l[7]===\"*\"?h=vo:l[7]&&un.test(l[7])?h=ko:ae(t);l[9]?([w,s.lastIndex]=Ai(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&ae(t),c===\"has\"&&e&&ae(t),Dt(w,e||c===\"has\",c===\"has\")):h===Nr&&ae(t),r.matchers.push({type:h,name:c,value:w}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ae(t),o}function Ri(t,e){let n=Dt(e);return n[0]?.matchers.length?Pt(t,n):!1}function _i(t,e){let n=Dt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Ct,s={type:Ro,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Ct,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===xr||o===Tr?t[A]:t[U];if(!i)return!1;let a=!1;return Sr(i,n,()=>(a=!0,!1),t),a}function Sr(t,e,n,r){let o=[],s=t;for(;s;){if(oe(s)){if(Pt(s,e,r)&&n(s)===!1)return!1;let i=s[U];if(i){let a=s[A];a&&o.push(a),s=i;continue}}s=s[A]??o.pop()??null}return!0}function Pt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===It){if(!fn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Pt(t,a,n)}let s=r===So||r===Ct?ie:Y,i=t[s];if(!i)return!1;if(r===Ct||r===Tr){for(;i;){if(oe(i)&&fn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Pt(i,a,n))return!0}i=i[s]}return!1}else{if(r===xr&&!oe(i)){for(;i&&!oe(i);)i=i[s];if(!i)return!1}if(!oe(i)||!fn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Pt(i,a,n)}}function wr(t,e){return t.getAttributeNS(null,t.namespaceURI===G?K(e):e)}function fn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(fn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case vo:return o===\"*\";case ko:return t.namespaceURI===G?t.localName===K(o):t.localName===o;case pn:return wr(t,\"id\")===o;case mn:let i=wr(t,\"class\");return i?nn(i).includes(o):!1;case Oo:let a=wr(t,o);return s==null?a!=null:a===s;case Ro:return t===n;case Nr:ae(`:${o}`);case Ao:switch(o){case\"has\":return _i(t,s||\"\");case\"not\":return!Ri(t,s||\"\");default:ae(`:${o}(${s})`)}}return!1}function Pi(t){return t.nodeType===st}function Mt(t){return fe in t}function kr(t){return t.nodeType===it}function Ci(t){return t.nodeType===at}function oe(t){return t.nodeType===le}function vr(t){return t.nodeType===Me}function Io(t){return\"appendChild\"in t}function yn(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 a=[];for(let l of $t(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!oe(l)))continue;let c=l[we];if(c)for(let h of c)o.has(h)||(o.add(h),e.push(h));let g=l[ve];g&&!o.has(g)&&!r.has(g)&&(r.add(g),n.push(g))}s??=a}return{nodes:e,treeNodes:s}}function Lt(t,e){for(let n of t)n[B]=e}function _o(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[B]=e,r}function Po(t,e){if(kr(t))return e.createTextNode(t.data);if(Ci(t))return e.createComment(t.data);if(Pi(t))return _o(t,e);if(oe(t)){let n=e[ot](t[M],t.namespaceURI,t[Ce],t.localName);if(t[we])for(let r=0;r<t[we].length;r++){let o=t[we].item(r);n.attributes.setNamedItem(_o(o,e))}return n}else{if(vr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[B]=e,n}}}function bn(t,e,n=t.ownerDocument){if(t.nodeType===Ve)throw z(\"Cannot clone a document node\",\"NotSupportedError\");let r=Po(t,n);if(!e||!oe(t)&&!vr(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],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,oe(i.source)&&i.source.namespaceURI===G&&i.source.localName===\"template\"){let g=i.source[ve];g&&(o.has(g)&&Co(),o.add(g),i.contentSource=g,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&Co(),o.add(a);let c=Po(a,n);oe(a)||vr(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function Co(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function En(t,e){let n=String(e);return n===\"\"?null:gn(t,[{type:pn,name:n}])}function wn(t,e){let n=[...new Set(nn(String(e)))];return hn(t,n.map(r=>({type:mn,name:r})))}function Nn(t,e){let n=String(e),r=K(n),o=[];for(let s of Tn(t))oe(s)&&(n===\"*\"||(s.namespaceURI===G?s[M]===r:s[M]===n))&&o.push(s);return o}function Tn(t){let e=[],n=[],r=t[U];for(;r;){e.push(r);let o=r[U],s=r[A];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function $t(t){let e=Tn(t);return e.unshift(t),e}var ge=class extends Le{nodeType=go;[M]=\"\";[ie]=null;[De]=null;[U]=null;[Y]=null;[A]=null;[Q]=!1;get[W](){return this[B].defaultView[Fe]}get localName(){return this[M]}get nodeName(){return this[M]}get ownerDocument(){return this[B]}get isConnected(){return this[Q]}isDefaultNamespace(e){let n=ke(e);return Ii(this)===n}get parentNode(){return this[ie]}set parentNode(e){}get parentElement(){let e=this[ie];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[Y]}set previousSibling(e){}get nextSibling(){return this[A]}set nextSibling(e){}get previousElementSibling(){let e=this[Y];for(;e&&e.nodeType!==1;)e=e[Y];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[A];for(;e&&e.nodeType!==1;)e=e[A];return e}set nextElementSibling(e){}get firstChild(){return this[U]}set firstChild(e){}get lastChild(){let e=this[U];for(;e;){let n=e[A];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Mt(this)?this.data:null}set nodeValue(e){Mt(this)&&(this.data=e)}get textContent(){if(Mt(this))return this.data;let e=\"\";for(let n of Tn(this))kr(n)&&(e+=n.data);return e}set textContent(e){if(Mt(this))this.data=e;else if(Io(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return bn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Ii(t){let e=t;for(;e;)switch(e.nodeType){case le:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(kt,\"xmlns\");if(r!=null&&r.prefix==null)return ke(r.value);e=n.parentElement;break}case Ve:e=e.documentElement;break;case ho:case Me:return null;case st:e=e.ownerElement;break;default:e=e.parentElement}return null}var he=Symbol(\"insertNode\"),Rr=Symbol(\"preflightInsertions\"),xn=Symbol(\"replaceNode\"),$e=class extends ge{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Ye(e),r=this.parentNode;if(r)return Or(o=>{Oe(r,n);let s=this[A];for(;s&&n.includes(s);)s=s[A];let i=Ar(r,n,o);this.parentNode===r?r[xn](i,this,o):r[he](i,s,o)})}before(...e){let n=Ye(e),r=this.parentNode;if(r)return Or(o=>{Oe(r,n);let s=this[Y];for(;s&&n.includes(s);)s=s[Y];let i=Ar(r,n,o);r[he](i,s?s[A]:r.firstChild,o)})}after(...e){let n=Ye(e),r=this.parentNode;if(r)return Or(o=>{Oe(r,n);let s=this[A];for(;s&&n.includes(s);)s=s[A];let i=Ar(r,n,o);r[he](i,s,o)})}};function Or(t){return te(()=>{let e=[];try{t(e)}catch(n){try{Be(e)}catch{}throw n}Be(e)})}function Ye(t){return t.map(e=>e instanceof ge?e:String(e))}function Ht(t,e){return e instanceof ge?e:t.ownerDocument.createTextNode(String(e))}function Oe(t,e){for(let n of e){if(!(n instanceof ge))continue;let r=t;for(;r;){if(r===n)throw z(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[ie]??r[De]}}}function Ar(t,e,n){let r=[];for(let s of e)r.push(Ht(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Rr](r);for(let s of r)o[he](s,null,n);return o}var Sn,_r=0,Do=0,Mo=0,Lo=0,lt=!1,Cr=!1,Ut=!1,vn=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=Di(n),o=Sn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?_r++:Pr(i,-1),s.set(this,r),Pr(r,1),this.#e.add(e)}disconnect(){let e=Sn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),_r--,Pr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,_r===0&&(Sn=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 ye(t){let e=Sn;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 a=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;a=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new me,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 me,target:t.target,type:t.type})}function kn(...t){let e=new me;return e.push(...t),e}function Di(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 Pr(t,e){t.attributes&&(Do+=e),t.characterData&&(Mo+=e),t.childList&&(Lo+=e),lt=Do>0,Cr=Mo>0,Ut=Lo>0}var Ne=class extends $e{childNodes=new me;children=new me;appendChild(e){return te(()=>this[he](e,null))}insertBefore(e,n){return te(()=>this[he](e,n||null))}append(...e){return te(()=>{let n=Ye(e.filter(r=>r!=null));n.length>1&&Oe(this,n);for(let r of n)this[he](Ht(this,r),null)})}prepend(...e){return te(()=>{let n=Ye(e.filter(o=>o!=null));n.length>1&&Oe(this,n);let r=this.firstChild;for(let o of n)this[he](Ht(this,o),r)})}replaceChildren(...e){return te(()=>{let n=Ye(e.filter(o=>o!=null));Oe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[he](Ht(this,o),null)})}removeChild(e){return te(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw z(\"The node is not a child of this node\",\"NotFoundError\");let n=this[Q]?$t(e):void 0,r=e[Y],o=e[A],s=On(this,e);if(n)for(let i of n)i[Q]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Be(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return te(()=>this[xn](e,n))}[xn](e,n,r){if(Oe(this,[e]),n.parentNode!==this)throw z(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[Y],s=n[A],i=this.prepareInsertion(e),a=this[Q]?$t(n):void 0,l=new Set(i.map(({node:w})=>w)),c=s;for(;c&&l.has(c);)c=c[A];let g=On(this,n);if(a){for(let b of a)b[Q]=!1;let w=new Set(a);for(let b of i)w.has(b.node)&&(b.shouldDisconnect=!1)}this.commitInsertion(i,c);let h=this[Q];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,h),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,g),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return hn(this,e)}querySelector(e){return gn(this,e)}[he](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Rr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(Oe(this,[e]),n&&n.parentNode!==this)throw z(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[A]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[Q];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Be(e)}prepareInsertion(e){let n=[];if(e.nodeType===Me){let i=e[U];for(;i;)n.push(i),i=i[A]}else n.push(e);let r=this[Q],o=this[B],s=[];for(let i of n){let a=i[Q],l=a||r,c,g;if(i[B]===o)l&&(c=$t(i));else{let h=yn(i);g=h.nodes,l&&(c=h.treeNodes)}s.push({node:i,nodes:c,adoption:g,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ie];if(i){let a=s.node[Y],l=s.node[A];s.source={parent:i,index:On(i,s.node),previousSibling:a,nextSibling:l}}}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[B];for(let{adoption:s}of e)s&&Lt(s,r);let o=this[Q];for(let{nodes:s}of e)if(s)for(let i of s)i[Q]=o}attachChild(e,n){if(n){let s=n[Y];e[A]=n,e[Y]=s,s?s[A]=e:this[U]=e,n[Y]=e}else{e[A]=null;let s=this[U];if(s){let i;for(;i=s[A];)s=i;s[A]=e,e[Y]=s}else this[U]=e,e[Y]=null}let r=oe(e);e[ie]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!oe(s);)s=s[A];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[Y],nextSibling:e[A]}}queueRemovalMutationRecord(e,n,r,o){Ut&&ye({type:\"childList\",target:e,removedNodes:kn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Ut)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ye({type:\"childList\",target:this,addedNodes:kn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==le||Rt(this)?[]:[[()=>this[W].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===le&&!Rt(s.parent)&&n.push([()=>s.parent[W].removeChild?.(s.parent,o,s.index)]),this.nodeType===le&&!Rt(this)&&n.push([()=>this[W].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){Ho(e,n)}};function $o(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[Q]?n.treeNodes:void 0,s=e[Y],i=e[A],a=On(t,e);if(o)for(let c of o)c[Q]=!1;Lt(n.nodes,r),Ut&&ye({type:\"childList\",target:t,removedNodes:kn(e),previousSibling:s,nextSibling:i}),o&&Ho(o,\"disconnectedCallback\");let l=[];t.nodeType===le&&!Rt(t)&&l.push([()=>t[W].removeChild?.(t,e,a)]),Be(l)}function On(t,e){let n=e[Y],r=e[A];n?n[A]=r:t[U]=r,r&&(r[Y]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),oe(e)&&t.children.splice(t.children.indexOf(e),1),e[ie]=null,e[A]=null,e[Y]=null,o}function Ho(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&ln(n,()=>r.call(n))}}function Gt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||ln(t,()=>i.call(t,e,n,r,o))}var An=class{[U]=null;constructor(e){this[se]=e}getNamedItem(e){let n=String(e),r=this[se][L]===G?K(n):n,o=this[U];for(;o;){if(o.name===r)return o;o=o[A]}return null}getNamedItemNS(e,n){let r=ke(e),o=String(n),s=this[U];for(;s;){if(s.localName===o&&s[L]===r)return s;s=s[A]}return null}item(e){let n=this[U],r=0;for(;n;){if(r++===e)return n;n=n[A]}return null}get length(){let e=0,n=this[U];for(;n;)e++,n=n[A];return e}removeNamedItem(e){let n=String(e),r=this[se][L]===G?K(n):n;return te(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ke(e),o=String(n);return te(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[L]===r))}removeNamedItemImmediately(e){let n=this[se],r=this[U],o=null;for(;r!=null;){if(e(r)){o&&(o[A]=r[A]),this[U]===r&&(this[U]=r[A]);let s=r.value;return r[A]=null,r[se]=null,lt&&ye({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[L],oldValue:s}),n[W].removeAttribute?.(n,r.name,r[L]),Gt(n,r.localName,s,null,r[L]),r}o=r,r=r[A]}return null}setNamedItem(e){return te(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[se],r=e[se];if(r!=null&&r!==n)throw z(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[U],i=null;for(;s;){if(s.localName===e.localName&&s[L]===e[L]){if(s===e)return s;i?i[A]=e:this[U]=e,e[A]=s[A],s[A]=null,o=s;break}i=s,s=s[A]}o==null&&(i?i[A]=e:this[U]=e),e[se]=n,e[B]=n[B],o&&(o[se]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&<&&ye({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[L],oldValue:o?.value??null}),l&&n[W].removeAttribute?.(n,o.name,o[L]),(a||l)&&n[W].setAttribute?.(n,e.name,e.value,e[L]),a&&Gt(n,e.localName,o?.value??null,e.value,e[L]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[U];for(;e;)yield e,e=e[A]}};var We=class extends ge{nodeType=st;[L]=null;[A]=null;[se]=null;constructor(e,n,r){super(),this[M]=e,this[Ie]=n,r&&(this[L]=r)}get nodeName(){return this[M]}set nodeName(e){}get name(){return this[M]}set name(e){}get localName(){if(this[L]==null)return this[M];let e=this[M].indexOf(\":\");return e<0?this[M]:this[M].slice(e+1)}get prefix(){if(this[L]==null)return null;let e=this[M].indexOf(\":\");return e<0?null:this[M].slice(0,e)}get value(){return this[Ie]}set value(e){let n=String(e),r=this[se];if(!r){this[Ie]=n;return}te(()=>{let o=this[Ie];this[Ie]=n,lt&&o!==n&&ye({type:\"attributes\",target:r,attributeName:this[M],attributeNamespace:this[L],oldValue:o}),this[W].setAttribute?.(r,this[M],n,this[L]),Gt(r,this.localName,o,n,this[L])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[se]}get namespaceURI(){return this[L]}get specified(){return!0}};var Mi={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Li=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),$i=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,jo=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Hi=\"|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|\",Ui=/^(?:color|face|size)$/i;function Uo(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 Mi[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function zo(t){return t.namespaceURI===G&&Li.has(t.localName)}function Go(t){let e=t.localName;return t[L]===pe&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Gi(t,e){if(Hi.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(jo))if(Ui.test(n[1]))return!0;return!1}function Rn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll($i)){let a=i[1];if(a){let l=i[2],c=K(a),g=o[o.length-1]?.element??e,h=g[L]===pe?pe:G;if(c===\"svg\")h=pe;else if(h===pe){if(Go(g))h=G;else if(Gi(c,l)){for(;o.length>0;){let f=o[o.length-1];if(f.element[L]!==pe||Go(f.element))break;o.pop(),s=f.target}h=G}}let w=h===G?c:a,b=n[ot](w,h,null,w);for(let f of l.matchAll(jo))b.setAttribute(f[1],Uo(f[3]||f[4]||\"\"));if(s.append(b),zo(b)||h!==G&&i[4])continue;o.push({element:b,target:s}),s=h===G&&c===\"template\"?b.content:b}else if(i[5]){let l=K(i[5]);for(let c=o.length-1;c>=0;c--){let g=o[c],h=K(g.element[M]);if(h===l){s=g.target,o.length=c;break}if(g.element[L]===G&&h===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(Uo(i[7]))}return r}function _n(t){return Vo([{type:\"content\",child:t[U]}])}function Fo(t){return Vo([{type:\"opening\",node:t}])}function Vo(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case le:{let o=r;e.push(`<${o[M]}`);let s=o[we]?.[U];for(;s;){e.push(` ${s[M]}`);let a=s[Ie];a!==\"\"&&(a=String(a).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${a}\"`)),s=s[A]}if(e.push(\">\"),zo(o))break;let i=o.namespaceURI===G&&o.localName===\"template\"?o[ve]:o;t.push({type:\"closing\",name:o[M]}),t.push({type:\"content\",child:i?.[U]??null});break}case it:{let o=r;e.push(o[fe].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case at:{let o=r;e.push(`<!--${o[fe]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[A]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var Z=class extends Ne{nodeType=le;[L]=G;[Ce]=null;get namespaceURI(){return this[L]}get prefix(){return this[Ce]}get localName(){let e=this[Ce];return e==null?this[M]:this[M].slice(e.length+1)}get nodeName(){return this[L]===G?bo(this[M]):this[M]}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 We(\"slot\",n))}get attributes(){let e=this[we];return e||(e=new An(this),this[we]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Nn(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return wn(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);mr(r);let s=this[L]===G?K(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new We(s,o))}setAttributeNS(e,n,r){let o=ke(e),s=String(n),i=String(r),a=rn(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new We(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);mr(r);let o=this[L]===G?K(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 We(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[L]===G?K(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Fo(this)}get innerHTML(){return _n(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Rn(String(e),this);this.replaceChildren(n)}}};var ct=class t extends Z{[L]=pe;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var He=class extends $e{[fe]=\"\";constructor(e){super(),this[fe]=e==null?\"\":String(e)}setData(e){let n=Cr,r=n?this[fe]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[fe]=o,n&&r!==o&&ye({type:\"characterData\",target:this,oldValue:r}),this[W].setText?.(this,o)}get data(){return this[fe]}set data(e){this.setData(e)}};var dt=class extends He{nodeType=it;[M]=\"#text\"};var ut=class extends He{nodeType=at;[M]=\"#comment\"};var ft=class extends Ne{nodeType=Me;[M]=\"#document-fragment\";[B]=typeof window<\"u\"?window.document:null;getElementById(e){return En(this,e)}};var pt=class extends Z{get content(){let e=this[ve];return e||(e=this.ownerDocument.createDocumentFragment(),e[De]=this,this[ve]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Rn(String(e),this))}get innerHTML(){let e=this[ve];return e?_n(e):\"\"}};var Pn=class extends Z{};var Cn=class extends Z{};var In=class extends Z{};var jt=class extends Ne{nodeType=Ve;[M]=\"#document\";[Q]=!0;constructor(e){super(),this.defaultView=e,this[B]=this,this.documentElement=Mn(new In,this,\"html\"),this.body=Mn(new Pn,this,\"body\"),this.head=Mn(new Cn,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 wn(this,e)}createElement(e){let n=String(e);return No(n),Ir(this,K(n))}createElementNS(e,n){let r=rn(e,n,\"element\");return Ir(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[ot](e,n,r,o){return Ir(this,e,n,r,o)}createTextNode(e){let n=Dn(new dt(e),this);return this[W].createText?.(n,n.data),n}createComment(e){return Dn(new ut(e),this)}createDocumentFragment(){return Dn(new ft,this)}createEvent(){return new ee(\"\")}getElementById(e){return En(this,e)}getElementsByTagName(e){return Nn(this,e)}importNode(e,n){if(e.nodeType===Ve)throw z(\"Cannot import a document node\",\"NotSupportedError\");return bn(e,n,this)}adoptNode(e){if(e[B]===this)return e;let n=yn(e);return te(()=>{let r=e.parentNode;return r?$o(r,e,n,this):Lt(n.nodes,this),e})}};function Dn(t,e){return Object.defineProperty(t,B,{value:e,writable:!0,enumerable:!1}),t}function Ir(t,e,n=G,r=null,o=e){let s;if(n===pe)s=new ct;else if(n===G&&o===\"template\")s=new pt;else if(n===G){let i=t.defaultView.customElements.get(o);s=i?new i:new Z}else s=new Z;return Mn(s,t,e,n,r)}function Mn(t,e,n,r=G,o=null){return Dn(t,e),Object.defineProperties(t,{[M]:{value:n},[L]:{value:r},[Ce]:{value:o}}),e[W].createElement?.(t,r),t}var Ln=class extends ee{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 $n=class extends ee{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 Hn=class extends ee{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Un=class extends ee{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Gn=class extends ee{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var jn=class extends ee{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var zn=class extends Z{};var ji=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,zi=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Bo(t){return ji.test(t)&&!zi.has(t)}function Yo(t){return z(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Fn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Bo(e))throw Yo(e);if(this.registry.has(e))throw z(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw z(\"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(!Bo(e))return Promise.reject(Yo(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 Fi=[\"onerror\",\"onunhandledrejection\"],Xo=Symbol.for(\"@remote-dom/polyfill/global-property\");function qo(t){return Object.getOwnPropertyDescriptors(t)}function Ko(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Le.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Dr(r.value.bind(t)),e[n]=r);return e}function Zo(t){let e={};for(let n of Fi)e[n]={configurable:!0,enumerable:!0,get:Dr(()=>t[n]),set:Dr(r=>{t[n]=r})};return e}function Vi(t){return Object.assign(qo(t),Ko(t),Zo(t))}function Dr(t){return Object.defineProperty(t,Xo,{value:!0}),t}function Wo(t,e){for(let n of Reflect.ownKeys(e)){let r=Bi(t,n);(r==null||Yi(r))&&Object.defineProperty(t,n,e[n])}}function Bi(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Yi(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Xo]===!0)}var Xe=class extends Le{[W]={};[tn]=[];[Fe]=Xi(this);name=\"\";window=this;parent=this;self=this;top=this;document=new jt(this);customElements=new Fn;location=globalThis.location;navigator=globalThis.navigator;Event=ee;ErrorEvent=$n;PromiseRejectionEvent=Hn;ToggleEvent=Un;FocusEvent=Gn;ClipboardEvent=jn;EventTarget=Le;CustomEvent=Ln;Node=ge;ParentNode=Ne;ChildNode=$e;DocumentFragment=ft;Document=jt;CharacterData=He;Comment=ut;Text=dt;Element=Z;HTMLElement=zn;SVGElement=ct;HTMLTemplateElement=pt;MutationObserver=vn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Wi(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=qo(e),s=Object.assign(Ko(e),Zo(e));delete o.self,Object.defineProperties(globalThis,o),Wo(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),Wo(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Vi(e))}};function Wi(t,e){t[tn].push(e(t)??{})}function Xi(t){return{createElement:Ae.bind(null,t,\"createElement\"),setAttribute:Ae.bind(null,t,\"setAttribute\"),removeAttribute:Ae.bind(null,t,\"removeAttribute\"),createText:Ae.bind(null,t,\"createText\"),setText:Ae.bind(null,t,\"setText\"),insertChild:Ae.bind(null,t,\"insertChild\"),removeChild:Ae.bind(null,t,\"removeChild\"),addEventListener:Ae.bind(null,t,\"addEventListener\"),removeEventListener:Ae.bind(null,t,\"removeEventListener\")}}function Ae(t,e,...n){for(let s of t[tn])s[e]?.apply(s,n);let r=t[W];r[e]?.apply(r,n)}var Vn=new Xe;var Mr=\"~\";var Ue=new WeakMap;function mt(t){return Ue.get(t)}var Ur=new WeakMap,Ki=0;function ce(t){let e=Ur.get(t);return e==null&&(e=String(Ki++),Bn(t,e)),e}function Bn(t,e){Ur.set(t,e)}var $r=new WeakMap;function Zi(t){return $r.get(t)}var Hr=new WeakMap;function Ji(t){let e=Hr.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 Qi=new WeakMap;function ea(t){return Qi.get(t)}function Gr(t,e,n){let r=$r.get(t);if(r==null&&(r={},$r.set(t,r)),r[e]===n)return;r[e]=n;let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,1]])}function Ge(t,e,n){let r=Hr.get(t);if(r==null&&(r={},Hr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,2]])}function gt(t,e){if(Ue.get(t)!==e&&(Ue.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)gt(t.childNodes[r],e)}function Yn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Yn(t.childNodes[n])}function ht(t){let{nodeType:e}=t;switch(e){case 1:return{id:ce(t),type:e,element:t.localName,properties:Lr(Zi(t)),attributes:Lr(Ji(t)),eventListeners:Lr(ea(t)),children:Array.from(t.childNodes).map(ht)};case 3:case 8:return{id:ce(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Lr(t){return t?{...t}:void 0}function jr(t,e,...n){let r=Ur.get(t),o=Ue.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 yt=Vn[W];yt.insertChild=(t,e,n)=>{let r=mt(t);r!=null&&(gt(e,r),r.mutate([[0,ce(t),ht(e),n]]))};yt.removeChild=(t,e,n)=>{let r=mt(t);r!=null&&(Yn(e),r.mutate([[1,ce(t),n]]))};yt.setText=(t,e)=>{let n=mt(t);n?.mutate([[2,ce(t),e]])};yt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ge(t,e,n)};yt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ge(t,e)};Xe.setGlobal(Vn);function Qo(t,e){if(typeof t!=\"string\"||t.length===0||t.length>200)return\"A kept value's key is a string of 1 to 200 characters, so this one was not kept.\";if(e!==null){if(typeof e!=\"string\")return\"A view keeps a string or null; JSON.stringify anything else, so this one was not kept.\";if(e.length>4096||new TextEncoder().encode(e).length>4096)return\"A kept value is at most 4 KB, and this one is longer, so it was not kept.\"}}function es(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 ts=[\"wheel\",\"drag\",\"pinch\"];var rs=[\"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\"],os=[\"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\"],ss=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],is=[\"TEMPORARY\",\"PERSISTENT\"],Mu=Object.freeze([...rs,...os,...ss,...is]),Lu=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),ns=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function as(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...rs,...os,...ss,...e,\"constructor\",Symbol.toStringTag]),i=(p,E)=>{let x=Reflect.getOwnPropertyDescriptor(p,E);return x===void 0||!(\"value\"in x)||x.writable||x.configurable?!1:n.primitivesStay&&typeof E==\"symbol\"&&(typeof x.value!=\"object\"||x.value===null)&&typeof x.value!=\"function\"?!0:is.includes(E)&&typeof x.value==\"number\"},a=t,l=a.setTimeout,c=a.setInterval,g=a.crypto,h=(p,E)=>function(x,m,...k){if(typeof x!=\"function\")throw new TypeError(`${E} takes a function: a guest view cannot run code from text`);return p.call(t,x,m,...k)},w=g?Object.freeze({getRandomValues:p=>g.getRandomValues(p)}):void 0,b=a.document?.defaultView;if(b&&b!==a)for(let p of Reflect.ownKeys(b))typeof p==\"symbol\"||s.has(p)||Reflect.deleteProperty(b,p)||o.push(`window.${p}`);let f=[];for(let p=t;p&&p!==Object.prototype;p=Object.getPrototypeOf(p))f.push(p);for(let p of f)for(let E of Reflect.ownKeys(p))s.has(E)||(Reflect.deleteProperty(p,E)?r.push(ns(E)):i(p,E)||o.push(ns(E)));let R=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},u=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let p of u){let E=R();Object.defineProperty(E,\"prototype\",{value:p,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(p,\"constructor\",{value:E,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),p===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:E,writable:!0,enumerable:!1,configurable:!0})}let y=(p,E)=>{Reflect.defineProperty(t,p,{value:E,writable:!0,enumerable:!0,configurable:!0})||o.push(p)};y(\"setTimeout\",h(l,\"setTimeout\")),y(\"setInterval\",h(c,\"setInterval\")),w&&y(\"crypto\",w);for(let p of f.slice(1))Object.freeze(p);for(let p of Reflect.ownKeys(t)){let E=Reflect.getOwnPropertyDescriptor(t,p);Reflect.defineProperty(t,p,\"value\"in E?{...E,writable:!1,configurable:!1}:{...E,configurable:!1})}let O;try{O=Reflect.preventExtensions(t)}catch{O=!1}return{removed:r,stuck:o,sealed:O}}var zt=class extends HTMLElement{constructor(){super(),Bn(this,Mr)}connect(e){if(mt(this)===e||(gt(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,Mr,ht(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Gr(this,e,n)}callRemoteMethod(e,...n){return jr(this,e,...n)}};var S={},zr={empty:!0},ta={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\"},bt={div:S,section:S,article:S,aside:S,header:S,footer:S,nav:S,hgroup:S,search:S,address:S,figure:S,figcaption:S,blockquote:S,p:S,pre:S,hr:zr,br:zr,wbr:zr,h1:S,h2:S,h3:S,h4:S,h5:S,h6:S,span:S,strong:S,em:S,b:S,i:S,u:S,s:S,small:S,mark:S,abbr:S,cite:S,q:S,code:S,kbd:S,samp:S,var:S,sub:S,sup:S,dfn:S,bdi:S,bdo:S,ruby:S,rt:S,rp:S,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:S,menu:S,dl:S,dt:S,dd:S,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:S,caption:S,thead:S,tbody:S,tfoot:S,tr:S,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:S,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:S,output:S,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\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\"}}},na=[\"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\"],ra={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(na.map(t=>[t,\"css\"]))},Re={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Wn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},ls={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},cs={oneOf:[\"R\",\"G\",\"B\",\"A\"]},be={...Re,in:\"text\",result:\"text\"},ds={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Xn={svg:{attributes:{...Re,...Wn}},g:S,defs:S,symbol:{attributes:{...Re,...Wn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Re,href:\"fragment\"}},title:S,desc:S,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Re,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\",...ds}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...ds}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Re,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Re,...Wn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Wn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:S,filter:{attributes:{...Re,filterUnits:ls,primitiveUnits:ls}},feBlend:{attributes:{...be,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...be,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:be},...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:{...be,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...be,in2:\"text\",scale:\"number\",xChannelSelector:cs,yChannelSelector:cs}},feDropShadow:{attributes:{...be,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:be},feGaussianBlur:{attributes:{...be,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:be},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...be,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...be,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Re,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var us=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],fs=[\"region\"],Fr={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},qn={section:[\"aria-label\",\"title\"]},ps=[\"aria-labelledby\",\"aria-describedby\"];function oa(t){return/^aria-[a-z]+$/.test(t)}function sa(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Vr=4e3,ms=1e5,Ft=512e3,Br=1e4,gs=\"http://www.w3.org/1999/xhtml\",hs=\"http://www.w3.org/2000/svg\",ia=new Map(Object.keys(Xn).map(t=>[t.toLowerCase(),t]));function Kn(t){return ia.get(t.toLowerCase())}function Zn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[bt[e]?.attributes,ta]:[Xn[e]?.attributes,ra],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[a,l]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:l}}if(oa(r)||sa(r))return{name:r,kind:\"text\"}}var Jn=/^\\d{4}-\\d{2}-\\d{2}$/;function aa(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!Jn.test(t)||!Jn.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 ys(t,e,n={}){let r=aa(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\"],a=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${a}`:`${a} ago`}function bs(t,e){if(typeof t!=\"string\")return;if(Jn.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return Jn.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 Es=\"~\",Qn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Te=(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=>Te(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Te(r,e+1)]))};function ws(){let t=new Map,e=new Map,n=new Map([[Es,{children:[],listeners:new Map}]]),r=0,o=c=>{let g=e.get(c);return g===void 0&&(g=r+=1,e.set(c,g),t.set(g,{listener:c,count:0})),t.get(g).count+=1,g},s=c=>{let g=t.get(c);g&&(g.count-=1,!(g.count>0)&&(t.delete(c),e.delete(g.listener)))},i=c=>{let g=n.get(c);if(g){n.delete(c);for(let h of g.listeners.values())s(h);for(let h of g.children)i(h)}},a=(c,g,h=0)=>{if(!Qn(c)||h>64)return Te(c);let w=typeof c.id==\"string\"?c.id:void 0,b=g&&w!==void 0&&w!==Es;b&&i(w);let f={children:[],listeners:new Map};b&&n.set(w,f);let R={};for(let[u,y]of Object.entries(c))u===\"children\"&&Array.isArray(y)?R[u]=y.map(O=>{let p=a(O,b,h+1);return b&&Qn(O)&&typeof O.id==\"string\"&&f.children.push(O.id),p}):u===\"eventListeners\"&&Qn(y)?R[u]=Object.fromEntries(Object.entries(y).map(([O,p])=>{if(typeof p!=\"function\"||!b)return[O,void 0];let E=o(p);return f.listeners.set(O,E),[O,{listener:E}]})):R[u]=Te(y,h+1);return R},l=c=>{if(!Array.isArray(c))return Te(c);let[g,h]=c,w=typeof h==\"string\"?n.get(h):void 0;if(g===0){let b=a(c[2],w!==void 0),f=Qn(c[2])?c[2].id:void 0;if(w&&typeof f==\"string\"&&n.has(f)){let R=Number(c[3]);w.children.splice(Number.isInteger(R)&&R>=0&&R<=w.children.length?R:w.children.length,0,f)}return[g,Te(h),b,Te(c[3])]}if(g===1){let b=Number(c[2]);return w&&Number.isInteger(b)&&b>=0&&b<w.children.length&&i(w.children.splice(b,1)[0]),Te(c)}if(g===3&&c[4]===3){let b=String(c[2]),f=c[3],R=w&&typeof f==\"function\"?o(f):void 0,u=w?.listeners.get(b);return u!==void 0&&s(u),R===void 0?w?.listeners.delete(b):w.listeners.set(b,R),[g,Te(h),b,R===void 0?void 0:{listener:R},3]}return Te(c)};return{encode:c=>c.map(l),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Yr=\"graview-view-root\",la=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],ca=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),da=t=>Object.freeze({html:t,toString:()=>t}),Ns=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Ts=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Ts).join(\"\"):Ns(t)?t.html:ca(String(t));function xs(t){customElements.get(Yr)||customElements.define(Yr,zt);let e=Event,n=ws(),r=new Set,o=new Set,s,i=[],a=new Set;for(let d of[\"closest\",\"matches\",\"dataset\"]){let T=()=>{throw new TypeError(`A view's element has no ${d}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};d in Element.prototype||Object.defineProperty(Element.prototype,d,d===\"dataset\"?{get:T}:{value:T})}let l=document.createElement(Yr),c=d=>{let T=_=>{for(let D of Array.from(_.childNodes)){if(D.nodeType!==1)continue;if(ce(D)===d)return D;let I=T(D);if(I)return I}};return T(l)},g=d=>{let T=c(d.target);if(!T)return;let _=new e(d.event,{bubbles:!0}),D={};for(let I of la)d[I]!==void 0&&(D[I]=d[I]);for(let I of Object.keys(D))Object.defineProperty(_,I,{value:D[I],enumerable:!0});T.dispatchEvent(_);for(let I of o){if(I.type!==d.event)continue;let H;try{H=new Set(Array.from(l.querySelectorAll(I.selector)))}catch{continue}for(let q=T;q&&q!==l;q=q.parentNode)if(H.has(q)){I.listener(Object.freeze({type:d.event,target:T,element:q,...D}));break}}},h=Error,w=new Map,b=0,f=(d,T,_)=>new Promise((D,I)=>{let H=++b;w.set(H,q=>q.ok?D(q):I(new h(q.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:H,op:d,key:T,...d===\"set\"?{value:_}:{}})}),R=d=>(d.catch(()=>{}),d),u=Object.freeze({get(d){return R(f(\"get\",d).then(T=>typeof T.value==\"string\"?T.value:null))},set(d,T){return R(f(\"set\",d,T).then(()=>{}))}}),y=d=>{if(d.type===\"mine-answer\"){let I=w.get(d.id);return w.delete(d.id),I?.(d)}if(d.type===\"dom-event\"&&typeof d.target==\"string\")return g(d);if(d.type===\"notice\")return t.warn(d.text);if(d.type!==\"props\")return;s=d.props;let T=t.now();for(let I of r)try{I(d.props)}catch(H){t.threw(H)}let _=t.now()-T,D=d.push;typeof D==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:D,ms:_})))},O;l.connect({mutate(d){O||(O=[],t.microtask(()=>{let T=O??[];O=void 0,t.send({type:\"render\",records:n.encode(T)})})),O.push(...d)},call:()=>{}});let p=d=>d.nodeType===1?d.getAttribute(\"data-key\")??d.getAttribute(\"id\"):null,E=(d,T)=>d.nodeType===T.nodeType&&(d.nodeType!==1||d.localName===T.localName&&d.namespaceURI===T.namespaceURI&&p(d)===p(T));function x(d,T){let _=Array.from(T.childNodes),D=0;for(let I of _){let H=d.childNodes[D]??null;if(H&&E(H,I)){m(H,I),D+=1;continue}if(p(I)!==null){let Pe=Array.from(d.childNodes).slice(D+1).find(vt=>E(vt,I));if(Pe){d.insertBefore(Pe,H),m(Pe,I),D+=1;continue}}d.insertBefore(I,H),D+=1}for(;d.childNodes.length>D;)d.removeChild(d.lastChild)}function m(d,T){if(d.nodeType!==1){d.data!==T.data&&(d.data=T.data);return}let _=d,D=T,I=k(_);for(let H of _.getAttributeNames())D.hasAttribute(H)||(_.removeAttribute(H),I&&Ge(_,H,void 0));for(let H of D.getAttributeNames()){let q=D.getAttribute(H);_.getAttribute(H)!==q&&_.setAttribute(H,q),I&&Ge(_,H,q)}x(_,D)}let k=d=>d.localName.includes(\"-\");function N(d){for(let T of Array.from(d.childNodes)){if(T.nodeType!==1)continue;let _=T;if(k(_))for(let D of _.getAttributeNames())Ge(_,D,_.getAttribute(D)??void 0);N(_)}}function C(d,T,_){for(let D of Array.from(d.childNodes)){if(D.nodeType!==1)continue;let I=D,H=I.localName,q=T||H.toLowerCase()===\"svg\",Pe=q?Kn(H):Object.prototype.hasOwnProperty.call(bt,H.toLowerCase())?H.toLowerCase():void 0;if(!Pe){_.add(`<${H}>`);continue}for(let vt of I.getAttributeNames())(!Zn(q?\"svg\":\"html\",Pe,vt)||!q&&qn[Pe]?.includes(vt.toLowerCase()))&&_.add(`${Pe} ${vt}`);C(I,q,_)}}function P(d){let T=document.createElement(\"div\"),_=Array.isArray(d)?d:[d];for(let I of _)if(I!=null)if(typeof I==\"string\"||Ns(I)){let H=document.createElement(\"div\");H.innerHTML=typeof I==\"string\"?I:I.html,T.append(...Array.from(H.childNodes))}else T.append(I);let D=new Set;C(T,!1,D),i=[...D],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),N(T),x(l,T)}let v=[],j=new Set(ts),$=\"[]\",V=!1,J=()=>{V||(V=!0,t.microtask(()=>{V=!1;let d=[...new Map([...o].filter(_=>j.has(_.type)).map(_=>[`${_.type} ${_.selector}`,{event:_.type,selector:_.selector}])).entries()].sort(([_],[D])=>_<D?-1:_>D?1:0).map(([,_])=>_),T=JSON.stringify(d);T!==$&&($=T,t.send({type:\"gestures\",bound:d}))}))},fo=\"[[],[]]\",fr=!1,po=()=>{fr||(fr=!0,t.microtask(()=>{fr=!1;let d=I=>[...new Set([...o].filter(H=>H.type===I&&typeof H.selector==\"string\").map(H=>H.selector))].sort().slice(0,200),T=d(\"click\"),_=d(\"acted\"),D=JSON.stringify([T,_]);D!==fo&&(fo=D,t.send({type:\"clicks\",selectors:T,..._.length>0?{acted:_}:{}}))}))},mo=Object.freeze({get props(){return s},onProps(d){return r.add(d),s&&d(s),()=>void r.delete(d)},render:P,style(d){typeof d!=\"string\"||v.includes(d)||(v.push(d),t.send({type:\"style\",sheets:[...v]}))},on(d,T,_){let D={type:d,selector:T,listener:_};return o.add(D),typeof d==\"string\"&&!a.has(d)&&(a.add(d),t.send({type:\"hears\",events:[d]})),j.has(d)&&J(),(d===\"click\"||d===\"acted\")&&po(),()=>{o.delete(D),j.has(d)&&J(),(d===\"click\"||d===\"acted\")&&po()}},act:(d,T={})=>t.act(d,T),mine:u,navigate(d){if(typeof d==\"string\")return t.navigate(d);let T=es(d);T&&t.send(T)},html(d,...T){return da(d.reduce((_,D,I)=>_+D+(I<T.length?Ts(T[I]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(d,T){let _=bs(d,s?.timeZone);return _===void 0?\"\":ys(_,mo.today,T)},get refused(){return i},get hardening(){return t.hardening()}});return{view:mo,hear:y,find:d=>{try{let T=l.querySelectorAll(d)[0];return T?ce(T):void 0}catch{return}},listened:d=>{let T=new Set;for(let _ of o)if(_.type===d)try{for(let D of Array.from(l.querySelectorAll(_.selector))){let I=ce(D);I&&T.add(I)}}catch{}return[...T]}}}var Ss=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Vt(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=Ss(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&Ss(s.title)===o):void 0)}var xe=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,Et=\" This run was not handed the views the host keeps, so a titled view's place is not among these: if it names one, the link goes there.\",Bt=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var ua=t=>typeof t==\"string\"&&/^#[A-Za-z_][A-Za-z0-9_.:-]{0,199}$/.test(t),vs=[\"https:\",\"mailto:\",\"tel:\"];function ks(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!vs.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function Os(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=ks(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o===\"id\"||o===\"kind\"||(Array.isArray(s)?s.forEach(n):n(s));return e}function As(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function Rs(t,e){if(ua(t))return t;let n=ks(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&As(e.origins).includes(new URL(n).origin)))return n}function _s(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!vs.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=As(e);return`The link \"${n}\" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${o.length>0?`, or an https: address on ${o.join(\", \")}`:\"\"}; a record or a place of this app is <a data-record> or <a data-place>.`}var Wr={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Ps=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"break-inside\",\"break-before\",\"break-after\",\"page-break-inside\",\"page-break-before\",\"page-break-after\",\"orphans\",\"widows\",\"box-decoration-break\",\"-webkit-box-decoration-break\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"mask-image\",\"mask-size\",\"mask-position\",\"mask-repeat\",\"mask-origin\",\"mask-clip\",\"mask-composite\",\"mask-mode\",\"mask-type\",\"-webkit-mask\",\"-webkit-mask-image\",\"-webkit-mask-size\",\"-webkit-mask-position\",\"-webkit-mask-repeat\",\"-webkit-mask-origin\",\"-webkit-mask-clip\",\"-webkit-mask-composite\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"-webkit-text-stroke\",\"-webkit-text-stroke-width\",\"-webkit-text-stroke-color\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"animation-timeline\",\"animation-range\",\"animation-range-start\",\"animation-range-end\",\"scroll-timeline\",\"scroll-timeline-name\",\"scroll-timeline-axis\",\"view-timeline\",\"view-timeline-name\",\"view-timeline-axis\",\"view-timeline-inset\",\"timeline-scope\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scroll-margin-top\",\"scroll-margin-right\",\"scroll-margin-bottom\",\"scroll-margin-left\",\"scroll-margin-block\",\"scroll-margin-block-start\",\"scroll-margin-block-end\",\"scroll-margin-inline\",\"scroll-margin-inline-start\",\"scroll-margin-inline-end\",\"scroll-padding-top\",\"scroll-padding-right\",\"scroll-padding-bottom\",\"scroll-padding-left\",\"scroll-padding-block\",\"scroll-padding-block-start\",\"scroll-padding-block-end\",\"scroll-padding-inline\",\"scroll-padding-inline-start\",\"scroll-padding-inline-end\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],Cs=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\",\"scroll\",\"view\"],Is=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],Ds=[\"media\",\"supports\",\"container\",\"keyframes\"],Ms={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},Ls=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],$s=[\"-webkit-details-marker\"],Yt=64e3;var ne=t=>t>=48&&t<=57,Hs=t=>ne(t)||t>=65&&t<=70||t>=97&&t<=102,Jr=t=>t>=65&&t<=90||t>=97&&t<=122,Qr=t=>t>=128,er=t=>Jr(t)||Qr(t)||t===95,Us=t=>er(t)||ne(t)||t===45,Gs=t=>t===10,_e=t=>t===10||t===9||t===32,fa=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,Ee=-1;function pa(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function Xt(t){let e=pa(t),n=0,r=(u=0)=>n+u<e.length?e[n+u]:Ee,o=[],s=(u,y)=>u===92&&y!==10&&y!==Ee,i=(u,y,O)=>u===45?er(y)||y===45||s(y,O):er(u)?!0:s(u,y),a=(u,y,O)=>u===43||u===45?ne(y)||y===46&&ne(O):ne(u===46?y:u),l=()=>{let u=r();if(n+=1,u===Ee)return 65533;if(Hs(u)){let y=String.fromCodePoint(u);for(;y.length<6&&Hs(r());)y+=String.fromCodePoint(r()),n+=1;_e(r())&&(n+=1);let O=parseInt(y,16);return O===0||O>=55296&&O<=57343||O>1114111?65533:O}return u},c=()=>{let u=\"\";for(;;){let y=r();if(Us(y))u+=String.fromCodePoint(y),n+=1;else if(s(y,r(1)))n+=1,u+=String.fromCodePoint(l());else return u}},g=()=>{let u=\"\";for((r()===43||r()===45)&&(u+=String.fromCodePoint(e[n++]));ne(r());)u+=String.fromCodePoint(e[n++]);if(r()===46&&ne(r(1)))for(u+=String.fromCodePoint(e[n++],e[n++]);ne(r());)u+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(ne(r(1))||(r(1)===43||r(1)===45)&&ne(r(2))))for(u+=String.fromCodePoint(e[n++]),ne(r())||(u+=String.fromCodePoint(e[n++]));ne(r());)u+=String.fromCodePoint(e[n++]);return u},h=()=>{let u=g();return i(r(),r(1),r(2))?{type:\"dimension\",repr:u,unit:c()}:r()===37?(n+=1,{type:\"percentage\",repr:u}):{type:\"number\",repr:u}},w=()=>{for(;;){let u=r();if(n+=1,u===41||u===Ee)return;s(u,r())&&l()}},b=()=>{let u=\"\";for(;_e(r());)n+=1;for(;;){let y=r();if(n+=1,y===41)return{type:\"url\",value:u};if(y===Ee)return{type:\"url\",value:u};if(_e(y)){for(;_e(r());)n+=1;return r()===41||r()===Ee?(r()===41&&(n+=1),{type:\"url\",value:u}):(w(),{type:\"bad-url\"})}if(y===34||y===39||y===40||fa(y))return w(),{type:\"bad-url\"};if(y===92){if(s(y,r()))u+=String.fromCodePoint(l());else return w(),{type:\"bad-url\"};continue}u+=String.fromCodePoint(y)}},f=()=>{let u=c();if(u.toLowerCase()===\"url\"&&r()===40){for(n+=1;_e(r())&&_e(r(1));)n+=1;let y=_e(r())?r(1):r();return y===34||y===39?{type:\"function\",value:u}:b()}return r()===40?(n+=1,{type:\"function\",value:u}):{type:\"ident\",value:u}},R=u=>{let y=\"\";for(;;){let O=r();if(n+=1,O===u||O===Ee)return{type:\"string\",value:y};if(Gs(O))return n-=1,{type:\"bad-string\"};if(O===92){if(r()===Ee)continue;if(Gs(r())){n+=1;continue}y+=String.fromCodePoint(l());continue}y+=String.fromCodePoint(O)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==Ee&&!(r()===42&&r(1)===47);)n+=1;r()!==Ee&&(n+=2)}let u=r();if(u===Ee)return o;if(_e(u)){for(;_e(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,u){case 34:case 39:o.push(R(u));continue;case 35:if(Us(r())||s(r(),r(1))){let y=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),id:y})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(u,r(),r(1))?(n-=1,o.push(h())):o.push({type:\"delim\",value:String.fromCodePoint(u)});continue;case 44:o.push({type:\",\"});continue;case 45:a(u,r(),r(1))?(n-=1,o.push(h())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(u,r(),r(1))?(n-=1,o.push(f())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:c()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(u,r())?(n-=1,o.push(f())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:ne(u)?(n-=1,o.push(h())):er(u)?(n-=1,o.push(f())):o.push({type:\"delim\",value:String.fromCodePoint(u)})}}}var Bs={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Ys=32,qr=class{tokens;i=0;constructor(e){this.tokens=e}peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function Ws(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:js(t,Bs[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:js(t,\")\",e+1)}:n}function js(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Ys){t.next(),r.push({type:\"bad-string\"});continue}r.push(Ws(t,n))}}function wt(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let a=[];r+=1;let l;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\";\")break;if(c.type===\"block\"&&c.open===\"{\"){l=c.value;break}a.push(c)}n.push({type:\"at-rule\",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type===\"block\"&&a.open===\"{\"){i=a.value;break}s.push(a)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function eo(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let a=t[i];if(a.type===\";\"||a.type===\"block\"&&a.open===\"{\")return i+1}return t.length})();e.push(...wt(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let a=Xs(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((c,g)=>g>n&&c.type===\"block\"&&c.open===\"{\");e.push(...wt(t.slice(n,l+1),!1)),n=l+1;continue}e.push(a),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...wt(t.slice(n,o+1),!1)),n=o+1}return e}function Xs(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function to(t){let e=new qr(Xt(t)),n=[];for(;e.peek();)n.push(Ws(e,0));return n}function Nt(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&ne(r)||o===1&&ne(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Qr(r)||r===45||r===95||ne(r)||Jr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function tr(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Qr(r)||r===45||r===95||ne(r)||Jr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Wt(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function ma(t){let e=tr(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${tr(t.slice(1))}`:e}var zs=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function ga(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function ha(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Nt(t.value);case\"at-keyword\":return`@${Nt(t.value)}`;case\"hash\":return`#${tr(t.value)}`;case\"string\":return Wt(t.value);case\"url\":return`url(${Wt(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${ma(t.unit)}`;case\"func\":return`${Nt(t.name)}(${je(t.value)})`;case\"block\":return`${t.open}${je(t.value)}${Bs[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function je(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&ga(zs(n),zs(r))&&(e+=\"/**/\"),e+=ha(r),n=r);return e}var ya=new Set(Ps),qs=new Set(Cs),Fs=new Set(Is),ba=new Set(Ds),Ea=new Set(Ls),wa=new Set($s),Vs=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,ue=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Na=t=>ue(t);function Kr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&Fs.has(t)&&Vs.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=ue(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(c=>c.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&Fs.has(t)&&Vs.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!qs.has(s)){n({reason:\"function\",name:s});return}let i=Kr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=Kr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\")\"||o.type===\"]\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}var Ta=/^(animation|transition|scroll-behavior|outline)/,xa=\"--graview-ring-color\",Sa=\"--graview-focus-color\",va=t=>{let e=t.filter(r=>r.type!==\"whitespace\"),n=e[0];return e.length!==1||!n?!1:n.type===\"hash\"?/^(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.value):n.type===\"ident\"&&![\"transparent\",\"currentcolor\"].includes(ue(n.value))},ka=new Set([\"url\",\"src\",\"image-set\",\"-webkit-image-set\"]),Ks=t=>{for(let e of t){if(e.type===\"func\"&&ka.has(ue(e.name)))return ue(e.name);if(e.type===\"func\"||e.type===\"block\"){let n=Ks(e.value);if(n)return n}}};function rr(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:Na(t.name);if(o===xa||!r&&!ya.has(o)){e({reason:\"property\",name:o});return}if(o===Sa&&!va(t.value)){e({reason:\"value\",name:o});return}let s=Ms[o];if(s){let l=t.value.filter(h=>h.type!==\"whitespace\"),c=l[0],g=l.length===1&&c?.type===\"ident\"?ue(c.value):void 0;if(!g||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(g)){e({reason:\"value\",name:o});return}return`${o}: ${g}${t.important&&!(n&&o===\"all\")?\" !important\":\"\"}`}let i=Kr(r?void 0:o,t.value,e);if(!i)return;let a=je(i).trim();return`${r?`--${tr(t.name.slice(2))}`:o}: ${a}${t.important&&!(n&&Ta.test(o))?\" !important\":\"\"}`}var no=t=>t.some(e=>e.type===\"}\"||e.type===\";\"||e.type===\")\"||e.type===\"]\"||e.type===\"at-keyword\"||e.type===\"CDO\"||e.type===\"CDC\"||e.type===\"delim\"&&e.value===\"\\\\\"||(e.type===\"func\"||e.type===\"block\")&&no(e.value));function Zs(t,e){if(no(t))return e({reason:\"unreadable\",name:\"selector\"}),!1;let n=Ks(t);if(n)return e({reason:\"url\",name:n}),!1;let r=o=>{for(let s=0;s<o.length;s+=1){let i=o[s];if(s>0&&o[s-1].type===\":\"&&(i.type===\"ident\"||i.type===\"func\")){let l=ue(i.type===\"ident\"?i.value:i.name);if(Ea.has(l)||(l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))&&!wa.has(l))return e({reason:\"selector\",name:l}),!1}if(i.type===\"url\"||i.type===\"bad-url\"||i.type===\"bad-string\"||i.type===\"at-keyword\"||i.type===\"CDO\"||i.type===\"CDC\"||i.type===\"block\"&&i.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(i.type===\"func\"&&!r(i.value)||i.type===\"block\"&&!r(i.value))return!1}return!0};return r(t)}function Xr(t,e,n){let r=[];for(let o of eo(t))if(o.type===\"declaration\"){let s=rr(o,e);s&&r.push(`${s};`)}else{let s=nr(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Oa(t,e,n){if(no(t)){n({reason:\"unreadable\",name:`@${e}`});return}let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=ue(s.name);return e===\"supports\"&&i===\"selector\"?Zs(s.value,n):qs.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=eo(s.value);if(i.length===1&&i[0].type===\"declaration\")return rr(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?je(t).trim():void 0}function Zr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(Wr,ue(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:ue(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Zr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Zr(e.value)}:e})}function nr(t,e,n,r){if(n>Ys){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(g=>g.type===\"whitespace\"||g.type===\",\"||g.type===\"percentage\"||g.type===\"ident\"&&[\"from\",\"to\"].includes(ue(g.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${je(t.prelude).trim()} { ${Xr(t.block,e,n)} }`}if(!Zs(t.prelude,e))return;let l=je(Zr(t.prelude)).trim();if(l===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${l} { ${Xr(t.block,e,n)} }`}let o=ue(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!ba.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let l=t.prelude.filter(w=>w.type!==\"whitespace\"),c=l[0];if(l.length!==1||!c||c.type!==\"ident\"&&c.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let g=wt(t.block,!1).map(w=>nr(w,e,n+1,\"keyframes\")).filter(w=>w!==void 0);return`@keyframes ${c.type===\"ident\"?Nt(c.value):Wt(c.value)} { ${g.join(\" \")} }`}let i=Oa(t.prelude,s,e);if(i===void 0)return;let a=r===\"style\"?Xr(t.block,e,n):wt(t.block,!1).map(l=>nr(l,e,n+1,\"sheet\")).filter(l=>l!==void 0).join(\" \");return`@${s} ${i} { ${a} }`}function qt(t,e=Yt){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:wt(to(t),!0).map(s=>nr(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function or(t,e=Yt){let n=[],r=[],o=0;for(let s of t){if(o+s.length>e){r.push({reason:\"size\"});continue}o+=s.length;let i=qt(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function sr(t,e=Yt){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of eo(to(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=rr(s,r,!0);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function ir(t,e){let n,r=rr(Xs(t,to(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function Js(t,e){if(e===\"svg\"){let r=Kn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(bt,n)?Object.prototype.hasOwnProperty.call(Fr,n)?{namespace:\"html\",name:Fr[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function ar(t,e){return(t===\"html\"?bt[e]:Xn[e])?.empty===!0}var Aa=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Ra=/^[0-9A-Za-z\\s.,+\\-%()]*$/,_a=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Pa=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Ca=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Qs=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Ia=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Da(t,e){if(Ca.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if(Ia.test(n))return Qs.exec(n)?.[0]}function ei(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=ti(e.origins),s=Qs.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Ft?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${Ft.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${s}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?o.length>0?` Its origin is not one the host lists for images (${o.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",a=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${a.slice(0,-1).join(\", \")} or ${a[a.length-1]}.`}function ti(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function Ma(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:ti(e).includes(n.origin)?n.href:void 0}catch{return}}function ro(t,e,n,r,o){let s=Zn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&qn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=La(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200),...r.length>Ft?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>us.includes(a.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(a=>({reason:a.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:a}))}:{}}}function La(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>ms||!Ra.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>Ft)return o(\"url\");if(Pa.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?Da(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=Ma(n,r.imageOrigins);return a?{value:a}:o(\"url\")}if(e===\"link\"){let s=r.link?.(n);return s===void 0?o(\"url\"):{value:s}}if(n.length>Vr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return Aa.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return _a.test(n)?{value:n}:o(\"url\");case\"style\":{let s=sr(n,Vr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=ir(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var $a=\"http://www.w3.org/1999/xhtml\",Ha=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var lr=(t,...e)=>t.namespaceURI===$a&&e.includes(t.localName),Ua=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),Ga=t=>lr(t,\"textarea\",\"select\")||lr(t,\"input\")&&!Ha.has(Ua(t));function ni(t){if(lr(t,\"option\",\"optgroup\",\"datalist\"))return'An option is never pressed by itself: put data-act on its select, with data-save=\"change\", or on a button.';if(lr(t,\"label\"))return\"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.\";if(Ga(t)&&!t.hasAttribute(\"data-save\"))return'A click into a field to type or to pick is not a press: give it data-save (\"input\" or \"change\") to save it as it is typed, or put data-act on a button beside it.'}var ja=\"http://www.w3.org/1999/xhtml\",Tt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Ke?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},qe=class extends Tt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},oo=class extends Tt{nodeType=8;get textContent(){return\"\"}},Ke=class extends Tt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},so=class extends Tt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Ke(this,e,n)}createElement(e){return new Ke(this,ja,e)}createTextNode(e){return new qe(this,e)}createComment(e){return new oo(this)}};function ri(){let t=new so,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var za=new Set([\"video/mp4\",\"video/webm\",\"video/ogg\"]);function Fa(t,e){let n=t.poster===!0||typeof t.poster==\"string\"&&t.poster.length>0,r=za.has(t.type.toLowerCase()),o=!r&&!n?`its source is ${t.type}, which not every browser plays, and it has no poster`:r?n?void 0:\"it has no poster, so nothing stands before it plays or where a person asked for less motion\":`its source is ${t.type}, which not every browser plays`;return{record:e.record,field:e.field,text:typeof t.caption==\"string\"&&t.caption.trim()?t.caption.trim():t.name,name:t.name,source:t.type,...typeof t.duration==\"number\"?{duration:t.duration}:{},poster:n,autoplay:e.autoplay,cover:e.cover,playable:r&&n,...o?{why:o}:{}}}var io={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},oi=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),si=new Set([\"style\",\"template\",\"datalist\",\"option\"]),X=t=>t.replace(/\\s+/g,\" \").trim();function Va(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var de=t=>t instanceof Ke,Kt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function re(t){return t instanceof qe?t.data:!de(t)||Kt(t)||si.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(re).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}var Ba=/(\\s+[·•|—–-]\\s+)/;function Ya(t,e){if(!e||!t.includes(e))return t;let n=s=>s.length>0&&s.split(\" \").length<=3,r=X(t).split(Ba),o=[];for(let s=0;s<r.length;s+=2){let i=r[s],a=i.startsWith(`${e} `)?i.slice(e.length+1):void 0,l=i.endsWith(` ${e}`)?i.slice(0,-e.length-1):void 0,c=i===e?\"\":a!==void 0&&n(a)?a:l!==void 0&&n(l)?l:i;c&&o.push(...o.length>0?[r[s-1]]:[],c)}return o.join(\"\")}function ii(t,e,n){let r=[];for(let o of t){if(o.t===\"list\"&&o.groups.every(s=>s.items.every(i=>i.id===e&&i.title===n))){r.push(...ii(o.groups.flatMap(s=>s.items.flatMap(i=>i.parts)),e,n));continue}if(o.t===\"text\"){let s=Ya(o.text,n);s&&r.push(s===o.text?o:{...o,text:s});continue}r.push(o)}return r}function*Ze(t){for(let e of t.childNodes)de(e)&&(yield e,yield*Ze(e))}function Wa(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let a=t;a;a=a.parentElement)a.getAttribute(\"data-record\")!==null&&(i=!0),a!==t&&(a.localName===\"fieldset\"||a.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function Xa(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(c=>c.kind===r),a=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):a!==null&&!i.some(c=>c.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(c=>`\"${c.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let c=l.indexOf(\":\"),g=c>0?l.slice(c+1):\"\";c<=0||g===\"\"||n.has(l)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${l}\"${n.has(l)?\", which names a record and no relation\":\"\"}.`}):n.has(g)||s.push({at:o,says:`data-drop-connect names \"${g}\", which this seat was not shown: the host offers no drop target here.`})}return s}function ai(t,e){let n=[],r=new Set,o=new Set,s=[],i=new Map;for(let f of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])i.set(f.id,f);let a=f=>Vt(e.places,f)!==void 0;for(let f of Ze(t)){let R=f.getAttribute(\"data-act\");R!==null&&r.add(R);let u=R!==null&&f.getAttribute(\"data-debounce\")===null?ni(f):void 0;u&&n.push({at:`drawing <${f.localName} data-act=\"${R}\">`,says:u});let y=f.getAttribute(\"data-record\");y!==null&&(o.add(y),!i.has(y)&&!a(y)&&n.push({at:`drawing <${f.localName} data-record=\"${y}\">`,says:e.placesUnsure?`It names \"${y}\", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(e.places)}${Et}`:`It names \"${y}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${xe(e.places)}`}));let O=f.getAttribute(\"data-place\");O!==null&&!a(O)&&n.push({at:`drawing <${f.localName} data-place=\"${O}\">`,says:e.placesUnsure?`It names the place \"${O}\", which is none of the places this run was told of.${xe(e.places)}${Et}`:`It names the place \"${O}\", which this app does not have.${xe(e.places)}`}),n.push(...Wa(f)),n.push(...Xa(f,e,i))}let l=f=>{if(f.localName===\"graview-video\")return;let R=f.getAttribute(\"data-record\");if(R!==null)return R;let u=f.getAttribute(\"data-key\")??f.getAttribute(\"id\");if(u!==null&&i.has(u))return u;let y=new Set;for(let O of Ze(f)){let p=O.getAttribute(\"data-record\");p!==null&&O.localName!==\"graview-video\"&&y.add(p)}return y.size===1?[...y][0]:void 0},c=(f,R)=>{let u=i.get(R),y=u?.kind??(R.includes(\":\")?R.slice(0,R.indexOf(\":\")):\"\"),O=[...Ze(f)],p=O.find(x=>x.localName in io)??O.find(x=>x.localName===\"a\"&&x.getAttribute(\"data-record\")===R)??O.find(x=>x.localName===\"strong\"||x.localName===\"b\"),E=X(p?re(p):\"\")||u?.label||R;return{id:R,kind:y,title:E,parts:ii(h(f,p),R,E)}},g=f=>{let R=[...Ze(f)].filter(p=>p.localName===\"tr\"&&!Kt(p)),u=R.find(p=>p.parentElement?.localName===\"thead\"||p.childNodes.every(E=>!de(E)||E.localName===\"th\")),y=u?u.childNodes.filter(de).map(p=>X(re(p))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:R.filter(p=>p!==u).map(p=>{let E=p.childNodes.filter(de),x=l(p),m=x?i.get(x):void 0;return{id:x??\"\",kind:m?.kind??\"\",title:X(re(E[0]??p)),parts:E.slice(1).map((k,N)=>({t:\"field\",label:y[N+1]??\"\",text:X(re(k))}))}})}]}};function h(f,R){let u=[],y=\"\",O=()=>{let E=X(y);y=\"\",E&&u.push({t:\"text\",text:E})},p=f.childNodes;for(let E=0;E<p.length;E+=1){let x=p[E];if(x===R)continue;if(x instanceof qe){y+=x.data;continue}if(!de(x)||Kt(x)||si.has(x.localName))continue;if(R&&[...Ze(x)].includes(R)){O(),u.push(...h(x,R));continue}let m=[];for(let k=E;k<p.length;k+=1){let N=p[k];if(N instanceof qe&&X(N.data)===\"\")continue;if(!de(N)||Kt(N)||oi.has(N.localName)||N.localName in io)break;let C=l(N);if(!C)break;m.push({element:N,id:C}),E=k}if(m.length>0){O();let k=m.every(N=>N.element.localName===\"li\"||N.element.localName===\"tr\");u.push({t:\"list\",as:k?\"row\":\"card\",columns:1,groups:[{items:m.map(N=>c(N.element,N.id))}]});continue}u.push(...w(x,k=>y+=k,O))}return O(),u}function w(f,R,u){let y=f.localName;if(oi.has(y)&&y!==\"label\")return R(re(f)),[];if(y===\"mark\"){u();let p=X(re(f));return p?[{t:\"badge\",text:p}]:[]}u();let O=io[y]??(f.getAttribute(\"role\")===\"heading\"?Number(f.getAttribute(\"aria-level\")??2):void 0);if(O!==void 0){let p=X(re(f));return p?[{t:\"heading\",level:O,text:p}]:[]}switch(y){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(E=>de(E)&&E.localName===\"li\"&&!Kt(E)).map(E=>{let x=l(E);if(x)return c(E,x);let m=h(E),k=m[0],N=k&&(k.t===\"text\"||k.t===\"heading\")?k.text:\"\";return{id:\"\",kind:\"\",title:N,parts:N?m.slice(1):m}})}]}];case\"table\":return[g(f)];case\"dl\":{let p=[],E=\"\";for(let x of f.childNodes.filter(de))if(x.localName===\"dt\")E=X(re(x));else if(x.localName===\"dd\")p.push({t:\"field\",label:E,text:X(re(x))});else if(x.localName===\"div\")for(let m of x.childNodes.filter(de))m.localName===\"dt\"?E=X(re(m)):m.localName===\"dd\"&&p.push({t:\"field\",label:E,text:X(re(m))});return p}case\"figure\":{let p=f.childNodes.find(m=>de(m)&&m.localName===\"figcaption\"),E=X(f.childNodes.filter(m=>m!==p).map(re).join(\" \")),x=p?X(re(p)):\"\";return E?[{t:\"figure\",text:E,...x?{label:x}:{}}]:x?[{t:\"text\",text:x}]:[]}case\"meter\":case\"progress\":{let p=Number(f.getAttribute(\"value\")??0),E=Number(f.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:f.getAttribute(\"aria-label\")??f.getAttribute(\"title\")??\"\",text:`${Math.round(p/E*100)}%`}]}case\"svg\":{let p=f.childNodes.find(m=>de(m)&&m.localName===\"title\"),E=X(f.getAttribute(\"aria-label\")??(p?re(p):\"\"));if(E)return[{t:\"text\",text:E,tone:\"picture\"}];let x=[...Ze(f)].filter(m=>m.localName===\"text\").map(m=>X(re(m))).filter(Boolean);return x.length>0?[{t:\"text\",text:x.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let p=X(f.getAttribute(\"alt\")??\"\");return p?[{t:\"text\",text:p,tone:\"picture\"}]:[]}case\"graview-video\":{let p=f.getAttribute(\"data-field\")??\"\",E=f.getAttribute(\"data-record\")??\"\",x=i.get(E),m=x&&p&&Object.hasOwn(x,p)?x[p]:void 0,k=(Array.isArray(m)?m:[m])[Number(f.getAttribute(\"data-index\")??\"0\")];if(!k||typeof k.name!=\"string\"||typeof k.type!=\"string\"||!k.type.startsWith(\"video/\"))return n.push({at:`drawing <graview-video data-field=\"${p}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[];let N=Fa(k,{record:E,field:p,autoplay:f.getAttribute(\"autoplay\")!==null,cover:f.getAttribute(\"cover\")!==null});s.push(N);let C=N.autoplay?`, playing as a background, muted and looping${N.cover?\", filling its box\":\"\"}`:\"\";return[{t:\"text\",text:`${N.text}, ${Va(N.duration!==void 0?{duration:N.duration}:{})}${C}`,tone:\"picture\"}]}case\"button\":{let p=X(re(f));return p?[{t:\"text\",text:p,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let p=X(f.getAttribute(\"aria-label\")??f.getAttribute(\"placeholder\")??f.getAttribute(\"name\")??\"\"),E=y===\"select\"?X(re(f.childNodes.find(x=>de(x)&&x.localName===\"option\"&&x.selected)??f)):f.value;return[{t:\"field\",label:p,text:E}]}case\"label\":return h(f);default:return h(f)}}return{parts:h(t),problems:n,acts:[...r],records:[...o],videos:s}}var qa=0,Ka=1,Za=2,Ja=3,li=1,Qa=2,ci=3,el=1,tl=3,nl=8,di=\"~\",Zt=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ui=new Set([\"input\",\"select\",\"textarea\",\"option\"]),rl=new Set([\"value\",\"checked\",\"selected\"]),fi=[\"aria-label\",\"aria-labelledby\",\"title\"],ol=t=>fi.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function pi(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,a={dom:t,name:\"div\",namespace:\"html\",children:[],id:di};s.set(di,a);let l=0,c=!1,g=new WeakMap,h=new Map,w=new Map,b=m=>{o.push(m),o.length>200&&o.shift(),e.onRefused?.(m)},f=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),R=(m,k)=>{if(m.namespace===\"html\"&&m.name&&ui.has(m.name))return m.dom;if(k?.namespace===\"html\"&&k.name===\"textarea\")return k.dom},u=(m,k)=>{let N=m.dom,C=g.get(N)??N.getAttribute(\"role\");if(C===null||!C.split(/\\s+/).some(P=>fs.includes(P.toLowerCase())))return void g.delete(N);if(ol(N)){g.delete(N),N.getAttribute(\"role\")!==C&&N.setAttribute(\"role\",C);return}g.set(N,C),N.removeAttribute(\"role\"),k&&b({reason:\"value\",element:m.name,name:\"role\"})},y=()=>{if(w.size===0)return;let m=new Set,k=N=>{for(let C of N.children){if(C.refused||C.text)continue;let P=C.dom.getAttribute(\"id\");P&&m.add(P),k(C)}};k(a);for(let[N,C]of w){if(N.id===void 0||s.get(N.id)!==N){w.delete(N);continue}let P=N.dom;for(let[v,j]of C){let $=j.value.split(/\\s+/).filter(J=>J!==\"\"),V=$.filter(J=>!m.has(J));if($.length>0&&V.length===0){if(j.drawn)continue;j.drawn=!0,P.setAttribute(v,j.value),u(N,!1)}else j.drawn&&(j.drawn=!1,P.removeAttribute(v),b({reason:\"reference\",element:N.name,name:v,ids:V.length>0?V:$}),u(N,!0))}}},O=(m,k,N,C=!0)=>{let P=m.dom;if(N!=null&&typeof N!=\"string\")return b({reason:\"value\",element:m.name,name:k});let v=ro(m.namespace,m.name,k,N??null,e);if(\"refused\"in v){let J=ro(m.namespace,m.name,k,null,e);return\"refused\"in J||P.removeAttribute(J.name),!(\"refused\"in J)&&J.name===\"role\"&&g.delete(P),b(v.refused)}for(let J of v.dropped??[])b(J);let j=m.namespace===\"html\"&&rl.has(v.name)&&ui.has(m.name),$=P,V=j?v.name===\"value\"?$.value:v.name===\"checked\"?$.checked:$.selected:void 0;if(v.name===\"role\"&&g.delete(P),ps.includes(v.name)){let J=w.get(m)??new Map;v.value===null?J.delete(v.name):J.set(v.name,{value:v.value,drawn:!0}),J.size>0?w.set(m,J):w.delete(m)}v.value===null?P.removeAttribute(v.name):P.setAttribute(v.name,v.value),C&&(v.name===\"role\"||fi.includes(v.name))&&u(m,v.name===\"role\"),e.onAttribute?.(P,v.name),j&&(v.name===\"value\"&&\"value\"in $?($.value=v.value??\"\",V!==$.value&&e.onFieldSet?.(P)):v.name===\"checked\"&&\"checked\"in $?($.checked=v.value!==null,V!==$.checked&&e.onFieldSet?.(P)):v.name===\"selected\"&&\"selected\"in $&&($.selected=v.value!==null,V!==$.selected&&e.onFieldSet?.(P.parentElement?.closest(\"select\")??P)))},p=m=>{if(!m.refused){l-=1,m.id!==void 0&&s.delete(m.id);for(let k of m.children)p(k)}},E=(m,k)=>{if(!Zt(m)||typeof m.id!=\"string\"||s.has(m.id))return b({reason:\"record\"}),f();if(l>=r)return b({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),f();let N=m.id;if(m.type===nl)return f();if(m.type===tl){if(ar(k.namespace,k.name))return b({reason:\"child\",element:k.name}),f();let $=n.createTextNode(String(m.data??\"\").slice(0,Br)),V={dom:$,children:[],text:!0,id:N,parent:k};return s.set(N,V),i.set($,N),l+=1,V}if(m.type!==el)return b({reason:\"record\"}),f();let C=String(m.element);if(ar(k.namespace,k.name))return b({reason:\"child\",element:C}),f();let P=Js(C,k.namespace);if(\"refused\"in P)return b(P.refused),f();let v=n.createElementNS(P.namespace===\"svg\"?hs:gs,P.name);P.as&&v.setAttribute(\"data-graview-as\",P.as),P.namespace===\"html\"&&P.name===\"img\"&&v.setAttribute(\"referrerpolicy\",\"no-referrer\"),P.namespace===\"html\"&&P.name===\"a\"&&(v.setAttribute(\"target\",\"_blank\"),v.setAttribute(\"rel\",\"noopener noreferrer\"),v.setAttribute(\"referrerpolicy\",\"no-referrer\"));let j={dom:v,name:P.name,namespace:P.namespace,children:[],id:N,parent:k};if(s.set(N,j),i.set(v,N),l+=1,Zt(m.attributes)){for(let[$,V]of Object.entries(m.attributes))O(j,$,V,!1);u(j,!0)}if(e.decorate?.(v,P.name,P.namespace),Zt(m.properties))for(let $ of Object.keys(m.properties))b({reason:\"attribute\",element:P.name,name:$});if(Zt(m.eventListeners))for(let $ of Object.keys(m.eventListeners))m.eventListeners[$]!=null&&b({reason:\"attribute\",element:P.name,name:`on${$}`});if(Array.isArray(m.children))for(let $ of m.children){let V=E($,j);j.children.push(V),v.appendChild(V.dom)}return j},x=m=>{if(!Array.isArray(m))return b({reason:\"record\"});let[k,N]=m,C=typeof N==\"string\"?s.get(N):void 0;if(!C)return b({reason:\"record\"});switch(k){case qa:{if(C.text)return b({reason:\"record\"});let P=Number(m[3]),v=Number.isInteger(P)&&P>=0&&P<=C.children.length?P:C.children.length,j=m[2],$=Zt(j)&&typeof j.id==\"string\"?h.get(j.id):void 0,V;$&&$.parent?.namespace===C.namespace&&!ar(C.namespace,C.name)?(h.delete(j.id),$.parent=C,V=$):V=E(j,C),C.dom.insertBefore(V.dom,C.children[v]?.dom??null),C.children.splice(v,0,V),C.namespace===\"html\"&&C.name===\"textarea\"&&e.onFieldSet?.(C.dom);return}case Ka:{let P=Number(m[2]),v=C.children[P];if(!v)return b({reason:\"record\"});C.children.splice(P,1),v.dom.parentNode?.removeChild(v.dom),v.id!==void 0&&!v.refused?h.set(v.id,v):p(v);return}case Za:{if(!C.text)return b({reason:\"record\"});C.dom.data=String(m[2]??\"\").slice(0,Br);let P=R(C,C.parent);P&&e.onFieldSet?.(P);return}case Ja:{if(C===a||C.text)return b({reason:\"record\"});let P=String(m[2]),v=m[4]??li;return v===Qa?O(C,P,m[3]):b(v===li||v===ci?{reason:\"attribute\",element:C.name,name:v===ci?`on${P}`:P}:{reason:\"record\"})}default:return b({reason:\"record\"})}};return{apply(m,k){if(!Array.isArray(m))return b({reason:\"record\"}),!0;try{for(let N=0;N<m.length;N+=1){if(k&&N%32===0&&k())return!1;x(m[N])}return!0}finally{for(let N of h.values())p(N);h.clear(),y()}},get refused(){return o},get size(){return l},idOf:m=>i.get(m),elementOf(m){let k=s.get(m);return k&&!k.text&&k!==a?k.dom:void 0},dispose(){for(let m of a.children)p(m);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}var sl=\"@layer graview-motion, graview-region, graview-view, graview-theme;\",il=new Set([\"media\",\"supports\",\"container\",\"keyframes\",\"-webkit-keyframes\"]),al=new Set([\"src\",\"image-set\",\"-webkit-image-set\"]),ll={\"}\":\"{\",\")\":\"(\",\"]\":\"[\"};function gi(t){let e=[],n=Xt(t);for(let[r,o]of n.entries())switch(o.type){case\"bad-string\":case\"bad-url\":case\"url\":case\"CDO\":case\"CDC\":return!1;case\"delim\":if(o.value===\"\\\\\")return!1;break;case\"at-keyword\":if(!il.has(o.value.toLowerCase()))return!1;break;case\";\":if(e.length===0)return!1;break;case\"function\":{let s=o.value.toLowerCase();if(al.has(s))return!1;if(s===\"url\"){let i=n[r+1];if(i?.type!==\"string\"||!i.value.startsWith(\"#\"))return!1}e.push(\"(\");break}case\"{\":case\"(\":case\"[\":e.push(o.type);break;case\"}\":case\")\":case\"]\":if(e.pop()!==ll[o.type])return!1;break;default:}return e.length===0}function mi(t,e){return e.trim()===\"\"||!gi(e)?\"\":`@layer ${t} {\n${e}\n}`}function hi(t,e){return t.trim()===\"\"?gi(e)?e:\"\":[sl,mi(\"graview-theme\",t),mi(\"graview-view\",e)].filter(n=>n!==\"\").join(`\n`)}function yi(t,e,n){let{root:r}=ri(),o=!1,s=pi(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let g of t)s.apply(g);let i=[...s.refused],a=\"\";if(e){let g=or(e);a=g.css;for(let h of g.refused)i.push({reason:\"css\",name:\"stylesheet\",css:h})}let l=n.theme?qt(n.theme).css:\"\",c=hi(l,a);return{root:r,refused:i,size:s.size,over:o,css:c,elementOf:g=>s.elementOf(g),idOf:g=>s.idOf(g)}}var cr=\" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.\",bi={animate:cr,animateTransform:cr,animateMotion:cr,set:cr,feImage:\" It loads an image: a filter here is made of the view's own pixels.\",\"@property\":\" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.\",\"a href\":\" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.\",role:` A role of the app's chrome or notices is the app's; role=\"region\" is drawn while it has a name (aria-label).`};function cl(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(bi,s)?bi[s]:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${o(\"element\"in t?t.element:void 0)}`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.${o(`${\"element\"in t?t.element:\"\"}${r}`)}`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.${o(t.name)}`};case\"url\":return\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${_s(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${ei(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"reference\":{let s=\"ids\"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`\"${a}\"`).join(\", \"):\"no id\";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"}${r} names ${i}, ${s.length===1?\"which is\":\"which are\"} no element of this view. It names elements the view draws itself, by their id (<h2 id=\"\\u2026\">), drawn once each is there.`}}case\"css\":return{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.${o(t.css?.name)}`}}}function Ei(t,e,n={}){let{limits:r}=e;if(t.messages>r.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${r.messages} a view may send in a second.`};let o=new Set(e.acts);for(let h of t.asked)if(!o.has(h.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${h.name}\", which its manifest does not name.`};let s=Os(e.props),i=yi(t.renders,t.sheets,{maxNodes:r.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:h=>h}:{},...n.theme?{theme:n.theme}:{},link:h=>Rs(h,{handed:s,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(i.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${r.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let a=[...e.places,...(e.lists??[]).filter(h=>!e.places.some(w=>w.as===h)).map(h=>({as:h}))],l=e.placesUnsure===!0,c=ai(i.root,{props:e.props,places:a,...l?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let h of c.acts)if(!o.has(h))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${h}\" (data-act), which its manifest does not name.`};let g=[...i.refused.map(h=>cl(h,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...c.problems];for(let h of t.went)\"record\"in h&&!(e.props.node?.id===h.record||(e.props.nodes??[]).some(w=>w.id===h.record)||Vt(a,h.record))&&g.push({at:\"navigate\",says:l?`It goes to ${Bt(h.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(a)}${Et}`:`It goes to ${Bt(h.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${xe(a)}`}),\"place\"in h&&!Vt(a,h.place)&&g.push({at:\"navigate\",says:l?`It goes to the place ${Bt(h.place)}, which is none of the places this run was told of.${xe(a)}${Et}`:`It goes to the place ${Bt(h.place)}, which this app does not have.${xe(a)}`});return{ok:!0,parts:c.parts,problems:g,drawn:i,videos:c.videos}}var ao=\"graviewHeadless\",lo=\"graviewHeadlessView\";var Ti=globalThis,dl=Promise.prototype.then,ul=Promise.resolve(),Jt=t=>void dl.call(ul,t),dr=Ti.performance,Qt=dr&&typeof dr.now==\"function\"?dr.now.bind(dr):Date.now,Je=JSON.stringify,xi=JSON.parse,fl=Object.defineProperty,ur=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),xt=t=>{try{return xi(Je(t??null))}catch{return null}},F={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},Se,en=(t,e)=>{Se??={reason:t,detail:e}},Qe=t=>{F.logs.length<50&&F.logs.push(t.slice(0,500))},St={removed:[],stuck:[],sealed:!1},co=new Map,et=xs({send(t){if(F.messages+=1,t.type===\"mine\"){let e=t.id,n=t.op===\"set\"?Qo(t.key,t.value):void 0;n?Qe(n):t.op===\"set\"&&t.value===null?co.delete(t.key):t.op===\"set\"&&co.set(t.key,t.value),Jt(()=>et.hear(n?{type:\"mine-answer\",id:e,ok:!1,sentence:n}:{type:\"mine-answer\",id:e,ok:!0,...t.op===\"get\"?{value:co.get(t.key)??null}:{}}))}else t.type===\"render\"?F.renders.push(xt(t.records)):t.type===\"style\"?F.sheets=(xt(t.sheets)??[]).map(String):t.type===\"gestures\"?F.gestures=xt(t.bound):t.type===\"navigate\"&&\"place\"in t?F.went.push({place:String(t.place),...t.where!==void 0?{where:xt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&F.went.push({record:String(t.to),...t.where!==void 0?{where:xt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return F.messages+=1,F.asked.push({name:String(t),args:xt(e)}),Promise.resolve({type:\"answer\",id:F.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){F.messages+=1,F.went.push({record:String(t)})},microtask:Jt,now:Qt,threw:t=>en(\"error\",`It threw: ${ur(t)}`),warn:Qe,hardening:()=>St}),wi=!1,uo=!1;function pl(t){if(uo||typeof t!=\"function\"||(uo=!0,Se))return;let e=Qt();try{t.call(void 0,et.view)}catch(n){en(\"error\",`It threw: ${ur(n)}`)}F.ms+=Qt()-e}async function ml(t){if(wi)return Je({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});wi=!0;let e;try{e=xi(String(t))}catch{return Je({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!uo&&!Se)return Je({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=Qt();Se||et.hear({type:\"props\",props:e.props,push:1}),F.ms+=Qt()-n,F.ms>=e.limits.pushMs&&en(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!Se;o+=1)await new Promise(s=>Jt(s));if(Se||(F.clicks=et.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!Se){let o=typeof e.press.target==\"string\"?e.press.target:et.find(e.press.selector);if(F.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:F.asked.length,went:F.went.length,renders:F.renders.length},o!==void 0){try{et.hear({type:\"dom-event\",target:o,event:\"click\"})}catch(s){en(\"error\",`It threw: ${ur(s)}`)}for(let s=0;s<64&&!Se;s+=1)await new Promise(i=>Jt(i))}}if(Se)return Je({ok:!1,...Se,transcript:F});let r=Ei(F,e);return r.ok?Je({ok:!0,transcript:F,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:St.removed.length,sealed:St.sealed}}):Je({ok:!1,reason:r.reason,detail:r.detail,transcript:F})}var gl=Object.freeze({log:(...t)=>Qe(t.map(String).join(\" \")),info:(...t)=>Qe(t.map(String).join(\" \")),debug:(...t)=>Qe(t.map(String).join(\" \")),warn:(...t)=>Qe(t.map(String).join(\" \")),error:(...t)=>Qe(t.map(ur).join(\" \"))}),hl=0,Ni=()=>hl+=1,yl=[[\"console\",gl],[\"setTimeout\",Ni],[\"setInterval\",Ni],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Jt],[\"graview\",et.view],[lo,pl],[ao,t=>ml(t)]];for(let[t,e]of yl)fl(Ti,t,{value:e,writable:!0,enumerable:!1,configurable:!0});St=as(globalThis,[\"graview\",lo,ao],{primitivesStay:!0});St.stuck.length>0&&en(\"refused\",`This isolate could not be hardened: ${St.stuck.join(\", \")} would not go.`);})();\n";
|
|
7
|
+
export const HEADLESS_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 L=Symbol(\"name\"),Ie=Symbol(\"prefix\"),De=Symbol(\"value\"),$=Symbol(\"ns\"),se=Symbol(\"owner\"),W=Symbol(\"owner_document\"),Te=Symbol(\"attributes\"),Y=Symbol(\"prev\"),C=Symbol(\"next\"),F=Symbol(\"child\"),ie=Symbol(\"parent\"),Me=Symbol(\"host\"),me=Symbol(\"data\"),Ve=Symbol(\"listeners\"),_r=Symbol(\"isTrusted\"),ot=Symbol(\"path\"),st=Symbol(\"stop_immediate_propagation\"),it=Symbol(\"dispatching\"),Ae=Symbol(\"content\"),X=Symbol(\"hooks\"),ln=Symbol(\"extensions\"),Be=Symbol(\"hooks_dispatch\"),Q=Symbol(\"is_connected\"),at=Symbol(\"create_element\"),Bo=0,le=1,lt=2,ct=3,dt=8,We=9,Wo=10,Le=11,G=\"http://www.w3.org/1999/xhtml\",he=\"http://www.w3.org/2000/svg\",Yo=\"http://www.w3.org/XML/1998/namespace\",Rt=\"http://www.w3.org/2000/xmlns/\";function cn(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function Z(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Xo(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function j(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 qo=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Ko=/[\\0\\t\\n\\f\\r />=]/u,ua=/[\\0\\t\\n\\f\\r />]/u;function Oe(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Zo(t){qo.test(t)||Cr(t)}function Pr(t){(t===\"\"||Ko.test(t))&&Cr(t)}function dn(t,e,n){let r=Oe(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||ua.test(i))||(n===\"element\"?!qo.test(a):a===\"\"||Ko.test(a)))&&Cr(o),i!=null&&r==null)throw j(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Yo)throw j(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Rt)throw j(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Rt&&o!==\"xmlns\"&&i!==\"xmlns\")throw j(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function Cr(t){throw j(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var un=0,fn=1,Jo=2,Ir=3,fa=typeof performance>\"u\"?Date.now:performance.now.bind(performance),ee=class{static NONE=un;static CAPTURING_PHASE=fn;static AT_TARGET=Jo;static BUBBLING_PHASE=Ir;timeStamp=fa();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=un;[ot]=[];[st]=!1;[it]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,_r,{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[_r]}composedPath(){return[...this[ot]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[st]=!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 Dr(t,e,n){if(t.cancelBubble)return;let o=e[Ve]?.get(t.type)?.[n===fn?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Jo:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(pa,0,a)}if(t[st])break}}function pa(t){throw t}var _t=[],pn=new WeakMap;function mn(t,e){let n=pn.get(t);n?n.push(e):pn.set(t,[e]),_t[_t.length-1].push(t)}function te(t){let e=[];_t.push(e);let n;try{n=t()}catch(r){_t.pop();try{Qo(e)}catch{}throw r}return _t.pop(),Qo(e),n}function Qo(t){let e,n=!1;for(let r of t){let o=pn.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}pn.delete(r)}}if(n)throw e}var hn=[],Pt=[],Mr=!1;function Ye(t){for(let e of t)hn.push(e),e[1]&&Pt.push(e[1]);if(!Mr){Mr=!0;try{let e,n=!1;for(let r=0;r<hn.length;r++){let[o,s]=hn[r];s&&Pt.splice(Pt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{hn.length=0,Pt.length=0,Mr=!1}}}function Ct(t){let e=t;for(;e;){if(Pt.includes(e))return!0;e=e[ie]??e[Me]}return!1}var It=Symbol(\"listenerRegistrations\"),$e=class{[Ve]=void 0;[It]=void 0;[W]=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 a=Lr(o),l=this[It];l||(l=new Map,this[It]=l);let c=l.get(e);c||(c={},l.set(e,c));let y=c[a];if(y||(y=new Map,c[a]=y),y.has(n))return;let m=this,E={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(E.normalizedListener=function(...b){if(E.signal?.aborted){gn(m,E);return}return E.once&&gn(m,E),typeof E.listener==\"object\"?E.listener.handleEvent(...b):E.listener.call(this,...b)});let p=this[Ve];p||(p=new Map,this[Ve]=p);let f=p.get(e);f||(f={},p.set(e,f));let k=f[a];if(k||(k=new Set,f[a]=k),y.set(n,E),k.add(E),i){let u=()=>{gn(m,E)};E.abortListener=u,i.addEventListener(\"abort\",u,{once:!0})}this[W]?.defaultView[Be].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return ma.call(this,e,n,r)}dispatchEvent(e){if(e[it])throw j(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[it]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ot]=n;for(let s=n.length;s--;)if(Dr(e,n[s],fn),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Dr(e,o[s],Ir),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[it]=!1,e.cancelBubble=!1,e[st]=!1,e.eventPhase=un,e.currentTarget=null,e[ot]=[]}}};function ma(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Lr(!!r),s=this[It]?.get(t)?.[o]?.get(e);s&&gn(this,s)}function Lr(t){return t?\"capture\":\"bubble\"}function gn(t,e){let n=Lr(e.capture),r=t[It],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[Ve],a=i?.get(e.type);if(!a)return;let l=a[n];l?.delete(e)&&(l.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[W]?.defaultView[Be].removeEventListener?.(t,e.type,e.listener,e.capture))}var ge=class extends Array{item(e){return this[e]??null}};var Mt=0,es=1,Fr=2,Ur=3,Lt=4,ts=0,ns=1,En=2,wn=3,rs=4,Hr=5,os=6,ss=7,yn=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function ha(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 ae(t){throw j(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Nn(t,e){let n=typeof e==\"string\"?$t(e):[{combinator:Lt,matchers:e}],r=null,o=t[F];return o&&n[0].matchers.length&&Gr(o,n,s=>(r=s,!1)),r}function Tn(t,e){let n=typeof e==\"string\"?$t(e):[{combinator:Lt,matchers:e}],r=new ge,o=t[F];return o&&n[0].matchers.length&&Gr(o,n,s=>{r.push(s)}),r}function $t(t,e=!1,n=!1){let r={combinator:Lt,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===\"\"&&ae(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ae(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ae(t),l[1]===\">\"?r.combinator=es:l[1]===\"+\"?r.combinator=Ur:l[1]===\"~\"?r.combinator=Fr:r.combinator=Mt,r={combinator:Lt,matchers:[]},o.push(r));let c=l[8]?Z(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ae(t);let m,E=l[4]??l[5]??l[7];if(l[2]){yn.test(c)||ae(t);let p=l[5],f=p?.[0];if(l[3]==null&&(f==='\"'||f===\"'\")){let k=l[0].lastIndexOf(p);E=i.slice(l.index+k+1),s.lastIndex=i.length}else p!=null&&!yn.test(p)&&ae(t);m=rs}else l[6]?(yn.test(c)||ae(t),m=l[6]===\"#\"?En:wn):l[8]?m=l[9]==null?Hr:os:l[7]===\"*\"?m=ts:l[7]&&yn.test(l[7])?m=ns:ae(t);l[9]?([E,s.lastIndex]=ha(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&ae(t),c===\"has\"&&e&&ae(t),$t(E,e||c===\"has\",c===\"has\")):m===Hr&&ae(t),r.matchers.push({type:m,name:c,value:E}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ae(t),o}function ga(t,e){let n=$t(e);return n[0]?.matchers.length?Dt(t,n):!1}function ya(t,e){let n=$t(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Mt,s={type:ss,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Mt,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===Ur||o===Fr?t[C]:t[F];if(!i)return!1;let a=!1;return Gr(i,n,()=>(a=!0,!1),t),a}function Gr(t,e,n,r){let o=[],s=t;for(;s;){if(oe(s)){if(Dt(s,e,r)&&n(s)===!1)return!1;let i=s[F];if(i){let a=s[C];a&&o.push(a),s=i;continue}}s=s[C]??o.pop()??null}return!0}function Dt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Lt){if(!bn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Dt(t,a,n)}let s=r===es||r===Mt?ie:Y,i=t[s];if(!i)return!1;if(r===Mt||r===Fr){for(;i;){if(oe(i)&&bn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Dt(i,a,n))return!0}i=i[s]}return!1}else{if(r===Ur&&!oe(i)){for(;i&&!oe(i);)i=i[s];if(!i)return!1}if(!oe(i)||!bn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Dt(i,a,n)}}function $r(t,e){return t.getAttributeNS(null,t.namespaceURI===G?Z(e):e)}function bn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(bn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case ts:return o===\"*\";case ns:return t.namespaceURI===G?t.localName===Z(o):t.localName===o;case En:return $r(t,\"id\")===o;case wn:let i=$r(t,\"class\");return i?cn(i).includes(o):!1;case rs:let a=$r(t,o);return s==null?a!=null:a===s;case ss:return t===n;case Hr:ae(`:${o}`);case os:switch(o){case\"has\":return ya(t,s||\"\");case\"not\":return!ga(t,s||\"\");default:ae(`:${o}(${s})`)}}return!1}function ba(t){return t.nodeType===lt}function Ht(t){return me in t}function zr(t){return t.nodeType===ct}function Ea(t){return t.nodeType===dt}function oe(t){return t.nodeType===le}function jr(t){return t.nodeType===Le}function cs(t){return\"appendChild\"in t}function xn(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 a=[];for(let l of Ut(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!oe(l)))continue;let c=l[Te];if(c)for(let m of c)o.has(m)||(o.add(m),e.push(m));let y=l[Ae];y&&!o.has(y)&&!r.has(y)&&(r.add(y),n.push(y))}s??=a}return{nodes:e,treeNodes:s}}function Ft(t,e){for(let n of t)n[W]=e}function is(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[W]=e,r}function as(t,e){if(zr(t))return e.createTextNode(t.data);if(Ea(t))return e.createComment(t.data);if(ba(t))return is(t,e);if(oe(t)){let n=e[at](t[L],t.namespaceURI,t[Ie],t.localName);if(t[Te])for(let r=0;r<t[Te].length;r++){let o=t[Te].item(r);n.attributes.setNamedItem(is(o,e))}return n}else{if(jr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[W]=e,n}}}function Sn(t,e,n=t.ownerDocument){if(t.nodeType===We)throw j(\"Cannot clone a document node\",\"NotSupportedError\");let r=as(t,n);if(!e||!oe(t)&&!jr(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],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,oe(i.source)&&i.source.namespaceURI===G&&i.source.localName===\"template\"){let y=i.source[Ae];y&&(o.has(y)&&ls(),o.add(y),i.contentSource=y,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&ls(),o.add(a);let c=as(a,n);oe(a)||jr(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function ls(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function vn(t,e){let n=String(e);return n===\"\"?null:Nn(t,[{type:En,name:n}])}function kn(t,e){let n=[...new Set(cn(String(e)))];return Tn(t,n.map(r=>({type:wn,name:r})))}function An(t,e){let n=String(e),r=Z(n),o=[];for(let s of On(t))oe(s)&&(n===\"*\"||(s.namespaceURI===G?s[L]===r:s[L]===n))&&o.push(s);return o}function On(t){let e=[],n=[],r=t[F];for(;r;){e.push(r);let o=r[F],s=r[C];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Ut(t){let e=On(t);return e.unshift(t),e}var ye=class extends $e{nodeType=Bo;[L]=\"\";[ie]=null;[Me]=null;[F]=null;[Y]=null;[C]=null;[Q]=!1;get[X](){return this[W].defaultView[Be]}get localName(){return this[L]}get nodeName(){return this[L]}get ownerDocument(){return this[W]}get isConnected(){return this[Q]}isDefaultNamespace(e){let n=Oe(e);return wa(this)===n}get parentNode(){return this[ie]}set parentNode(e){}get parentElement(){let e=this[ie];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[Y]}set previousSibling(e){}get nextSibling(){return this[C]}set nextSibling(e){}get previousElementSibling(){let e=this[Y];for(;e&&e.nodeType!==1;)e=e[Y];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[C];for(;e&&e.nodeType!==1;)e=e[C];return e}set nextElementSibling(e){}get firstChild(){return this[F]}set firstChild(e){}get lastChild(){let e=this[F];for(;e;){let n=e[C];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Ht(this)?this.data:null}set nodeValue(e){Ht(this)&&(this.data=e)}get textContent(){if(Ht(this))return this.data;let e=\"\";for(let n of On(this))zr(n)&&(e+=n.data);return e}set textContent(e){if(Ht(this))this.data=e;else if(cs(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Sn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function wa(t){let e=t;for(;e;)switch(e.nodeType){case le:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Rt,\"xmlns\");if(r!=null&&r.prefix==null)return Oe(r.value);e=n.parentElement;break}case We:e=e.documentElement;break;case Wo:case Le:return null;case lt:e=e.ownerElement;break;default:e=e.parentElement}return null}var be=Symbol(\"insertNode\"),Wr=Symbol(\"preflightInsertions\"),Rn=Symbol(\"replaceNode\"),He=class extends ye{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Xe(e),r=this.parentNode;if(r)return Vr(o=>{Re(r,n);let s=this[C];for(;s&&n.includes(s);)s=s[C];let i=Br(r,n,o);this.parentNode===r?r[Rn](i,this,o):r[be](i,s,o)})}before(...e){let n=Xe(e),r=this.parentNode;if(r)return Vr(o=>{Re(r,n);let s=this[Y];for(;s&&n.includes(s);)s=s[Y];let i=Br(r,n,o);r[be](i,s?s[C]:r.firstChild,o)})}after(...e){let n=Xe(e),r=this.parentNode;if(r)return Vr(o=>{Re(r,n);let s=this[C];for(;s&&n.includes(s);)s=s[C];let i=Br(r,n,o);r[be](i,s,o)})}};function Vr(t){return te(()=>{let e=[];try{t(e)}catch(n){try{Ye(e)}catch{}throw n}Ye(e)})}function Xe(t){return t.map(e=>e instanceof ye?e:String(e))}function Gt(t,e){return e instanceof ye?e:t.ownerDocument.createTextNode(String(e))}function Re(t,e){for(let n of e){if(!(n instanceof ye))continue;let r=t;for(;r;){if(r===n)throw j(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[ie]??r[Me]}}}function Br(t,e,n){let r=[];for(let s of e)r.push(Gt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Wr](r);for(let s of r)o[be](s,null,n);return o}var _n,Yr=0,ds=0,us=0,fs=0,ut=!1,qr=!1,jt=!1,Pn=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=Na(n),o=_n??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Yr++:Xr(i,-1),s.set(this,r),Xr(r,1),this.#e.add(e)}disconnect(){let e=_n;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Yr--,Xr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Yr===0&&(_n=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 Ee(t){let e=_n;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 a=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;a=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new ge,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 ge,target:t.target,type:t.type})}function Cn(...t){let e=new ge;return e.push(...t),e}function Na(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 Xr(t,e){t.attributes&&(ds+=e),t.characterData&&(us+=e),t.childList&&(fs+=e),ut=ds>0,qr=us>0,jt=fs>0}var xe=class extends He{childNodes=new ge;children=new ge;appendChild(e){return te(()=>this[be](e,null))}insertBefore(e,n){return te(()=>this[be](e,n||null))}append(...e){return te(()=>{let n=Xe(e.filter(r=>r!=null));n.length>1&&Re(this,n);for(let r of n)this[be](Gt(this,r),null)})}prepend(...e){return te(()=>{let n=Xe(e.filter(o=>o!=null));n.length>1&&Re(this,n);let r=this.firstChild;for(let o of n)this[be](Gt(this,o),r)})}replaceChildren(...e){return te(()=>{let n=Xe(e.filter(o=>o!=null));Re(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[be](Gt(this,o),null)})}removeChild(e){return te(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw j(\"The node is not a child of this node\",\"NotFoundError\");let n=this[Q]?Ut(e):void 0,r=e[Y],o=e[C],s=In(this,e);if(n)for(let i of n)i[Q]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ye(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return te(()=>this[Rn](e,n))}[Rn](e,n,r){if(Re(this,[e]),n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[Y],s=n[C],i=this.prepareInsertion(e),a=this[Q]?Ut(n):void 0,l=new Set(i.map(({node:E})=>E)),c=s;for(;c&&l.has(c);)c=c[C];let y=In(this,n);if(a){for(let p of a)p[Q]=!1;let E=new Set(a);for(let p of i)E.has(p.node)&&(p.shouldDisconnect=!1)}this.commitInsertion(i,c);let m=this[Q];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,m),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,y),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Tn(this,e)}querySelector(e){return Nn(this,e)}[be](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Wr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(Re(this,[e]),n&&n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[C]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[Q];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ye(e)}prepareInsertion(e){let n=[];if(e.nodeType===Le){let i=e[F];for(;i;)n.push(i),i=i[C]}else n.push(e);let r=this[Q],o=this[W],s=[];for(let i of n){let a=i[Q],l=a||r,c,y;if(i[W]===o)l&&(c=Ut(i));else{let m=xn(i);y=m.nodes,l&&(c=m.treeNodes)}s.push({node:i,nodes:c,adoption:y,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ie];if(i){let a=s.node[Y],l=s.node[C];s.source={parent:i,index:In(i,s.node),previousSibling:a,nextSibling:l}}}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[W];for(let{adoption:s}of e)s&&Ft(s,r);let o=this[Q];for(let{nodes:s}of e)if(s)for(let i of s)i[Q]=o}attachChild(e,n){if(n){let s=n[Y];e[C]=n,e[Y]=s,s?s[C]=e:this[F]=e,n[Y]=e}else{e[C]=null;let s=this[F];if(s){let i;for(;i=s[C];)s=i;s[C]=e,e[Y]=s}else this[F]=e,e[Y]=null}let r=oe(e);e[ie]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!oe(s);)s=s[C];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[Y],nextSibling:e[C]}}queueRemovalMutationRecord(e,n,r,o){jt&&Ee({type:\"childList\",target:e,removedNodes:Cn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(jt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),Ee({type:\"childList\",target:this,addedNodes:Cn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==le||Ct(this)?[]:[[()=>this[X].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===le&&!Ct(s.parent)&&n.push([()=>s.parent[X].removeChild?.(s.parent,o,s.index)]),this.nodeType===le&&!Ct(this)&&n.push([()=>this[X].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){ms(e,n)}};function ps(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[Q]?n.treeNodes:void 0,s=e[Y],i=e[C],a=In(t,e);if(o)for(let c of o)c[Q]=!1;Ft(n.nodes,r),jt&&Ee({type:\"childList\",target:t,removedNodes:Cn(e),previousSibling:s,nextSibling:i}),o&&ms(o,\"disconnectedCallback\");let l=[];t.nodeType===le&&!Ct(t)&&l.push([()=>t[X].removeChild?.(t,e,a)]),Ye(l)}function In(t,e){let n=e[Y],r=e[C];n?n[C]=r:t[F]=r,r&&(r[Y]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),oe(e)&&t.children.splice(t.children.indexOf(e),1),e[ie]=null,e[C]=null,e[Y]=null,o}function ms(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&mn(n,()=>r.call(n))}}function zt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||mn(t,()=>i.call(t,e,n,r,o))}var Dn=class{[F]=null;constructor(e){this[se]=e}getNamedItem(e){let n=String(e),r=this[se][$]===G?Z(n):n,o=this[F];for(;o;){if(o.name===r)return o;o=o[C]}return null}getNamedItemNS(e,n){let r=Oe(e),o=String(n),s=this[F];for(;s;){if(s.localName===o&&s[$]===r)return s;s=s[C]}return null}item(e){let n=this[F],r=0;for(;n;){if(r++===e)return n;n=n[C]}return null}get length(){let e=0,n=this[F];for(;n;)e++,n=n[C];return e}removeNamedItem(e){let n=String(e),r=this[se][$]===G?Z(n):n;return te(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=Oe(e),o=String(n);return te(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[$]===r))}removeNamedItemImmediately(e){let n=this[se],r=this[F],o=null;for(;r!=null;){if(e(r)){o&&(o[C]=r[C]),this[F]===r&&(this[F]=r[C]);let s=r.value;return r[C]=null,r[se]=null,ut&&Ee({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[$],oldValue:s}),n[X].removeAttribute?.(n,r.name,r[$]),zt(n,r.localName,s,null,r[$]),r}o=r,r=r[C]}return null}setNamedItem(e){return te(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[se],r=e[se];if(r!=null&&r!==n)throw j(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[F],i=null;for(;s;){if(s.localName===e.localName&&s[$]===e[$]){if(s===e)return s;i?i[C]=e:this[F]=e,e[C]=s[C],s[C]=null,o=s;break}i=s,s=s[C]}o==null&&(i?i[C]=e:this[F]=e),e[se]=n,e[W]=n[W],o&&(o[se]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&ut&&Ee({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[$],oldValue:o?.value??null}),l&&n[X].removeAttribute?.(n,o.name,o[$]),(a||l)&&n[X].setAttribute?.(n,e.name,e.value,e[$]),a&&zt(n,e.localName,o?.value??null,e.value,e[$]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[F];for(;e;)yield e,e=e[C]}};var qe=class extends ye{nodeType=lt;[$]=null;[C]=null;[se]=null;constructor(e,n,r){super(),this[L]=e,this[De]=n,r&&(this[$]=r)}get nodeName(){return this[L]}set nodeName(e){}get name(){return this[L]}set name(e){}get localName(){if(this[$]==null)return this[L];let e=this[L].indexOf(\":\");return e<0?this[L]:this[L].slice(e+1)}get prefix(){if(this[$]==null)return null;let e=this[L].indexOf(\":\");return e<0?null:this[L].slice(0,e)}get value(){return this[De]}set value(e){let n=String(e),r=this[se];if(!r){this[De]=n;return}te(()=>{let o=this[De];this[De]=n,ut&&o!==n&&Ee({type:\"attributes\",target:r,attributeName:this[L],attributeNamespace:this[$],oldValue:o}),this[X].setAttribute?.(r,this[L],n,this[$]),zt(r,this.localName,o,n,this[$])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[se]}get namespaceURI(){return this[$]}get specified(){return!0}};var Ta={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},xa=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Sa=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,ys=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,va=\"|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|\",ka=/^(?:color|face|size)$/i;function hs(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 Ta[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function bs(t){return t.namespaceURI===G&&xa.has(t.localName)}function gs(t){let e=t.localName;return t[$]===he&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Aa(t,e){if(va.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(ys))if(ka.test(n[1]))return!0;return!1}function Mn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Sa)){let a=i[1];if(a){let l=i[2],c=Z(a),y=o[o.length-1]?.element??e,m=y[$]===he?he:G;if(c===\"svg\")m=he;else if(m===he){if(gs(y))m=G;else if(Aa(c,l)){for(;o.length>0;){let f=o[o.length-1];if(f.element[$]!==he||gs(f.element))break;o.pop(),s=f.target}m=G}}let E=m===G?c:a,p=n[at](E,m,null,E);for(let f of l.matchAll(ys))p.setAttribute(f[1],hs(f[3]||f[4]||\"\"));if(s.append(p),bs(p)||m!==G&&i[4])continue;o.push({element:p,target:s}),s=m===G&&c===\"template\"?p.content:p}else if(i[5]){let l=Z(i[5]);for(let c=o.length-1;c>=0;c--){let y=o[c],m=Z(y.element[L]);if(m===l){s=y.target,o.length=c;break}if(y.element[$]===G&&m===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(hs(i[7]))}return r}function Ln(t){return ws([{type:\"content\",child:t[F]}])}function Es(t){return ws([{type:\"opening\",node:t}])}function ws(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case le:{let o=r;e.push(`<${o[L]}`);let s=o[Te]?.[F];for(;s;){e.push(` ${s[L]}`);let a=s[De];a!==\"\"&&(a=String(a).replace(/&/g,\"&\").replace(/\"/g,\""\"),e.push(`=\"${a}\"`)),s=s[C]}if(e.push(\">\"),bs(o))break;let i=o.namespaceURI===G&&o.localName===\"template\"?o[Ae]:o;t.push({type:\"closing\",name:o[L]}),t.push({type:\"content\",child:i?.[F]??null});break}case ct:{let o=r;e.push(o[me].replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/</g,\"<\").replace(/>/g,\">\"));break}case dt:{let o=r;e.push(`<!--${o[me]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[C]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var J=class extends xe{nodeType=le;[$]=G;[Ie]=null;get namespaceURI(){return this[$]}get prefix(){return this[Ie]}get localName(){let e=this[Ie];return e==null?this[L]:this[L].slice(e.length+1)}get nodeName(){return this[$]===G?Xo(this[L]):this[L]}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 qe(\"slot\",n))}get attributes(){let e=this[Te];return e||(e=new Dn(this),this[Te]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return An(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return kn(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);Pr(r);let s=this[$]===G?Z(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new qe(s,o))}setAttributeNS(e,n,r){let o=Oe(e),s=String(n),i=String(r),a=dn(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new qe(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);Pr(r);let o=this[$]===G?Z(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 qe(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[$]===G?Z(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Es(this)}get innerHTML(){return Ln(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Mn(String(e),this);this.replaceChildren(n)}}};var ft=class t extends J{[$]=he;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Fe=class extends He{[me]=\"\";constructor(e){super(),this[me]=e==null?\"\":String(e)}setData(e){let n=qr,r=n?this[me]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[me]=o,n&&r!==o&&Ee({type:\"characterData\",target:this,oldValue:r}),this[X].setText?.(this,o)}get data(){return this[me]}set data(e){this.setData(e)}};var pt=class extends Fe{nodeType=ct;[L]=\"#text\"};var mt=class extends Fe{nodeType=dt;[L]=\"#comment\"};var ht=class extends xe{nodeType=Le;[L]=\"#document-fragment\";[W]=typeof window<\"u\"?window.document:null;getElementById(e){return vn(this,e)}};var gt=class extends J{get content(){let e=this[Ae];return e||(e=this.ownerDocument.createDocumentFragment(),e[Me]=this,this[Ae]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Mn(String(e),this))}get innerHTML(){let e=this[Ae];return e?Ln(e):\"\"}};var $n=class extends J{};var Hn=class extends J{};var Fn=class extends J{};var Vt=class extends xe{nodeType=We;[L]=\"#document\";[Q]=!0;constructor(e){super(),this.defaultView=e,this[W]=this,this.documentElement=Gn(new Fn,this,\"html\"),this.body=Gn(new $n,this,\"body\"),this.head=Gn(new Hn,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 kn(this,e)}createElement(e){let n=String(e);return Zo(n),Kr(this,Z(n))}createElementNS(e,n){let r=dn(e,n,\"element\");return Kr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[at](e,n,r,o){return Kr(this,e,n,r,o)}createTextNode(e){let n=Un(new pt(e),this);return this[X].createText?.(n,n.data),n}createComment(e){return Un(new mt(e),this)}createDocumentFragment(){return Un(new ht,this)}createEvent(){return new ee(\"\")}getElementById(e){return vn(this,e)}getElementsByTagName(e){return An(this,e)}importNode(e,n){if(e.nodeType===We)throw j(\"Cannot import a document node\",\"NotSupportedError\");return Sn(e,n,this)}adoptNode(e){if(e[W]===this)return e;let n=xn(e);return te(()=>{let r=e.parentNode;return r?ps(r,e,n,this):Ft(n.nodes,this),e})}};function Un(t,e){return Object.defineProperty(t,W,{value:e,writable:!0,enumerable:!1}),t}function Kr(t,e,n=G,r=null,o=e){let s;if(n===he)s=new ft;else if(n===G&&o===\"template\")s=new gt;else if(n===G){let i=t.defaultView.customElements.get(o);s=i?new i:new J}else s=new J;return Gn(s,t,e,n,r)}function Gn(t,e,n,r=G,o=null){return Un(t,e),Object.defineProperties(t,{[L]:{value:n},[$]:{value:r},[Ie]:{value:o}}),e[X].createElement?.(t,r),t}var jn=class extends ee{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 zn=class extends ee{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 Vn=class extends ee{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Bn=class extends ee{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Wn=class extends ee{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Yn=class extends ee{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Xn=class extends J{};var Oa=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,Ra=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Ns(t){return Oa.test(t)&&!Ra.has(t)}function Ts(t){return j(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var qn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Ns(e))throw Ts(e);if(this.registry.has(e))throw j(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw j(\"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(!Ns(e))return Promise.reject(Ts(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 _a=[\"onerror\",\"onunhandledrejection\"],Ss=Symbol.for(\"@remote-dom/polyfill/global-property\");function vs(t){return Object.getOwnPropertyDescriptors(t)}function ks(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors($e.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Zr(r.value.bind(t)),e[n]=r);return e}function As(t){let e={};for(let n of _a)e[n]={configurable:!0,enumerable:!0,get:Zr(()=>t[n]),set:Zr(r=>{t[n]=r})};return e}function Pa(t){return Object.assign(vs(t),ks(t),As(t))}function Zr(t){return Object.defineProperty(t,Ss,{value:!0}),t}function xs(t,e){for(let n of Reflect.ownKeys(e)){let r=Ca(t,n);(r==null||Ia(r))&&Object.defineProperty(t,n,e[n])}}function Ca(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ia(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Ss]===!0)}var Ke=class extends $e{[X]={};[ln]=[];[Be]=Ma(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Vt(this);customElements=new qn;location=globalThis.location;navigator=globalThis.navigator;Event=ee;ErrorEvent=zn;PromiseRejectionEvent=Vn;ToggleEvent=Bn;FocusEvent=Wn;ClipboardEvent=Yn;EventTarget=$e;CustomEvent=jn;Node=ye;ParentNode=xe;ChildNode=He;DocumentFragment=ht;Document=Vt;CharacterData=Fe;Comment=mt;Text=pt;Element=J;HTMLElement=Xn;SVGElement=ft;HTMLTemplateElement=gt;MutationObserver=Pn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Da(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=vs(e),s=Object.assign(ks(e),As(e));delete o.self,Object.defineProperties(globalThis,o),xs(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),xs(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Pa(e))}};function Da(t,e){t[ln].push(e(t)??{})}function Ma(t){return{createElement:_e.bind(null,t,\"createElement\"),setAttribute:_e.bind(null,t,\"setAttribute\"),removeAttribute:_e.bind(null,t,\"removeAttribute\"),createText:_e.bind(null,t,\"createText\"),setText:_e.bind(null,t,\"setText\"),insertChild:_e.bind(null,t,\"insertChild\"),removeChild:_e.bind(null,t,\"removeChild\"),addEventListener:_e.bind(null,t,\"addEventListener\"),removeEventListener:_e.bind(null,t,\"removeEventListener\")}}function _e(t,e,...n){for(let s of t[ln])s[e]?.apply(s,n);let r=t[X];r[e]?.apply(r,n)}var Kn=new Ke;var Jr=\"~\";var Ue=new WeakMap;function yt(t){return Ue.get(t)}var no=new WeakMap,$a=0;function ce(t){let e=no.get(t);return e==null&&(e=String($a++),Zn(t,e)),e}function Zn(t,e){no.set(t,e)}var eo=new WeakMap;function Ha(t){return eo.get(t)}var to=new WeakMap;function Fa(t){let e=to.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 Ua=new WeakMap;function Ga(t){return Ua.get(t)}function ro(t,e,n){let r=eo.get(t);if(r==null&&(r={},eo.set(t,r)),r[e]===n)return;r[e]=n;let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,1]])}function Ge(t,e,n){let r=to.get(t);if(r==null&&(r={},to.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,2]])}function bt(t,e){if(Ue.get(t)!==e&&(Ue.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)bt(t.childNodes[r],e)}function Jn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Jn(t.childNodes[n])}function Et(t){let{nodeType:e}=t;switch(e){case 1:return{id:ce(t),type:e,element:t.localName,properties:Qr(Ha(t)),attributes:Qr(Fa(t)),eventListeners:Qr(Ga(t)),children:Array.from(t.childNodes).map(Et)};case 3:case 8:return{id:ce(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Qr(t){return t?{...t}:void 0}function oo(t,e,...n){let r=no.get(t),o=Ue.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 wt=Kn[X];wt.insertChild=(t,e,n)=>{let r=yt(t);r!=null&&(bt(e,r),r.mutate([[0,ce(t),Et(e),n]]))};wt.removeChild=(t,e,n)=>{let r=yt(t);r!=null&&(Jn(e),r.mutate([[1,ce(t),n]]))};wt.setText=(t,e)=>{let n=yt(t);n?.mutate([[2,ce(t),e]])};wt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ge(t,e,n)};wt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ge(t,e)};Ke.setGlobal(Kn);function Rs(t,e){if(typeof t!=\"string\"||t.length===0||t.length>200)return\"A kept value's key is a string of 1 to 200 characters, so this one was not kept.\";if(e!==null){if(typeof e!=\"string\")return\"A view keeps a string or null; JSON.stringify anything else, so this one was not kept.\";if(e.length>4096||new TextEncoder().encode(e).length>4096)return\"A kept value is at most 4 KB, and this one is longer, so it was not kept.\"}}function _s(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 Ps=[\"wheel\",\"drag\",\"pinch\"];var Qn=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var Is=[\"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\"],Ds=[\"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\"],Ms=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Ls=[\"TEMPORARY\",\"PERSISTENT\"],$f=Object.freeze([...Is,...Ds,...Ms,...Ls]),Hf=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Cs=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function $s(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Is,...Ds,...Ms,...e,\"constructor\",Symbol.toStringTag]),i=(h,T)=>{let A=Reflect.getOwnPropertyDescriptor(h,T);return A===void 0||!(\"value\"in A)||A.writable||A.configurable?!1:n.primitivesStay&&typeof T==\"symbol\"&&(typeof A.value!=\"object\"||A.value===null)&&typeof A.value!=\"function\"?!0:Ls.includes(T)&&typeof A.value==\"number\"},a=t,l=a.setTimeout,c=a.setInterval,y=a.crypto,m=(h,T)=>function(A,g,...N){if(typeof A!=\"function\")throw new TypeError(`${T} takes a function: a guest view cannot run code from text`);return h.call(t,A,g,...N)},E=y?Object.freeze({getRandomValues:h=>y.getRandomValues(h)}):void 0,p=a.document?.defaultView;if(p&&p!==a)for(let h of Reflect.ownKeys(p))typeof h==\"symbol\"||s.has(h)||Reflect.deleteProperty(p,h)||o.push(`window.${h}`);let f=[];for(let h=t;h&&h!==Object.prototype;h=Object.getPrototypeOf(h))f.push(h);for(let h of f)for(let T of Reflect.ownKeys(h))s.has(T)||(Reflect.deleteProperty(h,T)?r.push(Cs(T)):i(h,T)||o.push(Cs(T)));let k=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},u=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let h of u){let T=k();Object.defineProperty(T,\"prototype\",{value:h,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(h,\"constructor\",{value:T,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),h===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:T,writable:!0,enumerable:!1,configurable:!0})}let b=(h,T)=>{Reflect.defineProperty(t,h,{value:T,writable:!0,enumerable:!0,configurable:!0})||o.push(h)};b(\"setTimeout\",m(l,\"setTimeout\")),b(\"setInterval\",m(c,\"setInterval\")),E&&b(\"crypto\",E);for(let h of f.slice(1))Object.freeze(h);for(let h of Reflect.ownKeys(t)){let T=Reflect.getOwnPropertyDescriptor(t,h);Reflect.defineProperty(t,h,\"value\"in T?{...T,writable:!1,configurable:!1}:{...T,configurable:!1})}let S;try{S=Reflect.preventExtensions(t)}catch{S=!1}return{removed:r,stuck:o,sealed:S}}var Bt=class extends HTMLElement{constructor(){super(),Zn(this,Jr)}connect(e){if(yt(this)===e||(bt(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,Jr,Et(o),r])}e.mutate(n)}updateRemoteProperty(e,n){ro(this,e,n)}callRemoteMethod(e,...n){return oo(this,e,...n)}};var O={},so={empty:!0},ja={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\"},Nt={div:O,section:O,article:O,aside:O,header:O,footer:O,nav:O,hgroup:O,search:O,address:O,figure:O,figcaption:O,blockquote:O,p:O,pre:O,hr:so,br:so,wbr:so,h1:O,h2:O,h3:O,h4:O,h5:O,h6:O,span:O,strong:O,em:O,b:O,i:O,u:O,s:O,small:O,mark:O,abbr:O,cite:O,q:O,code:O,kbd:O,samp:O,var:O,sub:O,sup:O,dfn:O,bdi:O,bdo:O,ruby:O,rt:O,rp:O,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:O,menu:O,dl:O,dt:O,dd:O,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:O,caption:O,thead:O,tbody:O,tfoot:O,tr:O,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:O,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:O,output:O,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\"}}},za=[\"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\"],Va={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(za.map(t=>[t,\"css\"]))},Pe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},er={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Hs={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Fs={oneOf:[\"R\",\"G\",\"B\",\"A\"]},we={...Pe,in:\"text\",result:\"text\"},Us={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},tr={svg:{attributes:{...Pe,...er}},g:O,defs:O,symbol:{attributes:{...Pe,...er,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Pe,href:\"fragment\"}},title:O,desc:O,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Pe,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\",...Us}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Us}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Pe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Pe,...er,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...er,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:O,filter:{attributes:{...Pe,filterUnits:Hs,primitiveUnits:Hs}},feBlend:{attributes:{...we,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...we,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:we},...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:{...we,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...we,in2:\"text\",scale:\"number\",xChannelSelector:Fs,yChannelSelector:Fs}},feDropShadow:{attributes:{...we,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:we},feGaussianBlur:{attributes:{...we,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:we},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...we,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...we,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Pe,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var Gs=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],js=[\"region\"],io={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},nr={section:[\"aria-label\",\"title\"]},zs=[\"aria-labelledby\",\"aria-describedby\"];function Ba(t){return/^aria-[a-z]+$/.test(t)}function Wa(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var ao=4e3,Vs=1e5,Wt=512e3,lo=1e4,Bs=\"http://www.w3.org/1999/xhtml\",Ws=\"http://www.w3.org/2000/svg\",Ya=new Map(Object.keys(tr).map(t=>[t.toLowerCase(),t]));function rr(t){return Ya.get(t.toLowerCase())}function or(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Nt[e]?.attributes,ja]:[tr[e]?.attributes,Va],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[a,l]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:l}}if(Ba(r)||Wa(r))return{name:r,kind:\"text\"}}var sr=/^\\d{4}-\\d{2}-\\d{2}$/;function Xa(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!sr.test(t)||!sr.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 Ys(t,e,n={}){let r=Xa(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\"],a=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${a}`:`${a} ago`}function Xs(t,e){if(typeof t!=\"string\")return;if(sr.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return sr.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 qs=\"~\",ir=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Se=(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=>Se(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Se(r,e+1)]))};function Ks(){let t=new Map,e=new Map,n=new Map([[qs,{children:[],listeners:new Map}]]),r=0,o=c=>{let y=e.get(c);return y===void 0&&(y=r+=1,e.set(c,y),t.set(y,{listener:c,count:0})),t.get(y).count+=1,y},s=c=>{let y=t.get(c);y&&(y.count-=1,!(y.count>0)&&(t.delete(c),e.delete(y.listener)))},i=c=>{let y=n.get(c);if(y){n.delete(c);for(let m of y.listeners.values())s(m);for(let m of y.children)i(m)}},a=(c,y,m=0)=>{if(!ir(c)||m>64)return Se(c);let E=typeof c.id==\"string\"?c.id:void 0,p=y&&E!==void 0&&E!==qs;p&&i(E);let f={children:[],listeners:new Map};p&&n.set(E,f);let k={};for(let[u,b]of Object.entries(c))u===\"children\"&&Array.isArray(b)?k[u]=b.map(S=>{let h=a(S,p,m+1);return p&&ir(S)&&typeof S.id==\"string\"&&f.children.push(S.id),h}):u===\"eventListeners\"&&ir(b)?k[u]=Object.fromEntries(Object.entries(b).map(([S,h])=>{if(typeof h!=\"function\"||!p)return[S,void 0];let T=o(h);return f.listeners.set(S,T),[S,{listener:T}]})):k[u]=Se(b,m+1);return k},l=c=>{if(!Array.isArray(c))return Se(c);let[y,m]=c,E=typeof m==\"string\"?n.get(m):void 0;if(y===0){let p=a(c[2],E!==void 0),f=ir(c[2])?c[2].id:void 0;if(E&&typeof f==\"string\"&&n.has(f)){let k=Number(c[3]);E.children.splice(Number.isInteger(k)&&k>=0&&k<=E.children.length?k:E.children.length,0,f)}return[y,Se(m),p,Se(c[3])]}if(y===1){let p=Number(c[2]);return E&&Number.isInteger(p)&&p>=0&&p<E.children.length&&i(E.children.splice(p,1)[0]),Se(c)}if(y===3&&c[4]===3){let p=String(c[2]),f=c[3],k=E&&typeof f==\"function\"?o(f):void 0,u=E?.listeners.get(p);return u!==void 0&&s(u),k===void 0?E?.listeners.delete(p):E.listeners.set(p,k),[y,Se(m),p,k===void 0?void 0:{listener:k},3]}return Se(c)};return{encode:c=>c.map(l),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var co=\"graview-view-root\",qa=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],Ka=new Set([\"div\",\"li\",\"article\"]),fo=t=>t.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\"),uo=t=>Object.freeze({html:t,toString:()=>t}),po=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Qs=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Qs).join(\"\"):po(t)?t.html:fo(String(t));function ei(t){customElements.get(co)||customElements.define(co,Bt);let e=Event,n=Ks(),r=new Set,o=new Set,s,i=[],a=new Set;for(let d of[\"closest\",\"matches\",\"dataset\"]){let x=()=>{throw new TypeError(`A view's element has no ${d}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};d in Element.prototype||Object.defineProperty(Element.prototype,d,d===\"dataset\"?{get:x}:{value:x})}let l=document.createElement(co),c=d=>{let x=P=>{for(let I of Array.from(P.childNodes)){if(I.nodeType!==1)continue;if(ce(I)===d)return I;let D=x(I);if(D)return D}};return x(l)},y=d=>{let x=c(d.target);if(!x)return;let P=new e(d.event,{bubbles:!0}),I={};for(let D of qa)d[D]!==void 0&&(I[D]=d[D]);for(let D of Object.keys(I))Object.defineProperty(P,D,{value:I[D],enumerable:!0});x.dispatchEvent(P);for(let D of o){if(D.type!==d.event)continue;let M;try{M=new Set(Array.from(l.querySelectorAll(D.selector)))}catch{continue}for(let B=x;B&&B!==l;B=B.parentNode)if(M.has(B)){D.listener(Object.freeze({type:d.event,target:x,element:B,...I}));break}}},m=Error,E=new Map,p=0,f=(d,x,P)=>new Promise((I,D)=>{let M=++p;E.set(M,B=>B.ok?I(B):D(new m(B.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:M,op:d,key:x,...d===\"set\"?{value:P}:{}})}),k=d=>(d.catch(()=>{}),d),u=Object.freeze({get(d){return k(f(\"get\",d).then(x=>typeof x.value==\"string\"?x.value:null))},set(d,x){return k(f(\"set\",d,x).then(()=>{}))}}),b=d=>{if(d.type===\"mine-answer\"){let D=E.get(d.id);return E.delete(d.id),D?.(d)}if(d.type===\"dom-event\"&&typeof d.target==\"string\")return y(d);if(d.type===\"notice\")return t.warn(d.text);if(d.type!==\"props\")return;s=d.props,typeof d.partMs==\"number\"&&d.partMs>0&&(v=d.partMs),typeof d.partMark==\"string\"&&(U=d.partMark),H+=1,K.clear(),Ot=0;let x=t.now();for(let D of r)try{D(d.props)}catch(M){t.threw(M)}let P=t.now()-x,I=d.push;typeof I==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:I,ms:P})))},S;l.connect({mutate(d){S||(S=[],t.microtask(()=>{let x=S??[];S=void 0,t.send({type:\"render\",records:n.encode(x)})})),S.push(...d)},call:()=>{}});let h=d=>d.nodeType===1?d.getAttribute(\"data-key\")??d.getAttribute(\"id\"):null,T=(d,x)=>d.nodeType===x.nodeType&&(d.nodeType!==1||d.localName===x.localName&&d.namespaceURI===x.namespaceURI&&h(d)===h(x));function A(d,x){let P=Array.from(x.childNodes),I=0;for(let D of P){let M=d.childNodes[I]??null;if(M&&T(M,D)){g(M,D),I+=1;continue}if(h(D)!==null){let ue=Array.from(d.childNodes).slice(I+1).find(ze=>T(ze,D));if(ue){d.insertBefore(ue,M),g(ue,D),I+=1;continue}}d.insertBefore(D,M),I+=1}for(;d.childNodes.length>I;)d.removeChild(d.lastChild)}function g(d,x){if(d.nodeType!==1){d.data!==x.data&&(d.data=x.data);return}let P=d,I=x,D=N(P);for(let M of P.getAttributeNames())I.hasAttribute(M)||(P.removeAttribute(M),D&&Ge(P,M,void 0));for(let M of I.getAttributeNames()){let B=I.getAttribute(M);P.getAttribute(M)!==B&&P.setAttribute(M,B),D&&Ge(P,M,B)}A(P,I)}let N=d=>d.localName.includes(\"-\");function w(d){for(let x of Array.from(d.childNodes)){if(x.nodeType!==1)continue;let P=x;if(N(P))for(let I of P.getAttributeNames())Ge(P,I,P.getAttribute(I)??void 0);w(P)}}function R(d,x,P){for(let I of Array.from(d.childNodes)){if(I.nodeType!==1)continue;let D=I,M=D.localName,B=x||M.toLowerCase()===\"svg\",ue=B?rr(M):Object.prototype.hasOwnProperty.call(Nt,M.toLowerCase())?M.toLowerCase():void 0;if(!ue){P.add(`<${M}>`);continue}for(let ze of D.getAttributeNames())(!or(B?\"svg\":\"html\",ue,ze)||!B&&nr[ue]?.includes(ze.toLowerCase()))&&P.add(`${ue} ${ze}`);R(D,B,P)}}function _(d){let x=document.createElement(\"div\"),P=Array.isArray(d)?d:[d];for(let D of P)if(D!=null)if(typeof D==\"string\"||po(D)){let M=document.createElement(\"div\");M.innerHTML=typeof D==\"string\"?D:D.html,x.append(...Array.from(M.childNodes))}else x.append(D);let I=new Set;R(x,!1,I),i=[...I],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),w(x),A(l,x),K.clear()}let v=1e3/4,U=\"\",H=0,V=new Map,K=new Map,Ot=0,Sr=new Set,aa=d=>{try{return d instanceof Error?`${d.name}: ${d.message}`:String(d)}catch{return\"an error\"}},$o=d=>{if(d==null||d===!1)return\"\";if(typeof d==\"string\")return d;if(po(d))return d.html;if(Array.isArray(d))return d.map(x=>$o(x)).join(\"\");throw new TypeError(\"a part's draw returns markup: a string, graview.html`\\u2026` or a list of them\")};function la(d,x,P){if(typeof d!=\"string\"||!Qn.test(d))throw new TypeError('graview.part names its part in letters, digits, - and _ (\"vendors\", \"budget-2026\"), at most 64 of them.');if(typeof x!=\"function\")throw new TypeError(`graview.part(\"${d}\", draw) is handed a function that returns the part's markup.`);let I=typeof P?.as==\"string\"&&Ka.has(P.as)?P.as:\"div\",D=K.get(d)??0;K.set(d,D+1);let M=`${d}#${D}`,B=(fe,Vo)=>{let da=`The part \"${d}\" ${fe===\"threw\"?\"threw\":\"took too long\"}, so a note is drawn in its place and the rest of the view is drawn: ${Vo}`;return!Sr.has(`${d} ${fe}`)&&Sr.size<100&&(Sr.add(`${d} ${fe}`),t.warn(da)),uo(`<${I} data-part=\"${d}\" data-part-failed=\"${fe}\" data-part-why=\"${fo(Vo.slice(0,300))}\"${U?` data-part-mark=\"${fo(U)}\"`:\"\"}></${I}>`)},ue=V.get(M);if(ue!==void 0&&H<=ue.until)return B(\"slow\",ue.why);V.delete(M);let ze=Ot;Ot=0;let ca=t.now(),zo,Rr=0;try{zo=$o(x())}catch(fe){return B(\"threw\",aa(fe))}finally{let fe=t.now()-ca;Rr=fe-Ot,Ot=ze+fe}if(Rr>v){let fe=`it took ${Math.round(Rr).toLocaleString(\"en-US\")} ms, past the ${Math.round(v).toLocaleString(\"en-US\")} ms a part may take of a push, and is left as a note for the next ${3} pushes.`;return V.set(M,{why:fe,until:H+3}),B(\"slow\",fe)}return uo(`<${I} data-part=\"${d}\">${zo}</${I}>`)}let vr=[],kr=new Set(Ps),Ho=\"[]\",Ar=!1,Fo=()=>{Ar||(Ar=!0,t.microtask(()=>{Ar=!1;let d=[...new Map([...o].filter(P=>kr.has(P.type)).map(P=>[`${P.type} ${P.selector}`,{event:P.type,selector:P.selector}])).entries()].sort(([P],[I])=>P<I?-1:P>I?1:0).map(([,P])=>P),x=JSON.stringify(d);x!==Ho&&(Ho=x,t.send({type:\"gestures\",bound:d}))}))},Uo=\"[[],[]]\",Or=!1,Go=()=>{Or||(Or=!0,t.microtask(()=>{Or=!1;let d=D=>[...new Set([...o].filter(M=>M.type===D&&typeof M.selector==\"string\").map(M=>M.selector))].sort().slice(0,200),x=d(\"click\"),P=d(\"acted\"),I=JSON.stringify([x,P]);I!==Uo&&(Uo=I,t.send({type:\"clicks\",selectors:x,...P.length>0?{acted:P}:{}}))}))},jo=Object.freeze({get props(){return s},onProps(d){return r.add(d),s&&d(s),()=>void r.delete(d)},render:_,style(d){typeof d!=\"string\"||vr.includes(d)||(vr.push(d),t.send({type:\"style\",sheets:[...vr]}))},on(d,x,P){let I={type:d,selector:x,listener:P};return o.add(I),typeof d==\"string\"&&!a.has(d)&&(a.add(d),t.send({type:\"hears\",events:[d]})),kr.has(d)&&Fo(),(d===\"click\"||d===\"acted\")&&Go(),()=>{o.delete(I),kr.has(d)&&Fo(),(d===\"click\"||d===\"acted\")&&Go()}},act:(d,x={})=>t.act(d,x),mine:u,navigate(d){if(typeof d==\"string\")return t.navigate(d);let x=_s(d);x&&t.send(x)},part:la,html(d,...x){return uo(d.reduce((P,I,D)=>P+I+(D<x.length?Qs(x[D]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(d,x){let P=Xs(d,s?.timeZone);return P===void 0?\"\":Ys(P,jo.today,x)},get refused(){return i},get hardening(){return t.hardening()}});return{view:jo,hear:b,find:d=>{try{let x=l.querySelectorAll(d)[0];return x?ce(x):void 0}catch{return}},listened:d=>{let x=new Set;for(let P of o)if(P.type===d)try{for(let I of Array.from(l.querySelectorAll(P.selector))){let D=ce(I);D&&x.add(D)}}catch{}return[...x]}}}var mo={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},ti=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"break-inside\",\"break-before\",\"break-after\",\"page-break-inside\",\"page-break-before\",\"page-break-after\",\"orphans\",\"widows\",\"box-decoration-break\",\"-webkit-box-decoration-break\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"mask-image\",\"mask-size\",\"mask-position\",\"mask-repeat\",\"mask-origin\",\"mask-clip\",\"mask-composite\",\"mask-mode\",\"mask-type\",\"-webkit-mask\",\"-webkit-mask-image\",\"-webkit-mask-size\",\"-webkit-mask-position\",\"-webkit-mask-repeat\",\"-webkit-mask-origin\",\"-webkit-mask-clip\",\"-webkit-mask-composite\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"-webkit-text-stroke\",\"-webkit-text-stroke-width\",\"-webkit-text-stroke-color\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"animation-timeline\",\"animation-range\",\"animation-range-start\",\"animation-range-end\",\"scroll-timeline\",\"scroll-timeline-name\",\"scroll-timeline-axis\",\"view-timeline\",\"view-timeline-name\",\"view-timeline-axis\",\"view-timeline-inset\",\"timeline-scope\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scroll-margin-top\",\"scroll-margin-right\",\"scroll-margin-bottom\",\"scroll-margin-left\",\"scroll-margin-block\",\"scroll-margin-block-start\",\"scroll-margin-block-end\",\"scroll-margin-inline\",\"scroll-margin-inline-start\",\"scroll-margin-inline-end\",\"scroll-padding-top\",\"scroll-padding-right\",\"scroll-padding-bottom\",\"scroll-padding-left\",\"scroll-padding-block\",\"scroll-padding-block-start\",\"scroll-padding-block-end\",\"scroll-padding-inline\",\"scroll-padding-inline-start\",\"scroll-padding-inline-end\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],ni=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\",\"scroll\",\"view\"],ri=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],oi=[\"media\",\"supports\",\"container\",\"keyframes\"],si={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},ii=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],ai=[\"-webkit-details-marker\"],Yt=64e3;var Za=new Set([\"serif\",\"sans-serif\",\"monospace\",\"cursive\",\"fantasy\",\"system-ui\",\"math\",\"emoji\",\"fangsong\",\"inherit\",\"initial\",\"unset\",\"revert\",\"default\"]);function ho(t){return typeof t!=\"string\"||t.length>60||!/^[A-Za-z0-9][A-Za-z0-9-]*(?: [A-Za-z0-9-]+)*$/.test(t)?\"its family is words of letters, digits and hyphens with single spaces between them, at most 60 characters\":Za.has(t.toLowerCase())?`\"${t}\" is a name CSS keeps for itself`:null}var ar=5e4,lr=2e5,go=16,cr=[\"font-family\",\"src\",\"font-weight\",\"font-style\",\"font-display\",\"unicode-range\",\"font-stretch\"],li=2*Math.ceil(lr/3)*4,yo=64;function Ja(t,e){return`${t} ${e}`}function bo(t,e){return new Map(t.map(n=>[n.family.toLowerCase(),Ja(e,n.family)]))}function ci(t,e){let n=[],r=[],o=()=>{let s=r.length;for(;s>0&&r[s-1].type===\"whitespace\";)s-=1;let i=s,a,l=r[s-1];if(l?.type===\"string\")i=s-1,a=l.value;else{for(;i>0&&(r[i-1].type===\"ident\"||r[i-1].type===\"whitespace\");)i-=1;for(;i<s&&r[i].type===\"whitespace\";)i+=1;let y=r.slice(i,s).filter(m=>m.type===\"ident\");a=y.length>0?y.map(m=>m.value).join(\" \"):void 0}let c=a===void 0?void 0:e.get(a.toLowerCase());n.push(...c===void 0?r:[...r.slice(0,i),{type:\"string\",value:c},...r.slice(s)]),r=[]};for(let s of t)s.type===\",\"?(o(),n.push(s)):r.push(s);return o(),n}function Qa(t){return[\"font/woff2\",\"font/woff\",\"font/ttf\",\"font/otf\"].includes(t)||/^application\\/(?:x-)?font-[a-z0-9.+-]+$/.test(t)||t===\"application/octet-stream\"}function el(t){if(t.length<12)return!1;let e=String.fromCharCode(t[0],t[1],t[2],t[3]);return e===\"wOF2\"||e===\"wOFF\"||e===\"OTTO\"||e===\"true\"||t[0]===0&&t[1]===1&&t[2]===0&&t[3]===0}var tl=/^[A-Za-z0-9+/]*={0,2}$/;function nl(t,e){let n=t.indexOf(\",\"),r=n<0?t.slice(5):t.slice(5,n),[o=\"\",...s]=r.split(\";\"),i=o.trim().toLowerCase();if(!Qa(i))return{problem:\"type\",type:i||\"no type\"};if(n<0||!s.some(E=>E.trim().toLowerCase()===\"base64\"))return{problem:\"encoding\"};let a=t.slice(n+1);if(!tl.test(a)||a.length%4===1)return{problem:\"encoding\"};let l=a.endsWith(\"==\")?2:a.endsWith(\"=\")?1:0;if(l>0&&a.length%4!==0)return{problem:\"encoding\"};let c=Math.floor((a.length-l)*3/4);if(c>e)return{problem:\"size\",bytes:c};let y;try{y=atob(a)}catch{return{problem:\"encoding\"}}let m=new Uint8Array(y.length);for(let E=0;E<y.length;E+=1)m[E]=y.charCodeAt(E);return m.byteLength>e?{problem:\"size\",bytes:m.byteLength}:el(m)?{type:i,bytes:m}:{problem:\"bytes\"}}var Xt=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Ze=t=>t.filter(e=>e.type!==\"whitespace\");function rl(t){let e=[[]];for(let n of t)n.type===\",\"?e.push([]):e.at(-1).push(n);return e.map(Ze)}function ol(t){let e=\"\";for(let n of t)if(n.type===\"whitespace\")e+=\" \";else if(n.type===\"ident\")e+=n.value;else if(n.type===\"number\"||n.type===\"percentage\")e+=n.type===\"percentage\"?`${n.repr}%`:n.repr;else if(n.type===\"dimension\")e+=`${n.repr}${n.unit}`;else if(n.type===\"delim\"&&(n.value===\"?\"||n.value===\"+\"||n.value===\"-\"))e+=n.value;else if(n.type===\",\")e+=\",\";else return;return e.trim().replace(/\\s*,\\s*/g,\", \").replace(/\\s+/g,\" \")}var sl=/^(?:normal|bold|(?:[1-9]\\d{0,2}|1000)(?: (?:[1-9]\\d{0,2}|1000))?)$/,il=/^(?:normal|italic|oblique)$/,al=/^(?:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|\\d{1,3}(?:\\.\\d+)?%(?: \\d{1,3}(?:\\.\\d+)?%)?)$/,ll=/^(?:auto|block|swap|fallback|optional)$/,cl=/^u\\+[0-9a-f?]{1,6}(?:-[0-9a-f]{1,6})?(?:, u\\+[0-9a-f?]{1,6}(?:-[0-9a-f]{1,6})?)*$/i;function dl(t){let e=Ze(t);if(e.length===1&&e[0].type===\"string\")return e[0].value;if(e.length>0&&e.every(n=>n.type===\"ident\"))return e.map(n=>n.value).join(\" \")}function di(t,e,n,r,o=[]){let s=new Map,i=[],a=0;for(let N of e){if(N.type!==\"declaration\"){i.push(\"a rule\");continue}let w=N.name.startsWith(\"--\")?N.name:Xt(N.name);if(w===\"src\")for(let R of N.value)a+=ui(R);if(!cr.includes(w)){i.push(w);continue}s.set(w,N)}let l=s.get(\"font-family\"),c=l&&!l.important?dl(l.value):void 0,y=ho(c),m=c!==void 0&&y!==ho(void 0)?c:void 0;for(let N of i)r({reason:\"font-face\",name:\"descriptor\",...m!==void 0?{family:m}:{},descriptor:N});let E=(N,w={})=>(r({reason:\"font-face\",name:N,...m!==void 0?{family:m}:{},...w}),{data:a});if(Ze(t).length>0)return E(\"unreadable\");if(c===void 0||y)return E(\"family\",{said:y??\"its family is one name\"});let p=c;if(o.some(N=>N.toLowerCase()===p.toLowerCase()))return E(\"lent\");let f=s.get(\"src\");if(!f)return E(\"src\",{said:\"no src\"});let k=[];for(let N of rl(f.value)){let[w,...R]=N,_=w?.type===\"url\"?w.value:w?.type===\"func\"&&Xt(w.name)===\"url\"&&Ze(w.value).length===1&&Ze(w.value)[0].type===\"string\"?Ze(w.value)[0].value:void 0;if(w?.type===\"func\"&&Xt(w.name)===\"local\")return E(\"local\");if(_===void 0)return E(\"src\");if(!/^data:/i.test(_))return E(\"address\",{said:_.slice(0,80)});if(R.length>1||R[0]&&!(R[0].type===\"func\"&&Xt(R[0].name)===\"format\"&&Ze(R[0].value).every(U=>U.type===\"string\"||U.type===\"ident\"||U.type===\",\")))return E(\"src\");let v=nl(_,ar);if(\"problem\"in v)return v.problem===\"size\"?E(\"size\",{bytes:v.bytes}):E(v.problem,\"type\"in v&&v.type?{said:v.type}:{});k.push(v)}if(k.length===0)return E(\"src\");let u=k.reduce((N,w)=>N+w.bytes.byteLength,0);if(u>ar)return E(\"size\",{bytes:u});if(n.count+1>go)return E(\"count\");if(n.bytes+u>lr)return E(\"total\",{bytes:n.bytes+u});let b=(N,w)=>{let R=s.get(N);if(!R)return;let _=R.important?void 0:ol(R.value);if(_===void 0||!w.test(_)){r({reason:\"font-face\",name:\"value\",family:p,descriptor:N});return}return N===\"unicode-range\"?_.toUpperCase():Xt(_)},S=b(\"font-weight\",sl),h=b(\"font-style\",il),T=b(\"font-stretch\",al),A=b(\"font-display\",ll),g=b(\"unicode-range\",cl);return n.bytes+=u,n.count+=1,{face:{family:p,sources:k,size:u,...S?{weight:S}:{},...h?{style:h}:{},...T?{stretch:T}:{},...A?{display:A}:{},...g?{unicodeRange:g}:{}},data:a}}function ui(t){return t.type===\"url\"?/^data:/i.test(t.value)?t.value.length:0:t.type===\"func\"?t.value.reduce((e,n)=>e+(n.type===\"string\"&&/^data:/i.test(n.value)?n.value.length:ui(n)),0):0}var dr=t=>`${(t/1e3).toLocaleString(\"en-US\",{maximumFractionDigits:1})} KB`,qt=\"a view's face is a data: URL of a WOFF2, WOFF, TTF or OTF font (src: url(data:font/woff2;base64,\\u2026))\",fi=\"or a face the app lends its views (brand.views.fonts)\";function Eo(t){let e=t.family!==void 0?`the @font-face \"${t.family}\"`:\"an @font-face\";switch(t.name){case\"where\":return\"Not drawn: an @font-face inside @media, @supports, @container or a rule. A view's face is declared at the top of its stylesheet (view-font-face).\";case\"unreadable\":return`Not drawn: ${e}, which has something before its block. A face is @font-face { font-family: \\u2026; src: \\u2026 } (view-font-face).`;case\"family\":return`Not drawn: ${e}: ${t.said??\"its font-family is one name, in quotes or as plain words\"}. It is called by a name of its own, which the view's rules then name (view-font-face-family).`;case\"src\":return`Not drawn: ${e} has ${t.said===\"no src\"?\"no src\":\"a src that is no url()\"}: ${qt} (view-font-face-src).`;case\"address\":return`Not loaded: ${e} names url(${JSON.stringify(t.said??\"\")}). A view loads nothing from the network: ${qt}, ${fi} (view-font-face-src).`;case\"local\":return`Not loaded: ${e} names local(), a face installed on the reader's own machine, which differs from one reader to the next and tells the page what is installed: ${qt} (view-font-face-src).`;case\"type\":return`Not loaded: ${e} is a data: URL of ${t.said??\"no type\"}, not a font: ${qt} (view-font-face-type).`;case\"encoding\":return`Not loaded: ${e} is a data: URL that is not base64, or not base64 throughout: ${qt} (view-font-face-type).`;case\"bytes\":return`Not loaded: ${e} holds bytes that are not a WOFF2, WOFF, TrueType or OpenType file, whatever its data: URL says (view-font-face-type).`;case\"size\":return`Not loaded: ${e} is ${dr(t.bytes??0)} decoded, more than the ${dr(ar)} one face a view declares may be: subset it to the letters the view draws, ${fi}, which may be larger (view-font-face-size).`;case\"total\":return`Not loaded: ${e} would take the view's faces to ${dr(t.bytes??0)}, more than the ${dr(lr)} a view's faces may be together: the faces before it are drawn, and the app may lend the rest (brand.views.fonts) (view-font-faces-size).`;case\"count\":return`Not loaded: ${e} is more than the ${go} faces a view's stylesheets may declare (view-font-faces-size).`;case\"descriptor\":return`Not kept: ${t.descriptor??\"a descriptor\"} in ${e}. A view's face takes ${cr.slice(0,-1).join(\", \")} and ${cr.at(-1)}, and is drawn without the rest (view-font-face-descriptor).`;case\"value\":return`Not kept: the ${t.descriptor??\"descriptor\"} of ${e}, a value a face does not take, so the face is drawn as if it said none (view-font-face-descriptor).`;case\"lent\":return`Not loaded: ${e}, since the app lends its views a face by that name (brand.views.fonts), and the app's face is the one drawn: call the view's own something else (view-font-face-lent).`;default:return`Not drawn: ${e} (view-font-face).`}}var ne=t=>t>=48&&t<=57,pi=t=>ne(t)||t>=65&&t<=70||t>=97&&t<=102,So=t=>t>=65&&t<=90||t>=97&&t<=122,vo=t=>t>=128,ur=t=>So(t)||vo(t)||t===95,mi=t=>ur(t)||ne(t)||t===45,hi=t=>t===10,Ce=t=>t===10||t===9||t===32,ul=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,Ne=-1;function fl(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function Jt(t){let e=fl(t),n=0,r=(u=0)=>n+u<e.length?e[n+u]:Ne,o=[],s=(u,b)=>u===92&&b!==10&&b!==Ne,i=(u,b,S)=>u===45?ur(b)||b===45||s(b,S):ur(u)?!0:s(u,b),a=(u,b,S)=>u===43||u===45?ne(b)||b===46&&ne(S):ne(u===46?b:u),l=()=>{let u=r();if(n+=1,u===Ne)return 65533;if(pi(u)){let b=String.fromCodePoint(u);for(;b.length<6&&pi(r());)b+=String.fromCodePoint(r()),n+=1;Ce(r())&&(n+=1);let S=parseInt(b,16);return S===0||S>=55296&&S<=57343||S>1114111?65533:S}return u},c=()=>{let u=\"\";for(;;){let b=r();if(mi(b))u+=String.fromCodePoint(b),n+=1;else if(s(b,r(1)))n+=1,u+=String.fromCodePoint(l());else return u}},y=()=>{let u=\"\";for((r()===43||r()===45)&&(u+=String.fromCodePoint(e[n++]));ne(r());)u+=String.fromCodePoint(e[n++]);if(r()===46&&ne(r(1)))for(u+=String.fromCodePoint(e[n++],e[n++]);ne(r());)u+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(ne(r(1))||(r(1)===43||r(1)===45)&&ne(r(2))))for(u+=String.fromCodePoint(e[n++]),ne(r())||(u+=String.fromCodePoint(e[n++]));ne(r());)u+=String.fromCodePoint(e[n++]);return u},m=()=>{let u=y();return i(r(),r(1),r(2))?{type:\"dimension\",repr:u,unit:c()}:r()===37?(n+=1,{type:\"percentage\",repr:u}):{type:\"number\",repr:u}},E=()=>{for(;;){let u=r();if(n+=1,u===41||u===Ne)return;s(u,r())&&l()}},p=()=>{let u=\"\";for(;Ce(r());)n+=1;for(;;){let b=r();if(n+=1,b===41)return{type:\"url\",value:u};if(b===Ne)return{type:\"url\",value:u};if(Ce(b)){for(;Ce(r());)n+=1;return r()===41||r()===Ne?(r()===41&&(n+=1),{type:\"url\",value:u}):(E(),{type:\"bad-url\"})}if(b===34||b===39||b===40||ul(b))return E(),{type:\"bad-url\"};if(b===92){if(s(b,r()))u+=String.fromCodePoint(l());else return E(),{type:\"bad-url\"};continue}u+=String.fromCodePoint(b)}},f=()=>{let u=c();if(u.toLowerCase()===\"url\"&&r()===40){for(n+=1;Ce(r())&&Ce(r(1));)n+=1;let b=Ce(r())?r(1):r();return b===34||b===39?{type:\"function\",value:u}:p()}return r()===40?(n+=1,{type:\"function\",value:u}):{type:\"ident\",value:u}},k=u=>{let b=\"\";for(;;){let S=r();if(n+=1,S===u||S===Ne)return{type:\"string\",value:b};if(hi(S))return n-=1,{type:\"bad-string\"};if(S===92){if(r()===Ne)continue;if(hi(r())){n+=1;continue}b+=String.fromCodePoint(l());continue}b+=String.fromCodePoint(S)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==Ne&&!(r()===42&&r(1)===47);)n+=1;r()!==Ne&&(n+=2)}let u=r();if(u===Ne)return o;if(Ce(u)){for(;Ce(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,u){case 34:case 39:o.push(k(u));continue;case 35:if(mi(r())||s(r(),r(1))){let b=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),id:b})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(u,r(),r(1))?(n-=1,o.push(m())):o.push({type:\"delim\",value:String.fromCodePoint(u)});continue;case 44:o.push({type:\",\"});continue;case 45:a(u,r(),r(1))?(n-=1,o.push(m())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(u,r(),r(1))?(n-=1,o.push(f())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:c()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(u,r())?(n-=1,o.push(f())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:ne(u)?(n-=1,o.push(m())):ur(u)?(n-=1,o.push(f())):o.push({type:\"delim\",value:String.fromCodePoint(u)})}}}var Ni={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Ti=32,No=class{tokens;i=0;constructor(e){this.tokens=e}peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function xi(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:gi(t,Ni[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:gi(t,\")\",e+1)}:n}function gi(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Ti){t.next(),r.push({type:\"bad-string\"});continue}r.push(xi(t,n))}}function Tt(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let a=[];r+=1;let l;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\";\")break;if(c.type===\"block\"&&c.open===\"{\"){l=c.value;break}a.push(c)}n.push({type:\"at-rule\",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type===\"block\"&&a.open===\"{\"){i=a.value;break}s.push(a)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function mr(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let a=t[i];if(a.type===\";\"||a.type===\"block\"&&a.open===\"{\")return i+1}return t.length})();e.push(...Tt(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let a=Si(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((c,y)=>y>n&&c.type===\"block\"&&c.open===\"{\");e.push(...Tt(t.slice(n,l+1),!1)),n=l+1;continue}e.push(a),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...Tt(t.slice(n,o+1),!1)),n=o+1}return e}function Si(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function ko(t){let e=new No(Jt(t)),n=[];for(;e.peek();)n.push(xi(e,0));return n}function xt(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&ne(r)||o===1&&ne(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":vo(r)||r===45||r===95||ne(r)||So(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function fr(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);vo(r)||r===45||r===95||ne(r)||So(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Zt(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function pl(t){let e=fr(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${fr(t.slice(1))}`:e}var yi=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function ml(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function hl(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return xt(t.value);case\"at-keyword\":return`@${xt(t.value)}`;case\"hash\":return`#${fr(t.value)}`;case\"string\":return Zt(t.value);case\"url\":return`url(${Zt(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${pl(t.unit)}`;case\"func\":return`${xt(t.name)}(${je(t.value)})`;case\"block\":return`${t.open}${je(t.value)}${Ni[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function je(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&ml(yi(n),yi(r))&&(e+=\"/**/\"),e+=hl(r),n=r);return e}var gl=new Set(ti),vi=new Set(ni),bi=new Set(ri),yl=new Set(oi),bl=new Set(ii),El=new Set(ai),Ei=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,pe=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),wl=t=>pe(t);function To(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&bi.has(t)&&Ei.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=pe(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(c=>c.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&bi.has(t)&&Ei.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!vi.has(s)){n({reason:\"function\",name:s});return}let i=To(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=To(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\")\"||o.type===\"]\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}var Nl=/^(animation|transition|scroll-behavior|outline)/,Tl=\"--graview-ring-color\",xl=\"--graview-focus-color\",Sl=t=>{let e=t.filter(r=>r.type!==\"whitespace\"),n=e[0];return e.length!==1||!n?!1:n.type===\"hash\"?/^(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.value):n.type===\"ident\"&&![\"transparent\",\"currentcolor\"].includes(pe(n.value))},vl=new Set([\"url\",\"src\",\"image-set\",\"-webkit-image-set\"]),ki=t=>{for(let e of t){if(e.type===\"func\"&&vl.has(pe(e.name)))return pe(e.name);if(e.type===\"func\"||e.type===\"block\"){let n=ki(e.value);if(n)return n}}};function hr(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:wl(t.name);if(o===Tl||!r&&!gl.has(o)){e({reason:\"property\",name:o});return}if(o===xl&&!Sl(t.value)){e({reason:\"value\",name:o});return}let s=si[o];if(s){let c=t.value.filter(E=>E.type!==\"whitespace\"),y=c[0],m=c.length===1&&y?.type===\"ident\"?pe(y.value):void 0;if(!m||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(m)){e({reason:\"value\",name:o});return}return`${o}: ${m}${t.important&&!(n&&o===\"all\")?\" !important\":\"\"}`}let i=To(r?void 0:o,t.value,e);if(!i)return;let a=Kt&&(o===\"font-family\"||o===\"font\")?ci(i,Kt):i,l=je(a).trim();return`${r?`--${fr(t.name.slice(2))}`:o}: ${l}${t.important&&!(n&&Nl.test(o))?\" !important\":\"\"}`}var Ao=t=>t.some(e=>e.type===\"}\"||e.type===\";\"||e.type===\")\"||e.type===\"]\"||e.type===\"at-keyword\"||e.type===\"CDO\"||e.type===\"CDC\"||e.type===\"delim\"&&e.value===\"\\\\\"||(e.type===\"func\"||e.type===\"block\")&&Ao(e.value));function Ai(t,e){if(Ao(t))return e({reason:\"unreadable\",name:\"selector\"}),!1;let n=ki(t);if(n)return e({reason:\"url\",name:n}),!1;let r=o=>{for(let s=0;s<o.length;s+=1){let i=o[s];if(s>0&&o[s-1].type===\":\"&&(i.type===\"ident\"||i.type===\"func\")){let l=pe(i.type===\"ident\"?i.value:i.name);if(bl.has(l)||(l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))&&!El.has(l))return e({reason:\"selector\",name:l}),!1}if(i.type===\"url\"||i.type===\"bad-url\"||i.type===\"bad-string\"||i.type===\"at-keyword\"||i.type===\"CDO\"||i.type===\"CDC\"||i.type===\"block\"&&i.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(i.type===\"func\"&&!r(i.value)||i.type===\"block\"&&!r(i.value))return!1}return!0};return r(t)}function wo(t,e,n,r){let o=[];for(let s of mr(t))if(s.type===\"declaration\"){let i=hr(s,e);i&&o.push(`${i};`)}else{let i=pr(s,e,n+1,\"style\",r);i&&o.push(i)}return o.join(\" \")}function kl(t,e,n){if(Ao(t)){n({reason:\"unreadable\",name:`@${e}`});return}let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=pe(s.name);return e===\"supports\"&&i===\"selector\"?Ai(s.value,n):vi.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=mr(s.value);if(i.length===1&&i[0].type===\"declaration\")return hr(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?je(t).trim():void 0}function xo(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(mo,pe(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:pe(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:xo(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:xo(e.value)}:e})}function pr(t,e,n,r,o){if(n>Ti){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(m=>m.type===\"whitespace\"||m.type===\",\"||m.type===\"percentage\"||m.type===\"ident\"&&[\"from\",\"to\"].includes(pe(m.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${je(t.prelude).trim()} { ${wo(t.block,e,n)} }`}if(!Ai(t.prelude,e))return;let c=je(xo(t.prelude)).trim();if(c===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${c} { ${wo(t.block,e,n,o)} }`}let s=pe(t.name),i=s===\"-webkit-keyframes\"?\"keyframes\":s;if(s===\"font-face\"&&o){if(o.skip)return;if(n>0||r!==\"sheet\"){e({reason:\"font-face\",name:\"where\"});return}if(!t.block){e({reason:\"font-face\",name:\"unreadable\"});return}let c=di(t.prelude,mr(t.block),o.budget,e,o.lent);c.face&&(o.data+=c.data,o.kept.push(c.face));return}if(!yl.has(i)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${s}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${s}`});return}if(i===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let c=t.prelude.filter(p=>p.type!==\"whitespace\"),y=c[0];if(c.length!==1||!y||y.type!==\"ident\"&&y.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let m=Tt(t.block,!1).map(p=>pr(p,e,n+1,\"keyframes\")).filter(p=>p!==void 0);return`@keyframes ${y.type===\"ident\"?xt(y.value):Zt(y.value)} { ${m.join(\" \")} }`}let a=kl(t.prelude,i,e);if(a===void 0)return;let l=r===\"style\"?wo(t.block,e,n,o):Tt(t.block,!1).map(c=>pr(c,e,n+1,\"sheet\",o)).filter(c=>c!==void 0).join(\" \");return`@${i} ${a} { ${l} }`}var Kt,Oo=(t,e)=>{let n=Kt;Kt=t&&t.size>0?t:void 0;try{return e()}finally{Kt=n}};function wi(t,e){let n=[],r=s=>void n.push(s);return{css:Tt(ko(t),!0).map(s=>pr(s,r,0,\"sheet\",e)).filter(s=>s!==void 0).join(`\n`),refused:n,faces:e?.kept??[],counted:t.length-(e?.data??0)}}function gr(t,e=Yt,n={}){return Qt([t],e,n)}function Qt(t,e=Yt,n={}){let r=n.faces?n.faces===!0?{}:n.faces:void 0,o=[],s=[],i=[],a=[],l={bytes:0,count:0},c=r?li:0,y=r&&t.length>yo?t.slice(0,yo):t;y.length<t.length&&i.push({reason:\"size\",name:\"sheets\"});let m=0,E=0;for(let u of y){if(r&&E+u.length>e+c){i.push({reason:\"size\"});continue}if(!r&&m+u.length>e){i.push({reason:\"size\"});continue}E+=u.length;let b=r?{budget:{...l},kept:[],data:0,...r.lent?{lent:r.lent}:{}}:void 0,S=wi(u,b);if(m+S.counted>e){i.push({reason:\"size\"},...S.refused.filter(h=>h.reason===\"font-face\"));continue}b&&Object.assign(l,b.budget),m+=S.counted,s.push(u),S.css&&o.push(S.css),i.push(...S.refused),a.push(...S.faces)}let p=r?.scope?bo(a,r.scope):void 0;if(!p||p.size===0)return{css:o.join(`\n`),refused:i,faces:a};let f={budget:{bytes:0,count:0},kept:[],data:0,skip:!0};return{css:Oo(p,()=>s.map(u=>wi(u,f).css).filter(u=>u!==\"\")).join(`\n`),refused:i,faces:a}}function yr(t,e=Yt,n={}){let r=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}],faces:[]};let o=i=>void r.push(i),s=[];return Oo(n.rename,()=>{for(let i of mr(ko(t))){if(i.type!==\"declaration\"){o({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let a=hr(i,o,!0);a&&s.push(a)}}),{css:s.join(\"; \"),refused:r,faces:[]}}function br(t,e,n={}){let r,o=Oo(n.rename,()=>hr(Si(t,ko(e)),s=>r??=s));return o===void 0||r?{refused:r??{reason:\"unreadable\",name:t}}:{value:o.slice(o.indexOf(\":\")+1).trim()}}var Oi=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function en(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=Oi(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&Oi(s.title)===o):void 0)}var ve=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,St=\" This run was not handed the views the host keeps, so a titled view's place is not among these: if it names one, the link goes there.\",tn=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var Al=t=>typeof t==\"string\"&&/^#[A-Za-z_][A-Za-z0-9_.:-]{0,199}$/.test(t),Ri=[\"https:\",\"mailto:\",\"tel:\"];function _i(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!Ri.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function Pi(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=_i(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o===\"id\"||o===\"kind\"||(Array.isArray(s)?s.forEach(n):n(s));return e}function Ci(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function Ii(t,e){if(Al(t))return t;let n=_i(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&Ci(e.origins).includes(new URL(n).origin)))return n}function Di(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!Ri.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=Ci(e);return`The link \"${n}\" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${o.length>0?`, or an https: address on ${o.join(\", \")}`:\"\"}; a record or a place of this app is <a data-record> or <a data-place>.`}function Mi(t,e){if(e===\"svg\"){let r=rr(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(Nt,n)?Object.prototype.hasOwnProperty.call(io,n)?{namespace:\"html\",name:io[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Er(t,e){return(t===\"html\"?Nt[e]:tr[e])?.empty===!0}var Ol=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Rl=/^[0-9A-Za-z\\s.,+\\-%()]*$/,_l=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Pl=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Cl=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Li=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Il=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Dl(t,e){if(Cl.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if(Il.test(n))return Li.exec(n)?.[0]}function $i(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Hi(e.origins),s=Li.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Wt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${Wt.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${s}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?o.length>0?` Its origin is not one the host lists for images (${o.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",a=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${a.slice(0,-1).join(\", \")} or ${a[a.length-1]}.`}function Hi(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function Ml(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:Hi(e).includes(n.origin)?n.href:void 0}catch{return}}function Ro(t,e,n,r,o){let s=or(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&nr[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Ll(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200),...r.length>Wt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>Gs.includes(a.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(a=>({reason:a.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:a}))}:{}}}function Ll(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Vs||!Rl.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>Wt)return o(\"url\");if(Pl.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?Dl(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=Ml(n,r.imageOrigins);return a?{value:a}:o(\"url\")}if(e===\"link\"){let s=r.link?.(n);return s===void 0?o(\"url\"):{value:s}}if(n.length>ao)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return Ol.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return _l.test(n)?{value:n}:o(\"url\");case\"style\":{let s=r.faceNames?.(),i=yr(n,ao,s?{rename:s}:{});return i.refused.length>0&&i.css===\"\"?o(i.refused[0].reason===\"url\"?\"url\":\"css\",i.refused[0]):{value:i.css,...i.refused.length>0?{dropped:i.refused}:{}}}case\"css\":{let s=r.faceNames?.(),i=br(t,n,s?{rename:s}:{});return\"refused\"in i?o(i.refused.reason===\"url\"?\"url\":\"css\",i.refused):{value:i.value}}}}var $l=\"http://www.w3.org/1999/xhtml\",Hl=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var wr=(t,...e)=>t.namespaceURI===$l&&e.includes(t.localName),Fl=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),Ul=t=>wr(t,\"textarea\",\"select\")||wr(t,\"input\")&&!Hl.has(Fl(t));function Fi(t){if(wr(t,\"option\",\"optgroup\",\"datalist\"))return'An option is never pressed by itself: put data-act on its select, with data-save=\"change\", or on a button.';if(wr(t,\"label\"))return\"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.\";if(Ul(t)&&!t.hasAttribute(\"data-save\"))return'A click into a field to type or to pick is not a press: give it data-save (\"input\" or \"change\") to save it as it is typed, or put data-act on a button beside it.'}var Gl=\"http://www.w3.org/1999/xhtml\",vt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Qe?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},Je=class extends vt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},_o=class extends vt{nodeType=8;get textContent(){return\"\"}},Qe=class extends vt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},Po=class extends vt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Qe(this,e,n)}createElement(e){return new Qe(this,Gl,e)}createTextNode(e){return new Je(this,e)}createComment(e){return new _o(this)}};function Ui(){let t=new Po,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var jl=new Set([\"video/mp4\",\"video/webm\",\"video/ogg\"]);function zl(t,e){let n=t.poster===!0||typeof t.poster==\"string\"&&t.poster.length>0,r=jl.has(t.type.toLowerCase()),o=!r&&!n?`its source is ${t.type}, which not every browser plays, and it has no poster`:r?n?void 0:\"it has no poster, so nothing stands before it plays or where a person asked for less motion\":`its source is ${t.type}, which not every browser plays`;return{record:e.record,field:e.field,text:typeof t.caption==\"string\"&&t.caption.trim()?t.caption.trim():t.name,name:t.name,source:t.type,...typeof t.duration==\"number\"?{duration:t.duration}:{},poster:n,autoplay:e.autoplay,cover:e.cover,playable:r&&n,...o?{why:o}:{}}}var Co={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Gi=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),ji=new Set([\"style\",\"template\",\"datalist\",\"option\"]),q=t=>t.replace(/\\s+/g,\" \").trim();function Vl(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var de=t=>t instanceof Qe,nn=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function re(t){return t instanceof Je?t.data:!de(t)||nn(t)||ji.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(re).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}var Bl=/(\\s+[·•|—–-]\\s+)/;function Wl(t,e){if(!e||!t.includes(e))return t;let n=s=>s.length>0&&s.split(\" \").length<=3,r=q(t).split(Bl),o=[];for(let s=0;s<r.length;s+=2){let i=r[s],a=i.startsWith(`${e} `)?i.slice(e.length+1):void 0,l=i.endsWith(` ${e}`)?i.slice(0,-e.length-1):void 0,c=i===e?\"\":a!==void 0&&n(a)?a:l!==void 0&&n(l)?l:i;c&&o.push(...o.length>0?[r[s-1]]:[],c)}return o.join(\"\")}function zi(t,e,n){let r=[];for(let o of t){if(o.t===\"list\"&&o.groups.every(s=>s.items.every(i=>i.id===e&&i.title===n))){r.push(...zi(o.groups.flatMap(s=>s.items.flatMap(i=>i.parts)),e,n));continue}if(o.t===\"text\"){let s=Wl(o.text,n);s&&r.push(s===o.text?o:{...o,text:s});continue}r.push(o)}return r}function*et(t){for(let e of t.childNodes)de(e)&&(yield e,yield*et(e))}function Yl(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let a=t;a;a=a.parentElement)a.getAttribute(\"data-record\")!==null&&(i=!0),a!==t&&(a.localName===\"fieldset\"||a.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function Xl(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(c=>c.kind===r),a=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):a!==null&&!i.some(c=>c.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(c=>`\"${c.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let c=l.indexOf(\":\"),y=c>0?l.slice(c+1):\"\";c<=0||y===\"\"||n.has(l)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${l}\"${n.has(l)?\", which names a record and no relation\":\"\"}.`}):n.has(y)||s.push({at:o,says:`data-drop-connect names \"${y}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Vi(t,e){let n=[],r=new Set,o=new Set,s=[],i=new Map;for(let f of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])i.set(f.id,f);let a=f=>en(e.places,f)!==void 0;for(let f of et(t)){let k=f.getAttribute(\"data-act\");k!==null&&r.add(k);let u=k!==null&&f.getAttribute(\"data-debounce\")===null?Fi(f):void 0;u&&n.push({at:`drawing <${f.localName} data-act=\"${k}\">`,says:u});let b=f.getAttribute(\"data-record\");b!==null&&(o.add(b),!i.has(b)&&!a(b)&&n.push({at:`drawing <${f.localName} data-record=\"${b}\">`,says:e.placesUnsure?`It names \"${b}\", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${ve(e.places)}${St}`:`It names \"${b}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${ve(e.places)}`}));let S=f.getAttribute(\"data-place\");S!==null&&!a(S)&&n.push({at:`drawing <${f.localName} data-place=\"${S}\">`,says:e.placesUnsure?`It names the place \"${S}\", which is none of the places this run was told of.${ve(e.places)}${St}`:`It names the place \"${S}\", which this app does not have.${ve(e.places)}`}),n.push(...Yl(f)),n.push(...Xl(f,e,i))}let l=f=>{if(f.localName===\"graview-video\")return;let k=f.getAttribute(\"data-record\");if(k!==null)return k;let u=f.getAttribute(\"data-key\")??f.getAttribute(\"id\");if(u!==null&&i.has(u))return u;let b=new Set;for(let S of et(f)){let h=S.getAttribute(\"data-record\");h!==null&&S.localName!==\"graview-video\"&&b.add(h)}return b.size===1?[...b][0]:void 0},c=(f,k)=>{let u=i.get(k),b=u?.kind??(k.includes(\":\")?k.slice(0,k.indexOf(\":\")):\"\"),S=[...et(f)],h=S.find(A=>A.localName in Co)??S.find(A=>A.localName===\"a\"&&A.getAttribute(\"data-record\")===k)??S.find(A=>A.localName===\"strong\"||A.localName===\"b\"),T=q(h?re(h):\"\")||u?.label||k;return{id:k,kind:b,title:T,parts:zi(m(f,h),k,T)}},y=f=>{let k=[...et(f)].filter(h=>h.localName===\"tr\"&&!nn(h)),u=k.find(h=>h.parentElement?.localName===\"thead\"||h.childNodes.every(T=>!de(T)||T.localName===\"th\")),b=u?u.childNodes.filter(de).map(h=>q(re(h))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:k.filter(h=>h!==u).map(h=>{let T=h.childNodes.filter(de),A=l(h),g=A?i.get(A):void 0;return{id:A??\"\",kind:g?.kind??\"\",title:q(re(T[0]??h)),parts:T.slice(1).map((N,w)=>({t:\"field\",label:b[w+1]??\"\",text:q(re(N))}))}})}]}};function m(f,k){let u=[],b=\"\",S=()=>{let T=q(b);b=\"\",T&&u.push({t:\"text\",text:T})},h=f.childNodes;for(let T=0;T<h.length;T+=1){let A=h[T];if(A===k)continue;if(A instanceof Je){b+=A.data;continue}if(!de(A)||nn(A)||ji.has(A.localName))continue;if(k&&[...et(A)].includes(k)){S(),u.push(...m(A,k));continue}let g=[];for(let N=T;N<h.length;N+=1){let w=h[N];if(w instanceof Je&&q(w.data)===\"\")continue;if(!de(w)||nn(w)||Gi.has(w.localName)||w.localName in Co)break;let R=l(w);if(!R)break;g.push({element:w,id:R}),T=N}if(g.length>0){S();let N=g.every(w=>w.element.localName===\"li\"||w.element.localName===\"tr\");u.push({t:\"list\",as:N?\"row\":\"card\",columns:1,groups:[{items:g.map(w=>c(w.element,w.id))}]});continue}u.push(...E(A,N=>b+=N,S))}return S(),u}function E(f,k,u){let b=f.localName;if(Gi.has(b)&&b!==\"label\")return k(re(f)),[];if(b===\"mark\"){u();let h=q(re(f));return h?[{t:\"badge\",text:h}]:[]}u();let S=Co[b]??(f.getAttribute(\"role\")===\"heading\"?Number(f.getAttribute(\"aria-level\")??2):void 0);if(S!==void 0){let h=q(re(f));return h?[{t:\"heading\",level:S,text:h}]:[]}switch(b){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(T=>de(T)&&T.localName===\"li\"&&!nn(T)).map(T=>{let A=l(T);if(A)return c(T,A);let g=m(T),N=g[0],w=N&&(N.t===\"text\"||N.t===\"heading\")?N.text:\"\";return{id:\"\",kind:\"\",title:w,parts:w?g.slice(1):g}})}]}];case\"table\":return[y(f)];case\"dl\":{let h=[],T=\"\";for(let A of f.childNodes.filter(de))if(A.localName===\"dt\")T=q(re(A));else if(A.localName===\"dd\")h.push({t:\"field\",label:T,text:q(re(A))});else if(A.localName===\"div\")for(let g of A.childNodes.filter(de))g.localName===\"dt\"?T=q(re(g)):g.localName===\"dd\"&&h.push({t:\"field\",label:T,text:q(re(g))});return h}case\"figure\":{let h=f.childNodes.find(g=>de(g)&&g.localName===\"figcaption\"),T=q(f.childNodes.filter(g=>g!==h).map(re).join(\" \")),A=h?q(re(h)):\"\";return T?[{t:\"figure\",text:T,...A?{label:A}:{}}]:A?[{t:\"text\",text:A}]:[]}case\"meter\":case\"progress\":{let h=Number(f.getAttribute(\"value\")??0),T=Number(f.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:f.getAttribute(\"aria-label\")??f.getAttribute(\"title\")??\"\",text:`${Math.round(h/T*100)}%`}]}case\"svg\":{let h=f.childNodes.find(g=>de(g)&&g.localName===\"title\"),T=q(f.getAttribute(\"aria-label\")??(h?re(h):\"\"));if(T)return[{t:\"text\",text:T,tone:\"picture\"}];let A=[...et(f)].filter(g=>g.localName===\"text\").map(g=>q(re(g))).filter(Boolean);return A.length>0?[{t:\"text\",text:A.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let h=q(f.getAttribute(\"alt\")??\"\");return h?[{t:\"text\",text:h,tone:\"picture\"}]:[]}case\"graview-video\":{let h=f.getAttribute(\"data-field\")??\"\",T=f.getAttribute(\"data-record\")??\"\",A=i.get(T),g=A&&h&&Object.hasOwn(A,h)?A[h]:void 0,N=(Array.isArray(g)?g:[g])[Number(f.getAttribute(\"data-index\")??\"0\")];if(!N||typeof N.name!=\"string\"||typeof N.type!=\"string\"||!N.type.startsWith(\"video/\"))return n.push({at:`drawing <graview-video data-field=\"${h}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[];let w=zl(N,{record:T,field:h,autoplay:f.getAttribute(\"autoplay\")!==null,cover:f.getAttribute(\"cover\")!==null});s.push(w);let R=w.autoplay?`, playing as a background, muted and looping${w.cover?\", filling its box\":\"\"}`:\"\";return[{t:\"text\",text:`${w.text}, ${Vl(w.duration!==void 0?{duration:w.duration}:{})}${R}`,tone:\"picture\"}]}case\"button\":{let h=q(re(f));return h?[{t:\"text\",text:h,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let h=q(f.getAttribute(\"aria-label\")??f.getAttribute(\"placeholder\")??f.getAttribute(\"name\")??\"\"),T=b===\"select\"?q(re(f.childNodes.find(A=>de(A)&&A.localName===\"option\"&&A.selected)??f)):f.value;return[{t:\"field\",label:h,text:T}]}case\"label\":return m(f);default:return m(f)}}return{parts:m(t),problems:n,acts:[...r],records:[...o],videos:s}}var ql=0,Kl=1,Zl=2,Jl=3,Bi=1,Ql=2,Wi=3,ec=1,tc=3,nc=8,Yi=\"~\",rn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Xi=new Set([\"input\",\"select\",\"textarea\",\"option\"]),rc=new Set([\"value\",\"checked\",\"selected\"]),qi=[\"aria-label\",\"aria-labelledby\",\"title\"],oc=t=>qi.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function Ki(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,a={dom:t,name:\"div\",namespace:\"html\",children:[],id:Yi};s.set(Yi,a);let l=0,c=!1,y=new WeakMap,m=new Map,E=new Map,p=g=>{o.push(g),o.length>200&&o.shift(),e.onRefused?.(g)},f=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),k=(g,N)=>{if(g.namespace===\"html\"&&g.name&&Xi.has(g.name))return g.dom;if(N?.namespace===\"html\"&&N.name===\"textarea\")return N.dom},u=(g,N)=>{let w=g.dom,R=y.get(w)??w.getAttribute(\"role\");if(R===null||!R.split(/\\s+/).some(_=>js.includes(_.toLowerCase())))return void y.delete(w);if(oc(w)){y.delete(w),w.getAttribute(\"role\")!==R&&w.setAttribute(\"role\",R);return}y.set(w,R),w.removeAttribute(\"role\"),N&&p({reason:\"value\",element:g.name,name:\"role\"})},b=()=>{if(E.size===0)return;let g=new Set,N=w=>{for(let R of w.children){if(R.refused||R.text)continue;let _=R.dom.getAttribute(\"id\");_&&g.add(_),N(R)}};N(a);for(let[w,R]of E){if(w.id===void 0||s.get(w.id)!==w){E.delete(w);continue}let _=w.dom;for(let[v,U]of R){let H=U.value.split(/\\s+/).filter(K=>K!==\"\"),V=H.filter(K=>!g.has(K));if(H.length>0&&V.length===0){if(U.drawn)continue;U.drawn=!0,_.setAttribute(v,U.value),u(w,!1)}else U.drawn&&(U.drawn=!1,_.removeAttribute(v),p({reason:\"reference\",element:w.name,name:v,ids:V.length>0?V:H}),u(w,!0))}}},S=(g,N,w,R=!0)=>{let _=g.dom;if(w!=null&&typeof w!=\"string\")return p({reason:\"value\",element:g.name,name:N});let v=Ro(g.namespace,g.name,N,w??null,e);if(\"refused\"in v){let K=Ro(g.namespace,g.name,N,null,e);return\"refused\"in K||_.removeAttribute(K.name),!(\"refused\"in K)&&K.name===\"role\"&&y.delete(_),p(v.refused)}for(let K of v.dropped??[])p(K);let U=g.namespace===\"html\"&&rc.has(v.name)&&Xi.has(g.name),H=_,V=U?v.name===\"value\"?H.value:v.name===\"checked\"?H.checked:H.selected:void 0;if(v.name===\"role\"&&y.delete(_),zs.includes(v.name)){let K=E.get(g)??new Map;v.value===null?K.delete(v.name):K.set(v.name,{value:v.value,drawn:!0}),K.size>0?E.set(g,K):E.delete(g)}v.value===null?_.removeAttribute(v.name):_.setAttribute(v.name,v.value),R&&(v.name===\"role\"||qi.includes(v.name))&&u(g,v.name===\"role\"),e.onAttribute?.(_,v.name),U&&(v.name===\"value\"&&\"value\"in H?(H.value=v.value??\"\",V!==H.value&&e.onFieldSet?.(_)):v.name===\"checked\"&&\"checked\"in H?(H.checked=v.value!==null,V!==H.checked&&e.onFieldSet?.(_)):v.name===\"selected\"&&\"selected\"in H&&(H.selected=v.value!==null,V!==H.selected&&e.onFieldSet?.(_.parentElement?.closest(\"select\")??_)))},h=g=>{if(!g.refused){l-=1,g.id!==void 0&&s.delete(g.id);for(let N of g.children)h(N)}},T=(g,N)=>{if(!rn(g)||typeof g.id!=\"string\"||s.has(g.id))return p({reason:\"record\"}),f();if(l>=r)return p({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),f();let w=g.id;if(g.type===nc)return f();if(g.type===tc){if(Er(N.namespace,N.name))return p({reason:\"child\",element:N.name}),f();let H=n.createTextNode(String(g.data??\"\").slice(0,lo)),V={dom:H,children:[],text:!0,id:w,parent:N};return s.set(w,V),i.set(H,w),l+=1,V}if(g.type!==ec)return p({reason:\"record\"}),f();let R=String(g.element);if(Er(N.namespace,N.name))return p({reason:\"child\",element:R}),f();let _=Mi(R,N.namespace);if(\"refused\"in _)return p(_.refused),f();let v=n.createElementNS(_.namespace===\"svg\"?Ws:Bs,_.name);_.as&&v.setAttribute(\"data-graview-as\",_.as),_.namespace===\"html\"&&_.name===\"img\"&&v.setAttribute(\"referrerpolicy\",\"no-referrer\"),_.namespace===\"html\"&&_.name===\"a\"&&(v.setAttribute(\"target\",\"_blank\"),v.setAttribute(\"rel\",\"noopener noreferrer\"),v.setAttribute(\"referrerpolicy\",\"no-referrer\"));let U={dom:v,name:_.name,namespace:_.namespace,children:[],id:w,parent:N};if(s.set(w,U),i.set(v,w),l+=1,rn(g.attributes)){for(let[H,V]of Object.entries(g.attributes))S(U,H,V,!1);u(U,!0)}if(e.decorate?.(v,_.name,_.namespace),rn(g.properties))for(let H of Object.keys(g.properties))p({reason:\"attribute\",element:_.name,name:H});if(rn(g.eventListeners))for(let H of Object.keys(g.eventListeners))g.eventListeners[H]!=null&&p({reason:\"attribute\",element:_.name,name:`on${H}`});if(Array.isArray(g.children))for(let H of g.children){let V=T(H,U);U.children.push(V),v.appendChild(V.dom)}return U},A=g=>{if(!Array.isArray(g))return p({reason:\"record\"});let[N,w]=g,R=typeof w==\"string\"?s.get(w):void 0;if(!R)return p({reason:\"record\"});switch(N){case ql:{if(R.text)return p({reason:\"record\"});let _=Number(g[3]),v=Number.isInteger(_)&&_>=0&&_<=R.children.length?_:R.children.length,U=g[2],H=rn(U)&&typeof U.id==\"string\"?m.get(U.id):void 0,V;H&&H.parent?.namespace===R.namespace&&!Er(R.namespace,R.name)?(m.delete(U.id),H.parent=R,V=H):V=T(U,R),R.dom.insertBefore(V.dom,R.children[v]?.dom??null),R.children.splice(v,0,V),R.namespace===\"html\"&&R.name===\"textarea\"&&e.onFieldSet?.(R.dom);return}case Kl:{let _=Number(g[2]),v=R.children[_];if(!v)return p({reason:\"record\"});R.children.splice(_,1),v.dom.parentNode?.removeChild(v.dom),v.id!==void 0&&!v.refused?m.set(v.id,v):h(v);return}case Zl:{if(!R.text)return p({reason:\"record\"});R.dom.data=String(g[2]??\"\").slice(0,lo);let _=k(R,R.parent);_&&e.onFieldSet?.(_);return}case Jl:{if(R===a||R.text)return p({reason:\"record\"});let _=String(g[2]),v=g[4]??Bi;return v===Ql?S(R,_,g[3]):p(v===Bi||v===Wi?{reason:\"attribute\",element:R.name,name:v===Wi?`on${_}`:_}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(g,N){if(!Array.isArray(g))return p({reason:\"record\"}),!0;try{for(let w=0;w<g.length;w+=1){if(N&&w%32===0&&N())return!1;A(g[w])}return!0}finally{for(let w of m.values())h(w);m.clear(),b()}},get refused(){return o},get size(){return l},idOf:g=>i.get(g),elementOf(g){let N=s.get(g);return N&&!N.text&&N!==a?N.dom:void 0},dispose(){for(let g of a.children)h(g);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}var sc=\"@layer graview-motion, graview-region, graview-view, graview-theme;\",ic=new Set([\"media\",\"supports\",\"container\",\"keyframes\",\"-webkit-keyframes\"]),ac=new Set([\"src\",\"image-set\",\"-webkit-image-set\"]),lc={\"}\":\"{\",\")\":\"(\",\"]\":\"[\"};function Ji(t){let e=[],n=Jt(t);for(let[r,o]of n.entries())switch(o.type){case\"bad-string\":case\"bad-url\":case\"url\":case\"CDO\":case\"CDC\":return!1;case\"delim\":if(o.value===\"\\\\\")return!1;break;case\"at-keyword\":if(!ic.has(o.value.toLowerCase()))return!1;break;case\";\":if(e.length===0)return!1;break;case\"function\":{let s=o.value.toLowerCase();if(ac.has(s))return!1;if(s===\"url\"){let i=n[r+1];if(i?.type!==\"string\"||!i.value.startsWith(\"#\"))return!1}e.push(\"(\");break}case\"{\":case\"(\":case\"[\":e.push(o.type);break;case\"}\":case\")\":case\"]\":if(e.pop()!==lc[o.type])return!1;break;default:}return e.length===0}function Zi(t,e){return e.trim()===\"\"||!Ji(e)?\"\":`@layer ${t} {\n${e}\n}`}function Qi(t,e){return t.trim()===\"\"?Ji(e)?e:\"\":[sc,Zi(\"graview-theme\",t),Zi(\"graview-view\",e)].filter(n=>n!==\"\").join(`\n`)}function ea(t,e,n){let{root:r}=Ui(),o=!1,s=Ki(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let m of t)s.apply(m);let i=[...s.refused],a=\"\",l=[];if(e){let m=Qt(e,void 0,{faces:{scope:\"graview-view\",...n.lent?{lent:n.lent}:{}}});a=m.css,l=m.faces;for(let E of m.refused)i.push({reason:\"css\",name:\"stylesheet\",css:E})}let c=n.theme?gr(n.theme).css:\"\",y=Qi(c,a);return{root:r,refused:i,size:s.size,over:o,css:y,faces:l,elementOf:m=>s.elementOf(m),idOf:m=>s.idOf(m)}}var Nr=\" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.\",ta={animate:Nr,animateTransform:Nr,animateMotion:Nr,set:Nr,feImage:\" It loads an image: a filter here is made of the view's own pixels.\",\"@property\":\" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.\",\"a href\":\" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.\",loading:' An <img> loads \"lazy\" or \"eager\".',fetchpriority:' An <img> fetches at \"high\", \"low\" or \"auto\".',role:` A role of the app's chrome or notices is the app's; role=\"region\" is drawn while it has a name (aria-label).`};function cc(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(ta,s)?ta[s]:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${o(\"element\"in t?t.element:void 0)}`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.${o(`${\"element\"in t?t.element:\"\"}${r}`)}`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.${o(t.name)}`};case\"url\":return\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${Di(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${$i(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"reference\":{let s=\"ids\"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`\"${a}\"`).join(\", \"):\"no id\";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"}${r} names ${i}, ${s.length===1?\"which is\":\"which are\"} no element of this view. It names elements the view draws itself, by their id (<h2 id=\"\\u2026\">), drawn once each is there.`}}case\"css\":return t.css?.reason===\"font-face\"?{at:\"stylesheet @font-face\",says:Eo(t.css)}:{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.${o(t.css?.name)}`}}}function na(t,e,n={}){let{limits:r}=e;if(t.messages>r.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${r.messages} a view may send in a second.`};let o=new Set(e.acts);for(let p of t.asked)if(!o.has(p.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${p.name}\", which its manifest does not name.`};let s=Pi(e.props),i=ea(t.renders,t.sheets,{maxNodes:r.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:p=>p}:{},...n.theme?{theme:n.theme}:{},...n.lent?{lent:n.lent}:{},link:p=>Ii(p,{handed:s,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(i.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${r.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let a=[...e.places,...(e.lists??[]).filter(p=>!e.places.some(f=>f.as===p)).map(p=>({as:p}))],l=e.placesUnsure===!0,c=Vi(i.root,{props:e.props,places:a,...l?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let p of c.acts)if(!o.has(p))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${p}\" (data-act), which its manifest does not name.`};let y=[...i.refused.map(p=>cc(p,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...c.problems],m=new Set,E=p=>{for(let f of p.childNodes){if(f.nodeType!==1)continue;let k=f.getAttribute(\"data-part-failed\"),u=f.getAttribute(\"data-part\")??\"\";if(k!==null&&Qn.test(u)&&!m.has(`${u} ${k}`)&&m.size<10){m.add(`${u} ${k}`);let b=JSON.stringify((f.getAttribute(\"data-part-why\")??\"\").replace(/[\\u0000-\\u001f\\u007f\\u2028\\u2029]+/g,\" \").slice(0,300));y.push({at:`part \"${u}\"`,says:`The part \"${u}\" ${k===\"slow\"?\"took too long\":\"threw\"}: ${b}. The page draws a note in its place and the rest of the view.`})}E(f)}};E(i.root);for(let p of t.went)\"record\"in p&&!(e.props.node?.id===p.record||(e.props.nodes??[]).some(f=>f.id===p.record)||en(a,p.record))&&y.push({at:\"navigate\",says:l?`It goes to ${tn(p.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${ve(a)}${St}`:`It goes to ${tn(p.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${ve(a)}`}),\"place\"in p&&!en(a,p.place)&&y.push({at:\"navigate\",says:l?`It goes to the place ${tn(p.place)}, which is none of the places this run was told of.${ve(a)}${St}`:`It goes to the place ${tn(p.place)}, which this app does not have.${ve(a)}`});return{ok:!0,parts:c.parts,problems:y,drawn:i,videos:c.videos}}var Io=\"graviewHeadless\",Do=\"graviewHeadlessView\";var sa=globalThis,dc=Promise.prototype.then,uc=Promise.resolve(),on=t=>void dc.call(uc,t),Tr=sa.performance,sn=Tr&&typeof Tr.now==\"function\"?Tr.now.bind(Tr):Date.now,tt=JSON.stringify,ia=JSON.parse,fc=Object.defineProperty,xr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),kt=t=>{try{return ia(tt(t??null))}catch{return null}},z={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},ke,an=(t,e)=>{ke??={reason:t,detail:e}},nt=t=>{z.logs.length<50&&z.logs.push(t.slice(0,500))},At={removed:[],stuck:[],sealed:!1},Mo=new Map,rt=ei({send(t){if(z.messages+=1,t.type===\"mine\"){let e=t.id,n=t.op===\"set\"?Rs(t.key,t.value):void 0;n?nt(n):t.op===\"set\"&&t.value===null?Mo.delete(t.key):t.op===\"set\"&&Mo.set(t.key,t.value),on(()=>rt.hear(n?{type:\"mine-answer\",id:e,ok:!1,sentence:n}:{type:\"mine-answer\",id:e,ok:!0,...t.op===\"get\"?{value:Mo.get(t.key)??null}:{}}))}else t.type===\"render\"?z.renders.push(kt(t.records)):t.type===\"style\"?z.sheets=(kt(t.sheets)??[]).map(String):t.type===\"gestures\"?z.gestures=kt(t.bound):t.type===\"navigate\"&&\"place\"in t?z.went.push({place:String(t.place),...t.where!==void 0?{where:kt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&z.went.push({record:String(t.to),...t.where!==void 0?{where:kt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return z.messages+=1,z.asked.push({name:String(t),args:kt(e)}),Promise.resolve({type:\"answer\",id:z.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){z.messages+=1,z.went.push({record:String(t)})},microtask:on,now:sn,threw:t=>an(\"error\",`It threw: ${xr(t)}`),warn:nt,hardening:()=>At}),ra=!1,Lo=!1;function pc(t){if(Lo||typeof t!=\"function\"||(Lo=!0,ke))return;let e=sn();try{t.call(void 0,rt.view)}catch(n){an(\"error\",`It threw: ${xr(n)}`)}z.ms+=sn()-e}async function mc(t){if(ra)return tt({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});ra=!0;let e;try{e=ia(String(t))}catch{return tt({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Lo&&!ke)return tt({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=sn();ke||rt.hear({type:\"props\",props:e.props,push:1,partMs:e.limits.pushMs/4}),z.ms+=sn()-n,z.ms>=e.limits.pushMs&&an(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!ke;o+=1)await new Promise(s=>on(s));if(ke||(z.clicks=rt.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!ke){let o=typeof e.press.target==\"string\"?e.press.target:rt.find(e.press.selector);if(z.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:z.asked.length,went:z.went.length,renders:z.renders.length},o!==void 0){try{rt.hear({type:\"dom-event\",target:o,event:\"click\"})}catch(s){an(\"error\",`It threw: ${xr(s)}`)}for(let s=0;s<64&&!ke;s+=1)await new Promise(i=>on(i))}}if(ke)return tt({ok:!1,...ke,transcript:z});let r=na(z,e);return r.ok?tt({ok:!0,transcript:z,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:At.removed.length,sealed:At.sealed}}):tt({ok:!1,reason:r.reason,detail:r.detail,transcript:z})}var hc=Object.freeze({log:(...t)=>nt(t.map(String).join(\" \")),info:(...t)=>nt(t.map(String).join(\" \")),debug:(...t)=>nt(t.map(String).join(\" \")),warn:(...t)=>nt(t.map(String).join(\" \")),error:(...t)=>nt(t.map(xr).join(\" \"))}),gc=0,oa=()=>gc+=1,yc=[[\"console\",hc],[\"setTimeout\",oa],[\"setInterval\",oa],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",on],[\"graview\",rt.view],[Do,pc],[Io,t=>mc(t)]];for(let[t,e]of yc)fc(sa,t,{value:e,writable:!0,enumerable:!1,configurable:!0});At=$s(globalThis,[\"graview\",Do,Io],{primitivesStay:!0});At.stuck.length>0&&an(\"refused\",`This isolate could not be hardened: ${At.stuck.join(\", \")} would not go.`);})();\n";
|
|
8
8
|
//# sourceMappingURL=runtime.generated.js.map
|