@opensalt/ob3-definer 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/ob3-definer.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
|
-
<div id="ob3-definer"
|
|
13
|
+
<div id="ob3-definer"
|
|
14
|
+
data-achievement='{}'
|
|
15
|
+
></div>
|
|
14
16
|
<script>
|
|
15
17
|
document.addEventListener('DOMContentLoaded', () => {
|
|
16
18
|
window.dispatchEvent(new CustomEvent('ob3-open'));
|
package/dist/ob3-definer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#cm-image-thumbnail[data-v-b6e26980]{max-width:200px;max-height:200px;object-fit:contain;margin-bottom:10px}[data-placeholder=true][data-v-3a8afa76]{color:#999}#criteria-preview[data-v-
|
|
1
|
+
#cm-image-thumbnail[data-v-b6e26980]{max-width:200px;max-height:200px;object-fit:contain;margin-bottom:10px}[data-placeholder=true][data-v-3a8afa76]{color:#999}#criteria-preview[data-v-61f2bd5b]{min-height:302px}#criteria-preview[data-v-2cf645b7]{min-height:250px}.value-item[data-v-d268d66c]{display:flex;align-items:start;margin-bottom:.5rem}.value-item[data-v-d268d66c] .formkit-outer{margin-bottom:0;flex-grow:1}.controls[data-v-d268d66c]{list-style-type:none;margin:0;padding:0;display:flex;align-items:center}.controls .button[data-v-d268d66c]{border:none;background:none;padding:0;margin:0;cursor:pointer;color:#999;line-height:1;transition:color .3s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1em;color:var(--fk-color-primary);margin-left:.5rem}.controls[data-v-d268d66c] svg{display:block;width:1em;max-height:1.25em;height:auto;fill:currentColor}.controls .close[data-v-d268d66c]{color:var(--fk-color-danger)}.value-item[data-v-cd88b606]{display:flex;align-items:start;margin-bottom:.5rem}.value-item[data-v-cd88b606] .formkit-outer{margin-bottom:0;flex-grow:1}.controls[data-v-cd88b606]{list-style-type:none;margin:0;padding:0;display:flex;align-items:center}.controls .button[data-v-cd88b606]{border:none;background:none;padding:0;margin:0;cursor:pointer;color:#999;line-height:1;transition:color .3s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-size:1em;color:var(--fk-color-primary);margin-left:.5rem}.controls[data-v-cd88b606] svg{display:block;width:1em;max-height:1.25em;height:auto;fill:currentColor}.controls .close[data-v-cd88b606]{color:var(--fk-color-danger)}.input-group>.form-label{margin-bottom:0}.formkit-wrapper.required .form-label:before{color:red;content:"*";position:absolute;margin-left:-10px}[data-invalid=true] .form-control{border-color:#dc3545;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}[data-invalid=true] .invalid-feedback{display:inline;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}
|
package/dist/ob3-definer.js
CHANGED
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
`:">",i};Wu.prototype.renderInline=function(e,t,u){let r="";const n=this.rules;for(let i=0,s=e.length;i<s;i++){const o=e[i].type;typeof n[o]<"u"?r+=n[o](e,i,t,u,this):r+=this.renderToken(e,i,t)}return r};Wu.prototype.renderInlineAsText=function(e,t,u){let r="";for(let n=0,i=e.length;n<i;n++)switch(e[n].type){case"text":r+=e[n].content;break;case"image":r+=this.renderInlineAsText(e[n].children,t,u);break;case"html_inline":case"html_block":r+=e[n].content;break;case"softbreak":case"hardbreak":r+=`
|
|
30
30
|
`;break}return r};Wu.prototype.render=function(e,t,u){let r="";const n=this.rules;for(let i=0,s=e.length;i<s;i++){const o=e[i].type;o==="inline"?r+=this.renderInline(e[i].children,t,u):typeof n[o]<"u"?r+=n[o](e,i,t,u,this):r+=this.renderToken(e,i,t,u)}return r};function Be(){this.__rules__=[],this.__cache__=null}Be.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Be.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(u){u.enabled&&u.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(u){e.__cache__[u]=[],e.__rules__.forEach(function(r){r.enabled&&(u&&r.alt.indexOf(u)<0||e.__cache__[u].push(r.fn))})})};Be.prototype.at=function(e,t,u){const r=this.__find__(e),n=u||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=n.alt||[],this.__cache__=null};Be.prototype.before=function(e,t,u,r){const n=this.__find__(e),i=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(n,0,{name:t,enabled:!0,fn:u,alt:i.alt||[]}),this.__cache__=null};Be.prototype.after=function(e,t,u,r){const n=this.__find__(e),i=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(n+1,0,{name:t,enabled:!0,fn:u,alt:i.alt||[]}),this.__cache__=null};Be.prototype.push=function(e,t,u){const r=u||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};Be.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(r){const n=this.__find__(r);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[n].enabled=!0,u.push(r)},this),this.__cache__=null,u};Be.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(u){u.enabled=!1}),this.enable(e,t)};Be.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const u=[];return e.forEach(function(r){const n=this.__find__(r);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[n].enabled=!1,u.push(r)},this),this.__cache__=null,u};Be.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function ft(e,t,u){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=u,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ft.prototype.attrIndex=function(t){if(!this.attrs)return-1;const u=this.attrs;for(let r=0,n=u.length;r<n;r++)if(u[r][0]===t)return r;return-1};ft.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ft.prototype.attrSet=function(t,u){const r=this.attrIndex(t),n=[t,u];r<0?this.attrPush(n):this.attrs[r]=n};ft.prototype.attrGet=function(t){const u=this.attrIndex(t);let r=null;return u>=0&&(r=this.attrs[u][1]),r};ft.prototype.attrJoin=function(t,u){const r=this.attrIndex(t);r<0?this.attrPush([t,u]):this.attrs[r][1]=this.attrs[r][1]+" "+u};function xa(e,t,u){this.src=e,this.env=u,this.tokens=[],this.inlineMode=!1,this.md=t}xa.prototype.Token=ft;const xp=/\r\n?|\n/g,kp=/\0/g;function Cp(e){let t;t=e.src.replace(xp,`
|
|
31
31
|
`),t=t.replace(kp,"�"),e.src=t}function Ep(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Ap(e){const t=e.tokens;for(let u=0,r=t.length;u<r;u++){const n=t[u];n.type==="inline"&&e.md.inline.parse(n.content,e.md,e.env,n.children)}}function $p(e){return/^<a[>\s]/i.test(e)}function wp(e){return/^<\/a\s*>/i.test(e)}function Dp(e){const t=e.tokens;if(e.md.options.linkify)for(let u=0,r=t.length;u<r;u++){if(t[u].type!=="inline"||!e.md.linkify.pretest(t[u].content))continue;let n=t[u].children,i=0;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o.type==="link_close"){for(s--;n[s].level!==o.level&&n[s].type!=="link_open";)s--;continue}if(o.type==="html_inline"&&($p(o.content)&&i>0&&i--,wp(o.content)&&i++),!(i>0)&&o.type==="text"&&e.md.linkify.test(o.content)){const l=o.content;let a=e.md.linkify.match(l);const c=[];let f=o.level,g=0;a.length>0&&a[0].index===0&&s>0&&n[s-1].type==="text_special"&&(a=a.slice(1));for(let p=0;p<a.length;p++){const d=a[p].url,m=e.md.normalizeLink(d);if(!e.md.validateLink(m))continue;let y=a[p].text;a[p].schema?a[p].schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const v=a[p].index;if(v>g){const w=new e.Token("text","",0);w.content=l.slice(g,v),w.level=f,c.push(w)}const k=new e.Token("link_open","a",1);k.attrs=[["href",m]],k.level=f++,k.markup="linkify",k.info="auto",c.push(k);const A=new e.Token("text","",0);A.content=y,A.level=f,c.push(A);const x=new e.Token("link_close","a",-1);x.level=--f,x.markup="linkify",x.info="auto",c.push(x),g=a[p].lastIndex}if(g<l.length){const p=new e.Token("text","",0);p.content=l.slice(g),p.level=f,c.push(p)}t[u].children=n=ya(n,s,c)}}}}const ka=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Fp=/\((c|tm|r)\)/i,Sp=/\((c|tm|r)\)/ig,Ip={c:"©",r:"®",tm:"™"};function Tp(e,t){return Ip[t.toLowerCase()]}function Mp(e){let t=0;for(let u=e.length-1;u>=0;u--){const r=e[u];r.type==="text"&&!t&&(r.content=r.content.replace(Sp,Tp)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Op(e){let t=0;for(let u=e.length-1;u>=0;u--){const r=e[u];r.type==="text"&&!t&&ka.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Pp(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Fp.test(e.tokens[t].content)&&Mp(e.tokens[t].children),ka.test(e.tokens[t].content)&&Op(e.tokens[t].children))}const Rp=/['"]/,wo=/['"]/g,Do="’";function Vr(e,t,u){return e.slice(0,t)+u+e.slice(t+1)}function Vp(e,t){let u;const r=[];for(let n=0;n<e.length;n++){const i=e[n],s=e[n].level;for(u=r.length-1;u>=0&&!(r[u].level<=s);u--);if(r.length=u+1,i.type!=="text")continue;let o=i.content,l=0,a=o.length;e:for(;l<a;){wo.lastIndex=l;const c=wo.exec(o);if(!c)break;let f=!0,g=!0;l=c.index+1;const p=c[0]==="'";let d=32;if(c.index-1>=0)d=o.charCodeAt(c.index-1);else for(u=n-1;u>=0&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u--)if(e[u].content){d=e[u].content.charCodeAt(e[u].content.length-1);break}let m=32;if(l<a)m=o.charCodeAt(l);else for(u=n+1;u<e.length&&!(e[u].type==="softbreak"||e[u].type==="hardbreak");u++)if(e[u].content){m=e[u].content.charCodeAt(0);break}const y=gr(d)||br(String.fromCharCode(d)),v=gr(m)||br(String.fromCharCode(m)),k=mr(d),A=mr(m);if(A?f=!1:v&&(k||y||(f=!1)),k?g=!1:y&&(A||v||(g=!1)),m===34&&c[0]==='"'&&d>=48&&d<=57&&(g=f=!1),f&&g&&(f=y,g=v),!f&&!g){p&&(i.content=Vr(i.content,c.index,Do));continue}if(g)for(u=r.length-1;u>=0;u--){let x=r[u];if(r[u].level<s)break;if(x.single===p&&r[u].level===s){x=r[u];let w,b;p?(w=t.md.options.quotes[2],b=t.md.options.quotes[3]):(w=t.md.options.quotes[0],b=t.md.options.quotes[1]),i.content=Vr(i.content,c.index,b),e[x.token].content=Vr(e[x.token].content,x.pos,w),l+=b.length-1,x.token===n&&(l+=w.length-1),o=i.content,a=o.length,r.length=u;continue e}}f?r.push({token:n,pos:c.index,single:p,level:s}):g&&p&&(i.content=Vr(i.content,c.index,Do))}}}function Lp(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!Rp.test(e.tokens[t].content)||Vp(e.tokens[t].children,e)}function Np(e){let t,u;const r=e.tokens,n=r.length;for(let i=0;i<n;i++){if(r[i].type!=="inline")continue;const s=r[i].children,o=s.length;for(t=0;t<o;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=u=0;t<o;t++)s[t].type==="text"&&t+1<o&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==u&&(s[u]=s[t]),u++);t!==u&&(s.length=u)}}const Qn=[["normalize",Cp],["block",Ep],["inline",Ap],["linkify",Dp],["replacements",Pp],["smartquotes",Lp],["text_join",Np]];function fs(){this.ruler=new Be;for(let e=0;e<Qn.length;e++)this.ruler.push(Qn[e][0],Qn[e][1])}fs.prototype.process=function(e){const t=this.ruler.getRules("");for(let u=0,r=t.length;u<r;u++)t[u](e)};fs.prototype.State=xa;function Dt(e,t,u,r){this.src=e,this.md=t,this.env=u,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const n=this.src;for(let i=0,s=0,o=0,l=0,a=n.length,c=!1;s<a;s++){const f=n.charCodeAt(s);if(!c)if(fe(f)){o++,f===9?l+=4-l%4:l++;continue}else c=!0;(f===10||s===a-1)&&(f!==10&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(o),this.sCount.push(l),this.bsCount.push(0),c=!1,o=0,l=0,i=s+1)}this.bMarks.push(n.length),this.eMarks.push(n.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Dt.prototype.push=function(e,t,u){const r=new ft(e,t,u);return r.block=!0,u<0&&this.level--,r.level=this.level,u>0&&this.level++,this.tokens.push(r),r};Dt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Dt.prototype.skipEmptyLines=function(t){for(let u=this.lineMax;t<u&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Dt.prototype.skipSpaces=function(t){for(let u=this.src.length;t<u;t++){const r=this.src.charCodeAt(t);if(!fe(r))break}return t};Dt.prototype.skipSpacesBack=function(t,u){if(t<=u)return t;for(;t>u;)if(!fe(this.src.charCodeAt(--t)))return t+1;return t};Dt.prototype.skipChars=function(t,u){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===u;t++);return t};Dt.prototype.skipCharsBack=function(t,u,r){if(t<=r)return t;for(;t>r;)if(u!==this.src.charCodeAt(--t))return t+1;return t};Dt.prototype.getLines=function(t,u,r,n){if(t>=u)return"";const i=new Array(u-t);for(let s=0,o=t;o<u;o++,s++){let l=0;const a=this.bMarks[o];let c=a,f;for(o+1<u||n?f=this.eMarks[o]+1:f=this.eMarks[o];c<f&&l<r;){const g=this.src.charCodeAt(c);if(fe(g))g===9?l+=4-(l+this.bsCount[o])%4:l++;else if(c-a<this.tShift[o])l++;else break;c++}l>r?i[s]=new Array(l-r+1).join(" ")+this.src.slice(c,f):i[s]=this.src.slice(c,f)}return i.join("")};Dt.prototype.Token=ft;const qp=65536;function ei(e,t){const u=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(u,r)}function Fo(e){const t=[],u=e.length;let r=0,n=e.charCodeAt(r),i=!1,s=0,o="";for(;r<u;)n===124&&(i?(o+=e.substring(s,r-1),s=r):(t.push(o+e.substring(s,r)),o="",s=r+1)),i=n===92,r++,n=e.charCodeAt(r);return t.push(o+e.substring(s)),t}function Bp(e,t,u,r){if(t+2>u)return!1;let n=t+1;if(e.sCount[n]<e.blkIndent||e.sCount[n]-e.blkIndent>=4)return!1;let i=e.bMarks[n]+e.tShift[n];if(i>=e.eMarks[n])return!1;const s=e.src.charCodeAt(i++);if(s!==124&&s!==45&&s!==58||i>=e.eMarks[n])return!1;const o=e.src.charCodeAt(i++);if(o!==124&&o!==45&&o!==58&&!fe(o)||s===45&&fe(o))return!1;for(;i<e.eMarks[n];){const x=e.src.charCodeAt(i);if(x!==124&&x!==45&&x!==58&&!fe(x))return!1;i++}let l=ei(e,t+1),a=l.split("|");const c=[];for(let x=0;x<a.length;x++){const w=a[x].trim();if(!w){if(x===0||x===a.length-1)continue;return!1}if(!/^:?-+:?$/.test(w))return!1;w.charCodeAt(w.length-1)===58?c.push(w.charCodeAt(0)===58?"center":"right"):w.charCodeAt(0)===58?c.push("left"):c.push("")}if(l=ei(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;a=Fo(l),a.length&&a[0]===""&&a.shift(),a.length&&a[a.length-1]===""&&a.pop();const f=a.length;if(f===0||f!==c.length)return!1;if(r)return!0;const g=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),d=e.push("table_open","table",1),m=[t,0];d.map=m;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const v=e.push("tr_open","tr",1);v.map=[t,t+1];for(let x=0;x<a.length;x++){const w=e.push("th_open","th",1);c[x]&&(w.attrs=[["style","text-align:"+c[x]]]);const b=e.push("inline","",0);b.content=a[x].trim(),b.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let k,A=0;for(n=t+2;n<u&&!(e.sCount[n]<e.blkIndent);n++){let x=!1;for(let b=0,C=p.length;b<C;b++)if(p[b](e,n,u,!0)){x=!0;break}if(x||(l=ei(e,n).trim(),!l)||e.sCount[n]-e.blkIndent>=4||(a=Fo(l),a.length&&a[0]===""&&a.shift(),a.length&&a[a.length-1]===""&&a.pop(),A+=f-a.length,A>qp))break;if(n===t+2){const b=e.push("tbody_open","tbody",1);b.map=k=[t+2,0]}const w=e.push("tr_open","tr",1);w.map=[n,n+1];for(let b=0;b<f;b++){const C=e.push("td_open","td",1);c[b]&&(C.attrs=[["style","text-align:"+c[b]]]);const L=e.push("inline","",0);L.content=a[b]?a[b].trim():"",L.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return k&&(e.push("tbody_close","tbody",-1),k[1]=n),e.push("table_close","table",-1),m[1]=n,e.parentType=g,e.line=n,!0}function zp(e,t,u){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,n=r;for(;r<u;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,n=r;continue}break}e.line=n;const i=e.push("code_block","code",0);return i.content=e.getLines(t,n,4+e.blkIndent,!1)+`
|
|
32
|
-
`,i.map=[t,e.line],!0}function jp(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||n+3>i)return!1;const s=e.src.charCodeAt(n);if(s!==126&&s!==96)return!1;let o=n;n=e.skipChars(n,s);let l=n-o;if(l<3)return!1;const a=e.src.slice(o,n),c=e.src.slice(n,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let f=t,g=!1;for(;f++,!(f>=u||(n=o=e.bMarks[f]+e.tShift[f],i=e.eMarks[f],n<i&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(n)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(n=e.skipChars(n,s),!(n-o<l)&&(n=e.skipSpaces(n),!(n<i)))){g=!0;break}l=e.sCount[t],e.line=f+(g?1:0);const p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,f,l,!0),p.markup=a,p.map=[t,e.line],!0}function Up(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(n)!==62)return!1;if(r)return!0;const o=[],l=[],a=[],c=[],f=e.md.block.ruler.getRules("blockquote"),g=e.parentType;e.parentType="blockquote";let p=!1,d;for(d=t;d<u;d++){const A=e.sCount[d]<e.blkIndent;if(n=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],n>=i)break;if(e.src.charCodeAt(n++)===62&&!A){let w=e.sCount[d]+1,b,C;e.src.charCodeAt(n)===32?(n++,w++,C=!1,b=!0):e.src.charCodeAt(n)===9?(b=!0,(e.bsCount[d]+w)%4===3?(n++,w++,C=!1):C=!0):b=!1;let L=w;for(o.push(e.bMarks[d]),e.bMarks[d]=n;n<i;){const G=e.src.charCodeAt(n);if(fe(G))G===9?L+=4-(L+e.bsCount[d]+(C?1:0))%4:L++;else break;n++}p=n>=i,l.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(b?1:0),a.push(e.sCount[d]),e.sCount[d]=L-w,c.push(e.tShift[d]),e.tShift[d]=n-e.bMarks[d];continue}if(p)break;let x=!1;for(let w=0,b=f.length;w<b;w++)if(f[w](e,d,u,!0)){x=!0;break}if(x){e.lineMax=d,e.blkIndent!==0&&(o.push(e.bMarks[d]),l.push(e.bsCount[d]),c.push(e.tShift[d]),a.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}o.push(e.bMarks[d]),l.push(e.bsCount[d]),c.push(e.tShift[d]),a.push(e.sCount[d]),e.sCount[d]=-1}const m=e.blkIndent;e.blkIndent=0;const y=e.push("blockquote_open","blockquote",1);y.markup=">";const v=[t,0];y.map=v,e.md.block.tokenize(e,t,d);const k=e.push("blockquote_close","blockquote",-1);k.markup=">",e.lineMax=s,e.parentType=g,v[1]=e.line;for(let A=0;A<c.length;A++)e.bMarks[A+t]=o[A],e.tShift[A+t]=c[A],e.sCount[A+t]=a[A],e.bsCount[A+t]=l[A];return e.blkIndent=m,!0}function Hp(e,t,u,r){const n=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let o=1;for(;i<n;){const a=e.src.charCodeAt(i++);if(a!==s&&!fe(a))return!1;a===s&&o++}if(o<3)return!1;if(r)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(o+1).join(String.fromCharCode(s)),!0}function So(e,t){const u=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const n=e.src.charCodeAt(r++);if(n!==42&&n!==45&&n!==43)return-1;if(r<u){const i=e.src.charCodeAt(r);if(!fe(i))return-1}return r}function Io(e,t){const u=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let n=u;if(n+1>=r)return-1;let i=e.src.charCodeAt(n++);if(i<48||i>57)return-1;for(;;){if(n>=r)return-1;if(i=e.src.charCodeAt(n++),i>=48&&i<=57){if(n-u>=10)return-1;continue}if(i===41||i===46)break;return-1}return n<r&&(i=e.src.charCodeAt(n),!fe(i))?-1:n}function Kp(e,t){const u=e.level+2;for(let r=t+2,n=e.tokens.length-2;r<n;r++)e.tokens[r].level===u&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Wp(e,t,u,r){let n,i,s,o,l=t,a=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let c=!1;r&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(c=!0);let f,g,p;if((p=Io(e,l))>=0){if(f=!0,s=e.bMarks[l]+e.tShift[l],g=Number(e.src.slice(s,p-1)),c&&g!==1)return!1}else if((p=So(e,l))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;const d=e.src.charCodeAt(p-1),m=e.tokens.length;f?(o=e.push("ordered_list_open","ol",1),g!==1&&(o.attrs=[["start",g]])):o=e.push("bullet_list_open","ul",1);const y=[l,0];o.map=y,o.markup=String.fromCharCode(d);let v=!1;const k=e.md.block.ruler.getRules("list"),A=e.parentType;for(e.parentType="list";l<u;){i=p,n=e.eMarks[l];const x=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let w=x;for(;i<n;){const ee=e.src.charCodeAt(i);if(ee===9)w+=4-(w+e.bsCount[l])%4;else if(ee===32)w++;else break;i++}const b=i;let C;b>=n?C=1:C=w-x,C>4&&(C=1);const L=x+C;o=e.push("list_item_open","li",1),o.markup=String.fromCharCode(d);const G=[l,0];o.map=G,f&&(o.info=e.src.slice(s,p-1));const Y=e.tight,J=e.tShift[l],E=e.sCount[l],N=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=L,e.tight=!0,e.tShift[l]=b-e.bMarks[l],e.sCount[l]=w,b>=n&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,u):e.md.block.tokenize(e,l,u,!0),(!e.tight||v)&&(a=!1),v=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=N,e.tShift[l]=J,e.sCount[l]=E,e.tight=Y,o=e.push("list_item_close","li",-1),o.markup=String.fromCharCode(d),l=e.line,G[1]=l,l>=u||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let z=!1;for(let ee=0,H=k.length;ee<H;ee++)if(k[ee](e,l,u,!0)){z=!0;break}if(z)break;if(f){if(p=Io(e,l),p<0)break;s=e.bMarks[l]+e.tShift[l]}else if(p=So(e,l),p<0)break;if(d!==e.src.charCodeAt(p-1))break}return f?o=e.push("ordered_list_close","ol",-1):o=e.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(d),y[1]=l,e.line=l,e.parentType=A,a&&Kp(e,m),!0}function Zp(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(n)!==91)return!1;function o(k){const A=e.lineMax;if(k>=A||e.isEmpty(k))return null;let x=!1;if(e.sCount[k]-e.blkIndent>3&&(x=!0),e.sCount[k]<0&&(x=!0),!x){const C=e.md.block.ruler.getRules("reference"),L=e.parentType;e.parentType="reference";let G=!1;for(let Y=0,J=C.length;Y<J;Y++)if(C[Y](e,k,A,!0)){G=!0;break}if(e.parentType=L,G)return null}const w=e.bMarks[k]+e.tShift[k],b=e.eMarks[k];return e.src.slice(w,b+1)}let l=e.src.slice(n,i+1);i=l.length;let a=-1;for(n=1;n<i;n++){const k=l.charCodeAt(n);if(k===91)return!1;if(k===93){a=n;break}else if(k===10){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}else if(k===92&&(n++,n<i&&l.charCodeAt(n)===10)){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}}if(a<0||l.charCodeAt(a+1)!==58)return!1;for(n=a+2;n<i;n++){const k=l.charCodeAt(n);if(k===10){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}else if(!fe(k))break}const c=e.md.helpers.parseLinkDestination(l,n,i);if(!c.ok)return!1;const f=e.md.normalizeLink(c.str);if(!e.md.validateLink(f))return!1;n=c.pos;const g=n,p=s,d=n;for(;n<i;n++){const k=l.charCodeAt(n);if(k===10){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}else if(!fe(k))break}let m=e.md.helpers.parseLinkTitle(l,n,i);for(;m.can_continue;){const k=o(s);if(k===null)break;l+=k,n=i,i=l.length,s++,m=e.md.helpers.parseLinkTitle(l,n,i,m)}let y;for(n<i&&d!==n&&m.ok?(y=m.str,n=m.pos):(y="",n=g,s=p);n<i;){const k=l.charCodeAt(n);if(!fe(k))break;n++}if(n<i&&l.charCodeAt(n)!==10&&y)for(y="",n=g,s=p;n<i;){const k=l.charCodeAt(n);if(!fe(k))break;n++}if(n<i&&l.charCodeAt(n)!==10)return!1;const v=Pn(l.slice(1,a));return v?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:y,href:f}),e.line=s),!0):!1}const Gp=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jp="[a-zA-Z_:][a-zA-Z0-9:._-]*",Yp="[^\"'=<>`\\x00-\\x20]+",Xp="'[^']*'",Qp='"[^"]*"',e1="(?:"+Yp+"|"+Xp+"|"+Qp+")",t1="(?:\\s+"+Jp+"(?:\\s*=\\s*"+e1+")?)",Ca="<[A-Za-z][A-Za-z0-9\\-]*"+t1+"*\\s*\\/?>",Ea="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",u1="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",r1="<[?][\\s\\S]*?[?]>",n1="<![A-Za-z][^>]*>",i1="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",s1=new RegExp("^(?:"+Ca+"|"+Ea+"|"+u1+"|"+r1+"|"+n1+"|"+i1+")"),o1=new RegExp("^(?:"+Ca+"|"+Ea+")"),vu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Gp.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o1.source+"\\s*$"),/^$/,!1]];function l1(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(n)!==60)return!1;let s=e.src.slice(n,i),o=0;for(;o<vu.length&&!vu[o][0].test(s);o++);if(o===vu.length)return!1;if(r)return vu[o][2];let l=t+1;if(!vu[o][1].test(s)){for(;l<u&&!(e.sCount[l]<e.blkIndent);l++)if(n=e.bMarks[l]+e.tShift[l],i=e.eMarks[l],s=e.src.slice(n,i),vu[o][1].test(s)){s.length!==0&&l++;break}}e.line=l;const a=e.push("html_block","",0);return a.map=[t,l],a.content=e.getLines(t,l,e.blkIndent,!0),!0}function a1(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(n);if(s!==35||n>=i)return!1;let o=1;for(s=e.src.charCodeAt(++n);s===35&&n<i&&o<=6;)o++,s=e.src.charCodeAt(++n);if(o>6||n<i&&!fe(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,n);const l=e.skipCharsBack(i,35,n);l>n&&fe(e.src.charCodeAt(l-1))&&(i=l),e.line=t+1;const a=e.push("heading_open","h"+String(o),1);a.markup="########".slice(0,o),a.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(n,i).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup="########".slice(0,o),!0}function c1(e,t,u){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const n=e.parentType;e.parentType="paragraph";let i=0,s,o=t+1;for(;o<u&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]>=e.blkIndent){let p=e.bMarks[o]+e.tShift[o];const d=e.eMarks[o];if(p<d&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=d))){i=s===61?1:2;break}}if(e.sCount[o]<0)continue;let g=!1;for(let p=0,d=r.length;p<d;p++)if(r[p](e,o,u,!0)){g=!0;break}if(g)break}if(!i)return!1;const l=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o+1;const a=e.push("heading_open","h"+String(i),1);a.markup=String.fromCharCode(s),a.map=[t,e.line];const c=e.push("inline","",0);c.content=l,c.map=[t,e.line-1],c.children=[];const f=e.push("heading_close","h"+String(i),-1);return f.markup=String.fromCharCode(s),e.parentType=n,!0}function f1(e,t,u){const r=e.md.block.ruler.getRules("paragraph"),n=e.parentType;let i=t+1;for(e.parentType="paragraph";i<u&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let a=!1;for(let c=0,f=r.length;c<f;c++)if(r[c](e,i,u,!0)){a=!0;break}if(a)break}const s=e.getLines(t,i,e.blkIndent,!1).trim();e.line=i;const o=e.push("paragraph_open","p",1);o.map=[t,e.line];const l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=n,!0}const Lr=[["table",Bp,["paragraph","reference"]],["code",zp],["fence",jp,["paragraph","reference","blockquote","list"]],["blockquote",Up,["paragraph","reference","blockquote","list"]],["hr",Hp,["paragraph","reference","blockquote","list"]],["list",Wp,["paragraph","reference","blockquote"]],["reference",Zp],["html_block",l1,["paragraph","reference","blockquote"]],["heading",a1,["paragraph","reference","blockquote"]],["lheading",c1],["paragraph",f1]];function Rn(){this.ruler=new Be;for(let e=0;e<Lr.length;e++)this.ruler.push(Lr[e][0],Lr[e][1],{alt:(Lr[e][2]||[]).slice()})}Rn.prototype.tokenize=function(e,t,u){const r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting;let s=t,o=!1;for(;s<u&&(e.line=s=e.skipEmptyLines(s),!(s>=u||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=u;break}const l=e.line;let a=!1;for(let c=0;c<n;c++)if(a=r[c](e,s,u,!1),a){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!a)throw new Error("none of the block rules matched");e.tight=!o,e.isEmpty(e.line-1)&&(o=!0),s=e.line,s<u&&e.isEmpty(s)&&(o=!0,s++,e.line=s)}};Rn.prototype.parse=function(e,t,u,r){if(!e)return;const n=new this.State(e,t,u,r);this.tokenize(n,n.line,n.lineMax)};Rn.prototype.State=Dt;function Ar(e,t,u,r){this.src=e,this.env=u,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Ar.prototype.pushPending=function(){const e=new ft("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Ar.prototype.push=function(e,t,u){this.pending&&this.pushPending();const r=new ft(e,t,u);let n=null;return u<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,u>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],n={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(n),r};Ar.prototype.scanDelims=function(e,t){const u=this.posMax,r=this.src.charCodeAt(e),n=e>0?this.src.charCodeAt(e-1):32;let i=e;for(;i<u&&this.src.charCodeAt(i)===r;)i++;const s=i-e,o=i<u?this.src.charCodeAt(i):32,l=gr(n)||br(String.fromCharCode(n)),a=gr(o)||br(String.fromCharCode(o)),c=mr(n),f=mr(o),g=!f&&(!a||c||l),p=!c&&(!l||f||a);return{can_open:g&&(t||!p||l),can_close:p&&(t||!g||a),length:s}};Ar.prototype.Token=ft;function d1(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function p1(e,t){let u=e.pos;for(;u<e.posMax&&!d1(e.src.charCodeAt(u));)u++;return u===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,u)),e.pos=u,!0)}const h1=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function m1(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const u=e.pos,r=e.posMax;if(u+3>r||e.src.charCodeAt(u)!==58||e.src.charCodeAt(u+1)!==47||e.src.charCodeAt(u+2)!==47)return!1;const n=e.pending.match(h1);if(!n)return!1;const i=n[1],s=e.md.linkify.matchAtStart(e.src.slice(u-i.length));if(!s)return!1;let o=s.url;if(o.length<=i.length)return!1;o=o.replace(/\*+$/,"");const l=e.md.normalizeLink(o);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="linkify",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(o);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=o.length-i.length,!0}function b1(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==10)return!1;const r=e.pending.length-1,n=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(u++;u<n&&fe(e.src.charCodeAt(u));)u++;return e.pos=u,!0}const ds=[];for(let e=0;e<256;e++)ds.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ds[e.charCodeAt(0)]=1});function g1(e,t){let u=e.pos;const r=e.posMax;if(e.src.charCodeAt(u)!==92||(u++,u>=r))return!1;let n=e.src.charCodeAt(u);if(n===10){for(t||e.push("hardbreak","br",0),u++;u<r&&(n=e.src.charCodeAt(u),!!fe(n));)u++;return e.pos=u,!0}let i=e.src[u];if(n>=55296&&n<=56319&&u+1<r){const o=e.src.charCodeAt(u+1);o>=56320&&o<=57343&&(i+=e.src[u+1],u++)}const s="\\"+i;if(!t){const o=e.push("text_special","",0);n<256&&ds[n]!==0?o.content=i:o.content=s,o.markup=s,o.info="escape"}return e.pos=u+1,!0}function _1(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==96)return!1;const n=u;u++;const i=e.posMax;for(;u<i&&e.src.charCodeAt(u)===96;)u++;const s=e.src.slice(n,u),o=s.length;if(e.backticksScanned&&(e.backticks[o]||0)<=n)return t||(e.pending+=s),e.pos+=o,!0;let l=u,a;for(;(a=e.src.indexOf("`",l))!==-1;){for(l=a+1;l<i&&e.src.charCodeAt(l)===96;)l++;const c=l-a;if(c===o){if(!t){const f=e.push("code_inline","code",0);f.markup=s,f.content=e.src.slice(u,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[c]=a}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=o,!0}function y1(e,t){const u=e.pos,r=e.src.charCodeAt(u);if(t||r!==126)return!1;const n=e.scanDelims(e.pos,!0);let i=n.length;const s=String.fromCharCode(r);if(i<2)return!1;let o;i%2&&(o=e.push("text","",0),o.content=s,i--);for(let l=0;l<i;l+=2)o=e.push("text","",0),o.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0}function To(e,t){let u;const r=[],n=t.length;for(let i=0;i<n;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const o=t[s.end];u=e.tokens[s.token],u.type="s_open",u.tag="s",u.nesting=1,u.markup="~~",u.content="",u=e.tokens[o.token],u.type="s_close",u.tag="s",u.nesting=-1,u.markup="~~",u.content="",e.tokens[o.token-1].type==="text"&&e.tokens[o.token-1].content==="~"&&r.push(o.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(u=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=u)}}function v1(e){const t=e.tokens_meta,u=e.tokens_meta.length;To(e,e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&To(e,t[r].delimiters)}const Aa={tokenize:y1,postProcess:v1};function x1(e,t){const u=e.pos,r=e.src.charCodeAt(u);if(t||r!==95&&r!==42)return!1;const n=e.scanDelims(e.pos,r===42);for(let i=0;i<n.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:n.length,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close})}return e.pos+=n.length,!0}function Mo(e,t){const u=t.length;for(let r=u-1;r>=0;r--){const n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;const i=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),l=e.tokens[n.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?o+o:o,l.content="";const a=e.tokens[i.token];a.type=s?"strong_close":"em_close",a.tag=s?"strong":"em",a.nesting=-1,a.markup=s?o+o:o,a.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}function k1(e){const t=e.tokens_meta,u=e.tokens_meta.length;Mo(e,e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&Mo(e,t[r].delimiters)}const $a={tokenize:x1,postProcess:k1};function C1(e,t){let u,r,n,i,s="",o="",l=e.pos,a=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const c=e.pos,f=e.posMax,g=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let d=p+1;if(d<f&&e.src.charCodeAt(d)===40){for(a=!1,d++;d<f&&(u=e.src.charCodeAt(d),!(!fe(u)&&u!==10));d++);if(d>=f)return!1;if(l=d,n=e.md.helpers.parseLinkDestination(e.src,d,e.posMax),n.ok){for(s=e.md.normalizeLink(n.str),e.md.validateLink(s)?d=n.pos:s="",l=d;d<f&&(u=e.src.charCodeAt(d),!(!fe(u)&&u!==10));d++);if(n=e.md.helpers.parseLinkTitle(e.src,d,e.posMax),d<f&&l!==d&&n.ok)for(o=n.str,d=n.pos;d<f&&(u=e.src.charCodeAt(d),!(!fe(u)&&u!==10));d++);}(d>=f||e.src.charCodeAt(d)!==41)&&(a=!0),d++}if(a){if(typeof e.env.references>"u")return!1;if(d<f&&e.src.charCodeAt(d)===91?(l=d+1,d=e.md.helpers.parseLinkLabel(e,d),d>=0?r=e.src.slice(l,d++):d=p+1):d=p+1,r||(r=e.src.slice(g,p)),i=e.env.references[Pn(r)],!i)return e.pos=c,!1;s=i.href,o=i.title}if(!t){e.pos=g,e.posMax=p;const m=e.push("link_open","a",1),y=[["href",s]];m.attrs=y,o&&y.push(["title",o]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=d,e.posMax=f,!0}function E1(e,t){let u,r,n,i,s,o,l,a,c="";const f=e.pos,g=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,d=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(d<0)return!1;if(i=d+1,i<g&&e.src.charCodeAt(i)===40){for(i++;i<g&&(u=e.src.charCodeAt(i),!(!fe(u)&&u!==10));i++);if(i>=g)return!1;for(a=i,o=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),o.ok&&(c=e.md.normalizeLink(o.str),e.md.validateLink(c)?i=o.pos:c=""),a=i;i<g&&(u=e.src.charCodeAt(i),!(!fe(u)&&u!==10));i++);if(o=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<g&&a!==i&&o.ok)for(l=o.str,i=o.pos;i<g&&(u=e.src.charCodeAt(i),!(!fe(u)&&u!==10));i++);else l="";if(i>=g||e.src.charCodeAt(i)!==41)return e.pos=f,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<g&&e.src.charCodeAt(i)===91?(a=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?n=e.src.slice(a,i++):i=d+1):i=d+1,n||(n=e.src.slice(p,d)),s=e.env.references[Pn(n)],!s)return e.pos=f,!1;c=s.href,l=s.title}if(!t){r=e.src.slice(p,d);const m=[];e.md.inline.parse(r,e.md,e.env,m);const y=e.push("image","img",0),v=[["src",c],["alt",""]];y.attrs=v,y.children=m,y.content=r,l&&v.push(["title",l])}return e.pos=i,e.posMax=g,!0}const A1=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,$1=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function w1(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;const r=e.pos,n=e.posMax;for(;;){if(++u>=n)return!1;const s=e.src.charCodeAt(u);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,u);if($1.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);const a=e.push("link_close","a",-1);a.markup="autolink",a.info="auto"}return e.pos+=i.length+2,!0}if(A1.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);const a=e.push("link_close","a",-1);a.markup="autolink",a.info="auto"}return e.pos+=i.length+2,!0}return!1}function D1(e){return/^<a[>\s]/i.test(e)}function F1(e){return/^<\/a\s*>/i.test(e)}function S1(e){const t=e|32;return t>=97&&t<=122}function I1(e,t){if(!e.md.options.html)return!1;const u=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=u)return!1;const n=e.src.charCodeAt(r+1);if(n!==33&&n!==63&&n!==47&&!S1(n))return!1;const i=e.src.slice(r).match(s1);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],D1(s.content)&&e.linkLevel++,F1(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const T1=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,M1=/^&([a-z][a-z0-9]{1,31});/i;function O1(e,t){const u=e.pos,r=e.posMax;if(e.src.charCodeAt(u)!==38||u+1>=r)return!1;if(e.src.charCodeAt(u+1)===35){const i=e.src.slice(u).match(T1);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=e.push("text_special","",0);o.content=cs(s)?rn(s):rn(65533),o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(u).match(M1);if(i){const s=_a(i[0]);if(s!==i[0]){if(!t){const o=e.push("text_special","",0);o.content=s,o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function Oo(e){const t={},u=e.length;if(!u)return;let r=0,n=-2;const i=[];for(let s=0;s<u;s++){const o=e[s];if(i.push(0),(e[r].marker!==o.marker||n!==o.token-1)&&(r=s),n=o.token,o.length=o.length||0,!o.close)continue;t.hasOwnProperty(o.marker)||(t[o.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[o.marker][(o.open?3:0)+o.length%3];let a=r-i[r]-1,c=a;for(;a>l;a-=i[a]+1){const f=e[a];if(f.marker===o.marker&&f.open&&f.end<0){let g=!1;if((f.close||o.open)&&(f.length+o.length)%3===0&&(f.length%3!==0||o.length%3!==0)&&(g=!0),!g){const p=a>0&&!e[a-1].open?i[a-1]+1:0;i[s]=s-a+p,i[a]=p,o.open=!1,f.end=s,f.close=!1,c=-1,n=-2;break}}}c!==-1&&(t[o.marker][(o.open?3:0)+(o.length||0)%3]=c)}}function P1(e){const t=e.tokens_meta,u=e.tokens_meta.length;Oo(e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&Oo(t[r].delimiters)}function R1(e){let t,u,r=0;const n=e.tokens,i=e.tokens.length;for(t=u=0;t<i;t++)n[t].nesting<0&&r--,n[t].level=r,n[t].nesting>0&&r++,n[t].type==="text"&&t+1<i&&n[t+1].type==="text"?n[t+1].content=n[t].content+n[t+1].content:(t!==u&&(n[u]=n[t]),u++);t!==u&&(n.length=u)}const ti=[["text",p1],["linkify",m1],["newline",b1],["escape",g1],["backticks",_1],["strikethrough",Aa.tokenize],["emphasis",$a.tokenize],["link",C1],["image",E1],["autolink",w1],["html_inline",I1],["entity",O1]],ui=[["balance_pairs",P1],["strikethrough",Aa.postProcess],["emphasis",$a.postProcess],["fragments_join",R1]];function $r(){this.ruler=new Be;for(let e=0;e<ti.length;e++)this.ruler.push(ti[e][0],ti[e][1]);this.ruler2=new Be;for(let e=0;e<ui.length;e++)this.ruler2.push(ui[e][0],ui[e][1])}$r.prototype.skipToken=function(e){const t=e.pos,u=this.ruler.getRules(""),r=u.length,n=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<n){for(let o=0;o<r;o++)if(e.level++,s=u[o](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};$r.prototype.tokenize=function(e){const t=this.ruler.getRules(""),u=t.length,r=e.posMax,n=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<n){for(let o=0;o<u;o++)if(s=t[o](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};$r.prototype.parse=function(e,t,u,r){const n=new this.State(e,t,u,r);this.tokenize(n);const i=this.ruler2.getRules(""),s=i.length;for(let o=0;o<s;o++)i[o](n)};$r.prototype.State=Ar;function V1(e){const t={};e=e||{},t.src_Any=pa.source,t.src_Cc=ha.source,t.src_Z=ba.source,t.src_P=ls.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const u="[><|]";return t.src_pseudo_letter="(?:(?!"+u+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+u+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+u+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+u+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Ei(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){u&&Object.keys(u).forEach(function(r){e[r]=u[r]})}),e}function Vn(e){return Object.prototype.toString.call(e)}function L1(e){return Vn(e)==="[object String]"}function N1(e){return Vn(e)==="[object Object]"}function q1(e){return Vn(e)==="[object RegExp]"}function Po(e){return Vn(e)==="[object Function]"}function B1(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const wa={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function z1(e){return Object.keys(e||{}).reduce(function(t,u){return t||wa.hasOwnProperty(u)},!1)}const j1={"http:":{validate:function(e,t,u){const r=e.slice(t);return u.re.http||(u.re.http=new RegExp("^\\/\\/"+u.re.src_auth+u.re.src_host_port_strict+u.re.src_path,"i")),u.re.http.test(r)?r.match(u.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,u){const r=e.slice(t);return u.re.no_http||(u.re.no_http=new RegExp("^"+u.re.src_auth+"(?:localhost|(?:(?:"+u.re.src_domain+")\\.)+"+u.re.src_domain_root+")"+u.re.src_port+u.re.src_host_terminator+u.re.src_path,"i")),u.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(u.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,u){const r=e.slice(t);return u.re.mailto||(u.re.mailto=new RegExp("^"+u.re.src_email_name+"@"+u.re.src_host_strict,"i")),u.re.mailto.test(r)?r.match(u.re.mailto)[0].length:0}}},U1="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",H1="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function K1(e){e.__index__=-1,e.__text_cache__=""}function W1(e){return function(t,u){const r=t.slice(u);return e.test(r)?r.match(e)[0].length:0}}function Ro(){return function(e,t){t.normalize(e)}}function nn(e){const t=e.re=V1(e.__opts__),u=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||u.push(U1),u.push(t.src_xn),t.src_tlds=u.join("|");function r(o){return o.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const n=[];e.__compiled__={};function i(o,l){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+l)}Object.keys(e.__schemas__).forEach(function(o){const l=e.__schemas__[o];if(l===null)return;const a={validate:null,link:null};if(e.__compiled__[o]=a,N1(l)){q1(l.validate)?a.validate=W1(l.validate):Po(l.validate)?a.validate=l.validate:i(o,l),Po(l.normalize)?a.normalize=l.normalize:l.normalize?i(o,l):a.normalize=Ro();return}if(L1(l)){n.push(o);return}i(o,l)}),n.forEach(function(o){e.__compiled__[e.__schemas__[o]]&&(e.__compiled__[o].validate=e.__compiled__[e.__schemas__[o]].validate,e.__compiled__[o].normalize=e.__compiled__[e.__schemas__[o]].normalize)}),e.__compiled__[""]={validate:null,normalize:Ro()};const s=Object.keys(e.__compiled__).filter(function(o){return o.length>0&&e.__compiled__[o]}).map(B1).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),K1(e)}function Z1(e,t){const u=e.__index__,r=e.__last_index__,n=e.__text_cache__.slice(u,r);this.schema=e.__schema__.toLowerCase(),this.index=u+t,this.lastIndex=r+t,this.raw=n,this.text=n,this.url=n}function Ai(e,t){const u=new Z1(e,t);return e.__compiled__[u.schema].normalize(u,e),u}function He(e,t){if(!(this instanceof He))return new He(e,t);t||z1(e)&&(t=e,e={}),this.__opts__=Ei({},wa,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Ei({},j1,e),this.__compiled__={},this.__tlds__=H1,this.__tlds_replaced__=!1,this.re={},nn(this)}He.prototype.add=function(t,u){return this.__schemas__[t]=u,nn(this),this};He.prototype.set=function(t){return this.__opts__=Ei(this.__opts__,t),this};He.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let u,r,n,i,s,o,l,a,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(u=l.exec(t))!==null;)if(i=this.testSchemaAt(t,u[2],l.lastIndex),i){this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(a=t.search(this.re.host_fuzzy_test),a>=0&&(this.__index__<0||a<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=t.indexOf("@"),c>=0&&(n=t.match(this.re.email_fuzzy))!==null&&(s=n.index+n[1].length,o=n.index+n[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o))),this.__index__>=0};He.prototype.pretest=function(t){return this.re.pretest.test(t)};He.prototype.testSchemaAt=function(t,u,r){return this.__compiled__[u.toLowerCase()]?this.__compiled__[u.toLowerCase()].validate(t,r,this):0};He.prototype.match=function(t){const u=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(u.push(Ai(this,r)),r=this.__last_index__);let n=r?t.slice(r):t;for(;this.test(n);)u.push(Ai(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return u.length?u:null};He.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const u=this.re.schema_at_start.exec(t);if(!u)return null;const r=this.testSchemaAt(t,u[2],u[0].length);return r?(this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+r,Ai(this,0)):null};He.prototype.tlds=function(t,u){return t=Array.isArray(t)?t:[t],u?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,n,i){return r!==i[n-1]}).reverse(),nn(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,nn(this),this)};He.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};He.prototype.onCompile=function(){};const Fu=2147483647,Et=36,ps=1,_r=26,G1=38,J1=700,Da=72,Fa=128,Sa="-",Y1=/^xn--/,X1=/[^\0-\x7F]/,Q1=/[\x2E\u3002\uFF0E\uFF61]/g,eh={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ri=Et-ps,At=Math.floor,ni=String.fromCharCode;function Bt(e){throw new RangeError(eh[e])}function th(e,t){const u=[];let r=e.length;for(;r--;)u[r]=t(e[r]);return u}function Ia(e,t){const u=e.split("@");let r="";u.length>1&&(r=u[0]+"@",e=u[1]),e=e.replace(Q1,".");const n=e.split("."),i=th(n,t).join(".");return r+i}function Ta(e){const t=[];let u=0;const r=e.length;for(;u<r;){const n=e.charCodeAt(u++);if(n>=55296&&n<=56319&&u<r){const i=e.charCodeAt(u++);(i&64512)==56320?t.push(((n&1023)<<10)+(i&1023)+65536):(t.push(n),u--)}else t.push(n)}return t}const uh=e=>String.fromCodePoint(...e),rh=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Et},Vo=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ma=function(e,t,u){let r=0;for(e=u?At(e/J1):e>>1,e+=At(e/t);e>ri*_r>>1;r+=Et)e=At(e/ri);return At(r+(ri+1)*e/(e+G1))},Oa=function(e){const t=[],u=e.length;let r=0,n=Fa,i=Da,s=e.lastIndexOf(Sa);s<0&&(s=0);for(let o=0;o<s;++o)e.charCodeAt(o)>=128&&Bt("not-basic"),t.push(e.charCodeAt(o));for(let o=s>0?s+1:0;o<u;){const l=r;for(let c=1,f=Et;;f+=Et){o>=u&&Bt("invalid-input");const g=rh(e.charCodeAt(o++));g>=Et&&Bt("invalid-input"),g>At((Fu-r)/c)&&Bt("overflow"),r+=g*c;const p=f<=i?ps:f>=i+_r?_r:f-i;if(g<p)break;const d=Et-p;c>At(Fu/d)&&Bt("overflow"),c*=d}const a=t.length+1;i=Ma(r-l,a,l==0),At(r/a)>Fu-n&&Bt("overflow"),n+=At(r/a),r%=a,t.splice(r++,0,n)}return String.fromCodePoint(...t)},Pa=function(e){const t=[];e=Ta(e);const u=e.length;let r=Fa,n=0,i=Da;for(const l of e)l<128&&t.push(ni(l));const s=t.length;let o=s;for(s&&t.push(Sa);o<u;){let l=Fu;for(const c of e)c>=r&&c<l&&(l=c);const a=o+1;l-r>At((Fu-n)/a)&&Bt("overflow"),n+=(l-r)*a,r=l;for(const c of e)if(c<r&&++n>Fu&&Bt("overflow"),c===r){let f=n;for(let g=Et;;g+=Et){const p=g<=i?ps:g>=i+_r?_r:g-i;if(f<p)break;const d=f-p,m=Et-p;t.push(ni(Vo(p+d%m,0))),f=At(d/m)}t.push(ni(Vo(f,0))),i=Ma(n,a,o===s),n=0,++o}++n,++r}return t.join("")},nh=function(e){return Ia(e,function(t){return Y1.test(t)?Oa(t.slice(4).toLowerCase()):t})},ih=function(e){return Ia(e,function(t){return X1.test(t)?"xn--"+Pa(t):t})},Ra={version:"2.3.1",ucs2:{decode:Ta,encode:uh},decode:Oa,encode:Pa,toASCII:ih,toUnicode:nh},sh={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},oh={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},lh={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},ah={default:sh,zero:oh,commonmark:lh},ch=/^(vbscript|javascript|file|data):/,fh=/^data:image\/(gif|png|jpeg|webp);/;function dh(e){const t=e.trim().toLowerCase();return ch.test(t)?fh.test(t):!0}const Va=["http:","https:","mailto:"];function ph(e){const t=os(e,!0);if(t.hostname&&(!t.protocol||Va.indexOf(t.protocol)>=0))try{t.hostname=Ra.toASCII(t.hostname)}catch{}return Er(ss(t))}function hh(e){const t=os(e,!0);if(t.hostname&&(!t.protocol||Va.indexOf(t.protocol)>=0))try{t.hostname=Ra.toUnicode(t.hostname)}catch{}return Pu(ss(t),Pu.defaultChars+"%")}function Qe(e,t){if(!(this instanceof Qe))return new Qe(e,t);t||as(e)||(t=e||{},e="default"),this.inline=new $r,this.block=new Rn,this.core=new fs,this.renderer=new Wu,this.linkify=new He,this.validateLink=dh,this.normalizeLink=ph,this.normalizeLinkText=hh,this.utils=bp,this.helpers=On({},vp),this.options={},this.configure(e),t&&this.set(t)}Qe.prototype.set=function(e){return On(this.options,e),this};Qe.prototype.configure=function(e){const t=this;if(as(e)){const u=e;if(e=ah[u],!e)throw new Error('Wrong `markdown-it` preset "'+u+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(u){e.components[u].rules&&t[u].ruler.enableOnly(e.components[u].rules),e.components[u].rules2&&t[u].ruler2.enableOnly(e.components[u].rules2)}),this};Qe.prototype.enable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(n){u=u.concat(this[n].ruler.enable(e,!0))},this),u=u.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(n){return u.indexOf(n)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Qe.prototype.disable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(n){u=u.concat(this[n].ruler.disable(e,!0))},this),u=u.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(n){return u.indexOf(n)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Qe.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Qe.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const u=new this.core.State(e,this,t);return this.core.process(u),u.tokens};Qe.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Qe.prototype.parseInline=function(e,t){const u=new this.core.State(e,this,t);return u.inlineMode=!0,this.core.process(u),u.tokens};Qe.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const mh=["innerHTML"],bh={__name:"MarkdownRenderer",props:{source:{type:String,default:""}},setup(e){const t=Qe();return(u,r)=>(K(),me("div",{class:"mb-3",innerHTML:Ut(t).render(e.source)},null,8,mh))}},La=e=>(xr("data-v-dd3ec837"),e=e(),kr(),e),gh=La(()=>M("div",{class:"formkit-wrapper required"},[M("label",{class:"form-label"},"Earning Criteria")],-1)),_h={class:"nav nav-tabs",role:"tablist"},yh={class:"nav-item",role:"presentation"},vh=["aria-selected"],xh={class:"nav-item",role:"presentation"},kh=["aria-selected"],Ch={class:"tab-content",id:"criteria-tab"},Eh=La(()=>M("label",{class:"mt-3 mb-2"},"Narrative Preview",-1)),Ah={__name:"AchievementCriteria",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se("");ge(t,()=>{u.value=t.value.narrative}),Hu(()=>{u.value=t.value.narrative?t.value.narrative:""});const r=se("edit");function n(i){r.value=i}return(i,s)=>{const o=ve("FormKit");return K(),me(Ee,null,[gh,M("ul",_h,[M("li",yh,[M("button",{class:Ze(["nav-link",{active:r.value==="edit"}]),type:"button",id:"edit-tab","aria-controls":"criteria-edit",role:"tab","aria-selected":r.value==="edit",onClick:s[0]||(s[0]=l=>n("edit"))},"Edit ",10,vh)]),M("li",xh,[M("button",{class:Ze(["nav-link",{active:r.value==="preview"}]),type:"button",id:"preview-tab","aria-controls":"criteria-preview",role:"tab","aria-selected":r.value==="preview",onClick:s[1]||(s[1]=l=>n("preview"))},"Preview ",10,kh)])]),M("div",Ch,[Ge(M("div",{class:Ze(["tab-pane fade",{show:r.value==="edit",active:r.value==="edit"}]),id:"criteria-edit",role:"tabpanel","aria-labelledby":"edit-tab"},[D(o,{type:"group",name:"criteria",modelValue:t.value,"onUpdate:modelValue":s[2]||(s[2]=l=>t.value=l)},{default:ae(()=>[D(o,{type:"textarea",label:"Narrative",name:"narrative",rows:"5",validation:"require_one:url",help:"A narrative of what is needed to earn the credential. Markdown is allowed."}),D(o,{type:"text",label:"Criteria URL",name:"url",validation:"require_one:narrative|url",help:"The URL of a webpage that describes in a human-readable format the criteria for the credential."})]),_:1},8,["modelValue"])],2),[[Ct,r.value==="edit"]]),Ge(M("div",{class:Ze(["tab-pane fade",{show:r.value==="preview",active:r.value==="preview"}]),id:"criteria-preview",role:"tabpanel","aria-labelledby":"preview-tab"},[Eh,D(bh,{source:u.value,class:"border rounded p-3"},null,8,["source"])],2),[[Ct,r.value==="preview"]])])],64)}}},$h=Ku(Ah,[["__scopeId","data-v-dd3ec837"]]),wh={class:"tab-pane fade show active",id:"tab-basic",role:"tabpanel","aria-labelledby":"basic-tab"},Dh=M("div",{class:"card mb-3"},[M("div",{class:"card-body"},[M("p",{class:"mb-0"},[we(" This tab contains all of the required fields for a credential."),M("br"),M("em",null,"Credential Type"),we(" and "),M("em",null,"Image"),we(" are not required, but it is suggested that all credentials have them. ")])])],-1),Fh={__name:"BasicTab",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),me("div",wh,[Dh,D(n,{type:"text",label:"Credential Name",name:"name","wrapper-class":"required",validation:"required:trim",modelValue:t.value.name,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value.name=i),help:"The name of the credential."},null,8,["modelValue"]),D(Fd,{modelValue:t.value.achievementType,"onUpdate:modelValue":r[1]||(r[1]=i=>t.value.achievementType=i)},null,8,["modelValue"]),D(da,{modelValue:t.value.image,"onUpdate:modelValue":r[2]||(r[2]=i=>t.value.image=i)},null,8,["modelValue"]),D(n,{type:"textarea",label:"Description",name:"description","wrapper-class":"required",rows:"5",validation:"required:trim",modelValue:t.value.description,"onUpdate:modelValue":r[3]||(r[3]=i=>t.value.description=i),help:"A short description of the achievement."},null,8,["modelValue"]),D($h,{modelValue:t.value.criteria,"onUpdate:modelValue":r[4]||(r[4]=i=>t.value.criteria=i)},null,8,["modelValue"])])}}},Sh={class:"tab-pane fade show active",id:"tab-detail",role:"tabpanel","aria-labelledby":"detail-tab"},Ih={__name:"DetailTab",props:{modelValue:{default:{humanCode:null,inLanguage:null,version:null,creditsAvailable:null,additionalType:null}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),me("div",Sh,[D(n,{type:"text",label:"Human Code",modelValue:t.value.humanCode,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value.humanCode=i),name:"humanCode",help:"The code, generally human readable, associated with an achievement."},null,8,["modelValue"]),D(n,{type:"text",label:"In Language",modelValue:t.value.inLanguage,"onUpdate:modelValue":r[1]||(r[1]=i=>t.value.inLanguage=i),name:"inLanguage",help:"The language this credential is in as a BCP47 language code, such as 'en', 'en-US', or 'es-MX'",validation:[["matches","/^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$/"]],"validation-messages":{matches:"The language must formatted as a BCP47 language code, such as 'en', 'en-US', or 'es-MX'."}},null,8,["modelValue"]),D(n,{type:"text",label:"Version",modelValue:t.value.version,"onUpdate:modelValue":r[2]||(r[2]=i=>t.value.version=i),name:"version",help:"The version property allows issuers to set a version string for an Achievement. This is particularly useful when replacing a previous version with an update."},null,8,["modelValue"]),D(n,{type:"number",label:"Credits Available",number:"",name:"creditsAvailable",modelValue:t.value.creditsAvailable,"onUpdate:modelValue":r[3]||(r[3]=i=>t.value.creditsAvailable=i),help:"Credit hours associated with this entity, or credit hours possible. For example 3.0."},null,8,["modelValue"]),D(n,{type:"text",label:"Specialization",modelValue:t.value.specialization,"onUpdate:modelValue":r[4]||(r[4]=i=>t.value.specialization=i),name:"specialization",help:"Name given to the focus, concentration, or specific area of study defined in the achievement. Examples include 'Entrepreneurship', 'Technical Communication', and 'Finance'."},null,8,["modelValue"]),D(n,{type:"text",label:"Field of Study",modelValue:t.value.fieldOfStudy,"onUpdate:modelValue":r[5]||(r[5]=i=>t.value.fieldOfStudy=i),name:"fieldOfStudy",help:"Category, subject, area of study, discipline, or general branch of knowledge. Examples include Business, Education, Psychology, and Technology."},null,8,["modelValue"])])}}},Th=Ku(Ih,[["__scopeId","data-v-2cf645b7"]]),Mh=["onClick"],Oh={class:"card mb-3"},Ph={class:"card-header"},Rh=["onClick"],Vh={class:"card-body pb-0"},Lh=M("span",{class:"input-group-text",id:"extended-prefix","aria-label":"ext:"},"ext:",-1),hs={__name:"AlignmentComponent",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),be(n,{type:"list",modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),name:"alignment",dynamic:""},{default:ae(({items:i,node:s,value:o})=>[M("h5",null,[we("Alignments "),M("button",{type:"button",onClick:()=>s.input(o.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Alignment ",8,Mh)]),(K(!0),me(Ee,null,hu(i,(l,a)=>(K(),be(n,{type:"group","wrapper-class":"card",key:l,index:a},{default:ae(()=>[M("div",Oh,[M("h5",Ph,[we("Target "+Zt(a+1)+" ",1),M("button",{type:"button",onClick:()=>s.input(o.filter((c,f)=>f!==a)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,Rh)]),M("div",Vh,[D(n,{type:"hidden",name:"type",value:["Alignment"]}),D(n,{type:"innerLabelTextInput",label:"Name",name:"targetName","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"Name of the alignment."}),D(n,{type:"innerLabelTextInput",label:"URL",name:"targetUrl","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim|url",help:"URL linking to the official description of the alignment target, for example an individual standard within an educatinoal framework."}),D(n,{type:"innerLabelTextInput",label:"Framework",name:"targetFramework","inner-class":"input-group","label-class":"input-group-text",help:"Name of the framework for the alignment target."}),D(n,{type:"innerLabelTextareaInput",label:"Description",name:"description",rows:"2","inner-class":"input-group","label-class":"input-group-text",help:"Short description of the alignment target."}),D(n,{type:"innerLabelTextInput",label:"Code",name:"targetCode","inner-class":"input-group","label-class":"input-group-text",help:"If applicable, a locally unique string identifier that identifies the alignment target within its framework and/or targetUrl."}),D(n,{type:"selectInputGroup",label:"Alignment Type",name:"targetType","inner-class":"input-group","label-class":"input-group-text","input-class":"$reset formkit-input form-select",placeholder:"Target Type",options:{"":"",CFItem:"CFItem",CFRubric:"CFRubric",CFRubricCriterion:"CFRubricCriterion",CFRubricCriterionLevel:"CFRubricCriterionLevel","ceasn:Competency":"ceasn:Competency","ceterms:Credential":"ceterms:Credential",CTDL:"CTDL",other:"Other (ext:)"},help:"The type of the alignment target node."},{suffix:ae(()=>[o[a].targetType==="other"?(K(),be(n,{key:0,type:"innerLabelTextInput",label:"Extended Type",name:"typeExt","aria-label":"Extended Alignment Type","inner-class":"input-group ms-3 me-5 pe-3","outer-class":"$reset","label-class":"visually-hidden",before:"ext:",validation:[["matches","/^[a-z|A-Z|0-9|.|-|_]+$/"]],placeholder:"Name of extended type"},{prefix:ae(()=>[Lh]),_:1})):Ve("",!0)]),_:2},1024)])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},Nh={__name:"AlignmentsComponent",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>(K(),be(hs,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n)},null,8,["modelValue"]))}};var Na=["__key","__init","__shim","__original","__index","__prevKey"];function Zu(){return Math.random().toString(36).substring(2,15)}function qh(e,t){return[...e instanceof Set?e:new Set(e)]}function Z(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Oe(e,t,u=!0,r=["__key"]){if(e===t)return!0;if(typeof t=="object"&&typeof e=="object"){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return Bh(e,t);if(e===null||t===null||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n of r)if((n in e||n in t)&&e[n]!==t[n])return!1;for(const n in e)if(!(n in t)||e[n]!==t[n]&&!u||u&&!Oe(e[n],t[n],u,r))return!1;return!0}return!1}function Bh(e,t){return e.source===t.source&&e.flags.split("").sort().join("")===t.flags.split("").sort().join("")}function Je(e){const t=typeof e;if(t==="number")return!1;if(e===void 0)return!0;if(t==="string")return e==="";if(t==="object"){if(e===null)return!0;for(const u in e)return!1;return!(e instanceof RegExp||e instanceof Date)}return!1}function zh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jh(e){const t=`^${zh(e)}$`,u={MM:"(0[1-9]|1[012])",M:"([1-9]|1[012])",DD:"([012][0-9]|3[01])",D:"([012]?[0-9]|3[01])",YYYY:"\\d{4}",YY:"\\d{2}"},r=Object.keys(u);return new RegExp(r.reduce((n,i)=>n.replace(i,u[i]),t))}function sn(e){return Object.prototype.toString.call(e)==="[object Object]"}function lr(e){return sn(e)||Array.isArray(e)}function Vu(e){if(sn(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const u=t.prototype;return!(sn(u)===!1||u.hasOwnProperty("isPrototypeOf")===!1)}var Jt=(e,t,u=!1,r=!1)=>{if(t===null)return null;const n={};if(typeof t=="string")return t;for(const i in e)if(Z(t,i)&&(t[i]!==void 0||!r)){if(u&&Array.isArray(e[i])&&Array.isArray(t[i])){n[i]=e[i].concat(t[i]);continue}if(t[i]===void 0)continue;Vu(e[i])&&Vu(t[i])?n[i]=Jt(e[i],t[i],u,r):n[i]=t[i]}else n[i]=e[i];for(const i in t)!Z(n,i)&&t[i]!==void 0&&(n[i]=t[i]);return n};function Uh(e){if(e[0]!=='"'&&e[0]!=="'"||e[0]!==e[e.length-1])return!1;const t=e[0];for(let u=1;u<e.length;u++)if(e[u]===t&&(u===1||e[u-1]!=="\\")&&u!==e.length-1)return!1;return!0}function Hh(e){if(!e.length)return"";let t="",u="";for(let r=0;r<e.length;r++){const n=e.charAt(r);(n!=="\\"||u==="\\")&&(t+=n),u=n}return t}function xu(...e){return e.reduce((t,u)=>{const{value:r,name:n,modelValue:i,config:s,plugins:o,...l}=u;return Object.assign(t,l)},{})}function Kh(e){const t=[];let u="",r=0,n="",i="";for(let s=0;s<e.length;s++){const o=e.charAt(s);o===n&&i!=="\\"?n="":(o==="'"||o==='"')&&!n&&i!=="\\"?n=o:o==="("&&!n?r++:o===")"&&!n&&r--,o===","&&!n&&r===0?(t.push(u),u=""):(o!==" "||n)&&(u+=o),i=o}return u&&t.push(u),t}function Lo(e,t){const u={},r=t.filter(i=>i instanceof RegExp),n=new Set(t);for(const i in e)!n.has(i)&&!r.some(s=>s.test(i))&&(u[i]=e[i]);return u}function No(e,t){const u={},r=t.filter(n=>n instanceof RegExp);return t.forEach(n=>{n instanceof RegExp||(u[n]=e[n])}),Object.keys(e).forEach(n=>{r.some(i=>i.test(n))&&(u[n]=e[n])}),u}function Su(e){return e.replace(/-([a-z0-9])/gi,(t,u)=>u.toUpperCase())}function qa(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,u,r)=>u+"-"+r.toLowerCase()).replace(" ","-").toLowerCase()}function $i(e,t=Na){if(e!==null&&typeof e=="object"){let u;if(Array.isArray(e)?u=[...e]:Vu(e)&&(u={...e}),u)return Zh(e,u,t),u}return e}function Lu(e,t=Na){if(e===null||e instanceof RegExp||e instanceof Date||e instanceof Map||e instanceof Set||typeof File=="function"&&e instanceof File)return e;let u;Array.isArray(e)?u=e.map(r=>typeof r=="object"?Lu(r,t):r):u=Object.keys(e).reduce((r,n)=>(r[n]=typeof e[n]=="object"?Lu(e[n],t):e[n],r),{});for(const r of t)r in e&&Object.defineProperty(u,r,{enumerable:!1,value:e[r]});return u}function ot(e){return typeof e=="object"?Lu(e):e}function Wh(e,t){if(!e||typeof e!="object")return null;const u=t.split(".");let r=e;for(const n in u){const i=u[n];if(Z(r,i)&&(r=r[i]),+n===u.length-1)return r;if(!r||typeof r!="object")return null}return null}function lt(e){return e!==void 0&&e!=="false"&&e!==!1?!0:void 0}function Nu(e){return Object.isFrozen(e)?e:Object.defineProperty(e,"__init",{enumerable:!1,value:!0})}function ms(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function Zh(e,t,u){for(const r of u)r in e&&Object.defineProperty(t,r,{enumerable:!1,value:e[r]});return t}function Gh(e){let t=!1;return(...u)=>{if(!t)return t=!0,queueMicrotask(()=>t=!1),e(...u)}}function Jh(e){if(!(e==="false"||e===!1))return!0}function bs(){const e=[];let t=0;const u=n=>e.push(n),r=n=>{const i=e[t];return typeof i=="function"?i(n,s=>(t++,r(s))):(t=0,n)};return u.dispatch=r,u.unshift=n=>e.unshift(n),u.remove=n=>{const i=e.indexOf(n);i>-1&&e.splice(i,1)},u}function Ba(){const e=new Map,t=new Map;let u;const r=(n,i)=>{if(u){u.set(i.name,[n,i]);return}e.has(i.name)&&e.get(i.name).forEach(s=>{(i.origin===n||s.modifiers.includes("deep"))&&s.listener(i)}),i.bubble&&n.bubble(i)};return r.flush=()=>{e.clear(),t.clear(),u==null||u.clear()},r.on=(n,i,s="push")=>{const[o,...l]=n.split("."),a=i.receipt||Zu(),c={modifiers:l,event:o,listener:i,receipt:a};return e.has(o)?e.get(o)[s](c):e.set(o,[c]),t.has(a)?t.get(a)[s](o):t.set(a,[o]),a},r.off=n=>{var i;t.has(n)&&((i=t.get(n))==null||i.forEach(s=>{const o=e.get(s);Array.isArray(o)&&e.set(s,o.filter(l=>l.receipt!==n))}),t.delete(n))},r.pause=n=>{u||(u=new Map),n&&n.walk(i=>i._e.pause())},r.play=n=>{if(!u)return;const i=u;u=void 0,i.forEach(([s,o])=>r(s,o)),n&&n.walk(s=>s._e.play())},r}function Yh(e,t,u,r,n=!0,i){return t._e(e,{payload:r,name:u,bubble:n,origin:e,meta:i}),e}function Xh(e,t,u){return Dr(e.parent)&&e.parent._e(e.parent,u),e}function Qh(e,t,u,r,n){return t._e.on(u,r,n)}function em(e,t,u){return t._e.off(u),e}var gs=bs();gs((e,t)=>(e.message||(e.message=`E${e.code}`),t(e)));var _s=bs();_s((e,t)=>{e.message||(e.message=`W${e.code}`);const u=t(e);return console&&typeof console.warn=="function"&&console.warn(u.message),u});function mu(e,t={}){_s.dispatch({code:e,data:t})}function Ue(e,t={}){throw Error(gs.dispatch({code:e,data:t}).message)}function Ke(e,t){return{blocking:!1,key:Zu(),meta:{},type:"state",visible:!0,...e}}var qo={apply:sm,set:um,remove:za,filter:nm,reduce:im,release:am,touch:rm};function tm(e=!1){const t={};let u,r=e,n=[];const i=new Map;let s;const o=new Proxy(t,{get(...l){const[a,c]=l;return c==="buffer"?r:c==="_b"?n:c==="_m"?i:c==="_r"?s:Z(qo,c)?qo[c].bind(null,t,o,u):Reflect.get(...l)},set(l,a,c){return a==="_n"?(u=c,s==="__n"&&ja(u,o),!0):a==="_b"?(n=c,!0):a==="buffer"?(r=c,!0):a==="_r"?(s=c,!0):(Ue(101,u),!1)}});return o}function um(e,t,u,r){if(t.buffer)return t._b.push([[r]]),t;if(e[r.key]!==r){if(typeof r.value=="string"&&r.meta.localize!==!1){const i=r.value;r.value=u.t(r),r.value!==i&&(r.meta.locale=u.props.locale)}const n=`message-${Z(e,r.key)?"updated":"added"}`;e[r.key]=Object.freeze(u.hook.message.dispatch(r)),u.emit(n,r)}return t}function rm(e,t){for(const u in e){const r={...e[u]};t.set(r)}}function za(e,t,u,r){if(Z(e,r)){const n=e[r];delete e[r],u.emit("message-removed",n)}return t.buffer===!0&&(t._b=t._b.filter(n=>(n[0]=n[0].filter(i=>i.key!==r),n[1]||n[0].length))),t}function nm(e,t,u,r,n){for(const i in e){const s=e[i];(!n||s.type===n)&&!r(s)&&za(e,t,u,i)}}function im(e,t,u,r,n){for(const i in e){const s=e[i];n=r(n,s)}return n}function sm(e,t,u,r,n){if(Array.isArray(r)){if(t.buffer){t._b.push([r,n]);return}const i=new Set(r.map(s=>(t.set(s),s.key)));typeof n=="string"?t.filter(s=>s.type!==n||i.has(s.key)):typeof n=="function"&&t.filter(s=>!n(s)||i.has(s.key))}else for(const i in r){const s=u.at(i);s?s.store.apply(r[i],n):lm(u,t,i,r[i],n)}}function om(e,...t){const u=`${e.name}-set`,r=n=>Ke({key:ms(n),type:"error",value:n,meta:{source:u,autoClear:!0}});return t.filter(n=>!!n).map(n=>{if(typeof n=="string"&&(n=[n]),Array.isArray(n))return n.map(i=>r(i));{const i={};for(const s in n)Array.isArray(n[s])?i[s]=n[s].map(o=>r(o)):i[s]=[r(n[s])];return i}})}function lm(e,t,u,r,n){var s;const i=t._m;i.has(u)||i.set(u,[]),t._r||(t._r=ja(e,t)),(s=i.get(u))==null||s.push([r,n])}function ja(e,t){return e.on("child.deep",({payload:u})=>{t._m.forEach((r,n)=>{e.at(n)===u&&(r.forEach(([i,s])=>{u.store.apply(i,s)}),t._m.delete(n))}),t._m.size===0&&t._r&&(e.off(t._r),t._r=void 0)})}function am(e,t){t.buffer=!1,t._b.forEach(([u,r])=>t.apply(u,r)),t._b=[]}function cm(){const e={};let t;return{count:(...u)=>fm(t,e,...u),init(u){t=u,u.on("message-added.deep",Bo(e,1)),u.on("message-removed.deep",Bo(e,-1))},merge:u=>zo(t,e,u),settled(u){return Z(e,u)?e[u].promise:Promise.resolve()},unmerge:u=>zo(t,e,u,!0),value(u){return Z(e,u)?e[u].count:0}}}function fm(e,t,u,r,n=0){if(r=dm(r||u),!Z(t,u)){const i={condition:r,count:0,name:u,node:e,promise:Promise.resolve(),resolve:()=>{}};t[u]=i,n=e.store.reduce((s,o)=>s+i.condition(o)*1,n),e.each(s=>{s.ledger.count(i.name,i.condition),n+=s.ledger.value(i.name)})}return Ua(t[u],n).promise}function dm(e){return typeof e=="function"?e:t=>t.type===e}function Ua(e,t){const u=e.count,r=e.count+t;return e.count=r,u===0&&r!==0?(e.node.emit(`unsettled:${e.name}`,e.count,!1),e.promise=new Promise(n=>e.resolve=n)):u!==0&&r===0&&(e.node.emit(`settled:${e.name}`,e.count,!1),e.resolve()),e.node.emit(`count:${e.name}`,e.count,!1),e}function Bo(e,t){return u=>{for(const r in e){const n=e[r];n.condition(u.payload)&&Ua(n,t)}}}function zo(e,t,u,r=!1){const n=e;for(const i in t){const s=t[i].condition;r||u.ledger.count(i,s);const o=u.ledger.value(i)*(r?-1:1);if(e){do e.ledger.count(i,s,o),e=e.parent;while(e);e=n}}}var ys=new Map,jr=new Map,vs=Ba();function pm(e){e.props.id&&(ys.set(e.props.id,e),jr.set(e,e.props.id),vs(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function hm(e){if(jr.has(e)){const t=jr.get(e);jr.delete(e),ys.delete(t),vs(e,{payload:null,name:t,bubble:!1,origin:e})}}function wr(e){return ys.get(e)}function mm(e,t){return vs.on(e,t)}function wi(e,t,u){let r=!0;return t in e.config._t?r=!1:e.emit(`config:${t}`,u,!1),t in e.props||(e.emit("prop",{prop:t,value:u}),e.emit(`prop:${t}`,u)),r}function bm(e={}){const t=new Set,u={...e,_add:n=>t.add(n),_rm:n=>t.delete(n)};return new Proxy(u,{set(n,i,s,o){return typeof i=="string"&&t.forEach(l=>wi(l,i,s)),Reflect.set(n,i,s,o)}})}function Ha(e,t){const u=(t||document).getElementById(e);if(u instanceof HTMLFormElement){const r=new Event("submit",{cancelable:!0,bubbles:!0});u.dispatchEvent(r);return}mu(151,e)}function gm(e){const t=u=>{for(const r in u.store){const n=u.store[r];n.type==="error"||n.type==="ui"&&r==="incomplete"?u.store.remove(r):n.type==="state"&&u.store.set({...n,value:!1})}};t(e),e.walk(t)}function Ka(e,t){const u=typeof e=="string"?wr(e):e;if(u){const r=s=>ot(s.props.initial)||(s.type==="group"?{}:s.type==="list"?[]:void 0);u._e.pause(u);const n=ot(t);return t&&!Je(t)&&(u.props.initial=lr(n)?Nu(n):n,u.props._init=u.props.initial),u.input(r(u),!1),u.walk(s=>{s.type==="list"&&s.sync||s.input(r(s),!1)}),u.input(Je(n)&&n?n:r(u),!1),u.type!=="input"&&t&&!Je(t)&&lr(t)&&u.walk(s=>{s.props.initial=lr(s.value)?Nu(s.value):s.value,s.props._init=s.props.initial}),u._e.play(u),gm(u),u.emit("reset",u),u}mu(152,e)}var _m={delimiter:".",delay:0,locale:"en",rootClasses:e=>({[`formkit-${qa(e)}`]:!0})},Wa=Symbol("index"),Di=Symbol("removed"),Fi=Symbol("moved"),Za=Symbol("inserted");function ym(e){return e.type==="list"&&Array.isArray(e._value)}function Dr(e){return e&&typeof e=="object"&&e.__FKNode__===!0}var Ur=(e,t,u)=>{Ue(102,[e,u])},vm={_c:ne(Bm,Ur,!1),add:ne(Mm),addProps:ne(Tm),address:ne(jm,Ur,!1),at:ne(Um),bubble:ne(Xh),clearErrors:ne(Qm),calm:ne(Fm),config:ne(!1),define:ne(Im),disturb:ne(Dm),destroy:ne(Sm),extend:ne(tb),hydrate:ne($m),index:ne(qm,Nm,!1),input:ne(Ya),each:ne(Rm),emit:ne(Yh),find:ne(Km),on:ne(Qh),off:ne(em),parent:ne(!1,Om),plugins:ne(!1),remove:ne(Pm),root:ne(Zm,Ur,!1),reset:ne(Ym),resetConfig:ne(Lm),setErrors:ne(Xm),submit:ne(Jm),t:ne(Gm),use:ne(xs),name:ne(zm,!1,!1),walk:ne(Vm)};function xm(){return new Map(Object.entries(vm))}function ne(e,t,u=!0){return{get:e?(r,n)=>u?(...i)=>e(r,n,...i):e(r,n):!1,set:t!==void 0?t:Ur.bind(null)}}function km(){const e=new Map;return new Proxy(e,{get(t,u){return e.has(u)||e.set(u,bs()),e.get(u)}})}var Ga=0,Cm=0;function Em(e){var t,u;return((t=e.parent)==null?void 0:t.type)==="list"?Wa:e.name||`${((u=e.props)==null?void 0:u.type)||"input"}_${++Ga}`}function Ja(e){return e.type==="group"?Nu(e.value&&typeof e.value=="object"&&!Array.isArray(e.value)?e.value:{}):e.type==="list"?Nu(Array.isArray(e.value)?e.value:[]):e.value}function Ya(e,t,u,r=!0){return t._value=Am(e,e.hook.input.dispatch(u)),e.emit("input",t._value),e.isCreated&&e.type==="input"&&Oe(t._value,t.value)&&!e.props.mergeStrategy?(e.emit("commitRaw",t.value),t.settled):(t.isSettled&&e.disturb(),r?(t._tmo&&clearTimeout(t._tmo),t._tmo=setTimeout(on,e.props.delay,e,t)):on(e,t),t.settled)}function Am(e,t){switch(e.type){case"input":break;case"group":(!t||typeof t!="object")&&Ue(107,[e,t]);break;case"list":Array.isArray(t)||Ue(108,[e,t]);break}return t}function on(e,t,u=!0,r=!0){t._value=t.value=e.hook.commit.dispatch(t._value),e.type!=="input"&&r&&e.hydrate(),e.emit("commitRaw",t.value),e.emit("commit",t.value),u&&e.calm()}function Xa(e,{name:t,value:u,from:r}){if(!Object.isFrozen(e._value)){if(ym(e)){const n=u===Di?[]:u===Fi&&typeof r=="number"?e._value.splice(r,1):[u];e._value.splice(t,u===Fi||r===Za?0:1,...n);return}u!==Di?e._value[t]=u:delete e._value[t]}}function $m(e,t){const u=t._value;return e.type==="list"&&e.sync&&wm(e,t),t.children.forEach(r=>{if(typeof u=="object")if(r.name in u){const n=r.type!=="input"||u[r.name]&&typeof u[r.name]=="object"?Nu(u[r.name]):u[r.name];if(!r.isSettled||(!lr(n)||r.props.mergeStrategy)&&Oe(n,r._value))return;r.input(n,!1)}else(e.type!=="list"||typeof r.name=="number")&&Xa(t,{name:r.name,value:r.value}),u.__init||(r.type==="group"?r.input({},!1):r.type==="list"?r.input([],!1):r.input(void 0,!1))}),e}function wm(e,t){const u=e._value;if(!Array.isArray(u))return;const r=[],n=new Set(t.children),i=new Map;u.forEach((o,l)=>{if(t.children[l]&&t.children[l]._value===o)r.push(t.children[l]),n.delete(t.children[l]);else{r.push(null);const a=i.get(o)||[];a.push(l),i.set(o,a)}}),n.size&&i.size&&n.forEach(o=>{if(i.has(o._value)){const l=i.get(o._value),a=l.shift();r[a]=o,n.delete(o),l.length||i.delete(o._value)}});const s=[];for(i.forEach(o=>{s.push(...o)});n.size&&s.length;){const o=n.values().next().value,l=s.shift();if(l===void 0)break;r[l]=o,n.delete(o)}s.forEach((o,l)=>{r[o]=ib({value:l})}),n.size&&n.forEach(o=>{if(!("__FKP"in o)){const l=o._c.parent;if(!l||sb(l))return;l.ledger.unmerge(o),o._c.parent=null,o.destroy()}}),t.children=r}function Dm(e,t){var u;return t._d<=0&&(t.isSettled=!1,e.emit("settled",!1,!1),t.settled=new Promise(r=>{t._resolve=r}),e.parent&&((u=e.parent)==null||u.disturb())),t._d++,e}function Fm(e,t,u){var r;if(u!==void 0&&e.type!=="input"){Xa(t,u);const n=!!(e.config.mergeStrategy&&e.config.mergeStrategy[u.name]);return on(e,t,!0,n)}t._d>0&&t._d--,t._d===0&&(t.isSettled=!0,e.emit("settled",!0,!1),e.parent&&((r=e.parent)==null||r.calm({name:e.name,value:t.value})),t._resolve&&t._resolve(t.value))}function Sm(e,t){e.emit("destroying",e),e.store.filter(()=>!1),e.parent&&e.parent.remove(e),hm(e),e.emit("destroyed",e),t._e.flush(),t._value=t.value=void 0;for(const u in t.context)delete t.context[u];t.plugins.clear(),t.context=null}function Im(e,t,u){t.type=u.type;const r=Lu(u);e.props.__propDefs=Qa(e.props.__propDefs??[],(r==null?void 0:r.props)||[]),r.props=e.props.__propDefs,t.props.definition=r,t.value=t._value=Ja({type:e.type,value:t.value}),u.forceTypeProp&&(e.props.type&&(e.props.originalType=e.props.type),t.props.type=u.forceTypeProp),u.family&&(t.props.family=u.family),u.features&&u.features.forEach(n=>n(e)),u.props&&e.addProps(u.props),e.emit("defined",u)}function Tm(e,t,u){const r=Array.isArray(u)?u:Object.keys(u),n=Array.isArray(u)?{}:r.reduce((s,o)=>("default"in u[o]&&(s[o]=u[o].default),s),{});if(e.props.attrs){const s={...e.props.attrs};e.props._emit=!1;for(const l in s){const a=Su(l);r.includes(a)&&(e.props[a]=s[l],delete s[l])}Array.isArray(u)||r.forEach(l=>{"default"in u[l]&&e.props[l]===void 0&&(e.props[l]=n[l])});const o=ot(t._value);e.props.initial=e.type!=="input"?Nu(o):o,e.props._emit=!0,e.props.attrs=s}const i=Qa(e.props.__propDefs??[],u);return e.props.definition&&(e.props.definition.props=i),e.props.__propDefs=i,e.emit("added-props",u),e}function Si(e){return Array.isArray(e)?e.reduce((t,u)=>(t[u]={},t),{}):e}function Qa(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):Jt(Si(e),Si(t))}function Mm(e,t,u,r){if(e.type==="input"&&Ue(100,e),u.parent&&u.parent!==e&&u.parent.remove(u),!t.children.includes(u)){if(r!==void 0&&e.type==="list"){const n=t.children[r];n&&"__FKP"in n?(u._c.uid=n.uid,t.children.splice(r,1,u)):t.children.splice(r,0,u),Array.isArray(e.value)&&e.value.length<t.children.length&&e.disturb().calm({name:r,value:u.value,from:Za})}else t.children.push(u);u.isSettled||e.disturb()}if(u.parent!==e){if(u.parent=e,u.parent!==e)return e.remove(u),u.parent.add(u),e}else u.use(e.plugins);return on(e,t,!1),e.ledger.merge(u),e.emit("child",u),e}function Om(e,t,u,r){return Dr(r)?(e.parent&&e.parent!==r&&e.parent.remove(e),t.parent=r,e.resetConfig(),r.children.includes(e)?e.use(r.plugins):r.add(e),!0):r===null?(t.parent=null,!0):!1}function Pm(e,t,u){const r=t.children.indexOf(u);if(r!==-1){u.isSettled&&e.disturb(),t.children.splice(r,1);let n=lt(u.props.preserve),i=u.parent;for(;n===void 0&&i;)n=lt(i.props.preserve),i=i.parent;n?e.calm():e.calm({name:e.type==="list"?r:u.name,value:Di}),u.parent=null,u.config._rmn=u}return e.ledger.unmerge(u),e.emit("childRemoved",u),e}function Rm(e,t,u){t.children.forEach(r=>!("__FKP"in r)&&u(r))}function Vm(e,t,u,r=!1,n=!1){t.children.some(i=>{if("__FKP"in i)return!1;const s=u(i);return r&&s===!1?!0:n&&s===!1?!1:i.walk(u,r,n)})}function Lm(e,t){const u=e.parent||void 0;t.config=ec(e.config._t,u),e.walk(r=>r.resetConfig())}function xs(e,t,u,r=!0,n=!0){return Array.isArray(u)||u instanceof Set?(u.forEach(i=>xs(e,t,i)),e):(t.plugins.has(u)||(n&&typeof u.library=="function"&&u.library(e),r&&u(e)!==!1&&(t.plugins.add(u),e.children.forEach(i=>i.use(u)))),e)}function Nm(e,t,u,r){if(Dr(e.parent)){const n=e.parent.children,i=r>=n.length?n.length-1:r<0?0:r,s=n.indexOf(e);return s===-1?!1:(n.splice(s,1),n.splice(i,0,e),e.parent.children=n,e.parent.type==="list"&&e.parent.disturb().calm({name:i,value:Fi,from:s}),!0)}return!1}function qm(e){if(e.parent){const t=[...e.parent.children].indexOf(e);return t===-1?e.parent.children.length:t}return-1}function Bm(e,t){return t}function zm(e,t){var u;return((u=e.parent)==null?void 0:u.type)==="list"?e.index:t.name!==Wa?t.name:e.index}function jm(e,t){return t.parent?t.parent.address.concat([e.name]):[e.name]}function Um(e,t,u){const r=typeof u=="string"?u.split(e.config.delimiter):u;if(!r.length)return;const n=r[0];let i=e.parent;for(i||(String(r[0])===String(e.name)&&r.shift(),i=e),n==="$parent"&&r.shift();i&&r.length;){const s=r.shift();switch(s){case"$root":i=e.root;break;case"$parent":i=i.parent;break;case"$self":i=e;break;default:i=i.children.find(o=>!("__FKP"in o)&&String(o.name)===String(s))||Hm(i,s)}}return i||void 0}function Hm(e,t){const u=String(t).match(/^(find)\((.*)\)$/);if(u){const[,r,n]=u,i=n.split(",").map(s=>s.trim());switch(r){case"find":return e.find(i[0],i[1]);default:return}}}function Km(e,t,u,r){return Wm(e,u,r)}function Wm(e,t,u="name"){const r=typeof u=="string"?i=>i[u]==t:u,n=[e];for(;n.length;){const i=n.shift();if(!("__FKP"in i)){if(r(i,t))return i;n.push(...i.children)}}}function Zm(e){let t=e;for(;t.parent;)t=t.parent;return t}function ec(e={},t){let u;return new Proxy(e,{get(...r){const n=r[1];if(n==="_t")return e;const i=Reflect.get(...r);if(i!==void 0)return i;if(t){const s=t.config[n];if(s!==void 0)return s}if(e.rootConfig&&typeof n=="string"){const s=e.rootConfig[n];if(s!==void 0)return s}return n==="delay"&&(u==null?void 0:u.type)==="input"?20:_m[n]},set(...r){const n=r[1],i=r[2];if(n==="_n")return u=i,e.rootConfig&&e.rootConfig._add(u),!0;if(n==="_rmn")return e.rootConfig&&e.rootConfig._rm(u),u=void 0,!0;if(!Oe(e[n],i,!1)){const s=Reflect.set(...r);return u&&(u.emit(`config:${n}`,i,!1),wi(u,n,i),u.walk(o=>wi(o,n,i),!1,!0)),s}return!0}})}function Gm(e,t,u,r="ui"){const n=typeof u=="string"?{key:u,value:u,type:r}:u,i=e.hook.text.dispatch(n);return e.emit("text",i,!1),i.value}function Jm(e){const t=e.name;do{if(e.props.isForm===!0)break;e.parent||Ue(106,t),e=e.parent}while(e);e.props.id&&Ha(e.props.id,e.props.__root)}function Ym(e,t,u){return Ka(e,u)}function Xm(e,t,u,r){const n=`${e.name}-set`,i=e.hook.setErrors.dispatch({localErrors:u,childErrors:r});return om(e,i.localErrors,i.childErrors).forEach(s=>{e.store.apply(s,o=>o.meta.source===n)}),e}function Qm(e,t,u=!0,r){return e.store.filter(n=>!(r===void 0||n.meta.source===r),"error"),u&&(r=r||`${e.name}-set`,e.walk(n=>{n.store.filter(i=>!(i.type==="error"&&i.meta&&i.meta.source===r))})),e}function eb(e){const t={initial:typeof e=="object"?ot(e):e};let u,r=!0,n={};return new Proxy(t,{get(...i){var c,f,g,p;const[s,o]=i;let l;Z(t,o)?(l=Reflect.get(...i),(c=n[o])!=null&&c.boolean&&(l=Jh(l))):u&&typeof o=="string"&&u.config[o]!==void 0?(l=u.config[o],o==="mergeStrategy"&&(u==null?void 0:u.type)==="input"&&sn(l)&&u.name in l&&(l=l[u.name])):l=(f=n[o])==null?void 0:f.default;const a=(g=n[o])==null?void 0:g.getter;return(p=n[o])!=null&&p.boolean&&(l=!!l),a?a(l,u):l},set(i,s,o,l){var g;if(s==="_n")return u=o,!0;if(s==="_emit")return r=o,!0;let{prop:a,value:c}=u.hook.prop.dispatch({prop:s,value:o});const f=(g=n[a])==null?void 0:g.setter;if(c=f?f(c,u):c,!Oe(t[a],c,!1)||typeof c=="object"){const p=Reflect.set(i,a,c,l);return a==="__propDefs"&&(n=Si(c)),r&&(u.emit("prop",{prop:a,value:c}),typeof a=="string"&&u.emit(`prop:${a}`,c)),p}return!0}})}function tb(e,t,u,r){return t.traps.set(u,r),e}function ub(e,t){if(e.props.definition)return e.define(e.props.definition);for(const u of t){if(e.props.definition)return;typeof u.library=="function"&&u.library(e)}}function rb(e){const t=Ja(e),u=ec(e.config||{},e.parent);return{_d:0,_e:Ba(),uid:Symbol(),_resolve:!1,_tmo:!1,_value:t,children:qh(e.children||[]),config:u,hook:km(),isCreated:!1,isSettled:!0,ledger:cm(),name:Em(e),parent:e.parent||null,plugins:new Set,props:eb(t),settled:Promise.resolve(t),store:tm(!0),sync:e.sync||!1,traps:xm(),type:e.type||"input",value:t}}function nb(e,t){var r,n;const u=(r=t.props)==null?void 0:r.id;if(u||(n=t.props)==null||delete n.id,e.ledger.init(e.store._n=e.props._n=e.config._n=e),e.props._emit=!1,Object.assign(e.props,u?{}:{id:`input_${Cm++}`},t.props??{}),e.props._emit=!0,ub(e,new Set([...t.plugins||[],...e.parent?e.parent.plugins:[]])),t.plugins)for(const i of t.plugins)xs(e,e._c,i,!0,!1);return e.each(i=>e.add(i)),e.parent&&e.parent.add(e,t.index),e.type==="input"&&e.children.length&&Ue(100,e),Ya(e,e._c,e._value,!1),e.store.release(),u&&pm(e),e.emit("created",e),e.isCreated=!0,e}function ib(e){return{__FKP:!0,uid:Symbol(),name:(e==null?void 0:e.name)??`p_${Ga++}`,value:(e==null?void 0:e.value)??null,_value:(e==null?void 0:e.value)??null,type:(e==null?void 0:e.type)??"input",props:{},use:()=>{},input(t){return this._value=t,this.value=t,Promise.resolve()},isSettled:!0}}function sb(e){return"__FKP"in e}function ob(e){const t=e||{},u=rb(t),r=new Proxy(u,{get(...n){const[,i]=n;if(i==="__FKNode__")return!0;const s=u.traps.get(i);return s&&s.get?s.get(r,u):Reflect.get(...n)},set(...n){const[,i,s]=n,o=u.traps.get(i);return o&&o.set?o.set(r,u,i,s):Reflect.set(...n)}});return nb(r,t)}function Ii(e){return typeof e!="string"&&Z(e,"$el")}function Ti(e){return typeof e!="string"&&Z(e,"$cmp")}function ku(e){return!e||typeof e=="string"?!1:Z(e,"if")&&Z(e,"then")}function lb(e){return typeof e!="string"&&"$formkit"in e}function ab(e){if(typeof e=="string")return{$el:"text",children:e};if(lb(e)){const{$formkit:t,for:u,if:r,children:n,bind:i,...s}=e;return Object.assign({$cmp:"FormKit",props:{...s,type:t}},r?{if:r}:{},u?{for:u}:{},n?{children:n}:{},i?{bind:i}:{})}return e}function it(e){let t;const u=new Set,r=function(y,v){return typeof y=="function"?y(v):y},n=[{"&&":(m,y,v)=>r(m,v)&&r(y,v),"||":(m,y,v)=>r(m,v)||r(y,v)},{"===":(m,y,v)=>r(m,v)===r(y,v),"!==":(m,y,v)=>r(m,v)!==r(y,v),"==":(m,y,v)=>r(m,v)==r(y,v),"!=":(m,y,v)=>r(m,v)!=r(y,v),">=":(m,y,v)=>r(m,v)>=r(y,v),"<=":(m,y,v)=>r(m,v)<=r(y,v),">":(m,y,v)=>r(m,v)>r(y,v),"<":(m,y,v)=>r(m,v)<r(y,v)},{"+":(m,y,v)=>r(m,v)+r(y,v),"-":(m,y,v)=>r(m,v)-r(y,v)},{"*":(m,y,v)=>r(m,v)*r(y,v),"/":(m,y,v)=>r(m,v)/r(y,v),"%":(m,y,v)=>r(m,v)%r(y,v)}],i=n.reduce((m,y)=>m.concat(Object.keys(y)),[]),s=new Set(i.map(m=>m.charAt(0)));function o(m,y,v,k){const A=m.filter(x=>x.startsWith(y));return A.length?A.find(x=>k.length>=v+x.length&&k.substring(v,v+x.length)===x?x:!1):!1}function l(m,y,v=1){let k=v?y.substring(m+1).trim():y.substring(0,m).trim();if(!k.length)return-1;if(!v){const x=k.split("").reverse(),w=x.findIndex(b=>s.has(b));k=x.slice(w).join("")}const A=k[0];return n.findIndex(x=>{const w=Object.keys(x);return!!o(w,A,0,k)})}function a(m,y){let v="";const k=y.length;let A=0;for(let x=m;x<k;x++){const w=y.charAt(x);if(w==="(")A++;else if(w===")")A--;else if(A===0&&w===" ")continue;if(A===0&&o(i,w,x,y))return[v,x-1];v+=w}return[v,y.length-1]}function c(m,y=0){const v=n[y],k=m.length,A=Object.keys(v);let x=0,w=!1,b=null,C="",L=null,G,Y="",J="",E="",N="",z=0;const ee=(H,j)=>{H?E+=j:C+=j};for(let H=0;H<k;H++)if(Y=J,J=m.charAt(H),(J==="'"||J==='"')&&Y!=="\\"&&(x===0&&!w||x&&!N)){x?N=J:w=J,ee(x,J);continue}else if(w&&(J!==w||Y==="\\")||N&&(J!==N||Y==="\\")){ee(x,J);continue}else if(w===J){w=!1,ee(x,J);continue}else if(N===J){N=!1,ee(x,J);continue}else{if(J===" ")continue;if(J==="(")x===0?z=H:E+=J,x++;else if(J===")")if(x--,x===0){const j=typeof C=="string"&&C.startsWith("$")?C:void 0,re=j&&m.charAt(H+1)===".";let xe="";re&&([xe,H]=a(H+2,m));const rt=b?y:l(z,m,0),Ie=l(H,m);rt===-1&&Ie===-1?(C=f(E,-1,j,xe),typeof C=="string"&&(C=E)):b&&(rt>=Ie||Ie===-1)&&y===rt?(L=b.bind(null,f(E,-1,j,xe)),b=null,C=""):Ie>rt&&y===Ie?C=f(E,-1,j,xe):C+=`(${E})${re?`.${xe}`:""}`,E=""}else E+=J;else if(x===0&&(G=o(A,J,H,m))){H===0&&Ue(103,[G,m]),H+=G.length-1,H===m.length-1&&Ue(104,[G,m]),b?C&&(L=b.bind(null,f(C,y)),b=v[G].bind(null,L),C=""):L?(b=v[G].bind(null,f(L,y)),L=null):(b=v[G].bind(null,f(C,y)),C="");continue}else ee(x,J)}return C&&b&&(b=b.bind(null,f(C,y))),b=!b&&L?L:b,!b&&C&&(b=(H,j)=>typeof H=="function"?H(j):H,b=b.bind(null,f(C,y))),!b&&!C&&Ue(105,m),b}function f(m,y,v,k){if(v){const A=f(v,n.length);let x,w=k?it(`$${k}`):!1;if(typeof A=="function"){const b=Kh(String(m)).map(C=>f(C,-1));return C=>{const L=A(C);return typeof L!="function"?(mu(150,v),L):(x=L(...b.map(G=>typeof G=="function"?G(C):G)),w&&(w=w.provide(G=>{const Y=t(G);return G.reduce((E,N)=>{if(N===k||(k==null?void 0:k.startsWith(`${N}(`))){const ee=Wh(x,N);E[N]=()=>ee}else E[N]=Y[N];return E},{})})),w?w():x)}}}else if(typeof m=="string"){if(m==="true")return!0;if(m==="false")return!1;if(m==="undefined")return;if(Uh(m))return Hh(m.substring(1,m.length-1));if(!isNaN(+m))return Number(m);if(y<n.length-1)return c(m,y+1);if(m.startsWith("$")){const A=m.substring(1);return u.add(A),function(w){return A in w?w[A]():void 0}}return m}return m}const g=c(e.startsWith("$:")?e.substring(2):e),p=Array.from(u);function d(m){return t=m,Object.assign(g.bind(null,m(p)),{provide:d})}return Object.assign(g,{provide:d})}function Hr(e,t,u){return u?typeof u=="string"?u.split(" ").reduce((n,i)=>Object.assign(n,{[i]:!0}),{}):typeof u=="function"?Hr(e,t,u(t,e)):u:{}}function cb(e,t,...u){const r=u.reduce((n,i)=>{if(!i)return ii(n);const{$reset:s,...o}=i;return ii(s?o:Object.assign(n,o))},{});return Object.keys(e.hook.classes.dispatch({property:t,classes:r}).classes).filter(n=>r[n]).join(" ")||null}function ii(e){const t="$remove:";let u=!1;const r=Object.keys(e).filter(n=>(e[n]&&n.startsWith(t)&&(u=!0),e[n]));return r.length>1&&u&&r.filter(i=>i.startsWith(t)).map(i=>{const s=i.substring(t.length);e[s]=!1,e[i]=!1}),e}function fb(e,t,u){const r=wr(e);r?r.setErrors(t,u):mu(651,e)}function db(e,t=!0){const u=wr(e);u?u.clearErrors(t):mu(652,e)}var ln="1.6.5",tc=new WeakSet;function Ln(e,t){const u=t||Object.assign(new Map,{active:!1}),r=new Map,n=function(c){var f;u.active&&(u.has(e)||u.set(e,new Set),(f=u.get(e))==null||f.add(c))},i=function(c){return new Proxy(c,{get(...f){return typeof f[1]=="string"&&n(`prop:${f[1]}`),Reflect.get(...f)}})},s=function(c){return new Proxy(c,{get(...f){return f[1]==="value"?g=>(n(`count:${g}`),c.value(g)):Reflect.get(...f)}})},o=function(c,f){return Dr(c)?Ln(c,u):(f==="value"&&n("commit"),f==="_value"&&n("input"),f==="props"?i(c):f==="ledger"?s(c):(f==="children"&&(n("child"),n("childRemoved")),c))},{proxy:l,revoke:a}=Proxy.revocable(e,{get(...c){switch(c[1]){case"_node":return e;case"deps":return u;case"watch":return(g,p,d)=>nc(l,g,p,d);case"observe":return()=>{const g=new Map(u);return u.clear(),u.active=!0,g};case"stopObserve":return()=>{const g=new Map(u);return u.active=!1,g};case"receipts":return r;case"kill":return()=>{rc(r),tc.add(c[2]),a()}}const f=Reflect.get(...c);return typeof f=="function"?(...g)=>{const p=f(...g);return o(p,c[1])}:o(f,c[1])}});return l}function uc(e,[t,u],r,n){t.forEach((i,s)=>{i.forEach(o=>{e.receipts.has(s)||e.receipts.set(s,{});const l=e.receipts.get(s)??{};l[o]=l[o]??[],l[o].push(s.on(o,r,n)),e.receipts.set(s,l)})}),u.forEach((i,s)=>{i.forEach(o=>{if(e.receipts.has(s)){const l=e.receipts.get(s);l&&Z(l,o)&&(l[o].map(s.off),delete l[o],e.receipts.set(s,l))}})})}function rc(e){e.forEach((t,u)=>{for(const r in t)t[r].map(u.off)}),e.clear()}function nc(e,t,u,r){const n=o=>{const l=e.stopObserve();uc(e,ic(i,l),()=>nc(e,t,u,r),r),u&&u(o)},i=new Map(e.deps);e.observe();const s=t(e);s instanceof Promise?s.then(o=>n(o)):n(s)}function ic(e,t){const u=new Map,r=new Map;return t.forEach((n,i)=>{if(!e.has(i))u.set(i,n);else{const s=new Set,o=e.get(i);n.forEach(l=>!(o!=null&&o.has(l))&&s.add(l)),u.set(i,s)}}),e.forEach((n,i)=>{if(!t.has(i))r.set(i,n);else{const s=new Set,o=t.get(i);n.forEach(l=>!(o!=null&&o.has(l))&&s.add(l)),r.set(i,s)}}),[u,r]}function ks(e){return tc.has(e)}var sc=function({value:t}){return["yes","on","1",1,!0,"true"].includes(t)};sc.skipEmpty=!1;var pb=sc,hb=function({value:e},t=!1){const u=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r>u},mb=hb,bb=function({value:e},t="default"){const u={default:new RegExp("^\\p{L}+$","u"),latin:/^[a-z]+$/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},gb=bb,_b=function({value:e},t="default"){const u={default:/^[\p{L} ]+$/u,latin:/^[a-z ]+$/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},yb=_b,vb=function({value:e},t="default"){const u={default:/^[0-9\p{L}]+$/u,latin:/^[0-9a-z]+$/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},xb=vb,kb=function({value:e},t=!1){const u=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r<u},Cb=kb,Eb=function({value:t},u,r){if(!isNaN(t)&&!isNaN(u)&&!isNaN(r)){const n=1*t;u=Number(u),r=Number(r);const[i,s]=u<=r?[u,r]:[r,u];return n>=1*i&&n<=1*s}return!1},Ab=Eb,jo=/(_confirm(?:ed)?)$/,$b=function(t,u,r="loose"){var i;u||(u=jo.test(t.name)?t.name.replace(jo,""):`${t.name}_confirm`);const n=(i=t.at(u))==null?void 0:i.value;return r==="strict"?t.value===n:t.value==n},wb=$b,Db=function({value:e},t="default"){const u={default:new RegExp("\\p{L}","u"),latin:/[a-z]/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},Fb=Db,Sb=function({value:e},t="default"){const u={default:/[\p{L} ]/u,latin:/[a-z ]/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},Ib=Sb,Tb=function({value:e},t="default"){const u={default:/[0-9\p{L}]/u,latin:/[0-9a-z]/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},Mb=Tb,Ob=function({value:e},t="default"){const u={default:new RegExp("\\p{Ll}","u"),latin:/[a-z]/},r=Z(u,t)?t:"default";return u[r].test(String(e))},Pb=Ob,Rb=function({value:t}){return/[0-9]/.test(String(t))},Vb=Rb,Lb=function({value:e}){return/[!-/:-@[-`{-~]/.test(String(e))},Nb=Lb,qb=function({value:e},t="default"){const u={default:new RegExp("\\p{Lu}","u"),latin:/[A-Z]/},r=Z(u,t)?t:"default";return u[r].test(String(e))},Bb=qb,zb=function({value:t},u,r){u=u instanceof Date?u.getTime():Date.parse(u),r=r instanceof Date?r.getTime():Date.parse(r);const n=t instanceof Date?t.getTime():Date.parse(String(t));if(u&&!r)r=u,u=Date.now();else if(!u||!n)return!1;return n>=u&&n<=r},jb=zb,Ub=function({value:t},u){return u&&typeof u=="string"?jh(u).test(String(t)):!isNaN(Date.parse(String(t)))},Hb=Ub,Kb=function({value:t}){return/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(String(t))},Wb=Kb,Zb=function({value:t},...u){return typeof t=="string"&&u.length?u.some(r=>t.endsWith(r)):typeof t=="string"&&u.length===0},Gb=Zb,Jb=function({value:t},...u){return u.some(r=>typeof r=="object"?Oe(r,t):r==t)},Yb=Jb,Xb=function({value:t},u=0,r=1/0){u=parseInt(u),r=isNaN(parseInt(r))?1/0:parseInt(r);const n=u<=r?u:r,i=r>=u?r:u;if(typeof t=="string"||Array.isArray(t))return t.length>=n&&t.length<=i;if(t&&typeof t=="object"){const s=Object.keys(t).length;return s>=n&&s<=i}return!1},Qb=Xb,e2=function({value:e},t="default"){const u={default:new RegExp("^\\p{Ll}+$","u"),allow_non_alpha:/^[0-9\p{Ll}!-/:-@[-`{-~]+$/u,allow_numeric:/^[0-9\p{Ll}]+$/u,allow_numeric_dashes:/^[0-9\p{Ll}-]+$/u,latin:/^[a-z]+$/},r=Z(u,t)?t:"default";return u[r].test(String(e))},t2=e2,u2=function({value:t},...u){return u.some(r=>(typeof r=="string"&&r.substr(0,1)==="/"&&r.substr(-1)==="/"&&(r=new RegExp(r.substr(1,r.length-2))),r instanceof RegExp?r.test(String(t)):r===t))},r2=u2,n2=function({value:t},u=10){return Array.isArray(t)?t.length<=u:Number(t)<=Number(u)},i2=n2,s2=function({value:t},u=1){return Array.isArray(t)?t.length>=u:Number(t)>=Number(u)},o2=s2,l2=function({value:t},...u){return!u.some(r=>typeof r=="object"?Oe(r,t):r===t)},a2=l2,c2=function({value:t}){return!isNaN(t)},f2=c2,oc=function(e,...t){return Je(e.value)?t.map(r=>{var n;return(n=e.at(r))==null?void 0:n.value}).some(r=>!Je(r)):!0};oc.skipEmpty=!1;var d2=oc,lc=function({value:t},u="default"){return u==="trim"&&typeof t=="string"?!Je(t.trim()):!Je(t)};lc.skipEmpty=!1;var p2=lc,h2=function({value:t},...u){return typeof t=="string"&&u.length?u.some(r=>t.startsWith(r)):typeof t=="string"&&u.length===0},m2=h2,b2=function({value:e}){return/^[!-/:-@[-`{-~]+$/.test(String(e))},g2=b2,_2=function({value:e},t="default"){const u={default:new RegExp("^\\p{Lu}+$","u"),latin:/^[A-Z]+$/},r=Z(u,t)?t:"default";return u[r].test(String(e))},y2=_2,v2=function({value:t},...u){try{const r=u.length?u:["http:","https:"],n=new URL(String(t));return r.includes(n.protocol)}catch{return!1}},x2=v2;const k2=Object.freeze(Object.defineProperty({__proto__:null,accepted:pb,alpha:gb,alpha_spaces:yb,alphanumeric:xb,between:Ab,confirm:wb,contains_alpha:Fb,contains_alpha_spaces:Ib,contains_alphanumeric:Mb,contains_lowercase:Pb,contains_numeric:Vb,contains_symbol:Nb,contains_uppercase:Bb,date_after:mb,date_before:Cb,date_between:jb,date_format:Hb,email:Wb,ends_with:Gb,is:Yb,length:Qb,lowercase:t2,matches:r2,max:i2,min:o2,not:a2,number:f2,require_one:d2,required:p2,starts_with:m2,symbol:g2,uppercase:y2,url:x2},Symbol.toStringTag,{value:"Module"}));var Mi=Ke({type:"state",blocking:!0,visible:!1,value:!0,key:"validating"});function C2(e={}){return function(u){let r=ot(u.props.validationRules||{}),n={...e,...r};const i={input:Zu(),rerun:null,isPassing:!0};let s=ot(u.props.validation);u.on("prop:validation",({payload:l})=>o(l,r)),u.on("prop:validationRules",({payload:l})=>o(s,l));function o(l,a){var c;Oe(Object.keys(r||{}),Object.keys(a||{}))&&Oe(s,l)||(r=ot(a),s=ot(l),n={...e,...r},(c=u.props.parsedRules)==null||c.forEach(f=>{ac(f),rc(f.observer.receipts),f.observer.kill()}),u.store.filter(()=>!1,"validation"),u.props.parsedRules=Ho(l,n,u),i.isPassing=!0,Oi(u,u.props.parsedRules,i))}u.props.parsedRules=Ho(s,n,u),Oi(u,u.props.parsedRules,i)}}function Oi(e,t,u){ks(e)||(u.input=Zu(),e.store.set(Ke({key:"failing",value:!u.isPassing,visible:!1})),u.isPassing=!0,e.store.filter(r=>!r.meta.removeImmediately,"validation"),t.forEach(r=>r.debounce&&clearTimeout(r.timer)),t.length&&(e.store.set(Mi),Pi(0,t,u,!1,()=>{e.store.remove(Mi.key),e.store.set(Ke({key:"failing",value:!u.isPassing,visible:!1}))})))}function Pi(e,t,u,r,n){const i=t[e];if(!i)return n();const s=i.observer;if(ks(s))return;const o=u.input;i.state=null;function l(a,c){if(u.input!==o)return;u.isPassing=u.isPassing&&!!c,i.queued=!1;const f=s.stopObserve(),g=ic(i.deps,f);if(uc(s,g,function(){try{s.store.set(Mi)}catch{}i.queued=!0,u.rerun&&clearTimeout(u.rerun),u.rerun=setTimeout(Oi,0,s,t,u)},"unshift"),i.deps=f,i.state=c,c===!1?A2(i,r||a):ac(i),t.length>e+1){const p=t[e+1];(c||p.force||!p.skipEmpty)&&p.state===null&&(p.queued=!0),Pi(e+1,t,u,r||a,n)}else n()}(!Je(s.value)||!i.skipEmpty)&&(u.isPassing||i.force)?i.queued?E2(i,s,a=>{a instanceof Promise?a.then(c=>l(!0,c)):l(!1,a)}):Pi(e+1,t,u,r,n):Je(s.value)&&i.skipEmpty&&u.isPassing?(s.observe(),s.value,l(!1,u.isPassing)):l(!1,null)}function E2(e,t,u){e.debounce?e.timer=setTimeout(()=>{t.observe(),u(e.rule(t,...e.args))},e.debounce):(t.observe(),u(e.rule(t,...e.args)))}function ac(e){const t=`rule_${e.name}`;e.messageObserver&&(e.messageObserver=e.messageObserver.kill()),Z(e.observer.store,t)&&e.observer.store.remove(t)}function A2(e,t){const u=e.observer;ks(u)||(e.messageObserver||(e.messageObserver=Ln(u._node)),e.messageObserver.watch(r=>w2(r,e),r=>{const n=$2(u,e,r),i=Ke({blocking:e.blocking,key:`rule_${e.name}`,meta:{messageKey:e.name,removeImmediately:t,localize:!n,i18nArgs:r},type:"validation",value:n||"This field is not valid."});u.store.set(i)}))}function $2(e,t,u){const r=e.props.validationMessages&&Z(e.props.validationMessages,t.name)?e.props.validationMessages[t.name]:void 0;return typeof r=="function"?r(...u):r}function w2(e,t){return[{node:e,name:cc(e),args:t.args}]}function cc(e){return typeof e.props.validationLabel=="function"?e.props.validationLabel(e):e.props.validationLabel||e.props.label||e.props.name||String(e.name)}var fc="(?:[\\*+?()0-9]+)",dc="[a-zA-Z][a-zA-Z0-9_]+",D2=new RegExp(`^(${fc}?${dc})(?:\\:(.*)+)?$`,"i"),F2=new RegExp(`^(${fc})(${dc})$`,"i"),S2=/([\*+?]+)?(\(\d+\))([\*+?]+)?/,Uo=/\(\d+\)/,I2={blocking:!0,debounce:0,force:!1,skipEmpty:!0,name:""};function Ho(e,t,u){return e?(typeof e=="string"?T2(e):Lu(e)).reduce((n,i)=>{let s=i.shift();const o={};if(typeof s=="string"){const[l,a]=O2(s);Z(t,l)&&(s=t[l],Object.assign(o,a))}return typeof s=="function"&&n.push({observer:Ln(u),rule:s,args:i,timer:0,state:null,queued:!0,deps:new Map,...I2,...P2(o,s)}),n},[]):[]}function T2(e){return e.split("|").reduce((t,u)=>{const r=M2(u);return r&&t.push(r),t},[])}function M2(e){const t=e.trim();if(t){const u=t.match(D2);if(u&&typeof u[1]=="string"){const r=u[1].trim(),n=u[2]&&typeof u[2]=="string"?u[2].split(",").map(i=>i.trim()):[];return[r,...n]}}return!1}function O2(e){const t=e.match(F2);if(!t)return[e,{name:e}];const u={"*":{force:!0},"+":{skipEmpty:!1},"?":{blocking:!1}},[,r,n]=t,i=Uo.test(r)?r.match(S2)||[]:[,r];return[n,[i[1],i[2],i[3]].reduce((s,o)=>(o&&(Uo.test(o)?s.debounce=parseInt(o.substr(1,o.length-1)):o.split("").forEach(l=>Z(u,l)&&Object.assign(s,u[l]))),s),{name:n})]}function P2(e,t){return e.name||(e.name=t.ruleName||t.name),["skipEmpty","force","debounce","blocking"].reduce((u,r)=>(Z(t,r)&&!Z(u,r)&&Object.assign(u,{[r]:t[r]}),u),e)}function ue(e){return e[0].toUpperCase()+e.substr(1)}function Ko(e,t="or"){return e.reduce((u,r,n)=>(u+=r,n<=e.length-2&&e.length>2&&(u+=", "),n===e.length-2&&(u+=`${e.length===2?" ":""}${t} `),u),"")}function Nr(e){const t=typeof e=="string"?new Date(Date.parse(e)):e;return t instanceof Date?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeZone:"UTC"}).format(t):"(unknown)"}function R2(e,t){return Number(e)>=Number(t)?[t,e]:[e,t]}var V2={add:"Add",remove:"Remove",removeAll:"Remove all",incomplete:"Sorry, not all fields are filled out correctly.",submit:"Submit",noFiles:"No file chosen",moveUp:"Move up",moveDown:"Move down",isLoading:"Loading...",loadMore:"Load more",next:"Next",prev:"Previous",addAllValues:"Add all values",addSelectedValues:"Add selected values",removeAllValues:"Remove all values",removeSelectedValues:"Remove selected values",chooseDate:"Choose date",changeDate:"Change date",summaryHeader:"There were errors in your form.",close:"Close",open:"Open"},L2={accepted({name:e}){return`Please accept the ${e}.`},date_after({name:e,args:t}){return Array.isArray(t)&&t.length?`${ue(e)} must be after ${Nr(t[0])}.`:`${ue(e)} must be in the future.`},alpha({name:e}){return`${ue(e)} can only contain alphabetical characters.`},alphanumeric({name:e}){return`${ue(e)} can only contain letters and numbers.`},alpha_spaces({name:e}){return`${ue(e)} can only contain letters and spaces.`},contains_alpha({name:e}){return`${ue(e)} must contain alphabetical characters.`},contains_alphanumeric({name:e}){return`${ue(e)} must contain letters or numbers.`},contains_alpha_spaces({name:e}){return`${ue(e)} must contain letters or spaces.`},contains_symbol({name:e}){return`${ue(e)} must contain a symbol.`},contains_uppercase({name:e}){return`${ue(e)} must contain an uppercase letter.`},contains_lowercase({name:e}){return`${ue(e)} must contain a lowercase letter.`},contains_numeric({name:e}){return`${ue(e)} must contain numbers.`},symbol({name:e}){return`${ue(e)} must be a symbol.`},uppercase({name:e}){return`${ue(e)} can only contain uppercase letters.`},lowercase({name:e,args:t}){let u="";return Array.isArray(t)&&t.length&&(t[0]==="allow_non_alpha"&&(u=", numbers and symbols"),t[0]==="allow_numeric"&&(u=" and numbers"),t[0]==="allow_numeric_dashes"&&(u=", numbers and dashes")),`${ue(e)} can only contain lowercase letters${u}.`},date_before({name:e,args:t}){return Array.isArray(t)&&t.length?`${ue(e)} must be before ${Nr(t[0])}.`:`${ue(e)} must be in the past.`},between({name:e,args:t}){if(isNaN(t[0])||isNaN(t[1]))return"This field was configured incorrectly and can’t be submitted.";const[u,r]=R2(t[0],t[1]);return`${ue(e)} must be between ${u} and ${r}.`},confirm({name:e}){return`${ue(e)} does not match.`},date_format({name:e,args:t}){return Array.isArray(t)&&t.length?`${ue(e)} is not a valid date, please use the format ${t[0]}`:"This field was configured incorrectly and can’t be submitted"},date_between({name:e,args:t}){return`${ue(e)} must be between ${Nr(t[0])} and ${Nr(t[1])}`},email:"Please enter a valid email address.",ends_with({name:e,args:t}){return`${ue(e)} doesn’t end with ${Ko(t)}.`},is({name:e}){return`${ue(e)} is not an allowed value.`},length({name:e,args:[t=0,u=1/0]}){const r=Number(t)<=Number(u)?t:u,n=Number(u)>=Number(t)?u:t;return r==1&&n===1/0?`${ue(e)} must be at least one character.`:r==0&&n?`${ue(e)} must be less than or equal to ${n} characters.`:r===n?`${ue(e)} should be ${n} characters long.`:r&&n===1/0?`${ue(e)} must be greater than or equal to ${r} characters.`:`${ue(e)} must be between ${r} and ${n} characters.`},matches({name:e}){return`${ue(e)} is not an allowed value.`},max({name:e,node:{value:t},args:u}){return Array.isArray(t)?`Cannot have more than ${u[0]} ${e}.`:`${ue(e)} must be no more than ${u[0]}.`},mime({name:e,args:t}){return t[0]?`${ue(e)} must be of the type: ${t[0]}`:"No file formats allowed."},min({name:e,node:{value:t},args:u}){return Array.isArray(t)?`Cannot have fewer than ${u[0]} ${e}.`:`${ue(e)} must be at least ${u[0]}.`},not({name:e,node:{value:t}}){return`“${t}” is not an allowed ${e}.`},number({name:e}){return`${ue(e)} must be a number.`},require_one:({name:e,node:t,args:u})=>{const r=u.map(n=>{const i=t.at(n);return i?cc(i):!1}).filter(n=>!!n);return r.unshift(e),`${r.join(" or ")} is required.`},required({name:e}){return`${ue(e)} is required.`},starts_with({name:e,args:t}){return`${ue(e)} doesn’t start with ${Ko(t)}.`},url(){return"Please enter a valid URL."},invalidDate:"The selected date is invalid."},N2={ui:V2,validation:L2},Wo=new Set;function q2(e){return function(u){Wo.add(u),u.on("destroying",()=>Wo.delete(u));let r=Zo(u.config.locale,e),n=r?e[r]:{};u.on("prop:locale",({payload:i})=>{r=Zo(i,e),n=r?e[r]:{},u.store.touch()}),u.on("prop:label",()=>u.store.touch()),u.on("prop:validationLabel",()=>u.store.touch()),u.hook.text((i,s)=>{var l,a;const o=((l=i.meta)==null?void 0:l.messageKey)||i.key;if(Z(n,i.type)&&Z(n[i.type],o)){const c=n[i.type][o];typeof c=="function"?i.value=Array.isArray((a=i.meta)==null?void 0:a.i18nArgs)?c(...i.meta.i18nArgs):c(i):i.value=c}return s(i)})}}function Zo(e,t){if(Z(t,e))return e;const[u]=e.split("-");if(Z(t,u))return u;for(const r in t)return r;return!1}function B2(...e){const t=e.reduce((r,n)=>Jt(r,n),{}),u=()=>{};return u.library=function(r){const n=Su(r.props.type);Z(t,n)&&r.define(t[n])},u}var z2=["classes","config","delay","errors","id","index","inputErrors","library","modelValue","onUpdate:modelValue","name","number","parent","plugins","sectionsSchema","type","validation","validationLabel","validationMessages","validationRules","onInput","onInputRaw","onUpdate:modelValue","onNode","onSubmit","onSubmitInvalid","onSubmitRaw"];function Nn(e){return e&&typeof e=="object"&&"group"in e&&Array.isArray(e.options)}function pc(e,t={count:1}){return Array.isArray(e)?e.map(u=>{if(typeof u=="string"||typeof u=="number")return{label:String(u),value:String(u)};if(typeof u=="object"){if("group"in u)return u.options=pc(u.options||[],t),u;"value"in u&&typeof u.value!="string"&&Object.assign(u,{value:`__mask_${t.count++}`,__original:u.value})}return u}):Object.keys(e).map(u=>({label:e[u],value:u}))}function du(e,t,u=!1){if(Array.isArray(e)){for(const r of e)if(!(typeof r!="object"&&r)){if(Nn(r)){const n=du(r.options,t,!0);if(n!==void 0)return n}else if(t==r.value)return"__original"in r?r.__original:r.value}}return u?void 0:t}function qu(e,t){return e===null&&t===void 0||e===void 0&&t===null?!1:e==t?!0:Vu(e)&&Vu(t)?Oe(e,t):!1}function qn(e){e.hook.prop((t,u)=>{var r;return t.prop==="options"&&(typeof t.value=="function"?(e.props.optionsLoader=t.value,t.value=[]):((r=e.props)._normalizeCounter??(r._normalizeCounter={count:1}),t.value=pc(t.value,e.props._normalizeCounter))),u(t)})}function W(e,t,u=!1){return(...r)=>{const n=i=>{const s=!t||typeof t=="string"?{$el:t}:t();return(Ii(s)||Ti(s))&&(s.meta?s.meta.section=e:s.meta={section:e},r.length&&!s.children&&(s.children=[...r.map(o=>typeof o=="function"?o(i):o)]),Ii(s)&&(s.attrs={class:`$classes.${e}`,...s.attrs||{}})),{if:`$slots.${e}`,then:`$slots.${e}`,else:e in i?tr(s,i[e]):s}};return n._s=e,u?j2(n):n}}function j2(e){return t=>[e(t)]}function an(e){return!!(e&&typeof e=="object"&&("$el"in e||"$cmp"in e||"$formkit"in e))}function tr(e,t={}){return typeof e=="string"?an(t)||typeof t=="string"?t:e:Array.isArray(e)?an(t)?t:e:Jt(e,t)}var U2=W("actions",()=>({$el:"div",if:"$actions"})),cn=W("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",name:"$node.props.altName || $node.name",disabled:"$option.attrs.disabled || $disabled",onInput:"$handlers.toggleChecked",checked:"$fns.eq($_value, $onValue)",onBlur:"$handlers.blur",value:"$: true",id:"$id","aria-describedby":{if:"$options.length",then:{if:"$option.help",then:'$: "help-" + $option.attrs.id',else:void 0},else:{if:"$help",then:'$: "help-" + $id',else:void 0}}}})),hc=W("optionHelp",()=>({$el:"div",if:"$option.help",attrs:{id:'$: "help-" + $option.attrs.id'}})),fn=W("inner","span"),dn=W("label","span"),mc=W("option",()=>({$el:"li",for:["option","$options"],attrs:{"data-disabled":"$option.attrs.disabled || $disabled || undefined"}})),bc=W("options","ul"),pn=W("wrapper",()=>({$el:"label",attrs:{"data-disabled":{if:"$options.length",then:void 0,else:"$disabled || undefined"},"data-checked":{if:"$options == undefined",then:"$fns.eq($_value, $onValue) || undefined",else:"$fns.isChecked($option.value) || undefined"}}})),H2=W("input",()=>({$el:"button",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",id:"$id"}})),K2=W("default",null),hn=W("decorator",()=>({$el:"span",attrs:{"aria-hidden":"true"}})),gc=W("fieldset",()=>({$el:"fieldset",attrs:{id:"$id","aria-describedby":{if:"$help",then:'$: "help-" + $id',else:void 0}}})),W2=W("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"file",disabled:"$disabled",name:"$node.name",onChange:"$handlers.files",onBlur:"$handlers.blur",id:"$id","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"}})),Z2=W("fileItem",()=>({$el:"li",for:["file","$value"]})),G2=W("fileList",()=>({$el:"ul",if:"$value.length",attrs:{"data-has-multiple":"$_hasMultipleFiles"}})),J2=W("fileName",()=>({$el:"span",attrs:{class:"$classes.fileName"}})),Go=W("fileRemove",()=>({$el:"button",attrs:{type:"button",onClick:"$handlers.resetFiles"}})),Y2=W("form",()=>({$el:"form",bind:"$attrs",meta:{autoAnimate:!0},attrs:{id:"$id",name:"$node.name",onSubmit:"$handlers.submit","data-loading":"$state.loading || undefined"}})),Cs=W("wrapper",null,!0),et=W("help",()=>({$el:"div",if:"$help",attrs:{id:'$: "help-" + $id'}})),pe=(e,t)=>W(`${e}Icon`,()=>{const u=`_raw${e.charAt(0).toUpperCase()}${e.slice(1)}Icon`;return{if:`$${e}Icon && $${u}`,$el:`${t||"span"}`,attrs:{class:`$classes.${e}Icon + " " + $classes.icon`,innerHTML:`$${u}`,onClick:`$handlers.iconClick(${e})`,role:`$fns.iconRole(${e})`,tabindex:`$fns.iconRole(${e}) === "button" && "0" || undefined`,for:{if:`${t==="label"}`,then:"$id"}}}})(),bu=W("inner","div"),gu=W("label",()=>({$el:"label",if:"$label",attrs:{for:"$id"}})),_c=W("legend",()=>({$el:"legend",if:"$label"})),dt=W("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),pt=W("messages",()=>({$el:"ul",if:"$defaultMessagePlacement && $fns.length($messages)"})),X2=W("noFiles",()=>({$el:"span",if:"$value.length == 0"})),yc=W("optGroup",()=>({$el:"optgroup",bind:"$option.attrs",attrs:{label:"$option.group"}})),mn=W("option",()=>({$el:"option",bind:"$option.attrs",attrs:{class:"$classes.option",value:"$option.value",selected:"$fns.isSelected($option)"}})),bn=W("options",()=>({$el:null,if:"$options.length",for:["option","$option.options || $options"]})),Ft=W("outer",()=>({$el:"div",meta:{autoAnimate:!0},attrs:{key:"$id","data-family":"$family || undefined","data-type":"$type","data-multiple":'$attrs.multiple || ($type != "select" && $options != undefined) || undefined',"data-has-multiple":"$_hasMultipleFiles","data-disabled":'$: ($disabled !== "false" && $disabled) || undefined',"data-empty":"$state.empty || undefined","data-complete":"$state.complete || undefined","data-invalid":"$state.invalid || undefined","data-errors":"$state.errors || undefined","data-submitted":"$state.submitted || undefined","data-prefix-icon":"$_rawPrefixIcon !== undefined || undefined","data-suffix-icon":"$_rawSuffixIcon !== undefined || undefined","data-prefix-icon-click":"$onPrefixIconClick !== undefined || undefined","data-suffix-icon-click":"$onSuffixIconClick !== undefined || undefined"}})),tt=W("prefix",null),vc=W("input",()=>({$el:"select",bind:"$attrs",attrs:{id:"$id","data-placeholder":"$fns.showPlaceholder($_value, $placeholder)",disabled:"$disabled",class:"$classes.input",name:"$node.name",onChange:"$handlers.onChange",onInput:"$handlers.selectInput",onBlur:"$handlers.blur","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"}})),Q2=W("submit",()=>({$cmp:"FormKit",bind:"$submitAttrs",props:{type:"submit",label:"$submitLabel"}})),ut=W("suffix",null),Es=W("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"}})),xc=W("input",()=>({$el:"textarea",bind:"$attrs",attrs:{disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"},children:"$initialValue"})),uu=W("wrapper","div"),e3=0;function kc(e){(e.type==="group"||e.type==="list")&&e.plugins.add(t3)}function t3(e){e.props.type==="radio"&&(e.addProps(["altName"]),e.props.altName=`${e.name}_${e3++}`)}function Cc(e){return function(t,u){return t.prop==="options"&&Array.isArray(t.value)&&(t.value=t.value.map(r=>{var n;return(n=r.attrs)!=null&&n.id?r:Jt(r,{attrs:{id:`${e.props.id}-option-${ms(String(r.value))}`}})}),e.props.type==="checkbox"&&!Array.isArray(e.value)&&(e.isCreated?e.input([],!1):e.on("created",()=>{Array.isArray(e.value)||e.input([],!1)}))),u(t)}}function u3(e,t){const u=t.target;if(u instanceof HTMLInputElement){const r=Array.isArray(e.props.options)?du(e.props.options,u.value):u.value;Array.isArray(e.props.options)&&e.props.options.length?Array.isArray(e._value)?e._value.some(n=>qu(r,n))?e.input(e._value.filter(n=>!qu(r,n))):e.input([...e._value,r]):e.input([r]):u.checked?e.input(e.props.onValue):e.input(e.props.offValue)}}function r3(e,t){var u,r;return(u=e.context)==null||u.value,(r=e.context)==null||r._value,Array.isArray(e._value)?e._value.some(n=>qu(du(e.props.options,t),n)):!1}function n3(e){e.on("created",()=>{var t,u;(t=e.context)!=null&&t.handlers&&(e.context.handlers.toggleChecked=u3.bind(null,e)),(u=e.context)!=null&&u.fns&&(e.context.fns.isChecked=r3.bind(null,e)),Z(e.props,"onValue")||(e.props.onValue=!0),Z(e.props,"offValue")||(e.props.offValue=!1)}),e.hook.prop(Cc(e))}function au(e,t){return u=>{u.props[`${e}Icon`]===void 0&&(u.props[`${e}Icon`]=t.startsWith("<svg")?t:`default:${t}`)}}function As(e){e.on("created",()=>{"disabled"in e.props&&(e.props.disabled=lt(e.props.disabled),e.config.disabled=lt(e.props.disabled))}),e.hook.prop(({prop:t,value:u},r)=>(u=t==="disabled"?lt(u):u,r({prop:t,value:u}))),e.on("prop:disabled",({payload:t})=>{e.config.disabled=lt(t)})}function Kr(e,t){return u=>{u.store.set(Ke({key:e,type:"ui",value:t||e,meta:{localize:!0,i18nArgs:[u]}}))}}var si=typeof window<"u";function Ec(e){e.target instanceof HTMLElement&&e.target.hasAttribute("data-file-hover")&&e.target.removeAttribute("data-file-hover")}function Jo(e,t){t.target instanceof HTMLInputElement?e==="dragover"&&t.target.setAttribute("data-file-hover","true"):t.preventDefault(),e==="drop"&&Ec(t)}function i3(e){Kr("noFiles","Select file")(e),Kr("removeAll","Remove all")(e),Kr("remove")(e),e.addProps(["_hasMultipleFiles"]),si&&(window._FormKit_File_Drop||(window.addEventListener("dragover",Jo.bind(null,"dragover")),window.addEventListener("drop",Jo.bind(null,"drop")),window.addEventListener("dragleave",Ec),window._FormKit_File_Drop=!0)),e.hook.input((t,u)=>u(Array.isArray(t)?t:[])),e.on("input",({payload:t})=>{e.props._hasMultipleFiles=Array.isArray(t)&&t.length>1?!0:void 0}),e.on("reset",()=>{if(e.props.id&&si){const t=document.getElementById(e.props.id);t&&(t.value="")}}),e.on("created",()=>{Array.isArray(e.value)||e.input([],!1),e.context&&(e.context.handlers.resetFiles=t=>{if(t.preventDefault(),e.input([]),e.props.id&&si){const u=document.getElementById(e.props.id);u&&(u.value=""),u==null||u.focus()}},e.context.handlers.files=t=>{var r,n;const u=[];if(t.target instanceof HTMLInputElement&&t.target.files){for(let i=0;i<t.target.files.length;i++){let s;(s=t.target.files.item(i))&&u.push({name:s.name,file:s})}e.input(u)}e.context&&(e.context.files=u),typeof((r=e.props.attrs)==null?void 0:r.onChange)=="function"&&((n=e.props.attrs)==null||n.onChange(t))})})}var Yo=Ke({key:"loading",value:!0,visible:!1});async function s3(e,t){const u=Math.random();if(e.props._submitNonce=u,t.preventDefault(),await e.settled,e.ledger.value("validating")&&(e.store.set(Yo),await e.ledger.settled("validating"),e.store.remove("loading"),e.props._submitNonce!==u))return;const r=n=>n.store.set(Ke({key:"submitted",value:!0,visible:!1}));if(e.walk(r),r(e),e.emit("submit-raw"),typeof e.props.onSubmitRaw=="function"&&e.props.onSubmitRaw(t,e),e.ledger.value("blocking"))typeof e.props.onSubmitInvalid=="function"&&e.props.onSubmitInvalid(e),e.props.incompleteMessage!==!1&&Ac(e);else if(typeof e.props.onSubmit=="function"){const n=e.props.onSubmit(e.hook.submit.dispatch(Lu(e.value)),e);if(n instanceof Promise){const i=e.props.disabled===void 0&&e.props.submitBehavior!=="live";i&&(e.props.disabled=!0),e.store.set(Yo),await n,i&&(e.props.disabled=!1),e.store.remove("loading")}}else t.target instanceof HTMLFormElement&&t.target.submit()}function Ac(e){e.store.set(Ke({blocking:!1,key:"incomplete",meta:{localize:e.props.incompleteMessage===void 0,i18nArgs:[{node:e}],showAsMessage:!0},type:"ui",value:e.props.incompleteMessage||"Form incomplete."}))}function o3(e){var t;e.props.isForm=!0,e.ledger.count("validating",u=>u.key==="validating"),(t=e.props).submitAttrs??(t.submitAttrs={disabled:e.props.disabled}),e.on("prop:disabled",({payload:u})=>{e.props.submitAttrs={...e.props.submitAttrs,disabled:u}}),e.on("created",()=>{var u;(u=e.context)!=null&&u.handlers&&(e.context.handlers.submit=s3.bind(null,e)),Z(e.props,"actions")||(e.props.actions=!0)}),e.on("prop:incompleteMessage",()=>{e.store.incomplete&&Ac(e)}),e.on("settled:blocking",()=>e.store.remove("incomplete"))}function l3(e){e.props.ignore===void 0&&(e.props.ignore=!0,e.parent=null)}function $c(e){e.on("created",()=>{e.context&&(e.context.initialValue=e.value||"")})}function $s(e){if(typeof e.props.number>"u")return;const t=["number","range","hidden"].includes(e.props.type);e.hook.input((u,r)=>{if(u==="")return r(void 0);const n=e.props.number==="integer"?parseInt(u):parseFloat(u);return Number.isFinite(n)?r(n):r(t?void 0:u)})}function a3(e,t){t.target instanceof HTMLInputElement&&e.input(du(e.props.options,t.target.value))}function c3(e,t){var u,r;return(u=e.context)==null||u.value,(r=e.context)==null||r._value,qu(du(e.props.options,t),e._value)}function f3(e){e.on("created",()=>{var t,u;Array.isArray(e.props.options)||mu(350,{node:e,inputType:"radio"}),(t=e.context)!=null&&t.handlers&&(e.context.handlers.toggleChecked=a3.bind(null,e)),(u=e.context)!=null&&u.fns&&(e.context.fns.isChecked=c3.bind(null,e))}),e.hook.prop(Cc(e))}function d3(e,t){if(Nn(t))return!1;e.context&&e.context.value;const u="__original"in t?t.__original:t.value;return Array.isArray(e._value)?e._value.some(r=>qu(r,u)):(e._value===void 0||e._value===null&&!wc(e.props.options,null))&&t.attrs&&t.attrs["data-is-placeholder"]?!0:qu(u,e._value)}function wc(e,t){return e.some(u=>Nn(u)?wc(u.options,t):("__original"in u?u.__original:u.value)===t)}async function p3(e,t){var u;typeof((u=e.props.attrs)==null?void 0:u.onChange)=="function"&&(await new Promise(r=>setTimeout(r,0)),await e.settled,e.props.attrs.onChange(t))}function h3(e,t){const u=t.target,r=u.hasAttribute("multiple")?Array.from(u.selectedOptions).map(n=>du(e.props.options,n.value)):du(e.props.options,u.value);e.input(r)}function Xo(e,t){return e.some(u=>u.attrs&&u.attrs["data-is-placeholder"])?e:[{label:t,value:"",attrs:{hidden:!0,disabled:!0,"data-is-placeholder":"true"}},...e]}function Dc(e){const t=e.length>0?e[0]:void 0;if(t)return Nn(t)?Dc(t.options):"__original"in t?t.__original:t.value}function Fc(e){e.on("created",()=>{var u,r,n;const t=lt((u=e.props.attrs)==null?void 0:u.multiple);!t&&e.props.placeholder&&Array.isArray(e.props.options)&&(e.hook.prop(({prop:i,value:s},o)=>(i==="options"&&(s=Xo(s,e.props.placeholder)),o({prop:i,value:s}))),e.props.options=Xo(e.props.options,e.props.placeholder)),t?e.value===void 0&&e.input([],!1):e.context&&!e.context.options&&(e.props.attrs=Object.assign({},e.props.attrs,{value:e._value}),e.on("input",({payload:i})=>{e.props.attrs=Object.assign({},e.props.attrs,{value:i})})),(r=e.context)!=null&&r.handlers&&(e.context.handlers.selectInput=h3.bind(null,e),e.context.handlers.onChange=p3.bind(null,e)),(n=e.context)!=null&&n.fns&&(e.context.fns.isSelected=d3.bind(null,e),e.context.fns.showPlaceholder=(i,s)=>{if(!Array.isArray(e.props.options))return!1;const o=e.props.options.some(l=>{if(l.attrs&&"data-is-placeholder"in l.attrs)return!1;const a="__original"in l?l.__original:l.value;return Oe(i,a)});return s&&!o?!0:void 0})}),e.hook.input((t,u)=>{var r,n,i;return!e.props.placeholder&&t===void 0&&Array.isArray((r=e.props)==null?void 0:r.options)&&e.props.options.length&&!lt((i=(n=e.props)==null?void 0:n.attrs)==null?void 0:i.multiple)&&(t=Dc(e.props.options)),u(t)})}function Ri(e){return!!(ku(e)&&e.if&&e.if.startsWith("$slots.")&&typeof e.then=="string"&&e.then.startsWith("$slots.")&&"else"in e)}function Ye(e,t,u){const r=n=>{const i=t(n);if(u||an(i)&&"if"in i||Ri(i)){const s={if:e,then:i};return u&&(s.else=u(n)),s}else Ri(i)?Object.assign(i.else,{if:e}):an(i)&&Object.assign(i,{if:e});return i};return r._s=Zu(),r}function Iu(e,t){const u=r=>{const n=e({});return Ri(n)?(Array.isArray(n.else)||(n.else=tr(tr(n.else,t),e._s?r[e._s]:{})),n):tr(tr(n,t),e._s?r[e._s]:{})};return u._s=e._s,u}var Qo={schema:Ft(pt(dt("$message.value")),uu(H2(pe("prefix"),tt(),K2("$label || $ui.submit.value"),ut(),pe("suffix"))),et("$help")),type:"input",family:"button",props:[],features:[Kr("submit"),l3],schemaMemoKey:"h6st4epl3j8"},m3={schema:Ft(Ye("$options == undefined",pn(fn(tt(),cn(),hn(pe("decorator")),ut()),Iu(dn("$label"),{if:"$label"})),gc(_c("$label"),et("$help"),bc(mc(pn(fn(tt(),Iu(cn(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),hn(pe("decorator")),ut()),Iu(dn("$option.label"),{if:"$option.label"})),hc("$option.help"))))),Ye("$options == undefined && $help",et("$help")),pt(dt("$message.value"))),type:"input",family:"box",props:["options","onValue","offValue","optionsLoader"],features:[qn,n3,au("decorator","checkboxDecorator")],schemaMemoKey:"qje02tb3gu8"},b3={schema:Ft(uu(gu("$label"),bu(pe("prefix","label"),tt(),W2(),G2(Z2(pe("fileItem"),J2("$file.name"),Ye("$value.length === 1",Go(pe("fileRemove"),'$ui.remove.value + " " + $file.name')))),Ye("$value.length > 1",Go("$ui.removeAll.value")),X2(pe("noFiles"),"$ui.noFiles.value"),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",family:"text",props:[],features:[i3,au("fileItem","fileItem"),au("fileRemove","fileRemove"),au("noFiles","noFiles")],schemaMemoKey:"9kqc4852fv8"},g3={schema:Y2("$slots.default",pt(dt("$message.value")),U2(Q2())),type:"group",props:["actions","submit","submitLabel","submitAttrs","submitBehavior","incompleteMessage"],features:[o3,As],schemaMemoKey:"5bg016redjo"},_3={schema:Cs("$slots.default"),type:"group",props:[],features:[As,kc]},y3={schema:Es(),type:"input",props:[],features:[$s]},v3={schema:Cs("$slots.default"),type:"list",props:["sync","dynamic"],features:[As,kc]},x3={schema:Cs(),type:"input",props:[],features:[]},k3={schema:Ft(Ye("$options == undefined",pn(fn(tt(),cn(),hn(pe("decorator")),ut()),Iu(dn("$label"),{if:"$label"})),gc(_c("$label"),et("$help"),bc(mc(pn(fn(tt(),Iu(cn(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),hn(pe("decorator")),ut()),Iu(dn("$option.label"),{if:"$option.label"})),hc("$option.help"))))),Ye("$options == undefined && $help",et("$help")),pt(dt("$message.value"))),type:"input",family:"box",props:["options","onValue","offValue","optionsLoader"],features:[qn,f3,au("decorator","radioDecorator")],schemaMemoKey:"qje02tb3gu8"},C3={schema:Ft(uu(gu("$label"),bu(pe("prefix"),tt(),vc(Ye("$slots.default",()=>"$slots.default",bn(Ye("$option.group",yc(bn(mn("$option.label"))),mn("$option.label"))))),Ye("$attrs.multiple !== undefined",()=>"",pe("select")),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:["options","placeholder","optionsLoader"],features:[qn,Fc,au("select","select")],schemaMemoKey:"cb119h43krg"},E3={schema:Ft(uu(gu("$label"),bu(pe("prefix","label"),tt(),xc(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:[],features:[$c],schemaMemoKey:"b1n0td79m9g"},Pe={schema:Ft(uu(gu("$label"),bu(pe("prefix","label"),tt(),Es(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",family:"text",props:[],features:[$s],schemaMemoKey:"c3cc4kflsg"},A3={button:Qo,submit:Qo,checkbox:m3,file:b3,form:g3,group:_3,hidden:y3,list:v3,meta:x3,radio:k3,select:C3,textarea:E3,text:Pe,color:Pe,date:Pe,datetimeLocal:Pe,email:Pe,month:Pe,number:Pe,password:Pe,search:Pe,tel:Pe,time:Pe,url:Pe,week:Pe,range:Pe};function $3(e){const t={};return Object.keys(e).forEach(u=>{Object.keys(e[u]).forEach(r=>{t[r]?t[r][u]=e[u][r]:t[r]={[u]:e[u][r]}})}),Object.keys(t).forEach(u=>{const r=t[u];t[u]=function(n,i){return w3(n,i,r)}}),t}function w3(e,t,u){const r=e.props.type,n=e.props.family;let i="";u.global&&(i+=u.global+" "),u[`family:${n}`]&&(i+=u[`family:${n}`]+" "),u[r]&&(i+=u[r]);const s=i.split("$reset");return s.length>1?`$reset ${s[s.length-1].trim()}`:s[0].trim()}var at=void 0,gt=null,gn,Sc=!1,ur=!1,D3=new Promise(e=>{gn=()=>{Sc=!0,e()}}),Pt=typeof window<"u"&&typeof fetch<"u";at=Pt?getComputedStyle(document.documentElement):void 0;var Cu={},oi={};function F3(e,t,u,r){t&&Object.assign(Cu,t),Pt&&!ur&&(at!=null&&at.getPropertyValue("--formkit-theme"))?(gn(),ur=!0):e&&!ur&&Pt?S3(e):!ur&&Pt&&gn();const n=function(s){var o,l;s.addProps(["iconLoader","iconLoaderUrl"]),s.props.iconHandler=ar((o=s.props)!=null&&o.iconLoader?s.props.iconLoader:r,(l=s.props)!=null&&l.iconLoaderUrl?s.props.iconLoaderUrl:u),M3(s,s.props.iconHandler),s.on("created",()=>{var a,c;(a=s==null?void 0:s.context)!=null&&a.handlers&&(s.context.handlers.iconClick=f=>{const g=`on${f.charAt(0).toUpperCase()}${f.slice(1)}IconClick`,p=s.props[g];if(p&&typeof p=="function")return d=>p(s,d)}),(c=s==null?void 0:s.context)!=null&&c.fns&&(s.context.fns.iconRole=f=>{const g=`on${f.charAt(0).toUpperCase()}${f.slice(1)}IconClick`;return typeof s.props[g]=="function"?"button":null})})};return n.iconHandler=ar(r,u),n}function S3(e){if(!(!e||!Pt||typeof getComputedStyle!="function")&&(ur=!0,gt=document.getElementById("formkit-theme"),e&&Pt&&(!(at!=null&&at.getPropertyValue("--formkit-theme"))&&!gt||gt!=null&>.getAttribute("data-theme")&&(gt==null?void 0:gt.getAttribute("data-theme"))!==e))){const u=`https://cdn.jsdelivr.net/npm/@formkit/themes@${ln.startsWith("__")?"latest":ln}/dist/${e}/theme.css`,r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.id="formkit-theme",r.setAttribute("data-theme",e),r.onload=()=>{at=getComputedStyle(document.documentElement),gn()},document.head.appendChild(r),r.href=u,gt&>.remove()}}function ar(e,t){return u=>{if(typeof u!="string")return;if(u.startsWith("<svg"))return u;const r=u.startsWith("default:");u=r?u.split(":")[1]:u;const n=u in Cu;let i;if(n)return Cu[u];if(!oi[u]){if(i=I3(u),i=Pt&&typeof i>"u"?Promise.resolve(i):i,i instanceof Promise)oi[u]=i.then(s=>!s&&typeof u=="string"&&!r?i=typeof e=="function"?e(u):T3(u,t):s).then(s=>(typeof u=="string"&&(Cu[r?`default:${u}`:u]=s),s));else if(typeof i=="string")return Cu[r?`default:${u}`:u]=i,i}return oi[u]}}function I3(e){if(Pt)return Sc?el(e):D3.then(()=>el(e))}function el(e){const t=at==null?void 0:at.getPropertyValue(`--fk-icon-${e}`);if(t){const u=atob(t);if(u.startsWith("<svg"))return Cu[e]=u,u}}function T3(e,t){const u=ln.startsWith("__")?"latest":ln,r=typeof t=="function"?t(e):`https://cdn.jsdelivr.net/npm/@formkit/icons@${u}/dist/icons/${e}.svg`;if(Pt)return fetch(`${r}`).then(async n=>{const i=await n.text();if(i.startsWith("<svg"))return i}).catch(n=>{console.error(n)})}function M3(e,t){const u=/^[a-zA-Z-]+(?:-icon|Icon)$/;Object.keys(e.props).filter(n=>u.test(n)).forEach(n=>O3(e,t,n))}function O3(e,t,u){const r=e.props[u],n=t(r),i=`_raw${u.charAt(0).toUpperCase()}${u.slice(1)}`,s=`on${u.charAt(0).toUpperCase()}${u.slice(1)}Click`;if(e.addProps([i,s]),e.on(`prop:${u}`,P3),n instanceof Promise)return n.then(o=>{e.props[i]=o});e.props[i]=n}function P3(e){var s;const t=e.origin,u=e.payload,r=(s=t==null?void 0:t.props)==null?void 0:s.iconHandler,n=e.name.split(":")[1],i=`_raw${n.charAt(0).toUpperCase()}${n.slice(1)}`;if(r&&typeof r=="function"){const o=r(u);if(o instanceof Promise)return o.then(l=>{t.props[i]=l});t.props[i]=o}}var tl={100:({data:e})=>`Only groups, lists, and forms can have children (${e.name}).`,101:({data:e})=>`You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,102:({data:[e,t]})=>`You cannot directly assign node.${t} (${e.name})`,103:({data:[e]})=>`Schema expressions cannot start with an operator (${e})`,104:({data:[e,t]})=>`Schema expressions cannot end with an operator (${e} in "${t}")`,105:({data:e})=>`Invalid schema expression: ${e}`,106:({data:e})=>`Cannot submit because (${e}) is not in a form.`,107:({data:[e,t]})=>`Cannot set ${e.name} to non object value: ${t}`,108:({data:[e,t]})=>`Cannot set ${e.name} to non array value: ${t}`,300:({data:[e]})=>`Cannot set behavior prop to overscroll (on ${e.name} input) when options prop is a function.`,600:({data:e})=>`Unknown input type${typeof e.props.type=="string"?' "'+e.props.type+'"':""} ("${e.name}")`,601:({data:e})=>`Input definition${typeof e.props.type=="string"?' "'+e.props.type+'"':""} is missing a schema or component property (${e.name}).`},ul={150:({data:e})=>`Schema function "${e}()" is not a valid function.`,151:({data:e})=>`No form element with id: ${e}`,152:({data:e})=>`No input element with id: ${e}`,350:({data:{node:e,inputType:t}})=>`Invalid options prop for ${e.name} input (${t}). See https://formkit.com/inputs/${t}`,650:'Schema "$get()" must use the id of an input to access.',651:({data:e})=>`Cannot setErrors() on "${e}" because no such id exists.`,652:({data:e})=>`Cannot clearErrors() on "${e}" because no such id exists.`,800:({data:e})=>`${e} is deprecated.`},R3=(e,t)=>{if(e.code in tl){const u=tl[e.code];e.message=typeof u=="function"?u(e):u}return t(e)},rl=!1;function V3(){rl||(gs(R3),_s(L3),rl=!0)}var L3=(e,t)=>{if(e.code in ul){const u=ul[e.code];e.message=typeof u=="function"?u(e):u}return t(e)},N3=Object.defineProperty,q3=Object.getOwnPropertyNames,Ic=(e,t)=>function(){return e&&(t=(0,e[q3(e)[0]])(e=0)),t},B3=(e,t)=>{for(var u in t)N3(e,u,{get:t[u],enumerable:!0})},nl,Tc,Mc=Ic({"packages/vue/src/bindings.ts"(){nl=function(t){t.ledger.count("blocking",E=>E.blocking);const u=se(!t.ledger.value("blocking"));t.ledger.count("errors",E=>E.type==="error");const r=se(!!t.ledger.value("errors"));let n=!1;Rl(()=>{n=!0});const i=xt(t.store.reduce((E,N)=>(N.visible&&(E[N.key]=N),E),{})),s=se(t.props.validationVisibility||(t.props.type==="checkbox"?"dirty":"blur"));t.on("prop:validationVisibility",({payload:E})=>{s.value=E});const o=se(s.value==="live"),l=se(!1),a=E=>{l.value=(E??[]).some(N=>N.name==="required")};a(t.props.parsedRules),t.on("prop:parsedRules",({payload:E})=>a(E));const c=se(t.children.map(E=>E.uid)),f=qt(()=>{if(!C.state)return!1;if(C.state.submitted)return!0;if(!o.value&&!C.state.settled)return!1;switch(s.value){case"live":return!0;case"blur":return C.state.blurred;case"dirty":return C.state.dirty;default:return!1}}),g=qt(()=>C.state.failing&&f.value),p=qt(()=>C&&d.value?u.value&&!r.value:C.state.dirty&&!Je(C.value)),d=se(Array.isArray(t.props.parsedRules)&&t.props.parsedRules.length>0);t.on("prop:parsedRules",({payload:E})=>{d.value=Array.isArray(E)&&E.length>0});const m=qt(()=>{const E={};for(const N in i){const z=i[N];(z.type!=="validation"||f.value)&&(E[N]=z)}return E}),y=xt(t.store.reduce((E,N)=>(N.type==="ui"&&N.visible&&(E[N.key]=N),E),{})),v=qt(()=>!C.state.failing),k=xt({}),A=new Proxy(k,{get(...E){const[N,z]=E;let ee=Reflect.get(...E);return!ee&&typeof z=="string"&&!Z(N,z)&&!z.startsWith("__v")&&Ln(t).watch(j=>{const re=typeof j.config.rootClasses=="function"?j.config.rootClasses(z,j):{},xe=j.config.classes?Hr(z,j,j.config.classes[z]):{},rt=Hr(z,j,j.props[`_${z}Class`]),Ie=Hr(z,j,j.props[`${z}Class`]);ee=cb(j,z,re,xe,rt,Ie),N[z]=ee??""}),ee}});t.on("prop:rootClasses",()=>{const E=Object.keys(k);for(const N of E)delete k[N]});const x=qt(()=>{const E=[];C.help&&E.push(`help-${t.props.id}`);for(const N in m.value)E.push(`${t.props.id}-${N}`);return E.length?E.join(" "):void 0}),w=se(t.value),b=se(t.value),C=xt({_value:b,attrs:t.props.attrs,disabled:t.props.disabled,describedBy:x,fns:{length:E=>Object.keys(E).length,number:E=>Number(E),string:E=>String(E),json:E=>JSON.stringify(E),eq:Oe},handlers:{blur:E=>{t&&(t.store.set(Ke({key:"blurred",visible:!1,value:!0})),typeof t.props.attrs.onBlur=="function"&&t.props.attrs.onBlur(E))},touch:()=>{var z;const E=C.dirtyBehavior==="compare";if((z=t.store.dirty)!=null&&z.value&&!E)return;const N=!Oe(t.props._init,t._value);!N&&!E||t.store.set(Ke({key:"dirty",visible:!1,value:N}))},DOMInput:E=>{t.input(E.target.value),t.emit("dom-input-event",E)}},help:t.props.help,id:t.props.id,items:c,label:t.props.label,messages:m,didMount:!1,node:An(t),options:t.props.options,defaultMessagePlacement:!0,slots:t.props.__slots,state:{blurred:!1,complete:p,dirty:!1,empty:Je(w),submitted:!1,settled:t.isSettled,valid:u,invalid:g,errors:r,rules:d,validationVisible:f,required:l,failing:!1,passing:v},type:t.props.type,family:t.props.family,ui:y,value:w,classes:A});t.on("created",()=>{Oe(C.value,t.value)||(b.value=t.value,w.value=t.value,Pr(w),Pr(b)),(async()=>(await t.settled,t&&(t.props._init=ot(t.value))))()}),t.on("mounted",()=>{C.didMount=!0}),t.on("settled",({payload:E})=>{C.state.settled=E});function L(E){(Array.isArray(E)?E:Object.keys(E)).forEach(z=>{z=Su(z),Z(C,z)||(C[z]=t.props[z]),t.on(`prop:${z}`,({payload:ee})=>{C[z]=ee})})}L((()=>{const E=["__root","help","label","disabled","options","type","attrs","preserve","preserveErrors","id","dirtyBehavior"],N=/^[a-zA-Z-]+(?:-icon|Icon)$/,z=Object.keys(t.props).filter(ee=>N.test(ee));return E.concat(z)})());function Y(E){E.props&&L(E.props)}t.props.definition&&Y(t.props.definition),t.on("added-props",({payload:E})=>L(E)),t.on("input",({payload:E})=>{t.type!=="input"&&!ye(E)&&!lu(E)?b.value=$i(E):(b.value=E,Pr(b))}),t.on("commitRaw",({payload:E})=>{t.type!=="input"&&!ye(E)&&!lu(E)?w.value=b.value=$i(E):(w.value=b.value=E,Pr(w)),t.emit("modelUpdated")}),t.on("commit",({payload:E})=>{var N;if((!C.state.dirty||C.dirtyBehavior==="compare")&&t.isCreated&&n)if(!((N=t.store.validating)!=null&&N.value))C.handlers.touch();else{const z=t.on("message-removed",({payload:ee})=>{ee.key==="validating"&&(C.handlers.touch(),t.off(z))})}p&&t.type==="input"&&r.value&&!lt(t.props.preserveErrors)&&t.store.filter(z=>{var ee;return!(z.type==="error"&&((ee=z.meta)==null?void 0:ee.autoClear)===!0)}),t.type==="list"&&t.sync&&(c.value=t.children.map(z=>z.uid)),C.state.empty=Je(E)});const J=async E=>{E.type==="ui"&&E.visible&&!E.meta.showAsMessage?y[E.key]=E:E.visible?i[E.key]=E:E.type==="state"&&(C.state[E.key]=!!E.value)};t.on("message-added",E=>J(E.payload)),t.on("message-updated",E=>J(E.payload)),t.on("message-removed",({payload:E})=>{delete y[E.key],delete i[E.key],delete C.state[E.key]}),t.on("settled:blocking",()=>{u.value=!0}),t.on("unsettled:blocking",()=>{u.value=!1}),t.on("settled:errors",()=>{r.value=!1}),t.on("unsettled:errors",()=>{r.value=!0}),ge(f,E=>{E&&(o.value=!0)}),t.context=C,t.emit("context",t,!1),t.on("destroyed",()=>{t.context=void 0,t=null})},Tc=nl}}),z3={};B3(z3,{defaultConfig:()=>ws});var ws,j3=Ic({"packages/vue/src/defaultConfig.ts"(){Mc(),ws=(e={})=>{V3();const{rules:t={},locales:u={},inputs:r={},messages:n={},locale:i=void 0,theme:s=void 0,iconLoaderUrl:o=void 0,iconLoader:l=void 0,icons:a={},...c}=e,f=C2({...k2,...t||{}}),g=q2(Jt({en:N2,...u||{}},n)),p=B2(A3,r),d=F3(s,a,o,l);return Jt({plugins:[p,d,Tc,g,f],...i?{config:{locale:i}}:{}},c||{},!0)}}}),U3=typeof window>"u",li=new Map;function H3(e,t){var u;!U3||!e||(li.has(e)||li.set(e,new Set),(u=li.get(e))==null||u.add(t))}var Oc=typeof window>"u",cr={},Tu={},Me,Tt=new WeakMap,K3="__raw__",W3=/[a-zA-Z0-9\-][cC]lass$/;function Z3(e,t){const u=se(null);if(e==="get"){const n={};return u.value=G3.bind(null,n),u}const r=e.split(".");return St(()=>{u.value=Ds(ye(t)?t.value:t,r)}),u}function Ds(e,t){if(Array.isArray(e)){for(const n of e){const i=n!==!1&&Ds(n,t);if(i!==void 0)return i}return}let u,r=e;for(const n in t){const i=t[n];if(typeof r!="object"||r===null){u=void 0;break}const s=r[i];if(Number(n)===t.length-1&&s!==void 0){u=typeof s=="function"?s.bind(r):s;break}r=s}return u}function G3(e,t){if(typeof t!="string")return mu(650);if(t in e||(e[t]=se(void 0)),e[t].value===void 0){e[t].value=null;const u=wr(t);u&&(e[t].value=u.context),mm(t,({payload:r})=>{e[t].value=Dr(r)?r.context:r})}return e[t].value}function il(e,t,u){function r(p,d){const m=f(it(d.if),{if:!0}),y=a(p,d.then),v=d.else?a(p,d.else):null;return[m,y,v]}function n(p,d){var k,A;const m=f(it(p.if));let y=()=>d,v=()=>d;return typeof p.then=="object"?v=i(p.then,void 0):typeof p.then=="string"&&((k=p.then)!=null&&k.startsWith("$"))?v=f(it(p.then)):v=()=>p.then,Z(p,"else")&&(typeof p.else=="object"?y=i(p.else):typeof p.else=="string"&&((A=p.else)!=null&&A.startsWith("$"))?y=f(it(p.else)):y=()=>p.else),()=>m()?v():y()}function i(p,d,m={}){const y=new Set(Object.keys(p||{})),v=d?f(it(d)):()=>({}),k=[A=>{const x=v();for(const w in x)y.has(w)||(A[w]=x[w])}];if(p){if(ku(p))return n(p,m);for(let A in p){const x=p[A];let w;const b=typeof x=="string";A.startsWith(K3)?(A=A.substring(7),w=()=>x):b&&x.startsWith("$")&&x.length>1&&!(x.startsWith("$reset")&&W3.test(A))?w=f(it(x)):typeof x=="object"&&ku(x)?w=n(x,void 0):typeof x=="object"&&Vu(x)?w=i(x):w=()=>x,k.push(C=>{C[A]=w()})}}return()=>{const A=Array.isArray(p)?[]:{};return k.forEach(x=>x(A)),A}}function s(p,d){let m=null,y=()=>null,v=!1,k=null,A=null,x=null,w=!1;const b=ab(d);if(Ii(b)?(m=b.$el,y=b.$el!=="text"?i(b.attrs,b.bind):()=>null):Ti(b)?(typeof b.$cmp=="string"?Z(p,b.$cmp)?m=p[b.$cmp]:(m=b.$cmp,w=!0):m=b.$cmp,y=i(b.props,b.bind)):ku(b)&&([v,k,A]=r(p,b)),!ku(b)&&"if"in b?v=f(it(b.if)):!ku(b)&&m===null&&(v=()=>!0),"children"in b&&b.children)if(typeof b.children=="string")if(b.children.startsWith("$slots."))m=m==="text"?"slot":m,k=f(it(b.children));else if(b.children.startsWith("$")&&b.children.length>1){const C=f(it(b.children));k=()=>String(C())}else k=()=>String(b.children);else if(Array.isArray(b.children))k=a(p,b.children);else{const[C,L,G]=r(p,b.children);k=Y=>C&&C()?L&&L(Y):G&&G(Y)}if(Ti(b))if(k){const C=k;k=L=>({default(G,Y){var N,z,ee,H;const J=Me;Y&&(Me=Y),G&&((N=Tt.get(Me))==null||N.unshift(G)),L&&((z=Tt.get(Me))==null||z.unshift(L));const E=C(L);return G&&((ee=Tt.get(Me))==null||ee.shift()),L&&((H=Tt.get(Me))==null||H.shift()),Me=J,E}}),k.slot=!0}else k=()=>({});if("for"in b&&b.for){const C=b.for.length===3?b.for[2]:b.for[1];x=[typeof C=="string"&&C.startsWith("$")?f(it(C)):()=>C,b.for[0],b.for.length===3?String(b.for[1]):null]}return[v,m,y,k,A,x,w]}function o(p,d){const m=p(d),y=Me;return Object.keys(m).reduce((v,k)=>{const A=m&&m[k];return v[k]=x=>A&&A(x,y)||null,v},{})}function l(p,d){const[m,y,v,k,A,x,w]=s(p,d);let b=C=>{if(m&&y===null&&k)return m()?k(C):A&&A(C);if(y&&(!m||m())){if(y==="text"&&k)return we(String(k()));if(y==="slot"&&k)return k(C);const L=w?ve(y):y,G=k!=null&&k.slot?o(k,C):null;return en(L,v(),G||(k?k(C):[]))}return typeof A=="function"?A(C):A};if(x){const C=b,[L,G,Y]=x;b=()=>{const J=L(),E=Number.isFinite(J)?Array(Number(J)).fill(0).map((H,j)=>j):J,N=[];if(typeof E!="object")return null;const z=Tt.get(Me)||[],ee=Array.isArray(E);for(const H in E){if(ee&&H in Array.prototype)continue;const j=Object.defineProperty({...z.reduce((re,xe)=>re.__idata?{...re,...xe}:xe,{}),[G]:E[H],...Y!==null?{[Y]:ee?Number(H):H}:{}},"__idata",{enumerable:!1,value:!0});z.unshift(j),N.push(C.bind(null,j)()),z.shift()}return N}}return b}function a(p,d){if(Array.isArray(d)){const y=d.map(l.bind(null,p));return v=>y.map(k=>k(v))}const m=l(p,d);return y=>m(y)}const c=[];function f(p,d={}){const m=new WeakMap;return c.push((y,v)=>{m.set(v,p.provide(k=>y(k,d)))}),()=>m.get(Me)()}function g(p,d){u??(u=Rc(t));const[m,y]=Z(cr,u)?cr[u]:[a(e,t),c];return Oc||(Tu[u]??(Tu[u]=0),Tu[u]++,cr[u]=[m,y]),y.forEach(v=>{v(p,d)}),()=>(Me=d,m())}return g}function Pc(e,t){const u=Tt.get(Me)||[];let r;return u.length&&(r=Ds(u,e.split("."))),r===void 0?t:r}function J3(e,t){return new Proxy(e,{get(...u){let r;const n=u[1];if(typeof n=="string"){const i=Me;Me=t,r=Pc(n,void 0),Me=i}return r!==void 0?r:Reflect.get(...u)}})}function sl(e,t,u){return e((r,n={})=>r.reduce((i,s)=>{if(s.startsWith("slots.")){const o=s.substring(6),l=()=>t.slots&&Z(t.slots,o)&&typeof t.slots[o]=="function";if(n.if)i[s]=l;else if(t.slots){const a=J3(t,u);i[s]=()=>l()?t.slots[o](a):null}}else{const o=Z3(s,t);i[s]=()=>Pc(s,o.value)}return i},{}),u)}function ol(e,t,u){if(t??(t=Rc(e)),Tu[t]--,Tu[t]===0){delete Tu[t];const[,r]=cr[t];delete cr[t],r.length=0}Tt.delete(u)}function Rc(e){return JSON.stringify(e,(t,u)=>typeof u=="function"?u.toString():u)}var Vc=ts({name:"FormKitSchema",props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})},memoKey:{type:String,required:!1}},emits:["mounted"],setup(e,t){var a;const u=Xr();let r={};Tt.set(r,[]);const n={FormKit:An(Nc),...e.library};let i=il(n,e.schema,e.memoKey),s,o;Oc||ge(()=>e.schema,(c,f)=>{var p;const g=r;r={},Tt.set(r,[]),i=il(n,e.schema,e.memoKey),s=sl(i,o,r),c===f&&((p=u==null?void 0:u.proxy)==null?void 0:p.$forceUpdate).call(p),ol(e.schema,e.memoKey,g)},{deep:!0}),St(()=>{o=Object.assign(xt(e.data??{}),{slots:t.slots}),t.slots,s=sl(i,o,r)});function l(){ol(e.schema,e.memoKey,r),o.node&&o.node.destroy(),o.slots=null,o=null,s=null}return Hu(()=>t.emit("mounted")),us(l),H3((a=Xr())==null?void 0:a.appContext.app,l),()=>s?s():null}}),Y3=Vc,X3=typeof window>"u",Vi=Symbol("FormKitParent"),Q3=Symbol("FormKitComponentCallback");function eg(e,t){const u=lg(e,t);if(u.props.definition||Ue(600,u),u.props.definition.component)return()=>{var a;return en((a=u.props.definition)==null?void 0:a.component,{context:u.context},{...t.slots})};const r=se([]);let n=u.props.definition.schemaMemoKey;const i=()=>{var c,f;const a=(f=(c=u.props)==null?void 0:c.definition)==null?void 0:f.schema;a||Ue(601,u),typeof a=="function"?(r.value=a({...e.sectionsSchema||{}}),(n&&e.sectionsSchema||"memoKey"in a&&typeof a.memoKey=="string")&&(n=(n??(a==null?void 0:a.memoKey))+JSON.stringify(e.sectionsSchema))):r.value=a};i(),X3||u.on("schema",()=>{n+="♻️",i()}),t.emit("node",u);const s=u.props.definition.library,o={FormKit:An(Lc),...s,...e.library??{}};function l(){u.emit("mounted")}return t.expose({node:u}),()=>en(Vc,{schema:r.value,data:u.context,onMounted:l,library:o,memoKey:n},{...t.slots})}var Lc=ts(eg,{props:z2,inheritAttrs:!1}),Nc=Lc,tg=Symbol();function ug(e,t){return e.component(t.alias||"FormKit",Nc).component(t.schemaAlias||"FormKitSchema",Y3),{get:wr,setLocale:u=>{var r;(r=t.config)!=null&&r.rootConfig&&(t.config.rootConfig.locale=u)},clearErrors:db,setErrors:fb,submit:Ha,reset:Ka}}var Fs=Symbol.for("FormKitOptions"),rg=Symbol.for("FormKitConfig"),ng={install(e,t){const u=Object.assign({alias:"FormKit",schemaAlias:"FormKitSchema"},typeof t=="function"?t():t),r=bm(u.config||{});u.config={rootConfig:r},e.config.globalProperties.$formkit=ug(e,u),e.provide(Fs,u),e.provide(rg,r),typeof window<"u"&&(globalThis.__FORMKIT_CONFIGS__=(globalThis.__FORMKIT_CONFIGS__||[]).concat([r]))}},ig=typeof window<"u",ai=["ignore","disabled","preserve","help","label",/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility|-behavior|Behavior)$/,/^[a-zA-Z-]+(?:-class|Class)$/,"prefixIcon","suffixIcon",/^[a-zA-Z-]+(?:-icon|Icon)$/],sg=["disabled","ignore","preserve"];function ll(e,t){t.classes&&Object.keys(t.classes).forEach(u=>{typeof u=="string"&&(e.props[`_${u}Class`]=t.classes[u],lr(t.classes[u])&&u==="inner"&&Object.values(t.classes[u]))})}function og(e){return e?["Submit","SubmitRaw","SubmitInvalid"].reduce((u,r)=>{const n=`on${r}`;return n in e&&typeof e[n]=="function"&&(u[n]=e[n]),u},{}):{}}function lg(e,t,u={}){const r=Object.assign({},kt(Fs)||{},u),n=kt(tg,se(ig?document:void 0)),i=kt(Q3,()=>{}),s=Xr(),o=og(s==null?void 0:s.vnode.props),l=["modelValue","model-value"].some(b=>b in((s==null?void 0:s.vnode.props)??{}));let a=!1;Hu(()=>{a=!0});const c=e.modelValue!==void 0?e.modelValue:ot(t.attrs.value);function f(){const b={...xu(e),...o,type:e.type??"text",__root:n.value,__slots:t.slots},C=Lo(xu(t.attrs),ai);C.key||(C.key=Zu()),b.attrs=C;const L=No(xu(t.attrs),ai);for(const Y in L)sg.includes(Y)&&L[Y]===""&&(L[Y]=!0),b[Su(Y)]=L[Y];const G={props:{}};return ll(G,e),Object.assign(b,G.props),typeof b.type!="string"&&(b.definition=b.type,delete b.type),b}const g=f(),p=g.ignore?null:e.parent||kt(Vi,null),d=ob(Jt(r||{},{name:e.name||void 0,value:c,parent:p,plugins:(r.plugins||[]).concat(e.plugins??[]),config:e.config||{},props:g,index:e.index,sync:!!lt(t.attrs.sync||t.attrs.dynamic)},!1,!0));i(d),d.props.definition||Ue(600,d);const m=se(new Set(Array.isArray(d.props.__propDefs)?d.props.__propDefs:Object.keys(d.props.__propDefs??{})));d.on("added-props",({payload:b})=>{(Array.isArray(b)?b:Object.keys(b??{})).forEach(L=>m.value.add(L))});const y=qt(()=>ai.concat([...m.value]).reduce((b,C)=>(typeof C=="string"?(b.push(Su(C)),b.push(qa(C))):b.push(C),b),[]));St(()=>ll(d,e));const v=xu(e);for(const b in v)ge(()=>e[b],()=>{e[b]!==void 0&&(d.props[b]=e[b])});St(()=>{d.props.__root=n.value});const k=new Set,A=xu(t.attrs);St(()=>{x(No(A,y.value))});function x(b){k.forEach(C=>{C(),k.delete(C)});for(const C in b){const L=Su(C);k.add(ge(()=>t.attrs[C],()=>{d.props[L]=t.attrs[C]}))}}if(St(()=>{const b=Lo(xu(t.attrs),y.value);"multiple"in b&&(b.multiple=lt(b.multiple)),typeof b.onBlur=="function"&&(b.onBlur=Gh(b.onBlur)),d.props.attrs=Object.assign({},d.props.attrs||{},b)}),St(()=>{const b=(e.errors??[]).map(C=>Ke({key:ms(C),type:"error",value:C,meta:{source:"prop"}}));d.store.apply(b,C=>C.type==="error"&&C.meta.source==="prop")}),d.type!=="input"){const b=`${d.name}-prop`;St(()=>{const C=e.inputErrors??{},L=Object.keys(C);L.length||d.clearErrors(!0,b);const G=L.reduce((Y,J)=>{let E=C[J];return typeof E=="string"&&(E=[E]),Array.isArray(E)&&(Y[J]=E.map(N=>Ke({key:N,type:"error",value:N,meta:{source:b}}))),Y},{});d.store.apply(G,Y=>Y.type==="error"&&Y.meta.source===b)})}St(()=>Object.assign(d.config,e.config)),d.type!=="input"&&Kl(Vi,d);let w;return d.on("modelUpdated",()=>{var b,C;t.emit("inputRaw",(b=d.context)==null?void 0:b.value,d),a&&t.emit("input",(C=d.context)==null?void 0:C.value,d),l&&d.context&&(w=ot(d.value),t.emit("update:modelValue",$i(d.value)))}),l&&(ge(N0(e,"modelValue"),b=>{Oe(w,b)||d.input(b,!1)},{deep:!0}),d.value!==c&&d.emit("modelUpdated")),jl(()=>d.destroy()),d}var ag=W("messages",()=>({$el:"ul",if:"$fns.length($messages)"})),cg=W("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}}));ag(cg("$message.value"));var fg=W("summary",()=>({$el:"div",attrs:{"aria-live":"polite"}})),dg=W("summaryInner",()=>({$el:"div",if:"$summaries.length && $showSummaries"})),pg=W("messages",()=>({$el:"ul",if:"$summaries.length && $showSummaries"})),hg=W("message",()=>({$el:"li",for:["summary","$summaries"],attrs:{key:"$summary.key","data-message-type":"$summary.type"}})),mg=W("summaryHeader",()=>({$el:"h2",attrs:{id:"$id"}})),bg=W("messageLink",()=>({$el:"a",attrs:{id:"$summary.key",href:'$: "#" + $summary.id',onClick:"$jumpLink"}}));fg(dg(mg("$summaryHeader"),pg(hg(bg("$summary.message")))));j3();Mc();var Wr=ts({name:"FormKitIcon",props:{icon:{type:String,default:""},iconLoader:{type:Function,default:null},iconLoaderUrl:{type:Function,default:null}},setup(e){var s,o;const t=se(void 0),u=kt(Fs,{}),r=kt(Vi,null);let n;function i(){if(!n||typeof n!="function")return;const l=n(e.icon);l instanceof Promise?l.then(a=>{t.value=a}):t.value=l}if(e.iconLoader&&typeof e.iconLoader=="function")n=ar(e.iconLoader);else if(r&&((s=r.props)!=null&&s.iconLoader))n=ar(r.props.iconLoader);else if(e.iconLoaderUrl&&typeof e.iconLoaderUrl=="function")n=ar(n,e.iconLoaderUrl);else{const l=(o=u==null?void 0:u.plugins)==null?void 0:o.find(a=>typeof a.iconHandler=="function");l&&(n=l.iconHandler)}return ge(()=>e.icon,()=>{i()},{immediate:!0}),()=>e.icon&&t.value?en("span",{class:"formkit-icon",innerHTML:t.value}):null}});const qc=new Set,Ne=new WeakMap,Bu=new WeakMap,pu=new WeakMap,Li=new WeakMap,gg=new WeakMap,zu=new WeakMap,_n=new WeakMap,rr=new WeakSet;let Yt,Ss=0,Is=0;const Mt="__aa_tgt",yr="__aa_del",yn="__aa_new",_g=e=>{const t=Eg(e);t&&t.forEach(u=>Ag(u))},yg=e=>{e.forEach(t=>{t.target===Yt&&xg(),Ne.has(t.target)&&_u(t.target)})};function vg(e){const t=Li.get(e);t==null||t.disconnect();let u=Ne.get(e),r=0;const n=5;u||(u=ju(e),Ne.set(e,u));const{offsetWidth:i,offsetHeight:s}=Yt,l=[u.top-n,i-(u.left+n+u.width),s-(u.top+n+u.height),u.left-n].map(c=>`${-1*Math.floor(c)}px`).join(" "),a=new IntersectionObserver(()=>{++r>1&&_u(e)},{root:Yt,threshold:1,rootMargin:l});a.observe(e),Li.set(e,a)}function _u(e){clearTimeout(_n.get(e));const t=Bn(e),u=vr(t)?500:t.duration;_n.set(e,setTimeout(async()=>{const r=pu.get(e);try{await(r==null?void 0:r.finished),Ne.set(e,ju(e)),vg(e)}catch{}},u))}function xg(){clearTimeout(_n.get(Yt)),_n.set(Yt,setTimeout(()=>{qc.forEach(e=>Uc(e,t=>Bc(()=>_u(t))))},100))}function kg(e){setTimeout(()=>{gg.set(e,setInterval(()=>Bc(_u.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function Bc(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let Ni,Eu;const Cg=typeof window<"u"&&"ResizeObserver"in window;Cg&&(Yt=document.documentElement,Ni=new MutationObserver(_g),Eu=new ResizeObserver(yg),window.addEventListener("scroll",()=>{Is=window.scrollY,Ss=window.scrollX}),Eu.observe(Yt));function Eg(e){return e.reduce((r,n)=>[...r,...Array.from(n.addedNodes),...Array.from(n.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:e.reduce((r,n)=>{if(r===!1)return!1;if(n.target instanceof Element){if(ci(n.target),!r.has(n.target)){r.add(n.target);for(let i=0;i<n.target.children.length;i++){const s=n.target.children.item(i);if(s){if(yr in s)return!1;ci(n.target,s),r.add(s)}}}if(n.removedNodes.length)for(let i=0;i<n.removedNodes.length;i++){const s=n.removedNodes[i];if(yr in s)return!1;s instanceof Element&&(r.add(s),ci(n.target,s),Bu.set(s,[n.previousSibling,n.nextSibling]))}}return r},new Set)}function ci(e,t){!t&&!(Mt in e)?Object.defineProperty(e,Mt,{value:e}):t&&!(Mt in t)&&Object.defineProperty(t,Mt,{value:e})}function Ag(e){var t;const u=e.isConnected,r=Ne.has(e);u&&Bu.has(e)&&Bu.delete(e),pu.has(e)&&((t=pu.get(e))===null||t===void 0||t.cancel()),yn in e?al(e):r&&u?wg(e):r&&!u?Dg(e):al(e)}function _t(e){return Number(e.replace(/[^0-9.\-]/g,""))}function $g(e){let t=e.parentElement;for(;t;){if(t.scrollLeft||t.scrollTop)return{x:t.scrollLeft,y:t.scrollTop};t=t.parentElement}return{x:0,y:0}}function ju(e){const t=e.getBoundingClientRect(),{x:u,y:r}=$g(e);return{top:t.top+r,left:t.left+u,width:t.width,height:t.height}}function zc(e,t,u){let r=t.width,n=t.height,i=u.width,s=u.height;const o=getComputedStyle(e);if(o.getPropertyValue("box-sizing")==="content-box"){const a=_t(o.paddingTop)+_t(o.paddingBottom)+_t(o.borderTopWidth)+_t(o.borderBottomWidth),c=_t(o.paddingLeft)+_t(o.paddingRight)+_t(o.borderRightWidth)+_t(o.borderLeftWidth);r-=c,i-=c,n-=a,s-=a}return[r,i,n,s].map(Math.round)}function Bn(e){return Mt in e&&zu.has(e[Mt])?zu.get(e[Mt]):{duration:250,easing:"ease-in-out"}}function jc(e){if(Mt in e)return e[Mt]}function Ts(e){const t=jc(e);return t?rr.has(t):!1}function Uc(e,...t){t.forEach(u=>u(e,zu.has(e)));for(let u=0;u<e.children.length;u++){const r=e.children.item(u);r&&t.forEach(n=>n(r,zu.has(r)))}}function Ms(e){return Array.isArray(e)?e:[e]}function vr(e){return typeof e=="function"}function wg(e){const t=Ne.get(e),u=ju(e);if(!Ts(e))return Ne.set(e,u);let r;if(!t)return;const n=Bn(e);if(typeof n!="function"){const i=t.left-u.left,s=t.top-u.top,[o,l,a,c]=zc(e,t,u),f={transform:`translate(${i}px, ${s}px)`},g={transform:"translate(0, 0)"};o!==l&&(f.width=`${o}px`,g.width=`${l}px`),a!==c&&(f.height=`${a}px`,g.height=`${c}px`),r=e.animate([f,g],{duration:n.duration,easing:n.easing})}else{const[i]=Ms(n(e,"remain",t,u));r=new Animation(i),r.play()}pu.set(e,r),Ne.set(e,u),r.addEventListener("finish",_u.bind(null,e))}function al(e){yn in e&&delete e[yn];const t=ju(e);Ne.set(e,t);const u=Bn(e);if(!Ts(e))return;let r;if(typeof u!="function")r=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:u.duration*1.5,easing:"ease-in"});else{const[n]=Ms(u(e,"add",t));r=new Animation(n),r.play()}pu.set(e,r),r.addEventListener("finish",_u.bind(null,e))}function cl(e,t){var u;e.remove(),Ne.delete(e),Bu.delete(e),pu.delete(e),(u=Li.get(e))===null||u===void 0||u.disconnect(),setTimeout(()=>{if(yr in e&&delete e[yr],Object.defineProperty(e,yn,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(const r in t)e.style[r]=""},0)}function Dg(e){var t;if(!Bu.has(e)||!Ne.has(e))return;const[u,r]=Bu.get(e);Object.defineProperty(e,yr,{value:!0,configurable:!0});const n=window.scrollX,i=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):u&&u.parentNode?u.parentNode.appendChild(e):(t=jc(e))===null||t===void 0||t.appendChild(e),!Ts(e))return cl(e);const[s,o,l,a]=Sg(e),c=Bn(e),f=Ne.get(e);(n!==Ss||i!==Is)&&Fg(e,n,i,c);let g,p={position:"absolute",top:`${s}px`,left:`${o}px`,width:`${l}px`,height:`${a}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!vr(c))Object.assign(e.style,p),g=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:c.duration,easing:"ease-out"});else{const[d,m]=Ms(c(e,"remove",f));(m==null?void 0:m.styleReset)!==!1&&(p=(m==null?void 0:m.styleReset)||p,Object.assign(e.style,p)),g=new Animation(d),g.play()}pu.set(e,g),g.addEventListener("finish",cl.bind(null,e,p))}function Fg(e,t,u,r){const n=Ss-t,i=Is-u,s=document.documentElement.style.scrollBehavior;if(getComputedStyle(Yt).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+n,window.scrollY+i),!e.parentElement)return;const l=e.parentElement;let a=l.clientHeight,c=l.clientWidth;const f=performance.now();function g(){requestAnimationFrame(()=>{if(!vr(r)){const p=a-l.clientHeight,d=c-l.clientWidth;f+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-d,top:window.scrollY-p}),a=l.clientHeight,c=l.clientWidth,g()):document.documentElement.style.scrollBehavior=s}})}g()}function Sg(e){const t=Ne.get(e),[u,,r]=zc(e,t,ju(e));let n=e.parentElement;for(;n&&(getComputedStyle(n).position==="static"||n instanceof HTMLBodyElement);)n=n.parentElement;n||(n=document.body);const i=getComputedStyle(n),s=Ne.get(n)||ju(n),o=Math.round(t.top-s.top)-_t(i.borderTopWidth),l=Math.round(t.left-s.left)-_t(i.borderLeftWidth);return[o,l,u,r]}function Ig(e,t={}){return Ni&&Eu&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!vr(t)&&!t.disrespectUserMotionPreference||(rr.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),Uc(e,_u,kg,n=>Eu==null?void 0:Eu.observe(n)),vr(t)?zu.set(e,t):zu.set(e,{duration:250,easing:"ease-in-out",...t}),Ni.observe(e,{childList:!0}),qc.add(e))),Object.freeze({parent:e,enable:()=>{rr.add(e)},disable:()=>{rr.delete(e)},isEnabled:()=>rr.has(e)})}const Hc={mounted:(e,t)=>{Ig(e,t.value||{})},getSSRProps:()=>({})},Tg=e=>(xr("data-v-d268d66c"),e=e(),kr(),e),Mg=Tg(()=>M("p",{class:"form-text"}," An ordered list of allowed values. The values should be ordered from low to high as determined by the achievement creator. ",-1)),Og={key:0,class:"ms-5 mb-3 p-3 border rounded col-md-8"},Pg={class:"controls mt-2"},Rg=["onClick"],Vg=["onClick"],Lg=["onClick"],Ng={__name:"ValueList",props:{modelValue:{default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=se([]),u=Fe(e,"modelValue");function r(n){const i=n.at("$parent");if(i.value){for(const s in i.value)if(""+s!=""+n.name&&i.value[s]===n.value)return!1}return!0}return ge(t,n=>{u.value=n}),(n,i)=>{const s=ve("FormKit");return Ge((K(),me("div",null,[D(s,{modelValue:t.value,"onUpdate:modelValue":i[1]||(i[1]=o=>t.value=o),name:"allowedValue",type:"list",dynamic:""},{default:ae(({items:o,node:l,value:a})=>[M("h5",null,[we("Allowed Values "),M("button",{type:"button",onClick:i[0]||(i[0]=c=>t.value.push(null)),class:"btn btn-sm btn-primary ms-3"}," Add Value ")]),Mg,o.length>0?(K(),me("div",Og,[(K(!0),me(Ee,null,hu(o,(c,f)=>(K(),me("div",{key:c,class:"value-item"},[D(s,{type:"innerLabelTextInput",index:f,"inner-class":"input-group","label-class":"input-group-text","validation-rules":{distinct:r},validation:"required:trim|distinct","validation-messages":{required:"A value is required.",distinct:"The values must all be different."},"outer-class":"$reset","aria-label":"Allowed value "+(f+1)},{label:ae(g=>[M("label",{class:Ze(g.classes.label)},Zt(f+1),3)]),_:2},1032,["index","validation-rules","aria-label"]),M("ul",Pg,[M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f-1,0,t.value.splice(f,1)[0]),class:"button"},[D(Ut(Wr),{icon:"arrowUp"})],8,Rg)]),M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f+1,0,t.value.splice(f,1)[0]),class:"button"},[D(Ut(Wr),{icon:"arrowDown"})],8,Vg)]),M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f,1),class:"button close"},[D(Ut(Wr),{icon:"close"})],8,Lg)])])]))),128))])):Ve("",!0)]),_:1},8,["modelValue"])])),[[Ut(Hc)]])}}},qg=Ku(Ng,[["__scopeId","data-v-d268d66c"]]),Bg=["onClick"],zg={class:"card mb-3"},jg={class:"card-header"},Ug=["onClick"],Hg={class:"card-body"},Kg={__name:"CriterionLevels",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),be(n,{type:"list",modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),name:"rubricCriterionLevel",dynamic:""},{default:ae(({items:i,node:s,value:o})=>[M("h5",null,[we("Rubric Criterion Levels "),M("button",{type:"button",onClick:()=>s.input(o.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Level ",8,Bg)]),(K(!0),me(Ee,null,hu(i,(l,a)=>(K(),be(n,{type:"group","wrapper-class":"card",key:l,index:a},{default:ae(()=>[M("div",zg,[M("h5",jg,[we("Level "+Zt(a+1)+" ",1),M("button",{type:"button",onClick:()=>s.input(o.filter((c,f)=>f!==a)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,Ug)]),M("div",Hg,[D(n,{type:"hidden",name:"type",value:["RubricCriterionLevel"]}),D(n,{type:"innerLabelTextInput",label:"ID",name:"id","inner-class":"input-group","label-class":"input-group-text",validation:"required:trim","wrapper-class":"required"}),D(n,{type:"innerLabelTextInput",label:"Name",name:"name","inner-class":"input-group","label-class":"input-group-text",validation:"required:trim","wrapper-class":"required"}),D(n,{type:"innerLabelTextareaInput",label:"Description",name:"description","inner-class":"input-group","label-class":"input-group-text"}),D(n,{type:"innerLabelTextInput",label:"Level",name:"level","inner-class":"input-group","label-class":"input-group-text"}),D(n,{type:"innerLabelTextInput",label:"Points",name:"points","inner-class":"input-group","label-class":"input-group-text"}),D(hs,{modelValue:t.value[a].alignment,"onUpdate:modelValue":c=>t.value[a].alignment=c},null,8,["modelValue","onUpdate:modelValue"])])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},Wg=M("span",{class:"input-group-text","aria-label":"ext:"},"ext:",-1),Zg={__name:"ResultType",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se(""),r=se("");return Hu(()=>{var n;if(((n=t.value)==null?void 0:n.substring(0,4))==="ext:"){u.value="other",r.value=t.value.substring(4);return}u.value=t.value?t.value:"",r.value=""}),ge(u,n=>{if(n==="other"){t.value="ext:"+r.value;return}t.value=n}),ge(r,n=>{if(u.value==="other"){t.value="ext:"+n;return}t.value=u.value}),(n,i)=>{const s=ve("FormKit");return K(),be(s,{type:"selectInputGroup",label:"Result Type",modelValue:u.value,"onUpdate:modelValue":i[1]||(i[1]=o=>u.value=o),name:"selectedType","inner-class":"input-group","label-class":"input-group-text","input-class":"$reset formkit-input form-select","wrapper-class":"required",placeholder:"Select Result Type",validation:"required",options:{GradePointAverage:"Grade Point Average",LetterGrade:"Letter Grade",Percent:"Percent",PerformanceLevel:"Performance Level",PredictedScore:"Predicted Score",RawScore:"Raw Score",Result:"Result",RubricCriterion:"Rubric Criterion",RubricCriterionLevel:"Rubric Criterion Level",RubricScore:"Rubric Score",ScaledScore:"Scaled Score",Status:"Status",other:"Other (ext:)"},help:"The type of result this description represents. This is an extensible enumerated vocabulary."},{suffix:ae(()=>[u.value==="other"?(K(),be(s,{key:0,type:"innerLabelTextInput",label:"Extended Type",modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=o=>r.value=o),name:"typeExt","aria-label":"Extended Result Type","inner-class":"input-group ms-3 me-5 pe-3","outer-class":"$reset","label-class":"visually-hidden",before:"ext:",validation:[["matches","/^[a-z|A-Z|0-9|.|-|_]+$/"],["required"]]},{prefix:ae(()=>[Wg]),_:1},8,["modelValue"])):Ve("",!0)]),_:1},8,["modelValue"])}}},Gg={class:"mb-4"},Jg=["onClick"],Yg={class:"card mb-3"},Xg={class:"card-header"},Qg=["onClick"],e_={class:"card-body"},t_={__name:"ResultDescription",props:{modelValue:{default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),be(n,{type:"list",name:"resultDescription",modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),dynamic:""},{default:ae(({items:i,node:s,value:o})=>[M("h5",Gg,[we("Result Descriptions "),M("button",{type:"button",onClick:()=>s.input(o.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Result Description ",8,Jg)]),(K(!0),me(Ee,null,hu(i,(l,a)=>(K(),be(n,{type:"group","wrapper-class":"card",key:l,index:a},{default:ae(()=>[M("div",Yg,[M("h5",Xg,[we("Result Description "+Zt(a+1)+" ",1),M("button",{type:"button",onClick:()=>s.input(o.filter((c,f)=>f!==a)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,Qg)]),M("div",e_,[D(n,{type:"innerLabelTextInput",label:"ID",name:"id","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"The unique URI for this result description. Required so a result can link to this result description."}),D(n,{type:"hidden",name:"type",value:["ResultDescription"]}),D(n,{type:"innerLabelTextInput",label:"Name",name:"name","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"The name of the result."}),D(Zg,{modelValue:t.value[a].resultType,"onUpdate:modelValue":c=>t.value[a].resultType=c},null,8,["modelValue","onUpdate:modelValue"]),D(qg,{modelValue:t.value[a].allowedValue,"onUpdate:modelValue":c=>t.value[a].allowedValue=c},null,8,["modelValue","onUpdate:modelValue"]),D(n,{type:"innerLabelTextInput",label:"Minimum Value",name:"valueMin","inner-class":"input-group","label-class":"input-group-text",help:"The minimum possible `value` that may be asserted in a linked result."}),D(n,{type:"innerLabelTextInput",label:"Maximum Value",name:"valueMax","inner-class":"input-group","label-class":"input-group-text",help:"The maximum possible `value` that may be asserted in a linked result."}),D(Kg,{modelValue:t.value[a].rubricCriterionLevel,"onUpdate:modelValue":c=>t.value[a].rubricCriterionLevel=c},null,8,["modelValue","onUpdate:modelValue"]),D(n,{type:"innerLabelTextInput",label:"Required Level",name:"requiredLevel","inner-class":"input-group","label-class":"input-group-text",help:"The `id` of the rubric criterion level required to pass as determined by the achievement creator."}),D(n,{type:"innerLabelTextInput",label:"Required Value",name:"requiredValue","inner-class":"input-group","label-class":"input-group-text",help:"A value from `allowedValue` or within the range of `valueMin` to `valueMax` required to pass as determined by the achievement creator."}),D(hs,{modelValue:t.value[a].alignment,"onUpdate:modelValue":c=>t.value[a].alignment=c},null,8,["modelValue","onUpdate:modelValue"])])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},u_={class:"tab-pane fade show active",id:"tab-alignments",role:"tabpanel","aria-labelledby":"alignments-tab"},r_={__name:"AlignmentsTab",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>(K(),me("div",u_,[D(t_,{modelValue:t.value.resultDescription,"onUpdate:modelValue":r[0]||(r[0]=n=>t.value.resultDescription=n)},null,8,["modelValue"]),D(Nh,{modelValue:t.value.alignment,"onUpdate:modelValue":r[1]||(r[1]=n=>t.value.alignment=n)},null,8,["modelValue"])]))}},n_=e=>(xr("data-v-cd88b606"),e=e(),kr(),e),i_=n_(()=>M("p",{class:"form-text"},"One or more short, human-friendly, searchable, keywords that describe the type of achievement.",-1)),s_={key:0,class:"ms-5 mb-3 p-3 border rounded"},o_={class:"controls mt-2"},l_=["onClick"],a_={__name:"TagList",props:{modelValue:{default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=se([]),u=Fe(e,"modelValue");Uu(()=>{t.value=u.value});function r(n){const i=n.at("$parent");if(i.value){for(const s in i.value)if(""+s!=""+n.name&&i.value[s]===n.value)return!1}return!0}return ge(t,n=>{u.value=n}),(n,i)=>{const s=ve("FormKit");return Ge((K(),me("div",null,[D(s,{modelValue:t.value,"onUpdate:modelValue":i[1]||(i[1]=o=>t.value=o),name:"tag",type:"list",dynamic:""},{default:ae(({items:o,node:l,value:a})=>[M("h5",null,[we("Tags "),M("button",{type:"button",onClick:i[0]||(i[0]=c=>t.value.push(null)),class:"btn btn-sm btn-primary ms-3"}," Add Tag ")]),i_,o.length>0?(K(),me("div",s_,[(K(!0),me(Ee,null,hu(o,(c,f)=>(K(),me("div",{key:c,class:"value-item"},[D(s,{type:"text",index:f,"validation-rules":{distinct:r},validation:"required:trim|distinct",placeholder:"Enter tag","validation-messages":{required:"Value is required",distinct:"The tags must be distinct"},"outer-class":"$reset"},null,8,["index","validation-rules"]),M("ul",o_,[M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f,1),class:"button close"},[D(Ut(Wr),{icon:"close"})],8,l_)])])]))),128))])):Ve("",!0)]),_:1},8,["modelValue"])])),[[Ut(Hc)]])}}},c_=Ku(a_,[["__scopeId","data-v-cd88b606"]]),f_=["onClick"],d_=M("p",{class:"form-text"},"A list of credentials related to this one.",-1),p_={class:"card mb-3"},h_={class:"card-header"},m_=["onClick"],b_={class:"card-body pb-0"},g_={__name:"RelatedList",emits:["change"],setup(e,{emit:t}){const u=t,r=se([]);return ge(r,n=>{u("change",n)}),(n,i)=>{const s=ve("FormKit");return K(),be(s,{type:"list",modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=o=>r.value=o),name:"alignment",dynamic:""},{default:ae(({items:o,node:l,value:a})=>[M("h5",null,[we("Related Credentials "),M("button",{type:"button",onClick:()=>l.input(a.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Related Credential ",8,f_)]),d_,(K(!0),me(Ee,null,hu(o,(c,f)=>(K(),be(s,{type:"group","wrapper-class":"card",key:c,index:f},{default:ae(()=>[M("div",p_,[M("h5",h_,[we("Credential "+Zt(f+1)+" ",1),M("button",{type:"button",onClick:()=>l.input(a.filter((g,p)=>p!==f)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,m_)]),M("div",b_,[D(s,{type:"hidden",name:"type",value:["Related"]}),D(s,{type:"innerLabelTextInput",label:"ID",name:"id","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"The URI of the related achievement."}),D(s,{type:"innerLabelTextInput",label:"Language",name:"inLanguage","inner-class":"input-group","label-class":"input-group-text",validation:[["matches","/^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$/"]],help:"The language of the related achievement as a BCP47 language code."}),D(s,{type:"innerLabelTextInput",label:"Version",name:"version","inner-class":"input-group","label-class":"input-group-text",help:"The version of the related achievement."})])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},__=["onClick"],y_={class:"form-text"},v_={class:"card mb-3"},x_={class:"card-header"},k_=["onClick"],C_={class:"card-body pb-0"},E_=M("span",{class:"input-group-text","aria-label":"ext:"},"ext:",-1),Kc={__name:"OtherIdentifiers",props:bi({help:{type:String,default:"Other identifiers for this credential."}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,u=Fe(e,"modelValue");return(r,n)=>{const i=ve("FormKit");return K(),be(i,{type:"list",modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),name:"otherIdentifier",dynamic:""},{default:ae(({items:s,node:o,value:l})=>[M("h5",null,[we("Other Identifiers "),M("button",{type:"button",onClick:()=>o.input(l.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Identifier ",8,__)]),M("p",y_,Zt(t.help),1),(K(!0),me(Ee,null,hu(s,(a,c)=>(K(),be(i,{type:"group",key:a,index:c},{default:ae(()=>[M("div",v_,[M("h5",x_,[we("Other Identifier "+Zt(c+1)+" ",1),M("button",{type:"button",onClick:()=>o.input(l.filter((f,g)=>g!==c)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,k_)]),M("div",C_,[D(i,{type:"hidden",name:"type",value:"IdentifierEntry"}),D(i,{type:"innerLabelTextInput",label:"Identifier",name:"identifier","aria-label":"Identifier","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim"}),D(i,{type:"selectInputGroup",label:"Identifier Type",name:"identifierType","inner-class":"input-group","label-class":"input-group-text","input-class":"$reset formkit-input form-select","wrapper-class":"required",placeholder:"Select the Identifier Type",validation:"required",options:{name:"name",sourcedId:"sourcedId",systemId:"systemId",productId:"productId",userName:"userName",accountId:"accountId",emailAddress:"emailAddress",nationalIdentityNumber:"nationalIdentityNumber",isbn:"isbn",issn:"issn",lisSourcedId:"lisSourcedId",oneRosterSourcedId:"oneRosterSourcedId",sisSourcedId:"sisSourcedId",ltiContextId:"ltiContextId",ltiDeploymentId:"ltiDeploymentId",ltiToolId:"ltiToolId",ltiPlatformId:"ltiPlatformId",ltiUserId:"ltiUserId",identifier:"identifier",other:"Other (ext:)"}}),l[c].identifierType==="other"?(K(),be(i,{key:0,type:"innerLabelTextInput",label:"Extended Type",name:"typeExt","aria-label":"Extended Identifier Type","inner-class":"input-group ms-3 me-5 pe-3","outer-class":"$reset","label-class":"visually-hidden",before:"ext:",validation:[["matches","/^[a-z|A-Z|0-9|.|-|_]+$/"]]},{prefix:ae(()=>[E_]),_:1})):Ve("",!0)])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},A_={__name:"AddressComponent",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se(!1);return Uu(()=>{Object.keys(t).length>0&&(u.value=!0)}),(r,n)=>{const i=ve("FormKit");return K(),be(i,{type:"group",name:"address",modelValue:t.value,"onUpdate:modelValue":n[1]||(n[1]=s=>t.value=s)},{default:ae(()=>[D(i,{type:"checkbox",label:"Include address",modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),"wrapper-class":"form-check form-switch","input-class":"$reset form-check-input","label-class":"$reset form-check-label",role:"switch",ignore:"true"},null,8,["modelValue"]),Ge(M("div",null,[D(i,{type:"hidden",name:"type",value:["Address"]}),D(i,{type:"text",label:"Street Address",name:"streetAddress",help:"Street address of the creator."}),D(i,{type:"text",label:"Post Office Box Number",name:"postOfficeBoxNumber",help:"A post office box number for PO box addresses."}),D(i,{type:"text",label:"City",name:"addressLocality",help:"A locality within the region."}),D(i,{type:"text",label:"State",name:"addressRegion",help:"The region within the country."}),D(i,{type:"text",label:"Postal Code",name:"postalCode",help:"A postal code."}),D(i,{type:"text",label:"Country",name:"addressCountry",help:"Country name."}),D(i,{type:"text",label:"Country Code",name:"addressCountryCode",help:"Country code. The value must be a ISO 3166-1 alpha-2 country code, such as 'US'."}),Ve("",!0)],512),[[Ct,u.value]])]),_:1},8,["modelValue"])}}},$_={class:"card"},w_={class:"card-header"},D_={class:"card-body"},F_={__name:"CreatorProfile",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se("noCreator");return Uu(()=>{if(Object.keys(t.value).length===0){t.value="noCreator";return}u.value="organization",t.value.dateOfBirth&&(u.value="individual")}),(r,n)=>{const i=ve("formKit"),s=ve("FormKit");return K(),me("div",$_,[M("h5",w_,[D(i,{type:"select",label:"Creator",modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=o=>u.value=o),"input-class":"$reset formkit-input form-select",options:{noCreator:"Do not add a creator field",organization:"The creator is an Organization",individual:"The creator is a Person"},ignore:"true"},null,8,["modelValue"])]),u.value!=="noCreator"?(K(),be(s,{key:0,type:"group",name:"creator",modelValue:t.value,"onUpdate:modelValue":n[4]||(n[4]=o=>t.value=o)},{default:ae(()=>[M("div",D_,[D(s,{type:"text",label:"ID",name:"id","wrapper-class":"required",validation:"required:trim",help:"Unique URI for the creator."}),D(s,{type:"hidden",name:"type",value:["Profile"]}),D(s,{type:"text",label:"Name",name:"name",help:"The name of the entity or organization."}),D(s,{type:"text",label:"Description",name:"description",help:"A short description of the issuer entity or organization."}),D(da,{help:"An image that represents the creator. Must be a PNG or SVG image.",modelValue:t.value.image,"onUpdate:modelValue":n[1]||(n[1]=o=>t.value.image=o)},null,8,["modelValue"]),u.value==="organization"?(K(),be(s,{key:0,type:"text",label:"Official",name:"official",help:"If the entity is an organization, `official` is the name of an authorized official of the organization."})):Ve("",!0),D(s,{type:"text",label:"URL",name:"url",validation:"url",help:"The homepage or social media profile of the entity, whether individual or institutional. Should be a URL/URI Accessible via HTTP."}),D(s,{type:"text",label:"Email",name:"email",validation:"email",help:"An email address for the creator."}),D(s,{type:"text",label:"Phone",name:"phone",help:"A phone number for the creator."}),D(A_,{modelValue:t.value.address,"onUpdate:modelValue":n[2]||(n[2]=o=>t.value.address=o)},null,8,["modelValue"]),u.value==="individual"?(K(),be(s,{key:1,type:"text",label:"Date of Birth",name:"dateOfBirth",format:"yyyy-MM-dd",help:"Birthdate of the person."})):Ve("",!0),D(Kc,{label:"Other Identifiers",modelValue:t.value.otherIdentifier,"onUpdate:modelValue":n[3]||(n[3]=o=>t.value.otherIdentifier=o),help:"Other unique identifiers for the creator."},null,8,["modelValue"]),Ve("",!0),Ve("",!0),Ve("",!0)])]),_:1},8,["modelValue"])):Ve("",!0)])}}},S_={class:"tab-pane fade show active",id:"tab-additional",role:"tabpanel","aria-labelledby":"additional-tab"},I_={__name:"AdditionalTab",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),me("div",S_,[D(n,{type:"text",name:"id",label:"ID",modelValue:t.value.id,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value.id=i),help:"Unique URI for the Achievement."},null,8,["modelValue"]),D(c_,{modelValue:t.value.tag,"onUpdate:modelValue":r[1]||(r[1]=i=>t.value.tag=i)},null,8,["modelValue"]),D(g_,{modelValue:t.value.related,"onUpdate:modelValue":r[2]||(r[2]=i=>t.value.related=i)},null,8,["modelValue"]),D(Kc,{modelValue:t.value.otherIdentifier,"onUpdate:modelValue":r[3]||(r[3]=i=>t.value.otherIdentifier=i)},null,8,["modelValue"]),D(F_,{modelValue:t.value.creator,"onUpdate:modelValue":r[4]||(r[4]=i=>t.value.creator=i)},null,8,["modelValue"])])}}},T_={class:"nav nav-tabs",role:"tablist"},M_={class:"nav-item",role:"presentation"},O_=["aria-selected"],P_={class:"nav-item",role:"presentation"},R_=["aria-selected"],V_={class:"nav-item",role:"presentation"},L_=["aria-selected"],N_={class:"nav-item",role:"presentation"},q_=["aria-selected"],B_={class:"tab-content mt-3",id:"tab-content"},z_={key:0,class:"alert alert-warning",role:"alert"},j_=M("button",{class:"btn btn-primary float-end mt-5",type:"submit",disabled:!1},"Save",-1),U_={__name:"AchievementDefiner",props:{achievement:{type:String,default:""}},emits:["saveDefinition"],setup(e,{emit:t}){const u=e,r=se("basic"),n=se(!1),i=se(null),s=xt({type:["Achievement"],basic:{},detail:{},alignments:{},additional:{}}),o=xt({});Uu(()=>{try{const p=JSON.parse(u.achievement);s.basic={name:p.name||"",achievementType:p.achievementType||null,image:p.image||{},description:p.description||"",criteria:p.criteria||{}},s.detail={humanCode:p.humanCode||null,inLanguage:p.inLanguage||null,version:p.version||null,creditsAvailable:p.creditsAvailable||null,specialization:p.specialization||null,fieldOfStudy:p.fieldOfStudy||null},s.alignments={resultDescription:p.resultDescription||[],alignment:p.alignment||[]},s.additional={id:p.id||null,tag:p.tag||[],related:p.related||[],otherIdentifier:p.otherIdentifier||[],creator:p.creator||{}}}catch{}}),ge(s,p=>{Object.assign(o,p.basic),Object.assign(o,p.detail),Object.assign(o,p.alignments),Object.assign(o,p.additional)});function l(p){r.value=p}function a(p){return JSON.parse(JSON.stringify(p,(d,m)=>m===null||m===""||Array.isArray(m)&&m.length===0?void 0:m))}function c(p){const d=a(p);document.getElementById(i.value.node.props.id).dispatchEvent(new CustomEvent("saveDefinition",{bubbles:!0,detail:JSON.stringify(d)}))}function f(p){try{const d=document.getElementById(i.value.node.props.id),m=i.value.node.context.state.valid,y=a(i.value.node.value);d.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:JSON.stringify(y)})),m&&d.dispatchEvent(new CustomEvent("updated",{bubbles:!0,detail:JSON.stringify(y)}))}catch{}}function g(p){n.value=!0}return(p,d)=>{const m=ve("FormKit");return K(),me("div",null,[M("ul",T_,[M("li",M_,[M("button",{class:Ze(["nav-link",{active:r.value==="basic"}]),type:"button",id:"basic-tab",role:"tab","aria-controls":"tab-basic","aria-selected":r.value==="basic"?"true":"false",onClick:d[0]||(d[0]=y=>l("basic"))},"Primary Details",10,O_)]),M("li",P_,[M("button",{class:Ze(["nav-link",{active:r.value==="detail"}]),type:"button",id:"detail-tab",role:"tab","aria-controls":"tab-detail","aria-selected":r.value==="detail"?"true":"false",onClick:d[1]||(d[1]=y=>l("detail"))},"Additional Details",10,R_)]),M("li",V_,[M("button",{class:Ze(["nav-link",{active:r.value==="alignments"}]),type:"button",id:"detail-tab",role:"tab","aria-controls":"tab-alignments","aria-selected":r.value==="alignments"?"true":"false",onClick:d[2]||(d[2]=y=>l("alignments"))},"Alignments",10,L_)]),M("li",N_,[M("button",{class:Ze(["nav-link",{active:r.value==="additional"}]),type:"button",id:"additional-tab",role:"tab","aria-controls":"tab-additional","aria-selected":r.value==="additional"?"true":"false",onClick:d[3]||(d[3]=y=>l("additional"))},"Additional Information",10,q_)])]),M("div",B_,[D(m,{type:"form",actions:!1,ref_key:"form",ref:i,onSubmit:c,onSubmitInvalid:g,onChange:f,"validation-visibility":"live"},{default:ae(({state:{valid:y}})=>[!y&&n.value?(K(),me("div",z_," There are some errors in the form submission. Please correct the errors and then resubmit the form. ")):Ve("",!0),D(m,{type:"hidden",name:"@context",value:["https://www.w3.org/2018/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"]}),D(m,{type:"hidden",name:"type",modelValue:s.type,"onUpdate:modelValue":d[4]||(d[4]=v=>s.type=v),value:["Achievement"]},null,8,["modelValue"]),Ge(D(Fh,{modelValue:s.basic,"onUpdate:modelValue":d[5]||(d[5]=v=>s.basic=v)},null,8,["modelValue"]),[[Ct,r.value==="basic"]]),Ge(D(Th,{modelValue:s.detail,"onUpdate:modelValue":d[6]||(d[6]=v=>s.detail=v)},null,8,["modelValue"]),[[Ct,r.value==="detail"]]),Ge(D(r_,{modelValue:s.alignments,"onUpdate:modelValue":d[7]||(d[7]=v=>s.alignments=v)},null,8,["modelValue"]),[[Ct,r.value==="alignments"]]),Ge(D(I_,{modelValue:s.additional,"onUpdate:modelValue":d[8]||(d[8]=v=>s.additional=v)},null,8,["modelValue"]),[[Ct,r.value==="additional"]]),j_]),_:1},512)])])}}},H_={class:"container"},K_={__name:"App",props:{achievement:{type:String,default:""}},setup(e){return(t,u)=>(K(),me("div",H_,[D(U_,{achievement:e.achievement},null,8,["achievement"])]))}},W_={config:{classes:$3({global:{outer:"$reset mb-4",input:"form-control",label:"form-label",help:"form-text",message:"invalid-feedback"},form:{form:"mt-1 mx-auto p-3 border rounded"},range:{input:"$reset form-range"},submit:{outer:"$reset mt-3",input:"$reset btn btn-primary"}})}},Z_={schema:Ft(uu(bu(gu("$label"),pe("prefix","label"),tt(),Es(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",family:"text",props:[],forceTypeProp:"text",features:[$s],schemaMemoKey:"qmwq6rtsiye"},G_={schema:Ft(uu(bu(gu("$label"),pe("prefix","label"),tt(),xc(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:[],forceTypeProp:"textarea",features:[$c],schemaMemoKey:"zq0nltggno"},J_={schema:Ft(uu(bu(gu("$label"),pe("prefix"),tt(),vc(Ye("$slots.default",()=>"$slots.default",bn(Ye("$option.group",yc(bn(mn("$option.label"))),mn("$option.label"))))),Ye("$attrs.multiple !== undefined",()=>"",pe("select")),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:["options","placeholder","optionsLoader"],forceTypeProp:"select",features:[qn,Fc,au("select","select")],schemaMemoKey:"at63zamx5wg"},Y_=(e,t)=>{const u=_d(K_,t);return u.use(ng,ws({config:W_.config,inputs:{innerLabelTextInput:Z_,innerLabelTextareaInput:G_,selectInputGroup:J_}})),u};window.addEventListener("ob3-open",function(e){var i,s;const t=((i=e.detail)==null?void 0:i.selector)||"#ob3-definer",u=document.querySelector(t);if(!u)throw new Error("No element found for selector "+t);const r={...u.dataset};(s=e.detail)!=null&&s.achievement&&(typeof e.detail.achievement=="string"?r.achievement=e.detail.achievement:r.achievement=JSON.stringify(e.detail.achievement));const n=Y_(t,r);n.mount(t),window.addEventListener("ob3-close",function o(){window.removeEventListener("ob3-open",o),n.unmount()})});
|
|
32
|
+
`,i.map=[t,e.line],!0}function jp(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||n+3>i)return!1;const s=e.src.charCodeAt(n);if(s!==126&&s!==96)return!1;let o=n;n=e.skipChars(n,s);let l=n-o;if(l<3)return!1;const a=e.src.slice(o,n),c=e.src.slice(n,i);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let f=t,g=!1;for(;f++,!(f>=u||(n=o=e.bMarks[f]+e.tShift[f],i=e.eMarks[f],n<i&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(n)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(n=e.skipChars(n,s),!(n-o<l)&&(n=e.skipSpaces(n),!(n<i)))){g=!0;break}l=e.sCount[t],e.line=f+(g?1:0);const p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,f,l,!0),p.markup=a,p.map=[t,e.line],!0}function Up(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(n)!==62)return!1;if(r)return!0;const o=[],l=[],a=[],c=[],f=e.md.block.ruler.getRules("blockquote"),g=e.parentType;e.parentType="blockquote";let p=!1,d;for(d=t;d<u;d++){const A=e.sCount[d]<e.blkIndent;if(n=e.bMarks[d]+e.tShift[d],i=e.eMarks[d],n>=i)break;if(e.src.charCodeAt(n++)===62&&!A){let w=e.sCount[d]+1,b,C;e.src.charCodeAt(n)===32?(n++,w++,C=!1,b=!0):e.src.charCodeAt(n)===9?(b=!0,(e.bsCount[d]+w)%4===3?(n++,w++,C=!1):C=!0):b=!1;let L=w;for(o.push(e.bMarks[d]),e.bMarks[d]=n;n<i;){const G=e.src.charCodeAt(n);if(fe(G))G===9?L+=4-(L+e.bsCount[d]+(C?1:0))%4:L++;else break;n++}p=n>=i,l.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(b?1:0),a.push(e.sCount[d]),e.sCount[d]=L-w,c.push(e.tShift[d]),e.tShift[d]=n-e.bMarks[d];continue}if(p)break;let x=!1;for(let w=0,b=f.length;w<b;w++)if(f[w](e,d,u,!0)){x=!0;break}if(x){e.lineMax=d,e.blkIndent!==0&&(o.push(e.bMarks[d]),l.push(e.bsCount[d]),c.push(e.tShift[d]),a.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}o.push(e.bMarks[d]),l.push(e.bsCount[d]),c.push(e.tShift[d]),a.push(e.sCount[d]),e.sCount[d]=-1}const m=e.blkIndent;e.blkIndent=0;const y=e.push("blockquote_open","blockquote",1);y.markup=">";const v=[t,0];y.map=v,e.md.block.tokenize(e,t,d);const k=e.push("blockquote_close","blockquote",-1);k.markup=">",e.lineMax=s,e.parentType=g,v[1]=e.line;for(let A=0;A<c.length;A++)e.bMarks[A+t]=o[A],e.tShift[A+t]=c[A],e.sCount[A+t]=a[A],e.bsCount[A+t]=l[A];return e.blkIndent=m,!0}function Hp(e,t,u,r){const n=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(i++);if(s!==42&&s!==45&&s!==95)return!1;let o=1;for(;i<n;){const a=e.src.charCodeAt(i++);if(a!==s&&!fe(a))return!1;a===s&&o++}if(o<3)return!1;if(r)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(o+1).join(String.fromCharCode(s)),!0}function So(e,t){const u=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const n=e.src.charCodeAt(r++);if(n!==42&&n!==45&&n!==43)return-1;if(r<u){const i=e.src.charCodeAt(r);if(!fe(i))return-1}return r}function Io(e,t){const u=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let n=u;if(n+1>=r)return-1;let i=e.src.charCodeAt(n++);if(i<48||i>57)return-1;for(;;){if(n>=r)return-1;if(i=e.src.charCodeAt(n++),i>=48&&i<=57){if(n-u>=10)return-1;continue}if(i===41||i===46)break;return-1}return n<r&&(i=e.src.charCodeAt(n),!fe(i))?-1:n}function Kp(e,t){const u=e.level+2;for(let r=t+2,n=e.tokens.length-2;r<n;r++)e.tokens[r].level===u&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Wp(e,t,u,r){let n,i,s,o,l=t,a=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let c=!1;r&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(c=!0);let f,g,p;if((p=Io(e,l))>=0){if(f=!0,s=e.bMarks[l]+e.tShift[l],g=Number(e.src.slice(s,p-1)),c&&g!==1)return!1}else if((p=So(e,l))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(r)return!0;const d=e.src.charCodeAt(p-1),m=e.tokens.length;f?(o=e.push("ordered_list_open","ol",1),g!==1&&(o.attrs=[["start",g]])):o=e.push("bullet_list_open","ul",1);const y=[l,0];o.map=y,o.markup=String.fromCharCode(d);let v=!1;const k=e.md.block.ruler.getRules("list"),A=e.parentType;for(e.parentType="list";l<u;){i=p,n=e.eMarks[l];const x=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let w=x;for(;i<n;){const ee=e.src.charCodeAt(i);if(ee===9)w+=4-(w+e.bsCount[l])%4;else if(ee===32)w++;else break;i++}const b=i;let C;b>=n?C=1:C=w-x,C>4&&(C=1);const L=x+C;o=e.push("list_item_open","li",1),o.markup=String.fromCharCode(d);const G=[l,0];o.map=G,f&&(o.info=e.src.slice(s,p-1));const Y=e.tight,J=e.tShift[l],E=e.sCount[l],N=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=L,e.tight=!0,e.tShift[l]=b-e.bMarks[l],e.sCount[l]=w,b>=n&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,u):e.md.block.tokenize(e,l,u,!0),(!e.tight||v)&&(a=!1),v=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=N,e.tShift[l]=J,e.sCount[l]=E,e.tight=Y,o=e.push("list_item_close","li",-1),o.markup=String.fromCharCode(d),l=e.line,G[1]=l,l>=u||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let z=!1;for(let ee=0,H=k.length;ee<H;ee++)if(k[ee](e,l,u,!0)){z=!0;break}if(z)break;if(f){if(p=Io(e,l),p<0)break;s=e.bMarks[l]+e.tShift[l]}else if(p=So(e,l),p<0)break;if(d!==e.src.charCodeAt(p-1))break}return f?o=e.push("ordered_list_close","ol",-1):o=e.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(d),y[1]=l,e.line=l,e.parentType=A,a&&Kp(e,m),!0}function Zp(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(n)!==91)return!1;function o(k){const A=e.lineMax;if(k>=A||e.isEmpty(k))return null;let x=!1;if(e.sCount[k]-e.blkIndent>3&&(x=!0),e.sCount[k]<0&&(x=!0),!x){const C=e.md.block.ruler.getRules("reference"),L=e.parentType;e.parentType="reference";let G=!1;for(let Y=0,J=C.length;Y<J;Y++)if(C[Y](e,k,A,!0)){G=!0;break}if(e.parentType=L,G)return null}const w=e.bMarks[k]+e.tShift[k],b=e.eMarks[k];return e.src.slice(w,b+1)}let l=e.src.slice(n,i+1);i=l.length;let a=-1;for(n=1;n<i;n++){const k=l.charCodeAt(n);if(k===91)return!1;if(k===93){a=n;break}else if(k===10){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}else if(k===92&&(n++,n<i&&l.charCodeAt(n)===10)){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}}if(a<0||l.charCodeAt(a+1)!==58)return!1;for(n=a+2;n<i;n++){const k=l.charCodeAt(n);if(k===10){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}else if(!fe(k))break}const c=e.md.helpers.parseLinkDestination(l,n,i);if(!c.ok)return!1;const f=e.md.normalizeLink(c.str);if(!e.md.validateLink(f))return!1;n=c.pos;const g=n,p=s,d=n;for(;n<i;n++){const k=l.charCodeAt(n);if(k===10){const A=o(s);A!==null&&(l+=A,i=l.length,s++)}else if(!fe(k))break}let m=e.md.helpers.parseLinkTitle(l,n,i);for(;m.can_continue;){const k=o(s);if(k===null)break;l+=k,n=i,i=l.length,s++,m=e.md.helpers.parseLinkTitle(l,n,i,m)}let y;for(n<i&&d!==n&&m.ok?(y=m.str,n=m.pos):(y="",n=g,s=p);n<i;){const k=l.charCodeAt(n);if(!fe(k))break;n++}if(n<i&&l.charCodeAt(n)!==10&&y)for(y="",n=g,s=p;n<i;){const k=l.charCodeAt(n);if(!fe(k))break;n++}if(n<i&&l.charCodeAt(n)!==10)return!1;const v=Pn(l.slice(1,a));return v?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[v]>"u"&&(e.env.references[v]={title:y,href:f}),e.line=s),!0):!1}const Gp=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Jp="[a-zA-Z_:][a-zA-Z0-9:._-]*",Yp="[^\"'=<>`\\x00-\\x20]+",Xp="'[^']*'",Qp='"[^"]*"',e1="(?:"+Yp+"|"+Xp+"|"+Qp+")",t1="(?:\\s+"+Jp+"(?:\\s*=\\s*"+e1+")?)",Ca="<[A-Za-z][A-Za-z0-9\\-]*"+t1+"*\\s*\\/?>",Ea="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",u1="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",r1="<[?][\\s\\S]*?[?]>",n1="<![A-Za-z][^>]*>",i1="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",s1=new RegExp("^(?:"+Ca+"|"+Ea+"|"+u1+"|"+r1+"|"+n1+"|"+i1+")"),o1=new RegExp("^(?:"+Ca+"|"+Ea+")"),vu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Gp.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o1.source+"\\s*$"),/^$/,!1]];function l1(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(n)!==60)return!1;let s=e.src.slice(n,i),o=0;for(;o<vu.length&&!vu[o][0].test(s);o++);if(o===vu.length)return!1;if(r)return vu[o][2];let l=t+1;if(!vu[o][1].test(s)){for(;l<u&&!(e.sCount[l]<e.blkIndent);l++)if(n=e.bMarks[l]+e.tShift[l],i=e.eMarks[l],s=e.src.slice(n,i),vu[o][1].test(s)){s.length!==0&&l++;break}}e.line=l;const a=e.push("html_block","",0);return a.map=[t,l],a.content=e.getLines(t,l,e.blkIndent,!0),!0}function a1(e,t,u,r){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(n);if(s!==35||n>=i)return!1;let o=1;for(s=e.src.charCodeAt(++n);s===35&&n<i&&o<=6;)o++,s=e.src.charCodeAt(++n);if(o>6||n<i&&!fe(s))return!1;if(r)return!0;i=e.skipSpacesBack(i,n);const l=e.skipCharsBack(i,35,n);l>n&&fe(e.src.charCodeAt(l-1))&&(i=l),e.line=t+1;const a=e.push("heading_open","h"+String(o),1);a.markup="########".slice(0,o),a.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(n,i).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup="########".slice(0,o),!0}function c1(e,t,u){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const n=e.parentType;e.parentType="paragraph";let i=0,s,o=t+1;for(;o<u&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3)continue;if(e.sCount[o]>=e.blkIndent){let p=e.bMarks[o]+e.tShift[o];const d=e.eMarks[o];if(p<d&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=d))){i=s===61?1:2;break}}if(e.sCount[o]<0)continue;let g=!1;for(let p=0,d=r.length;p<d;p++)if(r[p](e,o,u,!0)){g=!0;break}if(g)break}if(!i)return!1;const l=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o+1;const a=e.push("heading_open","h"+String(i),1);a.markup=String.fromCharCode(s),a.map=[t,e.line];const c=e.push("inline","",0);c.content=l,c.map=[t,e.line-1],c.children=[];const f=e.push("heading_close","h"+String(i),-1);return f.markup=String.fromCharCode(s),e.parentType=n,!0}function f1(e,t,u){const r=e.md.block.ruler.getRules("paragraph"),n=e.parentType;let i=t+1;for(e.parentType="paragraph";i<u&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3||e.sCount[i]<0)continue;let a=!1;for(let c=0,f=r.length;c<f;c++)if(r[c](e,i,u,!0)){a=!0;break}if(a)break}const s=e.getLines(t,i,e.blkIndent,!1).trim();e.line=i;const o=e.push("paragraph_open","p",1);o.map=[t,e.line];const l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=n,!0}const Lr=[["table",Bp,["paragraph","reference"]],["code",zp],["fence",jp,["paragraph","reference","blockquote","list"]],["blockquote",Up,["paragraph","reference","blockquote","list"]],["hr",Hp,["paragraph","reference","blockquote","list"]],["list",Wp,["paragraph","reference","blockquote"]],["reference",Zp],["html_block",l1,["paragraph","reference","blockquote"]],["heading",a1,["paragraph","reference","blockquote"]],["lheading",c1],["paragraph",f1]];function Rn(){this.ruler=new Be;for(let e=0;e<Lr.length;e++)this.ruler.push(Lr[e][0],Lr[e][1],{alt:(Lr[e][2]||[]).slice()})}Rn.prototype.tokenize=function(e,t,u){const r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting;let s=t,o=!1;for(;s<u&&(e.line=s=e.skipEmptyLines(s),!(s>=u||e.sCount[s]<e.blkIndent));){if(e.level>=i){e.line=u;break}const l=e.line;let a=!1;for(let c=0;c<n;c++)if(a=r[c](e,s,u,!1),a){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!a)throw new Error("none of the block rules matched");e.tight=!o,e.isEmpty(e.line-1)&&(o=!0),s=e.line,s<u&&e.isEmpty(s)&&(o=!0,s++,e.line=s)}};Rn.prototype.parse=function(e,t,u,r){if(!e)return;const n=new this.State(e,t,u,r);this.tokenize(n,n.line,n.lineMax)};Rn.prototype.State=Dt;function Ar(e,t,u,r){this.src=e,this.env=u,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Ar.prototype.pushPending=function(){const e=new ft("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Ar.prototype.push=function(e,t,u){this.pending&&this.pushPending();const r=new ft(e,t,u);let n=null;return u<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,u>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],n={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(n),r};Ar.prototype.scanDelims=function(e,t){const u=this.posMax,r=this.src.charCodeAt(e),n=e>0?this.src.charCodeAt(e-1):32;let i=e;for(;i<u&&this.src.charCodeAt(i)===r;)i++;const s=i-e,o=i<u?this.src.charCodeAt(i):32,l=gr(n)||br(String.fromCharCode(n)),a=gr(o)||br(String.fromCharCode(o)),c=mr(n),f=mr(o),g=!f&&(!a||c||l),p=!c&&(!l||f||a);return{can_open:g&&(t||!p||l),can_close:p&&(t||!g||a),length:s}};Ar.prototype.Token=ft;function d1(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function p1(e,t){let u=e.pos;for(;u<e.posMax&&!d1(e.src.charCodeAt(u));)u++;return u===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,u)),e.pos=u,!0)}const h1=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function m1(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const u=e.pos,r=e.posMax;if(u+3>r||e.src.charCodeAt(u)!==58||e.src.charCodeAt(u+1)!==47||e.src.charCodeAt(u+2)!==47)return!1;const n=e.pending.match(h1);if(!n)return!1;const i=n[1],s=e.md.linkify.matchAtStart(e.src.slice(u-i.length));if(!s)return!1;let o=s.url;if(o.length<=i.length)return!1;o=o.replace(/\*+$/,"");const l=e.md.normalizeLink(o);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="linkify",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(o);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=o.length-i.length,!0}function b1(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==10)return!1;const r=e.pending.length-1,n=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let i=r-1;for(;i>=1&&e.pending.charCodeAt(i-1)===32;)i--;e.pending=e.pending.slice(0,i),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(u++;u<n&&fe(e.src.charCodeAt(u));)u++;return e.pos=u,!0}const ds=[];for(let e=0;e<256;e++)ds.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){ds[e.charCodeAt(0)]=1});function g1(e,t){let u=e.pos;const r=e.posMax;if(e.src.charCodeAt(u)!==92||(u++,u>=r))return!1;let n=e.src.charCodeAt(u);if(n===10){for(t||e.push("hardbreak","br",0),u++;u<r&&(n=e.src.charCodeAt(u),!!fe(n));)u++;return e.pos=u,!0}let i=e.src[u];if(n>=55296&&n<=56319&&u+1<r){const o=e.src.charCodeAt(u+1);o>=56320&&o<=57343&&(i+=e.src[u+1],u++)}const s="\\"+i;if(!t){const o=e.push("text_special","",0);n<256&&ds[n]!==0?o.content=i:o.content=s,o.markup=s,o.info="escape"}return e.pos=u+1,!0}function _1(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==96)return!1;const n=u;u++;const i=e.posMax;for(;u<i&&e.src.charCodeAt(u)===96;)u++;const s=e.src.slice(n,u),o=s.length;if(e.backticksScanned&&(e.backticks[o]||0)<=n)return t||(e.pending+=s),e.pos+=o,!0;let l=u,a;for(;(a=e.src.indexOf("`",l))!==-1;){for(l=a+1;l<i&&e.src.charCodeAt(l)===96;)l++;const c=l-a;if(c===o){if(!t){const f=e.push("code_inline","code",0);f.markup=s,f.content=e.src.slice(u,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[c]=a}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=o,!0}function y1(e,t){const u=e.pos,r=e.src.charCodeAt(u);if(t||r!==126)return!1;const n=e.scanDelims(e.pos,!0);let i=n.length;const s=String.fromCharCode(r);if(i<2)return!1;let o;i%2&&(o=e.push("text","",0),o.content=s,i--);for(let l=0;l<i;l+=2)o=e.push("text","",0),o.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0}function To(e,t){let u;const r=[],n=t.length;for(let i=0;i<n;i++){const s=t[i];if(s.marker!==126||s.end===-1)continue;const o=t[s.end];u=e.tokens[s.token],u.type="s_open",u.tag="s",u.nesting=1,u.markup="~~",u.content="",u=e.tokens[o.token],u.type="s_close",u.tag="s",u.nesting=-1,u.markup="~~",u.content="",e.tokens[o.token-1].type==="text"&&e.tokens[o.token-1].content==="~"&&r.push(o.token-1)}for(;r.length;){const i=r.pop();let s=i+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,i!==s&&(u=e.tokens[s],e.tokens[s]=e.tokens[i],e.tokens[i]=u)}}function v1(e){const t=e.tokens_meta,u=e.tokens_meta.length;To(e,e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&To(e,t[r].delimiters)}const Aa={tokenize:y1,postProcess:v1};function x1(e,t){const u=e.pos,r=e.src.charCodeAt(u);if(t||r!==95&&r!==42)return!1;const n=e.scanDelims(e.pos,r===42);for(let i=0;i<n.length;i++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:n.length,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close})}return e.pos+=n.length,!0}function Mo(e,t){const u=t.length;for(let r=u-1;r>=0;r--){const n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;const i=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),l=e.tokens[n.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?o+o:o,l.content="";const a=e.tokens[i.token];a.type=s?"strong_close":"em_close",a.tag=s?"strong":"em",a.nesting=-1,a.markup=s?o+o:o,a.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}function k1(e){const t=e.tokens_meta,u=e.tokens_meta.length;Mo(e,e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&Mo(e,t[r].delimiters)}const $a={tokenize:x1,postProcess:k1};function C1(e,t){let u,r,n,i,s="",o="",l=e.pos,a=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const c=e.pos,f=e.posMax,g=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let d=p+1;if(d<f&&e.src.charCodeAt(d)===40){for(a=!1,d++;d<f&&(u=e.src.charCodeAt(d),!(!fe(u)&&u!==10));d++);if(d>=f)return!1;if(l=d,n=e.md.helpers.parseLinkDestination(e.src,d,e.posMax),n.ok){for(s=e.md.normalizeLink(n.str),e.md.validateLink(s)?d=n.pos:s="",l=d;d<f&&(u=e.src.charCodeAt(d),!(!fe(u)&&u!==10));d++);if(n=e.md.helpers.parseLinkTitle(e.src,d,e.posMax),d<f&&l!==d&&n.ok)for(o=n.str,d=n.pos;d<f&&(u=e.src.charCodeAt(d),!(!fe(u)&&u!==10));d++);}(d>=f||e.src.charCodeAt(d)!==41)&&(a=!0),d++}if(a){if(typeof e.env.references>"u")return!1;if(d<f&&e.src.charCodeAt(d)===91?(l=d+1,d=e.md.helpers.parseLinkLabel(e,d),d>=0?r=e.src.slice(l,d++):d=p+1):d=p+1,r||(r=e.src.slice(g,p)),i=e.env.references[Pn(r)],!i)return e.pos=c,!1;s=i.href,o=i.title}if(!t){e.pos=g,e.posMax=p;const m=e.push("link_open","a",1),y=[["href",s]];m.attrs=y,o&&y.push(["title",o]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=d,e.posMax=f,!0}function E1(e,t){let u,r,n,i,s,o,l,a,c="";const f=e.pos,g=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,d=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(d<0)return!1;if(i=d+1,i<g&&e.src.charCodeAt(i)===40){for(i++;i<g&&(u=e.src.charCodeAt(i),!(!fe(u)&&u!==10));i++);if(i>=g)return!1;for(a=i,o=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),o.ok&&(c=e.md.normalizeLink(o.str),e.md.validateLink(c)?i=o.pos:c=""),a=i;i<g&&(u=e.src.charCodeAt(i),!(!fe(u)&&u!==10));i++);if(o=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<g&&a!==i&&o.ok)for(l=o.str,i=o.pos;i<g&&(u=e.src.charCodeAt(i),!(!fe(u)&&u!==10));i++);else l="";if(i>=g||e.src.charCodeAt(i)!==41)return e.pos=f,!1;i++}else{if(typeof e.env.references>"u")return!1;if(i<g&&e.src.charCodeAt(i)===91?(a=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?n=e.src.slice(a,i++):i=d+1):i=d+1,n||(n=e.src.slice(p,d)),s=e.env.references[Pn(n)],!s)return e.pos=f,!1;c=s.href,l=s.title}if(!t){r=e.src.slice(p,d);const m=[];e.md.inline.parse(r,e.md,e.env,m);const y=e.push("image","img",0),v=[["src",c],["alt",""]];y.attrs=v,y.children=m,y.content=r,l&&v.push(["title",l])}return e.pos=i,e.posMax=g,!0}const A1=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,$1=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function w1(e,t){let u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;const r=e.pos,n=e.posMax;for(;;){if(++u>=n)return!1;const s=e.src.charCodeAt(u);if(s===60)return!1;if(s===62)break}const i=e.src.slice(r+1,u);if($1.test(i)){const s=e.md.normalizeLink(i);if(!e.md.validateLink(s))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);const a=e.push("link_close","a",-1);a.markup="autolink",a.info="auto"}return e.pos+=i.length+2,!0}if(A1.test(i)){const s=e.md.normalizeLink("mailto:"+i);if(!e.md.validateLink(s))return!1;if(!t){const o=e.push("link_open","a",1);o.attrs=[["href",s]],o.markup="autolink",o.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(i);const a=e.push("link_close","a",-1);a.markup="autolink",a.info="auto"}return e.pos+=i.length+2,!0}return!1}function D1(e){return/^<a[>\s]/i.test(e)}function F1(e){return/^<\/a\s*>/i.test(e)}function S1(e){const t=e|32;return t>=97&&t<=122}function I1(e,t){if(!e.md.options.html)return!1;const u=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=u)return!1;const n=e.src.charCodeAt(r+1);if(n!==33&&n!==63&&n!==47&&!S1(n))return!1;const i=e.src.slice(r).match(s1);if(!i)return!1;if(!t){const s=e.push("html_inline","",0);s.content=i[0],D1(s.content)&&e.linkLevel++,F1(s.content)&&e.linkLevel--}return e.pos+=i[0].length,!0}const T1=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,M1=/^&([a-z][a-z0-9]{1,31});/i;function O1(e,t){const u=e.pos,r=e.posMax;if(e.src.charCodeAt(u)!==38||u+1>=r)return!1;if(e.src.charCodeAt(u+1)===35){const i=e.src.slice(u).match(T1);if(i){if(!t){const s=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),o=e.push("text_special","",0);o.content=cs(s)?rn(s):rn(65533),o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}else{const i=e.src.slice(u).match(M1);if(i){const s=_a(i[0]);if(s!==i[0]){if(!t){const o=e.push("text_special","",0);o.content=s,o.markup=i[0],o.info="entity"}return e.pos+=i[0].length,!0}}}return!1}function Oo(e){const t={},u=e.length;if(!u)return;let r=0,n=-2;const i=[];for(let s=0;s<u;s++){const o=e[s];if(i.push(0),(e[r].marker!==o.marker||n!==o.token-1)&&(r=s),n=o.token,o.length=o.length||0,!o.close)continue;t.hasOwnProperty(o.marker)||(t[o.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[o.marker][(o.open?3:0)+o.length%3];let a=r-i[r]-1,c=a;for(;a>l;a-=i[a]+1){const f=e[a];if(f.marker===o.marker&&f.open&&f.end<0){let g=!1;if((f.close||o.open)&&(f.length+o.length)%3===0&&(f.length%3!==0||o.length%3!==0)&&(g=!0),!g){const p=a>0&&!e[a-1].open?i[a-1]+1:0;i[s]=s-a+p,i[a]=p,o.open=!1,f.end=s,f.close=!1,c=-1,n=-2;break}}}c!==-1&&(t[o.marker][(o.open?3:0)+(o.length||0)%3]=c)}}function P1(e){const t=e.tokens_meta,u=e.tokens_meta.length;Oo(e.delimiters);for(let r=0;r<u;r++)t[r]&&t[r].delimiters&&Oo(t[r].delimiters)}function R1(e){let t,u,r=0;const n=e.tokens,i=e.tokens.length;for(t=u=0;t<i;t++)n[t].nesting<0&&r--,n[t].level=r,n[t].nesting>0&&r++,n[t].type==="text"&&t+1<i&&n[t+1].type==="text"?n[t+1].content=n[t].content+n[t+1].content:(t!==u&&(n[u]=n[t]),u++);t!==u&&(n.length=u)}const ti=[["text",p1],["linkify",m1],["newline",b1],["escape",g1],["backticks",_1],["strikethrough",Aa.tokenize],["emphasis",$a.tokenize],["link",C1],["image",E1],["autolink",w1],["html_inline",I1],["entity",O1]],ui=[["balance_pairs",P1],["strikethrough",Aa.postProcess],["emphasis",$a.postProcess],["fragments_join",R1]];function $r(){this.ruler=new Be;for(let e=0;e<ti.length;e++)this.ruler.push(ti[e][0],ti[e][1]);this.ruler2=new Be;for(let e=0;e<ui.length;e++)this.ruler2.push(ui[e][0],ui[e][1])}$r.prototype.skipToken=function(e){const t=e.pos,u=this.ruler.getRules(""),r=u.length,n=e.md.options.maxNesting,i=e.cache;if(typeof i[t]<"u"){e.pos=i[t];return}let s=!1;if(e.level<n){for(let o=0;o<r;o++)if(e.level++,s=u[o](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,i[t]=e.pos};$r.prototype.tokenize=function(e){const t=this.ruler.getRules(""),u=t.length,r=e.posMax,n=e.md.options.maxNesting;for(;e.pos<r;){const i=e.pos;let s=!1;if(e.level<n){for(let o=0;o<u;o++)if(s=t[o](e,!1),s){if(i>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};$r.prototype.parse=function(e,t,u,r){const n=new this.State(e,t,u,r);this.tokenize(n);const i=this.ruler2.getRules(""),s=i.length;for(let o=0;o<s;o++)i[o](n)};$r.prototype.State=Ar;function V1(e){const t={};e=e||{},t.src_Any=pa.source,t.src_Cc=ha.source,t.src_Z=ba.source,t.src_P=ls.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const u="[><|]";return t.src_pseudo_letter="(?:(?!"+u+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+u+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+u+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+u+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Ei(e){return Array.prototype.slice.call(arguments,1).forEach(function(u){u&&Object.keys(u).forEach(function(r){e[r]=u[r]})}),e}function Vn(e){return Object.prototype.toString.call(e)}function L1(e){return Vn(e)==="[object String]"}function N1(e){return Vn(e)==="[object Object]"}function q1(e){return Vn(e)==="[object RegExp]"}function Po(e){return Vn(e)==="[object Function]"}function B1(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const wa={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function z1(e){return Object.keys(e||{}).reduce(function(t,u){return t||wa.hasOwnProperty(u)},!1)}const j1={"http:":{validate:function(e,t,u){const r=e.slice(t);return u.re.http||(u.re.http=new RegExp("^\\/\\/"+u.re.src_auth+u.re.src_host_port_strict+u.re.src_path,"i")),u.re.http.test(r)?r.match(u.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,u){const r=e.slice(t);return u.re.no_http||(u.re.no_http=new RegExp("^"+u.re.src_auth+"(?:localhost|(?:(?:"+u.re.src_domain+")\\.)+"+u.re.src_domain_root+")"+u.re.src_port+u.re.src_host_terminator+u.re.src_path,"i")),u.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(u.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,u){const r=e.slice(t);return u.re.mailto||(u.re.mailto=new RegExp("^"+u.re.src_email_name+"@"+u.re.src_host_strict,"i")),u.re.mailto.test(r)?r.match(u.re.mailto)[0].length:0}}},U1="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",H1="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function K1(e){e.__index__=-1,e.__text_cache__=""}function W1(e){return function(t,u){const r=t.slice(u);return e.test(r)?r.match(e)[0].length:0}}function Ro(){return function(e,t){t.normalize(e)}}function nn(e){const t=e.re=V1(e.__opts__),u=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||u.push(U1),u.push(t.src_xn),t.src_tlds=u.join("|");function r(o){return o.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const n=[];e.__compiled__={};function i(o,l){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+l)}Object.keys(e.__schemas__).forEach(function(o){const l=e.__schemas__[o];if(l===null)return;const a={validate:null,link:null};if(e.__compiled__[o]=a,N1(l)){q1(l.validate)?a.validate=W1(l.validate):Po(l.validate)?a.validate=l.validate:i(o,l),Po(l.normalize)?a.normalize=l.normalize:l.normalize?i(o,l):a.normalize=Ro();return}if(L1(l)){n.push(o);return}i(o,l)}),n.forEach(function(o){e.__compiled__[e.__schemas__[o]]&&(e.__compiled__[o].validate=e.__compiled__[e.__schemas__[o]].validate,e.__compiled__[o].normalize=e.__compiled__[e.__schemas__[o]].normalize)}),e.__compiled__[""]={validate:null,normalize:Ro()};const s=Object.keys(e.__compiled__).filter(function(o){return o.length>0&&e.__compiled__[o]}).map(B1).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),K1(e)}function Z1(e,t){const u=e.__index__,r=e.__last_index__,n=e.__text_cache__.slice(u,r);this.schema=e.__schema__.toLowerCase(),this.index=u+t,this.lastIndex=r+t,this.raw=n,this.text=n,this.url=n}function Ai(e,t){const u=new Z1(e,t);return e.__compiled__[u.schema].normalize(u,e),u}function He(e,t){if(!(this instanceof He))return new He(e,t);t||z1(e)&&(t=e,e={}),this.__opts__=Ei({},wa,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Ei({},j1,e),this.__compiled__={},this.__tlds__=H1,this.__tlds_replaced__=!1,this.re={},nn(this)}He.prototype.add=function(t,u){return this.__schemas__[t]=u,nn(this),this};He.prototype.set=function(t){return this.__opts__=Ei(this.__opts__,t),this};He.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let u,r,n,i,s,o,l,a,c;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(u=l.exec(t))!==null;)if(i=this.testSchemaAt(t,u[2],l.lastIndex),i){this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(a=t.search(this.re.host_fuzzy_test),a>=0&&(this.__index__<0||a<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=t.indexOf("@"),c>=0&&(n=t.match(this.re.email_fuzzy))!==null&&(s=n.index+n[1].length,o=n.index+n[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o))),this.__index__>=0};He.prototype.pretest=function(t){return this.re.pretest.test(t)};He.prototype.testSchemaAt=function(t,u,r){return this.__compiled__[u.toLowerCase()]?this.__compiled__[u.toLowerCase()].validate(t,r,this):0};He.prototype.match=function(t){const u=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(u.push(Ai(this,r)),r=this.__last_index__);let n=r?t.slice(r):t;for(;this.test(n);)u.push(Ai(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return u.length?u:null};He.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const u=this.re.schema_at_start.exec(t);if(!u)return null;const r=this.testSchemaAt(t,u[2],u[0].length);return r?(this.__schema__=u[2],this.__index__=u.index+u[1].length,this.__last_index__=u.index+u[0].length+r,Ai(this,0)):null};He.prototype.tlds=function(t,u){return t=Array.isArray(t)?t:[t],u?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,n,i){return r!==i[n-1]}).reverse(),nn(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,nn(this),this)};He.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};He.prototype.onCompile=function(){};const Fu=2147483647,Et=36,ps=1,_r=26,G1=38,J1=700,Da=72,Fa=128,Sa="-",Y1=/^xn--/,X1=/[^\0-\x7F]/,Q1=/[\x2E\u3002\uFF0E\uFF61]/g,eh={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ri=Et-ps,At=Math.floor,ni=String.fromCharCode;function Bt(e){throw new RangeError(eh[e])}function th(e,t){const u=[];let r=e.length;for(;r--;)u[r]=t(e[r]);return u}function Ia(e,t){const u=e.split("@");let r="";u.length>1&&(r=u[0]+"@",e=u[1]),e=e.replace(Q1,".");const n=e.split("."),i=th(n,t).join(".");return r+i}function Ta(e){const t=[];let u=0;const r=e.length;for(;u<r;){const n=e.charCodeAt(u++);if(n>=55296&&n<=56319&&u<r){const i=e.charCodeAt(u++);(i&64512)==56320?t.push(((n&1023)<<10)+(i&1023)+65536):(t.push(n),u--)}else t.push(n)}return t}const uh=e=>String.fromCodePoint(...e),rh=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Et},Vo=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ma=function(e,t,u){let r=0;for(e=u?At(e/J1):e>>1,e+=At(e/t);e>ri*_r>>1;r+=Et)e=At(e/ri);return At(r+(ri+1)*e/(e+G1))},Oa=function(e){const t=[],u=e.length;let r=0,n=Fa,i=Da,s=e.lastIndexOf(Sa);s<0&&(s=0);for(let o=0;o<s;++o)e.charCodeAt(o)>=128&&Bt("not-basic"),t.push(e.charCodeAt(o));for(let o=s>0?s+1:0;o<u;){const l=r;for(let c=1,f=Et;;f+=Et){o>=u&&Bt("invalid-input");const g=rh(e.charCodeAt(o++));g>=Et&&Bt("invalid-input"),g>At((Fu-r)/c)&&Bt("overflow"),r+=g*c;const p=f<=i?ps:f>=i+_r?_r:f-i;if(g<p)break;const d=Et-p;c>At(Fu/d)&&Bt("overflow"),c*=d}const a=t.length+1;i=Ma(r-l,a,l==0),At(r/a)>Fu-n&&Bt("overflow"),n+=At(r/a),r%=a,t.splice(r++,0,n)}return String.fromCodePoint(...t)},Pa=function(e){const t=[];e=Ta(e);const u=e.length;let r=Fa,n=0,i=Da;for(const l of e)l<128&&t.push(ni(l));const s=t.length;let o=s;for(s&&t.push(Sa);o<u;){let l=Fu;for(const c of e)c>=r&&c<l&&(l=c);const a=o+1;l-r>At((Fu-n)/a)&&Bt("overflow"),n+=(l-r)*a,r=l;for(const c of e)if(c<r&&++n>Fu&&Bt("overflow"),c===r){let f=n;for(let g=Et;;g+=Et){const p=g<=i?ps:g>=i+_r?_r:g-i;if(f<p)break;const d=f-p,m=Et-p;t.push(ni(Vo(p+d%m,0))),f=At(d/m)}t.push(ni(Vo(f,0))),i=Ma(n,a,o===s),n=0,++o}++n,++r}return t.join("")},nh=function(e){return Ia(e,function(t){return Y1.test(t)?Oa(t.slice(4).toLowerCase()):t})},ih=function(e){return Ia(e,function(t){return X1.test(t)?"xn--"+Pa(t):t})},Ra={version:"2.3.1",ucs2:{decode:Ta,encode:uh},decode:Oa,encode:Pa,toASCII:ih,toUnicode:nh},sh={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},oh={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},lh={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},ah={default:sh,zero:oh,commonmark:lh},ch=/^(vbscript|javascript|file|data):/,fh=/^data:image\/(gif|png|jpeg|webp);/;function dh(e){const t=e.trim().toLowerCase();return ch.test(t)?fh.test(t):!0}const Va=["http:","https:","mailto:"];function ph(e){const t=os(e,!0);if(t.hostname&&(!t.protocol||Va.indexOf(t.protocol)>=0))try{t.hostname=Ra.toASCII(t.hostname)}catch{}return Er(ss(t))}function hh(e){const t=os(e,!0);if(t.hostname&&(!t.protocol||Va.indexOf(t.protocol)>=0))try{t.hostname=Ra.toUnicode(t.hostname)}catch{}return Pu(ss(t),Pu.defaultChars+"%")}function Qe(e,t){if(!(this instanceof Qe))return new Qe(e,t);t||as(e)||(t=e||{},e="default"),this.inline=new $r,this.block=new Rn,this.core=new fs,this.renderer=new Wu,this.linkify=new He,this.validateLink=dh,this.normalizeLink=ph,this.normalizeLinkText=hh,this.utils=bp,this.helpers=On({},vp),this.options={},this.configure(e),t&&this.set(t)}Qe.prototype.set=function(e){return On(this.options,e),this};Qe.prototype.configure=function(e){const t=this;if(as(e)){const u=e;if(e=ah[u],!e)throw new Error('Wrong `markdown-it` preset "'+u+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(u){e.components[u].rules&&t[u].ruler.enableOnly(e.components[u].rules),e.components[u].rules2&&t[u].ruler2.enableOnly(e.components[u].rules2)}),this};Qe.prototype.enable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(n){u=u.concat(this[n].ruler.enable(e,!0))},this),u=u.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(n){return u.indexOf(n)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Qe.prototype.disable=function(e,t){let u=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(n){u=u.concat(this[n].ruler.disable(e,!0))},this),u=u.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(n){return u.indexOf(n)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Qe.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Qe.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const u=new this.core.State(e,this,t);return this.core.process(u),u.tokens};Qe.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Qe.prototype.parseInline=function(e,t){const u=new this.core.State(e,this,t);return u.inlineMode=!0,this.core.process(u),u.tokens};Qe.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const mh=["innerHTML"],bh={__name:"MarkdownRenderer",props:{source:{type:String,default:""}},setup(e){const t=Qe();return(u,r)=>(K(),me("div",{class:"mb-3",innerHTML:Ut(t).render(e.source)},null,8,mh))}},La=e=>(xr("data-v-61f2bd5b"),e=e(),kr(),e),gh=La(()=>M("div",{class:"formkit-wrapper required"},[M("label",{class:"form-label"},"Earning Criteria")],-1)),_h={class:"nav nav-tabs",role:"tablist"},yh={class:"nav-item",role:"presentation"},vh=["aria-selected"],xh={class:"nav-item",role:"presentation"},kh=["aria-selected"],Ch={class:"tab-content",id:"criteria-tab"},Eh=La(()=>M("label",{class:"mt-3 mb-2"},"Narrative Preview",-1)),Ah={__name:"AchievementCriteria",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se("");ge(t,()=>{u.value=t.value.narrative}),Hu(()=>{u.value=t.value.narrative?t.value.narrative:""});const r=se("edit");function n(i){r.value=i}return(i,s)=>{const o=ve("FormKit");return K(),me(Ee,null,[gh,M("ul",_h,[M("li",yh,[M("button",{class:Ze(["nav-link",{active:r.value==="edit"}]),type:"button",id:"edit-tab","aria-controls":"criteria-edit",role:"tab","aria-selected":r.value==="edit",onClick:s[0]||(s[0]=l=>n("edit"))},"Edit ",10,vh)]),M("li",xh,[M("button",{class:Ze(["nav-link",{active:r.value==="preview"}]),type:"button",id:"preview-tab","aria-controls":"criteria-preview",role:"tab","aria-selected":r.value==="preview",onClick:s[1]||(s[1]=l=>n("preview"))},"Preview ",10,kh)])]),M("div",Ch,[Ge(M("div",{class:Ze(["tab-pane fade",{show:r.value==="edit",active:r.value==="edit"}]),id:"criteria-edit",role:"tabpanel","aria-labelledby":"edit-tab"},[D(o,{type:"group",name:"criteria",modelValue:t.value,"onUpdate:modelValue":s[2]||(s[2]=l=>t.value=l)},{default:ae(()=>[D(o,{type:"textarea",label:"Narrative",name:"narrative",rows:"5",validation:"require_one:id",help:"A narrative of what is needed to earn the credential. Markdown is allowed."}),D(o,{type:"text",label:"Criteria URL",name:"id",validation:"require_one:narrative|url",help:"The URL of a webpage that describes in a human-readable format the criteria for the credential."})]),_:1},8,["modelValue"])],2),[[Ct,r.value==="edit"]]),Ge(M("div",{class:Ze(["tab-pane fade",{show:r.value==="preview",active:r.value==="preview"}]),id:"criteria-preview",role:"tabpanel","aria-labelledby":"preview-tab"},[Eh,D(bh,{source:u.value,class:"border rounded p-3"},null,8,["source"])],2),[[Ct,r.value==="preview"]])])],64)}}},$h=Ku(Ah,[["__scopeId","data-v-61f2bd5b"]]),wh={class:"tab-pane fade show active",id:"tab-basic",role:"tabpanel","aria-labelledby":"basic-tab"},Dh=M("div",{class:"card mb-3"},[M("div",{class:"card-body"},[M("p",{class:"mb-0"},[we(" This tab contains all of the required fields for a credential."),M("br"),M("em",null,"Credential Type"),we(" and "),M("em",null,"Image"),we(" are not required, but it is suggested that all credentials have them. ")])])],-1),Fh={__name:"BasicTab",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),me("div",wh,[Dh,D(n,{type:"text",label:"Credential Name",name:"name","wrapper-class":"required",validation:"required:trim",modelValue:t.value.name,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value.name=i),help:"The name of the credential."},null,8,["modelValue"]),D(Fd,{modelValue:t.value.achievementType,"onUpdate:modelValue":r[1]||(r[1]=i=>t.value.achievementType=i)},null,8,["modelValue"]),D(da,{modelValue:t.value.image,"onUpdate:modelValue":r[2]||(r[2]=i=>t.value.image=i)},null,8,["modelValue"]),D(n,{type:"textarea",label:"Description",name:"description","wrapper-class":"required",rows:"5",validation:"required:trim",modelValue:t.value.description,"onUpdate:modelValue":r[3]||(r[3]=i=>t.value.description=i),help:"A short description of the achievement."},null,8,["modelValue"]),D($h,{modelValue:t.value.criteria,"onUpdate:modelValue":r[4]||(r[4]=i=>t.value.criteria=i)},null,8,["modelValue"])])}}},Sh={class:"tab-pane fade show active",id:"tab-detail",role:"tabpanel","aria-labelledby":"detail-tab"},Ih={__name:"DetailTab",props:{modelValue:{default:{humanCode:null,inLanguage:null,version:null,creditsAvailable:null,additionalType:null}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),me("div",Sh,[D(n,{type:"text",label:"Human Code",modelValue:t.value.humanCode,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value.humanCode=i),name:"humanCode",help:"The code, generally human readable, associated with an achievement."},null,8,["modelValue"]),D(n,{type:"text",label:"In Language",modelValue:t.value.inLanguage,"onUpdate:modelValue":r[1]||(r[1]=i=>t.value.inLanguage=i),name:"inLanguage",help:"The language this credential is in as a BCP47 language code, such as 'en', 'en-US', or 'es-MX'",validation:[["matches","/^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$/"]],"validation-messages":{matches:"The language must formatted as a BCP47 language code, such as 'en', 'en-US', or 'es-MX'."}},null,8,["modelValue"]),D(n,{type:"text",label:"Version",modelValue:t.value.version,"onUpdate:modelValue":r[2]||(r[2]=i=>t.value.version=i),name:"version",help:"The version property allows issuers to set a version string for an Achievement. This is particularly useful when replacing a previous version with an update."},null,8,["modelValue"]),D(n,{type:"number",label:"Credits Available",number:"",name:"creditsAvailable",modelValue:t.value.creditsAvailable,"onUpdate:modelValue":r[3]||(r[3]=i=>t.value.creditsAvailable=i),help:"Credit hours associated with this entity, or credit hours possible. For example 3.0."},null,8,["modelValue"]),D(n,{type:"text",label:"Specialization",modelValue:t.value.specialization,"onUpdate:modelValue":r[4]||(r[4]=i=>t.value.specialization=i),name:"specialization",help:"Name given to the focus, concentration, or specific area of study defined in the achievement. Examples include 'Entrepreneurship', 'Technical Communication', and 'Finance'."},null,8,["modelValue"]),D(n,{type:"text",label:"Field of Study",modelValue:t.value.fieldOfStudy,"onUpdate:modelValue":r[5]||(r[5]=i=>t.value.fieldOfStudy=i),name:"fieldOfStudy",help:"Category, subject, area of study, discipline, or general branch of knowledge. Examples include Business, Education, Psychology, and Technology."},null,8,["modelValue"])])}}},Th=Ku(Ih,[["__scopeId","data-v-2cf645b7"]]),Mh=["onClick"],Oh={class:"card mb-3"},Ph={class:"card-header"},Rh=["onClick"],Vh={class:"card-body pb-0"},Lh=M("span",{class:"input-group-text",id:"extended-prefix","aria-label":"ext:"},"ext:",-1),hs={__name:"AlignmentComponent",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),be(n,{type:"list",modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),name:"alignment",dynamic:""},{default:ae(({items:i,node:s,value:o})=>[M("h5",null,[we("Alignments "),M("button",{type:"button",onClick:()=>s.input(o.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Alignment ",8,Mh)]),(K(!0),me(Ee,null,hu(i,(l,a)=>(K(),be(n,{type:"group","wrapper-class":"card",key:l,index:a},{default:ae(()=>[M("div",Oh,[M("h5",Ph,[we("Target "+Zt(a+1)+" ",1),M("button",{type:"button",onClick:()=>s.input(o.filter((c,f)=>f!==a)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,Rh)]),M("div",Vh,[D(n,{type:"hidden",name:"type",value:["Alignment"]}),D(n,{type:"innerLabelTextInput",label:"Name",name:"targetName","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"Name of the alignment."}),D(n,{type:"innerLabelTextInput",label:"URL",name:"targetUrl","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim|url",help:"URL linking to the official description of the alignment target, for example an individual standard within an educatinoal framework."}),D(n,{type:"innerLabelTextInput",label:"Framework",name:"targetFramework","inner-class":"input-group","label-class":"input-group-text",help:"Name of the framework for the alignment target."}),D(n,{type:"innerLabelTextareaInput",label:"Description",name:"description",rows:"2","inner-class":"input-group","label-class":"input-group-text",help:"Short description of the alignment target."}),D(n,{type:"innerLabelTextInput",label:"Code",name:"targetCode","inner-class":"input-group","label-class":"input-group-text",help:"If applicable, a locally unique string identifier that identifies the alignment target within its framework and/or targetUrl."}),D(n,{type:"selectInputGroup",label:"Alignment Type",name:"targetType","inner-class":"input-group","label-class":"input-group-text","input-class":"$reset formkit-input form-select",placeholder:"Target Type",options:{"":"",CFItem:"CFItem",CFRubric:"CFRubric",CFRubricCriterion:"CFRubricCriterion",CFRubricCriterionLevel:"CFRubricCriterionLevel","ceasn:Competency":"ceasn:Competency","ceterms:Credential":"ceterms:Credential",CTDL:"CTDL",other:"Other (ext:)"},help:"The type of the alignment target node."},{suffix:ae(()=>[o[a].targetType==="other"?(K(),be(n,{key:0,type:"innerLabelTextInput",label:"Extended Type",name:"typeExt","aria-label":"Extended Alignment Type","inner-class":"input-group ms-3 me-5 pe-3","outer-class":"$reset","label-class":"visually-hidden",before:"ext:",validation:[["matches","/^[a-z|A-Z|0-9|.|-|_]+$/"]],placeholder:"Name of extended type"},{prefix:ae(()=>[Lh]),_:1})):Ve("",!0)]),_:2},1024)])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},Nh={__name:"AlignmentsComponent",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>(K(),be(hs,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=n=>t.value=n)},null,8,["modelValue"]))}};var Na=["__key","__init","__shim","__original","__index","__prevKey"];function Zu(){return Math.random().toString(36).substring(2,15)}function qh(e,t){return[...e instanceof Set?e:new Set(e)]}function Z(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Oe(e,t,u=!0,r=["__key"]){if(e===t)return!0;if(typeof t=="object"&&typeof e=="object"){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return Bh(e,t);if(e===null||t===null||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n of r)if((n in e||n in t)&&e[n]!==t[n])return!1;for(const n in e)if(!(n in t)||e[n]!==t[n]&&!u||u&&!Oe(e[n],t[n],u,r))return!1;return!0}return!1}function Bh(e,t){return e.source===t.source&&e.flags.split("").sort().join("")===t.flags.split("").sort().join("")}function Je(e){const t=typeof e;if(t==="number")return!1;if(e===void 0)return!0;if(t==="string")return e==="";if(t==="object"){if(e===null)return!0;for(const u in e)return!1;return!(e instanceof RegExp||e instanceof Date)}return!1}function zh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jh(e){const t=`^${zh(e)}$`,u={MM:"(0[1-9]|1[012])",M:"([1-9]|1[012])",DD:"([012][0-9]|3[01])",D:"([012]?[0-9]|3[01])",YYYY:"\\d{4}",YY:"\\d{2}"},r=Object.keys(u);return new RegExp(r.reduce((n,i)=>n.replace(i,u[i]),t))}function sn(e){return Object.prototype.toString.call(e)==="[object Object]"}function lr(e){return sn(e)||Array.isArray(e)}function Vu(e){if(sn(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const u=t.prototype;return!(sn(u)===!1||u.hasOwnProperty("isPrototypeOf")===!1)}var Jt=(e,t,u=!1,r=!1)=>{if(t===null)return null;const n={};if(typeof t=="string")return t;for(const i in e)if(Z(t,i)&&(t[i]!==void 0||!r)){if(u&&Array.isArray(e[i])&&Array.isArray(t[i])){n[i]=e[i].concat(t[i]);continue}if(t[i]===void 0)continue;Vu(e[i])&&Vu(t[i])?n[i]=Jt(e[i],t[i],u,r):n[i]=t[i]}else n[i]=e[i];for(const i in t)!Z(n,i)&&t[i]!==void 0&&(n[i]=t[i]);return n};function Uh(e){if(e[0]!=='"'&&e[0]!=="'"||e[0]!==e[e.length-1])return!1;const t=e[0];for(let u=1;u<e.length;u++)if(e[u]===t&&(u===1||e[u-1]!=="\\")&&u!==e.length-1)return!1;return!0}function Hh(e){if(!e.length)return"";let t="",u="";for(let r=0;r<e.length;r++){const n=e.charAt(r);(n!=="\\"||u==="\\")&&(t+=n),u=n}return t}function xu(...e){return e.reduce((t,u)=>{const{value:r,name:n,modelValue:i,config:s,plugins:o,...l}=u;return Object.assign(t,l)},{})}function Kh(e){const t=[];let u="",r=0,n="",i="";for(let s=0;s<e.length;s++){const o=e.charAt(s);o===n&&i!=="\\"?n="":(o==="'"||o==='"')&&!n&&i!=="\\"?n=o:o==="("&&!n?r++:o===")"&&!n&&r--,o===","&&!n&&r===0?(t.push(u),u=""):(o!==" "||n)&&(u+=o),i=o}return u&&t.push(u),t}function Lo(e,t){const u={},r=t.filter(i=>i instanceof RegExp),n=new Set(t);for(const i in e)!n.has(i)&&!r.some(s=>s.test(i))&&(u[i]=e[i]);return u}function No(e,t){const u={},r=t.filter(n=>n instanceof RegExp);return t.forEach(n=>{n instanceof RegExp||(u[n]=e[n])}),Object.keys(e).forEach(n=>{r.some(i=>i.test(n))&&(u[n]=e[n])}),u}function Su(e){return e.replace(/-([a-z0-9])/gi,(t,u)=>u.toUpperCase())}function qa(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,u,r)=>u+"-"+r.toLowerCase()).replace(" ","-").toLowerCase()}function $i(e,t=Na){if(e!==null&&typeof e=="object"){let u;if(Array.isArray(e)?u=[...e]:Vu(e)&&(u={...e}),u)return Zh(e,u,t),u}return e}function Lu(e,t=Na){if(e===null||e instanceof RegExp||e instanceof Date||e instanceof Map||e instanceof Set||typeof File=="function"&&e instanceof File)return e;let u;Array.isArray(e)?u=e.map(r=>typeof r=="object"?Lu(r,t):r):u=Object.keys(e).reduce((r,n)=>(r[n]=typeof e[n]=="object"?Lu(e[n],t):e[n],r),{});for(const r of t)r in e&&Object.defineProperty(u,r,{enumerable:!1,value:e[r]});return u}function ot(e){return typeof e=="object"?Lu(e):e}function Wh(e,t){if(!e||typeof e!="object")return null;const u=t.split(".");let r=e;for(const n in u){const i=u[n];if(Z(r,i)&&(r=r[i]),+n===u.length-1)return r;if(!r||typeof r!="object")return null}return null}function lt(e){return e!==void 0&&e!=="false"&&e!==!1?!0:void 0}function Nu(e){return Object.isFrozen(e)?e:Object.defineProperty(e,"__init",{enumerable:!1,value:!0})}function ms(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function Zh(e,t,u){for(const r of u)r in e&&Object.defineProperty(t,r,{enumerable:!1,value:e[r]});return t}function Gh(e){let t=!1;return(...u)=>{if(!t)return t=!0,queueMicrotask(()=>t=!1),e(...u)}}function Jh(e){if(!(e==="false"||e===!1))return!0}function bs(){const e=[];let t=0;const u=n=>e.push(n),r=n=>{const i=e[t];return typeof i=="function"?i(n,s=>(t++,r(s))):(t=0,n)};return u.dispatch=r,u.unshift=n=>e.unshift(n),u.remove=n=>{const i=e.indexOf(n);i>-1&&e.splice(i,1)},u}function Ba(){const e=new Map,t=new Map;let u;const r=(n,i)=>{if(u){u.set(i.name,[n,i]);return}e.has(i.name)&&e.get(i.name).forEach(s=>{(i.origin===n||s.modifiers.includes("deep"))&&s.listener(i)}),i.bubble&&n.bubble(i)};return r.flush=()=>{e.clear(),t.clear(),u==null||u.clear()},r.on=(n,i,s="push")=>{const[o,...l]=n.split("."),a=i.receipt||Zu(),c={modifiers:l,event:o,listener:i,receipt:a};return e.has(o)?e.get(o)[s](c):e.set(o,[c]),t.has(a)?t.get(a)[s](o):t.set(a,[o]),a},r.off=n=>{var i;t.has(n)&&((i=t.get(n))==null||i.forEach(s=>{const o=e.get(s);Array.isArray(o)&&e.set(s,o.filter(l=>l.receipt!==n))}),t.delete(n))},r.pause=n=>{u||(u=new Map),n&&n.walk(i=>i._e.pause())},r.play=n=>{if(!u)return;const i=u;u=void 0,i.forEach(([s,o])=>r(s,o)),n&&n.walk(s=>s._e.play())},r}function Yh(e,t,u,r,n=!0,i){return t._e(e,{payload:r,name:u,bubble:n,origin:e,meta:i}),e}function Xh(e,t,u){return Dr(e.parent)&&e.parent._e(e.parent,u),e}function Qh(e,t,u,r,n){return t._e.on(u,r,n)}function em(e,t,u){return t._e.off(u),e}var gs=bs();gs((e,t)=>(e.message||(e.message=`E${e.code}`),t(e)));var _s=bs();_s((e,t)=>{e.message||(e.message=`W${e.code}`);const u=t(e);return console&&typeof console.warn=="function"&&console.warn(u.message),u});function mu(e,t={}){_s.dispatch({code:e,data:t})}function Ue(e,t={}){throw Error(gs.dispatch({code:e,data:t}).message)}function Ke(e,t){return{blocking:!1,key:Zu(),meta:{},type:"state",visible:!0,...e}}var qo={apply:sm,set:um,remove:za,filter:nm,reduce:im,release:am,touch:rm};function tm(e=!1){const t={};let u,r=e,n=[];const i=new Map;let s;const o=new Proxy(t,{get(...l){const[a,c]=l;return c==="buffer"?r:c==="_b"?n:c==="_m"?i:c==="_r"?s:Z(qo,c)?qo[c].bind(null,t,o,u):Reflect.get(...l)},set(l,a,c){return a==="_n"?(u=c,s==="__n"&&ja(u,o),!0):a==="_b"?(n=c,!0):a==="buffer"?(r=c,!0):a==="_r"?(s=c,!0):(Ue(101,u),!1)}});return o}function um(e,t,u,r){if(t.buffer)return t._b.push([[r]]),t;if(e[r.key]!==r){if(typeof r.value=="string"&&r.meta.localize!==!1){const i=r.value;r.value=u.t(r),r.value!==i&&(r.meta.locale=u.props.locale)}const n=`message-${Z(e,r.key)?"updated":"added"}`;e[r.key]=Object.freeze(u.hook.message.dispatch(r)),u.emit(n,r)}return t}function rm(e,t){for(const u in e){const r={...e[u]};t.set(r)}}function za(e,t,u,r){if(Z(e,r)){const n=e[r];delete e[r],u.emit("message-removed",n)}return t.buffer===!0&&(t._b=t._b.filter(n=>(n[0]=n[0].filter(i=>i.key!==r),n[1]||n[0].length))),t}function nm(e,t,u,r,n){for(const i in e){const s=e[i];(!n||s.type===n)&&!r(s)&&za(e,t,u,i)}}function im(e,t,u,r,n){for(const i in e){const s=e[i];n=r(n,s)}return n}function sm(e,t,u,r,n){if(Array.isArray(r)){if(t.buffer){t._b.push([r,n]);return}const i=new Set(r.map(s=>(t.set(s),s.key)));typeof n=="string"?t.filter(s=>s.type!==n||i.has(s.key)):typeof n=="function"&&t.filter(s=>!n(s)||i.has(s.key))}else for(const i in r){const s=u.at(i);s?s.store.apply(r[i],n):lm(u,t,i,r[i],n)}}function om(e,...t){const u=`${e.name}-set`,r=n=>Ke({key:ms(n),type:"error",value:n,meta:{source:u,autoClear:!0}});return t.filter(n=>!!n).map(n=>{if(typeof n=="string"&&(n=[n]),Array.isArray(n))return n.map(i=>r(i));{const i={};for(const s in n)Array.isArray(n[s])?i[s]=n[s].map(o=>r(o)):i[s]=[r(n[s])];return i}})}function lm(e,t,u,r,n){var s;const i=t._m;i.has(u)||i.set(u,[]),t._r||(t._r=ja(e,t)),(s=i.get(u))==null||s.push([r,n])}function ja(e,t){return e.on("child.deep",({payload:u})=>{t._m.forEach((r,n)=>{e.at(n)===u&&(r.forEach(([i,s])=>{u.store.apply(i,s)}),t._m.delete(n))}),t._m.size===0&&t._r&&(e.off(t._r),t._r=void 0)})}function am(e,t){t.buffer=!1,t._b.forEach(([u,r])=>t.apply(u,r)),t._b=[]}function cm(){const e={};let t;return{count:(...u)=>fm(t,e,...u),init(u){t=u,u.on("message-added.deep",Bo(e,1)),u.on("message-removed.deep",Bo(e,-1))},merge:u=>zo(t,e,u),settled(u){return Z(e,u)?e[u].promise:Promise.resolve()},unmerge:u=>zo(t,e,u,!0),value(u){return Z(e,u)?e[u].count:0}}}function fm(e,t,u,r,n=0){if(r=dm(r||u),!Z(t,u)){const i={condition:r,count:0,name:u,node:e,promise:Promise.resolve(),resolve:()=>{}};t[u]=i,n=e.store.reduce((s,o)=>s+i.condition(o)*1,n),e.each(s=>{s.ledger.count(i.name,i.condition),n+=s.ledger.value(i.name)})}return Ua(t[u],n).promise}function dm(e){return typeof e=="function"?e:t=>t.type===e}function Ua(e,t){const u=e.count,r=e.count+t;return e.count=r,u===0&&r!==0?(e.node.emit(`unsettled:${e.name}`,e.count,!1),e.promise=new Promise(n=>e.resolve=n)):u!==0&&r===0&&(e.node.emit(`settled:${e.name}`,e.count,!1),e.resolve()),e.node.emit(`count:${e.name}`,e.count,!1),e}function Bo(e,t){return u=>{for(const r in e){const n=e[r];n.condition(u.payload)&&Ua(n,t)}}}function zo(e,t,u,r=!1){const n=e;for(const i in t){const s=t[i].condition;r||u.ledger.count(i,s);const o=u.ledger.value(i)*(r?-1:1);if(e){do e.ledger.count(i,s,o),e=e.parent;while(e);e=n}}}var ys=new Map,jr=new Map,vs=Ba();function pm(e){e.props.id&&(ys.set(e.props.id,e),jr.set(e,e.props.id),vs(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function hm(e){if(jr.has(e)){const t=jr.get(e);jr.delete(e),ys.delete(t),vs(e,{payload:null,name:t,bubble:!1,origin:e})}}function wr(e){return ys.get(e)}function mm(e,t){return vs.on(e,t)}function wi(e,t,u){let r=!0;return t in e.config._t?r=!1:e.emit(`config:${t}`,u,!1),t in e.props||(e.emit("prop",{prop:t,value:u}),e.emit(`prop:${t}`,u)),r}function bm(e={}){const t=new Set,u={...e,_add:n=>t.add(n),_rm:n=>t.delete(n)};return new Proxy(u,{set(n,i,s,o){return typeof i=="string"&&t.forEach(l=>wi(l,i,s)),Reflect.set(n,i,s,o)}})}function Ha(e,t){const u=(t||document).getElementById(e);if(u instanceof HTMLFormElement){const r=new Event("submit",{cancelable:!0,bubbles:!0});u.dispatchEvent(r);return}mu(151,e)}function gm(e){const t=u=>{for(const r in u.store){const n=u.store[r];n.type==="error"||n.type==="ui"&&r==="incomplete"?u.store.remove(r):n.type==="state"&&u.store.set({...n,value:!1})}};t(e),e.walk(t)}function Ka(e,t){const u=typeof e=="string"?wr(e):e;if(u){const r=s=>ot(s.props.initial)||(s.type==="group"?{}:s.type==="list"?[]:void 0);u._e.pause(u);const n=ot(t);return t&&!Je(t)&&(u.props.initial=lr(n)?Nu(n):n,u.props._init=u.props.initial),u.input(r(u),!1),u.walk(s=>{s.type==="list"&&s.sync||s.input(r(s),!1)}),u.input(Je(n)&&n?n:r(u),!1),u.type!=="input"&&t&&!Je(t)&&lr(t)&&u.walk(s=>{s.props.initial=lr(s.value)?Nu(s.value):s.value,s.props._init=s.props.initial}),u._e.play(u),gm(u),u.emit("reset",u),u}mu(152,e)}var _m={delimiter:".",delay:0,locale:"en",rootClasses:e=>({[`formkit-${qa(e)}`]:!0})},Wa=Symbol("index"),Di=Symbol("removed"),Fi=Symbol("moved"),Za=Symbol("inserted");function ym(e){return e.type==="list"&&Array.isArray(e._value)}function Dr(e){return e&&typeof e=="object"&&e.__FKNode__===!0}var Ur=(e,t,u)=>{Ue(102,[e,u])},vm={_c:ne(Bm,Ur,!1),add:ne(Mm),addProps:ne(Tm),address:ne(jm,Ur,!1),at:ne(Um),bubble:ne(Xh),clearErrors:ne(Qm),calm:ne(Fm),config:ne(!1),define:ne(Im),disturb:ne(Dm),destroy:ne(Sm),extend:ne(tb),hydrate:ne($m),index:ne(qm,Nm,!1),input:ne(Ya),each:ne(Rm),emit:ne(Yh),find:ne(Km),on:ne(Qh),off:ne(em),parent:ne(!1,Om),plugins:ne(!1),remove:ne(Pm),root:ne(Zm,Ur,!1),reset:ne(Ym),resetConfig:ne(Lm),setErrors:ne(Xm),submit:ne(Jm),t:ne(Gm),use:ne(xs),name:ne(zm,!1,!1),walk:ne(Vm)};function xm(){return new Map(Object.entries(vm))}function ne(e,t,u=!0){return{get:e?(r,n)=>u?(...i)=>e(r,n,...i):e(r,n):!1,set:t!==void 0?t:Ur.bind(null)}}function km(){const e=new Map;return new Proxy(e,{get(t,u){return e.has(u)||e.set(u,bs()),e.get(u)}})}var Ga=0,Cm=0;function Em(e){var t,u;return((t=e.parent)==null?void 0:t.type)==="list"?Wa:e.name||`${((u=e.props)==null?void 0:u.type)||"input"}_${++Ga}`}function Ja(e){return e.type==="group"?Nu(e.value&&typeof e.value=="object"&&!Array.isArray(e.value)?e.value:{}):e.type==="list"?Nu(Array.isArray(e.value)?e.value:[]):e.value}function Ya(e,t,u,r=!0){return t._value=Am(e,e.hook.input.dispatch(u)),e.emit("input",t._value),e.isCreated&&e.type==="input"&&Oe(t._value,t.value)&&!e.props.mergeStrategy?(e.emit("commitRaw",t.value),t.settled):(t.isSettled&&e.disturb(),r?(t._tmo&&clearTimeout(t._tmo),t._tmo=setTimeout(on,e.props.delay,e,t)):on(e,t),t.settled)}function Am(e,t){switch(e.type){case"input":break;case"group":(!t||typeof t!="object")&&Ue(107,[e,t]);break;case"list":Array.isArray(t)||Ue(108,[e,t]);break}return t}function on(e,t,u=!0,r=!0){t._value=t.value=e.hook.commit.dispatch(t._value),e.type!=="input"&&r&&e.hydrate(),e.emit("commitRaw",t.value),e.emit("commit",t.value),u&&e.calm()}function Xa(e,{name:t,value:u,from:r}){if(!Object.isFrozen(e._value)){if(ym(e)){const n=u===Di?[]:u===Fi&&typeof r=="number"?e._value.splice(r,1):[u];e._value.splice(t,u===Fi||r===Za?0:1,...n);return}u!==Di?e._value[t]=u:delete e._value[t]}}function $m(e,t){const u=t._value;return e.type==="list"&&e.sync&&wm(e,t),t.children.forEach(r=>{if(typeof u=="object")if(r.name in u){const n=r.type!=="input"||u[r.name]&&typeof u[r.name]=="object"?Nu(u[r.name]):u[r.name];if(!r.isSettled||(!lr(n)||r.props.mergeStrategy)&&Oe(n,r._value))return;r.input(n,!1)}else(e.type!=="list"||typeof r.name=="number")&&Xa(t,{name:r.name,value:r.value}),u.__init||(r.type==="group"?r.input({},!1):r.type==="list"?r.input([],!1):r.input(void 0,!1))}),e}function wm(e,t){const u=e._value;if(!Array.isArray(u))return;const r=[],n=new Set(t.children),i=new Map;u.forEach((o,l)=>{if(t.children[l]&&t.children[l]._value===o)r.push(t.children[l]),n.delete(t.children[l]);else{r.push(null);const a=i.get(o)||[];a.push(l),i.set(o,a)}}),n.size&&i.size&&n.forEach(o=>{if(i.has(o._value)){const l=i.get(o._value),a=l.shift();r[a]=o,n.delete(o),l.length||i.delete(o._value)}});const s=[];for(i.forEach(o=>{s.push(...o)});n.size&&s.length;){const o=n.values().next().value,l=s.shift();if(l===void 0)break;r[l]=o,n.delete(o)}s.forEach((o,l)=>{r[o]=ib({value:l})}),n.size&&n.forEach(o=>{if(!("__FKP"in o)){const l=o._c.parent;if(!l||sb(l))return;l.ledger.unmerge(o),o._c.parent=null,o.destroy()}}),t.children=r}function Dm(e,t){var u;return t._d<=0&&(t.isSettled=!1,e.emit("settled",!1,!1),t.settled=new Promise(r=>{t._resolve=r}),e.parent&&((u=e.parent)==null||u.disturb())),t._d++,e}function Fm(e,t,u){var r;if(u!==void 0&&e.type!=="input"){Xa(t,u);const n=!!(e.config.mergeStrategy&&e.config.mergeStrategy[u.name]);return on(e,t,!0,n)}t._d>0&&t._d--,t._d===0&&(t.isSettled=!0,e.emit("settled",!0,!1),e.parent&&((r=e.parent)==null||r.calm({name:e.name,value:t.value})),t._resolve&&t._resolve(t.value))}function Sm(e,t){e.emit("destroying",e),e.store.filter(()=>!1),e.parent&&e.parent.remove(e),hm(e),e.emit("destroyed",e),t._e.flush(),t._value=t.value=void 0;for(const u in t.context)delete t.context[u];t.plugins.clear(),t.context=null}function Im(e,t,u){t.type=u.type;const r=Lu(u);e.props.__propDefs=Qa(e.props.__propDefs??[],(r==null?void 0:r.props)||[]),r.props=e.props.__propDefs,t.props.definition=r,t.value=t._value=Ja({type:e.type,value:t.value}),u.forceTypeProp&&(e.props.type&&(e.props.originalType=e.props.type),t.props.type=u.forceTypeProp),u.family&&(t.props.family=u.family),u.features&&u.features.forEach(n=>n(e)),u.props&&e.addProps(u.props),e.emit("defined",u)}function Tm(e,t,u){const r=Array.isArray(u)?u:Object.keys(u),n=Array.isArray(u)?{}:r.reduce((s,o)=>("default"in u[o]&&(s[o]=u[o].default),s),{});if(e.props.attrs){const s={...e.props.attrs};e.props._emit=!1;for(const l in s){const a=Su(l);r.includes(a)&&(e.props[a]=s[l],delete s[l])}Array.isArray(u)||r.forEach(l=>{"default"in u[l]&&e.props[l]===void 0&&(e.props[l]=n[l])});const o=ot(t._value);e.props.initial=e.type!=="input"?Nu(o):o,e.props._emit=!0,e.props.attrs=s}const i=Qa(e.props.__propDefs??[],u);return e.props.definition&&(e.props.definition.props=i),e.props.__propDefs=i,e.emit("added-props",u),e}function Si(e){return Array.isArray(e)?e.reduce((t,u)=>(t[u]={},t),{}):e}function Qa(e,t){return Array.isArray(e)&&Array.isArray(t)?e.concat(t):Jt(Si(e),Si(t))}function Mm(e,t,u,r){if(e.type==="input"&&Ue(100,e),u.parent&&u.parent!==e&&u.parent.remove(u),!t.children.includes(u)){if(r!==void 0&&e.type==="list"){const n=t.children[r];n&&"__FKP"in n?(u._c.uid=n.uid,t.children.splice(r,1,u)):t.children.splice(r,0,u),Array.isArray(e.value)&&e.value.length<t.children.length&&e.disturb().calm({name:r,value:u.value,from:Za})}else t.children.push(u);u.isSettled||e.disturb()}if(u.parent!==e){if(u.parent=e,u.parent!==e)return e.remove(u),u.parent.add(u),e}else u.use(e.plugins);return on(e,t,!1),e.ledger.merge(u),e.emit("child",u),e}function Om(e,t,u,r){return Dr(r)?(e.parent&&e.parent!==r&&e.parent.remove(e),t.parent=r,e.resetConfig(),r.children.includes(e)?e.use(r.plugins):r.add(e),!0):r===null?(t.parent=null,!0):!1}function Pm(e,t,u){const r=t.children.indexOf(u);if(r!==-1){u.isSettled&&e.disturb(),t.children.splice(r,1);let n=lt(u.props.preserve),i=u.parent;for(;n===void 0&&i;)n=lt(i.props.preserve),i=i.parent;n?e.calm():e.calm({name:e.type==="list"?r:u.name,value:Di}),u.parent=null,u.config._rmn=u}return e.ledger.unmerge(u),e.emit("childRemoved",u),e}function Rm(e,t,u){t.children.forEach(r=>!("__FKP"in r)&&u(r))}function Vm(e,t,u,r=!1,n=!1){t.children.some(i=>{if("__FKP"in i)return!1;const s=u(i);return r&&s===!1?!0:n&&s===!1?!1:i.walk(u,r,n)})}function Lm(e,t){const u=e.parent||void 0;t.config=ec(e.config._t,u),e.walk(r=>r.resetConfig())}function xs(e,t,u,r=!0,n=!0){return Array.isArray(u)||u instanceof Set?(u.forEach(i=>xs(e,t,i)),e):(t.plugins.has(u)||(n&&typeof u.library=="function"&&u.library(e),r&&u(e)!==!1&&(t.plugins.add(u),e.children.forEach(i=>i.use(u)))),e)}function Nm(e,t,u,r){if(Dr(e.parent)){const n=e.parent.children,i=r>=n.length?n.length-1:r<0?0:r,s=n.indexOf(e);return s===-1?!1:(n.splice(s,1),n.splice(i,0,e),e.parent.children=n,e.parent.type==="list"&&e.parent.disturb().calm({name:i,value:Fi,from:s}),!0)}return!1}function qm(e){if(e.parent){const t=[...e.parent.children].indexOf(e);return t===-1?e.parent.children.length:t}return-1}function Bm(e,t){return t}function zm(e,t){var u;return((u=e.parent)==null?void 0:u.type)==="list"?e.index:t.name!==Wa?t.name:e.index}function jm(e,t){return t.parent?t.parent.address.concat([e.name]):[e.name]}function Um(e,t,u){const r=typeof u=="string"?u.split(e.config.delimiter):u;if(!r.length)return;const n=r[0];let i=e.parent;for(i||(String(r[0])===String(e.name)&&r.shift(),i=e),n==="$parent"&&r.shift();i&&r.length;){const s=r.shift();switch(s){case"$root":i=e.root;break;case"$parent":i=i.parent;break;case"$self":i=e;break;default:i=i.children.find(o=>!("__FKP"in o)&&String(o.name)===String(s))||Hm(i,s)}}return i||void 0}function Hm(e,t){const u=String(t).match(/^(find)\((.*)\)$/);if(u){const[,r,n]=u,i=n.split(",").map(s=>s.trim());switch(r){case"find":return e.find(i[0],i[1]);default:return}}}function Km(e,t,u,r){return Wm(e,u,r)}function Wm(e,t,u="name"){const r=typeof u=="string"?i=>i[u]==t:u,n=[e];for(;n.length;){const i=n.shift();if(!("__FKP"in i)){if(r(i,t))return i;n.push(...i.children)}}}function Zm(e){let t=e;for(;t.parent;)t=t.parent;return t}function ec(e={},t){let u;return new Proxy(e,{get(...r){const n=r[1];if(n==="_t")return e;const i=Reflect.get(...r);if(i!==void 0)return i;if(t){const s=t.config[n];if(s!==void 0)return s}if(e.rootConfig&&typeof n=="string"){const s=e.rootConfig[n];if(s!==void 0)return s}return n==="delay"&&(u==null?void 0:u.type)==="input"?20:_m[n]},set(...r){const n=r[1],i=r[2];if(n==="_n")return u=i,e.rootConfig&&e.rootConfig._add(u),!0;if(n==="_rmn")return e.rootConfig&&e.rootConfig._rm(u),u=void 0,!0;if(!Oe(e[n],i,!1)){const s=Reflect.set(...r);return u&&(u.emit(`config:${n}`,i,!1),wi(u,n,i),u.walk(o=>wi(o,n,i),!1,!0)),s}return!0}})}function Gm(e,t,u,r="ui"){const n=typeof u=="string"?{key:u,value:u,type:r}:u,i=e.hook.text.dispatch(n);return e.emit("text",i,!1),i.value}function Jm(e){const t=e.name;do{if(e.props.isForm===!0)break;e.parent||Ue(106,t),e=e.parent}while(e);e.props.id&&Ha(e.props.id,e.props.__root)}function Ym(e,t,u){return Ka(e,u)}function Xm(e,t,u,r){const n=`${e.name}-set`,i=e.hook.setErrors.dispatch({localErrors:u,childErrors:r});return om(e,i.localErrors,i.childErrors).forEach(s=>{e.store.apply(s,o=>o.meta.source===n)}),e}function Qm(e,t,u=!0,r){return e.store.filter(n=>!(r===void 0||n.meta.source===r),"error"),u&&(r=r||`${e.name}-set`,e.walk(n=>{n.store.filter(i=>!(i.type==="error"&&i.meta&&i.meta.source===r))})),e}function eb(e){const t={initial:typeof e=="object"?ot(e):e};let u,r=!0,n={};return new Proxy(t,{get(...i){var c,f,g,p;const[s,o]=i;let l;Z(t,o)?(l=Reflect.get(...i),(c=n[o])!=null&&c.boolean&&(l=Jh(l))):u&&typeof o=="string"&&u.config[o]!==void 0?(l=u.config[o],o==="mergeStrategy"&&(u==null?void 0:u.type)==="input"&&sn(l)&&u.name in l&&(l=l[u.name])):l=(f=n[o])==null?void 0:f.default;const a=(g=n[o])==null?void 0:g.getter;return(p=n[o])!=null&&p.boolean&&(l=!!l),a?a(l,u):l},set(i,s,o,l){var g;if(s==="_n")return u=o,!0;if(s==="_emit")return r=o,!0;let{prop:a,value:c}=u.hook.prop.dispatch({prop:s,value:o});const f=(g=n[a])==null?void 0:g.setter;if(c=f?f(c,u):c,!Oe(t[a],c,!1)||typeof c=="object"){const p=Reflect.set(i,a,c,l);return a==="__propDefs"&&(n=Si(c)),r&&(u.emit("prop",{prop:a,value:c}),typeof a=="string"&&u.emit(`prop:${a}`,c)),p}return!0}})}function tb(e,t,u,r){return t.traps.set(u,r),e}function ub(e,t){if(e.props.definition)return e.define(e.props.definition);for(const u of t){if(e.props.definition)return;typeof u.library=="function"&&u.library(e)}}function rb(e){const t=Ja(e),u=ec(e.config||{},e.parent);return{_d:0,_e:Ba(),uid:Symbol(),_resolve:!1,_tmo:!1,_value:t,children:qh(e.children||[]),config:u,hook:km(),isCreated:!1,isSettled:!0,ledger:cm(),name:Em(e),parent:e.parent||null,plugins:new Set,props:eb(t),settled:Promise.resolve(t),store:tm(!0),sync:e.sync||!1,traps:xm(),type:e.type||"input",value:t}}function nb(e,t){var r,n;const u=(r=t.props)==null?void 0:r.id;if(u||(n=t.props)==null||delete n.id,e.ledger.init(e.store._n=e.props._n=e.config._n=e),e.props._emit=!1,Object.assign(e.props,u?{}:{id:`input_${Cm++}`},t.props??{}),e.props._emit=!0,ub(e,new Set([...t.plugins||[],...e.parent?e.parent.plugins:[]])),t.plugins)for(const i of t.plugins)xs(e,e._c,i,!0,!1);return e.each(i=>e.add(i)),e.parent&&e.parent.add(e,t.index),e.type==="input"&&e.children.length&&Ue(100,e),Ya(e,e._c,e._value,!1),e.store.release(),u&&pm(e),e.emit("created",e),e.isCreated=!0,e}function ib(e){return{__FKP:!0,uid:Symbol(),name:(e==null?void 0:e.name)??`p_${Ga++}`,value:(e==null?void 0:e.value)??null,_value:(e==null?void 0:e.value)??null,type:(e==null?void 0:e.type)??"input",props:{},use:()=>{},input(t){return this._value=t,this.value=t,Promise.resolve()},isSettled:!0}}function sb(e){return"__FKP"in e}function ob(e){const t=e||{},u=rb(t),r=new Proxy(u,{get(...n){const[,i]=n;if(i==="__FKNode__")return!0;const s=u.traps.get(i);return s&&s.get?s.get(r,u):Reflect.get(...n)},set(...n){const[,i,s]=n,o=u.traps.get(i);return o&&o.set?o.set(r,u,i,s):Reflect.set(...n)}});return nb(r,t)}function Ii(e){return typeof e!="string"&&Z(e,"$el")}function Ti(e){return typeof e!="string"&&Z(e,"$cmp")}function ku(e){return!e||typeof e=="string"?!1:Z(e,"if")&&Z(e,"then")}function lb(e){return typeof e!="string"&&"$formkit"in e}function ab(e){if(typeof e=="string")return{$el:"text",children:e};if(lb(e)){const{$formkit:t,for:u,if:r,children:n,bind:i,...s}=e;return Object.assign({$cmp:"FormKit",props:{...s,type:t}},r?{if:r}:{},u?{for:u}:{},n?{children:n}:{},i?{bind:i}:{})}return e}function it(e){let t;const u=new Set,r=function(y,v){return typeof y=="function"?y(v):y},n=[{"&&":(m,y,v)=>r(m,v)&&r(y,v),"||":(m,y,v)=>r(m,v)||r(y,v)},{"===":(m,y,v)=>r(m,v)===r(y,v),"!==":(m,y,v)=>r(m,v)!==r(y,v),"==":(m,y,v)=>r(m,v)==r(y,v),"!=":(m,y,v)=>r(m,v)!=r(y,v),">=":(m,y,v)=>r(m,v)>=r(y,v),"<=":(m,y,v)=>r(m,v)<=r(y,v),">":(m,y,v)=>r(m,v)>r(y,v),"<":(m,y,v)=>r(m,v)<r(y,v)},{"+":(m,y,v)=>r(m,v)+r(y,v),"-":(m,y,v)=>r(m,v)-r(y,v)},{"*":(m,y,v)=>r(m,v)*r(y,v),"/":(m,y,v)=>r(m,v)/r(y,v),"%":(m,y,v)=>r(m,v)%r(y,v)}],i=n.reduce((m,y)=>m.concat(Object.keys(y)),[]),s=new Set(i.map(m=>m.charAt(0)));function o(m,y,v,k){const A=m.filter(x=>x.startsWith(y));return A.length?A.find(x=>k.length>=v+x.length&&k.substring(v,v+x.length)===x?x:!1):!1}function l(m,y,v=1){let k=v?y.substring(m+1).trim():y.substring(0,m).trim();if(!k.length)return-1;if(!v){const x=k.split("").reverse(),w=x.findIndex(b=>s.has(b));k=x.slice(w).join("")}const A=k[0];return n.findIndex(x=>{const w=Object.keys(x);return!!o(w,A,0,k)})}function a(m,y){let v="";const k=y.length;let A=0;for(let x=m;x<k;x++){const w=y.charAt(x);if(w==="(")A++;else if(w===")")A--;else if(A===0&&w===" ")continue;if(A===0&&o(i,w,x,y))return[v,x-1];v+=w}return[v,y.length-1]}function c(m,y=0){const v=n[y],k=m.length,A=Object.keys(v);let x=0,w=!1,b=null,C="",L=null,G,Y="",J="",E="",N="",z=0;const ee=(H,j)=>{H?E+=j:C+=j};for(let H=0;H<k;H++)if(Y=J,J=m.charAt(H),(J==="'"||J==='"')&&Y!=="\\"&&(x===0&&!w||x&&!N)){x?N=J:w=J,ee(x,J);continue}else if(w&&(J!==w||Y==="\\")||N&&(J!==N||Y==="\\")){ee(x,J);continue}else if(w===J){w=!1,ee(x,J);continue}else if(N===J){N=!1,ee(x,J);continue}else{if(J===" ")continue;if(J==="(")x===0?z=H:E+=J,x++;else if(J===")")if(x--,x===0){const j=typeof C=="string"&&C.startsWith("$")?C:void 0,re=j&&m.charAt(H+1)===".";let xe="";re&&([xe,H]=a(H+2,m));const rt=b?y:l(z,m,0),Ie=l(H,m);rt===-1&&Ie===-1?(C=f(E,-1,j,xe),typeof C=="string"&&(C=E)):b&&(rt>=Ie||Ie===-1)&&y===rt?(L=b.bind(null,f(E,-1,j,xe)),b=null,C=""):Ie>rt&&y===Ie?C=f(E,-1,j,xe):C+=`(${E})${re?`.${xe}`:""}`,E=""}else E+=J;else if(x===0&&(G=o(A,J,H,m))){H===0&&Ue(103,[G,m]),H+=G.length-1,H===m.length-1&&Ue(104,[G,m]),b?C&&(L=b.bind(null,f(C,y)),b=v[G].bind(null,L),C=""):L?(b=v[G].bind(null,f(L,y)),L=null):(b=v[G].bind(null,f(C,y)),C="");continue}else ee(x,J)}return C&&b&&(b=b.bind(null,f(C,y))),b=!b&&L?L:b,!b&&C&&(b=(H,j)=>typeof H=="function"?H(j):H,b=b.bind(null,f(C,y))),!b&&!C&&Ue(105,m),b}function f(m,y,v,k){if(v){const A=f(v,n.length);let x,w=k?it(`$${k}`):!1;if(typeof A=="function"){const b=Kh(String(m)).map(C=>f(C,-1));return C=>{const L=A(C);return typeof L!="function"?(mu(150,v),L):(x=L(...b.map(G=>typeof G=="function"?G(C):G)),w&&(w=w.provide(G=>{const Y=t(G);return G.reduce((E,N)=>{if(N===k||(k==null?void 0:k.startsWith(`${N}(`))){const ee=Wh(x,N);E[N]=()=>ee}else E[N]=Y[N];return E},{})})),w?w():x)}}}else if(typeof m=="string"){if(m==="true")return!0;if(m==="false")return!1;if(m==="undefined")return;if(Uh(m))return Hh(m.substring(1,m.length-1));if(!isNaN(+m))return Number(m);if(y<n.length-1)return c(m,y+1);if(m.startsWith("$")){const A=m.substring(1);return u.add(A),function(w){return A in w?w[A]():void 0}}return m}return m}const g=c(e.startsWith("$:")?e.substring(2):e),p=Array.from(u);function d(m){return t=m,Object.assign(g.bind(null,m(p)),{provide:d})}return Object.assign(g,{provide:d})}function Hr(e,t,u){return u?typeof u=="string"?u.split(" ").reduce((n,i)=>Object.assign(n,{[i]:!0}),{}):typeof u=="function"?Hr(e,t,u(t,e)):u:{}}function cb(e,t,...u){const r=u.reduce((n,i)=>{if(!i)return ii(n);const{$reset:s,...o}=i;return ii(s?o:Object.assign(n,o))},{});return Object.keys(e.hook.classes.dispatch({property:t,classes:r}).classes).filter(n=>r[n]).join(" ")||null}function ii(e){const t="$remove:";let u=!1;const r=Object.keys(e).filter(n=>(e[n]&&n.startsWith(t)&&(u=!0),e[n]));return r.length>1&&u&&r.filter(i=>i.startsWith(t)).map(i=>{const s=i.substring(t.length);e[s]=!1,e[i]=!1}),e}function fb(e,t,u){const r=wr(e);r?r.setErrors(t,u):mu(651,e)}function db(e,t=!0){const u=wr(e);u?u.clearErrors(t):mu(652,e)}var ln="1.6.5",tc=new WeakSet;function Ln(e,t){const u=t||Object.assign(new Map,{active:!1}),r=new Map,n=function(c){var f;u.active&&(u.has(e)||u.set(e,new Set),(f=u.get(e))==null||f.add(c))},i=function(c){return new Proxy(c,{get(...f){return typeof f[1]=="string"&&n(`prop:${f[1]}`),Reflect.get(...f)}})},s=function(c){return new Proxy(c,{get(...f){return f[1]==="value"?g=>(n(`count:${g}`),c.value(g)):Reflect.get(...f)}})},o=function(c,f){return Dr(c)?Ln(c,u):(f==="value"&&n("commit"),f==="_value"&&n("input"),f==="props"?i(c):f==="ledger"?s(c):(f==="children"&&(n("child"),n("childRemoved")),c))},{proxy:l,revoke:a}=Proxy.revocable(e,{get(...c){switch(c[1]){case"_node":return e;case"deps":return u;case"watch":return(g,p,d)=>nc(l,g,p,d);case"observe":return()=>{const g=new Map(u);return u.clear(),u.active=!0,g};case"stopObserve":return()=>{const g=new Map(u);return u.active=!1,g};case"receipts":return r;case"kill":return()=>{rc(r),tc.add(c[2]),a()}}const f=Reflect.get(...c);return typeof f=="function"?(...g)=>{const p=f(...g);return o(p,c[1])}:o(f,c[1])}});return l}function uc(e,[t,u],r,n){t.forEach((i,s)=>{i.forEach(o=>{e.receipts.has(s)||e.receipts.set(s,{});const l=e.receipts.get(s)??{};l[o]=l[o]??[],l[o].push(s.on(o,r,n)),e.receipts.set(s,l)})}),u.forEach((i,s)=>{i.forEach(o=>{if(e.receipts.has(s)){const l=e.receipts.get(s);l&&Z(l,o)&&(l[o].map(s.off),delete l[o],e.receipts.set(s,l))}})})}function rc(e){e.forEach((t,u)=>{for(const r in t)t[r].map(u.off)}),e.clear()}function nc(e,t,u,r){const n=o=>{const l=e.stopObserve();uc(e,ic(i,l),()=>nc(e,t,u,r),r),u&&u(o)},i=new Map(e.deps);e.observe();const s=t(e);s instanceof Promise?s.then(o=>n(o)):n(s)}function ic(e,t){const u=new Map,r=new Map;return t.forEach((n,i)=>{if(!e.has(i))u.set(i,n);else{const s=new Set,o=e.get(i);n.forEach(l=>!(o!=null&&o.has(l))&&s.add(l)),u.set(i,s)}}),e.forEach((n,i)=>{if(!t.has(i))r.set(i,n);else{const s=new Set,o=t.get(i);n.forEach(l=>!(o!=null&&o.has(l))&&s.add(l)),r.set(i,s)}}),[u,r]}function ks(e){return tc.has(e)}var sc=function({value:t}){return["yes","on","1",1,!0,"true"].includes(t)};sc.skipEmpty=!1;var pb=sc,hb=function({value:e},t=!1){const u=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r>u},mb=hb,bb=function({value:e},t="default"){const u={default:new RegExp("^\\p{L}+$","u"),latin:/^[a-z]+$/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},gb=bb,_b=function({value:e},t="default"){const u={default:/^[\p{L} ]+$/u,latin:/^[a-z ]+$/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},yb=_b,vb=function({value:e},t="default"){const u={default:/^[0-9\p{L}]+$/u,latin:/^[0-9a-z]+$/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},xb=vb,kb=function({value:e},t=!1){const u=Date.parse(t||new Date),r=Date.parse(String(e));return isNaN(r)?!1:r<u},Cb=kb,Eb=function({value:t},u,r){if(!isNaN(t)&&!isNaN(u)&&!isNaN(r)){const n=1*t;u=Number(u),r=Number(r);const[i,s]=u<=r?[u,r]:[r,u];return n>=1*i&&n<=1*s}return!1},Ab=Eb,jo=/(_confirm(?:ed)?)$/,$b=function(t,u,r="loose"){var i;u||(u=jo.test(t.name)?t.name.replace(jo,""):`${t.name}_confirm`);const n=(i=t.at(u))==null?void 0:i.value;return r==="strict"?t.value===n:t.value==n},wb=$b,Db=function({value:e},t="default"){const u={default:new RegExp("\\p{L}","u"),latin:/[a-z]/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},Fb=Db,Sb=function({value:e},t="default"){const u={default:/[\p{L} ]/u,latin:/[a-z ]/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},Ib=Sb,Tb=function({value:e},t="default"){const u={default:/[0-9\p{L}]/u,latin:/[0-9a-z]/i},r=Z(u,t)?t:"default";return u[r].test(String(e))},Mb=Tb,Ob=function({value:e},t="default"){const u={default:new RegExp("\\p{Ll}","u"),latin:/[a-z]/},r=Z(u,t)?t:"default";return u[r].test(String(e))},Pb=Ob,Rb=function({value:t}){return/[0-9]/.test(String(t))},Vb=Rb,Lb=function({value:e}){return/[!-/:-@[-`{-~]/.test(String(e))},Nb=Lb,qb=function({value:e},t="default"){const u={default:new RegExp("\\p{Lu}","u"),latin:/[A-Z]/},r=Z(u,t)?t:"default";return u[r].test(String(e))},Bb=qb,zb=function({value:t},u,r){u=u instanceof Date?u.getTime():Date.parse(u),r=r instanceof Date?r.getTime():Date.parse(r);const n=t instanceof Date?t.getTime():Date.parse(String(t));if(u&&!r)r=u,u=Date.now();else if(!u||!n)return!1;return n>=u&&n<=r},jb=zb,Ub=function({value:t},u){return u&&typeof u=="string"?jh(u).test(String(t)):!isNaN(Date.parse(String(t)))},Hb=Ub,Kb=function({value:t}){return/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(String(t))},Wb=Kb,Zb=function({value:t},...u){return typeof t=="string"&&u.length?u.some(r=>t.endsWith(r)):typeof t=="string"&&u.length===0},Gb=Zb,Jb=function({value:t},...u){return u.some(r=>typeof r=="object"?Oe(r,t):r==t)},Yb=Jb,Xb=function({value:t},u=0,r=1/0){u=parseInt(u),r=isNaN(parseInt(r))?1/0:parseInt(r);const n=u<=r?u:r,i=r>=u?r:u;if(typeof t=="string"||Array.isArray(t))return t.length>=n&&t.length<=i;if(t&&typeof t=="object"){const s=Object.keys(t).length;return s>=n&&s<=i}return!1},Qb=Xb,e2=function({value:e},t="default"){const u={default:new RegExp("^\\p{Ll}+$","u"),allow_non_alpha:/^[0-9\p{Ll}!-/:-@[-`{-~]+$/u,allow_numeric:/^[0-9\p{Ll}]+$/u,allow_numeric_dashes:/^[0-9\p{Ll}-]+$/u,latin:/^[a-z]+$/},r=Z(u,t)?t:"default";return u[r].test(String(e))},t2=e2,u2=function({value:t},...u){return u.some(r=>(typeof r=="string"&&r.substr(0,1)==="/"&&r.substr(-1)==="/"&&(r=new RegExp(r.substr(1,r.length-2))),r instanceof RegExp?r.test(String(t)):r===t))},r2=u2,n2=function({value:t},u=10){return Array.isArray(t)?t.length<=u:Number(t)<=Number(u)},i2=n2,s2=function({value:t},u=1){return Array.isArray(t)?t.length>=u:Number(t)>=Number(u)},o2=s2,l2=function({value:t},...u){return!u.some(r=>typeof r=="object"?Oe(r,t):r===t)},a2=l2,c2=function({value:t}){return!isNaN(t)},f2=c2,oc=function(e,...t){return Je(e.value)?t.map(r=>{var n;return(n=e.at(r))==null?void 0:n.value}).some(r=>!Je(r)):!0};oc.skipEmpty=!1;var d2=oc,lc=function({value:t},u="default"){return u==="trim"&&typeof t=="string"?!Je(t.trim()):!Je(t)};lc.skipEmpty=!1;var p2=lc,h2=function({value:t},...u){return typeof t=="string"&&u.length?u.some(r=>t.startsWith(r)):typeof t=="string"&&u.length===0},m2=h2,b2=function({value:e}){return/^[!-/:-@[-`{-~]+$/.test(String(e))},g2=b2,_2=function({value:e},t="default"){const u={default:new RegExp("^\\p{Lu}+$","u"),latin:/^[A-Z]+$/},r=Z(u,t)?t:"default";return u[r].test(String(e))},y2=_2,v2=function({value:t},...u){try{const r=u.length?u:["http:","https:"],n=new URL(String(t));return r.includes(n.protocol)}catch{return!1}},x2=v2;const k2=Object.freeze(Object.defineProperty({__proto__:null,accepted:pb,alpha:gb,alpha_spaces:yb,alphanumeric:xb,between:Ab,confirm:wb,contains_alpha:Fb,contains_alpha_spaces:Ib,contains_alphanumeric:Mb,contains_lowercase:Pb,contains_numeric:Vb,contains_symbol:Nb,contains_uppercase:Bb,date_after:mb,date_before:Cb,date_between:jb,date_format:Hb,email:Wb,ends_with:Gb,is:Yb,length:Qb,lowercase:t2,matches:r2,max:i2,min:o2,not:a2,number:f2,require_one:d2,required:p2,starts_with:m2,symbol:g2,uppercase:y2,url:x2},Symbol.toStringTag,{value:"Module"}));var Mi=Ke({type:"state",blocking:!0,visible:!1,value:!0,key:"validating"});function C2(e={}){return function(u){let r=ot(u.props.validationRules||{}),n={...e,...r};const i={input:Zu(),rerun:null,isPassing:!0};let s=ot(u.props.validation);u.on("prop:validation",({payload:l})=>o(l,r)),u.on("prop:validationRules",({payload:l})=>o(s,l));function o(l,a){var c;Oe(Object.keys(r||{}),Object.keys(a||{}))&&Oe(s,l)||(r=ot(a),s=ot(l),n={...e,...r},(c=u.props.parsedRules)==null||c.forEach(f=>{ac(f),rc(f.observer.receipts),f.observer.kill()}),u.store.filter(()=>!1,"validation"),u.props.parsedRules=Ho(l,n,u),i.isPassing=!0,Oi(u,u.props.parsedRules,i))}u.props.parsedRules=Ho(s,n,u),Oi(u,u.props.parsedRules,i)}}function Oi(e,t,u){ks(e)||(u.input=Zu(),e.store.set(Ke({key:"failing",value:!u.isPassing,visible:!1})),u.isPassing=!0,e.store.filter(r=>!r.meta.removeImmediately,"validation"),t.forEach(r=>r.debounce&&clearTimeout(r.timer)),t.length&&(e.store.set(Mi),Pi(0,t,u,!1,()=>{e.store.remove(Mi.key),e.store.set(Ke({key:"failing",value:!u.isPassing,visible:!1}))})))}function Pi(e,t,u,r,n){const i=t[e];if(!i)return n();const s=i.observer;if(ks(s))return;const o=u.input;i.state=null;function l(a,c){if(u.input!==o)return;u.isPassing=u.isPassing&&!!c,i.queued=!1;const f=s.stopObserve(),g=ic(i.deps,f);if(uc(s,g,function(){try{s.store.set(Mi)}catch{}i.queued=!0,u.rerun&&clearTimeout(u.rerun),u.rerun=setTimeout(Oi,0,s,t,u)},"unshift"),i.deps=f,i.state=c,c===!1?A2(i,r||a):ac(i),t.length>e+1){const p=t[e+1];(c||p.force||!p.skipEmpty)&&p.state===null&&(p.queued=!0),Pi(e+1,t,u,r||a,n)}else n()}(!Je(s.value)||!i.skipEmpty)&&(u.isPassing||i.force)?i.queued?E2(i,s,a=>{a instanceof Promise?a.then(c=>l(!0,c)):l(!1,a)}):Pi(e+1,t,u,r,n):Je(s.value)&&i.skipEmpty&&u.isPassing?(s.observe(),s.value,l(!1,u.isPassing)):l(!1,null)}function E2(e,t,u){e.debounce?e.timer=setTimeout(()=>{t.observe(),u(e.rule(t,...e.args))},e.debounce):(t.observe(),u(e.rule(t,...e.args)))}function ac(e){const t=`rule_${e.name}`;e.messageObserver&&(e.messageObserver=e.messageObserver.kill()),Z(e.observer.store,t)&&e.observer.store.remove(t)}function A2(e,t){const u=e.observer;ks(u)||(e.messageObserver||(e.messageObserver=Ln(u._node)),e.messageObserver.watch(r=>w2(r,e),r=>{const n=$2(u,e,r),i=Ke({blocking:e.blocking,key:`rule_${e.name}`,meta:{messageKey:e.name,removeImmediately:t,localize:!n,i18nArgs:r},type:"validation",value:n||"This field is not valid."});u.store.set(i)}))}function $2(e,t,u){const r=e.props.validationMessages&&Z(e.props.validationMessages,t.name)?e.props.validationMessages[t.name]:void 0;return typeof r=="function"?r(...u):r}function w2(e,t){return[{node:e,name:cc(e),args:t.args}]}function cc(e){return typeof e.props.validationLabel=="function"?e.props.validationLabel(e):e.props.validationLabel||e.props.label||e.props.name||String(e.name)}var fc="(?:[\\*+?()0-9]+)",dc="[a-zA-Z][a-zA-Z0-9_]+",D2=new RegExp(`^(${fc}?${dc})(?:\\:(.*)+)?$`,"i"),F2=new RegExp(`^(${fc})(${dc})$`,"i"),S2=/([\*+?]+)?(\(\d+\))([\*+?]+)?/,Uo=/\(\d+\)/,I2={blocking:!0,debounce:0,force:!1,skipEmpty:!0,name:""};function Ho(e,t,u){return e?(typeof e=="string"?T2(e):Lu(e)).reduce((n,i)=>{let s=i.shift();const o={};if(typeof s=="string"){const[l,a]=O2(s);Z(t,l)&&(s=t[l],Object.assign(o,a))}return typeof s=="function"&&n.push({observer:Ln(u),rule:s,args:i,timer:0,state:null,queued:!0,deps:new Map,...I2,...P2(o,s)}),n},[]):[]}function T2(e){return e.split("|").reduce((t,u)=>{const r=M2(u);return r&&t.push(r),t},[])}function M2(e){const t=e.trim();if(t){const u=t.match(D2);if(u&&typeof u[1]=="string"){const r=u[1].trim(),n=u[2]&&typeof u[2]=="string"?u[2].split(",").map(i=>i.trim()):[];return[r,...n]}}return!1}function O2(e){const t=e.match(F2);if(!t)return[e,{name:e}];const u={"*":{force:!0},"+":{skipEmpty:!1},"?":{blocking:!1}},[,r,n]=t,i=Uo.test(r)?r.match(S2)||[]:[,r];return[n,[i[1],i[2],i[3]].reduce((s,o)=>(o&&(Uo.test(o)?s.debounce=parseInt(o.substr(1,o.length-1)):o.split("").forEach(l=>Z(u,l)&&Object.assign(s,u[l]))),s),{name:n})]}function P2(e,t){return e.name||(e.name=t.ruleName||t.name),["skipEmpty","force","debounce","blocking"].reduce((u,r)=>(Z(t,r)&&!Z(u,r)&&Object.assign(u,{[r]:t[r]}),u),e)}function ue(e){return e[0].toUpperCase()+e.substr(1)}function Ko(e,t="or"){return e.reduce((u,r,n)=>(u+=r,n<=e.length-2&&e.length>2&&(u+=", "),n===e.length-2&&(u+=`${e.length===2?" ":""}${t} `),u),"")}function Nr(e){const t=typeof e=="string"?new Date(Date.parse(e)):e;return t instanceof Date?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeZone:"UTC"}).format(t):"(unknown)"}function R2(e,t){return Number(e)>=Number(t)?[t,e]:[e,t]}var V2={add:"Add",remove:"Remove",removeAll:"Remove all",incomplete:"Sorry, not all fields are filled out correctly.",submit:"Submit",noFiles:"No file chosen",moveUp:"Move up",moveDown:"Move down",isLoading:"Loading...",loadMore:"Load more",next:"Next",prev:"Previous",addAllValues:"Add all values",addSelectedValues:"Add selected values",removeAllValues:"Remove all values",removeSelectedValues:"Remove selected values",chooseDate:"Choose date",changeDate:"Change date",summaryHeader:"There were errors in your form.",close:"Close",open:"Open"},L2={accepted({name:e}){return`Please accept the ${e}.`},date_after({name:e,args:t}){return Array.isArray(t)&&t.length?`${ue(e)} must be after ${Nr(t[0])}.`:`${ue(e)} must be in the future.`},alpha({name:e}){return`${ue(e)} can only contain alphabetical characters.`},alphanumeric({name:e}){return`${ue(e)} can only contain letters and numbers.`},alpha_spaces({name:e}){return`${ue(e)} can only contain letters and spaces.`},contains_alpha({name:e}){return`${ue(e)} must contain alphabetical characters.`},contains_alphanumeric({name:e}){return`${ue(e)} must contain letters or numbers.`},contains_alpha_spaces({name:e}){return`${ue(e)} must contain letters or spaces.`},contains_symbol({name:e}){return`${ue(e)} must contain a symbol.`},contains_uppercase({name:e}){return`${ue(e)} must contain an uppercase letter.`},contains_lowercase({name:e}){return`${ue(e)} must contain a lowercase letter.`},contains_numeric({name:e}){return`${ue(e)} must contain numbers.`},symbol({name:e}){return`${ue(e)} must be a symbol.`},uppercase({name:e}){return`${ue(e)} can only contain uppercase letters.`},lowercase({name:e,args:t}){let u="";return Array.isArray(t)&&t.length&&(t[0]==="allow_non_alpha"&&(u=", numbers and symbols"),t[0]==="allow_numeric"&&(u=" and numbers"),t[0]==="allow_numeric_dashes"&&(u=", numbers and dashes")),`${ue(e)} can only contain lowercase letters${u}.`},date_before({name:e,args:t}){return Array.isArray(t)&&t.length?`${ue(e)} must be before ${Nr(t[0])}.`:`${ue(e)} must be in the past.`},between({name:e,args:t}){if(isNaN(t[0])||isNaN(t[1]))return"This field was configured incorrectly and can’t be submitted.";const[u,r]=R2(t[0],t[1]);return`${ue(e)} must be between ${u} and ${r}.`},confirm({name:e}){return`${ue(e)} does not match.`},date_format({name:e,args:t}){return Array.isArray(t)&&t.length?`${ue(e)} is not a valid date, please use the format ${t[0]}`:"This field was configured incorrectly and can’t be submitted"},date_between({name:e,args:t}){return`${ue(e)} must be between ${Nr(t[0])} and ${Nr(t[1])}`},email:"Please enter a valid email address.",ends_with({name:e,args:t}){return`${ue(e)} doesn’t end with ${Ko(t)}.`},is({name:e}){return`${ue(e)} is not an allowed value.`},length({name:e,args:[t=0,u=1/0]}){const r=Number(t)<=Number(u)?t:u,n=Number(u)>=Number(t)?u:t;return r==1&&n===1/0?`${ue(e)} must be at least one character.`:r==0&&n?`${ue(e)} must be less than or equal to ${n} characters.`:r===n?`${ue(e)} should be ${n} characters long.`:r&&n===1/0?`${ue(e)} must be greater than or equal to ${r} characters.`:`${ue(e)} must be between ${r} and ${n} characters.`},matches({name:e}){return`${ue(e)} is not an allowed value.`},max({name:e,node:{value:t},args:u}){return Array.isArray(t)?`Cannot have more than ${u[0]} ${e}.`:`${ue(e)} must be no more than ${u[0]}.`},mime({name:e,args:t}){return t[0]?`${ue(e)} must be of the type: ${t[0]}`:"No file formats allowed."},min({name:e,node:{value:t},args:u}){return Array.isArray(t)?`Cannot have fewer than ${u[0]} ${e}.`:`${ue(e)} must be at least ${u[0]}.`},not({name:e,node:{value:t}}){return`“${t}” is not an allowed ${e}.`},number({name:e}){return`${ue(e)} must be a number.`},require_one:({name:e,node:t,args:u})=>{const r=u.map(n=>{const i=t.at(n);return i?cc(i):!1}).filter(n=>!!n);return r.unshift(e),`${r.join(" or ")} is required.`},required({name:e}){return`${ue(e)} is required.`},starts_with({name:e,args:t}){return`${ue(e)} doesn’t start with ${Ko(t)}.`},url(){return"Please enter a valid URL."},invalidDate:"The selected date is invalid."},N2={ui:V2,validation:L2},Wo=new Set;function q2(e){return function(u){Wo.add(u),u.on("destroying",()=>Wo.delete(u));let r=Zo(u.config.locale,e),n=r?e[r]:{};u.on("prop:locale",({payload:i})=>{r=Zo(i,e),n=r?e[r]:{},u.store.touch()}),u.on("prop:label",()=>u.store.touch()),u.on("prop:validationLabel",()=>u.store.touch()),u.hook.text((i,s)=>{var l,a;const o=((l=i.meta)==null?void 0:l.messageKey)||i.key;if(Z(n,i.type)&&Z(n[i.type],o)){const c=n[i.type][o];typeof c=="function"?i.value=Array.isArray((a=i.meta)==null?void 0:a.i18nArgs)?c(...i.meta.i18nArgs):c(i):i.value=c}return s(i)})}}function Zo(e,t){if(Z(t,e))return e;const[u]=e.split("-");if(Z(t,u))return u;for(const r in t)return r;return!1}function B2(...e){const t=e.reduce((r,n)=>Jt(r,n),{}),u=()=>{};return u.library=function(r){const n=Su(r.props.type);Z(t,n)&&r.define(t[n])},u}var z2=["classes","config","delay","errors","id","index","inputErrors","library","modelValue","onUpdate:modelValue","name","number","parent","plugins","sectionsSchema","type","validation","validationLabel","validationMessages","validationRules","onInput","onInputRaw","onUpdate:modelValue","onNode","onSubmit","onSubmitInvalid","onSubmitRaw"];function Nn(e){return e&&typeof e=="object"&&"group"in e&&Array.isArray(e.options)}function pc(e,t={count:1}){return Array.isArray(e)?e.map(u=>{if(typeof u=="string"||typeof u=="number")return{label:String(u),value:String(u)};if(typeof u=="object"){if("group"in u)return u.options=pc(u.options||[],t),u;"value"in u&&typeof u.value!="string"&&Object.assign(u,{value:`__mask_${t.count++}`,__original:u.value})}return u}):Object.keys(e).map(u=>({label:e[u],value:u}))}function du(e,t,u=!1){if(Array.isArray(e)){for(const r of e)if(!(typeof r!="object"&&r)){if(Nn(r)){const n=du(r.options,t,!0);if(n!==void 0)return n}else if(t==r.value)return"__original"in r?r.__original:r.value}}return u?void 0:t}function qu(e,t){return e===null&&t===void 0||e===void 0&&t===null?!1:e==t?!0:Vu(e)&&Vu(t)?Oe(e,t):!1}function qn(e){e.hook.prop((t,u)=>{var r;return t.prop==="options"&&(typeof t.value=="function"?(e.props.optionsLoader=t.value,t.value=[]):((r=e.props)._normalizeCounter??(r._normalizeCounter={count:1}),t.value=pc(t.value,e.props._normalizeCounter))),u(t)})}function W(e,t,u=!1){return(...r)=>{const n=i=>{const s=!t||typeof t=="string"?{$el:t}:t();return(Ii(s)||Ti(s))&&(s.meta?s.meta.section=e:s.meta={section:e},r.length&&!s.children&&(s.children=[...r.map(o=>typeof o=="function"?o(i):o)]),Ii(s)&&(s.attrs={class:`$classes.${e}`,...s.attrs||{}})),{if:`$slots.${e}`,then:`$slots.${e}`,else:e in i?tr(s,i[e]):s}};return n._s=e,u?j2(n):n}}function j2(e){return t=>[e(t)]}function an(e){return!!(e&&typeof e=="object"&&("$el"in e||"$cmp"in e||"$formkit"in e))}function tr(e,t={}){return typeof e=="string"?an(t)||typeof t=="string"?t:e:Array.isArray(e)?an(t)?t:e:Jt(e,t)}var U2=W("actions",()=>({$el:"div",if:"$actions"})),cn=W("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",name:"$node.props.altName || $node.name",disabled:"$option.attrs.disabled || $disabled",onInput:"$handlers.toggleChecked",checked:"$fns.eq($_value, $onValue)",onBlur:"$handlers.blur",value:"$: true",id:"$id","aria-describedby":{if:"$options.length",then:{if:"$option.help",then:'$: "help-" + $option.attrs.id',else:void 0},else:{if:"$help",then:'$: "help-" + $id',else:void 0}}}})),hc=W("optionHelp",()=>({$el:"div",if:"$option.help",attrs:{id:'$: "help-" + $option.attrs.id'}})),fn=W("inner","span"),dn=W("label","span"),mc=W("option",()=>({$el:"li",for:["option","$options"],attrs:{"data-disabled":"$option.attrs.disabled || $disabled || undefined"}})),bc=W("options","ul"),pn=W("wrapper",()=>({$el:"label",attrs:{"data-disabled":{if:"$options.length",then:void 0,else:"$disabled || undefined"},"data-checked":{if:"$options == undefined",then:"$fns.eq($_value, $onValue) || undefined",else:"$fns.isChecked($option.value) || undefined"}}})),H2=W("input",()=>({$el:"button",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",id:"$id"}})),K2=W("default",null),hn=W("decorator",()=>({$el:"span",attrs:{"aria-hidden":"true"}})),gc=W("fieldset",()=>({$el:"fieldset",attrs:{id:"$id","aria-describedby":{if:"$help",then:'$: "help-" + $id',else:void 0}}})),W2=W("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"file",disabled:"$disabled",name:"$node.name",onChange:"$handlers.files",onBlur:"$handlers.blur",id:"$id","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"}})),Z2=W("fileItem",()=>({$el:"li",for:["file","$value"]})),G2=W("fileList",()=>({$el:"ul",if:"$value.length",attrs:{"data-has-multiple":"$_hasMultipleFiles"}})),J2=W("fileName",()=>({$el:"span",attrs:{class:"$classes.fileName"}})),Go=W("fileRemove",()=>({$el:"button",attrs:{type:"button",onClick:"$handlers.resetFiles"}})),Y2=W("form",()=>({$el:"form",bind:"$attrs",meta:{autoAnimate:!0},attrs:{id:"$id",name:"$node.name",onSubmit:"$handlers.submit","data-loading":"$state.loading || undefined"}})),Cs=W("wrapper",null,!0),et=W("help",()=>({$el:"div",if:"$help",attrs:{id:'$: "help-" + $id'}})),pe=(e,t)=>W(`${e}Icon`,()=>{const u=`_raw${e.charAt(0).toUpperCase()}${e.slice(1)}Icon`;return{if:`$${e}Icon && $${u}`,$el:`${t||"span"}`,attrs:{class:`$classes.${e}Icon + " " + $classes.icon`,innerHTML:`$${u}`,onClick:`$handlers.iconClick(${e})`,role:`$fns.iconRole(${e})`,tabindex:`$fns.iconRole(${e}) === "button" && "0" || undefined`,for:{if:`${t==="label"}`,then:"$id"}}}})(),bu=W("inner","div"),gu=W("label",()=>({$el:"label",if:"$label",attrs:{for:"$id"}})),_c=W("legend",()=>({$el:"legend",if:"$label"})),dt=W("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),pt=W("messages",()=>({$el:"ul",if:"$defaultMessagePlacement && $fns.length($messages)"})),X2=W("noFiles",()=>({$el:"span",if:"$value.length == 0"})),yc=W("optGroup",()=>({$el:"optgroup",bind:"$option.attrs",attrs:{label:"$option.group"}})),mn=W("option",()=>({$el:"option",bind:"$option.attrs",attrs:{class:"$classes.option",value:"$option.value",selected:"$fns.isSelected($option)"}})),bn=W("options",()=>({$el:null,if:"$options.length",for:["option","$option.options || $options"]})),Ft=W("outer",()=>({$el:"div",meta:{autoAnimate:!0},attrs:{key:"$id","data-family":"$family || undefined","data-type":"$type","data-multiple":'$attrs.multiple || ($type != "select" && $options != undefined) || undefined',"data-has-multiple":"$_hasMultipleFiles","data-disabled":'$: ($disabled !== "false" && $disabled) || undefined',"data-empty":"$state.empty || undefined","data-complete":"$state.complete || undefined","data-invalid":"$state.invalid || undefined","data-errors":"$state.errors || undefined","data-submitted":"$state.submitted || undefined","data-prefix-icon":"$_rawPrefixIcon !== undefined || undefined","data-suffix-icon":"$_rawSuffixIcon !== undefined || undefined","data-prefix-icon-click":"$onPrefixIconClick !== undefined || undefined","data-suffix-icon-click":"$onSuffixIconClick !== undefined || undefined"}})),tt=W("prefix",null),vc=W("input",()=>({$el:"select",bind:"$attrs",attrs:{id:"$id","data-placeholder":"$fns.showPlaceholder($_value, $placeholder)",disabled:"$disabled",class:"$classes.input",name:"$node.name",onChange:"$handlers.onChange",onInput:"$handlers.selectInput",onBlur:"$handlers.blur","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"}})),Q2=W("submit",()=>({$cmp:"FormKit",bind:"$submitAttrs",props:{type:"submit",label:"$submitLabel"}})),ut=W("suffix",null),Es=W("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"}})),xc=W("input",()=>({$el:"textarea",bind:"$attrs",attrs:{disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy","aria-required":"$state.required || undefined"},children:"$initialValue"})),uu=W("wrapper","div"),e3=0;function kc(e){(e.type==="group"||e.type==="list")&&e.plugins.add(t3)}function t3(e){e.props.type==="radio"&&(e.addProps(["altName"]),e.props.altName=`${e.name}_${e3++}`)}function Cc(e){return function(t,u){return t.prop==="options"&&Array.isArray(t.value)&&(t.value=t.value.map(r=>{var n;return(n=r.attrs)!=null&&n.id?r:Jt(r,{attrs:{id:`${e.props.id}-option-${ms(String(r.value))}`}})}),e.props.type==="checkbox"&&!Array.isArray(e.value)&&(e.isCreated?e.input([],!1):e.on("created",()=>{Array.isArray(e.value)||e.input([],!1)}))),u(t)}}function u3(e,t){const u=t.target;if(u instanceof HTMLInputElement){const r=Array.isArray(e.props.options)?du(e.props.options,u.value):u.value;Array.isArray(e.props.options)&&e.props.options.length?Array.isArray(e._value)?e._value.some(n=>qu(r,n))?e.input(e._value.filter(n=>!qu(r,n))):e.input([...e._value,r]):e.input([r]):u.checked?e.input(e.props.onValue):e.input(e.props.offValue)}}function r3(e,t){var u,r;return(u=e.context)==null||u.value,(r=e.context)==null||r._value,Array.isArray(e._value)?e._value.some(n=>qu(du(e.props.options,t),n)):!1}function n3(e){e.on("created",()=>{var t,u;(t=e.context)!=null&&t.handlers&&(e.context.handlers.toggleChecked=u3.bind(null,e)),(u=e.context)!=null&&u.fns&&(e.context.fns.isChecked=r3.bind(null,e)),Z(e.props,"onValue")||(e.props.onValue=!0),Z(e.props,"offValue")||(e.props.offValue=!1)}),e.hook.prop(Cc(e))}function au(e,t){return u=>{u.props[`${e}Icon`]===void 0&&(u.props[`${e}Icon`]=t.startsWith("<svg")?t:`default:${t}`)}}function As(e){e.on("created",()=>{"disabled"in e.props&&(e.props.disabled=lt(e.props.disabled),e.config.disabled=lt(e.props.disabled))}),e.hook.prop(({prop:t,value:u},r)=>(u=t==="disabled"?lt(u):u,r({prop:t,value:u}))),e.on("prop:disabled",({payload:t})=>{e.config.disabled=lt(t)})}function Kr(e,t){return u=>{u.store.set(Ke({key:e,type:"ui",value:t||e,meta:{localize:!0,i18nArgs:[u]}}))}}var si=typeof window<"u";function Ec(e){e.target instanceof HTMLElement&&e.target.hasAttribute("data-file-hover")&&e.target.removeAttribute("data-file-hover")}function Jo(e,t){t.target instanceof HTMLInputElement?e==="dragover"&&t.target.setAttribute("data-file-hover","true"):t.preventDefault(),e==="drop"&&Ec(t)}function i3(e){Kr("noFiles","Select file")(e),Kr("removeAll","Remove all")(e),Kr("remove")(e),e.addProps(["_hasMultipleFiles"]),si&&(window._FormKit_File_Drop||(window.addEventListener("dragover",Jo.bind(null,"dragover")),window.addEventListener("drop",Jo.bind(null,"drop")),window.addEventListener("dragleave",Ec),window._FormKit_File_Drop=!0)),e.hook.input((t,u)=>u(Array.isArray(t)?t:[])),e.on("input",({payload:t})=>{e.props._hasMultipleFiles=Array.isArray(t)&&t.length>1?!0:void 0}),e.on("reset",()=>{if(e.props.id&&si){const t=document.getElementById(e.props.id);t&&(t.value="")}}),e.on("created",()=>{Array.isArray(e.value)||e.input([],!1),e.context&&(e.context.handlers.resetFiles=t=>{if(t.preventDefault(),e.input([]),e.props.id&&si){const u=document.getElementById(e.props.id);u&&(u.value=""),u==null||u.focus()}},e.context.handlers.files=t=>{var r,n;const u=[];if(t.target instanceof HTMLInputElement&&t.target.files){for(let i=0;i<t.target.files.length;i++){let s;(s=t.target.files.item(i))&&u.push({name:s.name,file:s})}e.input(u)}e.context&&(e.context.files=u),typeof((r=e.props.attrs)==null?void 0:r.onChange)=="function"&&((n=e.props.attrs)==null||n.onChange(t))})})}var Yo=Ke({key:"loading",value:!0,visible:!1});async function s3(e,t){const u=Math.random();if(e.props._submitNonce=u,t.preventDefault(),await e.settled,e.ledger.value("validating")&&(e.store.set(Yo),await e.ledger.settled("validating"),e.store.remove("loading"),e.props._submitNonce!==u))return;const r=n=>n.store.set(Ke({key:"submitted",value:!0,visible:!1}));if(e.walk(r),r(e),e.emit("submit-raw"),typeof e.props.onSubmitRaw=="function"&&e.props.onSubmitRaw(t,e),e.ledger.value("blocking"))typeof e.props.onSubmitInvalid=="function"&&e.props.onSubmitInvalid(e),e.props.incompleteMessage!==!1&&Ac(e);else if(typeof e.props.onSubmit=="function"){const n=e.props.onSubmit(e.hook.submit.dispatch(Lu(e.value)),e);if(n instanceof Promise){const i=e.props.disabled===void 0&&e.props.submitBehavior!=="live";i&&(e.props.disabled=!0),e.store.set(Yo),await n,i&&(e.props.disabled=!1),e.store.remove("loading")}}else t.target instanceof HTMLFormElement&&t.target.submit()}function Ac(e){e.store.set(Ke({blocking:!1,key:"incomplete",meta:{localize:e.props.incompleteMessage===void 0,i18nArgs:[{node:e}],showAsMessage:!0},type:"ui",value:e.props.incompleteMessage||"Form incomplete."}))}function o3(e){var t;e.props.isForm=!0,e.ledger.count("validating",u=>u.key==="validating"),(t=e.props).submitAttrs??(t.submitAttrs={disabled:e.props.disabled}),e.on("prop:disabled",({payload:u})=>{e.props.submitAttrs={...e.props.submitAttrs,disabled:u}}),e.on("created",()=>{var u;(u=e.context)!=null&&u.handlers&&(e.context.handlers.submit=s3.bind(null,e)),Z(e.props,"actions")||(e.props.actions=!0)}),e.on("prop:incompleteMessage",()=>{e.store.incomplete&&Ac(e)}),e.on("settled:blocking",()=>e.store.remove("incomplete"))}function l3(e){e.props.ignore===void 0&&(e.props.ignore=!0,e.parent=null)}function $c(e){e.on("created",()=>{e.context&&(e.context.initialValue=e.value||"")})}function $s(e){if(typeof e.props.number>"u")return;const t=["number","range","hidden"].includes(e.props.type);e.hook.input((u,r)=>{if(u==="")return r(void 0);const n=e.props.number==="integer"?parseInt(u):parseFloat(u);return Number.isFinite(n)?r(n):r(t?void 0:u)})}function a3(e,t){t.target instanceof HTMLInputElement&&e.input(du(e.props.options,t.target.value))}function c3(e,t){var u,r;return(u=e.context)==null||u.value,(r=e.context)==null||r._value,qu(du(e.props.options,t),e._value)}function f3(e){e.on("created",()=>{var t,u;Array.isArray(e.props.options)||mu(350,{node:e,inputType:"radio"}),(t=e.context)!=null&&t.handlers&&(e.context.handlers.toggleChecked=a3.bind(null,e)),(u=e.context)!=null&&u.fns&&(e.context.fns.isChecked=c3.bind(null,e))}),e.hook.prop(Cc(e))}function d3(e,t){if(Nn(t))return!1;e.context&&e.context.value;const u="__original"in t?t.__original:t.value;return Array.isArray(e._value)?e._value.some(r=>qu(r,u)):(e._value===void 0||e._value===null&&!wc(e.props.options,null))&&t.attrs&&t.attrs["data-is-placeholder"]?!0:qu(u,e._value)}function wc(e,t){return e.some(u=>Nn(u)?wc(u.options,t):("__original"in u?u.__original:u.value)===t)}async function p3(e,t){var u;typeof((u=e.props.attrs)==null?void 0:u.onChange)=="function"&&(await new Promise(r=>setTimeout(r,0)),await e.settled,e.props.attrs.onChange(t))}function h3(e,t){const u=t.target,r=u.hasAttribute("multiple")?Array.from(u.selectedOptions).map(n=>du(e.props.options,n.value)):du(e.props.options,u.value);e.input(r)}function Xo(e,t){return e.some(u=>u.attrs&&u.attrs["data-is-placeholder"])?e:[{label:t,value:"",attrs:{hidden:!0,disabled:!0,"data-is-placeholder":"true"}},...e]}function Dc(e){const t=e.length>0?e[0]:void 0;if(t)return Nn(t)?Dc(t.options):"__original"in t?t.__original:t.value}function Fc(e){e.on("created",()=>{var u,r,n;const t=lt((u=e.props.attrs)==null?void 0:u.multiple);!t&&e.props.placeholder&&Array.isArray(e.props.options)&&(e.hook.prop(({prop:i,value:s},o)=>(i==="options"&&(s=Xo(s,e.props.placeholder)),o({prop:i,value:s}))),e.props.options=Xo(e.props.options,e.props.placeholder)),t?e.value===void 0&&e.input([],!1):e.context&&!e.context.options&&(e.props.attrs=Object.assign({},e.props.attrs,{value:e._value}),e.on("input",({payload:i})=>{e.props.attrs=Object.assign({},e.props.attrs,{value:i})})),(r=e.context)!=null&&r.handlers&&(e.context.handlers.selectInput=h3.bind(null,e),e.context.handlers.onChange=p3.bind(null,e)),(n=e.context)!=null&&n.fns&&(e.context.fns.isSelected=d3.bind(null,e),e.context.fns.showPlaceholder=(i,s)=>{if(!Array.isArray(e.props.options))return!1;const o=e.props.options.some(l=>{if(l.attrs&&"data-is-placeholder"in l.attrs)return!1;const a="__original"in l?l.__original:l.value;return Oe(i,a)});return s&&!o?!0:void 0})}),e.hook.input((t,u)=>{var r,n,i;return!e.props.placeholder&&t===void 0&&Array.isArray((r=e.props)==null?void 0:r.options)&&e.props.options.length&&!lt((i=(n=e.props)==null?void 0:n.attrs)==null?void 0:i.multiple)&&(t=Dc(e.props.options)),u(t)})}function Ri(e){return!!(ku(e)&&e.if&&e.if.startsWith("$slots.")&&typeof e.then=="string"&&e.then.startsWith("$slots.")&&"else"in e)}function Ye(e,t,u){const r=n=>{const i=t(n);if(u||an(i)&&"if"in i||Ri(i)){const s={if:e,then:i};return u&&(s.else=u(n)),s}else Ri(i)?Object.assign(i.else,{if:e}):an(i)&&Object.assign(i,{if:e});return i};return r._s=Zu(),r}function Iu(e,t){const u=r=>{const n=e({});return Ri(n)?(Array.isArray(n.else)||(n.else=tr(tr(n.else,t),e._s?r[e._s]:{})),n):tr(tr(n,t),e._s?r[e._s]:{})};return u._s=e._s,u}var Qo={schema:Ft(pt(dt("$message.value")),uu(H2(pe("prefix"),tt(),K2("$label || $ui.submit.value"),ut(),pe("suffix"))),et("$help")),type:"input",family:"button",props:[],features:[Kr("submit"),l3],schemaMemoKey:"h6st4epl3j8"},m3={schema:Ft(Ye("$options == undefined",pn(fn(tt(),cn(),hn(pe("decorator")),ut()),Iu(dn("$label"),{if:"$label"})),gc(_c("$label"),et("$help"),bc(mc(pn(fn(tt(),Iu(cn(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),hn(pe("decorator")),ut()),Iu(dn("$option.label"),{if:"$option.label"})),hc("$option.help"))))),Ye("$options == undefined && $help",et("$help")),pt(dt("$message.value"))),type:"input",family:"box",props:["options","onValue","offValue","optionsLoader"],features:[qn,n3,au("decorator","checkboxDecorator")],schemaMemoKey:"qje02tb3gu8"},b3={schema:Ft(uu(gu("$label"),bu(pe("prefix","label"),tt(),W2(),G2(Z2(pe("fileItem"),J2("$file.name"),Ye("$value.length === 1",Go(pe("fileRemove"),'$ui.remove.value + " " + $file.name')))),Ye("$value.length > 1",Go("$ui.removeAll.value")),X2(pe("noFiles"),"$ui.noFiles.value"),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",family:"text",props:[],features:[i3,au("fileItem","fileItem"),au("fileRemove","fileRemove"),au("noFiles","noFiles")],schemaMemoKey:"9kqc4852fv8"},g3={schema:Y2("$slots.default",pt(dt("$message.value")),U2(Q2())),type:"group",props:["actions","submit","submitLabel","submitAttrs","submitBehavior","incompleteMessage"],features:[o3,As],schemaMemoKey:"5bg016redjo"},_3={schema:Cs("$slots.default"),type:"group",props:[],features:[As,kc]},y3={schema:Es(),type:"input",props:[],features:[$s]},v3={schema:Cs("$slots.default"),type:"list",props:["sync","dynamic"],features:[As,kc]},x3={schema:Cs(),type:"input",props:[],features:[]},k3={schema:Ft(Ye("$options == undefined",pn(fn(tt(),cn(),hn(pe("decorator")),ut()),Iu(dn("$label"),{if:"$label"})),gc(_c("$label"),et("$help"),bc(mc(pn(fn(tt(),Iu(cn(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),hn(pe("decorator")),ut()),Iu(dn("$option.label"),{if:"$option.label"})),hc("$option.help"))))),Ye("$options == undefined && $help",et("$help")),pt(dt("$message.value"))),type:"input",family:"box",props:["options","onValue","offValue","optionsLoader"],features:[qn,f3,au("decorator","radioDecorator")],schemaMemoKey:"qje02tb3gu8"},C3={schema:Ft(uu(gu("$label"),bu(pe("prefix"),tt(),vc(Ye("$slots.default",()=>"$slots.default",bn(Ye("$option.group",yc(bn(mn("$option.label"))),mn("$option.label"))))),Ye("$attrs.multiple !== undefined",()=>"",pe("select")),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:["options","placeholder","optionsLoader"],features:[qn,Fc,au("select","select")],schemaMemoKey:"cb119h43krg"},E3={schema:Ft(uu(gu("$label"),bu(pe("prefix","label"),tt(),xc(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:[],features:[$c],schemaMemoKey:"b1n0td79m9g"},Pe={schema:Ft(uu(gu("$label"),bu(pe("prefix","label"),tt(),Es(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",family:"text",props:[],features:[$s],schemaMemoKey:"c3cc4kflsg"},A3={button:Qo,submit:Qo,checkbox:m3,file:b3,form:g3,group:_3,hidden:y3,list:v3,meta:x3,radio:k3,select:C3,textarea:E3,text:Pe,color:Pe,date:Pe,datetimeLocal:Pe,email:Pe,month:Pe,number:Pe,password:Pe,search:Pe,tel:Pe,time:Pe,url:Pe,week:Pe,range:Pe};function $3(e){const t={};return Object.keys(e).forEach(u=>{Object.keys(e[u]).forEach(r=>{t[r]?t[r][u]=e[u][r]:t[r]={[u]:e[u][r]}})}),Object.keys(t).forEach(u=>{const r=t[u];t[u]=function(n,i){return w3(n,i,r)}}),t}function w3(e,t,u){const r=e.props.type,n=e.props.family;let i="";u.global&&(i+=u.global+" "),u[`family:${n}`]&&(i+=u[`family:${n}`]+" "),u[r]&&(i+=u[r]);const s=i.split("$reset");return s.length>1?`$reset ${s[s.length-1].trim()}`:s[0].trim()}var at=void 0,gt=null,gn,Sc=!1,ur=!1,D3=new Promise(e=>{gn=()=>{Sc=!0,e()}}),Pt=typeof window<"u"&&typeof fetch<"u";at=Pt?getComputedStyle(document.documentElement):void 0;var Cu={},oi={};function F3(e,t,u,r){t&&Object.assign(Cu,t),Pt&&!ur&&(at!=null&&at.getPropertyValue("--formkit-theme"))?(gn(),ur=!0):e&&!ur&&Pt?S3(e):!ur&&Pt&&gn();const n=function(s){var o,l;s.addProps(["iconLoader","iconLoaderUrl"]),s.props.iconHandler=ar((o=s.props)!=null&&o.iconLoader?s.props.iconLoader:r,(l=s.props)!=null&&l.iconLoaderUrl?s.props.iconLoaderUrl:u),M3(s,s.props.iconHandler),s.on("created",()=>{var a,c;(a=s==null?void 0:s.context)!=null&&a.handlers&&(s.context.handlers.iconClick=f=>{const g=`on${f.charAt(0).toUpperCase()}${f.slice(1)}IconClick`,p=s.props[g];if(p&&typeof p=="function")return d=>p(s,d)}),(c=s==null?void 0:s.context)!=null&&c.fns&&(s.context.fns.iconRole=f=>{const g=`on${f.charAt(0).toUpperCase()}${f.slice(1)}IconClick`;return typeof s.props[g]=="function"?"button":null})})};return n.iconHandler=ar(r,u),n}function S3(e){if(!(!e||!Pt||typeof getComputedStyle!="function")&&(ur=!0,gt=document.getElementById("formkit-theme"),e&&Pt&&(!(at!=null&&at.getPropertyValue("--formkit-theme"))&&!gt||gt!=null&>.getAttribute("data-theme")&&(gt==null?void 0:gt.getAttribute("data-theme"))!==e))){const u=`https://cdn.jsdelivr.net/npm/@formkit/themes@${ln.startsWith("__")?"latest":ln}/dist/${e}/theme.css`,r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.id="formkit-theme",r.setAttribute("data-theme",e),r.onload=()=>{at=getComputedStyle(document.documentElement),gn()},document.head.appendChild(r),r.href=u,gt&>.remove()}}function ar(e,t){return u=>{if(typeof u!="string")return;if(u.startsWith("<svg"))return u;const r=u.startsWith("default:");u=r?u.split(":")[1]:u;const n=u in Cu;let i;if(n)return Cu[u];if(!oi[u]){if(i=I3(u),i=Pt&&typeof i>"u"?Promise.resolve(i):i,i instanceof Promise)oi[u]=i.then(s=>!s&&typeof u=="string"&&!r?i=typeof e=="function"?e(u):T3(u,t):s).then(s=>(typeof u=="string"&&(Cu[r?`default:${u}`:u]=s),s));else if(typeof i=="string")return Cu[r?`default:${u}`:u]=i,i}return oi[u]}}function I3(e){if(Pt)return Sc?el(e):D3.then(()=>el(e))}function el(e){const t=at==null?void 0:at.getPropertyValue(`--fk-icon-${e}`);if(t){const u=atob(t);if(u.startsWith("<svg"))return Cu[e]=u,u}}function T3(e,t){const u=ln.startsWith("__")?"latest":ln,r=typeof t=="function"?t(e):`https://cdn.jsdelivr.net/npm/@formkit/icons@${u}/dist/icons/${e}.svg`;if(Pt)return fetch(`${r}`).then(async n=>{const i=await n.text();if(i.startsWith("<svg"))return i}).catch(n=>{console.error(n)})}function M3(e,t){const u=/^[a-zA-Z-]+(?:-icon|Icon)$/;Object.keys(e.props).filter(n=>u.test(n)).forEach(n=>O3(e,t,n))}function O3(e,t,u){const r=e.props[u],n=t(r),i=`_raw${u.charAt(0).toUpperCase()}${u.slice(1)}`,s=`on${u.charAt(0).toUpperCase()}${u.slice(1)}Click`;if(e.addProps([i,s]),e.on(`prop:${u}`,P3),n instanceof Promise)return n.then(o=>{e.props[i]=o});e.props[i]=n}function P3(e){var s;const t=e.origin,u=e.payload,r=(s=t==null?void 0:t.props)==null?void 0:s.iconHandler,n=e.name.split(":")[1],i=`_raw${n.charAt(0).toUpperCase()}${n.slice(1)}`;if(r&&typeof r=="function"){const o=r(u);if(o instanceof Promise)return o.then(l=>{t.props[i]=l});t.props[i]=o}}var tl={100:({data:e})=>`Only groups, lists, and forms can have children (${e.name}).`,101:({data:e})=>`You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,102:({data:[e,t]})=>`You cannot directly assign node.${t} (${e.name})`,103:({data:[e]})=>`Schema expressions cannot start with an operator (${e})`,104:({data:[e,t]})=>`Schema expressions cannot end with an operator (${e} in "${t}")`,105:({data:e})=>`Invalid schema expression: ${e}`,106:({data:e})=>`Cannot submit because (${e}) is not in a form.`,107:({data:[e,t]})=>`Cannot set ${e.name} to non object value: ${t}`,108:({data:[e,t]})=>`Cannot set ${e.name} to non array value: ${t}`,300:({data:[e]})=>`Cannot set behavior prop to overscroll (on ${e.name} input) when options prop is a function.`,600:({data:e})=>`Unknown input type${typeof e.props.type=="string"?' "'+e.props.type+'"':""} ("${e.name}")`,601:({data:e})=>`Input definition${typeof e.props.type=="string"?' "'+e.props.type+'"':""} is missing a schema or component property (${e.name}).`},ul={150:({data:e})=>`Schema function "${e}()" is not a valid function.`,151:({data:e})=>`No form element with id: ${e}`,152:({data:e})=>`No input element with id: ${e}`,350:({data:{node:e,inputType:t}})=>`Invalid options prop for ${e.name} input (${t}). See https://formkit.com/inputs/${t}`,650:'Schema "$get()" must use the id of an input to access.',651:({data:e})=>`Cannot setErrors() on "${e}" because no such id exists.`,652:({data:e})=>`Cannot clearErrors() on "${e}" because no such id exists.`,800:({data:e})=>`${e} is deprecated.`},R3=(e,t)=>{if(e.code in tl){const u=tl[e.code];e.message=typeof u=="function"?u(e):u}return t(e)},rl=!1;function V3(){rl||(gs(R3),_s(L3),rl=!0)}var L3=(e,t)=>{if(e.code in ul){const u=ul[e.code];e.message=typeof u=="function"?u(e):u}return t(e)},N3=Object.defineProperty,q3=Object.getOwnPropertyNames,Ic=(e,t)=>function(){return e&&(t=(0,e[q3(e)[0]])(e=0)),t},B3=(e,t)=>{for(var u in t)N3(e,u,{get:t[u],enumerable:!0})},nl,Tc,Mc=Ic({"packages/vue/src/bindings.ts"(){nl=function(t){t.ledger.count("blocking",E=>E.blocking);const u=se(!t.ledger.value("blocking"));t.ledger.count("errors",E=>E.type==="error");const r=se(!!t.ledger.value("errors"));let n=!1;Rl(()=>{n=!0});const i=xt(t.store.reduce((E,N)=>(N.visible&&(E[N.key]=N),E),{})),s=se(t.props.validationVisibility||(t.props.type==="checkbox"?"dirty":"blur"));t.on("prop:validationVisibility",({payload:E})=>{s.value=E});const o=se(s.value==="live"),l=se(!1),a=E=>{l.value=(E??[]).some(N=>N.name==="required")};a(t.props.parsedRules),t.on("prop:parsedRules",({payload:E})=>a(E));const c=se(t.children.map(E=>E.uid)),f=qt(()=>{if(!C.state)return!1;if(C.state.submitted)return!0;if(!o.value&&!C.state.settled)return!1;switch(s.value){case"live":return!0;case"blur":return C.state.blurred;case"dirty":return C.state.dirty;default:return!1}}),g=qt(()=>C.state.failing&&f.value),p=qt(()=>C&&d.value?u.value&&!r.value:C.state.dirty&&!Je(C.value)),d=se(Array.isArray(t.props.parsedRules)&&t.props.parsedRules.length>0);t.on("prop:parsedRules",({payload:E})=>{d.value=Array.isArray(E)&&E.length>0});const m=qt(()=>{const E={};for(const N in i){const z=i[N];(z.type!=="validation"||f.value)&&(E[N]=z)}return E}),y=xt(t.store.reduce((E,N)=>(N.type==="ui"&&N.visible&&(E[N.key]=N),E),{})),v=qt(()=>!C.state.failing),k=xt({}),A=new Proxy(k,{get(...E){const[N,z]=E;let ee=Reflect.get(...E);return!ee&&typeof z=="string"&&!Z(N,z)&&!z.startsWith("__v")&&Ln(t).watch(j=>{const re=typeof j.config.rootClasses=="function"?j.config.rootClasses(z,j):{},xe=j.config.classes?Hr(z,j,j.config.classes[z]):{},rt=Hr(z,j,j.props[`_${z}Class`]),Ie=Hr(z,j,j.props[`${z}Class`]);ee=cb(j,z,re,xe,rt,Ie),N[z]=ee??""}),ee}});t.on("prop:rootClasses",()=>{const E=Object.keys(k);for(const N of E)delete k[N]});const x=qt(()=>{const E=[];C.help&&E.push(`help-${t.props.id}`);for(const N in m.value)E.push(`${t.props.id}-${N}`);return E.length?E.join(" "):void 0}),w=se(t.value),b=se(t.value),C=xt({_value:b,attrs:t.props.attrs,disabled:t.props.disabled,describedBy:x,fns:{length:E=>Object.keys(E).length,number:E=>Number(E),string:E=>String(E),json:E=>JSON.stringify(E),eq:Oe},handlers:{blur:E=>{t&&(t.store.set(Ke({key:"blurred",visible:!1,value:!0})),typeof t.props.attrs.onBlur=="function"&&t.props.attrs.onBlur(E))},touch:()=>{var z;const E=C.dirtyBehavior==="compare";if((z=t.store.dirty)!=null&&z.value&&!E)return;const N=!Oe(t.props._init,t._value);!N&&!E||t.store.set(Ke({key:"dirty",visible:!1,value:N}))},DOMInput:E=>{t.input(E.target.value),t.emit("dom-input-event",E)}},help:t.props.help,id:t.props.id,items:c,label:t.props.label,messages:m,didMount:!1,node:An(t),options:t.props.options,defaultMessagePlacement:!0,slots:t.props.__slots,state:{blurred:!1,complete:p,dirty:!1,empty:Je(w),submitted:!1,settled:t.isSettled,valid:u,invalid:g,errors:r,rules:d,validationVisible:f,required:l,failing:!1,passing:v},type:t.props.type,family:t.props.family,ui:y,value:w,classes:A});t.on("created",()=>{Oe(C.value,t.value)||(b.value=t.value,w.value=t.value,Pr(w),Pr(b)),(async()=>(await t.settled,t&&(t.props._init=ot(t.value))))()}),t.on("mounted",()=>{C.didMount=!0}),t.on("settled",({payload:E})=>{C.state.settled=E});function L(E){(Array.isArray(E)?E:Object.keys(E)).forEach(z=>{z=Su(z),Z(C,z)||(C[z]=t.props[z]),t.on(`prop:${z}`,({payload:ee})=>{C[z]=ee})})}L((()=>{const E=["__root","help","label","disabled","options","type","attrs","preserve","preserveErrors","id","dirtyBehavior"],N=/^[a-zA-Z-]+(?:-icon|Icon)$/,z=Object.keys(t.props).filter(ee=>N.test(ee));return E.concat(z)})());function Y(E){E.props&&L(E.props)}t.props.definition&&Y(t.props.definition),t.on("added-props",({payload:E})=>L(E)),t.on("input",({payload:E})=>{t.type!=="input"&&!ye(E)&&!lu(E)?b.value=$i(E):(b.value=E,Pr(b))}),t.on("commitRaw",({payload:E})=>{t.type!=="input"&&!ye(E)&&!lu(E)?w.value=b.value=$i(E):(w.value=b.value=E,Pr(w)),t.emit("modelUpdated")}),t.on("commit",({payload:E})=>{var N;if((!C.state.dirty||C.dirtyBehavior==="compare")&&t.isCreated&&n)if(!((N=t.store.validating)!=null&&N.value))C.handlers.touch();else{const z=t.on("message-removed",({payload:ee})=>{ee.key==="validating"&&(C.handlers.touch(),t.off(z))})}p&&t.type==="input"&&r.value&&!lt(t.props.preserveErrors)&&t.store.filter(z=>{var ee;return!(z.type==="error"&&((ee=z.meta)==null?void 0:ee.autoClear)===!0)}),t.type==="list"&&t.sync&&(c.value=t.children.map(z=>z.uid)),C.state.empty=Je(E)});const J=async E=>{E.type==="ui"&&E.visible&&!E.meta.showAsMessage?y[E.key]=E:E.visible?i[E.key]=E:E.type==="state"&&(C.state[E.key]=!!E.value)};t.on("message-added",E=>J(E.payload)),t.on("message-updated",E=>J(E.payload)),t.on("message-removed",({payload:E})=>{delete y[E.key],delete i[E.key],delete C.state[E.key]}),t.on("settled:blocking",()=>{u.value=!0}),t.on("unsettled:blocking",()=>{u.value=!1}),t.on("settled:errors",()=>{r.value=!1}),t.on("unsettled:errors",()=>{r.value=!0}),ge(f,E=>{E&&(o.value=!0)}),t.context=C,t.emit("context",t,!1),t.on("destroyed",()=>{t.context=void 0,t=null})},Tc=nl}}),z3={};B3(z3,{defaultConfig:()=>ws});var ws,j3=Ic({"packages/vue/src/defaultConfig.ts"(){Mc(),ws=(e={})=>{V3();const{rules:t={},locales:u={},inputs:r={},messages:n={},locale:i=void 0,theme:s=void 0,iconLoaderUrl:o=void 0,iconLoader:l=void 0,icons:a={},...c}=e,f=C2({...k2,...t||{}}),g=q2(Jt({en:N2,...u||{}},n)),p=B2(A3,r),d=F3(s,a,o,l);return Jt({plugins:[p,d,Tc,g,f],...i?{config:{locale:i}}:{}},c||{},!0)}}}),U3=typeof window>"u",li=new Map;function H3(e,t){var u;!U3||!e||(li.has(e)||li.set(e,new Set),(u=li.get(e))==null||u.add(t))}var Oc=typeof window>"u",cr={},Tu={},Me,Tt=new WeakMap,K3="__raw__",W3=/[a-zA-Z0-9\-][cC]lass$/;function Z3(e,t){const u=se(null);if(e==="get"){const n={};return u.value=G3.bind(null,n),u}const r=e.split(".");return St(()=>{u.value=Ds(ye(t)?t.value:t,r)}),u}function Ds(e,t){if(Array.isArray(e)){for(const n of e){const i=n!==!1&&Ds(n,t);if(i!==void 0)return i}return}let u,r=e;for(const n in t){const i=t[n];if(typeof r!="object"||r===null){u=void 0;break}const s=r[i];if(Number(n)===t.length-1&&s!==void 0){u=typeof s=="function"?s.bind(r):s;break}r=s}return u}function G3(e,t){if(typeof t!="string")return mu(650);if(t in e||(e[t]=se(void 0)),e[t].value===void 0){e[t].value=null;const u=wr(t);u&&(e[t].value=u.context),mm(t,({payload:r})=>{e[t].value=Dr(r)?r.context:r})}return e[t].value}function il(e,t,u){function r(p,d){const m=f(it(d.if),{if:!0}),y=a(p,d.then),v=d.else?a(p,d.else):null;return[m,y,v]}function n(p,d){var k,A;const m=f(it(p.if));let y=()=>d,v=()=>d;return typeof p.then=="object"?v=i(p.then,void 0):typeof p.then=="string"&&((k=p.then)!=null&&k.startsWith("$"))?v=f(it(p.then)):v=()=>p.then,Z(p,"else")&&(typeof p.else=="object"?y=i(p.else):typeof p.else=="string"&&((A=p.else)!=null&&A.startsWith("$"))?y=f(it(p.else)):y=()=>p.else),()=>m()?v():y()}function i(p,d,m={}){const y=new Set(Object.keys(p||{})),v=d?f(it(d)):()=>({}),k=[A=>{const x=v();for(const w in x)y.has(w)||(A[w]=x[w])}];if(p){if(ku(p))return n(p,m);for(let A in p){const x=p[A];let w;const b=typeof x=="string";A.startsWith(K3)?(A=A.substring(7),w=()=>x):b&&x.startsWith("$")&&x.length>1&&!(x.startsWith("$reset")&&W3.test(A))?w=f(it(x)):typeof x=="object"&&ku(x)?w=n(x,void 0):typeof x=="object"&&Vu(x)?w=i(x):w=()=>x,k.push(C=>{C[A]=w()})}}return()=>{const A=Array.isArray(p)?[]:{};return k.forEach(x=>x(A)),A}}function s(p,d){let m=null,y=()=>null,v=!1,k=null,A=null,x=null,w=!1;const b=ab(d);if(Ii(b)?(m=b.$el,y=b.$el!=="text"?i(b.attrs,b.bind):()=>null):Ti(b)?(typeof b.$cmp=="string"?Z(p,b.$cmp)?m=p[b.$cmp]:(m=b.$cmp,w=!0):m=b.$cmp,y=i(b.props,b.bind)):ku(b)&&([v,k,A]=r(p,b)),!ku(b)&&"if"in b?v=f(it(b.if)):!ku(b)&&m===null&&(v=()=>!0),"children"in b&&b.children)if(typeof b.children=="string")if(b.children.startsWith("$slots."))m=m==="text"?"slot":m,k=f(it(b.children));else if(b.children.startsWith("$")&&b.children.length>1){const C=f(it(b.children));k=()=>String(C())}else k=()=>String(b.children);else if(Array.isArray(b.children))k=a(p,b.children);else{const[C,L,G]=r(p,b.children);k=Y=>C&&C()?L&&L(Y):G&&G(Y)}if(Ti(b))if(k){const C=k;k=L=>({default(G,Y){var N,z,ee,H;const J=Me;Y&&(Me=Y),G&&((N=Tt.get(Me))==null||N.unshift(G)),L&&((z=Tt.get(Me))==null||z.unshift(L));const E=C(L);return G&&((ee=Tt.get(Me))==null||ee.shift()),L&&((H=Tt.get(Me))==null||H.shift()),Me=J,E}}),k.slot=!0}else k=()=>({});if("for"in b&&b.for){const C=b.for.length===3?b.for[2]:b.for[1];x=[typeof C=="string"&&C.startsWith("$")?f(it(C)):()=>C,b.for[0],b.for.length===3?String(b.for[1]):null]}return[v,m,y,k,A,x,w]}function o(p,d){const m=p(d),y=Me;return Object.keys(m).reduce((v,k)=>{const A=m&&m[k];return v[k]=x=>A&&A(x,y)||null,v},{})}function l(p,d){const[m,y,v,k,A,x,w]=s(p,d);let b=C=>{if(m&&y===null&&k)return m()?k(C):A&&A(C);if(y&&(!m||m())){if(y==="text"&&k)return we(String(k()));if(y==="slot"&&k)return k(C);const L=w?ve(y):y,G=k!=null&&k.slot?o(k,C):null;return en(L,v(),G||(k?k(C):[]))}return typeof A=="function"?A(C):A};if(x){const C=b,[L,G,Y]=x;b=()=>{const J=L(),E=Number.isFinite(J)?Array(Number(J)).fill(0).map((H,j)=>j):J,N=[];if(typeof E!="object")return null;const z=Tt.get(Me)||[],ee=Array.isArray(E);for(const H in E){if(ee&&H in Array.prototype)continue;const j=Object.defineProperty({...z.reduce((re,xe)=>re.__idata?{...re,...xe}:xe,{}),[G]:E[H],...Y!==null?{[Y]:ee?Number(H):H}:{}},"__idata",{enumerable:!1,value:!0});z.unshift(j),N.push(C.bind(null,j)()),z.shift()}return N}}return b}function a(p,d){if(Array.isArray(d)){const y=d.map(l.bind(null,p));return v=>y.map(k=>k(v))}const m=l(p,d);return y=>m(y)}const c=[];function f(p,d={}){const m=new WeakMap;return c.push((y,v)=>{m.set(v,p.provide(k=>y(k,d)))}),()=>m.get(Me)()}function g(p,d){u??(u=Rc(t));const[m,y]=Z(cr,u)?cr[u]:[a(e,t),c];return Oc||(Tu[u]??(Tu[u]=0),Tu[u]++,cr[u]=[m,y]),y.forEach(v=>{v(p,d)}),()=>(Me=d,m())}return g}function Pc(e,t){const u=Tt.get(Me)||[];let r;return u.length&&(r=Ds(u,e.split("."))),r===void 0?t:r}function J3(e,t){return new Proxy(e,{get(...u){let r;const n=u[1];if(typeof n=="string"){const i=Me;Me=t,r=Pc(n,void 0),Me=i}return r!==void 0?r:Reflect.get(...u)}})}function sl(e,t,u){return e((r,n={})=>r.reduce((i,s)=>{if(s.startsWith("slots.")){const o=s.substring(6),l=()=>t.slots&&Z(t.slots,o)&&typeof t.slots[o]=="function";if(n.if)i[s]=l;else if(t.slots){const a=J3(t,u);i[s]=()=>l()?t.slots[o](a):null}}else{const o=Z3(s,t);i[s]=()=>Pc(s,o.value)}return i},{}),u)}function ol(e,t,u){if(t??(t=Rc(e)),Tu[t]--,Tu[t]===0){delete Tu[t];const[,r]=cr[t];delete cr[t],r.length=0}Tt.delete(u)}function Rc(e){return JSON.stringify(e,(t,u)=>typeof u=="function"?u.toString():u)}var Vc=ts({name:"FormKitSchema",props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})},memoKey:{type:String,required:!1}},emits:["mounted"],setup(e,t){var a;const u=Xr();let r={};Tt.set(r,[]);const n={FormKit:An(Nc),...e.library};let i=il(n,e.schema,e.memoKey),s,o;Oc||ge(()=>e.schema,(c,f)=>{var p;const g=r;r={},Tt.set(r,[]),i=il(n,e.schema,e.memoKey),s=sl(i,o,r),c===f&&((p=u==null?void 0:u.proxy)==null?void 0:p.$forceUpdate).call(p),ol(e.schema,e.memoKey,g)},{deep:!0}),St(()=>{o=Object.assign(xt(e.data??{}),{slots:t.slots}),t.slots,s=sl(i,o,r)});function l(){ol(e.schema,e.memoKey,r),o.node&&o.node.destroy(),o.slots=null,o=null,s=null}return Hu(()=>t.emit("mounted")),us(l),H3((a=Xr())==null?void 0:a.appContext.app,l),()=>s?s():null}}),Y3=Vc,X3=typeof window>"u",Vi=Symbol("FormKitParent"),Q3=Symbol("FormKitComponentCallback");function eg(e,t){const u=lg(e,t);if(u.props.definition||Ue(600,u),u.props.definition.component)return()=>{var a;return en((a=u.props.definition)==null?void 0:a.component,{context:u.context},{...t.slots})};const r=se([]);let n=u.props.definition.schemaMemoKey;const i=()=>{var c,f;const a=(f=(c=u.props)==null?void 0:c.definition)==null?void 0:f.schema;a||Ue(601,u),typeof a=="function"?(r.value=a({...e.sectionsSchema||{}}),(n&&e.sectionsSchema||"memoKey"in a&&typeof a.memoKey=="string")&&(n=(n??(a==null?void 0:a.memoKey))+JSON.stringify(e.sectionsSchema))):r.value=a};i(),X3||u.on("schema",()=>{n+="♻️",i()}),t.emit("node",u);const s=u.props.definition.library,o={FormKit:An(Lc),...s,...e.library??{}};function l(){u.emit("mounted")}return t.expose({node:u}),()=>en(Vc,{schema:r.value,data:u.context,onMounted:l,library:o,memoKey:n},{...t.slots})}var Lc=ts(eg,{props:z2,inheritAttrs:!1}),Nc=Lc,tg=Symbol();function ug(e,t){return e.component(t.alias||"FormKit",Nc).component(t.schemaAlias||"FormKitSchema",Y3),{get:wr,setLocale:u=>{var r;(r=t.config)!=null&&r.rootConfig&&(t.config.rootConfig.locale=u)},clearErrors:db,setErrors:fb,submit:Ha,reset:Ka}}var Fs=Symbol.for("FormKitOptions"),rg=Symbol.for("FormKitConfig"),ng={install(e,t){const u=Object.assign({alias:"FormKit",schemaAlias:"FormKitSchema"},typeof t=="function"?t():t),r=bm(u.config||{});u.config={rootConfig:r},e.config.globalProperties.$formkit=ug(e,u),e.provide(Fs,u),e.provide(rg,r),typeof window<"u"&&(globalThis.__FORMKIT_CONFIGS__=(globalThis.__FORMKIT_CONFIGS__||[]).concat([r]))}},ig=typeof window<"u",ai=["ignore","disabled","preserve","help","label",/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility|-behavior|Behavior)$/,/^[a-zA-Z-]+(?:-class|Class)$/,"prefixIcon","suffixIcon",/^[a-zA-Z-]+(?:-icon|Icon)$/],sg=["disabled","ignore","preserve"];function ll(e,t){t.classes&&Object.keys(t.classes).forEach(u=>{typeof u=="string"&&(e.props[`_${u}Class`]=t.classes[u],lr(t.classes[u])&&u==="inner"&&Object.values(t.classes[u]))})}function og(e){return e?["Submit","SubmitRaw","SubmitInvalid"].reduce((u,r)=>{const n=`on${r}`;return n in e&&typeof e[n]=="function"&&(u[n]=e[n]),u},{}):{}}function lg(e,t,u={}){const r=Object.assign({},kt(Fs)||{},u),n=kt(tg,se(ig?document:void 0)),i=kt(Q3,()=>{}),s=Xr(),o=og(s==null?void 0:s.vnode.props),l=["modelValue","model-value"].some(b=>b in((s==null?void 0:s.vnode.props)??{}));let a=!1;Hu(()=>{a=!0});const c=e.modelValue!==void 0?e.modelValue:ot(t.attrs.value);function f(){const b={...xu(e),...o,type:e.type??"text",__root:n.value,__slots:t.slots},C=Lo(xu(t.attrs),ai);C.key||(C.key=Zu()),b.attrs=C;const L=No(xu(t.attrs),ai);for(const Y in L)sg.includes(Y)&&L[Y]===""&&(L[Y]=!0),b[Su(Y)]=L[Y];const G={props:{}};return ll(G,e),Object.assign(b,G.props),typeof b.type!="string"&&(b.definition=b.type,delete b.type),b}const g=f(),p=g.ignore?null:e.parent||kt(Vi,null),d=ob(Jt(r||{},{name:e.name||void 0,value:c,parent:p,plugins:(r.plugins||[]).concat(e.plugins??[]),config:e.config||{},props:g,index:e.index,sync:!!lt(t.attrs.sync||t.attrs.dynamic)},!1,!0));i(d),d.props.definition||Ue(600,d);const m=se(new Set(Array.isArray(d.props.__propDefs)?d.props.__propDefs:Object.keys(d.props.__propDefs??{})));d.on("added-props",({payload:b})=>{(Array.isArray(b)?b:Object.keys(b??{})).forEach(L=>m.value.add(L))});const y=qt(()=>ai.concat([...m.value]).reduce((b,C)=>(typeof C=="string"?(b.push(Su(C)),b.push(qa(C))):b.push(C),b),[]));St(()=>ll(d,e));const v=xu(e);for(const b in v)ge(()=>e[b],()=>{e[b]!==void 0&&(d.props[b]=e[b])});St(()=>{d.props.__root=n.value});const k=new Set,A=xu(t.attrs);St(()=>{x(No(A,y.value))});function x(b){k.forEach(C=>{C(),k.delete(C)});for(const C in b){const L=Su(C);k.add(ge(()=>t.attrs[C],()=>{d.props[L]=t.attrs[C]}))}}if(St(()=>{const b=Lo(xu(t.attrs),y.value);"multiple"in b&&(b.multiple=lt(b.multiple)),typeof b.onBlur=="function"&&(b.onBlur=Gh(b.onBlur)),d.props.attrs=Object.assign({},d.props.attrs||{},b)}),St(()=>{const b=(e.errors??[]).map(C=>Ke({key:ms(C),type:"error",value:C,meta:{source:"prop"}}));d.store.apply(b,C=>C.type==="error"&&C.meta.source==="prop")}),d.type!=="input"){const b=`${d.name}-prop`;St(()=>{const C=e.inputErrors??{},L=Object.keys(C);L.length||d.clearErrors(!0,b);const G=L.reduce((Y,J)=>{let E=C[J];return typeof E=="string"&&(E=[E]),Array.isArray(E)&&(Y[J]=E.map(N=>Ke({key:N,type:"error",value:N,meta:{source:b}}))),Y},{});d.store.apply(G,Y=>Y.type==="error"&&Y.meta.source===b)})}St(()=>Object.assign(d.config,e.config)),d.type!=="input"&&Kl(Vi,d);let w;return d.on("modelUpdated",()=>{var b,C;t.emit("inputRaw",(b=d.context)==null?void 0:b.value,d),a&&t.emit("input",(C=d.context)==null?void 0:C.value,d),l&&d.context&&(w=ot(d.value),t.emit("update:modelValue",$i(d.value)))}),l&&(ge(N0(e,"modelValue"),b=>{Oe(w,b)||d.input(b,!1)},{deep:!0}),d.value!==c&&d.emit("modelUpdated")),jl(()=>d.destroy()),d}var ag=W("messages",()=>({$el:"ul",if:"$fns.length($messages)"})),cg=W("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}}));ag(cg("$message.value"));var fg=W("summary",()=>({$el:"div",attrs:{"aria-live":"polite"}})),dg=W("summaryInner",()=>({$el:"div",if:"$summaries.length && $showSummaries"})),pg=W("messages",()=>({$el:"ul",if:"$summaries.length && $showSummaries"})),hg=W("message",()=>({$el:"li",for:["summary","$summaries"],attrs:{key:"$summary.key","data-message-type":"$summary.type"}})),mg=W("summaryHeader",()=>({$el:"h2",attrs:{id:"$id"}})),bg=W("messageLink",()=>({$el:"a",attrs:{id:"$summary.key",href:'$: "#" + $summary.id',onClick:"$jumpLink"}}));fg(dg(mg("$summaryHeader"),pg(hg(bg("$summary.message")))));j3();Mc();var Wr=ts({name:"FormKitIcon",props:{icon:{type:String,default:""},iconLoader:{type:Function,default:null},iconLoaderUrl:{type:Function,default:null}},setup(e){var s,o;const t=se(void 0),u=kt(Fs,{}),r=kt(Vi,null);let n;function i(){if(!n||typeof n!="function")return;const l=n(e.icon);l instanceof Promise?l.then(a=>{t.value=a}):t.value=l}if(e.iconLoader&&typeof e.iconLoader=="function")n=ar(e.iconLoader);else if(r&&((s=r.props)!=null&&s.iconLoader))n=ar(r.props.iconLoader);else if(e.iconLoaderUrl&&typeof e.iconLoaderUrl=="function")n=ar(n,e.iconLoaderUrl);else{const l=(o=u==null?void 0:u.plugins)==null?void 0:o.find(a=>typeof a.iconHandler=="function");l&&(n=l.iconHandler)}return ge(()=>e.icon,()=>{i()},{immediate:!0}),()=>e.icon&&t.value?en("span",{class:"formkit-icon",innerHTML:t.value}):null}});const qc=new Set,Ne=new WeakMap,Bu=new WeakMap,pu=new WeakMap,Li=new WeakMap,gg=new WeakMap,zu=new WeakMap,_n=new WeakMap,rr=new WeakSet;let Yt,Ss=0,Is=0;const Mt="__aa_tgt",yr="__aa_del",yn="__aa_new",_g=e=>{const t=Eg(e);t&&t.forEach(u=>Ag(u))},yg=e=>{e.forEach(t=>{t.target===Yt&&xg(),Ne.has(t.target)&&_u(t.target)})};function vg(e){const t=Li.get(e);t==null||t.disconnect();let u=Ne.get(e),r=0;const n=5;u||(u=ju(e),Ne.set(e,u));const{offsetWidth:i,offsetHeight:s}=Yt,l=[u.top-n,i-(u.left+n+u.width),s-(u.top+n+u.height),u.left-n].map(c=>`${-1*Math.floor(c)}px`).join(" "),a=new IntersectionObserver(()=>{++r>1&&_u(e)},{root:Yt,threshold:1,rootMargin:l});a.observe(e),Li.set(e,a)}function _u(e){clearTimeout(_n.get(e));const t=Bn(e),u=vr(t)?500:t.duration;_n.set(e,setTimeout(async()=>{const r=pu.get(e);try{await(r==null?void 0:r.finished),Ne.set(e,ju(e)),vg(e)}catch{}},u))}function xg(){clearTimeout(_n.get(Yt)),_n.set(Yt,setTimeout(()=>{qc.forEach(e=>Uc(e,t=>Bc(()=>_u(t))))},100))}function kg(e){setTimeout(()=>{gg.set(e,setInterval(()=>Bc(_u.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function Bc(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let Ni,Eu;const Cg=typeof window<"u"&&"ResizeObserver"in window;Cg&&(Yt=document.documentElement,Ni=new MutationObserver(_g),Eu=new ResizeObserver(yg),window.addEventListener("scroll",()=>{Is=window.scrollY,Ss=window.scrollX}),Eu.observe(Yt));function Eg(e){return e.reduce((r,n)=>[...r,...Array.from(n.addedNodes),...Array.from(n.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:e.reduce((r,n)=>{if(r===!1)return!1;if(n.target instanceof Element){if(ci(n.target),!r.has(n.target)){r.add(n.target);for(let i=0;i<n.target.children.length;i++){const s=n.target.children.item(i);if(s){if(yr in s)return!1;ci(n.target,s),r.add(s)}}}if(n.removedNodes.length)for(let i=0;i<n.removedNodes.length;i++){const s=n.removedNodes[i];if(yr in s)return!1;s instanceof Element&&(r.add(s),ci(n.target,s),Bu.set(s,[n.previousSibling,n.nextSibling]))}}return r},new Set)}function ci(e,t){!t&&!(Mt in e)?Object.defineProperty(e,Mt,{value:e}):t&&!(Mt in t)&&Object.defineProperty(t,Mt,{value:e})}function Ag(e){var t;const u=e.isConnected,r=Ne.has(e);u&&Bu.has(e)&&Bu.delete(e),pu.has(e)&&((t=pu.get(e))===null||t===void 0||t.cancel()),yn in e?al(e):r&&u?wg(e):r&&!u?Dg(e):al(e)}function _t(e){return Number(e.replace(/[^0-9.\-]/g,""))}function $g(e){let t=e.parentElement;for(;t;){if(t.scrollLeft||t.scrollTop)return{x:t.scrollLeft,y:t.scrollTop};t=t.parentElement}return{x:0,y:0}}function ju(e){const t=e.getBoundingClientRect(),{x:u,y:r}=$g(e);return{top:t.top+r,left:t.left+u,width:t.width,height:t.height}}function zc(e,t,u){let r=t.width,n=t.height,i=u.width,s=u.height;const o=getComputedStyle(e);if(o.getPropertyValue("box-sizing")==="content-box"){const a=_t(o.paddingTop)+_t(o.paddingBottom)+_t(o.borderTopWidth)+_t(o.borderBottomWidth),c=_t(o.paddingLeft)+_t(o.paddingRight)+_t(o.borderRightWidth)+_t(o.borderLeftWidth);r-=c,i-=c,n-=a,s-=a}return[r,i,n,s].map(Math.round)}function Bn(e){return Mt in e&&zu.has(e[Mt])?zu.get(e[Mt]):{duration:250,easing:"ease-in-out"}}function jc(e){if(Mt in e)return e[Mt]}function Ts(e){const t=jc(e);return t?rr.has(t):!1}function Uc(e,...t){t.forEach(u=>u(e,zu.has(e)));for(let u=0;u<e.children.length;u++){const r=e.children.item(u);r&&t.forEach(n=>n(r,zu.has(r)))}}function Ms(e){return Array.isArray(e)?e:[e]}function vr(e){return typeof e=="function"}function wg(e){const t=Ne.get(e),u=ju(e);if(!Ts(e))return Ne.set(e,u);let r;if(!t)return;const n=Bn(e);if(typeof n!="function"){const i=t.left-u.left,s=t.top-u.top,[o,l,a,c]=zc(e,t,u),f={transform:`translate(${i}px, ${s}px)`},g={transform:"translate(0, 0)"};o!==l&&(f.width=`${o}px`,g.width=`${l}px`),a!==c&&(f.height=`${a}px`,g.height=`${c}px`),r=e.animate([f,g],{duration:n.duration,easing:n.easing})}else{const[i]=Ms(n(e,"remain",t,u));r=new Animation(i),r.play()}pu.set(e,r),Ne.set(e,u),r.addEventListener("finish",_u.bind(null,e))}function al(e){yn in e&&delete e[yn];const t=ju(e);Ne.set(e,t);const u=Bn(e);if(!Ts(e))return;let r;if(typeof u!="function")r=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:u.duration*1.5,easing:"ease-in"});else{const[n]=Ms(u(e,"add",t));r=new Animation(n),r.play()}pu.set(e,r),r.addEventListener("finish",_u.bind(null,e))}function cl(e,t){var u;e.remove(),Ne.delete(e),Bu.delete(e),pu.delete(e),(u=Li.get(e))===null||u===void 0||u.disconnect(),setTimeout(()=>{if(yr in e&&delete e[yr],Object.defineProperty(e,yn,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(const r in t)e.style[r]=""},0)}function Dg(e){var t;if(!Bu.has(e)||!Ne.has(e))return;const[u,r]=Bu.get(e);Object.defineProperty(e,yr,{value:!0,configurable:!0});const n=window.scrollX,i=window.scrollY;if(r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):u&&u.parentNode?u.parentNode.appendChild(e):(t=jc(e))===null||t===void 0||t.appendChild(e),!Ts(e))return cl(e);const[s,o,l,a]=Sg(e),c=Bn(e),f=Ne.get(e);(n!==Ss||i!==Is)&&Fg(e,n,i,c);let g,p={position:"absolute",top:`${s}px`,left:`${o}px`,width:`${l}px`,height:`${a}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!vr(c))Object.assign(e.style,p),g=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:c.duration,easing:"ease-out"});else{const[d,m]=Ms(c(e,"remove",f));(m==null?void 0:m.styleReset)!==!1&&(p=(m==null?void 0:m.styleReset)||p,Object.assign(e.style,p)),g=new Animation(d),g.play()}pu.set(e,g),g.addEventListener("finish",cl.bind(null,e,p))}function Fg(e,t,u,r){const n=Ss-t,i=Is-u,s=document.documentElement.style.scrollBehavior;if(getComputedStyle(Yt).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+n,window.scrollY+i),!e.parentElement)return;const l=e.parentElement;let a=l.clientHeight,c=l.clientWidth;const f=performance.now();function g(){requestAnimationFrame(()=>{if(!vr(r)){const p=a-l.clientHeight,d=c-l.clientWidth;f+r.duration>performance.now()?(window.scrollTo({left:window.scrollX-d,top:window.scrollY-p}),a=l.clientHeight,c=l.clientWidth,g()):document.documentElement.style.scrollBehavior=s}})}g()}function Sg(e){const t=Ne.get(e),[u,,r]=zc(e,t,ju(e));let n=e.parentElement;for(;n&&(getComputedStyle(n).position==="static"||n instanceof HTMLBodyElement);)n=n.parentElement;n||(n=document.body);const i=getComputedStyle(n),s=Ne.get(n)||ju(n),o=Math.round(t.top-s.top)-_t(i.borderTopWidth),l=Math.round(t.left-s.left)-_t(i.borderLeftWidth);return[o,l,u,r]}function Ig(e,t={}){return Ni&&Eu&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!vr(t)&&!t.disrespectUserMotionPreference||(rr.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),Uc(e,_u,kg,n=>Eu==null?void 0:Eu.observe(n)),vr(t)?zu.set(e,t):zu.set(e,{duration:250,easing:"ease-in-out",...t}),Ni.observe(e,{childList:!0}),qc.add(e))),Object.freeze({parent:e,enable:()=>{rr.add(e)},disable:()=>{rr.delete(e)},isEnabled:()=>rr.has(e)})}const Hc={mounted:(e,t)=>{Ig(e,t.value||{})},getSSRProps:()=>({})},Tg=e=>(xr("data-v-d268d66c"),e=e(),kr(),e),Mg=Tg(()=>M("p",{class:"form-text"}," An ordered list of allowed values. The values should be ordered from low to high as determined by the achievement creator. ",-1)),Og={key:0,class:"ms-5 mb-3 p-3 border rounded col-md-8"},Pg={class:"controls mt-2"},Rg=["onClick"],Vg=["onClick"],Lg=["onClick"],Ng={__name:"ValueList",props:{modelValue:{default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=se([]),u=Fe(e,"modelValue");function r(n){const i=n.at("$parent");if(i.value){for(const s in i.value)if(""+s!=""+n.name&&i.value[s]===n.value)return!1}return!0}return ge(t,n=>{u.value=n}),(n,i)=>{const s=ve("FormKit");return Ge((K(),me("div",null,[D(s,{modelValue:t.value,"onUpdate:modelValue":i[1]||(i[1]=o=>t.value=o),name:"allowedValue",type:"list",dynamic:""},{default:ae(({items:o,node:l,value:a})=>[M("h5",null,[we("Allowed Values "),M("button",{type:"button",onClick:i[0]||(i[0]=c=>t.value.push(null)),class:"btn btn-sm btn-primary ms-3"}," Add Value ")]),Mg,o.length>0?(K(),me("div",Og,[(K(!0),me(Ee,null,hu(o,(c,f)=>(K(),me("div",{key:c,class:"value-item"},[D(s,{type:"innerLabelTextInput",index:f,"inner-class":"input-group","label-class":"input-group-text","validation-rules":{distinct:r},validation:"required:trim|distinct","validation-messages":{required:"A value is required.",distinct:"The values must all be different."},"outer-class":"$reset","aria-label":"Allowed value "+(f+1)},{label:ae(g=>[M("label",{class:Ze(g.classes.label)},Zt(f+1),3)]),_:2},1032,["index","validation-rules","aria-label"]),M("ul",Pg,[M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f-1,0,t.value.splice(f,1)[0]),class:"button"},[D(Ut(Wr),{icon:"arrowUp"})],8,Rg)]),M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f+1,0,t.value.splice(f,1)[0]),class:"button"},[D(Ut(Wr),{icon:"arrowDown"})],8,Vg)]),M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f,1),class:"button close"},[D(Ut(Wr),{icon:"close"})],8,Lg)])])]))),128))])):Ve("",!0)]),_:1},8,["modelValue"])])),[[Ut(Hc)]])}}},qg=Ku(Ng,[["__scopeId","data-v-d268d66c"]]),Bg=["onClick"],zg={class:"card mb-3"},jg={class:"card-header"},Ug=["onClick"],Hg={class:"card-body"},Kg={__name:"CriterionLevels",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),be(n,{type:"list",modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),name:"rubricCriterionLevel",dynamic:""},{default:ae(({items:i,node:s,value:o})=>[M("h5",null,[we("Rubric Criterion Levels "),M("button",{type:"button",onClick:()=>s.input(o.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Level ",8,Bg)]),(K(!0),me(Ee,null,hu(i,(l,a)=>(K(),be(n,{type:"group","wrapper-class":"card",key:l,index:a},{default:ae(()=>[M("div",zg,[M("h5",jg,[we("Level "+Zt(a+1)+" ",1),M("button",{type:"button",onClick:()=>s.input(o.filter((c,f)=>f!==a)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,Ug)]),M("div",Hg,[D(n,{type:"hidden",name:"type",value:["RubricCriterionLevel"]}),D(n,{type:"innerLabelTextInput",label:"ID",name:"id","inner-class":"input-group","label-class":"input-group-text",validation:"required:trim","wrapper-class":"required"}),D(n,{type:"innerLabelTextInput",label:"Name",name:"name","inner-class":"input-group","label-class":"input-group-text",validation:"required:trim","wrapper-class":"required"}),D(n,{type:"innerLabelTextareaInput",label:"Description",name:"description","inner-class":"input-group","label-class":"input-group-text"}),D(n,{type:"innerLabelTextInput",label:"Level",name:"level","inner-class":"input-group","label-class":"input-group-text"}),D(n,{type:"innerLabelTextInput",label:"Points",name:"points","inner-class":"input-group","label-class":"input-group-text"}),D(hs,{modelValue:t.value[a].alignment,"onUpdate:modelValue":c=>t.value[a].alignment=c},null,8,["modelValue","onUpdate:modelValue"])])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},Wg=M("span",{class:"input-group-text","aria-label":"ext:"},"ext:",-1),Zg={__name:"ResultType",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se(""),r=se("");return Hu(()=>{var n;if(((n=t.value)==null?void 0:n.substring(0,4))==="ext:"){u.value="other",r.value=t.value.substring(4);return}u.value=t.value?t.value:"",r.value=""}),ge(u,n=>{if(n==="other"){t.value="ext:"+r.value;return}t.value=n}),ge(r,n=>{if(u.value==="other"){t.value="ext:"+n;return}t.value=u.value}),(n,i)=>{const s=ve("FormKit");return K(),be(s,{type:"selectInputGroup",label:"Result Type",modelValue:u.value,"onUpdate:modelValue":i[1]||(i[1]=o=>u.value=o),name:"selectedType","inner-class":"input-group","label-class":"input-group-text","input-class":"$reset formkit-input form-select","wrapper-class":"required",placeholder:"Select Result Type",validation:"required",options:{GradePointAverage:"Grade Point Average",LetterGrade:"Letter Grade",Percent:"Percent",PerformanceLevel:"Performance Level",PredictedScore:"Predicted Score",RawScore:"Raw Score",Result:"Result",RubricCriterion:"Rubric Criterion",RubricCriterionLevel:"Rubric Criterion Level",RubricScore:"Rubric Score",ScaledScore:"Scaled Score",Status:"Status",other:"Other (ext:)"},help:"The type of result this description represents. This is an extensible enumerated vocabulary."},{suffix:ae(()=>[u.value==="other"?(K(),be(s,{key:0,type:"innerLabelTextInput",label:"Extended Type",modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=o=>r.value=o),name:"typeExt","aria-label":"Extended Result Type","inner-class":"input-group ms-3 me-5 pe-3","outer-class":"$reset","label-class":"visually-hidden",before:"ext:",validation:[["matches","/^[a-z|A-Z|0-9|.|-|_]+$/"],["required"]]},{prefix:ae(()=>[Wg]),_:1},8,["modelValue"])):Ve("",!0)]),_:1},8,["modelValue"])}}},Gg={class:"mb-4"},Jg=["onClick"],Yg={class:"card mb-3"},Xg={class:"card-header"},Qg=["onClick"],e_={class:"card-body"},t_={__name:"ResultDescription",props:{modelValue:{default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),be(n,{type:"list",name:"resultDescription",modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value=i),dynamic:""},{default:ae(({items:i,node:s,value:o})=>[M("h5",Gg,[we("Result Descriptions "),M("button",{type:"button",onClick:()=>s.input(o.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Result Description ",8,Jg)]),(K(!0),me(Ee,null,hu(i,(l,a)=>(K(),be(n,{type:"group","wrapper-class":"card",key:l,index:a},{default:ae(()=>[M("div",Yg,[M("h5",Xg,[we("Result Description "+Zt(a+1)+" ",1),M("button",{type:"button",onClick:()=>s.input(o.filter((c,f)=>f!==a)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,Qg)]),M("div",e_,[D(n,{type:"innerLabelTextInput",label:"ID",name:"id","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"The unique URI for this result description. Required so a result can link to this result description."}),D(n,{type:"hidden",name:"type",value:["ResultDescription"]}),D(n,{type:"innerLabelTextInput",label:"Name",name:"name","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"The name of the result."}),D(Zg,{modelValue:t.value[a].resultType,"onUpdate:modelValue":c=>t.value[a].resultType=c},null,8,["modelValue","onUpdate:modelValue"]),D(qg,{modelValue:t.value[a].allowedValue,"onUpdate:modelValue":c=>t.value[a].allowedValue=c},null,8,["modelValue","onUpdate:modelValue"]),D(n,{type:"innerLabelTextInput",label:"Minimum Value",name:"valueMin","inner-class":"input-group","label-class":"input-group-text",help:"The minimum possible `value` that may be asserted in a linked result."}),D(n,{type:"innerLabelTextInput",label:"Maximum Value",name:"valueMax","inner-class":"input-group","label-class":"input-group-text",help:"The maximum possible `value` that may be asserted in a linked result."}),D(Kg,{modelValue:t.value[a].rubricCriterionLevel,"onUpdate:modelValue":c=>t.value[a].rubricCriterionLevel=c},null,8,["modelValue","onUpdate:modelValue"]),D(n,{type:"innerLabelTextInput",label:"Required Level",name:"requiredLevel","inner-class":"input-group","label-class":"input-group-text",help:"The `id` of the rubric criterion level required to pass as determined by the achievement creator."}),D(n,{type:"innerLabelTextInput",label:"Required Value",name:"requiredValue","inner-class":"input-group","label-class":"input-group-text",help:"A value from `allowedValue` or within the range of `valueMin` to `valueMax` required to pass as determined by the achievement creator."}),D(hs,{modelValue:t.value[a].alignment,"onUpdate:modelValue":c=>t.value[a].alignment=c},null,8,["modelValue","onUpdate:modelValue"])])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},u_={class:"tab-pane fade show active",id:"tab-alignments",role:"tabpanel","aria-labelledby":"alignments-tab"},r_={__name:"AlignmentsTab",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>(K(),me("div",u_,[D(t_,{modelValue:t.value.resultDescription,"onUpdate:modelValue":r[0]||(r[0]=n=>t.value.resultDescription=n)},null,8,["modelValue"]),D(Nh,{modelValue:t.value.alignment,"onUpdate:modelValue":r[1]||(r[1]=n=>t.value.alignment=n)},null,8,["modelValue"])]))}},n_=e=>(xr("data-v-cd88b606"),e=e(),kr(),e),i_=n_(()=>M("p",{class:"form-text"},"One or more short, human-friendly, searchable, keywords that describe the type of achievement.",-1)),s_={key:0,class:"ms-5 mb-3 p-3 border rounded"},o_={class:"controls mt-2"},l_=["onClick"],a_={__name:"TagList",props:{modelValue:{default:[]},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=se([]),u=Fe(e,"modelValue");Uu(()=>{t.value=u.value});function r(n){const i=n.at("$parent");if(i.value){for(const s in i.value)if(""+s!=""+n.name&&i.value[s]===n.value)return!1}return!0}return ge(t,n=>{u.value=n}),(n,i)=>{const s=ve("FormKit");return Ge((K(),me("div",null,[D(s,{modelValue:t.value,"onUpdate:modelValue":i[1]||(i[1]=o=>t.value=o),name:"tag",type:"list",dynamic:""},{default:ae(({items:o,node:l,value:a})=>[M("h5",null,[we("Tags "),M("button",{type:"button",onClick:i[0]||(i[0]=c=>t.value.push(null)),class:"btn btn-sm btn-primary ms-3"}," Add Tag ")]),i_,o.length>0?(K(),me("div",s_,[(K(!0),me(Ee,null,hu(o,(c,f)=>(K(),me("div",{key:c,class:"value-item"},[D(s,{type:"text",index:f,"validation-rules":{distinct:r},validation:"required:trim|distinct",placeholder:"Enter tag","validation-messages":{required:"Value is required",distinct:"The tags must be distinct"},"outer-class":"$reset"},null,8,["index","validation-rules"]),M("ul",o_,[M("li",null,[M("button",{type:"button",onClick:g=>t.value.splice(f,1),class:"button close"},[D(Ut(Wr),{icon:"close"})],8,l_)])])]))),128))])):Ve("",!0)]),_:1},8,["modelValue"])])),[[Ut(Hc)]])}}},c_=Ku(a_,[["__scopeId","data-v-cd88b606"]]),f_=["onClick"],d_=M("p",{class:"form-text"},"A list of credentials related to this one.",-1),p_={class:"card mb-3"},h_={class:"card-header"},m_=["onClick"],b_={class:"card-body pb-0"},g_={__name:"RelatedList",emits:["change"],setup(e,{emit:t}){const u=t,r=se([]);return ge(r,n=>{u("change",n)}),(n,i)=>{const s=ve("FormKit");return K(),be(s,{type:"list",modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=o=>r.value=o),name:"alignment",dynamic:""},{default:ae(({items:o,node:l,value:a})=>[M("h5",null,[we("Related Credentials "),M("button",{type:"button",onClick:()=>l.input(a.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Related Credential ",8,f_)]),d_,(K(!0),me(Ee,null,hu(o,(c,f)=>(K(),be(s,{type:"group","wrapper-class":"card",key:c,index:f},{default:ae(()=>[M("div",p_,[M("h5",h_,[we("Credential "+Zt(f+1)+" ",1),M("button",{type:"button",onClick:()=>l.input(a.filter((g,p)=>p!==f)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,m_)]),M("div",b_,[D(s,{type:"hidden",name:"type",value:["Related"]}),D(s,{type:"innerLabelTextInput",label:"ID",name:"id","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim",help:"The URI of the related achievement."}),D(s,{type:"innerLabelTextInput",label:"Language",name:"inLanguage","inner-class":"input-group","label-class":"input-group-text",validation:[["matches","/^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$/"]],help:"The language of the related achievement as a BCP47 language code."}),D(s,{type:"innerLabelTextInput",label:"Version",name:"version","inner-class":"input-group","label-class":"input-group-text",help:"The version of the related achievement."})])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},__=["onClick"],y_={class:"form-text"},v_={class:"card mb-3"},x_={class:"card-header"},k_=["onClick"],C_={class:"card-body pb-0"},E_=M("span",{class:"input-group-text","aria-label":"ext:"},"ext:",-1),Kc={__name:"OtherIdentifiers",props:bi({help:{type:String,default:"Other identifiers for this credential."}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,u=Fe(e,"modelValue");return(r,n)=>{const i=ve("FormKit");return K(),be(i,{type:"list",modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),name:"otherIdentifier",dynamic:""},{default:ae(({items:s,node:o,value:l})=>[M("h5",null,[we("Other Identifiers "),M("button",{type:"button",onClick:()=>o.input(l.concat({})),class:"btn btn-sm btn-primary ms-3"}," Add Identifier ",8,__)]),M("p",y_,Zt(t.help),1),(K(!0),me(Ee,null,hu(s,(a,c)=>(K(),be(i,{type:"group",key:a,index:c},{default:ae(()=>[M("div",v_,[M("h5",x_,[we("Other Identifier "+Zt(c+1)+" ",1),M("button",{type:"button",onClick:()=>o.input(l.filter((f,g)=>g!==c)),class:"btn btn-secondary btn-sm float-end"}," Remove ",8,k_)]),M("div",C_,[D(i,{type:"hidden",name:"type",value:"IdentifierEntry"}),D(i,{type:"innerLabelTextInput",label:"Identifier",name:"identifier","aria-label":"Identifier","inner-class":"input-group","label-class":"input-group-text","wrapper-class":"required",validation:"required:trim"}),D(i,{type:"selectInputGroup",label:"Identifier Type",name:"identifierType","inner-class":"input-group","label-class":"input-group-text","input-class":"$reset formkit-input form-select","wrapper-class":"required",placeholder:"Select the Identifier Type",validation:"required",options:{name:"name",sourcedId:"sourcedId",systemId:"systemId",productId:"productId",userName:"userName",accountId:"accountId",emailAddress:"emailAddress",nationalIdentityNumber:"nationalIdentityNumber",isbn:"isbn",issn:"issn",lisSourcedId:"lisSourcedId",oneRosterSourcedId:"oneRosterSourcedId",sisSourcedId:"sisSourcedId",ltiContextId:"ltiContextId",ltiDeploymentId:"ltiDeploymentId",ltiToolId:"ltiToolId",ltiPlatformId:"ltiPlatformId",ltiUserId:"ltiUserId",identifier:"identifier",other:"Other (ext:)"}}),l[c].identifierType==="other"?(K(),be(i,{key:0,type:"innerLabelTextInput",label:"Extended Type",name:"typeExt","aria-label":"Extended Identifier Type","inner-class":"input-group ms-3 me-5 pe-3","outer-class":"$reset","label-class":"visually-hidden",before:"ext:",validation:[["matches","/^[a-z|A-Z|0-9|.|-|_]+$/"]]},{prefix:ae(()=>[E_]),_:1})):Ve("",!0)])])]),_:2},1032,["index"]))),128))]),_:1},8,["modelValue"])}}},A_={__name:"AddressComponent",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se(!1);return Uu(()=>{Object.keys(t).length>0&&(u.value=!0)}),(r,n)=>{const i=ve("FormKit");return K(),be(i,{type:"group",name:"address",modelValue:t.value,"onUpdate:modelValue":n[1]||(n[1]=s=>t.value=s)},{default:ae(()=>[D(i,{type:"checkbox",label:"Include address",modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),"wrapper-class":"form-check form-switch","input-class":"$reset form-check-input","label-class":"$reset form-check-label",role:"switch",ignore:"true"},null,8,["modelValue"]),Ge(M("div",null,[D(i,{type:"hidden",name:"type",value:["Address"]}),D(i,{type:"text",label:"Street Address",name:"streetAddress",help:"Street address of the creator."}),D(i,{type:"text",label:"Post Office Box Number",name:"postOfficeBoxNumber",help:"A post office box number for PO box addresses."}),D(i,{type:"text",label:"City",name:"addressLocality",help:"A locality within the region."}),D(i,{type:"text",label:"State",name:"addressRegion",help:"The region within the country."}),D(i,{type:"text",label:"Postal Code",name:"postalCode",help:"A postal code."}),D(i,{type:"text",label:"Country",name:"addressCountry",help:"Country name."}),D(i,{type:"text",label:"Country Code",name:"addressCountryCode",help:"Country code. The value must be a ISO 3166-1 alpha-2 country code, such as 'US'."}),Ve("",!0)],512),[[Ct,u.value]])]),_:1},8,["modelValue"])}}},$_={class:"card"},w_={class:"card-header"},D_={class:"card-body"},F_={__name:"CreatorProfile",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue"),u=se("noCreator");return Uu(()=>{if(Object.keys(t.value).length===0){t.value="noCreator";return}u.value="organization",t.value.dateOfBirth&&(u.value="individual")}),(r,n)=>{const i=ve("formKit"),s=ve("FormKit");return K(),me("div",$_,[M("h5",w_,[D(i,{type:"select",label:"Creator",modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=o=>u.value=o),"input-class":"$reset formkit-input form-select",options:{noCreator:"Do not add a creator field",organization:"The creator is an Organization",individual:"The creator is a Person"},ignore:"true"},null,8,["modelValue"])]),u.value!=="noCreator"?(K(),be(s,{key:0,type:"group",name:"creator",modelValue:t.value,"onUpdate:modelValue":n[4]||(n[4]=o=>t.value=o)},{default:ae(()=>[M("div",D_,[D(s,{type:"text",label:"ID",name:"id","wrapper-class":"required",validation:"required:trim",help:"Unique URI for the creator."}),D(s,{type:"hidden",name:"type",value:["Profile"]}),D(s,{type:"text",label:"Name",name:"name",help:"The name of the entity or organization."}),D(s,{type:"text",label:"Description",name:"description",help:"A short description of the issuer entity or organization."}),D(da,{help:"An image that represents the creator. Must be a PNG or SVG image.",modelValue:t.value.image,"onUpdate:modelValue":n[1]||(n[1]=o=>t.value.image=o)},null,8,["modelValue"]),u.value==="organization"?(K(),be(s,{key:0,type:"text",label:"Official",name:"official",help:"If the entity is an organization, `official` is the name of an authorized official of the organization."})):Ve("",!0),D(s,{type:"text",label:"URL",name:"url",validation:"url",help:"The homepage or social media profile of the entity, whether individual or institutional. Should be a URL/URI Accessible via HTTP."}),D(s,{type:"text",label:"Email",name:"email",validation:"email",help:"An email address for the creator."}),D(s,{type:"text",label:"Phone",name:"phone",help:"A phone number for the creator."}),D(A_,{modelValue:t.value.address,"onUpdate:modelValue":n[2]||(n[2]=o=>t.value.address=o)},null,8,["modelValue"]),u.value==="individual"?(K(),be(s,{key:1,type:"text",label:"Date of Birth",name:"dateOfBirth",format:"yyyy-MM-dd",help:"Birthdate of the person."})):Ve("",!0),D(Kc,{label:"Other Identifiers",modelValue:t.value.otherIdentifier,"onUpdate:modelValue":n[3]||(n[3]=o=>t.value.otherIdentifier=o),help:"Other unique identifiers for the creator."},null,8,["modelValue"]),Ve("",!0),Ve("",!0),Ve("",!0)])]),_:1},8,["modelValue"])):Ve("",!0)])}}},S_={class:"tab-pane fade show active",id:"tab-additional",role:"tabpanel","aria-labelledby":"additional-tab"},I_={__name:"AdditionalTab",props:{modelValue:{default:{}},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Fe(e,"modelValue");return(u,r)=>{const n=ve("FormKit");return K(),me("div",S_,[D(n,{type:"text",name:"id",label:"ID",modelValue:t.value.id,"onUpdate:modelValue":r[0]||(r[0]=i=>t.value.id=i),help:"Unique URI for the Achievement."},null,8,["modelValue"]),D(c_,{modelValue:t.value.tag,"onUpdate:modelValue":r[1]||(r[1]=i=>t.value.tag=i)},null,8,["modelValue"]),D(g_,{modelValue:t.value.related,"onUpdate:modelValue":r[2]||(r[2]=i=>t.value.related=i)},null,8,["modelValue"]),D(Kc,{modelValue:t.value.otherIdentifier,"onUpdate:modelValue":r[3]||(r[3]=i=>t.value.otherIdentifier=i)},null,8,["modelValue"]),D(F_,{modelValue:t.value.creator,"onUpdate:modelValue":r[4]||(r[4]=i=>t.value.creator=i)},null,8,["modelValue"])])}}},T_={class:"nav nav-tabs",role:"tablist"},M_={class:"nav-item",role:"presentation"},O_=["aria-selected"],P_={class:"nav-item",role:"presentation"},R_=["aria-selected"],V_={class:"nav-item",role:"presentation"},L_=["aria-selected"],N_={class:"nav-item",role:"presentation"},q_=["aria-selected"],B_={class:"tab-content mt-3",id:"tab-content"},z_={key:0,class:"alert alert-warning",role:"alert"},j_=M("button",{class:"btn btn-primary float-end mt-5",type:"submit",disabled:!1},"Save",-1),U_={__name:"AchievementDefiner",props:{achievement:{type:String,default:""}},emits:["saveDefinition"],setup(e,{emit:t}){const u=e,r=se("basic"),n=se(!1),i=se(null),s=xt({type:["Achievement"],basic:{},detail:{},alignments:{},additional:{}}),o=xt({});Uu(()=>{try{const p=JSON.parse(u.achievement);s.basic={name:p.name||"",achievementType:p.achievementType||null,image:p.image||{},description:p.description||"",criteria:p.criteria||{}},s.detail={humanCode:p.humanCode||null,inLanguage:p.inLanguage||null,version:p.version||null,creditsAvailable:p.creditsAvailable||null,specialization:p.specialization||null,fieldOfStudy:p.fieldOfStudy||null},s.alignments={resultDescription:p.resultDescription||[],alignment:p.alignment||[]},s.additional={id:p.id||null,tag:p.tag||[],related:p.related||[],otherIdentifier:p.otherIdentifier||[],creator:p.creator||{}}}catch{}}),ge(s,p=>{Object.assign(o,p.basic),Object.assign(o,p.detail),Object.assign(o,p.alignments),Object.assign(o,p.additional)});function l(p){r.value=p}function a(p){return JSON.parse(JSON.stringify(p,(d,m)=>m===null||m===""||Array.isArray(m)&&m.length===0?void 0:m))}function c(p){const d=a(p);document.getElementById(i.value.node.props.id).dispatchEvent(new CustomEvent("saveDefinition",{bubbles:!0,detail:JSON.stringify(d)}))}function f(p){try{const d=document.getElementById(i.value.node.props.id),m=i.value.node.context.state.valid,y=a(i.value.node.value);d.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:JSON.stringify(y)})),m&&d.dispatchEvent(new CustomEvent("updated",{bubbles:!0,detail:JSON.stringify(y)}))}catch{}}function g(p){n.value=!0}return(p,d)=>{const m=ve("FormKit");return K(),me("div",null,[M("ul",T_,[M("li",M_,[M("button",{class:Ze(["nav-link",{active:r.value==="basic"}]),type:"button",id:"basic-tab",role:"tab","aria-controls":"tab-basic","aria-selected":r.value==="basic"?"true":"false",onClick:d[0]||(d[0]=y=>l("basic"))},"Primary Details",10,O_)]),M("li",P_,[M("button",{class:Ze(["nav-link",{active:r.value==="detail"}]),type:"button",id:"detail-tab",role:"tab","aria-controls":"tab-detail","aria-selected":r.value==="detail"?"true":"false",onClick:d[1]||(d[1]=y=>l("detail"))},"Additional Details",10,R_)]),M("li",V_,[M("button",{class:Ze(["nav-link",{active:r.value==="alignments"}]),type:"button",id:"detail-tab",role:"tab","aria-controls":"tab-alignments","aria-selected":r.value==="alignments"?"true":"false",onClick:d[2]||(d[2]=y=>l("alignments"))},"Alignments",10,L_)]),M("li",N_,[M("button",{class:Ze(["nav-link",{active:r.value==="additional"}]),type:"button",id:"additional-tab",role:"tab","aria-controls":"tab-additional","aria-selected":r.value==="additional"?"true":"false",onClick:d[3]||(d[3]=y=>l("additional"))},"Additional Information",10,q_)])]),M("div",B_,[D(m,{type:"form",actions:!1,ref_key:"form",ref:i,onSubmit:c,onSubmitInvalid:g,onChange:f,"validation-visibility":"live"},{default:ae(({state:{valid:y}})=>[!y&&n.value?(K(),me("div",z_," There are some errors in the form submission. Please correct the errors and then resubmit the form. ")):Ve("",!0),D(m,{type:"hidden",name:"@context",value:["https://www.w3.org/2018/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"]}),D(m,{type:"hidden",name:"type",modelValue:s.type,"onUpdate:modelValue":d[4]||(d[4]=v=>s.type=v),value:["Achievement"]},null,8,["modelValue"]),Ge(D(Fh,{modelValue:s.basic,"onUpdate:modelValue":d[5]||(d[5]=v=>s.basic=v)},null,8,["modelValue"]),[[Ct,r.value==="basic"]]),Ge(D(Th,{modelValue:s.detail,"onUpdate:modelValue":d[6]||(d[6]=v=>s.detail=v)},null,8,["modelValue"]),[[Ct,r.value==="detail"]]),Ge(D(r_,{modelValue:s.alignments,"onUpdate:modelValue":d[7]||(d[7]=v=>s.alignments=v)},null,8,["modelValue"]),[[Ct,r.value==="alignments"]]),Ge(D(I_,{modelValue:s.additional,"onUpdate:modelValue":d[8]||(d[8]=v=>s.additional=v)},null,8,["modelValue"]),[[Ct,r.value==="additional"]]),j_]),_:1},512)])])}}},H_={class:"container"},K_={__name:"App",props:{achievement:{type:String,default:""}},setup(e){return(t,u)=>(K(),me("div",H_,[D(U_,{achievement:e.achievement},null,8,["achievement"])]))}},W_={config:{classes:$3({global:{outer:"$reset mb-4",input:"form-control",label:"form-label",help:"form-text",message:"invalid-feedback"},form:{form:"mt-1 mx-auto p-3 border rounded"},range:{input:"$reset form-range"},submit:{outer:"$reset mt-3",input:"$reset btn btn-primary"}})}},Z_={schema:Ft(uu(bu(gu("$label"),pe("prefix","label"),tt(),Es(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",family:"text",props:[],forceTypeProp:"text",features:[$s],schemaMemoKey:"qmwq6rtsiye"},G_={schema:Ft(uu(bu(gu("$label"),pe("prefix","label"),tt(),xc(),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:[],forceTypeProp:"textarea",features:[$c],schemaMemoKey:"zq0nltggno"},J_={schema:Ft(uu(bu(gu("$label"),pe("prefix"),tt(),vc(Ye("$slots.default",()=>"$slots.default",bn(Ye("$option.group",yc(bn(mn("$option.label"))),mn("$option.label"))))),Ye("$attrs.multiple !== undefined",()=>"",pe("select")),ut(),pe("suffix"))),et("$help"),pt(dt("$message.value"))),type:"input",props:["options","placeholder","optionsLoader"],forceTypeProp:"select",features:[qn,Fc,au("select","select")],schemaMemoKey:"at63zamx5wg"},Y_=(e,t)=>{const u=_d(K_,t);return u.use(ng,ws({config:W_.config,inputs:{innerLabelTextInput:Z_,innerLabelTextareaInput:G_,selectInputGroup:J_}})),u};window.addEventListener("ob3-open",function(e){var i,s;const t=((i=e.detail)==null?void 0:i.selector)||"#ob3-definer",u=document.querySelector(t);if(!u)throw new Error("No element found for selector "+t);const r={...u.dataset};(s=e.detail)!=null&&s.achievement&&(typeof e.detail.achievement=="string"?r.achievement=e.detail.achievement:r.achievement=JSON.stringify(e.detail.achievement));const n=Y_(t,r);n.mount(t),window.addEventListener("ob3-close",function o(){window.removeEventListener("ob3-open",o),n.unmount()})});
|
package/package.json
CHANGED
|
@@ -49,14 +49,14 @@ function selectTab(tab) {
|
|
|
49
49
|
label="Narrative"
|
|
50
50
|
name="narrative"
|
|
51
51
|
rows="5"
|
|
52
|
-
validation="require_one:
|
|
52
|
+
validation="require_one:id"
|
|
53
53
|
help="A narrative of what is needed to earn the credential. Markdown is allowed."
|
|
54
54
|
/>
|
|
55
55
|
|
|
56
56
|
<FormKit
|
|
57
57
|
type="text"
|
|
58
58
|
label="Criteria URL"
|
|
59
|
-
name="
|
|
59
|
+
name="id"
|
|
60
60
|
validation="require_one:narrative|url"
|
|
61
61
|
help="The URL of a webpage that describes in a human-readable format the criteria for the credential."
|
|
62
62
|
/>
|