@polyxd/verifier 0.2.2 → 0.3.0

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.
@@ -0,0 +1,15 @@
1
+ var PolyxdWebPreview=(()=>{var yx=Object.create;var po=Object.defineProperty;var bx=Object.getOwnPropertyDescriptor;var vx=Object.getOwnPropertyNames;var wx=Object.getPrototypeOf,kx=Object.prototype.hasOwnProperty;var R=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(a){throw t=0,a}},$x=(e,t)=>{for(var a in t)po(e,a,{get:t[a],enumerable:!0})},$d=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of vx(t))!kx.call(e,r)&&r!==a&&po(e,r,{get:()=>t[r],enumerable:!(o=bx(t,r))||o.enumerable});return e};var Sx=(e,t,a)=>(a=e!=null?yx(wx(e)):{},$d(t||!e||!e.__esModule?po(a,"default",{value:e,enumerable:!0}):a,e)),Cx=e=>$d(po({},"__esModule",{value:!0}),e);var Na=R(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.regexpCode=oe.getEsmExportName=oe.getProperty=oe.safeStringify=oe.stringify=oe.strConcat=oe.addCodeArg=oe.str=oe._=oe.nil=oe._Code=oe.Name=oe.IDENTIFIER=oe._CodeOrName=void 0;var za=class{};oe._CodeOrName=za;oe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Tt=class extends za{constructor(t){if(super(),!oe.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};oe.Name=Tt;var je=class extends za{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((a,o)=>`${a}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((a,o)=>(o instanceof Tt&&(a[o.str]=(a[o.str]||0)+1),a),{})}};oe._Code=je;oe.nil=new je("");function Zl(e,...t){let a=[e[0]],o=0;for(;o<t.length;)un(a,t[o]),a.push(e[++o]);return new je(a)}oe._=Zl;var cn=new je("+");function Ql(e,...t){let a=[_a(e[0])],o=0;for(;o<t.length;)a.push(cn),un(a,t[o]),a.push(cn,_a(e[++o]));return df(a),new je(a)}oe.str=Ql;function un(e,t){t instanceof je?e.push(...t._items):t instanceof Tt?e.push(t):e.push(cf(t))}oe.addCodeArg=un;function df(e){let t=1;for(;t<e.length-1;){if(e[t]===cn){let a=lf(e[t-1],e[t+1]);if(a!==void 0){e.splice(t-1,3,a);continue}e[t++]="+"}t++}}function lf(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Tt||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Tt))return`"${e}${t.slice(1)}`}function pf(e,t){return t.emptyStr()?e:e.emptyStr()?t:Ql`${e}${t}`}oe.strConcat=pf;function cf(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:_a(Array.isArray(e)?e.join(","):e)}function uf(e){return new je(_a(e))}oe.stringify=uf;function _a(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}oe.safeStringify=_a;function xf(e){return typeof e=="string"&&oe.IDENTIFIER.test(e)?new je(`.${e}`):Zl`[${e}]`}oe.getProperty=xf;function ff(e){if(typeof e=="string"&&oe.IDENTIFIER.test(e))return new je(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}oe.getEsmExportName=ff;function mf(e){return new je(e.toString())}oe.regexpCode=mf});var mn=R(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.ValueScope=Ne.ValueScopeName=Ne.Scope=Ne.varKinds=Ne.UsedValueState=void 0;var _e=Na(),xn=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Eo;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Eo||(Ne.UsedValueState=Eo={}));Ne.varKinds={const:new _e.Name("const"),let:new _e.Name("let"),var:new _e.Name("var")};var zo=class{constructor({prefixes:t,parent:a}={}){this._names={},this._prefixes=t,this._parent=a}toName(t){return t instanceof _e.Name?t:this.name(t)}name(t){return new _e.Name(this._newName(t))}_newName(t){let a=this._names[t]||this._nameGroup(t);return`${t}${a.index++}`}_nameGroup(t){var a,o;if(!((o=(a=this._parent)===null||a===void 0?void 0:a._prefixes)===null||o===void 0)&&o.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Ne.Scope=zo;var _o=class extends _e.Name{constructor(t,a){super(a),this.prefix=t}setValue(t,{property:a,itemIndex:o}){this.value=t,this.scopePath=(0,_e._)`.${new _e.Name(a)}[${o}]`}};Ne.ValueScopeName=_o;var gf=(0,_e._)`\n`,fn=class extends zo{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?gf:_e.nil}}get(){return this._scope}name(t){return new _o(t,this._newName(t))}value(t,a){var o;if(a.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:i}=r,n=(o=a.key)!==null&&o!==void 0?o:a.ref,d=this._values[i];if(d){let c=d.get(n);if(c)return c}else d=this._values[i]=new Map;d.set(n,r);let l=this._scope[i]||(this._scope[i]=[]),p=l.length;return l[p]=a.ref,r.setValue(a,{property:i,itemIndex:p}),r}getValue(t,a){let o=this._values[t];if(o)return o.get(a)}scopeRefs(t,a=this._values){return this._reduceValues(a,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,_e._)`${t}${o.scopePath}`})}scopeCode(t=this._values,a,o){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},a,o)}_reduceValues(t,a,o={},r){let i=_e.nil;for(let n in t){let d=t[n];if(!d)continue;let l=o[n]=o[n]||new Map;d.forEach(p=>{if(l.has(p))return;l.set(p,Eo.Started);let c=a(p);if(c){let u=this.opts.es5?Ne.varKinds.var:Ne.varKinds.const;i=(0,_e._)`${i}${u} ${p} = ${c};${this.opts._n}`}else if(c=r?.(p))i=(0,_e._)`${i}${c}${this.opts._n}`;else throw new xn(p);l.set(p,Eo.Completed)})}return i}};Ne.ValueScope=fn});var J=R(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.or=X.and=X.not=X.CodeGen=X.operators=X.varKinds=X.ValueScopeName=X.ValueScope=X.Scope=X.Name=X.regexpCode=X.stringify=X.getProperty=X.nil=X.strConcat=X.str=X._=void 0;var ee=Na(),Le=mn(),ht=Na();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return ht._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return ht.str}});Object.defineProperty(X,"strConcat",{enumerable:!0,get:function(){return ht.strConcat}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return ht.nil}});Object.defineProperty(X,"getProperty",{enumerable:!0,get:function(){return ht.getProperty}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return ht.stringify}});Object.defineProperty(X,"regexpCode",{enumerable:!0,get:function(){return ht.regexpCode}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return ht.Name}});var To=mn();Object.defineProperty(X,"Scope",{enumerable:!0,get:function(){return To.Scope}});Object.defineProperty(X,"ValueScope",{enumerable:!0,get:function(){return To.ValueScope}});Object.defineProperty(X,"ValueScopeName",{enumerable:!0,get:function(){return To.ValueScopeName}});Object.defineProperty(X,"varKinds",{enumerable:!0,get:function(){return To.varKinds}});X.operators={GT:new ee._Code(">"),GTE:new ee._Code(">="),LT:new ee._Code("<"),LTE:new ee._Code("<="),EQ:new ee._Code("==="),NEQ:new ee._Code("!=="),NOT:new ee._Code("!"),OR:new ee._Code("||"),AND:new ee._Code("&&"),ADD:new ee._Code("+")};var st=class{optimizeNodes(){return this}optimizeNames(t,a){return this}},gn=class extends st{constructor(t,a,o){super(),this.varKind=t,this.name=a,this.rhs=o}render({es5:t,_n:a}){let o=t?Le.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${r};`+a}optimizeNames(t,a){if(t[this.name.str])return this.rhs&&(this.rhs=ia(this.rhs,t,a)),this}get names(){return this.rhs instanceof ee._CodeOrName?this.rhs.names:{}}},No=class extends st{constructor(t,a,o){super(),this.lhs=t,this.rhs=a,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,a){if(!(this.lhs instanceof ee.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=ia(this.rhs,t,a),this}get names(){let t=this.lhs instanceof ee.Name?{}:{...this.lhs.names};return Po(t,this.rhs)}},hn=class extends No{constructor(t,a,o,r){super(t,o,r),this.op=a}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},yn=class extends st{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},bn=class extends st{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},vn=class extends st{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},wn=class extends st{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,a){return this.code=ia(this.code,t,a),this}get names(){return this.code instanceof ee._CodeOrName?this.code.names:{}}},Ma=class extends st{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((a,o)=>a+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,a=t.length;for(;a--;){let o=t[a].optimizeNodes();Array.isArray(o)?t.splice(a,1,...o):o?t[a]=o:t.splice(a,1)}return t.length>0?this:void 0}optimizeNames(t,a){let{nodes:o}=this,r=o.length;for(;r--;){let i=o[r];i.optimizeNames(t,a)||(hf(t,i.names),o.splice(r,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,a)=>Dt(t,a.names),{})}},dt=class extends Ma{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},kn=class extends Ma{},ra=class extends dt{};ra.kind="else";var Rt=class e extends dt{constructor(t,a){super(a),this.condition=t}render(t){let a=`if(${this.condition})`+super.render(t);return this.else&&(a+="else "+this.else.render(t)),a}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let a=this.else;if(a){let o=a.optimizeNodes();a=this.else=Array.isArray(o)?new ra(o):o}if(a)return t===!1?a instanceof e?a:a.nodes:this.nodes.length?this:new e(ep(t),a instanceof e?[a]:a.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,a){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,a),!!(super.optimizeNames(t,a)||this.else))return this.condition=ia(this.condition,t,a),this}get names(){let t=super.names;return Po(t,this.condition),this.else&&Dt(t,this.else.names),t}};Rt.kind="if";var jt=class extends dt{};jt.kind="for";var $n=class extends jt{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,a){if(super.optimizeNames(t,a))return this.iteration=ia(this.iteration,t,a),this}get names(){return Dt(super.names,this.iteration.names)}},Sn=class extends jt{constructor(t,a,o,r){super(),this.varKind=t,this.name=a,this.from=o,this.to=r}render(t){let a=t.es5?Le.varKinds.var:this.varKind,{name:o,from:r,to:i}=this;return`for(${a} ${o}=${r}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=Po(super.names,this.from);return Po(t,this.to)}},Mo=class extends jt{constructor(t,a,o,r){super(),this.loop=t,this.varKind=a,this.name=o,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,a){if(super.optimizeNames(t,a))return this.iterable=ia(this.iterable,t,a),this}get names(){return Dt(super.names,this.iterable.names)}},Pa=class extends dt{constructor(t,a,o){super(),this.name=t,this.args=a,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Pa.kind="func";var Ta=class extends Ma{render(t){return"return "+super.render(t)}};Ta.kind="return";var Cn=class extends dt{render(t){let a="try"+super.render(t);return this.catch&&(a+=this.catch.render(t)),this.finally&&(a+=this.finally.render(t)),a}optimizeNodes(){var t,a;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(a=this.finally)===null||a===void 0||a.optimizeNodes(),this}optimizeNames(t,a){var o,r;return super.optimizeNames(t,a),(o=this.catch)===null||o===void 0||o.optimizeNames(t,a),(r=this.finally)===null||r===void 0||r.optimizeNames(t,a),this}get names(){let t=super.names;return this.catch&&Dt(t,this.catch.names),this.finally&&Dt(t,this.finally.names),t}},Ra=class extends dt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Ra.kind="catch";var ja=class extends dt{render(t){return"finally"+super.render(t)}};ja.kind="finally";var In=class{constructor(t,a={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...a,_n:a.lines?`
2
+ `:""},this._extScope=t,this._scope=new Le.Scope({parent:t}),this._nodes=[new kn]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,a){let o=this._extScope.value(t,a);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,a){return this._extScope.getValue(t,a)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,a,o,r){let i=this._scope.toName(a);return o!==void 0&&r&&(this._constants[i.str]=o),this._leafNode(new gn(t,i,o)),i}const(t,a,o){return this._def(Le.varKinds.const,t,a,o)}let(t,a,o){return this._def(Le.varKinds.let,t,a,o)}var(t,a,o){return this._def(Le.varKinds.var,t,a,o)}assign(t,a,o){return this._leafNode(new No(t,a,o))}add(t,a){return this._leafNode(new hn(t,X.operators.ADD,a))}code(t){return typeof t=="function"?t():t!==ee.nil&&this._leafNode(new wn(t)),this}object(...t){let a=["{"];for(let[o,r]of t)a.length>1&&a.push(","),a.push(o),(o!==r||this.opts.es5)&&(a.push(":"),(0,ee.addCodeArg)(a,r));return a.push("}"),new ee._Code(a)}if(t,a,o){if(this._blockNode(new Rt(t)),a&&o)this.code(a).else().code(o).endIf();else if(a)this.code(a).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Rt(t))}else(){return this._elseNode(new ra)}endIf(){return this._endBlockNode(Rt,ra)}_for(t,a){return this._blockNode(t),a&&this.code(a).endFor(),this}for(t,a){return this._for(new $n(t),a)}forRange(t,a,o,r,i=this.opts.es5?Le.varKinds.var:Le.varKinds.let){let n=this._scope.toName(t);return this._for(new Sn(i,n,a,o),()=>r(n))}forOf(t,a,o,r=Le.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let n=a instanceof ee.Name?a:this.var("_arr",a);return this.forRange("_i",0,(0,ee._)`${n}.length`,d=>{this.var(i,(0,ee._)`${n}[${d}]`),o(i)})}return this._for(new Mo("of",r,i,a),()=>o(i))}forIn(t,a,o,r=this.opts.es5?Le.varKinds.var:Le.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ee._)`Object.keys(${a})`,o);let i=this._scope.toName(t);return this._for(new Mo("in",r,i,a),()=>o(i))}endFor(){return this._endBlockNode(jt)}label(t){return this._leafNode(new yn(t))}break(t){return this._leafNode(new bn(t))}return(t){let a=new Ta;if(this._blockNode(a),this.code(t),a.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ta)}try(t,a,o){if(!a&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Cn;if(this._blockNode(r),this.code(t),a){let i=this.name("e");this._currNode=r.catch=new Ra(i),a(i)}return o&&(this._currNode=r.finally=new ja,this.code(o)),this._endBlockNode(Ra,ja)}throw(t){return this._leafNode(new vn(t))}block(t,a){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(a),this}endBlock(t){let a=this._blockStarts.pop();if(a===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-a;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=a,this}func(t,a=ee.nil,o,r){return this._blockNode(new Pa(t,a,o)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Pa)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,a){let o=this._currNode;if(o instanceof t||a&&o instanceof a)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${a?`${t.kind}/${a.kind}`:t.kind}"`)}_elseNode(t){let a=this._currNode;if(!(a instanceof Rt))throw new Error('CodeGen: "else" without "if"');return this._currNode=a.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let a=this._nodes;a[a.length-1]=t}};X.CodeGen=In;function Dt(e,t){for(let a in t)e[a]=(e[a]||0)+(t[a]||0);return e}function Po(e,t){return t instanceof ee._CodeOrName?Dt(e,t.names):e}function ia(e,t,a){if(e instanceof ee.Name)return o(e);if(!r(e))return e;return new ee._Code(e._items.reduce((i,n)=>(n instanceof ee.Name&&(n=o(n)),n instanceof ee._Code?i.push(...n._items):i.push(n),i),[]));function o(i){let n=a[i.str];return n===void 0||t[i.str]!==1?i:(delete t[i.str],n)}function r(i){return i instanceof ee._Code&&i._items.some(n=>n instanceof ee.Name&&t[n.str]===1&&a[n.str]!==void 0)}}function hf(e,t){for(let a in t)e[a]=(e[a]||0)-(t[a]||0)}function ep(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ee._)`!${An(e)}`}X.not=ep;var yf=tp(X.operators.AND);function bf(...e){return e.reduce(yf)}X.and=bf;var vf=tp(X.operators.OR);function wf(...e){return e.reduce(vf)}X.or=wf;function tp(e){return(t,a)=>t===ee.nil?a:a===ee.nil?t:(0,ee._)`${An(t)} ${e} ${An(a)}`}function An(e){return e instanceof ee.Name?e:(0,ee._)`(${e})`}});var Q=R(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.checkStrictMode=Z.getErrorPath=Z.Type=Z.useFunc=Z.setEvaluated=Z.evaluatedPropsToName=Z.mergeEvaluated=Z.eachItem=Z.unescapeJsonPointer=Z.escapeJsonPointer=Z.escapeFragment=Z.unescapeFragment=Z.schemaRefOrVal=Z.schemaHasRulesButRef=Z.schemaHasRules=Z.checkUnknownRules=Z.alwaysValidSchema=Z.toHash=void 0;var ie=J(),kf=Na();function $f(e){let t={};for(let a of e)t[a]=!0;return t}Z.toHash=$f;function Sf(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(rp(e,t),!ip(t,e.self.RULES.all))}Z.alwaysValidSchema=Sf;function rp(e,t=e.schema){let{opts:a,self:o}=e;if(!a.strictSchema||typeof t=="boolean")return;let r=o.RULES.keywords;for(let i in t)r[i]||dp(e,`unknown keyword: "${i}"`)}Z.checkUnknownRules=rp;function ip(e,t){if(typeof e=="boolean")return!e;for(let a in e)if(t[a])return!0;return!1}Z.schemaHasRules=ip;function Cf(e,t){if(typeof e=="boolean")return!e;for(let a in e)if(a!=="$ref"&&t.all[a])return!0;return!1}Z.schemaHasRulesButRef=Cf;function If({topSchemaRef:e,schemaPath:t},a,o,r){if(!r){if(typeof a=="number"||typeof a=="boolean")return a;if(typeof a=="string")return(0,ie._)`${a}`}return(0,ie._)`${e}${t}${(0,ie.getProperty)(o)}`}Z.schemaRefOrVal=If;function Af(e){return np(decodeURIComponent(e))}Z.unescapeFragment=Af;function Ef(e){return encodeURIComponent(zn(e))}Z.escapeFragment=Ef;function zn(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=zn;function np(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=np;function zf(e,t){if(Array.isArray(e))for(let a of e)t(a);else t(e)}Z.eachItem=zf;function ap({mergeNames:e,mergeToName:t,mergeValues:a,resultToName:o}){return(r,i,n,d)=>{let l=n===void 0?i:n instanceof ie.Name?(i instanceof ie.Name?e(r,i,n):t(r,i,n),n):i instanceof ie.Name?(t(r,n,i),i):a(i,n);return d===ie.Name&&!(l instanceof ie.Name)?o(r,l):l}}Z.mergeEvaluated={props:ap({mergeNames:(e,t,a)=>e.if((0,ie._)`${a} !== true && ${t} !== undefined`,()=>{e.if((0,ie._)`${t} === true`,()=>e.assign(a,!0),()=>e.assign(a,(0,ie._)`${a} || {}`).code((0,ie._)`Object.assign(${a}, ${t})`))}),mergeToName:(e,t,a)=>e.if((0,ie._)`${a} !== true`,()=>{t===!0?e.assign(a,!0):(e.assign(a,(0,ie._)`${a} || {}`),_n(e,a,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:sp}),items:ap({mergeNames:(e,t,a)=>e.if((0,ie._)`${a} !== true && ${t} !== undefined`,()=>e.assign(a,(0,ie._)`${t} === true ? true : ${a} > ${t} ? ${a} : ${t}`)),mergeToName:(e,t,a)=>e.if((0,ie._)`${a} !== true`,()=>e.assign(a,t===!0?!0:(0,ie._)`${a} > ${t} ? ${a} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function sp(e,t){if(t===!0)return e.var("props",!0);let a=e.var("props",(0,ie._)`{}`);return t!==void 0&&_n(e,a,t),a}Z.evaluatedPropsToName=sp;function _n(e,t,a){Object.keys(a).forEach(o=>e.assign((0,ie._)`${t}${(0,ie.getProperty)(o)}`,!0))}Z.setEvaluated=_n;var op={};function _f(e,t){return e.scopeValue("func",{ref:t,code:op[t.code]||(op[t.code]=new kf._Code(t.code))})}Z.useFunc=_f;var En;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(En||(Z.Type=En={}));function Nf(e,t,a){if(e instanceof ie.Name){let o=t===En.Num;return a?o?(0,ie._)`"[" + ${e} + "]"`:(0,ie._)`"['" + ${e} + "']"`:o?(0,ie._)`"/" + ${e}`:(0,ie._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return a?(0,ie.getProperty)(e).toString():"/"+zn(e)}Z.getErrorPath=Nf;function dp(e,t,a=e.opts.strictSchema){if(a){if(t=`strict mode: ${t}`,a===!0)throw new Error(t);e.self.logger.warn(t)}}Z.checkStrictMode=dp});var De=R(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var ve=J(),Mf={data:new ve.Name("data"),valCxt:new ve.Name("valCxt"),instancePath:new ve.Name("instancePath"),parentData:new ve.Name("parentData"),parentDataProperty:new ve.Name("parentDataProperty"),rootData:new ve.Name("rootData"),dynamicAnchors:new ve.Name("dynamicAnchors"),vErrors:new ve.Name("vErrors"),errors:new ve.Name("errors"),this:new ve.Name("this"),self:new ve.Name("self"),scope:new ve.Name("scope"),json:new ve.Name("json"),jsonPos:new ve.Name("jsonPos"),jsonLen:new ve.Name("jsonLen"),jsonPart:new ve.Name("jsonPart")};Nn.default=Mf});var Da=R(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.extendErrors=we.resetErrorsCount=we.reportExtraError=we.reportError=we.keyword$DataError=we.keywordError=void 0;var te=J(),Ro=Q(),Ce=De();we.keywordError={message:({keyword:e})=>(0,te.str)`must pass "${e}" keyword validation`};we.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,te.str)`"${e}" keyword must be ${t} ($data)`:(0,te.str)`"${e}" keyword is invalid ($data)`};function Pf(e,t=we.keywordError,a,o){let{it:r}=e,{gen:i,compositeRule:n,allErrors:d}=r,l=cp(e,t,a);o??(n||d)?lp(i,l):pp(r,(0,te._)`[${l}]`)}we.reportError=Pf;function Tf(e,t=we.keywordError,a){let{it:o}=e,{gen:r,compositeRule:i,allErrors:n}=o,d=cp(e,t,a);lp(r,d),i||n||pp(o,Ce.default.vErrors)}we.reportExtraError=Tf;function Rf(e,t){e.assign(Ce.default.errors,t),e.if((0,te._)`${Ce.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,te._)`${Ce.default.vErrors}.length`,t),()=>e.assign(Ce.default.vErrors,null)))}we.resetErrorsCount=Rf;function jf({gen:e,keyword:t,schemaValue:a,data:o,errsCount:r,it:i}){if(r===void 0)throw new Error("ajv implementation error");let n=e.name("err");e.forRange("i",r,Ce.default.errors,d=>{e.const(n,(0,te._)`${Ce.default.vErrors}[${d}]`),e.if((0,te._)`${n}.instancePath === undefined`,()=>e.assign((0,te._)`${n}.instancePath`,(0,te.strConcat)(Ce.default.instancePath,i.errorPath))),e.assign((0,te._)`${n}.schemaPath`,(0,te.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,te._)`${n}.schema`,a),e.assign((0,te._)`${n}.data`,o))})}we.extendErrors=jf;function lp(e,t){let a=e.const("err",t);e.if((0,te._)`${Ce.default.vErrors} === null`,()=>e.assign(Ce.default.vErrors,(0,te._)`[${a}]`),(0,te._)`${Ce.default.vErrors}.push(${a})`),e.code((0,te._)`${Ce.default.errors}++`)}function pp(e,t){let{gen:a,validateName:o,schemaEnv:r}=e;r.$async?a.throw((0,te._)`new ${e.ValidationError}(${t})`):(a.assign((0,te._)`${o}.errors`,t),a.return(!1))}var Ft={keyword:new te.Name("keyword"),schemaPath:new te.Name("schemaPath"),params:new te.Name("params"),propertyName:new te.Name("propertyName"),message:new te.Name("message"),schema:new te.Name("schema"),parentSchema:new te.Name("parentSchema")};function cp(e,t,a){let{createErrors:o}=e.it;return o===!1?(0,te._)`{}`:Df(e,t,a)}function Df(e,t,a={}){let{gen:o,it:r}=e,i=[Ff(r,a),Hf(e,a)];return Uf(e,t,i),o.object(...i)}function Ff({errorPath:e},{instancePath:t}){let a=t?(0,te.str)`${e}${(0,Ro.getErrorPath)(t,Ro.Type.Str)}`:e;return[Ce.default.instancePath,(0,te.strConcat)(Ce.default.instancePath,a)]}function Hf({keyword:e,it:{errSchemaPath:t}},{schemaPath:a,parentSchema:o}){let r=o?t:(0,te.str)`${t}/${e}`;return a&&(r=(0,te.str)`${r}${(0,Ro.getErrorPath)(a,Ro.Type.Str)}`),[Ft.schemaPath,r]}function Uf(e,{params:t,message:a},o){let{keyword:r,data:i,schemaValue:n,it:d}=e,{opts:l,propertyName:p,topSchemaRef:c,schemaPath:u}=d;o.push([Ft.keyword,r],[Ft.params,typeof t=="function"?t(e):t||(0,te._)`{}`]),l.messages&&o.push([Ft.message,typeof a=="function"?a(e):a]),l.verbose&&o.push([Ft.schema,n],[Ft.parentSchema,(0,te._)`${c}${u}`],[Ce.default.data,i]),p&&o.push([Ft.propertyName,p])}});var xp=R(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.boolOrEmptySchema=na.topBoolOrEmptySchema=void 0;var Of=Da(),qf=J(),Bf=De(),Lf={message:"boolean schema is false"};function Vf(e){let{gen:t,schema:a,validateName:o}=e;a===!1?up(e,!1):typeof a=="object"&&a.$async===!0?t.return(Bf.default.data):(t.assign((0,qf._)`${o}.errors`,null),t.return(!0))}na.topBoolOrEmptySchema=Vf;function Kf(e,t){let{gen:a,schema:o}=e;o===!1?(a.var(t,!1),up(e)):a.var(t,!0)}na.boolOrEmptySchema=Kf;function up(e,t){let{gen:a,data:o}=e,r={gen:a,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Of.reportError)(r,Lf,void 0,t)}});var Mn=R(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.getRules=sa.isJSONType=void 0;var Gf=["string","number","integer","boolean","null","object","array"],Wf=new Set(Gf);function Jf(e){return typeof e=="string"&&Wf.has(e)}sa.isJSONType=Jf;function Yf(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}sa.getRules=Yf});var Pn=R(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.shouldUseRule=yt.shouldUseGroup=yt.schemaHasRulesForType=void 0;function Xf({schema:e,self:t},a){let o=t.RULES.types[a];return o&&o!==!0&&fp(e,o)}yt.schemaHasRulesForType=Xf;function fp(e,t){return t.rules.some(a=>mp(e,a))}yt.shouldUseGroup=fp;function mp(e,t){var a;return e[t.keyword]!==void 0||((a=t.definition.implements)===null||a===void 0?void 0:a.some(o=>e[o]!==void 0))}yt.shouldUseRule=mp});var Fa=R(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.reportTypeError=ke.checkDataTypes=ke.checkDataType=ke.coerceAndCheckDataType=ke.getJSONTypes=ke.getSchemaTypes=ke.DataType=void 0;var Zf=Mn(),Qf=Pn(),em=Da(),Y=J(),gp=Q(),da;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(da||(ke.DataType=da={}));function tm(e){let t=hp(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}ke.getSchemaTypes=tm;function hp(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Zf.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}ke.getJSONTypes=hp;function am(e,t){let{gen:a,data:o,opts:r}=e,i=om(t,r.coerceTypes),n=t.length>0&&!(i.length===0&&t.length===1&&(0,Qf.schemaHasRulesForType)(e,t[0]));if(n){let d=Rn(t,o,r.strictNumbers,da.Wrong);a.if(d,()=>{i.length?rm(e,t,i):jn(e)})}return n}ke.coerceAndCheckDataType=am;var yp=new Set(["string","number","integer","boolean","null"]);function om(e,t){return t?e.filter(a=>yp.has(a)||t==="array"&&a==="array"):[]}function rm(e,t,a){let{gen:o,data:r,opts:i}=e,n=o.let("dataType",(0,Y._)`typeof ${r}`),d=o.let("coerced",(0,Y._)`undefined`);i.coerceTypes==="array"&&o.if((0,Y._)`${n} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,(0,Y._)`${r}[0]`).assign(n,(0,Y._)`typeof ${r}`).if(Rn(t,r,i.strictNumbers),()=>o.assign(d,r))),o.if((0,Y._)`${d} !== undefined`);for(let p of a)(yp.has(p)||p==="array"&&i.coerceTypes==="array")&&l(p);o.else(),jn(e),o.endIf(),o.if((0,Y._)`${d} !== undefined`,()=>{o.assign(r,d),im(e,d)});function l(p){switch(p){case"string":o.elseIf((0,Y._)`${n} == "number" || ${n} == "boolean"`).assign(d,(0,Y._)`"" + ${r}`).elseIf((0,Y._)`${r} === null`).assign(d,(0,Y._)`""`);return;case"number":o.elseIf((0,Y._)`${n} == "boolean" || ${r} === null
3
+ || (${n} == "string" && ${r} && ${r} == +${r})`).assign(d,(0,Y._)`+${r}`);return;case"integer":o.elseIf((0,Y._)`${n} === "boolean" || ${r} === null
4
+ || (${n} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(d,(0,Y._)`+${r}`);return;case"boolean":o.elseIf((0,Y._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(d,!1).elseIf((0,Y._)`${r} === "true" || ${r} === 1`).assign(d,!0);return;case"null":o.elseIf((0,Y._)`${r} === "" || ${r} === 0 || ${r} === false`),o.assign(d,null);return;case"array":o.elseIf((0,Y._)`${n} === "string" || ${n} === "number"
5
+ || ${n} === "boolean" || ${r} === null`).assign(d,(0,Y._)`[${r}]`)}}}function im({gen:e,parentData:t,parentDataProperty:a},o){e.if((0,Y._)`${t} !== undefined`,()=>e.assign((0,Y._)`${t}[${a}]`,o))}function Tn(e,t,a,o=da.Correct){let r=o===da.Correct?Y.operators.EQ:Y.operators.NEQ,i;switch(e){case"null":return(0,Y._)`${t} ${r} null`;case"array":i=(0,Y._)`Array.isArray(${t})`;break;case"object":i=(0,Y._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=n((0,Y._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=n();break;default:return(0,Y._)`typeof ${t} ${r} ${e}`}return o===da.Correct?i:(0,Y.not)(i);function n(d=Y.nil){return(0,Y.and)((0,Y._)`typeof ${t} == "number"`,d,a?(0,Y._)`isFinite(${t})`:Y.nil)}}ke.checkDataType=Tn;function Rn(e,t,a,o){if(e.length===1)return Tn(e[0],t,a,o);let r,i=(0,gp.toHash)(e);if(i.array&&i.object){let n=(0,Y._)`typeof ${t} != "object"`;r=i.null?n:(0,Y._)`!${t} || ${n}`,delete i.null,delete i.array,delete i.object}else r=Y.nil;i.number&&delete i.integer;for(let n in i)r=(0,Y.and)(r,Tn(n,t,a,o));return r}ke.checkDataTypes=Rn;var nm={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Y._)`{type: ${e}}`:(0,Y._)`{type: ${t}}`};function jn(e){let t=sm(e);(0,em.reportError)(t,nm)}ke.reportTypeError=jn;function sm(e){let{gen:t,data:a,schema:o}=e,r=(0,gp.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:a,schema:o.type,schemaCode:r,schemaValue:r,parentSchema:o,params:{},it:e}}});var vp=R(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.assignDefaults=void 0;var la=J(),dm=Q();function lm(e,t){let{properties:a,items:o}=e.schema;if(t==="object"&&a)for(let r in a)bp(e,r,a[r].default);else t==="array"&&Array.isArray(o)&&o.forEach((r,i)=>bp(e,i,r.default))}jo.assignDefaults=lm;function bp(e,t,a){let{gen:o,compositeRule:r,data:i,opts:n}=e;if(a===void 0)return;let d=(0,la._)`${i}${(0,la.getProperty)(t)}`;if(r){(0,dm.checkStrictMode)(e,`default is ignored for: ${d}`);return}let l=(0,la._)`${d} === undefined`;n.useDefaults==="empty"&&(l=(0,la._)`${l} || ${d} === null || ${d} === ""`),o.if(l,(0,la._)`${d} = ${(0,la.stringify)(a)}`)}});var Fe=R(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.validateUnion=re.validateArray=re.usePattern=re.callValidateCode=re.schemaProperties=re.allSchemaProperties=re.noPropertyInData=re.propertyInData=re.isOwnProperty=re.hasPropFunc=re.reportMissingProp=re.checkMissingProp=re.checkReportMissingProp=void 0;var le=J(),Dn=Q(),bt=De(),pm=Q();function cm(e,t){let{gen:a,data:o,it:r}=e;a.if(Hn(a,o,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,le._)`${t}`},!0),e.error()})}re.checkReportMissingProp=cm;function um({gen:e,data:t,it:{opts:a}},o,r){return(0,le.or)(...o.map(i=>(0,le.and)(Hn(e,t,i,a.ownProperties),(0,le._)`${r} = ${i}`)))}re.checkMissingProp=um;function xm(e,t){e.setParams({missingProperty:t},!0),e.error()}re.reportMissingProp=xm;function wp(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,le._)`Object.prototype.hasOwnProperty`})}re.hasPropFunc=wp;function Fn(e,t,a){return(0,le._)`${wp(e)}.call(${t}, ${a})`}re.isOwnProperty=Fn;function fm(e,t,a,o){let r=(0,le._)`${t}${(0,le.getProperty)(a)} !== undefined`;return o?(0,le._)`${r} && ${Fn(e,t,a)}`:r}re.propertyInData=fm;function Hn(e,t,a,o){let r=(0,le._)`${t}${(0,le.getProperty)(a)} === undefined`;return o?(0,le.or)(r,(0,le.not)(Fn(e,t,a))):r}re.noPropertyInData=Hn;function kp(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}re.allSchemaProperties=kp;function mm(e,t){return kp(t).filter(a=>!(0,Dn.alwaysValidSchema)(e,t[a]))}re.schemaProperties=mm;function gm({schemaCode:e,data:t,it:{gen:a,topSchemaRef:o,schemaPath:r,errorPath:i},it:n},d,l,p){let c=p?(0,le._)`${e}, ${t}, ${o}${r}`:t,u=[[bt.default.instancePath,(0,le.strConcat)(bt.default.instancePath,i)],[bt.default.parentData,n.parentData],[bt.default.parentDataProperty,n.parentDataProperty],[bt.default.rootData,bt.default.rootData]];n.opts.dynamicRef&&u.push([bt.default.dynamicAnchors,bt.default.dynamicAnchors]);let x=(0,le._)`${c}, ${a.object(...u)}`;return l!==le.nil?(0,le._)`${d}.call(${l}, ${x})`:(0,le._)`${d}(${x})`}re.callValidateCode=gm;var hm=(0,le._)`new RegExp`;function ym({gen:e,it:{opts:t}},a){let o=t.unicodeRegExp?"u":"",{regExp:r}=t.code,i=r(a,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,le._)`${r.code==="new RegExp"?hm:(0,pm.useFunc)(e,r)}(${a}, ${o})`})}re.usePattern=ym;function bm(e){let{gen:t,data:a,keyword:o,it:r}=e,i=t.name("valid");if(r.allErrors){let d=t.let("valid",!0);return n(()=>t.assign(d,!1)),d}return t.var(i,!0),n(()=>t.break()),i;function n(d){let l=t.const("len",(0,le._)`${a}.length`);t.forRange("i",0,l,p=>{e.subschema({keyword:o,dataProp:p,dataPropType:Dn.Type.Num},i),t.if((0,le.not)(i),d)})}}re.validateArray=bm;function vm(e){let{gen:t,schema:a,keyword:o,it:r}=e;if(!Array.isArray(a))throw new Error("ajv implementation error");if(a.some(l=>(0,Dn.alwaysValidSchema)(r,l))&&!r.opts.unevaluated)return;let n=t.let("valid",!1),d=t.name("_valid");t.block(()=>a.forEach((l,p)=>{let c=e.subschema({keyword:o,schemaProp:p,compositeRule:!0},d);t.assign(n,(0,le._)`${n} || ${d}`),e.mergeValidEvaluated(c,d)||t.if((0,le.not)(n))})),e.result(n,()=>e.reset(),()=>e.error(!0))}re.validateUnion=vm});var Cp=R(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.validateKeywordUsage=Xe.validSchemaType=Xe.funcKeywordCode=Xe.macroKeywordCode=void 0;var Ie=J(),Ht=De(),wm=Fe(),km=Da();function $m(e,t){let{gen:a,keyword:o,schema:r,parentSchema:i,it:n}=e,d=t.macro.call(n.self,r,i,n),l=Sp(a,o,d);n.opts.validateSchema!==!1&&n.self.validateSchema(d,!0);let p=a.name("valid");e.subschema({schema:d,schemaPath:Ie.nil,errSchemaPath:`${n.errSchemaPath}/${o}`,topSchemaRef:l,compositeRule:!0},p),e.pass(p,()=>e.error(!0))}Xe.macroKeywordCode=$m;function Sm(e,t){var a;let{gen:o,keyword:r,schema:i,parentSchema:n,$data:d,it:l}=e;Im(l,t);let p=!d&&t.compile?t.compile.call(l.self,i,n,l):t.validate,c=Sp(o,r,p),u=o.let("valid");e.block$data(u,x),e.ok((a=t.valid)!==null&&a!==void 0?a:u);function x(){if(t.errors===!1)f(),t.modifying&&$p(e),g(()=>e.error());else{let y=t.async?h():m();t.modifying&&$p(e),g(()=>Cm(e,y))}}function h(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,Ie._)`await `),w=>o.assign(u,!1).if((0,Ie._)`${w} instanceof ${l.ValidationError}`,()=>o.assign(y,(0,Ie._)`${w}.errors`),()=>o.throw(w))),y}function m(){let y=(0,Ie._)`${c}.errors`;return o.assign(y,null),f(Ie.nil),y}function f(y=t.async?(0,Ie._)`await `:Ie.nil){let w=l.opts.passContext?Ht.default.this:Ht.default.self,I=!("compile"in t&&!d||t.schema===!1);o.assign(u,(0,Ie._)`${y}${(0,wm.callValidateCode)(e,c,w,I)}`,t.modifying)}function g(y){var w;o.if((0,Ie.not)((w=t.valid)!==null&&w!==void 0?w:u),y)}}Xe.funcKeywordCode=Sm;function $p(e){let{gen:t,data:a,it:o}=e;t.if(o.parentData,()=>t.assign(a,(0,Ie._)`${o.parentData}[${o.parentDataProperty}]`))}function Cm(e,t){let{gen:a}=e;a.if((0,Ie._)`Array.isArray(${t})`,()=>{a.assign(Ht.default.vErrors,(0,Ie._)`${Ht.default.vErrors} === null ? ${t} : ${Ht.default.vErrors}.concat(${t})`).assign(Ht.default.errors,(0,Ie._)`${Ht.default.vErrors}.length`),(0,km.extendErrors)(e)},()=>e.error())}function Im({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Sp(e,t,a){if(a===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof a=="function"?{ref:a}:{ref:a,code:(0,Ie.stringify)(a)})}function Am(e,t,a=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||a&&typeof e>"u")}Xe.validSchemaType=Am;function Em({schema:e,opts:t,self:a,errSchemaPath:o},r,i){if(Array.isArray(r.keyword)?!r.keyword.includes(i):r.keyword!==i)throw new Error("ajv implementation error");let n=r.dependencies;if(n?.some(d=>!Object.prototype.hasOwnProperty.call(e,d)))throw new Error(`parent schema must have dependencies of ${i}: ${n.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[i])){let l=`keyword "${i}" value is invalid at path "${o}": `+a.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")a.logger.error(l);else throw new Error(l)}}Xe.validateKeywordUsage=Em});var Ap=R(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.extendSubschemaMode=vt.extendSubschemaData=vt.getSubschema=void 0;var Ze=J(),Ip=Q();function zm(e,{keyword:t,schemaProp:a,schema:o,schemaPath:r,errSchemaPath:i,topSchemaRef:n}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let d=e.schema[t];return a===void 0?{schema:d,schemaPath:(0,Ze._)`${e.schemaPath}${(0,Ze.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:d[a],schemaPath:(0,Ze._)`${e.schemaPath}${(0,Ze.getProperty)(t)}${(0,Ze.getProperty)(a)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Ip.escapeFragment)(a)}`}}if(o!==void 0){if(r===void 0||i===void 0||n===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:r,topSchemaRef:n,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}vt.getSubschema=zm;function _m(e,t,{dataProp:a,dataPropType:o,data:r,dataTypes:i,propertyName:n}){if(r!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:d}=t;if(a!==void 0){let{errorPath:p,dataPathArr:c,opts:u}=t,x=d.let("data",(0,Ze._)`${t.data}${(0,Ze.getProperty)(a)}`,!0);l(x),e.errorPath=(0,Ze.str)`${p}${(0,Ip.getErrorPath)(a,o,u.jsPropertySyntax)}`,e.parentDataProperty=(0,Ze._)`${a}`,e.dataPathArr=[...c,e.parentDataProperty]}if(r!==void 0){let p=r instanceof Ze.Name?r:d.let("data",r,!0);l(p),n!==void 0&&(e.propertyName=n)}i&&(e.dataTypes=i);function l(p){e.data=p,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,p]}}vt.extendSubschemaData=_m;function Nm(e,{jtdDiscriminator:t,jtdMetadata:a,compositeRule:o,createErrors:r,allErrors:i}){o!==void 0&&(e.compositeRule=o),r!==void 0&&(e.createErrors=r),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=a}vt.extendSubschemaMode=Nm});var Un=R((u2,Ep)=>{"use strict";Ep.exports=function e(t,a){if(t===a)return!0;if(t&&a&&typeof t=="object"&&typeof a=="object"){if(t.constructor!==a.constructor)return!1;var o,r,i;if(Array.isArray(t)){if(o=t.length,o!=a.length)return!1;for(r=o;r--!==0;)if(!e(t[r],a[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(a).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(a,i[r]))return!1;for(r=o;r--!==0;){var n=i[r];if(!e(t[n],a[n]))return!1}return!0}return t!==t&&a!==a}});var _p=R((x2,zp)=>{"use strict";var wt=zp.exports=function(e,t,a){typeof t=="function"&&(a=t,t={}),a=t.cb||a;var o=typeof a=="function"?a:a.pre||function(){},r=a.post||function(){};Do(t,o,r,e,"",e)};wt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};wt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};wt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};wt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Do(e,t,a,o,r,i,n,d,l,p){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,r,i,n,d,l,p);for(var c in o){var u=o[c];if(Array.isArray(u)){if(c in wt.arrayKeywords)for(var x=0;x<u.length;x++)Do(e,t,a,u[x],r+"/"+c+"/"+x,i,r,c,o,x)}else if(c in wt.propsKeywords){if(u&&typeof u=="object")for(var h in u)Do(e,t,a,u[h],r+"/"+c+"/"+Mm(h),i,r,c,o,h)}else(c in wt.keywords||e.allKeys&&!(c in wt.skipKeywords))&&Do(e,t,a,u,r+"/"+c,i,r,c,o)}a(o,r,i,n,d,l,p)}}function Mm(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ha=R(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.getSchemaRefs=Me.resolveUrl=Me.normalizeId=Me._getFullPath=Me.getFullPath=Me.inlineRef=void 0;var Pm=Q(),Tm=Un(),Rm=_p(),jm=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Dm(e,t=!0){return typeof e=="boolean"?!0:t===!0?!On(e):t?Np(e)<=t:!1}Me.inlineRef=Dm;var Fm=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function On(e){for(let t in e){if(Fm.has(t))return!0;let a=e[t];if(Array.isArray(a)&&a.some(On)||typeof a=="object"&&On(a))return!0}return!1}function Np(e){let t=0;for(let a in e){if(a==="$ref")return 1/0;if(t++,!jm.has(a)&&(typeof e[a]=="object"&&(0,Pm.eachItem)(e[a],o=>t+=Np(o)),t===1/0))return 1/0}return t}function Mp(e,t="",a){a!==!1&&(t=pa(t));let o=e.parse(t);return Pp(e,o)}Me.getFullPath=Mp;function Pp(e,t){return e.serialize(t).split("#")[0]+"#"}Me._getFullPath=Pp;var Hm=/#\/?$/;function pa(e){return e?e.replace(Hm,""):""}Me.normalizeId=pa;function Um(e,t,a){return a=pa(a),e.resolve(t,a)}Me.resolveUrl=Um;var Om=/^[a-z_][-a-z0-9._]*$/i;function qm(e,t){if(typeof e=="boolean")return{};let{schemaId:a,uriResolver:o}=this.opts,r=pa(e[a]||t),i={"":r},n=Mp(o,r,!1),d={},l=new Set;return Rm(e,{allKeys:!0},(u,x,h,m)=>{if(m===void 0)return;let f=n+x,g=i[m];typeof u[a]=="string"&&(g=y.call(this,u[a])),w.call(this,u.$anchor),w.call(this,u.$dynamicAnchor),i[x]=g;function y(I){let S=this.opts.uriResolver.resolve;if(I=pa(g?S(g,I):I),l.has(I))throw c(I);l.add(I);let A=this.refs[I];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?p(u,A.schema,I):I!==pa(f)&&(I[0]==="#"?(p(u,d[I],I),d[I]=u):this.refs[I]=f),I}function w(I){if(typeof I=="string"){if(!Om.test(I))throw new Error(`invalid anchor "${I}"`);y.call(this,`#${I}`)}}}),d;function p(u,x,h){if(x!==void 0&&!Tm(u,x))throw c(h)}function c(u){return new Error(`reference "${u}" resolves to more than one schema`)}}Me.getSchemaRefs=qm});var qa=R(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.getData=kt.KeywordCxt=kt.validateFunctionCode=void 0;var Fp=xp(),Tp=Fa(),Bn=Pn(),Fo=Fa(),Bm=vp(),Oa=Cp(),qn=Ap(),q=J(),G=De(),Lm=Ha(),lt=Q(),Ua=Da();function Vm(e){if(Op(e)&&(qp(e),Up(e))){Wm(e);return}Hp(e,()=>(0,Fp.topBoolOrEmptySchema)(e))}kt.validateFunctionCode=Vm;function Hp({gen:e,validateName:t,schema:a,schemaEnv:o,opts:r},i){r.code.es5?e.func(t,(0,q._)`${G.default.data}, ${G.default.valCxt}`,o.$async,()=>{e.code((0,q._)`"use strict"; ${Rp(a,r)}`),Gm(e,r),e.code(i)}):e.func(t,(0,q._)`${G.default.data}, ${Km(r)}`,o.$async,()=>e.code(Rp(a,r)).code(i))}function Km(e){return(0,q._)`{${G.default.instancePath}="", ${G.default.parentData}, ${G.default.parentDataProperty}, ${G.default.rootData}=${G.default.data}${e.dynamicRef?(0,q._)`, ${G.default.dynamicAnchors}={}`:q.nil}}={}`}function Gm(e,t){e.if(G.default.valCxt,()=>{e.var(G.default.instancePath,(0,q._)`${G.default.valCxt}.${G.default.instancePath}`),e.var(G.default.parentData,(0,q._)`${G.default.valCxt}.${G.default.parentData}`),e.var(G.default.parentDataProperty,(0,q._)`${G.default.valCxt}.${G.default.parentDataProperty}`),e.var(G.default.rootData,(0,q._)`${G.default.valCxt}.${G.default.rootData}`),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,q._)`${G.default.valCxt}.${G.default.dynamicAnchors}`)},()=>{e.var(G.default.instancePath,(0,q._)`""`),e.var(G.default.parentData,(0,q._)`undefined`),e.var(G.default.parentDataProperty,(0,q._)`undefined`),e.var(G.default.rootData,G.default.data),t.dynamicRef&&e.var(G.default.dynamicAnchors,(0,q._)`{}`)})}function Wm(e){let{schema:t,opts:a,gen:o}=e;Hp(e,()=>{a.$comment&&t.$comment&&Lp(e),Qm(e),o.let(G.default.vErrors,null),o.let(G.default.errors,0),a.unevaluated&&Jm(e),Bp(e),ag(e)})}function Jm(e){let{gen:t,validateName:a}=e;e.evaluated=t.const("evaluated",(0,q._)`${a}.evaluated`),t.if((0,q._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,q._)`${e.evaluated}.props`,(0,q._)`undefined`)),t.if((0,q._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,q._)`${e.evaluated}.items`,(0,q._)`undefined`))}function Rp(e,t){let a=typeof e=="object"&&e[t.schemaId];return a&&(t.code.source||t.code.process)?(0,q._)`/*# sourceURL=${a} */`:q.nil}function Ym(e,t){if(Op(e)&&(qp(e),Up(e))){Xm(e,t);return}(0,Fp.boolOrEmptySchema)(e,t)}function Up({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let a in e)if(t.RULES.all[a])return!0;return!1}function Op(e){return typeof e.schema!="boolean"}function Xm(e,t){let{schema:a,gen:o,opts:r}=e;r.$comment&&a.$comment&&Lp(e),eg(e),tg(e);let i=o.const("_errs",G.default.errors);Bp(e,i),o.var(t,(0,q._)`${i} === ${G.default.errors}`)}function qp(e){(0,lt.checkUnknownRules)(e),Zm(e)}function Bp(e,t){if(e.opts.jtd)return jp(e,[],!1,t);let a=(0,Tp.getSchemaTypes)(e.schema),o=(0,Tp.coerceAndCheckDataType)(e,a);jp(e,a,!o,t)}function Zm(e){let{schema:t,errSchemaPath:a,opts:o,self:r}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,lt.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${a}"`)}function Qm(e){let{schema:t,opts:a}=e;t.default!==void 0&&a.useDefaults&&a.strictSchema&&(0,lt.checkStrictMode)(e,"default is ignored in the schema root")}function eg(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Lm.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function tg(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Lp({gen:e,schemaEnv:t,schema:a,errSchemaPath:o,opts:r}){let i=a.$comment;if(r.$comment===!0)e.code((0,q._)`${G.default.self}.logger.log(${i})`);else if(typeof r.$comment=="function"){let n=(0,q.str)`${o}/$comment`,d=e.scopeValue("root",{ref:t.root});e.code((0,q._)`${G.default.self}.opts.$comment(${i}, ${n}, ${d}.schema)`)}}function ag(e){let{gen:t,schemaEnv:a,validateName:o,ValidationError:r,opts:i}=e;a.$async?t.if((0,q._)`${G.default.errors} === 0`,()=>t.return(G.default.data),()=>t.throw((0,q._)`new ${r}(${G.default.vErrors})`)):(t.assign((0,q._)`${o}.errors`,G.default.vErrors),i.unevaluated&&og(e),t.return((0,q._)`${G.default.errors} === 0`))}function og({gen:e,evaluated:t,props:a,items:o}){a instanceof q.Name&&e.assign((0,q._)`${t}.props`,a),o instanceof q.Name&&e.assign((0,q._)`${t}.items`,o)}function jp(e,t,a,o){let{gen:r,schema:i,data:n,allErrors:d,opts:l,self:p}=e,{RULES:c}=p;if(i.$ref&&(l.ignoreKeywordsWithRef||!(0,lt.schemaHasRulesButRef)(i,c))){r.block(()=>Kp(e,"$ref",c.all.$ref.definition));return}l.jtd||rg(e,t),r.block(()=>{for(let x of c.rules)u(x);u(c.post)});function u(x){(0,Bn.shouldUseGroup)(i,x)&&(x.type?(r.if((0,Fo.checkDataType)(x.type,n,l.strictNumbers)),Dp(e,x),t.length===1&&t[0]===x.type&&a&&(r.else(),(0,Fo.reportTypeError)(e)),r.endIf()):Dp(e,x),d||r.if((0,q._)`${G.default.errors} === ${o||0}`))}}function Dp(e,t){let{gen:a,schema:o,opts:{useDefaults:r}}=e;r&&(0,Bm.assignDefaults)(e,t.type),a.block(()=>{for(let i of t.rules)(0,Bn.shouldUseRule)(o,i)&&Kp(e,i.keyword,i.definition,t.type)})}function rg(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(ig(e,t),e.opts.allowUnionTypes||ng(e,t),sg(e,e.dataTypes))}function ig(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(a=>{Vp(e.dataTypes,a)||Ln(e,`type "${a}" not allowed by context "${e.dataTypes.join(",")}"`)}),lg(e,t)}}function ng(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Ln(e,"use allowUnionTypes to allow union type keyword")}function sg(e,t){let a=e.self.RULES.all;for(let o in a){let r=a[o];if(typeof r=="object"&&(0,Bn.shouldUseRule)(e.schema,r)){let{type:i}=r.definition;i.length&&!i.some(n=>dg(t,n))&&Ln(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function dg(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Vp(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function lg(e,t){let a=[];for(let o of e.dataTypes)Vp(t,o)?a.push(o):t.includes("integer")&&o==="number"&&a.push("integer");e.dataTypes=a}function Ln(e,t){let a=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${a}" (strictTypes)`,(0,lt.checkStrictMode)(e,t,e.opts.strictTypes)}var Ho=class{constructor(t,a,o){if((0,Oa.validateKeywordUsage)(t,a,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=a.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,lt.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=a.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=a,this.$data)this.schemaCode=t.gen.const("vSchema",Gp(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Oa.validSchemaType)(this.schema,a.schemaType,a.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(a.schemaType)}`);("code"in a?a.trackErrors:a.errors!==!1)&&(this.errsCount=t.gen.const("_errs",G.default.errors))}result(t,a,o){this.failResult((0,q.not)(t),a,o)}failResult(t,a,o){this.gen.if(t),o?o():this.error(),a?(this.gen.else(),a(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,a){this.failResult((0,q.not)(t),void 0,a)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:a}=this;this.fail((0,q._)`${a} !== undefined && (${(0,q.or)(this.invalid$data(),t)})`)}error(t,a,o){if(a){this.setParams(a),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,a){(t?Ua.reportExtraError:Ua.reportError)(this,this.def.error,a)}$dataError(){(0,Ua.reportError)(this,this.def.$dataError||Ua.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ua.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,a){a?Object.assign(this.params,t):this.params=t}block$data(t,a,o=q.nil){this.gen.block(()=>{this.check$data(t,o),a()})}check$data(t=q.nil,a=q.nil){if(!this.$data)return;let{gen:o,schemaCode:r,schemaType:i,def:n}=this;o.if((0,q.or)((0,q._)`${r} === undefined`,a)),t!==q.nil&&o.assign(t,!0),(i.length||n.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==q.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:a,schemaType:o,def:r,it:i}=this;return(0,q.or)(n(),d());function n(){if(o.length){if(!(a instanceof q.Name))throw new Error("ajv implementation error");let l=Array.isArray(o)?o:[o];return(0,q._)`${(0,Fo.checkDataTypes)(l,a,i.opts.strictNumbers,Fo.DataType.Wrong)}`}return q.nil}function d(){if(r.validateSchema){let l=t.scopeValue("validate$data",{ref:r.validateSchema});return(0,q._)`!${l}(${a})`}return q.nil}}subschema(t,a){let o=(0,qn.getSubschema)(this.it,t);(0,qn.extendSubschemaData)(o,this.it,t),(0,qn.extendSubschemaMode)(o,t);let r={...this.it,...o,items:void 0,props:void 0};return Ym(r,a),r}mergeEvaluated(t,a){let{it:o,gen:r}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=lt.mergeEvaluated.props(r,t.props,o.props,a)),o.items!==!0&&t.items!==void 0&&(o.items=lt.mergeEvaluated.items(r,t.items,o.items,a)))}mergeValidEvaluated(t,a){let{it:o,gen:r}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return r.if(a,()=>this.mergeEvaluated(t,q.Name)),!0}};kt.KeywordCxt=Ho;function Kp(e,t,a,o){let r=new Ho(e,a,t);"code"in a?a.code(r,o):r.$data&&a.validate?(0,Oa.funcKeywordCode)(r,a):"macro"in a?(0,Oa.macroKeywordCode)(r,a):(a.compile||a.validate)&&(0,Oa.funcKeywordCode)(r,a)}var pg=/^\/(?:[^~]|~0|~1)*$/,cg=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Gp(e,{dataLevel:t,dataNames:a,dataPathArr:o}){let r,i;if(e==="")return G.default.rootData;if(e[0]==="/"){if(!pg.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,i=G.default.rootData}else{let p=cg.exec(e);if(!p)throw new Error(`Invalid JSON-pointer: ${e}`);let c=+p[1];if(r=p[2],r==="#"){if(c>=t)throw new Error(l("property/index",c));return o[t-c]}if(c>t)throw new Error(l("data",c));if(i=a[t-c],!r)return i}let n=i,d=r.split("/");for(let p of d)p&&(i=(0,q._)`${i}${(0,q.getProperty)((0,lt.unescapeJsonPointer)(p))}`,n=(0,q._)`${n} && ${i}`);return n;function l(p,c){return`Cannot access ${p} ${c} levels up, current level is ${t}`}}kt.getData=Gp});var Uo=R(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});var Vn=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Kn.default=Vn});var Ba=R(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});var Gn=Ha(),Wn=class extends Error{constructor(t,a,o,r){super(r||`can't resolve reference ${o} from id ${a}`),this.missingRef=(0,Gn.resolveUrl)(t,a,o),this.missingSchema=(0,Gn.normalizeId)((0,Gn.getFullPath)(t,this.missingRef))}};Jn.default=Wn});var La=R(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.resolveSchema=He.getCompilingSchema=He.resolveRef=He.compileSchema=He.SchemaEnv=void 0;var Ve=J(),ug=Uo(),Ut=De(),Ke=Ha(),Wp=Q(),xg=qa(),ca=class{constructor(t){var a;this.refs={},this.dynamicAnchors={};let o;typeof t.schema=="object"&&(o=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(a=t.baseId)!==null&&a!==void 0?a:(0,Ke.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};He.SchemaEnv=ca;function Xn(e){let t=Jp.call(this,e);if(t)return t;let a=(0,Ke.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:r}=this.opts.code,{ownProperties:i}=this.opts,n=new Ve.CodeGen(this.scope,{es5:o,lines:r,ownProperties:i}),d;e.$async&&(d=n.scopeValue("Error",{ref:ug.default,code:(0,Ve._)`require("ajv/dist/runtime/validation_error").default`}));let l=n.scopeName("validate");e.validateName=l;let p={gen:n,allErrors:this.opts.allErrors,data:Ut.default.data,parentData:Ut.default.parentData,parentDataProperty:Ut.default.parentDataProperty,dataNames:[Ut.default.data],dataPathArr:[Ve.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:n.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Ve.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:a,baseId:e.baseId||a,schemaPath:Ve.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ve._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(e),(0,xg.validateFunctionCode)(p),n.optimize(this.opts.code.optimize);let u=n.toString();c=`${n.scopeRefs(Ut.default.scope)}return ${u}`,this.opts.code.process&&(c=this.opts.code.process(c,e));let h=new Function(`${Ut.default.self}`,`${Ut.default.scope}`,c)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:l,validateCode:u,scopeValues:n._values}),this.opts.unevaluated){let{props:m,items:f}=p;h.evaluated={props:m instanceof Ve.Name?void 0:m,items:f instanceof Ve.Name?void 0:f,dynamicProps:m instanceof Ve.Name,dynamicItems:f instanceof Ve.Name},h.source&&(h.source.evaluated=(0,Ve.stringify)(h.evaluated))}return e.validate=h,e}catch(u){throw delete e.validate,delete e.validateName,c&&this.logger.error("Error compiling schema, function code:",c),u}finally{this._compilations.delete(e)}}He.compileSchema=Xn;function fg(e,t,a){var o;a=(0,Ke.resolveUrl)(this.opts.uriResolver,t,a);let r=e.refs[a];if(r)return r;let i=hg.call(this,e,a);if(i===void 0){let n=(o=e.localRefs)===null||o===void 0?void 0:o[a],{schemaId:d}=this.opts;n&&(i=new ca({schema:n,schemaId:d,root:e,baseId:t}))}if(i!==void 0)return e.refs[a]=mg.call(this,i)}He.resolveRef=fg;function mg(e){return(0,Ke.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Xn.call(this,e)}function Jp(e){for(let t of this._compilations)if(gg(t,e))return t}He.getCompilingSchema=Jp;function gg(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function hg(e,t){let a;for(;typeof(a=this.refs[t])=="string";)t=a;return a||this.schemas[t]||Oo.call(this,e,t)}function Oo(e,t){let a=this.opts.uriResolver.parse(t),o=(0,Ke._getFullPath)(this.opts.uriResolver,a),r=(0,Ke.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===r)return Yn.call(this,a,e);let i=(0,Ke.normalizeId)(o),n=this.refs[i]||this.schemas[i];if(typeof n=="string"){let d=Oo.call(this,e,n);return typeof d?.schema!="object"?void 0:Yn.call(this,a,d)}if(typeof n?.schema=="object"){if(n.validate||Xn.call(this,n),i===(0,Ke.normalizeId)(t)){let{schema:d}=n,{schemaId:l}=this.opts,p=d[l];return p&&(r=(0,Ke.resolveUrl)(this.opts.uriResolver,r,p)),new ca({schema:d,schemaId:l,root:e,baseId:r})}return Yn.call(this,a,n)}}He.resolveSchema=Oo;var yg=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Yn(e,{baseId:t,schema:a,root:o}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let d of e.fragment.slice(1).split("/")){if(typeof a=="boolean")return;let l=a[(0,Wp.unescapeFragment)(d)];if(l===void 0)return;a=l;let p=typeof a=="object"&&a[this.opts.schemaId];!yg.has(d)&&p&&(t=(0,Ke.resolveUrl)(this.opts.uriResolver,t,p))}let i;if(typeof a!="boolean"&&a.$ref&&!(0,Wp.schemaHasRulesButRef)(a,this.RULES)){let d=(0,Ke.resolveUrl)(this.opts.uriResolver,t,a.$ref);i=Oo.call(this,o,d)}let{schemaId:n}=this.opts;if(i=i||new ca({schema:a,schemaId:n,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var Yp=R((b2,bg)=>{bg.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var os=R((v2,oc)=>{"use strict";var vg=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Qn=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),wg=RegExp.prototype.test.bind(/^\d*$/u),Ot=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),es=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Zp=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),ts=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),kg=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Pe=new Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)Pe[t]="%"+e[t>>4]+e[t&15]}function $e(e){return e<2048?Pe[192|e>>6]+Pe[128|e&63]:e<65536?Pe[224|e>>12]+Pe[128|e>>6&63]+Pe[128|e&63]:Pe[240|e>>18]+Pe[128|e>>12&63]+Pe[128|e>>6&63]+Pe[128|e&63]}function $g(e){let t="",a=0,o=0;for(o=0;o<e.length;o++)if(a=e[o].charCodeAt(0),a!==48){if(!(a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(a=e[o].charCodeAt(0),!(a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102))return"";t+=e[o]}return t}var Sg=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),Cg=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),Ig=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),Ag=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Eg(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!Ig(e[t])){if(e[t]==="%"&&t+2<e.length&&Ot(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function Xp(e){let t=-1,a=0,o=-1,r=0;for(let d=0;d<e.length;d++)e[d]==="0"?(o===-1&&(o=d),r++,r>a&&(a=r,t=o)):(o=-1,r=0);if(a<2)return e.join(":");let i=e.slice(0,t).join(":"),n=e.slice(t+a).join(":");return i+"::"+n}function zg(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let a=t===-1?e.split(":"):e.slice(0,t).split(":"),o=t===-1?[]:e.slice(t+2).split(":");t!==-1&&(a.length===1&&a[0]===""&&(a.length=0),o.length===1&&o[0]===""&&(o.length=0));let r=a.concat(o),i=0;for(let d=0;d<r.length;d++){let l=r[d];if(l==="")return;if(l.indexOf(".")!==-1){if(d!==r.length-1||t!==-1&&o.length===0||!Qn(l))return;i+=2;continue}if(!Sg(l))return;r[d]=parseInt(l,16).toString(16),i++}if(t===-1)return i!==8?void 0:Xp(r);if(i>=8)return;let n=r.slice(0,a.length);for(let d=i;d<8;d++)n.push("0");for(let d=a.length;d<r.length;d++)n.push(r[d]);return Xp(n)}function Zn(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let o=t?e.slice(1,-1):e;if(t&&Cg(o))return o=o.toLowerCase(),{host:`[${o}]`,escapedHost:o,isIPV6:!1,isIPVFuture:!0};if(_g(o,":")<2)return{host:e,isIPV6:!1,error:t};let r="",i=o.indexOf("%");if(i!==-1){let d=o.slice(i,i+3).toLowerCase()==="%25"?3:1;if(r=o.slice(i+d),!Eg(r))return{host:e,isIPV6:!1,error:!0};o=o.slice(0,i)}let n=zg(o);return n===void 0?{host:e,isIPV6:!1,error:!0}:{host:n+(r?"%"+r:""),escapedHost:n+(r?"%25"+r:""),isIPV6:!0}}function _g(e,t){let a=0;for(let o=0;o<e.length;o++)e[o]===t&&a++;return a}function Ng(e){let t=e,a=[],o=-1,r=0;for(;r=t.length;){if(r===1){if(t===".")break;if(t==="/"){a.push("/");break}else{a.push(t);break}}else if(r===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){a.push("/");break}}else if(r===3&&t==="/.."){a.length!==0&&a.pop(),a.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),a.length!==0&&a.pop();continue}}if((o=t.indexOf("/",1))===-1){a.push(t);break}else a.push(t.slice(0,o)),t=t.slice(o)}return a.join("")}var Mg={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Pg=/[@/?#:]/g,Tg=/[@/?#]/g;function Qp(e,t){let a=t?Tg:Pg;return a.lastIndex=0,e.replace(a,o=>Mg[o])}function ec(e,t=!1){if(e.indexOf("%")===-1)return e;let a="";for(let o=0;o<e.length;o++){if(e[o]==="%"&&o+2<e.length){let r=e.slice(o+1,o+3);if(Ot(r)){let i=r.toUpperCase(),n=String.fromCharCode(parseInt(i,16));t&&es(n)?a+=n:a+="%"+i,o+=2;continue}}a+=e[o]}return a}function Rg(e){let t="";for(let a=0;a<e.length;a++){let o=e[a];if(o==="%"&&a+2<e.length){let r=e.slice(a+1,a+3);if(Ot(r)){let i=r.toUpperCase(),n=String.fromCharCode(parseInt(i,16));n!=="."&&es(n)?t+=n:t+="%"+i,a+=2;continue}}if(Zp(o))t+=o;else{let r=e.charCodeAt(a);if(r<128)t+=ac(r)?o:Pe[r];else if(r<55296||r>57343)t+=$e(r);else if(r<=56319&&a+1<e.length){let i=e.charCodeAt(a+1);i>=56320&&i<=57343?(t+=$e(65536+(r-55296<<10)+(i-56320)),a++):t+=$e(65533)}else t+=$e(65533)}}return t}function jg(e,t=!1){let a="",o=t&&e[0]!=="/";for(let r=0;r<e.length;r++){let i=e[r];if(i==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(Ot(n)){a+="%"+n.toUpperCase(),r+=2;continue}}if(i==="/"&&(o=!1),Zp(i)&&(i!==":"||!o))a+=i;else{let n=e.charCodeAt(r);if(n<128)a+=Pe[n];else if(n<55296||n>57343)a+=$e(n);else if(n<=56319&&r+1<e.length){let d=e.charCodeAt(r+1);d>=56320&&d<=57343?(a+=$e(65536+(n-55296<<10)+(d-56320)),r++):a+=$e(65533)}else a+=$e(65533)}}return a}function as(e,t){let a="";for(let o=0;o<e.length;o++){let r=e[o];if(r==="%"&&o+2<e.length){let i=e.slice(o+1,o+3);if(Ot(i)){a+="%"+i.toUpperCase(),o+=2;continue}}if(t(r))a+=r;else{let i=e.charCodeAt(o);if(i<128)a+=Pe[i];else if(i<55296||i>57343)a+=$e(i);else if(i<=56319&&o+1<e.length){let n=e.charCodeAt(o+1);n>=56320&&n<=57343?(a+=$e(65536+(i-55296<<10)+(n-56320)),o++):a+=$e(65533)}else a+=$e(65533)}}return a}function tc(e){return as(e,kg)}function Dg(e){return as(e,ts)}function Fg(e){return as(e,ts)}function ac(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function Hg(e){let t="";for(let a=0;a<e.length;a++){let o=e[a];if(o==="%"&&a+2<e.length){let r=e.slice(a+1,a+3);if(Ot(r)){let i=r.toUpperCase(),n=String.fromCharCode(parseInt(i,16));es(n)?t+=n:t+="%"+i,a+=2;continue}}if(ts(o))t+=o;else{let r=e.charCodeAt(a);if(r<128)t+=ac(r)?o:Pe[r];else if(r<55296||r>57343)t+=$e(r);else if(r<=56319&&a+1<e.length){let i=e.charCodeAt(a+1);i>=56320&&i<=57343?(t+=$e(65536+(r-55296<<10)+(i-56320)),a++):t+=$e(65533)}else t+=$e(65533)}}return t}function Ug(e){let t="";for(let a=0;a<e.length;a++){if(e[a]==="%"&&a+2<e.length){let o=e.slice(a+1,a+3);if(Ot(o)){t+="%"+o.toUpperCase(),a+=2;continue}}t+=escape(e[a])}return t}function Og(e){let t=[];if(e.userinfo!==void 0&&(t.push(tc(e.userinfo)),t.push("@")),e.host!==void 0){let a=e.host;if(!Qn(a)){let o=Zn(a);o.isIPV6!==!0&&o.isIPVFuture!==!0&&(a=ec(a,!0),o=Zn(a)),o.isIPV6===!0||o.isIPVFuture===!0?a=`[${o.escapedHost}]`:a=Qp(a,!1)}t.push(a)}if(typeof e.port=="number"||typeof e.port=="string"){let a=String(e.port);if(!wg(a))throw new TypeError("URI port is malformed.");t.push(":"),t.push(a)}return t.length?t.join(""):void 0}oc.exports={nonSimpleDomain:Ag,recomposeAuthority:Og,reescapeHostDelimiters:Qp,normalizePercentEncoding:ec,normalizePathEncoding:Rg,serializePathEncoding:jg,normalizeQueryFragmentEncoding:Hg,encodeUserinfo:tc,encodeQuery:Dg,encodeFragment:Fg,escapePreservingEscapes:Ug,removeDotSegments:Ng,isIPv4:Qn,isUUID:vg,normalizeIPv6:Zn,stringArrayToHexStripped:$g}});var dc=R((w2,sc)=>{"use strict";var{isUUID:qg}=os(),Bg=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,Lg=["http","https","ws","wss","urn","urn:uuid"];function Vg(e){return Lg.indexOf(e)!==-1}function rs(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function rc(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function ic(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function Kg(e){return e.secure=rs(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Gg(e){if((e.port===(rs(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),a=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=a&&a!=="/"?a:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function Wg(e,t){if(!e.path)return e.error="URN can not be parsed",e;let a=e.path.match(Bg);if(a&&a[0]===e.path){let o=t.scheme||e.scheme||"urn";e.nid=a[1].toLowerCase(),e.nss=a[2];let r=`${o}:${t.nid||e.nid}`,i=is(r);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function Jg(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let a=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),r=`${a}:${t.nid||o}`,i=is(r);i&&(e=i.serialize(e,t));let n=e,d=e.nss;return n.path=`${o||t.nid}:${d}`,t.skipEscape=!0,n}function Yg(e,t){let a=e;return a.uuid=a.nss,a.nss=void 0,!t.tolerant&&(!a.uuid||!qg(a.uuid))&&(a.error=a.error||"UUID is not valid."),a}function Xg(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var nc={scheme:"http",domainHost:!0,parse:rc,serialize:ic},Zg={scheme:"https",domainHost:nc.domainHost,parse:rc,serialize:ic},qo={scheme:"ws",domainHost:!0,parse:Kg,serialize:Gg},Qg={scheme:"wss",domainHost:qo.domainHost,parse:qo.parse,serialize:qo.serialize},eh={scheme:"urn",parse:Wg,serialize:Jg,skipNormalize:!0},th={scheme:"urn:uuid",parse:Yg,serialize:Xg,skipNormalize:!0},Bo={http:nc,https:Zg,ws:qo,wss:Qg,urn:eh,"urn:uuid":th};Object.setPrototypeOf(Bo,null);function is(e){return e&&(Bo[e]||Bo[e.toLowerCase()])||void 0}sc.exports={wsIsSecure:rs,SCHEMES:Bo,isValidSchemeName:Vg,getSchemeHandler:is}});var wc=R((k2,Ko)=>{"use strict";var{normalizeIPv6:xc,removeDotSegments:Ka,recomposeAuthority:ah,normalizePercentEncoding:ns,normalizePathEncoding:oh,serializePathEncoding:lc,normalizeQueryFragmentEncoding:pc,encodeQuery:rh,encodeFragment:ih,reescapeHostDelimiters:nh,isIPv4:fc,nonSimpleDomain:sh}=os(),{SCHEMES:mc,getSchemeHandler:ss}=dc(),gc=/^[A-Za-z][A-Za-z0-9+.-]*$/u,hc="URI scheme is malformed.";function cc(e){let t=unescape(String(e));if(!gc.test(t))throw new TypeError(hc);return t}function dh(e,t){return typeof e=="string"?e=gh(e,t):typeof e=="object"&&(e=Vo(qt(e,t),t)),e}function lh(e,t,a){let o=a?Object.assign({scheme:"null"},a):{scheme:"null"},{parsed:r,malformedAuthorityOrPort:i,malformedPercentEncoding:n,malformedSchemeSpecific:d,malformedHost:l,malformedScheme:p}=Lo(e,o),{parsed:c,malformedAuthorityOrPort:u,malformedPercentEncoding:x,malformedSchemeSpecific:h,malformedHost:m,malformedScheme:f}=Lo(t,o);if(i||u||n||x||d||h||l||m||p||f)throw new Error(r.error||c.error||"URI is malformed.");let g=yc(r,c,o,!0),y=ss(a&&a.scheme||g.scheme),w=g.host,I=w!==void 0&&w!==""&&(fc(w)||xc(w).isIPV6);bc(g,a||{},y,I);let S=w&&w.indexOf("%")!==-1&&!/\P{ASCII}/u.test(w);if(g.error&&!S)throw new Error(g.error);return o.skipEscape=!0,qt(g,o)}function yc(e,t,a,o){let r={};return o||(e=Vo(qt(e,a),a),t=Vo(qt(t,a),a)),a=a||{},!a.tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=Ka(t.path||""),r.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=Ka(t.path||""),r.query=t.query):(t.path?(t.path[0]==="/"?r.path=Ka(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?r.path="/"+t.path:e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path,r.path=Ka(r.path)),r.query=t.query):(r.path=e.path,t.query!==void 0?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function ph(e,t,a){let o=uc(e,a),r=uc(t,a);return o!==void 0&&r!==void 0&&o===r}function qt(e,t){let a={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),r=[];a.scheme&&(a.scheme=cc(a.scheme));let i=ss(o.scheme||a.scheme);i&&i.serialize&&i.serialize(a,o);let n=a.userinfo!==void 0||a.host!==void 0||a.port!==void 0,d=!o.skipEscape&&a.scheme===void 0&&!n;a.path!==void 0&&(o.skipEscape?a.path=ns(a.path):a.path=lc(a.path,d)),o.reference!=="suffix"&&a.scheme&&(a.scheme=cc(a.scheme),r.push(a.scheme,":"));let l=ah(a);if(l!==void 0&&(o.reference!=="suffix"&&r.push("//"),r.push(l),a.path&&a.path[0]!=="/"&&r.push("/")),a.path!==void 0){let p=a.path;!o.absolutePath&&(!i||!i.absolutePath)&&(p=Ka(p)),d&&(p=lc(p,!0)),l===void 0&&p[0]==="/"&&p[1]==="/"&&(p="/%2F"+p.slice(2)),r.push(p)}return a.query!==void 0&&r.push("?",rh(a.query)),a.fragment!==void 0&&r.push("#",ih(a.fragment)),r.join("")}var ch=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,uh=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,xh=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function fh(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Va(e){if(e===void 0)return!1;let t=e.indexOf("%");for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function ds(e){return e[0]==="["&&e[e.length-1]==="]"}function mh(e){let t=e[4];return Va(e[3])||t!==void 0&&!ds(t)&&Va(t)||Va(e[6])||Va(e[7])||Va(e[8])}function bc(e,t,a,o){if(!t.unicodeSupport&&(!a||!a.unicodeSupport)&&e.host&&!ds(e.host)&&(t.domainHost||a&&a.domainHost)&&o===!1&&sh(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(r){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+r,!0}return!1}function Lo(e,t){let a=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1,i=!1,n=!1,d=!1,l=!1,p=!1,c=!1;a.reference==="suffix"&&(a.scheme?e=a.scheme+":"+e:e="//"+e);let u=e.match(uh);u!==null&&u[1].indexOf("\\")!==-1&&(o.error="URI authority must not contain a literal backslash.",r=!0);let x=e.match(xh);if(x!==null){let m=x[1],f=m.replace(/[\t\n\r]/g,"");f.length>=2&&(f.slice(0,2)!=="//"?(o.error=o.error||"URI authority must not contain a literal backslash.",r=!0):m.length!==f.length&&(o.error=o.error||"URI authority introducer must not contain whitespace.",r=!0))}let h=e.match(ch);if(h){if(o.scheme=h[1],o.userinfo=h[3],o.host=h[4],o.port=parseInt(h[5],10),o.path=h[6]||"",o.query=h[7],o.fragment=h[8],o.scheme!==void 0){let g=unescape(o.scheme);gc.test(g)?o.scheme=g.toLowerCase():(o.error=o.error||hc,p=!0)}i=mh(h),i&&(o.error=o.error||"URI contains malformed percent-encoding."),isNaN(o.port)&&(o.port=h[5]);let m=fh(o,h);if(m!==void 0&&(o.error=o.error||m,r=!0),o.host)if(fc(o.host)===!1){let y=ds(o.host),w=o.host.indexOf("[")!==-1||o.host.indexOf("]")!==-1,I=xc(o.host);c=I.isIPV6||I.isIPVFuture===!0,l=w&&(!y||I.error===!0),o.host=c?I.host:I.host.toLowerCase(),l&&(o.error=o.error||"URI host is malformed.",r=!0)}else c=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",a.reference&&a.reference!=="suffix"&&a.reference!==o.reference&&(o.error=o.error||"URI is not a "+a.reference+" reference.");let f=ss(a.scheme||o.scheme);if(l||(d=bc(o,a,f,c)),e.indexOf("%")!==-1&&o.host!==void 0&&!l){let g=c?o.host:ns(o.host,!0);c||(g=ns(g.toLowerCase())),o.host=nh(g,c)}(!f||f&&!f.skipNormalize)&&(o.path&&(o.path=oh(o.path)),o.query&&(o.query=pc(o.query)),o.fragment&&(o.fragment=pc(o.fragment))),f&&f.parse&&(f.parse(o,a),f===mc.urn&&o.nid===void 0&&(n=!0))}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:n,malformedHost:d,malformedScheme:p}}function Vo(e,t){return Lo(e,t).parsed}function gh(e,t){return vc(e,t).normalized}function vc(e,t){let{parsed:a,malformedAuthorityOrPort:o,malformedPercentEncoding:r,malformedSchemeSpecific:i,malformedHost:n,malformedScheme:d}=Lo(e,t);return{normalized:o||r||i||n||d?e:qt(a,t),malformedAuthorityOrPort:o,malformedPercentEncoding:r,malformedSchemeSpecific:i,malformedHost:n,malformedScheme:d}}function uc(e,t){if(typeof e!="string"&&typeof e!="object")return;let a;try{a=typeof e=="string"?e:qt(e,t)}catch{return}let{normalized:o,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:n,malformedHost:d,malformedScheme:l}=vc(a,t);return r||i||n||d||l?void 0:o}var ls={SCHEMES:mc,normalize:dh,resolve:lh,resolveComponent:yc,equal:ph,serialize:qt,parse:Vo};Ko.exports=ls;Ko.exports.default=ls;Ko.exports.fastUri=ls});var $c=R(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var kc=wc();kc.code='require("ajv/dist/runtime/uri").default';ps.default=kc});var Nc=R(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.CodeGen=ye.Name=ye.nil=ye.stringify=ye.str=ye._=ye.KeywordCxt=void 0;var hh=qa();Object.defineProperty(ye,"KeywordCxt",{enumerable:!0,get:function(){return hh.KeywordCxt}});var ua=J();Object.defineProperty(ye,"_",{enumerable:!0,get:function(){return ua._}});Object.defineProperty(ye,"str",{enumerable:!0,get:function(){return ua.str}});Object.defineProperty(ye,"stringify",{enumerable:!0,get:function(){return ua.stringify}});Object.defineProperty(ye,"nil",{enumerable:!0,get:function(){return ua.nil}});Object.defineProperty(ye,"Name",{enumerable:!0,get:function(){return ua.Name}});Object.defineProperty(ye,"CodeGen",{enumerable:!0,get:function(){return ua.CodeGen}});var yh=Uo(),Ec=Ba(),bh=Mn(),Ga=La(),vh=J(),Wa=Ha(),Go=Fa(),us=Q(),Sc=Yp(),wh=$c(),zc=(e,t)=>new RegExp(e,t);zc.code="new RegExp";var kh=["removeAdditional","useDefaults","coerceTypes"],$h=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Sh={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Ch={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Cc=200;function Ih(e){var t,a,o,r,i,n,d,l,p,c,u,x,h,m,f,g,y,w,I,S,A,_,$,N,M;let k=e.strict,v=(t=e.code)===null||t===void 0?void 0:t.optimize,b=v===!0||v===void 0?1:v||0,C=(o=(a=e.code)===null||a===void 0?void 0:a.regExp)!==null&&o!==void 0?o:zc,E=(r=e.uriResolver)!==null&&r!==void 0?r:wh.default;return{strictSchema:(n=(i=e.strictSchema)!==null&&i!==void 0?i:k)!==null&&n!==void 0?n:!0,strictNumbers:(l=(d=e.strictNumbers)!==null&&d!==void 0?d:k)!==null&&l!==void 0?l:!0,strictTypes:(c=(p=e.strictTypes)!==null&&p!==void 0?p:k)!==null&&c!==void 0?c:"log",strictTuples:(x=(u=e.strictTuples)!==null&&u!==void 0?u:k)!==null&&x!==void 0?x:"log",strictRequired:(m=(h=e.strictRequired)!==null&&h!==void 0?h:k)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:b,regExp:C}:{optimize:b,regExp:C},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:Cc,loopEnum:(g=e.loopEnum)!==null&&g!==void 0?g:Cc,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(I=e.inlineRefs)!==null&&I!==void 0?I:!0,schemaId:(S=e.schemaId)!==null&&S!==void 0?S:"$id",addUsedSchema:(A=e.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(_=e.validateSchema)!==null&&_!==void 0?_:!0,validateFormats:($=e.validateFormats)!==null&&$!==void 0?$:!0,unicodeRegExp:(N=e.unicodeRegExp)!==null&&N!==void 0?N:!0,int32range:(M=e.int32range)!==null&&M!==void 0?M:!0,uriResolver:E}}var Ja=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...Ih(t)};let{es5:a,lines:o}=this.opts.code;this.scope=new vh.ValueScope({scope:{},prefixes:$h,es5:a,lines:o}),this.logger=Mh(t.logger);let r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,bh.getRules)(),Ic.call(this,Sh,t,"NOT SUPPORTED"),Ic.call(this,Ch,t,"DEPRECATED","warn"),this._metaOpts=_h.call(this),t.formats&&Eh.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&zh.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),Ah.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:a,schemaId:o}=this.opts,r=Sc;o==="id"&&(r={...Sc},r.id=r.$id,delete r.$id),a&&t&&this.addMetaSchema(r,r[o],!1)}defaultMeta(){let{meta:t,schemaId:a}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[a]||t:void 0}validate(t,a){let o;if(typeof t=="string"){if(o=this.getSchema(t),!o)throw new Error(`no schema with key or ref "${t}"`)}else o=this.compile(t);let r=o(a);return"$async"in o||(this.errors=o.errors),r}compile(t,a){let o=this._addSchema(t,a);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,a){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return r.call(this,t,a);async function r(c,u){await i.call(this,c.$schema);let x=this._addSchema(c,u);return x.validate||n.call(this,x)}async function i(c){c&&!this.getSchema(c)&&await r.call(this,{$ref:c},!0)}async function n(c){try{return this._compileSchemaEnv(c)}catch(u){if(!(u instanceof Ec.default))throw u;return d.call(this,u),await l.call(this,u.missingSchema),n.call(this,c)}}function d({missingSchema:c,missingRef:u}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${u} cannot be resolved`)}async function l(c){let u=await p.call(this,c);this.refs[c]||await i.call(this,u.$schema),this.refs[c]||this.addSchema(u,c,a)}async function p(c){let u=this._loading[c];if(u)return u;try{return await(this._loading[c]=o(c))}finally{delete this._loading[c]}}}addSchema(t,a,o,r=this.opts.validateSchema){if(Array.isArray(t)){for(let n of t)this.addSchema(n,void 0,o,r);return this}let i;if(typeof t=="object"){let{schemaId:n}=this.opts;if(i=t[n],i!==void 0&&typeof i!="string")throw new Error(`schema ${n} must be string`)}return a=(0,Wa.normalizeId)(a||i),this._checkUnique(a),this.schemas[a]=this._addSchema(t,o,a,r,!0),this}addMetaSchema(t,a,o=this.opts.validateSchema){return this.addSchema(t,a,!0,o),this}validateSchema(t,a){if(typeof t=="boolean")return!0;let o;if(o=t.$schema,o!==void 0&&typeof o!="string")throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(o,t);if(!r&&a){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return r}getSchema(t){let a;for(;typeof(a=Ac.call(this,t))=="string";)t=a;if(a===void 0){let{schemaId:o}=this.opts,r=new Ga.SchemaEnv({schema:{},schemaId:o});if(a=Ga.resolveSchema.call(this,r,t),!a)return;this.refs[t]=a}return a.validate||this._compileSchemaEnv(a)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let a=Ac.call(this,t);return typeof a=="object"&&this._cache.delete(a.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let a=t;this._cache.delete(a);let o=t[this.opts.schemaId];return o&&(o=(0,Wa.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let a of t)this.addKeyword(a);return this}addKeyword(t,a){let o;if(typeof t=="string")o=t,typeof a=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),a.keyword=o);else if(typeof t=="object"&&a===void 0){if(a=t,o=a.keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Th.call(this,o,a),!a)return(0,us.eachItem)(o,i=>cs.call(this,i)),this;jh.call(this,a);let r={...a,type:(0,Go.getJSONTypes)(a.type),schemaType:(0,Go.getJSONTypes)(a.schemaType)};return(0,us.eachItem)(o,r.type.length===0?i=>cs.call(this,i,r):i=>r.type.forEach(n=>cs.call(this,i,r,n))),this}getKeyword(t){let a=this.RULES.all[t];return typeof a=="object"?a.definition:!!a}removeKeyword(t){let{RULES:a}=this;delete a.keywords[t],delete a.all[t];for(let o of a.rules){let r=o.rules.findIndex(i=>i.keyword===t);r>=0&&o.rules.splice(r,1)}return this}addFormat(t,a){return typeof a=="string"&&(a=new RegExp(a)),this.formats[t]=a,this}errorsText(t=this.errors,{separator:a=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(r=>`${o}${r.instancePath} ${r.message}`).reduce((r,i)=>r+a+i)}$dataMetaSchema(t,a){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let r of a){let i=r.split("/").slice(1),n=t;for(let d of i)n=n[d];for(let d in o){let l=o[d];if(typeof l!="object")continue;let{$data:p}=l.definition,c=n[d];p&&c&&(n[d]=_c(c))}}return t}_removeAllSchemas(t,a){for(let o in t){let r=t[o];(!a||a.test(o))&&(typeof r=="string"?delete t[o]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[o]))}}_addSchema(t,a,o,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let n,{schemaId:d}=this.opts;if(typeof t=="object")n=t[d];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(t);if(l!==void 0)return l;o=(0,Wa.normalizeId)(n||o);let p=Wa.getSchemaRefs.call(this,t,o);return l=new Ga.SchemaEnv({schema:t,schemaId:d,meta:a,baseId:o,localRefs:p}),this._cache.set(l.schema,l),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=l),r&&this.validateSchema(t,!0),l}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ga.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let a=this.opts;this.opts=this._metaOpts;try{Ga.compileSchema.call(this,t)}finally{this.opts=a}}};Ja.ValidationError=yh.default;Ja.MissingRefError=Ec.default;ye.default=Ja;function Ic(e,t,a,o="error"){for(let r in e){let i=r;i in t&&this.logger[o](`${a}: option ${r}. ${e[i]}`)}}function Ac(e){return e=(0,Wa.normalizeId)(e),this.schemas[e]||this.refs[e]}function Ah(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function Eh(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function zh(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let a=e[t];a.keyword||(a.keyword=t),this.addKeyword(a)}}function _h(){let e={...this.opts};for(let t of kh)delete e[t];return e}var Nh={log(){},warn(){},error(){}};function Mh(e){if(e===!1)return Nh;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var Ph=/^[a-z_$][a-z0-9_$:-]*$/i;function Th(e,t){let{RULES:a}=this;if((0,us.eachItem)(e,o=>{if(a.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!Ph.test(o))throw new Error(`Keyword ${o} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function cs(e,t,a){var o;let r=t?.post;if(a&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,n=r?i.post:i.rules.find(({type:l})=>l===a);if(n||(n={type:a,rules:[]},i.rules.push(n)),i.keywords[e]=!0,!t)return;let d={keyword:e,definition:{...t,type:(0,Go.getJSONTypes)(t.type),schemaType:(0,Go.getJSONTypes)(t.schemaType)}};t.before?Rh.call(this,n,d,t.before):n.rules.push(d),i.all[e]=d,(o=t.implements)===null||o===void 0||o.forEach(l=>this.addKeyword(l))}function Rh(e,t,a){let o=e.rules.findIndex(r=>r.keyword===a);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${a} is not defined`))}function jh(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=_c(t)),e.validateSchema=this.compile(t,!0))}var Dh={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _c(e){return{anyOf:[e,Dh]}}});var Mc=R(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});var Fh={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};xs.default=Fh});var Yo=R(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.callRef=Bt.getValidate=void 0;var Hh=Ba(),Pc=Fe(),Te=J(),xa=De(),Tc=La(),Wo=Q(),Uh={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:a,it:o}=e,{baseId:r,schemaEnv:i,validateName:n,opts:d,self:l}=o,{root:p}=i;if((a==="#"||a==="#/")&&r===p.baseId)return u();let c=Tc.resolveRef.call(l,p,r,a);if(c===void 0)throw new Hh.default(o.opts.uriResolver,r,a);if(c instanceof Tc.SchemaEnv)return x(c);return h(c);function u(){if(i===p)return Jo(e,n,i,i.$async);let m=t.scopeValue("root",{ref:p});return Jo(e,(0,Te._)`${m}.validate`,p,p.$async)}function x(m){let f=Rc(e,m);Jo(e,f,m,m.$async)}function h(m){let f=t.scopeValue("schema",d.code.source===!0?{ref:m,code:(0,Te.stringify)(m)}:{ref:m}),g=t.name("valid"),y=e.subschema({schema:m,dataTypes:[],schemaPath:Te.nil,topSchemaRef:f,errSchemaPath:a},g);e.mergeEvaluated(y),e.ok(g)}}};function Rc(e,t){let{gen:a}=e;return t.validate?a.scopeValue("validate",{ref:t.validate}):(0,Te._)`${a.scopeValue("wrapper",{ref:t})}.validate`}Bt.getValidate=Rc;function Jo(e,t,a,o){let{gen:r,it:i}=e,{allErrors:n,schemaEnv:d,opts:l}=i,p=l.passContext?xa.default.this:Te.nil;o?c():u();function c(){if(!d.$async)throw new Error("async schema referenced by sync schema");let m=r.let("valid");r.try(()=>{r.code((0,Te._)`await ${(0,Pc.callValidateCode)(e,t,p)}`),h(t),n||r.assign(m,!0)},f=>{r.if((0,Te._)`!(${f} instanceof ${i.ValidationError})`,()=>r.throw(f)),x(f),n||r.assign(m,!1)}),e.ok(m)}function u(){e.result((0,Pc.callValidateCode)(e,t,p),()=>h(t),()=>x(t))}function x(m){let f=(0,Te._)`${m}.errors`;r.assign(xa.default.vErrors,(0,Te._)`${xa.default.vErrors} === null ? ${f} : ${xa.default.vErrors}.concat(${f})`),r.assign(xa.default.errors,(0,Te._)`${xa.default.vErrors}.length`)}function h(m){var f;if(!i.opts.unevaluated)return;let g=(f=a?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(i.props=Wo.mergeEvaluated.props(r,g.props,i.props));else{let y=r.var("props",(0,Te._)`${m}.evaluated.props`);i.props=Wo.mergeEvaluated.props(r,y,i.props,Te.Name)}if(i.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(i.items=Wo.mergeEvaluated.items(r,g.items,i.items));else{let y=r.var("items",(0,Te._)`${m}.evaluated.items`);i.items=Wo.mergeEvaluated.items(r,y,i.items,Te.Name)}}}Bt.callRef=Jo;Bt.default=Uh});var jc=R(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var Oh=Mc(),qh=Yo(),Bh=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Oh.default,qh.default];fs.default=Bh});var Dc=R(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var Xo=J(),$t=Xo.operators,Zo={maximum:{okStr:"<=",ok:$t.LTE,fail:$t.GT},minimum:{okStr:">=",ok:$t.GTE,fail:$t.LT},exclusiveMaximum:{okStr:"<",ok:$t.LT,fail:$t.GTE},exclusiveMinimum:{okStr:">",ok:$t.GT,fail:$t.LTE}},Lh={message:({keyword:e,schemaCode:t})=>(0,Xo.str)`must be ${Zo[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Xo._)`{comparison: ${Zo[e].okStr}, limit: ${t}}`},Vh={keyword:Object.keys(Zo),type:"number",schemaType:"number",$data:!0,error:Lh,code(e){let{keyword:t,data:a,schemaCode:o}=e;e.fail$data((0,Xo._)`${a} ${Zo[t].fail} ${o} || isNaN(${a})`)}};ms.default=Vh});var Fc=R(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Ya=J(),Kh={message:({schemaCode:e})=>(0,Ya.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ya._)`{multipleOf: ${e}}`},Gh={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Kh,code(e){let{gen:t,data:a,schemaCode:o,it:r}=e,i=r.opts.multipleOfPrecision,n=t.let("res"),d=i?(0,Ya._)`Math.abs(Math.round(${n}) - ${n}) > 1e-${i}`:(0,Ya._)`${n} !== parseInt(${n})`;e.fail$data((0,Ya._)`(${o} === 0 || (${n} = ${a}/${o}, ${d}))`)}};gs.default=Gh});var Uc=R(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});function Hc(e){let t=e.length,a=0,o=0,r;for(;o<t;)a++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),(r&64512)===56320&&o++);return a}hs.default=Hc;Hc.code='require("ajv/dist/runtime/ucs2length").default'});var Oc=R(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var Lt=J(),Wh=Q(),Jh=Uc(),Yh={message({keyword:e,schemaCode:t}){let a=e==="maxLength"?"more":"fewer";return(0,Lt.str)`must NOT have ${a} than ${t} characters`},params:({schemaCode:e})=>(0,Lt._)`{limit: ${e}}`},Xh={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Yh,code(e){let{keyword:t,data:a,schemaCode:o,it:r}=e,i=t==="maxLength"?Lt.operators.GT:Lt.operators.LT,n=r.opts.unicode===!1?(0,Lt._)`${a}.length`:(0,Lt._)`${(0,Wh.useFunc)(e.gen,Jh.default)}(${a})`;e.fail$data((0,Lt._)`${n} ${i} ${o}`)}};ys.default=Xh});var qc=R(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});var Zh=Fe(),Qh=Q(),fa=J(),ey={message:({schemaCode:e})=>(0,fa.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,fa._)`{pattern: ${e}}`},ty={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ey,code(e){let{gen:t,data:a,$data:o,schema:r,schemaCode:i,it:n}=e,d=n.opts.unicodeRegExp?"u":"";if(o){let{regExp:l}=n.opts.code,p=l.code==="new RegExp"?(0,fa._)`new RegExp`:(0,Qh.useFunc)(t,l),c=t.let("valid");t.try(()=>t.assign(c,(0,fa._)`${p}(${i}, ${d}).test(${a})`),()=>t.assign(c,!1)),e.fail$data((0,fa._)`!${c}`)}else{let l=(0,Zh.usePattern)(e,r);e.fail$data((0,fa._)`!${l}.test(${a})`)}}};bs.default=ty});var Bc=R(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Xa=J(),ay={message({keyword:e,schemaCode:t}){let a=e==="maxProperties"?"more":"fewer";return(0,Xa.str)`must NOT have ${a} than ${t} properties`},params:({schemaCode:e})=>(0,Xa._)`{limit: ${e}}`},oy={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ay,code(e){let{keyword:t,data:a,schemaCode:o}=e,r=t==="maxProperties"?Xa.operators.GT:Xa.operators.LT;e.fail$data((0,Xa._)`Object.keys(${a}).length ${r} ${o}`)}};vs.default=oy});var Lc=R(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var Za=Fe(),Qa=J(),ry=Q(),iy={message:({params:{missingProperty:e}})=>(0,Qa.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Qa._)`{missingProperty: ${e}}`},ny={keyword:"required",type:"object",schemaType:"array",$data:!0,error:iy,code(e){let{gen:t,schema:a,schemaCode:o,data:r,$data:i,it:n}=e,{opts:d}=n;if(!i&&a.length===0)return;let l=a.length>=d.loopRequired;if(n.allErrors?p():c(),d.strictRequired){let h=e.parentSchema.properties,{definedProperties:m}=e.it;for(let f of a)if(h?.[f]===void 0&&!m.has(f)){let g=n.schemaEnv.baseId+n.errSchemaPath,y=`required property "${f}" is not defined at "${g}" (strictRequired)`;(0,ry.checkStrictMode)(n,y,n.opts.strictRequired)}}function p(){if(l||i)e.block$data(Qa.nil,u);else for(let h of a)(0,Za.checkReportMissingProp)(e,h)}function c(){let h=t.let("missing");if(l||i){let m=t.let("valid",!0);e.block$data(m,()=>x(h,m)),e.ok(m)}else t.if((0,Za.checkMissingProp)(e,a,h)),(0,Za.reportMissingProp)(e,h),t.else()}function u(){t.forOf("prop",o,h=>{e.setParams({missingProperty:h}),t.if((0,Za.noPropertyInData)(t,r,h,d.ownProperties),()=>e.error())})}function x(h,m){e.setParams({missingProperty:h}),t.forOf(h,o,()=>{t.assign(m,(0,Za.propertyInData)(t,r,h,d.ownProperties)),t.if((0,Qa.not)(m),()=>{e.error(),t.break()})},Qa.nil)}}};ws.default=ny});var Vc=R(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var eo=J(),sy={message({keyword:e,schemaCode:t}){let a=e==="maxItems"?"more":"fewer";return(0,eo.str)`must NOT have ${a} than ${t} items`},params:({schemaCode:e})=>(0,eo._)`{limit: ${e}}`},dy={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:sy,code(e){let{keyword:t,data:a,schemaCode:o}=e,r=t==="maxItems"?eo.operators.GT:eo.operators.LT;e.fail$data((0,eo._)`${a}.length ${r} ${o}`)}};ks.default=dy});var Qo=R($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Kc=Un();Kc.code='require("ajv/dist/runtime/equal").default';$s.default=Kc});var Gc=R(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var Ss=Fa(),be=J(),ly=Q(),py=Qo(),cy={message:({params:{i:e,j:t}})=>(0,be.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,be._)`{i: ${e}, j: ${t}}`},uy={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:cy,code(e){let{gen:t,data:a,$data:o,schema:r,parentSchema:i,schemaCode:n,it:d}=e;if(!o&&!r)return;let l=t.let("valid"),p=i.items?(0,Ss.getSchemaTypes)(i.items):[];e.block$data(l,c,(0,be._)`${n} === false`),e.ok(l);function c(){let m=t.let("i",(0,be._)`${a}.length`),f=t.let("j");e.setParams({i:m,j:f}),t.assign(l,!0),t.if((0,be._)`${m} > 1`,()=>(u()?x:h)(m,f))}function u(){return p.length>0&&!p.some(m=>m==="object"||m==="array")}function x(m,f){let g=t.name("item"),y=(0,Ss.checkDataTypes)(p,g,d.opts.strictNumbers,Ss.DataType.Wrong),w=t.const("indices",(0,be._)`{}`);t.for((0,be._)`;${m}--;`,()=>{t.let(g,(0,be._)`${a}[${m}]`),t.if(y,(0,be._)`continue`),p.length>1&&t.if((0,be._)`typeof ${g} == "string"`,(0,be._)`${g} += "_"`),t.if((0,be._)`typeof ${w}[${g}] == "number"`,()=>{t.assign(f,(0,be._)`${w}[${g}]`),e.error(),t.assign(l,!1).break()}).code((0,be._)`${w}[${g}] = ${m}`)})}function h(m,f){let g=(0,ly.useFunc)(t,py.default),y=t.name("outer");t.label(y).for((0,be._)`;${m}--;`,()=>t.for((0,be._)`${f} = ${m}; ${f}--;`,()=>t.if((0,be._)`${g}(${a}[${m}], ${a}[${f}])`,()=>{e.error(),t.assign(l,!1).break(y)})))}}};Cs.default=uy});var Wc=R(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var Is=J(),xy=Q(),fy=Qo(),my={message:"must be equal to constant",params:({schemaCode:e})=>(0,Is._)`{allowedValue: ${e}}`},gy={keyword:"const",$data:!0,error:my,code(e){let{gen:t,data:a,$data:o,schemaCode:r,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,Is._)`!${(0,xy.useFunc)(t,fy.default)}(${a}, ${r})`):e.fail((0,Is._)`${i} !== ${a}`)}};As.default=gy});var Jc=R(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var to=J(),hy=Q(),yy=Qo(),by={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,to._)`{allowedValues: ${e}}`},vy={keyword:"enum",schemaType:"array",$data:!0,error:by,code(e){let{gen:t,data:a,$data:o,schema:r,schemaCode:i,it:n}=e;if(!o&&r.length===0)throw new Error("enum must have non-empty array");let d=r.length>=n.opts.loopEnum,l,p=()=>l??(l=(0,hy.useFunc)(t,yy.default)),c;if(d||o)c=t.let("valid"),e.block$data(c,u);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let h=t.const("vSchema",i);c=(0,to.or)(...r.map((m,f)=>x(h,f)))}e.pass(c);function u(){t.assign(c,!1),t.forOf("v",i,h=>t.if((0,to._)`${p()}(${a}, ${h})`,()=>t.assign(c,!0).break()))}function x(h,m){let f=r[m];return typeof f=="object"&&f!==null?(0,to._)`${p()}(${a}, ${h}[${m}])`:(0,to._)`${a} === ${f}`}}};Es.default=vy});var Yc=R(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});var wy=Dc(),ky=Fc(),$y=Oc(),Sy=qc(),Cy=Bc(),Iy=Lc(),Ay=Vc(),Ey=Gc(),zy=Wc(),_y=Jc(),Ny=[wy.default,ky.default,$y.default,Sy.default,Cy.default,Iy.default,Ay.default,Ey.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},zy.default,_y.default];zs.default=Ny});var Ns=R(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.validateAdditionalItems=void 0;var Vt=J(),_s=Q(),My={message:({params:{len:e}})=>(0,Vt.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Vt._)`{limit: ${e}}`},Py={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:My,code(e){let{parentSchema:t,it:a}=e,{items:o}=t;if(!Array.isArray(o)){(0,_s.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}Xc(e,o)}};function Xc(e,t){let{gen:a,schema:o,data:r,keyword:i,it:n}=e;n.items=!0;let d=a.const("len",(0,Vt._)`${r}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Vt._)`${d} <= ${t.length}`);else if(typeof o=="object"&&!(0,_s.alwaysValidSchema)(n,o)){let p=a.var("valid",(0,Vt._)`${d} <= ${t.length}`);a.if((0,Vt.not)(p),()=>l(p)),e.ok(p)}function l(p){a.forRange("i",t.length,d,c=>{e.subschema({keyword:i,dataProp:c,dataPropType:_s.Type.Num},p),n.allErrors||a.if((0,Vt.not)(p),()=>a.break())})}}ao.validateAdditionalItems=Xc;ao.default=Py});var Ms=R(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.validateTuple=void 0;var Zc=J(),er=Q(),Ty=Fe(),Ry={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:a}=e;if(Array.isArray(t))return Qc(e,"additionalItems",t);a.items=!0,!(0,er.alwaysValidSchema)(a,t)&&e.ok((0,Ty.validateArray)(e))}};function Qc(e,t,a=e.schema){let{gen:o,parentSchema:r,data:i,keyword:n,it:d}=e;c(r),d.opts.unevaluated&&a.length&&d.items!==!0&&(d.items=er.mergeEvaluated.items(o,a.length,d.items));let l=o.name("valid"),p=o.const("len",(0,Zc._)`${i}.length`);a.forEach((u,x)=>{(0,er.alwaysValidSchema)(d,u)||(o.if((0,Zc._)`${p} > ${x}`,()=>e.subschema({keyword:n,schemaProp:x,dataProp:x},l)),e.ok(l))});function c(u){let{opts:x,errSchemaPath:h}=d,m=a.length,f=m===u.minItems&&(m===u.maxItems||u[t]===!1);if(x.strictTuples&&!f){let g=`"${n}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,er.checkStrictMode)(d,g,x.strictTuples)}}}oo.validateTuple=Qc;oo.default=Ry});var eu=R(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var jy=Ms(),Dy={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,jy.validateTuple)(e,"items")};Ps.default=Dy});var au=R(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var tu=J(),Fy=Q(),Hy=Fe(),Uy=Ns(),Oy={message:({params:{len:e}})=>(0,tu.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,tu._)`{limit: ${e}}`},qy={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Oy,code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:r}=a;o.items=!0,!(0,Fy.alwaysValidSchema)(o,t)&&(r?(0,Uy.validateAdditionalItems)(e,r):e.ok((0,Hy.validateArray)(e)))}};Ts.default=qy});var ou=R(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var Ue=J(),tr=Q(),By={message:({params:{min:e,max:t}})=>t===void 0?(0,Ue.str)`must contain at least ${e} valid item(s)`:(0,Ue.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ue._)`{minContains: ${e}}`:(0,Ue._)`{minContains: ${e}, maxContains: ${t}}`},Ly={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:By,code(e){let{gen:t,schema:a,parentSchema:o,data:r,it:i}=e,n,d,{minContains:l,maxContains:p}=o;i.opts.next?(n=l===void 0?1:l,d=p):n=1;let c=t.const("len",(0,Ue._)`${r}.length`);if(e.setParams({min:n,max:d}),d===void 0&&n===0){(0,tr.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&n>d){(0,tr.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,tr.alwaysValidSchema)(i,a)){let f=(0,Ue._)`${c} >= ${n}`;d!==void 0&&(f=(0,Ue._)`${f} && ${c} <= ${d}`),e.pass(f);return}i.items=!0;let u=t.name("valid");d===void 0&&n===1?h(u,()=>t.if(u,()=>t.break())):n===0?(t.let(u,!0),d!==void 0&&t.if((0,Ue._)`${r}.length > 0`,x)):(t.let(u,!1),x()),e.result(u,()=>e.reset());function x(){let f=t.name("_valid"),g=t.let("count",0);h(f,()=>t.if(f,()=>m(g)))}function h(f,g){t.forRange("i",0,c,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:tr.Type.Num,compositeRule:!0},f),g()})}function m(f){t.code((0,Ue._)`${f}++`),d===void 0?t.if((0,Ue._)`${f} >= ${n}`,()=>t.assign(u,!0).break()):(t.if((0,Ue._)`${f} > ${d}`,()=>t.assign(u,!1).break()),n===1?t.assign(u,!0):t.if((0,Ue._)`${f} >= ${n}`,()=>t.assign(u,!0)))}}};Rs.default=Ly});var ar=R(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.validateSchemaDeps=Qe.validatePropertyDeps=Qe.error=void 0;var js=J(),Vy=Q(),ro=Fe();Qe.error={message:({params:{property:e,depsCount:t,deps:a}})=>{let o=t===1?"property":"properties";return(0,js.str)`must have ${o} ${a} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:a,missingProperty:o}})=>(0,js._)`{property: ${e},
6
+ missingProperty: ${o},
7
+ depsCount: ${t},
8
+ deps: ${a}}`};var Ky={keyword:"dependencies",type:"object",schemaType:"object",error:Qe.error,code(e){let[t,a]=Gy(e);ru(e,t),iu(e,a)}};function Gy({schema:e}){let t={},a={};for(let o in e){if(o==="__proto__")continue;let r=Array.isArray(e[o])?t:a;r[o]=e[o]}return[t,a]}function ru(e,t=e.schema){let{gen:a,data:o,it:r}=e;if(Object.keys(t).length===0)return;let i=a.let("missing");for(let n in t){let d=t[n];if(d.length===0)continue;let l=(0,ro.propertyInData)(a,o,n,r.opts.ownProperties);e.setParams({property:n,depsCount:d.length,deps:d.join(", ")}),r.allErrors?a.if(l,()=>{for(let p of d)(0,ro.checkReportMissingProp)(e,p)}):(a.if((0,js._)`${l} && (${(0,ro.checkMissingProp)(e,d,i)})`),(0,ro.reportMissingProp)(e,i),a.else())}}Qe.validatePropertyDeps=ru;function iu(e,t=e.schema){let{gen:a,data:o,keyword:r,it:i}=e,n=a.name("valid");for(let d in t)(0,Vy.alwaysValidSchema)(i,t[d])||(a.if((0,ro.propertyInData)(a,o,d,i.opts.ownProperties),()=>{let l=e.subschema({keyword:r,schemaProp:d},n);e.mergeValidEvaluated(l,n)},()=>a.var(n,!0)),e.ok(n))}Qe.validateSchemaDeps=iu;Qe.default=Ky});var su=R(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});var nu=J(),Wy=Q(),Jy={message:"property name must be valid",params:({params:e})=>(0,nu._)`{propertyName: ${e.propertyName}}`},Yy={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Jy,code(e){let{gen:t,schema:a,data:o,it:r}=e;if((0,Wy.alwaysValidSchema)(r,a))return;let i=t.name("valid");t.forIn("key",o,n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},i),t.if((0,nu.not)(i),()=>{e.error(!0),r.allErrors||t.break()})}),e.ok(i)}};Ds.default=Yy});var Hs=R(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});var or=Fe(),Ge=J(),Xy=De(),rr=Q(),Zy={message:"must NOT have additional properties",params:({params:e})=>(0,Ge._)`{additionalProperty: ${e.additionalProperty}}`},Qy={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Zy,code(e){let{gen:t,schema:a,parentSchema:o,data:r,errsCount:i,it:n}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:d,opts:l}=n;if(n.props=!0,l.removeAdditional!=="all"&&(0,rr.alwaysValidSchema)(n,a))return;let p=(0,or.allSchemaProperties)(o.properties),c=(0,or.allSchemaProperties)(o.patternProperties);u(),e.ok((0,Ge._)`${i} === ${Xy.default.errors}`);function u(){t.forIn("key",r,g=>{!p.length&&!c.length?m(g):t.if(x(g),()=>m(g))})}function x(g){let y;if(p.length>8){let w=(0,rr.schemaRefOrVal)(n,o.properties,"properties");y=(0,or.isOwnProperty)(t,w,g)}else p.length?y=(0,Ge.or)(...p.map(w=>(0,Ge._)`${g} === ${w}`)):y=Ge.nil;return c.length&&(y=(0,Ge.or)(y,...c.map(w=>(0,Ge._)`${(0,or.usePattern)(e,w)}.test(${g})`))),(0,Ge.not)(y)}function h(g){t.code((0,Ge._)`delete ${r}[${g}]`)}function m(g){if(l.removeAdditional==="all"||l.removeAdditional&&a===!1){h(g);return}if(a===!1){e.setParams({additionalProperty:g}),e.error(),d||t.break();return}if(typeof a=="object"&&!(0,rr.alwaysValidSchema)(n,a)){let y=t.name("valid");l.removeAdditional==="failing"?(f(g,y,!1),t.if((0,Ge.not)(y),()=>{e.reset(),h(g)})):(f(g,y),d||t.if((0,Ge.not)(y),()=>t.break()))}}function f(g,y,w){let I={keyword:"additionalProperties",dataProp:g,dataPropType:rr.Type.Str};w===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(I,y)}}};Fs.default=Qy});var pu=R(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var eb=qa(),du=Fe(),Us=Q(),lu=Hs(),tb={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:a,parentSchema:o,data:r,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&lu.default.code(new eb.KeywordCxt(i,lu.default,"additionalProperties"));let n=(0,du.allSchemaProperties)(a);for(let u of n)i.definedProperties.add(u);i.opts.unevaluated&&n.length&&i.props!==!0&&(i.props=Us.mergeEvaluated.props(t,(0,Us.toHash)(n),i.props));let d=n.filter(u=>!(0,Us.alwaysValidSchema)(i,a[u]));if(d.length===0)return;let l=t.name("valid");for(let u of d)p(u)?c(u):(t.if((0,du.propertyInData)(t,r,u,i.opts.ownProperties)),c(u),i.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(u),e.ok(l);function p(u){return i.opts.useDefaults&&!i.compositeRule&&a[u].default!==void 0}function c(u){e.subschema({keyword:"properties",schemaProp:u,dataProp:u},l)}}};Os.default=tb});var fu=R(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});var cu=Fe(),ir=J(),uu=Q(),xu=Q(),ab={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:a,data:o,parentSchema:r,it:i}=e,{opts:n}=i,d=(0,cu.allSchemaProperties)(a),l=d.filter(f=>(0,uu.alwaysValidSchema)(i,a[f]));if(d.length===0||l.length===d.length&&(!i.opts.unevaluated||i.props===!0))return;let p=n.strictSchema&&!n.allowMatchingProperties&&r.properties,c=t.name("valid");i.props!==!0&&!(i.props instanceof ir.Name)&&(i.props=(0,xu.evaluatedPropsToName)(t,i.props));let{props:u}=i;x();function x(){for(let f of d)p&&h(f),i.allErrors?m(f):(t.var(c,!0),m(f),t.if(c))}function h(f){for(let g in p)new RegExp(f).test(g)&&(0,uu.checkStrictMode)(i,`property ${g} matches pattern ${f} (use allowMatchingProperties)`)}function m(f){t.forIn("key",o,g=>{t.if((0,ir._)`${(0,cu.usePattern)(e,f)}.test(${g})`,()=>{let y=l.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:g,dataPropType:xu.Type.Str},c),i.opts.unevaluated&&u!==!0?t.assign((0,ir._)`${u}[${g}]`,!0):!y&&!i.allErrors&&t.if((0,ir.not)(c),()=>t.break())})})}}};qs.default=ab});var mu=R(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});var ob=Q(),rb={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:a,it:o}=e;if((0,ob.alwaysValidSchema)(o,a)){e.fail();return}let r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Bs.default=rb});var gu=R(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var ib=Fe(),nb={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ib.validateUnion,error:{message:"must match a schema in anyOf"}};Ls.default=nb});var hu=R(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var nr=J(),sb=Q(),db={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,nr._)`{passingSchemas: ${e.passing}}`},lb={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:db,code(e){let{gen:t,schema:a,parentSchema:o,it:r}=e;if(!Array.isArray(a))throw new Error("ajv implementation error");if(r.opts.discriminator&&o.discriminator)return;let i=a,n=t.let("valid",!1),d=t.let("passing",null),l=t.name("_valid");e.setParams({passing:d}),t.block(p),e.result(n,()=>e.reset(),()=>e.error(!0));function p(){i.forEach((c,u)=>{let x;(0,sb.alwaysValidSchema)(r,c)?t.var(l,!0):x=e.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&t.if((0,nr._)`${l} && ${n}`).assign(n,!1).assign(d,(0,nr._)`[${d}, ${u}]`).else(),t.if(l,()=>{t.assign(n,!0),t.assign(d,u),x&&e.mergeEvaluated(x,nr.Name)})})}}};Vs.default=lb});var yu=R(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});var pb=Q(),cb={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:a,it:o}=e;if(!Array.isArray(a))throw new Error("ajv implementation error");let r=t.name("valid");a.forEach((i,n)=>{if((0,pb.alwaysValidSchema)(o,i))return;let d=e.subschema({keyword:"allOf",schemaProp:n},r);e.ok(r),e.mergeEvaluated(d)})}};Ks.default=cb});var wu=R(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var sr=J(),vu=Q(),ub={message:({params:e})=>(0,sr.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,sr._)`{failingKeyword: ${e.ifClause}}`},xb={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ub,code(e){let{gen:t,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,vu.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let r=bu(o,"then"),i=bu(o,"else");if(!r&&!i)return;let n=t.let("valid",!0),d=t.name("_valid");if(l(),e.reset(),r&&i){let c=t.let("ifClause");e.setParams({ifClause:c}),t.if(d,p("then",c),p("else",c))}else r?t.if(d,p("then")):t.if((0,sr.not)(d),p("else"));e.pass(n,()=>e.error(!0));function l(){let c=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(c)}function p(c,u){return()=>{let x=e.subschema({keyword:c},d);t.assign(n,d),e.mergeValidEvaluated(x,n),u?t.assign(u,(0,sr._)`${c}`):e.setParams({ifClause:c})}}}};function bu(e,t){let a=e.schema[t];return a!==void 0&&!(0,vu.alwaysValidSchema)(e,a)}Gs.default=xb});var ku=R(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});var fb=Q(),mb={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:a}){t.if===void 0&&(0,fb.checkStrictMode)(a,`"${e}" without "if" is ignored`)}};Ws.default=mb});var $u=R(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var gb=Ns(),hb=eu(),yb=Ms(),bb=au(),vb=ou(),wb=ar(),kb=su(),$b=Hs(),Sb=pu(),Cb=fu(),Ib=mu(),Ab=gu(),Eb=hu(),zb=yu(),_b=wu(),Nb=ku();function Mb(e=!1){let t=[Ib.default,Ab.default,Eb.default,zb.default,_b.default,Nb.default,kb.default,$b.default,wb.default,Sb.default,Cb.default];return e?t.push(hb.default,bb.default):t.push(gb.default,yb.default),t.push(vb.default),t}Js.default=Mb});var Xs=R(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.dynamicAnchor=void 0;var Ys=J(),Pb=De(),Su=La(),Tb=Yo(),Rb={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Cu(e,e.schema)};function Cu(e,t){let{gen:a,it:o}=e;o.schemaEnv.root.dynamicAnchors[t]=!0;let r=(0,Ys._)`${Pb.default.dynamicAnchors}${(0,Ys.getProperty)(t)}`,i=o.errSchemaPath==="#"?o.validateName:jb(e);a.if((0,Ys._)`!${r}`,()=>a.assign(r,i))}io.dynamicAnchor=Cu;function jb(e){let{schemaEnv:t,schema:a,self:o}=e.it,{root:r,baseId:i,localRefs:n,meta:d}=t.root,{schemaId:l}=o.opts,p=new Su.SchemaEnv({schema:a,schemaId:l,root:r,baseId:i,localRefs:n,meta:d});return Su.compileSchema.call(o,p),(0,Tb.getValidate)(e,p)}io.default=Rb});var Zs=R(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.dynamicRef=void 0;var Iu=J(),Db=De(),Au=Yo(),Fb={keyword:"$dynamicRef",schemaType:"string",code:e=>Eu(e,e.schema)};function Eu(e,t){let{gen:a,keyword:o,it:r}=e;if(t[0]!=="#")throw new Error(`"${o}" only supports hash fragment reference`);let i=t.slice(1);if(r.allErrors)n();else{let l=a.let("valid",!1);n(l),e.ok(l)}function n(l){if(r.schemaEnv.root.dynamicAnchors[i]){let p=a.let("_v",(0,Iu._)`${Db.default.dynamicAnchors}${(0,Iu.getProperty)(i)}`);a.if(p,d(p,l),d(r.validateName,l))}else d(r.validateName,l)()}function d(l,p){return p?()=>a.block(()=>{(0,Au.callRef)(e,l),a.let(p,!0)}):()=>(0,Au.callRef)(e,l)}}no.dynamicRef=Eu;no.default=Fb});var zu=R(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});var Hb=Xs(),Ub=Q(),Ob={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,Hb.dynamicAnchor)(e,""):(0,Ub.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};Qs.default=Ob});var _u=R(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var qb=Zs(),Bb={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,qb.dynamicRef)(e,e.schema)};ed.default=Bb});var Nu=R(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var Lb=Xs(),Vb=Zs(),Kb=zu(),Gb=_u(),Wb=[Lb.default,Vb.default,Kb.default,Gb.default];td.default=Wb});var Pu=R(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var Mu=ar(),Jb={keyword:"dependentRequired",type:"object",schemaType:"object",error:Mu.error,code:e=>(0,Mu.validatePropertyDeps)(e)};ad.default=Jb});var Tu=R(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var Yb=ar(),Xb={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,Yb.validateSchemaDeps)(e)};od.default=Xb});var Ru=R(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var Zb=Q(),Qb={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:a}){t.contains===void 0&&(0,Zb.checkStrictMode)(a,`"${e}" without "contains" is ignored`)}};rd.default=Qb});var ju=R(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var e0=Pu(),t0=Tu(),a0=Ru(),o0=[e0.default,t0.default,a0.default];id.default=o0});var Fu=R(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var St=J(),Du=Q(),r0=De(),i0={message:"must NOT have unevaluated properties",params:({params:e})=>(0,St._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},n0={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:i0,code(e){let{gen:t,schema:a,data:o,errsCount:r,it:i}=e;if(!r)throw new Error("ajv implementation error");let{allErrors:n,props:d}=i;d instanceof St.Name?t.if((0,St._)`${d} !== true`,()=>t.forIn("key",o,u=>t.if(p(d,u),()=>l(u)))):d!==!0&&t.forIn("key",o,u=>d===void 0?l(u):t.if(c(d,u),()=>l(u))),i.props=!0,e.ok((0,St._)`${r} === ${r0.default.errors}`);function l(u){if(a===!1){e.setParams({unevaluatedProperty:u}),e.error(),n||t.break();return}if(!(0,Du.alwaysValidSchema)(i,a)){let x=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:u,dataPropType:Du.Type.Str},x),n||t.if((0,St.not)(x),()=>t.break())}}function p(u,x){return(0,St._)`!${u} || !${u}[${x}]`}function c(u,x){let h=[];for(let m in u)u[m]===!0&&h.push((0,St._)`${x} !== ${m}`);return(0,St.and)(...h)}}};nd.default=n0});var Uu=R(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var Kt=J(),Hu=Q(),s0={message:({params:{len:e}})=>(0,Kt.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Kt._)`{limit: ${e}}`},d0={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:s0,code(e){let{gen:t,schema:a,data:o,it:r}=e,i=r.items||0;if(i===!0)return;let n=t.const("len",(0,Kt._)`${o}.length`);if(a===!1)e.setParams({len:i}),e.fail((0,Kt._)`${n} > ${i}`);else if(typeof a=="object"&&!(0,Hu.alwaysValidSchema)(r,a)){let l=t.var("valid",(0,Kt._)`${n} <= ${i}`);t.if((0,Kt.not)(l),()=>d(l,i)),e.ok(l)}r.items=!0;function d(l,p){t.forRange("i",p,n,c=>{e.subschema({keyword:"unevaluatedItems",dataProp:c,dataPropType:Hu.Type.Num},l),r.allErrors||t.if((0,Kt.not)(l),()=>t.break())})}}};sd.default=d0});var Ou=R(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var l0=Fu(),p0=Uu(),c0=[l0.default,p0.default];dd.default=c0});var qu=R(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var me=J(),u0={message:({schemaCode:e})=>(0,me.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,me._)`{format: ${e}}`},x0={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:u0,code(e,t){let{gen:a,data:o,$data:r,schema:i,schemaCode:n,it:d}=e,{opts:l,errSchemaPath:p,schemaEnv:c,self:u}=d;if(!l.validateFormats)return;r?x():h();function x(){let m=a.scopeValue("formats",{ref:u.formats,code:l.code.formats}),f=a.const("fDef",(0,me._)`${m}[${n}]`),g=a.let("fType"),y=a.let("format");a.if((0,me._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>a.assign(g,(0,me._)`${f}.type || "string"`).assign(y,(0,me._)`${f}.validate`),()=>a.assign(g,(0,me._)`"string"`).assign(y,f)),e.fail$data((0,me.or)(w(),I()));function w(){return l.strictSchema===!1?me.nil:(0,me._)`${n} && !${y}`}function I(){let S=c.$async?(0,me._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,me._)`${y}(${o})`,A=(0,me._)`(typeof ${y} == "function" ? ${S} : ${y}.test(${o}))`;return(0,me._)`${y} && ${y} !== true && ${g} === ${t} && !${A}`}}function h(){let m=u.formats[i];if(!m){w();return}if(m===!0)return;let[f,g,y]=I(m);f===t&&e.pass(S());function w(){if(l.strictSchema===!1){u.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${i}" ignored in schema at path "${p}"`}}function I(A){let _=A instanceof RegExp?(0,me.regexpCode)(A):l.code.formats?(0,me._)`${l.code.formats}${(0,me.getProperty)(i)}`:void 0,$=a.scopeValue("formats",{key:i,ref:A,code:_});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,me._)`${$}.validate`]:["string",A,$]}function S(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!c.$async)throw new Error("async format in sync schema");return(0,me._)`await ${y}(${o})`}return typeof g=="function"?(0,me._)`${y}(${o})`:(0,me._)`${y}.test(${o})`}}}};ld.default=x0});var Bu=R(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var f0=qu(),m0=[f0.default];pd.default=m0});var Lu=R(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.contentVocabulary=ma.metadataVocabulary=void 0;ma.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ma.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ku=R(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var g0=jc(),h0=Yc(),y0=$u(),b0=Nu(),v0=ju(),w0=Ou(),k0=Bu(),Vu=Lu(),$0=[b0.default,g0.default,h0.default,(0,y0.default)(!0),k0.default,Vu.metadataVocabulary,Vu.contentVocabulary,v0.default,w0.default];cd.default=$0});var Wu=R(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.DiscrError=void 0;var Gu;(function(e){e.Tag="tag",e.Mapping="mapping"})(Gu||(dr.DiscrError=Gu={}))});var Yu=R(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});var ga=J(),ud=Wu(),Ju=La(),S0=Ba(),C0=Q(),I0={message:({params:{discrError:e,tagName:t}})=>e===ud.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:a}})=>(0,ga._)`{error: ${e}, tag: ${a}, tagValue: ${t}}`},A0={keyword:"discriminator",type:"object",schemaType:"object",error:I0,code(e){let{gen:t,data:a,schema:o,parentSchema:r,it:i}=e,{oneOf:n}=r;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let d=o.propertyName;if(typeof d!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!n)throw new Error("discriminator: requires oneOf keyword");let l=t.let("valid",!1),p=t.const("tag",(0,ga._)`${a}${(0,ga.getProperty)(d)}`);t.if((0,ga._)`typeof ${p} == "string"`,()=>c(),()=>e.error(!1,{discrError:ud.DiscrError.Tag,tag:p,tagName:d})),e.ok(l);function c(){let h=x();t.if(!1);for(let m in h)t.elseIf((0,ga._)`${p} === ${m}`),t.assign(l,u(h[m]));t.else(),e.error(!1,{discrError:ud.DiscrError.Mapping,tag:p,tagName:d}),t.endIf()}function u(h){let m=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:h},m);return e.mergeEvaluated(f,ga.Name),m}function x(){var h;let m={},f=y(r),g=!0;for(let S=0;S<n.length;S++){let A=n[S];if(A?.$ref&&!(0,C0.schemaHasRulesButRef)(A,i.self.RULES)){let $=A.$ref;if(A=Ju.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,$),A instanceof Ju.SchemaEnv&&(A=A.schema),A===void 0)throw new S0.default(i.opts.uriResolver,i.baseId,$)}let _=(h=A?.properties)===null||h===void 0?void 0:h[d];if(typeof _!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${d}"`);g=g&&(f||y(A)),w(_,S)}if(!g)throw new Error(`discriminator: "${d}" must be required`);return m;function y({required:S}){return Array.isArray(S)&&S.includes(d)}function w(S,A){if(S.const)I(S.const,A);else if(S.enum)for(let _ of S.enum)I(_,A);else throw new Error(`discriminator: "properties/${d}" must have "const" or "enum"`)}function I(S,A){if(typeof S!="string"||S in m)throw new Error(`discriminator: "${d}" values must be unique strings`);m[S]=A}}}};xd.default=A0});var Xu=R((k$,E0)=>{E0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var Zu=R(($$,z0)=>{z0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var Qu=R((S$,_0)=>{_0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var ex=R((C$,N0)=>{N0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var tx=R((I$,M0)=>{M0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var ax=R((A$,P0)=>{P0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var ox=R((E$,T0)=>{T0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var rx=R((z$,R0)=>{R0.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var ix=R(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var j0=Xu(),D0=Zu(),F0=Qu(),H0=ex(),U0=tx(),O0=ax(),q0=ox(),B0=rx(),L0=["/properties"];function V0(e){return[j0,D0,F0,H0,U0,t(this,O0),q0,t(this,B0)].forEach(a=>this.addMetaSchema(a,void 0,!1)),this;function t(a,o){return e?a.$dataMetaSchema(o,L0):o}}fd.default=V0});var nx=R((pe,gd)=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.MissingRefError=pe.ValidationError=pe.CodeGen=pe.Name=pe.nil=pe.stringify=pe.str=pe._=pe.KeywordCxt=pe.Ajv2020=void 0;var K0=Nc(),G0=Ku(),W0=Yu(),J0=ix(),md="https://json-schema.org/draft/2020-12/schema",ha=class extends K0.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),G0.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(W0.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:a}=this.opts;a&&(J0.default.call(this,t),this.refs["http://json-schema.org/schema"]=md)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(md)?md:void 0)}};pe.Ajv2020=ha;gd.exports=pe=ha;gd.exports.Ajv2020=ha;Object.defineProperty(pe,"__esModule",{value:!0});pe.default=ha;var Y0=qa();Object.defineProperty(pe,"KeywordCxt",{enumerable:!0,get:function(){return Y0.KeywordCxt}});var ya=J();Object.defineProperty(pe,"_",{enumerable:!0,get:function(){return ya._}});Object.defineProperty(pe,"str",{enumerable:!0,get:function(){return ya.str}});Object.defineProperty(pe,"stringify",{enumerable:!0,get:function(){return ya.stringify}});Object.defineProperty(pe,"nil",{enumerable:!0,get:function(){return ya.nil}});Object.defineProperty(pe,"Name",{enumerable:!0,get:function(){return ya.Name}});Object.defineProperty(pe,"CodeGen",{enumerable:!0,get:function(){return ya.CodeGen}});var X0=Uo();Object.defineProperty(pe,"ValidationError",{enumerable:!0,get:function(){return X0.default}});var Z0=Ba();Object.defineProperty(pe,"MissingRefError",{enumerable:!0,get:function(){return Z0.default}})});var cv={};$x(cv,{default:()=>pv});var pr=e=>new Map(e.components.map(t=>[t.id,t])),cr=e=>e.surface.kind==="shell"?void 0:e.components.find(t=>t.component==="Navigation"&&(!t.kind||t.kind==="main"));var Ae={pointer:""},Sd=e=>e.replace(/~1/g,"/").replace(/~0/g,"~"),Ix=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),et=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.path=="string";function V(e,t){return e.startsWith("/")?e:`${t.pointer}/${e}`}function se(e,t){return`${e}/${Ix(String(t))}`}function W(e,t){if(t==="")return e;let a=e;for(let o of t.slice(1).split("/").map(Sd)){if(a===null||typeof a!="object")return;a=a[o]}return a}function Gt(e,t,a){let o=t.slice(1).split("/").map(Sd),r=(i,n)=>{let d=o[n],l=Array.isArray(i)?[...i]:{...i??{}};return n===o.length-1?l[d]=a:l[d]=r(i?.[d]??(/^\d+$/.test(o[n+1])?[]:{}),n+1),l};return r(e,0)}var xe=e=>Array.isArray(e)?e:[];function ne(e,t,a){return et(e)?W(t,V(e.path,a)):e}function ct(e,t,a){return Object.fromEntries(Object.entries(e??{}).map(([o,r])=>[o,ne(r,t,a)]))}function ba(e,t,a){return et(e)?ne(e,t,a):Array.isArray(e)?e.map(o=>ba(o,t,a)):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([o,r])=>[o,ba(r,t,a)])):e}function ae(e,t,a,o=Date.now()){if(e==null||e==="")return"\u2014";if(!t||t.type==="text")return Array.isArray(e)?e.join(", "):String(e);let r=typeof e=="number"?e:Number(e),i=t.precision===void 0?{}:{minimumFractionDigits:t.precision,maximumFractionDigits:t.precision};try{switch(t.type){case"number":return new Intl.NumberFormat(a,i).format(r);case"currency":return new Intl.NumberFormat(a,{style:"currency",currency:typeof t.currency=="string"?t.currency:"USD",...i}).format(r);case"percent":return new Intl.NumberFormat(a,{style:"percent",maximumFractionDigits:t.precision??1}).format(r);case"date":return new Intl.DateTimeFormat(a,{dateStyle:"medium",timeZone:"UTC"}).format(new Date(String(e)));case"time":return new Intl.DateTimeFormat(a,{timeStyle:"short",timeZone:"UTC"}).format(new Date(String(e)));case"datetime":return new Intl.DateTimeFormat(a,{dateStyle:"medium",timeStyle:"short",timeZone:"UTC"}).format(new Date(String(e)));case"relativeTime":{let n=(new Date(String(e)).getTime()-o)/1e3,d=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]],l=new Intl.RelativeTimeFormat(a,{numeric:"auto"});for(let[p,c]of d)if(Math.abs(n)>=c)return l.format(Math.round(n/c),p);return l.format(Math.round(n),"second")}case"duration":{let n=Math.round(r/60);return n>=60?`${Math.floor(n/60)} h ${n%60} min`:`${n} min`}case"color":return String(e).trim();case"bytes":{let n=["byte","kilobyte","megabyte","gigabyte","terabyte"],d=0,l=Math.abs(r);for(;l>=1e3&&d<n.length-1;)l/=1e3,d++;return d===0?`${new Intl.NumberFormat(a,{maximumFractionDigits:0}).format(r)} B`:new Intl.NumberFormat(a,{style:"unit",unit:n[d],unitDisplay:"short",maximumFractionDigits:t.precision??1}).format(r<0?-l:l)}}}catch{return String(e)}}function It(e){let t=String(e??"").trim();return/^(#[0-9a-f]{3,8}|[a-z]{3,20}|(rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|hwb)\([\d.,%\s\/-]+\))$/i.test(t)?t:void 0}function co(e,t){try{return new Intl.NumberFormat(t,{style:"currency",currency:e}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}}function de(e,t,a){return!e?.currency||typeof e.currency=="string"?e:{...e,currency:ne(e.currency,t,a)}}var Wt=(e,t)=>new Intl.NumberFormat(t).format(e),ur=(e,t)=>new Intl.NumberFormat(t,{style:"percent",maximumFractionDigits:0}).format(e);function ut(e,t,a,o){let r=e.options;if(Array.isArray(r))return r.map(d=>({value:d.value,label:o(d.label),description:d.description!==void 0?o(d.description):void 0}));let i=V(r.path,a);return xe(W(t,i)).map((d,l)=>{let p={pointer:se(i,l)},c=u=>u?W(t,V(u,p)):void 0;return{value:c(r.valuePath),label:String(c(r.labelPath)??""),description:r.descriptionPath&&String(c(r.descriptionPath)??"")||void 0,avatar:r.avatarPath||r.imagePath?c(r.avatarPath??r.imagePath)??"":void 0,recent:r.recentPath?!!c(r.recentPath):!1}})}function xr(e,t){let a=e.some(i=>i.avatar!==void 0),o=e.length>10||a&&e.length>6;return{control:!a&&e.length<=6&&e.every(i=>i.label.length<=24&&!i.description)?"chips":a?"people":"list",multiple:t==="multiple",searchable:o,withFaces:a}}var tt=e=>JSON.stringify(e),uo=(e,t)=>!t||`${e.label} ${e.description??""}`.toLowerCase().includes(t.toLowerCase());function xo(e,t){return{recent:t?[]:e.filter(a=>a.recent),rest:e.filter(a=>t?uo(a,t):!a.recent)}}function fr(e,t){let a=Array.isArray(e)?e:[],o=tt(t);return a.some(r=>tt(r)===o)?a.filter(r=>tt(r)!==o):[...a,t]}var mr=(e,t)=>{let a=tt(t);return Array.isArray(e)?e.some(o=>tt(o)===a):e!=null&&tt(e)===a},gr=e=>e?"Search by name":"Filter options";var hr=(e,t)=>`${e}-${encodeURIComponent(JSON.stringify(t)).replace(/%/g,"_")}`;var Cd=(e,t)=>Math.max(0,Math.min(t-1,e));function br(e,t){let a=t.type==="back"?e.index-1:t.type==="next"?e.index+1:t.index;return{...e,index:Cd(a,e.total)}}var vr=(e,t)=>({index:typeof e=="number"?Cd(e,t):0,total:t}),wr=e=>e.index===e.total-1,kr=e=>`Step ${e.index+1} of ${e.total}`,yr={todo:{label:"Not started",tone:"neutral"},inProgress:{label:"In progress",tone:"info"},done:{label:"Completed",tone:"success"},blocked:{label:"Cannot start yet",tone:"neutral"}},$r=e=>yr[e??"todo"]??yr.todo,Sr=(e,t)=>e===t?null:t,Cr=(e,t)=>`${e} of ${t} tasks completed`;function Ir(e,t,a){return typeof t=="string"&&t?t:a??e[0]?.key}var Id=640,Ar={narrow:33.333,balanced:50,wide:66.667},va=20,wa=80,zr=e=>({compact:!1,listShown:!1,share:Ar[e??"narrow"]??Ar.narrow}),Er=e=>Math.min(wa,Math.max(va,e));function fo(e,t){switch(t.type){case"measure":return{...e,compact:t.width<Id};case"back":return{...e,listShown:!0};case"selected":return{...e,listShown:!1};case"share":return{...e,share:Er(t.value)};case"key":{let a=t.shift?10:5,o=t.key==="ArrowLeft"?e.share-a:t.key==="ArrowRight"?e.share+a:t.key==="Home"?va:t.key==="End"?wa:void 0;return o===void 0?e:{...e,share:Er(o)}}}}function _r(e,t){let a=!e.compact||t&&!e.listShown;return{showList:!e.compact||!a,showDetail:a}}var Ad=(e,t,a,o,r)=>a?W(o,V(a,{pointer:r})):e&&typeof e=="object"&&"id"in e?e.id:t;function Nr(e,t,a,o){let r=ne(e.selected,a,o),i=r!=null&&r!=="",n=t.get(e.primary),d=n?.component==="Table"?n.rows?.path:n?.items?.path,l=typeof d=="string"?V(d,o):void 0,p=l?xe(W(a,l)):[],c=l?p.findIndex((g,y)=>Ad(g,y,n?.rowValuePath,a,se(l,y))===r):-1,u=l&&c>=0?{pointer:se(l,c)}:void 0,x=n?.items?.componentId?t.get(n.items.componentId):void 0,h=c>=0?p[c]:void 0,m=u&&x?.title!==void 0?ne(x.title,a,u):void 0,f=i?String(m??h?.name??h?.title??h?.label??r):void 0;return{has:i,index:c,scope:u,name:f}}var Ed={"multi-step-form":"form","filter-and-browse":"list","undo-over-confirm":"list","compare-and-choose":"compare","confirm-destructive":"dialog","review-and-submit":"detail"},Mr=(e,t)=>t??(e?Ed[e]:void 0)??"detail",ue=(e,t)=>({block:e,size:t}),Ee=(e,t)=>({group:e,parts:t}),Jt=(e,t)=>Array.from({length:e},(a,o)=>t(o)),Pr={list:[ue("field","full"),...Jt(5,e=>Ee("row",[ue("square"),Ee("lines",[ue("line",e%2?"medium":"long"),ue("small","short")])]))],form:[...Jt(4,e=>Ee("lines",[ue("small","short"),ue("field",e===1?"medium":"long")])),Ee("actions",[ue("button"),ue("button")])],detail:[Ee("row",[ue("circle"),Ee("lines",[Ee("row",[ue("line","medium"),ue("badge")]),ue("small","short")])]),Ee("dl",Jt(6,e=>Ee("row",[ue("small","short"),ue("line",e%3===2?"medium":"long")])))],dashboard:[Ee("cards",Jt(3,()=>Ee("card",[ue("small","short"),ue("value","medium")]))),ue("chart","full")],dialog:[ue("line","long"),ue("line","medium"),Ee("actions",[ue("button"),ue("button")])],compare:[Ee("cards",Jt(3,()=>Ee("card",[ue("line","medium"),...Jt(5,e=>ue("small",e%2?"short":"long"))])))]},Tr={row:"pxd-skeleton-row",lines:"pxd-skeleton-lines",actions:"pxd-skeleton-actions",dl:"pxd-skeleton-dl",cards:"pxd-skeleton-cards",card:"pxd-skeleton-card"},Rr=e=>e?`Preparing ${e}`:"Preparing";var jr=720,zd=[10,25,50,100],Ax=new Set(["number","currency","percent","duration"]),mo=e=>e.align==="end"||e.align!=="start"&&(e.kind==="number"||e.kind==="currency"||Ax.has(e.format?.type));function Dr(e){let[t,...a]=e;return{first:t,status:a.find(o=>o.kind==="status"),details:a.filter(o=>o.kind!=="status").slice(0,3)}}var Fr=(e,t,a,o,r)=>e.rowValuePath?W(o,V(e.rowValuePath,r)):t[a]?.id??a;var go=(e,t)=>e.includes(t)?e.filter(a=>a!==t):[...e,t],Hr=(e,t,a)=>e===t&&a==="ascending"?"descending":"ascending",Ur=(e,t,a)=>e.columns.length+(t?1:0)+(a?1:0)+(e.rowActions||e.rowAction?1:0);function Or(e,t,a,o){let r=typeof e=="number"?e:1,i=typeof t=="number"?t:o,n=typeof a=="number"?a:o,d=Math.max(1,Math.ceil(n/(i||1)));return{index:r,size:i,total:n,pages:d,from:n===0?0:(r-1)*i+1,to:Math.min(r*i,n),sizes:[...new Set([...zd,i])].sort((l,p)=>l-p)}}function qr(e,t,a,o,r){if(!e)return;let{name:i,context:n}=e.event;if(i==="ui.dismiss")return r.onDismiss?.();r.onAction?.({name:i,context:ct(n,o,t),source:a})}function At(e,t,a,o){let r=V(e.value.path,a);return Object.fromEntries(Object.entries(e.action?.event?.context??{}).map(([i,n])=>[i,et(n)&&V(n.path,a)===r?o:ne(n,t,a)]))}function Br(e,t,a,o){return e.copy!==void 0?o(e.copy):String(ct(e.action?.event?.context,t,a).text??"")}var Lr=(e,t)=>({event:{name:e.event.name,context:{key:t,...e.event.context??{}}}});var ho={ctrl:["\u2303","Ctrl","Control","ctrlKey"],alt:["\u2325","Alt","Alt","altKey"],shift:["\u21E7","Shift","Shift","shiftKey"],enter:["\u21B5","Enter","Enter","enter"],escape:["\u238B","Esc","Escape","escape"],space:["Space","Space","Space"," "],tab:["\u21E5","Tab","Tab","tab"],backspace:["\u232B","Backspace","Backspace","backspace"],delete:["\u2326","Del","Delete","delete"],arrowup:["\u2191","\u2191","ArrowUp","arrowup"],arrowdown:["\u2193","\u2193","ArrowDown","arrowdown"],arrowleft:["\u2190","\u2190","ArrowLeft","arrowleft"],arrowright:["\u2192","\u2192","ArrowRight","arrowright"],home:["Home","Home","Home","home"],end:["End","End","End","end"],slash:["/","/","/","/"],comma:[",",",",",",","],period:[".",".",".","."]},_d=["metaKey","ctrlKey","altKey","shiftKey"];function Vr(e,t){let a=e.toLowerCase().split("+"),o=a.pop(),r=[],i=[],n=new Set;for(let l of a){let[p,c,u,x]=l==="mod"?t?["\u2318","Ctrl","Meta","metaKey"]:ho.ctrl:ho[l];r.push(t?p:c),i.push(u),n.add(x)}let d=ho[o];return r.push(d?t?d[0]:d[1]:o.toUpperCase()),i.push(d?d[2]:o.toUpperCase()),{hint:r,aria:i.join("+"),flags:n,key:d?d[3]:o}}function Kr(e,t){if(!_d.every(o=>t[o]===e.flags.has(o)))return!1;let a=/^[a-z0-9]$/.test(e.key)&&t.code.toLowerCase()===(/\d/.test(e.key)?`digit${e.key}`:`key${e.key}`);return t.key.toLowerCase()===e.key||a}var Gr=e=>!e.flags.has("metaKey")&&!e.flags.has("ctrlKey")&&!e.flags.has("altKey"),Wr=e=>/mac|iphone|ipad|ipod/i.test(e);var Jr=e=>e>=1024?"wide":e>=640?"medium":"compact";function Yr(e,t,a){let o=a<=5;return e==="bar"?o?"bar":"drawer":e==="drawer"?"drawer":t==="compact"?o?"bar":"drawer":e==="side"||e==="rail"?e:t==="wide"?"side":"rail"}var Xr=(e,t,a)=>t&&a?a:e;var zx=/^(https?:|mailto:|tel:|\/|#)/i;function Yt(e){let t=[],a="",o=0,r=()=>{a&&t.push(a),a=""};for(;o<e.length;){if(e[o]==="`"){let i=e.indexOf("`",o+1);if(i>o+1){r(),t.push({kind:"code",text:e.slice(o+1,i)}),o=i+1;continue}}if(e.startsWith("**",o)){let i=e.indexOf("**",o+2);if(i>o+2){r(),t.push({kind:"strong",children:Yt(e.slice(o+2,i))}),o=i+2;continue}}if(e[o]==="*"){let i=e.indexOf("*",o+1);if(i>o+1){r(),t.push({kind:"em",children:Yt(e.slice(o+1,i))}),o=i+1;continue}}if(e[o]==="["){let i=/^\[([^\]]+)\]\(([^)\s]+)\)/.exec(e.slice(o));if(i){r(),t.push({kind:"link",href:zx.test(i[2])?i[2]:void 0,children:Yt(i[1])}),o+=i[0].length;continue}}a+=e[o++]}return r(),t}function Zr(e,t,a=!1){let o=t.replace(/[^A-Za-z0-9]/g,"").split(""),r="",i=0;for(let n of e){if(i>=o.length)break;if(n==="#"||n==="A"||n==="*"){let d=n==="#"?/\d/:n==="A"?/[A-Za-z]/:/./;for(;i<o.length&&!d.test(o[i]);)i++;if(i>=o.length)break;r+=o[i++]}else r+=n}if(a)for(;r.length&&!/[#A*]/.test(e[r.length-1]);)r=r.slice(0,-1);return r}var Qr=e=>!/[A*]/.test(e);function ei(e){let t=Number(e.replace(/[^\d.-]/g,""));return e.trim()===""||Number.isNaN(t)?null:t}var ti=(e,t)=>e==null?"":t==="currency"&&typeof e=="number"?e.toFixed(2):String(e);function ai(e,t){let a=t.trim().replace(/,$/,"").trim();return a&&!e.includes(a)?[...e,a]:e}var Be=(e,t,a)=>Math.min(a,Math.max(t,e)),Et=e=>Be(Math.round(e),0,255).toString(16).padStart(2,"0"),_x=e=>e===void 0?1:Be(e.endsWith("%")?parseFloat(e)/100:parseFloat(e),0,1),Nx=e=>e.endsWith("%")?parseFloat(e)/100*255:parseFloat(e);function Nd(e,t,a){let o=(e%360+360)%360/360;if(t===0)return[a*255,a*255,a*255];let r=a<.5?a*(1+t):a+t-a*t,i=2*a-r,n=d=>(d<0&&(d+=1),d>1&&(d-=1),d<1/6?i+(r-i)*6*d:d<1/2?r:d<2/3?i+(r-i)*(2/3-d)*6:i);return[n(o+1/3)*255,n(o)*255,n(o-1/3)*255]}function Md(e,t,a){let o=e/255,r=t/255,i=a/255,n=Math.max(o,r,i),d=Math.min(o,r,i),l=(n+d)/2;if(n===d)return[0,0,l];let p=n-d,c=l>.5?p/(2-n-d):p/(n+d),u=n===o?(r-i)/p+(r<i?6:0):n===r?(i-o)/p+2:(o-r)/p+4;return u/=6,[u*360,c,l]}function xt(e){if(typeof e!="string")return null;let t=e.trim(),a=/^#([0-9a-f]{3,8})$/i.exec(t);if(a){let x=a[1];if(x.length===3||x.length===4){let[h,m,f,g]=x.split("").map(y=>parseInt(y+y,16));return{r:h,g:m,b:f,a:x.length===4?g/255:1}}if(x.length===6||x.length===8){let h=m=>parseInt(x.slice(m,m+2),16);return{r:h(0),g:h(2),b:h(4),a:x.length===8?h(6)/255:1}}return null}let o=/^(rgba?|hsla?)\(\s*([^)]+?)\s*\)$/i.exec(t);if(!o)return null;let r=o[2].split(/\s*[,/]\s*|\s+/).filter(Boolean);if(r.length<3||r.length>4)return null;let i=_x(r[3]);if(Number.isNaN(i))return null;if(o[1].toLowerCase().startsWith("rgb")){let[x,h,m]=r.slice(0,3).map(Nx);return[x,h,m].some(Number.isNaN)?null:{r:Be(x,0,255),g:Be(h,0,255),b:Be(m,0,255),a:i}}let n=parseFloat(r[0]),d=parseFloat(r[1])/100,l=parseFloat(r[2])/100;if([n,d,l].some(Number.isNaN))return null;let[p,c,u]=Nd(n,Be(d,0,1),Be(l,0,1));return{r:p,g:c,b:u,a:i}}function yo(e,t,a){let o=a?Math.round(e.a*100)/100:1,r=Math.round(e.r),i=Math.round(e.g),n=Math.round(e.b);if(t==="rgb")return o<1?`rgba(${r}, ${i}, ${n}, ${o})`:`rgb(${r}, ${i}, ${n})`;if(t==="hsl"){let[d,l,p]=Md(r,i,n),c=Math.round(d),u=Math.round(l*100),x=Math.round(p*100);return o<1?`hsla(${c}, ${u}%, ${x}%, ${o})`:`hsl(${c}, ${u}%, ${x}%)`}return`#${Et(r)}${Et(i)}${Et(n)}${o<1?Et(o*255):""}`}var oi=e=>e?`#${Et(e.r)}${Et(e.g)}${Et(e.b)}`:"#000000",ri=(e,t,a)=>!!(e&&t&&Math.round(e.r)===Math.round(t.r)&&Math.round(e.g)===Math.round(t.g)&&Math.round(e.b)===Math.round(t.b)&&(!a||Math.abs(e.a-t.a)<.005)),ii=e=>e==="hex"?"#000000":e==="rgb"?"rgb(0, 0, 0)":"hsl(0, 0%, 0%)";var Pd=["byte","kilobyte","megabyte","gigabyte"];function Xt(e,t){let a=0,o=e;for(;o>=1024&&a<Pd.length-1;)o/=1024,a++;try{return new Intl.NumberFormat(t,{style:"unit",unit:Pd[a],unitDisplay:"short",maximumFractionDigits:o<10?1:0}).format(o)}catch{return`${Math.round(o*10)/10} ${["B","KB","MB","GB"][a]}`}}function ni(e){let t=e.trim().toLowerCase();if(t.startsWith("."))return t.slice(1).toUpperCase();let a={"image/*":"images","video/*":"videos","audio/*":"audio","text/*":"text files"};if(a[t])return a[t];if(t==="application/pdf")return"PDF";let o=t.split("/")[1];return o?o.replace(/^(x-|vnd\.)/,"").toUpperCase():e}function si(e){return e.length<=1?e.join(""):`${e.slice(0,-1).join(", ")} or ${e[e.length-1]}`}function Td(e,t){if(t.length===0)return!0;let a=e.name.toLowerCase(),o=e.type.toLowerCase();return t.some(r=>{let i=r.trim().toLowerCase();return i.startsWith(".")?a.endsWith(i):i.endsWith("/*")?o.startsWith(i.slice(0,-1)):o===i})}function di(e,t,a,o){let r=e.length?si(e.map(ni)):"";return[r&&`Accepts ${r}.`,t&&`Up to ${Xt(t,o)}${a?" each":""}.`].filter(Boolean).join(" ")}function li(e,t,a,o){if(a&&e.size>a)return`${e.name} is ${Xt(e.size,o)}; the limit is ${Xt(a,o)}.`;let r=t.length?si(t.map(ni)):"";if(!Td(e,t))return`${e.name} isn't an accepted type${r?` (${r})`:""}.`}function pi(e,t,a,o){if(typeof e!="number")return;let r=t??"increase",i=e>0?"up":e<0?"down":"unchanged",n=r==="none"||e===0?"neutral":e>0==(r==="increase")?"positive":"negative",d=ae(Math.abs(e),a,o);return{text:`${e>0?"\u25B2":e<0?"\u25BC":"\u25A0"} ${d}`,spoken:i==="unchanged"?"unchanged":`${i} ${d}`,tone:n}}function Rd(e,t){return e>=1?{tone:"danger",hint:"full"}:t?.danger!==void 0&&e>=t.danger?{tone:"danger",hint:"nearly full"}:t?.warning!==void 0&&e>=t.warning?{tone:"warning",hint:"getting full"}:{}}function ci(e,t,a,o,r,i){let n=typeof t=="number"?t:Number(t),d=a!==void 0?Number(a):void 0,l=d!==void 0&&Number.isFinite(d)&&d>0?d:void 0,p=Number.isFinite(n)?Math.max(0,Math.min(1,l!==void 0?n/l:n)):0,c=e.format?ae(t,e.format,i):ae(p,{type:"percent",precision:0},i),u=e.kind==="meter",x=u?Rd(p,e.thresholds):{},h=e.tone??x.tone,m=u?x.hint:void 0,f=[c,r,m].filter(Boolean).join(", "),g=Math.round(p*100),y=o?{"aria-busy":!0}:l!==void 0?{"aria-valuemin":0,"aria-valuemax":l,"aria-valuenow":Number.isFinite(n)?n:0,"aria-valuetext":f}:{"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":g,"aria-valuetext":f};return{fraction:p,percent:g,valueProps:y,readout:c,tone:h,hint:m,valuetext:f,indeterminate:o}}var ui=e=>`${e} ${e===1?"star":"stars"}`,xi=(e,t)=>e!==void 0?`${e} out of ${t}`:"not yet rated",fi=e=>e.replace(/[^\s]/g,"\u2022"),bo={small:24,default:40,large:64};function mi(e,t){let a=i=>i.split(/\s+/)[0]||i,o=e.slice(0,t),r=e.slice(t);return r.length?`${o.map(i=>a(i.name)).join(", ")} and ${r.length} more`:o.map(i=>a(i.name)).join(", ")}var jd=["primary","secondary","tertiary","success","warning"];function hi(e){return jd[[...e].reduce((t,a)=>t*31+a.charCodeAt(0)>>>0,7)%jd.length]}function yi(e,t){return(e&&e.length<=3?e:t.split(/\s+/).map(a=>a[0]).join("").slice(0,2)).toUpperCase()}var bi=e=>e.length>3,gi={search:"M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14zM21 21l-4.3-4.3",check:"M20 6 9 17l-5-5",info:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM12 16v-4M12 8h.01",lock:"M5 11h14v10H5zM8 11V7a4 4 0 0 1 8 0v4",trash:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6",clock:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM12 7v5l3 2",tag:"M20.6 13.4 13.4 20.6a2 2 0 0 1-2.8 0L3 13V3h10l7.6 7.6a2 2 0 0 1 0 2.8z",alert:"M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h16.9a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01",mail:"M3 5h18v14H3zM3 7l9 6 9-6",shield:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z",book:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z",inbox:"M22 12h-6l-2 3h-4l-2-3H2M5.5 5h13L22 12v7H2v-7z",filter:"M3 5h18l-7 8v6l-4 2v-8z",close:"M18 6 6 18M6 6l12 12",dash:"M6 12h12",menu:"M4 6h16M4 12h16M4 18h16",home:"M4 11 12 4l8 7M6 10v10h12V10",settings:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zM19.4 15a1.7 1.7 0 0 0 .3 1.8 2 2 0 1 1-2.8 2.8 1.7 1.7 0 0 0-2.9 1.2 2 2 0 1 1-4 0 1.7 1.7 0 0 0-2.9-1.2 2 2 0 1 1-2.8-2.8A1.7 1.7 0 0 0 2.1 14a2 2 0 1 1 0-4 1.7 1.7 0 0 0 1.2-2.9 2 2 0 1 1 2.8-2.8A1.7 1.7 0 0 0 9 3.1a2 2 0 1 1 4 0 1.7 1.7 0 0 0 2.9 1.2 2 2 0 1 1 2.8 2.8A1.7 1.7 0 0 0 21 10a2 2 0 1 1 0 4 1.7 1.7 0 0 0-1.6 1z",chart:"M4 20V10M10 20V4M16 20v-7M22 20H2",people:"M9 4.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7zM2.5 20a6.5 6.5 0 0 1 13 0M16 4.5a3.5 3.5 0 0 1 0 7M18 14a6.5 6.5 0 0 1 3.5 6",card:"M2 6h20v13H2zM2 10h20",file:"M6 3h8l4 4v14H6zM14 3v4h4",dots:"M12 5h.01M12 12h.01M12 19h.01",sort:"M8 9l4-4 4 4M8 15l4 4 4-4",sortUp:"M12 19V5M6 11l6-6 6 6",sortDown:"M12 5v14M6 13l6 6 6-6",chevronLeft:"M15 5l-7 7 7 7",chevronRight:"M9 5l7 7-7 7",chevronDown:"m6 9 6 6 6-6",orders:"M6 3h12v18l-3-2-3 2-3-2-3 2zM9 8h6M9 12h6",products:"M12 3 3 7.5v9L12 21l9-4.5v-9zM3 7.5l9 4.5 9-4.5M12 12v9",customers:"M12 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM4 21a8 8 0 0 1 16 0",discounts:"M19 5 5 19M7.5 6a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM16.5 15a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z",analytics:"M3 17l5-6 4 3 5-7 4 4M3 21h18",calendar:"M4 6h16v14H4zM4 10h16M8 3v4M16 3v4",bell:"M6 16V11a6 6 0 0 1 12 0v5l2 2H4zM10 21h4",help:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.7.3-1 .9-1 1.7M12 17h.01",folder:"M3 6h6l2 2h10v11H3z",star:"m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3 6.4 20.2l1.1-6.2L3 9.6l6.2-.9z",grid:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z",layers:"m12 3 9 5-9 5-9-5zM3 13l9 5 9-5M3 17l9 5 9-5"},vi=e=>gi[e]??gi.info,wi={info:"info",success:"check",warning:"alert",error:"alert",empty:"inbox",undo:"check"},vo="M12 2.5l2.9 6.2 6.8.8-5 4.7 1.3 6.8L12 17.6 6 21l1.3-6.8-5-4.7 6.8-.8z";var ki=(e,t)=>e&&typeof e=="object"&&"id"in e?e.id:t;function $i(e,t){let a=e.layout??"auto";return{grid:a==="grid"||a==="auto"&&t?.component==="Card"&&!!t.media,timeline:a==="timeline",carousel:a==="carousel",calendar:a==="calendar"}}function Si(e,t){let a=e.map((r,i)=>i);if(!Array.isArray(t))return a;let o=r=>{let i=t.indexOf(e[r]);return i<0?t.length+r:i};return a.sort((r,i)=>o(r)-o(i))}function Ci(e,t,a,o){if(o<0||o>=e.length||a===o)return;let r=[...e];return r.splice(o,0,...r.splice(a,1)),r.map(i=>t[i])}function Ii(e){if(e==null||e==="")return;let t=new Date(String(e));return Number.isNaN(t.getTime())?void 0:{y:t.getUTCFullYear(),m:t.getUTCMonth(),d:t.getUTCDate()}}var Ai=(e,t,a=new Date)=>e??(t?{y:t.y,m:t.m}:{y:a.getUTCFullYear(),m:a.getUTCMonth()});function wo(e,t){let a=new Date(Date.UTC(e.y,e.m+t,1));return{y:a.getUTCFullYear(),m:a.getUTCMonth()}}function Ei(e,t){let a=new Intl.DateTimeFormat(t,{month:"long",year:"numeric",timeZone:"UTC"}).format(new Date(Date.UTC(e.y,e.m,1))),o=Array.from({length:7},(l,p)=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(Date.UTC(2024,0,1+p)))),r=(new Date(Date.UTC(e.y,e.m,1)).getUTCDay()+6)%7,i=new Date(Date.UTC(e.y,e.m+1,0)).getUTCDate(),n=[...Array(r).fill(null),...Array.from({length:i},(l,p)=>p+1)];for(;n.length%7;)n.push(null);let d=Array.from({length:n.length/7},(l,p)=>n.slice(p*7,p*7+7));return{...e,monthName:a,weekdays:o,weeks:d}}function zi(e,t){let a=0;return e.forEach((o,r)=>{Math.abs(o-t)<Math.abs(e[a]-t)&&(a=r)}),a}function _i(e,t,a){let o=new Map;for(let r of e){if(!r.better||r.better==="none")continue;let i=Array.from({length:t},(d,l)=>Number(a(r.path,l))),n=r.better==="higher"?Math.max(...i):Math.min(...i);i.filter(d=>d===n).length===1&&o.set(r.key,i.indexOf(n))}return o}function Ni(e,t){let a=[];for(let o of e){let r=o.group!==void 0?t(o.group):void 0,i=a.find(n=>n.label===r);i?i.attributes.push(o):a.push({label:r,attributes:[o]})}return a}function Mi(e,t){let a=e.map((r,i)=>i),o=a.findIndex(r=>e[r]===t);return o>0&&a.unshift(...a.splice(o,1)),a}function Pi(e,t){let a=[];for(let o of e){let r=o.group!==void 0?t(o.group):void 0,i=a.find(n=>n.label===r);i?i.items.push(o):a.push({label:r,items:[o]})}return a}var Ti=e=>e==="breadcrumb"?"Breadcrumb":e==="toc"?"On this page":"Main";var fe={top:16,right:16,bottom:32,left:56},Zt=["circle","square","diamond","triangle","circle","square"],ge=e=>`var(--pxd-color-data-categorical-${e%6+1})`;function Qt(e){if(e<=0)return 1;let t=10**Math.floor(Math.log10(e));return Math.ceil(e/t)*t}function ko(e,t,a){if(t==="date"||t==="datetime"){let o=new Date(String(e));if(!Number.isNaN(o.getTime())){let r=o.getUTCDate()===1?{month:"short",timeZone:"UTC"}:{month:"short",day:"numeric",timeZone:"UTC"};return new Intl.DateTimeFormat(a,r).format(o)}}return String(e??"").slice(0,12)}function Ri(e,t,a){let o=e.reduce((x,h)=>x+h,0),r=e.map(()=>null);if(o<=0)return r;let i=e.map((x,h)=>h).filter(x=>e[x]>0).sort((x,h)=>e[h]-e[x]),n=x=>e[x]/o*t*a,d=0,l=0,p=t,c=a,u=0;for(;u<i.length&&p>0&&c>0;){let x=p>=c,h=x?c:p,m=[],f=0,g=1/0;for(;u<i.length;){let I=[...m,i[u]],S=f+n(i[u]),A=S/h,_=Math.max(...I.map($=>{let N=n($)/A;return Math.max(N/A,A/N)}));if(_>g&&m.length)break;m=I,f=S,g=_,u++}let y=f/h,w=0;for(let I of m){let S=n(I)/y;r[I]=x?{x:d,y:l+w,w:y,h:S}:{x:d+w,y:l,w:S,h:y},w+=S}x?(d+=y,p-=y):(l+=y,c-=y)}return r}function ji(e,t){let a=Qt(Math.max(0,...e)),o=t?Math.min(0,...e):0,r=t&&e.length?Math.max(o,Math.min(...e)-(Math.max(...e)-Math.min(...e))*.2):o,i=t?Math.floor(r):0;return{lo:i,max:a,ticks:[0,.5,1].map(n=>i+(a-i)*n)}}function Di(e,t,a){return e==="square"?{tag:"rect",attrs:{x:t-4,y:a-4,width:8,height:8}}:e==="diamond"?{tag:"path",attrs:{d:`M${t} ${a-5}L${t+5} ${a}L${t} ${a+5}L${t-5} ${a}Z`}}:e==="triangle"?{tag:"path",attrs:{d:`M${t} ${a-5}L${t+5} ${a+4}L${t-5} ${a+4}Z`}}:{tag:"circle",attrs:{cx:t,cy:a,r:4}}}function Fi(e,t,a){let o=e.map(x=>x.reduce((h,m)=>h+m,0)),r=Array.from({length:t},(x,h)=>e.reduce((m,f)=>m+f[h],0)),i=o.reduce((x,h)=>x+h,0)||1,n=6,l=(a-n*(Math.max(e.length,t)-1))/i,p=[],c=[],u=0;return o.forEach(x=>(p.push(u),u+=x*l+n)),u=0,r.forEach(x=>(c.push(u),u+=x*l+n)),{leftY:p,rightY:c,leftTotals:o,rightTotals:r,scale:l}}var $o=200,Hi=10,Ui=500,Mx=e=>e==null?"":String(e);function Oi(e,t,a,o){let r=[],i=new Map,n=[],d=(c,u)=>o?o.has(c):u===1,l=(c,u,x,h)=>{c.forEach((m,f)=>{let g={pointer:se(u,f)},y=Mx(W(t,V(e.labelPath,g))),w=e.valuePath?W(t,V(e.valuePath,g)):y,I=w??(y||g.pointer),S=e.detailPath?W(t,V(e.detailPath,g)):void 0,A=S==null||S===""?void 0:String(S),_=xe(W(t,V(e.childrenPath,g)));x===1&&n.push(I);let $=_.length>0,N=$&&d(I,x),M=r.length;i.set(g.pointer,M),r.push({key:g.pointer,scope:g,level:x,setsize:c.length,posinset:f+1,label:y,value:I,detail:A,hasChildren:$,expanded:N,parent:h}),N&&l(_,V(e.childrenPath,g),x+1,M)})},p=V(e.items.path,a);return l(xe(W(t,p)),p,1,-1),{rows:r,indexByKey:i,topValues:n}}function qi(e,t,a){let o=n=>{for(let d=1;d<=e.length;d++){let l=(t+d)%e.length;if(e[l].label.toLowerCase().startsWith(n))return l}return-1},r=a.length>1&&[...a].every(n=>n===a[0]),i=o(r?a[0]:a);return i<0&&a.length>1&&(i=o(a[0])),i}function Bi(e,t,a){let o=e[t];if(o)switch(a.key){case"ArrowDown":return{focus:Math.min(e.length-1,t+1)};case"ArrowUp":return{focus:Math.max(0,t-1)};case"ArrowRight":return o.hasChildren&&!o.expanded?{toggle:!0}:o.expanded?{focus:Math.min(e.length-1,t+1)}:void 0;case"ArrowLeft":return o.expanded?{toggle:!0}:o.parent>=0?{focus:o.parent}:void 0;case"Home":return{focus:0};case"End":return{focus:e.length-1};case"Enter":return{activate:!0};case" ":return{select:!0};case"*":return{expandSiblings:!0};default:return a.key.length===1&&!a.ctrlKey&&!a.metaKey&&!a.altKey?{typeAhead:a.key}:void 0}}function Li(e,t,a,o){return e<=$o?{start:0,end:e}:{start:Math.max(0,Math.floor(t/a)-Hi),end:Math.min(e,Math.ceil((t+o)/a)+Hi)}}function Vi(e,t,a,o,r){let i=[];for(let n of e){if(!et(n.value))continue;let d=n.value,l=ne(n.value,t,a),p=r(n.label),c=u=>ae(u,de(n.format??{type:"number"},t,a),o);switch(n.component){case"Choice":{let u=ut(n,t,a,r),x=h=>u.find(m=>m.value===h)?.label??String(h);if(Array.isArray(l))for(let h of l)i.push({key:`${n.id}:${h}`,label:x(h),binding:d,cleared:l.filter(m=>m!==h)});else l!=null&&l!==""&&i.push({key:n.id,label:x(l),binding:d,cleared:null});break}case"RangeInput":{if(n.mode==="range"&&Array.isArray(l)){let[u,x]=l.map(Number);(u>n.min||x<n.max)&&i.push({key:n.id,label:`${p}: ${c(u)} \u2013 ${c(x)}`,binding:d,cleared:[n.min,n.max]})}else typeof l=="number"&&l<n.max&&i.push({key:n.id,label:`${p}: ${c(l)}`,binding:d,cleared:n.max});break}case"Toggle":l===!0&&i.push({key:n.id,label:p,binding:d,cleared:!1});break;case"TextInput":typeof l=="string"&&l.trim()&&i.push({key:n.id,label:`${p}: ${l}`,binding:d,cleared:""});break;case"DateInput":l&&i.push({key:n.id,label:`${p}: ${String(l)}`,binding:d,cleared:null});break}}return i}var Ki=640,Gi=(e,t)=>e===void 0?void 0:`${ae(e,{type:"number"},t)} ${e===1?"result":"results"}`;var Dd=[[10,[[1,16]]],[16,[[1,28]]],[26,[[1,44]]],[18,[[2,32]]],[24,[[2,43]]],[16,[[4,27]]],[18,[[4,31]]],[22,[[2,38],[2,39]]],[22,[[3,36],[2,37]]],[26,[[4,43],[1,44]]]],Px=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50]];function Wi(e,t){let a=0;for(let o=7;o>=0;o--)a=a<<1^(a>>>7)*285,a^=(t>>>o&1)*e;return a&255}function Tx(e,t){let a=new Array(t).fill(0);a[t-1]=1;let o=1;for(let i=0;i<t;i++){for(let n=0;n<t;n++)a[n]=Wi(a[n],o),n+1<t&&(a[n]^=a[n+1]);o=Wi(o,2)}let r=new Array(t).fill(0);for(let i of e){let n=i^r.shift();r.push(0),a.forEach((d,l)=>r[l]^=Wi(d,n))}return r}var Rx=[(e,t)=>(e+t)%2===0,(e,t)=>t%2===0,e=>e%3===0,(e,t)=>(e+t)%3===0,(e,t)=>(Math.floor(e/3)+Math.floor(t/2))%2===0,(e,t)=>e*t%2+e*t%3===0,(e,t)=>(e*t%2+e*t%3)%2===0,(e,t)=>((e+t)%2+e*t%3)%2===0];function Ji(e){let t=Array.from(new TextEncoder().encode(e)),a=0,o=0;for(let v=1;v<=10&&!a;v++){let b=Dd[v-1][1].reduce((C,[E,P])=>C+E*P,0);4+(v<10?8:16)+t.length*8<=b*8&&(a=v,o=b)}if(!a)return;let[r,i]=Dd[a-1],n=[],d=(v,b)=>{for(let C=b-1;C>=0;C--)n.push(v>>>C&1)};d(4,4),d(t.length,a<10?8:16);for(let v of t)d(v,8);let l=o*8;for(d(0,Math.min(4,l-n.length));n.length%8;)n.push(0);for(let v=236;n.length<l;v^=253)d(v,8);let p=[];for(let v=0;v<n.length;v+=8)p.push(n.slice(v,v+8).reduce((b,C)=>b<<1|C,0));let c=[],u=0;for(let[v,b]of i)for(let C=0;C<v;C++){let E=p.slice(u,u+b);c.push({d:E,e:Tx(E,r)}),u+=b}let x=[],h=Math.max(...c.map(v=>v.d.length));for(let v=0;v<h;v++)for(let b of c)v<b.d.length&&x.push(b.d[v]);for(let v=0;v<r;v++)for(let b of c)x.push(b.e[v]);let m=a*4+17,f=Array.from({length:m},()=>new Array(m).fill(!1)),g=Array.from({length:m},()=>new Array(m).fill(!1)),y=(v,b,C)=>{v>=0&&b>=0&&v<m&&b<m&&(f[b][v]=C,g[b][v]=!0)};for(let v=0;v<m;v++)y(6,v,v%2===0),y(v,6,v%2===0);let w=(v,b)=>{for(let C=-4;C<=4;C++)for(let E=-4;E<=4;E++){let P=Math.max(Math.abs(E),Math.abs(C));y(v+E,b+C,P!==2&&P!==4)}};w(3,3),w(m-4,3),w(3,m-4);let I=Px[a-1],S=I.length-1;I.forEach((v,b)=>I.forEach((C,E)=>{if(!(b===0&&E===0||b===0&&E===S||b===S&&E===0))for(let P=-2;P<=2;P++)for(let z=-2;z<=2;z++)y(v+z,C+P,Math.max(Math.abs(z),Math.abs(P))!==1)}));let A=v=>{let b=v,C=b;for(let z=0;z<10;z++)C=C<<1^(C>>>9)*1335;let E=(b<<10|C)^21522,P=z=>(E>>>z&1)===1;for(let z=0;z<=5;z++)y(8,z,P(z));y(8,7,P(6)),y(8,8,P(7)),y(7,8,P(8));for(let z=9;z<15;z++)y(14-z,8,P(z));for(let z=0;z<8;z++)y(m-1-z,8,P(z));for(let z=8;z<15;z++)y(8,m-15+z,P(z));y(8,m-8,!0)};if(A(0),a>=7){let v=a;for(let C=0;C<12;C++)v=v<<1^(v>>>11)*7973;let b=a<<12|v;for(let C=0;C<18;C++){let E=(b>>>C&1)===1,P=m-11+C%3,z=Math.floor(C/3);y(P,z,E),y(z,P,E)}}let _=0;for(let v=m-1;v>=1;v-=2){v===6&&(v=5);for(let b=0;b<m;b++)for(let C=0;C<2;C++){let E=v-C,P=(v+1&2)===0?m-1-b:b;!g[P][E]&&_<x.length*8&&(f[P][E]=(x[_>>>3]>>>7-(_&7)&1)===1,_++)}}let $=v=>{for(let b=0;b<m;b++)for(let C=0;C<m;C++)!g[b][C]&&Rx[v](C,b)&&(f[b][C]=!f[b][C])},N=()=>{let v=0,b=P=>{let z=0,F=null;P.forEach((T,U)=>{if(T===F?(z++,z===5?v+=3:z>5&&(v+=1)):(F=T,z=1),U+7<=P.length){let B=P.slice(U,U+7),D=B[0]&&!B[1]&&B[2]&&B[3]&&B[4]&&!B[5]&&B[6],L=U>=4&&P.slice(U-4,U).every(j=>!j),H=U+11<=P.length&&P.slice(U+7,U+11).every(j=>!j);D&&(L||H)&&(v+=40)}})};for(let P=0;P<m;P++)b(f[P]),b(f.map(z=>z[P]));for(let P=0;P<m-1;P++)for(let z=0;z<m-1;z++)f[P][z]===f[P][z+1]&&f[P][z]===f[P+1][z]&&f[P][z]===f[P+1][z+1]&&(v+=3);let C=f.flat().filter(Boolean).length,E=m*m;return v+=(Math.ceil(Math.abs(C*20-E*10)/E)-1)*10,v},M=0,k=1/0;for(let v=0;v<8;v++){A(v),$(v);let b=N();$(v),b<k&&(k=b,M=v)}return A(M),$(M),f}var Yi="More actions";function Xi(e,t){for(let a=e.length-1;a>0;a--)if(t.get(e[a])?.component!=="Action")return a+1;return 1}function Zi(e,t,a,o,r,i){if(e.length<=2)return e.length;let n=0,d=0;for(;d<e.length&&n+(d?a:0)+t(e[d])<=o;)n+=(d?a:0)+t(e[d++]);if(d<e.length){for(;d>i&&n+a+r>o;)n-=a+t(e[--d]);d=Math.max(d,i)}return d}function ka(e){let t=e.filter(o=>o.tone!=="danger"),a=e.filter(o=>o.tone==="danger");return{usual:t,danger:a,divider:a.length>0&&t.length>0}}function Qi(e,t={}){let a=t.data??e.data??{},o=new Set,r=t.locale??"en-GB",i=()=>o.forEach(d=>d(a)),n={document:e,byId:pr(e),get data(){return a},locale:r,setValue(d,l){let p=Gt(a,d,l);a=t.derive?.(p)??p,t.onDataChange?.(a),i()},replaceData(d){a=d,i()},dispatch:(d,l,p)=>qr(d,l,p,a,t),subscribe(d){return o.add(d),()=>o.delete(d)},resolve:(d,l=Ae)=>ne(d,a,l),text(d,l,p=Ae){let c=ne(d,a,p);return l?ae(c,de(l,a,p),r):c==null?"":String(c)},pointer:(d,l=Ae)=>V(d.path,l),write:(d,l,p=Ae)=>n.setValue(V(d.path,p),l),context:(d,l=Ae)=>ct(d,a,l),visible:(d,l=Ae)=>d.visible===void 0||ne(d.visible,a,l)!==!1};return n}function en(e,t){let a={"data-pxd-id":e.id,"data-pxd-component":e.component},o=e.accessibility;return o?{...a,"aria-label":o.label!==void 0?t(o.label):void 0,"aria-description":o.description!==void 0?t(o.description):void 0,"aria-live":o.live,"aria-hidden":o.hidden||void 0}:a}var jx="http://www.w3.org/2000/svg",qd=new Set(["svg","path","circle","rect","line","polyline","polygon","g","text"]),Dx=new Set(["value","checked","selected","indeterminate","textContent"]),Fx=new Set(["list","form","type","autocomplete","for","role","tabindex","lang","dir","translate","spellcheck","autocapitalize","autocorrect","inputmode","enterkeyhint","colspan","rowspan","scope","title","width","height","size","min","max","step","pattern","placeholder","maxlength","minlength","accept","alt","src","href","rel","poster","controls","name","contenteditable","draggable","autofocus"]);function s(e,t,...a){let o=t??{};return{tag:e,props:o,children:a,key:o.key}}var ea=(e,t)=>({dom:e,key:t}),zt=e=>!!e&&typeof e=="object"&&"dom"in e;function So(e,t=[]){for(let a of e)a==null||a===!1||(Array.isArray(a)?So(a,t):typeof a=="number"?t.push(String(a)):t.push(a));return t}function Hx(e,t,a){if(typeof t=="string"){e.style.cssText=t;return}let o=t??{},r=typeof a=="object"&&a||{};for(let i of Object.keys(r))i in o||(i.startsWith("--")?e.style.removeProperty(i):e.style[i]="");for(let[i,n]of Object.entries(o))n==null?i.startsWith("--")?e.style.removeProperty(i):e.style[i]="":i.startsWith("--")?e.style.setProperty(i,String(n)):e.style[i]=typeof n=="number"&&!/^(opacity|zIndex|flex|lineHeight|fontWeight|order)$/.test(i)?`${n}px`:String(n)}function tn(e,t,a,o,r){if(t==="key"||t==="children")return;if(t==="ref"){e.__ref=a;return}if(t.startsWith("on")&&(typeof a=="function"||a===void 0)){let n=t.slice(2).toLowerCase(),d=e.__on??={};a&&!d[n]&&e.addEventListener(n,l=>e.__on?.[n]?.(l)),a?d[n]=a:delete d[n];return}if(t==="style")return Hx(e,a,o);if(t==="class"||t==="className"){let n=a==null||a===!1?"":String(a);r?n?e.setAttribute("class",n):e.removeAttribute("class"):e.className!==n&&(e.className=n);return}let i=t.toLowerCase();if(!r&&Dx.has(t)){let n=a??(typeof e[t]=="boolean"?!1:"");e[t]!==n&&(e[t]=n);return}if(!r&&!t.includes("-")&&!Fx.has(i)&&t in e&&typeof e[t]!="function"&&typeof e[t]=="boolean"){e[t]=!!a;return}a==null||a===!1&&!t.startsWith("aria-")?e.removeAttribute(i==="classname"?"class":t):e.setAttribute(t,a===!0?t.startsWith("aria-")||t==="draggable"||t==="contenteditable"?"true":"":String(a))}function Bd(e,t){if(typeof e=="string"){let r=document.createTextNode(e);return r.__vnode=e,r}if(zt(e))return e.dom.__vnode=e,e.dom;let a=t||qd.has(e.tag),o=a?document.createElementNS(jx,e.tag):document.createElement(e.tag);for(let[r,i]of Object.entries(e.props))tn(o,r,i,void 0,a);for(let r of So(e.children))o.appendChild(Bd(r,a));return o.__vnode=e,o}function Ld(e){let t=e;if(t.nodeType===1){t.__ref?.(t);for(let a of Array.from(t.childNodes))(!a.__vnode||!zt(a.__vnode))&&Ld(a)}}function an(e){let t=e;if(t.nodeType===1&&!zt(t.__vnode)){t.__ref?.(null);for(let a of Array.from(t.childNodes))an(a)}}var $a=e=>e&&typeof e=="object"?e.key:void 0,Od=(e,t)=>e!==void 0&&typeof e==typeof t&&(typeof e=="string"||(zt(e)?zt(t)&&e.dom===t.dom:!zt(t)&&e.tag===t.tag&&$a(e)===$a(t)));function Ux(e,t,a){let o=e,r=o.__vnode;if(typeof t=="string"){e.textContent!==t&&(e.textContent=t),o.__vnode=t;return}if(zt(t))return;let i=r?.props??{},n=a||qd.has(t.tag);for(let d of Object.keys(i))d in t.props||tn(o,d,void 0,i[d],n);for(let[d,l]of Object.entries(t.props))(d==="style"||d==="ref"||i[d]!==l)&&tn(o,d,l,i[d],n);o.__vnode=t,Vd(o,So(t.children),n)}function Vd(e,t,a){let o=Array.from(e.childNodes),r=new Map;for(let d of o){let l=$a(d.__vnode);l!==void 0&&r.set(l,d)}let i=new Set,n=o[0]??null;for(let d of t){let l=$a(d),p;if(l!==void 0?p=r.get(l):n&&!i.has(n)&&$a(n.__vnode)===void 0&&Od(n.__vnode,d)&&(p=n),p&&Od(p.__vnode,d))i.add(p),p!==n?e.insertBefore(p,n):n=n.nextSibling??null,Ux(p,d,a);else{let c=Bd(d,a);e.insertBefore(c,n),Ld(c)}}for(let d of o)i.has(d)||(an(d),d.remove())}function Sa(e,t){Vd(e,So(t),!1)}function on(e){for(let t of Array.from(e.childNodes))an(t),t.remove()}var Gd=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function Je(e,...t){let{checked:a,onCheckedChange:o,indicator:r,...i}=e,n=a==="indeterminate"?"indeterminate":a?"checked":"unchecked";return s("button",{type:"button",role:"checkbox","aria-checked":a==="indeterminate"?"mixed":a,"data-state":n,value:"on",...i,onClick:()=>o(a==="indeterminate"?!0:!a)},n!=="unchecked"?r:null,...t)}function ft(e,...t){let{value:a,onValueChange:o,orientation:r,...i}=e;return s("div",{role:"radiogroup","aria-orientation":r,dir:"ltr",tabindex:"0",style:{outline:"none"},...i,"data-value":a,onKeydown:l=>{let p=l.currentTarget,c=Array.from(p.querySelectorAll('[role="radio"]:not(:disabled)')),u=c.indexOf(document.activeElement);if(u<0||!c.length)return;let x=l.key==="ArrowDown"||l.key==="ArrowRight",h=l.key==="ArrowUp"||l.key==="ArrowLeft";if(!x&&!h)return;l.preventDefault();let m=c[(u+(x?1:c.length-1))%c.length];m.focus(),m.click()},onFocus:l=>{let p=l.currentTarget;if(l.target!==p)return;let c=Array.from(p.querySelectorAll('[role="radio"]:not(:disabled)'));(c.find(u=>u.getAttribute("aria-checked")==="true")??c[0])?.focus()},onFocusin:l=>l.currentTarget.tabIndex=-1,onFocusout:l=>{let p=l.currentTarget;p.contains(l.relatedTarget)||(p.tabIndex=0)}},...t)}function _t(e,...t){let{value:a,group:o,first:r,onSelect:i,indicator:n,...d}=e,l=o===a;return s("button",{type:"button",role:"radio","aria-checked":l,"data-state":l?"checked":"unchecked",value:a,tabindex:l||o===""&&r?"0":"-1",...d,onClick:()=>!l&&i()},l?n:null,...t)}function Wd(e){let{checked:t,onCheckedChange:a,...o}=e,r=t?"checked":"unchecked";return s("button",{type:"button",role:"switch","aria-checked":t,"data-state":r,value:"on",...o,onClick:()=>a(!t)},s("span",{"data-state":r,class:"pxd-switch-thumb"}))}var Kd=20;function rn(e){let{min:t,max:a,step:o}=e,r=a-t||1,i=f=>(f-t)/r*100,n=f=>Math.min(a,Math.max(t,f)),d=f=>n(t+Math.round((f-t)/o)*o),l=(f,g)=>{let y=[...e.values];y[f]=d(g);let w=(e.minStepsBetweenThumbs??0)*o;y.length===2&&(f===0?y[0]=Math.min(y[0],y[1]-w):y[1]=Math.max(y[1],y[0]+w)),e.onValueChange(y)},p=f=>g=>{let y=e.values[f],w=o*10,I=g.key==="ArrowRight"||g.key==="ArrowUp"?y+o:g.key==="ArrowLeft"||g.key==="ArrowDown"?y-o:g.key==="PageUp"?y+w:g.key==="PageDown"?y-w:g.key==="Home"?t:g.key==="End"?a:void 0;I!==void 0&&(g.preventDefault(),l(f,I))},c=f=>{if(f.pointerType==="mouse"&&f.button!==0)return;let g=f.currentTarget,y=g.querySelector(".pxd-slider-track"),w=$=>{let N=y.getBoundingClientRect();return t+Math.min(1,Math.max(0,($-N.left)/(N.width||1)))*r},I=w(f.clientX),S=0;e.values.forEach(($,N)=>{Math.abs($-I)<Math.abs(e.values[S]-I)&&(S=N)}),f.preventDefault(),g.querySelectorAll('[role="slider"]')[S]?.focus(),l(S,I);let A=$=>l(S,w($.clientX)),_=()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",_)};document.addEventListener("pointermove",A),document.addEventListener("pointerup",_)},u=i(e.values[0]),x=i(e.values[e.values.length-1]),h=e.values.length===1?{left:"0%",right:`${100-x}%`}:{left:`${u}%`,right:`${100-x}%`},m=f=>Kd/2-f/50*(Kd/2);return s("span",{dir:"ltr","data-orientation":"horizontal",class:"pxd-slider",style:{"--radix-slider-thumb-transform":"translateX(-50%)"},onPointerdown:c},s("span",{"data-orientation":"horizontal",class:"pxd-slider-track"},s("span",{"data-orientation":"horizontal",class:"pxd-slider-range",style:h})),...e.values.map((f,g)=>s("span",{key:g,style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",left:`calc(${i(f)}% + ${m(i(f))}px)`}},s("span",{role:"slider","aria-label":e.thumbs[g]?.["aria-label"],"aria-labelledby":e.thumbs[g]?.["aria-labelledby"],"aria-valuemin":t,"aria-valuenow":f,"aria-valuemax":a,"aria-valuetext":e.thumbs[g]?.["aria-valuetext"],"aria-orientation":"horizontal","data-orientation":"horizontal",tabindex:"0",class:"pxd-slider-thumb",onKeydown:p(g)}))))}function Jd(e){let t=a=>{let o=a.currentTarget,r=Array.from(o.querySelectorAll('[role="tab"]')),i=r.indexOf(document.activeElement);if(i<0)return;let n=a.key==="ArrowRight"?(i+1)%r.length:a.key==="ArrowLeft"?(i+r.length-1)%r.length:a.key==="Home"?0:a.key==="End"?r.length-1:-1;n<0||(a.preventDefault(),r[n].focus(),r[n].click())};return s("div",{dir:"ltr","data-orientation":"horizontal",class:e.rootClass,...e.rootProps??{}},s("div",{role:"tablist","aria-orientation":"horizontal",class:e.listClass,tabindex:"-1","data-orientation":"horizontal",style:{outline:"none"},onKeydown:t},...e.tabs.map(a=>{let o=a.key===e.value;return s("button",{key:a.key,type:"button",role:"tab","aria-selected":o,"aria-controls":`${e.id}-content-${a.key}`,"data-state":o?"active":"inactive",id:`${e.id}-trigger-${a.key}`,tabindex:o?"0":"-1","data-orientation":"horizontal",class:e.tabClass,onClick:()=>e.onValueChange(a.key)},...a.label)})),...e.tabs.map(a=>{let o=a.key===e.value;return s("div",{key:a.key,"data-state":o?"active":"inactive","data-orientation":"horizontal",role:"tabpanel","aria-labelledby":`${e.id}-trigger-${a.key}`,id:`${e.id}-content-${a.key}`,tabindex:"0",class:e.panelClass,hidden:!o,style:{animationDuration:"0s"}},o?a.content:null)}))}function Ye(e,...t){let a=e.dismissible!==!1;e.ctx.r.modals++;let o=i=>{let n=i;if(n&&!n.open)try{n.showModal()}catch{n.setAttribute("open","")}e.ref?.(n)},r=i=>{i.open&&i.close(),e.onClose()};return[s("div",{key:`${e.id}-overlay`,"data-state":"open",class:e.overlayClass??"pxd-overlay","aria-hidden":"true",style:{pointerEvents:"auto"}}),s("dialog",{key:e.id,role:e.role??"dialog","data-state":"open",class:e.class,tabindex:"-1","data-pxd-modal":"",...e.props??{},ref:o,onCancel:i=>{i.preventDefault(),a&&r(i.currentTarget)},onClick:i=>{let n=i.currentTarget;if(i.target!==n)return;let d=n.getBoundingClientRect();!(i.clientX>=d.left&&i.clientX<=d.right&&i.clientY>=d.top&&i.clientY<=d.bottom)&&a&&r(n)},onClose:()=>e.onClose()},...t)]}var at=(e,t,...a)=>s("button",{type:"button",...t,onClick:o=>{let r=o.currentTarget.closest("dialog");r?.open&&r.close(),e()}},...a),ot=()=>({open:!1,x:0,y:0,align:"end"});function ta(e,t,a,o,r){let i=(n,d)=>{let l=n.getBoundingClientRect();a({open:!0,x:o==="end"?l.right:l.left,y:l.bottom+4,keyboard:d,align:o})};return{id:`${e}-trigger`,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?`${e}-content`:void 0,"data-state":t.open?"open":"closed",...r,onPointerdown:n=>{n.button!==0||n.ctrlKey||(n.preventDefault(),t.open?a(ot()):i(n.currentTarget,!1))},onKeydown:n=>{(n.key==="Enter"||n.key===" "||n.key==="ArrowDown")&&(n.preventDefault(),i(n.currentTarget,!0))}}}function Nt(e,t,a,o,r,i){if(!a.open)return;let n=(c=!0)=>{o(ot()),c&&(document.getElementById(`${t}-trigger`)??e.r.root?.querySelector(`[data-pxd-menu-trigger="${t}"]`))?.focus()},d=c=>{let u=c.currentTarget,x=Array.from(u.querySelectorAll('[role="menuitem"]:not([data-disabled])')),h=x.indexOf(document.activeElement);if(c.key==="Escape")return c.preventDefault(),n();if(c.key==="Tab")return n(!1);let m=c.key==="ArrowDown"?(h+1)%x.length:c.key==="ArrowUp"?(h+x.length-1)%x.length:c.key==="Home"?0:c.key==="End"?x.length-1:-1;m>=0&&x.length&&(c.preventDefault(),x[m].focus())},l=null,p=c=>{if(!c){l&&document.removeEventListener("pointerdown",l,!0),l=null;return}let u=c,x=u.getBoundingClientRect(),h=u.parentElement,m=a.align==="end"?Math.max(8,a.x-x.width):Math.min(a.x,window.innerWidth-x.width-8),f=a.y+x.height>window.innerHeight?Math.max(8,a.y-x.height-8):a.y;h.style.transform=`translate(${Math.round(m)}px, ${Math.round(f)}px)`;let g=u.querySelector('[role="menuitem"]:not([data-disabled])');(a.keyboard&&g?g:u).focus({preventScroll:!0}),l=y=>{!u.contains(y.target)&&!y.target.closest?.(`#${CSS.escape(`${t}-trigger`)}`)&&n(!1)},document.addEventListener("pointerdown",l,!0)};e.portal(s("div",{key:`${t}-menu`,"data-radix-popper-content-wrapper":"",style:{position:"fixed",left:"0px",top:"0px",minWidth:"max-content",zIndex:12}},s("div",{role:"menu","aria-orientation":"vertical","data-state":"open",dir:"ltr",id:`${t}-content`,"aria-labelledby":`${t}-trigger`,tabindex:"-1",style:{outline:"none"},...i,ref:p,onKeydown:d},...r.map((c,u)=>c==="separator"?s("div",{key:`sep-${u}`,role:"separator","aria-orientation":"horizontal",class:"pxd-menu-separator"}):s("div",{key:c.key,role:"menuitem",class:c.class,tabindex:"-1","data-orientation":"vertical","aria-disabled":c.disabled||void 0,"data-disabled":c.disabled?"":void 0,...c.props??{},onPointermove:x=>{x.currentTarget.focus()},onFocus:x=>{for(let h of x.currentTarget.parentElement.querySelectorAll("[data-highlighted]"))h.removeAttribute("data-highlighted");x.currentTarget.setAttribute("data-highlighted","")},onBlur:x=>x.currentTarget.removeAttribute("data-highlighted"),onClick:()=>{c.disabled||(n(),c.onSelect())},onKeydown:x=>{(x.key==="Enter"||x.key===" ")&&!c.disabled&&(x.preventDefault(),n(),c.onSelect())}},...c.label)))))}function Yd(e,t,a,o,r,i,...n){let d=null,l=null,p=c=>{if(!c){d&&document.removeEventListener("pointerdown",d,!0),l&&document.removeEventListener("keydown",l),d=l=null;return}let u=c,x=u.parentElement,h=e.r.root?.querySelector(a),m=h?.getBoundingClientRect()??{left:8,bottom:8,width:0},f=u.getBoundingClientRect(),g=Math.max(8,Math.min(m.left+m.width/2-f.width/2,window.innerWidth-f.width-8)),y=m.bottom+8+f.height>window.innerHeight?Math.max(8,(h?.getBoundingClientRect().top??0)-8-f.height):m.bottom+8;x.style.transform=`translate(${Math.round(g)}px, ${Math.round(y)}px)`,(u.querySelector("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")??u).focus({preventScroll:!0}),r&&(d=w=>{u.contains(w.target)||o()},l=w=>w.key==="Escape"&&o(),document.addEventListener("pointerdown",d,!0),document.addEventListener("keydown",l))};e.portal(s("div",{key:`${t}-popover`,"data-radix-popper-content-wrapper":"",style:{position:"fixed",left:"0px",top:"0px",minWidth:"max-content",zIndex:12}},s("div",{"data-side":"bottom","data-align":"center","data-state":"open",role:"dialog",id:`${t}-content`,tabindex:"-1",...i,ref:p},...n)))}var rt=(e,t)=>(t??[]).map(a=>e.render(a));function it(e,t,...a){return s(`h${Math.min(e.heading,6)}`,{class:t},...a)}function Xd(e,t){let a=t.b,o=t.id(e,"heading");return s("section",{class:"pxd-section","aria-labelledby":o,...t.a11y(e)},s("div",{class:"pxd-section-header"},s(`h${Math.min(t.heading,6)}`,{id:o,class:"pxd-section-title"},a.text(e.title)),e.description!==void 0&&s("p",{class:"pxd-section-description"},a.text(e.description))),s("div",{class:"pxd-stack"},...rt(t.with({heading:t.heading+1}),e.children)))}function Zd(e,t){let a=(e.children??[]).map(n=>t.r.byId.get(n)),o=a.length>1&&a.every(n=>n?.component==="Metric"),r=e.arrangement??"auto";return s("div",{class:`pxd-group pxd-stack${r==="inline"?" pxd-group-inline":r==="grid"?" pxd-group-grid":o?" pxd-metric-row":""}`,...t.a11y(e)},...rt(t,e.children))}function Qd(e,t){return s("div",{class:`pxd-columns pxd-columns-${e.layout??"two-thirds"} pxd-columns-collapse-${e.collapse??"compact"} pxd-columns-align-${e.align??"stretch"}`,...t.a11y(e)},...rt(t,e.children))}function el(e,t){let a=t.b,o=a.text(e.title),r=e.badge?.tone??"neutral";return s("article",{class:`pxd-card${e.action?" pxd-card-actionable":""}`,...t.a11y(e)},e.media&&s("div",{class:"pxd-card-media"},t.render(e.media)),s("div",{class:"pxd-card-body"},s("div",{class:"pxd-card-header"},it(t,"pxd-card-title",e.action?s("button",{type:"button",class:"pxd-card-link",onClick:()=>t.r.dispatch(e.action,a.scope,e.id)},o):o),e.badge&&s("span",{class:`pxd-badge pxd-tone-${r}`},a.text(e.badge.text))),e.subtitle!==void 0&&s("p",{class:"pxd-card-subtitle"},a.text(e.subtitle)),e.progress&&Ox(a.value(e.progress.value),e.progress.label!==void 0&&a.text(e.progress.label)||void 0,o,t.r.locale),e.children&&s("div",{class:"pxd-stack pxd-stack-tight pxd-card-children"},...rt(t,e.children))))}function Ox(e,t,a,o){let r=Math.max(0,Math.min(1,Number(e)||0)),i=ur(r,o);return s("div",{class:"pxd-progress"},s("div",{class:"pxd-progress-track",role:"progressbar","aria-label":`Progress: ${a}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(r*100),"aria-valuetext":t??i},s("div",{class:"pxd-progress-fill",style:{width:`${r*100}%`}})),s("span",{class:"pxd-progress-label"},t??i))}function tl(e,t){let a=t.b,[o,r]=t.state(e,"open",()=>e.open??t.r.disclosure==="show-everything"),i=t.id(e,"content"),n=o?"open":"closed";return s("div",{"data-state":n,class:"pxd-disclosure",...t.a11y(e)},s("button",{type:"button","aria-controls":o?i:void 0,"aria-expanded":o,"data-state":n,class:"pxd-disclosure-trigger",onClick:()=>r(!o)},s("span",{class:"pxd-disclosure-icon","aria-hidden":"true"},o?"\u25BE":"\u25B8"),a.text(e.summary)),s("div",{"data-state":n,id:i,hidden:!o,class:"pxd-disclosure-content"},o?s("div",{class:"pxd-stack"},...rt(t,e.children)):null))}function al(e,t){let a=t.b,o=e.selected?a.value(e.selected):void 0,[r,i]=t.state(e,"view",void 0),n=Ir(e.views,o,r),d=l=>e.selected?a.write(e.selected,l):i(l);return Jd({id:t.id(e),value:n,onValueChange:d,rootClass:`pxd-views pxd-views-${e.variant??"tabs"}`,rootProps:t.a11y(e),listClass:"pxd-views-list",tabClass:"pxd-views-tab",panelClass:"pxd-views-panel",tabs:e.views.map(l=>{let p=l.count!==void 0?a.value(l.count):void 0;return{key:l.key,label:[a.text(l.label),p!==void 0&&s("span",{class:"pxd-views-count"},Wt(p,t.r.locale))],content:t.render(l.content)}})})}function Se(e,{value:t,name:a,size:o=40}){let r=typeof t=="string"?t:"",i=bi(r)?e.r.props.resolveMedia?.(r):void 0,n=yi(r,a),d=hi(a);return i?s("img",{class:"pxd-avatar",src:i,alt:"",width:o,height:o,style:{width:o,height:o}}):s("span",{class:`pxd-avatar pxd-avatar-${d}`,"aria-hidden":"true",style:{width:o,height:o,fontSize:Math.round(o*.38)}},n)}function O(e,t=20){return s("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},s("path",{d:vi(e)}))}function ol(e,t){let a=t.b,[o,r]=t.state(e,"split",()=>zr(e.ratio)),[i,n]=t.state(e,"previous",()=>a.value(e.selected)),d=a.value(e.selected),{has:l,scope:p,name:c}=Nr(e,t.r.byId,t.r.data,a.scope),u=w=>r(I=>fo(I,w)),x=!1;d!==i&&(n(d),o.listShown&&u({type:"selected"}),x=o.compact&&l);let{showList:h,showDetail:m}=_r(o,l),f=w=>{if(w.pointerType==="mouse"&&w.button!==0)return;let I=w.currentTarget,S=I.parentElement;I.setPointerCapture(w.pointerId);let A=S.getBoundingClientRect(),_=getComputedStyle(S).direction==="rtl",$=M=>{let k=_?A.right-M.clientX:M.clientX-A.left;u({type:"share",value:k/A.width*100})},N=()=>{S.removeEventListener("pointermove",$),S.removeEventListener("pointerup",N),S.removeEventListener("pointercancel",N)};S.addEventListener("pointermove",$),S.addEventListener("pointerup",N),S.addEventListener("pointercancel",N)},g=!!e.resizable&&!o.compact,y=w=>{if(!w)return;let I=w.closest(".pxd-surface")??w;t.r.observeWidth(I,`${e.id}:split`,S=>u({type:"measure",width:S}))};return x&&t.after(()=>t.r.root?.querySelector(`[data-pxd-id="${e.id}"] > .pxd-split-detail`)?.focus()),s("div",{class:`pxd-split pxd-split-${e.ratio??"narrow"}${o.compact?" pxd-split-compact":""}${g?" pxd-split-resizable":""}`,style:g?{"--polyxd-split-share":`${o.share}%`}:void 0,...t.a11y(e),ref:y},s("div",{class:"pxd-split-primary",hidden:!h},t.render(e.primary)),g&&s("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize the list","aria-valuenow":Math.round(o.share),"aria-valuemin":va,"aria-valuemax":wa,tabindex:"0",class:"pxd-split-handle",onKeydown:w=>{let I=fo(o,{type:"key",key:w.key,shift:w.shiftKey});I!==o&&(w.preventDefault(),r(I))},onPointerdown:f},s("span",{class:"pxd-split-handle-line","aria-hidden":"true"})),m&&s("div",{class:"pxd-split-detail",tabindex:"-1","aria-label":c},o.compact&&s("button",{type:"button",class:"pxd-button pxd-button-tertiary pxd-split-back",onClick:()=>u({type:"back"})},O("chevronLeft",18),"Back"),l?t.render(e.detail,p):e.empty?t.render(e.empty):null),s("span",{class:"pxd-sr-only","aria-live":"polite"},o.compact&&l&&!o.listShown?c:""))}function nn(e){return"block"in e?s("span",{class:`pxd-skeleton-block pxd-skeleton-${e.block}${e.size?` pxd-skeleton-${e.size}`:""}`}):s("div",{class:Tr[e.group]},...e.parts.map(nn))}function Ca({title:e,pattern:t,shape:a,theme:o,mode:r,density:i,locale:n="en-GB",className:d}){let l=Mr(t,a);return s("div",{class:["pxd-surface","pxd-skeleton",`pxd-skeleton-${l}`,d].filter(Boolean).join(" "),"data-pxd-theme":o,"data-pxd-mode":r,"data-pxd-density":i,lang:n,role:"status","aria-busy":"true"},s("span",{class:"pxd-sr-only"},Rr(e)),s("div",{class:"pxd-skeleton-body","aria-hidden":"true"},nn({block:"title",size:l==="dialog"?"short":"medium"}),...Pr[l].map(nn)))}function il(e,t){let a=t.r,o=t.id(e,"main"),[r,i]=t.state(e,"width","wide"),[n,d]=t.state(e,"drawer",!1),l=e.navigation?a.byId.get(e.navigation):void 0,p=Yr(l?.placement,r,l?.items?.length??0),c=f=>String(ne(f,a.data,Ae)??"");p!=="drawer"&&n&&d(!1);let u={navigation:p,compact:r==="compact",mainId:o,navigationId:l?.id,navigationLabel:l?l.label!==void 0?c(l.label):"Main":void 0,current:a.props.current,drawerOpen:n,setDrawerOpen:d},x=t.with({frame:u}),h=e.header?a.byId.get(e.header):void 0,m=e.aside?a.byId.get(e.aside):void 0;return s("div",{class:`pxd-frame pxd-frame-width-${e.width??"contained"}`,"data-pxd-layout":r,"data-pxd-nav":p,"data-pxd-appbar":h?.component==="AppBar"&&h.sticky!==!1?h.variant??"standard":void 0,...t.a11y(e),ref:f=>f&&a.observeWidth(f,`${e.id}:frame`,g=>i(Jr(g)))},e.skipTarget!==!1&&s("a",{class:"pxd-skip-link",href:`#${o}`,onClick:f=>{f.preventDefault(),document.getElementById(o)?.focus()}},"Skip to main content"),e.banner&&s("div",{class:"pxd-frame-banner"},x.render(e.banner)),e.header&&x.render(e.header),s("div",{class:"pxd-frame-body"},l&&s("div",{class:"pxd-frame-nav"},x.render(l.id)),s("div",{class:"pxd-frame-main"},x.render(e.main)),m&&s("aside",{class:"pxd-frame-aside","aria-label":m.title!==void 0?c(m.title):"Aside"},x.render(m.id))),e.footer&&x.render(e.footer))}function qx(e,t,a){let o=typeof t=="string"?t:"",r=o.length>3?e.r.props.resolveMedia?.(o):void 0;if(r)return s("img",{class:"pxd-appbar-logo",src:r,alt:""});let i=(o&&o.length<=3?o:a.split(/\s+/).map(n=>n[0]).join("").slice(0,2)).toUpperCase();return s("span",{class:"pxd-appbar-mark","aria-hidden":"true"},i)}function nl(e,t){let a=t.b,o=t.frame,[r,i]=t.state(e,"scrolled",!1),[n,d]=t.state(e,"search",!1),l=e.variant??"standard",p=e.sticky!==!1,c=o?.compact??!1,u=a.text(e.title),x=Xr(u,c,o?.current?.title),h=o?.navigation==="drawer",m=new WeakMap,f=y=>{if(!y||!p||typeof IntersectionObserver>"u"||m.has(y))return;let w=new IntersectionObserver(([I])=>i(!I.isIntersecting));w.observe(y),m.set(y,w)},g=y=>s("div",{class:`pxd-appbar-search${y?" pxd-appbar-search-row":""}`,role:"search","aria-label":"Search",ref:y?w=>w&&n&&!w.dataset.focused&&(w.dataset.focused="1",w.querySelector("input, button")?.focus()):void 0},t.render(e.search));return[s("div",{class:"pxd-appbar-sentinel","aria-hidden":"true",ref:f}),s("header",{class:`pxd-appbar pxd-appbar-${l}${p?" pxd-appbar-sticky":""}`,"data-pxd-scrolled":r||void 0,...t.a11y(e)},s("div",{class:"pxd-appbar-row"},h?s("button",{type:"button",class:"pxd-icon-button pxd-appbar-menu","aria-label":`${o.navigationLabel??"Main"} menu`,"aria-expanded":o.drawerOpen,onClick:()=>o.setDrawerOpen(!0)},O("menu")):e.leading&&s("div",{class:"pxd-appbar-leading"},t.render(e.leading)),s("div",{class:"pxd-appbar-brand"},e.brand!==void 0&&qx(t,a.value(e.brand),u),(l!=="large"||c)&&s("span",{class:"pxd-appbar-title"},x)),e.search&&(c?s("button",{type:"button",class:"pxd-icon-button pxd-appbar-search-toggle","aria-label":n?"Close search":"Search","aria-expanded":n,onClick:()=>d(!n)},O(n?"close":"search")):g(!1)),(e.actions||e.account)&&s("div",{class:"pxd-appbar-end"},e.actions&&s("div",{class:"pxd-appbar-actions"},t.render(e.actions)),e.account&&s("div",{class:"pxd-appbar-account"},t.render(e.account)))),e.search&&c&&n&&g(!0),l==="large"&&!c&&s("div",{class:"pxd-appbar-headline"},x))]}function sl(e,t){let a=t.b,o=Math.min(t.heading,6),r=e.groups??[];return s("footer",{class:"pxd-footer",...t.a11y(e)},r.length>0&&s("div",{class:"pxd-footer-groups"},...r.map(i=>{let n=t.id(e,i.key);return s("nav",{key:i.key,class:"pxd-footer-group","aria-labelledby":n},s(`h${o}`,{id:n,class:"pxd-footer-heading"},a.text(i.label)),s("ul",null,...i.items.map(d=>s("li",{key:d.key},s("button",{type:"button",class:"pxd-link pxd-footer-link",onClick:()=>t.r.dispatch(d.action,a.scope,e.id)},a.text(d.label))))))})),s("div",{class:"pxd-footer-legal"},s("p",{class:"pxd-footer-legal-text"},a.text(e.legal)),e.aside&&s("div",{class:"pxd-footer-aside"},t.render(e.aside))))}function dl(e,t){let a=t.b,o=t.r,r=t.frame,i=!!o.props.loading,n=`${o.props.current?.key??""}\0${o.props.current?.title??""}`,[d,l]=t.state(e,"shown",n);d!==n&&(l(n),i||t.after(()=>{let c=document.getElementById(r?.mainId??"");if(!c)return;let u=c.querySelector("h1");u&&!u.hasAttribute("tabindex")&&(u.tabIndex=-1),(u??c).focus()}));let p=o.props.outlet;return s("main",{id:r?.mainId,class:"pxd-outlet",tabindex:"-1","aria-label":e.label!==void 0?a.text(e.label):void 0,...t.a11y(e)},i?e.loading?t.render(e.loading):Ca({title:o.props.current?.title,className:"pxd-outlet-skeleton"}):p?ea(p,"outlet"):null)}var rl=new Set;function ll(e,t){let a=t.b,o=t.r.components[e.name];if(!o)return rl.has(e.name)||(rl.add(e.name),console.warn(`[polyxd] No host component named "${e.name}"; rendering its fallback. Pass one in the surface's components.`)),e.fallback?t.render(e.fallback):null;let r=ba(e.props??{},t.r.data,a.scope)??{},i=o({...r,node:e}),n=i instanceof Element?ea(i,e.id):i;return e.label===void 0?n:s("div",{class:"pxd-custom",role:"group","aria-label":a.text(e.label),...t.a11y(e)},n)}function pl(e,t){let a=t.b,o=t.r,[r,i]=t.state(e,"compact",!1),n=V(e.rows.path,a.scope),d=xe(W(o.data,n)),l=a.text(e.caption),p=!!e.detail&&e.expandable!==!1,[c,u]=t.state(e,"expanded",()=>[]),x=z=>c.includes(z),h=z=>u(F=>go(F,z)),m=(z,F)=>s("button",{type:"button",class:"pxd-icon-button pxd-table-expander","aria-expanded":x(z),"aria-label":`${x(z)?"Hide":"Show"} details for ${F}`,onClick:()=>h(z)},O(x(z)?"sortUp":"sortDown",16)),f=e.selection==="multiple",g=f&&e.selected?a.value(e.selected)??[]:[],y=(z,F)=>Fr(e,d,F,o.data,z),w=z=>a.write(e.selected,go(g,z)),I=d.map((z,F)=>y({pointer:se(n,F)},F)),S=d.length>0&&I.every(z=>g.includes(z)),A=()=>a.write(e.selected,S?[]:I),_=e.sort?.column?a.value(e.sort.column):void 0,$=e.sort?.direction?a.value(e.sort.direction):"ascending",N=z=>{let F=Hr(z,_,$);e.sort?.column&&a.write(e.sort.column,z),e.sort?.direction&&a.write(e.sort.direction,F),e.sort?.action&&o.dispatch(e.sort.action,a.scope,e.id)},M=z=>s("span",{"data-state":"checked",style:{pointerEvents:"none"}},z),k=(z,F)=>{let T=W(o.data,V(z.path,F)),U=ae(T,de(z.format,o.data,a.scope),o.locale);if(z.kind==="status")return s("span",{class:`pxd-badge pxd-tone-${z.tones?.[String(T)]??"neutral"}`},U);if(z.format?.type==="color")return s("span",{class:"pxd-color-value"},s("span",{class:`pxd-swatch${It(U)?"":" pxd-swatch-unknown"}`,style:It(U)?{background:It(U)}:void 0,"aria-hidden":"true"}),U);if(z.kind==="entity"){let B=z.secondaryPath?String(W(o.data,V(z.secondaryPath,F))??""):"";return s("span",{class:"pxd-entity"},z.avatarPath&&Se(t,{value:W(o.data,V(z.avatarPath,F)),name:U,size:28}),s("span",{class:"pxd-entity-text"},e.rowAction?s("button",{type:"button",class:"pxd-link",onClick:()=>o.dispatch(e.rowAction,F,e.id)},U):s("span",{class:"pxd-entity-name"},U),B&&s("span",{class:"pxd-entity-secondary"},B)))}return z.kind==="link"&&e.rowAction?s("button",{type:"button",class:"pxd-link",onClick:()=>o.dispatch(e.rowAction,F,e.id)},U):U},v=(z,F,T)=>{let B=(o.byId.get(e.rowActions)?.children??[]).map(j=>o.byId.get(j)).filter(j=>!!j&&(j.visible===void 0||ne(j.visible,o.data,z)!==!1));if(!B.length)return null;let D=t.id(e,`row-${T}-menu`),[L,H]=t.state(e,`menu:${T}`,ot);return Nt(t,D,L,H,B.map(j=>({key:j.id,label:[a.text(j.label)],class:`pxd-menu-item${j.tone==="danger"?" pxd-menu-item-danger":""}`,onSelect:()=>o.dispatch(j.action,z,j.id)})),{class:"pxd-menu"}),s("button",{type:"button",...ta(D,L,H,"end",{class:"pxd-icon-button","aria-label":`Actions for ${F}`})},O("dots",18))},b=[e.views&&Bx(e,t),(e.search||e.toolbar||f&&g.length>0)&&s("div",{class:`pxd-table-toolbar${g.length>0?" pxd-table-bulk":""}`,role:"toolbar","aria-label":g.length>0?`Actions for ${g.length} selected`:"Table tools"},...g.length>0?[s("p",{class:"pxd-bulk-count","aria-live":"polite"},`${g.length} selected`),e.bulkActions&&t.render(e.bulkActions),s("button",{type:"button",class:"pxd-button pxd-button-tertiary",onClick:()=>a.write(e.selected,[])},"Cancel")]:[e.search&&t.render(e.search),s("span",{class:"pxd-table-toolbar-spacer"}),e.toolbar&&t.render(e.toolbar)])],C=()=>s("ul",{class:"pxd-row-list","aria-label":l},...d.map((z,F)=>{let T={pointer:se(n,F)},{first:U,status:B,details:D}=Dr(e.columns),L=ae(W(o.data,V(U.path,T)),de(U.format,o.data,a.scope),o.locale),H=y(T,F);return s("li",{key:String(H),class:"pxd-row-item"},f&&e.selected&&Je({class:"pxd-checkbox",checked:g.includes(H),onCheckedChange:()=>w(H),"aria-label":`Select ${L}`,indicator:M(O("check",14))}),p&&m(H,L),s("div",{class:"pxd-row-main"},s("div",{class:"pxd-row-title"},k(U,T)),s("p",{class:"pxd-row-details"},...D.map((j,K)=>s("span",{key:j.key},K>0&&s("span",{"aria-hidden":"true"}," \xB7 "),s("span",{class:"pxd-sr-only"},`${a.text(j.label)}: `),ae(W(o.data,V(j.path,T)),de(j.format,o.data,a.scope),o.locale))))),B&&k(B,T),e.rowActions?v(T,L,F):e.rowAction&&!e.columns[0].kind?s("button",{type:"button",class:"pxd-button pxd-button-tertiary",onClick:()=>o.dispatch(e.rowAction,T,e.id)},"Select",s("span",{class:"pxd-sr-only"},` ${L}`)):null,p&&x(H)&&s("div",{class:"pxd-row-detail"},t.render(e.detail,T)))})),E=()=>s("div",{class:"pxd-table-scroll"},s("table",{class:"pxd-table"},s("caption",{class:e.views||e.search?"pxd-sr-only":void 0},l),s("thead",null,s("tr",null,p&&s("th",{scope:"col",class:"pxd-table-expand"},s("span",{class:"pxd-sr-only"},"Details")),f&&e.selected&&s("th",{scope:"col",class:"pxd-table-select"},Je({class:"pxd-checkbox",checked:S?!0:g.length>0?"indeterminate":!1,onCheckedChange:A,"aria-label":"Select all rows",indicator:s("span",{"data-state":S?"checked":"indeterminate",style:{pointerEvents:"none"}},O(S?"check":"dash",14))})),...e.columns.map(z=>{let F=z.key===_;return s("th",{key:z.key,scope:"col",class:mo(z)?"pxd-num":void 0,"aria-sort":z.sortable?F?$:"none":void 0},z.sortable?s("button",{type:"button",class:"pxd-sort",onClick:()=>N(z.key)},a.text(z.label),O(F?$==="descending"?"sortDown":"sortUp":"sort",16)):a.text(z.label))}),(e.rowActions||e.rowAction)&&s("th",{scope:"col"},s("span",{class:"pxd-sr-only"},"Actions")))),s("tbody",null,...d.flatMap((z,F)=>{let T={pointer:se(n,F)},U=y(T,F),B=ae(W(o.data,V(e.columns[0].path,T)),de(e.columns[0].format,o.data,a.scope),o.locale);return[s("tr",{key:String(U),class:g.includes(U)?"pxd-row-selected":void 0,"aria-selected":f?g.includes(U):void 0},p&&s("td",{class:"pxd-table-expand"},m(U,B)),f&&e.selected&&s("td",{class:"pxd-table-select"},Je({class:"pxd-checkbox",checked:g.includes(U),onCheckedChange:()=>w(U),"aria-label":`Select ${B}`,indicator:M(O("check",14))})),...e.columns.map((D,L)=>s(L===0?"th":"td",{key:D.key,scope:L===0?"row":void 0,"data-label":a.text(D.label),class:mo(D)?"pxd-num":void 0},k(D,T))),(e.rowActions||e.rowAction)&&s("td",{class:"pxd-table-action"},e.rowActions?v(T,B,F):s("button",{type:"button",class:"pxd-button pxd-button-tertiary",onClick:()=>o.dispatch(e.rowAction,T,e.id)},"Select",s("span",{class:"pxd-sr-only"},` ${B}`)))),p&&x(U)&&s("tr",{key:`${String(U)}-detail`,class:"pxd-table-detail"},s("td",{colspan:Ur(e,p,!!(f&&e.selected))},t.render(e.detail,T)))]})))),P=!d.length&&e.empty?t.render(e.empty):r?C():E();return s("div",{class:"pxd-table-wrap",...t.a11y(e),ref:z=>z&&o.observeWidth(z,`${e.id}:table`,F=>i(F<jr))},...b,P,e.page&&sn(e,t,d.length))}function Bx(e,t){let a=t.b,o=e.view?a.value(e.view):e.views[0].key;return s("div",{class:"pxd-table-views",role:"tablist","aria-label":"Saved views"},...e.views.map(r=>{let i=r.count!==void 0?a.value(r.count):void 0,n=r.key===o;return s("button",{key:r.key,type:"button",role:"tab","aria-selected":n,class:`pxd-table-view${n?" pxd-table-view-current":""}`,onClick:()=>{e.view&&a.write(e.view,r.key),t.r.dispatch(r.action,a.scope,e.id)}},a.text(r.label),i!==void 0&&s("span",{class:"pxd-views-count"},Wt(i,t.r.locale)))}))}function sn(e,t,a){let o=t.b,r=e.page,{index:i,size:n,total:d,pages:l,from:p,to:c,sizes:u}=Or(r.index?o.value(r.index):void 0,r.size?o.value(r.size):void 0,r.total?o.value(r.total):void 0,a),x=m=>Wt(m,t.r.locale),h=m=>{r.index&&o.write(r.index,m),t.r.dispatch(r.action,o.scope,e.id)};return s("div",{class:"pxd-paging"},r.size&&s("label",{class:"pxd-paging-size"},"Rows per page",s("select",{value:String(n),onChange:m=>{o.write(r.size,Number(m.target.value)),r.index&&o.write(r.index,1),t.r.dispatch(r.action,o.scope,e.id)}},...u.map(m=>s("option",{key:m,value:String(m),selected:m===n},String(m))))),s("p",{class:"pxd-paging-range","aria-live":"polite"},`${x(p)}\u2013${x(c)} of ${x(d)}`),s("div",{class:"pxd-paging-controls"},s("button",{type:"button",class:"pxd-icon-button","aria-label":"Previous page",disabled:i<=1,onClick:()=>h(i-1)},O("chevronLeft",18)),s("span",{class:"pxd-paging-page"},`Page ${x(i)} of ${x(l)}`),s("button",{type:"button",class:"pxd-icon-button","aria-label":"Next page",disabled:i>=l,onClick:()=>h(i+1)},O("chevronRight",18))))}function ul(e){let t=It(e);return s("span",{class:`pxd-swatch${t?"":" pxd-swatch-unknown"}`,style:t?{background:t}:void 0,"aria-hidden":"true"})}function Ia(e){return e.map(t=>typeof t=="string"?t:t.kind==="code"?s("code",null,t.text):t.kind==="strong"?s("strong",null,...Ia(t.children)):t.kind==="em"?s("em",null,...Ia(t.children)):t.kind!=="link"?null:t.href?s("a",{href:t.href,rel:"noopener noreferrer"},...Ia(t.children)):s("span",null,...Ia(t.children)))}function xl(e,t){let a=t.b,o=t.a11y(e),r=e.variant??"body",i=e.format?.type==="color",n=(d,l=e.format)=>{let p=a.text(d,l);return l?.type==="color"?[ul(p),p]:[p]};if(r==="rich")return s("p",{class:"pxd-text pxd-text-body pxd-text-rich",...o},...Ia(Yt(a.text(e.text))));if(r==="quote")return s("figure",{class:"pxd-text-quote",...o},s("blockquote",null,s("p",{class:"pxd-text pxd-text-body"},...n(e.text))),e.cite!==void 0&&s("figcaption",{class:"pxd-text-cite"},a.text(e.cite)));if(r==="list"){let d=e.items?V(e.items.path,a.scope):void 0,l=d?xe(W(t.r.data,d)):[],p=a.text(e.text);return s("div",{class:"pxd-text-list",...o},p&&s("p",{class:"pxd-text pxd-text-body"},p),s(e.ordered?"ol":"ul",{class:`pxd-text-list-items${e.ordered?" pxd-text-list-ordered":""}`},...l.map((c,u)=>{let x=e.itemPath&&d?W(t.r.data,V(e.itemPath,{pointer:se(d,u)})):c;return s("li",{key:u},...n(x))})))}return s("p",{class:`pxd-text pxd-text-${r}${i?" pxd-text-color":""}`,...o},...n(e.text))}function fl(e,t){let a=t.b,o=a.text(e.label),r=a.text(e.value,e.format),i=e.change?pi(a.value(e.change.value),e.change.favorable,de(e.change.format,t.r.data,a.scope),t.r.locale):void 0,n=e.caption!==void 0?a.text(e.caption):void 0;return s("div",{class:"pxd-metric",role:"group","aria-label":o,...t.a11y(e)},s("div",{class:"pxd-metric-label"},o),s("div",{class:"pxd-metric-value"},r),i&&s("div",{class:`pxd-metric-change pxd-data-${i.tone}`},s("span",{"aria-hidden":"true"},i.text),s("span",{class:"pxd-sr-only"},i.spoken)),n&&s("div",{class:"pxd-metric-caption"},n))}function ml(e,t){let a=t.b,o=e.variant==="receipt",r=l=>{let p=a.value(l.value);return o&&l.format?.type==="currency"&&p===0&&!l.total?{text:"Free",free:!0,color:!1}:{text:a.text(l.value,l.format),free:!1,color:l.format?.type==="color"}},i=(l,p)=>e.rowAction?s("button",{type:"button",class:"pxd-link pxd-detail-change",onClick:()=>t.r.dispatch(Lr(e.rowAction,l.key??p),a.scope,e.id)},"Change",s("span",{class:"pxd-sr-only"},` ${p}`)):null,n=e.items.filter(l=>!l.total),d=e.items.filter(l=>l.total);return s("div",{class:`pxd-detail-list${o?" pxd-receipt":""}${e.layout==="grid"?" pxd-detail-grid":""}${e.rowAction?" pxd-detail-actions":""}`,...t.a11y(e)},e.title!==void 0&&it(t,"pxd-detail-title",a.text(e.title)),s("dl",null,...n.map((l,p)=>{let c=r(l),u=a.text(l.label);return s("div",{class:"pxd-detail-row",key:l.key??p},s("dt",null,u),s("dd",{class:c.free?"pxd-free":void 0},c.color&&ul(c.text),c.text),e.rowAction&&s("dd",{class:"pxd-detail-row-action"},i(l,u)))}),...d.map((l,p)=>s("div",{class:"pxd-detail-row pxd-total",key:l.key??`t${p}`},s("dt",null,a.text(l.label)),s("dd",null,r(l).text),e.rowAction&&s("dd",{class:"pxd-detail-row-action"})))))}function gl(e,t){let a=t.b,o=t.r,r=t.id(e,"label"),i=V(e.items.path,a.scope),n=xe(W(o.data,i)),d=e.selection??"none",l=d!=="none"&&e.selected?a.value(e.selected):void 0,p=H=>Array.isArray(l)?l.includes(H):l===H,c=H=>{if(!e.selected)return;if(d==="single")return a.write(e.selected,H);let j=Array.isArray(l)?l:[];a.write(e.selected,j.includes(H)?j.filter(K=>K!==H):[...j,H])},u=Array.isArray(l)?l.length:0,x=a.text(e.label),h=o.byId.get(e.items.componentId),{grid:m,timeline:f,carousel:g,calendar:y}=$i(e,h),w=e.reorderable===!0,I=w&&e.order?a.value(e.order):void 0,S=n.map((H,j)=>ki(H,j)),A=Si(S,I),_=(H,j)=>{let K=e.order?Ci(A,S,H,j):void 0;K&&a.write(e.order,K)},[$,N]=t.state(e,"dragging",null),[M,k]=t.state(e,"position",0),v=()=>o.root?.querySelector(`[data-pxd-id="${CSS.escape(e.id)}"] .pxd-carousel-track`),b=H=>Array.from(H.children),C=H=>{let j=H.currentTarget;k(zi(b(j).map(K=>K.offsetLeft-j.offsetLeft),j.scrollLeft))},E=H=>{let j=v(),K=j&&b(j)[Math.max(0,Math.min(n.length-1,H))];j&&K&&j.scrollTo({left:K.offsetLeft-j.offsetLeft,behavior:"smooth"})},P=y?n.map((H,j)=>Ii(e.datePath?W(o.data,V(e.datePath,{pointer:se(i,j)})):void 0)):[],[z,F]=t.state(e,"month",null),T=Ai(z,P.find(Boolean));if(!n.length&&e.empty)return t.render(e.empty);let U=(H,j)=>s("input",{type:d==="single"?"radio":"checkbox",class:"pxd-collection-select",name:d==="single"?`${e.id}-selection`:void 0,checked:p(H),onChange:()=>c(H),"aria-label":j}),B=(H,j)=>{let K=S[H],ce={pointer:se(i,H)};return s("li",{key:String(K),class:`pxd-collection-item${$===j?" pxd-collection-dragging":""}`,draggable:w||void 0,onDragstart:w?()=>N(j):void 0,onDragover:w?Oe=>Oe.preventDefault():void 0,onDrop:w?()=>{$!==null&&_($,j),N(null)}:void 0,onDragend:w?()=>N(null):void 0},w&&s("div",{class:"pxd-collection-reorder"},s("span",{class:"pxd-collection-handle","aria-hidden":"true"},O("menu",16)),s("button",{type:"button",class:"pxd-icon-button pxd-collection-move","aria-label":`Move item ${j+1} up`,disabled:j===0,onClick:()=>_(j,j-1)},O("sortUp",16)),s("button",{type:"button",class:"pxd-icon-button pxd-collection-move","aria-label":`Move item ${j+1} down`,disabled:j===n.length-1,onClick:()=>_(j,j+1)},O("sortDown",16))),d!=="none"&&U(K,`Select item ${j+1} of ${n.length}`),s("div",{class:"pxd-collection-content"},t.render(e.items.componentId,ce)))},D=d==="multiple"&&u>0&&s("div",{class:"pxd-table-toolbar pxd-table-bulk",role:"toolbar","aria-label":`Actions for ${u} selected`},s("p",{class:"pxd-bulk-count","aria-live":"polite"},`${u} selected`),e.bulkActions&&t.render(e.bulkActions),s("button",{type:"button",class:"pxd-button pxd-button-tertiary",onClick:()=>a.write(e.selected,[])},"Cancel")),L;if(g)L=s("div",{class:"pxd-carousel",role:"group","aria-roledescription":"carousel","aria-labelledby":r},s("ul",{class:"pxd-collection-list pxd-carousel-track","aria-labelledby":r,onScroll:C},...A.map((H,j)=>B(H,j))),s("div",{class:"pxd-carousel-controls"},s("button",{type:"button",class:"pxd-icon-button","aria-label":"Previous item",disabled:M<=0,onClick:()=>E(M-1)},O("chevronLeft",18)),s("p",{class:"pxd-carousel-position","aria-live":"polite"},`${M+1} of ${n.length}`),s("button",{type:"button",class:"pxd-icon-button","aria-label":"Next item",disabled:M>=n.length-1,onClick:()=>E(M+1)},O("chevronRight",18))));else if(y){let{monthName:H,weekdays:j,weeks:K}=Ei(T,o.locale),ce=Oe=>A.filter(qe=>P[qe]&&P[qe].y===T.y&&P[qe].m===T.m&&P[qe].d===Oe);L=s("div",{class:"pxd-calendar"},s("div",{class:"pxd-calendar-header"},s("button",{type:"button",class:"pxd-icon-button","aria-label":"Previous month",onClick:()=>F(wo(T,-1))},O("chevronLeft",18)),s("p",{class:"pxd-calendar-month","aria-live":"polite"},H),s("button",{type:"button",class:"pxd-icon-button","aria-label":"Next month",onClick:()=>F(wo(T,1))},O("chevronRight",18))),s("table",{class:"pxd-calendar-grid"},s("caption",{class:"pxd-sr-only"},`${x}, ${H}`),s("thead",null,s("tr",null,...j.map(Oe=>s("th",{key:Oe,scope:"col"},Oe)))),s("tbody",null,...K.map((Oe,qe)=>s("tr",{key:qe},...Oe.map((Re,Ct)=>Re===null?s("td",{key:Ct,class:"pxd-calendar-empty"}):s("td",{key:Ct,class:`pxd-calendar-day${ce(Re).length?" pxd-calendar-has-items":""}`},s("span",{class:"pxd-calendar-date"},Re),ce(Re).length>0&&s("ul",{class:"pxd-calendar-items"},...ce(Re).map(pt=>s("li",{key:String(S[pt]),class:"pxd-collection-item"},d!=="none"&&U(S[pt],`Select item on ${Re}`),s("div",{class:"pxd-collection-content"},t.render(e.items.componentId,{pointer:se(i,pt)}))))))))))))}else L=s("ul",{class:`pxd-collection-list${m?" pxd-collection-grid":""}${f?" pxd-timeline":""}${w?" pxd-collection-reorderable":""}`,"aria-labelledby":r},...A.map((H,j)=>B(H,j)));return s("div",{class:"pxd-collection",...t.a11y(e)},s("div",{class:"pxd-collection-label",id:r},`${x} `,s("span",{class:"pxd-count"},`(${n.length})`)),D,L,e.page&&sn(e,t,n.length))}function hl(e,t){let a=t.b,o=t.r,r=t.a11y(e),[i,n]=t.state(e,"open",null),d=e.kind??"image",l=e.src?a.value(e.src):void 0,p=l?o.props.resolveMedia?.(l):void 0,c=e.decorative?"":a.text(e.alt),u=`pxd-media pxd-media-${e.aspect??"auto"}`;if(d==="qr")return Vx(t,e,a.text(e.value),c,r);if(d==="gallery"){let x=e.items?V(e.items.path,a.scope):void 0,m=(x?xe(W(o.data,x)):[]).map((g,y)=>{let w={pointer:se(x,y)},I=e.imagePath?W(o.data,V(e.imagePath,w)):void 0,S=I?o.props.resolveMedia?.(String(I)):void 0,A=e.altPath?String(W(o.data,V(e.altPath,w))??""):"";return{src:S,alt:A}}),f=m.filter(g=>!!g.src);return i!==null&&f[i]&&Lx(t,e,c,f,i,n),s("ul",{class:"pxd-gallery","aria-label":c||void 0,...r},...m.map((g,y)=>{let w=f.indexOf(g);return s("li",{key:y},w>=0?s("button",{type:"button",class:"pxd-gallery-item","aria-label":g.alt?`Open ${g.alt}`:`Open image ${w+1} of ${f.length}`,onClick:()=>n(w)},s("img",{class:`${u} pxd-gallery-image`,src:g.src,alt:g.alt})):s("div",{class:`${u} pxd-media-placeholder pxd-gallery-image`,role:"img","aria-label":g.alt||void 0}))}))}if(d==="video"||d==="audio"){let x=e.transcript!==void 0?a.text(e.transcript):void 0,h=e.poster!==void 0?a.text(e.poster):void 0,m=h?o.props.resolveMedia?.(h):void 0;return s("figure",{class:`pxd-media-player pxd-media-${d}`,...r},d==="video"?p?s("video",{class:u,controls:!0,src:p,poster:m,"aria-label":c||void 0}):s("div",{class:`${u} pxd-media-placeholder`,role:"img","aria-label":c||void 0}):p?s("audio",{class:"pxd-media-audio-player",controls:!0,src:p,"aria-label":c||void 0}):s("div",{class:"pxd-media-placeholder pxd-media-audio-placeholder",role:"img","aria-label":c||void 0}),c&&s("figcaption",{class:"pxd-media-caption"},c),x&&s("details",{class:"pxd-media-transcript"},s("summary",null,"Transcript"),s("p",{class:"pxd-text pxd-text-body"},x)))}return p?s("img",{class:u,src:p,alt:c,...r}):s("div",{class:`${u} pxd-media-placeholder`,role:e.decorative?"presentation":"img","aria-label":c||void 0})}var cl=e=>s("svg",{width:20,height:20,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},s("path",{d:e==="left"?"m15 6-6 6 6 6":"m9 6 6 6-6 6"}));function Lx(e,t,a,o,r,i){let n=o.length,{src:d,alt:l}=o[r],p=x=>i(Math.max(0,Math.min(n-1,x))),c=e.id(t,"viewer-title"),u=()=>i(null);e.after(()=>{let x=document.activeElement;x?.disabled&&x.classList.contains("pxd-viewer-step")&&((x.nextElementSibling??x.previousElementSibling)?.dispatchEvent(new Event("noop")),(x.nextElementSibling??x.previousElementSibling)?.focus())}),e.portal(Ye({ctx:e,id:e.id(t,"viewer"),class:"pxd-viewer",onClose:u,props:{"aria-labelledby":c,onKeydown:x=>x.key==="ArrowLeft"?p(r-1):x.key==="ArrowRight"?p(r+1):void 0}},s("h2",{id:c,class:"pxd-sr-only"},a||"Pictures"),s("div",{class:"pxd-viewer-bar"},s("span",{class:"pxd-viewer-counter","aria-live":"polite"},`${r+1} of ${n}`),at(u,{class:"pxd-icon-button pxd-viewer-close","aria-label":"Close"},O("close"))),s("figure",{class:"pxd-viewer-figure"},s("img",{class:"pxd-viewer-image",src:d,alt:l}),l&&s("figcaption",{class:"pxd-viewer-caption"},l)),s("div",{class:"pxd-viewer-bar pxd-viewer-nav"},s("button",{type:"button",class:"pxd-icon-button pxd-viewer-step","aria-label":"Previous picture",disabled:r===0,onClick:()=>p(r-1)},cl("left")),s("button",{type:"button",class:"pxd-icon-button pxd-viewer-step","aria-label":"Next picture",disabled:r===n-1,onClick:()=>p(r+1)},cl("right")))))}function Vx(e,t,a,o,r){let i=a?Ji(a):void 0;if(!i)return s("div",{class:"pxd-qr pxd-qr-placeholder",role:"img","aria-label":o||`QR code: ${a}`,...r},s("span",{class:"pxd-qr-mark","aria-hidden":"true"},"QR"),s("span",{class:"pxd-qr-text"},a));let n=d=>{let l=d;if(!l||l.dataset.text===a)return;l.dataset.text=a;let p=4,c=4,u=i.length;l.width=l.height=(u+c*2)*p;let x=l.getContext("2d");if(!x)return;let h=getComputedStyle(l),m=h.getPropertyValue("--pxd-color-text-default").trim()||"#000",f=h.getPropertyValue("--pxd-color-surface-default").trim()||"#fff";x.fillStyle=f,x.fillRect(0,0,l.width,l.height),x.fillStyle=m,i.forEach((g,y)=>g.forEach((w,I)=>w&&x.fillRect((I+c)*p,(y+c)*p,p,p)))};return e.after(()=>n(e.r.root?.querySelector(`canvas[data-pxd-id="${CSS.escape(t.id)}"]`)??null)),s("canvas",{class:"pxd-qr",role:"img","aria-label":o||`QR code: ${a}`,...r,ref:n})}function yl(e,t){let a=t.b,o=e.kind==="error",r=t.a11y(e);return e.kind==="undo"?s("div",{class:"pxd-snackbar",role:"status",...r},s("p",{class:"pxd-snackbar-text"},a.text(e.title),e.message!==void 0&&s("span",{class:"pxd-snackbar-message"},` ${a.text(e.message)}`)),e.action&&t.render(e.action)):s("div",{class:`pxd-status pxd-status-${e.kind}${e.variant==="inline"?" pxd-status-notice":""}`,role:o?"alert":"status",...r},e.kind==="loading"?s("span",{class:"pxd-spinner","aria-hidden":"true"}):s("span",{class:"pxd-status-icon","aria-hidden":"true"},O(e.icon??wi[e.kind],e.kind==="empty"?28:16)),s("div",{class:"pxd-status-body"},s("p",{class:"pxd-status-title"},a.text(e.title)),e.message!==void 0&&s("p",{class:"pxd-status-message"},a.text(e.message)),e.action&&e.variant!=="inline"&&s("div",{class:"pxd-status-action"},t.render(e.action))),e.action&&e.variant==="inline"&&s("div",{class:"pxd-status-action"},t.render(e.action)))}var Co=(e,t,a,o)=>{let{tag:r,attrs:i}=Di(e,t,a);return s(r,{...i,fill:o})};function bl(e,t){let a=t.b,o=t.r,r=t.id(e,"title"),i=t.id(e,"summary"),n=V(e.data.path,a.scope),d=xe(W(o.data,n)).map((b,C)=>se(n,C)),l=b=>W(o.data,V(e.x.path,{pointer:b})),p=(b,C)=>Number(W(o.data,V(C.path,{pointer:b})))||0,c=e.series,u=t.a11y(e),x=(b,C)=>ae(b,de(C,o.data,a.scope),o.locale),h=b=>x(l(b),e.x.format),m=600-fe.left-fe.right,f=240-fe.top-fe.bottom,g=()=>s("details",{class:"pxd-chart-data"},s("summary",null,"Show data"),s("table",{class:"pxd-table"},s("thead",null,s("tr",null,s("th",{scope:"col"},a.text(e.x.label)),...c.map((b,C)=>s("th",{scope:"col",key:C,class:"pxd-num"},a.text(b.label))))),s("tbody",null,...d.map(b=>s("tr",{key:b},s("th",{scope:"row"},x(l(b),e.x.format)),...c.map((C,E)=>s("td",{key:E,class:"pxd-num"},x(p(b,C),C.format)))))))),y=(b,C)=>s("figure",{class:"pxd-chart","aria-labelledby":r,"aria-describedby":i,...u},s("figcaption",null,s("span",{class:"pxd-chart-title",id:r},a.text(e.title)),s("span",{class:"pxd-chart-summary",id:i},a.text(e.summary))),b,C,g()),w=c.length>1&&s("ul",{class:"pxd-chart-legend"},...c.map((b,C)=>s("li",{key:C},s("svg",{width:"12",height:"12","aria-hidden":"true"},Co(Zt[C],6,6,ge(C))),a.text(b.label)))),I=(b,C,...E)=>s("svg",{viewBox:b,class:C,"aria-hidden":"true"},...E);if(e.intent==="relationship"){let b=d.map(T=>Number(l(T))||0),C=d.flatMap(T=>c.map(U=>p(T,U))),E=Qt(Math.max(0,...b)),P=Qt(Math.max(0,...C)),z=T=>fe.left+T/(E||1)*m,F=T=>fe.top+f-T/(P||1)*f;return y(I(`0 0 ${600} ${240}`,"pxd-chart-svg",s("g",{class:"pxd-chart-axis"},...[0,.5,1].map(T=>s("g",{key:T},s("line",{x1:fe.left,x2:600-fe.right,y1:F(P*T),y2:F(P*T),class:"pxd-chart-grid"}),s("text",{x:fe.left-8,y:F(P*T)+4,"text-anchor":"end"},x(P*T,{...c[0].format??{type:"number"},precision:0})))),...[0,.5,1].map(T=>s("text",{key:`x${T}`,x:z(E*T),y:230,"text-anchor":T===0?"start":T===1?"end":"middle"},x(E*T,{...e.x.format??{type:"number"},precision:0})))),...c.map((T,U)=>s("g",{key:U},...d.map((B,D)=>Co(Zt[U],z(b[D]),F(p(B,T)),ge(U)))))),w)}if(e.intent==="range"){let C=fe.top+d.length*28+24,E=d.map(B=>p(B,c[0])),P=d.map(B=>p(B,c[1]??c[0])),z=Math.min(0,...E),F=Qt(Math.max(...P,1)),T=120,U=B=>T+(B-z)/(F-z||1)*(600-T-fe.right);return y(I(`0 0 ${600} ${C}`,"pxd-chart-svg",s("g",{class:"pxd-chart-axis"},...[0,.5,1].map(B=>{let D=z+(F-z)*B;return s("g",{key:B},s("line",{x1:U(D),x2:U(D),y1:fe.top,y2:C-20,class:"pxd-chart-grid"}),s("text",{x:U(D),y:C-4,"text-anchor":"middle"},x(D,{...c[0].format??{type:"number"},precision:0})))})),...d.map((B,D)=>{let L=fe.top+D*28;return s("g",{key:B},s("text",{x:T-8,y:L+28/2+4,"text-anchor":"end",class:"pxd-chart-range-label"},ko(l(B),e.x.format?.type,o.locale)),s("line",{x1:U(E[D]),x2:U(P[D]),y1:L+28/2,y2:L+28/2,stroke:ge(0),"stroke-width":10,"stroke-linecap":"round"}),s("circle",{cx:U(E[D]),cy:L+28/2,r:4,fill:ge(1)}),s("circle",{cx:U(P[D]),cy:L+28/2,r:4,fill:ge(2)}))})),s("ul",{class:"pxd-chart-legend"},s("li",null,s("span",{class:"pxd-chart-swatch",style:{background:ge(1)},"aria-hidden":"true"}),a.text(c[0].label)),c[1]&&s("li",null,s("span",{class:"pxd-chart-swatch",style:{background:ge(2)},"aria-hidden":"true"}),a.text(c[1].label))))}if(e.intent==="matrix"){let b=d.map(E=>c.map(P=>p(E,P))),C=Math.max(1,...b.flat());return y(s("div",{class:"pxd-heatmap-scroll","aria-hidden":"true"},s("table",{class:"pxd-heatmap"},s("thead",null,s("tr",null,s("th",null),...c.map((E,P)=>s("th",{key:P,scope:"col"},a.text(E.label))))),s("tbody",null,...d.map((E,P)=>s("tr",{key:E},s("th",{scope:"row"},h(E)),...c.map((z,F)=>{let T=Math.round(b[P][F]/C*100);return s("td",{key:F,class:`pxd-heatmap-cell${T>=60?" pxd-heatmap-strong":""}`,style:{background:`color-mix(in srgb, var(--pxd-color-data-categorical-1) ${T}%, var(--pxd-color-surface-subtle))`}},x(b[P][F],z.format))})))))))}if(e.intent==="hierarchy"){let b=d.map(E=>Math.max(0,p(E,c[0]))),C=Ri(b,600,240);return y(I(`0 0 ${600} ${240}`,"pxd-chart-svg pxd-chart-treemap",...C.map((E,P)=>E&&s("g",{key:P},s("rect",{x:E.x+1,y:E.y+1,width:Math.max(E.w-2,0),height:Math.max(E.h-2,0),fill:ge(P),rx:2}),E.w>48&&E.h>24&&s("text",{x:E.x+8,y:E.y+18,class:"pxd-chart-tile-label"},h(d[P]).slice(0,Math.floor(E.w/8)))))),s("ul",{class:"pxd-chart-legend"},...d.map((E,P)=>s("li",{key:E},s("span",{class:"pxd-chart-swatch",style:{background:ge(P)},"aria-hidden":"true"}),`${h(E)}: ${x(b[P],c[0].format)}`))))}if(e.intent==="flow"){let b=d.map(K=>c.map(ce=>Math.max(0,p(K,ce)))),{leftY:C,rightY:E,leftTotals:P,rightTotals:z,scale:F}=Fi(b,c.length,240),T=12,U=110,B=U,D=600-U,L=[...C],H=[...E],j=(B+D)/2;return y(I(`0 0 ${600} ${240}`,"pxd-chart-svg pxd-chart-flow",...b.flatMap((K,ce)=>K.map((Oe,qe)=>{if(Oe<=0)return null;let Re=Oe*F,Ct=L[ce],pt=H[qe];L[ce]+=Re,H[qe]+=Re;let hx=`M${B+T} ${Ct} C${j} ${Ct}, ${j} ${pt}, ${D-T} ${pt} L${D-T} ${pt+Re} C${j} ${pt+Re}, ${j} ${Ct+Re}, ${B+T} ${Ct+Re} Z`;return s("path",{key:`${ce}-${qe}`,d:hx,fill:ge(qe),opacity:.45})})),...d.map((K,ce)=>s("g",{key:K},s("rect",{x:B,y:C[ce],width:T,height:Math.max(P[ce]*F,1),fill:"var(--pxd-color-border-strong)"}),s("text",{x:B-8,y:C[ce]+P[ce]*F/2+4,"text-anchor":"end",class:"pxd-chart-flow-label"},h(K)))),...c.map((K,ce)=>s("g",{key:`s${ce}`},s("rect",{x:D-T,y:E[ce],width:T,height:Math.max(z[ce]*F,1),fill:ge(ce)}),s("text",{x:D+8,y:E[ce]+z[ce]*F/2+4,class:"pxd-chart-flow-label"},a.text(K.label))))),w)}if(e.intent==="composition"){let b=d.map(F=>p(F,c[0])),C=b.reduce((F,T)=>F+T,0)||1,E=0,P=b.map((F,T)=>{let U=F/C*598,B=s("rect",{key:T,x:1+E,y:4,width:Math.max(U-2,0),height:40,fill:ge(T),rx:2});return E+=U,B}),z=d.map((F,T)=>({label:ae(l(F),de(e.x.format,o.data,a.scope),o.locale),value:b[T],color:ge(T),share:b[T]/C}));return s("figure",{class:"pxd-chart","aria-labelledby":r,"aria-describedby":i,...u},s("figcaption",null,s("span",{class:"pxd-chart-title",id:r},a.text(e.title)),s("span",{class:"pxd-chart-summary",id:i},a.text(e.summary))),s("svg",{viewBox:`0 0 ${600} 48`,class:"pxd-chart-svg pxd-chart-bar","aria-hidden":"true",preserveAspectRatio:"none"},s("g",null,...P)),s("ul",{class:"pxd-chart-legend"},...z.map(F=>s("li",{key:F.label},s("span",{class:"pxd-chart-swatch",style:{background:F.color},"aria-hidden":"true"}),`${F.label}: ${ae(F.value,de(c[0].format,o.data,a.scope),o.locale)} (${ae(F.share,{type:"percent",precision:0},o.locale)})`))),g())}let S=d.flatMap(b=>c.map(C=>p(b,C))),{lo:A,max:_,ticks:$}=ji(S,e.intent==="trend"),N=b=>fe.top+f-(b-A)/(_-A||1)*f,M=m/Math.max(d.length,1),k=s("g",{class:"pxd-chart-axis"},...$.map(b=>s("g",{key:b},s("line",{x1:fe.left,x2:600-fe.right,y1:N(b),y2:N(b),class:"pxd-chart-grid"}),s("text",{x:fe.left-8,y:N(b)+4,"text-anchor":"end"},ae(b,{...de(c[0].format,o.data,a.scope)??{type:"number"},precision:0},o.locale)))),...d.map((b,C)=>s("text",{key:b,x:fe.left+M*C+M/2,y:230,"text-anchor":"middle"},ko(l(b),e.x.format?.type,o.locale)))),v;if(e.intent==="trend")v=c.map((b,C)=>{let E=d.map((P,z)=>[fe.left+M*z+M/2,N(p(P,b))]);return s("g",{key:C},s("polyline",{points:E.map(([P,z])=>`${P},${z}`).join(" "),fill:"none",stroke:ge(C),"stroke-width":2.5}),...E.map(([P,z])=>Co(Zt[C],P,z,ge(C))))});else{let b=e.intent==="distribution",C=b?1:.7,E=M*C/c.length;v=d.flatMap((P,z)=>c.map((F,T)=>{let U=p(P,F),B=N(Math.max(U,0));return s("rect",{key:`${z}-${T}`,x:fe.left+M*z+M*((1-C)/2)+E*T,y:B,width:E-(b?1:2),height:Math.max(N(0)-B,1),fill:ge(T),rx:b?0:2})}))}return s("figure",{class:"pxd-chart","aria-labelledby":r,"aria-describedby":i,...u},s("figcaption",null,s("span",{class:"pxd-chart-title",id:r},a.text(e.title)),s("span",{class:"pxd-chart-summary",id:i},a.text(e.summary))),I(`0 0 ${600} ${240}`,"pxd-chart-svg",k,...v),c.length>1&&s("ul",{class:"pxd-chart-legend"},...c.map((b,C)=>s("li",{key:C},s("svg",{width:"12",height:"12","aria-hidden":"true"},Co(Zt[C],6,6,ge(C))),a.text(b.label)))),g())}var mt=()=>s("span",{class:"pxd-required","aria-hidden":"true"},"*");function nt({label:e,help:t,required:a,id:o,helpId:r},...i){return s("div",{class:"pxd-field"},s("label",{class:"pxd-field-label",for:o},e,a&&mt()),t&&s("p",{class:"pxd-field-help",id:r},t),...i)}var Kx={email:"email",phone:"tel",url:"url",search:"search",number:"text",currency:"text",text:"text"},he=e=>e.target.value;function $l(e,t){let a=t.b,o=t.r,r=t.id(e),i=t.id(e,"help"),n=e.kind??"text",d=a.value(e.value),l=n==="number"||n==="currency",[p,c]=t.state(e,"draft",null),u=ti(d,n),x=p??u,h=e.validation??{},m=e.help!==void 0?a.text(e.help):void 0,f={id:r,class:"pxd-input","aria-describedby":m?i:void 0,required:e.required,autocomplete:e.autocomplete,...t.a11y(e)},g=_=>{if(!l)return a.write(e.value,_);c(_),a.write(e.value,ei(_))},y=_=>{h.message&&_.currentTarget.setCustomValidity(a.text(h.message))},w=_=>_.currentTarget.setCustomValidity(""),S={label:a.text(e.label),help:m,required:e.required,id:r,helpId:i};if(n==="suggestions"||n==="mentions")return Wx(e,t,S,f,n==="mentions");if(n==="tags")return Jx(e,t,S,f);if(n==="richtext")return Xx(e,t,S,f);if(n==="inline")return Zx(e,t,S,f);if(n==="masked"){let _=typeof e.mask=="string"?e.mask:"";return nt(S,s("input",{...f,class:"pxd-input pxd-input-masked",type:"text",inputmode:Qr(_)?"numeric":void 0,placeholder:_||void 0,value:u,maxlength:_.length||void 0,onInput:$=>(w($),a.write(e.value,Zr(_,he($),he($).length<u.length))),onInvalid:y}))}if(n==="code")return nt(S,s("textarea",{...f,class:"pxd-input pxd-input-code",rows:4,spellcheck:"false",autocorrect:"off",autocapitalize:"off",value:x,maxlength:h.maxLength,minlength:h.minLength,onInput:_=>(w(_),g(he(_))),onInvalid:y}));if(n==="search"){let _=e.placeholder!==void 0?a.text(e.placeholder):void 0;return s("div",{class:"pxd-search"},s("label",{class:"pxd-sr-only",for:r},a.text(e.label)),O("search"),s("input",{...f,class:"pxd-search-input",type:"search",placeholder:_,value:x,onInput:$=>g(he($))}))}if(e.size==="hero"&&l)return s("div",{class:"pxd-hero-field"},s("label",{class:"pxd-hero-label",for:r},a.text(e.label)),s("div",{class:"pxd-hero-input"},n==="currency"&&s("span",{class:"pxd-hero-symbol","aria-hidden":"true"},co(a.text(e.currency)||"USD",o.locale)),s("input",{...f,class:"pxd-hero-value",type:"text",inputmode:n==="currency"?"decimal":"numeric",pattern:"-?[0-9]*[.,]?[0-9]*",placeholder:"0",size:Math.max(1,x.length||1),value:x,onInput:_=>(w(_),g(he(_))),onBlur:()=>c(null),onInvalid:y})),m&&s("p",{class:"pxd-field-help pxd-hero-help",id:i},m));let A=n==="multiline"?s("textarea",{...f,rows:3,value:x,maxlength:h.maxLength,minlength:h.minLength,onInput:_=>(w(_),g(he(_))),onInvalid:y}):s("div",{class:n==="currency"?"pxd-input-adorned":void 0},n==="currency"&&s("span",{class:"pxd-input-prefix","aria-hidden":"true"},co(a.text(e.currency)||"USD",o.locale)),s("input",{...f,type:Kx[n]??"text",inputmode:n==="currency"?"decimal":n==="number"?"numeric":void 0,pattern:l?"-?[0-9]*[.,]?[0-9]*":void 0,value:x,maxlength:h.maxLength,minlength:h.minLength,onInput:_=>(w(_),g(he(_))),onBlur:()=>c(null),onInvalid:y}));return nt(S,A)}function Gx(e,t,a,o){let r=t.id(e,"list"),[i,n]=t.state(e,"open",!1),[d,l]=t.state(e,"active",-1),p=i&&a.length>0,c=h=>{if(!p){h.key==="ArrowDown"&&a.length&&(n(!0),l(0),h.preventDefault());return}h.key==="ArrowDown"?(l(m=>(m+1)%a.length),h.preventDefault()):h.key==="ArrowUp"?(l(m=>(m-1+a.length)%a.length),h.preventDefault()):h.key==="Enter"&&d>=0?(o(a[d]),n(!1),h.preventDefault()):h.key==="Escape"&&n(!1)},u={role:"combobox","aria-expanded":p,"aria-controls":r,"aria-autocomplete":"list","aria-activedescendant":p&&d>=0?`${r}-${d}`:void 0,autocomplete:"off",onKeydown:c,onBlur:()=>n(!1)};return{list:p?s("ul",{id:r,role:"listbox",class:"pxd-combobox-list"},...a.map((h,m)=>s("li",{key:String(h.value),id:`${r}-${m}`,role:"option","aria-selected":m===d,class:`pxd-combobox-option${m===d?" pxd-combobox-active":""}`,onMousedown:f=>(f.preventDefault(),o(h),n(!1))},h.label,h.description&&s("span",{class:"pxd-option-description"},h.description)))):null,inputProps:u,show:h=>(n(h),l(-1))}}function Wx(e,t,a,o,r){let i=t.b,n=ut(e,t.r.data,i.scope,i.text),d=String(i.value(e.value)??""),l=r?/@([^\s@]*)$/.exec(d):null,p=r?l?l[1]:null:d,c=p===null?[]:n.filter(x=>x.label.toLowerCase().includes(p.toLowerCase())).slice(0,8),u=Gx(e,t,c,x=>i.write(e.value,r&&l?`${d.slice(0,l.index)}@${x.label} `:x.label));return nt(a,s("div",{class:"pxd-combobox"},s("input",{...o,...u.inputProps,type:"text",value:d,onInput:x=>{let h=he(x);i.write(e.value,h),u.show(r?/@[^\s@]*$/.test(h):h.length>0)},onFocus:()=>u.show(!r&&d.length>0)}),u.list))}function Jx(e,t,a,o){let r=t.b,i=r.value(e.value),n=Array.isArray(i)?i.map(String):[],[d,l]=t.state(e,"tags",""),p=(u=d)=>{let x=ai(n,u);x!==n&&r.write(e.value,x),l("")},c=u=>r.write(e.value,n.filter((x,h)=>h!==u));return nt(a,s("div",{class:"pxd-tags",role:"group","aria-label":a.label},s("ul",{class:"pxd-tags-list"},...n.map((u,x)=>s("li",{key:`${u}-${x}`,class:"pxd-tag-chip"},u,s("button",{type:"button",class:"pxd-tag-remove","aria-label":`Remove ${u}`,onClick:()=>c(x)},O("close",14))))),s("input",{...o,class:"pxd-tags-input",type:"text",value:d,onInput:u=>he(u).endsWith(",")?p(he(u)):l(he(u)),onKeydown:u=>{u.key==="Enter"?(u.preventDefault(),p()):u.key==="Backspace"&&d===""&&n.length&&c(n.length-1)},onBlur:()=>p()})))}function Sl(e){if(e.nodeType===3)return e.textContent??"";if(e.nodeType!==1)return"";let t=e,a=(o=t)=>Array.from(o.childNodes).map(Sl).join("");switch(t.tagName.toLowerCase()){case"b":case"strong":return`**${a()}**`;case"i":case"em":return`*${a()}*`;case"br":return`
9
+ `;case"ul":return Array.from(t.children).map(o=>`- ${a(o)}`).join(`
10
+ `)+`
11
+ `;case"ol":return Array.from(t.children).map((o,r)=>`${r+1}. ${a(o)}`).join(`
12
+ `)+`
13
+ `;case"div":case"p":case"li":return a()+`
14
+ `;default:return a()}}function vl(e){let t=[],a=/\*\*([^*]+)\*\*|\*([^*]+)\*/g,o=0;for(let r=a.exec(e);r;r=a.exec(e)){r.index>o&&t.push(document.createTextNode(e.slice(o,r.index)));let i=document.createElement(r[1]?"strong":"em");i.textContent=r[1]??r[2],t.push(i),o=r.index+r[0].length}return o<e.length&&t.push(document.createTextNode(e.slice(o))),t}function Yx(e){let t=[],a=null;for(let o of e.split(`
15
+ `)){let r=/^(-|\d+\.)\s+(.*)$/.exec(o);if(r){let n=r[1]==="-"?"ul":"ol";(!a||a.tagName.toLowerCase()!==n)&&(a=document.createElement(n),t.push(a));let d=document.createElement("li");d.append(...vl(r[2])),a.append(d);continue}a=null;let i=document.createElement("div");o?i.append(...vl(o)):i.append(document.createElement("br")),t.push(i)}return t}function Xx(e,t,a,o){let r=t.b,i=String(r.value(e.value)??""),n=h=>r.write(e.value,Sl(h).replace(/\n+$/,"")),d=h=>m=>{m.preventDefault();let f=m.currentTarget.closest(".pxd-richtext")?.querySelector(".pxd-richtext-area");f&&(f.focus(),document.execCommand(h),n(f))},{id:l,class:p,required:c,autocomplete:u,...x}=o;return nt(a,s("div",{class:"pxd-richtext"},s("div",{class:"pxd-richtext-toolbar",role:"toolbar","aria-label":"Formatting"},s("button",{type:"button",class:"pxd-richtext-control","aria-label":"Bold",onMousedown:d("bold")},s("strong",null,"B")),s("button",{type:"button",class:"pxd-richtext-control","aria-label":"Italic",onMousedown:d("italic")},s("em",null,"I")),s("button",{type:"button",class:"pxd-richtext-control","aria-label":"Bulleted list",onMousedown:d("insertUnorderedList")},O("menu",16))),s("div",{...x,id:l,class:"pxd-input pxd-richtext-area",contenteditable:"true",role:"textbox","aria-multiline":"true","aria-label":a.label,ref:h=>{let m=h;!m||m.dataset.ready||(m.dataset.ready="1",m.replaceChildren(...Yx(i)))},onInput:h=>n(h.currentTarget),onBlur:h=>n(h.currentTarget)})))}function Zx(e,t,a,o){let r=t.b,i=String(r.value(e.value)??""),[n,d]=t.state(e,"inline",null),l=()=>{n!==null&&r.write(e.value,n),d(null)};return n===null?s("div",{class:"pxd-inline-edit"},s("span",{class:"pxd-field-label"},a.label),s("button",{type:"button",class:"pxd-inline-value","aria-label":`Edit ${a.label}`,onClick:()=>d(i)},s("span",{class:i?void 0:"pxd-inline-empty"},i||"Not set"),s("span",{class:"pxd-inline-hint","aria-hidden":"true"},"Edit"))):nt(a,s("input",{...o,type:"text",value:n,ref:p=>p&&!p.dataset.focused&&(p.dataset.focused="1",p.focus()),onInput:p=>d(he(p)),onBlur:l,onKeydown:p=>{p.key==="Enter"?(p.preventDefault(),l()):p.key==="Escape"&&d(null)}}))}var wl=(e,t,a)=>s("div",{class:"pxd-option-text"},s("label",{for:e},t),a&&s("span",{class:"pxd-option-description",id:`${e}-desc`},a)),Mt=(e,...t)=>s("span",{"data-state":"checked",class:e,style:{pointerEvents:"none"}},...t);function Cl(e,t){let a=t.b,o=t.id(e,"label"),r=t.id(e,"help"),i=ut(e,t.r.data,a.scope,a.text),[n,d]=t.state(e,"query",""),l=xr(i,e.mode),{multiple:p,withFaces:c,searchable:u}=l,x=l.control==="chips",h=a.value(e.value),m=tt,f=k=>hr(o,k),g=e.help!==void 0?a.text(e.help):void 0,y=t.a11y(e),w=a.text(e.label),I=s("div",{class:"pxd-field-label",id:o},w,e.required&&mt()),S=g&&s("p",{class:"pxd-field-help",id:r},g),A=u&&s("div",{class:"pxd-search pxd-search-compact"},O("search"),s("input",{type:"search",class:"pxd-search-input",placeholder:gr(c),"aria-label":`Search ${w}`,value:n,onInput:k=>d(he(k))})),_=k=>uo(k,n);if(p){let k=b=>mr(h,b),v=b=>a.write(e.value,fr(h,b));if(x)return s("div",{class:"pxd-field pxd-choice",role:"group","aria-labelledby":o,"aria-describedby":g?r:void 0,...y},I,S,s("div",{class:"pxd-chips"},...i.map(b=>Je({key:m(b.value),class:"pxd-chip",checked:k(b.value),onCheckedChange:()=>v(b.value),indicator:Mt("pxd-chip-check",O("check",18))},b.label))));if(c){let{recent:b,rest:C}=xo(i,n);return s("fieldset",{class:"pxd-field pxd-choice pxd-people","aria-describedby":g?r:void 0,...y},s("legend",{class:"pxd-field-label",id:o},w),S,A,s("div",{class:"pxd-people-group"},b.length>0&&s("div",{class:"pxd-people-recent"},...b.map(E=>Je({key:m(E.value),class:"pxd-person-tile",checked:k(E.value),onCheckedChange:()=>v(E.value),"aria-label":E.label,indicator:null},s("span",{class:"pxd-person-face"},Se(t,{value:E.avatar,name:E.label,size:56}),k(E.value)&&Mt("pxd-person-tick",O("check",14))),s("span",{class:"pxd-person-name","aria-hidden":"true"},E.label.split(" ")[0])))),s("div",{class:"pxd-people-list"},...C.map(E=>{let P=f(E.value);return Je({key:m(E.value),id:P,class:"pxd-person-row",checked:k(E.value),onCheckedChange:()=>v(E.value),"aria-labelledby":`${P}-name`,"aria-describedby":E.description?`${P}-desc`:void 0,indicator:null},Se(t,{value:E.avatar,name:E.label}),s("span",{class:"pxd-person-text"},s("span",{id:`${P}-name`},E.label),E.description&&s("span",{class:"pxd-option-description",id:`${P}-desc`},E.description)),k(E.value)&&Mt("pxd-person-check",O("check")))}))))}return s("fieldset",{class:"pxd-field pxd-choice","aria-describedby":g?r:void 0,...y},s("legend",{class:"pxd-field-label",id:o},w),S,A,s("div",{class:`pxd-choice-list${u?" pxd-choice-scroll":""}`},...i.filter(_).map(b=>{let C=f(b.value);return s("div",{class:"pxd-choice-option",key:m(b.value)},b.avatar!==void 0&&Se(t,{value:b.avatar,name:b.label,size:32}),Je({id:C,class:"pxd-checkbox",checked:k(b.value),onCheckedChange:()=>v(b.value),"aria-describedby":b.description?`${C}-desc`:void 0,indicator:Mt("pxd-checkbox-indicator","\u2713")}),wl(C,b.label,b.description))})))}let $=h==null?"":m(h),N=k=>a.write(e.value,i.find(v=>m(v.value)===k)?.value),M=(k,v,b,C,...E)=>_t({key:m(k.value),value:m(k.value),group:$,first:v===0,onSelect:()=>N(m(k.value)),indicator:C,...b},...E);if(x)return s("div",{class:"pxd-field pxd-choice",...y},I,S,ft({class:"pxd-chips","aria-labelledby":o,"aria-describedby":g?r:void 0,"aria-required":e.required||void 0,value:$,onValueChange:N,orientation:"horizontal"},...i.map((k,v)=>M(k,v,{class:"pxd-chip","data-orientation":"horizontal"},Mt("pxd-chip-check",O("check",18)),k.label))));if(c){let{recent:k,rest:v}=xo(i,n);return s("div",{class:"pxd-field pxd-choice pxd-people",...y},I,S,A,ft({"aria-labelledby":o,"aria-describedby":g?r:void 0,"aria-required":e.required||void 0,value:$,onValueChange:N,class:"pxd-people-group"},k.length>0&&s("div",{class:"pxd-people-recent",role:"presentation"},...k.map((b,C)=>M(b,C,{class:"pxd-person-tile","aria-label":b.label},null,Se(t,{value:b.avatar,name:b.label,size:56}),s("span",{class:"pxd-person-name","aria-hidden":"true"},b.label.split(" ")[0])))),s("div",{class:"pxd-people-list",role:"presentation"},...v.map((b,C)=>{let E=f(b.value);return M(b,k.length+C,{id:E,class:"pxd-person-row","aria-labelledby":`${E}-name`,"aria-describedby":b.description?`${E}-desc`:void 0},null,Se(t,{value:b.avatar,name:b.label}),s("span",{class:"pxd-person-text"},s("span",{id:`${E}-name`},b.label),b.description&&s("span",{class:"pxd-option-description",id:`${E}-desc`},b.description)),$===m(b.value)&&Mt("pxd-person-check",O("check")))}))))}return s("div",{class:"pxd-field pxd-choice",...y},I,S,A,ft({class:`pxd-choice-list${u?" pxd-choice-scroll":""}`,"aria-labelledby":o,"aria-describedby":g?r:void 0,"aria-required":e.required||void 0,value:$,onValueChange:N,orientation:"vertical"},...i.filter(_).map((k,v)=>{let b=f(k.value);return s("div",{class:"pxd-choice-option",key:m(k.value)},M(k,v,{id:b,class:"pxd-radio","aria-describedby":k.description?`${b}-desc`:void 0,"data-orientation":"vertical"},s("span",{"data-state":"checked",class:"pxd-radio-indicator",style:{pointerEvents:"none"}})),wl(b,k.label,k.description))})))}function Il(e,t){let a=t.b,o=t.id(e),r=t.id(e,"desc"),i=!!a.value(e.value),n=e.description!==void 0?a.text(e.description):void 0,d=p=>{a.write(e.value,p),e.action&&t.r.dispatch({event:{name:e.action.event.name,context:At(e,t.r.data,a.scope,p)}},{pointer:""},e.id)},l=t.a11y(e);return s("div",{class:"pxd-toggle"},e.action?Wd({id:o,class:"pxd-switch",checked:i,onCheckedChange:d,"aria-describedby":n?r:void 0,...l}):Je({id:o,class:"pxd-checkbox",checked:i,onCheckedChange:p=>d(p===!0),"aria-describedby":n?r:void 0,...l,indicator:Mt("pxd-checkbox-indicator","\u2713")}),s("div",{class:"pxd-toggle-text"},s("label",{for:o,class:"pxd-toggle-label"},a.text(e.label)),n&&s("p",{class:"pxd-field-help",id:r},n)))}var kl={date:"date",time:"time",datetime:"datetime-local",month:"month"};function Al(e,t){let a=t.b,o=t.r,r=t.id(e),i=t.id(e,"help"),n=e.kind??"date",d=e.help!==void 0?a.text(e.help):void 0,l=a.value(e.value),p=e.min!==void 0?a.text(e.min):void 0,c=e.max!==void 0?a.text(e.max):void 0,u=t.a11y(e),x=a.text(e.label);if(e.multiple&&n!=="dateRange"){let h=Array.isArray(l)?l.map(String):[],m=y=>ae(y,{type:n==="month"?"date":n==="time"?"time":n==="datetime"?"datetime":"date"},o.locale),f=y=>y&&!h.includes(y)&&a.write(e.value,[...h,y].sort()),g=y=>{let w=y.currentTarget;f(w.value),w.value=""};return s("fieldset",{class:"pxd-field pxd-date-multiple",...u},s("legend",{class:"pxd-field-label"},x,e.required&&mt()),d&&s("p",{class:"pxd-field-help",id:i},d),h.length>0&&s("ul",{class:"pxd-tags-list","aria-label":`Chosen ${x}`},...h.map(y=>s("li",{key:y,class:"pxd-tag-chip"},n==="year"||n==="month"?y:m(y),s("button",{type:"button",class:"pxd-tag-remove","aria-label":`Remove ${y}`,onClick:()=>a.write(e.value,h.filter(w=>w!==y))},O("close",14))))),s("label",{class:"pxd-date-add",for:r},s("span",{class:"pxd-sr-only"},"Add a date"),n==="year"?s("input",{id:r,class:"pxd-input pxd-input-year",inputmode:"numeric",pattern:"[0-9]{4}",maxlength:4,placeholder:"YYYY","aria-describedby":d?i:void 0,onKeydown:y=>y.key==="Enter"&&(y.preventDefault(),g(y)),onBlur:g}):s("input",{id:r,class:"pxd-input pxd-input-date",type:kl[n],min:p,max:c,"aria-describedby":d?i:void 0,onChange:g})))}if(n==="year")return nt({label:x,help:d,required:e.required,id:r,helpId:i},s("input",{id:r,class:"pxd-input pxd-input-year",inputmode:"numeric",pattern:"[0-9]{4}",maxlength:4,placeholder:"YYYY",value:l??"",min:p,max:c,required:e.required,"aria-describedby":d?i:void 0,onInput:h=>a.write(e.value,he(h).replace(/\D/g,"").slice(0,4)||null),...u}));if(n==="dateRange"){let[h,m]=Array.isArray(l)?l:[],f=(g,y)=>{let w=[h??null,m??null];w[g]=y||null,a.write(e.value,w)};return s("fieldset",{class:"pxd-field",...u},s("legend",{class:"pxd-field-label"},x),d&&s("p",{class:"pxd-field-help"},d),s("div",{class:"pxd-date-range"},s("label",null,"From",s("input",{class:"pxd-input",type:"date",value:h??"",min:p,max:c,required:e.required,onChange:g=>f(0,he(g))})),s("label",null,"To",s("input",{class:"pxd-input",type:"date",value:m??"",min:h??p,max:c,required:e.required,onChange:g=>f(1,he(g))}))))}return nt({label:x,help:d,required:e.required,id:r,helpId:i},s("input",{id:r,class:`pxd-input pxd-input-date${n==="month"?" pxd-input-month":""}`,type:kl[n],value:l??"",min:p,max:c,required:e.required,"aria-describedby":d?i:void 0,onChange:h=>a.write(e.value,he(h)||null),...u}))}function El(e,t){let a=t.b,o=t.r,r=t.id(e,"label"),i=t.id(e,"min"),n=t.id(e,"max"),d=c=>ae(c,de(e.format??{type:"number"},o.data,a.scope),o.locale),l=t.a11y(e);if(e.mode==="range"){let c=a.value(e.value),[u,x]=Array.isArray(c)?c.map(Number):[e.min,e.max],h=(m,f)=>a.write(e.value,[Math.max(e.min,Math.min(m,f)),Math.min(e.max,Math.max(m,f))]);return s("div",{class:"pxd-field pxd-range",role:"group","aria-labelledby":r,...l},s("div",{class:"pxd-range-header"},s("span",{class:"pxd-field-label",id:r},a.text(e.label)),s("output",{class:"pxd-range-value","aria-live":"polite"},`${d(u)} \u2013 ${d(x)}`)),rn({min:e.min,max:e.max,step:e.step??1,values:[u,x],minStepsBetweenThumbs:1,onValueChange:([m,f])=>h(m,f),thumbs:[{"aria-label":"Minimum","aria-valuetext":d(u)},{"aria-label":"Maximum","aria-valuetext":d(x)}]}),s("div",{class:"pxd-range-fields"},s("label",{for:i},s("span",null,"Minimum"),s("input",{id:i,class:"pxd-input",inputmode:"numeric",value:String(u),onInput:m=>h(Number(he(m))||e.min,x)})),s("span",{"aria-hidden":"true"},"\u2013"),s("label",{for:n},s("span",null,"Maximum"),s("input",{id:n,class:"pxd-input",inputmode:"numeric",value:String(x),onInput:m=>h(u,Number(he(m))||e.max)}))))}let p=Number(a.value(e.value)??e.min);return s("div",{class:"pxd-field pxd-range",...l},s("div",{class:"pxd-range-header"},s("span",{class:"pxd-field-label",id:r},a.text(e.label)),s("output",{class:"pxd-range-value","aria-live":"polite"},d(p))),rn({min:e.min,max:e.max,step:e.step??1,values:[p],onValueChange:([c])=>a.write(e.value,c),thumbs:[{"aria-labelledby":r,"aria-valuetext":d(p)}]}),s("div",{class:"pxd-range-bounds","aria-hidden":"true"},s("span",null,d(e.min)),s("span",null,d(e.max))))}function Qx(e){return(e.labels?.[0]?.textContent??e.getAttribute("aria-label")??e.closest(".pxd-field")?.querySelector(".pxd-field-label, legend")?.textContent??"").replace(/\*\s*$/,"").trim()}function ef(e,t){let a=new Set,o=[];for(let r of Array.from(e.elements))if(!(!r.willValidate||r.validity.valid)){if(r.type==="radio"&&r.name){if(a.has(r.name))continue;a.add(r.name)}r.id||(r.id=`${t}-${o.length}`),o.push(r)}return o}function zl(e,t){let a=t.b,o=t.r,r=Math.min(t.heading,6),i=t.id(e,"summary"),[n,d]=t.state(e,"problems",()=>[]),[l]=t.state(e,"marked",()=>({current:[]})),p=(e.children??[]).some(f=>o.byId.get(f)?.required),c=()=>{for(let f of l.current)f.removeAttribute("aria-invalid"),f.pxdDescribed?f.setAttribute("aria-describedby",f.pxdDescribed):f.removeAttribute("aria-describedby"),f.pxdNote?.remove(),f.pxdNote=void 0;l.current=[]},u=f=>{for(let g of f){g.setAttribute("aria-invalid","true");let y=g.closest(".pxd-field");if(y&&!y.querySelector(".pxd-field-error")){let w=y.ownerDocument.createElement("p");w.className="pxd-field-error",w.id=`${g.id}-error`,w.textContent=g.validationMessage,y.append(w),g.pxdNote=w,g.pxdDescribed=g.getAttribute("aria-describedby"),g.setAttribute("aria-describedby",[g.pxdDescribed,w.id].filter(Boolean).join(" "))}}l.current=f},x=f=>{let g=document.getElementById(f);g&&(g.scrollIntoView({block:"center"}),g.focus(),document.activeElement!==g&&g.closest(".pxd-field")?.querySelector("[role='radio'], button, input:not([aria-hidden]), textarea, select")?.focus())},[h,m]=t.state(e,"announced",null);return n!==h&&(m(n),n.length&&t.after(()=>o.root?.querySelector(`[data-pxd-id="${CSS.escape(e.id)}"] .pxd-error-summary`)?.focus())),s("form",{class:`pxd-form${e.aside?" pxd-form-with-aside":""}${e.layout==="horizontal"?" pxd-form-horizontal":""}`,novalidate:!0,onSubmit:f=>{f.preventDefault();let g=f.currentTarget;if(c(),!g.checkValidity()){let y=ef(g,i);return u(y),d(y.map(w=>({id:w.id,label:Qx(w),message:w.validationMessage})))}d([]),o.dispatch(e.submit.action,a.scope,e.id)},...t.a11y(e)},e.aside&&s("aside",{class:"pxd-form-aside"},t.render(e.aside)),s("div",{class:"pxd-stack pxd-form-fields"},n.length>0&&s("section",{class:"pxd-error-summary",role:"alert",tabindex:"-1","aria-labelledby":i},s(`h${r}`,{id:i,class:"pxd-error-summary-title"},"Check these fields before continuing"),s("ul",{class:"pxd-error-summary-list"},...n.map(f=>s("li",{key:f.id},s("a",{href:`#${f.id}`,class:"pxd-link",onClick:g=>(g.preventDefault(),x(f.id))},f.label?`${f.label}: ${f.message}`:f.message))))),p&&s("p",{class:"pxd-required-legend"},s("span",{class:"pxd-required","aria-hidden":"true"},"*")," ","Required"),...rt(t,e.children)),s("div",{class:"pxd-action-bar"},s("button",{type:"submit",class:"pxd-button pxd-button-primary"},a.text(e.submit.label)),e.cancel&&s("button",{type:"button",class:"pxd-button pxd-button-secondary",onClick:()=>o.dispatch(e.cancel.action,a.scope,e.id)},a.text(e.cancel.label))))}var tf=()=>Wr(navigator.userAgentData?.platform??navigator.platform??"");function _l(e,t){let a=t.b,o=t.r,r=t.id(e,"desc"),[i,n]=t.state(e,"copied",!1),d=e.disabled!==void 0?!!a.value(e.disabled):!1,l=e.tone==="danger"?" pxd-button-danger":"",p=e.description!==void 0?a.text(e.description):void 0,c=typeof e.shortcut=="string"&&e.shortcut?Vr(e.shortcut,tf()):void 0,u=()=>{let m=e.action.event.name;if(m==="ui.back"&&t.steps)return t.steps.back();if(m==="ui.next"&&t.steps)return t.steps.next();if(m==="ui.copy"){let f=Br(e,o.data,a.scope,a.text),g=()=>{n(!0),setTimeout(()=>n(!1),2e3)};typeof navigator<"u"&&navigator.clipboard?.writeText?navigator.clipboard.writeText(f).then(g,()=>{}):g()}o.dispatch(e.action,a.scope,e.id)},x=o.doc.surface.kind==="shell",h=m=>{let f=m;f&&(f.pxdKey&&document.removeEventListener("keydown",f.pxdKey),!(!c||d)&&(f.pxdKey=g=>{let y=o.root;g.defaultPrevented||g.repeat||!y||!f.isConnected||!x&&!y.contains(document.activeElement)&&!(g.target instanceof HTMLElement&&y.contains(g.target))||Kr(c,g)&&(Gr(c)&&Gd(g.target)||(g.preventDefault(),f.click()))},document.addEventListener("keydown",f.pxdKey),o.onDispose(()=>f.pxdKey&&document.removeEventListener("keydown",f.pxdKey))))};return s("button",{type:"button",class:`pxd-button pxd-button-${e.emphasis??"secondary"}${l}${p?" pxd-button-described":""}`,disabled:d,"aria-describedby":p?r:void 0,"aria-keyshortcuts":c?.aria,onClick:u,...t.a11y(e),ref:h},s("span",{class:"pxd-button-label"},i?"Copied":a.text(e.label)),c&&s("span",{class:"pxd-kbd-hint","aria-hidden":"true"},...c.hint.map((m,f)=>s("kbd",{key:f,class:"pxd-kbd"},m))),p&&s("span",{class:"pxd-button-description",id:r},p),e.action.event.name==="ui.copy"&&s("span",{class:"pxd-sr-only","aria-live":"polite"},i?"Copied":""))}function Nl(e,t){let a=t.b,o=t.r,[r,i]=t.state(e,"task",null),n=e.current!==void 0?a.value(e.current):void 0,[d,l]=t.state(e,"step",()=>vr(n,e.steps.length)),p=e.kind??"wizard",c=s("div",{class:"pxd-action-bar"},s("button",{type:"button",class:"pxd-button pxd-button-primary",onClick:()=>o.dispatch(e.finish.action,a.scope,e.id)},a.text(e.finish.label)));if(p==="guide")return s("div",{class:"pxd-steps pxd-guide",...t.a11y(e)},s("ol",{class:"pxd-guide-list"},...e.steps.map((w,I)=>s("li",{key:w.key,class:"pxd-guide-step"},s("span",{class:"pxd-guide-number","aria-hidden":"true"},I+1),s("div",{class:"pxd-guide-body"},it(t,"pxd-guide-title",a.text(w.title)),t.render(w.content))))),c);if(p==="tasklist"){let w=S=>$r(S.status!==void 0?a.text(S.status):"todo"),I=e.steps.filter(S=>w(S).label==="Completed").length;return s("div",{class:"pxd-steps pxd-tasklist",...t.a11y(e)},s("p",{class:"pxd-steps-progress"},Cr(I,e.steps.length)),s("ul",{class:"pxd-tasklist-list"},...e.steps.map(S=>{let A=r===S.key,{label:_,tone:$}=w(S),N=_==="Cannot start yet";return s("li",{key:S.key,class:`pxd-task${A?" pxd-task-open":""}`},s("div",{class:"pxd-task-row"},s("button",{type:"button",class:"pxd-task-title","aria-expanded":A,disabled:N,onClick:()=>i(Sr(r,S.key))},a.text(S.title)),s("span",{class:`pxd-badge pxd-tone-${$} pxd-task-status`},_)),A&&s("div",{class:"pxd-task-content"},t.render(S.content)))})),c)}let u=e.steps.length,x=typeof n=="number"&&e.current?.path?{index:Math.max(0,Math.min(u-1,n)),total:u}:{...d,total:u},h=w=>{let I=br(x,{type:"go",index:w});e.current?.path?a.write(e.current,I.index):l(I)},m=x.index,f=e.steps[m],g=wr(x),y=t.with({steps:{back:()=>h(m-1),next:()=>h(m+1)}});return s("div",{class:"pxd-steps",...t.a11y(e)},s("p",{class:"pxd-steps-progress"},kr(x)),s("ol",{class:"pxd-steps-list"},...e.steps.map((w,I)=>s("li",{key:w.key,"aria-current":I===m?"step":void 0,class:I<m?"pxd-step-done":I===m?"pxd-step-current":void 0},a.text(w.title)))),s("form",{class:"pxd-steps-content",onSubmit:w=>{w.preventDefault(),g?o.dispatch(e.finish.action,a.scope,e.id):h(m+1)}},it(y,"pxd-steps-title",a.text(f.title)),y.render(f.content),s("div",{class:"pxd-action-bar"},s("button",{type:"submit",class:"pxd-button pxd-button-primary"},g?a.text(e.finish.label):"Continue"),m>0&&s("button",{type:"button",class:"pxd-button pxd-button-secondary",onClick:()=>h(m-1)},"Back"))))}function Ml(e,t){let a=t.b,o=t.r,r=o.doc.root===e.id,[i,n]=t.state(e,"open",!0),[d,l]=t.state(e,"typed",""),p=t.id(e,"title"),c=t.id(e,"desc"),u=e.typeToConfirm!==void 0?a.text(e.typeToConfirm):void 0,x=!u||d.trim()===u,h=e.severity==="destructive",m=t.a11y(e),f=()=>{r||n(!1),o.dispatch(e.cancel?.action??{event:{name:"ui.dismiss"}},a.scope,e.id)},g=()=>x&&o.dispatch(e.confirm.action,a.scope,e.id),y=e.subject&&s("div",{class:"pxd-dialog-subject"},Se(t,{value:e.subject.avatar!==void 0?a.value(e.subject.avatar):void 0,name:a.text(e.subject.title),size:56}),s("div",null,s("div",{class:"pxd-dialog-subject-title"},a.text(e.subject.title)),e.subject.subtitle!==void 0&&s("div",{class:"pxd-dialog-subject-sub"},a.text(e.subject.subtitle)))),w=e.amount&&s("div",{class:"pxd-dialog-amount"},a.text(e.amount.value,e.amount.format)),I=Array.isArray(e.consequences)&&s("ul",{class:"pxd-consequences"},...e.consequences.map((k,v)=>s("li",{key:v},s("span",{class:"pxd-consequence-icon"},O(k.icon??"info")),s("span",null,s("span",{class:"pxd-consequence-title"},a.text(k.title)),k.detail!==void 0&&s("span",{class:"pxd-consequence-detail"},a.text(k.detail)))))),S=s("div",{class:"pxd-dialog-description",id:c},e.message!==void 0&&s("p",null,a.text(e.message))),A=e.consequence!==void 0&&s("p",{class:"pxd-dialog-consequence",id:`${c}-consequence`},O("info",18),s("span",null,a.text(e.consequence))),_=(k,v)=>[I,e.summary&&t.render(e.summary),u&&s("div",{class:"pxd-field"},s("label",{class:"pxd-field-label",for:`${e.id}-type`},"Type ",s("strong",null,u)," to confirm"),s("input",{id:`${e.id}-type`,class:"pxd-input",autocomplete:"off",value:d,onInput:b=>l(b.target.value)})),A,s("div",{class:"pxd-action-bar"},k,v)],$=s("button",{type:"button",class:`pxd-button pxd-button-primary${h?" pxd-button-danger":""}`,disabled:!x,onClick:g},a.text(e.confirm.label)),N=e.cancel?a.text(e.cancel.label):"Cancel",M=e.consequence!==void 0?`${c} ${c}-consequence`:c;if(r){let[k,v]=t.state(e,"focused",!1);return k||(v(!0),t.after(()=>o.root?.querySelector(`[data-pxd-id="${CSS.escape(e.id)}"] > .pxd-action-bar > .pxd-button-secondary`)?.focus({preventScroll:!0}))),s("div",{role:"alertdialog","aria-modal":"false","aria-labelledby":p,"aria-describedby":M,class:`pxd-dialog pxd-dialog-inline${h?" pxd-dialog-destructive":""}`,onKeydown:b=>b.key==="Escape"&&f(),...m},s("h1",{class:"pxd-dialog-title",id:p},a.text(e.title)),w,y,S,..._($,s("button",{type:"button",class:"pxd-button pxd-button-secondary",onClick:f},N)))}return i&&t.portal(Ye({ctx:t,id:t.id(e,"dialog"),role:"alertdialog",class:`pxd-dialog${h?" pxd-dialog-destructive":""}`,onClose:f,props:{"aria-labelledby":p,"aria-describedby":M,...m}},s("h2",{id:p,class:"pxd-dialog-title"},a.text(e.title)),w,y,S,..._($,s("button",{type:"button",class:"pxd-button pxd-button-secondary",autofocus:!0,onClick:f},N)))),null}function Pl(e,t){let a=t.b,o=t.r,r=V(e.items.path,a.scope),i=xe(W(o.data,r)),n=i.map((m,f)=>({pointer:se(r,f)})),d=(m,f)=>W(o.data,V(m,n[f])),l=e.recommended!==void 0?a.text(e.recommended):void 0,p=e.recommendedReason!==void 0?a.text(e.recommendedReason):void 0,c=_i(e.attributes,i.length,d),u=Ni(e.attributes,a.text),x=Mi(i.map((m,f)=>String(d(e.itemTitle,f)??"")),l),h=(m,f)=>{let g=d(m.path,f);return typeof g=="boolean"?g?s("span",{class:"pxd-yes"},O("check",18),s("span",{class:"pxd-sr-only"},"Included")):s("span",{class:"pxd-no"},O("dash",18),s("span",{class:"pxd-sr-only"},"Not included")):ae(g,de(m.format,o.data,a.scope),o.locale)};return s("div",{class:"pxd-comparison",...t.a11y(e)},e.summary!==void 0&&s("p",{class:"pxd-comparison-summary"},a.text(e.summary)),s("ul",{class:"pxd-comparison-items"},...x.map(m=>{let f=String(d(e.itemTitle,m)??""),g=l===f;return s("li",{key:m,class:`pxd-comparison-item${g?" pxd-recommended":""}`},g&&s("p",{class:"pxd-recommendation"},s("span",{class:"pxd-badge pxd-tone-info"},"Recommended"),p&&s("span",{class:"pxd-recommendation-reason"},p)),it(t,"pxd-comparison-title",f),...u.map((y,w)=>s("div",{class:"pxd-comparison-group",key:w},y.label&&s("p",{class:"pxd-comparison-group-label"},y.label),s("dl",null,...y.attributes.map(I=>s("div",{class:"pxd-detail-row",key:I.key},s("dt",null,a.text(I.label)),s("dd",null,h(I,m),c.get(I.key)===m&&s("span",{class:"pxd-best"}," Best"))))))),e.choose&&s("button",{type:"button",class:`pxd-button ${g?"pxd-button-primary":"pxd-button-secondary"}`,onClick:()=>o.dispatch(e.choose.action,n[m],e.id)},`${a.text(e.choose.label)} `,s("span",{class:"pxd-sr-only"},f)))})))}function Tl(e,t){let a=t.r,o=e.children??[],[r,i]=t.state(e,"shown",o.length),[n]=t.state(e,"widths",()=>new Map),[d]=t.state(e,"measured",()=>({trigger:44,width:-1})),[l,p]=t.state(e,"menu",ot),c=Xi(o,a.byId),u=t.id(e,"more"),x=g=>{if(o.length<=2||getComputedStyle(g).flexDirection==="column")return i(o.length);for(let I of g.querySelectorAll(":scope > [data-pxd-id]"))I.offsetWidth&&n.set(I.dataset.pxdId,I.offsetWidth);let y=g.querySelector(":scope > .pxd-action-bar-more");y?.offsetWidth&&(d.trigger=y.offsetWidth);let w=parseFloat(getComputedStyle(g).columnGap)||0;i(Zi(o,I=>n.get(I)??0,w,g.clientWidth,d.trigger,c))},h=g=>{g&&a.observeWidth(g,`${e.id}:bar`,y=>{y!==d.width&&(d.width=y,x(g))})};t.after(()=>{let g=a.root?.querySelector(`[data-pxd-id="${CSS.escape(e.id)}"].pxd-action-bar`);g&&x(g)});let m=o.slice(0,Math.min(r,o.length)),f=o.slice(m.length);return f.length&&Nt(t,u,l,p,af(t,f),{class:"pxd-menu pxd-action-menu"}),s("div",{class:"pxd-action-bar",role:"group","aria-label":"Actions",...t.a11y(e),ref:h},...m.map(g=>t.render(g)),f.length>0&&s("button",{type:"button",...ta(u,l,p,"start",{class:"pxd-icon-button pxd-action-menu-trigger pxd-action-menu-overflow pxd-action-bar-more","aria-label":Yi})},O("dots",18)))}function af(e,t){let a=e.b,o=t.map(l=>e.r.byId.get(l)).filter(l=>!!l&&l.component==="Action"&&(l.visible===void 0||a.value(l.visible)!==!1)),{usual:r,danger:i,divider:n}=ka(o),d=l=>({key:l.id,label:[a.text(l.label)],class:`pxd-menu-item${l.tone==="danger"?" pxd-menu-item-danger":""}`,disabled:l.disabled!==void 0?!!a.value(l.disabled):void 0,onSelect:()=>e.r.dispatch(l.action,a.scope,l.id),props:{"data-pxd-id":l.id,"data-pxd-component":l.component}});return[...r.map(d),...n?["separator"]:[],...i.map(d)]}function Rl(e,t){let a=t.b,o=t.r,[r,i]=t.state(e,"compact",!1),[n,d]=t.state(e,"open",!1),l=t.a11y(e),p=t.id(e,"sheet"),c=e.label!==void 0?a.text(e.label):"Filters",u=(e.children??[]).map(_=>o.byId.get(_)).filter(Boolean),x=u.filter(_=>_.component==="TextInput"&&_.kind==="search"),h=u.filter(_=>!x.includes(_)),m=Vi(h,o.data,a.scope,o.locale,a.text),f=_=>o.surface.write(_.binding,_.cleared,a.scope),g=e.resultCount!==void 0?a.value(e.resultCount):void 0,y=Gi(g,o.locale),w=()=>{for(let _ of m)f(_);e.clear&&o.dispatch(e.clear,a.scope,e.id)},I=()=>d(!1),S=()=>h.map(_=>t.render(_.id)),A=s("div",{class:"pxd-filter-results"},...x.map(_=>t.render(_.id)),s("div",{class:"pxd-filter-status"},r&&s("button",{type:"button",class:"pxd-chip pxd-filter-trigger","aria-haspopup":"dialog","aria-expanded":n,"aria-controls":n?p:void 0,"data-state":n?"open":"closed",onClick:()=>d(!0)},O("filter",18),c,m.length>0&&s("span",{"aria-hidden":"true"},` \xB7 ${m.length}`),m.length>0&&s("span",{class:"pxd-sr-only"},`, ${m.length} active`)),y&&s("p",{class:"pxd-filter-count","aria-live":"polite"},y)),m.length>0&&s("ul",{class:"pxd-filter-chips","aria-label":"Active filters"},...m.map(_=>s("li",{key:_.key},s("button",{type:"button",class:"pxd-chip pxd-filter-chip",onClick:()=>f(_),"aria-label":`Remove filter: ${_.label}`},_.label,O("close",16)))),s("li",null,s("button",{type:"button",class:"pxd-button pxd-button-tertiary pxd-filter-clear",onClick:w},"Clear all"))),t.render(e.results));if(r&&n){let _=t.id(e,"sheet-title");t.portal(Ye({ctx:t,id:p,class:"pxd-sheet",onClose:I,props:{id:p,"aria-labelledby":_}},s("div",{class:"pxd-sheet-header"},s("h2",{id:_,class:"pxd-sheet-title"},c),at(I,{class:"pxd-icon-button","aria-label":"Close"},O("close"))),s("div",{class:"pxd-sheet-body pxd-stack"},...S()),s("div",{class:"pxd-sheet-footer"},m.length>0&&s("button",{type:"button",class:"pxd-button pxd-button-secondary",onClick:w},"Clear all"),at(I,{class:"pxd-button pxd-button-primary"},y?`Show ${y}`:"Show results"))))}return s("div",{class:`pxd-filter-panel${r?" pxd-filter-compact":""}`,...l,ref:_=>_&&o.observeWidth(_,`${e.id}:filter`,$=>i($<Ki))},r?A:s("div",{class:"pxd-filter-layout"},s("section",{class:"pxd-filter-sidebar","aria-label":c},it(t,"pxd-filter-title",c),s("div",{class:"pxd-stack"},...S())),A))}function jl(e,t){let a=t.b,o=t.r,r=t.frame,[i,n]=t.state(e,"compact",!1),[d,l]=t.state(e,"open",!1),[p,c]=t.state(e,"toggled",()=>({})),u=e.kind??"main",x=r&&r.navigationId===e.id&&u==="main"?r.navigation:void 0,h=a.value(e.current),m=x&&r?.current?.key!==void 0?r.current.key:h,f=e.label!==void 0?a.text(e.label):Ti(u),g=t.a11y(e),y=t.id(e,"drawer"),w=k=>{l(!1),r?.setDrawerOpen(!1),o.dispatch(k.action,a.scope,e.id)},I=k=>{let v=k.badge!==void 0?a.value(k.badge):void 0;return v?s("span",{class:"pxd-nav-badge"},v,s("span",{class:"pxd-sr-only"}," needing attention")):null};if(u==="breadcrumb")return s("nav",{class:"pxd-nav-breadcrumb","aria-label":f,...g},s("ol",null,...e.items.map((k,v)=>{let b=v===e.items.length-1,C=k.key===m||m===void 0&&b;return s("li",{key:k.key},C?s("span",{class:"pxd-nav-breadcrumb-current","aria-current":"page"},a.text(k.label)):s("button",{type:"button",class:"pxd-link",onClick:()=>w(k)},a.text(k.label)))})));if(u==="toc")return s("nav",{class:"pxd-nav-toc","aria-label":f,...g},s("p",{class:"pxd-nav-toc-label","aria-hidden":"true"},f),s("ol",null,...e.items.map(k=>{let v=k.key===m;return s("li",{key:k.key},s("a",{href:`#${k.key}`,class:`pxd-nav-toc-link${v?" pxd-nav-current":""}`,"aria-current":v?"true":void 0,onClick:()=>o.dispatch(k.action,a.scope,e.id)},a.text(k.label)))})));if(u==="local")return s("nav",{class:"pxd-nav-local","aria-label":f,...g},s("ul",null,...e.items.map(k=>{let v=k.key===m;return s("li",{key:k.key},s("button",{type:"button",class:`pxd-nav-local-item${v?" pxd-nav-current":""}`,"aria-current":v?"page":void 0,onClick:()=>w(k)},k.icon&&O(k.icon,16),s("span",{class:"pxd-nav-label"},a.text(k.label)),I(k)))})));let S=Pi(e.items,a.text),A=u==="nested",_=k=>k.label&&k.label in p?p[k.label]:!k.label||k.items.some(v=>v.key===m),$=k=>s("ul",null,...k.map(v=>{let b=v.key===m;return s("li",{key:v.key},s("button",{type:"button",class:`pxd-nav-item${b?" pxd-nav-current":""}`,"aria-current":b?"page":void 0,onClick:()=>w(v)},v.icon&&O(v.icon,18),s("span",{class:"pxd-nav-label"},a.text(v.label)),I(v)))})),N=s("nav",{class:`pxd-nav${A?" pxd-nav-nested":""}${x==="side"?" pxd-nav-side":""}`,"aria-label":f,...x==="side"?g:{}},...S.map((k,v)=>s("div",{class:"pxd-nav-group",key:v},k.label&&(A?s("button",{type:"button",class:"pxd-nav-group-toggle","aria-expanded":_(k),onClick:()=>c({...p,[k.label]:!_(k)})},O(_(k)?"sortUp":"sortDown",16),s("span",{class:"pxd-nav-group-label"},k.label)):s("p",{class:"pxd-nav-group-label"},k.label)),(!A||_(k))&&$(k.items))));if(x==="side")return N;if(x==="rail"||x==="bar"){let k=x==="bar"?e.items.slice(0,5):e.items;return s("nav",{class:`pxd-nav-${x}`,"aria-label":f,...g},s("ul",null,...k.map(v=>{let b=v.key===m,C=a.text(v.label);return s("li",{key:v.key},s("button",{type:"button",class:`pxd-nav-${x}-item${b?" pxd-nav-current":""}`,"aria-current":b?"page":void 0,onClick:()=>w(v)},s("span",{class:`pxd-nav-${x}-icon`},v.icon?O(v.icon,24):s("span",{class:"pxd-nav-glyph","aria-hidden":"true"},C.slice(0,1)),I(v)),s("span",{class:"pxd-nav-label"},C)))})))}let M=(k,v,b)=>{if(!k)return;let C=t.id(e,"drawer-title");t.portal(Ye({ctx:t,id:y,class:"pxd-nav-drawer",onClose:v,props:{id:y,"aria-labelledby":C,...b}},s("div",{class:"pxd-sheet-header"},s("h2",{id:C,class:"pxd-sheet-title"},f),at(v,{class:"pxd-icon-button","aria-label":"Close"},O("close"))),N))};return x==="drawer"&&r?(M(r.drawerOpen,()=>r.setDrawerOpen(!1),g),null):(M(i&&d,()=>l(!1),{}),s("div",{class:"pxd-nav-wrap",...g,ref:k=>{if(!k||u!=="main"||x)return;let v=k.closest(".pxd-surface")??k;o.observeWidth(v,`${e.id}:nav`,b=>n(b<900))}},i?s("button",{type:"button",class:"pxd-icon-button pxd-nav-menu","aria-label":`${f} menu`,"aria-haspopup":"dialog","aria-expanded":d,"aria-controls":d?y:void 0,"data-state":d?"open":"closed",onClick:()=>l(!0)},O("menu")):N))}function of(e,t,a){t.action&&e.r.dispatch({event:{name:t.action.event.name,context:At(t,e.r.data,e.scope,a)}},{pointer:""},t.id)}function Fl(e,t){let a=t.b,o=a.text(e.label),r=e.kind??"label",i=r==="status"?e.tone??"neutral":"neutral",n=t.a11y(e),d=`pxd-tag pxd-tag-${r} pxd-tag-${i}${e.remove?" pxd-tag-removable":""}`;return r==="count"?s("span",{class:d,title:o,...n},s("span",{class:"pxd-sr-only"},`${o}: `),s("span",{class:"pxd-tag-number"},a.text(e.count,{type:"number"}))):s("span",{class:d,title:o,...n},s("span",{class:"pxd-tag-text"},o),e.remove&&s("button",{type:"button",class:"pxd-tag-remove","aria-label":`Remove ${o}`,onClick:()=>t.r.dispatch(e.remove,a.scope,e.id)},O("close",12)))}function Hl(e,t){let a=t.b,o=t.r,r=t.id(e,"name"),i=t.id(e,"detail"),n=t.a11y(e),d=e.kind??"person",l=e.size??"default",p=bo[l]??bo.default,c=a.text(e.name),u=e.detail!==void 0?a.text(e.detail):void 0,x={"--polyxd-identity-size":`${p}px`},h=`pxd-identity pxd-identity-${l} pxd-identity-${d}${e.group?" pxd-identity-group":""}`,m,f=c;if(e.group){let y=V(e.group.path,a.scope),w=xe(W(o.data,y)).map((_,$)=>{let N={pointer:se(y,$)},M=k=>k?W(o.data,V(k,N)):void 0;return{name:String(M(e.group.namePath)??""),image:M(e.group.imagePath)}}),I=e.group.max??4,S=w.slice(0,I),A=w.slice(I);f||(f=mi(w,I)),m=s("span",{class:"pxd-identity-faces"},...S.map((_,$)=>s("span",{class:"pxd-identity-face",key:$},Se(t,{value:_.image,name:_.name,size:p}),s("span",{class:"pxd-sr-only"},_.name))),A.length>0&&s("span",{class:"pxd-identity-face pxd-identity-more",role:"img",title:A.map(_=>_.name).join(", "),"aria-label":`${A.length} more: ${A.map(_=>_.name).join(", ")}`},s("span",{"aria-hidden":"true"},`+${A.length}`)))}else m=Se(t,{value:a.value(e.image),name:c,size:p});let g=[m,s("span",{class:"pxd-identity-text"},s("span",{class:"pxd-identity-name",id:r},f),u&&s("span",{class:"pxd-identity-detail",id:i},u))];return e.action?s("button",{type:"button",class:`${h} pxd-identity-button`,style:x,"aria-labelledby":r,"aria-describedby":u?i:void 0,onClick:()=>o.dispatch(e.action,a.scope,e.id),...n},...g):s("div",{class:h,style:x,role:"group","aria-labelledby":r,"aria-describedby":u?i:void 0,...n},...g)}function Ul(e,t){let a=t.b,o=t.id(e,"label"),r=t.a11y(e),i=e.kind??"bar",n=a.text(e.label),d=e.caption!==void 0?a.text(e.caption):void 0,l=ci({kind:i,thresholds:e.thresholds,tone:e.tone,format:de(e.format,t.r.data,a.scope)},a.value(e.value),e.max!==void 0?a.value(e.max):void 0,!!a.value(e.indeterminate),d,t.r.locale),p=i==="meter"?"meter":"progressbar",c=`pxd-gauge pxd-gauge-${i}${l.tone&&l.tone!=="neutral"?` pxd-gauge-${l.tone}`:""}${l.indeterminate?" pxd-gauge-indeterminate":""}`,u=s("div",{class:"pxd-gauge-header"},s("span",{class:"pxd-gauge-label",id:o},n),s("span",{class:"pxd-gauge-readout"},!l.indeterminate&&s("span",{class:"pxd-gauge-value"},l.readout),d&&s("span",{class:"pxd-gauge-caption"},d),l.hint&&s("span",{class:"pxd-gauge-hint"},l.hint)));return i==="ring"?s("div",{class:c,...r},s("div",{class:"pxd-gauge-ring-graphic",role:p,"aria-labelledby":o,...l.valueProps},s("svg",{class:"pxd-gauge-ring-svg",viewBox:"0 0 36 36","aria-hidden":"true",focusable:"false"},s("circle",{class:"pxd-gauge-ring-track",cx:"18",cy:"18",r:"16",fill:"none","stroke-width":"4"}),s("circle",{class:"pxd-gauge-ring-fill",cx:"18",cy:"18",r:"16",fill:"none","stroke-width":"4",pathLength:100,"stroke-dasharray":l.indeterminate?"25 100":`${l.percent} 100`,"stroke-linecap":"round"}))),u):s("div",{class:c,...r},u,s("div",{class:"pxd-gauge-track",role:p,"aria-labelledby":o,...l.valueProps},s("div",{class:"pxd-gauge-fill",style:l.indeterminate?void 0:{width:`${l.percent}%`}})))}function Dl(e){let t=Math.round(Math.max(0,Math.min(1,e))*100);return s("span",{class:"pxd-rating-star-shape","aria-hidden":"true"},s("svg",{class:"pxd-rating-star-empty",viewBox:"0 0 24 24",focusable:"false"},s("path",{d:vo})),s("span",{class:"pxd-rating-star-fill",style:{width:`${t}%`}},s("svg",{viewBox:"0 0 24 24",focusable:"false"},s("path",{d:vo}))))}function Ol(e,t){let a=t.b,o=t.r,r=t.id(e,"label"),i=t.id(e,"help"),[n,d]=t.state(e,"hover",null),l=t.a11y(e),p=e.max??5,c=a.text(e.label),u=a.value(e.value),x=u==null||u===""?void 0:Number(u),h=x!==void 0&&Number.isFinite(x)?Math.max(0,Math.min(p,x)):void 0,m=!!a.value(e.readOnly),f=e.count!==void 0?a.value(e.count):void 0,g=f!=null?ae(f,{type:"number"},o.locale):void 0,y=e.help!==void 0?a.text(e.help):void 0,w=h!==void 0?ae(h,{type:"number",precision:Number.isInteger(h)?0:1},o.locale):void 0,I=f!=null?`from ${g} ${Number(f)===1?"rating":"ratings"}`:void 0;if(m)return s("div",{class:"pxd-rating pxd-rating-readonly",...l},s("span",{class:"pxd-rating-label"},c),s("span",{class:"pxd-rating-stars",role:"img","aria-label":xi(w,p)},...Array.from({length:p},($,N)=>Dl((h??0)-N))),s("span",{class:"pxd-rating-readout"},w&&s("span",{class:"pxd-rating-value","aria-hidden":"true"},w),g&&s("span",{class:"pxd-rating-count"},s("span",{"aria-hidden":"true"},`(${g})`),s("span",{class:"pxd-sr-only"},I))));let S=h!==void 0?Math.round(h):0,A=n??S,_=$=>{let N=Number($);a.write(e.value,N),of(t,e,N)};return s("div",{class:"pxd-field pxd-rating",...l},s("div",{class:"pxd-field-label",id:r},c,e.required&&s("span",{class:"pxd-required","aria-hidden":"true"},"*")),y&&s("p",{class:"pxd-field-help",id:i},y),s("div",{class:"pxd-rating-row"},ft({class:"pxd-rating-stars",orientation:"horizontal","aria-labelledby":r,"aria-describedby":y?i:void 0,"aria-required":e.required||void 0,value:S?String(S):"",onValueChange:_,onMouseleave:()=>d(null)},...Array.from({length:p},($,N)=>N+1).map($=>_t({key:$,value:String($),group:S?String(S):"",first:$===1,onSelect:()=>_(String($)),class:`pxd-rating-star${$<=A?" pxd-rating-star-on":""}`,"aria-label":ui($),"data-orientation":"horizontal",onMouseenter:()=>d($),onFocus:()=>d(null)},Dl($<=A?1:0)))),s("span",{class:"pxd-rating-readout","aria-hidden":"true"},w&&s("span",{class:"pxd-rating-value"},w),g&&s("span",{class:"pxd-rating-count"},`(${g})`)),I&&s("span",{class:"pxd-sr-only"},I)))}var rf=2e3;function ql(e,t){let a=t.b,o=t.id(e,"label"),r=t.a11y(e),i=a.text(e.text),n=e.label!==void 0?a.text(e.label):void 0,d=!!a.value(e.secret),l=e.copyable!==!1,[p,c]=t.state(e,"revealed",!1),[u,x]=t.state(e,"status",""),[h]=t.state(e,"timer",()=>({id:null})),m=S=>{x(S),h.id&&clearTimeout(h.id),h.id=setTimeout(()=>x(""),rf)},f=()=>{let S=typeof navigator<"u"?navigator.clipboard:void 0;if(!S?.writeText)return m("Couldn't copy");S.writeText(i).then(()=>m("Copied"),()=>m("Couldn't copy"))},g=d&&!p,y=g?fi(i):i,w=n??"code",I=n??(e.language?`${e.language} code`:"Code");return s("section",{class:`pxd-code${e.wrap?" pxd-code-wrap":""}${d?" pxd-code-secret":""}`,"aria-labelledby":n!==void 0?o:void 0,"aria-label":n===void 0?I:void 0,...r},s("div",{class:"pxd-code-header"},n!==void 0&&s("span",{class:"pxd-code-label",id:o},n),s("div",{class:"pxd-code-controls"},d&&s("button",{type:"button",class:"pxd-button pxd-button-tertiary pxd-code-control","aria-label":`${p?"Hide":"Show"} ${w}`,onClick:()=>c(!p)},p?"Hide":"Show"),l&&s("button",{type:"button",class:"pxd-button pxd-button-tertiary pxd-code-control","aria-label":`Copy ${w}`,onClick:f},u==="Copied"&&O("check",16),u==="Copied"?"Copied":"Copy"),s("span",{class:"pxd-sr-only",role:"status","aria-live":"polite"},u))),s("pre",{class:"pxd-code-pre",tabindex:"0","data-language":e.language,"data-masked":g||void 0},s("code",{class:e.language?`language-${e.language}`:void 0,translate:"no"},y)))}var Bl=()=>s("svg",{class:"pxd-action-menu-chevron",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},s("path",{d:"m6 9 6 6 6-6"}));function Ll(e,t){let a=t.b,o=t.r,r=t.a11y(e),i=e.kind??"overflow",n=a.text(e.label),d=r["aria-label"]??n,l=t.id(e,"menu"),[p,c]=t.state(e,"menu",ot),[u,x]=t.state(e,"context",ot),h=(e.children??[]).map(A=>o.byId.get(A)).filter(A=>!!A&&(A.visible===void 0||a.value(A.visible)!==!1)),{usual:m,danger:f,divider:g}=ka(h),y=A=>({key:A.id,label:[a.text(A.label)],class:`pxd-menu-item${A.tone==="danger"?" pxd-menu-item-danger":""}`,disabled:A.disabled!==void 0?!!a.value(A.disabled):void 0,onSelect:()=>o.dispatch(A.action,a.scope,A.id),props:{"data-pxd-id":A.id,"data-pxd-component":A.component}}),w=[...m.map(y),...g?["separator"]:[],...f.map(y)];Nt(t,l,p,c,w,{class:"pxd-menu pxd-action-menu"});let I=(A,_,...$)=>s("button",{type:"button",...ta(l,p,c,_,A)},...$),S=()=>I({class:"pxd-icon-button pxd-action-menu-trigger pxd-action-menu-overflow",...r,"aria-label":d},"end",O("dots",18));if(i==="dropdown")return I({class:"pxd-button pxd-button-secondary pxd-action-menu-trigger pxd-action-menu-dropdown",...r,"aria-label":r["aria-label"]},"end",n,Bl());if(i==="split"){let _=(e.primary?o.byId.get(e.primary):void 0)?.emphasis??"secondary";return s("div",{class:"pxd-split",role:"group",...r,"aria-label":d},e.primary&&t.render(e.primary),I({class:`pxd-button pxd-button-${_} pxd-action-menu-trigger pxd-split-menu`,"aria-label":`${n}: more options`},"end",Bl()))}return i==="context"?(Nt(t,`${l}-context`,u,x,w,{class:"pxd-menu pxd-action-menu","aria-label":d}),s("span",{class:"pxd-context-target","data-state":u.open?"open":"closed",style:{WebkitTouchCallout:"none"},onContextmenu:A=>{A.preventDefault(),x({open:!0,x:A.clientX,y:A.clientY,align:"start"})}},S())):S()}function Vl(e,t){let a=t.b,o=t.r,r=t.a11y(e),i=Math.min(t.heading,6),n=t.id(e,"title"),d=t.id(e,"panel"),l=e.kind??"dialog",p=e.size??"default",c=e.dismissible!==!1,u=et(e.open),[x,h]=t.state(e,"open",!0),m=u?!!a.value(e.open):x&&e.open!==!1,f=()=>{u?a.write(e.open,!1):h(!1),o.dispatch({event:{name:"ui.dismiss"}},a.scope,e.id)},g=a.text(e.title),y=`pxd-panel pxd-panel-${l} pxd-panel-size-${p}`,w=t.with({heading:i+1}),I=()=>s("div",{class:"pxd-panel-body pxd-stack"},...rt(w,e.children)),S=()=>e.actions&&s("div",{class:"pxd-panel-footer"},t.render(e.actions));if(l==="popover")return m&&Yd(t,d,`.pxd-panel-anchor[data-pxd-anchor="${CSS.escape(e.id)}"]`,f,c,{class:y,"aria-labelledby":n,...r},s("div",{class:"pxd-panel-header"},s(`h${i}`,{id:n,class:"pxd-panel-title"},g),c&&s("button",{type:"button",class:"pxd-icon-button pxd-panel-close","aria-label":"Close",onClick:f},O("close"))),I(),S(),s("span",{style:{position:"absolute",left:"50%",top:"100%",transform:"translateX(-50%)"}},s("svg",{class:"pxd-panel-arrow",width:16,height:8,viewBox:"0 0 30 10",preserveAspectRatio:"none"},s("polygon",{points:"0,0 30,0 15,10"})))),s("span",{class:"pxd-panel-anchor","data-pxd-anchor":e.id});if(!m)return null;let A=l==="sheet"&&c?nf(f):{};return t.portal(Ye({ctx:t,id:d,class:y,overlayClass:"pxd-overlay pxd-panel-backdrop",dismissible:c,onClose:f,props:{"aria-labelledby":n,...r}},s("div",{class:"pxd-panel-header",...A},l==="sheet"&&s("span",{class:"pxd-panel-grip","aria-hidden":"true"}),s(`h${i}`,{id:n,class:"pxd-panel-title"},g),c&&at(f,{class:"pxd-icon-button pxd-panel-close","aria-label":"Close"},O("close"))),I(),S())),null}function nf(e){let t=null,a=r=>r.currentTarget.closest("dialog"),o=r=>{t=null;let i=a(r);i&&(i.style.transform="",i.style.transition="")};return{onPointerdown:r=>{r.pointerType==="mouse"&&r.button!==0||(t=r.clientY,r.currentTarget.setPointerCapture(r.pointerId))},onPointermove:r=>{let i=a(r);if(t===null||!i)return;let n=Math.max(0,r.clientY-t);i.style.transition="none",i.style.transform=`translateY(${n}px)`},onPointerup:r=>{if(t===null)return;let i=r.clientY-t,n=a(r);o(r),i>80&&(n?.open&&n.close(),e())},onPointercancel:o}}var aa=(...e)=>e.filter(Boolean).join(" ")||void 0,dn=e=>e.target.value,ln=e=>{typeof e.ref=="string"&&e.ref.startsWith("blob:")&&URL.revokeObjectURL(e.ref)};function Gl(e,t){let a=t.b,o=t.r,r=t.id(e),i=t.id(e,"help"),n=t.id(e,"error"),[d,l]=t.state(e,"error",null),[p,c]=t.state(e,"dragging",!1),u=a.value(e.value),x=Array.isArray(u)?u:[],h=Array.isArray(e.accept)?e.accept:[],m=e.maxSize,f=!!e.multiple,g=a.text(e.label),y=[e.help!==void 0?a.text(e.help):"",di(h,m,f,o.locale)].filter(Boolean).join(" ")||void 0,w=S=>{if(!S)return;let A=Array.from(S),_=[],$=[];for(let N of f?A:A.slice(0,1)){let M=li(N,h,m,o.locale);M?$.push(M):_.push({name:N.name,size:N.size,type:N.type,ref:URL.createObjectURL(N)})}if(l($.length?$.join(" "):null),_.length!==0)if(f){let N=_.filter(M=>!x.some(k=>k.name===M.name&&k.size===M.size));_.filter(M=>!N.includes(M)).forEach(ln),N.length&&a.write(e.value,[...x,...N])}else x.forEach(ln),a.write(e.value,_)},I=S=>{ln(x[S]),a.write(e.value,x.filter((A,_)=>_!==S)),l(null)};return s("div",{class:"pxd-field pxd-file"},s("label",{class:"pxd-field-label",for:r},g,e.required&&mt()),y&&s("p",{class:"pxd-field-help",id:i},y),s("div",{class:"pxd-dropzone","data-dragging":p||void 0,onDrop:S=>{S.preventDefault(),c(!1),w(S.dataTransfer?.files??null)},onDragover:S=>{S.preventDefault(),p||c(!0)},onDragleave:S=>{S.currentTarget.contains(S.relatedTarget)||c(!1)}},s("input",{id:r,class:"pxd-dropzone-input",type:"file",accept:h.length?h.join(","):void 0,multiple:f,required:e.required&&x.length===0,"aria-describedby":aa(y&&i,d&&n),"aria-invalid":d?!0:void 0,onChange:S=>{let A=S.target;w(A.files),A.value=""},...t.a11y(e)}),s("span",{class:"pxd-dropzone-icon","aria-hidden":"true"},O("file",24)),s("span",{class:"pxd-dropzone-text"},s("span",{class:"pxd-dropzone-action"},f?"Choose files":"Choose a file"),s("span",{class:"pxd-dropzone-hint"},f?"or drop them here":"or drop it here"))),d&&s("p",{class:"pxd-field-error",id:n,role:"alert"},d),x.length>0&&s("ul",{class:"pxd-file-list"},...x.map((S,A)=>s("li",{class:"pxd-file-item",key:`${S.name}-${S.size}-${A}`},s("span",{class:"pxd-file-icon","aria-hidden":"true"},O("file",18)),s("span",{class:"pxd-file-text"},s("span",{class:"pxd-file-name"},S.name),s("span",{class:"pxd-file-size"},Xt(S.size,o.locale)),typeof S.progress=="number"&&S.progress<1&&s("progress",{class:"pxd-file-progress",value:S.progress,max:1,"aria-label":`Uploading ${S.name}`})),s("button",{type:"button",class:"pxd-file-remove","aria-label":`Remove ${S.name}`,onClick:()=>I(A)},O("close",18))))))}var gt="__other";function Wl(e,t){let a=t.b,o=t.id(e,"label"),r=t.id(e,"help"),i=t.id(e,"picker"),n=t.id(e,"text"),d=t.id(e,"alpha"),l=e.format??"hex",p=!!e.alpha,c=a.text(e.label),u=e.help!==void 0?a.text(e.help):void 0,x=a.value(e.value),h=x==null?"":String(x),m=xt(h),[f,g]=t.state(e,"draft",null),[y,w]=t.state(e,"other",!1),I=t.a11y(e),S=e.swatches?ut({...e,options:e.swatches},t.r.data,a.scope,a.text):[],A=S.length>0,_=E=>a.write(e.value,yo(E,l,p)),$=E=>{g(E);let P=xt(E);P&&_(P)},N=S.findIndex(E=>m?ri(xt(E.value),m,p):String(E.value)===h&&h!==""),M=y?gt:N>=0?String(N):h?gt:"",k=!A||M===gt,v=Math.round((m?.a??1)*100),b=()=>s("div",{class:"pxd-color-picker"},s("input",{id:i,class:"pxd-color-native",type:"color",value:oi(m),"aria-label":`${c}: pick`,"aria-describedby":aa(u&&r),onInput:E=>{let P=xt(dn(E));P&&(g(null),_({...P,a:m?.a??1}))}}),s("input",{id:n,class:"pxd-input pxd-input-mono pxd-color-text",type:"text",inputmode:"text",autocomplete:"off",spellcheck:"false",placeholder:ii(l),value:f??h,"aria-label":`${c}: value`,"aria-describedby":aa(u&&r),"aria-invalid":f!==null&&f!==""&&!xt(f)?!0:void 0,required:!A&&e.required,onInput:E=>$(dn(E)),onBlur:()=>g(null)}),p&&s("label",{class:"pxd-color-alpha",for:d},s("span",{class:"pxd-color-alpha-label"},"Opacity"),s("input",{id:d,type:"range",min:0,max:100,step:1,value:String(v),disabled:!m,"aria-valuetext":`${v}%`,onInput:E=>{m&&(g(null),_({...m,a:Number(dn(E))/100}))}}),s("output",{class:"pxd-color-alpha-value",for:d,"aria-hidden":"true"},`${v}%`)));if(!A)return s("div",{class:"pxd-field pxd-color",role:"group","aria-labelledby":o,"aria-describedby":aa(u&&r),...I},s("div",{class:"pxd-field-label",id:o},c,e.required&&mt()),u&&s("p",{class:"pxd-field-help",id:r},u),b());let C=E=>{if(E===gt)return w(!0);w(!1),g(null);let P=S[Number(E)],z=xt(P.value);a.write(e.value,z?yo(z,l,p):P.value)};return s("div",{class:"pxd-field pxd-color",...I},s("div",{class:"pxd-field-label",id:o},c,e.required&&mt()),u&&s("p",{class:"pxd-field-help",id:r},u),ft({class:"pxd-swatches","aria-labelledby":o,"aria-describedby":aa(u&&r),"aria-required":e.required||void 0,value:M,orientation:"horizontal",onValueChange:C},...S.map((E,P)=>_t({key:String(P),value:String(P),group:M,first:P===0,onSelect:()=>C(String(P)),class:"pxd-swatch",title:E.label,"data-orientation":"horizontal"},s("span",{class:"pxd-swatch-color",style:{background:String(E.value)},"aria-hidden":"true"}),s("span",{class:"pxd-swatch-name"},E.label))),_t({key:gt,value:gt,group:M,onSelect:()=>C(gt),class:"pxd-swatch pxd-swatch-other",title:"Other","data-orientation":"horizontal"},s("span",{class:"pxd-swatch-color",style:M===gt&&m?{background:h}:void 0,"aria-hidden":"true"}),s("span",{class:"pxd-swatch-name"},"Other"))),k&&b())}var Kl=(e,t)=>Array.from({length:t},(a,o)=>e[o]??"");function Jl(e,t){let a=t.b,o=t.id(e,"label"),r=t.id(e,"help"),i=Be(Number(e.length)||6,4,12),n=(e.kind??"numeric")==="numeric",d=e.required??!0,l=a.text(e.label),p=e.help!==void 0?a.text(e.help):void 0,c=a.value(e.value),u=c==null?"":String(c),[x]=t.state(e,"code",()=>({chars:Kl(u,i),seen:u,fired:null}));u!==x.seen&&(x.seen=u,u!==x.chars.join("")&&(x.chars=Kl(u,i)));let h=x.chars,m=t.a11y(e),f=()=>Array.from(t.r.root?.querySelectorAll(`[data-pxd-id="${CSS.escape(e.id)}"] .pxd-code-box`)??[]),g=M=>M.replace(n?/[^0-9]/g:/[^0-9a-zA-Z]/g,""),y=M=>f()[Be(M,0,i-1)]?.focus(),w=M=>{x.chars=M;let k=M.join("");x.seen=k,a.write(e.value,k),e.action&&M.every(Boolean)&&k!==x.fired&&(x.fired=k,t.r.dispatch({event:{name:e.action.event.name,context:At(e,t.r.data,a.scope,k)}},{pointer:""},e.id)),t.r.schedule()},I=(M,k)=>{let v=g(k);if(!v)return;let b=[...h],C=M;for(let E of v){if(C>=i)break;b[C++]=E}w(b),y(C)},S=(M,k)=>{let v=h[M],b=k.target.value;if(v&&b.length>1&&(b=b.startsWith(v)?b.slice(v.length):b.endsWith(v)?b.slice(0,-v.length):b),b===""){let C=[...h];return C[M]="",w(C)}I(g(b).length>=i?0:M,b)},A=(M,k)=>{if(k.key==="Backspace"&&!h[M]&&M>0){k.preventDefault();let v=[...h];v[M-1]="",w(v),y(M-1)}else k.key==="ArrowLeft"?(k.preventDefault(),y(M-1)):k.key==="ArrowRight"&&(k.preventDefault(),y(M+1))},_=(M,k)=>{k.preventDefault();let v=k.clipboardData?.getData("text")??"";I(g(v).length>=i?0:M,v)},$=i>6?i%4===0?4:3:i,N=[];for(let M=0;M<i;M+=$)N.push(Array.from({length:Math.min($,i-M)},(k,v)=>M+v));return s("div",{class:"pxd-field pxd-code",role:"group","aria-labelledby":o,"aria-describedby":aa(p&&r),...m},s("div",{class:"pxd-field-label",id:o},l,d&&mt()),p&&s("p",{class:"pxd-field-help",id:r},p),s("div",{class:"pxd-code-boxes"},...N.map((M,k)=>s("div",{class:"pxd-code-group",key:k},...M.map(v=>s("input",{key:v,class:"pxd-code-box",type:"text",inputmode:n?"numeric":"text",pattern:n?"[0-9]*":"[0-9A-Za-z]*",autocomplete:v===0?"one-time-code":"off",autocapitalize:n?void 0:"characters",spellcheck:"false","aria-label":`Digit ${v+1} of ${i}`,value:h[v],"data-filled":h[v]?"":void 0,required:d,onFocus:b=>b.target.select(),onInput:b=>S(v,b),onKeydown:b=>A(v,b),onPaste:b=>_(v,b)}))))))}var Yl=40;function Xl(e,t){let a=t.b,o=t.r,r=t.id(e,"caption"),i=e.selection??"none",n=i!=="none"&&!!e.selected,d=e.expanded?xe(a.value(e.expanded)):void 0,[l,p]=t.state(e,"expanded",null),c=d?new Set(d):l,u=n?a.value(e.selected):void 0,x=D=>Array.isArray(u)?u.includes(D):u!==void 0&&u===D,{rows:h,indexByKey:m,topValues:f}=Oi(e,o.data,a.scope,c),[g,y]=t.state(e,"focus",null),w=(g!==null?m.get(g):void 0)??0,[I]=t.state(e,"pending",()=>({index:null})),S=h.length>$o,[A,_]=t.state(e,"geometry",()=>({rowHeight:Yl,viewportHeight:Yl*12,scrollTop:0})),{start:$,end:N}=Li(h.length,A.scrollTop,A.rowHeight,A.viewportHeight),M=()=>o.root?.querySelector(`[data-pxd-id="${CSS.escape(e.id)}"] .pxd-tree-list`),k=D=>{if(!h.length)return;let L=Math.max(0,Math.min(h.length-1,D));y(h[L].key);let H=M()?.querySelector(`[data-index="${L}"]`);if(H)return H.focus();I.index=L;let j=M()?.parentElement;if(S&&j?.classList.contains("pxd-tree-viewport")){let K=Math.max(0,L*A.rowHeight-(A.viewportHeight-A.rowHeight)/2);j.scrollTop=K,_({...A,scrollTop:K})}};t.after(()=>{if(I.index===null)return;let D=M()?.querySelector(`[data-index="${I.index}"]`);if(D&&(I.index=null,D.focus()),S){let L=M()?.querySelector(".pxd-tree-item"),H=M()?.parentElement,j=L&&L.offsetHeight>0?L.offsetHeight:A.rowHeight,K=H?.clientHeight||A.viewportHeight;(j!==A.rowHeight||K!==A.viewportHeight)&&_({...A,rowHeight:j,viewportHeight:K})}});let v=(D,L)=>{if(e.expanded){let j=d??[];a.write(e.expanded,L?[...j,...D.filter(K=>!j.includes(K))]:j.filter(K=>!D.includes(K)));return}let H=new Set(l??f);for(let j of D)L?H.add(j):H.delete(j);p(H)},b=D=>v([D.value],!D.expanded),C=D=>{if(!n)return;if(i==="single")return a.write(e.selected,D.value);let L=Array.isArray(u)?u:[];a.write(e.selected,L.includes(D.value)?L.filter(H=>H!==D.value):[...L,D.value])},E=D=>{C(D),e.action&&o.dispatch(e.action,D.scope,e.id)},[P]=t.state(e,"typed",()=>({buffer:"",at:0})),z=D=>{let L=Date.now();P.buffer=L-P.at<Ui?P.buffer+D.toLowerCase():D.toLowerCase(),P.at=L;let H=qi(h,w,P.buffer);H>=0&&k(H)},F=D=>{let L=h[w],H=Bi(h,w,D);!L||!H||(D.preventDefault(),D.stopPropagation(),"focus"in H?k(H.focus):"toggle"in H?b(L):"activate"in H?E(L):"select"in H?C(L):"expandSiblings"in H?v(h.filter(j=>j.parent===L.parent&&j.hasChildren).map(j=>j.value),!0):"typeAhead"in H&&z(H.typeAhead))},T=a.text(e.label),U=S?{paddingTop:$*A.rowHeight,paddingBottom:(h.length-N)*A.rowHeight}:void 0,B=s("ul",{role:"tree",class:"pxd-tree-list","aria-labelledby":r,"aria-multiselectable":i==="multiple"?!0:void 0,style:U,onKeydown:F},...h.slice($,N).map((D,L)=>{let H=$+L,j=n?x(D.value):void 0;return s("li",{key:D.key,role:"treeitem",class:`pxd-tree-item${j?" pxd-tree-item-selected":""}`,style:{"--polyxd-tree-depth":D.level-1},"data-index":H,tabindex:H===w?"0":"-1","aria-level":D.level,"aria-setsize":D.setsize,"aria-posinset":D.posinset,"aria-expanded":D.hasChildren?D.expanded:void 0,"aria-selected":j,onFocus:K=>{K.target===K.currentTarget&&y(D.key)},onClick:K=>{K.stopPropagation(),k(H),n?C(D):D.hasChildren&&b(D)},onDblclick:K=>{K.stopPropagation(),e.action?o.dispatch(e.action,D.scope,e.id):D.hasChildren&&b(D)}},s("div",{class:"pxd-tree-row"},D.hasChildren?s("button",{type:"button",class:`pxd-tree-expander${D.expanded?" pxd-tree-expander-open":""}`,tabindex:"-1","aria-hidden":"true",onClick:K=>{K.stopPropagation(),k(H),b(D)},onDblclick:K=>K.stopPropagation()},O("chevronRight",16)):s("span",{class:"pxd-tree-expander pxd-tree-expander-leaf","aria-hidden":"true"}),s("span",{class:"pxd-tree-text"},D.label),D.detail!==void 0&&s("span",{class:"pxd-tree-detail"},D.detail)))}));return s("div",{class:"pxd-tree",...t.a11y(e)},s("div",{class:"pxd-tree-caption",id:r},T),S?s("div",{class:"pxd-tree-viewport",onScroll:D=>_({...A,scrollTop:D.currentTarget.scrollTop})},B):B)}var oa={Section:Xd,Group:Zd,Card:el,Disclosure:tl,Views:al,Navigation:jl,Text:xl,Metric:fl,DetailList:ml,Collection:gl,Table:pl,Chart:bl,Media:hl,Status:yl,TextInput:$l,Choice:Cl,Toggle:Il,DateInput:Al,RangeInput:El,Form:zl,Action:_l,ActionBar:Tl,Steps:Nl,Confirm:Ml,Comparison:Pl,FilterPanel:Rl,Tag:Fl,Identity:Hl,Progress:Ul,Rating:Ol,Code:ql,Tree:Xl,ActionMenu:Ll,Panel:Vl,FileInput:Gl,ColorInput:Wl,CodeInput:Jl,Columns:Qd,Split:ol,Frame:il,AppBar:nl,Footer:sl,Outlet:dl,Custom:ll};var Pt=class{surface;props;host;root=null;portalEl=null;components;states=new Map;effects=[];portals=[];modals=0;scheduled=!1;unsubscribe;observers=new Map;drawing=!1;disposers=[];constructor(t,a){this.host=t,this.props=a,this.components={...oa,...a.components??{}},this.surface=this.makeSurface(a),this.unsubscribe=this.surface.subscribe(()=>this.schedule())}makeSurface(t){return Qi(t.document,{data:t.data,locale:t.locale??"en-GB",derive:t.derive,onAction:a=>this.props.onAction?.(a),onDataChange:a=>this.props.onDataChange?.(a),onDismiss:()=>this.props.onDismiss?.()})}get locale(){return this.surface.locale}get doc(){return this.surface.document}get data(){return this.surface.data}get byId(){return this.surface.byId}get disclosure(){return this.props.disclosure??"progressive"}update(t){let a=this.props;if(this.props=t,this.components={...oa,...t.components??{}},t.document!==a.document||(t.locale??"en-GB")!==a.locale)this.unsubscribe(),this.states.clear(),this.surface=this.makeSurface(t),this.unsubscribe=this.surface.subscribe(()=>this.schedule());else if(t.data&&t.data!==a.data&&t.document.surface.kind==="shell"){this.surface.replaceData(t.data);return}this.schedule()}dispose(){this.unsubscribe();for(let t of this.disposers)t();for(let t of this.observers.values())t.disconnect();on(this.host)}onDispose(t){this.disposers.push(t)}schedule(){this.scheduled||(this.scheduled=!0,queueMicrotask(()=>{this.scheduled=!1,this.draw()}))}observeWidth(t,a,o){if(!t||this.observers.has(t)||typeof ResizeObserver>"u")return;let r=()=>o(t.getBoundingClientRect().width),i=new ResizeObserver(r);i.observe(t),this.observers.set(t,i),r()}unobserve(t){this.observers.get(t)?.disconnect(),this.observers.delete(t)}bindings(t){let a=this.surface;return{scope:t,value:o=>ne(o,a.data,t),text:(o,r)=>{let i=ne(o,a.data,t);return r?ae(i,de(r,a.data,t),a.locale):i==null?"":String(i)},pointer:o=>V(o.path,t),write:(o,r)=>a.setValue(V(o.path,t),r),context:o=>ct(o,a.data,t)}}dispatch(t,a,o){this.surface.dispatch(t,a,o)}ctx(t){let a=this,o=(i,n)=>`${t.scope.pointer}#${i.id}:${n}`,r={r:a,scope:t.scope,heading:t.heading,steps:t.steps,frame:t.frame,b:a.bindings(t.scope),render:(i,n)=>a.renderNode(i,n?r.with({scope:n}):r),a11y:i=>en(i,n=>{let d=ne(n,a.data,t.scope);return d===void 0?void 0:String(d)}),id:(i,n="")=>`pxd-${(t.scope.pointer+"-"+i.id+(n?"-"+n:"")).replace(/[^A-Za-z0-9_-]+/g,"_")}`,state:(i,n,d)=>{let l=o(i,n);a.states.has(l)||a.states.set(l,typeof d=="function"?d():d);let p=c=>{let u=a.states.get(l),x=typeof c=="function"?c(u):c;Object.is(x,u)||(a.states.set(l,x),a.schedule())};return[a.states.get(l),p]},after:i=>a.effects.push(i),portal:i=>a.portals.push(i),with:i=>a.ctx({...t,...i})};return r}renderNode(t,a){let o=this.byId.get(t);if(!o||o.visible!==void 0&&ne(o.visible,this.data,a.scope)===!1)return null;let r=this.components[o.component];if(!r)return s("div",{class:"pxd-unknown",role:"note"},`Unsupported component \u201C${o.component}\u201D`);let i=r(o,a);return i instanceof Element?ea(i,o.id):i}draw(){if(this.drawing)return this.schedule();this.drawing=!0,this.effects=[],this.portals=[],this.modals=0;try{let t=this.surfaceTree();Sa(this.host,[t]),this.root=this.host.querySelector(":scope > .pxd-surface"),this.portalEl=this.root?.querySelector(":scope > .pxd-portal")??null;let a=this.effects;this.effects=[];for(let o of a)o()}finally{this.drawing=!1}}surfaceTree(){let t=this.doc,a=this.props,o=this.ctx({scope:Ae,heading:2}),r=this.byId.get(t.root)?.component==="Confirm",i=t.surface.kind==="shell",n=cr(t),d=i?o.render(t.root):s("div",{class:"pxd-surface-main"},!r&&this.header(o),o.render(t.root)),l=n?o.render(n.id):null,p=s("div",{class:"pxd-portal"},...this.portals),c=this.modals>0?"true":void 0;for(let u of[l,d])u&&typeof u=="object"&&"props"in u&&(u.props["aria-hidden"]=c);return s("div",{class:["pxd-surface",i?"pxd-surface-shell":null,t.surface.presentation==="panel"?"pxd-surface-panel":null,n?"pxd-surface-with-nav":null,a.className].filter(Boolean).join(" "),"data-pxd-theme":a.theme,"data-pxd-mode":a.mode,"data-pxd-density":a.density,"data-pxd-surface":t.surface.id,lang:this.locale},l,d,p)}header(t){let{title:a,subtitle:o,breadcrumbs:r,badge:i,avatar:n,actions:d}=this.doc.surface,l=c=>String(ne(c,this.data,Ae)??"");return!o&&!r&&!i&&!n&&!d?s("h1",{class:"pxd-surface-title"},a):s("header",{class:"pxd-page-header"},r&&s("nav",{class:"pxd-breadcrumbs","aria-label":"Breadcrumb"},s("ol",null,r.map((c,u)=>s("li",{key:u},c.action?s("button",{type:"button",class:"pxd-link",onClick:()=>this.dispatch(c.action,Ae,this.doc.surface.id)},l(c.label)):l(c.label))))),s("div",{class:"pxd-page-header-main"},n!==void 0&&Se(t,{value:l(n),name:a,size:48}),s("div",{class:"pxd-page-header-text"},s("h1",{class:"pxd-surface-title"},a,i&&s("span",{class:`pxd-badge pxd-tone-${i.tone??"neutral"}`},l(i.text))),o!==void 0&&s("p",{class:"pxd-surface-subtitle"},l(o))),d&&s("div",{class:"pxd-page-header-actions"},t.render(d))))}};var sf=["theme","mode","density","locale","disclosure"],Aa=class extends HTMLElement{static get observedAttributes(){return[...sf]}#e=null;#t=null;#a;#i;#n;#s;#r=!1;onAction=null;onDataChange=null;onDismiss=null;get document(){return this.#t}set document(t){this.#t=t,this.#o()}get data(){return this.#a}set data(t){this.#a=t,this.#o()}get derive(){return this.#i}set derive(t){this.#i=t,this.#o()}get resolveMedia(){return this.#n}set resolveMedia(t){this.#n=t,this.#o()}get components(){return this.#s}set components(t){this.#s=t,this.#o()}get theme(){return this.getAttribute("theme")??void 0}set theme(t){t===void 0?this.removeAttribute("theme"):this.setAttribute("theme",t)}get mode(){return this.getAttribute("mode")??void 0}set mode(t){t===void 0?this.removeAttribute("mode"):this.setAttribute("mode",t)}get density(){return this.getAttribute("density")??void 0}set density(t){t===void 0?this.removeAttribute("density"):this.setAttribute("density",t)}get locale(){return this.getAttribute("locale")??void 0}set locale(t){t===void 0?this.removeAttribute("locale"):this.setAttribute("locale",t)}get disclosure(){return this.getAttribute("disclosure")??void 0}set disclosure(t){t===void 0?this.removeAttribute("disclosure"):this.setAttribute("disclosure",t)}get surfaceData(){return this.#e?.data}connectedCallback(){this.#o()}disconnectedCallback(){this.#e?.dispose(),this.#e=null}attributeChangedCallback(){this.#o()}props(){return this.#t?{document:this.#t,data:this.#a,derive:this.#i,resolveMedia:this.#n,components:this.#s,theme:this.theme,mode:this.mode,density:this.density,locale:this.locale,disclosure:this.disclosure,onAction:t=>{this.onAction?.(t),this.dispatchEvent(new CustomEvent("polyxd-action",{detail:t,bubbles:!0,composed:!0}))},onDataChange:t=>{this.onDataChange?.(t),this.dispatchEvent(new CustomEvent("polyxd-datachange",{detail:t,bubbles:!0,composed:!0}))},onDismiss:()=>{this.onDismiss?.(),this.dispatchEvent(new CustomEvent("polyxd-dismiss",{bubbles:!0,composed:!0}))}}:null}#o(){this.#r||(this.#r=!0,queueMicrotask(()=>{if(this.#r=!1,!this.isConnected)return;let t=this.props();t&&(this.#e?this.#e.update(t):(this.#e=new Pt(this,t),this.#e.draw()))}))}flush(){let t=this.props();!t||!this.isConnected||(this.#r=!1,this.#e?(this.#e.update(t),this.#e.draw()):(this.#e=new Pt(this,t),this.#e.draw()))}},Io=class extends Aa{#e=null;#t;#a=!1;get outlet(){return this.#e}set outlet(t){this.#e=t,this.flushSoon()}get current(){return this.#t}set current(t){this.#t=t,this.flushSoon()}get loading(){return this.#a}set loading(t){this.#a=t,this.flushSoon()}connectedCallback(){if(!this.#e&&this.childElementCount>0&&!this.querySelector(":scope > .pxd-surface")){let t=document.createElement("div");t.append(...Array.from(this.childNodes)),this.#e=t}super.connectedCallback()}flushSoon(){queueMicrotask(()=>this.isConnected&&this.flush())}props(){let t=super.props();if(!t)return null;let a=t.document.surface.title;return this.#t&&a&&(document.title=this.#t.title?`${this.#t.title} \xB7 ${a}`:a),{...t,outlet:this.#e,current:this.#t,loading:this.#a}}};function Ao(){typeof customElements>"u"||(customElements.get("polyxd-surface")||customElements.define("polyxd-surface",Aa),customElements.get("polyxd-frame")||customElements.define("polyxd-frame",Io))}function Ea(e,t){let a=new Pt(e,t);a.draw();let o=t;return{update:r=>{o={...o,...r},a.update(o),a.draw()},unmount:()=>a.dispose(),get data(){return a.data}}}var pn="0.3.0";var fx=Sx(nx(),1);var hd={"Card.media":["Media"],"Card.children":["Text","Metric","DetailList","Group","Media","Status","Toggle","Action","ActionBar","Tag","Identity","Progress","Rating","Code","ActionMenu"],"Collection.empty":["Status"],"Table.empty":["Status"],"Status.action":["Action","ActionBar"],"Form.aside":["DetailList","Card","Group"],"FilterPanel.children":["Choice","RangeInput","Toggle","DateInput","TextInput","Rating","ColorInput"],"FilterPanel.results":["Collection","Table"],"ActionBar.children":["Action"],"Confirm.summary":["DetailList"],"Table.toolbar":["ActionBar"],"Table.bulkActions":["ActionBar"],"Table.rowActions":["ActionBar"],"Table.detail":["DetailList","Group","Card","Text","Metric","Status","Media","Collection"],"Collection.bulkActions":["ActionBar"],"Table.search":["TextInput"],"Surface.actions":["ActionBar"],"Panel.children":["Section","Group","Text","Metric","DetailList","Media","Status","Form","Choice","TextInput","Toggle","DateInput","RangeInput","Collection","Table","Tree","Tag","Identity","Progress","Rating","Code","FileInput","ColorInput","CodeInput","Disclosure","Views","Card"],"Panel.actions":["ActionBar"],"ActionMenu.children":["Action"],"ActionMenu.primary":["Action"],"Frame.header":["AppBar"],"Frame.navigation":["Navigation"],"Frame.main":["Outlet","Group"],"Frame.aside":["Group","Section","Card","Status","Text","DetailList","Collection","Disclosure","Navigation","Custom"],"Frame.footer":["Footer"],"Frame.banner":["Status"],"AppBar.leading":["Action"],"AppBar.search":["TextInput","Action"],"AppBar.actions":["ActionBar"],"AppBar.account":["Identity","ActionMenu"],"Footer.aside":["Choice","Tag","Text"],"Outlet.loading":["Status","Progress","Text","Group"],"Custom.fallback":["Text","Media","Status","Metric","Tag","Identity","Code","Progress","Group","Card"],"Columns.children":["Section","Group","Card","Text","Metric","DetailList","Media","Status","Form","Collection","Table","Tree","Chart","Disclosure","Views","Steps","Comparison","FilterPanel","Navigation","Tag","Identity","Progress","Code","Custom"],"Split.primary":["Collection","Table","Tree"],"Split.detail":["Group","Section","Card","DetailList","Text","Form","Views","Table","Collection","Media","Code"],"Split.empty":["Status"]};var sx={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://polyxd.com/schema/0.3/ui.schema.json",title:"Polyxd UI document",description:"A just-in-time interface: a flat list of semantic components (A2UI-style adjacency list) plus the surface it belongs to. Data comes from the host via bindings; actions are declared capability intents. Generated file: edit components/*.json and schema/common.defs.json instead.",type:"object",required:["specVersion","surface","root","components"],properties:{$schema:{type:"string",description:"The schema this document follows, so editors validate and complete it: https://polyxd.com/schema/0.3/ui.schema.json"},specVersion:{type:"string",pattern:"^0\\.[123]\\.[0-9]+$"},surface:{type:"object",required:["id","title"],properties:{id:{$ref:"#/$defs/Id"},title:{type:"string",description:"Short title for the surface (page title / dialog title)"},intent:{$ref:"#/$defs/Key",description:"What the user is trying to do, as a stable key (e.g. 'money.send'); memory is organised by intent"},pattern:{type:"string",description:"Id of the pattern this surface follows, when one applies"},journey:{type:"string",description:"Id of the journey this surface is a step of, when one applies"},subtitle:{$ref:"#/$defs/DynamicString",description:"One line under the title: what this record or page is; may be bound to data"},breadcrumbs:{type:"array",maxItems:4,items:{type:"object",required:["label"],properties:{label:{$ref:"#/$defs/DynamicString"},action:{$ref:"#/$defs/Action"}},additionalProperties:!1},description:"Where this surface sits, ending with its parent (the title is the last step)"},badge:{type:"object",required:["text"],properties:{text:{$ref:"#/$defs/DynamicString"},tone:{$ref:"#/$defs/Tone"}},additionalProperties:!1,description:"Status of the thing this surface is about, e.g. 'Past due'"},avatar:{$ref:"#/$defs/DynamicString",description:"Initials or a media reference for the entity this surface is about"},actions:{$ref:"#/$defs/Id",description:"ActionBar in the header: what you can do to this record"},presentation:{enum:["page","panel"],default:"page",description:"'panel' opens beside what it came from (a side sheet over a list) and is full screen on compact surfaces"},dismissible:{type:"boolean",default:!0},kind:{enum:["surface","shell"],default:"surface",description:"'shell' is the product's frame (a Frame at the root with an Outlet for screens); it is always authored. 'surface' is a screen, panel or dialog that lives inside a shell"},origin:{enum:["generated","authored"],description:"How the document came to be: written by a generator for a request, or authored by a person as a screen of the product. Both are verified the same way; the mark a renderer shows can say which"}},additionalProperties:!1},root:{$ref:"#/$defs/Id",description:"Id of the top-level component"},components:{type:"array",minItems:1,items:{$ref:"#/$defs/Component"}},data:{type:"object",description:"Host data snapshot. Supplied by the host (or a test fixture), never by the model."}},additionalProperties:!1,$defs:{Id:{type:"string",pattern:"^[A-Za-z][A-Za-z0-9_-]*$",description:"Component id, unique within the document"},Key:{type:"string",pattern:"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$",description:"Stable semantic key (e.g. 'fee', 'recipient.name'). The same thing gets the same key across generations; interface memory uses it to keep placement, order and labels consistent."},Path:{type:"string",pattern:"^(/([^/~]|~[01])*)+$|^[A-Za-z0-9_]([^/~]|~[01])*(/([^/~]|~[01])*)*$",description:"RFC 6901 JSON Pointer into host-provided data. Absolute ('/account/balance') or, inside a template, relative to the current item ('amount')."},Binding:{type:"object",required:["path"],properties:{path:{$ref:"#/$defs/Path"}},additionalProperties:!1,description:"A value read from (and, for inputs, written to) host data. Data always comes from the host; the model never invents it."},DynamicString:{oneOf:[{type:"string"},{$ref:"#/$defs/Binding"}]},DynamicNumber:{oneOf:[{type:"number"},{$ref:"#/$defs/Binding"}]},DynamicBoolean:{oneOf:[{type:"boolean"},{$ref:"#/$defs/Binding"}]},DynamicValue:{oneOf:[{type:["string","number","boolean"]},{$ref:"#/$defs/Binding"}]},Format:{type:"object",required:["type"],properties:{type:{enum:["text","number","currency","percent","date","time","datetime","relativeTime","duration","color","bytes"]},currency:{$ref:"#/$defs/DynamicString",description:"ISO 4217 code, required for type 'currency'"},precision:{type:"integer",minimum:0,maximum:6}},additionalProperties:!1,description:"How to present a value. The renderer localizes it; the model never pre-formats numbers or dates into strings."},Tone:{enum:["neutral","info","success","warning","danger"]},Accessibility:{type:"object",properties:{label:{$ref:"#/$defs/DynamicString",description:"Accessible name, when the visible label is absent or insufficient"},description:{$ref:"#/$defs/DynamicString"},live:{enum:["off","polite","assertive"]},hidden:{type:"boolean",description:"Hide from assistive technology (decorative only)"}},additionalProperties:!1,description:"Same fields as A2UI v1.0 'accessibility'. Components already carry roles and names from their semantics; use this only to add to them."},Capability:{type:"string",pattern:"^[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)+$",description:"Name of a host-registered capability (e.g. 'transfer.confirm'). The 'ui.' namespace is reserved for renderer-handled actions: ui.dismiss, ui.back, ui.next."},Action:{type:"object",required:["event"],properties:{event:{type:"object",required:["name"],properties:{name:{$ref:"#/$defs/Capability"},context:{type:"object",additionalProperties:{$ref:"#/$defs/DynamicValue"},description:"Values sent with the event, usually bindings to inputs or to the current template item"}},additionalProperties:!1}},additionalProperties:!1,description:"A declared intent. The host binds it to a handler; generated UI never runs code. Same shape as A2UI 'action.event'."},ActionSpec:{type:"object",required:["label","action"],properties:{label:{$ref:"#/$defs/DynamicString"},action:{$ref:"#/$defs/Action"}},additionalProperties:!1},ChildList:{type:"array",items:{$ref:"#/$defs/Id"},minItems:1,description:"Ordered child component ids"},Template:{type:"object",required:["path","componentId"],properties:{path:{$ref:"#/$defs/Path",description:"Array in host data to repeat over"},componentId:{$ref:"#/$defs/Id",description:"Component rendered once per item; relative paths inside it resolve against the item"}},additionalProperties:!1,description:"Same shape as A2UI templated children"},Options:{oneOf:[{type:"array",minItems:2,items:{type:"object",required:["value","label"],properties:{value:{type:["string","number","boolean"]},label:{$ref:"#/$defs/DynamicString"},description:{$ref:"#/$defs/DynamicString"}},additionalProperties:!1}},{type:"object",required:["path","valuePath","labelPath"],properties:{path:{$ref:"#/$defs/Path"},valuePath:{$ref:"#/$defs/Path"},labelPath:{$ref:"#/$defs/Path"},descriptionPath:{$ref:"#/$defs/Path"},avatarPath:{$ref:"#/$defs/Path",description:"Initials or a media reference per option: renders people and places with a face"},imagePath:{$ref:"#/$defs/Path"},recentPath:{$ref:"#/$defs/Path",description:"Boolean per option: shown in a 'Recent' row above the full list"}},additionalProperties:!1}],description:"Either a fixed list, or options read from host data"},ComponentAction:{type:"object",description:"A button that triggers a host capability.",required:["id","component","label","action"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Action"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"Verb-first label saying what happens ('Send \xA320', not 'OK')"},action:{$ref:"#/$defs/Action"},emphasis:{enum:["primary","secondary","tertiary"],default:"secondary"},tone:{enum:["default","danger"],default:"default"},disabled:{$ref:"#/$defs/DynamicBoolean"},description:{$ref:"#/$defs/DynamicString",description:"A second line under the label saying what the action does, for menu-like actions"},copy:{$ref:"#/$defs/DynamicString",description:"For the renderer action ui.copy: the text put on the clipboard; otherwise the action context's 'text' is copied"},shortcut:{type:"string",pattern:"^((mod|ctrl|alt|shift)\\+){0,3}([a-z0-9]|enter|escape|space|tab|backspace|delete|arrowup|arrowdown|arrowleft|arrowright|home|end|f[1-9]|f1[0-2]|slash|comma|period)$",description:`Keyboard shortcut that triggers the action while the surface has focus, e.g. "mod+enter" or "shift+d". 'mod' is Command on Apple platforms and Control elsewhere. The renderer shows the hint beside the label and never binds it outside the surface.`}},additionalProperties:!1},ComponentActionBar:{type:"object",description:"The set of actions for a surface or section; the renderer places it where that platform expects.",required:["id","component","children"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"ActionBar"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},children:{$ref:"#/$defs/ChildList",description:"Action component ids, in order of importance"}},additionalProperties:!1},ComponentActionMenu:{type:"object",description:"Secondary actions behind one control: an overflow menu, a dropdown, a split button or a context menu.",required:["id","component","label","children"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"ActionMenu"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"The control's name: 'More actions' for an overflow, or the verb for a dropdown ('Export')"},kind:{enum:["overflow","dropdown","split","context"],default:"overflow",description:"'overflow' is the '\u2026' control; 'dropdown' is a labelled button that opens the menu; 'split' pairs a primary action with a menu of alternatives; 'context' opens on right-click or long-press of the component it belongs to"},children:{$ref:"#/$defs/ChildList",description:"The Actions in the menu, in order; a danger-toned one goes last and is separated"},primary:{$ref:"#/$defs/Id",description:"For 'split': the Action that runs when the main part is pressed"}},additionalProperties:!1},ComponentAppBar:{type:"object",description:"The bar at the top of the product: brand or title, a leading action, search, trailing actions and the account.",required:["id","component","title"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"AppBar"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},title:{$ref:"#/$defs/DynamicString",description:"The product's name, or the current screen's title on compact layouts"},brand:{$ref:"#/$defs/DynamicString",description:"A media reference for the logo, or initials; rendered before the title"},leading:{$ref:"#/$defs/Id",description:"An Action at the start: back, or the menu button the renderer adds itself when the navigation is a drawer"},search:{$ref:"#/$defs/Id",description:"A TextInput of kind 'search' (or a command palette opener: an Action with a shortcut)"},actions:{$ref:"#/$defs/Id",description:"An ActionBar at the end: notifications, help, the primary action of the product"},account:{$ref:"#/$defs/Id",description:"An Identity (the signed-in person) or an ActionMenu opened from it"},variant:{enum:["standard","large","compact"],default:"standard",description:"'large' puts the title under the bar on its own line on wide screens; 'compact' is 48px for dense tools"},sticky:{type:"boolean",default:!0}},additionalProperties:!1},ComponentCard:{type:"object",description:"One self-contained entity (an account, an order, a place), optionally actionable as a whole.",required:["id","component","title"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Card"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},title:{$ref:"#/$defs/DynamicString",description:"Name of the entity"},subtitle:{$ref:"#/$defs/DynamicString"},media:{$ref:"#/$defs/Id",description:"Optional Media component id"},badge:{type:"object",required:["text"],properties:{text:{$ref:"#/$defs/DynamicString"},tone:{$ref:"#/$defs/Tone"}},additionalProperties:!1},children:{$ref:"#/$defs/ChildList"},action:{$ref:"#/$defs/Action",description:"Activating the card as a whole (e.g. open details)"},progress:{type:"object",required:["value"],properties:{value:{$ref:"#/$defs/Binding",description:"Number from 0 to 1 in host data"},label:{$ref:"#/$defs/DynamicString",description:"Optional text, e.g. '120 of 320 pages'; the percentage is shown otherwise"}},additionalProperties:!1,description:"Progress through the entity (reading, a course, a goal)"}},additionalProperties:!1},ComponentChart:{type:"object",description:"A visual summary of data, always paired with a text summary.",required:["id","component","intent","data","title","summary","x","series"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Chart"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},intent:{enum:["trend","comparison","composition","distribution","relationship","flow","hierarchy","matrix","range"],description:"What the chart should communicate; the renderer picks the chart type. 'relationship' between two measures; 'flow' of amounts from each x value into the series; 'hierarchy' of parts by size; 'matrix' of x values against series; 'range' from the first series to the second"},data:{$ref:"#/$defs/Binding",description:"Array of data points in host data"},title:{$ref:"#/$defs/DynamicString"},summary:{$ref:"#/$defs/DynamicString",description:"Text alternative stating the takeaway (required)"},x:{type:"object",required:["path","label"],properties:{path:{$ref:"#/$defs/Path"},label:{$ref:"#/$defs/DynamicString"},format:{$ref:"#/$defs/Format"}},additionalProperties:!1},series:{type:"array",minItems:1,maxItems:6,items:{type:"object",required:["path","label"],properties:{key:{$ref:"#/$defs/Key"},path:{$ref:"#/$defs/Path"},label:{$ref:"#/$defs/DynamicString"},format:{$ref:"#/$defs/Format"}},additionalProperties:!1}}},additionalProperties:!1},ComponentChoice:{type:"object",description:"Pick one or several options from a known set. The renderer chooses the control.",required:["id","component","label","options","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Choice"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},options:{$ref:"#/$defs/Options"},value:{$ref:"#/$defs/Binding",description:"Two-way binding into host data"},mode:{enum:["single","multiple"],default:"single"},help:{$ref:"#/$defs/DynamicString"},required:{type:"boolean",default:!1}},additionalProperties:!1},ComponentCode:{type:"object",description:"Code, a command or preformatted text, shown as written and copyable.",required:["id","component","text"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Code"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},text:{$ref:"#/$defs/DynamicString",description:"The code itself, usually bound to host data (an API key, a command, a snippet)"},label:{$ref:"#/$defs/DynamicString",description:"What it is, shown above: 'Install', 'Your API key'"},language:{type:"string",description:"A language name for highlighting, when the renderer has it: 'bash', 'json', 'ts'"},copyable:{type:"boolean",default:!0,description:"A Copy control beside it"},wrap:{type:"boolean",default:!1,description:"Wrap long lines instead of scrolling sideways"},secret:{$ref:"#/$defs/DynamicBoolean",default:!1,description:"Masked until revealed: a key shown once"}},additionalProperties:!1},ComponentCodeInput:{type:"object",description:"A one-time code or PIN, typed into one box per character.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"CodeInput"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"'Enter the code we emailed you'"},value:{$ref:"#/$defs/Binding",description:"The code so far in host data, as a string"},length:{type:"integer",minimum:4,maximum:12,default:6},kind:{enum:["numeric","alphanumeric"],default:"numeric"},help:{$ref:"#/$defs/DynamicString",description:"Where the code came from and how long it lasts"},required:{$ref:"#/$defs/DynamicBoolean",default:!0},action:{$ref:"#/$defs/Action",description:"Runs when every character is in, so the person needn't press a button; context binds to value"}},additionalProperties:!1},ComponentCollection:{type:"object",description:"A list of items from host data, each rendered with the same template.",required:["id","component","items","label"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Collection"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},items:{$ref:"#/$defs/Template"},label:{$ref:"#/$defs/DynamicString",description:"What the list contains, e.g. 'Recent payments'"},empty:{$ref:"#/$defs/Id",description:"Status component shown when there are no items"},selection:{enum:["none","single","multiple"],default:"none"},selected:{$ref:"#/$defs/Binding",description:"Selected item value(s) in host data when selection is not 'none'"},layout:{enum:["auto","list","grid","timeline","carousel","calendar"],default:"auto",description:"'grid' for visual items (products, books); 'list' for rows; 'timeline' for dated activity; 'carousel' for a row people page through; 'calendar' places items on a month grid by 'datePath'; 'auto' lets the renderer choose from the item template"},datePath:{$ref:"#/$defs/Path",description:"For 'calendar': relative path in each item to the ISO date that places it"},page:{type:"object",properties:{index:{$ref:"#/$defs/Binding",description:"1-based page number in host data"},size:{$ref:"#/$defs/Binding"},total:{$ref:"#/$defs/Binding",description:"Total number of items, all pages"},action:{$ref:"#/$defs/Action",description:"Sent when someone changes page or page size"}},additionalProperties:!1,description:"Paging state, owned by the host"},bulkActions:{$ref:"#/$defs/Id",description:"ActionBar shown while items are selected (selection 'multiple')"},reorderable:{type:"boolean",default:!1,description:"People can drag items, or move them with the keyboard, into a new order"},order:{$ref:"#/$defs/Binding",description:"Item values (ids) in the order people put them, written when reorderable"}},additionalProperties:!1},ComponentColorInput:{type:"object",description:"Pick a colour: from swatches the host offers, or any colour.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"ColorInput"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/Binding",description:"The colour in host data, as CSS text in the chosen format"},swatches:{$ref:"#/$defs/Options",description:"Named colours to pick from (value is the colour, label its name); without them the full picker shows"},format:{enum:["hex","rgb","hsl"],default:"hex"},alpha:{type:"boolean",default:!1,description:"Let the person set opacity too"},help:{$ref:"#/$defs/DynamicString"},required:{$ref:"#/$defs/DynamicBoolean",default:!1}},additionalProperties:!1},ComponentColumns:{type:"object",description:"Side-by-side columns that collapse to a stack on compact layouts: a main column with a narrower one beside it, or equal halves.",required:["id","component","children"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Columns"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},children:{$ref:"#/$defs/ChildList",description:"One component per column, in reading order"},layout:{enum:["two-thirds","one-third","halves","thirds","sidebar-start","sidebar-end"],default:"two-thirds",description:"'two-thirds' is a wide first column (GOV.UK's default); 'one-third' the reverse; 'halves' and 'thirds' equal; 'sidebar-*' a fixed 18rem column at that edge"},collapse:{enum:["compact","medium","never"],default:"compact",description:"The width below which the columns stack"},align:{enum:["start","center","stretch"],default:"stretch"}},additionalProperties:!1},ComponentComparison:{type:"object",description:"Compare a few options across the same attributes, and choose one.",required:["id","component","items","itemTitle","attributes"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Comparison"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},items:{$ref:"#/$defs/Binding",description:"Array of options in host data (2\u20134 recommended)"},itemTitle:{$ref:"#/$defs/Path",description:"Relative path to each item's name"},attributes:{type:"array",minItems:1,maxItems:8,items:{type:"object",required:["key","label","path"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},path:{$ref:"#/$defs/Path"},format:{$ref:"#/$defs/Format"},better:{enum:["higher","lower","none"],default:"none"},group:{$ref:"#/$defs/DynamicString",description:"Heading that groups related attributes (e.g. 'Storage', 'Support')"}},additionalProperties:!1}},choose:{$ref:"#/$defs/ActionSpec",description:"Action per item; context bindings resolve against the item"},recommended:{$ref:"#/$defs/DynamicString",description:"Optional value of the recommended item's title, with a reason in 'summary'"},summary:{$ref:"#/$defs/DynamicString"},recommendedReason:{$ref:"#/$defs/DynamicString",description:"Why the recommended item fits, shown on its badge (one short sentence)"}},additionalProperties:!1},ComponentConfirm:{type:"object",description:"Asks the user to confirm a consequential or destructive action, showing what will happen.",required:["id","component","title","severity","confirm"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Confirm"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},title:{$ref:"#/$defs/DynamicString",description:"Question naming the action ('Send \xA3250 to Alex?')"},message:{$ref:"#/$defs/DynamicString"},consequence:{$ref:"#/$defs/DynamicString",description:"What happens and whether it can be undone"},summary:{$ref:"#/$defs/Id",description:"Optional DetailList summarising what is being confirmed"},severity:{enum:["consequential","destructive"]},confirm:{$ref:"#/$defs/ActionSpec"},cancel:{$ref:"#/$defs/ActionSpec",description:"Defaults to 'Cancel' \u2192 ui.dismiss"},typeToConfirm:{$ref:"#/$defs/DynamicString",description:"Text the user must type before confirming (for irreversible, high-impact actions)"},amount:{type:"object",required:["value"],properties:{value:{$ref:"#/$defs/Binding"},format:{$ref:"#/$defs/Format"}},additionalProperties:!1,description:"The amount being committed, shown large at the top"},subject:{type:"object",required:["title"],properties:{title:{$ref:"#/$defs/DynamicString"},subtitle:{$ref:"#/$defs/DynamicString"},avatar:{$ref:"#/$defs/DynamicString",description:"Initials, or a media reference in host data"}},additionalProperties:!1,description:"Who or what the action is for, shown with a face or picture"},consequences:{type:"array",minItems:1,maxItems:6,items:{type:"object",required:["title"],properties:{title:{$ref:"#/$defs/DynamicString"},detail:{$ref:"#/$defs/DynamicString"},icon:{enum:["lock","trash","clock","tag","info","alert","mail","shield"]}},additionalProperties:!1},description:"What will happen, as a short list (for destructive actions)"}},additionalProperties:!1},ComponentCustom:{type:"object",description:"A slot for a component the host implements itself: a logo, a brand moment, a bespoke widget. The document names it and gives it props; the product renders it, and a fallback stands in when it can't.",required:["id","component","name","fallback"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Custom"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},name:{type:"string",pattern:"^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)+$",description:"The host's name for the component, namespaced: 'brand.logo', 'store.map'"},props:{type:"object",description:"What the host component takes; values may be bindings",additionalProperties:!0},fallback:{$ref:"#/$defs/Id",description:"What renders when the host has no component of that name: a Text, a Media, a Status. Required, so the document stands on its own"},label:{$ref:"#/$defs/DynamicString",description:"An accessible name for the slot when the host component is decorative or complex"}},additionalProperties:!1},ComponentDateInput:{type:"object",description:"A date, time, date-time or date range.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"DateInput"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/Binding",description:"ISO 8601 value(s) in host data"},kind:{enum:["date","time","datetime","dateRange","month","year"],default:"date",description:"'month' stores YYYY-MM and 'year' stores YYYY"},multiple:{type:"boolean",default:!1,description:"Several dates rather than one; the value is a list"},min:{$ref:"#/$defs/DynamicString"},max:{$ref:"#/$defs/DynamicString"},help:{$ref:"#/$defs/DynamicString"},required:{type:"boolean",default:!1}},additionalProperties:!1},ComponentDetailList:{type:"object",description:"Label/value pairs describing one thing (a summary, a receipt, a review step).",required:["id","component","items"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"DetailList"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},items:{type:"array",minItems:1,items:{type:"object",required:["label","value"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/DynamicValue"},format:{$ref:"#/$defs/Format"},total:{type:"boolean",description:"The total row of a receipt, shown emphasised after a divider"}},additionalProperties:!1}},title:{$ref:"#/$defs/DynamicString"},variant:{enum:["default","receipt"],default:"default",description:"'receipt' for money: values right-aligned in tabular figures, with an optional total row"},layout:{enum:["rows","grid"],default:"rows",description:"'grid' packs many short fields into columns (record pages); 'rows' keeps one per line"},rowAction:{$ref:"#/$defs/Action",description:"Offered per row as a 'Change' link named after the row (GOV.UK summary list); the row's key is sent as 'key' with the context"}},additionalProperties:!1},ComponentDisclosure:{type:"object",description:"Progressive disclosure: secondary content hidden behind a toggle.",required:["id","component","summary","children"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Disclosure"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},summary:{$ref:"#/$defs/DynamicString",description:"Always-visible label describing what is hidden"},children:{$ref:"#/$defs/ChildList"},open:{type:"boolean",default:!1}},additionalProperties:!1},ComponentFileInput:{type:"object",description:"Choose or drop files to attach or upload.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"FileInput"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/Binding",description:"The chosen files in host data: a list of { name, size, type, ref }, written by the renderer; the host uploads them"},accept:{type:"array",items:{type:"string"},description:"Allowed types as extensions or MIME types: ['.pdf', 'image/*']"},multiple:{type:"boolean",default:!1},maxSize:{type:"integer",minimum:1,description:"Largest file, in bytes; the renderer refuses larger ones with a message"},help:{$ref:"#/$defs/DynamicString",description:"What to attach and why; the accepted types and size are said by the renderer"},required:{$ref:"#/$defs/DynamicBoolean",default:!1}},additionalProperties:!1},ComponentFilterPanel:{type:"object",description:"Filters for a list of results, with the result count.",required:["id","component","children","results"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"FilterPanel"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"Defaults to 'Filters'"},children:{$ref:"#/$defs/ChildList",description:"The filter inputs (Choice, RangeInput, Toggle, DateInput, TextInput)"},results:{$ref:"#/$defs/Id",description:"The Collection or Table the filters narrow"},resultCount:{$ref:"#/$defs/Binding",description:"Number of results with the current filters, from host data"},clear:{$ref:"#/$defs/Action",description:"Optional action that resets the filters on the host"}},additionalProperties:!1},ComponentFooter:{type:"object",description:"The bar at the bottom of the product: link groups, the legal line, locale or status.",required:["id","component","legal"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Footer"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},groups:{type:"array",minItems:1,maxItems:6,items:{type:"object",required:["key","label","items"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},items:{type:"array",minItems:1,maxItems:12,items:{type:"object",required:["key","label","action"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},action:{$ref:"#/$defs/Action"}},additionalProperties:!1}}},additionalProperties:!1},description:"Columns of links, each under a heading"},legal:{$ref:"#/$defs/DynamicString",description:"The line at the very bottom: copyright, licence, company details"},aside:{$ref:"#/$defs/Id",description:"Something at the end of the legal row: a locale Choice, a status Tag, a Text"}},additionalProperties:!1},ComponentForm:{type:"object",description:"Collects inputs and submits them together.",required:["id","component","children","submit"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Form"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},children:{$ref:"#/$defs/ChildList"},submit:{$ref:"#/$defs/ActionSpec"},cancel:{$ref:"#/$defs/ActionSpec",description:"Optional; defaults to ui.dismiss when omitted and the surface is dismissible"},aside:{$ref:"#/$defs/Id",description:"Optional summary (DetailList, Card or Group) kept beside the form, e.g. the running total"},layout:{enum:["stacked","horizontal"],default:"stacked",description:"'horizontal' puts label and help on the left and the control on the right (settings pages), on wide surfaces"}},additionalProperties:!1},ComponentFrame:{type:"object",description:"The product's frame: the regions around its screens (header, navigation, main, aside, footer, banner), with an outlet where screens and generated surfaces appear.",required:["id","component","main"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Frame"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},header:{$ref:"#/$defs/Id",description:"An AppBar"},navigation:{$ref:"#/$defs/Id",description:"A Navigation of kind 'main'; its placement decides rail, bar, drawer or side"},main:{$ref:"#/$defs/Id",description:"The outlet: a component the host replaces with the current screen. Usually an Outlet; may be a Group holding a fixed screen"},aside:{$ref:"#/$defs/Id",description:"A secondary column beside main on wide layouts (help, context, activity)"},footer:{$ref:"#/$defs/Id",description:"A Footer"},banner:{$ref:"#/$defs/Id",description:"A Status shown above everything (a phase banner, an outage, a trial ending)"},skipTarget:{type:"boolean",default:!0,description:"The renderer adds a skip link to main"},width:{enum:["full","contained"],default:"contained",description:"'contained' centres main at measure.max \xD7 1.6; 'full' lets dense tools use the whole viewport"}},additionalProperties:!1},ComponentGroup:{type:"object",description:"Visually groups closely related items without a heading (proximity).",required:["id","component","children"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Group"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},children:{$ref:"#/$defs/ChildList"},label:{$ref:"#/$defs/DynamicString",description:"Accessible name for the group when it isn't obvious from its content"},arrangement:{enum:["auto","inline","grid"],default:"auto",description:"Hint only. 'inline' for a few short peers (e.g. metrics); renderers stack on narrow screens."}},additionalProperties:!1},ComponentIdentity:{type:"object",description:"A person, team or organisation: picture, name and details, or several of them together.",required:["id","component","name"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Identity"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},name:{$ref:"#/$defs/DynamicString",description:"Always bound to host data: a name is never invented"},detail:{$ref:"#/$defs/DynamicString",description:"One line under the name: a role, an email, a team, a status"},image:{$ref:"#/$defs/DynamicString",description:"A media reference from host data, resolved by the host as Media's is; initials from the name are shown without one"},kind:{enum:["person","team","organization"],default:"person",description:"A person's picture is round; a team's or organisation's is square"},size:{enum:["small","default","large"],default:"default"},action:{$ref:"#/$defs/Action",description:"Activating the identity as a whole, e.g. open the person's record"},group:{type:"object",required:["path","namePath"],properties:{path:{$ref:"#/$defs/Path",description:"A list of people in host data, shown as overlapping pictures with a '+N' for the rest"},namePath:{$ref:"#/$defs/Path",description:"Relative to each entry"},imagePath:{$ref:"#/$defs/Path",description:"Relative to each entry"},max:{type:"integer",minimum:1,maximum:8,default:4,description:"Pictures shown before '+N'"}},additionalProperties:!1,description:"Several identities as one element ('Rhea, Tom and 3 others'). name is then the group's accessible summary"}},additionalProperties:!1},ComponentMedia:{type:"object",description:"An image, video, audio clip, gallery or QR code supplied by the host.",required:["id","component"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Media"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},src:{$ref:"#/$defs/Binding",description:"Image, video or audio reference in host data; generated UI never contains URLs"},alt:{$ref:"#/$defs/DynamicString",description:"Required unless decorative. For a gallery it names the set; for a QR code it says what the code opens"},decorative:{type:"boolean",default:!1},aspect:{enum:["square","landscape","portrait","auto"],default:"auto"},kind:{enum:["image","video","audio","gallery","qr"],default:"image",description:"'video' and 'audio' play with native controls; 'gallery' is several images from 'items'; 'qr' encodes 'value' as a QR code"},poster:{$ref:"#/$defs/DynamicString",description:"For 'video': media reference for the frame shown before play"},transcript:{$ref:"#/$defs/DynamicString",description:"For 'video' and 'audio': the words, offered under the player"},items:{$ref:"#/$defs/Binding",description:"For 'gallery': array of images in host data"},imagePath:{$ref:"#/$defs/Path",description:"For 'gallery': relative path in each item to its image reference"},altPath:{$ref:"#/$defs/Path",description:"For 'gallery': relative path in each item to its alt text"},value:{$ref:"#/$defs/DynamicString",description:"For 'qr': the text encoded, e.g. a payment link from host data"}},additionalProperties:!1},ComponentMetric:{type:"object",description:"A key figure with a label, and optionally its change.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Metric"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/Binding",description:"Always bound to host data"},format:{$ref:"#/$defs/Format"},change:{type:"object",required:["value"],properties:{value:{$ref:"#/$defs/Binding"},format:{$ref:"#/$defs/Format"},favorable:{enum:["increase","decrease","none"],default:"increase",description:"Which direction is good, so color follows meaning, not sign"}},additionalProperties:!1},caption:{$ref:"#/$defs/DynamicString"}},additionalProperties:!1},ComponentNavigation:{type:"object",description:"The product's main navigation.",required:["id","component","items","current"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Navigation"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"Names the navigation, e.g. 'Main'"},items:{type:"array",minItems:2,maxItems:20,items:{type:"object",required:["key","label","action"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},group:{$ref:"#/$defs/DynamicString",description:"Heading that groups items (e.g. 'Billing')"},icon:{enum:["home","search","inbox","book","tag","clock","shield","lock","mail","settings","chart","people","card","file","orders","products","customers","discounts","analytics","calendar","bell","help","folder","star","grid","layers"]},badge:{$ref:"#/$defs/Binding",description:"Count needing attention, e.g. overdue invoices"},action:{$ref:"#/$defs/Action"}},additionalProperties:!1}},current:{$ref:"#/$defs/Binding",description:"Key of the current item in host data"},kind:{enum:["main","breadcrumb","nested","toc","local"],default:"main",description:"'main' is the product's sections; 'breadcrumb' the ordered trail to here; 'nested' groups that expand; 'toc' the sections of this page (items link to anchors named by their keys); 'local' the sections of one area, as tabs"},placement:{enum:["auto","side","rail","bar","drawer"],default:"auto",description:"For kind 'main' inside a Frame: where it lives. 'auto' is a side column on wide layouts, a rail on medium and a bottom bar (\u2264 5 items) or a drawer on compact; the others fix it"}},additionalProperties:!1},ComponentOutlet:{type:"object",description:"Where the current screen renders inside a Frame: the host fills it with a screen document or a generated surface.",required:["id","component"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Outlet"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"Names the region for assistive tech when the screen has no title yet"},loading:{$ref:"#/$defs/Id",description:"What shows while a screen is on its way; the renderer's skeleton when absent"}},additionalProperties:!1},ComponentPanel:{type:"object",description:"Content over the current view: a dialog, a drawer, a bottom sheet or a popover, opened from an action and dismissed to return.",required:["id","component","title","children"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Panel"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},kind:{enum:["dialog","drawer","sheet","popover"],default:"dialog",description:"'dialog' centres and blocks; 'drawer' slides from the side for a form or a record; 'sheet' rises from the bottom on phones; 'popover' floats by its opener for a small choice"},title:{$ref:"#/$defs/DynamicString"},children:{$ref:"#/$defs/ChildList",description:"What the panel holds"},actions:{$ref:"#/$defs/Id",description:"An ActionBar in the panel's footer: its primary action and a Cancel"},open:{$ref:"#/$defs/DynamicBoolean",description:"Bound to host data: true shows the panel; the renderer writes false on dismiss. Open when absent"},dismissible:{type:"boolean",default:!0,description:"Escape, the close control and the backdrop dismiss it; false for a panel that must be completed"},size:{enum:["small","default","large"],default:"default"}},additionalProperties:!1},ComponentProgress:{type:"object",description:"How far along something is, or how much of a bounded amount is used: a bar, a ring or a meter.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Progress"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"What is being measured: 'Storage used', 'Upload', 'Goal'"},value:{$ref:"#/$defs/DynamicNumber",description:"Bound to host data. A fraction from 0 to 1, or an amount when max is given"},max:{$ref:"#/$defs/DynamicNumber",description:"The whole, when value is an amount rather than a fraction: 200 for '180 of 200 GB'"},kind:{enum:["bar","ring","meter"],default:"bar",description:"'bar' and 'ring' show progress towards done; 'meter' shows a measured amount within bounds, with tone by threshold"},caption:{$ref:"#/$defs/DynamicString",description:"Text beside the readout: '180 of 200 GB', '3 days left'. The readout itself is derived from value"},format:{$ref:"#/$defs/Format",description:"How the readout is shown; percent without it"},tone:{$ref:"#/$defs/Tone",description:"Fixed tone; a meter without one takes warning past thresholds.warning and danger past thresholds.danger"},thresholds:{type:"object",properties:{warning:{type:"number",minimum:0,maximum:1},danger:{type:"number",minimum:0,maximum:1}},additionalProperties:!1,description:"Fractions at which a meter changes tone"},indeterminate:{$ref:"#/$defs/DynamicBoolean",description:"The task is running and how far along isn't known"}},additionalProperties:!1},ComponentRangeInput:{type:"object",description:"A number, or a range between two numbers, within known bounds.",required:["id","component","label","value","min","max"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"RangeInput"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/Binding",description:"Number in host data, or [min, max] when mode is 'range'"},min:{type:"number"},max:{type:"number"},step:{type:"number",exclusiveMinimum:0},format:{$ref:"#/$defs/Format"},mode:{enum:["single","range"],default:"single",description:"'range' picks a lower and upper bound; value is then [min, max]"}},additionalProperties:!1},ComponentRating:{type:"object",description:"A score out of N: given by the person, or shown as others gave it.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Rating"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"What is rated: 'Your rating', 'Average rating'"},value:{$ref:"#/$defs/Binding",description:"The score in host data; written when the person can rate"},max:{type:"integer",minimum:2,maximum:10,default:5},readOnly:{$ref:"#/$defs/DynamicBoolean",default:!1,description:"Show a score rather than take one"},count:{$ref:"#/$defs/DynamicNumber",description:"How many ratings the score is from, shown after it: '4.6 (212)'"},help:{$ref:"#/$defs/DynamicString"},required:{$ref:"#/$defs/DynamicBoolean",default:!1},action:{$ref:"#/$defs/Action",description:"Runs when a rating is given, with context bound to value"}},additionalProperties:!1},ComponentSection:{type:"object",description:"A titled region of the surface that groups related content under a heading.",required:["id","component","title","children"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Section"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},title:{$ref:"#/$defs/DynamicString",description:"Heading for the section"},description:{$ref:"#/$defs/DynamicString",description:"Optional one-line explanation under the heading"},children:{$ref:"#/$defs/ChildList"}},additionalProperties:!1},ComponentSplit:{type:"object",description:"Master and detail side by side: a list that stays while the chosen item's detail shows beside it; on compact layouts the detail replaces the list.",required:["id","component","primary","detail","selected"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Split"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},primary:{$ref:"#/$defs/Id",description:"The list: a Collection or a Table with selection 'single'"},detail:{$ref:"#/$defs/Id",description:"What shows for the selected item; its bindings resolve against the selected item's scope"},selected:{$ref:"#/$defs/Binding",description:"The selected item's value in host data, shared with the primary's 'selected'"},empty:{$ref:"#/$defs/Id",description:"A Status shown in the detail pane while nothing is selected"},ratio:{enum:["narrow","balanced","wide"],default:"narrow",description:"The list's share: about a third, half, or two thirds"},resizable:{type:"boolean",default:!1}},additionalProperties:!1},ComponentStatus:{type:"object",description:"Feedback about state: info, success, warning, error, empty or loading.",required:["id","component","kind","title"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Status"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},kind:{enum:["info","success","warning","error","empty","loading","undo"]},title:{$ref:"#/$defs/DynamicString"},message:{$ref:"#/$defs/DynamicString"},action:{$ref:"#/$defs/Id",description:"Optional Action (or ActionBar for a primary and a secondary) to recover or continue, e.g. 'Try again'; for 'undo', the Undo action"},icon:{enum:["lock","trash","clock","tag","info","alert","mail","shield","search","book","inbox","check"],description:"Optional icon for empty states; the renderer picks one by kind otherwise"},variant:{enum:["default","inline"],default:"default",description:"'inline' is a notice inside a page (a warning above a record) rather than a block of its own"}},additionalProperties:!1},ComponentSteps:{type:"object",description:"A task split into ordered steps with visible progress.",required:["id","component","steps","finish"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Steps"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},steps:{type:"array",minItems:2,maxItems:7,items:{type:"object",required:["key","title","content"],properties:{key:{$ref:"#/$defs/Key"},title:{$ref:"#/$defs/DynamicString"},content:{$ref:"#/$defs/Id"},status:{$ref:"#/$defs/DynamicString",description:"For 'tasklist': 'todo', 'inProgress', 'done' or 'blocked', usually bound to host data"}},additionalProperties:!1}},kind:{enum:["wizard","tasklist","guide"],default:"wizard",description:"'wizard' shows one step at a time in order; 'tasklist' lists tasks people do in any order, each with its status; 'guide' is numbered instructions with no state"},current:{$ref:"#/$defs/DynamicNumber",description:"Index of the current step (default 0)"},finish:{$ref:"#/$defs/ActionSpec"}},additionalProperties:!1},ComponentTable:{type:"object",description:"Tabular data: many items sharing the same attributes.",required:["id","component","rows","caption","columns"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Table"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},rows:{$ref:"#/$defs/Binding",description:"Array of row objects in host data"},caption:{$ref:"#/$defs/DynamicString",description:"What the table shows (required for accessibility)"},columns:{type:"array",minItems:1,maxItems:8,items:{type:"object",required:["key","label","path"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},path:{$ref:"#/$defs/Path",description:"Relative to the row"},format:{$ref:"#/$defs/Format"},kind:{enum:["text","number","currency","date","status","entity","link"],default:"text",description:"What the cell holds; drives alignment, tabular figures and status tags"},align:{enum:["start","end"],description:"Overrides the alignment the kind implies"},tones:{type:"object",additionalProperties:{$ref:"#/$defs/Tone"},description:`For 'status': value \u2192 tone, e.g. {"Past due": "danger"}`},sortable:{type:"boolean",description:"Whether people can sort by this column"},avatarPath:{$ref:"#/$defs/Path",description:"For 'entity': relative path to the picture or initials"},secondaryPath:{$ref:"#/$defs/Path",description:"For 'entity': a second line, e.g. an email address"}},additionalProperties:!1}},rowAction:{$ref:"#/$defs/Action",description:"Activated per row; context bindings resolve against the row"},empty:{$ref:"#/$defs/Id",description:"Status component shown when there are no rows"},sort:{type:"object",required:["column"],properties:{column:{$ref:"#/$defs/Binding",description:"Key of the sorted column in host data"},direction:{$ref:"#/$defs/Binding",description:"'ascending' or 'descending' in host data"},action:{$ref:"#/$defs/Action",description:"Sent when someone sorts, so the host can re-query"}},additionalProperties:!1,description:"Sorting state, owned by the host"},selection:{enum:["none","multiple"],default:"none",description:"'multiple' adds a checkbox column and a select-all"},selected:{$ref:"#/$defs/Binding",description:"Array of selected row values in host data"},rowValuePath:{$ref:"#/$defs/Path",description:"Relative path to each row's id, used for selection"},bulkActions:{$ref:"#/$defs/Id",description:"ActionBar shown instead of the toolbar while rows are selected"},rowActions:{$ref:"#/$defs/Id",description:"ActionBar offered per row, in a menu named after the row"},expandable:{type:"boolean",default:!1,description:"Rows open to show 'detail' beneath them"},detail:{$ref:"#/$defs/Id",description:"Component rendered under an expanded row; relative paths inside it resolve against the row"},toolbar:{$ref:"#/$defs/Id",description:"ActionBar above the table (e.g. New, Import, Export)"},search:{$ref:"#/$defs/Id",description:"TextInput (kind 'search') above the table"},views:{type:"array",minItems:2,maxItems:8,items:{type:"object",required:["key","label"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},count:{$ref:"#/$defs/Binding"},action:{$ref:"#/$defs/Action"}},additionalProperties:!1},description:"Saved views (All, Mine, Past due\u2026), shown as tabs with counts"},view:{$ref:"#/$defs/Binding",description:"Key of the selected saved view in host data"},page:{type:"object",properties:{index:{$ref:"#/$defs/Binding",description:"1-based page number in host data"},size:{$ref:"#/$defs/Binding"},total:{$ref:"#/$defs/Binding",description:"Total number of rows, all pages"},action:{$ref:"#/$defs/Action",description:"Sent when someone changes page or page size"}},additionalProperties:!1,description:"Paging state, owned by the host"}},additionalProperties:!1},ComponentTag:{type:"object",description:"A short label, status or count attached to something else.",required:["id","component","label"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Tag"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"The word or two it shows: 'Past due', 'Beta', 'Design'"},kind:{enum:["label","status","count"],default:"label",description:"'status' is the state of the thing it sits on and is coloured by tone; 'count' is a number, with the label as its accessible name"},tone:{$ref:"#/$defs/Tone",default:"neutral",description:"Meaning, not decoration: a status tag's tone says whether the state is fine, a warning or a problem"},count:{$ref:"#/$defs/DynamicNumber",description:"For kind 'count': the number, bound to host data"},remove:{$ref:"#/$defs/Action",description:"Present when the person can take the tag off (a filter chip, a chosen recipient): the capability that removes it"}},additionalProperties:!1},ComponentText:{type:"object",description:"A run of text.",required:["id","component","text"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Text"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},text:{$ref:"#/$defs/DynamicString"},variant:{enum:["body","supporting","caption","rich","list","quote"],default:"body",description:"'rich' allows **bold**, *italic*, `code` and [links](href) in the text; 'list' is a bulleted or numbered list of 'items'; 'quote' is a quotation with an optional 'cite'"},format:{$ref:"#/$defs/Format",description:"Only when 'text' is bound to a non-string value"},items:{$ref:"#/$defs/Binding",description:"For 'list': array in host data, one entry per item; 'text' introduces the list"},itemPath:{$ref:"#/$defs/Path",description:"For 'list': relative path in each entry to the text shown, when the entries are objects"},ordered:{type:"boolean",default:!1,description:"For 'list': numbered rather than bulleted"},cite:{$ref:"#/$defs/DynamicString",description:"For 'quote': who or what is quoted"}},additionalProperties:!1},ComponentTextInput:{type:"object",description:"A single text-like value: text, number, email, phone, currency, search or long text.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"TextInput"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/Binding",description:"Two-way binding into host data"},kind:{enum:["text","multiline","number","currency","email","phone","url","search","suggestions","richtext","tags","mentions","code","masked","inline"],default:"text",description:"'suggestions' offers completions from 'options' while leaving any text allowed; 'richtext' is short formatted text (bold, italic, lists) stored as markdown-ish text; 'tags' is a list of short values entered one at a time; 'mentions' offers 'options' after an @; 'code' is monospace with no autocorrection; 'masked' follows 'mask'; 'inline' reads as text until it is clicked"},options:{$ref:"#/$defs/Options",description:"For 'suggestions' and 'mentions': the completions offered"},mask:{type:"string",description:"For 'masked': # for a digit, A for a letter, * for either, anything else typed for you, e.g. '#### #### #### ####'"},currency:{$ref:"#/$defs/DynamicString",description:"ISO 4217 code when kind is 'currency'"},help:{$ref:"#/$defs/DynamicString",description:"Hint shown below the label (not a placeholder)"},required:{type:"boolean",default:!1},validation:{type:"object",properties:{min:{type:"number"},max:{type:"number"},minLength:{type:"integer",minimum:0},maxLength:{type:"integer",minimum:1},message:{$ref:"#/$defs/DynamicString",description:"Error message shown when validation fails"}},additionalProperties:!1},autocomplete:{type:"string",description:"HTML autocomplete token hint (e.g. 'email', 'postal-code')"},placeholder:{$ref:"#/$defs/DynamicString",description:"Only for kind 'search', shown inside the field. Never a substitute for the label."},size:{enum:["default","hero"],default:"default",description:"'hero' for the one number a surface is about (an amount to send): large and centred"}},additionalProperties:!1},ComponentToggle:{type:"object",description:"An on/off setting.",required:["id","component","label","value"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Toggle"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString"},value:{$ref:"#/$defs/Binding",description:"Boolean in host data"},description:{$ref:"#/$defs/DynamicString"},action:{$ref:"#/$defs/Action",description:"Set when the change applies immediately (a setting); omit inside a Form"}},additionalProperties:!1},ComponentTree:{type:"object",description:"A hierarchy people expand, browse and pick from: folders, an org chart, nested categories.",required:["id","component","label","items","labelPath","childrenPath"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Tree"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},label:{$ref:"#/$defs/DynamicString",description:"What the tree holds, e.g. 'Folders'"},items:{$ref:"#/$defs/Binding",description:"The top-level nodes in host data: a list"},labelPath:{$ref:"#/$defs/Path",description:"Relative to each node: the text shown"},childrenPath:{$ref:"#/$defs/Path",description:"Relative to each node: its list of child nodes, absent or empty for a leaf"},valuePath:{$ref:"#/$defs/Path",description:"Relative to each node: what selection writes; the label when absent"},detailPath:{$ref:"#/$defs/Path",description:"Relative to each node: a count or note shown after the label"},selection:{enum:["none","single","multiple"],default:"none"},selected:{$ref:"#/$defs/Binding",description:"Selected node value(s) in host data when selection is not 'none'"},expanded:{$ref:"#/$defs/Binding",description:"Values of the nodes shown open; the first level is open without it"},action:{$ref:"#/$defs/Action",description:"Activating a node, e.g. open that folder; context may bind to the node's fields"}},additionalProperties:!1},ComponentViews:{type:"object",description:"Switch between alternative views of the same subject (tabs).",required:["id","component","views"],properties:{id:{$ref:"#/$defs/Id"},component:{const:"Views"},key:{$ref:"#/$defs/Key"},accessibility:{$ref:"#/$defs/Accessibility"},visible:{$ref:"#/$defs/DynamicBoolean",description:"Hide the component when false"},views:{type:"array",minItems:2,maxItems:6,items:{type:"object",required:["key","label","content"],properties:{key:{$ref:"#/$defs/Key"},label:{$ref:"#/$defs/DynamicString"},content:{$ref:"#/$defs/Id"},count:{$ref:"#/$defs/Binding",description:"How many items the view holds, shown beside its label"}},additionalProperties:!1}},selected:{$ref:"#/$defs/Binding",description:"Key of the selected view in host data"},variant:{enum:["tabs","segmented"],default:"tabs",description:"'tabs' for sections of a record; 'segmented' for switching how the same thing is shown"}},additionalProperties:!1},Component:{type:"object",required:["component"],discriminator:{propertyName:"component"},oneOf:[{$ref:"#/$defs/ComponentAction"},{$ref:"#/$defs/ComponentActionBar"},{$ref:"#/$defs/ComponentActionMenu"},{$ref:"#/$defs/ComponentAppBar"},{$ref:"#/$defs/ComponentCard"},{$ref:"#/$defs/ComponentChart"},{$ref:"#/$defs/ComponentChoice"},{$ref:"#/$defs/ComponentCode"},{$ref:"#/$defs/ComponentCodeInput"},{$ref:"#/$defs/ComponentCollection"},{$ref:"#/$defs/ComponentColorInput"},{$ref:"#/$defs/ComponentColumns"},{$ref:"#/$defs/ComponentComparison"},{$ref:"#/$defs/ComponentConfirm"},{$ref:"#/$defs/ComponentCustom"},{$ref:"#/$defs/ComponentDateInput"},{$ref:"#/$defs/ComponentDetailList"},{$ref:"#/$defs/ComponentDisclosure"},{$ref:"#/$defs/ComponentFileInput"},{$ref:"#/$defs/ComponentFilterPanel"},{$ref:"#/$defs/ComponentFooter"},{$ref:"#/$defs/ComponentForm"},{$ref:"#/$defs/ComponentFrame"},{$ref:"#/$defs/ComponentGroup"},{$ref:"#/$defs/ComponentIdentity"},{$ref:"#/$defs/ComponentMedia"},{$ref:"#/$defs/ComponentMetric"},{$ref:"#/$defs/ComponentNavigation"},{$ref:"#/$defs/ComponentOutlet"},{$ref:"#/$defs/ComponentPanel"},{$ref:"#/$defs/ComponentProgress"},{$ref:"#/$defs/ComponentRangeInput"},{$ref:"#/$defs/ComponentRating"},{$ref:"#/$defs/ComponentSection"},{$ref:"#/$defs/ComponentSplit"},{$ref:"#/$defs/ComponentStatus"},{$ref:"#/$defs/ComponentSteps"},{$ref:"#/$defs/ComponentTable"},{$ref:"#/$defs/ComponentTag"},{$ref:"#/$defs/ComponentText"},{$ref:"#/$defs/ComponentTextInput"},{$ref:"#/$defs/ComponentToggle"},{$ref:"#/$defs/ComponentTree"},{$ref:"#/$defs/ComponentViews"}]}}},dx=["AppBar","Custom","Footer","Frame","Outlet"];var lr=sx,Q0=new fx.Ajv2020({allErrors:!0,discriminator:!0,strict:!1}),lx=Q0.compile(lr),ev={Table:["columns","rowAction","rowValuePath"],Tree:["labelPath","childrenPath","valuePath","detailPath","action"],Chart:["x","series"],Comparison:["itemTitle","attributes","choose"],Collection:["datePath"],Text:["itemPath"],Media:["imagePath","altPath"],DetailList:["rowAction"]},tv={Views:["views"],Steps:["steps"]},px=new Set(["ui.dismiss","ui.back","ui.next","ui.copy"]),cx={Collection:"items",Table:"rows",Comparison:"items",Chart:"data",Choice:"options",Tree:"items",Text:"items",Media:"items"},av=new Set(["TextInput","Choice","Toggle","DateInput","RangeInput","Rating","FileInput","ColorInput","CodeInput"]),ux=e=>{let t=e;for(;t?.$ref;)t=lr.$defs[t.$ref.replace("#/$defs/","")];return t},ov=e=>e?.$ref?.replace("#/$defs/","");function lo(e,t,a,o,r){let i=ov(e);if(i==="Id"&&typeof t=="string")return void r.ids.push({id:t,at:a,prop:o.prop,panel:o.panel});if(i==="Path"&&typeof t=="string")return void r.paths.push({path:t,at:a,itemScoped:o.itemScoped,list:o.itemScoped?o.list:void 0});if(i==="Capability"&&typeof t=="string")return void r.actions.push({name:t,at:a});if(o.prop==="group"&&t&&!Array.isArray(t)&&typeof t=="object"&&"path"in t){let d=t;r.paths.push({path:d.path,at:`${a}/path`,itemScoped:o.itemScoped});for(let l of["namePath","imagePath"])d[l]&&r.paths.push({path:d[l],at:`${a}/${l}`,itemScoped:!0,list:{path:d.path}});return}if(i==="Options"&&t&&!Array.isArray(t)&&typeof t=="object"){let d=t;r.paths.push({path:d.path,at:`${a}/path`,itemScoped:o.itemScoped});for(let l of["valuePath","labelPath","descriptionPath","avatarPath","imagePath","recentPath"])d[l]&&r.paths.push({path:d[l],at:`${a}/${l}`,itemScoped:!0,list:{path:d.path}});return}let n=ux(e);if(n){if(n.oneOf){let d=n.oneOf.find(l=>{let p=ux(l);return Array.isArray(t)?p.type==="array":t&&typeof t=="object"?p.type==="object":p.type!=="object"&&p.type!=="array"});d&&lo(d,t,a,o,r);return}if(Array.isArray(t)&&n.items)t.forEach((d,l)=>lo(n.items,d,`${a}/${l}`,o,r));else if(t&&typeof t=="object"&&!Array.isArray(t))for(let[d,l]of Object.entries(t)){let p=n.properties?.[d]??(typeof n.additionalProperties=="object"?n.additionalProperties:void 0);p&&lo(p,l,`${a}/${d}`,o,r)}}}function so(e,t){if(!t.startsWith("/"))return;let a=e;for(let o of t.slice(1).split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"))){if(a===null||typeof a!="object"||!(o in a))return;a=a[o]}return a}function yd(e,t){let a=t.path.startsWith("/")?[e]:t.parent?yd(e,t.parent):[],o=t.path.startsWith("/")?t.path:`/${t.path}`;return a.flatMap(r=>{let i=so(r,o);return Array.isArray(i)?i:[]})}function mx(e,t,a="",o=0){return o>4||!e||typeof e!="object"||Array.isArray(e)?[]:Object.entries(e).flatMap(([r,i])=>[...r===t?[`${a}/${r}`]:[],...mx(i,t,`${a}/${r}`,o+1)])}var xx=e=>e.keyword==="additionalProperties"?`unknown property "${e.params.additionalProperty}"`:e.keyword==="const"&&e.instancePath.endsWith("/component")?`unknown component "${e.data}"`:e.keyword==="discriminator"?"unknown or missing component type":e.message??e.keyword;function bd(e,t={}){let a=[],o=($,N)=>a.push({severity:"error",at:$,message:N}),r=($,N)=>a.push({severity:"warning",at:$,message:N});if(!lx(e)){let $=lx.errors??[],N=$.filter(k=>!$.some(v=>v!==k&&v.instancePath.startsWith(k.instancePath+"/"))),M=new Set;for(let k of N){let v=`${k.instancePath||"/"}: ${xx(k)}`;M.has(v)||(M.add(v),o(k.instancePath||"/",xx(k)))}return{valid:!1,issues:a}}let i=e,n=new Map;i.components.forEach(($,N)=>{n.has($.id)?o(`/components/${N}/id`,`duplicate id "${$.id}"`):n.set($.id,{c:$,index:N})}),n.has(i.root)||o("/root",`root "${i.root}" is not a component id`);let d=new Map;for(let[$,{c:N,index:M}]of n){let k={ids:[],paths:[],actions:[]},v=lr.$defs[`Component${N.component}`];for(let[b,C]of Object.entries(N)){if(b==="id"||b==="component")continue;let E=ev[N.component]?.includes(b)??!1,P=N[cx[N.component]]?.path,z=E&&typeof P=="string"?{path:P}:void 0;tv[N.component]?.includes(b)&&Array.isArray(C)?C.forEach((T,U)=>lo(v.properties[b].items,T,`/components/${M}/${b}/${U}`,{prop:b,itemScoped:E,panel:`${$}#${U}`,list:z},k)):lo(v.properties[b],C,`/components/${M}/${b}`,{prop:b,itemScoped:E,list:z},k)}d.set($,k)}for(let[$,N]of d){let M=n.get($).c;for(let k of N.ids){let v=n.get(k.id);if(!v){o(k.at,`references unknown component "${k.id}"`);continue}k.id===$&&o(k.at,"component references itself");let b=hd[`${M.component}.${k.prop}`];b&&!b.includes(v.c.component)&&o(k.at,`${M.component}.${k.prop} must reference ${b.join(" or ")}, not ${v.c.component}`)}for(let k of N.actions)k.name.startsWith("ui.")&&!px.has(k.name)&&o(k.at,`"${k.name}" is not a renderer action (${[...px].join(", ")})`)}for(let[,{c:$,index:N}]of n)$.component==="TextInput"&&$.placeholder!==void 0&&$.kind!=="search"&&r(`/components/${N}/placeholder`,"placeholders are only for search fields; use the label and help text"),$.component==="Media"&&!$.decorative&&$.alt===void 0&&o(`/components/${N}`,"Media needs alt text unless it is decorative");let l=new Map,p=new Set,c=new Set,u=new Map,x=[],h=($,N,M,k,v)=>{let b=n.get($);if(!b)return;if(k.includes($))return o(`/components/${b.index}`,`cycle: ${[...k,$].join(" \u2192 ")}`);p.add($),M&&c.add($),v&&u.set($,v);let{c:C,index:E}=b,P=N;C.component==="Confirm"&&(P=[...N,`${$}#dialog`]),C.component==="Action"&&C.emphasis==="primary"&&x.push({at:`/components/${E}`,stack:P}),C.component==="Form"&&x.push({at:`/components/${E}/submit`,stack:P}),C.component==="Steps"&&x.push({at:`/components/${E}/finish`,stack:[...P,`${$}#${C.steps.length-1}`]});for(let z of d.get($).ids){if(!n.has(z.id)||z.id===$)continue;let F=z.prop==="items"&&C.component==="Collection"||(z.prop==="rowActions"||z.prop==="detail")&&C.component==="Table",T=l.get(z.id);if(T&&T!==$){o(z.at,`"${z.id}" already has parent "${T}"; a component can appear in only one place`);continue}l.set(z.id,$);let U=F?C[C.component==="Table"?"rows":"items"]?.path:void 0,B=typeof U=="string"?{path:U,parent:U.startsWith("/")?void 0:v}:v;h(z.id,z.panel?[...P,z.panel]:P,M||F,[...k,$],B)}};n.has(i.root)&&h(i.root,[],!1,[]),typeof i.surface?.actions=="string"&&n.has(i.surface.actions)&&h(i.surface.actions,[],!1,[]);for(let[$,{c:N}]of n)N.component==="Navigation"&&!p.has($)&&h($,[],!1,[]);for(let[$,{index:N}]of n)p.has($)||r(`/components/${N}`,`"${$}" is not reachable from root "${i.root}"`);let m=($,N,M)=>a.push({severity:$,at:N,message:M,code:"shell:structure"}),f=i.surface?.kind==="shell",g=[...n].filter(([,{c:$}])=>dx.includes($.component));if(f){i.surface?.origin!=="authored"&&m("error","/surface/origin",'a shell is authored; set surface.origin to "authored"');let $=n.get(i.root)?.c.component;$&&$!=="Frame"&&m("error","/root",`a shell's root is a Frame, not ${$}`);let N=[...n].filter(([,{c:b}])=>b.component==="Outlet");N.length===0&&m("error","/components","a shell has exactly one Outlet, reachable from the Frame's main; this one has none");for(let[,{index:b}]of N.slice(1))m("error",`/components/${b}`,"a shell has exactly one Outlet; this is another");let M=new Set,k=$==="Frame"?n.get(i.root).c.main:void 0,v=b=>{if(!(typeof b!="string"||M.has(b)||!n.has(b))){M.add(b);for(let C of d.get(b).ids)v(C.id)}};typeof k=="string"&&v(k);for(let[b,{index:C}]of N.slice(0,1))typeof k=="string"&&!M.has(b)&&m("error",`/components/${C}`,`the Outlet "${b}" is not reachable from the Frame's main "${k}"`)}else for(let[,{c:$,index:N}]of g)m("error",`/components/${N}`,`${$.component} belongs in a shell document: set surface.kind to "shell"`);for(let[$,{c:N,index:M}]of n){if(N.component!=="Navigation"||N.placement===void 0)continue;let k=l.get($);(!k||n.get(k)?.c.component!=="Frame")&&m("warning",`/components/${M}/placement`,"Navigation.placement only applies to a Frame's navigation; here nothing reads it")}let y=Math.max(1,t.emphasisBudget??1),w=($,N)=>$.every((M,k)=>N[k]===M),I=($,N)=>w($.stack,N.stack)||w(N.stack,$.stack);for(let $=0;$<x.length;$++){let N=x.filter((M,k)=>k>=$&&I(x[$],M));if(N.length>y){let M=N[y];o(M.at,y===1?`more than one primary action visible at once (also ${N[0].at})`:`more than ${y} primary actions visible at once (also ${N.slice(0,y).map(k=>k.at).join(", ")})`);break}}if(i.data!==void 0)for(let[,{c:$,index:N}]of n){let M=cx[$.component],k=M&&$[M]&&typeof $[M]=="object"?$[M].path:void 0;if(typeof k!="string"||!k.startsWith("/"))continue;let v=so(i.data,k);v!==void 0&&!Array.isArray(v)&&o(`/components/${N}/${M}/path`,`${$.component}.${M} must point at a list; "${k}" is ${v===null?"null":typeof v} in data`)}let S=($,N)=>a.push({severity:t.missingData??"warning",at:$,message:N,code:"data:missing-path"}),A=[];for(let[,{c:$}]of n)av.has($.component)&&typeof $.value?.path=="string"&&$.value.path.startsWith("/")&&A.push($.value.path);let _=$=>A.some(N=>N===$||N.startsWith(`${$}/`)||$.startsWith(`${N}/`));for(let[$,N]of d){let M=c.has($);for(let k of N.paths)if(k.path.startsWith("/")){if(i.data!==void 0&&so(i.data,k.path)===void 0&&!_(k.path)){let v=M?u.get($):void 0,b=k.path.slice(k.path.lastIndexOf("/")+1),C=v&&yd(i.data,v).some(P=>so(P,`/${b}`)!==void 0),E=C?void 0:mx(i.data,b).slice(0,1)[0];S(k.at,`path "${k.path}" does not exist in data`+(C?`: inside a repeated item, the item's own field is "${b}", without the slash`:E?` (did you mean "${E}"?)`:""))}}else{if(!k.itemScoped&&!M){o(k.at,`relative path "${k.path}" used outside a repeated item`);continue}let v=k.list??u.get($);if(i.data===void 0||!v)continue;let b=yd(i.data,v);if(b.length&&b.every(C=>so(C,`/${k.path}`)===void 0)){let C=Object.keys(b.find(E=>E&&typeof E=="object")??{});S(k.at,`"${k.path}" is not a field of the items in ${v.path}${C.length?` (they have ${C.join(", ")})`:""}`)}}}return{valid:!a.some($=>$.severity==="error"),issues:a}}var rv={Section:["children"],Group:["children"],Card:["children"],Disclosure:["children"],Form:["children"],ActionBar:["children"],FilterPanel:["children"],Panel:["children"],ActionMenu:["children"],Columns:["children"]},iv={Card:["media"],Collection:["empty","bulkActions"],Table:["empty","toolbar","bulkActions","rowActions","search","detail"],Status:["action"],Confirm:["summary"],Form:["aside"],FilterPanel:["results"],Panel:["actions"],ActionMenu:["primary"],Split:["primary","detail","empty"],Frame:["banner","header","navigation","main","aside","footer"],AppBar:["leading","search","actions","account"],Footer:["aside"],Outlet:["loading"],Custom:["fallback"]},nv={Views:"views",Steps:"steps"},sv=/^[A-Za-z][A-Za-z0-9_-]*$/,dv=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/^([^a-z])/,"c-$1")||"c";function vd(e){let t=[],a=new Set,o=x=>{let h=typeof x.id=="string"&&sv.test(x.id)?x.id:dv(x.key??x.component??"c"),m=h;for(let f=2;a.has(m);f++)m=`${h}-${f}`;return a.add(m),m},r=x=>{if(!x||typeof x!="object"||typeof x.component!="string")throw new Error("expected a component object");let h=o(x),m={...x,id:h};t.push(m);for(let g of rv[x.component]??[])Array.isArray(x[g])&&(m[g]=x[g].map(r));for(let g of iv[x.component]??[])x[g]&&typeof x[g]=="object"&&(m[g]=r(x[g]));x.component==="Collection"&&x.items&&typeof x.items=="object"&&"item"in x.items&&(m.items={path:x.items.path,componentId:r(x.items.item)});let f=nv[x.component];return f&&Array.isArray(x[f])&&(m[f]=x[f].map(g=>({...g,content:g.content&&typeof g.content=="object"?r(g.content):g.content}))),h},{root:i,navigation:n,surface:d,...l}=e,p=r(i),c=n?r(n):void 0,u={...l,root:p,components:t};if(d){let x=d.actions&&typeof d.actions=="object"?r(d.actions):d.actions;u.surface=x===void 0?d:{...d,actions:x}}return u}var wd=e=>!!e&&typeof e.root=="object"&&e.root!==null;var lv=["antd","bootstrap","brutalist","carbon","chakra","civic","editorial","finance","fluent","glass","govuk","health","mantine","material3","mono","neon","pastel","polaris","primer","radix","shadcn","sketch","spectrum","terminal","wireframe"],kd=e=>"data:image/svg+xml;utf8,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><rect width="10" height="10" fill="#999"/><title>'+String(e).replace(/[<&]/g,"")+"</title></svg>");Ao();var gx={mount:(e,t)=>Ea(e,{resolveMedia:kd,...t}),defineElements:Ao,registry:oa,Skeleton:Ca,h:s,render:Sa,getPointer:W,setPointer:Gt,validateDocument:bd,flattenTree:vd,isTree:wd,themes:lv,specVersion:pn,placeholderMedia:kd};if(typeof window<"u"){window.PolyxdWeb=gx;let e=document.getElementById("root");if(window.__PXD__&&e){window.__pxdActions=[],window.__pxdDismissed=0;let{document:t,theme:a,mode:o}=window.__PXD__,r={document:t,theme:a,mode:o,onAction:i=>window.__pxdActions.push(i),resolveMedia:kd};if(t.surface.kind==="shell"){let i=document.createElement("div");i.innerHTML='<h1 class="pxd-surface-title">Screen</h1><p>The current screen renders here.</p>',Ea(e,{...r,outlet:i,current:{key:t.components.find(n=>n.component==="Navigation")?.items?.[0]?.key,title:"Screen"}})}else Ea(e,{...r,onDismiss:()=>window.__pxdDismissed+=1});requestAnimationFrame(()=>requestAnimationFrame(()=>window.__pxdReady=!0))}}var pv=gx;return Cx(cv);})();