@chainingintention/pi-web-cn 2.202610.2 → 2.202610.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 (29) hide show
  1. package/dist/client/assets/CommandPicker-gK2biReF.js +70 -0
  2. package/dist/client/assets/PiWebApp-Do_8tp5d.js +3761 -0
  3. package/dist/client/assets/SettingsDialog-vGDo1-BJ.js +1015 -0
  4. package/dist/client/assets/index-Ura0RJyr.js +2 -0
  5. package/dist/client/assets/managementEmbed-Bx8Mwzdw.js +2 -0
  6. package/dist/client/assets/preload-helper-XpATwJ5c.js +1 -0
  7. package/dist/client/index.html +3 -2
  8. package/dist/pi-web-plugins/custom-ui-codex/LICENSE-icons +35 -0
  9. package/dist/pi-web-plugins/custom-ui-codex/README.md +25 -0
  10. package/dist/pi-web-plugins/custom-ui-codex/chat-settings.css +251 -0
  11. package/dist/pi-web-plugins/custom-ui-codex/codex.css +77 -0
  12. package/dist/{client/assets/graphite-DquaqFXU.css → pi-web-plugins/custom-ui-codex/graphite.css} +4 -2
  13. package/dist/pi-web-plugins/custom-ui-codex/package.json +10 -0
  14. package/dist/{client/assets/paper-CB1oLuRr.css → pi-web-plugins/custom-ui-codex/paper.css} +7 -5
  15. package/dist/pi-web-plugins/custom-ui-codex/pi-web-plugin.js +56 -0
  16. package/dist/pi-web-plugins/files/browser/pi-web-plugin.js +29 -29
  17. package/dist/pi-web-plugins/workspace-tasks/tasksPanelElement.js +3 -3
  18. package/dist/pi-web-plugins/zh-cn/components.json +6 -1
  19. package/dist/plugin-api.d.ts +48 -0
  20. package/dist/server/terminals/requiredTerminalService.js +2 -53
  21. package/dist/server/terminals/requiredTerminalService.js.map +1 -1
  22. package/dist/shared/terminalCommandRun.js +56 -0
  23. package/dist/shared/terminalCommandRun.js.map +1 -0
  24. package/docs/config.md +6 -2
  25. package/docs/plugins.md +22 -1
  26. package/package.json +2 -2
  27. package/dist/client/assets/PiWebApp-BVnLs9Kj.js +0 -4938
  28. package/dist/client/assets/external-B9K8duyP.js +0 -2
  29. package/dist/client/assets/index-pOnX1cs_.js +0 -2
@@ -0,0 +1,70 @@
1
+ import{$ as e,A as t,B as n,D as r,F as i,G as a,H as o,J as s,K as c,O as l,P as u,Q as d,R as f,S as p,U as m,V as h,W as g,Y as _,Z as v,_ as ee,a as y,b as te,d as ne,et as re,f as ie,g as ae,h as oe,i as se,j as b,l as ce,m as le,p as ue,r as de,s as fe,t as pe,u as me,v as he,w as ge,x as _e,y as ve,z as x}from"./managementEmbed-Bx8Mwzdw.js";var ye=Object.defineProperty,be=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),S=(e,t)=>{let n={};for(var r in e)ye(n,r,{get:e[r],enumerable:!0});return t||ye(n,Symbol.toStringTag,{value:`Module`}),n},xe=new Set,Se=0,Ce=new WeakMap,we=new Set;function Te(e){return we.add(e),()=>{we.delete(e)}}function Ee(e){return Fe(e)?.layer.element}function De(e){if(!e.open||!e.isConnected)return!1;try{return e.matches(`:modal`)}catch{return!0}}var Oe=new WeakSet;function ke(e){Oe.has(e)||(Oe.add(e),e.addEventListener(`beforetoggle`,e=>{let t=e.target;t instanceof HTMLDialogElement&&(`newState`in e&&e.newState===`open`&&Ce.set(t,{layer:{element:t,focus:()=>{t.focus()}},order:++Se,restorationPath:[]}),queueMicrotask(()=>{Pe(t.ownerDocument)}))},!0))}function Ae(e){ke(e);let t=[];for(let n of e.querySelectorAll(`*`)){if(n instanceof HTMLDialogElement){if(De(n)){let e=Ce.get(n);e===void 0&&(e={layer:{element:n,focus:()=>{n.focus()}},order:++Se,restorationPath:[]},Ce.set(n,e)),t.push(e)}else Ce.delete(n)}n.shadowRoot!==null&&t.push(...Ae(n.shadowRoot))}return t}function je(e){let t=e.element.ownerDocument;Ae(t);let n=Be(t),r=n instanceof HTMLElement?Ie(t,n):void 0,i={layer:e,order:++Se,restorationPath:n instanceof HTMLElement?[n,...r?.restorationPath??[]]:[]},a=!0;return xe.add(i),Pe(t),{get isTop(){return a&&Fe(t)===i},focus:()=>a&&Le(i),unregister:()=>{a&&(a=!1,xe.delete(i),Pe(t),Ne(i))}}}function Me(e){return e!==void 0&&Fe(e)!==void 0}function Ne(e){let{element:t}=e.layer,n=t.ownerDocument,r=Be(n);if(r!==null&&r!==n.body&&r!==n.documentElement&&!Ue(t,r))return;let i=Fe(n);if(i!==void 0){if(Re(e.restorationPath.filter(e=>Ue(i.layer.element,e))))return;Le(i)}else Re(e.restorationPath)}function Pe(e){let t=Fe(e);for(let n of[...xe])n.layer.element.ownerDocument===e&&n.layer.onTopChange?.(n===t);for(let t of we)t(e)}function Fe(e){let t;for(let n of Ae(e)){let e=[...xe].find(e=>e.layer.element===n.layer.element)??n;e.order=n.order,(t===void 0||e.order>t.order)&&(t=e)}return t}function Ie(e,t){let n;for(let r of xe)r.layer.element.ownerDocument===e&&De(r.layer.element)&&Ue(r.layer.element,t)&&(r.order=Ce.get(r.layer.element)?.order??r.order,(n===void 0||r.order>n.order)&&(n=r));return n}function Le(e){if(Fe(e.layer.element.ownerDocument)!==e)return!1;e.layer.focus();let t=Be(e.layer.element.ownerDocument);return t!==null&&Ue(e.layer.element,t)}function Re(e){for(let t of e)if(ze(t))return!0;return!1}function ze(e){if(!e.isConnected||e.matches(`:disabled`)||Ve(e))return!1;e.focus();let t=Be(e.ownerDocument);return t===e||t!==null&&Ue(e,t)}function Be(e){let t=e.activeElement;for(;t instanceof HTMLElement;){let e=t.shadowRoot?.activeElement??null;if(e===null)return t;t=e}return t??null}function Ve(e){let t=e.ownerDocument.defaultView,n=t?.getComputedStyle(e);if(n?.visibility===`hidden`||n?.visibility===`collapse`)return!0;let r=e;for(;r!==null;){if(r.hasAttribute(`hidden`)||r.hasAttribute(`inert`))return!0;let e=t?.getComputedStyle(r);if(e?.display===`none`||e?.getPropertyValue(`content-visibility`)===`hidden`)return!0;r=He(r)}return!1}function He(e){let t=e.assignedSlot;if(t instanceof HTMLSlotElement)return t;let n=e.parentElement;if(n instanceof Element)return n;let r=e.getRootNode();return r instanceof ShadowRoot&&r.host instanceof Element?r.host:null}function Ue(e,t){let n=t;for(;n!==null;){if(n===e)return!0;let t=He(n);if(t===n)return!1;n=t}return!1}var We=new WeakMap;function Ge(e){return(We.get(e)?.popups.size??0)>0}function Ke(e){if(!e.isConnected||Ve(e))return!1;let t=Ee(e.ownerDocument);return t===void 0||Ue(t,e)}function qe(e,t){if(!Ke(e))return t(),()=>{};let n=e.ownerDocument,r=We.get(n);if(r===void 0){let e=new Set,t=new Map,i=()=>{a(n);for(let t of[...e])Ke(t.owner)||(e.delete(t),t.close());e.size===0&&c()},a=e=>{if(ke(e),!t.has(e)){let n=new MutationObserver(i);n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`open`,`hidden`,`inert`,`class`,`style`]}),t.set(e,n),e.addEventListener(`focusin`,i,!0)}for(let t of e.querySelectorAll(`*`))t.shadowRoot!==null&&a(t.shadowRoot)},o=Te(e=>{e===n&&i()}),s=!1,c=()=>{if(!s){s=!0,o();for(let[e,n]of t)n.disconnect(),e.removeEventListener(`focusin`,i,!0);We.delete(n)}};r={popups:e,dispose:c},We.set(n,r),a(n)}let i={owner:e,close:t};r.popups.add(i);let a=r;return()=>{a.popups.delete(i),a.popups.size===0&&a.dispose()}}var Je=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},Ye={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:v},Xe=(e=Ye,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function C(e){return(t,n)=>typeof n==`object`?Xe(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Ze(e){return C({...e,state:!0,attribute:!1})}var Qe=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function $e(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return Qe(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return Qe(n,r,{get(){return a(this)}})}}var et={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},tt=e=>(...t)=>({_$litDirective$:e,values:t}),nt=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},rt=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`];function it(e){return rt.some(t=>t===e)}function at(e){return e===void 0||e===``?`off`:e}function ot(e,t=n(`en`,{})){let r=at(e),i={off:t(`thinking.label.off`,`Off`),minimal:t(`thinking.label.minimal`,`Minimal`),low:t(`thinking.label.low`,`Low`),medium:t(`thinking.label.medium`,`Medium`),high:t(`thinking.label.high`,`High`),xhigh:t(`thinking.label.xhigh`,`Extra high`),max:t(`thinking.label.max`,`Maximum`)};return it(r)?i[r]??r:r}function st(e,t=n(`en`,{})){switch(e){case`off`:return t(`thinking.description.off`,`No reasoning`);case`minimal`:return t(`thinking.description.minimal`,`Minimal reasoning (about 1k tokens)`);case`low`:return t(`thinking.description.low`,`Light reasoning (about 2k tokens)`);case`medium`:return t(`thinking.description.medium`,`Moderate reasoning (about 8k tokens)`);case`high`:return t(`thinking.description.high`,`Deep reasoning (about 16k tokens)`);case`xhigh`:return t(`thinking.description.xhigh`,`Extra high reasoning (about 32k tokens)`);case`max`:return t(`thinking.description.max`,`Maximum reasoning (about 64k tokens)`);default:return}}function ct(e,t){let n=t.length>=2?t:rt,r=n.length-1,i=at(e),a=n.indexOf(i);return{total:r,filled:a<=0?0:Math.min(a,r)}}function lt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ut(e){if(!lt(e))throw new x(`server.main.b5b69396302e`,`Invalid session defaults`);let t=e,n={};for(let e of[`defaultProvider`,`defaultModel`]){let r=t[e];if(r!==void 0){if(typeof r!=`string`)throw new x(`server.main.d20dbeed752b`,`Invalid {arg0}`,{arg0:e});n[e]=r}}let r=t.defaultThinkingLevel;if(r!==void 0){if(typeof r!=`string`||!it(r))throw new x(`server.main.e937d7ab07c7`,`Invalid defaultThinkingLevel`);n.defaultThinkingLevel=r}return n}var dt=class extends Error{constructor(e,t,n={}){super(e,n),this.status=t,this.name=`HttpRequestError`}},ft=class extends Error{constructor(e,t={}){super(e,t),this.name=`NetworkRequestError`}},pt=pe();function mt(e){pt=e}function ht(e){return h(se(e,void 0,pt))}async function w(e,t,n){let r=new Headers(n?.headers);n?.body!==void 0&&!r.has(`content-type`)&&r.set(`content-type`,`application/json`);let i=pt,a=ht(e),o=await _t(()=>fetch(a,{...n,headers:r}),n?.signal);if(!o.ok)throw new dt(vt(await o.json().catch(()=>({})))??o.statusText,o.status);return de(i),t(await _t(()=>o.json(),n?.signal))}async function gt(e,t){let n=pt,r=ht(e),i=await _t(()=>fetch(r));if(i.status===204)de(n);else if(i.status!==404){if(!i.ok)throw new dt(vt(await i.json().catch(()=>({})))??i.statusText,i.status);return de(n),t(await _t(()=>i.json()))}}async function _t(e,t){try{return await e()}catch(e){throw e instanceof TypeError&&e.name!==`AbortError`&&t?.aborted!==!0?new ft(e.message,{cause:e}):e}}function vt(e){if(yt(e))return typeof e.error==`string`?e.error:void 0}function yt(e){return typeof e==`object`&&!!e}var bt=/^[a-z][a-z0-9.-]*:[a-z][a-z0-9.-]*$/u;function xt(e){if(!St(e))return;let t=e,n=t.themeId,r=t.auto;if(typeof n==`string`&&bt.test(n)&&typeof r==`boolean`)return{themeId:n,auto:r}}function St(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ct(e,t){let n=xt(e);if(n===void 0)throw new x(`configError.defaultTheme.invalid`,`PI WEB config defaultTheme must contain a qualified themeId and a boolean auto: {source}`,{source:t});return n}function wt(e,t){if(e!==`steer`&&e!==`followUp`)throw new x(`configError.defaultStreamingBehavior.invalid`,`PI WEB config defaultStreamingBehavior must be steer or followUp: {source}`,{source:t});return e}function Tt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Et(e,t){if(!Tt(e))throw new x(`configError.sessionNaming.object`,`PI WEB config sessionNaming must be an object: {source}`,{source:t});let n=Object.keys(e).find(e=>e!==`model`&&e!==`maxTokens`&&e!==`thinkingLevel`&&e!==`timeoutMs`);if(n!==void 0)throw new x(`configError.sessionNaming.unknownKey`,`PI WEB config sessionNaming has unknown key {key}: {source}`,{key:JSON.stringify(n),source:t});let r=e.model,i=e.maxTokens,a=e.thinkingLevel,o=e.timeoutMs;if(r!==void 0&&(typeof r!=`string`||!/^[^/\s]+\/\S+$/.test(r)))throw new x(`configError.sessionNaming.model`,`PI WEB config sessionNaming.model must be an exact provider/model-id with non-empty parts: {source}`,{source:t});if(i!==void 0&&(typeof i!=`number`||!Number.isSafeInteger(i)||i<=0))throw new x(`configError.sessionNaming.maxTokens`,`PI WEB config sessionNaming.maxTokens must be a positive safe integer: {source}`,{source:t});if(a!==void 0&&(typeof a!=`string`||!it(a)))throw new x(`configError.sessionNaming.thinkingLevel`,`PI WEB config sessionNaming.thinkingLevel must be a known thinking level: {source}`,{source:t});if(o!==void 0&&(typeof o!=`number`||!Number.isInteger(o)||o<1||o>2147483647))throw new x(`configError.sessionNaming.timeoutMs`,`PI WEB config sessionNaming.timeoutMs must be an integer from 1 to 2147483647: {source}`,{source:t});return{...r===void 0?{}:{model:r},...i===void 0?{}:{maxTokens:i},...a===void 0?{}:{thinkingLevel:a},...o===void 0?{}:{timeoutMs:o}}}function Dt(e,t){if(!Tt(e))throw new x(`configError.sessionArchive.object`,`PI WEB config sessionArchive must be an object: {source}`,{source:t});let n=Object.keys(e).find(e=>e!==`directory`);if(n!==void 0)throw new x(`configError.sessionArchive.unknownKey`,`PI WEB config sessionArchive has unknown key {key}: {source}`,{key:JSON.stringify(n),source:t});let r=e.directory;if(r===void 0)return{};if(typeof r!=`string`||r.trim()===``||r.includes(`\0`))throw new x(`configError.sessionArchive.directory`,`PI WEB config sessionArchive.directory must be a non-empty path: {source}`,{source:t});return{directory:r}}var Ot=new Set([`schemaVersion`,`dir`]);function kt(e){if(!Mt(e)||Object.keys(e).some(e=>!Ot.has(e)))return;let t=e.schemaVersion,n=e.dir;if(t===2&&typeof n==`string`&&At(n))return Object.freeze({schemaVersion:2,dir:n})}function At(e){if(e===``||e!==e.trim()||jt(e))return!1;let t=e.replace(/\\/g,`/`);return t.startsWith(`/`)||/^[A-Za-z]:\//u.test(t)}function jt(e){for(let t of e){let e=t.charCodeAt(0);if(e<32||e===127)return!0}return!1}function Mt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Nt=Object.values(b),Pt=new Set(Nt);b.sessionsDeleteArchived,b.sessionsBulkMutations,b.sessionsCleanup,b.sessionsReload,b.sessionsClearQueue,b.sessionsQueueMessageActions,b.sessionsPersistedState,b.sessionsNotifications,b.sessionsUnread,b.sessionsAskUser,b.promptAttachments,b.workspaceFileSuggestions,b.piPackagesManage,b.selectedMachineSettings,b.agentProfileConfig,b.pluginLifecycle,b.sessionsDeleteArchived,b.sessionsBulkMutations,b.sessionsCleanup,b.sessionsReload,b.sessionsClearQueue,b.sessionsQueueMessageActions,b.sessionsPersistedState,b.sessionsNotifications,b.sessionsUnread,b.sessionsAskUser,b.promptAttachments,b.sessionsDeleteArchived,b.sessionsBulkMutations,b.sessionsCleanup,b.sessionsReload,b.sessionsClearQueue,b.sessionsQueueMessageActions,b.sessionsPersistedState,b.sessionsNotifications,b.sessionsUnread,b.sessionsAskUser,b.promptAttachments,b.workspaceFileSuggestions,b.piPackagesManage,b.selectedMachineSettings,b.agentProfileConfig,b.pluginLifecycle;function Ft(e){return typeof e==`string`&&Pt.has(e)}function It(e,t){return e?.capabilities?.includes(t)===!0}function Lt(e){if(Array.isArray(e)&&e.every(e=>typeof e==`string`))return e.filter(Ft)}function Rt(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(!zt(n))continue;let e=n.source,r=n.name,i=n.replacement;(e===`environment`||e===`config`)&&typeof r==`string`&&r!==``&&(i===void 0||typeof i==`string`&&i!==``)&&t.push({source:e,name:r,...i===void 0?{}:{replacement:i}})}return t}function zt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Bt=[`projectId`,`workspaceId`,`sessionId`];function Vt(e,t){if(!Ut(e))throw Error(`${t} must be an object`);let n=!1;for(let r in e)if(Object.hasOwn(e,r)&&(n=!0,!Ht(r)))throw Error(`Unsupported ${t} field: ${r}`);if(!n)throw Error(`${t} must contain at least one of projectId, workspaceId, or sessionId`);let r={};for(let n of Bt){if(!Object.hasOwn(e,n))continue;let i=e[n];if(typeof i!=`string`||i.length>512||i.trim()===``)throw Error(`${t} ${n} must be a non-empty string of at most 512 characters`);r[n]=i}if(r.projectId!==void 0)return Object.freeze({...r,projectId:r.projectId});if(r.workspaceId!==void 0)return Object.freeze({...r,workspaceId:r.workspaceId});if(r.sessionId!==void 0)return Object.freeze({...r,sessionId:r.sessionId});throw Error(`${t} must contain at least one visibility selector`)}function Ht(e){return Bt.some(t=>t===e)}function Ut(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}var Wt={working:`core:working`,terminal:`core:terminal`,unread:`core:unread`};function Gt(e){if(!Jt(e))return;let t=e.epochId,n=e.revision,r=e.generatedAt,i=Kt(e.machine),a=Kt(e.unattributed),o=qt(e.projects),s=qt(e.workspaces);if(typeof t!=`string`||t===``||typeof n!=`number`||!Number.isFinite(n)||typeof r!=`string`||r===``||i===void 0||a===void 0||o===void 0||s===void 0)return;let c={epochId:t,revision:n,machine:i,projects:o,workspaces:s,unattributed:a,generatedAt:r};if(Object.hasOwn(e,`sessions`)){let t=qt(e.sessions,!0);if(t===void 0)return;c.sessions=t}return c}function Kt(e){if(!Jt(e))return;let t=new Map;for(let[n,r]of Object.entries(e))typeof r==`boolean`&&t.set(n,r);return Object.fromEntries(t)}function qt(e,t=!1){if(!Jt(e))return;let n=new Map;for(let[r,i]of Object.entries(e)){let e=Kt(i);if(e===void 0&&t)return;e!==void 0&&n.set(r,e)}return Object.fromEntries(n)}function Jt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Yt=Object.freeze({showSafeStart:`pi-web plugins safe-start show`,bundledOnly:`pi-web plugins safe-start set bundled-only --restart`,noServerPlugins:`pi-web plugins safe-start set none --restart`,clearSafeStart:`pi-web plugins safe-start clear --restart`});function Xt(e){if(!ge(e))throw Error(`Invalid PI WEB plugin id: ${e}`);return`pi-web plugins disable ${e} --restart`}function T(e){return typeof e==`object`&&!!e}function E(e){if(!T(e))throw Error(`Expected object response`);return e}function D(e,t){let n=e[t];if(typeof n!=`string`)throw Error(`Expected string field: ${t}`);return n}function O(e,t){let n=e[t];if(n!==void 0){if(typeof n!=`string`)throw Error(`Expected optional string field: ${t}`);return n}}function k(e,t){let n=e[t];if(typeof n!=`number`)throw Error(`Expected number field: ${t}`);return n}function A(e,t){let n=e[t];if(typeof n!=`boolean`)throw Error(`Expected boolean field: ${t}`);return n}function j(e){return t=>{if(!Array.isArray(t))throw Error(`Expected array response`);return t.map(e)}}function Zt(e){if(!Array.isArray(e))throw Error(`Expected array response`);return e.map(e=>{if(typeof e==`object`&&e&&`entryId`in e&&e.entryId!==void 0&&typeof e.entryId!=`string`)throw Error(`Expected string field: entryId`);return e})}function Qt(e,t){if(!Array.isArray(e)||!e.every(e=>typeof e==`string`))throw Error(`Expected string array field: ${t}`);return e}function $t(e){let t=E(e),n=t.leafId;if(n!=null&&typeof n!=`string`)throw Error(`Expected optional string|null field: leafId`);return{messages:Zt(t.messages),start:k(t,`start`),total:k(t,`total`),...z(`leafId`,n)}}function en(e){let t=E(e);return j(tn)(t.machines)}function tn(e){let t=E(e),n=on(t,`kind`),r=O(t,`baseUrl`),i=sn(t,`status`),a=O(t,`statusMessage`);return{id:D(t,`id`),name:D(t,`name`),kind:n,...r===void 0?{}:{baseUrl:r},createdAt:D(t,`createdAt`),updatedAt:D(t,`updatedAt`),...i===void 0?{}:{status:i},...a===void 0?{}:{statusMessage:a}}}function nn(e){let t=E(e),n=sn(t,`status`),r=O(t,`error`);return{machineId:D(t,`machineId`),ok:A(t,`ok`),checkedAt:D(t,`checkedAt`),...n===void 0?{}:{status:n},...t.web===void 0?{}:{web:da(t.web)},...t.sessiond===void 0?{}:{sessiond:da(t.sessiond)},...r===void 0?{}:{error:r}}}function rn(e){let t=E(e),n=O(t,`error`);return{machineId:D(t,`machineId`),ok:A(t,`ok`),checkedAt:D(t,`checkedAt`),...z(`packageName`,O(t,`packageName`)),...z(`generatedAt`,O(t,`generatedAt`)),...t.components===void 0?{}:{components:la(t.components)},...t.capabilities===void 0?{}:{capabilities:_a(t.capabilities)},...t.deprecatedAgentInputs===void 0?{}:{deprecatedAgentInputs:an(t.deprecatedAgentInputs)},...n===void 0?{}:{error:n}}}function an(e){let t=Rt(e);if(t===void 0)throw Error(`Invalid PI WEB deprecated agent inputs`);return t}function on(e,t){let n=D(e,t);if(n!==`local`&&n!==`remote`)throw Error(`Expected machine kind field: ${t}`);return n}function sn(e,t){let n=O(e,t);if(n!==void 0){if(n!==`unknown`&&n!==`online`&&n!==`offline`&&n!==`error`)throw Error(`Expected machine status field: ${t}`);return n}}function cn(e){let t=E(e);return{id:D(t,`id`),name:D(t,`name`),path:D(t,`path`),createdAt:D(t,`createdAt`)}}function ln(e){let t=E(e);return Object.freeze({id:D(t,`id`),projectId:D(t,`projectId`),path:D(t,`path`),label:D(t,`label`),isMain:A(t,`isMain`),...z(`branch`,O(t,`branch`)),...z(`isGitRepo`,L(t,`isGitRepo`)),...z(`isGitWorktree`,L(t,`isGitWorktree`)),...z(`provider`,hn(t.provider)),...z(`removal`,gn(t.removal)),effectiveConfig:yn(t.effectiveConfig)})}function un(e){let t=E(e),n=dn(t.status),r=D(t,`projectId`),i=O(t,`ownerPluginId`);if(n===`provider`&&i===void 0)throw Error(`Provider workspace resolution is missing ownerPluginId`);if(n===`folder`&&i!==void 0)throw Error(`Folder workspace resolution must not include ownerPluginId`);let a=j(ln)(t.workspaces);if(a.length===0||a.some(e=>e.projectId!==r))throw Error(`Workspace resolution contains invalid project workspaces`);let o=j(fn)(t.diagnostics);return Object.freeze({status:n,projectId:r,...i===void 0?{}:{ownerPluginId:i},workspaces:Object.freeze(a),diagnostics:Object.freeze(o)})}function dn(e){if(e===`provider`||e===`folder`||e===`degraded`)return e;throw Error(`Invalid workspace provider resolution status`)}function fn(e){let t=E(e),n=O(t,`pluginId`),r=t.pluginIds===void 0?void 0:Qt(t.pluginIds,`pluginIds`);return Object.freeze({code:pn(t.code),message:D(t,`message`),tier:mn(t.tier),...n===void 0?{}:{pluginId:n},...r===void 0?{}:{pluginIds:Object.freeze(r)}})}function pn(e){if(e===`probe-failed`||e===`claim-conflict`||e===`list-failed`)return e;throw Error(`Invalid workspace provider diagnostic code`)}function mn(e){if(e===`primary`||e===`fallback`)return e;throw Error(`Invalid workspace provider diagnostic tier`)}function hn(e){if(e===void 0)return;if(!T(e)||Array.isArray(e))throw Error(`Invalid workspace provider field`);let t=e.capabilities;if(!T(t)||Array.isArray(t))throw Error(`Invalid workspace provider capabilities field`);let n=e.metadata;return Object.freeze({pluginId:D(e,`pluginId`),capabilities:Object.freeze({remove:A(t,`remove`),...z(`request`,L(t,`request`))}),...z(`metadata`,n===void 0?void 0:_n(n,`workspace provider metadata`))})}function gn(e){if(e!==void 0){if(!T(e)||Array.isArray(e))throw Error(`Invalid workspace removal field`);return Object.freeze({actionLabel:P(e,`actionLabel`),confirmation:P(e,`confirmation`),precondition:P(e,`precondition`)})}}function _n(e,t){if(!T(e)||Array.isArray(e))throw Error(`Invalid ${t} field`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,n])=>[e,vn(n,t)])))}function vn(e,t){if(e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e))return e;if(Array.isArray(e))return Object.freeze(e.map(e=>vn(e,t)));if(T(e))return _n(e,t);throw Error(`Invalid ${t} field`)}function yn(e){if(!T(e)||Array.isArray(e))throw Error(`Expected workspace effectiveConfig field`);let t=Fi(e.uploads),n=Ii(e.attachments);return Object.freeze({...z(`uploads`,t===void 0?void 0:Object.freeze({...t})),...z(`attachments`,n===void 0?void 0:Object.freeze({...n}))})}function bn(e){if(!T(e)||Array.isArray(e))throw Error(`Invalid session metadata field`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,_n(t,`session metadata namespace`)])))}function xn(e){let t=E(e),n=O(t,`name`),r=t.metadata===void 0?void 0:bn(t.metadata),i=I(t.persisted,`persisted`),a=O(t,`parentSessionPath`),o=O(t,`archivedAt`);return{id:D(t,`id`),path:D(t,`path`),cwd:D(t,`cwd`),...i===void 0?{}:{persisted:i},...n===void 0?{}:{name:n},...r===void 0?{}:{metadata:r},created:D(t,`created`),modified:D(t,`modified`),messageCount:k(t,`messageCount`),firstMessage:D(t,`firstMessage`),...a===void 0?{}:{parentSessionPath:a},...z(`agentSubsession`,L(t,`agentSubsession`)),...t.archived===!0?{archived:!0}:{},...o===void 0?{}:{archivedAt:o}}}function Sn(e){let t=E(e);return{configured:A(t,`configured`),authenticated:A(t,`authenticated`)}}function Cn(e){return{path:D(E(e),`path`)}}function wn(e){let t=E(e);if(t.deleted!==!0)throw Error(`Expected deleted response`);return{deleted:!0,path:D(t,`path`)}}function Tn(e){return{sessionIds:Qt(E(e).sessionIds,`sessionIds`)}}function En(e){return{pinned:A(E(e),`pinned`)}}function Dn(e){let t=E(e);return{results:j(On)(t.results),matchCount:k(t,`matchCount`),truncated:A(t,`truncated`)}}function On(e){let t=E(e);return{session:xn(t.session),matches:j(kn)(t.matches)}}function kn(e){let t=E(e),n=D(t,`role`);if(n!==`user`&&n!==`assistant`)throw Error(`Invalid session content search role`);return{messageIndex:k(t,`messageIndex`),role:n,excerpts:j(An)(t.excerpts),occurrenceCount:k(t,`occurrenceCount`)}}function An(e){let t=E(e);return{text:D(t,`text`),matchRanges:j(e=>{let t=E(e);return{start:k(t,`start`),length:k(t,`length`)}})(t.matchRanges)}}function jn(e){if(e!==`info`&&e!==`warning`&&e!==`error`)throw Error(`Invalid session warning severity`);return e}function Mn(e){if(e!==void 0)return{id:D(E(e),`id`)}}function Nn(e){let t=E(e),n=Mn(t.dismiss);return{severity:jn(t.severity),message:D(t,`message`),...z(`source`,O(t,`source`)),...z(`path`,O(t,`path`)),...n===void 0?{}:{dismiss:n}}}function Pn(e){let t=`Recently active in another PI-WEB instance. Avoid working on this session in both instances at once.`;return e.severity===`info`&&e.source===`PI-WEB`&&(e.message===t||e.message===f(`ui.sessionActivity.message`,t))}function Fn(e){let t=E(e);return{value:N(t,`value`,128),label:N(t,`label`,l),...z(`detail`,ur(t,`detail`,l))}}function In(e){let t=E(e),n=Er(t.options,Fn,12,`options`);Hn(n.map(e=>e.value),`ask option value`),I(t.allowOther,`allowOther`);let r=I(t.multiple,`multiple`);return{id:N(t,`id`,128),question:N(t,`question`,l),...z(`detail`,ur(t,`detail`,l)),options:n,allowOther:!0,...r===void 0?{}:{multiple:r}}}function Ln(e){let t=E(e),n=Er(t.questions,In,20,`questions`);if(n.length===0)throw Error(`Ask has no questions`);return Hn(n.map(e=>e.id),`ask question id`),{askId:N(t,`askId`,128),askedAt:P(t,`askedAt`),questions:n}}function Rn(e){if(e!==`submitted`&&e!==`superseded`&&e!==`cancelled`)throw Error(`Invalid ask close reason`);return e}function zn(e){let t=E(e),n=In(t.question),i=Er(t.values,Dr,12,`values`),a=new Set(n.options.map(e=>e.value));if(i.some(e=>!a.has(e)))throw Error(`Ask answer selected an option the question never offered`);let o=ur(t,`otherText`,r),s=A(t,`answered`);if(s!==(i.length>0||o!==void 0))throw Error(`Ask answer contradicts its answered flag`);return{question:n,answered:s,values:i,...o===void 0?{}:{otherText:o}}}function Bn(e){let t=E(e),n=Er(t.questions,zn,20,`questions`),r=F(t,`answeredCount`),i=Qt(t.unansweredIds,`unansweredIds`),a=n.filter(e=>!e.answered).map(e=>e.question.id);if(r!==n.length-a.length)throw Error(`Ask outcome answered count mismatch`);if(i.length!==a.length||i.some((e,t)=>e!==a[t]))throw Error(`Ask outcome unanswered ids mismatch`);return{askId:N(t,`askId`,128),reason:Rn(t.reason),askedAt:P(t,`askedAt`),closedAt:P(t,`closedAt`),questions:n,answeredCount:r,unansweredIds:i,summary:P(t,`summary`)}}function Vn(e){let t=E(e),n=t.result;if(n!==`closed`&&n!==`stale`)throw Error(`Invalid dialog close result`);let r=t.outcome===void 0?void 0:Zn(t.outcome);if(n===`closed`!=(r!==void 0))throw Error(`Dialog close response outcome mismatch`);return{result:n,...r===void 0?{}:{outcome:r},sessionStatus:M(t.sessionStatus)}}function Hn(e,t){if(new Set(e).size!==e.length)throw Error(`Duplicate ${t}`)}function Un(e){if(e!==`confirm`&&e!==`select`&&e!==`input`)throw Error(`Invalid extension dialog kind`);return e}function Wn(e){if(e!==`answered`&&e!==`cancelled`&&e!==`timeout`&&e!==`aborted`&&e!==`session-ended`)throw Error(`Invalid extension dialog close reason`);return e}function Gn(e){if(typeof e==`boolean`||typeof e==`string`&&e.length<=4e3)return e;throw Error(`Invalid extension dialog answer`)}function Kn(e){let t=Dr(e);if(t.length>1e3)throw Error(`String field exceeds limit: option`);return t}function qn(e){let n=E(e),r=Un(n.kind),i=n.options===void 0?void 0:Er(n.options,Kn,24,`options`);if(i!==void 0&&Hn(i,`dialog option`),r===`select`&&(i===void 0||i.length===0))throw Error(`Select dialog has no options`);return{dialogId:N(n,`dialogId`,128),kind:r,title:N(n,`title`,t),...z(`message`,ur(n,`message`,t)),...i===void 0?{}:{options:i},...z(`placeholder`,ur(n,`placeholder`,t)),askedAt:P(n,`askedAt`),...z(`timeoutAt`,Qn(n,`timeoutAt`)),runScoped:A(n,`runScoped`)}}function Jn(e){if(e===void 0)return{};let t=j(qn)(e);return Hn(t.map(e=>e.dialogId),`dialog id`),{pendingDialogs:t}}function Yn(e){let t=E(e);if(t.type!==`dialog.opened`)throw Error(`Invalid dialog opened event type`);return{type:`dialog.opened`,dialog:qn(t.dialog)}}function Xn(e){let t=E(e);if(t.type!==`dialog.closed`)throw Error(`Invalid dialog closed event type`);let n=Wn(t.reason),r=t.answer===void 0?void 0:Gn(t.answer);if(n===`answered`!=(r!==void 0))throw Error(`Dialog closed event answer mismatch`);return{type:`dialog.closed`,dialogId:N(t,`dialogId`,128),reason:n,...r===void 0?{}:{answer:r}}}function Zn(e){let t=E(e),n=Wn(t.reason),r=t.answer===void 0?void 0:Gn(t.answer);if(n===`answered`!=(r!==void 0))throw Error(`Dialog outcome answer mismatch`);return{dialogId:N(t,`dialogId`,128),reason:n,...r===void 0?{}:{answer:r},askedAt:P(t,`askedAt`),closedAt:P(t,`closedAt`)}}function Qn(e,t){let n=O(e,t);if(n!==void 0){if(n===``)throw Error(`Expected non-empty string field: ${t}`);return n}}function M(e){let t=E(e),n=t.warnings===void 0?void 0:j(Nn)(t.warnings),r=I(t.recentlyActiveElsewhere,`recentlyActiveElsewhere`);return{sessionId:D(t,`sessionId`),...z(`persisted`,I(t.persisted,`persisted`)),recentlyActiveElsewhere:r??n?.some(Pn)??!1,isStreaming:A(t,`isStreaming`),isCompacting:A(t,`isCompacting`),isBashRunning:A(t,`isBashRunning`),pendingMessageCount:k(t,`pendingMessageCount`),queuedMessages:t.queuedMessages===void 0?[]:j(Br)(t.queuedMessages),...z(`queueMessageActionsUnavailable`,O(t,`queueMessageActionsUnavailable`)),...z(`messageCount`,R(t,`messageCount`)),tokens:Vr(t.tokens),cost:k(t,`cost`),...Ur(t.model),...ui(t.contextUsage),...z(`thinkingLevel`,O(t,`thinkingLevel`)),...z(`warnings`,n?.filter(e=>!Pn(e))),...Jn(t.pendingDialogs),...z(`suggestedInput`,O(t,`suggestedInput`))}}function $n(e){let t=E(e);return{seq:k(t,`seq`),partial:t.partial??null}}function er(e){let t=E(e);if(t.partial===void 0)throw Error(`Expected field: partial`);return{page:$t(t.page),status:M(t.status),seq:F(t,`seq`),partial:t.partial}}function tr(e){let t=E(e),n=F(t,`catalogRevision`),r=Er(t.sessions,sr,i,`sessions`);if(cr(r),lr(r),r.some(e=>e.completionOrder>n))throw Error(`Session unread completion order exceeds catalog revision`);return{catalogId:N(t,`catalogId`,512),catalogRevision:n,sessions:r}}function nr(e){let t=E(e);if(t.type!==`sessions.unread`)throw Error(`Invalid session unread event type`);let n=N(t,`sessionId`,512),r=N(t,`cwd`,u),i=dr(t,`catalogRevision`),a=t.unread===null?null:sr(t.unread);if(a!==null&&(a.sessionId!==n||a.cwd!==r))throw Error(`Session unread event identity mismatch`);if(a!==null&&a.completionOrder>i)throw Error(`Session unread completion order exceeds catalog revision`);return{type:`sessions.unread`,catalogId:N(t,`catalogId`,512),catalogRevision:i,sessionId:n,cwd:r,unread:a}}function rr(e){let t=E(e);if(t.type!==`session.startup`)throw Error(`Invalid session startup event type`);let n=O(t,`startupToken`);if(n===``)throw Error(`Expected non-empty string field: startupToken`);return{type:`session.startup`,...z(`startupToken`,n),activity:ir(t.activity)}}function ir(e){let t=E(e);return{sessionId:P(t,`sessionId`),phase:or(t,`phase`),label:P(t,`label`),...z(`detail`,O(t,`detail`)),at:P(t,`at`),...z(`startup`,ar(t))}}function ar(e){let t=e.startup;if(t!==void 0){if(typeof t!=`boolean`)throw Error(`Expected optional boolean field: startup`);return t}}function or(e,t){let n=D(e,t);if(n!==`active`&&n!==`idle`&&n!==`error`)throw Error(`Expected session activity phase field: ${t}`);return n}function sr(e){let t=E(e),n=N(t,`completedAt`,64),r=new Date(n);if(!Number.isFinite(r.getTime())||r.toISOString()!==n)throw Error(`Invalid canonical session unread completion time`);let i=t.messageRange===void 0?void 0:E(t.messageRange),a;if(i!==void 0){let e=F(i,`start`),t=F(i,`end`),n=i.leafId;if(t<e||n!==null&&typeof n!=`string`)throw Error(`Invalid unread message range`);a={start:e,end:t,leafId:n}}return{sessionId:N(t,`sessionId`,512),cwd:N(t,`cwd`,u),completionOrder:dr(t,`completionOrder`),completedAt:n,...a===void 0?{}:{messageRange:a}}}function cr(e){let t=e.map(e=>JSON.stringify([e.sessionId,e.cwd]));if(new Set(t).size!==t.length)throw Error(`Duplicate session unread identity`);let n=e.map(e=>e.completionOrder);if(new Set(n).size!==n.length)throw Error(`Duplicate session unread completion order`)}function lr(e){for(let t=1;t<e.length;t+=1){let n=e[t-1],r=e[t];if(n===void 0||r===void 0||n.completionOrder<=r.completionOrder)throw Error(`Session unread summaries are not newest-first`)}}function N(e,t,n){let r=P(e,t);if(r.length>n)throw Error(`String field exceeds limit: ${t}`);return r}function ur(e,t,n){let r=O(e,t);if(r!==void 0){if(r===``)throw Error(`Expected non-empty string field: ${t}`);if(r.length>n)throw Error(`String field exceeds limit: ${t}`);return r}}function dr(e,t){let n=F(e,t);if(n===0)throw Error(`Expected positive safe integer field: ${t}`);return n}function fr(e){let t=E(e),n=yr(t.summary),r=Er(t.notifications,br,100,`notifications`);if(Or(r),kr(r),n.retainedCount!==r.length)throw Error(`Notification snapshot retained count mismatch`);if(n.highestSeverity!==jr(r))throw Error(`Notification snapshot severity mismatch`);let i=xr(t.dismissThrough),a=r[0]?.order??0;if(i.order!==a)throw Error(`Notification snapshot dismiss cutoff mismatch`);if(i.overflowWatermark<n.discardedCount)throw Error(`Notification snapshot overflow cutoff mismatch`);return{daemonInstanceId:P(t,`daemonInstanceId`),catalogRevision:F(t,`catalogRevision`),summary:n,notifications:r,dismissThrough:i}}function pr(e){let t=E(e);if(t.type!==`notifications.inbox`)throw Error(`Invalid notification inbox event type`);let n=yr(t.summary),r=xr(t.dismissThrough);if(r.overflowWatermark<n.discardedCount)throw Error(`Notification event overflow cutoff mismatch`);let i=Sr(t.delta);if(i.kind===`cleared`&&!Ar(n))throw Error(`Notification clear event summary mismatch`);if(i.kind===`added`&&n.retainedCount===0)throw Error(`Notification add event summary mismatch`);return{type:`notifications.inbox`,daemonInstanceId:P(t,`daemonInstanceId`),catalogRevision:F(t,`catalogRevision`),summary:n,dismissThrough:r,delta:i}}function mr(e){let t=E(e),n=j(_r)(t.notices),r=n.map(e=>e.id);if(new Set(r).size!==r.length)throw Error(`Duplicate server notice id`);return{daemonInstanceId:P(t,`daemonInstanceId`),revision:F(t,`revision`),notices:n}}function hr(e){let t=E(e);if(t.type!==`notices.updated`)throw Error(`Invalid server notice event type`);return{type:`notices.updated`,snapshot:mr(t.snapshot)}}function gr(e){let t=E(e);if(t.type!==`models.changed`)throw Error(`Invalid model scope event type`);return{type:`models.changed`,revision:F(t,`revision`)}}function _r(e){let t=E(e),n=P(t,`createdAt`);if(!Number.isFinite(Date.parse(n)))throw Error(`Invalid server notice creation time`);let r=O(t,`source`),i=t.context===void 0?void 0:_n(t.context,`server notice context`),a=t.scope===void 0?void 0:Vt(t.scope,`server notice scope`);return{id:P(t,`id`),severity:vr(t.severity),message:D(t,`message`),createdAt:n,...z(`source`,r),...z(`scope`,a),...z(`context`,i)}}function vr(e){if(e!==`info`&&e!==`warning`&&e!==`error`)throw Error(`Invalid server notice severity`);return e}function yr(e){let t=E(e),n=F(t,`retainedCount`);if(n>100)throw Error(`Notification retained count exceeds limit`);let r=F(t,`discardedCount`),i=wr(t.highestSeverity);if(n===0!=(i===void 0))throw Error(`Notification summary severity mismatch`);return{sessionId:P(t,`sessionId`),cwd:P(t,`cwd`),inboxRevision:F(t,`inboxRevision`),retainedCount:n,discardedCount:r,...i===void 0?{}:{highestSeverity:i}}}function br(e){let t=E(e),n=D(t,`message`);if(new TextEncoder().encode(n).byteLength>8192)throw Error(`Notification message exceeds byte limit`);let r=D(t,`receivedAt`);if(!Number.isFinite(Date.parse(r)))throw Error(`Invalid notification receive time`);let i=F(t,`order`);if(i===0)throw Error(`Invalid notification order`);return{id:P(t,`id`),message:n,truncated:A(t,`truncated`),severity:Cr(t.severity),receivedAt:r,order:i}}function xr(e){let t=E(e);return{order:F(t,`order`),overflowWatermark:F(t,`overflowWatermark`)}}function Sr(e){let t=E(e);switch(t.kind){case`added`:{let e=O(t,`evictedNotificationId`);return{kind:`added`,notification:br(t.notification),...e===void 0?{}:{evictedNotificationId:e}}}case`dismissed`:{let e=Er(t.notificationIds,Dr,100,`notificationIds`);if(new Set(e).size!==e.length)throw Error(`Duplicate dismissed notification id`);return{kind:`dismissed`,notificationIds:e}}case`cleared`:return{kind:`cleared`,reason:Tr(t.reason)};case`resync`:return{kind:`resync`};default:throw Error(`Invalid notification inbox delta`)}}function Cr(e){if(e!==`info`&&e!==`warning`&&e!==`error`)throw Error(`Invalid notification severity`);return e}function wr(e){return e===void 0?void 0:Cr(e)}function Tr(e){switch(e){case`runtime-close`:case`archive`:case`delete`:case`restore`:case`archive-reconcile`:case`replacement`:case`initialization-failed`:case`service-dispose`:return e;default:throw Error(`Invalid notification clear reason`)}}function Er(e,t,n,r){if(!Array.isArray(e))throw Error(`Expected array field: ${r}`);if(e.length>n)throw Error(`Array field exceeds limit: ${r}`);return e.map(t)}function Dr(e){if(typeof e!=`string`||e===``)throw Error(`Expected non-empty string`);return e}function P(e,t){let n=D(e,t);if(n===``)throw Error(`Expected non-empty string field: ${t}`);return n}function F(e,t){let n=e[t];if(typeof n!=`number`||!Number.isSafeInteger(n)||n<0)throw Error(`Expected non-negative safe integer field: ${t}`);return n}function Or(e){if(new Set(e.map(e=>e.id)).size!==e.length)throw Error(`Duplicate notification id`);if(new Set(e.map(e=>e.order)).size!==e.length)throw Error(`Duplicate notification order`)}function kr(e){for(let t=1;t<e.length;t+=1){let n=e[t-1],r=e[t];if(n===void 0||r===void 0||n.order<=r.order)throw Error(`Notifications are not newest-first`)}}function Ar(e){return e.retainedCount===0&&e.discardedCount===0}function jr(e){let t;for(let n of e){if(n.severity===`error`)return`error`;n.severity===`warning`?t=`warning`:t??=`info`}return t}function Mr(e){let t=E(e),n=t.skippedBusySessionIds===void 0?void 0:Qt(t.skippedBusySessionIds,`skippedBusySessionIds`);return{generatedAt:D(t,`generatedAt`),thresholds:Lr(t.thresholds),projects:j(Rr)(t.projects),totals:zr(t.totals),...n===void 0?{}:{skippedBusySessionIds:n}}}function Nr(e){let t=E(e);return{...Mr(t),archivedSessionIds:Qt(t.archivedSessionIds,`archivedSessionIds`),deletedSessionIds:Qt(t.deletedSessionIds,`deletedSessionIds`)}}function Pr(e){let t=E(e);if(t.archived!==!0)throw Error(`Expected bulk archived response`);return{archived:!0,archivedSessionIds:Qt(t.archivedSessionIds,`archivedSessionIds`),failures:j(Ir)(t.failures),generatedAt:D(t,`generatedAt`)}}function Fr(e){let t=E(e);if(t.deleted!==!0)throw Error(`Expected bulk deleted response`);return{deleted:!0,deletedSessionIds:Qt(t.deletedSessionIds,`deletedSessionIds`),failures:j(Ir)(t.failures),generatedAt:D(t,`generatedAt`)}}function Ir(e){let t=E(e);return{sessionId:D(t,`sessionId`),error:D(t,`error`)}}function Lr(e){let t=E(e);return{...z(`archiveIdleDays`,R(t,`archiveIdleDays`)),...z(`deleteArchivedDays`,R(t,`deleteArchivedDays`))}}function Rr(e){let t=E(e);return{cwd:D(t,`cwd`),archiveCount:k(t,`archiveCount`),deleteCount:k(t,`deleteCount`)}}function zr(e){let t=E(e);return{archiveCount:k(t,`archiveCount`),deleteCount:k(t,`deleteCount`)}}function Br(e){let t=E(e),n=D(t,`kind`);if(n!==`steer`&&n!==`followUp`)throw Error(`Invalid queued message kind`);return{kind:n,text:D(t,`text`),...z(`hasAttachments`,L(t,`hasAttachments`)),...z(`attachmentCount`,t.attachmentCount===void 0?void 0:F(t,`attachmentCount`))}}function Vr(e){let t=E(e);return{input:k(t,`input`),output:k(t,`output`),cacheRead:k(t,`cacheRead`),cacheWrite:k(t,`cacheWrite`),total:k(t,`total`)}}function Hr(e){let t=E(e);return{...z(`provider`,O(t,`provider`)),...z(`id`,O(t,`id`)),...z(`name`,O(t,`name`)),...z(`contextWindow`,R(t,`contextWindow`)),...z(`reasoning`,t.reasoning)}}function Ur(e){return e===void 0?{}:{model:Hr(e)}}function Wr(e){let t=E(e);return{models:j(Hr)(t.models)}}function Gr(e){let t=E(e);return{provider:D(t,`provider`),id:D(t,`id`),...z(`name`,O(t,`name`)),...z(`contextWindow`,R(t,`contextWindow`)),...z(`reasoning`,t.reasoning),enabled:A(t,`enabled`),...z(`editable`,L(t,`editable`)),...z(`catalogIndex`,t.catalogIndex===void 0?void 0:F(t,`catalogIndex`))}}function Kr(e){let t=E(e);return{models:j(Gr)(t.models)}}function qr(e){if(typeof e!=`string`)throw Error(`Invalid thinking level`);return e}function Jr(e){let t=E(e);return{levels:j(qr)(t.levels)}}function Yr(e){if(e!==`oauth`&&e!==`api_key`)throw Error(`Invalid auth type`);return e}function Xr(e){if(e!==`stored`&&e!==`runtime`&&e!==`environment`&&e!==`fallback`&&e!==`models_json_key`&&e!==`models_json_command`)throw Error(`Invalid auth status source`);return e}function Zr(e){let t=E(e),n=t.source===void 0?void 0:Xr(t.source);return{configured:A(t,`configured`),...z(`source`,n),...z(`label`,O(t,`label`))}}function Qr(e){let t=E(e),n=t.loginFlow;if(n!==void 0&&n!==`interactive`)throw Error(`Invalid auth provider login flow`);return{id:D(t,`id`),name:D(t,`name`),authType:Yr(t.authType),status:Zr(t.status),...n===void 0?{}:{loginFlow:n}}}function $r(e){let t=E(e);return{providers:j(Qr)(t.providers)}}function ei(e){let t=E(e);return{servers:j(e=>{let t=E(e);return{name:D(t,`name`),...z(`description`,O(t,`description`))}})(t.servers)}}function ti(e){let t=E(e),n=t.target;if(n!==void 0&&n!==`mcp`)throw Error(`Invalid login flow target`);let r=t.mcpMode;if(r!==void 0&&r!==`login`&&r!==`logout`)throw Error(`Invalid MCP authentication mode`);let i={flowId:D(t,`flowId`),providerId:D(t,`providerId`),providerName:D(t,`providerName`),...n===void 0?{}:{target:n},...r===void 0?{}:{mcpMode:r},...z(`cancelRequested`,L(t,`cancelRequested`)),status:ni(t.status),progress:j(e=>{if(typeof e!=`string`)throw Error(`Expected progress item string`);return e})(t.progress),...z(`error`,O(t,`error`)),...z(`auth`,ri(t.auth)),...z(`prompt`,ai(t.prompt)),...z(`select`,si(t.select)),...z(`info`,ci(t.info))};if(i.target===`mcp`&&i.auth!==void 0){let e=new URL(i.auth.url);if(e.protocol!==`https:`&&e.protocol!==`http:`)throw Error(`Invalid MCP authorization URL`)}return i}function ni(e){if(e!==`running`&&e!==`complete`&&e!==`error`&&e!==`cancelled`)throw Error(`Invalid OAuth flow status`);return e}function ri(e){if(e===void 0)return;let t=E(e);return{url:D(t,`url`),...z(`instructions`,O(t,`instructions`)),...z(`deviceCode`,ii(t.deviceCode))}}function ii(e){if(e===void 0)return;let t=E(e);return{userCode:D(t,`userCode`),...z(`intervalSeconds`,R(t,`intervalSeconds`)),...z(`expiresInSeconds`,R(t,`expiresInSeconds`))}}function ai(e){if(e===void 0)return;let t=E(e),n=O(t,`kind`);if(n!==void 0&&n!==`prompt`&&n!==`manual`)throw Error(`Invalid OAuth prompt kind`);let r=t.promptType===void 0&&n!==void 0?n===`manual`?`manual_code`:`text`:oi(t.promptType);return{requestId:D(t,`requestId`),message:D(t,`message`),...z(`kind`,n),promptType:r,...z(`placeholder`,O(t,`placeholder`)),...z(`allowEmpty`,L(t,`allowEmpty`))}}function oi(e){if(e!==`text`&&e!==`secret`&&e!==`manual_code`)throw Error(`Invalid OAuth prompt type`);return e}function si(e){if(e===void 0)return;let t=E(e);return{requestId:D(t,`requestId`),message:D(t,`message`),options:j(ka)(t.options)}}function ci(e){if(e!==void 0)return j(e=>{let t=E(e);return{message:D(t,`message`),...z(`links`,t.links===void 0?void 0:j(li)(t.links))}})(e)}function li(e){let t=E(e);return{url:D(t,`url`),...z(`label`,O(t,`label`))}}function ui(e){if(e===void 0)return{};let t=E(e);return{contextUsage:{tokens:Ha(t,`tokens`),contextWindow:k(t,`contextWindow`),percent:Ha(t,`percent`)}}}function di(e){let t=E(e),n=D(t,`source`);if(n!==`extension`&&n!==`prompt`&&n!==`skill`&&n!==`builtin`)throw Error(`Invalid command source`);return{name:D(t,`name`),source:n,...z(`description`,O(t,`description`)),...z(`argumentHint`,O(t,`argumentHint`))}}function fi(e){let t=E(e),n=D(t,`kind`);if(n!==`tracked`&&n!==`untracked`&&n!==`other`)throw Error(`Invalid file kind`);return{path:D(t,`path`),kind:n}}function pi(e){let t=E(e);return{path:D(t,`path`),entries:j(gi)(t.entries),scannedAt:D(t,`scannedAt`),truncated:A(t,`truncated`)}}function mi(e){let t=E(e);return{results:j(hi)(t.results)}}function hi(e){let t=E(e),n=D(t,`path`),r=t.tree,i=t.error;if(r===void 0==(i===void 0))throw Error(`File tree batch result must contain exactly one of tree or error`);return r===void 0?{path:n,error:D(t,`error`)}:{path:n,tree:pi(r)}}function gi(e){let t=E(e),n=D(t,`type`);if(n!==`file`&&n!==`directory`&&n!==`symlink`)throw Error(`Invalid file tree entry type`);return{name:D(t,`name`),path:D(t,`path`),type:n,...z(`size`,R(t,`size`)),...z(`modifiedAt`,O(t,`modifiedAt`))}}function _i(e){let t=E(e),n=D(t,`encoding`);if(n!==`utf8`)throw Error(`Invalid file encoding`);return{path:D(t,`path`),...z(`language`,O(t,`language`)),...z(`mediaType`,xi(t.mediaType)),...z(`mimeType`,O(t,`mimeType`)),encoding:n,size:k(t,`size`),modifiedAt:D(t,`modifiedAt`),content:D(t,`content`),truncated:A(t,`truncated`),binary:A(t,`binary`)}}function vi(e){let t=E(e);return{path:D(t,`path`),size:k(t,`size`),modifiedAt:D(t,`modifiedAt`),created:A(t,`created`)}}function yi(e){let t=E(e);return{path:D(t,`path`),existed:A(t,`existed`)}}function bi(e){let t=E(e);return{fromPath:D(t,`fromPath`),toPath:D(t,`toPath`),size:k(t,`size`),modifiedAt:D(t,`modifiedAt`)}}function xi(e){if(e!==void 0){if(e!==`image`&&e!==`html`&&e!==`pdf`&&e!==`markdown`)throw Error(`Invalid file media type`);return e}}function Si(e){let t=E(e);return{id:D(t,`id`),cwd:D(t,`cwd`),name:D(t,`name`),createdAt:D(t,`createdAt`),exited:A(t,`exited`),...z(`exitCode`,R(t,`exitCode`)),...z(`commandRunId`,O(t,`commandRunId`))}}function Ci(e){let t=E(e);return{id:D(t,`id`),origin:D(t,`origin`),projectId:D(t,`projectId`),workspaceId:D(t,`workspaceId`),terminalId:D(t,`terminalId`),title:D(t,`title`),command:D(t,`command`),status:wi(t.status),...z(`exitCode`,R(t,`exitCode`)),createdAt:D(t,`createdAt`),...z(`startedAt`,O(t,`startedAt`)),...z(`completedAt`,O(t,`completedAt`)),metadata:Ti(t.metadata,`metadata`)}}function wi(e){if(e!==`queued`&&e!==`running`&&e!==`succeeded`&&e!==`failed`)throw Error(`Invalid terminal command run status`);return e}function Ti(e,t){let n=E(e);return Object.fromEntries(Object.entries(n).map(([e,n])=>{if(typeof n!=`string`)throw Error(`Expected string record field: ${t}.${e}`);return[e,n]}))}function Ei(e){let t=E(e);return{cwd:D(t,`cwd`),hasSessionActivity:A(t,`hasSessionActivity`),hasTerminalActivity:A(t,`hasTerminalActivity`),updatedAt:D(t,`updatedAt`)}}function Di(e){let t=E(e);return{workspaces:j(Ei)(t.workspaces),generatedAt:D(t,`generatedAt`)}}function Oi(e){let t=Gt(e);if(t===void 0)throw Error(`Expected machine status snapshot`);return t}function ki(e){let t=E(e);return{path:D(t,`path`),exists:A(t,`exists`),config:Ai(t.config),effectiveConfig:Ai(t.effectiveConfig),envOverrides:Vi(t.envOverrides)}}function Ai(e){let t=E(e);return{...z(`host`,O(t,`host`)),...z(`port`,R(t,`port`)),...z(`allowedHosts`,Mi(t.allowedHosts)),...z(`shortcuts`,zi(t.shortcuts)),...z(`defaultTheme`,t.defaultTheme===void 0?void 0:Ct(t.defaultTheme,`response`)),...z(`defaultStreamingBehavior`,t.defaultStreamingBehavior===void 0?void 0:wt(t.defaultStreamingBehavior,`response`)),...z(`plugins`,Bi(t.plugins)),...z(`pathAccess`,Ni(t.pathAccess)),...z(`uploads`,Fi(t.uploads)),...z(`attachments`,Ii(t.attachments)),...z(`maxUploadBytes`,R(t,`maxUploadBytes`)),...z(`agent`,ji(t.agent)),...z(`spawnSessions`,L(t,`spawnSessions`)),...z(`subsessions`,L(t,`subsessions`)),...z(`askUser`,L(t,`askUser`)),...z(`sessionNaming`,t.sessionNaming===void 0?void 0:Et(t.sessionNaming,`response`)),...z(`sessionArchive`,t.sessionArchive===void 0?void 0:Dt(t.sessionArchive,`response`))}}function ji(e){if(e!==void 0){if(!T(e)||Array.isArray(e))throw Error(`Invalid PI WEB agent field`);return{...z(`command`,O(e,`command`)),...z(`dir`,O(e,`dir`))}}}function Mi(e){if(e!==void 0){if(e===!0)return!0;if(Li(e))return e;throw Error(`Invalid PI WEB allowedHosts field`)}}function Ni(e){if(e===void 0)return;if(!T(e))throw Error(`Invalid PI WEB pathAccess field`);let t=e.allowedPaths;return{...z(`allowedPaths`,Pi(t,`pathAccess.allowedPaths`))}}function Pi(e,t){if(e!==void 0){if(Ri(e))return e;throw Error(`Invalid PI WEB ${t} field`)}}function Fi(e){if(e!==void 0){if(!T(e)||Array.isArray(e))throw Error(`Invalid PI WEB uploads field`);return{...z(`defaultFolder`,O(e,`defaultFolder`))}}}function Ii(e){if(e!==void 0){if(!T(e)||Array.isArray(e))throw Error(`Invalid PI WEB attachments field`);return{...z(`defaultFolder`,O(e,`defaultFolder`))}}}function Li(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Ri(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`&&e!==``)}function zi(e){if(e!==void 0){if(!T(e)||Array.isArray(e))throw Error(`Invalid PI WEB shortcuts field`);return Object.fromEntries(Object.entries(e).map(([e,t])=>{if(t!==null&&(typeof t!=`string`||t===``))throw Error(`Invalid PI WEB shortcut field`);return[e,t]}))}}function Bi(e){if(e!==void 0){if(!T(e)||Array.isArray(e))throw Error(`Invalid PI WEB plugins field`);return Object.fromEntries(Object.entries(e).map(([e,t])=>{if(!T(t)||Array.isArray(t))throw Error(`Invalid PI WEB plugin config field`);let n=t.enabled;if(n!==void 0&&typeof n!=`boolean`)throw Error(`Invalid PI WEB plugin enabled field`);let r=t.settings;if(r!==void 0&&(!T(r)||Array.isArray(r)))throw Error(`Invalid PI WEB plugin settings field`);return[e,t]}))}}function Vi(e){let t=E(e);return{host:A(t,`host`),port:A(t,`port`),allowedHosts:A(t,`allowedHosts`),spawnSessions:A(t,`spawnSessions`),subsessions:A(t,`subsessions`),askUser:A(t,`askUser`),agentCommand:L(t,`agentCommand`)??!1,agentDir:L(t,`agentDir`)??!1,...Hi(t),agentSessionDir:L(t,`agentSessionDir`)??!1}}function Hi(e){let t=e.agentDirSource;if(t===void 0)return{};if(t!==`pi-web`&&t!==`pi-compatibility`)throw Error(`Invalid PI WEB agentDirSource field`);return{agentDirSource:t}}function Ui(e){let t=E(e);return{packages:j(Gi)(t.packages),...z(`installableKnownPackages`,Ki(t.installableKnownPackages))}}function Wi(e){let t=E(e),n=O(t,`source`),r=t.scope===void 0?void 0:Ji(t.scope),i=I(t.removed,`removed`);return{action:Yi(t.action),...z(`source`,n),...z(`scope`,r),...z(`removed`,i),packages:j(Gi)(t.packages),...z(`installableKnownPackages`,Ki(t.installableKnownPackages))}}function Gi(e){let t=E(e);return{source:D(t,`source`),scope:Ji(t.scope),filtered:A(t,`filtered`),...z(`installedPath`,O(t,`installedPath`))}}function Ki(e){return e===void 0?void 0:j(qi)(e)}function qi(e){let t=E(e);return{id:D(t,`id`),label:D(t,`label`),description:D(t,`description`),source:D(t,`source`)}}function Ji(e){if(e!==`user`&&e!==`project`)throw Error(`Invalid Pi package scope`);return e}function Yi(e){if(e!==`install`&&e!==`remove`&&e!==`update`)throw Error(`Invalid Pi package mutation action`);return e}function Xi(e){let t=E(e),n=j(Zi)(t.plugins);if(t.lifecycleVersion===void 0)return{lifecycleVersion:2,plugins:n,diagnostics:[],serverRuntime:{status:`incompatible`,terminalMode:`required`,restartRequired:!1,message:f(`ui.main.fe09b19a1f40`,`PI WEB does not support plugin lifecycle diagnostics. Update and restart PI WEB, then try again.`),recovery:ra()}};if(t.lifecycleVersion!==2)throw Error(`Unsupported PI WEB plugin lifecycle version`);return{lifecycleVersion:2,plugins:n,diagnostics:j(ea)(t.diagnostics),serverRuntime:ta(t.serverRuntime)}}function Zi(e){let t=E(e),n=D(t,`id`),r=t.server===void 0?void 0:Qi(t.server,n),i=O(t,`backendRevision`),a=ia(t.pairedRequestVersion),o=ia(t.pairedChannelVersion);if((a!==void 0||o!==void 0)&&i===void 0)throw Error(`Invalid PI WEB plugin paired capability`);let s=I(t.required,`required`);if(s===!1)throw Error(`Invalid PI WEB required plugin marker`);return{id:n,...s===!0?{required:!0}:{},...z(`module`,O(t,`module`)),...i===void 0?{}:{backendRevision:i},...a===void 0?{}:{pairedRequestVersion:a},...o===void 0?{}:{pairedChannelVersion:o},source:D(t,`source`),scope:aa(t.scope),machineSpecific:I(t.machineSpecific,`machineSpecific`)??!1,enabled:A(t,`enabled`),discovered:I(t.discovered,`discovered`)??!0,conflict:I(t.conflict,`conflict`)??!1,...r===void 0?{}:{server:r}}}function Qi(e,t){let n=E(e),r=n.state,i=n.phase;if(r!==`active`&&r!==`failed`&&r!==`incompatible`&&r!==`disabled`&&r!==`missing`&&r!==`unknown`)throw Error(`Invalid PI WEB server plugin state`);if(i!==void 0&&i!==`import`&&i!==`activate`&&i!==`validate`&&i!==`start`&&i!==`health`&&i!==`dispose`)throw Error(`Invalid PI WEB server plugin phase`);let a=n.health===void 0?void 0:$i(n.health),o=D(n,`disableCommand`);if(o!==Xt(t))throw Error(`Invalid PI WEB server plugin recovery command`);return{state:r,...z(`desiredRevision`,O(n,`desiredRevision`)),...z(`activeRevision`,O(n,`activeRevision`)),...i===void 0?{}:{phase:i},...z(`message`,O(n,`message`)),...a===void 0?{}:{health:a},staleRevision:A(n,`staleRevision`),restartRequired:A(n,`restartRequired`),disableCommand:o}}function $i(e){let t=E(e),n=t.status;if(n!==`healthy`&&n!==`degraded`&&n!==`unhealthy`)throw Error(`Invalid PI WEB server plugin health status`);return{status:n,...z(`message`,O(t,`message`))}}function ea(e){let t=E(e),n=t.kind,r=t.snapshot;if(n!==`conflict`&&n!==`discovery`)throw Error(`Invalid PI WEB plugin diagnostic kind`);if(r!==`desired`&&r!==`active`)throw Error(`Invalid PI WEB plugin diagnostic snapshot`);return{kind:n,snapshot:r,source:D(t,`source`),message:D(t,`message`),...z(`pluginId`,O(t,`pluginId`))}}function ta(e){let t=E(e),n=t.status,r=t.terminalMode,i=t.safeStart,a=t.desiredSafeStart;if(n!==`available`&&n!==`unavailable`&&n!==`incompatible`)throw Error(`Invalid PI WEB server-plugin runtime status`);if(r!==`required`&&r!==`recovery-disabled`)throw Error(`Invalid PI WEB Terminal plugin mode`);if(i!==void 0&&i!==`bundled-only`&&i!==`none`)throw Error(`Invalid PI WEB server-plugin safe-start state`);if(a!==void 0&&a!==`off`&&a!==`bundled-only`&&a!==`none`)throw Error(`Invalid desired PI WEB server-plugin safe-start state`);if(n!==`available`&&r===`recovery-disabled`)throw Error(`Unavailable PI WEB runtime cannot declare Terminal recovery mode`);if(i===`none`!=(r===`recovery-disabled`)&&n===`available`)throw Error(`PI WEB Terminal plugin mode does not match safe start`);return{status:n,terminalMode:r,...i===void 0?{}:{safeStart:i},...a===void 0?{}:{desiredSafeStart:a},restartRequired:A(t,`restartRequired`),...z(`message`,O(t,`message`)),recovery:na(t.recovery)}}function na(e){let t=E(e),n={showSafeStart:D(t,`showSafeStart`),bundledOnly:D(t,`bundledOnly`),noServerPlugins:D(t,`noServerPlugins`),clearSafeStart:D(t,`clearSafeStart`)};if(n.showSafeStart!==Yt.showSafeStart||n.bundledOnly!==Yt.bundledOnly||n.noServerPlugins!==Yt.noServerPlugins||n.clearSafeStart!==Yt.clearSafeStart)throw Error(`Invalid PI WEB server plugin recovery commands`);return n}function ra(){return{...Yt}}function ia(e){if(e!==void 0){if(e!==1)throw Error(`Invalid PI WEB plugin paired capability version`);return 1}}function aa(e){if(e!==`bundled`&&e!==`local`&&e!==`user`&&e!==`project`)throw Error(`Invalid PI WEB plugin scope`);return e}function I(e,t){if(e!==void 0){if(typeof e!=`boolean`)throw Error(`Expected optional boolean field: ${t}`);return e}}function oa(e){let t=E(e);return{packageName:D(t,`packageName`),generatedAt:D(t,`generatedAt`),components:ca(t.components),release:pa(t.release),commands:ma(t.commands),messages:j(ha)(t.messages)}}function sa(e){let t=E(e);return{packageName:D(t,`packageName`),generatedAt:D(t,`generatedAt`),components:la(t.components),capabilities:_a(t.capabilities)}}function ca(e){let t=E(e);return{web:da(t.web),sessiond:da(t.sessiond)}}function la(e){let t=E(e);return{web:ua(t.web),sessiond:ua(t.sessiond)}}function ua(e){let t=E(e),n=ga(t.component),r=t.activeAgentProfile,i=r===void 0?void 0:kt(r);if(r!==void 0&&(n!==`sessiond`||i===void 0))throw Error(`Invalid active agent profile descriptor`);return{component:n,label:D(t,`label`),...z(`runtimeVersion`,O(t,`runtimeVersion`)),...z(`piVersion`,O(t,`piVersion`)),available:A(t,`available`),capabilities:_a(t.capabilities),...z(`activeAgentProfile`,i),...z(`deprecatedAgentInputs`,Rt(t.deprecatedAgentInputs)),...z(`error`,O(t,`error`))}}function da(e){let t=E(e);return{component:ga(t.component),label:D(t,`label`),...z(`runtimeVersion`,O(t,`runtimeVersion`)),...z(`installedVersion`,O(t,`installedVersion`)),...z(`piVersion`,O(t,`piVersion`)),stale:A(t,`stale`),available:A(t,`available`),...z(`installation`,fa(t.installation)),...z(`error`,O(t,`error`))}}function fa(e){if(e===void 0)return;let t=E(e),n=D(t,`kind`);if(n!==`pi-package`&&n!==`npm-global`&&n!==`local`&&n!==`docker`&&n!==`unknown`)throw Error(`Invalid PI WEB installation kind`);let r=t.scope;if(r!==void 0&&r!==`user`&&r!==`project`)throw Error(`Invalid PI WEB installation scope`);let i=t.dockerMode;if(i!==void 0&&i!==`runtime`&&i!==`dev`)throw Error(`Invalid PI WEB Docker mode`);return{kind:n,...z(`path`,O(t,`path`)),...z(`source`,O(t,`source`)),...r===void 0?{}:{scope:r},...z(`npmRoot`,O(t,`npmRoot`)),...i===void 0?{}:{dockerMode:i}}}function pa(e){let t=E(e);return{packageName:D(t,`packageName`),...z(`latestVersion`,O(t,`latestVersion`)),updateAvailable:A(t,`updateAvailable`),...z(`checkedAt`,O(t,`checkedAt`)),...t.skipped===!0?{skipped:!0}:{},...z(`error`,O(t,`error`))}}function ma(e){let t=E(e);return{...z(`update`,O(t,`update`)),...z(`restart`,O(t,`restart`)),...z(`restartWeb`,O(t,`restartWeb`)),...z(`restartSessiond`,O(t,`restartSessiond`)),...z(`status`,O(t,`status`))}}function ha(e){let t=E(e);return{id:D(t,`id`),severity:va(t.severity),title:D(t,`title`),body:D(t,`body`),...z(`command`,O(t,`command`))}}function ga(e){if(e!==`web`&&e!==`sessiond`)throw Error(`Invalid PI WEB service component`);return e}function _a(e){let t=Lt(e);if(t===void 0)throw Error(`Invalid PI WEB capabilities`);return t}function va(e){if(e!==`info`&&e!==`warning`&&e!==`error`)throw Error(`Invalid PI WEB status severity`);return e}function ya(e){let t=E(e),n=D(t,`type`);if(n===`unsupported`)return{type:n,message:D(t,`message`)};if(n===`select`)return{type:n,requestId:D(t,`requestId`),title:D(t,`title`),options:j(ka)(t.options)};if(n===`tree`)return{type:n,tree:ba(t.tree)};if(n===`done`)return{type:n,...z(`message`,O(t,`message`)),...Aa(t.session),...z(`promptDraft`,O(t,`promptDraft`))};throw Error(`Invalid command result type`)}function ba(e){let t=E(e),n=j(xa)(t.nodes),r=new Set(n.map(e=>e.id));if(r.size!==n.length)throw Error(`Duplicate session tree node id`);let i=Ea(t,`activeLeafId`);if(i!==null&&!r.has(i))throw Error(`Invalid session tree activeLeafId`);return{nodes:n,activeLeafId:i,activePathIds:Oa(t.activePathIds,`activePathIds`)}}function xa(e){let t=E(e);return{id:Da(t,`id`),parentId:Ea(t,`parentId`),kind:Sa(t.kind),summary:D(t,`summary`),...z(`timestamp`,O(t,`timestamp`)),...z(`label`,O(t,`label`))}}function Sa(e){switch(e){case`user`:case`assistant`:case`tool-result`:case`bash`:case`custom-message`:case`compaction`:case`branch-summary`:case`model-change`:case`thinking-level-change`:case`session-info`:case`label`:case`custom`:case`other`:return e;default:throw Error(`Invalid session tree node kind`)}}function Ca(e){let t=E(e),n=A(t,`cancelled`);if(Object.hasOwn(t,`summaryEntry`))throw Error(`Invalid session tree navigation result field: summaryEntry`);if(n){Ta(t,`editorText`,`session tree cancellation result`);let e=t.aborted;if(e!==void 0&&typeof e!=`boolean`)throw Error(`Expected optional boolean field: aborted`);return{cancelled:n,...e===void 0?{}:{aborted:e}}}return Ta(t,`aborted`,`session tree navigation result`),{cancelled:n,...z(`editorText`,O(t,`editorText`))}}function wa(e){let t=E(e),n=A(t,`cancelled`);return n?(Ta(t,`session`,`session tree fork cancellation result`),Ta(t,`promptDraft`,`session tree fork cancellation result`),{cancelled:n}):{cancelled:n,session:xn(t.session),...z(`promptDraft`,O(t,`promptDraft`))}}function Ta(e,t,n){if(Object.hasOwn(e,t))throw Error(`Invalid ${n} field: ${t}`)}function Ea(e,t){let n=e[t];if(n!==null&&typeof n!=`string`)throw Error(`Expected string or null field: ${t}`);if(typeof n==`string`&&n.trim()===``)throw Error(`Expected non-blank string or null field: ${t}`);return n}function Da(e,t){let n=D(e,t);if(n.trim()===``)throw Error(`Expected non-blank string field: ${t}`);return n}function Oa(e,t){let n=Qt(e,t);if(n.some(e=>e.trim()===``))throw Error(`Expected non-blank string array field: ${t}`);return n}function ka(e){let t=E(e);return{value:D(t,`value`),label:D(t,`label`),...z(`description`,O(t,`description`))}}function Aa(e){return e===void 0?{}:{session:xn(e)}}function ja(e){if(E(e).accepted!==!0)throw Error(`Expected accepted response`);return{accepted:!0}}function Ma(e){let t=E(e);return j(Na)(t.attachments)}function Na(e){let t=E(e);return{path:D(t,`path`),mimeType:D(t,`mimeType`),size:k(t,`size`)}}function Pa(e){if(E(e).closed!==!0)throw Error(`Expected closed response`);return{closed:!0}}function Fa(e){if(E(e).aborted!==!0)throw Error(`Expected aborted response`);return{aborted:!0}}function Ia(e){if(E(e).stopped!==!0)throw Error(`Expected stopped response`);return{stopped:!0}}function La(e){let t=E(e);if(t.archived!==!0)throw Error(`Expected archived response`);let n=t.sessionIds===void 0?void 0:Qt(t.sessionIds,`sessionIds`),r=R(t,`archivedCount`),i=R(t,`skippedAlreadyArchivedCount`);return{archived:!0,...n===void 0?{}:{sessionIds:n},...r===void 0?{}:{archivedCount:r},...i===void 0?{}:{skippedAlreadyArchivedCount:i}}}function Ra(e){if(E(e).restored!==!0)throw Error(`Expected restored response`);return{restored:!0}}function za(e){if(E(e).deleted!==!0)throw Error(`Expected deleted response`);return{deleted:!0}}function Ba(e){if(E(e).detached!==!0)throw Error(`Expected detached response`);return{detached:!0}}function Va(e){if(E(e).reloaded!==!0)throw Error(`Expected reloaded response`);return{reloaded:!0}}function L(e,t){let n=e[t];if(n!==void 0){if(typeof n!=`boolean`)throw Error(`Invalid PI WEB ${t} field`);return n}}function R(e,t){let n=e[t];if(n!==void 0){if(typeof n!=`number`)throw Error(`Expected optional number field: ${t}`);return n}}function Ha(e,t){let n=e[t];if(n===null)return null;if(typeof n!=`number`)throw Error(`Expected number|null field: ${t}`);return n}function z(e,t){return t===void 0?{}:{[e]:t}}function Ua(e){let t=E(e);switch(t.type){case`message.append`:return{type:`message.append`,message:Ga(t,`message`)};case`assistant.start`:return{type:`assistant.start`,message:Ga(t,`message`)};case`assistant.delta`:return{type:`assistant.delta`,text:D(t,`text`),...z(`streamId`,O(t,`streamId`))};case`assistant.thinking.delta`:return{type:`assistant.thinking.delta`,text:D(t,`text`),...z(`streamId`,O(t,`streamId`))};case`tool.start`:return{type:`tool.start`,toolName:D(t,`toolName`),toolCallId:D(t,`toolCallId`),summary:D(t,`summary`),...z(`args`,t.args)};case`tool.update`:return{type:`tool.update`,toolName:D(t,`toolName`),toolCallId:D(t,`toolCallId`),text:D(t,`text`),...z(`content`,t.content),...z(`details`,t.details)};case`tool.end`:return{type:`tool.end`,toolName:D(t,`toolName`),toolCallId:D(t,`toolCallId`),text:D(t,`text`),isError:A(t,`isError`),...z(`content`,t.content),...z(`details`,t.details)};case`shell.start`:return{type:`shell.start`,command:D(t,`command`),...z(`excludeFromContext`,I(t.excludeFromContext,`excludeFromContext`))};case`shell.chunk`:return{type:`shell.chunk`,chunk:D(t,`chunk`)};case`shell.end`:return{type:`shell.end`,...z(`output`,O(t,`output`)),...z(`exitCode`,Ka(t,`exitCode`)),...z(`cancelled`,I(t.cancelled,`cancelled`)),...z(`truncated`,I(t.truncated,`truncated`)),...z(`fullOutputPath`,O(t,`fullOutputPath`)),...z(`isError`,I(t.isError,`isError`))};case`agent.start`:return{type:`agent.start`};case`agent.end`:return{type:`agent.end`};case`message.end`:return{type:`message.end`,...z(`message`,t.message)};case`status.update`:return{type:`status.update`,status:M(t.status)};case`activity.update`:return{type:`activity.update`,activity:ir(t.activity)};case`command.output`:return qa(t);case`session.error`:return{type:`session.error`,message:D(t,`message`)};case`session.diagnostic`:return{type:`session.diagnostic`,message:D(t,`message`)};case`session.name`:return Ja(t);case`session.created`:return{type:`session.created`,session:xn(t.session)};case`session.tree.changed`:return{type:`session.tree.changed`};case`pi.event`:return{type:`pi.event`,eventType:D(t,`eventType`)};default:throw Error(`Unsupported session stream event type`)}}function Wa(e){let t=E(e);switch(t.type){case`status.update`:return{type:`status.update`,status:M(t.status)};case`activity.update`:return{type:`activity.update`,activity:ir(t.activity)};case`session.name`:return Ja(t);case`session.created`:return{type:`session.created`,session:xn(t.session)};case`models.changed`:return gr(t);case`workspaces.changed`:return{type:`workspaces.changed`,projectId:P(t,`projectId`)};case`notices.updated`:return hr(t);case`machine.status`:return{type:`machine.status`,status:Oi(t.status)};default:throw Error(`Unsupported realtime stream event type`)}}function Ga(e,t){let n=e[t];if(n===void 0)throw Error(`Expected field: ${t}`);return n}function Ka(e,t){let n=e[t];if(n!==void 0){if(n===null)return null;if(typeof n!=`number`)throw Error(`Expected optional number|null field: ${t}`);return n}}function qa(e){let t=D(e,`level`);if(t!==`info`&&t!==`success`&&t!==`error`)throw Error(`Invalid command output level`);return{type:`command.output`,level:t,message:D(e,`message`),...z(`notificationId`,O(e,`notificationId`))}}function Ja(e){return{type:`session.name`,sessionId:P(e,`sessionId`),...z(`name`,O(e,`name`))}}function Ya(e){let t=E(e),n=t.decision;if(n!==!0&&n!==!1&&n!==null)throw Error(`Invalid workspace trust decision`);return{path:D(t,`path`),decision:n,trusted:A(t,`trusted`)}}function Xa(e,t){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0&&typeof t==`number`&&Number.isSafeInteger(t)&&t>0?{width:e,height:t}:void 0}var Za=`reference`;function Qa(e){return typeof e==`string`&&/^[0-9a-f]{64}$/u.test(e)}function $a(e,t,n,r){let i=new URLSearchParams({cwd:e.cwd});return n?.limit!==void 0&&i.set(`limit`,String(n.limit)),n?.before!==void 0&&i.set(`before`,String(n.before)),i.set(`media`,Za),`api/machines/${encodeURIComponent(r)}/sessions/${encodeURIComponent(e.id)}/${t}?${i.toString()}`}function eo(e,t,n=`local`){return $a(e,`messages`,t,n)}function to(e,t,n=`local`){return $a(e,`transcript-snapshot`,t,n)}function no(e,t=`local`){return $a(e,`stream-snapshot`,void 0,t)}function ro(e,t=`local`){return $a(e,`events`,void 0,t)}function io(e,t,n=`local`){let r=new URLSearchParams({cwd:e.cwd}),i=`api/machines/${encodeURIComponent(n)}/sessions/${encodeURIComponent(e.id)}/media/${encodeURIComponent(t)}?${r.toString()}`,a=h(i);return new URL(se(a),a).href}function ao(e,t,n,r){let i=new URLSearchParams({path:n});r?.createDirs===!1&&i.set(`createDirs`,`false`),r?.overwrite===!1&&i.set(`overwrite`,`false`);let a=`api/machines/${encodeURIComponent(r?.machineId??`local`)}`;return h(se(`${a}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/file?${i.toString()}`))}function oo(e,t,n,r){let i=new URLSearchParams;i.set(`path`,n),r?.modifiedAt!==void 0&&i.set(`v`,r.modifiedAt),r?.download===!0&&i.set(`download`,`1`);let a=`api/machines/${encodeURIComponent(r?.machineId??`local`)}`;return se(`${a}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/file/preview?${i.toString()}`)}function so(e,t,n,r){return h(oo(e,t,n,r))}function co(e,t,n,r){return so(e,t,n,{...r,download:!0})}var B=(e=`local`)=>`api/machines/${encodeURIComponent(e)}`,lo={projectTrust:(e,t=`local`)=>w(`${B(t)}/projects/trust?${new URLSearchParams({path:e})}`,Ya),workspaceTrust:(e,t,n=`local`)=>w(`${B(n)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/trust`,Ya),setWorkspaceTrust:(e,t,n,r=`local`)=>w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/trust`,Ya,{method:`PUT`,body:JSON.stringify({trusted:n})})};function uo(e,t=`local`){return`${B(t)}/sessions/${encodeURIComponent(e.id)}`}function V(e,t,n=`local`){return`${uo(e,n)}/${t}`}function fo(e,t,n=`local`){return`${V(e,t,n)}${mo(e)}`}function po(e,t=`local`,n){return`${uo(e,t)}${mo(e,n===void 0?{}:{scopeProjectId:n})}`}function mo(e,t={}){return`?${new URLSearchParams({cwd:e.cwd,...t}).toString()}`}function H(e,t={}){return JSON.stringify({cwd:e.cwd,...t})}function ho(e,t){let n={sessions:e.map(({id:e,cwd:t})=>({id:e,cwd:t})),...t===void 0?{}:{scopeProjectId:t}};return JSON.stringify(n)}function go(e,t){let n=new URLSearchParams;t.projectId!==void 0&&n.set(`projectId`,t.projectId);let r=n.toString();return`${B(t.machineId)}/auth/${e}${r===``?``:`?${r}`}`}function _o(e){return e===`local`?`api/pi-web/status`:`${B(e)}/pi-web/status`}var vo={piWebStatus:(e=`local`)=>w(_o(e),oa),checkForUpdates:(e=`local`)=>w(`${_o(e)}?refresh=1`,oa,{cache:`no-store`}),piWebRuntime:()=>w(`api/pi-web/runtime`,sa)},yo={machines:()=>w(`api/machines`,en),addMachine:e=>w(`api/machines`,tn,{method:`POST`,body:JSON.stringify(e)}),deleteMachine:e=>w(`api/machines/${encodeURIComponent(e)}`,e=>e,{method:`DELETE`}),health:e=>w(`api/machines/${encodeURIComponent(e)}/health`,nn),runtime:(e,t=!1)=>w(`api/machines/${encodeURIComponent(e)}/runtime${t?`?refresh=1`:``}`,rn,t?{cache:`no-store`}:{})};function bo(e){return e===void 0?`api/config`:`${B(e)}/config`}function xo(e){return e===void 0?`api/plugins`:`${B(e)}/plugins`}var So={namingModels:e=>{let t=new URLSearchParams;e.projectId!==void 0&&t.set(`projectId`,e.projectId);let n=t.toString();return w(`${B(e.machineId)}/models${n===``?``:`?${n}`}`,Wr)},config:e=>w(bo(e),ki),saveConfig:(e,t)=>w(bo(t),ki,{method:`PUT`,body:JSON.stringify({config:e})})},Co={status:()=>w(`api/normal-auth/status`,Sn),setup:e=>w(`api/normal-auth/setup`,ja,{method:`POST`,body:JSON.stringify({password:e})}),login:e=>w(`api/normal-auth/login`,ja,{method:`POST`,body:JSON.stringify({password:e})}),changePassword:(e,t)=>w(`api/normal-auth/change-password`,ja,{method:`POST`,body:JSON.stringify({currentPassword:e,newPassword:t})})},wo={plugins:e=>w(xo(e),Xi)};function To(e=``,t){let n=t===void 0?`api/pi-packages`:`${B(t)}/pi-packages`;return e===``?n:`${n}/${e}`}var Eo={packages:e=>w(To(``,e),Ui),install:(e,t)=>{let n={source:e};return w(To(`install`,t),Wi,{method:`POST`,body:JSON.stringify(n)})},remove:(e,t,n)=>{let r=t===void 0?{source:e}:{source:e,scope:t};return w(To(`remove`,n),Wi,{method:`POST`,body:JSON.stringify(r)})},update:(e,t)=>{let n=e===void 0?void 0:{source:e};return w(To(`update`,t),Wi,{method:`POST`,...n===void 0?{}:{body:JSON.stringify(n)}})}},Do={workspaceActivity:(e=`local`)=>w(`${B(e)}/activity`,Di)},Oo={machineStatus:(e=`local`)=>w(`${B(e)}/status`,Oi)},ko={snapshot:(e=`local`)=>w(`${B(e)}/notices`,mr,{cache:`no-store`}),dismiss:(e,t,n)=>{let r={daemonInstanceId:t,noticeId:n};return w(`${B(e)}/notices/dismiss`,mr,{method:`POST`,body:JSON.stringify(r)})}},Ao={projects:(e=`local`)=>w(`${B(e)}/projects`,j(cn)),addProject:(e,t,n,r=`local`)=>w(`${B(r)}/projects`,cn,{method:`POST`,body:JSON.stringify({path:e,name:t,create:n})}),closeProject:(e,t=`local`)=>w(`${B(t)}/projects/${encodeURIComponent(e)}`,Pa,{method:`DELETE`}),projectDirectories:(e,t=`local`)=>w(`${B(t)}/project-directories?q=${encodeURIComponent(e)}`,j(fi))};function jo(e,t,n,r,i,a=`local`){let o=new URLSearchParams({path:n});i?.createDirs===!1&&o.set(`createDirs`,`false`),i?.overwrite===!1&&o.set(`overwrite`,`false`);let s=r instanceof Uint8Array,c=s?new Uint8Array(r):new TextEncoder().encode(r);return w(`${B(a)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/file?${o.toString()}`,vi,{method:`PUT`,body:c,headers:{"Content-Type":s?`application/octet-stream`:`text/plain`}})}function Mo(e,t=`local`,n){return w(`${B(t)}/projects/${encodeURIComponent(e)}/workspaces`,t=>{let n=un(t);if(n.projectId!==e)throw Error(`Workspace resolution project does not match request`);return n},n?.signal===void 0?void 0:{signal:n.signal})}var No={workspaceResolution:Mo,workspaces:async(e,t=`local`,n)=>pe()===`management`?w(`${B(t)}/projects/${encodeURIComponent(e)}/workspaces`,j(ln),n?.signal===void 0?void 0:{signal:n.signal}):[...(await Mo(e,t,n)).workspaces],deleteWorkspace:(e,t,n,r=`local`)=>{let i={precondition:n};return w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}`,e=>e,{method:`DELETE`,body:JSON.stringify(i)})},workspaceTree:(e,t,n=``,r=`local`,i)=>w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/tree?path=${encodeURIComponent(n)}`,pi,i),workspaceTreeBatch:(e,t,n,r=`local`)=>{let i={paths:[...n]};return w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/tree/batch`,mi,{method:`POST`,body:JSON.stringify(i)})},workspaceFile:(e,t,n,r=`local`,i)=>w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/file?path=${encodeURIComponent(n)}`,_i,i),optionalWorkspaceFile:(e,t,n,r=`local`)=>gt(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/file?path=${encodeURIComponent(n)}&optional=true`,_i),createWorkspaceFile:(e,t,n,r=`local`)=>jo(e,t,n,new Uint8Array,void 0,r),writeWorkspaceFile:jo,deleteWorkspaceFile:(e,t,n,r=`local`)=>{let i=new URLSearchParams({path:n});return w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/file?${i.toString()}`,yi,{method:`DELETE`})},moveWorkspaceFile:(e,t,n,r,i,a=`local`)=>{let o=new URLSearchParams({fromPath:n,toPath:r});return i?.createDirs===!1&&o.set(`createDirs`,`false`),i?.overwrite===!0&&o.set(`overwrite`,`true`),w(`${B(a)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/file/move?${o.toString()}`,bi,{method:`POST`})},createWorkspaceDirectory:(e,t,n,r=`local`)=>w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/directory`,Cn,{method:`POST`,body:JSON.stringify({path:n})}),moveWorkspaceDirectory:(e,t,n,r,i=`local`)=>w(`${B(i)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/directory`,Cn,{method:`PATCH`,body:JSON.stringify({fromPath:n,toPath:r})}),deleteWorkspaceDirectory:(e,t,n,r=`local`)=>w(`${B(r)}/projects/${encodeURIComponent(e)}/workspaces/${encodeURIComponent(t)}/directory?path=${encodeURIComponent(n)}`,wn,{method:`DELETE`}),downloadWorkspaceFile:(e,t,n,r=`local`)=>Ho(e,t,n,r)},Po={sessions:(e,t=`local`,n)=>w(`${B(t)}/sessions?cwd=${encodeURIComponent(e)}`,j(xn),n?.signal===void 0?void 0:{signal:n.signal}),search:(e,t,n=`local`)=>w(`${B(n)}/sessions/search?${new URLSearchParams({cwd:e,q:t}).toString()}`,j(xn)),searchContent:(e,t,n=`local`)=>w(`${B(n)}/sessions/search-content?${new URLSearchParams({cwd:e,q:t}).toString()}`,Dn),pinned:(e,t=`local`)=>w(`${B(t)}/sessions/pins?cwd=${encodeURIComponent(e)}`,Tn),pin:(e,t=`local`)=>w(`${uo(e,t)}/pin`,En,{method:`PUT`,body:H(e)}),unpin:(e,t=`local`)=>w(`${uo(e,t)}/pin${mo(e)}`,En,{method:`DELETE`}),unreadCatalog:(e=`local`)=>w(`${B(e)}/sessions/unread`,tr,{cache:`no-store`}),acknowledgeUnread:(e,t,n,r=`local`)=>{let i={cwd:e.cwd,catalogId:t,throughCompletionOrder:n};return w(V(e,`unread/acknowledge`,r),tr,{method:`POST`,body:JSON.stringify(i)})},notificationInbox:(e,t=`local`)=>w(fo(e,`notifications`,t),fr),dismissNotification:(e,t,n,r=`local`)=>w(V(e,`notifications/dismiss`,r),fr,{method:`POST`,body:H(e,{daemonInstanceId:t,notificationId:n})}),dismissAllNotifications:(e,t,n,r=`local`)=>w(V(e,`notifications/dismiss-all`,r),fr,{method:`POST`,body:H(e,{daemonInstanceId:t,throughOrder:n.order,throughOverflowWatermark:n.overflowWatermark})}),startSession:(e,t=`local`,n)=>w(`${B(t)}/sessions`,xn,{method:`POST`,body:JSON.stringify(n===void 0?{cwd:e}:{cwd:e,startupToken:n})}),cleanupPreview:(e,t=`local`)=>w(`${B(t)}/sessions/cleanup/preview`,Mr,{method:`POST`,body:JSON.stringify(e)}),cleanup:(e,t=`local`)=>w(`${B(t)}/sessions/cleanup`,Nr,{method:`POST`,body:JSON.stringify(e)}),archiveMany:(e,t=`local`,n)=>w(`${B(t)}/sessions/bulk/archive`,Pr,{method:`POST`,body:ho(e,n)}),deleteArchivedMany:(e,t=`local`,n)=>w(`${B(t)}/sessions/bulk/delete-archived`,Fr,{method:`POST`,body:ho(e,n)}),messages:(e,t,n=`local`)=>w(eo(e,t,n),$t),status:(e,t=`local`)=>w(fo(e,`status`,t),M),streamSnapshot:(e,t=`local`)=>w(no(e,t),$n),transcriptSnapshot:(e,t,n=`local`)=>w(to(e,t,n),er),models:(e,t=`local`)=>w(fo(e,`models`,t),Wr),modelCatalog:(e,t=`local`)=>w(fo(e,`models/catalog`,t),Kr),setModelEnabled:(e,t,n,r,i=`local`)=>w(V(e,`models/enabled`,i),Kr,{method:`POST`,body:H(e,{provider:t,modelId:n,enabled:r})}),setModelScope:(e,t,n=`local`)=>w(V(e,`models/scope`,n),Kr,{method:`POST`,body:H(e,{mode:t})}),setModel:(e,t,n,r=`local`)=>w(V(e,`model`,r),M,{method:`POST`,body:H(e,{provider:t,modelId:n})}),cycleModel:(e,t,n=`local`)=>w(V(e,`model/cycle`,n),M,{method:`POST`,body:H(e,{direction:t})}),getSessionDefaults:(e,t=`local`)=>w(fo(e,`defaults`,t),ut),setSessionDefaults:(e,t,n=`local`)=>w(V(e,`defaults`,n),ut,{method:`POST`,body:H(e,{...t})}),thinkingLevels:(e,t=`local`)=>w(fo(e,`thinking-levels`,t),Jr),setThinkingLevel:(e,t,n=`local`)=>w(V(e,`thinking-level`,n),M,{method:`POST`,body:H(e,{level:t})}),cycleThinkingLevel:(e,t=`local`)=>w(V(e,`thinking-level/cycle`,t),M,{method:`POST`,body:H(e)}),commands:(e,t=`local`)=>w(fo(e,`commands`,t),j(di)),prompt:(e,t,n,r=`local`,i)=>w(V(e,`prompt`,r),ja,{method:`POST`,body:H(e,{text:t,...n===void 0?{}:{streamingBehavior:n},...i!==void 0&&i.length>0?{attachments:i}:{}})}),saveAttachments:(e,t,n=`local`,r)=>w(V(e,`attachments`,n),Ma,{method:`POST`,body:H(e,{attachments:t,...r===void 0?{}:{folder:r}})}),shell:(e,t,n=`local`)=>w(V(e,`shell`,n),ja,{method:`POST`,body:H(e,{text:t})}),runCommand:(e,t,n=`local`)=>w(V(e,`commands/run`,n),ya,{method:`POST`,body:H(e,{text:t})}),respondToCommand:(e,t,n,r=`local`)=>w(V(e,`commands/respond`,r),ya,{method:`POST`,body:H(e,{requestId:t,value:n})}),navigateTree:(e,t,n=`local`)=>w(V(e,`tree/navigate`,n),Ca,{method:`POST`,body:H(e,{targetId:t.targetId,expectedLeafId:t.expectedLeafId,summary:t.summary,...t.retainCheckpoint===void 0?{}:{retainCheckpoint:t.retainCheckpoint}})}),forkTree:(e,t,n=`local`)=>Ro(e,t,n),abort:(e,t=`local`)=>w(V(e,`abort`,t),Fa,{method:`POST`,body:H(e)}),stop:(e,t=`local`)=>w(V(e,`stop`,t),Ia,{method:`POST`,body:H(e)}),archive:(e,t=`local`,n)=>w(V(e,`archive`,t),La,{method:`POST`,body:H(e,n===void 0?{}:{scopeProjectId:n})}),archiveWithDescendants:(e,t=`local`,n)=>w(V(e,`archive-tree`,t),La,{method:`POST`,body:H(e,n===void 0?{}:{scopeProjectId:n})}),restore:(e,t=`local`,n)=>w(V(e,`restore`,t),Ra,{method:`POST`,body:H(e,n===void 0?{}:{scopeProjectId:n})}),deleteArchived:(e,t=`local`,n)=>w(po(e,t,n),za,{method:`DELETE`}),detachParent:(e,t=`local`)=>w(V(e,`detach-parent`,t),Ba,{method:`POST`,body:H(e)}),reloadSession:(e,t=`local`)=>w(V(e,`reload`,t),Va,{method:`POST`,body:H(e)}),clearQueue:(e,t=`local`)=>w(V(e,`queue/clear`,t),M,{method:`POST`,body:H(e)}),mutateQueuedMessage:(e,t,n=`local`)=>w(V(e,`queue/message`,n),M,{method:`POST`,body:H(e,{...t})}),dismissWarning:(e,t,n=`local`)=>w(V(e,`warnings/dismiss`,n),M,{method:`POST`,body:H(e,{dismissId:t})}),submitAsk:(e,t,n,r=`local`)=>w(V(e,`ask/submit`,r),M,{method:`POST`,body:H(e,{askId:t,answers:n.answers})}),cancelAsk:(e,t,n=`local`)=>w(V(e,`ask/cancel`,n),M,{method:`POST`,body:H(e,{askId:t})}),answerDialog:(e,t,n,r=`local`)=>w(V(e,`dialogs/answer`,r),Vn,{method:`POST`,body:H(e,{dialogId:t,value:n})}),cancelDialog:(e,t,n=`local`)=>w(V(e,`dialogs/cancel`,n),Vn,{method:`POST`,body:H(e,{dialogId:t})}),authProviders:e=>{let t=new URLSearchParams;e.mode!==void 0&&t.set(`mode`,e.mode),e.authType!==void 0&&t.set(`authType`,e.authType),e.projectId!==void 0&&t.set(`projectId`,e.projectId);let n=t.toString();return w(`${B(e.machineId)}/auth/providers${n===``?``:`?${n}`}`,$r)},saveApiKey:(e,t,n)=>w(go(`api-key`,n),ja,{method:`POST`,body:JSON.stringify({providerId:e,key:t})}),startInteractiveApiKeyLogin:(e,t)=>w(go(`api-key/interactive`,t),ti,{method:`POST`,body:JSON.stringify({providerId:e})}),logoutProvider:(e,t)=>w(go(`logout`,t),ja,{method:`POST`,body:JSON.stringify({providerId:e})}),mcpAuthServers:(e,t=`local`)=>w(fo(e,`mcp/auth/servers`,t),ei),startMcpAuth:(e,t,n=`local`,r)=>w(V(e,`mcp/auth`,n),ti,{method:`POST`,body:H(e,{mode:t,...r===void 0?{}:{serverName:r}})}),mcpAuthFlow:(e,t=`local`)=>w(`${B(t)}/auth/mcp/${encodeURIComponent(e)}`,ti),respondMcpAuthFlow:(e,t,n,r=`local`)=>w(`${B(r)}/auth/mcp/${encodeURIComponent(e)}/respond`,ti,{method:`POST`,body:JSON.stringify({requestId:t,value:n})}),cancelMcpAuthFlow:(e,t=`local`)=>w(`${B(t)}/auth/mcp/${encodeURIComponent(e)}/cancel`,ti,{method:`POST`}),startOAuthLogin:(e,t)=>w(go(`oauth`,t),ti,{method:`POST`,body:JSON.stringify({providerId:e})}),oauthFlow:(e,t)=>w(go(`oauth/${encodeURIComponent(e)}`,t),ti),respondOAuthFlow:(e,t,n,r)=>w(go(`oauth/${encodeURIComponent(e)}/respond`,r),ti,{method:`POST`,body:JSON.stringify({requestId:t,value:n})}),cancelOAuthFlow:(e,t)=>w(go(`oauth/${encodeURIComponent(e)}/cancel`,t),ti,{method:`POST`})},Fo={runTerminalCommand:(e,t,n=`local`)=>w(`${B(n)}/projects/${encodeURIComponent(t.workspace.projectId)}/workspaces/${encodeURIComponent(t.workspace.id)}/terminal-command-runs`,Ci,{method:`POST`,body:JSON.stringify({origin:e,title:t.title,command:t.command,metadata:t.metadata??{}})}),listCommandRuns:(e,t=`local`,n)=>w(`${B(t)}/terminal-command-runs${Bo(e)}`,j(Ci),n?.signal===void 0?void 0:{signal:n.signal}),getCommandRun:(e,t=`local`)=>Io(e,t),cancelCommandRun:(e,t=`local`)=>w(`${B(t)}/terminal-command-runs/${encodeURIComponent(e)}/cancel`,Ci,{method:`POST`})};async function Io(e,t){return gt(`${B(t)}/terminal-command-runs/${encodeURIComponent(e)}`,Ci)}var Lo=class extends Error{constructor(){super(f(`ui.main.8501d1e756a4`,`Fork from the session tree is unavailable. Restart the session daemon to enable it.`)),this.name=`SessionTreeForkUnavailableError`}};async function Ro(e,t,n){let r=await fetch(ht(V(e,`tree/fork`,n)),{method:`POST`,headers:{"content-type":`application/json`},body:H(e,{entryId:t.entryId,expectedLeafId:t.expectedLeafId,...t.retainCheckpoint===void 0?{}:{retainCheckpoint:t.retainCheckpoint}})});if(!r.ok){let e=await r.json().catch(()=>({}));throw zo(r.status,e)?new Lo:Error(Vo(e)??r.statusText)}return wa(await r.json())}function zo(e,t){if(e!==404||!Uo(t)||t.statusCode!==404||t.error!==`Not Found`)return!1;let n=t.message;return typeof n==`string`&&/^Route POST:.*\/tree\/fork not found$/i.test(n)}function Bo(e){if(e===void 0)return``;let t=new URLSearchParams;e.projectId!==void 0&&t.set(`projectId`,e.projectId),e.workspaceId!==void 0&&t.set(`workspaceId`,e.workspaceId),e.terminalId!==void 0&&t.set(`terminalId`,e.terminalId),e.statuses!==void 0&&e.statuses.length>0&&t.set(`statuses`,e.statuses.join(`,`)),e.metadata!==void 0&&Object.keys(e.metadata).length>0&&t.set(`metadata`,JSON.stringify(e.metadata));let n=t.toString();return n===``?``:`?${n}`}function Vo(e){if(!Uo(e))return;let t=e.error;return typeof t==`string`?t:void 0}async function Ho(e,t,n,r){let i=await fetch(co(e,t,n,{machineId:r}));if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(Vo(e)??i.statusText)}let a=await i.blob(),o=URL.createObjectURL(a),s=document.createElement(`a`);s.href=o;let c=n.split(`/`).pop();s.download=c===void 0||c===``?`download`:c,document.body.append(s),s.click(),s.remove(),URL.revokeObjectURL(o)}function Uo(e){return typeof e==`object`&&!!e}var Wo={files:(e,t,n={})=>{let r=typeof t==`string`,i=r?e:``,a=r?t:e,o=r?n:t,s=new URLSearchParams({q:a});if(o.kind!==void 0&&s.set(`kind`,o.kind),o.mode!==void 0&&s.set(`mode`,o.mode),o.scope!==void 0&&s.set(`scope`,o.scope),(!r||o.workspaceScoped===!0)&&o.projectId!==void 0&&o.workspaceId!==void 0)return w(`${B(o.machineId)}/projects/${encodeURIComponent(o.projectId)}/workspaces/${encodeURIComponent(o.workspaceId)}/files?${s.toString()}`,j(fi),{signal:o.signal??null});if(!r)throw Error(`File suggestions require a project and workspace`);return s.set(`cwd`,i),w(`${B(o.machineId)}/files?${s.toString()}`,j(fi),{signal:o.signal??null})}},Go={...vo,...yo,...ko,...So,...Co,...wo,...Eo,...Do,...Oo,...Ao,...lo,...No,...Po,...Wo,...Fo},Ko=`.pi-web/uploads`,qo=class extends Error{constructor(e=f(`client.workspaceUploads.workspace.upload.cancelled.ac6723`,`Workspace upload cancelled`)){super(e),this.name=`WorkspaceUploadCancelledError`}};function Jo(e){return e?.uploads?.defaultFolder??`.pi-web/uploads`}function Yo(e,t){return e?.uploads?.defaultFolder??t}function Xo(e,t){let n=ts(e,f(`client.workspaceUploads.upload.destination.874cbb`,`Upload destination`),{allowEmpty:!0}),r=ts(t,f(`client.workspaceUploads.upload.filename.9252dd`,`Upload filename`),{allowEmpty:!1});return n===``?r:`${n}/${r}`}function Zo(e,t,n,r={}){let i=r.xhrFactory?.()??new XMLHttpRequest,a=!1,o=!1;return{promise:new Promise((s,c)=>{let l=e=>{a||(a=!0,c(e))},u=e=>{a||(a=!0,s(e))};i.open(`PUT`,ao(e,t,n.path,Qo(r)),!0),i.responseType=`json`,i.setRequestHeader(`Content-Type`,(n.contentType??n.file.type)||`application/octet-stream`),i.upload.onprogress=e=>{r.onProgress?.($o(e,n.file.size))},i.onload=()=>{if(i.status>=200&&i.status<300)try{r.onProgress?.({loaded:n.file.size,total:n.file.size,percent:1,lengthComputable:!0}),u(vi(rs(i)))}catch(e){l(e instanceof Error?e:Error(String(e)))}else l(Error(is(i)))},i.onerror=()=>{l(Error(f(`client.workspaceUploads.workspace.upload.failed.a87e6b`,`Workspace upload failed`)))},i.onabort=()=>{l(new qo(o?void 0:f(`client.workspaceUploads.workspace.upload.aborted.58a455`,`Workspace upload aborted`)))},i.send(n.file)}),cancel:()=>{a||(o=!0,i.abort())}}}function Qo(e){return{...e.createDirs===void 0?{}:{createDirs:e.createDirs},...e.overwrite===void 0?{}:{overwrite:e.overwrite},...e.machineId===void 0?{}:{machineId:e.machineId}}}function $o(e,t){let n=e.lengthComputable?e.total:t;return{loaded:e.loaded,total:n,percent:es(e.loaded,n),lengthComputable:e.lengthComputable}}function es(e,t){return t<=0?e<=0?0:1:Math.max(0,Math.min(1,e/t))}function ts(e,t,n){let r=e.trim();if(r===``){if(n.allowEmpty)return``;throw Error(f(`client.workspaceUploads.must.not.be.empty.b22cd8`,`{value1} must not be empty`,{value1:t}))}if(ns(r))throw Error(f(`client.workspaceUploads.must.be.a.workspace.relative.path.79fcd6`,`{value1} must be a workspace-relative path`,{value1:t}));let i=r.split(/[\\/]+/u).filter(e=>e!==``&&e!==`.`);if(i.length===0){if(n.allowEmpty)return``;throw Error(f(`client.workspaceUploads.must.not.be.empty.b22cd8`,`{value1} must not be empty`,{value1:t}))}if(i.some(e=>e===`..`))throw Error(f(`client.workspaceUploads.must.not.contain.path.traversal.dac533`,`{value1} must not contain path traversal`,{value1:t}));return i.join(`/`)}function ns(e){let t=e.replace(/\\/g,`/`);return t.startsWith(`/`)||/^[A-Za-z]:\//u.test(t)}function rs(e){return e.response!==void 0&&e.response!==null&&e.response!==``?e.response:e.responseText===``?{}:JSON.parse(e.responseText)}function is(e){let t=as(e);return os(t)&&typeof t.error==`string`?t.error:e.statusText||`HTTP ${String(e.status)}`}function as(e){try{return rs(e)}catch{return}}function os(e){return typeof e==`object`&&!!e}var ss=`.pi-web/attachments`;function cs(e){return e?.attachments?.defaultFolder??`.pi-web/attachments`}function ls(e,t){return e?.attachments?.defaultFolder??t}function us(e,t){return gs(e,t)}function ds(e,t,n){let r=us(e,t);return n===void 0?ht(r):h(se(r),n)}function fs(e,t){let n=us(e,t),r=n.lastIndexOf(`/`);return`${n.slice(0,r)}/channels${n.slice(r)}`}function ps(e,t,n){let r=y(fs(e,t),void 0,pe());return n===void 0?o(r):o(r,n)}function ms(e,t,n,r={}){return vs(e,t,n,r,ds)}function hs(e,t,n,r,i=e=>new WebSocket(e)){if(r.signal?.aborted===!0)return Promise.reject(Cs(r.signal));let a=_e(e.backendRevision,n,_s(e)),o=ps(e,t),s;try{s=i(o)}catch(e){return Promise.reject(Error(`Plugin backend channel unavailable: ${ws(e)}`,{cause:e}))}let c=!1,l=!1,u=0,d,f=()=>void 0,m=new Promise(e=>{f=e}),h=Object.freeze({closed:m,send(e){if(!c||l||s.readyState!==1)throw Error(`Plugin backend channel is not open`);let t=te(e),n=p(t);if(s.bufferedAmount===0&&(u=0),u>=128||s.bufferedAmount+n>1048576){let e=Error(`Plugin backend channel browser queue limit was exceeded`);throw d=Object.freeze({code:`queue-overflow`,message:e.message}),bs(s,`Channel queue overflow`),e}try{s.send(t),u+=1}catch(e){throw d=Object.freeze({code:`send-failed`,message:ws(e)}),bs(s,`Channel send failed`),e}},close(e=`Channel closed`){bs(s,ee(e))}});return new Promise((e,t)=>{let n=setTimeout(()=>{let e=Error(`Plugin backend channel open timed out after ${String(fe)}ms`);d=Object.freeze({code:`open-timeout`,message:e.message}),t(e),bs(s,`Channel open timed out`)},fe),i=()=>{let e=r.signal;if(e===void 0)return;let n=Cs(e);c||t(n),d=Object.freeze({code:`cancelled`,message:n.message}),bs(s,`Channel cancelled`)};r.signal?.addEventListener(`abort`,i,{once:!0}),s.addEventListener(`open`,()=>{try{s.send(a)}catch(e){t(Error(`Plugin backend channel unavailable: ${ws(e)}`,{cause:e})),bs(s,`Channel open failed`)}}),s.addEventListener(`message`,i=>{try{if(typeof i.data!=`string`)throw Error(`Plugin backend channels accept text JSON frames only`);let a=oe(i.data);if(a.kind===`ready`){if(c)throw Error(`Plugin backend channel sent more than one ready envelope`);c=!0,clearTimeout(n),e(h);return}if(a.kind===`error`){d=Object.freeze({code:a.code,message:a.message}),c||t(Error(a.message)),bs(s,`Channel failed`);return}if(!c)throw Error(`Plugin backend channel sent data before ready`);r.onData(a.data)}catch(e){d=Object.freeze({code:`protocol-error`,message:ws(e)}),c||t(e instanceof Error?e:Error(String(e))),bs(s,`Channel protocol error`)}}),s.addEventListener(`error`,()=>{d??=Object.freeze({code:`transport-error`,message:`Plugin backend channel transport failed`}),c||t(Error(`Plugin backend channel unavailable`)),bs(s,`Channel transport error`)}),s.addEventListener(`close`,e=>{if(l)return;l=!0,clearTimeout(n),r.signal?.removeEventListener(`abort`,i),c||t(Error(d?.message??`Plugin backend channel closed before ready (${String(e.code)})`));let a=d??(e.code===1e3?void 0:Object.freeze({code:`channel-closed`,message:e.reason||`Plugin backend channel closed with code ${String(e.code)}`}));f(Object.freeze({code:e.code,reason:e.reason,wasClean:e.wasClean,...a===void 0?{}:{error:a}}))})})}function gs(e,t){if(!ge(e.pluginId))throw Error(`Invalid PI WEB plugin id: ${e.pluginId}`);if(e.machineId===``)throw Error(`Machine id is required`);if(e.projectId===``)throw Error(`Project id is required`);if(e.workspaceId===``)throw Error(`Workspace id is required`);if(e.workspaceId!==void 0&&e.projectId===void 0)throw Error(`Workspace scope requires a project id`);ae(e,_s(e));let n=he(t);return`${e.machineId===`local`?`api`:`api/machines/${encodeURIComponent(e.machineId)}`}${ue({...e,operation:n})}`}function _s(e){return e.scope===void 0?{}:{scope:e.scope,...e.projectId===void 0?{}:{projectId:e.projectId},...e.workspaceId===void 0?{}:{workspaceId:e.workspaceId}}}async function vs(e,t,n,r,i){let a=ve(e.backendRevision),o=ie(n,`Plugin backend request input`),s=JSON.stringify({revision:a,input:o,..._s(e)});if(p(s)>266240)throw Error(`Plugin backend request exceeds the ${String(ce)} byte wire limit`);let c;try{c=await fetch(i(e,t),{method:`POST`,headers:{"content-type":`application/json`},body:s,...r.signal===void 0?{}:{signal:r.signal}})}catch(e){throw r.signal?.aborted===!0?Cs(r.signal):Error(`Plugin backend request unavailable: ${ws(e)}`,{cause:e})}let l=await ys(c);if(!c.ok)throw Error(Ss(l)??`Plugin backend request returned HTTP ${String(c.status)}`);return le(l,`Plugin backend response`,ne)}async function ys(e){let t=e.headers.get(`content-length`);if(t!==null&&/^\d+$/u.test(t)&&Number(t)>8392704)throw await e.body?.cancel(),Error(`Plugin backend response exceeds the ${String(me)} byte wire limit`);if(e.body===null){let t=await e.text();if(p(t)>8392704)throw xs();return t}let n=e.body.getReader(),r=new TextDecoder,i=0,a=``;try{let e=await n.read();for(;!e.done;){if(i+=e.value.byteLength,i>8392704)throw await n.cancel(),xs();a+=r.decode(e.value,{stream:!0}),e=await n.read()}return a+r.decode()}finally{n.releaseLock()}}function bs(e,t){if(e.readyState===0||e.readyState===1)try{e.close(1e3,ee(t))}catch{e.close()}}function xs(){return Error(`Plugin backend response exceeds the ${String(me)} byte wire limit`)}function Ss(e){try{let t=JSON.parse(e);return Ts(t)&&typeof t.error==`string`?t.error:void 0}catch{return}}function Cs(e){let t=e.reason;return t instanceof Error?t:new DOMException(`Plugin backend request cancelled`,`AbortError`)}function ws(e){return e instanceof Error?e.message:String(e)}function Ts(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Es=1200,Ds=[`mod`,`alt`,`shift`],Os=class{constructor(){this.pendingTokens=[],this.lastTarget=null}handle(e,t,n={}){let r=e.composedPath?.()[0]??e.target;r!==this.lastTarget&&this.clearPending(),this.lastTarget=r;let i=Ns(e);if(i===void 0)return!1;if(i===`escape`&&this.pendingTokens.length>0)return this.clearPending(),!0;let a=Ps(e),o=ks(t,n.shortcuts,{enabledOnly:!0}).filter(e=>e.active&&(!a||Fs(e.tokens[0]??``))).map(e=>({action:e.action,tokens:e.tokens}));if(this.pendingTokens.length>0){if(this.handleSequence([...this.pendingTokens,i],o))return!0;this.clearPending()}return this.handleSequence([i],o)}reset(){this.clearPending(),this.lastTarget=null}handleSequence(e,t){let n=t.find(t=>Qs(t.tokens,e));return n===void 0?t.some(t=>$s(t.tokens,e))?(this.setPending(e),!0):!1:(this.clearPending(),n.action.run(),!0)}setPending(e){this.clearPending(),this.pendingTokens=e,this.pendingTimer=globalThis.setTimeout(()=>{this.pendingTokens=[],this.pendingTimer=void 0},Es)}clearPending(){this.pendingTokens=[],this.pendingTimer!==void 0&&(globalThis.clearTimeout(this.pendingTimer),this.pendingTimer=void 0)}};function ks(e,t,n={}){let r=e.flatMap((e,r)=>{if(n.enabledOnly===!0&&e.enabled===!1)return[];let i=Is(e,t,r);return i===void 0?[]:[i]}),i=new Map;for(let e of r)i.set(e.key,[...i.get(e.key)??[],e]);let a=new Map;for(let e of i.values()){let t=[...e].sort(Bs)[0];t!==void 0&&a.set(t.key,t)}let o=[...a.values()].sort(Vs),s=new Map,c=new Map;for(let e of r){let t=a.get(e.key);if(t===void 0)continue;let n=Hs(t,o)??t;c.set(e,n),e!==n&&s.set(n,[...s.get(n)??[],e])}return r.map(e=>{let t=c.get(e),n=t===e,r=t===void 0||n?void 0:zs(t),i=n?[...s.get(e)??[]].sort(Bs).map(zs):[];return{...e,active:n,shadows:i,...r===void 0?{}:{shadowedBy:r}}}).sort((e,t)=>e.order-t.order)}function As(e){return Gs(e)}function js(e){let t=Gs(e);return t.ok?t.tokens:[]}function Ms(e){return js(e).map(e=>e.split(`+`).map(Zs).join(`+`)).join(` `)}function Ns(e){if(e.isComposing)return;let t=Ys(e.key);if(t===void 0)return;let n=[];return(e.metaKey||e.ctrlKey)&&n.push(`mod`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),n.push(t),n.join(`+`)}function Ps(e){return(e.composedPath?.()??[e.target]).some(e=>typeof HTMLElement>`u`||!(e instanceof HTMLElement)?!1:[`INPUT`,`TEXTAREA`,`SELECT`].includes(e.tagName)||e.isContentEditable)}function Fs(e){return e.split(`+`).includes(`mod`)||e.split(`+`).includes(`alt`)}function Is(e,t,n){let r=Ls(e,t);if(r===null)return;let i=r??e.shortcut;if(i===void 0||i===``)return;let a=js(i);if(a.length!==0)return{action:e,shortcut:a.join(` `),source:r===void 0?`default`:`custom`,tokens:a,key:Rs(a),order:n}}function Ls(e,t){if(t!==void 0){for(let n of[e.id,...e.shortcutAliases??[]])if(Object.hasOwn(t,n))return t[n]}}function Rs(e){return e.join(`\0`)}function zs(e){return{action:e.action,shortcut:e.shortcut,source:e.source}}function Bs(e,t){return Us(e.source)-Us(t.source)||Ws(e.action.id,t.action.id)||Ws(e.action.title,t.action.title)||e.order-t.order}function Vs(e,t){return e.tokens.length-t.tokens.length||Bs(e,t)}function Hs(e,t){return t.find(t=>t!==e&&t.tokens.length<e.tokens.length&&$s(e.tokens,t.tokens))}function Us(e){switch(e){case`custom`:return 0;case`default`:return 1}}function Ws(e,t){return e<t?-1:+(e>t)}function Gs(e){let t=e.trim().toLowerCase().replace(/\s*\+\s*/gu,`+`);if(t===``)return{ok:!1,message:f(`client.keyboardShortcuts.enter.a.shortcut.select.none.or.reset.to.default.481e7b`,`Enter a shortcut, select None, or reset to default.`)};let n=[],r=t.split(/\s+/u).filter(e=>e!==``);for(let e of r){let t=Ks(e);if(!t.ok)return t;n.push(t.token)}return{ok:!0,shortcut:n.join(` `),tokens:n}}function Ks(e){let t=e.split(`+`).filter(e=>e!==``);if(t.length===0)return{ok:!1,message:f(`client.keyboardShortcuts.a.shortcut.combination.must.contain.a.key.87dd82`,`A shortcut combination must contain a key.`)};let n=new Set,r;for(let e of t){let t=qs(e);if(t!==void 0){if(n.has(t))return{ok:!1,message:f(`client.keyboardShortcuts.shortcut.contains.a.duplicate.modifier.8363e5`,`Shortcut contains a duplicate {value1} modifier.`,{value1:Zs(t)})};n.add(t);continue}let i=Js(e);if(i===void 0)return{ok:!1,message:f(`client.keyboardShortcuts.unsupported.shortcut.key.b3c1ce`,`Unsupported shortcut key: {value1}`,{value1:e})};if(r!==void 0)return{ok:!1,message:f(`client.keyboardShortcuts.each.shortcut.combination.can.contain.only.one.non.modifier.key.76ffb6`,`Each shortcut combination can contain only one non-modifier key.`)};r=i}return r===void 0?{ok:!1,message:f(`client.keyboardShortcuts.a.shortcut.combination.must.contain.a.key.87dd82`,`A shortcut combination must contain a key.`)}:{ok:!0,token:[...Ds.filter(e=>n.has(e)),r].join(`+`)}}function qs(e){switch(e){case`mod`:case`meta`:case`cmd`:case`command`:case`ctrl`:case`control`:case`primary`:return`mod`;case`alt`:case`option`:case`opt`:return`alt`;case`shift`:return`shift`;default:return}}function Js(e){let t=Xs(e);if(t!==void 0)return t;if(/^f(?:[1-9]|1[0-9]|2[0-4])$/u.test(e)||e.length===1)return e}function Ys(e){return e===` `?`space`:Js(e.toLowerCase())}function Xs(e){switch(e){case` `:case`spacebar`:case`space`:return`space`;case`esc`:case`escape`:return`escape`;case`return`:case`enter`:return`enter`;case`del`:case`delete`:return`delete`;case`backspace`:return`backspace`;case`tab`:return`tab`;case`up`:case`arrowup`:return`arrowup`;case`down`:case`arrowdown`:return`arrowdown`;case`left`:case`arrowleft`:return`arrowleft`;case`right`:case`arrowright`:return`arrowright`;case`pageup`:case`pagedown`:case`home`:case`end`:return e;case`+`:case`plus`:return`plus`;case`period`:case`dot`:return`.`;case`comma`:return`,`;case`slash`:return`/`;case`backslash`:return`\\`;case`minus`:return`-`;default:return}}function Zs(e){return e===`mod`?ec()?`⌘`:`Ctrl`:e===`shift`?`Shift`:e===`alt`?ec()?`⌥`:`Alt`:e===`enter`?`Enter`:e===`escape`?`Esc`:e===`space`?`Space`:e===`tab`?`Tab`:e===`backspace`?`Backspace`:e===`delete`?`Delete`:e===`arrowup`?`↑`:e===`arrowdown`?`↓`:e===`arrowleft`?`←`:e===`arrowright`?`→`:e===`pageup`?`PageUp`:e===`pagedown`?`PageDown`:e===`home`?`Home`:e===`end`?`End`:e===`plus`?`+`:/^f(?:[1-9]|1[0-9]|2[0-4])$/u.test(e)||e.length===1?e.toUpperCase():`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function Qs(e,t){return e.length===t.length&&$s(e,t)}function $s(e,t){return t.every((t,n)=>e[n]===t)}function ec(){return typeof navigator<`u`&&navigator.userAgent.toLowerCase().includes(`mac`)}var tc=`themes:classic`,nc={themeId:`themes:pi-web-dark`,auto:!0},rc=`pi-web-app-theme`,ic=`--pi-bg.--pi-surface.--pi-surface-hover.--pi-terminal-bg.--pi-terminal-text.--pi-border.--pi-border-muted.--pi-text.--pi-text-secondary.--pi-text-bright.--pi-muted.--pi-dim.--pi-accent.--pi-accent-border.--pi-selection-bg.--pi-success.--pi-success-border.--pi-success-bg.--pi-success-surface.--pi-success-ring.--pi-warning.--pi-warning-border.--pi-warning-surface.--pi-danger.--pi-purple.--pi-purple-border.--pi-purple-surface.--pi-overlay.--pi-shadow-soft.--pi-shadow.--pi-shadow-strong.--pi-bg-overlay-soft.--pi-bg-overlay.--pi-success-bg-overlay.--pi-terminal-selection`.split(`.`);function ac(){try{let e=window.localStorage.getItem(rc);return e===null?void 0:xt(JSON.parse(e))}catch{return}}function oc(e){try{window.localStorage.setItem(rc,JSON.stringify(e))}catch{}}function sc(){try{window.localStorage.removeItem(rc)}catch{}}function cc(e,t,n=[]){return e??t??(n.some(e=>e.id===`pi-web.custom-ui-codex:graphite`)?{themeId:`pi-web.custom-ui-codex:graphite`,auto:!0}:nc)}function lc(e){let t=document.documentElement;t.dataset.piWebTheme=e.id,t.style.colorScheme=e.colorScheme;for(let n of ic){let r=e.tokens?.[n];typeof r==`string`&&r!==``?t.style.setProperty(n,r):t.style.removeProperty(n)}}function uc(e){let t=fc(e.themes,e.fallbackThemeId??`themes:classic`),n=dc(e.themes,e.preference.themeId)??t;if(n===void 0)return{selectedTheme:void 0,activeTheme:void 0,selectedThemePair:void 0,fallbackTheme:t};let r=pc(e.themePairs,n.id);if(!e.preference.auto||r===void 0)return{selectedTheme:n,activeTheme:n,selectedThemePair:r,fallbackTheme:t};let i=e.prefersLight?r.light:r.dark;return{selectedTheme:n,activeTheme:e.themes.find(e=>e.id===i)??n,selectedThemePair:r,fallbackTheme:t}}function dc(e,t){let n=t===`themes:paper`?`pi-web.custom-ui-codex:paper`:t===`themes:graphite`?`pi-web.custom-ui-codex:graphite`:t;return e.find(e=>e.id===t)??e.find(e=>e.id===n)}function fc(e,t=tc){return e.find(e=>e.id===t)??e[0]}function pc(e,t){return e.find(e=>e.light===t||e.dark===t)}var mc=0;function U(e){return e>=48&&e<=57}function hc(e){return U(e)||e>=65&&e<=70||e>=97&&e<=102}function gc(e){return e>=65&&e<=90}function _c(e){return e>=97&&e<=122}function vc(e){return gc(e)||_c(e)}function yc(e){return e>=128}function bc(e){return vc(e)||yc(e)||e===95}function xc(e){return bc(e)||U(e)||e===45}function Sc(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function Cc(e){return e===10||e===13||e===12}function wc(e){return Cc(e)||e===32||e===9}function W(e,t){return!(e!==92||Cc(t)||t===mc)}function Tc(e,t,n){return e===45?bc(t)||t===45||W(t,n):bc(e)?!0:e===92&&W(e,t)}function Ec(e,t,n){return e===43||e===45?U(t)?2:t===46&&U(n)?3:0:e===46?U(t)?2:0:+!!U(e)}function Dc(e){return+(e===65279||e===65534)}var Oc=Array(128);for(let e=0;e<Oc.length;e++)Oc[e]=wc(e)&&130||U(e)&&131||bc(e)&&132||Sc(e)&&133||e||128;function kc(e){return e<128?Oc[e]:132}function Ac(e,t){return t<e.length?e.charCodeAt(t):0}function jc(e,t,n){return n===13&&Ac(e,t+1)===10?2:1}function Mc(e,t,n){let r=e.charCodeAt(t);return gc(r)&&(r|=32),r===n}function Nc(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let i=t;i<n;i++){let n=r.charCodeAt(i-t),a=e.charCodeAt(i);if(gc(a)&&(a|=32),a!==n)return!1}return!0}function Pc(e,t){for(;t>=0&&wc(e.charCodeAt(t));t--);return t+1}function Fc(e,t){for(;t<e.length&&wc(e.charCodeAt(t));t++);return t}function Ic(e,t){for(;t<e.length&&U(e.charCodeAt(t));t++);return t}function Lc(e,t){if(t+=2,hc(Ac(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&hc(Ac(e,t));t++);let n=Ac(e,t);wc(n)&&(t+=jc(e,t,n))}return t}function Rc(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!xc(n)){if(W(n,Ac(e,t+1)))t=Lc(e,t)-1;else break}}return t}function zc(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),U(n)&&(t=Ic(e,t+1),n=e.charCodeAt(t)),n===46&&U(e.charCodeAt(t+1))&&(t+=2,t=Ic(e,t)),Mc(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),U(n)&&(t=Ic(e,t+1+r+1))}return t}function Bc(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}W(n,Ac(e,t+1))&&(t=Lc(e,t))}return t}function Vc(e){if(e.length===1&&!hc(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var Hc=`EOF-token.ident-token.function-token.at-keyword-token.hash-token.string-token.bad-string-token.url-token.bad-url-token.delim-token.number-token.percentage-token.dimension-token.whitespace-token.CDO-token.CDC-token.colon-token.semicolon-token.comma-token.[-token.]-token.(-token.)-token.{-token.}-token.comment-token`.split(`.`),Uc=16384;function Wc(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,Uc)):e}var Gc=10,Kc=12,qc=13;function Jc(e){let t=e.source,n=t.length,r=t.length>0?Dc(t.charCodeAt(0)):0,i=Wc(e.lines,n),a=Wc(e.columns,n),o=e.startLine,s=e.startColumn;for(let e=r;e<n;e++){let r=t.charCodeAt(e);i[e]=o,a[e]=s++,(r===Gc||r===qc||r===Kc)&&(r===qc&&e+1<n&&t.charCodeAt(e+1)===Gc&&(e++,i[e]=o,a[e]=s),o++,s=1)}i[n]=o,a[n]=s,e.lines=i,e.columns=a,e.computed=!0}var Yc=class{constructor(e,t,n,r){this.setSource(e,t,n,r),this.lines=null,this.columns=null}setSource(e=``,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||Jc(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||Jc(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},G=16777215,Xc=24,Zc=1,Qc=2,$c=new Uint8Array(32);$c[2]=22,$c[21]=22,$c[19]=20,$c[23]=24;var el=new Uint8Array(32);el[2]=Zc,el[21]=Zc,el[19]=Zc,el[23]=Zc,el[22]=Qc,el[20]=Qc,el[24]=Qc;function tl(e,t,n){return e<t?t:e>n?n:e}var nl=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e=``,t=()=>{}){e=String(e||``);let n=e.length,r=Wc(this.offsetAndType,e.length+1),i=Wc(this.balance,e.length+1),a=0,o=-1,s=0,c=e.length;this.offsetAndType=null,this.balance=null,i.fill(0),t(e,(e,t,n)=>{let l=a++;if(r[l]=e<<Xc|n,o===-1&&(o=t),i[l]=c,e===s){let e=i[c];i[c]=l,c=e,s=$c[r[e]>>Xc]}else this.isBlockOpenerTokenType(e)&&(c=l,s=$c[e])}),r[a]=0<<Xc|n,i[a]=a;for(let e=0;e<a;e++){let t=i[e];if(t<=e){let n=i[t];n!==e&&(i[e]=n)}else t>a&&(i[e]=a)}this.source=e,this.firstCharOffset=o===-1?0:o,this.tokenCount=a,this.offsetAndType=r,this.balance=i,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>Xc:0}lookupTypeNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>Xc;if(n!==13&&n!==25&&e--===0)return n}return 0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&G:this.source.length}lookupOffsetNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>Xc;if(n!==13&&n!==25&&e--===0)return t-this.tokenIndex}return 0}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount&&Nc(this.source,this.offsetAndType[e-1]&G,this.offsetAndType[e]&G,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&G:this.offsetAndType[this.tokenCount]&G:this.firstCharOffset}getTokenEnd(e){return e===this.tokenIndex?this.tokenEnd:this.offsetAndType[tl(e,0,this.tokenCount)]&G}getTokenType(e){return e===this.tokenIndex?this.tokenType:this.offsetAndType[tl(e,0,this.tokenCount)]>>Xc}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBlockOpenerTokenType(e){return el[e]===Zc}isBlockCloserTokenType(e){return el[e]===Qc}getBlockTokenPairIndex(e){let t=this.getTokenType(e);if(el[t]===1){let n=this.balance[e],r=this.getTokenType(n);return $c[t]===r?n:-1}if(el[t]===2){let n=this.balance[e];return $c[this.getTokenType(n)]===t?n:-1}return-1}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&G,t=this.offsetAndType[t],this.tokenType=t>>Xc,this.tokenEnd=t&G):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Xc,this.tokenEnd=e&G):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r=0,i=0;loop:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break loop;switch(i=n>0?this.offsetAndType[n-1]&G:this.firstCharOffset,t(this.source.charCodeAt(i))){case 1:break loop;case 2:n++;break loop;default:this.isBlockOpenerTokenType(this.offsetAndType[n]>>Xc)&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,i=this.offsetAndType[t],a=i&G,o=i>>Xc;n=a,e(o,r,a,t)}}dump(){let e=Array(this.tokenCount);return this.forEachToken((t,n,r,i)=>{e[i]={idx:i,type:Hc[t],chunk:this.source.substring(n,r),balance:this.balance[i]}}),e}};function rl(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){l=zc(e,l),Tc(n(l),n(l+1),n(l+2))?(u=12,l=Rc(e,l)):n(l)===37?(u=11,l++):u=10}function i(){let t=l;if(l=Rc(e,l),Nc(e,t,l,`url`)&&n(l)===40){if(l=Fc(e,l+1),n(l)===34||n(l)===39){u=2,l=t+4;return}o()}else n(l)===40?(u=2,l++):u=1}function a(t){for(t||=n(l++),u=5;l<e.length;l++){let r=e.charCodeAt(l);switch(kc(r)){case t:l++;return;case 130:if(Cc(r)){l+=jc(e,l,r),u=6;return}break;case 92:if(l===e.length-1)break;let i=n(l+1);Cc(i)?l+=jc(e,l+1,i):W(r,i)&&(l=Lc(e,l)-1)}}}function o(){for(u=7,l=Fc(e,l);l<e.length;l++){let t=e.charCodeAt(l);switch(kc(t)){case 41:l++;return;case 130:if(l=Fc(e,l),n(l)===41||l>=e.length){l<e.length&&l++;return}l=Bc(e,l),u=8;return;case 34:case 39:case 40:case 133:l=Bc(e,l),u=8;return;case 92:if(W(t,n(l+1))){l=Lc(e,l)-1;break}l=Bc(e,l),u=8;return}}}e=String(e||``);let s=e.length,c=Dc(n(0)),l=c,u;for(;l<s;){let o=e.charCodeAt(l);switch(kc(o)){case 130:u=13,l=Fc(e,l+1);break;case 34:a();break;case 35:xc(n(l+1))||W(n(l+1),n(l+2))?(u=4,l=Rc(e,l+1)):(u=9,l++);break;case 39:a();break;case 40:u=21,l++;break;case 41:u=22,l++;break;case 43:Ec(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 44:u=18,l++;break;case 45:Ec(o,n(l+1),n(l+2))?r():n(l+1)===45&&n(l+2)===62?(u=15,l+=3):Tc(o,n(l+1),n(l+2))?i():(u=9,l++);break;case 46:Ec(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 47:n(l+1)===42?(u=25,l=e.indexOf(`*/`,l+2),l=l===-1?e.length:l+2):(u=9,l++);break;case 58:u=16,l++;break;case 59:u=17,l++;break;case 60:n(l+1)===33&&n(l+2)===45&&n(l+3)===45?(u=14,l+=4):(u=9,l++);break;case 64:Tc(n(l+1),n(l+2),n(l+3))?(u=3,l=Rc(e,l+1)):(u=9,l++);break;case 91:u=19,l++;break;case 92:W(o,n(l+1))?i():(u=9,l++);break;case 93:u=20,l++;break;case 123:u=23,l++;break;case 125:u=24,l++;break;case 131:r();break;case 132:i();break;default:u=9,l++}t(u,c,c=l)}}var il=null,al=class e{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return e.createItem(t)}allocateCursor(e,t){let n;return il===null?n={prev:e,next:t,cursor:this.cursor}:(n=il,il=il.cursor,n.prev=e,n.next=t,n.cursor=this.cursor),this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=il,il=e}updateCursors(e,t,n,r){let{cursor:i}=this;for(;i!==null;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let n=null;this.head=null;for(let r of t){let t=e.createItem(r);n===null?this.head=t:n.next=t,t.prev=n,n=t}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),i=t,a;for(;r.next!==null;)a=r.next,r.next=a.next,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),i=t,a;for(;r.prev!==null;)a=r.prev,r.prev=a.prev,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)r.appendData(t.call(n,e.data,e,this));return r}filter(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)t.call(n,e.data,e,this)&&r.appendData(e.data);return r}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new e;for(let e of this)t.appendData(e);return t}prepend(e){return this.updateCursors(null,e,this.head,e),this.head===null?this.tail=e:(this.head.prev=e,e.next=this.head),this.head=e,this}prependData(t){return this.prepend(e.createItem(t))}append(e){return this.insert(e)}appendData(t){return this.insert(e.createItem(t))}insert(e,t=null){if(t!==null){if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw Error(`before doesn't belong to list`);this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t}else this.updateCursors(this.tail,e,null,e),this.tail===null?this.head=e:(this.tail.next=e,e.prev=this.tail),this.tail=e;return this}insertData(t,n){return this.insert(e.createItem(t),n)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw Error(`item doesn't belong to list`);this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw Error(`item doesn't belong to list`);this.tail=e.prev}return e.prev=null,e.next=null,e}push(t){this.insert(e.createItem(t))}pop(){return this.tail===null?null:this.remove(this.tail)}unshift(t){this.prepend(e.createItem(t))}shift(){return this.head===null?null:this.remove(this.head)}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null||(t==null?(this.updateCursors(this.tail,e.tail,null,e.head),this.tail===null?this.head=e.head:(this.tail.next=e.head,e.head.prev=this.tail),this.tail=e.tail):(this.updateCursors(t.prev,e.tail,t,e.head),t.prev===null?this.head=e.head:(t.prev.next=e.head,e.head.prev=t.prev),t.prev=e.tail,e.tail.next=t),e.head=null,e.tail=null),this}replace(e,t){`head`in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function ol(e,t){let n=Object.create(SyntaxError.prototype),r=Error();return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||``).replace(/^(.+\n){1,3}/,`${e}: ${t}\n`)}})}var sl=100,cl=60,ll=` `;function ul({source:e,line:t,column:n,baseLine:r,baseColumn:i},a){function o(e,t){return s.slice(e,t).map((t,n)=>String(e+n+1).padStart(u)+` |`+t).join(`
2
+ `)}let s=(`
3
+ `.repeat(Math.max(r-1,0))+` `.repeat(Math.max(i-1,0))+e).split(/\r\n?|\n|\f/),c=Math.max(1,t-a)-1,l=Math.min(t+a,s.length+1),u=Math.max(4,String(l).length)+1,d=0;n+=3*(s[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>sl&&(d=n-cl+3,n=58);for(let e=c;e<=l;e++)e>=0&&e<s.length&&(s[e]=s[e].replace(/\t/g,ll),s[e]=(d>0&&s[e].length>d?`…`:``)+s[e].substr(d,98)+(s[e].length>d+sl-1?`…`:``));return[o(c,t),Array(n+u+2).join(`-`)+`^`,o(t,l)].filter(Boolean).join(`
4
+ `).replace(/^(\s+\d+\s+\|\n)+/,``).replace(/\n(\s+\d+\s+\|)+$/,``)}function dl(e,t,n,r,i,a=1,o=1){return Object.assign(ol(`SyntaxError`,e),{source:t,offset:n,line:r,column:i,sourceFragment(e){return ul({source:t,line:r,column:i,baseLine:a,baseColumn:o},isNaN(e)?0:e)},get formattedMessage(){return`Parse error: ${e}\n`+ul({source:t,line:r,column:i,baseLine:a,baseColumn:o},2)}})}function fl(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let i=e.getNode.call(this,r);if(i===void 0)break;n&&=(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var pl=()=>{},ml=33,hl=35,gl=59,_l=123,vl=0,yl={createList(){return[]},createSingleNodeList(e){return[e]},getFirstListNode(e){return e&&e[0]||null},getLastListNode(e){return e&&e.length>0?e[e.length-1]:null}},bl={createList(){return new al},createSingleNodeList(e){return new al().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last}};function xl(e){return function(){return this[e]()}}function Sl(e){let t=Object.create(null);for(let n of Object.keys(e)){let r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function Cl(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:Sl(e.atrule),pseudo:Sl(e.pseudo),node:Sl(e.node)};for(let[n,r]of Object.entries(e.parseContext))switch(typeof r){case`function`:t.context[n]=r;break;case`string`:t.context[n]=xl(r)}return{config:t,...t,...t.node}}function wl(e){let t=``,n=`<unknown>`,r=!1,i=pl,a=!1,o=new Yc,s=Object.assign(new nl,Cl(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:fl,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(e){return+(e===_l)},consumeUntilLeftCurlyBracketOrSemicolon(e){return+(e===_l||e===gl)},consumeUntilExclamationMarkOrSemicolon(e){return+(e===ml||e===gl)},consumeUntilSemicolonIncluded(e){return e===gl?2:0},createList:pl,createSingleNodeList:pl,getFirstListNode:pl,getLastListNode:pl,parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(a)throw e;this.skip(n-this.tokenIndex);let r=t.call(this);return a=!0,i(e,r),a=!1,r}},lookupNonWSType(e){let t;do if(t=this.lookupType(e++),t!==13&&t!==25)return t;while(t!==vl);return vl},charCodeAt(e){return e>=0&&e<t.length?t.charCodeAt(e):0},substring(e,n){return t.substring(e,n)},substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar(e,n){return Mc(t,e,n)},cmpStr(e,n,r){return Nc(t,e,n,r)},consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let n=t.substring(this.tokenStart,zc(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=Hc[e].slice(0,-6).replace(/-/g,` `).replace(/^./,e=>e.toUpperCase()),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:this.tokenType===2||this.tokenType===7?(r=this.tokenEnd-1,n=`Identifier is expected but function found`):n=`Identifier is expected`;break;case 4:this.isDelim(hl)&&(this.next(),r++,n=`Name is expected`);break;case 11:this.tokenType===10&&(r=this.tokenEnd,n=`Percent sign is expected`)}this.error(n,r)}this.next()},eatIdent(e){(this.tokenType!==1||this.lookupValue(0,e)===!1)&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation(e,t){return r?o.getLocationRange(e,t,n):null},getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return o.getLocationRange(t===null?this.tokenStart:t.loc.start.offset-o.startOffset,r===null?this.tokenStart:r.loc.end.offset-o.startOffset,n)}return null},error(e,n){let r=n!==void 0&&n<t.length?o.getLocation(n):this.eof?o.getLocation(Pc(t,t.length-1)):o.getLocation(this.tokenStart);throw new dl(e||`Unexpected input`,t,r.offset,r.line,r.column,o.startLine,o.startColumn)}}),c=()=>({filename:n,source:t,tokenCount:s.tokenCount,getTokenType:e=>s.getTokenType(e),getTokenTypeName:e=>Hc[s.getTokenType(e)],getTokenStart:e=>s.getTokenStart(e),getTokenEnd:e=>s.getTokenEnd(e),getTokenValue:e=>s.source.substring(s.getTokenStart(e),s.getTokenEnd(e)),substring:(e,t)=>s.source.substring(e,t),balance:s.balance.subarray(0,s.tokenCount+1),isBlockOpenerTokenType:s.isBlockOpenerTokenType,isBlockCloserTokenType:s.isBlockCloserTokenType,getBlockTokenPairIndex:e=>s.getBlockTokenPairIndex(e),getLocation:e=>o.getLocation(e,n),getRangeLocation:(e,t)=>o.getLocationRange(e,t,n)});return Object.assign(function(e,l){t=e,l||={},s.setSource(t,rl),o.setSource(t,l.offset,l.line,l.column),n=l.filename||`<unknown>`,r=!!l.positions,i=typeof l.onParseError==`function`?l.onParseError:pl,a=!1,s.parseAtrulePrelude=`parseAtrulePrelude`in l?!!l.parseAtrulePrelude:!0,s.parseRulePrelude=`parseRulePrelude`in l?!!l.parseRulePrelude:!0,s.parseValue=`parseValue`in l?!!l.parseValue:!0,s.parseCustomProperty=`parseCustomProperty`in l&&!!l.parseCustomProperty;let{context:u=`default`,list:d=!0,onComment:f,onToken:p}=l;if(!(u in s.context))throw Error("Unknown context `"+u+"`");Object.assign(s,d?bl:yl),Array.isArray(p)?s.forEachToken((e,t,n)=>{p.push({type:e,start:t,end:n})}):typeof p==`function`&&s.forEachToken(p.bind(c())),typeof f==`function`&&s.forEachToken((e,n,r)=>{if(e===25){let e=s.getLocation(n,r),i=Nc(t,r-2,r,`*/`)?t.slice(n+2,r-2):t.slice(n+2,r);f(i,e)}});let m=s.context[u].call(s,l);return s.eof||s.error(),m},{SyntaxError:dl,config:s.config})}var Tl=be((e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}})),El=be((e=>{var t=Tl(),n=5,r=1<<n,i=r-1,a=r;function o(e){return e<0?(-e<<1)+1:(e<<1)+0}function s(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var r=``,s,c=o(e);do s=c&i,c>>>=n,c>0&&(s|=a),r+=t.encode(s);while(c>0);return r},e.decode=function(e,r,o){var c=e.length,l=0,u=0,d,f;do{if(r>=c)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=t.decode(e.charCodeAt(r++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(r-1));d=!!(f&a),f&=i,l+=f<<u,u+=n}while(d);o.value=s(l),o.rest=r}})),Dl=be((e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;var o=32;function s(e){var t=[];return function(n){for(var r=0;r<t.length;r++)if(t[r].input===n){var i=t[0];return t[0]=t[r],t[r]=i,t[0].result}var a=e(n);return t.unshift({input:n,result:a}),t.length>o&&t.pop(),a}}var c=s(function(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=[],c=0,l=0;;){if(c=l,l=n.indexOf(`/`,c),l===-1){s.push(n.slice(c));break}for(s.push(n.slice(c,l));l<n.length&&n[l]===`/`;)l++}for(var u,d=0,l=s.length-1;l>=0;l--)u=s[l],u===`.`?s.splice(l,1):u===`..`?d++:d>0&&(u===``?(s.splice(l+1,d),d=0):(s.splice(l,2),d--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n});e.normalize=c;function l(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),o=i(e);if(o&&(e=o.path||`/`),n&&!n.scheme)return o&&(n.scheme=o.scheme),a(n);if(n||t.match(r))return t;if(o&&!o.host&&!o.path)return o.host=t,a(o);var s=t.charAt(0)===`/`?t:c(e.replace(/\/+$/,``)+`/`+t);return o?(o.path=s,a(o)):s}e.join=l,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function u(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=u;var d=function(){return!(`__proto__`in Object.create(null))}();function f(e){return e}function p(e){return h(e)?`$`+e:e}e.toSetString=d?f:p;function m(e){return h(e)?e.slice(1):e}e.fromSetString=d?f:m;function h(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function g(e,t,n){var r=y(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:y(e.name,t.name)}e.compareByOriginalPositions=g;function _(e,t,n){var r=e.originalLine-t.originalLine;return r!==0||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:y(e.name,t.name)}e.compareByOriginalPositionsNoSource=_;function v(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=y(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:y(e.name,t.name)}e.compareByGeneratedPositionsDeflated=v;function ee(e,t,n){var r=e.generatedColumn-t.generatedColumn;return r!==0||n||(r=y(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:y(e.name,t.name)}e.compareByGeneratedPositionsDeflatedNoLine=ee;function y(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function te(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=y(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:y(e.name,t.name)}e.compareByGeneratedPositionsInflated=te;function ne(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=ne;function re(e,t,n){if(t||=``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var o=r.path.lastIndexOf(`/`);o>=0&&(r.path=r.path.substring(0,o+1))}t=l(a(r),t)}return c(t)}e.computeSourceURL=re})),Ol=be((e=>{var t=Dl(),n=Object.prototype.hasOwnProperty,r=typeof Map<`u`;function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(e,t){for(var n=new i,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,i){var a=r?e:t.toSetString(e),o=r?this.has(e):n.call(this._set,a),s=this._array.length;(!o||i)&&this._array.push(e),o||(r?this._set.set(e,s):this._set[a]=s)},i.prototype.has=function(e){if(r)return this._set.has(e);var i=t.toSetString(e);return n.call(this._set,i)},i.prototype.indexOf=function(e){if(r){var i=this._set.get(e);if(i>=0)return i}else{var a=t.toSetString(e);if(n.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),kl=be((e=>{var t=Dl();function n(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return i>r||i==r&&o>=a||t.compareByGeneratedPositionsInflated(e,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||=(this._array.sort(t.compareByGeneratedPositionsInflated),!0),this._array},e.MappingList=r})),Al=be((e=>{var t=El(),n=Dl(),r=Ol().ArraySet,i=kl().MappingList;function a(e){e||={},this._file=n.getArg(e,`file`,null),this._sourceRoot=n.getArg(e,`sourceRoot`,null),this._skipValidation=n.getArg(e,`skipValidation`,!1),this._ignoreInvalidMapping=n.getArg(e,`ignoreInvalidMapping`,!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e,t){var r=e.sourceRoot,i=new a(Object.assign(t||{},{file:e.file,sourceRoot:r}));return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(t.source=e.source,r!=null&&(t.source=n.relative(r,t.source)),t.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(t.name=e.name)),i.addMapping(t)}),e.sources.forEach(function(t){var a=t;r!==null&&(a=n.relative(r,t)),i._sources.has(a)||i._sources.add(a);var o=e.sourceContentFor(t);o!=null&&i.setSourceContent(t,o)}),i},a.prototype.addMapping=function(e){var t=n.getArg(e,`generated`),r=n.getArg(e,`original`,null),i=n.getArg(e,`source`,null),a=n.getArg(e,`name`,null);(this._skipValidation||this._validateMapping(t,r,i,a)!==!1)&&(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:a}))},a.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=n.relative(this._sourceRoot,r)),t==null?this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||=Object.create(null),this._sourcesContents[n.toSetString(r)]=t)},a.prototype.applySourceMap=function(e,t,i){var a=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=e.file}var o=this._sourceRoot;o!=null&&(a=n.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach(function(t){if(t.source===a&&t.originalLine!=null){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});r.source!=null&&(t.source=r.source,i!=null&&(t.source=n.join(i,t.source)),o!=null&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,r.name!=null&&(t.name=r.name))}var l=t.source;l!=null&&!s.has(l)&&s.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=s,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(i!=null&&(t=n.join(i,t)),o!=null&&(t=n.relative(o,t)),this.setSourceContent(t,r))},this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`){var i=`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`;if(this._ignoreInvalidMapping)return typeof console<`u`&&console.warn&&console.warn(i),!1;throw Error(i)}if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)){var i=`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r});if(this._ignoreInvalidMapping)return typeof console<`u`&&console.warn&&console.warn(i),!1;throw Error(i)}},a.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,a=0,o=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==r){e=0;var g=u.generatedLine-r;l+=g===1?`;`:`;`.repeat(g),r=u.generatedLine}else if(m>0){if(!n.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=t.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=t.encode(f-s),s=f,l+=t.encode(u.originalLine-1-a),a=u.originalLine-1,l+=t.encode(u.originalColumn-i),i=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=t.encode(d-o),o=d)),c+=l}return c},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a}))(),jl=new Set([`Atrule`,`Selector`,`Declaration`]);function Ml(e){let t=new Al.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},a={generated:i},o=1,s=0,c=!1,l=e.node;e.node=function(e){if(e.loc&&e.loc.start&&jl.has(e.type)){let l=e.loc.start.line,u=e.loc.start.column-1;(r.line!==l||r.column!==u)&&(r.line=l,r.column=u,n.line=o,n.column=s,c&&(c=!1,(n.line!==i.line||n.column!==i.column)&&t.addMapping(a)),c=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}l.call(this,e),c&&jl.has(e.type)&&(i.line=o,i.column=s)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)e.charCodeAt(t)===10?(o++,s=0):s++;u(e,t,n)};let d=e.result;return e.result=function(){return c&&t.addMapping(a),{css:d(),map:t}},e}var Nl=S({safe:()=>Vl,spec:()=>Bl}),Pl=43,Fl=45,Il=(e,t)=>(e===9&&(e=t),typeof e==`string`&&(e=Math.min(e.charCodeAt(0),128)<<6),e<<1),Ll=[[1,1],[1,2],[1,7],[1,8],[1,`-`],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,`-`],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,`-`],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,`-`],[12,10],[12,11],[12,12],[12,15],[`#`,1],[`#`,2],[`#`,7],[`#`,8],[`#`,`-`],[`#`,10],[`#`,11],[`#`,12],[`#`,15],[`-`,1],[`-`,2],[`-`,7],[`-`,8],[`-`,`-`],[`-`,10],[`-`,11],[`-`,12],[`-`,15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,`%`],[10,15],[`@`,1],[`@`,2],[`@`,7],[`@`,8],[`@`,`-`],[`@`,15],[`.`,10],[`.`,11],[`.`,12],[`+`,10],[`+`,11],[`+`,12],[`/`,`*`]],Rl=Ll.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,`-`],[22,1],[22,2],[22,11],[22,12],[22,4],[22,`-`]]);function zl(e){let t=new Set(e.map(([e,t])=>Il(e)<<16|Il(t)));return function(e,n,r){let i=Il(n,r),a=r.charCodeAt(0);return i|(a===Fl&&n!==1&&n!==2&&n!==15||a===Pl?t.has((e&65534)<<16|a<<7):t.has((e&65534)<<16|i))}}var Bl=zl(Ll),Vl=zl(Rl),Hl=92;function Ul(e,t){if(typeof t==`function`){let n=null;e.children.forEach(e=>{n!==null&&t.call(this,n),this.node(e),n=e})}else e.children.forEach(this.node,this)}function Wl(e){let t=new Map;for(let[n,r]of Object.entries(e.node))typeof(r.generate||r)==`function`&&t.set(n,r.generate||r);return function(e,n){let r=``,i=0,a={node(e){if(t.has(e.type))t.get(e.type).call(o,e);else throw Error(`Unknown node type: `+e.type)},tokenBefore:Vl,token(e,t,n){i=this.tokenBefore(i,e,t),!n&&i&1&&this.emit(` `,13,!0),this.emit(t,e,!1),e===9&&t.charCodeAt(0)===Hl&&this.emit(`
5
+ `,13,!0)},emit(e){r+=e},result(){return r}};n&&(typeof n.decorator==`function`&&(a=n.decorator(a)),n.sourceMap&&(a=Ml(a)),n.mode in Nl&&(a.tokenBefore=Nl[n.mode]));let o={node:e=>a.node(e),children:Ul,token:(e,t)=>a.token(e,t),tokenize:e=>rl(e,(t,n,r)=>{a.token(t,e.slice(n,r),n!==0)})};return a.node(e),a.result()}}function Gl(e){return{fromPlainObject(t){return e(t,{enter(e){e.children&&!(e.children instanceof al)&&(e.children=new al().fromArray(e.children))}}),t},toPlainObject(t){return e(t,{leave(e){e.children&&e.children instanceof al&&(e.children=e.children.toArray())}}),t}}}var{hasOwnProperty:Kl}=Object.prototype,ql=function(){};function Jl(e){return typeof e==`function`?e:ql}function Yl(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i)}}function Xl(e,t){let n=t.structure,r=[];for(let e in n){if(Kl.call(n,e)===!1)continue;let t=n[e],i={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)e===null?i.nullable=!0:typeof e==`string`?i.type=`node`:Array.isArray(e)&&(i.type=`list`);i.type&&r.push(i)}return r.length?{context:t.walkContext,fields:r}:null}function Zl(e){let t={};for(let n in e.node)if(Kl.call(e.node,n)){let r=e.node[n];if(!r.structure)throw Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Xl(n,r)}return t}function Ql(e,t){let n=e.fields.slice(),r=e.context,i=typeof r==`string`;return t&&n.reverse(),function(e,a,o,s){let c;i&&(c=a[r],a[r]=e);for(let r of n){let n=e[r.name];if(!r.nullable||n){if(r.type===`list`){if(t?n.reduceRight(s,!1):n.reduce(s,!1))return!0}else if(o(n))return!0}}i&&(a[r]=c)}}function $l({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}}}function eu(e){let t=Zl(e),n={},r={},i=Symbol(`break-walk`),a=Symbol(`skip-node`);for(let e in t)Kl.call(t,e)&&t[e]!==null&&(n[e]=Ql(t[e],!1),r[e]=Ql(t[e],!0));let o=$l(n),s=$l(r),c=function(e,c){function l(e,t,n){let r=u.call(m,e,t,n);return r===i||r!==a&&!!(f.hasOwnProperty(e.type)&&f[e.type](e,m,l,p)||d.call(m,e,t,n)===i)}let u=ql,d=ql,f=n,p=(e,t,n,r)=>e||l(t,n,r),m={break:i,skip:a,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof c==`function`)u=c;else if(c&&(u=Jl(c.enter),d=Jl(c.leave),c.reverse&&(f=r),c.visit)){if(o.hasOwnProperty(c.visit))f=c.reverse?s[c.visit]:o[c.visit];else if(!t.hasOwnProperty(c.visit))throw Error("Bad value `"+c.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(`, `)+`)`);u=Yl(u,c.visit),d=Yl(d,c.visit)}if(u===ql&&d===ql)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");l(e)};return c.break=i,c.skip=a,c.find=function(e,t){let n=null;return c(e,function(e,r,a){if(t.call(this,e,r,a))return n=e,i}),n},c.findLast=function(e,t){let n=null;return c(e,{reverse:!0,enter(e,r,a){if(t.call(this,e,r,a))return n=e,i}}),n},c.findAll=function(e,t){let n=[];return c(e,function(e,r,i){t.call(this,e,r,i)&&n.push(e)}),n},c}function tu(e){return e}function nu(e){let{min:t,max:n,comma:r}=e;return t===0&&n===0?r?`#?`:`*`:t===0&&n===1?`?`:t===1&&n===0?r?`#`:`+`:t===1&&n===1?``:(r?`#`:``)+(t===n?`{`+t+`}`:`{`+t+`,`+(n===0?``:n)+`}`)}function ru(e){switch(e.type){case`Range`:return` [`+(e.min===null?`-∞`:e.min)+`,`+(e.max===null?`∞`:e.max)+`]`;default:throw Error("Unknown node type `"+e.type+"`")}}function iu(e,t,n,r){let i=e.combinator===` `||r?e.combinator:` `+e.combinator+` `,a=e.terms.map(e=>au(e,t,n,r)).join(i);return e.explicit||n?(r||a[0]===`,`?`[`:`[ `)+a+(r?`]`:` ]`):a}function au(e,t,n,r){let i;switch(e.type){case`Group`:i=iu(e,t,n,r)+(e.disallowEmpty?`!`:``);break;case`Multiplier`:return au(e.term,t,n,r)+t(nu(e),e);case`Boolean`:i=`<boolean-expr[`+au(e.term,t,n,r)+`]>`;break;case`Type`:i=`<`+e.name+(e.opts?t(ru(e.opts),e.opts):``)+`>`;break;case`Property`:i=`<'`+e.name+`'>`;break;case`Keyword`:i=e.name;break;case`AtKeyword`:i=`@`+e.name;break;case`Function`:i=e.name+`(`;break;case`String`:case`Token`:i=e.value;break;case`Comma`:i=`,`;break;default:throw Error("Unknown node type `"+e.type+"`")}return t(i,e)}function ou(e,t){let n=tu,r=!1,i=!1;return typeof t==`function`?n=t:t&&(r=!!t.forceBraces,i=!!t.compact,typeof t.decorate==`function`&&(n=t.decorate)),au(e,n,r,i)}var su={offset:0,line:1,column:1};function cu(e,t){let n=e.tokens,r=e.longestMatch,i=r<n.length&&n[r].node||null,a=i===t?null:i,o=0,s=0,c=0,l=``,u,d;for(let e=0;e<n.length;e++){let t=n[e].value;e===r&&(s=t.length,o=l.length),a!==null&&n[e].node===a&&(e<=r?c++:c=0),l+=t}return r===n.length||c>1?(u=lu(a||t,`end`)||uu(su,l),d=uu(u)):(u=lu(a,`start`)||uu(lu(t,`start`)||su,l.slice(0,o)),d=lu(a,`end`)||uu(u,l.substr(o,s))),{css:l,mismatchOffset:o,mismatchLength:s,start:u,end:d}}function lu(e,t){let n=e&&e.loc&&e.loc[t];return n?`line`in n?uu(n):n:null}function uu({offset:e,line:t,column:n},r){let i={offset:e,line:t,column:n};if(r){let e=r.split(/\n|\r\n?|\f/);i.offset+=r.length,i.line+=e.length-1,i.column=e.length===1?i.column+r.length:e.pop().length+1}return i}var du=function(e,t){let n=ol(`SyntaxReferenceError`,e+(t?" `"+t+"`":``));return n.reference=t,n},fu=function(e,t,n,r){let i=ol(`SyntaxMatchError`,e),{css:a,mismatchOffset:o,mismatchLength:s,start:c,end:l}=cu(r,n);return i.rawMessage=e,i.syntax=t?ou(t):`<generic>`,i.css=a,i.mismatchOffset=o,i.mismatchLength=s,i.message=e+`
6
+ syntax: `+i.syntax+`
7
+ value: `+(a||`<empty string>`)+`
8
+ --------`+Array(i.mismatchOffset+1).join(`-`)+`^`,Object.assign(i,c),i.loc={source:n&&n.loc&&n.loc.source||`<unknown>`,start:c,end:l},i},pu=new Map,mu=new Map,hu=45,gu=bu,_u=xu;function vu(e,t){return t||=0,e.length-t>=2&&e.charCodeAt(t)===hu&&e.charCodeAt(t+1)===hu}function yu(e,t){if(t||=0,e.length-t>=3&&e.charCodeAt(t)===hu&&e.charCodeAt(t+1)!==hu){let n=e.indexOf(`-`,t+2);if(n!==-1)return e.substring(t,n+1)}return``}function bu(e){if(pu.has(e))return pu.get(e);let t=e.toLowerCase(),n=pu.get(t);if(n===void 0){let e=vu(t,0),r=e?``:yu(t,0);n=Object.freeze({basename:t.substr(r.length),name:t,prefix:r,vendor:r,custom:e})}return pu.set(e,n),n}function xu(e){if(mu.has(e))return mu.get(e);let t=e,n=e[0];n===`/`?n=e[1]===`/`?`//`:`/`:n!==`_`&&n!==`*`&&n!==`$`&&n!==`#`&&n!==`+`&&n!==`&`&&(n=``);let r=vu(t,n.length);if(!r&&(t=t.toLowerCase(),mu.has(t))){let n=mu.get(t);return mu.set(e,n),n}let i=r?``:yu(t,n.length),a=t.substr(0,n.length+i.length),o=Object.freeze({basename:t.substr(a.length),name:t.substr(n.length),hack:n,vendor:i,prefix:a,custom:r});return mu.set(e,o),o}var Su=[`initial`,`inherit`,`unset`,`revert`,`revert-layer`],Cu=43,wu=45,Tu=110,Eu=!0,Du=!1;function Ou(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function ku(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function Au(e,t,n,r){if(!e)return 0;let i=e.value.charCodeAt(t);if(i===Cu||i===wu){if(n)return 0;t++}for(;t<e.value.length;t++)if(!U(e.value.charCodeAt(t)))return 0;return r+1}function ju(e,t,n){let r=!1,i=ku(e,t,n);if(e=n(i),e===null)return t;if(e.type!==10){if(Ou(e,Cu)||Ou(e,wu)){if(r=!0,i=ku(n(++i),i,n),e=n(i),e===null||e.type!==10)return 0}else return t}if(!r){let t=e.value.charCodeAt(0);if(t!==Cu&&t!==wu)return 0}return Au(e,+!r,r,i)}function Mu(e,t){let n=0;if(!e)return 0;if(e.type===10)return Au(e,0,Du,n);if(e.type===1&&e.value.charCodeAt(0)===wu){if(!Mc(e.value,1,Tu))return 0;switch(e.value.length){case 2:return ju(t(++n),n,t);case 3:return e.value.charCodeAt(2)===wu?(n=ku(t(++n),n,t),e=t(n),Au(e,0,Eu,n)):0;default:return e.value.charCodeAt(2)===wu?Au(e,3,Eu,n):0}}else if(e.type===1||Ou(e,Cu)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!Mc(e.value,0,Tu))return 0;switch(e.value.length){case 1:return ju(t(++n),n,t);case 2:return e.value.charCodeAt(1)===wu?(n=ku(t(++n),n,t),e=t(n),Au(e,0,Eu,n)):0;default:return e.value.charCodeAt(1)===wu?Au(e,2,Eu,n):0}}else if(e.type===12){let r=e.value.charCodeAt(0),i=+(r===Cu||r===wu),a=i;for(;a<e.value.length&&U(e.value.charCodeAt(a));a++);return a===i||!Mc(e.value,a,Tu)?0:a+1===e.value.length?ju(t(++n),n,t):e.value.charCodeAt(a+1)===wu?a+2===e.value.length?(n=ku(t(++n),n,t),e=t(n),Au(e,0,Eu,n)):Au(e,a+2,Eu,n):0}return 0}var Nu=43,Pu=45,Fu=63,Iu=117;function Lu(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Ru(e,t){return e.value.charCodeAt(0)===t}function zu(e,t,n){let r=0;for(let i=t;i<e.value.length;i++){let a=e.value.charCodeAt(i);if(a===Pu&&n&&r!==0)return zu(e,t+r+1,!1),6;if(!hc(a)||++r>6)return 0}return r}function Bu(e,t,n){if(!e)return 0;for(;Lu(n(t),Fu);){if(++e>6)return 0;t++}return t}function Vu(e,t){let n=0;if(e===null||e.type!==1||!Mc(e.value,0,Iu)||(e=t(++n),e===null))return 0;if(Lu(e,Nu))return e=t(++n),e===null?0:e.type===1?Bu(zu(e,0,!0),++n,t):Lu(e,Fu)?Bu(1,++n,t):0;if(e.type===10){let r=zu(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!Ru(e,Pu)||!zu(e,1,!1)?0:n+1:Bu(r,n,t))}return e.type===12?Bu(zu(e,1,!0),++n,t):0}var Hu=[`calc(`,`-moz-calc(`,`-webkit-calc(`],Uu=[`min(`,`max(`,`clamp(`],Wu=[`round(`,`mod(`,`rem(`],Gu=[`sin(`,`cos(`,`tan(`],Ku=[`asin(`,`acos(`,`atan(`,`atan2(`],qu=[`pow(`,`sqrt(`,`log(`,`exp(`,`sign(`],Ju=[`hypot(`],Yu=[`abs(`],Xu=[...Hu,...Uu,...Wu,...Gu,...qu,...Ju,...Yu],Zu=[...Hu,...Uu,...Wu,...Ju,...Yu],Qu=[...Hu,...Uu,...Wu,...Ku,...Ju,...Yu],$u=new Map([[2,22],[21,22],[19,20],[23,24]]);function ed(e,t){return t<e.length?e.charCodeAt(t):0}function td(e,t){return Nc(e,0,e.length,t)}function nd(e,t){for(let n=0;n<t.length;n++)if(td(e,t[n]))return!0;return!1}function rd(e,t){return t===e.length-2&&ed(e,t)===92&&U(ed(e,t+1))}function id(e,t,n){if(e&&e.type===`Range`){let r=Number(n!==void 0&&n!==t.length?t.substr(0,n):t);if(isNaN(r)||e.min!==null&&r<e.min&&typeof e.min!=`string`||e.max!==null&&r>e.max&&typeof e.max!=`string`)return!0}return!1}function ad(e,t){let n=0,r=[],i=0;scan:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break scan;if(n=r.pop(),r.length===0){i++;break scan}break;case 2:case 21:case 19:case 23:r.push(n),n=$u.get(e.type)}i++}while(e=t(i));return i}function K(e,t){return function(n,r,i){return n===null?0:n.type===2&&nd(n.value,t)?ad(n,r):e(n,r,i)}}function q(e){return function(t){return t===null||t.type!==e?0:1}}function od(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return nd(t,Su)||td(t,`default`)?0:1}function sd(e){return e===null||e.type!==1||ed(e.value,0)!==45||ed(e.value,1)!==45?0:1}function cd(e){return!sd(e)||e.value===`--`?0:1}function ld(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let n=1;n<t;n++)if(!hc(ed(e.value,n)))return 0;return 1}function ud(e){return e===null||e.type!==4||!Tc(ed(e.value,1),ed(e.value,2),ed(e.value,3))?0:1}function dd(e,t){if(!e)return 0;let n=0,r=[],i=0;scan:do{switch(e.type){case 6:case 8:break scan;case 24:case 22:case 20:if(e.type!==n)break scan;n=r.pop();break;case 17:if(n===0)break scan;break;case 9:if(n===0&&e.value===`!`)break scan;break;case 2:case 21:case 19:case 23:r.push(n),n=$u.get(e.type)}i++}while(e=t(i));return i}function fd(e,t){if(!e)return 0;let n=0,r=[],i=0;scan:do{switch(e.type){case 6:case 8:break scan;case 24:case 22:case 20:if(e.type!==n)break scan;n=r.pop();break;case 2:case 21:case 19:case 23:r.push(n),n=$u.get(e.type)}i++}while(e=t(i));return i}function pd(e){return e&&=new Set(e),function(t,n,r){if(t===null||t.type!==12)return 0;let i=zc(t.value,0);if(e!==null){let n=t.value.indexOf(`\\`,i),r=n===-1||!rd(t.value,n)?t.value.substr(i):t.value.substring(i,n);if(e.has(r.toLowerCase())===!1)return 0}return+!id(r,t.value,i)}}function md(e,t,n){return e===null||e.type!==11||id(n,e.value,e.value.length-1)?0:1}function hd(e){return typeof e!=`function`&&(e=function(){return 0}),function(t,n,r){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,n,r)}}function gd(e,t,n){if(e===null)return 0;let r=zc(e.value,0);return r!==e.value.length&&!rd(e.value,r)||id(n,e.value,r)?0:1}function _d(e,t,n){if(e===null||e.type!==10)return 0;let r=+(ed(e.value,0)===43||ed(e.value,0)===45);for(;r<e.value.length;r++)if(!U(ed(e.value,r)))return 0;return+!id(n,e.value,r)}var vd={"ident-token":q(1),"function-token":q(2),"at-keyword-token":q(3),"hash-token":q(4),"string-token":q(5),"bad-string-token":q(6),"url-token":q(7),"bad-url-token":q(8),"delim-token":q(9),"number-token":q(10),"percentage-token":q(11),"dimension-token":q(12),"whitespace-token":q(13),"CDO-token":q(14),"CDC-token":q(15),"colon-token":q(16),"semicolon-token":q(17),"comma-token":q(18),"[-token":q(19),"]-token":q(20),"(-token":q(21),")-token":q(22),"{-token":q(23),"}-token":q(24)},yd={string:q(5),ident:q(1),percentage:K(md,Zu),zero:hd(),number:K(gd,Xu),integer:K(_d,Xu),"custom-ident":od,"dashed-ident":sd,"custom-property-name":cd,"hex-color":ld,"id-selector":ud,"an-plus-b":Mu,urange:Vu,"declaration-value":dd,"any-value":fd},bd=[`length`,`angle`,`time`,`frequency`,`resolution`,`flex`,`decibel`,`semitones`];function xd(e){let{angle:t,decibel:n,frequency:r,flex:i,length:a,resolution:o,semitones:s,time:c}=e||{};return{dimension:K(pd(null),Qu),angle:K(pd(t),Qu),decibel:K(pd(n),Qu),frequency:K(pd(r),Qu),flex:K(pd(i),Qu),length:K(hd(pd(a)),Qu),resolution:K(pd(o),Qu),semitones:K(pd(s),Qu),time:K(pd(c),Qu)}}function Sd(e){let t=new Set;for(let n of bd)if(Array.isArray(e[n]))for(let r of e[n])t.add(r.toLowerCase());return function(e){return e===null?0:e.type===9&&e.value===`%`||e.type===1&&t.has(e.value.toLowerCase())?1:0}}function Cd(e){return{...vd,...yd,...xd(e),"attr-unit":Sd(e)}}var wd=S({angle:()=>Ed,decibel:()=>jd,flex:()=>Ad,frequency:()=>Od,length:()=>Td,resolution:()=>kd,semitones:()=>Md,time:()=>Dd}),Td=`cm.mm.q.in.pt.pc.px.em.rem.ex.rex.cap.rcap.ch.rch.ic.ric.lh.rlh.vw.svw.lvw.dvw.vh.svh.lvh.dvh.vi.svi.lvi.dvi.vb.svb.lvb.dvb.vmin.svmin.lvmin.dvmin.vmax.svmax.lvmax.dvmax.cqw.cqh.cqi.cqb.cqmin.cqmax`.split(`.`),Ed=[`deg`,`grad`,`rad`,`turn`],Dd=[`s`,`ms`],Od=[`hz`,`khz`],kd=[`dpi`,`dpcm`,`dppx`,`x`],Ad=[`fr`],jd=[`db`],Md=[`st`];function Nd(e,t,n){return Object.assign(ol(`SyntaxError`,e),{input:t,offset:n,rawMessage:e,message:e+`
9
+ `+t+`
10
+ --`+Array((n||t.length)+1).join(`-`)+`^`})}var Pd=9,Fd=10,Id=12,Ld=13,Rd=32,zd=new Uint8Array(128).map((e,t)=>+!!/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))),Bd=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}isNameCharCode(e=this.charCode()){return e<128&&zd[e]===1}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}skipWs(){this.pos=this.findWsEnd(this.pos)}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t!==Ld&&t!==Fd&&t!==Id&&t!==Rd&&t!==Pd)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):``}error(e){throw new Nd(e,this.str,this.pos)}scanSpaces(){return this.substringToPos(this.findWsEnd(this.pos))}scanWord(){let e=this.pos;for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t>=128||zd[t]===0)break}return this.pos===e&&this.error(`Expect a keyword`),this.substringToPos(e)}scanNumber(){let e=this.pos;for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t<48||t>57)break}return this.pos===e&&this.error(`Expect a number`),this.substringToPos(e)}scanString(){let e=this.str.indexOf(`'`,this.pos+1);return e===-1&&(this.pos=this.str.length,this.error(`Expect an apostrophe`)),this.substringToPos(e+1)}},Vd=9,Hd=10,Ud=12,Wd=13,Gd=32,Kd=33,qd=35,Jd=38,Yd=39,Xd=40,Zd=41,Qd=42,$d=43,ef=44,tf=45,nf=60,rf=62,af=63,of=64,sf=91,cf=93,lf=123,uf=124,df=125,ff=8734,pf={" ":1,"&&":2,"||":3,"|":4};function mf(e){let t=null,n=null;return e.eat(lf),e.skipWs(),t=e.scanNumber(e),e.skipWs(),e.charCode()===ef?(e.pos++,e.skipWs(),e.charCode()!==df&&(n=e.scanNumber(e),e.skipWs())):n=t,e.eat(df),{min:Number(t),max:n?Number(n):0}}function hf(e){let t=null,n=!1;switch(e.charCode()){case Qd:e.pos++,t={min:0,max:0};break;case $d:e.pos++,t={min:1,max:0};break;case af:e.pos++,t={min:0,max:1};break;case qd:e.pos++,n=!0,e.charCode()===lf?t=mf(e):e.charCode()===af?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case lf:t=mf(e);break;default:return null}return{type:`Multiplier`,comma:n,min:t.min,max:t.max,term:null}}function gf(e,t){let n=hf(e);return n===null?t:(n.term=t,e.charCode()===qd&&e.charCodeAt(e.pos-1)===$d||e.charCode()===af&&e.charCodeAt(e.pos-1)===df?gf(e,n):n)}function _f(e){let t=e.peek();return t===``?null:gf(e,{type:`Token`,value:t})}function vf(e){let t;return e.eat(nf),e.eat(Yd),t=e.scanWord(),e.eat(Yd),e.eat(rf),gf(e,{type:`Property`,name:t})}function yf(e){let t=null,n=null,r=1;return e.eat(sf),e.charCode()===tf&&(e.peek(),r=-1),r==-1&&e.charCode()===ff?e.peek():(t=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(t+=e.scanWord())),e.skipWs(),e.eat(ef),e.skipWs(),e.charCode()===ff?e.peek():(r=1,e.charCode()===tf&&(e.peek(),r=-1),n=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(n+=e.scanWord())),e.eat(cf),{type:`Range`,min:t,max:n}}function bf(e){let t,n=null;if(e.eat(nf),t=e.scanWord(),t===`boolean-expr`){e.eat(sf);let t=Cf(e,cf);return e.eat(cf),e.eat(rf),gf(e,{type:`Boolean`,term:t.terms.length===1?t.terms[0]:t})}return e.charCode()===Xd&&e.nextCharCode()===Zd&&(e.pos+=2,t+=`()`),e.charCodeAt(e.findWsEnd(e.pos))===sf&&(e.skipWs(),n=yf(e)),e.eat(rf),gf(e,{type:`Type`,name:t,opts:n})}function xf(e){let t=e.scanWord();return e.charCode()===Xd?(e.pos++,{type:`Function`,name:t}):gf(e,{type:`Keyword`,name:t})}function Sf(e,t){function n(e,t){return{type:`Group`,terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((e,t)=>pf[e]-pf[t]);t.length>0;){r=t.shift();let i=0,a=0;for(;i<e.length;i++){let t=e[i];t.type===`Combinator`&&(t.value===r?(a===-1&&(a=i-1),e.splice(i,1),i--):(a!==-1&&i-a>1&&(e.splice(a,i-a,n(e.slice(a,i),r)),i=a+1),a=-1))}a!==-1&&t.length&&e.splice(a,i-a,n(e.slice(a,i),r))}return r}function Cf(e,t=-1){let n=Object.create(null),r=[],i=null,a=e.pos,o=!1;for(;e.charCode()!==t;){let t=o?Cf(e,Zd):Tf(e);if(!t)break;if(t.type!==`Spaces`){if(o){if(t.terms.length===0){o=!1;continue}if(t.combinator===` `){for(;t.terms.length>1;)n[` `]=!0,r.push({type:`Combinator`,value:` `},t.terms.shift());t=t.terms[0]}}t.type===`Combinator`?((i===null||i.type===`Combinator`)&&(e.pos=a,e.error(`Unexpected combinator`)),n[t.value]=!0):i!==null&&i.type!==`Combinator`&&(n[` `]=!0,r.push({type:`Combinator`,value:` `})),r.push(t),i=t,a=e.pos,o=t.type===`Function`}}return i!==null&&i.type===`Combinator`&&(e.pos-=a,e.error(`Unexpected combinator`)),{type:`Group`,terms:r,combinator:Sf(r,n)||` `,disallowEmpty:!1,explicit:!1}}function wf(e){let t;return e.eat(sf),t=Cf(e,cf),e.eat(cf),t.explicit=!0,e.charCode()===Kd&&(e.pos++,t.disallowEmpty=!0),t}function Tf(e){let t=e.charCode();switch(t){case cf:break;case sf:return gf(e,wf(e));case nf:return e.nextCharCode()===Yd?vf(e):bf(e);case uf:return{type:`Combinator`,value:e.substringToPos(e.pos+(e.nextCharCode()===uf?2:1))};case Jd:return e.pos++,e.eat(Jd),{type:`Combinator`,value:`&&`};case ef:return e.pos++,{type:`Comma`};case Yd:return gf(e,{type:`String`,value:e.scanString()});case Gd:case Vd:case Hd:case Wd:case Ud:return{type:`Spaces`,value:e.scanSpaces()};case of:return t=e.nextCharCode(),e.isNameCharCode(t)?(e.pos++,{type:`AtKeyword`,name:e.scanWord()}):_f(e);case Qd:case $d:case af:case qd:case Kd:break;case lf:if(t=e.nextCharCode(),t<48||t>57)return _f(e);break;default:return e.isNameCharCode(t)?xf(e):_f(e)}}function Ef(e){let t=new Bd(e),n=Cf(t);return t.pos!==e.length&&t.error(`Unexpected input`),n.terms.length===1&&n.terms[0].type===`Group`?n.terms[0]:n}var Df=function(){};function Of(e){return typeof e==`function`?e:Df}function kf(e,t,n){function r(e){switch(i.call(n,e),e.type){case`Group`:e.terms.forEach(r);break;case`Multiplier`:case`Boolean`:r(e.term);break;case`Type`:case`Property`:case`Keyword`:case`AtKeyword`:case`Function`:case`String`:case`Token`:case`Comma`:break;default:throw Error(`Unknown type: `+e.type)}a.call(n,e)}let i=Df,a=Df;if(typeof t==`function`?i=t:t&&(i=Of(t.enter),a=Of(t.leave)),i===Df&&a===Df)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}var Af={decorator(e){let t=[],n=null;return{...e,node(t){let r=n;n=t,e.node.call(this,t),n=r},emit(e,r,i){t.push({type:r,value:e,node:i?null:n})},result(){return t}}}};function jf(e){let t=[];return rl(e,(n,r,i)=>t.push({type:n,value:e.slice(r,i),node:null})),t}function Mf(e,t){return typeof e==`string`?jf(e):t.generate(e,Af)}var J={type:`Match`},Y={type:`Mismatch`},Nf={type:`DisallowEmpty`},Pf=40,Ff=41;function X(e,t,n){return t===J&&n===Y||e===J&&t===J&&n===J?e:(e.type===`If`&&e.else===Y&&t===J&&(t=e.then,e=e.match),{type:`If`,match:e,then:t,else:n})}function If(e){return e.length>2&&e.charCodeAt(e.length-2)===Pf&&e.charCodeAt(e.length-1)===Ff}function Lf(e){return e.type===`Keyword`||e.type===`AtKeyword`||e.type===`Function`||e.type===`Type`&&If(e.name)}function Rf(e,t=` `,n=!1){return{type:`Group`,terms:e,combinator:t,disallowEmpty:!1,explicit:n}}function zf(e,t,n=new Set){if(!n.has(e))switch(n.add(e),e.type){case`If`:e.match=zf(e.match,t,n),e.then=zf(e.then,t,n),e.else=zf(e.else,t,n);break;case`Type`:return t[e.name]||e}return e}function Bf(e,t,n){switch(e){case` `:{let e=J;for(let n=t.length-1;n>=0;n--){let r=t[n];e=X(r,e,Y)}return e}case`|`:{let e=Y,n=null;for(let r=t.length-1;r>=0;r--){let i=t[r];if(Lf(i)&&(n===null&&r>0&&Lf(t[r-1])&&(n=Object.create(null),e=X({type:`Enum`,map:n},J,e)),n!==null)){let e=(If(i.name)?i.name.slice(0,-1):i.name).toLowerCase();if(!(e in n)){n[e]=i;continue}}n=null,e=X(i,J,e)}return e}case`&&`:{if(t.length>5)return{type:`MatchOnce`,terms:t,all:!0};let n=Y;for(let r=t.length-1;r>=0;r--){let i=t[r],a;a=t.length>1?Bf(e,t.filter(function(e){return e!==i}),!1):J,n=X(i,a,n)}return n}case`||`:{if(t.length>5)return{type:`MatchOnce`,terms:t,all:!1};let r=n?J:Y;for(let n=t.length-1;n>=0;n--){let i=t[n],a;a=t.length>1?Bf(e,t.filter(function(e){return e!==i}),!0):J,r=X(i,a,r)}return r}}}function Vf(e){let t=J,n=Hf(e.term);if(e.max===0)n=X(n,Nf,Y),t=X(n,null,Y),t.then=X(J,J,t),e.comma&&(t.then.else=X({type:`Comma`,syntax:e},t,Y));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==J&&(t=X({type:`Comma`,syntax:e},t,Y)),t=X(n,X(J,J,t),Y);if(e.min===0)t=X(J,J,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==J&&(t=X({type:`Comma`,syntax:e},t,Y)),t=X(n,t,Y);return t}function Hf(e){if(typeof e==`function`)return{type:`Generic`,fn:e};switch(e.type){case`Group`:{let t=Bf(e.combinator,e.terms.map(Hf),!1);return e.disallowEmpty&&(t=X(t,Nf,Y)),t}case`Multiplier`:return Vf(e);case`Boolean`:{let t=Hf(e.term),n=Hf(Rf([Rf([{type:`Keyword`,name:`not`},{type:`Type`,name:`!boolean-group`}]),Rf([{type:`Type`,name:`!boolean-group`},Rf([{type:`Multiplier`,comma:!1,min:0,max:0,term:Rf([{type:`Keyword`,name:`and`},{type:`Type`,name:`!boolean-group`}])},{type:`Multiplier`,comma:!1,min:0,max:0,term:Rf([{type:`Keyword`,name:`or`},{type:`Type`,name:`!boolean-group`}])}],`|`)])],`|`)),r=Hf(Rf([{type:`Type`,name:`!term`},Rf([{type:`Token`,value:`(`},{type:`Type`,name:`!self`},{type:`Token`,value:`)`}]),{type:`Type`,name:`general-enclosed`}],`|`));return zf(r,{"!term":t,"!self":n}),zf(n,{"!boolean-group":r}),n}case`Type`:case`Property`:return{type:e.type,name:e.name,syntax:e};case`Keyword`:return{type:e.type,name:e.name.toLowerCase(),syntax:e};case`AtKeyword`:return{type:e.type,name:`@`+e.name.toLowerCase(),syntax:e};case`Function`:return{type:e.type,name:e.name.toLowerCase()+`(`,syntax:e};case`String`:return e.value.length===3?{type:`Token`,value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,`'`),syntax:e};case`Token`:return{type:e.type,value:e.value,syntax:e};case`Comma`:return{type:e.type,syntax:e};default:throw Error(`Unknown node type:`,e.type)}}function Uf(e,t){return typeof e==`string`&&(e=Ef(e)),{type:`MatchGraph`,match:Hf(e),syntax:t||null,source:e}}var{hasOwnProperty:Wf}=Object.prototype,Gf=0,Kf=1,qf=2,Jf=3,Yf=`Match`,Xf=`Mismatch`,Zf=`Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)`,Qf=15e3,$f=0;function ep(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function tp(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),i=e.charCodeAt(n);if(i>=65&&i<=90&&(i|=32),i!==r)return!1}return!0}function np(e){return e.type===9&&e.value!==`?`}function rp(e){return e===null||e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||np(e)}function ip(e){return e===null||e.type===22||e.type===20||e.type===24||e.type===9&&e.value===`/`}function ap(e,t,n){function r(){do v++,_=v<e.length?e[v]:null;while(_!==null&&(_.type===13||_.type===25))}function i(t){let n=v+t;return n<e.length?e[n]:null}function a(e,t){return{nextState:e,matchStack:y,syntaxStack:d,thenStack:f,tokenIndex:v,prev:t}}function o(e){f={nextState:e,matchStack:y,syntaxStack:d,prev:f}}function s(e){p=a(e,p)}function c(){y={type:Kf,syntax:t.syntax,token:_,prev:y},r(),m=null,v>ee&&(ee=v)}function l(){d={syntax:t.syntax,opts:t.syntax.opts||d!==null&&d.opts||null,prev:d},y={type:qf,syntax:t.syntax,token:y.token,prev:y}}function u(){y=y.type===qf?y.prev:{type:Jf,syntax:d.syntax,token:y.token,prev:y},d=d.prev}let d=null,f=null,p=null,m=null,h=0,g=null,_=null,v=-1,ee=0,y={type:Gf,syntax:null,token:null,prev:null};for(r();g===null&&++h<Qf;)switch(t.type){case`Match`:if(f===null){if(_!==null&&(v!==e.length-1||_.value!==`\\0`&&_.value!==`\\9`)){t=Y;break}g=Yf;break}if(t=f.nextState,t===Nf){if(f.matchStack===y){t=Y;break}t=J}for(;f.syntaxStack!==d;)u();f=f.prev;break;case`Mismatch`:if(m!==null&&m!==!1)(p===null||v>p.tokenIndex)&&(p=m,m=!1);else if(p===null){g=Xf;break}t=p.nextState,f=p.thenStack,d=p.syntaxStack,y=p.matchStack,v=p.tokenIndex,_=v<e.length?e[v]:null,p=p.prev;break;case`MatchGraph`:t=t.match;break;case`If`:t.else!==Y&&s(t.else),t.then!==J&&o(t.then),t=t.match;break;case`MatchOnce`:t={type:`MatchOnceBuffer`,syntax:t,index:0,mask:0};break;case`MatchOnceBuffer`:{let e=t.syntax.terms;if(t.index===e.length){if(t.mask===0||t.syntax.all){t=Y;break}t=J;break}if(t.mask===(1<<e.length)-1){t=J;break}for(;t.index<e.length;t.index++){let n=1<<t.index;if((t.mask&n)===0){s(t),o({type:`AddMatchOnce`,syntax:t.syntax,mask:t.mask|n}),t=e[t.index++];break}}break}case`AddMatchOnce`:t={type:`MatchOnceBuffer`,syntax:t.syntax,index:0,mask:t.mask};break;case`Enum`:if(_!==null){let e=_.value.toLowerCase();if(e.indexOf(`\\`)!==-1&&(e=e.replace(/\\[09].*$/,``)),Wf.call(t.map,e)){t=t.map[e];break}}t=Y;break;case`Generic`:{let e=d===null?null:d.opts,n=v+Math.floor(t.fn(_,i,e));if(!isNaN(n)&&n>v){for(;v<n;)c();t=J}else t=Y;break}case`Type`:case`Property`:{let e=t.type===`Type`?`types`:`properties`,r=Wf.call(n,e)?n[e][t.name]:null;if(!r||!r.match)throw Error(`Bad syntax reference: `+(t.type===`Type`?`<`+t.name+`>`:`<'`+t.name+`'>`));if(m!==!1&&_!==null&&t.type===`Type`&&(t.name===`custom-ident`&&_.type===1||t.name===`length`&&_.value===`0`)){m===null&&(m=a(t,p)),t=Y;break}l(),t=r.matchRef||r.match;break}case`Keyword`:{let e=t.name;if(_!==null){let n=_.value;if(n.indexOf(`\\`)!==-1&&(n=n.replace(/\\[09].*$/,``)),tp(n,e)){c(),t=J;break}}t=Y;break}case`AtKeyword`:case`Function`:if(_!==null&&tp(_.value,t.name)){c(),t=J;break}t=Y;break;case`Token`:if(_!==null&&_.value===t.value){c(),t=J;break}t=Y;break;case`Comma`:_!==null&&_.type===18?rp(y.token)?t=Y:(c(),t=ip(_)?Y:J):t=rp(y.token)||ip(_)?J:Y;break;case`String`:let r=``,h=v;for(;h<e.length&&r.length<t.value.length;h++)r+=e[h].value;if(tp(r,t.value)){for(;v<h;)c();t=J}else t=Y;break;default:throw Error(`Unknown node type: `+t.type)}switch($f+=h,g){case null:console.warn(`[csstree-match] BREAK after 15000 iterations`),g=Zf,y=null;break;case Yf:for(;d!==null;)u();break;default:y=null}return{tokens:e,reason:g,iterations:h,match:y,longestMatch:ee}}function op(e,t,n){let r=ap(e,t,n||{});if(r.match===null)return r;let i=r.match,a=r.match={syntax:t.syntax||null,match:[]},o=[a];for(i=ep(i).prev;i!==null;){switch(i.type){case qf:a.match.push(a={syntax:i.syntax,match:[]}),o.push(a);break;case Jf:o.pop(),a=o[o.length-1];break;default:a.match.push({syntax:i.syntax||null,token:i.token.value,node:i.token.node})}i=i.prev}return r}var sp=S({getTrace:()=>cp,isKeyword:()=>dp,isProperty:()=>up,isType:()=>lp});function cp(e){function t(e){return e===null?!1:e.type===`Type`||e.type===`Property`||e.type===`Keyword`}function n(i){if(Array.isArray(i.match)){for(let e=0;e<i.match.length;e++)if(n(i.match[e]))return t(i.syntax)&&r.unshift(i.syntax),!0}else if(i.node===e)return r=t(i.syntax)?[i.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function lp(e,t){return fp(this,e,e=>e.type===`Type`&&e.name===t)}function up(e,t){return fp(this,e,e=>e.type===`Property`&&e.name===t)}function dp(e){return fp(this,e,e=>e.type===`Keyword`)}function fp(e,t,n){let r=cp.call(e,t);return r!==null&&r.some(n)}function pp(e){return`node`in e?e.node:pp(e.match[0])}function mp(e){return`node`in e?e.node:mp(e.match[e.match.length-1])}function hp(e,t,n,r,i){function a(n){if(n.syntax!==null&&n.syntax.type===r&&n.syntax.name===i){let r=pp(n),i=mp(n);e.syntax.walk(t,function(e,t,n){if(e===r){let e=new al;do{if(e.appendData(t.data),t.data===i)break;t=t.next}while(t!==null);o.push({parent:n,nodes:e})}})}Array.isArray(n.match)&&n.match.forEach(a)}let o=[];return n.matched!==null&&a(n.matched),o}var{hasOwnProperty:gp}=Object.prototype;function _p(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e&&e>=0}function vp(e){return!!e&&_p(e.offset)&&_p(e.line)&&_p(e.column)}function yp(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,`Type of node should be an Object`);for(let i in n){let a=!0;if(gp.call(n,i)!==!1){if(i===`type`)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(i===`loc`){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object){if(typeof n.loc.source!=`string`)i+=`.source`;else if(!vp(n.loc.start))i+=`.start`;else if(!vp(n.loc.end))i+=`.end`;else continue}a=!1}else if(t.hasOwnProperty(i)){a=!1;for(let e=0;!a&&e<t[i].length;e++){let r=t[i][e];switch(r){case String:a=typeof n[i]==`string`;break;case Boolean:a=typeof n[i]==`boolean`;break;case null:a=n[i]===null;break;default:typeof r==`string`?a=n[i]&&n[i].type===r:Array.isArray(r)&&(a=n[i]instanceof al)}}}else r(n,"Unknown field `"+i+"` for "+e+` node type`);a||r(n,"Bad value for `"+e+`.`+i+"`")}}for(let i in t)gp.call(t,i)&&gp.call(n,i)===!1&&r(n,"Field `"+e+`.`+i+"` is missed")}}function bp(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i===String||i===Boolean)n.push(i.name.toLowerCase());else if(i===null)n.push(`null`);else if(typeof i==`string`)n.push(i);else if(Array.isArray(i))n.push(`List<`+(bp(i,t)||`any`)+`>`);else throw Error("Wrong value `"+i+"` in `"+t+"` structure definition")}return n.join(` | `)}function xp(e,t){let n=t.structure,r={type:String,loc:!0},i={type:`"`+e+`"`};for(let t in n)gp.call(n,t)!==!1&&(i[t]=bp(r[t]=Array.isArray(n[t])?n[t].slice():[n[t]],e+`.`+t));return{docs:i,check:yp(e,r)}}function Sp(e){let t={};if(e.node){for(let n in e.node)if(gp.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=xp(n,r);else throw Error("Missed `structure` field in `"+n+"` node type definition")}}return t}function Cp(e,t,n){let r={};for(let i in e)e[i].syntax&&(r[i]=n?e[i].syntax:ou(e[i].syntax,{compact:t}));return r}function wp(e,t,n){let r={};for(let[i,a]of Object.entries(e))r[i]={prelude:a.prelude&&(n?a.prelude.syntax:ou(a.prelude.syntax,{compact:t})),descriptors:a.descriptors&&Cp(a.descriptors,t,n)};return r}function Tp(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()===`var(`)return!0;return!1}function Ep(e){let t=e.terms[0];return e.explicit===!1&&e.terms.length===1&&t.type===`Multiplier`&&t.comma===!0}function Dp(e,t,n){return{matched:e,iterations:n,error:t,...sp}}function Op(e,t,n,r){let i=Mf(n,e.syntax),a;return Tp(i)?Dp(null,Error(`Matching for a tree with var() is not supported`)):(r&&(a=op(i,e.cssWideKeywordsSyntax,e)),(!r||!a.match)&&(a=op(i,t.match,e),!a.match)?Dp(null,new fu(a.reason,t.syntax,n,a),a.iterations):Dp(a.match,null,a.iterations))}var kp=class{constructor(e,t,n){if(this.cssWideKeywords=Su,this.syntax=t,this.generic=!1,this.units={...wd},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||Sp(e),e){if(e.cssWideKeywords&&(this.cssWideKeywords=e.cssWideKeywords),e.units)for(let t of Object.keys(wd))Array.isArray(e.units[t])&&(this.units[t]=e.units[t]);if(e.types)for(let[t,n]of Object.entries(e.types))this.addType_(t,n);if(e.generic){this.generic=!0;for(let[e,t]of Object.entries(Cd(this.units)))this.addType_(e,t)}if(e.atrules)for(let[t,n]of Object.entries(e.atrules))this.addAtrule_(t,n);if(e.properties)for(let[t,n]of Object.entries(e.properties))this.addProperty_(t,n)}this.cssWideKeywordsSyntax=Uf(this.cssWideKeywords.join(` | `))}checkStructure(e){function t(e,t){r.push({node:e,message:t})}let n=this.structure,r=[];return this.syntax.walk(e,function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")}),r.length?r:!1}createDescriptor(e,t,n,r=null){let i={type:t,name:n},a={type:t,name:n,parent:r,serializable:typeof e==`string`||e&&typeof e.type==`string`,syntax:null,match:null,matchRef:null};return typeof e==`function`?a.match=Uf(e,i):(typeof e==`string`?Object.defineProperty(a,"syntax",{get(){return Object.defineProperty(a,"syntax",{value:Ef(e)}),a.syntax}}):a.syntax=e,Object.defineProperty(a,"match",{get(){return Object.defineProperty(a,"match",{value:Uf(a.syntax,i)}),a.match}}),t===`Property`&&Object.defineProperty(a,"matchRef",{get(){let e=a.syntax,t=Ep(e)?Uf({...e,terms:[e.terms[0].term]},i):null;return Object.defineProperty(a,"matchRef",{value:t}),t}})),a}addAtrule_(e,t){t&&(this.atrules[e]={type:`Atrule`,name:e,prelude:t.prelude?this.createDescriptor(t.prelude,`AtrulePrelude`,e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],`AtruleDescriptor`,r,e),n),Object.create(null)):null})}addProperty_(e,t){t&&(this.properties[e]=this.createDescriptor(t,`Property`,e))}addType_(e,t){t&&(this.types[e]=this.createDescriptor(t,`Type`,e))}checkAtruleName(e){if(!this.getAtrule(e))return new du(`Unknown at-rule`,`@`+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);if(!r.prelude&&t)return SyntaxError("At-rule `@"+e+"` should not contain a prelude");if(r.prelude&&!t&&!Op(this,r.prelude,``,!1).matched)return SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),i=gu(t);if(!r.descriptors)return SyntaxError("At-rule `@"+e+"` has no known descriptors");if(!r.descriptors[i.name]&&!r.descriptors[i.basename])return new du(`Unknown at-rule descriptor`,t)}checkPropertyName(e){if(!this.getProperty(e))return new du(`Unknown property`,e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return Dp(null,n);let r=this.getAtrule(e);return r.prelude?Op(this,r.prelude,t||``,!1):Dp(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return Dp(null,r);let i=this.getAtrule(e),a=gu(t);return Op(this,i.descriptors[a.name]||i.descriptors[a.basename],n,!1)}matchDeclaration(e){return e.type===`Declaration`?this.matchProperty(e.property,e.value):Dp(null,Error(`Not a Declaration node`))}matchProperty(e,t){if(_u(e).custom)return Dp(null,Error(`Lexer matching doesn't applicable for custom properties`));let n=this.checkPropertyName(e);return n?Dp(null,n):Op(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Op(this,n,t,!1):Dp(null,new du(`Unknown type`,e))}match(e,t){return typeof e!=`string`&&(!e||!e.type)?Dp(null,new du(`Bad syntax`)):(typeof e!=`string`&&e.match||(e=this.createDescriptor(e,`Type`,`anonymous`)),Op(this,e,t,!1))}findValueFragments(e,t,n,r){return hp(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return hp(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:`Declaration`,enter:e=>{r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}}),r}getAtrule(e,t=!0){let n=gu(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=_u(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(e,t){return t?`<${e}>`:`<'${e}'>`}function t(a,o,s,c){if(s.has(o))return s.get(o);s.set(o,!1),c.syntax!==null&&kf(c.syntax,function(c){if(c.type!==`Type`&&c.type!==`Property`)return;let l=c.type===`Type`?a.types:a.properties,u=c.type===`Type`?r:i;hasOwnProperty.call(l,c.name)?t(a,c.name,u,l[c.name])&&(n.push(`${e(o,s===r)} used broken syntax definition ${e(c.name,c.type===`Type`)}`),s.set(o,!0)):(n.push(`${e(o,s===r)} used missed syntax definition ${e(c.name,c.type===`Type`)}`),s.set(o,!0))},this)}let n=[],r=new Map,i=new Map;for(let e in this.types)t(this,e,r,this.types[e]);for(let e in this.properties)t(this,e,i,this.properties[e]);let a=[...r.keys()].filter(e=>r.get(e)),o=[...i.keys()].filter(e=>i.get(e));return a.length||o.length?{errors:n,types:a,properties:o}:null}dump(e,t){return{generic:this.generic,cssWideKeywords:this.cssWideKeywords,units:this.units,types:Cp(this.types,!t,e),properties:Cp(this.properties,!t,e),atrules:wp(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function Ap(e,t){return typeof t==`string`&&/^\s*\|/.test(t)?typeof e==`string`?e+t:t.replace(/^\s*\|\s*/,``):t||null}function jp(e,t){let n=Object.create(null);for(let r of Object.keys(e))t.includes(r)&&(n[r]=e[r]);return n}function Mp(e,t,n){let r={...e};for(let[e,i]of Object.entries(t))r[e]={...r[e],...n?jp(i,n):i};return r}function Np(e,t){let n={...e};for(let[r,i]of Object.entries(t))switch(r){case`generic`:n[r]=!!i;break;case`cssWideKeywords`:n[r]=e[r]?[...e[r],...i]:i||[];break;case`units`:n[r]={...e[r]};for(let[e,t]of Object.entries(i))n[r][e]=Array.isArray(t)?t:[];break;case`atrules`:n[r]={...e[r]};for(let[e,t]of Object.entries(i)){let i=n[r][e]||{},a=n[r][e]={prelude:i.prelude||null,descriptors:{...i.descriptors}};if(t){a.prelude=t.prelude?Ap(a.prelude,t.prelude):a.prelude||null;for(let[e,n]of Object.entries(t.descriptors||{}))a.descriptors[e]=n?Ap(a.descriptors[e],n):null;Object.keys(a.descriptors).length||(a.descriptors=null)}}break;case`types`:case`properties`:n[r]={...e[r]};for(let[e,t]of Object.entries(i))n[r][e]=Ap(n[r][e],t);break;case`parseContext`:n[r]={...e[r],...i};break;case`scope`:case`features`:n[r]=Mp(e[r],i);break;case`atrule`:case`pseudo`:n[r]=Mp(e[r],i,[`parse`]);break;case`node`:n[r]=Mp(e[r],i,[`name`,`structure`,`parse`,`generate`,`walkContext`])}return n}function Pp(e){let t=wl(e),n=eu(e),r=Wl(e),{fromPlainObject:i,toPlainObject:a}=Gl(n),o={lexer:null,createLexer:e=>new kp(e,o,o.lexer.structure),tokenize:rl,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:i,toPlainObject:a,fork(t){let n=Np({},e);return Pp(typeof t==`function`?t(n):Np(n,t))}};return o.lexer=new kp({generic:e.generic,cssWideKeywords:e.cssWideKeywords,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},o),o}var Fp=e=>Pp(Np({},e)),Ip={generic:!0,cssWideKeywords:[`initial`,`inherit`,`unset`,`revert`,`revert-layer`],units:{angle:[`deg`,`grad`,`rad`,`turn`],decibel:[`db`],flex:[`fr`],frequency:[`hz`,`khz`],length:`cm.mm.q.in.pt.pc.px.em.rem.ex.rex.cap.rcap.ch.rch.ic.ric.lh.rlh.vw.svw.lvw.dvw.vh.svh.lvh.dvh.vi.svi.lvi.dvi.vb.svb.lvb.dvb.vmin.svmin.lvmin.dvmin.vmax.svmax.lvmax.dvmax.cqw.cqh.cqi.cqb.cqmin.cqmax`.split(`.`),resolution:[`dpi`,`dpcm`,`dppx`,`x`],semitones:[`st`],time:[`s`,`ms`]},types:{"abs()":`abs( <calc-sum> )`,"absolute-size":`xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large`,"acos()":`acos( <calc-sum> )`,"alpha-value":`<number>|<percentage>`,"an+b":`odd|even|<integer>|<n-dimension>|'+'? † n|-n|<ndashdigit-dimension>|'+'? † <ndashdigit-ident>|<dashndashdigit-ident>|<n-dimension> <signed-integer>|'+'? † n <signed-integer>|-n <signed-integer>|<ndash-dimension> <signless-integer>|'+'? † n- <signless-integer>|-n- <signless-integer>|<n-dimension> ['+'|'-'] <signless-integer>|'+'? † n ['+'|'-'] <signless-integer>|-n ['+'|'-'] <signless-integer>`,"anchor()":`anchor( <anchor-name>?&&<anchor-side> , <length-percentage>? )`,"anchor-name":`<dashed-ident>`,"anchor-side":`inside|outside|top|left|right|bottom|start|end|self-start|self-end|<percentage>|center`,"anchor-size":`width|height|block|inline|self-block|self-inline`,"anchor-size()":`anchor-size( [<anchor-name>||<anchor-size>]? , <length-percentage>? )`,"angle-percentage":`<angle>|<percentage>`,"angular-color-hint":`<angle-percentage>|<zero>`,"angular-color-stop":`<color> <color-stop-angle>?`,"angular-color-stop-list":`<angular-color-stop> , [<angular-color-hint>? , <angular-color-stop>]#?`,"animateable-feature":`scroll-position|contents|<custom-ident>`,"animation-action":`none|play|play-once|play-forwards|play-backwards|pause|reset|replay`,"asin()":`asin( <calc-sum> )`,"atan()":`atan( <calc-sum> )`,"atan2()":`atan2( <calc-sum> , <calc-sum> )`,attachment:`scroll|fixed|local`,"attr()":`attr( <attr-name> <attr-type>? , <declaration-value>? )`,"attr-matcher":`['~'|'|'|'^'|'$'|'*']? '='`,"attr-modifier":`i|s`,"attr-type":`type( <syntax> )|raw-string|number|<attr-unit>`,"attribute-selector":`'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'`,"auto-repeat":`repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )`,"auto-track-list":`[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?`,axis:`block|inline|x|y`,"baseline-position":`[first|last]? baseline`,"basic-shape":`<inset()>|<xywh()>|<rect()>|<circle()>|<ellipse()>|<polygon()>|<path()>`,"basic-shape-rect":`<inset()>|<rect()>|<xywh()>`,"bg-clip":`<visual-box>|border-area|text`,"bg-image":`<image>|none`,"bg-layer":`<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>`,"bg-position":`[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]`,"bg-size":`[<length-percentage [0,∞]>|auto]{1,2}|cover|contain`,"blend-mode":`normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity`,"blur()":`blur( <length>? )`,"brightness()":`brightness( [<number>|<percentage>]? )`,"calc()":`calc( <calc-sum> )`,"calc-constant":`e|pi|infinity|-infinity|NaN`,"calc-product":`<calc-value> ['*' <calc-value>|'/' <number>]*`,"calc-size()":`calc-size( <calc-size-basis> , <calc-sum> )`,"calc-size-basis":`<intrinsic-size-keyword>|<calc-size()>|any|<calc-sum>`,"calc-sum":`<calc-product> [['+'|'-'] <calc-product>]*`,"calc-value":`<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )`,"cf-final-image":`<image>|<color>`,"cf-mixing-image":`<percentage>?&&<image>`,"circle()":`circle( <radial-size>? [at <position>]? )`,"clamp()":`clamp( <calc-sum>#{3} )`,"class-selector":`'.' <ident-token>`,"clip-source":`<url>`,color:`<color-base>|currentColor|<system-color>|<device-cmyk()>|<light-dark()>|<-non-standard-color>`,"color()":`color( <colorspace-params> [/ [<alpha-value>|none]]? )`,"color-base":`<hex-color>|<color-function>|<named-color>|<color-mix()>|transparent`,"color-function":`<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<oklab()>|<oklch()>|<color()>`,"color-interpolation-method":`in [<rectangular-color-space>|<polar-color-space> <hue-interpolation-method>?|<custom-color-space>]`,"color-mix()":`color-mix( <color-interpolation-method> , [<color>&&<percentage [0,100]>?]#{2} )`,"color-stop":`<color-stop-length>|<color-stop-angle>`,"color-stop-angle":`[<angle-percentage>|<zero>]{1,2}`,"color-stop-length":`<length-percentage>{1,2}`,"color-stop-list":`<linear-color-stop> , [<linear-color-hint>? , <linear-color-stop>]#?`,"colorspace-params":`[<predefined-rgb-params>|<xyz-params>]`,combinator:`'>'|'+'|'~'|['|' '|']`,"common-lig-values":`[common-ligatures|no-common-ligatures]`,"compat-auto":`searchfield|textarea|checkbox|radio|menulist|listbox|meter|progress-bar|button`,"compat-special":`textfield|menulist-button`,"complex-selector":`<complex-selector-unit> [<combinator>? <complex-selector-unit>]*`,"complex-selector-list":`<complex-selector>#`,"composite-style":`clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor`,"compositing-operator":`add|subtract|intersect|exclude`,"compound-selector":`[<type-selector>? <subclass-selector>*]!`,"compound-selector-list":`<compound-selector>#`,"conic-gradient()":`conic-gradient( [<conic-gradient-syntax>] )`,"conic-gradient-syntax":`[[[from [<angle>|<zero>]]? [at <position>]?]||<color-interpolation-method>]? , <angular-color-stop-list>`,"container-condition":`not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]`,"container-name":`<custom-ident>`,"container-query":`not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]`,"content-distribution":`space-between|space-around|space-evenly|stretch`,"content-list":`[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+`,"content-position":`center|start|end|flex-start|flex-end`,"content-replacement":`<image>`,"contextual-alt-values":`[contextual|no-contextual]`,"contrast()":`contrast( [<number>|<percentage>]? )`,"coord-box":`content-box|padding-box|border-box|fill-box|stroke-box|view-box`,"corner-shape-value":`round|scoop|bevel|notch|square|squircle|<superellipse()>`,"cos()":`cos( <calc-sum> )`,counter:`<counter()>|<counters()>`,"counter()":`counter( <counter-name> , <counter-style>? )`,"counter-name":`<custom-ident>`,"counter-style":`<counter-style-name>|symbols( )`,"counter-style-name":`<custom-ident>`,"counters()":`counters( <counter-name> , <string> , <counter-style>? )`,"cross-fade()":`cross-fade( <cf-mixing-image> , <cf-final-image>? )`,"cubic-bezier()":`cubic-bezier( [<number [0,1]> , <number>]#{2} )`,"cubic-bezier-easing-function":`ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )`,"cursor-predefined":`auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing`,"custom-color-space":`<dashed-ident>`,"custom-params":`<dashed-ident> [<number>|<percentage>|none]+`,dasharray:`[[<length-percentage>|<number>]+]#`,"dashndashdigit-ident":`<ident-token>`,"deprecated-system-color":`ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonHighlight|ButtonShadow|CaptionText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText`,"discretionary-lig-values":`[discretionary-ligatures|no-discretionary-ligatures]`,"display-box":`contents|none`,"display-inside":`flow|flow-root|table|flex|grid|ruby`,"display-internal":`table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container`,"display-legacy":`inline-block|inline-list-item|inline-table|inline-flex|inline-grid`,"display-listitem":`<display-outside>?&&[flow|flow-root]?&&list-item`,"display-outside":`block|inline|run-in`,"drop-shadow()":`drop-shadow( [<color>?&&<length>{2,3}] )`,"dynamic-range-limit-mix()":`dynamic-range-limit-mix( [<'dynamic-range-limit'>&&<percentage [0,100]>]#{2,} )`,"easing-function":`<linear-easing-function>|<cubic-bezier-easing-function>|<step-easing-function>`,"east-asian-variant-values":`[jis78|jis83|jis90|jis04|simplified|traditional]`,"east-asian-width-values":`[full-width|proportional-width]`,"element()":`element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )`,"ellipse()":`ellipse( <radial-size>? [at <position>]? )`,"env()":`env( <custom-ident> , <declaration-value>? )`,"exp()":`exp( <calc-sum> )`,"explicit-track-list":`[<line-names>? <track-size>]+ <line-names>?`,"family-name":`<string>|<custom-ident>+`,"feature-tag-value":`<string> [<integer>|on|off]?`,"feature-type":`@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation`,"feature-value-block":`<feature-type> '{' <feature-value-declaration-list> '}'`,"feature-value-block-list":`<feature-value-block>+`,"feature-value-declaration":`<custom-ident> : <integer>+ ;`,"feature-value-declaration-list":`<feature-value-declaration>`,"feature-value-name":`<custom-ident>`,"filter-function":`<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>`,"filter-value-list":`[<filter-function>|<url>]+`,"final-bg-layer":`<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<visual-box>||<visual-box>||<'background-color'>`,"fit-content()":`fit-content( <length-percentage [0,∞]> )`,"fixed-breadth":`<length-percentage>`,"fixed-repeat":`repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )`,"fixed-size":`<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )`,"font-stretch-absolute":`normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>`,"font-variant-css2":`normal|small-caps`,"font-weight-absolute":`normal|bold|<number [1,1000]>`,"font-width-css3":`normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded`,"form-control-identifier":`select`,"frequency-percentage":`<frequency>|<percentage>`,"generic-complete":`serif|sans-serif|system-ui|cursive|fantasy|math|monospace`,"general-enclosed":`[<function-token> <any-value>? )]|[( <any-value>? )]`,"generic-family":`<generic-script-specific>|<generic-complete>|<generic-incomplete>|<-non-standard-generic-family>`,"generic-incomplete":`ui-serif|ui-sans-serif|ui-monospace|ui-rounded`,"geometry-box":`<shape-box>|fill-box|stroke-box|view-box`,gradient:`<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>`,"grayscale()":`grayscale( [<number>|<percentage>]? )`,"grid-line":`auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]`,"historical-lig-values":`[historical-ligatures|no-historical-ligatures]`,"hsl()":`hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )|hsl( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )`,"hsla()":`hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )|hsla( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )`,hue:`<number>|<angle>`,"hue-interpolation-method":`[shorter|longer|increasing|decreasing] hue`,"hue-rotate()":`hue-rotate( [<angle>|<zero>]? )`,"hwb()":`hwb( [<hue>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )`,"hypot()":`hypot( <calc-sum># )`,image:`<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>`,"image()":`image( <image-tags>? [<image-src>? , <color>?]! )`,"image-set()":`image-set( <image-set-option># )`,"image-set-option":`[<image>|<string>] [<resolution>||type( <string> )]`,"image-src":`<url>|<string>`,"image-tags":`ltr|rtl`,"inflexible-breadth":`<length-percentage>|min-content|max-content|auto`,"inset()":`inset( <length-percentage>{1,4} [round <'border-radius'>]? )`,"invert()":`invert( [<number>|<percentage>]? )`,"keyframe-block":`<keyframe-selector># { <declaration-list> }`,"keyframe-selector":`from|to|<percentage [0,100]>|<timeline-range-name> <percentage>`,"keyframes-name":`<custom-ident>|<string>`,"lab()":`lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )`,"layer()":`layer( <layer-name> )`,"layer-name":`<ident> ['.' <ident>]*`,"lch()":`lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )`,"leader()":`leader( <leader-type> )`,"leader-type":`dotted|solid|space|<string>`,"length-percentage":`<length>|<percentage>`,"light-dark()":`light-dark( <color> , <color> )`,"line-name-list":`[<line-names>|<name-repeat>]+`,"line-names":`'[' <custom-ident>* ']'`,"line-style":`none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset`,"line-width":`<length>|thin|medium|thick`,"linear()":`linear( [<number>&&<percentage>{0,2}]# )`,"linear-color-hint":`<length-percentage>`,"linear-color-stop":`<color> <color-stop-length>?`,"linear-easing-function":`linear|<linear()>`,"linear-gradient()":`linear-gradient( [<linear-gradient-syntax>] )`,"linear-gradient-syntax":`[[<angle>|<zero>|to <side-or-corner>]||<color-interpolation-method>]? , <color-stop-list>`,"log()":`log( <calc-sum> , <calc-sum>? )`,"mask-layer":`<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>`,"mask-position":`[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?`,"mask-reference":`none|<image>|<mask-source>`,"mask-source":`<url>`,"masking-mode":`alpha|luminance|match-source`,"matrix()":`matrix( <number>#{6} )`,"matrix3d()":`matrix3d( <number>#{16} )`,"max()":`max( <calc-sum># )`,"media-and":`<media-in-parens> [and <media-in-parens>]+`,"media-condition":`<media-not>|<media-and>|<media-or>|<media-in-parens>`,"media-condition-without-or":`<media-not>|<media-and>|<media-in-parens>`,"media-feature":`( [<mf-plain>|<mf-boolean>|<mf-range>] )`,"media-in-parens":`( <media-condition> )|<media-feature>|<general-enclosed>`,"media-not":`not <media-in-parens>`,"media-or":`<media-in-parens> [or <media-in-parens>]+`,"media-query":`<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?`,"media-query-list":`<media-query>#`,"media-type":`<ident>`,"mf-boolean":`<mf-name>`,"mf-name":`<ident>`,"mf-plain":`<mf-name> : <mf-value>`,"mf-range":`<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>`,"mf-value":`<number>|<dimension>|<ident>|<ratio>`,"min()":`min( <calc-sum># )`,"minmax()":`minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )`,"mod()":`mod( <calc-sum> , <calc-sum> )`,"n-dimension":`<dimension-token>`,"name-repeat":`repeat( [<integer [1,∞]>|auto-fill] , <line-names>+ )`,"named-color":`aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen`,"namespace-prefix":`<ident>`,"ndash-dimension":`<dimension-token>`,"ndashdigit-dimension":`<dimension-token>`,"ndashdigit-ident":`<ident-token>`,"ns-prefix":`[<ident-token>|'*']? '|'`,"number-percentage":`<number>|<percentage>`,"numeric-figure-values":`[lining-nums|oldstyle-nums]`,"numeric-fraction-values":`[diagonal-fractions|stacked-fractions]`,"numeric-spacing-values":`[proportional-nums|tabular-nums]`,"offset-path":`<ray()>|<url>|<basic-shape>`,"oklab()":`oklab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )`,"oklch()":`oklch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )`,"opacity()":`opacity( [<number>|<percentage>]? )`,"opacity-value":`<number>|<percentage>`,"outline-line-style":`none|dotted|dashed|solid|double|groove|ridge|inset|outset`,"outline-radius":`<length>|<percentage>`,"overflow-position":`unsafe|safe`,"page-body":`<declaration>? [; <page-body>]?|<page-margin-box> <page-body>`,"page-margin-box":`<page-margin-box-type> '{' <declaration-list> '}'`,"page-margin-box-type":`@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom`,"page-selector":`<pseudo-page>+|<ident> <pseudo-page>*`,"page-selector-list":`[<page-selector>#]?`,"page-size":`A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger`,paint:`none|<color>|<url> [none|<color>]?|context-fill|context-stroke`,"paint()":`paint( <ident> , <declaration-value>? )`,"paint-box":`<visual-box>|fill-box|stroke-box`,"palette-identifier":`<dashed-ident>`,"palette-mix()":`palette-mix( <color-interpolation-method> , [[normal|light|dark|<palette-identifier>|<palette-mix()>]&&<percentage [0,100]>?]#{2} )`,"path()":`path( <'fill-rule'>? , <string> )`,"perspective()":`perspective( [<length [0,∞]>|none] )`,"polar-color-space":`hsl|hwb|lch|oklch`,"polygon()":`polygon( <'fill-rule'>? , [<length-percentage> <length-percentage>]# )`,position:`[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]`,"position-area":`[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|center|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|center|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]`,"pow()":`pow( <calc-sum> , <calc-sum> )`,"predefined-rgb":`srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020`,"predefined-rgb-params":`<predefined-rgb> [<number>|<percentage>|none]{3}`,"pseudo-class-selector":`':' <ident-token>|':' <function-token> <any-value> ')'`,"pseudo-element-selector":`':' <pseudo-class-selector>|<legacy-pseudo-element-selector>`,"pseudo-page":`: [left|right|first|blank]`,"query-in-parens":`( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>`,quote:`open-quote|close-quote|no-open-quote|no-close-quote`,"radial-extent":`closest-corner|closest-side|farthest-corner|farthest-side`,"radial-gradient()":`radial-gradient( [<radial-gradient-syntax>] )`,"radial-gradient-syntax":`[[[<radial-shape>||<radial-size>]? [at <position>]?]||<color-interpolation-method>]? , <color-stop-list>`,"radial-shape":`circle|ellipse`,"radial-size":`<radial-extent>|<length [0,∞]>|<length-percentage [0,∞]>{2}`,ratio:`<number [0,∞]> [/ <number [0,∞]>]?`,"ray()":`ray( <angle>&&<ray-size>?&&contain?&&[at <position>]? )`,"ray-size":`closest-side|closest-corner|farthest-side|farthest-corner|sides`,"rect()":`rect( [<length-percentage>|auto]{4} [round <'border-radius'>]? )`,"rectangular-color-space":`srgb|srgb-linear|display-p3|display-p3-linear|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65`,"relative-selector":`<combinator>? <complex-selector>`,"relative-selector-list":`<relative-selector>#`,"relative-size":`larger|smaller`,"rem()":`rem( <calc-sum> , <calc-sum> )`,"repeat-style":`repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}`,"repeating-conic-gradient()":`repeating-conic-gradient( [<conic-gradient-syntax>] )`,"repeating-linear-gradient()":`repeating-linear-gradient( [<linear-gradient-syntax>] )`,"repeating-radial-gradient()":`repeating-radial-gradient( [<radial-gradient-syntax>] )`,"reversed-counter-name":`reversed( <counter-name> )`,"rgb()":`rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )|rgb( [<number>|<percentage>|none]{3} [/ [<alpha-value>|none]]? )`,"rgba()":`rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )|rgba( [<number>|<percentage>|none]{3} [/ [<alpha-value>|none]]? )`,"rotate()":`rotate( [<angle>|<zero>] )`,"rotate3d()":`rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )`,"rotateX()":`rotateX( [<angle>|<zero>] )`,"rotateY()":`rotateY( [<angle>|<zero>] )`,"rotateZ()":`rotateZ( [<angle>|<zero>] )`,"round()":`round( <rounding-strategy>? , <calc-sum> , <calc-sum> )`,"rounding-strategy":`nearest|up|down|to-zero`,"saturate()":`saturate( [<number>|<percentage>]? )`,"scale()":`scale( [<number>|<percentage>]#{1,2} )`,"scale3d()":`scale3d( [<number>|<percentage>]#{3} )`,"scaleX()":`scaleX( [<number>|<percentage>] )`,"scaleY()":`scaleY( [<number>|<percentage>] )`,"scaleZ()":`scaleZ( [<number>|<percentage>] )`,"scope-end":`<forgiving-selector-list>`,"scope-start":`<forgiving-selector-list>`,"scroll()":`scroll( [<scroller>||<axis>]? )`,scroller:`root|nearest|self`,"scroll-state-feature":`<media-query-list>`,"scroll-state-in-parens":`( <scroll-state-query> )|( <scroll-state-feature> )|<general-enclosed>`,"scroll-state-query":`not <scroll-state-in-parens>|<scroll-state-in-parens> [[and <scroll-state-in-parens>]*|[or <scroll-state-in-parens>]*]|<scroll-state-feature>`,"selector-list":`<complex-selector-list>`,"self-position":`center|start|end|self-start|self-end|flex-start|flex-end`,"sepia()":`sepia( [<number>|<percentage>]? )`,shadow:`inset?&&<length>{2,4}&&<color>?`,"shadow-t":`[<length>{2,3}&&<color>?]`,shape:`rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )`,"shape-box":`<visual-box>|margin-box`,"side-or-corner":`[left|right]||[top|bottom]`,"sign()":`sign( <calc-sum> )`,"signed-integer":`<number-token>`,"signless-integer":`<number-token>`,"sin()":`sin( <calc-sum> )`,"single-animation":`<'animation-duration'>||<easing-function>||<'animation-delay'>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]||<single-animation-timeline>`,"single-animation-composition":`replace|add|accumulate`,"single-animation-direction":`normal|reverse|alternate|alternate-reverse`,"single-animation-fill-mode":`none|forwards|backwards|both`,"single-animation-iteration-count":`infinite|<number>`,"single-animation-play-state":`running|paused`,"single-animation-timeline":`auto|none|<dashed-ident>|<scroll()>|<view()>`,"single-transition":`[none|<single-transition-property>]||<time>||<easing-function>||<time>||<transition-behavior-value>`,"single-transition-property":`all|<custom-ident>`,size:`closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}`,"size-feature":`<mf-plain>|<mf-boolean>|<mf-range>`,"skew()":`skew( [<angle>|<zero>] , [<angle>|<zero>]? )`,"skewX()":`skewX( [<angle>|<zero>] )`,"skewY()":`skewY( [<angle>|<zero>] )`,"sqrt()":`sqrt( <calc-sum> )`,"step-position":`jump-start|jump-end|jump-none|jump-both|start|end`,"step-easing-function":`step-start|step-end|<steps()>`,"steps()":`steps( <integer> , <step-position>? )`,"style-feature":`<declaration>`,"style-in-parens":`( <style-condition> )|( <style-feature> )|<general-enclosed>`,"style-query":`<style-condition>|<style-feature>`,"subclass-selector":`<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>`,"superellipse()":`superellipse( [<number>|infinity|-infinity] )`,"supports-condition":`not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*`,"supports-decl":`( <declaration> )`,"supports-feature":`<supports-decl>|<supports-selector-fn>`,"supports-in-parens":`( <supports-condition> )|<supports-feature>|<general-enclosed>`,"supports-selector-fn":`selector( <complex-selector> )`,symbol:`<string>|<image>|<custom-ident>`,"symbols()":`symbols( <symbols-type>? [<string>|<image>]+ )`,"symbols-type":`cyclic|numeric|alphabetic|symbolic|fixed`,"system-color":`AccentColor|AccentColorText|ActiveText|ButtonBorder|ButtonFace|ButtonText|Canvas|CanvasText|Field|FieldText|GrayText|Highlight|HighlightText|LinkText|Mark|MarkText|SelectedItem|SelectedItemText|VisitedText`,"system-family-name":`caption|icon|menu|message-box|small-caption|status-bar`,"tan()":`tan( <calc-sum> )`,target:`<target-counter()>|<target-counters()>|<target-text()>`,"target-counter()":`target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )`,"target-counters()":`target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )`,"target-text()":`target-text( [<string>|<url>] , [content|before|after|first-letter]? )`,"text-edge":`[text|cap|ex|ideographic|ideographic-ink] [text|alphabetic|ideographic|ideographic-ink]?`,"time-percentage":`<time>|<percentage>`,"timeline-range-name":`cover|contain|entry|exit|entry-crossing|exit-crossing`,"track-breadth":`<length-percentage>|<flex>|min-content|max-content|auto`,"track-list":`[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?`,"track-repeat":`repeat( [<integer [1,∞]>] , [<line-names>? <track-size>]+ <line-names>? )`,"track-size":`<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )`,"transform-function":`<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>`,"transform-list":`<transform-function>+`,"transition-behavior-value":`normal|allow-discrete`,"translate()":`translate( <length-percentage> , <length-percentage>? )`,"translate3d()":`translate3d( <length-percentage> , <length-percentage> , <length> )`,"translateX()":`translateX( <length-percentage> )`,"translateY()":`translateY( <length-percentage> )`,"translateZ()":`translateZ( <length> )`,"try-size":`most-width|most-height|most-block-size|most-inline-size`,"try-tactic":`flip-block||flip-inline||flip-start`,"type-or-unit":`string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%`,"type-selector":`<wq-name>|<ns-prefix>? '*'`,"var()":`var( <custom-property-name> , <declaration-value>? )`,"view()":`view( [<axis>||<'view-timeline-inset'>]? )`,"viewport-length":`auto|<length-percentage>`,"visual-box":`content-box|padding-box|border-box`,"wq-name":`<ns-prefix>? <ident-token>`,"xywh()":`xywh( <length-percentage>{2} <length-percentage [0,∞]>{2} [round <'border-radius'>]? )`,xyz:`xyz|xyz-d50|xyz-d65`,"xyz-params":`<xyz-space> [<number>|<percentage>|none]{3}`,"-legacy-gradient":`<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>`,"-legacy-linear-gradient":`-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )`,"-legacy-repeating-linear-gradient":`-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )`,"-legacy-linear-gradient-arguments":`[<angle>|<side-or-corner>]? , <color-stop-list>`,"-legacy-radial-gradient":`-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )`,"-legacy-repeating-radial-gradient":`-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )`,"-legacy-radial-gradient-arguments":`[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>`,"-legacy-radial-gradient-size":`closest-side|closest-corner|farthest-side|farthest-corner|contain|cover`,"-legacy-radial-gradient-shape":`circle|ellipse`,"-non-standard-font":`-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body`,"-non-standard-color":`-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text`,"-non-standard-image-rendering":`optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast`,"-non-standard-overflow":`overlay|-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable`,"-non-standard-size":`intrinsic|min-intrinsic|-webkit-fill-available|-webkit-fit-content|-webkit-min-content|-webkit-max-content|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content`,"-webkit-gradient()":`-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )`,"-webkit-gradient-color-stop":`from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )`,"-webkit-gradient-point":`[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]`,"-webkit-gradient-radius":`<length>|<percentage>`,"-webkit-gradient-type":`linear|radial`,"-webkit-mask-box-repeat":`repeat|stretch|round`,"-ms-filter-function-list":`<-ms-filter-function>+`,"-ms-filter-function":`<-ms-filter-function-progid>|<-ms-filter-function-legacy>`,"-ms-filter-function-progid":`'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]`,"-ms-filter-function-legacy":`<ident-token>|<function-token> <any-value>? )`,age:`child|young|old`,"attr-name":`<wq-name>`,"attr-fallback":`<any-value>`,autospace:`no-autospace|[ideograph-alpha||ideograph-numeric||punctuation]||[insert|replace]`,bottom:`<length>|auto`,"generic-voice":`[<age>? <gender> <integer>?]`,gender:`male|female|neutral`,"generic-script-specific":`generic( kai )|generic( fangsong )|generic( nastaliq )`,"-non-standard-generic-family":`-apple-system|BlinkMacSystemFont`,"intrinsic-size-keyword":`min-content|max-content|fit-content`,left:`<length>|auto`,"device-cmyk()":`<legacy-device-cmyk-syntax>|<modern-device-cmyk-syntax>`,"legacy-device-cmyk-syntax":`device-cmyk( <number>#{4} )`,"modern-device-cmyk-syntax":`device-cmyk( <cmyk-component>{4} [/ [<alpha-value>|none]]? )`,"cmyk-component":`<number>|<percentage>|none`,"color-space":`<rectangular-color-space>|<polar-color-space>|<custom-color-space>`,right:`<length>|auto`,"forgiving-selector-list":`<complex-real-selector-list>`,"forgiving-relative-selector-list":`<relative-real-selector-list>`,"complex-real-selector-list":`<complex-real-selector>#`,"simple-selector-list":`<simple-selector>#`,"relative-real-selector-list":`<relative-real-selector>#`,"complex-selector-unit":`[<compound-selector>? <pseudo-compound-selector>*]!`,"complex-real-selector":`<compound-selector> [<combinator>? <compound-selector>]*`,"relative-real-selector":`<combinator>? <complex-real-selector>`,"pseudo-compound-selector":`<pseudo-element-selector> <pseudo-class-selector>*`,"simple-selector":`<type-selector>|<subclass-selector>`,"legacy-pseudo-element-selector":`':' [before|after|first-line|first-letter]`,"svg-length":`<percentage>|<length>|<number>`,"svg-writing-mode":`lr-tb|rl-tb|tb-rl|lr|rl|tb`,top:`<length>|auto`,x:`<number>`,y:`<number>`,declaration:`<ident-token> : <declaration-value>? ['!' important]?`,"declaration-list":`[<declaration>? ';']* <declaration>?`,url:`url( <string> <url-modifier>* )|<url-token>`,"url-modifier":`<ident>|<function-token> <any-value> )`,"number-zero-one":`<number [0,1]>`,"number-one-or-greater":`<number [1,∞]>`,"xyz-space":`xyz|xyz-d50|xyz-d65`,"style-condition":`not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]`,"-non-standard-display":`-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box`,"inset-area":`[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]`,syntax:`'*'|<syntax-component> [<syntax-combinator> <syntax-component>]*|<syntax-string>`,"syntax-component":`<syntax-single-component> <syntax-multiplier>?|'<' transform-list '>'`,"syntax-single-component":`'<' <syntax-type-name> '>'|<ident>`,"syntax-type-name":`angle|color|custom-ident|image|integer|length|length-percentage|number|percentage|resolution|string|time|url|transform-function`,"syntax-combinator":`'|'`,"syntax-multiplier":`'#'|'+'`,"syntax-string":`<string>`},properties:{"--*":`<declaration-value>`,"-ms-accelerator":`false|true`,"-ms-block-progression":`tb|rl|bt|lr`,"-ms-content-zoom-chaining":`none|chained`,"-ms-content-zoom-limit":`<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>`,"-ms-content-zoom-limit-max":`<percentage>`,"-ms-content-zoom-limit-min":`<percentage>`,"-ms-content-zoom-snap":`<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>`,"-ms-content-zoom-snap-points":`snapInterval( <percentage> , <percentage> )|snapList( <percentage># )`,"-ms-content-zoom-snap-type":`none|proximity|mandatory`,"-ms-content-zooming":`none|zoom`,"-ms-filter":`<string>`,"-ms-flow-from":`[none|<custom-ident>]#`,"-ms-flow-into":`[none|<custom-ident>]#`,"-ms-grid-columns":`none|<track-list>|<auto-track-list>`,"-ms-grid-rows":`none|<track-list>|<auto-track-list>`,"-ms-high-contrast-adjust":`auto|none`,"-ms-hyphenate-limit-chars":`auto|<integer>{1,3}`,"-ms-hyphenate-limit-lines":`no-limit|<integer>`,"-ms-hyphenate-limit-zone":`<percentage>|<length>`,"-ms-ime-align":`auto|after`,"-ms-overflow-style":`auto|none|scrollbar|-ms-autohiding-scrollbar`,"-ms-scroll-chaining":`chained|none`,"-ms-scroll-limit":`<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>`,"-ms-scroll-limit-x-max":`auto|<length>`,"-ms-scroll-limit-x-min":`<length>`,"-ms-scroll-limit-y-max":`auto|<length>`,"-ms-scroll-limit-y-min":`<length>`,"-ms-scroll-rails":`none|railed`,"-ms-scroll-snap-points-x":`snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )`,"-ms-scroll-snap-points-y":`snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )`,"-ms-scroll-snap-type":`none|proximity|mandatory`,"-ms-scroll-snap-x":`<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>`,"-ms-scroll-snap-y":`<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>`,"-ms-scroll-translation":`none|vertical-to-horizontal`,"-ms-scrollbar-3dlight-color":`<color>`,"-ms-scrollbar-arrow-color":`<color>`,"-ms-scrollbar-base-color":`<color>`,"-ms-scrollbar-darkshadow-color":`<color>`,"-ms-scrollbar-face-color":`<color>`,"-ms-scrollbar-highlight-color":`<color>`,"-ms-scrollbar-shadow-color":`<color>`,"-ms-scrollbar-track-color":`<color>`,"-ms-text-autospace":`none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space`,"-ms-touch-select":`grippers|none`,"-ms-user-select":`none|element|text`,"-ms-wrap-flow":`auto|both|start|end|maximum|clear`,"-ms-wrap-margin":`<length>`,"-ms-wrap-through":`wrap|none`,"-moz-appearance":`none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized`,"-moz-binding":`<url>|none`,"-moz-border-bottom-colors":`<color>+|none`,"-moz-border-left-colors":`<color>+|none`,"-moz-border-right-colors":`<color>+|none`,"-moz-border-top-colors":`<color>+|none`,"-moz-context-properties":`none|[fill|fill-opacity|stroke|stroke-opacity]#`,"-moz-float-edge":`border-box|content-box|margin-box|padding-box`,"-moz-force-broken-image-icon":`0|1`,"-moz-orient":`inline|block|horizontal|vertical`,"-moz-outline-radius":`<outline-radius>{1,4} [/ <outline-radius>{1,4}]?`,"-moz-outline-radius-bottomleft":`<outline-radius>`,"-moz-outline-radius-bottomright":`<outline-radius>`,"-moz-outline-radius-topleft":`<outline-radius>`,"-moz-outline-radius-topright":`<outline-radius>`,"-moz-stack-sizing":`ignore|stretch-to-fit`,"-moz-text-blink":`none|blink`,"-moz-user-focus":`ignore|normal|select-after|select-before|select-menu|select-same|select-all|none`,"-moz-user-input":`auto|none|enabled|disabled`,"-moz-user-modify":`read-only|read-write|write-only`,"-moz-window-dragging":`drag|no-drag`,"-moz-window-shadow":`default|menu|tooltip|sheet|none`,"-webkit-appearance":`none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button`,"-webkit-border-before":`<'border-width'>||<'border-style'>||<color>`,"-webkit-border-before-color":`<color>`,"-webkit-border-before-style":`<'border-style'>`,"-webkit-border-before-width":`<'border-width'>`,"-webkit-box-reflect":`[above|below|right|left]? <length>? <image>?`,"-webkit-line-clamp":`none|<integer>`,"-webkit-mask":`[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<visual-box>|border|padding|content|text]||[<visual-box>|border|padding|content]]#`,"-webkit-mask-attachment":`<attachment>#`,"-webkit-mask-clip":`[<coord-box>|no-clip|border|padding|content|text]#`,"-webkit-mask-composite":`<composite-style>#`,"-webkit-mask-image":`<mask-reference>#`,"-webkit-mask-origin":`[<coord-box>|border|padding|content]#`,"-webkit-mask-position":`<position>#`,"-webkit-mask-position-x":`[<length-percentage>|left|center|right]#`,"-webkit-mask-position-y":`[<length-percentage>|top|center|bottom]#`,"-webkit-mask-repeat":`<repeat-style>#`,"-webkit-mask-repeat-x":`repeat|no-repeat|space|round`,"-webkit-mask-repeat-y":`repeat|no-repeat|space|round`,"-webkit-mask-size":`<bg-size>#`,"-webkit-overflow-scrolling":`auto|touch`,"-webkit-tap-highlight-color":`<color>`,"-webkit-text-fill-color":`<color>`,"-webkit-text-stroke":`<length>||<color>`,"-webkit-text-stroke-color":`<color>`,"-webkit-text-stroke-width":`<length>`,"-webkit-touch-callout":`default|none`,"-webkit-user-modify":`read-only|read-write|read-write-plaintext-only`,"-webkit-user-select":`auto|none|text|all`,"accent-color":`auto|<color>`,"align-content":`normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>`,"align-items":`normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]|anchor-center`,"align-self":`auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>|anchor-center`,"align-tracks":`[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#`,"alignment-baseline":`auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical`,all:`initial|inherit|unset|revert|revert-layer`,"anchor-name":`none|<dashed-ident>#`,"anchor-scope":`none|all|<dashed-ident>#`,animation:`<single-animation>#`,"animation-composition":`<single-animation-composition>#`,"animation-delay":`<time>#`,"animation-direction":`<single-animation-direction>#`,"animation-duration":`[auto|<time [0s,∞]>]#`,"animation-fill-mode":`<single-animation-fill-mode>#`,"animation-iteration-count":`<single-animation-iteration-count>#`,"animation-name":`[none|<keyframes-name>]#`,"animation-play-state":`<single-animation-play-state>#`,"animation-range":`[<'animation-range-start'> <'animation-range-end'>?]#`,"animation-range-end":`[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#`,"animation-range-start":`[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#`,"animation-timeline":`<single-animation-timeline>#`,"animation-timing-function":`<easing-function>#`,"animation-trigger":`[none|[<dashed-ident> <animation-action>+]+]#`,appearance:`none|auto|<compat-auto>|<compat-special>`,"aspect-ratio":`auto||<ratio>`,"backdrop-filter":`none|<filter-value-list>`,"backface-visibility":`visible|hidden`,background:`<bg-layer>#? , <final-bg-layer>`,"background-attachment":`<attachment>#`,"background-blend-mode":`<blend-mode>#`,"background-clip":`<bg-clip>#`,"background-color":`<color>`,"background-image":`<bg-image>#`,"background-origin":`<visual-box>#`,"background-position":`<bg-position>#`,"background-position-x":`[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#`,"background-position-y":`[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#`,"background-repeat":`<repeat-style>#`,"background-size":`<bg-size>#`,"baseline-shift":`baseline|sub|super|<svg-length>`,"baseline-source":`auto|first|last`,"block-size":`<'width'>`,border:`<line-width>||<line-style>||<color>`,"border-block":`<'border-block-start'>`,"border-block-color":`<'border-top-color'>{1,2}`,"border-block-end":`<'border-top-width'>||<'border-top-style'>||<color>`,"border-block-end-color":`<'border-top-color'>`,"border-block-end-style":`<'border-top-style'>`,"border-block-end-width":`<'border-top-width'>`,"border-block-start":`<'border-top-width'>||<'border-top-style'>||<color>`,"border-block-start-color":`<'border-top-color'>`,"border-block-start-style":`<'border-top-style'>`,"border-block-start-width":`<'border-top-width'>`,"border-block-style":`<'border-top-style'>{1,2}`,"border-block-width":`<'border-top-width'>{1,2}`,"border-bottom":`<line-width>||<line-style>||<color>`,"border-bottom-color":`<'border-top-color'>`,"border-bottom-left-radius":`<length-percentage [0,∞]>{1,2}`,"border-bottom-right-radius":`<length-percentage [0,∞]>{1,2}`,"border-bottom-style":`<line-style>`,"border-bottom-width":`<line-width>`,"border-collapse":`separate|collapse`,"border-color":`<color>{1,4}`,"border-end-end-radius":`<'border-top-left-radius'>`,"border-end-start-radius":`<'border-top-left-radius'>`,"border-image":`<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>`,"border-image-outset":`[<length [0,∞]>|<number [0,∞]>]{1,4}`,"border-image-repeat":`[stretch|repeat|round|space]{1,2}`,"border-image-slice":`[<number [0,∞]>|<percentage [0,∞]>]{1,4}&&fill?`,"border-image-source":`none|<image>`,"border-image-width":`[<length-percentage [0,∞]>|<number [0,∞]>|auto]{1,4}`,"border-inline":`<'border-block-start'>`,"border-inline-color":`<'border-top-color'>{1,2}`,"border-inline-end":`<'border-top-width'>||<'border-top-style'>||<color>`,"border-inline-end-color":`<'border-top-color'>`,"border-inline-end-style":`<'border-top-style'>`,"border-inline-end-width":`<'border-top-width'>`,"border-inline-start":`<'border-top-width'>||<'border-top-style'>||<color>`,"border-inline-start-color":`<'border-top-color'>`,"border-inline-start-style":`<'border-top-style'>`,"border-inline-start-width":`<'border-top-width'>`,"border-inline-style":`<'border-top-style'>{1,2}`,"border-inline-width":`<'border-top-width'>{1,2}`,"border-left":`<line-width>||<line-style>||<color>`,"border-left-color":`<color>`,"border-left-style":`<line-style>`,"border-left-width":`<line-width>`,"border-radius":`<length-percentage [0,∞]>{1,4} [/ <length-percentage [0,∞]>{1,4}]?`,"border-right":`<line-width>||<line-style>||<color>`,"border-right-color":`<color>`,"border-right-style":`<line-style>`,"border-right-width":`<line-width>`,"border-spacing":`<length>{1,2}`,"border-start-end-radius":`<'border-top-left-radius'>`,"border-start-start-radius":`<'border-top-left-radius'>`,"border-style":`<line-style>{1,4}`,"border-top":`<line-width>||<line-style>||<color>`,"border-top-color":`<color>`,"border-top-left-radius":`<length-percentage [0,∞]>{1,2}`,"border-top-right-radius":`<length-percentage [0,∞]>{1,2}`,"border-top-style":`<line-style>`,"border-top-width":`<line-width>`,"border-width":`<line-width>{1,4}`,bottom:`auto|<length-percentage>|<anchor()>|<anchor-size()>`,"box-align":`start|center|end|baseline|stretch`,"box-decoration-break":`slice|clone`,"box-direction":`normal|reverse|inherit`,"box-flex":`<number>`,"box-flex-group":`<integer>`,"box-lines":`single|multiple`,"box-ordinal-group":`<integer>`,"box-orient":`horizontal|vertical|inline-axis|block-axis|inherit`,"box-pack":`start|center|end|justify`,"box-shadow":`none|<shadow>#`,"box-sizing":`content-box|border-box`,"break-after":`auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region`,"break-before":`auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region`,"break-inside":`auto|avoid|avoid-page|avoid-column|avoid-region`,"caption-side":`top|bottom`,caret:`<'caret-color'>||<'caret-animation'>||<'caret-shape'>`,"caret-animation":`auto|manual`,"caret-color":`auto|<color>`,"caret-shape":`auto|bar|block|underscore`,clear:`none|left|right|both|inline-start|inline-end`,clip:`<shape>|auto`,"clip-path":`<clip-source>|[<basic-shape>||<geometry-box>]|none`,"clip-rule":`nonzero|evenodd`,color:`<color>`,"color-interpolation-filters":`auto|sRGB|linearRGB`,"color-scheme":`normal|[light|dark|<custom-ident>]+&&only?`,"column-count":`<integer>|auto`,"column-fill":`auto|balance`,"column-gap":`normal|<length-percentage>`,"column-height":`auto|<length [0,∞]>`,"column-rule":`<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>`,"column-rule-color":`<color>`,"column-rule-style":`<'border-style'>`,"column-rule-width":`<'border-width'>`,"column-span":`none|all`,"column-width":`auto|<length [0,∞]>`,"column-wrap":`auto|nowrap|wrap`,columns:`[<'column-width'>||<'column-count'>] [/ <'column-height'>]?`,contain:`none|strict|content|[[size||inline-size]||layout||style||paint]`,"contain-intrinsic-block-size":`auto? [none|<length>]`,"contain-intrinsic-height":`auto? [none|<length>]`,"contain-intrinsic-inline-size":`auto? [none|<length>]`,"contain-intrinsic-size":`[auto? [none|<length>]]{1,2}`,"contain-intrinsic-width":`auto? [none|<length>]`,container:`<'container-name'> [/ <'container-type'>]?`,"container-name":`none|<custom-ident>+`,"container-type":`normal||[size|inline-size]`,content:`normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>|<attr()>]+]?`,"content-visibility":`visible|auto|hidden`,"corner-block-end-shape":`<corner-shape-value>{1,2}`,"corner-block-start-shape":`<corner-shape-value>{1,2}`,"corner-bottom-shape":`<corner-shape-value>{1,2}`,"corner-bottom-left-shape":`<corner-shape-value>`,"corner-bottom-right-shape":`<corner-shape-value>`,"corner-end-end-shape":`<corner-shape-value>`,"corner-end-start-shape":`<corner-shape-value>`,"corner-inline-end-shape":`<corner-shape-value>{1,2}`,"corner-inline-start-shape":`<corner-shape-value>{1,2}`,"corner-left-shape":`<corner-shape-value>{1,2}`,"corner-right-shape":`<corner-shape-value>{1,2}`,"corner-shape":`<corner-shape-value>{1,4}`,"corner-start-start-shape":`<corner-shape-value>`,"corner-start-end-shape":`<corner-shape-value>`,"corner-top-shape":`<corner-shape-value>{1,2}`,"corner-top-left-shape":`<corner-shape-value>`,"corner-top-right-shape":`<corner-shape-value>`,"counter-increment":`[<counter-name> <integer>?]+|none`,"counter-reset":`[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none`,"counter-set":`[<counter-name> <integer>?]+|none`,cursor:`[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]`,cx:`<length>|<percentage>`,cy:`<length>|<percentage>`,d:`none|path( <string> )`,direction:`ltr|rtl`,display:`[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>`,"dominant-baseline":`auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge`,"dynamic-range-limit":`standard|no-limit|constrained|<dynamic-range-limit-mix()>`,"empty-cells":`show|hide`,"field-sizing":`content|fixed`,fill:`<paint>`,"fill-opacity":`<number-zero-one>|<percentage>`,"fill-rule":`nonzero|evenodd`,filter:`none|<filter-value-list>|<-ms-filter-function-list>`,flex:`none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]`,"flex-basis":`content|<'width'>`,"flex-direction":`row|row-reverse|column|column-reverse`,"flex-flow":`<'flex-direction'>||<'flex-wrap'>`,"flex-grow":`<number>`,"flex-shrink":`<number>`,"flex-wrap":`nowrap|wrap|wrap-reverse`,float:`left|right|none|inline-start|inline-end`,"flood-color":`<color>`,"flood-opacity":`<'opacity'>`,font:`[[<'font-style'>||<font-variant-css2>||<'font-weight'>||<font-width-css3>]? <'font-size'> [/ <'line-height'>]? <'font-family'>#]|<system-family-name>|<-non-standard-font>`,"font-family":`[<family-name>|<generic-family>]#`,"font-feature-settings":`normal|<feature-tag-value>#`,"font-kerning":`auto|normal|none`,"font-language-override":`normal|<string>`,"font-optical-sizing":`auto|none`,"font-palette":`normal|light|dark|<palette-identifier>|<palette-mix()>`,"font-size":`<absolute-size>|<relative-size>|<length-percentage [0,∞]>|math`,"font-size-adjust":`none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]`,"font-smooth":`auto|never|always|<absolute-size>|<length>`,"font-stretch":`<font-stretch-absolute>`,"font-style":`normal|italic|oblique <angle>?`,"font-synthesis":`none|[weight||style||small-caps||position]`,"font-synthesis-position":`auto|none`,"font-synthesis-small-caps":`auto|none`,"font-synthesis-style":`auto|none`,"font-synthesis-weight":`auto|none`,"font-variant":`normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]`,"font-variant-alternates":`normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]`,"font-variant-caps":`normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps`,"font-variant-east-asian":`normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]`,"font-variant-emoji":`normal|text|emoji|unicode`,"font-variant-ligatures":`normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]`,"font-variant-numeric":`normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]`,"font-variant-position":`normal|sub|super`,"font-variation-settings":`normal|[<string> <number>]#`,"font-weight":`<font-weight-absolute>|bolder|lighter`,"font-width":`normal|<percentage [0,∞]>|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded`,"forced-color-adjust":`auto|none|preserve-parent-color`,gap:`<'row-gap'> <'column-gap'>?`,grid:`<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>`,"grid-area":`<grid-line> [/ <grid-line>]{0,3}`,"grid-auto-columns":`<track-size>+`,"grid-auto-flow":`[row|column]||dense`,"grid-auto-rows":`<track-size>+`,"grid-column":`<grid-line> [/ <grid-line>]?`,"grid-column-end":`<grid-line>`,"grid-column-gap":`<length-percentage>`,"grid-column-start":`<grid-line>`,"grid-gap":`<'grid-row-gap'> <'grid-column-gap'>?`,"grid-row":`<grid-line> [/ <grid-line>]?`,"grid-row-end":`<grid-line>`,"grid-row-gap":`<length-percentage>`,"grid-row-start":`<grid-line>`,"grid-template":`none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?`,"grid-template-areas":`none|<string>+`,"grid-template-columns":`none|<track-list>|<auto-track-list>|subgrid <line-name-list>?`,"grid-template-rows":`none|<track-list>|<auto-track-list>|subgrid <line-name-list>?`,"hanging-punctuation":`none|[first||[force-end|allow-end]||last]`,height:`auto|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>`,"hyphenate-character":`auto|<string>`,"hyphenate-limit-chars":`[auto|<integer>]{1,3}`,hyphens:`none|manual|auto`,"image-orientation":`from-image|<angle>|[<angle>? flip]`,"image-rendering":`auto|crisp-edges|pixelated|smooth|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>`,"image-resolution":`[from-image||<resolution>]&&snap?`,"ime-mode":`auto|normal|active|inactive|disabled`,"initial-letter":`normal|[<number> <integer>?]`,"initial-letter-align":`[auto|alphabetic|hanging|ideographic]`,"inline-size":`<'width'>`,inset:`<'top'>{1,4}`,"inset-block":`<'top'>{1,2}`,"inset-block-end":`<'top'>`,"inset-block-start":`<'top'>`,"inset-inline":`<'top'>{1,2}`,"inset-inline-end":`<'top'>`,"inset-inline-start":`<'top'>`,"interpolate-size":`numeric-only|allow-keywords`,isolation:`auto|isolate`,interactivity:`auto|inert`,"interest-delay":`<'interest-delay-start'>{1,2}`,"interest-delay-end":`normal|<time>`,"interest-delay-start":`normal|<time>`,"justify-content":`normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]`,"justify-items":`normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]|anchor-center`,"justify-self":`auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|anchor-center`,"justify-tracks":`[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#`,left:`auto|<length-percentage>|<anchor()>|<anchor-size()>`,"letter-spacing":`normal|<length-percentage>`,"lighting-color":`<color>`,"line-break":`auto|loose|normal|strict|anywhere`,"line-clamp":`none|<integer>`,"line-height":`normal|<number>|<length>|<percentage>`,"line-height-step":`<length>`,"list-style":`<'list-style-type'>||<'list-style-position'>||<'list-style-image'>`,"list-style-image":`<image>|none`,"list-style-position":`inside|outside`,"list-style-type":`<counter-style>|<string>|none`,margin:`<'margin-top'>{1,4}`,"margin-block":`<'margin-top'>{1,2}`,"margin-block-end":`<'margin-top'>`,"margin-block-start":`<'margin-top'>`,"margin-bottom":`<length-percentage>|auto|<anchor-size()>`,"margin-inline":`<'margin-top'>{1,2}`,"margin-inline-end":`<'margin-top'>`,"margin-inline-start":`<'margin-top'>`,"margin-left":`<length-percentage>|auto|<anchor-size()>`,"margin-right":`<length-percentage>|auto|<anchor-size()>`,"margin-top":`<length-percentage>|auto|<anchor-size()>`,"margin-trim":`none|in-flow|all`,marker:`none|<url>`,"marker-end":`none|<url>`,"marker-mid":`none|<url>`,"marker-start":`none|<url>`,mask:`<mask-layer>#`,"mask-border":`<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>`,"mask-border-mode":`luminance|alpha`,"mask-border-outset":`[<length>|<number>]{1,4}`,"mask-border-repeat":`[stretch|repeat|round|space]{1,2}`,"mask-border-slice":`<number-percentage>{1,4} fill?`,"mask-border-source":`none|<image>`,"mask-border-width":`[<length-percentage>|<number>|auto]{1,4}`,"mask-clip":`[<coord-box>|no-clip]#`,"mask-composite":`<compositing-operator>#`,"mask-image":`<mask-reference>#`,"mask-mode":`<masking-mode>#`,"mask-origin":`<coord-box>#`,"mask-position":`<position>#`,"mask-repeat":`<repeat-style>#`,"mask-size":`<bg-size>#`,"mask-type":`luminance|alpha`,"masonry-auto-flow":`[pack|next]||[definite-first|ordered]`,"math-depth":`auto-add|add( <integer> )|<integer>`,"math-shift":`normal|compact`,"math-style":`normal|compact`,"max-block-size":`<'max-width'>`,"max-height":`none|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>`,"max-inline-size":`<'max-width'>`,"max-lines":`none|<integer>`,"max-width":`none|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>`,"min-block-size":`<'min-width'>`,"min-height":`auto|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>`,"min-inline-size":`<'min-width'>`,"min-width":`auto|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>`,"mix-blend-mode":`<blend-mode>|plus-darker|plus-lighter`,"object-fit":`fill|contain|cover|none|scale-down`,"object-position":`<position>`,"object-view-box":`none|<basic-shape-rect>`,offset:`[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?`,"offset-anchor":`auto|<position>`,"offset-distance":`<length-percentage>`,"offset-path":`none|<offset-path>||<coord-box>`,"offset-position":`normal|auto|<position>`,"offset-rotate":`[auto|reverse]||<angle>`,opacity:`<opacity-value>`,order:`<integer>`,orphans:`<integer>`,outline:`<'outline-width'>||<'outline-style'>||<'outline-color'>`,"outline-color":`auto|<color>`,"outline-offset":`<length>`,"outline-style":`auto|<outline-line-style>`,"outline-width":`<line-width>`,overflow:`[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>`,"overflow-anchor":`auto|none`,"overflow-block":`visible|hidden|clip|scroll|auto|<-non-standard-overflow>`,"overflow-clip-box":`padding-box|content-box`,"overflow-clip-margin":`<visual-box>||<length [0,∞]>`,"overflow-inline":`visible|hidden|clip|scroll|auto|<-non-standard-overflow>`,"overflow-wrap":`normal|break-word|anywhere`,"overflow-x":`visible|hidden|clip|scroll|auto|<-non-standard-overflow>`,"overflow-y":`visible|hidden|clip|scroll|auto|<-non-standard-overflow>`,overlay:`none|auto`,"overscroll-behavior":`[contain|none|auto]{1,2}`,"overscroll-behavior-block":`contain|none|auto`,"overscroll-behavior-inline":`contain|none|auto`,"overscroll-behavior-x":`contain|none|auto`,"overscroll-behavior-y":`contain|none|auto`,padding:`<'padding-top'>{1,4}`,"padding-block":`<'padding-top'>{1,2}`,"padding-block-end":`<'padding-top'>`,"padding-block-start":`<'padding-top'>`,"padding-bottom":`<length-percentage [0,∞]>`,"padding-inline":`<'padding-top'>{1,2}`,"padding-inline-end":`<'padding-top'>`,"padding-inline-start":`<'padding-top'>`,"padding-left":`<length-percentage [0,∞]>`,"padding-right":`<length-percentage [0,∞]>`,"padding-top":`<length-percentage [0,∞]>`,page:`auto|<custom-ident>`,"page-break-after":`auto|always|avoid|left|right|recto|verso`,"page-break-before":`auto|always|avoid|left|right|recto|verso`,"page-break-inside":`auto|avoid`,"paint-order":`normal|[fill||stroke||markers]`,perspective:`none|<length>`,"perspective-origin":`<position>`,"place-content":`<'align-content'> <'justify-content'>?`,"place-items":`<'align-items'> <'justify-items'>?`,"place-self":`<'align-self'> <'justify-self'>?`,"pointer-events":`auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit`,position:`static|relative|absolute|sticky|fixed|-webkit-sticky`,"position-anchor":`auto|none|<anchor-name>`,"position-area":`none|<position-area>`,"position-try":`<'position-try-order'>? <'position-try-fallbacks'>`,"position-try-fallbacks":`none|[[<dashed-ident>||<try-tactic>]|<'position-area'>]#`,"position-try-order":`normal|<try-size>`,"position-visibility":`always|[anchors-valid||anchors-visible||no-overflow]`,"print-color-adjust":`economy|exact`,quotes:`none|auto|[<string> <string>]+`,r:`<length>|<percentage>`,"reading-flow":`normal|source-order|flex-visual|flex-flow|grid-rows|grid-columns|grid-order`,"reading-order":`<integer>`,resize:`none|both|horizontal|vertical|block|inline`,right:`auto|<length-percentage>|<anchor()>|<anchor-size()>`,rotate:`none|<angle>|[x|y|z|<number>{3}]&&<angle>`,"row-gap":`normal|<length-percentage>`,"ruby-align":`start|center|space-between|space-around`,"ruby-merge":`separate|collapse|auto`,"ruby-overhang":`auto|none`,"ruby-position":`[alternate||[over|under]]|inter-character`,rx:`<length>|<percentage>`,ry:`<length>|<percentage>`,scale:`none|[<number>|<percentage>]{1,3}`,"scroll-behavior":`auto|smooth`,"scroll-initial-target":`none|nearest`,"scroll-margin":`<length>{1,4}`,"scroll-margin-block":`<length>{1,2}`,"scroll-margin-block-end":`<length>`,"scroll-margin-block-start":`<length>`,"scroll-margin-bottom":`<length>`,"scroll-margin-inline":`<length>{1,2}`,"scroll-margin-inline-end":`<length>`,"scroll-margin-inline-start":`<length>`,"scroll-margin-left":`<length>`,"scroll-margin-right":`<length>`,"scroll-margin-top":`<length>`,"scroll-marker-group":`none|before|after`,"scroll-padding":`[auto|<length-percentage>]{1,4}`,"scroll-padding-block":`[auto|<length-percentage>]{1,2}`,"scroll-padding-block-end":`auto|<length-percentage>`,"scroll-padding-block-start":`auto|<length-percentage>`,"scroll-padding-bottom":`auto|<length-percentage>`,"scroll-padding-inline":`[auto|<length-percentage>]{1,2}`,"scroll-padding-inline-end":`auto|<length-percentage>`,"scroll-padding-inline-start":`auto|<length-percentage>`,"scroll-padding-left":`auto|<length-percentage>`,"scroll-padding-right":`auto|<length-percentage>`,"scroll-padding-top":`auto|<length-percentage>`,"scroll-snap-align":`[none|start|end|center]{1,2}`,"scroll-snap-coordinate":`none|<position>#`,"scroll-snap-destination":`<position>`,"scroll-snap-points-x":`none|repeat( <length-percentage> )`,"scroll-snap-points-y":`none|repeat( <length-percentage> )`,"scroll-snap-stop":`normal|always`,"scroll-snap-type":`none|[x|y|block|inline|both] [mandatory|proximity]?`,"scroll-snap-type-x":`none|mandatory|proximity`,"scroll-snap-type-y":`none|mandatory|proximity`,"scroll-target-group":`none|auto`,"scroll-timeline":`[<'scroll-timeline-name'> <'scroll-timeline-axis'>?]#`,"scroll-timeline-axis":`[block|inline|x|y]#`,"scroll-timeline-name":`[none|<dashed-ident>]#`,"scrollbar-color":`auto|<color>{2}`,"scrollbar-gutter":`auto|stable&&both-edges?`,"scrollbar-width":`auto|thin|none`,"shape-image-threshold":`<opacity-value>`,"shape-margin":`<length-percentage>`,"shape-outside":`none|[<shape-box>||<basic-shape>]|<image>`,"shape-rendering":`auto|optimizeSpeed|crispEdges|geometricPrecision`,"speak-as":`normal|spell-out||digits||[literal-punctuation|no-punctuation]`,"stop-color":`<'color'>`,"stop-opacity":`<'opacity'>`,stroke:`<paint>`,"stroke-color":`<color>`,"stroke-dasharray":`none|[<svg-length>+]#`,"stroke-dashoffset":`<svg-length>`,"stroke-linecap":`butt|round|square`,"stroke-linejoin":`miter|round|bevel`,"stroke-miterlimit":`<number-one-or-greater>`,"stroke-opacity":`<'opacity'>`,"stroke-width":`<svg-length>`,"tab-size":`<integer>|<length>`,"table-layout":`auto|fixed`,"text-align":`start|end|left|right|center|justify|match-parent`,"text-align-last":`auto|start|end|left|right|center|justify`,"text-anchor":`start|middle|end`,"text-autospace":`normal|<autospace>|auto`,"text-box":`normal|<'text-box-trim'>||<'text-box-edge'>`,"text-box-edge":`auto|<text-edge>`,"text-box-trim":`none|trim-start|trim-end|trim-both`,"text-combine-upright":`none|all|[digits <integer>?]`,"text-decoration":`<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>`,"text-decoration-color":`<color>`,"text-decoration-inset":`<length>{1,2}|auto`,"text-decoration-line":`none|[underline||overline||line-through||blink]|spelling-error|grammar-error`,"text-decoration-skip":`none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]`,"text-decoration-skip-ink":`auto|all|none`,"text-decoration-style":`solid|double|dotted|dashed|wavy`,"text-decoration-thickness":`auto|from-font|<length>|<percentage>`,"text-emphasis":`<'text-emphasis-style'>||<'text-emphasis-color'>`,"text-emphasis-color":`<color>`,"text-emphasis-position":`auto|[over|under]&&[right|left]?`,"text-emphasis-style":`none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>`,"text-indent":`<length-percentage>&&hanging?&&each-line?`,"text-justify":`auto|inter-character|inter-word|none`,"text-orientation":`mixed|upright|sideways`,"text-overflow":`[clip|ellipsis|<string>]{1,2}`,"text-rendering":`auto|optimizeSpeed|optimizeLegibility|geometricPrecision`,"text-shadow":`none|<shadow-t>#`,"text-size-adjust":`none|auto|<percentage>`,"text-spacing-trim":`space-all|normal|space-first|trim-start`,"text-transform":`none|[capitalize|uppercase|lowercase]||full-width||full-size-kana|math-auto`,"text-underline-offset":`auto|<length>|<percentage>`,"text-underline-position":`auto|from-font|[under||[left|right]]`,"text-wrap":`<'text-wrap-mode'>||<'text-wrap-style'>`,"text-wrap-mode":`wrap|nowrap`,"text-wrap-style":`auto|balance|stable|pretty`,"timeline-scope":`none|<dashed-ident>#`,"timeline-trigger":`none|[<'timeline-trigger-name'> <'timeline-trigger-source'> <'timeline-trigger-range'> ['/' <'timeline-trigger-exit-range'>]?]#`,"timeline-trigger-name":`none|<dashed-ident>#`,"timeline-trigger-exit-range":`[<'timeline-trigger-exit-range-start'> <'timeline-trigger-exit-range-end'>?]#`,"timeline-trigger-exit-range-end":`[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#`,"timeline-trigger-exit-range-start":`[auto|normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#`,"timeline-trigger-range":`[<'timeline-trigger-range-start'> <'timeline-trigger-range-end'>?]#`,"timeline-trigger-range-end":`[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#`,"timeline-trigger-range-start":`[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#`,"timeline-trigger-source":`<single-animation-timeline>#`,top:`auto|<length-percentage>|<anchor()>|<anchor-size()>`,"touch-action":`auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation`,transform:`none|<transform-list>`,"transform-box":`content-box|border-box|fill-box|stroke-box|view-box`,"transform-origin":`[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?`,"transform-style":`flat|preserve-3d`,transition:`<single-transition>#`,"transition-behavior":`<transition-behavior-value>#`,"transition-delay":`<time>#`,"transition-duration":`<time>#`,"transition-property":`none|<single-transition-property>#`,"transition-timing-function":`<easing-function>#`,translate:`none|<length-percentage> [<length-percentage> <length>?]?`,"trigger-scope":`none|all|<dashed-ident>#`,"unicode-bidi":`normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext`,"user-select":`auto|text|none|all`,"vector-effect":`none|non-scaling-stroke|non-scaling-size|non-rotation|fixed-position`,"vertical-align":`baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>`,"view-timeline":`[<'view-timeline-name'> [<'view-timeline-axis'>||<'view-timeline-inset'>]?]#`,"view-timeline-axis":`[block|inline|x|y]#`,"view-timeline-inset":`[[auto|<length-percentage>]{1,2}]#`,"view-timeline-name":`[none|<dashed-ident>]#`,"view-transition-class":`none|<custom-ident>+`,"view-transition-name":`none|<custom-ident>|match-element`,visibility:`visible|hidden|collapse`,"white-space":`normal|pre|pre-wrap|pre-line|<'white-space-collapse'>||<'text-wrap-mode'>`,"white-space-collapse":`collapse|preserve|preserve-breaks|preserve-spaces|break-spaces`,widows:`<integer>`,width:`auto|<length-percentage [0,∞]>|min-content|max-content|fit-content|fit-content( <length-percentage [0,∞]> )|<calc-size()>|<anchor-size()>|stretch|<-non-standard-size>`,"will-change":`auto|<animateable-feature>#`,"word-break":`normal|break-all|keep-all|break-word|auto-phrase`,"word-spacing":`normal|<length>`,"word-wrap":`normal|break-word`,"writing-mode":`horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>`,x:`<length>|<percentage>`,y:`<length>|<percentage>`,"z-index":`auto|<integer>`,zoom:`normal|reset|<number [0,∞]>||<percentage [0,∞]>`,"-moz-background-clip":`padding|border`,"-moz-border-radius-bottomleft":`<'border-bottom-left-radius'>`,"-moz-border-radius-bottomright":`<'border-bottom-right-radius'>`,"-moz-border-radius-topleft":`<'border-top-left-radius'>`,"-moz-border-radius-topright":`<'border-bottom-right-radius'>`,"-moz-control-character-visibility":`visible|hidden`,"-moz-osx-font-smoothing":`auto|grayscale`,"-moz-user-select":`none|text|all|-moz-none`,"-ms-flex-align":`start|end|center|baseline|stretch`,"-ms-flex-item-align":`auto|start|end|center|baseline|stretch`,"-ms-flex-line-pack":`start|end|center|justify|distribute|stretch`,"-ms-flex-negative":`<'flex-shrink'>`,"-ms-flex-pack":`start|end|center|justify|distribute`,"-ms-flex-order":`<integer>`,"-ms-flex-positive":`<'flex-grow'>`,"-ms-flex-preferred-size":`<'flex-basis'>`,"-ms-interpolation-mode":`nearest-neighbor|bicubic`,"-ms-grid-column-align":`start|end|center|stretch`,"-ms-grid-row-align":`start|end|center|stretch`,"-ms-hyphenate-limit-last":`none|always|column|page|spread`,"-webkit-background-clip":`[<visual-box>|border|padding|content|text]#`,"-webkit-column-break-after":`always|auto|avoid`,"-webkit-column-break-before":`always|auto|avoid`,"-webkit-column-break-inside":`always|auto|avoid`,"-webkit-font-smoothing":`auto|none|antialiased|subpixel-antialiased`,"-webkit-mask-box-image":`[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?`,"-webkit-print-color-adjust":`economy|exact`,"-webkit-text-security":`none|circle|disc|square`,"-webkit-user-drag":`none|element|auto`,behavior:`<url>+`,cue:`<'cue-before'> <'cue-after'>?`,"cue-after":`<url> <decibel>?|none`,"cue-before":`<url> <decibel>?|none`,"glyph-orientation-horizontal":`<angle>`,"glyph-orientation-vertical":`<angle>`,kerning:`auto|<svg-length>`,pause:`<'pause-before'> <'pause-after'>?`,"pause-after":`<time>|none|x-weak|weak|medium|strong|x-strong`,"pause-before":`<time>|none|x-weak|weak|medium|strong|x-strong`,"position-try-options":`<'position-try-fallbacks'>`,rest:`<'rest-before'> <'rest-after'>?`,"rest-after":`<time>|none|x-weak|weak|medium|strong|x-strong`,"rest-before":`<time>|none|x-weak|weak|medium|strong|x-strong`,speak:`auto|never|always`,"voice-balance":`<number>|left|center|right|leftwards|rightwards`,"voice-duration":`auto|<time>`,"voice-family":`[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve`,"voice-pitch":`<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]`,"voice-range":`<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]`,"voice-rate":`[normal|x-slow|slow|medium|fast|x-fast]||<percentage>`,"voice-stress":`normal|strong|moderate|none|reduced`,"voice-volume":`silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]`,"white-space-trim":`none|discard-before||discard-after||discard-inner`},atrules:{charset:{prelude:`<string>`,descriptors:null},"counter-style":{prelude:`<counter-style-name>`,descriptors:{"additive-symbols":`[<integer [0,∞]>&&<symbol>]#`,fallback:`<counter-style-name>`,negative:`<symbol> <symbol>?`,pad:`<integer [0,∞]>&&<symbol>`,prefix:`<symbol>`,range:`[[<integer>|infinite]{2}]#|auto`,"speak-as":`auto|bullets|numbers|words|spell-out|<counter-style-name>`,suffix:`<symbol>`,symbols:`<symbol>+`,system:`cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]`}},container:{prelude:`[<container-name>]? <container-condition>`,descriptors:null},document:{prelude:`[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#`,descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":`normal|<percentage>`,"descent-override":`normal|<percentage>`,"font-display":`auto|block|swap|fallback|optional`,"font-family":`<family-name>`,"font-feature-settings":`normal|<feature-tag-value>#`,"font-stretch":`<font-stretch-absolute>{1,2}`,"font-style":`normal|italic|oblique <angle>{0,2}`,"font-variation-settings":`normal|[<string> <number>]#`,"font-weight":`<font-weight-absolute>{1,2}`,"line-gap-override":`normal|<percentage>`,"size-adjust":`<percentage>`,src:`[<url> [format( <string># )]?|local( <family-name> )]#`,"unicode-range":`<urange>#`}},"font-feature-values":{prelude:`<family-name>#`,descriptors:null},"font-palette-values":{prelude:`<dashed-ident>`,descriptors:{"base-palette":`light|dark|<integer [0,∞]>`,"font-family":`<family-name>#`,"override-colors":`[<integer [0,∞]> <color>]#`}},import:{prelude:`[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?`,descriptors:null},keyframes:{prelude:`<keyframes-name>`,descriptors:null},layer:{prelude:`[<layer-name>#|<layer-name>?]`,descriptors:null},media:{prelude:`<media-query-list>`,descriptors:null},namespace:{prelude:`<namespace-prefix>? [<string>|<url>]`,descriptors:null},page:{prelude:`<page-selector-list>`,descriptors:{bleed:`auto|<length>`,marks:`none|[crop||cross]`,"page-orientation":`upright|rotate-left|rotate-right`,size:`<length [0,∞]>{1,2}|auto|[<page-size>||[portrait|landscape]]`}},"position-try":{prelude:`<dashed-ident>`,descriptors:{top:`<'top'>`,left:`<'left'>`,bottom:`<'bottom'>`,right:`<'right'>`,"inset-block-start":`<'inset-block-start'>`,"inset-block-end":`<'inset-block-end'>`,"inset-inline-start":`<'inset-inline-start'>`,"inset-inline-end":`<'inset-inline-end'>`,"inset-block":`<'inset-block'>`,"inset-inline":`<'inset-inline'>`,inset:`<'inset'>`,"margin-top":`<'margin-top'>`,"margin-left":`<'margin-left'>`,"margin-bottom":`<'margin-bottom'>`,"margin-right":`<'margin-right'>`,"margin-block-start":`<'margin-block-start'>`,"margin-block-end":`<'margin-block-end'>`,"margin-inline-start":`<'margin-inline-start'>`,"margin-inline-end":`<'margin-inline-end'>`,margin:`<'margin'>`,"margin-block":`<'margin-block'>`,"margin-inline":`<'margin-inline'>`,width:`<'width'>`,height:`<'height'>`,"min-width":`<'min-width'>`,"min-height":`<'min-height'>`,"max-width":`<'max-width'>`,"max-height":`<'max-height'>`,"block-size":`<'block-size'>`,"inline-size":`<'inline-size'>`,"min-block-size":`<'min-block-size'>`,"min-inline-size":`<'min-inline-size'>`,"max-block-size":`<'max-block-size'>`,"max-inline-size":`<'max-inline-size'>`,"align-self":`<'align-self'>|anchor-center`,"justify-self":`<'justify-self'>|anchor-center`}},property:{prelude:`<custom-property-name>`,descriptors:{inherits:`true|false`,"initial-value":`<declaration-value>?`,syntax:`<string>`}},scope:{prelude:`[( <scope-start> )]? [to ( <scope-end> )]?`,descriptors:null},"starting-style":{prelude:null,descriptors:null},supports:{prelude:`<supports-condition>`,descriptors:null},"view-transition":{prelude:null,descriptors:{navigation:`auto|none`,types:`none|<custom-ident>+`}},"font-features-values":{prelude:`[<string>|<custom-ident>]+`,descriptors:{"font-display":`auto|block|swap|fallback|optional`}}}},Lp=S({generate:()=>Yp,name:()=>Kp,parse:()=>Jp,structure:()=>qp}),Rp=43,Z=45,zp=110,Bp=!0,Vp=!1;function Hp(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===Rp||r===Z)&&(t&&this.error(`Number sign is not allowed`),n++);n<this.tokenEnd;n++)U(this.charCodeAt(n))||this.error(`Integer is expected`,n)}function Up(e){return Hp.call(this,0,e)}function Wp(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n=``;switch(t){case zp:n=`N is expected`;break;case Z:n=`HyphenMinus is expected`}this.error(n,this.tokenStart+e)}}function Gp(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10){if(this.isDelim(Rp,e)||this.isDelim(Z,e)){t=this.isDelim(Rp,e)?Rp:Z;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),Up.call(this,Bp))}else return null}return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==Rp&&n!==Z&&this.error(`Number sign is expected`)),Up.call(this,t!==0),t===Z?`-`+this.consume(10):this.consume(10)}var Kp=`AnPlusB`,qp={a:[String,null],b:[String,null]};function Jp(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)Up.call(this,Vp),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Z))switch(t=`-1`,Wp.call(this,1,zp),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Gp.call(this);break;case 3:Wp.call(this,2,Z),this.next(),this.skipSC(),Up.call(this,Bp),n=`-`+this.consume(10);break;default:Wp.call(this,2,Z),Hp.call(this,3,Bp),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(Rp)&&this.lookupType(1)===1){let r=0;switch(t=`1`,this.isDelim(Rp)&&(r=1,this.next()),Wp.call(this,0,zp),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Gp.call(this);break;case 2:Wp.call(this,1,Z),this.next(),this.skipSC(),Up.call(this,Bp),n=`-`+this.consume(10);break;default:Wp.call(this,1,Z),Hp.call(this,2,Bp),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),i=r===Rp||r===Z,a=this.tokenStart+i;for(;a<this.tokenEnd&&U(this.charCodeAt(a));a++);a===this.tokenStart+i&&this.error(`Integer is expected`,this.tokenStart+i),Wp.call(this,a-this.tokenStart,zp),t=this.substring(e,a),a+1===this.tokenEnd?(this.next(),n=Gp.call(this)):(Wp.call(this,a-this.tokenStart+1,Z),a+2===this.tokenEnd?(this.next(),this.skipSC(),Up.call(this,Bp),n=`-`+this.consume(10)):(Hp.call(this,a-this.tokenStart+2,Bp),this.next(),n=this.substrToCursor(a+1)))}else this.error();return t!==null&&t.charCodeAt(0)===Rp&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===Rp&&(n=n.substr(1)),{type:`AnPlusB`,loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function Yp(e){if(e.a){let t=e.a===`+1`&&`n`||e.a===`1`&&`n`||e.a===`-1`&&`-n`||e.a+`n`;if(e.b){let n=e.b[0]===`-`||e.b[0]===`+`?e.b:`+`+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var Xp=S({generate:()=>rm,name:()=>$p,parse:()=>nm,structure:()=>tm,walkContext:()=>em});function Zp(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Qp(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}var $p=`Atrule`,em=`atrule`,tm={name:String,prelude:[`AtrulePrelude`,`Raw`,null],block:[`Block`,null]};function nm(e=!1){let t=this.tokenStart,n,r,i=null,a=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(i=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),Zp):Zp.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:a=hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block==`function`?this.atrule[r].block.call(this,e):this.Block(Qp.call(this))}return{type:`Atrule`,loc:this.getLocation(t,this.tokenStart),name:n,prelude:i,block:a}}function rm(e){this.token(3,`@`+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,`;`)}var im=S({generate:()=>lm,name:()=>am,parse:()=>cm,structure:()=>sm,walkContext:()=>om}),am=`AtrulePrelude`,om=`atrulePrelude`,sm={children:[[]]};function cm(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude==`function`?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error(`Semicolon or block is expected`),{type:`AtrulePrelude`,loc:this.getLocationFromList(t),children:t}}function lm(e){this.children(e)}var um=S({generate:()=>Sm,name:()=>ym,parse:()=>xm,structure:()=>bm}),dm=36,fm=42,pm=61,mm=94,hm=124,gm=126;function _m(){this.eof&&this.error(`Unexpected end of input`);let e=this.tokenStart,t=!1;return this.isDelim(fm)?(t=!0,this.next()):this.isDelim(hm)||this.eat(1),this.isDelim(hm)?this.charCodeAt(this.tokenStart+1)===pm?t&&this.error(`Identifier is expected`,this.tokenEnd):(this.next(),this.eat(1)):t&&this.error(`Vertical line is expected`),{type:`Identifier`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function vm(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==pm&&t!==gm&&t!==mm&&t!==dm&&t!==fm&&t!==hm&&this.error(`Attribute selector (=, ~=, ^=, $=, *=, |=) is expected`),this.next(),t!==pm&&(this.isDelim(pm)||this.error(`Equal sign is expected`),this.next()),this.substrToCursor(e)}var ym=`AttributeSelector`,bm={name:`Identifier`,matcher:[String,null],value:[`String`,`Identifier`,null],flags:[String,null]};function xm(){let e=this.tokenStart,t,n=null,r=null,i=null;return this.eat(19),this.skipSC(),t=_m.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=vm.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(i=this.consume(1),this.skipSC())),this.eat(20),{type:`AttributeSelector`,loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:i}}function Sm(e){this.token(9,`[`),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,`]`)}var Cm=S({generate:()=>Nm,name:()=>km,parse:()=>Mm,structure:()=>jm,walkContext:()=>Am}),wm=38;function Tm(){return this.Raw(null,!0)}function Em(){return this.parseWithFallback(this.Rule,Tm)}function Dm(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function Om(){if(this.tokenType===17)return Dm.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Dm);return this.tokenType===17&&this.next(),e}var km=`Block`,Am=`block`,jm={children:[[`Atrule`,`Rule`,`Declaration`]]};function Mm(e){let t=e?Om:Em,n=this.tokenStart,r=this.createList();this.eat(23);scan:for(;!this.eof;)switch(this.tokenType){case 24:break scan;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),Tm));break;default:e&&this.isDelim(wm)?r.push(Em.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:`Block`,loc:this.getLocation(n,this.tokenStart),children:r}}function Nm(e){this.token(23,`{`),this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)}),this.token(24,`}`)}var Pm=S({generate:()=>Rm,name:()=>Fm,parse:()=>Lm,structure:()=>Im}),Fm=`Brackets`,Im={children:[[]]};function Lm(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:`Brackets`,loc:this.getLocation(n,this.tokenStart),children:r}}function Rm(e){this.token(9,`[`),this.children(e),this.token(9,`]`)}var zm=S({generate:()=>Hm,name:()=>`CDC`,parse:()=>Vm,structure:()=>Bm}),Bm=[];function Vm(){let e=this.tokenStart;return this.eat(15),{type:`CDC`,loc:this.getLocation(e,this.tokenStart)}}function Hm(){this.token(15,`-->`)}var Um=S({generate:()=>Km,name:()=>`CDO`,parse:()=>Gm,structure:()=>Wm}),Wm=[];function Gm(){let e=this.tokenStart;return this.eat(14),{type:`CDO`,loc:this.getLocation(e,this.tokenStart)}}function Km(){this.token(14,`<!--`)}var qm=S({generate:()=>Qm,name:()=>Ym,parse:()=>Zm,structure:()=>Xm}),Jm=46,Ym=`ClassSelector`,Xm={name:String};function Zm(){return this.eatDelim(Jm),{type:`ClassSelector`,loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Qm(e){this.token(9,`.`),this.token(1,e.name)}var $m=S({generate:()=>sh,name:()=>ih,parse:()=>oh,structure:()=>ah}),eh=43,th=47,nh=62,rh=126,ih=`Combinator`,ah={name:String};function oh(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=` `;break;case 9:switch(this.charCodeAt(this.tokenStart)){case nh:case eh:case rh:this.next();break;case th:this.next(),this.eatIdent(`deep`),this.eatDelim(th);break;default:this.error(`Combinator is expected`)}t=this.substrToCursor(e)}return{type:`Combinator`,loc:this.getLocation(e,this.tokenStart),name:t}}function sh(e){this.tokenize(e.name)}var ch=S({generate:()=>mh,name:()=>dh,parse:()=>ph,structure:()=>fh}),lh=42,uh=47,dh=`Comment`,fh={value:String};function ph(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===lh&&this.charCodeAt(t-1)===uh&&(t-=2),{type:`Comment`,loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function mh(e){this.token(25,`/*`+e.value+`*/`)}var hh=S({generate:()=>Sh,name:()=>_h,parse:()=>xh,structure:()=>vh}),gh=new Set([16,22,0]),_h=`Condition`,vh={kind:String,children:[[`Identifier`,`Feature`,`FeatureFunction`,`FeatureRange`,`SupportsDeclaration`]]};function yh(e){return this.lookupTypeNonSC(1)===1&&gh.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}var bh={media:yh,container:yh,supports(){return this.SupportsDeclaration()}};function xh(e=`media`){let t=this.createList();scan:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>bh[e].call(this,e),()=>null);n||=this.parseWithFallback(()=>{this.eat(21);let t=this.Condition(e);return this.eat(22),t},()=>this.GeneralEnclosed(e)),t.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||=this.GeneralEnclosed(e),t.push(n);break}default:break scan}return t.isEmpty&&this.error(`Condition is expected`),{type:`Condition`,loc:this.getLocationFromList(t),kind:e,children:t}}function Sh(e){e.children.forEach(e=>{e.type===`Condition`?(this.token(21,`(`),this.node(e),this.token(22,`)`)):this.node(e)})}var Ch=S({generate:()=>Rh,name:()=>Ph,parse:()=>Lh,structure:()=>Ih,walkContext:()=>Fh}),wh=33,Th=35,Eh=36,Dh=38,Oh=42,kh=43,Ah=47;function jh(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function Mh(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Nh(){let e=this.tokenIndex,t=this.Value();return t.type!==`Raw`&&this.eof===!1&&this.tokenType!==17&&this.isDelim(wh)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var Ph=`Declaration`,Fh=`declaration`,Ih={important:[Boolean,String],property:String,value:[`Value`,`Raw`]};function Lh(){let e=this.tokenStart,t=this.tokenIndex,n=zh.call(this),r=vu(n),i=r?this.parseCustomProperty:this.parseValue,a=r?Mh:jh,o=!1,s;this.skipSC(),this.eat(16);let c=this.tokenIndex;if(r||this.skipSC(),s=i?this.parseWithFallback(Nh,a):a.call(this,this.tokenIndex),r&&s.type===`Value`&&s.children.isEmpty){for(let e=c-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){s.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}return this.isDelim(wh)&&(o=Bh.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:`Declaration`,loc:this.getLocation(e,this.tokenStart),important:o,property:n,value:s}}function Rh(e){this.token(1,e.property),this.token(16,`:`),this.node(e.value),e.important&&(this.token(9,`!`),this.token(1,e.important===!0?`important`:e.important))}function zh(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case Oh:case Eh:case kh:case Th:case Dh:this.next();break;case Ah:this.next(),this.isDelim(Ah)&&this.next()}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function Bh(){this.eat(9),this.skipSC();let e=this.consume(1);return e===`important`||e}var Vh=S({generate:()=>qh,name:()=>Wh,parse:()=>Kh,structure:()=>Gh}),Hh=38;function Uh(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}var Wh=`DeclarationList`,Gh={children:[[`Declaration`,`Atrule`,`Rule`]]};function Kh(){let e=this.createList();scan:for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Uh));break;default:this.isDelim(Hh)?e.push(this.parseWithFallback(this.Rule,Uh)):e.push(this.parseWithFallback(this.Declaration,Uh))}return{type:`DeclarationList`,loc:this.getLocationFromList(e),children:e}}function qh(e){this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)})}var Jh=S({generate:()=>Qh,name:()=>Yh,parse:()=>Zh,structure:()=>Xh}),Yh=`Dimension`,Xh={value:String,unit:String};function Zh(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:`Dimension`,loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Qh(e){this.token(12,e.value+e.unit)}var $h=S({generate:()=>ig,name:()=>tg,parse:()=>rg,structure:()=>ng}),eg=47,tg=`Feature`,ng={kind:String,name:String,value:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function rg(e){let t=this.tokenStart,n,r=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=this.lookupNonWSType(1)===9?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(eg)&&this.error(),e},()=>this.Ratio());break;default:this.error(`Number, dimension, ratio or identifier is expected`)}this.skipSC()}return this.eof||this.eat(22),{type:`Feature`,loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function ig(e){this.token(21,`(`),this.token(1,e.name),e.value!==null&&(this.token(16,`:`),this.node(e.value)),this.token(22,`)`)}var ag=S({generate:()=>ug,name:()=>og,parse:()=>lg,structure:()=>sg}),og=`FeatureFunction`,sg={kind:String,feature:String,value:[`Declaration`,`Selector`]};function cg(e,t){let n=(this.features[e]||{})[t];return typeof n!=`function`&&this.error(`Unknown feature ${t}()`),n}function lg(e=`unknown`){let t=this.tokenStart,n=this.consumeFunctionName(),r=cg.call(this,e,n.toLowerCase());this.skipSC();let i=this.parseWithFallback(()=>{let e=this.tokenIndex,t=r.call(this);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:`FeatureFunction`,loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:i}}function ug(e){this.token(2,e.feature+`(`),this.node(e.value),this.token(22,`)`)}var dg=S({generate:()=>xg,name:()=>gg,parse:()=>bg,structure:()=>_g}),fg=47,pg=60,mg=61,hg=62,gg=`FeatureRange`,_g={kind:String,left:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],leftComparison:String,middle:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],rightComparison:[String,null],right:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function vg(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(fg,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(fg)&&this.error(),e},()=>this.Ratio());default:this.error(`Number, dimension, ratio or identifier is expected`)}}function yg(e){if(this.skipSC(),this.isDelim(pg)||this.isDelim(hg)){let e=this.source[this.tokenStart];return this.next(),this.isDelim(mg)?(this.next(),e+`=`):e}if(this.isDelim(mg))return`=`;this.error(`Expected ${e?`":", `:``}"<", ">", "=" or ")"`)}function bg(e=`unknown`){let t=this.tokenStart;this.skipSC(),this.eat(21);let n=vg.call(this),r=yg.call(this,n.type===`Identifier`),i=vg.call(this),a=null,o=null;return this.lookupNonWSType(0)!==22&&(a=yg.call(this),o=vg.call(this)),this.skipSC(),this.eat(22),{type:`FeatureRange`,loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:i,rightComparison:a,right:o}}function xg(e){this.token(21,`(`),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,`)`)}var Sg=S({generate:()=>Dg,name:()=>Cg,parse:()=>Eg,structure:()=>Tg,walkContext:()=>wg}),Cg=`Function`,wg=`function`,Tg={name:String,children:[[]]};function Eg(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),i=r.toLowerCase(),a;return a=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:`Function`,loc:this.getLocation(n,this.tokenStart),name:r,children:a}}function Dg(e){this.token(2,e.name+`(`),this.children(e),this.token(22,`)`)}var Og=S({generate:()=>Mg,name:()=>kg,parse:()=>jg,structure:()=>Ag}),kg=`GeneralEnclosed`,Ag={kind:String,function:[String,null],children:[[]]};function jg(e){let t=this.tokenStart,n=null;this.tokenType===2?n=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let e=this.tokenIndex,t=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:`GeneralEnclosed`,loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function Mg(e){e.function?this.token(2,e.function+`(`):this.token(21,`(`),this.children(e),this.token(22,`)`)}var Ng=S({generate:()=>Lg,name:()=>Pg,parse:()=>Ig,structure:()=>Fg,xxx:()=>`XXX`}),Pg=`Hash`,Fg={value:String};function Ig(){let e=this.tokenStart;return this.eat(4),{type:`Hash`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Lg(e){this.token(4,`#`+e.value)}var Rg=S({generate:()=>Hg,name:()=>zg,parse:()=>Vg,structure:()=>Bg}),zg=`Identifier`,Bg={name:String};function Vg(){return{type:`Identifier`,loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Hg(e){this.token(1,e.name)}var Ug=S({generate:()=>qg,name:()=>Wg,parse:()=>Kg,structure:()=>Gg}),Wg=`IdSelector`,Gg={name:String};function Kg(){let e=this.tokenStart;return this.eat(4),{type:`IdSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function qg(e){this.token(9,`#`+e.name)}var Jg=S({generate:()=>$g,name:()=>Xg,parse:()=>Qg,structure:()=>Zg}),Yg=46,Xg=`Layer`,Zg={name:String};function Qg(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(Yg);)this.eat(9),t+=`.`+this.consume(1);return{type:`Layer`,loc:this.getLocation(e,this.tokenStart),name:t}}function $g(e){this.tokenize(e.name)}var e_=S({generate:()=>i_,name:()=>t_,parse:()=>r_,structure:()=>n_}),t_=`LayerList`,n_={children:[[`Layer`]]};function r_(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:`LayerList`,loc:this.getLocationFromList(e),children:e}}function i_(e){this.children(e,()=>this.token(18,`,`))}var a_=S({generate:()=>l_,name:()=>o_,parse:()=>c_,structure:()=>s_}),o_=`MediaQuery`,s_={modifier:[String,null],mediaType:[String,null],condition:[`Condition`,null]};function c_(){let e=this.tokenStart,t=null,n=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let e=this.consume(1),i=e.toLowerCase();switch(i===`not`||i===`only`?(this.skipSC(),t=i,n=this.consume(1)):n=e,this.lookupTypeNonSC(0)){case 1:this.skipSC(),this.eatIdent(`and`),r=this.Condition(`media`);break;case 23:case 17:case 18:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}}else switch(this.tokenType){case 1:case 21:case 2:r=this.Condition(`media`);break;case 23:case 17:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}return{type:`MediaQuery`,loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function l_(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,`and`),this.node(e.condition))):e.condition&&this.node(e.condition)}var u_=S({generate:()=>m_,name:()=>d_,parse:()=>p_,structure:()=>f_}),d_=`MediaQueryList`,f_={children:[[`MediaQuery`]]};function p_(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:`MediaQueryList`,loc:this.getLocationFromList(e),children:e}}function m_(e){this.children(e,()=>this.token(18,`,`))}var h_=S({generate:()=>b_,name:()=>__,parse:()=>y_,structure:()=>v_}),g_=38,__=`NestingSelector`,v_={};function y_(){let e=this.tokenStart;return this.eatDelim(g_),{type:`NestingSelector`,loc:this.getLocation(e,this.tokenStart)}}function b_(){this.token(9,`&`)}var x_=S({generate:()=>w_,name:()=>`Nth`,parse:()=>C_,structure:()=>S_}),S_={nth:[`AnPlusB`,`Identifier`],selector:[`SelectorList`,null]};function C_(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return r=this.lookupValue(0,`odd`)||this.lookupValue(0,`even`)?this.Identifier():this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,`of`)&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:`Nth`,loc:this.getLocation(e,t),nth:r,selector:n}}function w_(e){this.node(e.nth),e.selector!==null&&(this.token(1,`of`),this.node(e.selector))}var T_=S({generate:()=>k_,name:()=>E_,parse:()=>O_,structure:()=>D_}),E_=`Number`,D_={value:String};function O_(){return{type:`Number`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function k_(e){this.token(10,e.value)}var A_=S({generate:()=>P_,name:()=>j_,parse:()=>N_,structure:()=>M_}),j_=`Operator`,M_={value:String};function N_(){let e=this.tokenStart;return this.next(),{type:`Operator`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function P_(e){this.tokenize(e.value)}var F_=S({generate:()=>z_,name:()=>I_,parse:()=>R_,structure:()=>L_}),I_=`Parentheses`,L_={children:[[]]};function R_(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:`Parentheses`,loc:this.getLocation(n,this.tokenStart),children:r}}function z_(e){this.token(21,`(`),this.children(e),this.token(22,`)`)}var B_=S({generate:()=>W_,name:()=>V_,parse:()=>U_,structure:()=>H_}),V_=`Percentage`,H_={value:String};function U_(){return{type:`Percentage`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function W_(e){this.token(11,e.value+`%`)}var G_=S({generate:()=>X_,name:()=>K_,parse:()=>Y_,structure:()=>J_,walkContext:()=>q_}),K_=`PseudoClassSelector`,q_=`function`,J_={name:String,children:[[`Raw`],null]};function Y_(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoClassSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function X_(e){this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}var Z_=S({generate:()=>nv,name:()=>Q_,parse:()=>tv,structure:()=>ev,walkContext:()=>$_}),Q_=`PseudoElementSelector`,$_=`function`,ev={name:String,children:[[`Raw`],null]};function tv(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoElementSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function nv(e){this.token(16,`:`),this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}var rv=S({generate:()=>lv,name:()=>ov,parse:()=>cv,structure:()=>sv}),iv=47;function av(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error(`Number of function is expected`)}}var ov=`Ratio`,sv={left:[`Number`,`Function`],right:[`Number`,`Function`,null]};function cv(){let e=this.tokenStart,t=av.call(this),n=null;return this.skipSC(),this.isDelim(iv)&&(this.eatDelim(iv),n=av.call(this)),{type:`Ratio`,loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function lv(e){this.node(e.left),this.token(9,`/`),e.right?this.node(e.right):this.node(10,1)}var uv=S({generate:()=>mv,name:()=>`Raw`,parse:()=>pv,structure:()=>fv});function dv(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var fv={value:String};function pv(e,t){let n=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),r=t&&this.tokenStart>n?dv.call(this):this.tokenStart,{type:`Raw`,loc:this.getLocation(n,r),value:this.substring(n,r)}}function mv(e){this.tokenize(e.value)}var hv=S({generate:()=>Sv,name:()=>vv,parse:()=>xv,structure:()=>bv,walkContext:()=>yv});function gv(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function _v(){let e=this.SelectorList();return e.type!==`Raw`&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var vv=`Rule`,yv=`rule`,bv={prelude:[`SelectorList`,`Raw`],block:[`Block`]};function xv(){let e=this.tokenIndex,t=this.tokenStart,n,r;return n=this.parseRulePrelude?this.parseWithFallback(_v,gv):gv.call(this,e),r=this.Block(!0),{type:`Rule`,loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function Sv(e){this.node(e.prelude),this.node(e.block)}var Cv=S({generate:()=>Dv,name:()=>wv,parse:()=>Ev,structure:()=>Tv}),wv=`Scope`,Tv={root:[`SelectorList`,`Raw`,null],limit:[`SelectorList`,`Raw`,null]};function Ev(){let e=null,t=null;this.skipSC();let n=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent(`to`),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:`Scope`,loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function Dv(e){e.root&&(this.token(21,`(`),this.node(e.root),this.token(22,`)`)),e.limit&&(this.token(1,`to`),this.token(21,`(`),this.node(e.limit),this.token(22,`)`))}var Ov=S({generate:()=>Mv,name:()=>kv,parse:()=>jv,structure:()=>Av}),kv=`Selector`,Av={children:[[`TypeSelector`,`IdSelector`,`ClassSelector`,`AttributeSelector`,`PseudoClassSelector`,`PseudoElementSelector`,`Combinator`]]};function jv(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error(`Selector is expected`),{type:`Selector`,loc:this.getLocationFromList(e),children:e}}function Mv(e){this.children(e)}var Nv=S({generate:()=>Rv,name:()=>Pv,parse:()=>Lv,structure:()=>Iv,walkContext:()=>Fv}),Pv=`SelectorList`,Fv=`selector`,Iv={children:[[`Selector`,`Raw`]]};function Lv(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),this.tokenType===18);)this.next();return{type:`SelectorList`,loc:this.getLocationFromList(e),children:e}}function Rv(e){this.children(e,()=>this.token(18,`,`))}var zv=92,Bv=34,Vv=39;function Hv(e){let t=e.length,n=e.charCodeAt(0),r=+(n===Bv||n===Vv),i=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,a=``;for(let n=r;n<=i;n++){let r=e.charCodeAt(n);if(r===zv){if(n===i){n!==t-1&&(a=e.substr(n+1));break}if(r=e.charCodeAt(++n),W(zv,r)){let t=n-1,r=Lc(e,t);n=r-1,a+=Vc(e.substring(t+1,r))}else r===13&&e.charCodeAt(n+1)===10&&n++}else a+=e[n]}return a}function Uv(e,t){let n=t?`'`:`"`,r=t?Vv:Bv,i=``,a=!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);n===0?i+=`�`:n<=31||n===127?(i+=`\\`+n.toString(16),a=!0):n===r||n===zv?(i+=`\\`+e.charAt(t),a=!1):(a&&(hc(n)||wc(n))&&(i+=` `),i+=e.charAt(t),a=!1)}return n+i+n}var Wv=S({generate:()=>Jv,name:()=>Gv,parse:()=>qv,structure:()=>Kv}),Gv=`String`,Kv={value:String};function qv(){return{type:`String`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Hv(this.consume(5))}}function Jv(e){this.token(5,Uv(e.value))}var Yv=S({generate:()=>ny,name:()=>Qv,parse:()=>ty,structure:()=>ey,walkContext:()=>$v}),Xv=33;function Zv(){return this.Raw(null,!1)}var Qv=`StyleSheet`,$v=`stylesheet`,ey={children:[[`Comment`,`CDO`,`CDC`,`Atrule`,`Rule`,`Raw`]]};function ty(){let e=this.tokenStart,t=this.createList(),n;scan:for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==Xv){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,Zv);break;default:n=this.parseWithFallback(this.Rule,Zv)}t.push(n)}return{type:`StyleSheet`,loc:this.getLocation(e,this.tokenStart),children:t}}function ny(e){this.children(e)}var ry=S({generate:()=>sy,name:()=>iy,parse:()=>oy,structure:()=>ay}),iy=`SupportsDeclaration`,ay={declaration:`Declaration`};function oy(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:`SupportsDeclaration`,loc:this.getLocation(e,this.tokenStart),declaration:t}}function sy(e){this.token(21,`(`),this.node(e.declaration),this.token(22,`)`)}var cy=S({generate:()=>hy,name:()=>fy,parse:()=>my,structure:()=>py}),ly=42,uy=124;function dy(){this.tokenType!==1&&this.isDelim(ly)===!1&&this.error(`Identifier or asterisk is expected`),this.next()}var fy=`TypeSelector`,py={name:String};function my(){let e=this.tokenStart;return this.isDelim(uy)?(this.next(),dy.call(this)):(dy.call(this),this.isDelim(uy)&&(this.next(),dy.call(this))),{type:`TypeSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function hy(e){this.tokenize(e.name)}var gy=S({generate:()=>Dy,name:()=>wy,parse:()=>Ey,structure:()=>Ty}),_y=43,vy=45,yy=63;function by(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let i=this.charCodeAt(r);if(i===vy&&t&&n!==0)return by.call(this,e+n+1,!1),-1;hc(i)||this.error(t&&n!==0?`Hyphen minus`+(n<6?` or hex digit`:``)+` is expected`:n<6?`Hex digit is expected`:`Unexpected input`,r),++n>6&&this.error(`Too many hex digits`,r)}return this.next(),n}function xy(e){let t=0;for(;this.isDelim(yy);)++t>e&&this.error(`Too many question marks`),this.next()}function Sy(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===_y?`Plus sign`:`Hyphen minus`)+` is expected`)}function Cy(){let e=0;switch(this.tokenType){case 10:if(e=by.call(this,1,!0),this.isDelim(yy)){xy.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){Sy.call(this,vy),by.call(this,1,!1);break}break;case 12:e=by.call(this,1,!0),e>0&&xy.call(this,6-e);break;default:if(this.eatDelim(_y),this.tokenType===1){e=by.call(this,0,!0),e>0&&xy.call(this,6-e);break}if(this.isDelim(yy)){this.next(),xy.call(this,5);break}this.error(`Hex digit or question mark is expected`)}}var wy=`UnicodeRange`,Ty={value:String};function Ey(){let e=this.tokenStart;return this.eatIdent(`u`),Cy.call(this),{type:`UnicodeRange`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Dy(e){this.tokenize(e.value)}var Oy=32,ky=92,Ay=34,jy=39,My=40,Ny=41;function Py(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===Ny?t-2:t-1,i=``;for(;n<r&&wc(e.charCodeAt(n));)n++;for(;n<r&&wc(e.charCodeAt(r));)r--;for(let a=n;a<=r;a++){let n=e.charCodeAt(a);if(n===ky){if(a===r){a!==t-1&&(i=e.substr(a+1));break}if(n=e.charCodeAt(++a),W(ky,n)){let t=a-1,n=Lc(e,t);a=n-1,i+=Vc(e.substring(t+1,n))}else n===13&&e.charCodeAt(a+1)===10&&a++}else i+=e[a]}return i}function Fy(e){let t=``,n=!1;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i===0?t+=`�`:i<=31||i===127?(t+=`\\`+i.toString(16),n=!0):i===Oy||i===ky||i===Ay||i===jy||i===My||i===Ny?(t+=`\\`+e.charAt(r),n=!1):(n&&hc(i)&&(t+=` `),t+=e.charAt(r),n=!1)}return`url(`+t+`)`}var Iy=S({generate:()=>zy,name:()=>`Url`,parse:()=>Ry,structure:()=>Ly}),Ly={value:String};function Ry(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Py(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Hv(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error(`Url or Function is expected`)}return{type:`Url`,loc:this.getLocation(e,this.tokenStart),value:t}}function zy(e){this.token(7,Fy(e.value))}var By=S({generate:()=>Wy,name:()=>Vy,parse:()=>Uy,structure:()=>Hy}),Vy=`Value`,Hy={children:[[]]};function Uy(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:`Value`,loc:this.getLocation(e,this.tokenStart),children:t}}function Wy(e){this.children(e)}var Gy=S({generate:()=>Xy,name:()=>qy,parse:()=>Yy,structure:()=>Jy}),Ky=Object.freeze({type:`WhiteSpace`,loc:null,value:` `}),qy=`WhiteSpace`,Jy={value:String};function Yy(){return this.eat(13),Ky}function Xy(e){this.token(13,e.value)}var Zy=S({AnPlusB:()=>Lp,Atrule:()=>Xp,AtrulePrelude:()=>im,AttributeSelector:()=>um,Block:()=>Cm,Brackets:()=>Pm,CDC:()=>zm,CDO:()=>Um,ClassSelector:()=>qm,Combinator:()=>$m,Comment:()=>ch,Condition:()=>hh,Declaration:()=>Ch,DeclarationList:()=>Vh,Dimension:()=>Jh,Feature:()=>$h,FeatureFunction:()=>ag,FeatureRange:()=>dg,Function:()=>Sg,GeneralEnclosed:()=>Og,Hash:()=>Ng,IdSelector:()=>Ug,Identifier:()=>Rg,Layer:()=>Jg,LayerList:()=>e_,MediaQuery:()=>a_,MediaQueryList:()=>u_,NestingSelector:()=>h_,Nth:()=>x_,Number:()=>T_,Operator:()=>A_,Parentheses:()=>F_,Percentage:()=>B_,PseudoClassSelector:()=>G_,PseudoElementSelector:()=>Z_,Ratio:()=>rv,Raw:()=>uv,Rule:()=>hv,Scope:()=>Cv,Selector:()=>Ov,SelectorList:()=>Nv,String:()=>Wv,StyleSheet:()=>Yv,SupportsDeclaration:()=>ry,TypeSelector:()=>cy,UnicodeRange:()=>gy,Url:()=>Iy,Value:()=>By,WhiteSpace:()=>Gy}),Qy={generic:!0,cssWideKeywords:Su,...Ip,node:Zy},$y=35,eb=42,tb=43,nb=45,rb=47,ib=117;function ab(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,ib)&&this.cmpChar(this.tokenStart+1,tb)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(e===rb||e===eb||e===tb||e===nb)return this.Operator();e===$y&&this.error(`Hex or identifier is expected`,this.tokenStart+1);break}}}var ob={getNode:ab},sb=35,cb=38,lb=42,ub=43,db=47,fb=46,pb=62,mb=124,hb=126;function gb(e,t){t.last!==null&&t.last.type!==`Combinator`&&e!==null&&e.type!==`Combinator`&&t.push({type:`Combinator`,loc:null,name:` `})}function _b(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===fb&&this.error(`Identifier is expected`,this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case ub:case pb:case hb:case db:return this.Combinator();case fb:return this.ClassSelector();case lb:case mb:return this.TypeSelector();case sb:return this.IdSelector();case cb:return this.NestingSelector()}}}var vb={onWhiteSpace:gb,getNode:_b};function yb(){return this.createSingleNodeList(this.Raw(null,!1))}function bb(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type===`Value`&&n.children.isEmpty){for(let e=t-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){n.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}e.push(n)}return e}function xb(e){return e!==null&&e.type===`Operator`&&(e.value[e.value.length-1]===`-`||e.value[e.value.length-1]===`+`)}var Sb={getNode:ab,onWhiteSpace(e,t){xb(e)&&(e.value=` `+e.value),xb(t.last)&&(t.last.value+=` `)},expression:yb,var:bb},Cb=S({AtrulePrelude:()=>ob,Selector:()=>vb,Value:()=>Sb}),wb=new Set([`none`,`and`,`not`,`or`]),Tb={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);wb.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition(`container`)),e},block(e=!1){return this.Block(e)}}},Eb={parse:{prelude:null,block(){return this.Block(!0)}}};function Db(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}var Ob={layer(){this.skipSC();let e=this.createList(),t=Db.call(this,this.Layer);return(t.type!==`Raw`||t.value!==``)&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=Db.call(this,this.Declaration,()=>Db.call(this,()=>this.Condition(`supports`)));return(t.type!==`Raw`||t.value!==``)&&e.push(t),e}},kb={container:Tb,"font-face":Eb,import:{parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error(`String or url() is expected`)}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer`)?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer(`)&&e.push(this.Function(null,Ob)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`supports(`)&&e.push(this.Function(null,Ob)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},layer:{parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}},media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},scope:{parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}},"starting-style":{parse:{prelude:null,block(e=!1){return this.Block(e)}}},supports:{parse:{prelude(){return this.createSingleNodeList(this.Condition(`supports`))},block(e=!1){return this.Block(e)}}}};function Ab(){let e=this.createList();this.skipSC();loop:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break loop;default:this.error(`Identifier, string or comma is expected`)}this.skipSC()}return e}var jb={parse(){return this.createSingleNodeList(this.SelectorList())}},Mb={parse(){return this.createSingleNodeList(this.Selector())}},Nb={parse(){return this.createSingleNodeList(this.Identifier())}},Pb={parse:Ab},Fb={parse(){return this.createSingleNodeList(this.Nth())}},Ib={parseContext:{default:`StyleSheet`,stylesheet:`StyleSheet`,atrule:`Atrule`,atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:`MediaQueryList`,mediaQuery:`MediaQuery`,condition(e){return this.Condition(e.kind)},rule:`Rule`,selectorList:`SelectorList`,selector:`Selector`,block(){return this.Block(!0)},declarationList:`DeclarationList`,declaration:`Declaration`,value:`Value`},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:Cb,atrule:kb,pseudo:{dir:Nb,has:jb,lang:Pb,matches:jb,is:jb,"-moz-any":jb,"-webkit-any":jb,where:jb,not:jb,"nth-child":Fb,"nth-last-child":Fb,"nth-last-of-type":Fb,"nth-of-type":Fb,slotted:Mb,host:Mb,"host-context":Mb},node:S({AnPlusB:()=>Jp,Atrule:()=>nm,AtrulePrelude:()=>cm,AttributeSelector:()=>xm,Block:()=>Mm,Brackets:()=>Lm,CDC:()=>Vm,CDO:()=>Gm,ClassSelector:()=>Zm,Combinator:()=>oh,Comment:()=>ph,Condition:()=>xh,Declaration:()=>Lh,DeclarationList:()=>Kh,Dimension:()=>Zh,Feature:()=>rg,FeatureFunction:()=>lg,FeatureRange:()=>bg,Function:()=>Eg,GeneralEnclosed:()=>jg,Hash:()=>Ig,IdSelector:()=>Kg,Identifier:()=>Vg,Layer:()=>Qg,LayerList:()=>r_,MediaQuery:()=>c_,MediaQueryList:()=>p_,NestingSelector:()=>y_,Nth:()=>C_,Number:()=>O_,Operator:()=>N_,Parentheses:()=>R_,Percentage:()=>U_,PseudoClassSelector:()=>Y_,PseudoElementSelector:()=>tv,Ratio:()=>cv,Raw:()=>pv,Rule:()=>xv,Scope:()=>Ev,Selector:()=>jv,SelectorList:()=>Lv,String:()=>qv,StyleSheet:()=>ty,SupportsDeclaration:()=>oy,TypeSelector:()=>my,UnicodeRange:()=>Ey,Url:()=>Ry,Value:()=>Uy,WhiteSpace:()=>Yy})},Lb={node:Zy},Rb=Fp({...Qy,...Ib,...Lb}),zb=92;function Bb(e){let t=e.length-1,n=``;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i===zb){if(r===t)break;if(i=e.charCodeAt(++r),W(zb,i)){let t=r-1,i=Lc(e,t);r=i-1,n+=Vc(e.substring(t+1,i))}else i===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}var{tokenize:Vb,parse:Hb,generate:Ub,lexer:Wb,createLexer:Gb,walk:Kb,find:qb,findLast:Jb,findAll:Yb,toPlainObject:Xb,fromPlainObject:Zb,fork:Qb}=Rb;function $b(e={}){let t=e.fetch??globalThis.fetch.bind(globalThis),n=e.createSheet??(()=>new CSSStyleSheet),r=e.timeoutMs??15e3,i=e.maxBytes??2097152;return async(e,a)=>{let o=new AbortController,s=()=>{o.abort(a.reason)};a.addEventListener(`abort`,s,{once:!0}),a.aborted&&s();let c=setTimeout(()=>{o.abort(Error(`Stylesheet load timed out after ${String(r)}ms`))},r);try{o.signal.throwIfAborted();let r=await t(e,{signal:o.signal,headers:{Accept:`text/css`}});if(!r.ok)throw Error(`Stylesheet request failed: HTTP ${String(r.status)}`);if(r.headers.get(`content-type`)?.split(`;`,1)[0]?.trim().toLowerCase()!==`text/css`)throw Error(`Stylesheet response must have Content-Type text/css`);let a=tx(await ex(r,i,o.signal),r.url||e);o.signal.throwIfAborted();let s=n();return s.replaceSync(a),s}catch(e){throw o.signal.throwIfAborted(),e}finally{clearTimeout(c),a.removeEventListener(`abort`,s),o.abort()}}}async function ex(e,t,n){if(e.body===null)throw Error(`Stylesheet response has no body`);let r=e.body.getReader(),i=new TextDecoder,a=()=>{r.cancel(n.reason).catch(()=>void 0)};n.addEventListener(`abort`,a,{once:!0});let o=0,s=``;try{for(;;){n.throwIfAborted();let{value:e,done:a}=await r.read();if(n.throwIfAborted(),a)break;if(o+=e.byteLength,o>t)throw Error(`Stylesheet exceeds ${String(t)} bytes`);s+=i.decode(e,{stream:!0})}return s+i.decode()}finally{n.removeEventListener(`abort`,a),await r.cancel(),r.releaseLock()}}function tx(e,t){let n=[];Vb(e,(t,r,i)=>{if(t===3&&Bb(e.slice(r+1,i)).toLowerCase()===`import`)throw Error(`Stylesheet @import is not supported; bundle imports into the contributed CSS file`);t===2&&Bb(e.slice(r,i-1)).toLowerCase()===`url`&&n.push({from:r,to:i,value:`url(`})}),e=rx(e,n);let r=[],i=[];return Vb(e,(n,a,o)=>{let s=e.slice(a,o);if(n===2)i.push(Bb(s.slice(0,-1)).toLowerCase());else if(n===21||n===19||n===23)i.push(``);else if(n===22||n===20||n===24)i.pop();else if(n===7)r.push({from:a,to:o,value:Fy(nx(Py(s),t))});else if(n===5&&[`url`,`image-set`,`-webkit-image-set`].includes(i.at(-1)??``))r.push({from:a,to:o,value:Uv(nx(Hv(s),t))});else if(n===8||n===6)throw Error(`Stylesheet contains an invalid URL or string`)}),rx(e,r)}function nx(e,t){return e.startsWith(`#`)?e:new URL(e,t).href}function rx(e,t){let n=``,r=0;for(let{from:i,to:a,value:o}of t)n+=e.slice(r,i)+o,r=a;return n+e.slice(r)}var ix=class extends Error{constructor(e,t){super(`Failed to load stylesheet ${e.id} (${e.url})`,{cause:t}),this.name=`PluginStylesheetLoadError`,this.contributionId=e.id,this.url=e.url}},ax=class{constructor(e,t){this.load=e,this.createSharedUiSheet=t,this.roots=new Map,this.files=new Map,this.listeners=new Set,this.sheets=[],this.revision=0}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}registerRoot(e,t={}){let n=t.sharedUi===!0;if(n&&this.sharedUiSheet===void 0){if(this.createSharedUiSheet===void 0)throw Error(`Shared UI styles are not configured`);this.sharedUiSheet=this.createSharedUiSheet()}let r=this.roots.get(e)??{references:0,sharedUiReferences:0};r.references++,n&&r.sharedUiReferences++,this.roots.set(e,r),this.apply(e,[],this.sheets);let i=!1;return()=>{i||(i=!0,this.roots.get(e)===r&&(r.references--,n&&r.sharedUiReferences--,r.references===0&&this.roots.delete(e),this.apply(e,this.sheets,r.references===0?[]:this.sheets)))}}async setContributions(e){let t=[...e].sort((e,t)=>(e.order??1e3)-(t.order??1e3)||ox(e.id,t.id)),n=new Set;for(let e of t){if(n.has(e.id))throw Error(`Duplicate stylesheet contribution: ${e.id}`);n.add(e.id);let t=new URL(e.url);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw Error(`Stylesheet ${e.id} must use an HTTP(S) file URL`)}let r=++this.revision,i=new Set(t.map(({url:e})=>e)),a=new Set;for(let[e,t]of this.files)i.has(e)?t.sheet!==void 0&&a.add(t.sheet):(t.controller.abort(),this.files.delete(e));this.replaceSheets(this.sheets.filter(e=>a.has(e)));let o=()=>{if(r!==this.revision)return;let e=t.flatMap(({url:e})=>{let t=this.files.get(e)?.sheet;return t===void 0?[]:[t]});this.replaceSheets([...new Set(e)])};o();let s=await Promise.allSettled(t.map(async e=>{let t=this.files.get(e.url);if(t===void 0){let n=new AbortController;t={controller:n,loaded:Promise.resolve().then(()=>this.load(e.url,n.signal))},this.files.set(e.url,t)}let n=t;try{let e=await n.loaded;return n.sheet=e,o(),e}catch(t){throw this.files.get(e.url)===n&&this.files.delete(e.url),new ix(e,t)}}));if(r!==this.revision)return;let c=[];for(let e of s)e.status===`rejected`&&c.push(e.reason);if(c.length===1)throw c[0];if(c.length>1)throw AggregateError(c,`Failed to load plugin stylesheets`)}clear(){this.revision++;for(let e of this.roots.keys())this.apply(e,this.sheets,[],!1);this.roots.clear(),this.replaceSheets([]);for(let e of this.files.values())e.controller.abort();this.files.clear()}replaceSheets(e){let t=this.sheets;if(!(t.length===e.length&&t.every((t,n)=>t===e[n]))){this.sheets=e;for(let n of this.roots.keys())this.apply(n,t,e);for(let e of[...this.listeners])try{e()}catch(e){console.error(`Stylesheet change listener failed`,e)}}}apply(e,t,n,r=(this.roots.get(e)?.sharedUiReferences??0)>0){let i=new Set([...t,...n,...this.sharedUiSheet===void 0?[]:[this.sharedUiSheet]]),a=r&&this.sharedUiSheet!==void 0?[this.sharedUiSheet]:[];e.adoptedStyleSheets=[...e.adoptedStyleSheets.filter(e=>!i.has(e)),...a,...n]}};function ox(e,t){return e<t?-1:+(e>t)}var sx=class{constructor(e,t,n={}){this.host=e,this.styles=t,this.options=n,e.addController(this)}hostConnected(){this.release?.();let e=this.host.renderRoot;this.release=e instanceof ShadowRoot?this.styles.registerRoot(e,this.options):void 0}hostDisconnected(){this.release?.(),this.release=void 0}},cx=`.ui-button,.ui-menu-item,.ui-select{box-sizing:border-box;min-width:0;min-height:var(--ui-control-size,44px);padding:var(--ui-control-padding,10px 12px);color:var(--pi-muted);font:12px/20px var(--pi-font,system-ui, sans-serif);text-transform:none;cursor:pointer;background:0 0;border:0;border-radius:0;justify-content:center;align-items:center;gap:6px;text-decoration:none;display:inline-flex}.ui-button--action{border:1px solid var(--pi-border);background:var(--pi-surface);color:var(--pi-text);border-radius:6px}.ui-button--action.ui-button--primary{border-color:var(--pi-accent-border)}.ui-button--compact{--ui-control-size:32px;--ui-control-padding:6px 10px}.ui-button--icon{min-width:var(--ui-control-size,44px);flex:none;padding-inline:0;font-size:16px}.ui-button--small{--ui-control-size:28px;--ui-control-padding:4px 6px}.ui-button--small.ui-button--icon{font-size:14px}:is(.ui-button:hover:not(:disabled),.ui-select:hover:not(:disabled),.ui-menu-item:hover:not(:disabled):not(:has(input:disabled))){background:var(--pi-surface-hover);color:var(--pi-text)}.ui-button[aria-pressed=true],.ui-button.selected{background:var(--pi-selection-bg);color:var(--pi-text)}.ui-button--primary{background:var(--pi-selection-bg);color:var(--pi-accent);font-weight:600}.ui-button--primary:hover:not(:disabled){background:var(--pi-selection-bg);color:var(--pi-text-bright)}.ui-button.danger,.ui-menu-item.danger{color:var(--pi-danger)}.ui-button.danger:hover:not(:disabled),.ui-menu-item.danger:hover:not(:disabled){background:color-mix(in srgb, var(--pi-danger) 14%, transparent)}.ui-button:focus-visible,.ui-select:focus-visible,.ui-menu-item:focus-visible{outline:2px solid var(--pi-accent);outline-offset:-2px}.ui-menu-item:has(input:focus-visible){outline:2px solid var(--pi-accent);outline-offset:-2px}.ui-button:disabled,.ui-select:disabled,.ui-menu-item:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item:has(input:disabled){opacity:.5;cursor:not-allowed}`,lx=`.ui-toolbar,.ui-tabs{--ui-control-size:32px;--ui-control-padding:6px 10px;align-items:stretch;gap:0;min-width:0;min-height:32px;padding:0;display:flex}.ui-toolbar--primary,.ui-tabs--primary{--ui-control-size:44px;--ui-control-padding:10px 12px;min-height:44px}:is(.ui-toolbar,.ui-tabs) .ui-button--icon{width:var(--ui-control-size,32px);height:auto}.ui-toolbar-title{text-align:left;min-width:0;font:inherit;color:var(--pi-muted);text-transform:inherit;flex:auto;justify-content:space-between;align-items:center;font-size:12px;display:flex}.ui-toolbar-group{flex:none;align-items:stretch;gap:0;min-width:0;display:flex}.ui-toolbar-group--bounded{position:relative}.ui-toolbar-group--bounded:after{content:"";background:var(--pi-border-muted);pointer-events:none;width:1px;position:absolute;inset-block:0;inset-inline-end:-1px}.ui-toolbar-group>:is(.ui-button,.ui-select,.ui-toolbar-group)+:is(.ui-button,.ui-select,.ui-toolbar-group),.ui-toolbar>:is(.ui-button,.ui-select,.ui-toolbar-group)+:is(.ui-button,.ui-select,.ui-toolbar-group),.ui-toolbar>.ui-toolbar-group{border-inline-start:1px solid var(--pi-border-muted)}`,ux=`.ui-tabs{overscroll-behavior-x:contain;scrollbar-width:thin;flex:none;overflow:auto hidden}.ui-tab{white-space:nowrap;flex:none}.ui-tabs>:is(.ui-button,.ui-toolbar-group)+:is(.ui-button,.ui-toolbar-group),.ui-tabs .ui-toolbar-group>:is(.ui-button,.ui-toolbar-group)+:is(.ui-button,.ui-toolbar-group){border-inline-start:1px solid var(--pi-border-muted)}.ui-tab:is(.selected,[aria-pressed=true],[aria-current=page]){background:var(--pi-surface-hover);color:var(--pi-text);box-shadow:inset 0 -2px var(--pi-text-secondary)}.ui-tab:is(.selected,[aria-pressed=true],[aria-current=page]):hover:not(:disabled){background:var(--pi-surface-hover)}.ui-tabs--primary .ui-tab{color:var(--pi-text);font-size:13px}.ui-tabs--primary .ui-tab:is(.selected,[aria-pressed=true],[aria-current=page]),.ui-tabs--primary .ui-tab:is(.selected,[aria-pressed=true],[aria-current=page]):hover:not(:disabled){background:var(--pi-selection-bg);box-shadow:inset 0 -2px var(--pi-accent)}`,dx=`.ui-menu{--ui-control-size:32px;--ui-control-padding:6px 10px;box-sizing:border-box;border:1px solid var(--pi-border);background:var(--pi-surface);width:max-content;max-width:100%;color:var(--pi-text);box-shadow:0 8px 24px var(--pi-shadow);border-radius:6px;grid-template-columns:minmax(0,1fr);align-content:start;padding:0;display:grid;overflow:auto}.ui-menu[popover]:not(:popover-open){display:none}.ui-menu .ui-menu-item{width:100%;color:var(--pi-text);text-align:left;white-space:normal;overflow-wrap:anywhere;justify-content:flex-start}.ui-menu .ui-menu-item.danger{color:var(--pi-danger)}.ui-menu .ui-menu-item+.ui-menu-item{box-shadow:inset 0 1px var(--pi-border-muted)}.ui-menu .ui-menu-item:has(input[type=checkbox]){justify-content:space-between;gap:12px}.ui-menu-item input{accent-color:var(--pi-accent);cursor:inherit;flex:none;margin:0}`;function fx(t){return e`@layer pi-web-base { ${re(t)} }`}var px=fx(cx),mx=fx(lx),hx=fx(ux),gx=fx(dx),_x=fx(`.ui-file-list{min-height:0;padding:0;overflow:auto}.ui-file-row.ui-button{box-sizing:border-box;width:100%;min-width:0;height:32px;min-height:32px;padding:6px 10px 6px calc(10px + var(--depth,0) * 16px);color:var(--pi-text);font:13px/20px var(--pi-font,system-ui, sans-serif);text-align:left;background:0 0;border:0;border-radius:0;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:6px;margin:0;display:grid}.ui-file-row:hover:not(:disabled){background:var(--pi-surface-hover)}.ui-file-row:is(.selected,[aria-current=page]),.ui-file-row:is(.selected,[aria-current=page]):hover:not(:disabled){background:var(--pi-selection-bg);color:var(--pi-text)}.ui-file-leading{width:16px;min-width:0;color:var(--pi-muted);justify-content:center;align-items:center;display:flex}.ui-file-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.ui-file-meta{color:var(--pi-muted);white-space:nowrap;justify-self:end;font-size:12px}`),vx=e`${px}${mx}${hx}${_x}`,yx=new ax((e,t)=>$b()(e,t),()=>{let e=new CSSStyleSheet;return e.replaceSync(vx.cssText),e}),bx=Object.freeze({registerRoot:(e,t)=>yx.registerRoot(e,t),subscribe:e=>yx.subscribe(e),createController:(e,t)=>{new sx(e,yx,t)}}),xx={pluginId:`pi-web`,id:`stylesheet-integration`,version:1,parse:e=>{if(!Sx(e))throw Error(`Stylesheet integration capability v1 is unavailable`);return e}};function Sx(e){return typeof e==`object`&&!!e&&`registerRoot`in e&&typeof e.registerRoot==`function`&&`createController`in e&&typeof e.createController==`function`&&`subscribe`in e&&typeof e.subscribe==`function`}var Cx=class{constructor(e,t){this.registry=e,this.reportError=t,this.revision=0}connect(e){this.releaseDocument?.(),this.releaseDocument=this.registry.registerRoot(e)}update(e){let t=JSON.stringify(e);if(this.signature===t)return;this.signature=t;let n=++this.revision;this.registry.setContributions(e).catch(e=>{n===this.revision&&(this.signature=void 0,this.reportError(e))})}disconnect(){this.revision++,this.signature=void 0,this.releaseDocument?.(),this.releaseDocument=void 0,this.registry.clear()}},wx=Object.freeze([`navigation`,`context-bar`,`chat-chrome`,`settings-navigation`]),Tx=Object.freeze({version:1,regions:wx}),Ex=Object.freeze({pluginId:`pi-web`,id:`ui-presentation`,version:1,parse:e=>{if(typeof e!=`object`||!e||!(`version`in e)||e.version!==1)throw Error(`UI presentation capability v1 is unavailable`);return Tx}}),Dx=class{constructor(e=(e,t)=>{console.warn(`UI presentation failed for ${e}`,t)}){this.reportError=e,this.entries=new Map,this.failed=new Set,this.listeners=new Set}isFailed(e){return this.failed.has(e)}hasRegion(e){return this.entries.has(e)}isActive(e){let t=this.entries.get(e);return t!==void 0&&!this.failed.has(t.pluginId)&&t.active()}navigationLayout(){let e=this.entries.get(`navigation`);return e!==void 0&&!this.failed.has(e.pluginId)&&e.active()?e.navigationLayout:void 0}register(e){if(e.length===0)return;let t=new Set;for(let n of e){if(this.entries.has(n.region)||t.has(n.region))throw Error(`UI presentation region ${n.region} already has an owner`);t.add(n.region)}for(let t of e)this.entries.set(t.region,t);this.notify()}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}render(e){let t=this.entries.get(e.region);if(t!==void 0&&!this.failed.has(t.pluginId)&&t.active())try{let n=t.render(e);if(!Ox(n))throw Error(`UI presentation ${t.id} did not return a Lit template`);return n}catch(t){this.fail(e.region,t);return}}fail(e,t){let n=this.entries.get(e);return n!==void 0&&this.failPlugin(n.pluginId,t)}failPlugin(e,t){return this.failed.has(e)||![...this.entries.values()].some(t=>t.pluginId===e)?!1:(this.failed.add(e),this.reportError(e,t),this.notify(),!0)}clear(){this.entries.clear(),this.failed.clear(),this.notify()}notify(){for(let e of this.listeners)e()}};function Ox(e){return typeof e==`object`&&!!e&&`_$litType$`in e&&`strings`in e&&`values`in e}var{I:kx}=_,Ax=e=>e,jx=(e,t)=>t===void 0?e?._$litType$!==void 0:e?._$litType$===t,Mx=e=>e?._$litType$?.h!=null,Nx=e=>e.strings===void 0,Px=()=>document.createComment(``),Fx=(e,t,n)=>{let r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0)n=new kx(r.insertBefore(Px(),i),r.insertBefore(Px(),i),e,e.options);else{let t=n._$AB.nextSibling,a=n._$AM,o=a!==e;if(o){let t;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(t=e._$AU)!==a._$AU&&n._$AP(t)}if(t!==i||o){let e=n._$AA;for(;e!==t;){let t=Ax(e).nextSibling;Ax(r).insertBefore(e,i),e=t}}}return n},Ix=(e,t,n=e)=>(e._$AI(t,n),e),Lx={},Rx=(e,t=Lx)=>e._$AH=t,zx=e=>e._$AH,Bx=e=>{e._$AR(),e._$AA.remove()},Vx=e=>{e._$AR()};function Q(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Hx=tt(class extends nt{constructor(e){if(super(e),e.type!==et.PROPERTY&&e.type!==et.ATTRIBUTE&&e.type!==et.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Nx(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===c||t===g)return t;let n=e.element,r=e.name;if(e.type===et.PROPERTY){if(t===n[r])return c}else if(e.type===et.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return c}else if(e.type===et.ATTRIBUTE&&n.getAttribute(r)===t+``)return c;return Rx(e),t}}),Ux=`button, input, select, textarea, a[href], [tabindex]`,Wx=class extends m{constructor(){super(),this.busy=!1,this.activationAttempted=!1,this.handleCancel=e=>{e.preventDefault(),e.stopPropagation(),this.modalRegistration?.isTop===!0&&(this.busy?this.onBusyEscape?.():this.onClose?.())},this.handleKeyDown=e=>{this.modalRegistration?.isTop!==!0||e.defaultPrevented||(e.key===`Tab`?this.trapTabFocus(e):e.key===`Escape`&&(Ge(this.ownerDocument)||(e.isComposing?e.stopPropagation():(e.preventDefault(),e.stopPropagation(),this.busy?this.onBusyEscape?.():this.onClose?.()))))},bx.createController(this)}connectedCallback(){super.connectedCallback(),this.activationAttempted=!1,this.requestUpdate(),this.addEventListener(`keydown`,this.handleKeyDown)}disconnectedCallback(){this.removeEventListener(`keydown`,this.handleKeyDown);let e=this.modalRegistration;this.modalRegistration=void 0,this.dialog?.close(),super.disconnectedCallback(),e?.unregister()}updated(){let e=this.dialog;if(!this.isConnected||e===void 0||this.activationAttempted)return;this.activationAttempted=!0;let t=je({element:e,focus:()=>{this.focusDialogContent()},onTopChange:()=>{this.requestUpdate()}});this.modalRegistration=t;try{e.showModal(),t.focus(),this.requestUpdate()}catch(e){throw this.modalRegistration=void 0,t.unregister(),e}}focusDialog(){this.modalRegistration?.focus()}focusDialogContent(){let e=this.initialFocusTarget();e!==null&&ze(e)||this.dialog!==void 0&&ze(this.dialog)}render(){let e=this.modalRegistration?.isTop===!0;return s`
11
+ <dialog role="dialog" @cancel=${this.handleCancel}
12
+ aria-modal=${e?`true`:`false`}
13
+ aria-hidden=${e?g:`true`}
14
+ aria-busy=${this.busy?`true`:`false`}
15
+ aria-label=${this.label??g}>
16
+ <div class="backdrop" @mousedown=${e=>{this.handleBackdropMouseDown(e)}}>
17
+ <section class="surface"><slot></slot></section>
18
+ </div>
19
+ </dialog>
20
+ `}initialFocusTarget(){if(this.initialFocus===void 0)return null;try{return this.querySelector(this.initialFocus)}catch{return null}}trapTabFocus(e){let t=Gx(this);if(t.length===0){e.preventDefault(),this.dialog?.focus();return}let n=Be(this.ownerDocument),r=t.findIndex(e=>e===n);if(r===-1){e.preventDefault(),(e.shiftKey?t.at(-1):t[0])?.focus();return}let i=!e.shiftKey&&r===t.length-1,a=e.shiftKey&&r===0;(i||a)&&(e.preventDefault(),(e.shiftKey?t.at(-1):t[0])?.focus())}handleBackdropMouseDown(e){e.target!==e.currentTarget||this.busy||this.modalRegistration?.isTop!==!0||this.onClose?.()}static{this.styles=e`
21
+ @layer pi-web-base {
22
+ /* Host dialogs tune this shell with custom properties (defaults match a
23
+ centered 720px dialog):
24
+ --modal-surface-place-items backdrop grid alignment (default center)
25
+ --modal-surface-backdrop-padding backdrop padding (default 0)
26
+ --modal-surface-width / --modal-surface-max-width
27
+ --modal-surface-height / --modal-surface-max-height / --modal-surface-min-height
28
+ --modal-surface-border / --modal-surface-radius / --modal-surface-shadow */
29
+ :host { display: block; width: 100%; height: 100%; }
30
+ dialog { position: fixed; inset: 0; box-sizing: border-box; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: hidden; }
31
+ dialog::backdrop { background: transparent; }
32
+ .backdrop { box-sizing: border-box; width: 100%; height: 100%; display: grid; place-items: var(--modal-surface-place-items, center); padding: var(--modal-surface-backdrop-padding, 0); background: var(--modal-surface-backdrop-background, var(--pi-overlay)); overflow: hidden; }
33
+ .surface { box-sizing: border-box; width: var(--modal-surface-width, min(720px, 100%)); max-width: var(--modal-surface-max-width, 100%); height: var(--modal-surface-height, auto); max-height: var(--modal-surface-max-height, 100%); min-height: var(--modal-surface-min-height, auto); display: flex; flex-direction: column; border: var(--modal-surface-border, 1px solid var(--pi-border)); border-radius: var(--modal-surface-radius, 12px); background: var(--pi-bg); box-shadow: var(--modal-surface-shadow, 0 20px 60px var(--pi-shadow-strong)); overflow: hidden; }
34
+
35
+ }
36
+ `}};Q([C({attribute:!1})],Wx.prototype,`onClose`,void 0),Q([C({type:Boolean})],Wx.prototype,`busy`,void 0),Q([C({attribute:!1})],Wx.prototype,`onBusyEscape`,void 0),Q([C({attribute:!1})],Wx.prototype,`initialFocus`,void 0),Q([C({attribute:!1})],Wx.prototype,`label`,void 0),Q([$e(`dialog`)],Wx.prototype,`dialog`,void 0),Wx=Q([Je(`modal-surface`)],Wx);function Gx(e){let t=[],n=e=>{e instanceof HTMLElement&&Jx(e)&&t.push(e);for(let t of Yx(e))n(t)};for(let t of Yx(e))n(t);return Kx(t)}function Kx(e){let t=new Map;for(let n of e){let e=qx(n);if(e===null)continue;let r=t.get(e.form)??new Map;t.set(e.form,r);let i=r.get(e.name);(i===void 0||e.checked&&!i.checked)&&r.set(e.name,e)}let n=new Set(Array.from(t.values()).flatMap(e=>Array.from(e.values())));return e.filter(e=>qx(e)===null||n.has(e))}function qx(e){return!(e instanceof HTMLInputElement)||e.type!==`radio`||e.name===``?null:e}function Jx(e){return e.matches(`:disabled`)||Ve(e)||e instanceof HTMLInputElement&&e.type===`hidden`?!1:e.matches(Ux)&&e.tabIndex>=0}function Yx(e){if(e instanceof HTMLSlotElement){let t=e.assignedNodes({flatten:!0}),n=t.length===0?e.childNodes:t;return Array.from(n).filter(e=>e instanceof Element)}let t=e instanceof Element?e.shadowRoot??e:e;return Array.from(t.children)}var Xx=e=>Mx(e)?e._$litType$.h:e.strings,Zx=tt(class extends nt{constructor(e){super(e),this.et=new WeakMap}render(e){return[e]}update(e,[t]){let n=jx(this.it)?Xx(this.it):null,r=jx(t)?Xx(t):null;if(n!==null&&(r===null||n!==r)){let t=zx(e).pop(),r=this.et.get(n);if(r===void 0){let e=document.createDocumentFragment();r=a(g,e),r.setConnected(!1),this.et.set(n,r)}Rx(r,[t]),Fx(r,void 0,t)}if(r!==null){if(n===null||n!==r){let t=this.et.get(r);if(t!==void 0){let n=zx(t).pop();Vx(e),Fx(e,void 0,n),Rx(e,[n])}}this.it=t}else this.it=void 0;return this.render(t)}}),Qx=fx(`.ui-form{flex-direction:column;min-width:0;min-height:0;display:flex}.ui-form-body{align-content:start;gap:12px;display:grid}.ui-form-field{min-width:0;color:var(--pi-muted);gap:6px;display:grid}.ui-input{box-sizing:border-box;border:1px solid var(--pi-border);background:var(--pi-bg);width:100%;min-width:0;min-height:44px;color:var(--pi-text);font:var(--pi-control-font-size,16px)/1.4 var(--ui-input-font-family,var(--pi-control-font-family,var(--pi-font,system-ui, sans-serif)));border-radius:6px;padding:10px 12px}.ui-input:focus-visible{outline:2px solid var(--pi-accent);outline-offset:1px}.ui-input[aria-invalid=true]{border-color:var(--pi-danger)}.ui-checkbox-field{box-sizing:border-box;min-height:32px;color:var(--pi-text);cursor:pointer;align-items:center;gap:8px;display:flex}.ui-checkbox-field input{accent-color:var(--pi-accent);flex:none;margin:0}.ui-checkbox-field:has(input:focus-visible){outline:2px solid var(--pi-accent);outline-offset:1px}.ui-form-error{border:1px solid var(--pi-danger);background:color-mix(in srgb, var(--pi-danger) 10%, transparent);color:var(--pi-danger);overflow-wrap:anywhere;border-radius:6px;padding:10px 12px;line-height:1.4}`),$x=Object.freeze({navigation:Object.freeze([`header`,`machines`,`projects`,`project-resize`,`workspaces`,`workspace-resize`,`sessions`]),"context-bar":Object.freeze([`content`,`actions`]),"chat-chrome":Object.freeze([`transcript`,`composer`]),"settings-navigation":Object.freeze([`navigation`])}),eS=class extends m{constructor(){super(),this.region=`navigation`,this.context={mode:`normal`},this.generation=0,bx.createController(this,{sharedUi:!0})}connectedCallback(){super.connectedCallback(),this.subscribeRuntime()}disconnectedCallback(){this.generation++,this.unsubscribe?.(),this.unsubscribe=void 0,super.disconnectedCallback()}willUpdate(e){(e.has(`context`)||e.has(`region`)||e.has(`runtime`))&&this.generation++,e.has(`runtime`)&&this.subscribeRuntime()}subscribeRuntime(){this.unsubscribe?.(),this.unsubscribe=this.runtime?.subscribe(()=>{this.generation++,this.requestUpdate()})}performUpdate(){try{super.performUpdate()}catch(e){if(this.runtime?.fail(this.region,e)!==!0)throw e;this.requestUpdate()}}render(){let e=this.generation,t=this.runtime,n=this.context,r=this.region,i=tS(n,()=>this.isConnected&&e===this.generation&&this.runtime===t&&this.context===n&&this.region===r&&t?.isActive(r)===!0),a=$x[this.region],o=t?.render(Object.freeze({...i,region:this.region,slots:a}));return o===void 0?(this.generation++,s`${a.map(e=>s`<slot name=${e}></slot>`)}<slot></slot>`):o}static{this.styles=e`
37
+ :host { display: flex; flex-direction: column; min-width: 0; min-height: 0; flex: 1 1 0; }
38
+ :host([region="context-bar"]), :host([region="settings-navigation"]) { flex: 0 0 auto; }
39
+ slot { display: contents; }
40
+ `}};Q([C({reflect:!0})],eS.prototype,`region`,void 0),Q([C({attribute:!1})],eS.prototype,`runtime`,void 0),Q([C({attribute:!1})],eS.prototype,`context`,void 0),eS=Q([Je(`pi-web-ui-presentation`)],eS);function tS(e,t){return Object.freeze({mode:e.mode,...e.compact===void 0?{}:{compact:e.compact},...e.machine===void 0?{}:{machine:Object.freeze({id:e.machine.id,name:e.machine.name})},...e.project===void 0?{}:{project:Object.freeze({id:e.project.id,name:e.project.name})},...e.workspace===void 0?{}:{workspace:Object.freeze({id:e.workspace.id,label:e.workspace.label})},...e.session===void 0?{}:{session:Object.freeze({id:e.session.id,label:e.session.label})},...e.actions===void 0?{}:{actions:Object.freeze(e.actions.map(e=>Object.freeze({id:e.id,label:e.label,...e.disabled===void 0?{}:{disabled:e.disabled},run:()=>t()&&e.disabled!==!0?e.run():void 0})))}})}var nS=`(max-width: 760px)`,rS=`pi-web.promptEnterPreference`;function iS(){return typeof window<`u`&&`matchMedia`in window?window.matchMedia(nS):void 0}function aS(e){return e===`send`||e===`newline`?e:`auto`}function oS(e=uS()){if(e===void 0)return`auto`;try{return aS(e.getItem(rS))}catch{return`auto`}}function sS(e,t=uS()){if(t!==void 0)try{t.setItem(rS,e)}catch{}}function cS(e=iS(),t=oS()){return t===`send`||t!==`newline`&&e?.matches!==!0}function lS(e,t,n=iS()){return e?n?.matches!==!0||t:!1}function uS(){if(typeof window<`u`)try{return window.localStorage}catch{return}}var dS=`composer.send.desktop`,fS=`composer.send.mobile`;function pS(e){return e===`composer.send.desktop`||e===`composer.send.mobile`}function mS(e=oS()){return[!1,!0].map(t=>({id:t?fS:dS,title:t?f(`ui.main.1ad9b8f6af70`,`narrow screen`):f(`ui.main.a6a82014e150`,`desktop`),description:f(`ui.main.9fffd0fc011d`,`One key combination, active only in the message editor. Overrides global shortcuts there.`),group:f(`ui.settingsShortcutsPanel.chatInput`,`Chat input`),shortcut:_S({matches:t},e),run:()=>void 0}))}function hS(e,t,n=oS()){let r=t?.matches===!0?fS:dS;return e[r]===void 0?_S(t,n):e[r]}function gS(e,t){if(t===null)return!1;let n=js(t);return n.length===1&&n[0]===Ns(e)}function _S(e,t){return cS(e,t)?`enter`:`shift+enter`}var vS=tt(class extends nt{constructor(e){super(e),this.wasSelected=!1,this.isElementPart=e.type===et.ELEMENT}update(e,[t,n]){if(!this.isElementPart)throw Error(`scrollWhenSelected must be used on an element`);if(t&&(!this.wasSelected||n!==this.previousKey)){let t=`element`in e?e.element:void 0;requestAnimationFrame(()=>{t instanceof HTMLElement&&t.scrollIntoView({block:`nearest`})})}this.wasSelected=t,this.previousKey=n}render(e,t){}});function yS(e){return e.composedPath().some(e=>e instanceof HTMLButtonElement||e instanceof HTMLAnchorElement&&e.hasAttribute(`href`))}function bS(e,t,n,r){let i=t?f(`ui.main.963044ce5371`,`{arg0} is already the default for new sessions`,{arg0:e}):f(`ui.main.10eaf2c93eb3`,`Use {arg0} as the default for new sessions`,{arg0:e});return s`<button type="button" class="default-pin ui-button ui-button--icon" aria-label=${i} title=${i}
41
+ aria-pressed=${String(t)} ?disabled=${n} @click=${r}>
42
+ <svg aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill=${t?`currentColor`:`none`} stroke="currentColor" stroke-width="1.8">
43
+ <path d="M12 3.2 14.7 8.7l6 .9-4.4 4.2 1 6-5.3-2.8L6.7 19.8l1-6L3.3 9.6l6-.9z" />
44
+ </svg>
45
+ </button>`}function xS(){return s`<div class="default-help"><strong>${f(`ui.main.57b11778906f`,`New session default`)}</strong><span>${f(`ui.main.363dfe7f433e`,`The star only affects newly created sessions.`)}</span></div>`}var SS=e`
46
+ @layer pi-web-base {
47
+ .default-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 12px; color: var(--pi-muted); }
48
+ .default-pin { align-self: stretch; }
49
+ .default-pin[aria-pressed="true"] svg { color: var(--pi-accent); }
50
+
51
+ }
52
+ `,CS=`:host{--ui-dialog-top:min(12dvh, 90px);--ui-dialog-bottom:max(16px, env(safe-area-inset-bottom));color:var(--pi-text);font:14px var(--pi-font,system-ui, sans-serif);position:fixed;inset:0}modal-surface{--modal-surface-place-items:start center;--modal-surface-backdrop-padding:var(--ui-dialog-top) 16px var(--ui-dialog-bottom);--modal-surface-width:min(var(--ui-dialog-width,720px), calc(100vw - 32px));--modal-surface-max-height:min(var(--ui-dialog-max-height,640px), calc(100dvh - var(--ui-dialog-top) - var(--ui-dialog-bottom)))}.ui-dialog-header{border-bottom:1px solid var(--pi-border-muted);flex:none;align-items:stretch;min-width:0;min-height:44px;display:flex}.ui-dialog-title{box-sizing:border-box;overflow-wrap:anywhere;flex:auto;align-self:center;min-width:0;margin:0;padding:12px 16px;font-size:14px;font-weight:600;line-height:20px}.ui-dialog-header>.ui-button{border-inline-start:1px solid var(--pi-border-muted);flex:none}.ui-dialog-body{box-sizing:border-box;flex:auto;min-width:0;min-height:0;padding:16px;overflow:auto}.ui-dialog-footer,.ui-form-actions{flex:none;justify-content:flex-end;align-items:stretch;gap:0;display:flex}.ui-dialog-footer{border-top:1px solid var(--pi-border-muted)}.ui-dialog-footer>.ui-button+.ui-button,.ui-form-actions>.ui-button+.ui-button{border-inline-start:1px solid var(--pi-border-muted)}.ui-dialog-search-row{border-bottom:1px solid var(--pi-border-muted);flex:none;align-items:stretch;min-width:0;display:flex}.ui-dialog-search{box-sizing:border-box;width:100%;min-width:0;min-height:44px;color:var(--pi-text);font:var(--pi-control-font-size,16px)/1.5 var(--pi-control-font-family,var(--pi-font,system-ui, sans-serif));background:0 0;border:0;border-radius:0;flex:auto;margin:0;padding:10px 16px}.ui-dialog-search::placeholder{color:var(--pi-dim)}.ui-dialog-search:focus-visible{outline:2px solid var(--pi-accent);outline-offset:-2px}.ui-dialog-search-row>.ui-button{border-inline-start:1px solid var(--pi-border-muted);flex:none}`,wS=`.ui-selection-list{flex:auto;min-height:0;overflow:auto}.ui-selection-list:focus-visible{outline:2px solid var(--pi-accent);outline-offset:-2px}.ui-selection-option{box-sizing:border-box;width:100%;min-height:44px;color:var(--pi-text);font:14px/20px var(--pi-font,system-ui, sans-serif);text-align:left;white-space:normal;overflow-wrap:anywhere;box-shadow:inset 0 -1px var(--pi-border-muted);padding:10px 16px;display:block}.ui-selection-row{min-width:0;box-shadow:inset 0 -1px var(--pi-border-muted);align-items:stretch;display:flex}.ui-selection-row>.ui-selection-option{width:auto;min-width:0;box-shadow:none;flex:auto}.ui-selection-row>.ui-button--icon[aria-pressed=true]:not(:hover){background:0 0}.ui-selection-row:hover,.ui-selection-option:hover:not(:disabled){background:var(--pi-surface-hover)}.ui-selection-row.selected,.ui-selection-option.selected,.ui-selection-option.selected:hover:not(:disabled){background:var(--pi-selection-bg)}.ui-selection-row:has(.ui-selection-option.selected){background:var(--pi-selection-bg)}.ui-selection-detail{color:var(--pi-muted);margin-top:4px;font-size:12px;line-height:18px;display:block}.ui-dialog-empty{color:var(--pi-muted);text-align:center;padding:24px}`,TS=e`${px}${fx(CS)}`,ES=fx(wS),$=class extends m{constructor(){super(),this.title=f(`ui.commandPicker.select`,`Select`),this.searchable=!1,this.options=[],this.defaultsLoading=!1,this.selectedIndex=0,this.query=``,this.defaultPending=!1,bx.createController(this)}render(){let e=this.filteredOptions();return s`
53
+ <modal-surface .onClose=${()=>this.onCancel?.()} .initialFocus=${this.searchable?`input`:`.options`} .label=${this.title} @keydown=${e=>{this.handleKeyDown(e)}}>
54
+ <header class="ui-dialog-header">
55
+ <strong class="ui-dialog-title">${this.title}</strong>
56
+ <button class="ui-button ui-button--icon" aria-label="${f(`ui.common.close`,`Close`)}" @click=${()=>this.onCancel?.()}>×</button>
57
+ </header>
58
+ ${this.searchable?s`<div class="ui-dialog-search-row"><input class="ui-dialog-search" placeholder="${f(`ui.commandPicker.search`,`Search`)}" .value=${this.query} @input=${e=>{this.handleSearchInput(e)}}></div>`:null}
59
+ ${this.onSetDefault===void 0?g:xS()}
60
+ <div class="options ui-selection-list" tabindex="0">
61
+ ${e.map((e,t)=>this.renderOption(e,t))}
62
+ ${e.length===0?s`<div class="empty ui-dialog-empty">${f(`ui.commandPicker.noMatchingOptions`,`No matching options`)}</div>`:null}
63
+ </div>
64
+ </modal-surface>
65
+ `}firstUpdated(){this.selectInitialValue()}renderOption(e,t){let n=s`
66
+ <button class=${`ui-button ui-selection-option ${t===this.selectedIndex?`selected`:``}`} aria-current=${t===this.selectedIndex?`true`:g} ${vS(t===this.selectedIndex,e.value)} @focus=${()=>{this.selectedIndex=t}} @click=${()=>this.onPick?.(e.value)}>
67
+ <span>${e.label}</span>
68
+ ${e.description!==void 0&&e.description!==``?s`<small class="ui-selection-detail">${e.description}</small>`:null}
69
+ </button>
70
+ `;return this.onSetDefault===void 0?n:s`<div class="default-row ui-selection-row">${n}${bS(e.label,e.value===this.defaultValue,this.defaultsLoading||this.defaultPending,()=>{this.setDefault(e.value)})}</div>`}async setDefault(e){if(!(this.onSetDefault===void 0||this.defaultsLoading||this.defaultPending)){this.defaultPending=!0;try{await this.onSetDefault(e)}catch(e){console.warn(`Failed to set default option`,e)}finally{this.defaultPending=!1}}}selectInitialValue(){if(this.selectedValue===void 0)return;let e=this.filteredOptions().findIndex(e=>e.value===this.selectedValue);e>=0&&(this.selectedIndex=e)}handleSearchInput(e){e.target instanceof HTMLInputElement&&(this.query=e.target.value,this.selectedIndex=0)}filteredOptions(){let e=this.query.trim().toLowerCase();return e===``?this.options:this.options.filter(t=>`${t.label} ${t.description??``} ${t.value}`.toLowerCase().includes(e))}handleKeyDown(e){if(yS(e))return;let t=this.filteredOptions();if(e.key===`ArrowDown`)e.preventDefault(),t.length>0&&(this.selectedIndex=(this.selectedIndex+1)%t.length);else if(e.key===`ArrowUp`)e.preventDefault(),t.length>0&&(this.selectedIndex=(this.selectedIndex-1+t.length)%t.length);else if(e.key===`Enter`){e.preventDefault();let n=t[this.selectedIndex];n&&this.onPick?.(n.value)}}static{this.styles=[TS,ES,SS]}};Q([C()],$.prototype,`title`,void 0),Q([C({type:Boolean})],$.prototype,`searchable`,void 0),Q([C({attribute:!1})],$.prototype,`options`,void 0),Q([C({attribute:!1})],$.prototype,`selectedValue`,void 0),Q([C({attribute:!1})],$.prototype,`defaultValue`,void 0),Q([C({type:Boolean})],$.prototype,`defaultsLoading`,void 0),Q([C({attribute:!1})],$.prototype,`onPick`,void 0),Q([C({attribute:!1})],$.prototype,`onSetDefault`,void 0),Q([C({attribute:!1})],$.prototype,`onCancel`,void 0),Q([Ze()],$.prototype,`selectedIndex`,void 0),Q([Ze()],$.prototype,`query`,void 0),Q([Ze()],$.prototype,`defaultPending`,void 0),$=Q([Je(`command-picker`)],$);export{Ls as $,it as $t,Cx as A,Qa as At,tc as B,Ua as Bt,Nx as C,Po as Ct,Tx as D,ro as Dt,Dx as E,No as Et,gx as F,hr as Ft,dc as G,Yt as Gt,lc as H,Ci as Ht,hx as I,Xn as It,oc as J,dt as Jt,ac as K,Wt as Kt,mx as L,Yn as Lt,bx as M,Bn as Mt,xx as N,Ln as Nt,Ex as O,io as Ot,px as P,Wa as Pt,ks as Q,rt as Qt,fx as R,pr as Rt,Rx as S,Ao as St,Fx as T,lo as Tt,sc as U,Si as Ut,nc as V,nr as Vt,cc as W,Ei as Wt,Ms as X,w as Xt,Os as Y,ft as Yt,As as Z,mt as Zt,Zx as _,Co as _t,SS as a,et as an,cs as at,zx as b,vo as bt,hS as c,C as cn,qo as ct,gS as d,Ge as dn,Yo as dt,ct as en,Es as et,iS as f,qe as fn,Xo as ft,Qx as g,je as gn,Oo as gt,sS as h,Me as hn,So as ht,xS as i,nt as in,ss as it,yx as j,Xa as jt,wx as k,so as kt,mS as l,Je as ln,Jo as lt,lS as m,ze as mn,Go as mt,ES as n,ot as nn,hs as nt,yS as o,$e as on,ls as ot,oS as p,Be as pn,Do as pt,uc as q,It as qt,bS as r,tt as rn,ms as rt,vS as s,Ze as sn,Ko as st,TS as t,st as tn,Ns as tt,pS as u,Ke as un,Zo as ut,Hx as v,ko as vt,Ix as w,Fo as wt,Bx as x,wo as xt,Q as y,Eo as yt,ix as z,rr as zt};