@graview/guest 0.2.2 → 0.2.4

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.
Files changed (90) hide show
  1. package/README.md +66 -0
  2. package/dist/headless/draw.d.ts +2 -0
  3. package/dist/headless/draw.d.ts.map +1 -1
  4. package/dist/headless/draw.js +1 -1
  5. package/dist/headless/draw.js.map +1 -1
  6. package/dist/headless/index.d.ts +2 -0
  7. package/dist/headless/index.d.ts.map +1 -1
  8. package/dist/headless/index.js +1 -1
  9. package/dist/headless/index.js.map +1 -1
  10. package/dist/headless/judge.d.ts +2 -0
  11. package/dist/headless/judge.d.ts.map +1 -1
  12. package/dist/headless/judge.js +1 -1
  13. package/dist/headless/judge.js.map +1 -1
  14. package/dist/headless/runtime.generated.d.ts.map +1 -1
  15. package/dist/headless/runtime.generated.js +1 -1
  16. package/dist/headless/runtime.generated.js.map +1 -1
  17. package/dist/headless/seats.d.ts +2 -1
  18. package/dist/headless/seats.d.ts.map +1 -1
  19. package/dist/headless/seats.js +7 -2
  20. package/dist/headless/seats.js.map +1 -1
  21. package/dist/host/drop.d.ts +2 -1
  22. package/dist/host/drop.d.ts.map +1 -1
  23. package/dist/host/drop.js +1 -1
  24. package/dist/host/drop.js.map +1 -1
  25. package/dist/host/fonts.d.ts +5 -4
  26. package/dist/host/fonts.d.ts.map +1 -1
  27. package/dist/host/fonts.js +13 -11
  28. package/dist/host/fonts.js.map +1 -1
  29. package/dist/host/frame.d.ts +10 -3
  30. package/dist/host/frame.d.ts.map +1 -1
  31. package/dist/host/frame.js +16 -6
  32. package/dist/host/frame.js.map +1 -1
  33. package/dist/host/index.d.ts +1 -0
  34. package/dist/host/index.d.ts.map +1 -1
  35. package/dist/host/links.d.ts +2 -1
  36. package/dist/host/links.d.ts.map +1 -1
  37. package/dist/host/links.js +1 -1
  38. package/dist/host/links.js.map +1 -1
  39. package/dist/host/media.d.ts +2 -1
  40. package/dist/host/media.d.ts.map +1 -1
  41. package/dist/host/media.js +1 -1
  42. package/dist/host/media.js.map +1 -1
  43. package/dist/host/open-draw.d.ts +2 -0
  44. package/dist/host/open-draw.d.ts.map +1 -1
  45. package/dist/host/open-draw.js +1 -1
  46. package/dist/host/open-draw.js.map +1 -1
  47. package/dist/host/parts.d.ts +2 -1
  48. package/dist/host/parts.d.ts.map +1 -1
  49. package/dist/host/parts.js +1 -1
  50. package/dist/host/parts.js.map +1 -1
  51. package/dist/host/pictures.d.ts +23 -2
  52. package/dist/host/pictures.d.ts.map +1 -1
  53. package/dist/host/pictures.js +77 -8
  54. package/dist/host/pictures.js.map +1 -1
  55. package/dist/host/problems.d.ts +13 -0
  56. package/dist/host/problems.d.ts.map +1 -0
  57. package/dist/host/problems.js +61 -0
  58. package/dist/host/problems.js.map +1 -0
  59. package/dist/host/react.d.ts +4 -1
  60. package/dist/host/react.d.ts.map +1 -1
  61. package/dist/host/react.js +3 -4
  62. package/dist/host/react.js.map +1 -1
  63. package/dist/host/sections.d.ts +2 -1
  64. package/dist/host/sections.d.ts.map +1 -1
  65. package/dist/host/sections.js +3 -3
  66. package/dist/host/sections.js.map +1 -1
  67. package/dist/host/session.d.ts +5 -2
  68. package/dist/host/session.d.ts.map +1 -1
  69. package/dist/host/session.js +1 -1
  70. package/dist/host/session.js.map +1 -1
  71. package/dist/host/view.d.ts +16 -2
  72. package/dist/host/view.d.ts.map +1 -1
  73. package/dist/host/view.js +26 -25
  74. package/dist/host/view.js.map +1 -1
  75. package/dist/host/views.d.ts +2 -0
  76. package/dist/host/views.d.ts.map +1 -1
  77. package/dist/host/views.js +2 -0
  78. package/dist/host/views.js.map +1 -1
  79. package/dist/host/worker-react.d.ts +11 -2
  80. package/dist/host/worker-react.d.ts.map +1 -1
  81. package/dist/host/worker-react.js +1 -0
  82. package/dist/host/worker-react.js.map +1 -1
  83. package/dist/host/worker.d.ts +2 -0
  84. package/dist/host/worker.d.ts.map +1 -1
  85. package/dist/host/worker.js +2 -0
  86. package/dist/host/worker.js.map +1 -1
  87. package/dist/protocol.d.ts +16 -1
  88. package/dist/protocol.d.ts.map +1 -1
  89. package/dist/protocol.js.map +1 -1
  90. 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 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,\"&amp;\").replace(/\"/g,\"&quot;\"),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,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));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,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),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";
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\"),cn=Symbol(\"extensions\"),Be=Symbol(\"hooks_dispatch\"),Q=Symbol(\"is_connected\"),at=Symbol(\"create_element\"),Wo=0,le=1,lt=2,ct=3,dt=8,We=9,Yo=10,Le=11,G=\"http://www.w3.org/1999/xhtml\",he=\"http://www.w3.org/2000/svg\",Xo=\"http://www.w3.org/XML/1998/namespace\",Rt=\"http://www.w3.org/2000/xmlns/\";function dn(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 qo(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 Ko=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Zo=/[\\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 Jo(t){Ko.test(t)||Cr(t)}function Pr(t){(t===\"\"||Zo.test(t))&&Cr(t)}function un(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\"?!Ko.test(a):a===\"\"||Zo.test(a)))&&Cr(o),i!=null&&r==null)throw j(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Xo)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 fn=0,pn=1,Qo=2,Ir=3,fa=typeof performance>\"u\"?Date.now:performance.now.bind(performance),ee=class{static NONE=fn;static CAPTURING_PHASE=pn;static AT_TARGET=Qo;static BUBBLING_PHASE=Ir;timeStamp=fa();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=fn;[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===pn?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Qo: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=[],mn=new WeakMap;function hn(t,e){let n=mn.get(t);n?n.push(e):mn.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{es(e)}catch{}throw r}return _t.pop(),es(e),n}function es(t){let e,n=!1;for(let r of t){let o=mn.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}mn.delete(r)}}if(n)throw e}var gn=[],Pt=[],Mr=!1;function Ye(t){for(let e of t)gn.push(e),e[1]&&Pt.push(e[1]);if(!Mr){Mr=!0;try{let e,n=!1;for(let r=0;r<gn.length;r++){let[o,s]=gn[r];s&&Pt.splice(Pt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{gn.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 g=c[a];if(g||(g=new Map,c[a]=g),g.has(n))return;let m=this,b={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(b.normalizedListener=function(...E){if(b.signal?.aborted){yn(m,b);return}return b.once&&yn(m,b),typeof b.listener==\"object\"?b.listener.handleEvent(...E):b.listener.call(this,...E)});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),g.set(n,b),k.add(b),i){let u=()=>{yn(m,b)};b.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],pn),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=fn,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&&yn(this,s)}function Lr(t){return t?\"capture\":\"bubble\"}function yn(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,ts=1,Fr=2,Ur=3,Lt=4,ns=0,rs=1,wn=2,Nn=3,os=4,Hr=5,ss=6,is=7,bn=/^(?:--|-?[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 Tn(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 xn(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=ts: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,b=l[4]??l[5]??l[7];if(l[2]){bn.test(c)||ae(t);let p=l[5],f=p?.[0];if(l[3]==null&&(f==='\"'||f===\"'\")){let k=l[0].lastIndexOf(p);b=i.slice(l.index+k+1),s.lastIndex=i.length}else p!=null&&!bn.test(p)&&ae(t);m=os}else l[6]?(bn.test(c)||ae(t),m=l[6]===\"#\"?wn:Nn):l[8]?m=l[9]==null?Hr:ss:l[7]===\"*\"?m=ns:l[7]&&bn.test(l[7])?m=rs:ae(t);l[9]?([b,s.lastIndex]=ha(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&ae(t),c===\"has\"&&e&&ae(t),$t(b,e||c===\"has\",c===\"has\")):m===Hr&&ae(t),r.matchers.push({type:m,name:c,value:b}),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:is,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(!En(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Dt(t,a,n)}let s=r===ts||r===Mt?ie:Y,i=t[s];if(!i)return!1;if(r===Mt||r===Fr){for(;i;){if(oe(i)&&En(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)||!En(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 En(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(En(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case ns:return o===\"*\";case rs:return t.namespaceURI===G?t.localName===Z(o):t.localName===o;case wn:return $r(t,\"id\")===o;case Nn:let i=$r(t,\"class\");return i?dn(i).includes(o):!1;case os:let a=$r(t,o);return s==null?a!=null:a===s;case is:return t===n;case Hr:ae(`:${o}`);case ss: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 ds(t){return\"appendChild\"in t}function Sn(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 g=l[Ae];g&&!o.has(g)&&!r.has(g)&&(r.add(g),n.push(g))}s??=a}return{nodes:e,treeNodes:s}}function Ft(t,e){for(let n of t)n[W]=e}function as(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[W]=e,r}function ls(t,e){if(zr(t))return e.createTextNode(t.data);if(Ea(t))return e.createComment(t.data);if(ba(t))return as(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(as(o,e))}return n}else{if(jr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[W]=e,n}}}function vn(t,e,n=t.ownerDocument){if(t.nodeType===We)throw j(\"Cannot clone a document node\",\"NotSupportedError\");let r=ls(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 g=i.source[Ae];g&&(o.has(g)&&cs(),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)&&cs(),o.add(a);let c=ls(a,n);oe(a)||jr(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function cs(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function kn(t,e){let n=String(e);return n===\"\"?null:Tn(t,[{type:wn,name:n}])}function An(t,e){let n=[...new Set(dn(String(e)))];return xn(t,n.map(r=>({type:Nn,name:r})))}function On(t,e){let n=String(e),r=Z(n),o=[];for(let s of Rn(t))oe(s)&&(n===\"*\"||(s.namespaceURI===G?s[L]===r:s[L]===n))&&o.push(s);return o}function Rn(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=Rn(t);return e.unshift(t),e}var ye=class extends $e{nodeType=Wo;[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 Rn(this))zr(n)&&(e+=n.data);return e}set textContent(e){if(Ht(this))this.data=e;else if(ds(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return vn(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 Yo:case Le:return null;case lt:e=e.ownerElement;break;default:e=e.parentElement}return null}var be=Symbol(\"insertNode\"),Wr=Symbol(\"preflightInsertions\"),_n=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[_n](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 Pn,Yr=0,us=0,fs=0,ps=0,ut=!1,qr=!1,jt=!1,Cn=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=Pn??=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=Pn;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&&(Pn=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=Pn;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 In(...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&&(us+=e),t.characterData&&(fs+=e),t.childList&&(ps+=e),ut=us>0,qr=fs>0,jt=ps>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=Dn(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[_n](e,n))}[_n](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:b})=>b)),c=s;for(;c&&l.has(c);)c=c[C];let g=Dn(this,n);if(a){for(let p of a)p[Q]=!1;let b=new Set(a);for(let p of i)b.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,g),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return xn(this,e)}querySelector(e){return Tn(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,g;if(i[W]===o)l&&(c=Ut(i));else{let m=Sn(i);g=m.nodes,l&&(c=m.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[C];s.source={parent:i,index:Dn(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:In(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:In(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){hs(e,n)}};function ms(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=Dn(t,e);if(o)for(let c of o)c[Q]=!1;Ft(n.nodes,r),jt&&Ee({type:\"childList\",target:t,removedNodes:In(e),previousSibling:s,nextSibling:i}),o&&hs(o,\"disconnectedCallback\");let l=[];t.nodeType===le&&!Ct(t)&&l.push([()=>t[X].removeChild?.(t,e,a)]),Ye(l)}function Dn(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 hs(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&hn(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)||hn(t,()=>i.call(t,e,n,r,o))}var Mn=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,bs=/\\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 gs(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 Es(t){return t.namespaceURI===G&&xa.has(t.localName)}function ys(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(bs))if(ka.test(n[1]))return!0;return!1}function Ln(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),g=o[o.length-1]?.element??e,m=g[$]===he?he:G;if(c===\"svg\")m=he;else if(m===he){if(ys(g))m=G;else if(Aa(c,l)){for(;o.length>0;){let f=o[o.length-1];if(f.element[$]!==he||ys(f.element))break;o.pop(),s=f.target}m=G}}let b=m===G?c:a,p=n[at](b,m,null,b);for(let f of l.matchAll(bs))p.setAttribute(f[1],gs(f[3]||f[4]||\"\"));if(s.append(p),Es(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 g=o[c],m=Z(g.element[L]);if(m===l){s=g.target,o.length=c;break}if(g.element[$]===G&&m===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(gs(i[7]))}return r}function $n(t){return Ns([{type:\"content\",child:t[F]}])}function ws(t){return Ns([{type:\"opening\",node:t}])}function Ns(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,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[C]}if(e.push(\">\"),Es(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,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));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?qo(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 Mn(this),this[Te]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return On(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return An(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=un(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 ws(this)}get innerHTML(){return $n(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Ln(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 kn(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(Ln(String(e),this))}get innerHTML(){let e=this[Ae];return e?$n(e):\"\"}};var Hn=class extends J{};var Fn=class extends J{};var Un=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=jn(new Un,this,\"html\"),this.body=jn(new Hn,this,\"body\"),this.head=jn(new Fn,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 An(this,e)}createElement(e){let n=String(e);return Jo(n),Kr(this,Z(n))}createElementNS(e,n){let r=un(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=Gn(new pt(e),this);return this[X].createText?.(n,n.data),n}createComment(e){return Gn(new mt(e),this)}createDocumentFragment(){return Gn(new ht,this)}createEvent(){return new ee(\"\")}getElementById(e){return kn(this,e)}getElementsByTagName(e){return On(this,e)}importNode(e,n){if(e.nodeType===We)throw j(\"Cannot import a document node\",\"NotSupportedError\");return vn(e,n,this)}adoptNode(e){if(e[W]===this)return e;let n=Sn(e);return te(()=>{let r=e.parentNode;return r?ms(r,e,n,this):Ft(n.nodes,this),e})}};function Gn(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 jn(s,t,e,n,r)}function jn(t,e,n,r=G,o=null){return Gn(t,e),Object.defineProperties(t,{[L]:{value:n},[$]:{value:r},[Ie]:{value:o}}),e[X].createElement?.(t,r),t}var zn=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 Vn=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 Bn=class extends ee{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Wn=class extends ee{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Yn=class extends ee{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Xn=class extends ee{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var qn=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 Ts(t){return Oa.test(t)&&!Ra.has(t)}function xs(t){return j(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Kn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Ts(e))throw xs(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(!Ts(e))return Promise.reject(xs(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\"],vs=Symbol.for(\"@remote-dom/polyfill/global-property\");function ks(t){return Object.getOwnPropertyDescriptors(t)}function As(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 Os(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(ks(t),As(t),Os(t))}function Zr(t){return Object.defineProperty(t,vs,{value:!0}),t}function Ss(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[vs]===!0)}var Ke=class extends $e{[X]={};[cn]=[];[Be]=Ma(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Vt(this);customElements=new Kn;location=globalThis.location;navigator=globalThis.navigator;Event=ee;ErrorEvent=Vn;PromiseRejectionEvent=Bn;ToggleEvent=Wn;FocusEvent=Yn;ClipboardEvent=Xn;EventTarget=$e;CustomEvent=zn;Node=ye;ParentNode=xe;ChildNode=He;DocumentFragment=ht;Document=Vt;CharacterData=Fe;Comment=mt;Text=pt;Element=J;HTMLElement=qn;SVGElement=ft;HTMLTemplateElement=gt;MutationObserver=Cn;#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=ks(e),s=Object.assign(As(e),Os(e));delete o.self,Object.defineProperties(globalThis,o),Ss(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),Ss(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[cn].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[cn])s[e]?.apply(s,n);let r=t[X];r[e]?.apply(r,n)}var Zn=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++),Jn(t,e)),e}function Jn(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 Qn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Qn(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=Zn[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&&(Qn(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(Zn);function _s(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 Ps(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 Cs=[\"wheel\",\"drag\",\"pinch\"];var er=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var Ds=[\"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\"],Ms=[\"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\"],Ls=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],$s=[\"TEMPORARY\",\"PERSISTENT\"],$f=Object.freeze([...Ds,...Ms,...Ls,...$s]),Hf=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Is=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Hs(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Ds,...Ms,...Ls,...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:$s.includes(T)&&typeof A.value==\"number\"},a=t,l=a.setTimeout,c=a.setInterval,g=a.crypto,m=(h,T)=>function(A,y,...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,y,...N)},b=g?Object.freeze({getRandomValues:h=>g.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(Is(T)):i(h,T)||o.push(Is(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 E=(h,T)=>{Reflect.defineProperty(t,h,{value:T,writable:!0,enumerable:!0,configurable:!0})||o.push(h)};E(\"setTimeout\",m(l,\"setTimeout\")),E(\"setInterval\",m(c,\"setInterval\")),b&&E(\"crypto\",b);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(),Jn(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\"},tr={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Fs={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Us={oneOf:[\"R\",\"G\",\"B\",\"A\"]},we={...Pe,in:\"text\",result:\"text\"},Gs={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},nr={svg:{attributes:{...Pe,...tr}},g:O,defs:O,symbol:{attributes:{...Pe,...tr,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\",...Gs}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Gs}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Pe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Pe,...tr,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...tr,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:O,filter:{attributes:{...Pe,filterUnits:Fs,primitiveUnits:Fs}},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:Us,yChannelSelector:Us}},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 js=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],zs=[\"region\"],io={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},rr={section:[\"aria-label\",\"title\"]},Vs=[\"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,Bs=1e5,Wt=512e3,lo=1e4,Ws=\"http://www.w3.org/1999/xhtml\",Ys=\"http://www.w3.org/2000/svg\",Ya=new Map(Object.keys(nr).map(t=>[t.toLowerCase(),t]));function or(t){return Ya.get(t.toLowerCase())}function sr(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Nt[e]?.attributes,ja]:[nr[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 ir=/^\\d{4}-\\d{2}-\\d{2}$/;function Xa(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!ir.test(t)||!ir.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 Xs(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 qs(t,e){if(typeof t!=\"string\")return;if(ir.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return ir.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 Ks=\"~\",ar=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 Zs(){let t=new Map,e=new Map,n=new Map([[Ks,{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 m of g.listeners.values())s(m);for(let m of g.children)i(m)}},a=(c,g,m=0)=>{if(!ar(c)||m>64)return Se(c);let b=typeof c.id==\"string\"?c.id:void 0,p=g&&b!==void 0&&b!==Ks;p&&i(b);let f={children:[],listeners:new Map};p&&n.set(b,f);let k={};for(let[u,E]of Object.entries(c))u===\"children\"&&Array.isArray(E)?k[u]=E.map(S=>{let h=a(S,p,m+1);return p&&ar(S)&&typeof S.id==\"string\"&&f.children.push(S.id),h}):u===\"eventListeners\"&&ar(E)?k[u]=Object.fromEntries(Object.entries(E).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(E,m+1);return k},l=c=>{if(!Array.isArray(c))return Se(c);let[g,m]=c,b=typeof m==\"string\"?n.get(m):void 0;if(g===0){let p=a(c[2],b!==void 0),f=ar(c[2])?c[2].id:void 0;if(b&&typeof f==\"string\"&&n.has(f)){let k=Number(c[3]);b.children.splice(Number.isInteger(k)&&k>=0&&k<=b.children.length?k:b.children.length,0,f)}return[g,Se(m),p,Se(c[3])]}if(g===1){let p=Number(c[2]);return b&&Number.isInteger(p)&&p>=0&&p<b.children.length&&i(b.children.splice(p,1)[0]),Se(c)}if(g===3&&c[4]===3){let p=String(c[2]),f=c[3],k=b&&typeof f==\"function\"?o(f):void 0,u=b?.listeners.get(p);return u!==void 0&&s(u),k===void 0?b?.listeners.delete(p):b.listeners.set(p,k),[g,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,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),uo=t=>Object.freeze({html:t,toString:()=>t}),po=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),ei=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(ei).join(\"\"):po(t)?t.html:fo(String(t));function ti(t){customElements.get(co)||customElements.define(co,Bt);let e=Event,n=Zs(),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)},g=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,b=new Map,p=0,f=(d,x,P)=>new Promise((I,D)=>{let M=++p;b.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(()=>{}))}}),E=d=>{if(d.type===\"mine-answer\"){let D=b.get(d.id);return b.delete(d.id),D?.(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,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)){y(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),y(ue,D),I+=1;continue}}d.insertBefore(D,M),I+=1}for(;d.childNodes.length>I;)d.removeChild(d.lastChild)}function y(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?or(M):Object.prototype.hasOwnProperty.call(Nt,M.toLowerCase())?M.toLowerCase():void 0;if(!ue){P.add(`<${M}>`);continue}for(let ze of D.getAttributeNames())(!sr(B?\"svg\":\"html\",ue,ze)||!B&&rr[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\"}},Ho=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=>Ho(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\"||!er.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,Bo)=>{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: ${Bo}`;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(Bo.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(),Vo,Rr=0;try{Vo=Ho(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}\">${Vo}</${I}>`)}let vr=[],kr=new Set(Cs),Fo=\"[]\",Ar=!1,Uo=()=>{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!==Fo&&(Fo=x,t.send({type:\"gestures\",bound:d}))}))},Go=\"[[],[]]\",Or=!1,jo=()=>{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!==Go&&(Go=I,t.send({type:\"clicks\",selectors:x,...P.length>0?{acted:P}:{}}))}))},zo=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)&&Uo(),(d===\"click\"||d===\"acted\")&&jo(),()=>{o.delete(I),kr.has(d)&&Uo(),(d===\"click\"||d===\"acted\")&&jo()}},act:(d,x={})=>t.act(d,x),mine:u,navigate(d){if(typeof d==\"string\")return t.navigate(d);let x=Ps(d);x&&t.send(x)},part:la,html(d,...x){return uo(d.reduce((P,I,D)=>P+I+(D<x.length?ei(x[D]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(d,x){let P=qs(d,s?.timeZone);return P===void 0?\"\":Xs(P,zo.today,x)},get refused(){return i},get hardening(){return t.hardening()}});return{view:zo,hear:E,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\"},ni=[\"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\"],ri=[\"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\"],oi=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],si=[\"media\",\"supports\",\"container\",\"keyframes\"],ii={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},ai=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],li=[\"-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 lr=5e4,cr=2e5,go=16,dr=[\"font-family\",\"src\",\"font-weight\",\"font-style\",\"font-display\",\"unicode-range\",\"font-stretch\"],ci=2*Math.ceil(cr/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 di(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 g=r.slice(i,s).filter(m=>m.type===\"ident\");a=g.length>0?g.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(b=>b.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 g;try{g=atob(a)}catch{return{problem:\"encoding\"}}let m=new Uint8Array(g.length);for(let b=0;b<g.length;b+=1)m[b]=g.charCodeAt(b);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 Eo(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(!dr.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,g=ho(c),m=c!==void 0&&g!==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 b=(N,w={})=>(r({reason:\"font-face\",name:N,...m!==void 0?{family:m}:{},...w}),{data:a});if(Ze(t).length>0)return b(\"unreadable\");if(c===void 0||g)return b(\"family\",{said:g??\"its family is one name\"});let p=c;if(o.some(N=>N.toLowerCase()===p.toLowerCase()))return b(\"lent\");let f=s.get(\"src\");if(!f)return b(\"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 b(\"local\");if(_===void 0)return b(\"src\");if(!/^data:/i.test(_))return b(\"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 b(\"src\");let v=nl(_,lr);if(\"problem\"in v)return v.problem===\"size\"?b(\"size\",{bytes:v.bytes}):b(v.problem,\"type\"in v&&v.type?{said:v.type}:{});k.push(v)}if(k.length===0)return b(\"src\");let u=k.reduce((N,w)=>N+w.bytes.byteLength,0);if(u>lr)return b(\"size\",{bytes:u});if(n.count+1>go)return b(\"count\");if(n.bytes+u>cr)return b(\"total\",{bytes:n.bytes+u});let E=(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=E(\"font-weight\",sl),h=E(\"font-style\",il),T=E(\"font-stretch\",al),A=E(\"font-display\",ll),y=E(\"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}:{},...y?{unicodeRange:y}:{}},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 ur=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 wo(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 ${ur(t.bytes??0)} decoded, more than the ${ur(lr)} 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 ${ur(t.bytes??0)}, more than the ${ur(cr)} 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 ${dr.slice(0,-1).join(\", \")} and ${dr.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).`;case\"host\":return`Not loaded: ${e}. This host draws no face a view's own stylesheet declares: a view is drawn in the faces the app lends its views (brand.views.fonts), or in a system stack (view-font-face-host).`;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,vo=t=>t>=65&&t<=90||t>=97&&t<=122,ko=t=>t>=128,fr=t=>vo(t)||ko(t)||t===95,mi=t=>fr(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 Qt(t){let e=fl(t),n=0,r=(u=0)=>n+u<e.length?e[n+u]:Ne,o=[],s=(u,E)=>u===92&&E!==10&&E!==Ne,i=(u,E,S)=>u===45?fr(E)||E===45||s(E,S):fr(u)?!0:s(u,E),a=(u,E,S)=>u===43||u===45?ne(E)||E===46&&ne(S):ne(u===46?E:u),l=()=>{let u=r();if(n+=1,u===Ne)return 65533;if(pi(u)){let E=String.fromCodePoint(u);for(;E.length<6&&pi(r());)E+=String.fromCodePoint(r()),n+=1;Ce(r())&&(n+=1);let S=parseInt(E,16);return S===0||S>=55296&&S<=57343||S>1114111?65533:S}return u},c=()=>{let u=\"\";for(;;){let E=r();if(mi(E))u+=String.fromCodePoint(E),n+=1;else if(s(E,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},m=()=>{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}},b=()=>{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 E=r();if(n+=1,E===41)return{type:\"url\",value:u};if(E===Ne)return{type:\"url\",value:u};if(Ce(E)){for(;Ce(r());)n+=1;return r()===41||r()===Ne?(r()===41&&(n+=1),{type:\"url\",value:u}):(b(),{type:\"bad-url\"})}if(E===34||E===39||E===40||ul(E))return b(),{type:\"bad-url\"};if(E===92){if(s(E,r()))u+=String.fromCodePoint(l());else return b(),{type:\"bad-url\"};continue}u+=String.fromCodePoint(E)}},f=()=>{let u=c();if(u.toLowerCase()===\"url\"&&r()===40){for(n+=1;Ce(r())&&Ce(r(1));)n+=1;let E=Ce(r())?r(1):r();return E===34||E===39?{type:\"function\",value:u}:p()}return r()===40?(n+=1,{type:\"function\",value:u}):{type:\"ident\",value:u}},k=u=>{let E=\"\";for(;;){let S=r();if(n+=1,S===u||S===Ne)return{type:\"string\",value:E};if(hi(S))return n-=1,{type:\"bad-string\"};if(S===92){if(r()===Ne)continue;if(hi(r())){n+=1;continue}E+=String.fromCodePoint(l());continue}E+=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 E=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),id:E})}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())):fr(u)?(n-=1,o.push(f())):o.push({type:\"delim\",value:String.fromCodePoint(u)})}}}var Ni={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Ti=32,To=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 Zt(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,g)=>g>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 Ao(t){let e=new To(Qt(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+=\"\\\\-\":ko(r)||r===45||r===95||ne(r)||vo(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function pr(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);ko(r)||r===45||r===95||ne(r)||vo(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Jt(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=pr(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${pr(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`#${pr(t.value)}`;case\"string\":return Jt(t.value);case\"url\":return`url(${Jt(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(ni),vi=new Set(ri),bi=new Set(oi),yl=new Set(si),bl=new Set(ai),El=new Set(li),Ei=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,pe=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),wl=t=>pe(t);function xo(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=xo(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=xo(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=ii[o];if(s){let c=t.value.filter(b=>b.type!==\"whitespace\"),g=c[0],m=c.length===1&&g?.type===\"ident\"?pe(g.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=xo(r?void 0:o,t.value,e);if(!i)return;let a=Kt&&(o===\"font-family\"||o===\"font\")?di(i,Kt):i,l=je(a).trim();return`${r?`--${pr(t.name.slice(2))}`:o}: ${l}${t.important&&!(n&&Nl.test(o))?\" !important\":\"\"}`}var Oo=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\")&&Oo(e.value));function Ai(t,e){if(Oo(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 No(t,e,n,r){let o=[];for(let s of Zt(t))if(s.type===\"declaration\"){let i=hr(s,e);i&&o.push(`${i};`)}else{let i=mr(s,e,n+1,\"style\",r);i&&o.push(i)}return o.join(\" \")}function kl(t,e,n){if(Oo(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=Zt(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 So(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:So(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:So(e.value)}:e})}function mr(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()} { ${No(t.block,e,n)} }`}if(!Ai(t.prelude,e))return;let c=je(So(t.prelude)).trim();if(c===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${c} { ${No(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}if(o.refused){let g,m=Eo(t.prelude,Zt(t.block),{...o.budget},p=>void(g??=p.family),o.lent);m.face&&(o.data+=m.data);let b=m.face?.family??g;e({reason:\"font-face\",name:\"host\",...b!==void 0?{family:b}:{}});return}let c=Eo(t.prelude,Zt(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\"),g=c[0];if(c.length!==1||!g||g.type!==\"ident\"&&g.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let m=Tt(t.block,!1).map(p=>mr(p,e,n+1,\"keyframes\")).filter(p=>p!==void 0);return`@keyframes ${g.type===\"ident\"?xt(g.value):Jt(g.value)} { ${m.join(\" \")} }`}let a=kl(t.prelude,i,e);if(a===void 0)return;let l=r===\"style\"?No(t.block,e,n,o):Tt(t.block,!1).map(c=>mr(c,e,n+1,\"sheet\",o)).filter(c=>c!==void 0).join(\" \");return`@${i} ${a} { ${l} }`}var Kt,Ro=(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(Ao(t),!0).map(s=>mr(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 en([t],e,n)}function en(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?ci:0,g=r&&t.length>yo?t.slice(0,yo):t;g.length<t.length&&i.push({reason:\"size\",name:\"sheets\"});let m=0,b=0;for(let u of g){if(r&&b+u.length>e+c){i.push({reason:\"size\"});continue}if(!r&&m+u.length>e){i.push({reason:\"size\"});continue}b+=u.length;let E=r?{budget:{...l},kept:[],data:0,...r.lent?{lent:r.lent}:{},...r.refused?{refused:!0}:{}}:void 0,S=wi(u,E);if(m+S.counted>e){i.push({reason:\"size\"},...S.refused.filter(h=>h.reason===\"font-face\"));continue}E&&Object.assign(l,E.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:Ro(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 Ro(n.rename,()=>{for(let i of Zt(Ao(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=Ro(n.rename,()=>hr(Si(t,Ao(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 tn(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.\",nn=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=or(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]:nr[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 _o(t,e,n,r,o){let s=sr(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&rr[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=>js.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>Bs||!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}},Po=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}},Co=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 Po(this)}};function Ui(){let t=new Co,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 Io={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,rn=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function re(t){return t instanceof Je?t.data:!de(t)||rn(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(\":\"),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 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=>tn(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 E=f.getAttribute(\"data-record\");E!==null&&(o.add(E),!i.has(E)&&!a(E)&&n.push({at:`drawing <${f.localName} data-record=\"${E}\">`,says:e.placesUnsure?`It names \"${E}\", 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 \"${E}\", 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 E=new Set;for(let S of et(f)){let h=S.getAttribute(\"data-record\");h!==null&&S.localName!==\"graview-video\"&&E.add(h)}return E.size===1?[...E][0]:void 0},c=(f,k)=>{let u=i.get(k),E=u?.kind??(k.includes(\":\")?k.slice(0,k.indexOf(\":\")):\"\"),S=[...et(f)],h=S.find(A=>A.localName in Io)??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:E,title:T,parts:zi(m(f,h),k,T)}},g=f=>{let k=[...et(f)].filter(h=>h.localName===\"tr\"&&!rn(h)),u=k.find(h=>h.parentElement?.localName===\"thead\"||h.childNodes.every(T=>!de(T)||T.localName===\"th\")),E=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),y=A?i.get(A):void 0;return{id:A??\"\",kind:y?.kind??\"\",title:q(re(T[0]??h)),parts:T.slice(1).map((N,w)=>({t:\"field\",label:E[w+1]??\"\",text:q(re(N))}))}})}]}};function m(f,k){let u=[],E=\"\",S=()=>{let T=q(E);E=\"\",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){E+=A.data;continue}if(!de(A)||rn(A)||ji.has(A.localName))continue;if(k&&[...et(A)].includes(k)){S(),u.push(...m(A,k));continue}let y=[];for(let N=T;N<h.length;N+=1){let w=h[N];if(w instanceof Je&&q(w.data)===\"\")continue;if(!de(w)||rn(w)||Gi.has(w.localName)||w.localName in Io)break;let R=l(w);if(!R)break;y.push({element:w,id:R}),T=N}if(y.length>0){S();let N=y.every(w=>w.element.localName===\"li\"||w.element.localName===\"tr\");u.push({t:\"list\",as:N?\"row\":\"card\",columns:1,groups:[{items:y.map(w=>c(w.element,w.id))}]});continue}u.push(...b(A,N=>E+=N,S))}return S(),u}function b(f,k,u){let E=f.localName;if(Gi.has(E)&&E!==\"label\")return k(re(f)),[];if(E===\"mark\"){u();let h=q(re(f));return h?[{t:\"badge\",text:h}]:[]}u();let S=Io[E]??(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(E){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(T=>de(T)&&T.localName===\"li\"&&!rn(T)).map(T=>{let A=l(T);if(A)return c(T,A);let y=m(T),N=y[0],w=N&&(N.t===\"text\"||N.t===\"heading\")?N.text:\"\";return{id:\"\",kind:\"\",title:w,parts:w?y.slice(1):y}})}]}];case\"table\":return[g(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 y of A.childNodes.filter(de))y.localName===\"dt\"?T=q(re(y)):y.localName===\"dd\"&&h.push({t:\"field\",label:T,text:q(re(y))});return h}case\"figure\":{let h=f.childNodes.find(y=>de(y)&&y.localName===\"figcaption\"),T=q(f.childNodes.filter(y=>y!==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(y=>de(y)&&y.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(y=>y.localName===\"text\").map(y=>q(re(y))).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),y=A&&h&&Object.hasOwn(A,h)?A[h]:void 0,N=(Array.isArray(y)?y:[y])[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=E===\"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=\"~\",on=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,g=new WeakMap,m=new Map,b=new Map,p=y=>{o.push(y),o.length>200&&o.shift(),e.onRefused?.(y)},f=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),k=(y,N)=>{if(y.namespace===\"html\"&&y.name&&Xi.has(y.name))return y.dom;if(N?.namespace===\"html\"&&N.name===\"textarea\")return N.dom},u=(y,N)=>{let w=y.dom,R=g.get(w)??w.getAttribute(\"role\");if(R===null||!R.split(/\\s+/).some(_=>zs.includes(_.toLowerCase())))return void g.delete(w);if(oc(w)){g.delete(w),w.getAttribute(\"role\")!==R&&w.setAttribute(\"role\",R);return}g.set(w,R),w.removeAttribute(\"role\"),N&&p({reason:\"value\",element:y.name,name:\"role\"})},E=()=>{if(b.size===0)return;let y=new Set,N=w=>{for(let R of w.children){if(R.refused||R.text)continue;let _=R.dom.getAttribute(\"id\");_&&y.add(_),N(R)}};N(a);for(let[w,R]of b){if(w.id===void 0||s.get(w.id)!==w){b.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=>!y.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=(y,N,w,R=!0)=>{let _=y.dom;if(w!=null&&typeof w!=\"string\")return p({reason:\"value\",element:y.name,name:N});let v=_o(y.namespace,y.name,N,w??null,e);if(\"refused\"in v){let K=_o(y.namespace,y.name,N,null,e);return\"refused\"in K||_.removeAttribute(K.name),!(\"refused\"in K)&&K.name===\"role\"&&g.delete(_),p(v.refused)}for(let K of v.dropped??[])p(K);let U=y.namespace===\"html\"&&rc.has(v.name)&&Xi.has(y.name),H=_,V=U?v.name===\"value\"?H.value:v.name===\"checked\"?H.checked:H.selected:void 0;if(v.name===\"role\"&&g.delete(_),Vs.includes(v.name)){let K=b.get(y)??new Map;v.value===null?K.delete(v.name):K.set(v.name,{value:v.value,drawn:!0}),K.size>0?b.set(y,K):b.delete(y)}v.value===null?_.removeAttribute(v.name):_.setAttribute(v.name,v.value),R&&(v.name===\"role\"||qi.includes(v.name))&&u(y,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=y=>{if(!y.refused){l-=1,y.id!==void 0&&s.delete(y.id);for(let N of y.children)h(N)}},T=(y,N)=>{if(!on(y)||typeof y.id!=\"string\"||s.has(y.id))return p({reason:\"record\"}),f();if(l>=r)return p({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),f();let w=y.id;if(y.type===nc)return f();if(y.type===tc){if(Er(N.namespace,N.name))return p({reason:\"child\",element:N.name}),f();let H=n.createTextNode(String(y.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(y.type!==ec)return p({reason:\"record\"}),f();let R=String(y.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\"?Ys:Ws,_.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,on(y.attributes)){for(let[H,V]of Object.entries(y.attributes))S(U,H,V,!1);u(U,!0)}if(e.decorate?.(v,_.name,_.namespace),on(y.properties))for(let H of Object.keys(y.properties))p({reason:\"attribute\",element:_.name,name:H});if(on(y.eventListeners))for(let H of Object.keys(y.eventListeners))y.eventListeners[H]!=null&&p({reason:\"attribute\",element:_.name,name:`on${H}`});if(Array.isArray(y.children))for(let H of y.children){let V=T(H,U);U.children.push(V),v.appendChild(V.dom)}return U},A=y=>{if(!Array.isArray(y))return p({reason:\"record\"});let[N,w]=y,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(y[3]),v=Number.isInteger(_)&&_>=0&&_<=R.children.length?_:R.children.length,U=y[2],H=on(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(y[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(y[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(y[2]),v=y[4]??Bi;return v===Ql?S(R,_,y[3]):p(v===Bi||v===Wi?{reason:\"attribute\",element:R.name,name:v===Wi?`on${_}`:_}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(y,N){if(!Array.isArray(y))return p({reason:\"record\"}),!0;try{for(let w=0;w<y.length;w+=1){if(N&&w%32===0&&N())return!1;A(y[w])}return!0}finally{for(let w of m.values())h(w);m.clear(),E()}},get refused(){return o},get size(){return l},idOf:y=>i.get(y),elementOf(y){let N=s.get(y);return N&&!N.text&&N!==a?N.dom:void 0},dispose(){for(let y of a.children)h(y);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=Qt(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=en(e,void 0,{faces:{scope:\"graview-view\",...n.lent?{lent:n.lent}:{},...n.ownFaces===!1?{refused:!0}:{}}});a=m.css,l=m.faces;for(let b of m.refused)i.push({reason:\"css\",name:\"stylesheet\",css:b})}let c=n.theme?gr(n.theme).css:\"\",g=Qi(c,a);return{root:r,refused:i,size:s.size,over:o,css:g,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:wo(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}:{},...n.ownFaces===!1?{ownFaces:!1}:{},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 g=[...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,b=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&&er.test(u)&&!m.has(`${u} ${k}`)&&m.size<10){m.add(`${u} ${k}`);let E=JSON.stringify((f.getAttribute(\"data-part-why\")??\"\").replace(/[\\u0000-\\u001f\\u007f\\u2028\\u2029]+/g,\" \").slice(0,300));g.push({at:`part \"${u}\"`,says:`The part \"${u}\" ${k===\"slow\"?\"took too long\":\"threw\"}: ${E}. The page draws a note in its place and the rest of the view.`})}b(f)}};b(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)||tn(a,p.record))&&g.push({at:\"navigate\",says:l?`It goes to ${nn(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 ${nn(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&&!tn(a,p.place)&&g.push({at:\"navigate\",says:l?`It goes to the place ${nn(p.place)}, which is none of the places this run was told of.${ve(a)}${St}`:`It goes to the place ${nn(p.place)}, which this app does not have.${ve(a)}`});return{ok:!0,parts:c.parts,problems:g,drawn:i,videos:c.videos}}var Do=\"graviewHeadless\",Mo=\"graviewHeadlessView\";var sa=globalThis,dc=Promise.prototype.then,uc=Promise.resolve(),sn=t=>void dc.call(uc,t),Tr=sa.performance,an=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,ln=(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},Lo=new Map,rt=ti({send(t){if(z.messages+=1,t.type===\"mine\"){let e=t.id,n=t.op===\"set\"?_s(t.key,t.value):void 0;n?nt(n):t.op===\"set\"&&t.value===null?Lo.delete(t.key):t.op===\"set\"&&Lo.set(t.key,t.value),sn(()=>rt.hear(n?{type:\"mine-answer\",id:e,ok:!1,sentence:n}:{type:\"mine-answer\",id:e,ok:!0,...t.op===\"get\"?{value:Lo.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:sn,now:an,threw:t=>ln(\"error\",`It threw: ${xr(t)}`),warn:nt,hardening:()=>At}),ra=!1,$o=!1;function pc(t){if($o||typeof t!=\"function\"||($o=!0,ke))return;let e=an();try{t.call(void 0,rt.view)}catch(n){ln(\"error\",`It threw: ${xr(n)}`)}z.ms+=an()-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(!$o&&!ke)return tt({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=an();ke||rt.hear({type:\"props\",props:e.props,push:1,partMs:e.limits.pushMs/4}),z.ms+=an()-n,z.ms>=e.limits.pushMs&&ln(\"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=>sn(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){ln(\"error\",`It threw: ${xr(s)}`)}for(let s=0;s<64&&!ke;s+=1)await new Promise(i=>sn(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\",sn],[\"graview\",rt.view],[Mo,pc],[Do,t=>mc(t)]];for(let[t,e]of yc)fc(sa,t,{value:e,writable:!0,enumerable:!1,configurable:!0});At=Hs(globalThis,[\"graview\",Mo,Do],{primitivesStay:!0});At.stuck.length>0&&ln(\"refused\",`This isolate could not be hardened: ${At.stuck.join(\", \")} would not go.`);})();\n";
8
8
  //# sourceMappingURL=runtime.generated.js.map