@thebase/ui 1.1.6 → 1.1.7

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.
@@ -1,30 +1,30 @@
1
1
  /* Vendored from @odoo/owl@2.8.3's dist/owl.iife.min.js, patched to key off globalThis instead of top-level `this` (safe in both classic scripts and ES modules) — see scripts/build.mjs and src/owl/owl-dev-shim.js. */
2
2
  !function(t){"use strict";function e(t){t=t.slice();const e=[];let n;for(;(n=t[0])&&"string"==typeof n;)e.push(t.shift());return{modifiers:e,data:t}}const n={shouldNormalizeDom:!0,mainEventHandler:(t,n,o)=>("function"==typeof t?t(n):Array.isArray(t)&&(t=e(t).data)[0](t[1],n),!1)};class o{constructor(t,e){this.key=t,this.child=e}mount(t,e){this.parentEl=t,this.child.mount(t,e)}moveBeforeDOMNode(t,e){this.child.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.moveBeforeDOMNode(t&&t.firstNode()||e)}patch(t,e){if(this===t)return;let n=this.child,o=t.child;this.key===t.key?n.patch(o,e):(o.mount(this.parentEl,n.firstNode()),e&&n.beforeRemove(),n.remove(),this.child=o,this.key=t.key)}beforeRemove(){this.child.beforeRemove()}remove(){this.child.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}function s(t,e){return new o(t,e)}class r extends Error{}let i,l,a,c;if("undefined"!=typeof Element){({setAttribute:i,removeAttribute:l}=Element.prototype);const t=DOMTokenList.prototype;a=t.add,c=t.remove}const h=Array.isArray,{split:u,trim:d}=String.prototype,f=/\s+/;function p(t,e){switch(e){case!1:case void 0:l.call(this,t);break;case!0:i.call(this,t,"");break;default:i.call(this,t,e)}}function m(t){return function(e){p.call(this,t,e)}}function g(t){if(h(t))"class"===t[0]?y.call(this,t[1]):p.call(this,t[0],t[1]);else for(let e in t)"class"===e?y.call(this,t[e]):p.call(this,e,t[e])}function b(t,e){if(h(t)){const n=t[0],o=t[1];if(n===e[0]){if(o===e[1])return;"class"===n?w.call(this,o,e[1]):p.call(this,n,o)}else l.call(this,e[0]),p.call(this,n,o)}else{for(let n in e)n in t||("class"===n?w.call(this,"",e[n]):l.call(this,n));for(let n in t){const o=t[n];o!==e[n]&&("class"===n?w.call(this,o,e[n]):p.call(this,n,o))}}}function v(t){const e={};switch(typeof t){case"string":const n=d.call(t);if(!n)return{};let o=u.call(n,f);for(let t=0,n=o.length;t<n;t++)e[o[t]]=!0;return e;case"object":for(let n in t){const o=t[n];if(o){if(n=d.call(n),!n)continue;const t=u.call(n,f);for(let n of t)e[n]=o}}return e;case"undefined":return{};case"number":return{[t]:!0};default:return{[t]:!0}}}function y(t){t=""===t?{}:v(t);const e=this.classList;for(let n in t)a.call(e,n)}function w(t,e){e=""===e?{}:v(e),t=""===t?{}:v(t);const n=this.classList;for(let o in e)o in t||c.call(n,o);for(let o in t)o in e||a.call(n,o)}function $(t){let e=!1;return async(...n)=>{e||(e=!0,await Promise.resolve(),e=!1,t(...n))}}function x(t){if(!t)return!1;if(t.ownerDocument.contains(t))return!0;const e=t.getRootNode();return e instanceof ShadowRoot&&t.ownerDocument.contains(e.host)}class N extends EventTarget{trigger(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e}))}}class k extends String{}function T(t){return t instanceof k?t:void 0===t?E(""):"number"==typeof t?E(String(t)):([["&","&amp;"],["<","&lt;"],[">","&gt;"],["'","&#x27;"],['"',"&quot;"],["`","&#x60;"]].forEach((e=>{t=String(t).replace(new RegExp(e[0],"g"),e[1])})),E(t))}function E(t,...e){if(!Array.isArray(t))return new k(t);const n=t;let o="",s=0;for(;s<e.length;++s)o+=n[s]+T(e[s]);return o+=n[s],new k(o)}function A(t){const e=t.split(".")[0],o=t.includes(".capture");return t.includes(".synthetic")?function(t,e=!1){let o=`__event__synthetic_${t}`;e&&(o=`${o}_capture`);!function(t,e,o=!1){if(D[e])return;document.addEventListener(t,(t=>function(t,e){let o=e.target;for(;null!==o;){const s=o[t];if(s)for(const t of Object.values(s)){if(n.mainEventHandler(t,e,o))return}o=o.parentNode}}(e,t)),{capture:o}),D[e]=!0}(t,o,e);const s=C++;function r(t){const e=this[o]||{};e[s]=t,this[o]=e}function i(){delete this[o]}return{setup:r,update:r,remove:i}}(e,o):function(t,e=!1){let o=`__event__${t}_${_++}`;e&&(o=`${o}_capture`);function s(t){const e=t.currentTarget;if(!e||!x(e))return;const s=e[o];s&&n.mainEventHandler(s,t,e)}function r(n){this[o]=n,this.addEventListener(t,s,{capture:e})}function i(){delete this[o],this.removeEventListener(t,s,{capture:e})}function l(t){this[o]=t}return{setup:r,update:l,remove:i}}(e,o)}let _=1;let C=1;const D={};let S,O,R;if("undefined"!=typeof Node){const t=Node.prototype;S=t.insertBefore,O=(L=t,B="textContent",Object.getOwnPropertyDescriptor(L,B)).set,R=t.removeChild}var L,B;class P{constructor(t){this.children=t}mount(t,e){const n=this.children,o=n.length,s=new Array(o);for(let r=0;r<o;r++){let o=n[r];if(o)o.mount(t,e);else{const n=document.createTextNode("");s[r]=n,S.call(t,n,e)}}this.anchors=s,this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children,o=this.anchors;for(let s=0,r=n.length;s<r;s++){let r=n[s];if(r)r.moveBeforeDOMNode(t,e);else{const n=o[s];S.call(e,n,t)}}}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchors[0])||null}const n=this.children,o=this.parentEl,s=this.anchors;for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r)r.moveBeforeVNode(null,e);else{const n=s[t];S.call(o,n,e)}}}patch(t,e){if(this===t)return;const n=this.children,o=t.children,s=this.anchors,r=this.parentEl;for(let t=0,i=n.length;t<i;t++){const i=n[t],l=o[t];if(i)if(l)i.patch(l,e);else{const o=i.firstNode(),l=document.createTextNode("");s[t]=l,S.call(r,l,o),e&&i.beforeRemove(),i.remove(),n[t]=void 0}else if(l){n[t]=l;const e=s[t];l.mount(r,e),R.call(r,e)}}}beforeRemove(){const t=this.children;for(let e=0,n=t.length;e<n;e++){const n=t[e];n&&n.beforeRemove()}}remove(){const t=this.parentEl;if(this.isOnlyChild)O.call(t,"");else{const e=this.children,n=this.anchors;for(let o=0,s=e.length;o<s;o++){const s=e[o];s?s.remove():R.call(t,n[o])}}}firstNode(){const t=this.children[0];return t?t.firstNode():this.anchors[0]}toString(){return this.children.map((t=>t?t.toString():"")).join("")}}function j(t){return new P(t)}let M,I,W;if("undefined"!=typeof Node){const t=Node.prototype;M=t.insertBefore,W=t.removeChild,I=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(CharacterData.prototype,"data").set}class V{constructor(t){this.text=t}mountNode(t,e,n){this.parentEl=e,M.call(e,t,n),this.el=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,M.call(e,this.el,t)}moveBeforeVNode(t,e){M.call(this.parentEl,this.el,t?t.el:e)}beforeRemove(){}remove(){W.call(this.parentEl,this.el)}firstNode(){return this.el}toString(){return this.text}}class F extends V{mount(t,e){this.mountNode(document.createTextNode(U(this.text)),t,e)}patch(t){const e=t.text;this.text!==e&&(I.call(this.el,U(e)),this.text=e)}}class K extends V{mount(t,e){this.mountNode(document.createComment(U(this.text)),t,e)}patch(){}}function z(t){return new F(t)}function H(t){return new K(t)}function U(t){switch(typeof t){case"string":return t;case"number":return String(t);case"boolean":return t?"true":"false";default:return t||""}}const q=(t,e)=>Object.getOwnPropertyDescriptor(t,e);let G,X,Y,Z,J;"undefined"!=typeof Node&&(G=Node.prototype,X=Element.prototype,Y=q(CharacterData.prototype,"data").set,Z=q(G,"firstChild").get,J=q(G,"nextSibling").get);const Q=()=>{};function tt(t){return function(e){this[t]=0===e?0:e?e.valueOf():""}}const et={};function nt(t){if(t in et)return et[t];const e=(new DOMParser).parseFromString(`<t>${t}</t>`,"text/xml").firstChild.firstChild;n.shouldNormalizeDom&&ot(e);const o=st(e),s=lt(o),r=function(t,e){let n=function(t,e){const{refN:n,collectors:o,children:s}=e,r=o.length;e.locations.sort(((t,e)=>t.idx-e.idx));const i=e.locations.map((t=>({refIdx:t.refIdx,setData:t.setData,updateData:t.updateData}))),l=i.length,a=s.length,c=s,h=n>0,u=G.cloneNode,d=G.insertBefore,f=X.remove;class p{constructor(t){this.data=t}beforeRemove(){}remove(){f.call(this.el)}firstNode(){return this.el}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,d.call(e,this.el,t)}moveBeforeVNode(t,e){d.call(this.parentEl,this.el,t?t.el:e)}toString(){const t=document.createElement("div");return this.mount(t,null),t.innerHTML}mount(e,n){const o=u.call(t,!0);d.call(e,o,n),this.el=o,this.parentEl=e}patch(t,e){}}h&&(p.prototype.mount=function(e,s){const h=u.call(t,!0),f=new Array(n);this.refs=f,f[0]=h;for(let t=0;t<r;t++){const e=o[t];f[e.idx]=e.getVal.call(f[e.prevIdx])}if(l){const t=this.data;for(let e=0;e<l;e++){const n=i[e];n.setData.call(f[n.refIdx],t[e])}}if(d.call(e,h,s),a){const t=this.children;for(let e=0;e<a;e++){const n=t[e];if(n){const t=c[e],o=t.afterRefIdx?f[t.afterRefIdx]:null;n.isOnlyChild=t.isOnlyChild,n.mount(f[t.parentRefIdx],o)}}}this.el=h,this.parentEl=e},p.prototype.patch=function(t,e){if(this===t)return;const n=this.refs;if(l){const e=this.data,o=t.data;for(let t=0;t<l;t++){const s=e[t],r=o[t];if(s!==r){const e=i[t];e.updateData.call(n[e.refIdx],r,s)}}this.data=o}if(a){let o=this.children;const s=t.children;for(let t=0;t<a;t++){const r=o[t],i=s[t];if(r)i?r.patch(i,e):(e&&r.beforeRemove(),r.remove(),o[t]=void 0);else if(i){const e=c[t],s=e.afterRefIdx?n[e.afterRefIdx]:null;i.mount(n[e.parentRefIdx],s),o[t]=i}}}});return p}(t,e);if(e.cbRefs.length){const t=e.cbRefs,o=e.refList;let s=t.length;n=class extends n{mount(t,e){o.push(new Array(s)),super.mount(t,e);for(let t of o.pop())t()}remove(){super.remove();for(let e of t){(0,this.data[e])(null)}}}}if(e.children.length)return n=class extends n{constructor(t,e){super(t),this.children=e}},n.prototype.beforeRemove=P.prototype.beforeRemove,(t,e=[])=>new n(t,e);return t=>new n(t)}(o.el,s);return et[t]=r,r}function ot(t){if(t.nodeType!==Node.TEXT_NODE||/\S/.test(t.textContent)){if(t.nodeType!==Node.ELEMENT_NODE||"pre"!==t.tagName)for(let e=t.childNodes.length-1;e>=0;--e)ot(t.childNodes.item(e))}else t.remove()}function st(t,e=null,n=null){switch(t.nodeType){case Node.ELEMENT_NODE:{let o=n&&n.currentNS;const s=t.tagName;let r;const i=[];if(s.startsWith("block-text-")){const t=parseInt(s.slice(11),10);i.push({type:"text",idx:t}),r=document.createTextNode("")}if(s.startsWith("block-child-")){n.isRef||rt(n);const t=parseInt(s.slice(12),10);i.push({type:"child",idx:t}),r=document.createTextNode("")}if(o||(o=t.namespaceURI),r||(r=o?document.createElementNS(o,s):document.createElement(s)),r instanceof Element){if(!n){document.createElement("template").content.appendChild(r)}const e=t.attributes;for(let t=0;t<e.length;t++){const n=e[t].name,o=e[t].value;if(n.startsWith("block-handler-")){const t=parseInt(n.slice(14),10);i.push({type:"handler",idx:t,event:o})}else if(n.startsWith("block-attribute-")){const t=parseInt(n.slice(16),10);i.push({type:"attribute",idx:t,name:o,tag:s})}else if(n.startsWith("block-property-")){const t=parseInt(n.slice(15),10);i.push({type:"property",idx:t,name:o,tag:s})}else"block-attributes"===n?i.push({type:"attributes",idx:parseInt(o,10)}):"block-ref"===n?i.push({type:"ref",idx:parseInt(o,10)}):r.setAttribute(e[t].name,o)}}const l={parent:e,firstChild:null,nextSibling:null,el:r,info:i,refN:0,currentNS:o};if(t.firstChild){const e=t.childNodes[0];if(1===t.childNodes.length&&e.nodeType===Node.ELEMENT_NODE&&e.tagName.startsWith("block-child-")){const t=e.tagName,n=parseInt(t.slice(12),10);i.push({idx:n,type:"child",isOnlyChild:!0})}else{l.firstChild=st(t.firstChild,l,l),r.appendChild(l.firstChild.el);let e=t.firstChild,n=l.firstChild;for(;e=e.nextSibling;)n.nextSibling=st(e,n,l),r.appendChild(n.nextSibling.el),n=n.nextSibling}}return l.info.length&&rt(l),l}case Node.TEXT_NODE:case Node.COMMENT_NODE:return{parent:e,firstChild:null,nextSibling:null,el:t.nodeType===Node.TEXT_NODE?document.createTextNode(t.textContent):document.createComment(t.textContent),info:[],refN:0,currentNS:null}}throw new r("boom")}function rt(t){t.isRef=!0;do{t.refN++}while(t=t.parent)}function it(t){let e=t.parent;for(;e&&e.nextSibling===t;)t=e,e=e.parent;return e}function lt(t,e,n){if(!e){e={collectors:[],locations:[],children:new Array(t.info.filter((t=>"child"===t.type)).length),cbRefs:[],refN:t.refN,refList:[]},n=0}if(t.refN){const o=n,s=t.isRef,r=t.firstChild?t.firstChild.refN:0,i=t.nextSibling?t.nextSibling.refN:0;if(s){for(let e of t.info)e.refIdx=o;t.refIdx=o,function(t,e){for(let n of e.info)switch(n.type){case"text":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:at,updateData:at});break;case"child":n.isOnlyChild?t.children[n.idx]={parentRefIdx:n.refIdx,isOnlyChild:!0}:t.children[n.idx]={parentRefIdx:it(e).refIdx,afterRefIdx:n.refIdx};break;case"property":{const e=n.refIdx,o=tt(n.name);t.locations.push({idx:n.idx,refIdx:e,setData:o,updateData:o});break}case"attribute":{const e=n.refIdx;let o,s;"class"===n.name?(s=y,o=w):(s=m(n.name),o=s),t.locations.push({idx:n.idx,refIdx:e,setData:s,updateData:o});break}case"attributes":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:g,updateData:b});break;case"handler":{const{setup:e,update:o}=A(n.event);t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:e,updateData:o});break}case"ref":const o=t.cbRefs.push(n.idx)-1;t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:ct(o,t.refList),updateData:Q})}}(e,t),n++}if(i){const s=n+r;e.collectors.push({idx:s,prevIdx:o,getVal:J}),lt(t.nextSibling,e,s)}r&&(e.collectors.push({idx:n,prevIdx:o,getVal:Z}),lt(t.firstChild,e,n))}return e}function at(t){Y.call(this,U(t))}function ct(t,e){return function(n){e[e.length-1][t]=()=>n(this)}}let ht,ut,dt,ft,pt,mt;if("undefined"!=typeof Node){const t=Node.prototype;ht=t.insertBefore,ut=t.appendChild,dt=t.removeChild,ft=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(t,"textContent").set}class gt{constructor(t){this.children=t}mount(t,e){const n=this.children,o=document.createTextNode("");this.anchor=o,ht.call(t,o,e);const s=n.length;if(s){const e=n[0].mount;for(let r=0;r<s;r++)e.call(n[r],t,o)}this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children;for(let o=0,s=n.length;o<s;o++)n[o].moveBeforeDOMNode(t,e);e.insertBefore(this.anchor,t)}moveBeforeVNode(t,e){if(t){const n=t.children[0];e=(n?n.firstNode():t.anchor)||null}const n=this.children;for(let t=0,o=n.length;t<o;t++)n[t].moveBeforeVNode(null,e);this.parentEl.insertBefore(this.anchor,e)}patch(t,e){if(this===t)return;const n=this.children,o=t.children;if(0===o.length&&0===n.length)return;this.children=o;const s=o[0]||n[0],{mount:r,patch:i,remove:l,beforeRemove:a,moveBeforeVNode:c,firstNode:h}=s,u=this.anchor,d=this.isOnlyChild,f=this.parentEl;if(0===o.length&&d){if(e)for(let t=0,e=n.length;t<e;t++)a.call(n[t]);return ft.call(f,""),void ut.call(f,u)}let p,m=0,g=0,b=n[0],v=o[0],y=n.length-1,w=o.length-1,$=n[y],x=o[w];for(;m<=y&&g<=w;){if(null===b){b=n[++m];continue}if(null===$){$=n[--y];continue}let t=b.key,s=v.key;if(t===s){i.call(b,v,e),o[g]=b,b=n[++m],v=o[++g];continue}let l=$.key,a=x.key;if(l===a){i.call($,x,e),o[w]=$,$=n[--y],x=o[--w];continue}if(t===a){i.call(b,x,e),o[w]=b;const t=o[w+1];c.call(b,t,u),b=n[++m],x=o[--w];continue}if(l===s){i.call($,v,e),o[g]=$;const t=n[m];c.call($,t,u),$=n[--y],v=o[++g];continue}p=p||vt(n,m,y);let d=p[s];if(void 0===d)r.call(v,f,h.call(b)||null);else{const t=n[d];c.call(t,b,null),i.call(t,v,e),o[g]=t,n[d]=null}v=o[++g]}if(m<=y||g<=w)if(m>y){const t=o[w+1],e=t?h.call(t)||null:u;for(let t=g;t<=w;t++)r.call(o[t],f,e)}else for(let t=m;t<=y;t++){let o=n[t];o&&(e&&a.call(o),l.call(o))}}beforeRemove(){const t=this.children,e=t.length;if(e){const n=t[0].beforeRemove;for(let o=0;o<e;o++)n.call(t[o])}}remove(){const{parentEl:t,anchor:e}=this;if(this.isOnlyChild)ft.call(t,"");else{const n=this.children,o=n.length;if(o){const t=n[0].remove;for(let e=0;e<o;e++)t.call(n[e])}dt.call(t,e)}}firstNode(){const t=this.children[0];return t?t.firstNode():void 0}toString(){return this.children.map((t=>t.toString())).join("")}}function bt(t){return new gt(t)}function vt(t,e,n){let o={};for(let s=e;s<=n;s++)o[t[s].key]=s;return o}if("undefined"!=typeof Node){const t=Node.prototype;pt=t.insertBefore,mt=t.removeChild}class yt{constructor(t){this.content=[],this.html=t}mount(t,e){this.parentEl=t;const n=document.createElement("template");n.innerHTML=this.html,this.content=[...n.content.childNodes];for(let n of this.content)pt.call(t,n,e);if(!this.content.length){const n=document.createTextNode("");this.content.push(n),pt.call(t,n,e)}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;for(let n of this.content)pt.call(e,n,t)}moveBeforeVNode(t,e){const n=t?t.content[0]:e;this.moveBeforeDOMNode(n)}patch(t){if(this===t)return;const e=t.html;if(this.html!==e){const n=this.parentEl,o=this.content[0],s=document.createElement("template");s.innerHTML=e;const r=[...s.content.childNodes];for(let t of r)pt.call(n,t,o);if(!r.length){const t=document.createTextNode("");r.push(t),pt.call(n,t,o)}this.remove(),this.content=r,this.html=t.html}}beforeRemove(){}remove(){const t=this.parentEl;for(let e of this.content)mt.call(t,e)}firstNode(){return this.content[0]}toString(){return this.html}}function wt(t){return new yt(t)}function $t(t,e,n=null){t.mount(e,n)}const xt=new WeakMap,Nt=new WeakMap;function kt(t,e){if(!t)return!1;const n=t.fiber;n&&xt.set(n,e);const o=Nt.get(t);if(o){let t=!1;for(let n=o.length-1;n>=0;n--)try{o[n](e),t=!0;break}catch(t){e=t}if(t)return!0}return kt(t.parent,e)}function Tt(t){let{error:e}=t;e instanceof r||(e=Object.assign(new r('An error occured in the owl lifecycle (see this Error\'s "cause" property)'),{cause:e}));const n="node"in t?t.node:t.fiber.node,o="fiber"in t?t.fiber:n.fiber;if(o){let t=o;do{t.node.fiber=t,xt.set(t,e),t=t.parent}while(t);xt.set(o.root,e)}if(!kt(n,e)){console.warn("[Owl] Unhandled error. Destroying the root component");try{n.app.destroy()}catch(t){console.error(t)}throw e}}function Et(){throw new r("Attempted to render cancelled fiber")}function At(t){let e=0;for(let n of t){let t=n.node;n.render=Et,0===t.status&&t.cancel(),t.fiber=null,n.bdom?t.forceNextRender=!0:e++,e+=At(n.children)}return e}class _t{constructor(t,e){if(this.bdom=null,this.children=[],this.appliedToDom=!1,this.deep=!1,this.childrenMap={},this.node=t,this.parent=e,e){this.deep=e.deep;const t=e.root;t.setCounter(t.counter+1),this.root=t,e.children.push(this)}else this.root=this}render(){let t=this.root.node,e=t.app.scheduler,n=t.parent;for(;n;){if(n.fiber){let o=n.fiber.root;if(0!==o.counter||!(t.parentKey in n.fiber.childrenMap))return void e.delayedRenders.push(this);n=o.node}t=n,n=n.parent}this._render()}_render(){const t=this.node,e=this.root;if(e){try{this.bdom=!0,this.bdom=t.renderFn()}catch(e){t.app.handleError({node:t,error:e})}e.setCounter(e.counter-1)}}}class Ct extends _t{constructor(){super(...arguments),this.counter=1,this.willPatch=[],this.patched=[],this.mounted=[],this.locked=!1}complete(){const t=this.node;let e;this.locked=!0;let n=this.mounted;try{for(e of this.willPatch){let t=e.node;if(t.fiber===e){const e=t.component;for(let n of t.willPatch)n.call(e)}}for(e=void 0,t._patch(),this.locked=!1;e=n.pop();)if(e.appliedToDom)for(let t of e.node.mounted)t();let o=this.patched;for(;e=o.pop();)if(e.appliedToDom)for(let t of e.node.patched)t()}catch(o){for(let t of n)t.node.willUnmount=[];this.locked=!1,t.app.handleError({fiber:e||this,error:o})}}setCounter(t){this.counter=t,0===t&&this.node.app.scheduler.flush()}}class Dt extends Ct{constructor(t,e,n={}){super(t,null),this.target=e,this.position=n.position||"last-child"}complete(){let t=this;try{const e=this.node;if(e.children=this.childrenMap,e.app.constructor.validateTarget(this.target),e.bdom)e.updateDom();else if(e.bdom=this.bdom,"last-child"===this.position||0===this.target.childNodes.length)$t(e.bdom,this.target);else{const t=this.target.childNodes[0];$t(e.bdom,this.target,t)}e.fiber=null,e.status=1,this.appliedToDom=!0;let n=this.mounted;for(;t=n.pop();)if(t.appliedToDom)for(let e of t.node.mounted)e()}catch(e){this.node.app.handleError({fiber:t,error:e})}}}const St=Symbol("Key changes"),Ot=()=>{throw new Error("Called NO_CALLBACK. Owl is broken, please report this to the maintainers.")},Rt=Object.prototype.toString,Lt=Object.prototype.hasOwnProperty,Bt=["Object","Array","Set","Map","WeakMap"],Pt=["Set","Map","WeakMap"];function jt(t){return Rt.call(Ft(t)).slice(8,-1)}function Mt(t){return"object"==typeof t&&Bt.includes(jt(t))}function It(t,e){return Mt(t)?Yt(t,e):t}const Wt=new WeakSet;function Vt(t){return Wt.add(t),t}function Ft(t){return Gt.has(t)?Gt.get(t):t}const Kt=new WeakMap;function zt(t,e,n){if(n===Ot)return;Kt.get(t)||Kt.set(t,new Map);const o=Kt.get(t);o.get(e)||o.set(e,new Set),o.get(e).add(n),Ut.has(n)||Ut.set(n,new Set),Ut.get(n).add(t)}function Ht(t,e){const n=Kt.get(t);if(!n)return;const o=n.get(e);if(o)for(const t of[...o])qt(t),t()}const Ut=new WeakMap;function qt(t){const e=Ut.get(t);if(e){for(const n of e){const e=Kt.get(n);if(e)for(const[n,o]of e.entries())o.delete(t),o.size||e.delete(n)}e.clear()}}const Gt=new WeakMap,Xt=new WeakMap;function Yt(t,e=Ot){if(!Mt(t))throw new r("Cannot make the given value reactive");if(Wt.has(t))return t;if(Gt.has(t))return Yt(Gt.get(t),e);Xt.has(t)||Xt.set(t,new WeakMap);const n=Xt.get(t);if(!n.has(e)){const o=jt(t),s=Pt.includes(o)?function(t,e,n){const o=oe[n](t,e);return Object.assign(Zt(e),{get:(t,n)=>Lt.call(o,n)?o[n]:(zt(t,n,e),It(t[n],e))})}(t,e,o):Zt(e),r=new Proxy(t,s);n.set(e,r),Gt.set(r,t)}return n.get(e)}function Zt(t){return{get(e,n,o){const s=Object.getOwnPropertyDescriptor(e,n);return!s||s.writable||s.configurable?(zt(e,n,t),It(Reflect.get(e,n,o),t)):Reflect.get(e,n,o)},set(t,e,n,o){const s=Lt.call(t,e),r=Reflect.get(t,e,o),i=Reflect.set(t,e,Ft(n),o);return!s&&Lt.call(t,e)&&Ht(t,St),(r!==Reflect.get(t,e,o)||"length"===e&&Array.isArray(t))&&Ht(t,e),i},deleteProperty(t,e){const n=Reflect.deleteProperty(t,e);return Ht(t,St),Ht(t,e),n},ownKeys:e=>(zt(e,St,t),Reflect.ownKeys(e)),has:(e,n)=>(zt(e,St,t),Reflect.has(e,n))}}function Jt(t,e,n){return o=>(o=Ft(o),zt(e,o,n),It(e[t](o),n))}function Qt(t,e,n){return function*(){zt(e,St,n);const o=e.keys();for(const s of e[t]()){const t=o.next().value;zt(e,t,n),yield It(s,n)}}}function te(t,e){return function(n,o){zt(t,St,e),t.forEach((function(s,r,i){zt(t,r,e),n.call(o,It(s,e),It(r,e),It(i,e))}),o)}}function ee(t,e,n){return(o,s)=>{o=Ft(o);const r=n.has(o),i=n[e](o),l=n[t](o,s);return r!==n.has(o)&&Ht(n,St),i!==n[e](o)&&Ht(n,o),l}}function ne(t){return()=>{const e=[...t.keys()];t.clear(),Ht(t,St);for(const n of e)Ht(t,n)}}const oe={Set:(t,e)=>({has:Jt("has",t,e),add:ee("add","has",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),Map:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t),keys:Qt("keys",t,e),values:Qt("values",t,e),entries:Qt("entries",t,e),[Symbol.iterator]:Qt(Symbol.iterator,t,e),forEach:te(t,e),clear:ne(t),get size(){return zt(t,St,e),t.size}}),WeakMap:(t,e)=>({has:Jt("has",t,e),get:Jt("get",t,e),set:ee("set","get",t),delete:ee("delete","has",t)})};let se=null;function re(){if(!se)throw new r("No active component (a hook function should only be called in 'setup')");return se}function ie(t,e){for(let n in e)void 0===t[n]&&(t[n]=e[n])}const le=new WeakMap;function ae(t){const e=re();let n=le.get(e);if(!n){const t={fn:$(e.render.bind(e,!1))};n=(...e)=>t.fn(...e),le.set(e,n),e.willDestroy.push(he.bind(null,t,n))}return Yt(t,n)}const ce=()=>{};function he(t,e){t.fn=ce,qt(e)}class ue{constructor(t,e,n,o,s){this.fiber=null,this.bdom=null,this.status=0,this.forceNextRender=!1,this.nextProps=null,this.children=Object.create(null),this.refs={},this.willStart=[],this.willUpdateProps=[],this.willUnmount=[],this.mounted=[],this.willPatch=[],this.patched=[],this.willDestroy=[],se=this,this.app=n,this.parent=o,this.props=e,this.parentKey=s;const r=t.defaultProps;e=Object.assign({},e),r&&ie(e,r);const i=o&&o.childEnv||n.env;this.childEnv=i;for(const t in e){const n=e[t];n&&"object"==typeof n&&Gt.has(n)&&(e[t]=ae(n))}this.component=new t(e,i,this);const l=Object.assign(Object.create(this.component),{this:this.component});this.renderFn=n.getTemplate(t.template).bind(this.component,l,this),this.component.setup(),se=null}mountComponent(t,e){const n=new Dt(this,t,e);this.app.scheduler.addFiber(n),this.initiateRender(n)}async initiateRender(t){this.fiber=t,this.mounted.length&&t.root.mounted.push(t);const e=this.component;try{await Promise.all(this.willStart.map((t=>t.call(e))))}catch(t){return void this.app.handleError({node:this,error:t})}0===this.status&&this.fiber===t&&t.render()}async render(t){if(this.status>=2)return;let e=this.fiber;if(e&&(e.root.locked||!0===e.bdom)&&(await Promise.resolve(),e=this.fiber),e){if(!e.bdom&&!xt.has(e))return void(t&&(e.deep=t));t=t||e.deep}else if(!this.bdom)return;const n=function(t){let e=t.fiber;if(e){let t=e.root;return t.locked=!0,t.setCounter(t.counter+1-At(e.children)),t.locked=!1,e.children=[],e.childrenMap={},e.bdom=null,xt.has(e)&&(xt.delete(e),xt.delete(t),e.appliedToDom=!1,e instanceof Ct&&(e.mounted=e instanceof Dt?[e]:[])),e}const n=new Ct(t,null);return t.willPatch.length&&n.willPatch.push(n),t.patched.length&&n.patched.push(n),n}(this);n.deep=t,this.fiber=n,this.app.scheduler.addFiber(n),await Promise.resolve(),this.status>=2||this.fiber!==n||!e&&n.parent||n.render()}cancel(){this._cancel(),delete this.parent.children[this.parentKey],this.app.scheduler.scheduleDestroy(this)}_cancel(){this.status=2;const t=this.children;for(let e in t)t[e]._cancel()}destroy(){let t=1===this.status;this._destroy(),t&&this.bdom.remove()}_destroy(){const t=this.component;if(1===this.status)for(let e of this.willUnmount)e.call(t);for(let t of Object.values(this.children))t._destroy();if(this.willDestroy.length)try{for(let e of this.willDestroy)e.call(t)}catch(t){this.app.handleError({error:t,node:this})}this.status=3}async updateAndRender(t,e){this.nextProps=t,t=Object.assign({},t);const n=function(t,e){let n=t.fiber;return n&&(At(n.children),n.root=null),new _t(t,e)}(this,e);this.fiber=n;const o=this.component,s=o.constructor.defaultProps;s&&ie(t,s),se=this;for(const e in t){const n=t[e];n&&"object"==typeof n&&Gt.has(n)&&(t[e]=ae(n))}se=null;const r=Promise.all(this.willUpdateProps.map((e=>e.call(o,t))));if(await r,n!==this.fiber)return;o.props=t,n.render();const i=e.root;this.willPatch.length&&i.willPatch.push(n),this.patched.length&&i.patched.push(n)}updateDom(){if(this.fiber)if(this.bdom===this.fiber.bdom)for(let t in this.children){this.children[t].updateDom()}else this.bdom.patch(this.fiber.bdom,!1),this.fiber.appliedToDom=!0,this.fiber=null}setRef(t,e){e&&(this.refs[t]=e)}firstNode(){const t=this.bdom;return t?t.firstNode():void 0}mount(t,e){const n=this.fiber.bdom;this.bdom=n,n.mount(t,e),this.status=1,this.fiber.appliedToDom=!0,this.children=this.fiber.childrenMap,this.fiber=null}moveBeforeDOMNode(t,e){this.bdom.moveBeforeDOMNode(t,e)}moveBeforeVNode(t,e){this.bdom.moveBeforeVNode(t?t.bdom:null,e)}patch(){this.fiber&&this.fiber.parent&&(this._patch(),this.props=this.nextProps)}_patch(){let t=!1;for(let e in this.children){t=!0;break}const e=this.fiber;this.children=e.childrenMap,this.bdom.patch(e.bdom,t),e.appliedToDom=!0,this.fiber=null}beforeRemove(){this._destroy()}remove(){this.bdom.remove()}get name(){return this.component.constructor.name}get subscriptions(){const t=le.get(this);return t?(e=t,[...Ut.get(e)||[]].map((t=>{const n=Kt.get(t);let o=[];if(n)for(const[t,s]of n)s.has(e)&&o.push(t);return{target:t,keys:o}}))):[];var e}}const de=Symbol("timeout"),fe={onWillStart:3e3,onWillUpdateProps:3e3};function pe(t,e){const n=new r,o=new r,s=re();return(...r)=>{const i=t=>{throw n.cause=t,n.message=t instanceof Error?`The following error occurred in ${e}: "${t.message}"`:`Something that is not an Error was thrown in ${e} (see this Error's "cause" property)`,n};let l;try{l=t(...r)}catch(t){i(t)}if(!(l instanceof Promise))return l;const a=fe[e];if(a){const t=s.fiber;Promise.race([l.catch((()=>{})),new Promise((t=>setTimeout((()=>t(de)),a)))]).then((n=>{n===de&&s.fiber===t&&s.status<=2&&(o.message=`${e}'s promise hasn't resolved after ${a/1e3} seconds`,console.log(o))}))}return l.catch(i)}}function me(t){const e=re(),n=e.app.dev?pe:t=>t;e.mounted.push(n(t.bind(e.component),"onMounted"))}function ge(t){const e=re(),n=e.app.dev?pe:t=>t;e.patched.push(n(t.bind(e.component),"onPatched"))}function be(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUnmount.unshift(n(t.bind(e.component),"onWillUnmount"))}class ve{constructor(t,e,n){this.props=t,this.env=e,this.__owl__=n}setup(){}render(t=!1){this.__owl__.render(!0===t)}}ve.template="";const ye=z("").constructor;class we extends ye{constructor(t,e){super(""),this.target=null,this.selector=t,this.content=e}mount(t,e){super.mount(t,e),this.target=document.querySelector(this.selector),this.target?this.content.mount(this.target,null):this.content.mount(t,e)}beforeRemove(){this.content.beforeRemove()}remove(){this.content&&(super.remove(),this.content.remove(),this.content=null)}patch(t){super.patch(t),this.content?this.content.patch(t.content,!0):(this.content=t.content,this.content.mount(this.target,null))}}class $e extends ve{setup(){const t=this.__owl__;me((()=>{const e=t.bdom;if(!e.target){const t=document.querySelector(this.props.target);if(!t)throw new r("invalid portal target");e.content.moveBeforeDOMNode(t.firstChild,t)}})),be((()=>{t.bdom.remove()}))}}$e.template="__portal__",$e.props={target:{type:String},slots:!0};const xe=t=>Array.isArray(t),Ne=t=>"object"!=typeof t,ke=t=>"object"==typeof t&&t&&"value"in t;function Te(t){return"object"==typeof t&&"optional"in t&&t.optional||!1}function Ee(t){return"*"===t||!0===t?"value":t.name.toLowerCase()}function Ae(t){return Ne(t)?Ee(t):xe(t)?t.map(Ae).join(" or "):ke(t)?String(t.value):"element"in t?`list of ${Ae({type:t.element,optional:!1})}s`:"shape"in t?"object":Ae(t.type||"*")}function _e(t,e){var n;Array.isArray(e)&&(n=e,e=Object.fromEntries(n.map((t=>t.endsWith("?")?[t.slice(0,-1),{optional:!0}]:[t,{type:"*",optional:!1}])))),t=Ft(t);let o=[];for(let n in t)if(n in e){let s=Ce(n,t[n],e[n]);s&&o.push(s)}else"*"in e||o.push(`unknown key '${n}'`);for(let n in e){const s=e[n];if("*"!==n&&!Te(s)&&!(n in t)){const t="object"==typeof s&&!Array.isArray(s);let e="*"===s||(t&&"type"in s?"*"===s.type:t)?"":` (should be a ${Ae(s)})`;o.push(`'${n}' is missing${e}`)}}return o}function Ce(t,e,n){if(void 0===e)return Te(n)?null:`'${t}' is undefined (should be a ${Ae(n)})`;if(Ne(n))return function(t,e,n){if("function"==typeof n)if("object"==typeof e){if(!(e instanceof n))return`'${t}' is not a ${Ee(n)}`}else if(typeof e!==n.name.toLowerCase())return`'${t}' is not a ${Ee(n)}`;return null}(t,e,n);if(ke(n))return e===n.value?null:`'${t}' is not equal to '${n.value}'`;if(xe(n)){let o=n.find((n=>!Ce(t,e,n)));return o?null:`'${t}' is not a ${Ae(n)}`}let o=null;if("element"in n)o=function(t,e,n){if(!Array.isArray(e))return`'${t}' is not a list of ${Ae(n)}s`;for(let o=0;o<e.length;o++){const s=Ce(`${t}[${o}]`,e[o],n);if(s)return s}return null}(t,e,n.element);else if("shape"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=_e(e,n.shape);s.length&&(o=`'${t}' doesn't have the correct shape (${s.join(", ")})`)}else if("values"in n)if("object"!=typeof e||Array.isArray(e))o=`'${t}' is not an object`;else{const s=Object.entries(e).map((([t,e])=>Ce(t,e,n.values))).filter(Boolean);s.length&&(o=`some of the values in '${t}' are invalid (${s.join(", ")})`)}return"type"in n&&!o&&(o=Ce(t,e,n.type)),"validate"in n&&!o&&(o=n.validate(e)?null:`'${t}' is not valid`),o}const De=Object.create;function Se(t){const e=De(t);for(let n in t)e[n]=t[n];return e}const Oe=Symbol("isBoundary");class Re{constructor(t,e,n,o,s){this.fn=t,this.ctx=Se(e),this.component=n,this.node=o,this.key=s}evaluate(){return this.fn.call(this.component,this.ctx,this.node,this.key)}toString(){return this.evaluate().toString()}}function Le(t,e,n){const o="string"!=typeof t?t:n.constructor.components[t];if(!o)return;const s=o.props;if(!s)return void(n.__owl__.app.warnIfNoStaticProps&&console.warn(`Component '${o.name}' does not have a static props description`));const i=o.defaultProps;if(i){let t=t=>Array.isArray(s)?s.includes(t):t in s&&!("*"in s)&&!Te(s[t]);for(let e in i)if(t(e))throw new r(`A default value cannot be defined for a mandatory prop (name: '${e}', component: ${o.name})`)}const l=_e(e,s);if(l.length)throw new r(`Invalid props for component '${o.name}': `+l.join(", "))}const Be={withDefault:function(t,e){return null==t||!1===t?e:t},zero:Symbol("zero"),isBoundary:Oe,callSlot:function(t,e,n,o,r,i,l){n=n+"__slot_"+o;const a=t.props.slots||{},{__render:c,__ctx:h,__scope:u}=a[o]||{},d=De(h||{});u&&(d[u]=i);const f=c?c(d,e,n):null;if(l){let i,a;return f?i=r?s(o,f):f:a=l(t,e,n),j([i,a])}return f||z("")},capture:Se,withKey:function(t,e){return t.key=e,t},prepareList:function(t){let e,n;if(Array.isArray(t))e=t,n=t;else if(t instanceof Map)e=[...t.keys()],n=[...t.values()];else if(Symbol.iterator in Object(t))e=[...t],n=e;else{if(!t||"object"!=typeof t)throw new r(`Invalid loop expression: "${t}" is not iterable`);n=Object.values(t),e=Object.keys(t)}const o=n.length;return[e,n,o,new Array(o)]},setContextValue:function(t,e,n){const o=t;for(;!t.hasOwnProperty(e)&&!t.hasOwnProperty(Oe);){const e=t.__proto__;if(!e){t=o;break}t=e}t[e]=n},shallowEqual:function(t,e){for(let n=0,o=t.length;n<o;n++)if(t[n]!==e[n])return!1;return!0},toNumber:function(t){const e=parseFloat(t);return isNaN(e)?t:e},validateProps:Le,LazyValue:Re,safeOutput:function(t,e){if(null==t)return e?s("default",e):s("undefined",z(""));let n,o;switch(typeof t){case"object":t instanceof k?(n="string_safe",o=wt(t)):t instanceof Re?(n="lazy_value",o=t.evaluate()):t instanceof String?(n="string_unsafe",o=z(t)):(n="block_safe",o=t);break;case"string":n="string_unsafe",o=z(t);break;default:n="string_unsafe",o=z(String(t))}return s(n,o)},createCatcher:function(t){const e=Object.keys(t).length;class n{constructor(t,e){this.handlerFns=[],this.afterNode=null,this.child=t,this.handlerData=e}mount(e,n){this.parentEl=e,this.child.mount(e,n),this.afterNode=document.createTextNode(""),e.insertBefore(this.afterNode,n),this.wrapHandlerData();for(let n in t){const o=t[n],s=A(n);this.handlerFns[o]=s,s.setup.call(e,this.handlerData[o])}}wrapHandlerData(){for(let t=0;t<e;t++){let e=this.handlerData[t],n=e.length-2,o=e[n];const s=this;e[n]=function(t){const e=t.target;let n=s.child.firstNode();const r=s.afterNode;for(;n&&n!==r;){if(n.contains(e))return o.call(this,t);n=n.nextSibling}}}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,this.child.moveBeforeDOMNode(t,e),e.insertBefore(this.afterNode,t)}moveBeforeVNode(t,e){t&&(e=t.firstNode()||e),this.child.moveBeforeVNode(t?t.child:null,e),this.parentEl.insertBefore(this.afterNode,e)}patch(t,n){if(this!==t){this.handlerData=t.handlerData,this.wrapHandlerData();for(let t=0;t<e;t++)this.handlerFns[t].update.call(this.parentEl,this.handlerData[t]);this.child.patch(t.child,n)}}beforeRemove(){this.child.beforeRemove()}remove(){for(let t=0;t<e;t++)this.handlerFns[t].remove.call(this.parentEl);this.child.remove(),this.afterNode.remove()}firstNode(){return this.child.firstNode()}toString(){return this.child.toString()}}return function(t,e){return new n(t,e)}},markRaw:Vt,OwlError:r,makeRefWrapper:function(t){let e=new Set;return(n,o)=>{if(e.has(n))throw new r(`Cannot set the same ref more than once in the same component, ref "${n}" was set multiple times in ${t.name}`);return e.add(n),o}}};function Pe(t){const e=(new DOMParser).parseFromString(t,"text/xml");if(e.getElementsByTagName("parsererror").length){let n="Invalid XML in template.";const o=e.getElementsByTagName("parsererror")[0].textContent;if(o){n+="\nThe parser has produced the following error message:\n"+o;const e=/\d+/g,s=e.exec(o);if(s){const r=Number(s[0]),i=t.split("\n")[r-1],l=e.exec(o);if(i&&l){const t=Number(l[0])-1;i[t]&&(n+=`\nThe error might be located at xml line ${r} column ${t}\n${i}\n${"-".repeat(t-1)}^`)}}}throw new r(n)}return e}const je={text:z,createBlock:nt,list:bt,multi:j,html:wt,toggler:s,comment:H};class Me{constructor(t={}){if(this.rawTemplates=Object.create(Ie),this.templates={},this.Portal=$e,this.dev=t.dev||!1,this.translateFn=t.translateFn,this.translatableAttributes=t.translatableAttributes,t.templates)if(t.templates instanceof Document||"string"==typeof t.templates)this.addTemplates(t.templates);else for(const e in t.templates)this.addTemplate(e,t.templates[e]);this.getRawTemplate=t.getTemplate,this.customDirectives=t.customDirectives||{},this.runtimeUtils={...Be,__globals__:t.globalValues||{}},this.hasGlobalValues=Boolean(t.globalValues&&Object.keys(t.globalValues).length)}static registerTemplate(t,e){Ie[t]=e}addTemplate(t,e){if(t in this.rawTemplates){if(!this.dev)return;const n=this.rawTemplates[t];if(("string"==typeof n?n:n instanceof Element?n.outerHTML:n.toString())===("string"==typeof e?e:e.outerHTML))return;throw new r(`Template ${t} already defined with different content`)}this.rawTemplates[t]=e}addTemplates(t){if(t){t=t instanceof Document?t:Pe(t);for(const e of t.querySelectorAll("[t-name]")){const t=e.getAttribute("t-name");this.addTemplate(t,e)}}}getTemplate(t){var e;if(!(t in this.templates)){const n=(null===(e=this.getRawTemplate)||void 0===e?void 0:e.call(this,t))||this.rawTemplates[t];if(void 0===n){let e="";try{e=` (for component "${re().component.constructor.name}")`}catch{}throw new r(`Missing template: "${t}"${e}`)}const o="function"==typeof n&&!(n instanceof Element)?n:this._compileTemplate(t,n),s=this.templates;this.templates[t]=function(e,n){return s[t].call(this,e,n)};const i=o(this,je,this.runtimeUtils);this.templates[t]=i}return this.templates[t]}_compileTemplate(t,e){throw new r("Unable to compile a template. Please use owl full build instead")}callTemplate(t,e,n,o,r){return s(e,this.getTemplate(e).call(t,n,o,r+e))}}const Ie={};function We(...t){const e="__template__"+We.nextId++,n=String.raw(...t);return Ie[e]=n,e}We.nextId=1,Me.registerTemplate("__portal__",(function(t,e,n){let{callSlot:o}=n;return function(t,e,n=""){return new we(t.props.target,o(t,e,n,"default",!1,null))}}));const Ve="true,false,NaN,null,undefined,debugger,console,window,in,instanceof,new,function,return,eval,void,Math,RegExp,Array,Object,Date,__globals__".split(","),Fe=Object.assign(Object.create(null),{and:"&&",or:"||",gt:">",gte:">=",lt:"<",lte:"<="}),Ke=Object.assign(Object.create(null),{"{":"LEFT_BRACE","}":"RIGHT_BRACE","[":"LEFT_BRACKET","]":"RIGHT_BRACKET",":":"COLON",",":"COMMA","(":"LEFT_PAREN",")":"RIGHT_PAREN"}),ze="...,.,===,==,+,!==,!=,!,||,&&,>=,>,<=,<,?,-,*,/,%,typeof ,=>,=,;,in ,new ,|,&,^,~".split(",");const He=[function(t){let e=t[0],n=e;if("'"!==e&&'"'!==e&&"`"!==e)return!1;let o,s=1;for(;t[s]&&t[s]!==n;){if(o=t[s],e+=o,"\\"===o){if(s++,o=t[s],!o)throw new r("Invalid expression");e+=o}s++}if(t[s]!==n)throw new r("Invalid expression");return e+=n,"`"===n?{type:"TEMPLATE_STRING",value:e,replace:t=>e.replace(/\$\{(.*?)\}/g,((e,n)=>"${"+t(n)+"}"))}:{type:"VALUE",value:e}},function(t){let e=t[0];if(e&&e.match(/[0-9]/)){let n=1;for(;t[n]&&t[n].match(/[0-9]|\./);)e+=t[n],n++;return{type:"VALUE",value:e}}return!1},function(t){for(let e of ze)if(t.startsWith(e))return{type:"OPERATOR",value:e};return!1},function(t){let e=t[0];if(e&&e.match(/[a-zA-Z_\$]/)){let n=1;for(;t[n]&&t[n].match(/\w/);)e+=t[n],n++;return e in Fe?{type:"OPERATOR",value:Fe[e],size:e.length}:{type:"SYMBOL",value:e}}return!1},function(t){const e=t[0];return!(!e||!(e in Ke))&&{type:Ke[e],value:e}}];const Ue=t=>t&&("LEFT_BRACE"===t.type||"COMMA"===t.type),qe=t=>t&&("RIGHT_BRACE"===t.type||"COMMA"===t.type);function Ge(t){const e=new Set,n=function(t){const e=[];let n,o=!0,s=t;try{for(;o;)if(s=s.trim(),s){for(let t of He)if(o=t(s),o){e.push(o),s=s.slice(o.size||o.value.length);break}}else o=!1}catch(t){n=t}if(s.length||n)throw new r(`Tokenizer error: could not tokenize \`${t}\``);return e}(t);let o=0,s=[];for(;o<n.length;){let t=n[o],r=n[o-1],i=n[o+1],l=s[s.length-1];switch(t.type){case"LEFT_BRACE":case"LEFT_BRACKET":case"LEFT_PAREN":s.push(t.type);break;case"RIGHT_BRACE":case"RIGHT_BRACKET":case"RIGHT_PAREN":s.pop()}let a="SYMBOL"===t.type&&!Ve.includes(t.value);if("SYMBOL"!==t.type||Ve.includes(t.value)||r&&("LEFT_BRACE"===l&&Ue(r)&&qe(i)&&(n.splice(o+1,0,{type:"COLON",value:":"},{...t}),i=n[o+1]),"OPERATOR"===r.type&&"."===r.value?a=!1:"LEFT_BRACE"!==r.type&&"COMMA"!==r.type||i&&"COLON"===i.type&&(a=!1)),"TEMPLATE_STRING"===t.type&&(t.value=t.replace((t=>Ye(t)))),i&&"OPERATOR"===i.type&&"=>"===i.value)if("RIGHT_PAREN"===t.type){let t=o-1;for(;t>0&&"LEFT_PAREN"!==n[t].type;)"SYMBOL"===n[t].type&&n[t].originalValue&&(n[t].value=n[t].originalValue,e.add(n[t].value)),t--}else e.add(t.value);a&&(t.varName=t.value,e.has(t.value)||(t.originalValue=t.value,t.value=`ctx['${t.value}']`)),o++}for(const t of n)"SYMBOL"===t.type&&t.varName&&e.has(t.value)&&(t.originalValue=t.value,t.value=`_${t.value}`,t.isLocal=!0);return n}const Xe=new Map([["in "," in "]]);function Ye(t){return Ge(t).map((t=>Xe.get(t.value)||t.value)).join("")}const Ze=/\{\{.*?\}\}|\#\{.*?\}/g;function Je(t,e){let n=t.match(Ze);if(n&&n[0].length===t.length)return`(${e(t.slice(2,"{"===n[0][0]?-2:-1))})`;let o=t.replace(Ze,(t=>"${"+e(t.slice(2,"{"===t[0]?-2:-1))+"}"));return"`"+o+"`"}function Qe(t){return Je(t,Ye)}const tn=/\s+/g;let en;"undefined"!=typeof document&&(en=document.implementation.createDocument(null,null,null));const nn=new Set(["stop","capture","prevent","self","synthetic"]);let on={};function sn(t=""){return on[t]=(on[t]||0)+1,t+on[t]}function rn(t,e){switch(t){case"input":return"checked"===e||"indeterminate"===e||"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"option":return"selected"===e||"disabled"===e;case"textarea":return"value"===e||"readonly"===e||"readOnly"===e||"disabled"===e;case"select":return"value"===e||"disabled"===e;case"button":case"optgroup":return"disabled"===e}return!1}function ln(t){return`\`${t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/,"\\${")}\``}class an{constructor(t,e){this.dynamicTagName=null,this.isRoot=!1,this.hasDynamicChildren=!1,this.children=[],this.data=[],this.childNumber=0,this.parentVar="",this.id=an.nextBlockId++,this.varName="b"+this.id,this.blockName="block"+this.id,this.target=t,this.type=e}insertData(t,e="d"){const n=sn(e);return this.target.addLine(`let ${n} = ${t};`),this.data.push(n)-1}insert(t){this.currentDom?this.currentDom.appendChild(t):this.dom=t}generateExpr(t){if("block"===this.type){const t=this.children.length;let e=this.data.length?`[${this.data.join(", ")}]`:t?"[]":"";return t&&(e+=", ["+this.children.map((t=>t.varName)).join(", ")+"]"),this.dynamicTagName?`toggler(${this.dynamicTagName}, ${this.blockName}(${this.dynamicTagName})(${e}))`:`${this.blockName}(${e})`}return"list"===this.type?`list(c_block${this.id})`:t}asXmlString(){const t=en.createElement("t");return t.appendChild(this.dom),t.innerHTML}}function cn(t,e){return Object.assign({block:null,index:0,forceNewBlock:!0,translate:t.translate,translationCtx:t.translationCtx,tKeyExpr:null,nameSpace:t.nameSpace,tModelSelectedExpr:t.tModelSelectedExpr},e)}an.nextBlockId=1;class hn{constructor(t,e){this.indentLevel=0,this.loopLevel=0,this.code=[],this.hasRoot=!1,this.hasCache=!1,this.shouldProtectScope=!1,this.hasRefWrapper=!1,this.name=t,this.on=e||null}addLine(t,e){const n=new Array(this.indentLevel+2).join(" ");void 0===e?this.code.push(n+t):this.code.splice(e,0,n+t)}generateCode(){let t=[];t.push(`function ${this.name}(ctx, node, key = "") {`),this.shouldProtectScope&&(t.push(" ctx = Object.create(ctx);"),t.push(" ctx[isBoundary] = 1")),this.hasRefWrapper&&t.push(" let refWrapper = makeRefWrapper(this.__owl__);"),this.hasCache&&(t.push(" let cache = ctx.cache || {};"),t.push(" let nextCache = ctx.cache = {};"));for(let e of this.code)t.push(e);return this.hasRoot||t.push("return text('');"),t.push("}"),t.join("\n ")}currentKey(t){let e=this.loopLevel?`key${this.loopLevel}`:"key";return t.tKeyExpr&&(e=`${t.tKeyExpr} + ${e}`),e}}const un=["alt","aria-label","aria-placeholder","aria-roledescription","aria-valuetext","label","placeholder","title"],dn=/^(\s*)([\s\S]+?)(\s*)$/;class fn{constructor(t,e){if(this.blocks=[],this.nextBlockId=1,this.isDebug=!1,this.targets=[],this.target=new hn("template"),this.translatableAttributes=un,this.staticDefs=[],this.slotNames=new Set,this.helpers=new Set,this.translateFn=e.translateFn||(t=>t),e.translatableAttributes){const t=new Set(un);for(let n of e.translatableAttributes)n.startsWith("-")?t.delete(n.slice(1)):t.add(n);this.translatableAttributes=[...t]}this.hasSafeContext=e.hasSafeContext||!1,this.dev=e.dev||!1,this.ast=t,this.templateName=e.name,e.hasGlobalValues&&this.helpers.add("__globals__")}generateCode(){const t=this.ast;this.isDebug=12===t.type,an.nextBlockId=1,on={},this.compileAST(t,{block:null,index:0,forceNewBlock:!1,isLast:!0,translate:!0,translationCtx:"",tKeyExpr:null});let e=[" let { text, createBlock, list, multi, html, toggler, comment } = bdom;"];this.helpers.size&&e.push(`let { ${[...this.helpers].join(", ")} } = helpers;`),this.templateName&&e.push(`// Template name: "${this.templateName}"`);for(let{id:t,expr:n}of this.staticDefs)e.push(`const ${t} = ${n};`);if(this.blocks.length){e.push("");for(let t of this.blocks)if(t.dom){let n=ln(t.asXmlString());t.dynamicTagName?(n=n.replace(/^`<\w+/,`\`<\${tag || '${t.dom.nodeName}'}`),n=n.replace(/\w+>`$/,`\${tag || '${t.dom.nodeName}'}>\``),e.push(`let ${t.blockName} = tag => createBlock(${n});`)):e.push(`let ${t.blockName} = createBlock(${n});`)}}if(this.targets.length)for(let t of this.targets)e.push(""),e=e.concat(t.generateCode());e.push(""),e=e.concat("return "+this.target.generateCode());const n=e.join("\n ");if(this.isDebug){const t=`[Owl Debug]\n${n}`;console.log(t)}return n}compileInNewTarget(t,e,n,o){const s=sn(t),r=this.target,i=new hn(s,o);return this.targets.push(i),this.target=i,this.compileAST(e,cn(n)),this.target=r,s}addLine(t,e){this.target.addLine(t,e)}define(t,e){this.addLine(`const ${t} = ${e};`)}insertAnchor(t,e=t.children.length){const n=`block-child-${e}`,o=en.createElement(n);t.insert(o)}createBlock(t,e,n){const o=this.target.hasRoot,s=new an(this.target,e);return o||(this.target.hasRoot=!0,s.isRoot=!0),t&&(t.children.push(s),"list"===t.type&&(s.parentVar=`c_block${t.id}`)),s}insertBlock(t,e,n){let o=e.generateExpr(t);if(e.parentVar){let t=this.target.currentKey(n);return this.helpers.add("withKey"),void this.addLine(`${e.parentVar}[${n.index}] = withKey(${o}, ${t});`)}n.tKeyExpr&&(o=`toggler(${n.tKeyExpr}, ${o})`),e.isRoot?(this.target.on&&(o=this.wrapWithEventCatcher(o,this.target.on)),this.addLine(`return ${o};`)):this.define(e.varName,o)}captureExpression(t,e=!1){if(!e&&!t.includes("=>"))return Ye(t);const n=Ge(t),o=new Map;return n.map((t=>{if(t.varName&&!t.isLocal){if(!o.has(t.varName)){const e=sn("v");o.set(t.varName,e),this.define(e,t.value)}t.value=o.get(t.varName)}return t.value})).join("")}translate(t,e){const n=dn.exec(t);return n[1]+this.translateFn(n[2],e)+n[3]}compileAST(t,e){switch(t.type){case 1:return this.compileComment(t,e);case 0:return this.compileText(t,e);case 2:return this.compileTDomNode(t,e);case 4:return this.compileTEsc(t,e);case 8:return this.compileTOut(t,e);case 5:return this.compileTIf(t,e);case 9:return this.compileTForeach(t,e);case 10:return this.compileTKey(t,e);case 3:return this.compileMulti(t,e);case 7:return this.compileTCall(t,e);case 15:return this.compileTCallBlock(t,e);case 6:return this.compileTSet(t,e);case 11:return this.compileComponent(t,e);case 12:return this.compileDebug(t,e);case 13:return this.compileLog(t,e);case 14:return this.compileTSlot(t,e);case 16:return this.compileTTranslation(t,e);case 17:return this.compileTTranslationContext(t,e);case 18:return this.compileTPortal(t,e)}}compileDebug(t,e){return this.addLine("debugger;"),t.content?this.compileAST(t.content,e):null}compileLog(t,e){return this.addLine(`console.log(${Ye(t.expr)});`),t.content?this.compileAST(t.content,e):null}compileComment(t,e){let{block:n,forceNewBlock:o}=e;if(!n||o)n=this.createBlock(n,"comment",e),this.insertBlock(`comment(${ln(t.value)})`,n,{...e,forceNewBlock:o&&!n});else{const e=en.createComment(t.value);n.insert(e)}return n.varName}compileText(t,e){let{block:n,forceNewBlock:o}=e,s=t.value;if(s&&!1!==e.translate&&(s=this.translate(s,e.translationCtx)),e.inPreTag||(s=s.replace(tn," ")),!n||o)n=this.createBlock(n,"text",e),this.insertBlock(`text(${ln(s)})`,n,{...e,forceNewBlock:o&&!n});else{const e=0===t.type?en.createTextNode:en.createComment;n.insert(e.call(en,s))}return n.varName}generateHandlerCode(t,e){const n=t.split(".").slice(1).map((t=>{if(!nn.has(t))throw new r(`Unknown event modifier: '${t}'`);return`"${t}"`}));let o="";return n.length&&(o=`${n.join(",")}, `),`[${o}${this.captureExpression(e)}, ctx]`}compileTDomNode(t,e){var n;let{block:o,forceNewBlock:s}=e;const r=!o||s||null!==t.dynamicTag||t.ns;let i=this.target.code.length;if(r&&((t.dynamicTag||e.tKeyExpr||t.ns)&&e.block&&this.insertAnchor(e.block),o=this.createBlock(o,"block",e),this.blocks.push(o),t.dynamicTag)){const e=sn("tag");this.define(e,Ye(t.dynamicTag)),o.dynamicTagName=e}const l={};for(let s in t.attrs){let r,i;if(s.startsWith("t-attf")){r=Qe(t.attrs[s]);const e=o.insertData(r,"attr");i=s.slice(7),l["block-attribute-"+e]=i}else if(s.startsWith("t-att"))if(i="t-att"===s?null:s.slice(6),r=Ye(t.attrs[s]),i&&rn(t.tag,i)){"readonly"===i&&(i="readOnly"),r="value"===i?`new String((${r}) === 0 ? 0 : ((${r}) || ""))`:`new Boolean(${r})`;l[`block-property-${o.insertData(r,"prop")}`]=i}else{const t=o.insertData(r,"attr");"t-att"===s?l["block-attributes"]=String(t):l[`block-attribute-${t}`]=i}else if(this.translatableAttributes.includes(s)){const o=(null===(n=t.attrsTranslationCtx)||void 0===n?void 0:n[s])||e.translationCtx;l[s]=this.translateFn(t.attrs[s],o)}else r=`"${t.attrs[s]}"`,i=s,l[s]=t.attrs[s];if("value"===i&&e.tModelSelectedExpr){l[`block-attribute-${o.insertData(`${e.tModelSelectedExpr} === ${r}`,"attr")}`]="selected"}}let a;if(t.model){const{hasDynamicChildren:e,baseExpr:n,expr:s,eventType:r,shouldNumberize:i,shouldTrim:c,targetAttr:h,specialInitTargetAttr:u}=t.model,d=Ye(n),f=sn("bExpr");this.define(f,d);const p=Ye(s),m=sn("expr");this.define(m,p);const g=`${f}[${m}]`;let b;if(u){let e=h in l&&`'${l[h]}'`;if(!e&&t.attrs){const n=t.attrs[`t-att-${h}`];n&&(e=Ye(n))}b=o.insertData(`${g} === ${e}`,"prop"),l[`block-property-${b}`]=u}else if(e){a=`${sn("bValue")}`,this.define(a,g)}else b=o.insertData(`${g}`,"prop"),l[`block-property-${b}`]=h;this.helpers.add("toNumber");let v=`ev.target.${h}`;v=c?`${v}.trim()`:v,v=i?`toNumber(${v})`:v;const y=`[(ev) => { ${g} = ${v}; }]`;b=o.insertData(y,"hdlr"),l[`block-handler-${b}`]=r}for(let e in t.on){const n=this.generateHandlerCode(e,t.on[e]);l[`block-handler-${o.insertData(n,"hdlr")}`]=e}if(t.ref){this.dev&&(this.helpers.add("makeRefWrapper"),this.target.hasRefWrapper=!0);const e=Ze.test(t.ref);let n=`\`${t.ref}\``;e&&(n=Je(t.ref,(t=>this.captureExpression(t,!0))));let s=`(el) => this.__owl__.setRef((${n}), el)`;this.dev&&(s=`refWrapper(${n}, ${s})`);const r=o.insertData(s,"ref");l["block-ref"]=String(r)}const c=t.ns||e.nameSpace,h=c?en.createElementNS(c,t.tag):en.createElement(t.tag);for(const[t,e]of Object.entries(l))"class"===t&&""===e||h.setAttribute(t,e);if(o.insert(h),t.content.length){const n=o.currentDom;o.currentDom=h;const s=t.content;for(let n=0;n<s.length;n++){const r=t.content[n],i=cn(e,{block:o,index:o.childNumber,forceNewBlock:!1,isLast:e.isLast&&n===s.length-1,tKeyExpr:e.tKeyExpr,nameSpace:c,tModelSelectedExpr:a,inPreTag:e.inPreTag||"pre"===t.tag});this.compileAST(r,i)}o.currentDom=n}if(r&&(this.insertBlock(`${o.blockName}(ddd)`,o,e),o.children.length&&o.hasDynamicChildren)){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=i;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,i)}return o.varName}compileTEsc(t,e){let n,{block:o,forceNewBlock:s}=e;if("0"===t.expr?(this.helpers.add("zero"),n="ctx[zero]"):(n=Ye(t.expr),t.defaultValue&&(this.helpers.add("withDefault"),n=`withDefault(${n}, ${ln(t.defaultValue)})`)),!o||s)o=this.createBlock(o,"text",e),this.insertBlock(`text(${n})`,o,{...e,forceNewBlock:s&&!o});else{const t=o.insertData(n,"txt"),e=en.createElement(`block-text-${t}`);o.insert(e)}return o.varName}compileTOut(t,e){let n,{block:o}=e;if(o&&this.insertAnchor(o),o=this.createBlock(o,"html",e),"0"===t.expr)this.helpers.add("zero"),n="ctx[zero]";else if(t.body){let o=null;o=an.nextBlockId;const s=cn(e);this.compileAST({type:3,content:t.body},s),this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)}, b${o})`}else this.helpers.add("safeOutput"),n=`safeOutput(${Ye(t.expr)})`;return this.insertBlock(n,o,e),o.varName}compileTIfBranch(t,e,n){this.target.indentLevel++;let o=e.children.length;this.compileAST(t,cn(n,{block:e,index:n.index})),e.children.length>o&&this.insertAnchor(e,o),this.target.indentLevel--}compileTIf(t,e,n){let{block:o,forceNewBlock:s}=e;const r=this.target.code.length,i=!o||"multi"!==o.type&&s;if(o&&(o.hasDynamicChildren=!0),(!o||"multi"!==o.type&&s)&&(o=this.createBlock(o,"multi",e)),this.addLine(`if (${Ye(t.condition)}) {`),this.compileTIfBranch(t.content,o,e),t.tElif)for(let n of t.tElif)this.addLine(`} else if (${Ye(n.condition)}) {`),this.compileTIfBranch(n.content,o,e);if(t.tElse&&(this.addLine("} else {"),this.compileTIfBranch(t.tElse,o,e)),this.addLine("}"),i){if(o.children.length){const t=this.target.code,e=o.children.slice();let n=e.shift();for(let o=r;o<t.length&&(!t[o].trimStart().startsWith(`const ${n.varName} `)||(t[o]=t[o].replace(`const ${n.varName}`,n.varName),n=e.shift(),n));o++);this.addLine(`let ${o.children.map((t=>t.varName)).join(", ")};`,r)}const t=o.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,o,e)}return o.varName}compileTForeach(t,e){let{block:n}=e;n&&this.insertAnchor(n),n=this.createBlock(n,"list",e),this.target.loopLevel++;const o=`i${this.target.loopLevel}`;this.addLine("ctx = Object.create(ctx);");const s=`v_block${n.id}`,r=`k_block${n.id}`,i=`l_block${n.id}`,l=`c_block${n.id}`;let a;this.helpers.add("prepareList"),this.define(`[${r}, ${s}, ${i}, ${l}]`,`prepareList(${Ye(t.collection)});`),this.dev&&this.define(`keys${n.id}`,"new Set()"),this.addLine(`for (let ${o} = 0; ${o} < ${i}; ${o}++) {`),this.target.indentLevel++,this.addLine(`ctx[\`${t.elem}\`] = ${r}[${o}];`),t.hasNoFirst||this.addLine(`ctx[\`${t.elem}_first\`] = ${o} === 0;`),t.hasNoLast||this.addLine(`ctx[\`${t.elem}_last\`] = ${o} === ${r}.length - 1;`),t.hasNoIndex||this.addLine(`ctx[\`${t.elem}_index\`] = ${o};`),t.hasNoValue||this.addLine(`ctx[\`${t.elem}_value\`] = ${s}[${o}];`),this.define(`key${this.target.loopLevel}`,t.key?Ye(t.key):o),this.dev&&(this.helpers.add("OwlError"),this.addLine(`if (keys${n.id}.has(String(key${this.target.loopLevel}))) { throw new OwlError(\`Got duplicate key in t-foreach: \${key${this.target.loopLevel}}\`)}`),this.addLine(`keys${n.id}.add(String(key${this.target.loopLevel}));`)),t.memo&&(this.target.hasCache=!0,a=sn(),this.define(`memo${a}`,Ye(t.memo)),this.define(`vnode${a}`,`cache[key${this.target.loopLevel}];`),this.addLine(`if (vnode${a}) {`),this.target.indentLevel++,this.addLine(`if (shallowEqual(vnode${a}.memo, memo${a})) {`),this.target.indentLevel++,this.addLine(`${l}[${o}] = vnode${a};`),this.addLine(`nextCache[key${this.target.loopLevel}] = vnode${a};`),this.addLine("continue;"),this.target.indentLevel--,this.addLine("}"),this.target.indentLevel--,this.addLine("}"));const c=cn(e,{block:n,index:o});return this.compileAST(t.body,c),t.memo&&this.addLine(`nextCache[key${this.target.loopLevel}] = Object.assign(${l}[${o}], {memo: memo${a}});`),this.target.indentLevel--,this.target.loopLevel--,this.addLine("}"),e.isLast||this.addLine("ctx = ctx.__proto__;"),this.insertBlock("l",n,e),n.varName}compileTKey(t,e){const n=sn("tKey_");return this.define(n,Ye(t.expr)),e=cn(e,{tKeyExpr:n,block:e.block,index:e.index}),this.compileAST(t.content,e)}compileMulti(t,e){let{block:n,forceNewBlock:o}=e;const s=!n||o;let r=this.target.code.length;if(s){let o=null;if(t.content.filter((t=>!t.hasNoRepresentation)).length<=1){for(let n of t.content){const t=this.compileAST(n,e);o=o||t}return o}n=this.createBlock(n,"multi",e)}let i=0;for(let o=0,s=t.content.length;o<s;o++){const r=t.content[o],l=!r.hasNoRepresentation,a=cn(e,{block:n,index:i,forceNewBlock:l,isLast:e.isLast&&o===s-1});this.compileAST(r,a),l&&i++}if(s){if(n.hasDynamicChildren&&n.children.length){const t=this.target.code,e=n.children.slice();let o=e.shift();for(let n=r;n<t.length&&(!t[n].trimStart().startsWith(`const ${o.varName} `)||(t[n]=t[n].replace(`const ${o.varName}`,o.varName),o=e.shift(),o));n++);this.addLine(`let ${n.children.map((t=>t.varName)).join(", ")};`,r)}const t=n.children.map((t=>t.varName)).join(", ");this.insertBlock(`multi([${t}])`,n,e)}return n.varName}compileTCall(t,e){let{block:n,forceNewBlock:o}=e,s=e.ctxVar||"ctx";t.context&&(s=sn("ctx"),this.addLine(`let ${s} = ${Ye(t.context)};`));const r=Ze.test(t.name),i=r?Qe(t.name):"`"+t.name+"`";if(n&&!o&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),t.body){this.addLine(`${s} = Object.create(${s});`),this.addLine(`${s}[isBoundary] = 1;`),this.helpers.add("isBoundary");const n=cn(e,{ctxVar:s}),o=this.compileMulti({type:3,content:t.body},n);o&&(this.helpers.add("zero"),this.addLine(`${s}[zero] = ${o};`))}const l=this.generateComponentKey();if(r){const t=sn("template");this.staticDefs.find((t=>"call"===t.id))||this.staticDefs.push({id:"call",expr:"app.callTemplate.bind(app)"}),this.define(t,i),this.insertBlock(`call(this, ${t}, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}else{const t=sn("callTemplate_");this.staticDefs.push({id:t,expr:`app.getTemplate(${i})`}),this.insertBlock(`${t}.call(this, ${s}, node, ${l})`,n,{...e,forceNewBlock:!n})}return t.body&&!e.isLast&&this.addLine(`${s} = ${s}.__proto__;`),n.varName}compileTCallBlock(t,e){let{block:n,forceNewBlock:o}=e;return n&&(o||this.insertAnchor(n)),n=this.createBlock(n,"multi",e),this.insertBlock(Ye(t.name),n,{...e,forceNewBlock:!n}),n.varName}compileTSet(t,e){this.target.shouldProtectScope=!0,this.helpers.add("isBoundary").add("withDefault");const n=t.value?Ye(t.value||""):"null";if(t.body){this.helpers.add("LazyValue");const o={type:3,content:t.body};let s=`new LazyValue(${this.compileInNewTarget("value",o,e)}, ctx, this, node, ${this.target.currentKey(e)})`;s=t.value?s?`withDefault(${n}, ${s})`:n:s,this.addLine(`ctx[\`${t.name}\`] = ${s};`)}else{let o;if(t.defaultValue){const s=ln(e.translate?this.translate(t.defaultValue,e.translationCtx):t.defaultValue);o=t.value?`withDefault(${n}, ${s})`:s}else o=n;this.helpers.add("setContextValue"),this.addLine(`setContextValue(${e.ctxVar||"ctx"}, "${t.name}", ${o});`)}return null}generateComponentKey(t="key"){const e=[sn("__")];for(let t=0;t<this.target.loopLevel;t++)e.push(`\${key${t+1}}`);return`${t} + \`${e.join("__")}\``}formatProp(t,e,n,o){if(t.endsWith(".translate")){const s=(null==n?void 0:n[t])||o;e=ln(this.translateFn(e,s))}else e=this.captureExpression(e);if(t.includes(".")){let[n,o]=t.split(".");switch(t=n,o){case"bind":e=`(${e}).bind(this)`;break;case"alike":case"translate":break;default:throw new r(`Invalid prop suffix: ${o}`)}}return`${t=/^[a-z_]+$/i.test(t)?t:`'${t}'`}: ${e||void 0}`}formatPropObject(t,e,n){return Object.entries(t).map((([t,o])=>this.formatProp(t,o,e,n)))}getPropString(t,e){let n=`{${t.join(",")}}`;return e&&(n=`Object.assign({}, ${Ye(e)}${t.length?", "+n:""})`),n}compileComponent(t,e){let{block:n}=e;const o="slots"in(t.props||{}),s=t.props?this.formatPropObject(t.props,t.propsTranslationCtx,e.translationCtx):[];let r="";if(t.slots){let n="ctx";!this.target.loopLevel&&this.hasSafeContext||(n=sn("ctx"),this.helpers.add("capture"),this.define(n,"capture(ctx)"));let o=[];for(let s in t.slots){const r=t.slots[s],i=[];if(r.content){const t=this.compileInNewTarget("slot",r.content,e,r.on);i.push(`__render: ${t}.bind(this), __ctx: ${n}`)}const l=t.slots[s].scope;l&&i.push(`__scope: "${l}"`),t.slots[s].attrs&&i.push(...this.formatPropObject(t.slots[s].attrs,t.slots[s].attrsTranslationCtx,e.translationCtx));const a=`{${i.join(", ")}}`;o.push(`'${s}': ${a}`)}r=`{${o.join(", ")}}`}!r||t.dynamicProps||o||(this.helpers.add("markRaw"),s.push(`slots: markRaw(${r})`));let i,l,a=this.getPropString(s,t.dynamicProps);(r&&(t.dynamicProps||o)||this.dev)&&(i=sn("props"),this.define(i,a),a=i),r&&(t.dynamicProps||o)&&(this.helpers.add("markRaw"),this.addLine(`${i}.slots = markRaw(Object.assign(${r}, ${i}.slots))`)),t.isDynamic?(l=sn("Comp"),this.define(l,Ye(t.name))):l=`\`${t.name}\``,this.dev&&this.addLine(`helpers.validateProps(${l}, ${i}, this);`),n&&(!1===e.forceNewBlock||e.tKeyExpr)&&this.insertAnchor(n);let c=this.generateComponentKey();e.tKeyExpr&&(c=`${e.tKeyExpr} + ${c}`);let h=sn("comp");const u=[];for(let e in t.props||{}){let[t,n]=e.split(".");n||u.push(`"${t}"`)}this.staticDefs.push({id:h,expr:`app.createComponent(${t.isDynamic?null:l}, ${!t.isDynamic}, ${!!t.slots}, ${!!t.dynamicProps}, [${u}])`}),t.isDynamic&&(c=`(${l}).name + ${c}`);let d=`${h}(${a}, ${c}, node, this, ${t.isDynamic?l:null})`;return t.isDynamic&&(d=`toggler(${l}, ${d})`),t.on&&(d=this.wrapWithEventCatcher(d,t.on)),n=this.createBlock(n,"multi",e),this.insertBlock(d,n,e),n.varName}wrapWithEventCatcher(t,e){this.helpers.add("createCatcher");let n=sn("catcher"),o={},s=[];for(let t in e){let n=sn("hdlr"),r=s.push(n)-1;o[t]=r;const i=this.generateHandlerCode(t,e[t]);this.define(n,i)}return this.staticDefs.push({id:n,expr:`createCatcher(${JSON.stringify(o)})`}),`${n}(${t}, [${s.join(",")}])`}compileTSlot(t,e){this.helpers.add("callSlot");let n,o,{block:s}=e,r=!1,i=!1;t.name.match(Ze)?(r=!0,i=!0,o=Qe(t.name)):(o="'"+t.name+"'",i=i||this.slotNames.has(t.name),this.slotNames.add(t.name));const l={...t.attrs},a=l["t-props"];delete l["t-props"];let c=this.target.loopLevel?`key${this.target.loopLevel}`:"key";i&&(c=this.generateComponentKey(c));const h=t.attrs?this.formatPropObject(l,t.attrsTranslationCtx,e.translationCtx):[],u=this.getPropString(h,a);if(t.defaultContent){n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u}, ${this.compileInNewTarget("defaultContent",t.defaultContent,e)}.bind(this))`}else if(r){let t=sn("slot");this.define(t,o),n=`toggler(${t}, callSlot(ctx, node, ${c}, ${t}, ${r}, ${u}))`}else n=`callSlot(ctx, node, ${c}, ${o}, ${r}, ${u})`;return t.on&&(n=this.wrapWithEventCatcher(n,t.on)),s&&this.insertAnchor(s),s=this.createBlock(s,"multi",e),this.insertBlock(n,s,{...e,forceNewBlock:!1}),s.varName}compileTTranslation(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translate:!1})):null}compileTTranslationContext(t,e){return t.content?this.compileAST(t.content,Object.assign({},e,{translationCtx:t.translationCtx})):null}compileTPortal(t,e){this.staticDefs.find((t=>"Portal"===t.id))||this.staticDefs.push({id:"Portal",expr:"app.Portal"});let{block:n}=e;const o=this.compileInNewTarget("slot",t.content,e);let s="ctx";!this.target.loopLevel&&this.hasSafeContext||(s=sn("ctx"),this.helpers.add("capture"),this.define(s,"capture(ctx)"));let r=sn("comp");this.staticDefs.push({id:r,expr:"app.createComponent(null, false, true, false, false)"});const i=`${r}({target: ${Ye(t.target)},slots: {'default': {__render: ${o}.bind(this), __ctx: ${s}}}}, ${this.generateComponentKey()}, node, ctx, Portal)`;return n&&this.insertAnchor(n),n=this.createBlock(n,"multi",e),this.insertBlock(i,n,{...e,forceNewBlock:!1}),n.varName}}const pn=new WeakMap;function mn(t,e){var n;return function(t){let e=t.querySelectorAll("[t-elif], [t-else]");for(let t=0,n=e.length;t<n;t++){let n=e[t],o=n.previousElementSibling,s=t=>o.getAttribute(t),i=t=>+!!n.getAttribute(t);if(!o||!s("t-if")&&!s("t-elif"))throw new r("t-elif and t-else directives must be preceded by a t-if or t-elif directive");{if(s("t-foreach"))throw new r("t-if cannot stay at the same level as t-foreach when using t-elif or t-else");if(["t-if","t-elif","t-else"].map(i).reduce((function(t,e){return t+e}))>1)throw new r("Only one conditional branching directive is allowed per node");let t;for(;(t=n.previousSibling)!==o;){if(t.nodeValue.trim().length&&8!==t.nodeType)throw new r("text is not allowed between branching directives");t.remove()}}}}(n=t),function(t){for(const e of["t-esc","t-out"]){const n=[...t.querySelectorAll(`[${e}]`)].filter((t=>t.tagName[0]===t.tagName[0].toUpperCase()||t.hasAttribute("t-component")));for(const t of n){if(t.childNodes.length)throw new r(`Cannot have ${e} on a component that already has content`);const n=t.getAttribute(e);t.removeAttribute(e);const o=t.ownerDocument.createElement("t");null!=n&&o.setAttribute(e,n),t.appendChild(o)}}}(n),gn(t,e)||{type:0,value:""}}function gn(t,e){return t instanceof Element?function(t,e){if(!e.customDirectives)return null;const n=t.getAttributeNames();for(let o of n){if("t-custom"===o||"t-custom-"===o)throw new r("Missing custom directive name with t-custom directive");if(o.startsWith("t-custom-")){const n=o.split(".")[0].slice(9),s=e.customDirectives[n];if(!s)throw new r(`Custom directive "${n}" is not defined`);const i=t.getAttribute(o),l=o.split(".").slice(1);t.removeAttribute(o);try{s(t,i,l)}catch(t){throw new r(`Custom directive "${n}" throw the following error: ${t}`)}return gn(t,e)}}return null}(t,e)||function(t,e){if(t.hasAttribute("t-debug")){t.removeAttribute("t-debug");const n=gn(t,e),o={type:12,content:n};return(null==n?void 0:n.hasNoRepresentation)&&(o.hasNoRepresentation=!0),o}if(t.hasAttribute("t-log")){const n=t.getAttribute("t-log");t.removeAttribute("t-log");const o=gn(t,e),s={type:13,expr:n,content:o};return(null==o?void 0:o.hasNoRepresentation)&&(s.hasNoRepresentation=!0),s}return null}(t,e)||function(t,e){if(!t.hasAttribute("t-foreach"))return null;const n=t.outerHTML,o=t.getAttribute("t-foreach");t.removeAttribute("t-foreach");const s=t.getAttribute("t-as")||"";t.removeAttribute("t-as");const i=t.getAttribute("t-key");if(!i)throw new r(`"Directive t-foreach should always be used with a t-key!" (expression: t-foreach="${o}" t-as="${s}")`);t.removeAttribute("t-key");const l=t.getAttribute("t-memo")||"";t.removeAttribute("t-memo");const a=gn(t,e);if(!a)return null;const c=!n.includes("t-call"),h=c&&!n.includes(`${s}_first`),u=c&&!n.includes(`${s}_last`),d=c&&!n.includes(`${s}_index`),f=c&&!n.includes(`${s}_value`);return{type:9,collection:o,elem:s,body:a,memo:l,key:i,hasNoFirst:h,hasNoLast:u,hasNoIndex:d,hasNoValue:f}}(t,e)||function(t,e){if(!t.hasAttribute("t-if"))return null;const n=t.getAttribute("t-if");t.removeAttribute("t-if");const o=gn(t,e)||{type:0,value:""};let s=t.nextElementSibling;const r=[];for(;s&&s.hasAttribute("t-elif");){const t=s.getAttribute("t-elif");s.removeAttribute("t-elif");const n=gn(s,e),o=s.nextElementSibling;s.remove(),s=o,n&&r.push({condition:t,content:n})}let i=null;s&&s.hasAttribute("t-else")&&(s.removeAttribute("t-else"),i=gn(s,e),s.remove());return{type:5,condition:n,content:o,tElif:r.length?r:null,tElse:i}}(t,e)||function(t,e){if(!t.hasAttribute("t-portal"))return null;const n=t.getAttribute("t-portal");t.removeAttribute("t-portal");const o=gn(t,e);if(!o)return{type:0,value:""};return{type:18,target:n,content:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call"))return null;const n=t.getAttribute("t-call"),o=t.getAttribute("t-call-context");if(t.removeAttribute("t-call"),t.removeAttribute("t-call-context"),"t"!==t.tagName){const s=gn(t,e),r={type:7,name:n,body:null,context:o};if(s&&2===s.type)return s.content=[r],s;if(s&&11===s.type)return{...s,slots:{default:{content:r,scope:null,on:null,attrs:null,attrsTranslationCtx:null}}}}const s=kn(t,e);return{type:7,name:n,body:s.length?s:null,context:o}}(t,e)||function(t,e){if(!t.hasAttribute("t-call-block"))return null;const n=t.getAttribute("t-call-block");return{type:15,name:n}}(t)||function(t,e){if("off"!==t.getAttribute("t-translation"))return null;t.removeAttribute("t-translation");const n=gn(t,e);if(3===(null==n?void 0:n.type)){return Tn(n.content.map(xn))}return xn(n)}(t,e)||function(t,e){const n=t.getAttribute("t-translation-context");if(!n)return null;t.removeAttribute("t-translation-context");const o=gn(t,e);if(3===(null==o?void 0:o.type)){return Tn(o.content.map((t=>Nn(t,n))))}return Nn(o,n)}(t,e)||function(t,e){if(!t.hasAttribute("t-key"))return null;const n=t.getAttribute("t-key");t.removeAttribute("t-key");const o=gn(t,e);if(!o)return null;const s={type:10,expr:n,content:o};o.hasNoRepresentation&&(s.hasNoRepresentation=!0);return s}(t,e)||function(t,e){if(!t.hasAttribute("t-esc"))return null;const n=t.getAttribute("t-esc");t.removeAttribute("t-esc");const o={type:4,expr:n,defaultValue:t.textContent||""};let s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-out")&&!t.hasAttribute("t-raw"))return null;t.hasAttribute("t-raw")&&console.warn('t-raw has been deprecated in favor of t-out. If the value to render is not wrapped by the "markup" function, it will be escaped');const n=t.getAttribute("t-out")||t.getAttribute("t-raw");t.removeAttribute("t-out"),t.removeAttribute("t-raw");const o={type:8,expr:n,body:null},s=t.getAttribute("t-ref");t.removeAttribute("t-ref");const r=gn(t,e);if(!r)return o;if(2===r.type)return o.body=r.content.length?r.content:null,{...r,ref:s,content:[o]};return o}(t,e)||function(t,e){if(!t.hasAttribute("t-slot"))return null;const n=t.getAttribute("t-slot");t.removeAttribute("t-slot");let o=null,s=null,r=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-on-"))r=r||{},r[e.slice(5)]=n;else if(e.startsWith("t-translation-context-")){s=s||{},s[e.slice(22)]=n}else o=o||{},o[e]=n}return{type:14,name:n,attrs:o,attrsTranslationCtx:s,on:r,defaultContent:En(t,e)}}(t,e)||function(t,e){let n=t.tagName;const o=n[0];let s=t.hasAttribute("t-component");if(s&&"t"!==n)throw new r(`Directive 't-component' can only be used on <t> nodes (used on a <${n}>)`);if(o!==o.toUpperCase()&&!s)return null;s&&(n=t.getAttribute("t-component"),t.removeAttribute("t-component"));const i=t.getAttribute("t-props");t.removeAttribute("t-props");const l=t.getAttribute("t-slot-scope");t.removeAttribute("t-slot-scope");let a=null,c=null,h=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else if(e.startsWith("t-")){if(!e.startsWith("t-on-")){const t=$n.get(e.split("-").slice(0,2).join("-"));throw new r(t||`unsupported directive on Component: ${e}`)}a=a||{},a[e.slice(5)]=n}else c=c||{},c[e]=n}let u=null;if(t.hasChildNodes()){const n=t.cloneNode(!0),o=Array.from(n.querySelectorAll("[t-set-slot]"));for(let t of o){if("t"!==t.tagName)throw new r(`Directive 't-set-slot' can only be used on <t> nodes (used on a <${t.tagName}>)`);const o=t.getAttribute("t-set-slot");let s=t.parentElement,i=!1;for(;s&&s!==n;){if(s.hasAttribute("t-component")||s.tagName[0]===s.tagName[0].toUpperCase()){i=!0;break}s=s.parentElement}if(i||!s)continue;t.removeAttribute("t-set-slot"),t.remove();const l=gn(t,e);let a=null,c=null,h=null,d=null;for(let e of t.getAttributeNames()){const n=t.getAttribute(e);if("t-slot-scope"!==e)if(e.startsWith("t-translation-context-")){h=h||{},h[e.slice(22)]=n}else e.startsWith("t-on-")?(a=a||{},a[e.slice(5)]=n):(c=c||{},c[e]=n);else d=n}u=u||{},u[o]={content:l,on:a,attrs:c,attrsTranslationCtx:h,scope:d}}const s=En(n,e);u=u||{},s&&!u.default&&(u.default={content:s,on:a,attrs:null,attrsTranslationCtx:null,scope:l})}return{type:11,name:n,isDynamic:s,dynamicProps:i,props:c,propsTranslationCtx:h,slots:u,on:a}}(t,e)||function(t,e){const{tagName:n}=t,o=t.getAttribute("t-tag");if(t.removeAttribute("t-tag"),"t"===n&&!o)return null;if(n.startsWith("block-"))throw new r(`Invalid tag name: '${n}'`);e=Object.assign({},e),"pre"===n&&(e.inPreTag=!0);let s=!e.nameSpace&&wn.has(n)?"http://www.w3.org/2000/svg":null;const i=t.getAttribute("t-ref");t.removeAttribute("t-ref");const l=t.getAttributeNames();let a=null,c=null,h=null,u=null;for(let o of l){const i=t.getAttribute(o);if("t-on"===o||"t-on-"===o)throw new r("Missing event name with t-on directive");if(o.startsWith("t-on-"))h=h||{},h[o.slice(5)]=i;else if(o.startsWith("t-model")){if(!["input","select","textarea"].includes(n))throw new r("The t-model directive only works with <input>, <textarea> and <select>");let s,l;if(vn.test(i)){const t=i.lastIndexOf(".");s=i.slice(0,t),l=`'${i.slice(t+1)}'`}else{if(!yn.test(i))throw new r(`Invalid t-model expression: "${i}" (it should be assignable)`);{const t=i.lastIndexOf("[");s=i.slice(0,t),l=i.slice(t+1,-1)}}const a=t.getAttribute("type"),c="input"===n,h="select"===n,d=c&&"checkbox"===a,f=c&&"radio"===a,p=o.includes(".trim"),m=p||o.includes(".lazy");u={baseExpr:s,expr:l,targetAttr:d?"checked":"value",specialInitTargetAttr:f?"checked":null,eventType:f?"click":h||m?"change":"input",hasDynamicChildren:!1,shouldTrim:p,shouldNumberize:o.includes(".number")},h&&((e=Object.assign({},e)).tModelInfo=u)}else{if(o.startsWith("block-"))throw new r(`Invalid attribute: '${o}'`);if("xmlns"===o)s=i;else if(o.startsWith("t-translation-context-")){c=c||{},c[o.slice(22)]=i}else if("t-name"!==o){if(o.startsWith("t-")&&!o.startsWith("t-att"))throw new r(`Unknown QWeb directive: '${o}'`);const t=e.tModelInfo;t&&["t-att-value","t-attf-value"].includes(o)&&(t.hasDynamicChildren=!0),a=a||{},a[o]=i}}}s&&(e.nameSpace=s);const d=kn(t,e);return{type:2,tag:n,dynamicTag:o,attrs:a,attrsTranslationCtx:c,on:h,ref:i,content:d,model:u,ns:s}}(t,e)||function(t,e){if(!t.hasAttribute("t-set"))return null;const n=t.getAttribute("t-set"),o=t.getAttribute("t-value")||null,s=t.innerHTML===t.textContent&&t.textContent||null;let r=null;t.textContent!==t.innerHTML&&(r=kn(t,e));return{type:6,name:n,value:o,defaultValue:s,body:r,hasNoRepresentation:!0}}(t,e)||function(t,e){if("t"!==t.tagName)return null;return En(t,e)}(t,e):function(t,e){if(t.nodeType===Node.TEXT_NODE){let n=t.textContent||"";return e.inPreTag||!bn.test(n)||n.trim()?{type:0,value:n}:null}if(t.nodeType===Node.COMMENT_NODE)return{type:1,value:t.textContent||""};return null}(t,e)}const bn=/[\r\n]/;const vn=/\.[\w_]+\s*$/,yn=/\[[^\[]+\]\s*$/,wn=new Set(["svg","g","path"]);const $n=new Map([["t-ref","t-ref is no longer supported on components. Consider exposing only the public part of the component's API through a callback prop."],["t-att","t-att makes no sense on component: props are already treated as expressions"],["t-attf","t-attf is not supported on components: use template strings for string interpolation in props"]]);function xn(t){const e={type:16,content:t};return(null==t?void 0:t.hasNoRepresentation)&&(e.hasNoRepresentation=!0),e}function Nn(t,e){const n={type:17,content:t,translationCtx:e};return(null==t?void 0:t.hasNoRepresentation)&&(n.hasNoRepresentation=!0),n}function kn(t,e){const n=[];for(let o of t.childNodes){const t=gn(o,e);t&&(3===t.type?n.push(...t.content):n.push(t))}return n}function Tn(t){const e={type:3,content:t};return t.every((t=>t.hasNoRepresentation))&&(e.hasNoRepresentation=!0),e}function En(t,e){const n=kn(t,e);switch(n.length){case 0:return null;case 1:return n[0];default:return Tn(n)}}function An(t,e={hasGlobalValues:!1}){const n=function(t,e){const n={inPreTag:!1,customDirectives:e};if("string"==typeof t)return mn(Pe(`<t>${t}</t>`).firstChild,n);let o=pn.get(t);return o||(o=mn(t.cloneNode(!0),n),pn.set(t,o)),o}(t,e.customDirectives),o=t instanceof Node?!(t instanceof Element)||null===t.querySelector("[t-set], [t-call]"):!t.includes("t-set")&&!t.includes("t-call"),s=new fn(n,{...e,hasSafeContext:o}).generateCode();try{return new Function("app, bdom, helpers",s)}catch(t){const{name:n}=e,o=new r(`Failed to compile ${n?`template "${n}"`:"anonymous template"}: ${t.message}\n\ngenerated code:\nfunction(app, bdom, helpers) {\n${s}\n}`);throw o.cause=t,o}}let _n;"undefined"!=typeof window&&(_n=window.requestAnimationFrame.bind(window));class Cn{constructor(){this.tasks=new Set,this.frame=0,this.delayedRenders=[],this.cancelledNodes=new Set,this.processing=!1,this.requestAnimationFrame=Cn.requestAnimationFrame}addFiber(t){this.tasks.add(t.root)}scheduleDestroy(t){this.cancelledNodes.add(t),0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}flush(){if(this.delayedRenders.length){let t=this.delayedRenders;this.delayedRenders=[];for(let e of t)e.root&&3!==e.node.status&&e.node.fiber===e&&e.render()}0===this.frame&&(this.frame=this.requestAnimationFrame((()=>this.processTasks())))}processTasks(){if(!this.processing){this.processing=!0,this.frame=0;for(let t of this.cancelledNodes)t._destroy();this.cancelledNodes.clear();for(let t of this.tasks)this.processFiber(t);for(let t of this.tasks)3===t.node.status&&this.tasks.delete(t);this.processing=!1}}processFiber(t){if(t.root!==t)return void this.tasks.delete(t);const e=xt.has(t);e&&0!==t.counter?this.tasks.delete(t):3!==t.node.status?0===t.counter&&(e||t.complete(),t.appliedToDom&&this.tasks.delete(t)):this.tasks.delete(t)}}Cn.requestAnimationFrame=_n;let Dn=!1;const Sn=new Set;"undefined"!=typeof window&&(window.__OWL_DEVTOOLS__||(window.__OWL_DEVTOOLS__={apps:Sn,Fiber:_t,RootFiber:Ct,toRaw:Ft,reactive:Yt}));class On extends Me{constructor(t,e={}){super(e),this.scheduler=new Cn,this.subRoots=new Set,this.root=null,this.name=e.name||"",this.Root=t,Sn.add(this),e.test&&(this.dev=!0),this.warnIfNoStaticProps=e.warnIfNoStaticProps||!1,!this.dev||e.test||Dn||(console.info("Owl is running in 'dev' mode."),Dn=!0);const n=e.env||{},o=Object.getOwnPropertyDescriptors(n);this.env=Object.freeze(Object.create(Object.getPrototypeOf(n),o)),this.props=e.props||{}}mount(t,e){const n=this.createRoot(this.Root,{props:this.props});return this.root=n.node,this.subRoots.delete(n.node),n.mount(t,e)}createRoot(t,e={}){const n=e.props||{},o=this.env;e.env&&(this.env=e.env);const s=function(){let t=se;return()=>{se=t}}(),r=this.makeNode(t,n);return s(),e.env&&(this.env=o),this.subRoots.add(r),{node:r,mount:(e,o)=>{On.validateTarget(e),this.dev&&Le(t,n,{__owl__:{app:this}});return this.mountNode(r,e,o)},destroy:()=>{this.subRoots.delete(r),r.destroy(),this.scheduler.processTasks()}}}makeNode(t,e){return new ue(t,e,this,null,null)}mountNode(t,e,n){const o=new Promise(((e,n)=>{let o=!1;t.mounted.push((()=>{e(t.component),o=!0}));let s=Nt.get(t);s||(s=[],Nt.set(t,s)),s.unshift((t=>{throw o||n(t),t}))}));return t.mountComponent(e,n),o}destroy(){if(this.root){for(let t of this.subRoots)t.destroy();this.root.destroy(),this.scheduler.processTasks()}Sn.delete(this)}createComponent(t,e,n,o,s){const i=!e;let l;const a=0===s.length;l=n?(t,e)=>!0:o?function(t,e){for(let n in t)if(t[n]!==e[n])return!0;return Object.keys(t).length!==Object.keys(e).length}:a?(t,e)=>!1:function(t,e){for(let n of s)if(t[n]!==e[n])return!0;return!1};const c=ue.prototype.updateAndRender,h=ue.prototype.initiateRender;return(n,o,s,a,u)=>{let d=s.children,f=d[o];i&&f&&f.component.constructor!==u&&(f=void 0);const p=s.fiber;if(f)(l(f.props,n)||p.deep||f.forceNextRender)&&(f.forceNextRender=!1,c.call(f,n,p));else{if(e){const e=a.constructor.components;if(!e)throw new r(`Cannot find the definition of component "${t}", missing static components key in parent`);if(!(u=e[t]))throw new r(`Cannot find the definition of component "${t}"`);if(!(u.prototype instanceof ve))throw new r(`"${t}" is not a Component. It must inherit from the Component class`)}f=new ue(u,n,this,s,o),d[o]=f,h.call(f,new _t(f,p))}return p.childrenMap[o]=f,f}}handleError(...t){return Tt(...t)}}On.validateTarget=function(t){const e=t&&t.ownerDocument;if(e){if(!e.defaultView)throw new r("Cannot mount a component: the target document is not attached to a window (defaultView is missing)");if(t instanceof e.defaultView.HTMLElement||t instanceof ShadowRoot){if(!function(t,e){let n=t;const o=e.defaultView.ShadowRoot;for(;n;){if(n===e)return!0;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof o&&n.host))return!1;n=n.host}}return!1}(t,e))throw new r("Cannot mount a component on a detached dom node");return}}throw new r("Cannot mount component: the target is not a valid DOM element")},On.apps=Sn,On.version="2.8.3";function Rn(t,e){const n=Object.create(t),o=Object.getOwnPropertyDescriptors(e);return Object.freeze(Object.defineProperties(n,o))}function Ln(t){const e=re();e.childEnv=Rn(e.childEnv,t)}n.shouldNormalizeDom=!1,n.mainEventHandler=(t,n,o)=>{const{data:s,modifiers:i}=e(t);t=s;let l=!1;if(i.length){let t=!1;const e=n.target===o;for(const o of i)switch(o){case"self":if(t=!0,e)continue;return l;case"prevent":(t&&e||!t)&&n.preventDefault();continue;case"stop":(t&&e||!t)&&n.stopPropagation(),l=!0;continue}}if(Object.hasOwnProperty.call(t,0)){const e=t[0];if("function"!=typeof e)throw new r(`Invalid handler (expected a function, received: '${e}')`);let o=t[1]?t[1].__owl__:null;o&&1!==o.status||e.call(o?o.component:null,n)}return l};const Bn={config:n,mount:$t,patch:function(t,e,n=!1){t.patch(e,n)},remove:function(t,e=!1){e&&t.beforeRemove(),t.remove()},list:bt,multi:j,text:z,toggler:s,createBlock:nt,html:wt,comment:H},Pn={version:On.version};Me.prototype._compileTemplate=function(t,e){return An(e,{name:t,dev:this.dev,translateFn:this.translateFn,translatableAttributes:this.translatableAttributes,customDirectives:this.customDirectives,hasGlobalValues:this.hasGlobalValues})},t.App=On,t.Component=ve,t.EventBus=N,t.OwlError=r,t.__info__=Pn,t.batched=$,t.blockDom=Bn,t.htmlEscape=T,t.loadFile=async function(t){const e=await fetch(t);if(!e.ok)throw new r("Error while fetching xml templates");return await e.text()},t.markRaw=Vt,t.markup=E,t.mount=async function(t,e,n={}){return new On(t,n).mount(e,n)},t.onError=function(t){const e=re();let n=Nt.get(e);n||(n=[],Nt.set(e,n)),n.push(t.bind(e.component))},t.onMounted=me,t.onPatched=ge,t.onRendered=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onRendered"),e.renderFn=()=>{const e=n();return t(),e}},t.onWillDestroy=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willDestroy.push(n(t.bind(e.component),"onWillDestroy"))},t.onWillPatch=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willPatch.unshift(n(t.bind(e.component),"onWillPatch"))},t.onWillRender=function(t){const e=re(),n=e.renderFn,o=e.app.dev?pe:t=>t;t=o(t.bind(e.component),"onWillRender"),e.renderFn=()=>(t(),n())},t.onWillStart=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willStart.push(n(t.bind(e.component),"onWillStart"))},t.onWillUnmount=be,t.onWillUpdateProps=function(t){const e=re(),n=e.app.dev?pe:t=>t;e.willUpdateProps.push(n(t.bind(e.component),"onWillUpdateProps"))},t.reactive=Yt,t.status=function(t){switch(t.__owl__.status){case 0:return"new";case 2:return"cancelled";case 1:return"mounted";case 3:return"destroyed"}},t.toRaw=Ft,t.useChildSubEnv=Ln,t.useComponent=function(){return se.component},t.useEffect=function(t,e=(()=>[NaN])){let n,o;me((()=>{o=e(),n=t(...o)})),ge((()=>{const s=e();s.some(((t,e)=>t!==o[e]))&&(o=s,n&&n(),n=t(...o))})),be((()=>n&&n()))},t.useEnv=function(){return re().component.env},t.useExternalListener=function(t,e,n,o){const s=re(),r=n.bind(s.component);me((()=>t.addEventListener(e,r,o))),be((()=>t.removeEventListener(e,r,o)))},t.useRef=function(t){const e=re().refs;return{get el(){const n=e[t];return x(n)?n:null}}},t.useState=ae,t.useSubEnv=function(t){const e=re();e.component.env=Rn(e.component.env,t),Ln(t)},t.validate=function(t,e){let n=_e(t,e);if(n.length)throw new r("Invalid object: "+n.join(", "))},t.validateType=Ce,t.whenReady=function(t){return new Promise((function(t){"loading"!==document.readyState?t(!0):document.addEventListener("DOMContentLoaded",t,!1)})).then(t||function(){})},t.xml=We,Object.defineProperty(t,"__esModule",{value:!0}),Pn.date="2026-03-30T13:05:32.099Z",Pn.hash="efae3e4",Pn.url="https://github.com/odoo/owl"}(globalThis.owl=globalThis.owl||{});
3
3
 
4
- var BaseUIApiDoc=(()=>{var tr=Object.create;var mt=Object.defineProperty;var er=Object.getOwnPropertyDescriptor;var rr=Object.getOwnPropertyNames;var nr=Object.getPrototypeOf,sr=Object.prototype.hasOwnProperty;var or=(t,e,r)=>e in t?mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Mt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var ir=(t,e)=>{for(var r in e)mt(t,r,{get:e[r],enumerable:!0})},we=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of rr(e))!sr.call(t,s)&&s!==r&&mt(t,s,{get:()=>e[s],enumerable:!(n=er(e,s))||n.enumerable});return t};var zt=(t,e,r)=>(r=t!=null?tr(nr(t)):{},we(e||!t||!t.__esModule?mt(r,"default",{value:t,enumerable:!0}):r,t)),ar=t=>we(mt({},"__esModule",{value:!0}),t);var a=(t,e,r)=>or(t,typeof e!="symbol"?e+"":e,r);var ss={};ir(ss,{ApiDoc:()=>_,mountApiDoc:()=>ns});var h=globalThis.owl;if(!h)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");var ur=h.App,Se=h.Component,cr=h.EventBus,lr=h.OwlError,pr=h.__info__,dr=h.batched,hr=h.blockDom,mr=h.htmlEscape,Ht=h.loadFile,fr=h.markRaw,qt=h.markup,xe=h.mount,br=h.onError,N=h.onMounted,W=h.onPatched,gr=h.onRendered,ft=h.onWillDestroy,yr=h.onWillPatch,wr=h.onWillRender,bt=h.onWillStart,U=h.onWillUnmount,L=h.onWillUpdateProps,Sr=h.reactive,xr=h.status,vr=h.toRaw,gt=h.useChildSubEnv,Ar=h.useComponent,Dt=h.useEffect,Cr=h.useEnv,Er=h.useExternalListener,C=h.useRef,E=h.useState,Tr=h.useSubEnv,Or=h.validate,Nr=h.validateType,kr=h.whenReady,Ft=h.xml;var Et={};function $r(t){let e=t.components;e?e!==Et&&Object.getPrototypeOf(e)===Object.prototype&&Object.setPrototypeOf(e,Et):t.components=Object.create(Et)}var d=class extends Se{constructor(...e){super(...e),$r(this.constructor)}};function ve(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,r,n="",s="")=>`<${r}${Rr(r,n)}${s}>`)}function Rr(t,e){let r=/\st-(att|attf|model|on)([.\s=-]|$)/.test(e),n=e.replace(/(\s)t-att\s*=/g,"$1t-props=").replace(/(\s)t-att-([A-Za-z_][\w:.-]*)\s*=/g,"$1$2=").replace(/(\s)t-attf-([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(s,i,u,c,p)=>`${i}${u}=${c}${Pr(p)}${c}`);return n=n.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(s,i,u,c,p)=>jr(t,i,u,c,p,n)),r?Lr(n):n}function Lr(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,r,n,s,i)=>n.startsWith("t-")||n==="t-props"||Ur(i)?e:`${r}${n}=${s}${Ir(i)}${s}`)}function Ir(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function Ur(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function Pr(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,r,n)=>`\${${r||n}}`)}\``}function jr(t,e,r,n,s,i){let u=/^(Checkbox|Switch)$/.test(t),c=_r(t,r),p=u?"checked":"value",f=new RegExp(`\\s${p}\\s*=`).test(i)?"":`${e}${p}=${n}${s}${n}`,y=new RegExp(`\\s${c}\\s*=`).test(i)?"":`${e}${c}=${n}${Br(s,r,u)}${n}`;return`${f}${y}`}function _r(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea|InputGroupInput|InputGroupTextarea)$/.test(t)?"onInput":"onChange"}function Br(t,e,r){if(r)return`(value) => { ${t} = value; }`;let n="value";return e.includes(".trim")&&(n=`(typeof ${n} === 'string' ? ${n}.trim() : ${n})`),e.includes(".number")&&(n=`Number.isNaN(Number(${n})) ? ${n} : Number(${n})`),`(value) => { ${t} = ${n}; }`}function Ae(t,...e){return Array.isArray(t?.raw)?Ft({raw:t.raw.map(ve)},...e):Ft(t,...e)}function Tt(t,e,r={}){let n=ve(r.templates);return t.components={...Et,...t.components||{}},xe(t,e,n===r.templates?r:{...r,templates:n})}function b(...t){let e=[];for(let r of t)if(r){if(typeof r=="string")e.push(r);else if(Array.isArray(r)){let n=b(...r);n&&e.push(n)}else if(typeof r=="object")for(let[n,s]of Object.entries(r))s&&e.push(n)}return e.join(" ")}function o(t){return{type:t,optional:!0}}var g={className:o(String),style:o([String,Object]),slots:o(Object)};function P(t,e,r){return t[e]??(r?t[r]:void 0)}function Ot(t){return t===!0||t==="open"||t==="on"||t==="active"}function Nt(...t){let e=[];for(let r of t)if(r){if(typeof r=="string"){let n=r.trim().replace(/;$/,"");n&&e.push(n)}else if(typeof r=="object")for(let[n,s]of Object.entries(r)){if(s==null||s==="")continue;let i=n.replace(/[A-Z]/g,u=>"-"+u.toLowerCase());e.push(`${i}:${s}`)}}return e.join(";")}function kt(t){return t.state!==void 0?Ot(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function Wt(t){return t.state!==void 0||t.open!==void 0}var Vt={primary:"bu-badge-primary",secondary:"bu-badge-secondary",success:"bu-badge-success",warning:"bu-badge-warning",danger:"bu-badge-danger",info:"bu-badge-info",muted:"bu-badge-muted"};var j=class extends d{get classNames(){return b("badge",Vt[this.props.variant]||Vt.secondary,this.props.pill&&"rounded-pill",this.props.className)}};a(j,"template","baseui.Badge"),a(j,"props",{variant:o(String),pill:o(Boolean),label:o(String),...g});var Mr="__BASEUI_VERSION__",Gt=new Map,yt=new WeakMap,$t="[b-ui], [b-icon]",zr="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";function Hr(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function Zt(t,e,r={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:r}))}function qr(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function Dr(t,e){return e===document||e===t||e.contains(t)}function Fr(t,e={}){return!e.allowBootstrapControl&&t.matches(zr)}var Kt=typeof window<"u"?window.thebase:void 0,V=Kt?.register?Kt:Object.assign(Kt||{},{version:Mr,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return Gt.set(t,e),this},component(t){return Gt.get(t)},mount(t,e={}){let r=Hr(t);if(!r||Fr(r,e))return null;let n=qr(r,e),s=Gt.get(n);if(!s)return null;let i=yt.get(r);if(i?.name===n)return i;i&&(i.destroy?.(),yt.delete(r),Zt(r,"baseui:destroyed",{name:i.name}));let u=s.mount?.(r,this,e)||{},c={name:n,element:r,destroy:u.destroy};return yt.set(r,c),Zt(r,"baseui:mounted",{name:n,instance:c}),c},mountAll(t=document){let e=t||document,r=[...e.querySelectorAll?.($t)||[]];return e instanceof Element&&e.matches($t)&&r.unshift(e),r.map(n=>this.mount(n)).filter(Boolean)},destroy(t=document){let e=t||document,r=[...e.querySelectorAll?.($t)||[]];e instanceof Element&&e.matches($t)&&r.unshift(e);for(let n of r){let s=yt.get(n);s&&Dr(n,e)&&(s.destroy?.(),yt.delete(n),Zt(n,"baseui:destroyed",{name:s.name}))}},theme:{set(t){let e=document.documentElement;if(typeof t=="string"){e.setAttribute("b-theme",t),e.dataset.bsTheme=t;return}for(let[r,n]of Object.entries(t||{})){let s=r==="radius"||r==="--b-radius"?"--base-radius":r.startsWith("--")?r:`--b-${r}`;e.style.setProperty(s,n)}}}});typeof window<"u"&&(window.thebase=V,window.BaseUI=V);var Ce="1.31.0",Wr=`https://cdn.jsdelivr.net/npm/lucide-static@${Ce}/icons`,Lt="file",Vr=/^[a-z0-9][a-z0-9-]*$/,Qt=new Map;function Gr(t){return typeof Image>"u"?Promise.resolve(!0):(Qt.has(t)||Qt.set(t,new Promise(e=>{let r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src=t})),Qt.get(t))}function Rt(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function wt(t,e={}){let r=Rt(t);if(!Vr.test(r))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||V.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${r}.svg`}function Jt(t,e,r={}){let n=r.url||wt(e,r),s=r.label??t.getAttribute("aria-label")??"";t.classList.add("bu-icon"),t.style.setProperty("--b-icon-url",`url("${n.replace(/"/g,"%22")}")`),(r.size||t.getAttribute("b-att-size"))&&t.style.setProperty("--b-icon-size",r.size||t.getAttribute("b-att-size")),s?(t.setAttribute("role","img"),t.setAttribute("aria-label",s)):t.setAttribute("aria-hidden","true");let i=r.fallback===!1?null:r.fallback||Lt;return i&&!r.url&&Rt(e)!==Rt(i)&&Gr(n).then(u=>{if(u||!t.isConnected)return;let c=wt(i,r);t.style.setProperty("--b-icon-url",`url("${c.replace(/"/g,"%22")}")`)}),t}V.icons={...V.icons||{},lucide:{version:Ce,cdnBaseUrl:Wr,normalizeName:Rt,url:wt,render:Jt}};var St={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},It={xs:"btn-xs",sm:"btn-sm",lg:"btn-lg",icon:"btn-icon","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-lg":"btn-icon-lg"};var As=["btn","bu-button","bu-clipboard-button",...Object.values(St),...Object.values(It)];async function Ee(t){let e=String(t??"");if(globalThis.navigator?.clipboard?.writeText)try{await globalThis.navigator.clipboard.writeText(e);return}catch{}if(typeof document>"u")throw new Error("BaseUI ClipboardButton: no clipboard API available in this environment.");let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.opacity="0",r.style.pointerEvents="none",document.body.append(r),r.select(),r.setSelectionRange(0,e.length);let n;try{n=document.execCommand("copy")}catch{n=!1}if(r.remove(),!n)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var Yt,Xt,te,Zr=0;function Kr(){return Yt??(Yt=import("./runtime/marked/marked.min.js").then(t=>{let e=t.marked||t.default?.marked||globalThis.marked;if(!e?.parse)throw new Error("BaseUI markdown: failed to load src/runtime/marked/marked.min.js");return e})),Yt}function Qr(t){let e=t.closest("[data-bs-theme]")?.getAttribute("data-bs-theme")||document.documentElement.getAttribute("data-bs-theme");return(e?e==="dark":window.matchMedia?.("(prefers-color-scheme: dark)").matches)?"dark":"default"}function Jr(){return Xt??(Xt=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),Xt}function Yr(){return te??(te=import("./runtime/milkdown/milkdown-editor.js")),te}async function Te(t,e={}){return(await Kr()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function re(t,e,r,n=""){t.classList.add("bu-markdown-diagram-error"),t.replaceChildren();let s=document.createElement("p");if(s.className="bu-markdown-diagram-error-message",s.textContent=`Unable to render ${e} diagram: ${r?.message||r}`,t.append(s),n){let i=document.createElement("pre"),u=document.createElement("code");u.textContent=n,i.append(u),t.append(i)}}async function Xr(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let r;try{r=await Jr()}catch(n){e.forEach(s=>{let i=s.closest("pre");i.replaceChildren(),i.className="bu-markdown-diagram bu-markdown-mermaid",re(i,"mermaid",n,s.textContent)});return}r.initialize({startOnLoad:!1,securityLevel:"strict",theme:Qr(t)});for(let n of e){let s=n.textContent,i=n.closest("pre");i.replaceChildren(),i.className="bu-markdown-diagram bu-markdown-mermaid";try{let{svg:u}=await r.render(`bu-mermaid-${++Zr}`,s);i.innerHTML=u}catch(u){re(i,"mermaid",u,s)}}}function tn(t){let e=globalThis.thebase;if(!e?.mountAll)return;let r=document.createElement("div");r.setAttribute("b-ui","toast"),r.setAttribute("b-att-state","open"),r.setAttribute("b-att-delay","2000"),r.className="bu-markdown-bu-copy-toast",r.textContent=t,document.body.append(r),e.mountAll(r),r.addEventListener("baseui:close",()=>r.remove(),{once:!0})}function en(t){let e=document.createElement("div");e.className="bu-markdown-bu-code";let r=document.createElement("button");r.type="button",r.className="bu-markdown-bu-copy";let n=document.createElement("span");Jt(n,"copy",{label:"Copy code"}),r.append(n),r.addEventListener("click",async()=>{try{await Ee(t),r.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),tn("Copied to clipboard")}catch(u){r.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:u}}))}}),e.append(r);let s=document.createElement("pre"),i=document.createElement("code");i.className="bu-markdown-bu-code-lines";for(let u of t.replace(/\n$/,"").split(`
5
- `)){let c=document.createElement("span");c.className="bu-markdown-bu-code-line",c.textContent=u,i.append(c)}return s.append(i),e.append(s),e}var ee;function rn(){return ee??(ee=Ht("/dist/baseui.templates.xml")),ee}var ne=new WeakMap;function se(t){let e=ne.get(t);if(e){ne.delete(t);for(let r of e)try{r.destroy()}catch{}}}var nn=/\bstate\.([A-Za-z_$][\w$]*)/g;function sn(t){return new Set([...t.matchAll(nn)].map(e=>e[1]))}var on=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,an=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g;function un(t){let e=new Set;for(let r of t.matchAll(on))e.add(r[1]);for(let r of t.matchAll(an))e.add(r[2]);return e}function cn(t){let e=Ae({raw:[t]}),r=sn(t);class n extends d{setup(){this.state=E(Object.fromEntries([...r].map(i=>[i,""])))}}a(n,"template",e);for(let s of un(t))n.prototype[s]=function(){};return n}function Oe(t){t.querySelector("[data-slot='dropdown-menu'], .bu-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("bu-markdown-bu-preview-overlay")}async function ln(t,e){let[r,n]=await Promise.all([rn(),cn(e)]),s=await Tt(n,t,{templates:r});return Oe(t),s}function pn(t,e){let r=globalThis.thebase;if(!r?.mountAll)throw new Error("BaseUI runtime not found on the page \u2014 load dist/baseui.min.js before mounting Markdown.");t.innerHTML=e,Oe(t),r.mountAll(t)}async function dn(t){se(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let r=new Set;for(let n of e){let s=n.textContent,i=n.closest("pre");i.replaceChildren(),i.className="bu-markdown-live bu-markdown-baseui";let u=document.createElement("div");u.className="bu-markdown-bu-preview",i.append(u,en(s));try{/<[A-Z]/.test(s)?r.add(await ln(u,s)):pn(u,s)}catch(c){re(i,"BaseUI component",c,s)}}r.size&&ne.set(t,r)}async function Ne(t,{mermaid:e=!0,baseUi:r=!0}={}){e&&await Xr(t),r&&await dn(t)}async function ke(t){return(await Yr()).createMilkdownMarkdownEditor(t)}function Re(t){let e=String(t??""),r=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!r)return{data:{},content:e};let n={};for(let s of r[1].split(/\r?\n/)){let i=s.trim();if(!i||i.startsWith("#"))continue;let u=i.indexOf(":");if(u===-1)continue;let c=i.slice(0,u).trim();c&&(n[c]=hn(i.slice(u+1).trim()))}return{data:n,content:e.slice(r[0].length)}}function $e(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function hn(t){if(t==="")return"";if(t==="true")return!0;if(t==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(t))return Number(t);if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1).trim();return e?e.split(",").map(r=>$e(r.trim())):[]}return $e(t)}var B=class extends d{setup(){this.rootRef=C("root"),this.editorRef=C("editor"),this.editorHandle=null,this.state=E({html:"",source:"",status:"loading",error:"",frontmatter:{}}),bt(()=>this.load(this.props)),L(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),N(()=>this.afterRender()),W(()=>this.afterRender()),ft(()=>{this.destroyEditor(),this.rootRef.el&&se(this.rootRef.el)})}get classNames(){return b("bu-markdown",this.props.className)}get editorLabel(){return this.props.collaborative?"Collaborative Markdown editor":"Markdown editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.editable!==this.props.editable||e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let r=e.content??"";if(e.src)try{let n=await fetch(e.src);if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);r=await n.text()}catch(n){this.state.status="error",this.state.error=n.message||String(n);return}try{this.state.source=r;let{data:n,content:s}=Re(r);this.state.frontmatter=n,this.state.html=qt(await Te(s)),this.state.status="ready"}catch(n){this.state.status="error",this.state.error=n.message||String(n)}}get hasFrontmatterMeta(){let e=this.state.frontmatter;return!!(e.tags?.length||e.authors?.length)}enhance(){let e=this.rootRef.el;!e||this.state.status!=="ready"||Ne(e,{mermaid:this.props.mermaid!==!1,baseUi:this.props.baseUi!==!1})}afterRender(){this.props.editable?this.mountEditor():this.enhance()}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await ke({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"bu-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(r,n,s)=>{this.state.source=r,this.props.onChange?.(r,n,s)}})}catch(r){this.state.status="error",this.state.error=r.message||String(r)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};a(B,"template","baseui.Markdown"),a(B,"components",{Badge:j}),a(B,"props",{content:o(String),src:o(String),mermaid:o(Boolean),baseUi:o(Boolean),editable:o(Boolean),collaborative:o(Boolean),room:o(String),password:o(String),signaling:o(Array),user:o(Object),onChange:o(Function),className:o(String),style:o([String,Object])});var O=class extends d{setup(){this.state=E({failed:!1}),Dt(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===Lt)return;let r=new Image;return r.onerror=()=>{this.state.failed=!0},r.src=this.buildUrl(e),()=>{r.onload=null,r.onerror=null}},()=>[this.name])}buildUrl(e){return wt(e,{baseUrl:P(this.props,"base-url","baseUrl")})}get name(){return P(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?Lt:this.name)}get style(){let e=[`--b-icon-url:url("${this.url.replace(/"/g,"%22")}")`];return this.props.size&&e.push(`--b-icon-size:${this.props.size}`),Nt(e.join(";"),this.props.style)}get classNames(){return b("bu-icon",this.props.className)}};a(O,"template","baseui.Icon"),a(O,"props",{icon:o(String),name:o(String),label:o(String),title:o(String),size:o(String),"base-url":o(String),baseUrl:o(String),className:o(String),style:o([String,Object])});var $=class extends d{setup(){this.rootRef=C("root"),this.props.getRef&&(N(()=>this.props.getRef(this.rootRef.el)),U(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?b(this.props.className):b("btn","bu-button",St[this.props.variant]||St.default,It[this.props.size],this.isIconOnly&&"bu-button-icon",this.props.className)}get iconPosition(){return P(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return P(this.props,"aria-label","ariaLabel")}get ariaPressed(){return P(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=P(this.props,"aria-invalid","ariaInvalid");return e===!0?"true":e}get isIconOnly(){return!!(this.props.icon&&!this.props.label&&!this.props.slots?.default)}onClick(e){if(this.props.href&&this.props.disabled){e.preventDefault();return}this.props.onClick?.(e)}};a($,"template","baseui.Button"),a($,"components",{Icon:O}),a($,"props",{variant:o(String),size:o(String),type:o(String),href:o(String),disabled:o(Boolean),label:o(String),icon:o(String),"icon-position":o(String),iconPosition:o(String),unstyled:o(Boolean),attrs:o(Object),getRef:o(Function),...g,id:o(String),title:o(String),"aria-label":o(String),ariaLabel:o(String),"aria-pressed":o(String),ariaPressed:o(String),"aria-invalid":o([String,Boolean]),ariaInvalid:o([String,Boolean]),onClick:o(Function)});var G=class extends d{onChange(e){this.props.onChange?.(e.target.checked,e)}};a(G,"template","baseui.Checkbox"),a(G,"props",{checked:o(Boolean),disabled:o(Boolean),...g,id:o(String),onChange:o(Function)});function M(){let t=globalThis.bootstrap;if(!t)throw new Error("BaseUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return t}function Le(t,e){L(r=>{Wt(r)&&(t.open=kt(r),t.open?e?.instance?.show():e?.instance?.hide())})}function Ie(t,e,r){Wt(t)||(e.open=r),t.onOpenChange?.(r)}var Z=class extends d{setup(){this.dialogState=E({open:kt(this.props)}),this.control={instance:null},gt({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),Le(this.dialogState,this.control)}setOpen(e){Ie(this.props,this.dialogState,e)}};a(Z,"template","baseui.Dialog"),a(Z,"props",{open:o(Boolean),state:o(String),"default-open":o(Boolean),defaultOpen:o(Boolean),onOpenChange:o(Function),style:o([String,Object]),slots:o(Object)});var z=class extends d{setup(){this.rootRef=C("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDialogOpen(!0),this.onHidden=()=>{this.env.setDialogOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},N(()=>{this.env.dialogControl.instance=M().Modal.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,focus:!0}),this.rootRef.el.addEventListener("show.bs.modal",this.onShow),this.rootRef.el.addEventListener("shown.bs.modal",this.onShown),this.rootRef.el.addEventListener("hidden.bs.modal",this.onHidden),this.env.dialog.open&&this.env.dialogControl.instance.show()}),U(()=>{this.rootRef.el.removeEventListener("show.bs.modal",this.onShow),this.rootRef.el.removeEventListener("shown.bs.modal",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.modal",this.onHidden),this.env.dialogControl.instance?.dispose(),this.env.dialogControl.instance=null})}get showCloseButton(){return this.props.showCloseButton!==!1&&this.props["show-close-button"]!==!1}};a(z,"template","baseui.DialogContent"),a(z,"components",{Button:$}),a(z,"props",{...g,showCloseButton:o(Boolean),"show-close-button":o(Boolean)});var K=class extends d{};a(K,"template","baseui.DialogHeader"),a(K,"props",g);var Q=class extends d{};a(Q,"template","baseui.DialogFooter"),a(Q,"props",g);var J=class extends d{};a(J,"template","baseui.DialogTitle"),a(J,"props",g);var Y=class extends d{};a(Y,"template","baseui.DialogDescription"),a(Y,"props",g);var X=class extends d{setup(){this.state=E({open:Ot(this.props.state)}),this.triggerRef=C("trigger"),this.bufferRef=C("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},N(()=>{this.lastContentHtml=this.currentContentHtml();let e=this.triggerElement();this.bootstrapTooltip=new(M()).Tooltip(e,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),e.addEventListener("shown.bs.tooltip",this.onShown),e.addEventListener("hidden.bs.tooltip",this.onHidden),Ot(this.props.state)&&this.bootstrapTooltip.show()}),W(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),U(()=>{let e=this.triggerElement();e?.removeEventListener("shown.bs.tooltip",this.onShown),e?.removeEventListener("hidden.bs.tooltip",this.onHidden),this.bootstrapTooltip?.dispose()})}triggerElement(){return this.triggerRef.el?.firstElementChild||this.triggerRef.el}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}show(){this.bootstrapTooltip?.show()}hide(){this.bootstrapTooltip?.hide()}};a(X,"template","baseui.Tooltip"),a(X,"props",{content:o(String),state:o(String),...g});var mn=0,tt={label:o(String),labelBackground:o(String),supportingText:o(String),useTip:o(Number),errorText:o(String),leadingIcon:o(String),trailingIcon:o(String),maxLength:o(Number),invalid:o(Boolean),placeholder:o(String),disabled:o(Boolean)},I=class extends d{setup(){this.supportId=`bu-input-support-${mn++}`}get field(){return this.env.fieldProps?.()??{}}get label(){return this.props.label??this.field.label}get labelStyle(){let e=this.props.labelBackground??this.field.labelBackground;return e?`--bu-label-bg:${e}`:void 0}get isOutlined(){return!!this.label}get isInvalid(){return!!(this.props.invalid||this.field.invalid||this.errorText)}get errorText(){return this.props.errorText??this.field.error}get helperText(){return this.props.supportingText||this.field.description}get useTip(){return Number(this.props.useTip??this.field.useTip??0)===1}get supportingText(){return this.errorText||(this.useTip?void 0:this.helperText)}get tipText(){return this.useTip&&!this.errorText?this.helperText:void 0}get leadingIcon(){return this.props.leadingIcon}get trailingIcon(){return this.isInvalid?"circle-alert":this.props.trailingIcon}get fieldPlaceholder(){return this.props.placeholder??(this.isOutlined?" ":void 0)}get counter(){return`${(this.props.value??"").length}/${this.props.maxLength}`}get controlClass(){return this.isOutlined&&"bu-outlined-control"}get describedBy(){return this.supportingText?this.supportId:void 0}get outlinedClassNames(){return b("bu-input-outlined",this.isInvalid&&"is-invalid",this.props.disabled&&"is-disabled",this.props.placeholder&&"has-placeholder",this.tipText&&"has-tip",this.leadingIcon&&"has-leading",this.trailingIcon&&"has-trailing")}};a(I,"components",{Icon:O,Tooltip:X});function Ue({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var et=class extends I{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return b("bu-input",Ue({tag:"input",type:this.props.type}),this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};a(et,"template","baseui.Input"),a(et,"props",{...tt,value:o(String),type:o(String),readonly:o(Boolean),className:o(String),style:o([String,Object]),id:o(String),list:o(String),autocomplete:o(String),"aria-label":o(String),ariaLabel:o(String),min:o([String,Number]),max:o([String,Number]),step:o([String,Number]),onInput:o(Function),onChange:o(Function)});var rt=class extends I{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return b("bu-native-select","form-select",this.controlClass,this.isInvalid&&"is-invalid",(this.props.size==="sm"||this.props.size==="lg")&&`form-select-${this.props.size}`,this.props.className)}onChange(e){this.props.onChange?.(e.target.value,e)}};a(rt,"template","baseui.NativeSelect"),a(rt,"props",{...tt,value:o(String),size:o(String),...g,"aria-label":o(String),ariaLabel:o(String),id:o(String),onChange:o(Function)});var nt=class extends I{get outlinedClassNames(){return b(super.outlinedClassNames,"is-anchored")}get classNames(){return b("form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.resize==="none"&&"bu-textarea-no-resize",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};a(nt,"template","baseui.Textarea"),a(nt,"props",{...tt,value:o(String),rows:o(Number),readonly:o(Boolean),resize:o(String),className:o(String),style:o([String,Object]),id:o(String),onInput:o(Function),onChange:o(Function)});var oe={default:"bu-tabs-list-default",line:"bu-tabs-list-line"};function Pe(t,e,r,n="horizontal"){let s=n==="vertical",c=t===(s?"ArrowDown":"ArrowRight")?1:t===(s?"ArrowUp":"ArrowLeft")?-1:0;return!c||r===0?-1:(e+c+r)%r}var fn=0;function je(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var st=class extends d{setup(){this.tabsState=E({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++fn}`,gt({tabs:this.tabsState,selectTab:e=>this.select(e),tabsId:this.instanceId,orientation:this.orientation}),L(e=>{e.value!==void 0&&(this.tabsState.active=e.value)})}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return b("bu-tabs",this.props.className)}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};a(st,"template","baseui.Tabs"),a(st,"props",{value:o(String),defaultValue:o(String),orientation:o(String),onChange:o(Function),...g});var ot=class extends d{};a(ot,"template","baseui.TabsContainer"),a(ot,"props",{...g});var it=class extends d{setup(){this.listRef=C("list")}get classNames(){return b("bu-tabs-list",oe[this.props.variant]||oe.default,this.props.className)}onKeyDown(e){let r=[...this.listRef.el.querySelectorAll("[role='tab']")],n=r.indexOf(e.target),s=Pe(e.key,n,r.length,this.env.orientation);s!==-1&&(e.preventDefault(),r[s].focus(),r[s].click())}};a(it,"template","baseui.TabsList"),a(it,"props",{variant:o(String),...g});var H=class extends d{setup(){this.rootEl=null,this.tabInstance=null,this.onShown=()=>this.env.selectTab(this.props.value)}onRootRef(e){e?(this.rootEl=e,this.tabInstance=M().Tab.getOrCreateInstance(e),e.addEventListener("shown.bs.tab",this.onShown)):this.rootEl&&(this.rootEl.removeEventListener("shown.bs.tab",this.onShown),this.tabInstance?.dispose(),this.tabInstance=null,this.rootEl=null)}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`bu-tabs-panel-${this.env.tabsId}-${je(this.props.value)}`}get classNames(){return b("bu-tabs-trigger",this.isActive&&"active",this.props.className)}get tabAttrs(){return{role:"tab","data-bs-target":`#${this.panelId}`,"aria-selected":this.isActive?"true":"false",tabindex:this.isActive?0:-1}}onClick(){this.props.disabled||this.tabInstance?.show()}};a(H,"template","baseui.TabTrigger"),a(H,"components",{Button:$}),a(H,"props",{value:{type:String},disabled:o(Boolean),...g});var at=class extends d{setup(){this.initialActive=this.isActive}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`bu-tabs-panel-${this.env.tabsId}-${je(this.props.value)}`}};a(at,"template","baseui.TabContent"),a(at,"props",{value:{type:String},...g});var ut=class extends d{};a(ut,"template","baseui.Breadcrumb"),a(ut,"props",{...g});var ct=class extends d{};a(ct,"template","baseui.BreadcrumbList"),a(ct,"props",{...g});var lt=class extends d{get classNames(){return b("bu-breadcrumb-item",this.props.current&&"bu-breadcrumb-page",this.props.className)}};a(lt,"template","baseui.BreadcrumbItem"),a(lt,"props",{current:o(Boolean),...g});var pt=class extends d{get classNames(){return b("bu-breadcrumb-link",this.props.className)}onClick(e){this.props.onClick?.(e)}};a(pt,"template","baseui.BreadcrumbLink"),a(pt,"props",{href:o(String),target:o(String),rel:o(String),...g,onClick:o(Function)});var dt=class extends d{get classNames(){return b("bu-breadcrumb-page",this.props.className)}};a(dt,"template","baseui.BreadcrumbPage"),a(dt,"props",{...g});var q=class extends d{get classNames(){return b("bu-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(q,"template","baseui.BreadcrumbSeparator"),a(q,"components",{Icon:O}),a(q,"props",{...g});var xt=class extends d{get classNames(){return b("bu-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(xt,"template","baseui.BreadcrumbEllipsis"),a(xt,"components",{Icon:O}),a(xt,"props",{...g});var ue=["get","post","put","patch","delete","options","head","trace","query"];function bn(t,e,r){let n=String(t||"").trim();if(!n)return"";let s=n.replace(/\{([^}]+)\}/g,(i,u)=>{let c=r&&typeof r=="object"?r[u]:null;return c&&c.default!==void 0?String(c.default):`{${u}}`});try{return new URL(s,`${e}/`).href.replace(/\/$/,"")}catch{return s.replace(/\/$/,"")}}function A(t,e){if(t&&typeof t=="object"&&typeof t.$ref=="string"){let r=t.$ref.replace(/^#\//,"").split("/"),n=e;for(let s of r)n=n?.[decodeURIComponent(s.replace(/~1/g,"/").replace(/~0/g,"~"))];return n?{...n}:{}}return t}function le(t,e){if(!Array.isArray(t?.allOf))return t;let r={...t,properties:{...t.properties},required:[...t.required||[]]};delete r.allOf;for(let n of t.allOf){let s=le(A(n,e),e)||{};Object.assign(r.properties,s.properties),r.required.push(...s.required||[]),r.type||(r.type=s.type)}return r}function gn(t,e){if(!t)return null;let r=A(t,e);return!r||typeof r!="object"?null:r}function ce(t){return t&&typeof t.$ref=="string"?t.$ref.split("/").pop():null}function Be(t,e){if(!t||typeof t!="object")return null;for(let[r,n]of Object.entries(t)){let s=gn(n,e);if(s){if(s.dataValue!==void 0)return{key:r,label:s.summary||r,value:s.dataValue,isAuto:!1};if(s.serializedValue!==void 0)return{key:r,label:s.summary||r,value:s.serializedValue,isAuto:!1};if(s.value!==void 0)return{key:r,label:s.summary||r,value:s.value,isAuto:!1};if(s.externalValue)return{key:r,label:s.summary||r,value:s.externalValue,isAuto:!1}}}return null}function pe(t){if(t){if(t.example!==void 0)return t.example;if(t.default!==void 0)return t.default;if(Array.isArray(t.enum)&&t.enum.length)return t.enum[0]}}function ie(t,e){if(!t)return null;let r=Be(t.examples,e);if(r)return r;if(t.example!==void 0)return{label:"media example",value:t.example,isAuto:!1};let n=A(t.schema,e),s=pe(n);return s!==void 0?{label:"schema example",value:s,isAuto:!1}:null}function Me(t,e){let r=Be(t.examples,e);if(r)return r;if(t.example!==void 0)return{label:"example",value:t.example,isAuto:!1};let n=A(t.schema,e),s=pe(n);return s!==void 0?{label:"schema example",value:s,isAuto:!1}:null}function ht(t,e,r=new Set){if(!t)return null;let n=ce(t);if(n){if(r.has(n))return{};r=new Set(r).add(n)}let s=le(A(t,e),e);if(!s)return null;let i=pe(s);if(i!==void 0)return i;if(s.type==="array"||s.items)return[ht(s.items||{},e,r)];if(s.properties||s.type==="object"){let u={};for(let[c,p]of Object.entries(s.properties||{}))u[c]=ht(p,e,r);return u}switch(s.type){case"integer":return s.minimum??0;case"number":return s.minimum??0;case"boolean":return!0;case"string":return s.format==="date-time"?new Date().toISOString():s.format==="date"?new Date().toISOString().slice(0,10):s.format==="byte"?"base64==":s.title||"string";default:return null}}function vt(t,e,{depth:r=0,prefix:n="",seen:s=new Set,required:i=!1,selfRow:u=!0}={}){if(!t||r>4)return[];let c=ce(t);if(c){if(s.has(c))return[];s=new Set(s).add(c)}let p=le(A(t,e),e),f=[],y=p.contentMediaType||p.contentEncoding?[p.contentMediaType,p.contentEncoding&&`encoding:${p.contentEncoding}`].filter(Boolean).join(", "):"",S=p.discriminator?.propertyName?`discriminator: ${p.discriminator.propertyName}`:"";if(Array.isArray(p.prefixItems))return u&&f.push({path:n||"items",type:"tuple",required:i,description:p.description||""}),p.prefixItems.forEach((x,v)=>{f.push(...vt(x,e,{depth:r+1,prefix:`${n}[${v}]`,seen:s,required:!1}))}),p.items&&f.push(...vt(p.items,e,{depth:r+1,prefix:`${n}[n]`,seen:s,required:!1})),f;if(p.type==="array"||p.items)return u&&f.push({path:n||"items",type:"array",required:i,description:p.description||""}),f.push(...vt(p.items||{},e,{depth:r+1,prefix:`${n}[]`,seen:s,required:!1})),f;if(p.properties||p.type==="object"||p.patternProperties){let x=new Set(p.required||[]);for(let[v,l]of Object.entries(p.properties||{})){let w=A(l,e),k=n?`${n}.${v}`:v;f.push({path:k,type:w.type||(w.$ref?ce(l):"any")||"any",format:w.format||"",enum:w.enum,required:x.has(v),description:w.description||""}),(w.type==="object"||w.properties||w.type==="array"||w.items)&&f.push(...vt(l,e,{depth:r+1,prefix:k,seen:s,required:x.has(v),selfRow:!1}))}for(let[v,l]of Object.entries(p.patternProperties||{})){let w=A(l,e);f.push({path:n?`${n}.<${v}>`:`<${v}>`,type:w.type||"any",format:w.format||"",required:!1,description:w.description||""})}return f}return f.push({path:n||"value",type:p.type||"any",format:p.format||"",enum:p.enum,required:i,description:[p.description,y,S].filter(Boolean).join(" \u2014 ")}),f}function yn(t){let e=Me(t,this);return{name:t.name,in:t.in,required:!!t.required,type:t.type||t.schema?.type||"string",format:t.format||t.schema?.format||"",description:t.description||"",default:t.default??t.schema?.default,enum:t.enum||t.schema?.enum,example:e?e.value:void 0,exampleLabel:e?e.label:""}}var wn={authorizationCode:"accessCode",implicit:"implicit",password:"password",clientCredentials:"application"};function Sn(t){if(t.type==="http")return{...t,type:String(t.scheme).toLowerCase()==="basic"?"basic":"bearer"};if(t.type==="openIdConnect")return{...t,type:"bearer",oauth2MetadataUrl:t.openIdConnectUrl};if(t.type!=="oauth2"||!t.flows)return t;let[e,r]=Object.entries(t.flows)[0]||[];return{...t,...r,flow:wn[e]||e,scopes:r?.scopes||{}}}function ze(t){let e=t.securityDefinitions||t.components?.securitySchemes||{};return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,Sn(A(n,t))]))}function xn(t,e){let r=ze(e),n=t.security||e.security||[],s=[];for(let i of n)for(let u of Object.keys(i)){let c=r[u];c&&s.push({key:u,...c})}return s}function ae(t,e,r,n){let s={path:[],query:[],header:[],formData:[],body:null};for(let f of n.parameters||[]){let y=A(f,t);if(y.in==="body"){let S={schema:y.schema},x=ie(S,t);s.body={required:!!y.required,schema:y.schema,description:y.description||"",contentType:"application/json",example:x?x.value:ht(y.schema,t),exampleLabel:x?x.label:"auto",exampleIsAuto:!x}}else s[y.in]&&s[y.in].push(yn.call(t,y))}if(n.requestBody){let f=A(n.requestBody,t)||{},[y,S]=Object.entries(f.content||{})[0]||[];if(y&&S){let x=ie(S,t);s.body={required:!!f.required,schema:S.schema||null,description:f.description||"",contentType:y,encoding:S.encoding||null,itemSchema:S.itemSchema||null,example:x?x.value:ht(S.schema,t),exampleLabel:x?x.label:"auto",exampleIsAuto:!x}}}let i=Object.entries(n.responses||{}).map(([f,y])=>{let S=A(y,t)||{},[x,v]=Object.entries(S.content||{})[0]||[],l=v?ie(v,t):null;return{status:f,summary:S.summary||"",description:S.description||"",contentType:x||"application/json",schema:v?.schema||S.schema||null,encoding:v?.encoding||null,headers:vn(S.headers,t),links:An(S.links,t),example:l?l.value:v?.schema?ht(v.schema,t):null,exampleLabel:l?l.label:"auto",exampleIsAuto:!l&&!!v?.schema}}).sort((f,y)=>{let S=_e(f.status),x=_e(y.status);return S-x}),u=Cn(n.callbacks,t),c=r.toUpperCase();return{id:(n.operationId||`${r}-${e}`).replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),method:c,path:e,tag:n.tags&&n.tags[0]||"default",summary:n.summary||n.operationId||`${c} ${e}`,description:n.description||"",deprecated:!!n.deprecated,produces:n.produces||t.produces||["application/json"],consumes:n.consumes||t.consumes||(s.body?["application/json"]:[]),parameters:s,responses:i,callbacks:u,externalDocs:n.externalDocs||null,security:xn(n,t)}}function vn(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([r,n])=>{let s=A(n,e)||{},i=Me({...s,in:"header"},e);return{name:r,required:!!s.required,deprecated:!!s.deprecated,type:s.schema?.type||"string",description:s.description||"",example:i?i.value:void 0}})}function An(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([r,n])=>{let s=A(n,e)||{};return{name:r,operationId:s.operationId||"",operationRef:s.operationRef||"",description:s.description||"",parameters:s.parameters||{}}})}function Cn(t,e){if(!t||typeof t!="object")return[];let r=[];for(let[n,s]of Object.entries(t)){let i=A(s,e)||{};for(let[u,c]of Object.entries(i)){let p=A(c,e)||{};for(let f of ue)p[f]&&r.push({name:n,expression:u,method:f.toUpperCase(),summary:p[f].summary||"",description:p[f].description||""})}}return r}function _e(t){if(t==="default")return 999;let e=parseInt(t,10);return Number.isNaN(e)?998:e}async function de(t,e=""){let r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch spec: HTTP ${r.status}`);return Ut(await r.json(),e)}function Ut(t,e=""){if(!t||typeof t!="object"||!t.paths&&!t.webhooks)throw new Error("Not an OpenAPI document (missing paths).");let r=t.schemes&&t.schemes.includes("https")?"https":t.schemes?.[0]||"https",n=t.host||location.host,s=t.basePath||"",i=`${r}://${n}${s}`.replace(/\/$/,""),u=e?[{name:"",url:e.replace(/\/$/,""),description:""}]:Array.isArray(t.servers)&&t.servers.length?t.servers.map(l=>({name:l?.name||"",url:bn(l?.url,i,l?.variables),description:String(l?.description||"").trim()})).filter(l=>l.url):[{name:"",url:i,description:""}],c=u[0]?.url||i,p=(t.tags||[]).map(l=>l.name),f=new Map((t.tags||[]).map(l=>[l.name,l])),y=[];for(let[l,w]of Object.entries(t.paths||{})){let k=A(w,t)||{};for(let R of ue)k[R]&&y.push(ae(t,l,R,k[R]));for(let[R,Xe]of Object.entries(k.additionalOperations||{}))y.push(ae(t,l,R.toLowerCase(),Xe))}let S=[];for(let[l,w]of Object.entries(t.webhooks||{})){let k=A(w,t)||{};for(let R of ue)k[R]&&S.push(ae(t,l,R,k[R]))}let v=[...new Set([...p,...y.map(l=>l.tag)])].map(l=>{let w=f.get(l);return{id:l.replace(/[^a-zA-Z0-9]+/g,"-").toLowerCase(),name:l,summary:w?.summary||"",description:w?.description||"",parent:w?.parent||"",kind:w?.kind||"",items:y.filter(k=>k.tag===l)}}).filter(l=>l.items.length);return{spec:t,info:t.info||{},baseUrl:c,derivedBaseUrl:i,servers:u,securityDefinitions:ze(t),groups:v,webhooks:S,resolveRef:l=>A(l,t),generateExample:l=>ht(l,t),schemaRows:l=>vt(l,t),findOperation:l=>y.find(w=>w.id===l)||S.find(w=>w.id===l),firstOperation:()=>y[0]}}var At=[{id:"curl",label:"CURL",icon:"img/bash-plain.svg"},{id:"csharp",label:"CSHARP",icon:"img/csharp-original.svg"},{id:"go",label:"GO",icon:"img/go-original-wordmark.svg"},{id:"node",label:"NODEJS",icon:"img/nodejs-original.svg"},{id:"ruby",label:"RUBY",icon:"img/ruby-plain.svg"},{id:"php",label:"PHP",icon:"img/php-original.svg"},{id:"javascript",label:"JAVASCRIPT",icon:"img/javascript-original.svg"},{id:"python",label:"PYTHON",icon:"img/python-original.svg"},{id:"java",label:"JAVA",icon:"img/java-original.svg"},{id:"c",label:"C",icon:"img/c-original.svg"},{id:"swift",label:"SWIFT",icon:"img/swift-original.svg"},{id:"objc",label:"OBJECTIVE-C",icon:"img/objectivec-plain.svg"},{id:"kotlin",label:"KOTLIN",icon:"img/kotlin-original.svg"},{id:"rust",label:"RUST",icon:"img/rust-original.svg"},{id:"powershell",label:"POWERSHELL",icon:"img/windows8-original.svg"},{id:"dart",label:"DART",icon:"img/dart-original.svg"},{id:"lua",label:"LUA",icon:"img/lua.svg"}];function En(t){let e=new URL(t.url);return(t.query||[]).forEach(([r,n])=>{r&&e.searchParams.set(r,String(n||""))}),e.toString()}function Tn(t,e){let r=[];return(t.headers||[]).forEach(([s,i])=>{s&&r.push([s,String(i??"")])}),e&&t.bodyText&&!On(r,"Content-Type")&&r.push(["Content-Type",t.mimeType||"application/json"]),r}function On(t,e){let r=e.toLowerCase();return t.some(function(n){return String(n[0]||"").toLowerCase()===r})}function Nn(t,e){return String(t||"").split(`
6
- `).map(function(r){return e+r}).join(`
7
- `)}function T(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function m(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function kn(t){return String(t).replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}function $n(t){return String(t).replace(/`/g,'` + "`" + `')}function Rn(t){return String(t).replace(/\\/g,"\\\\").replace(/"""/g,'\\"\\"\\"')}function Pt(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function jt(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\\\'")}function _t(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function Bt(t){return String(t).replace(/`/g,"``").replace(/"/g,'`"')}function Ln(t){return String(t).replace(/\]=\]/g,']==] .. "]=" .. [=[')}function In(t,e){let r=e&&e.quote==="double"?'"':"'";return t.map(function(s){let i=r==='"'?m(s[0]):T(s[0]),u=r==='"'?m(s[1]):T(s[1]);return r+i+r+": "+r+u+r}).join(`,
8
- `)}function Un(t,e,r){let n=["curl --request "+t.method];return r.forEach(function(s){n.push("--header '"+T(s[0]+": "+s[1])+"'")}),t.bodyText&&n.push("--data '"+T(t.bodyText)+"'"),n.push("'"+T(e)+"'"),n.join(` \\
9
- `)}function He(t,e,r){let n=["const url = '"+T(e)+"';","const options = {"," method: '"+T(t.method)+"',"];return r.length&&(n.push(" headers: {"),n.push(Nn(In(r)," ")),n.push(" },")),t.bodyText&&n.push(" body: `"+kn(t.bodyText)+"`,"),n.push("};","","const response = await fetch(url, options);","const data = await response.text();","console.log(response.status, data);"),n.join(`
10
- `)}function Pn(t,e,r){return He(t,e,r)}function jn(t,e,r){let n=["import requests","","url = '"+T(e)+"'"];return r.length?(n.push("headers = {"),r.forEach(function(s){n.push(" '"+T(s[0])+"': '"+T(s[1])+"',")}),n.push("}")):n.push("headers = {}"),t.bodyText?(n.push("",'payload = """'+Rn(t.bodyText)+'"""'),n.push("response = requests.request('"+T(t.method)+"', url, headers=headers, data=payload)")):n.push("","response = requests.request('"+T(t.method)+"', url, headers=headers)"),n.push("print(response.status_code)","print(response.text)"),n.join(`
11
- `)}function _n(t,e,r){let n=["package main","","import (",' "fmt"',' "io"',' "net/http"'];return t.bodyText&&n.push(' "strings"'),n.push(")","","func main() {"),t.bodyText?(n.push(" body := strings.NewReader(`"+$n(t.bodyText)+"`)"),n.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", body)')):n.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", nil)'),n.push(" if err != nil {"," panic(err)"," }"),r.forEach(function(s){n.push(' req.Header.Set("'+m(s[0])+'", "'+m(s[1])+'")')}),n.push(""," res, err := http.DefaultClient.Do(req)"," if err != nil {"," panic(err)"," }"," defer res.Body.Close()",""," data, err := io.ReadAll(res.Body)"," if err != nil {"," panic(err)"," }",""," fmt.Println(res.StatusCode)"," fmt.Println(string(data))","}"),n.join(`
12
- `)}function Bn(t,e,r){let n=["OkHttpClient client = new OkHttpClient();","","Request.Builder builder = new Request.Builder()",' .url("'+m(e)+'")'];return r.forEach(function(s){n.push(' .addHeader("'+m(s[0])+'", "'+m(s[1])+'")')}),t.bodyText?n.push(";","",'MediaType mediaType = MediaType.parse("'+m(t.mimeType||"application/json")+'");','RequestBody body = RequestBody.create("""'+m(t.bodyText)+'""", mediaType);','Request request = builder.method("'+t.method+'", body).build();'):n.push(";","",'Request request = builder.method("'+t.method+'", null).build();'),n.push("","try (Response response = client.newCall(request).execute()) {"," System.out.println(response.code());",' System.out.println(response.body() != null ? response.body().string() : "");',"}"),n.join(`
13
- `)}function Mn(t,e,r){let s=["using var client = new HttpClient();","using var request = new HttpRequestMessage(HttpMethod."+(t.method.charAt(0)+t.method.slice(1).toLowerCase())+', "'+m(e)+'");'];return r.forEach(function(i){s.push('request.Headers.TryAddWithoutValidation("'+m(i[0])+'", "'+m(i[1])+'");')}),t.bodyText&&s.push('request.Content = new StringContent("""'+m(t.bodyText)+'""", Encoding.UTF8, "'+m(t.mimeType||"application/json")+'");'),s.push("","using var response = await client.SendAsync(request);","var body = await response.Content.ReadAsStringAsync();","Console.WriteLine((int)response.StatusCode);","Console.WriteLine(body);"),s.join(`
14
- `)}function zn(t,e,r){let n=["$ch = curl_init();","curl_setopt_array($ch, ["," CURLOPT_URL => '"+Pt(e)+"',"," CURLOPT_CUSTOMREQUEST => '"+Pt(t.method)+"',"," CURLOPT_RETURNTRANSFER => true,"];return r.length&&(n.push(" CURLOPT_HTTPHEADER => ["),r.forEach(function(s){n.push(" '"+Pt(s[0]+": "+s[1])+"',")}),n.push(" ],")),t.bodyText&&n.push(" CURLOPT_POSTFIELDS => '"+Pt(t.bodyText)+"',"),n.push("]);","","$response = curl_exec($ch);","echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE) . PHP_EOL;","echo $response;","curl_close($ch);"),n.join(`
15
- `)}function Hn(t,e,r){let n=t.method.charAt(0)+t.method.slice(1).toLowerCase(),s=['require "uri"','require "net/http"',"","uri = URI('"+jt(e)+"')","http = Net::HTTP.new(uri.host, uri.port)",'http.use_ssl = uri.scheme == "https"',"","request = Net::HTTP::"+n+".new(uri)"];return r.forEach(function(i){s.push("request['"+jt(i[0])+"'] = '"+jt(i[1])+"'")}),t.bodyText&&s.push("request.body = '"+jt(t.bodyText)+"'"),s.push("","response = http.request(request)","puts response.code","puts response.body"),s.join(`
16
- `)}function qn(t,e,r){let n=["#include <curl/curl.h>","","int main(void) {"," CURL *curl = curl_easy_init();"," if (!curl) return 1;",""," struct curl_slist *headers = NULL;"];return r.forEach(function(s){n.push(' headers = curl_slist_append(headers, "'+_t(s[0]+": "+s[1])+'");')}),n.push(' curl_easy_setopt(curl, CURLOPT_URL, "'+_t(e)+'");'),n.push(' curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "'+_t(t.method)+'");'),r.length&&n.push(" curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);"),t.bodyText&&n.push(' curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "'+_t(t.bodyText)+'");'),n.push(""," curl_easy_perform(curl);"," curl_slist_free_all(headers);"," curl_easy_cleanup(curl);"," return 0;","}"),n.join(`
17
- `)}function Dn(t,e,r){let n=['var request = URLRequest(url: URL(string: "'+m(e)+'")!)','request.httpMethod = "'+m(t.method)+'"'];return r.forEach(function(s){n.push('request.setValue("'+m(s[1])+'", forHTTPHeaderField: "'+m(s[0])+'")')}),t.bodyText&&n.push('request.httpBody = """',t.bodyText,'""".data(using: .utf8)'),n.push("","URLSession.shared.dataTask(with: request) { data, response, error in"," if let error = error {"," print(error)"," return"," }"," let status = (response as? HTTPURLResponse)?.statusCode ?? 0"," print(status)",' print(String(data: data ?? Data(), encoding: .utf8) ?? "")',"}.resume()"),n.join(`
18
- `)}function Fn(t,e,r){let n=['NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"'+m(e)+'"]];','request.HTTPMethod = @"'+m(t.method)+'";'];return r.forEach(function(s){n.push('[request setValue:@"'+m(s[1])+'" forHTTPHeaderField:@"'+m(s[0])+'"];')}),t.bodyText&&n.push('request.HTTPBody = [@"'+m(t.bodyText)+'" dataUsingEncoding:NSUTF8StringEncoding];'),n.push("","NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request"," completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"," if (error) {",' NSLog(@"%@", error);'," return;"," }"," NSInteger status = [(NSHTTPURLResponse *)response statusCode];"," NSString *body = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];",' NSLog(@"%ld", (long)status);',' NSLog(@"%@", body);',"}];","[task resume];"),n.join(`
19
- `)}function Wn(t,e,r){let n=["val client = OkHttpClient()"];return t.bodyText&&n.push('val body = """',t.bodyText,'""".trimIndent().toRequestBody("'+m(t.mimeType||"application/json")+'".toMediaType())'),n.push("val request = Request.Builder()",' .url("'+m(e)+'")'),r.forEach(function(s){n.push(' .addHeader("'+m(s[0])+'", "'+m(s[1])+'")')}),n.push(t.bodyText?' .method("'+t.method+'", body)':' .method("'+t.method+'", null)'," .build()","","client.newCall(request).execute().use { response ->"," println(response.code)"," println(response.body?.string().orEmpty())","}"),n.join(`
20
- `)}function Vn(t,e,r){let n=["let client = reqwest::Client::new();","let response = client"," ."+t.method.toLowerCase()+'("'+m(e)+'")'];return r.forEach(function(s){n.push(' .header("'+m(s[0])+'", "'+m(s[1])+'")')}),t.bodyText&&n.push(' .body(r#"'+t.bodyText.replace(/"#/g,'"#""#')+'"#)'),n.push(" .send()"," .await?;","",'println!("{}", response.status());','println!("{}", response.text().await?);'),n.join(`
21
- `)}function Gn(t,e,r){let n=["$headers = @{"];return r.forEach(function(s){n.push(' "'+Bt(s[0])+'" = "'+Bt(s[1])+'"')}),n.push("}",""),t.bodyText&&n.push('$body = @"',t.bodyText,'"@',""),n.push("$response = Invoke-RestMethod -Method "+t.method+' -Uri "'+Bt(e)+'" -Headers $headers'+(t.bodyText?' -Body $body -ContentType "'+Bt(t.mimeType||"application/json")+'"':""),"$response | ConvertTo-Json -Depth 10"),n.join(`
22
- `)}function Zn(t,e,r){let n=["import 'package:http/http.dart' as http;","","final uri = Uri.parse('"+T(e)+"');","final headers = <String, String>{"];return r.forEach(function(s){n.push(" '"+T(s[0])+"': '"+T(s[1])+"',")}),n.push("};",""),t.bodyText?n.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers, body: '''"+t.bodyText.replace(/'''/g,"'' '")+"''');"):n.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers);"),n.push("print('Status: ${response.statusCode}');","print(response.body);"),n.join(`
23
- `)}function Kn(t,e,r){let n=['local http = require("socket.http")','local ltn12 = require("ltn12")',"","local response_body = {}","local headers = {"];return r.forEach(function(s){n.push(' ["'+m(s[0])+'"] = "'+m(s[1])+'",')}),n.push("}",""),t.bodyText&&(n.push("local body = [==["+Ln(t.bodyText)+"]==]",""),n.push('headers["Content-Length"] = tostring(#body)')),n.push("local _, code = http.request{",' url = "'+m(e)+'",',' method = "'+m(t.method)+'",'," headers = headers,"),t.bodyText&&n.push(" source = ltn12.source.string(body),"),n.push(" sink = ltn12.sink.table(response_body),","}","",'print("Status: " .. tostring(code))',"print(table.concat(response_body))"),n.join(`
24
- `)}var Qn={curl:Un,javascript:He,node:Pn,python:jn,go:_n,java:Bn,csharp:Mn,php:zn,ruby:Hn,c:qn,swift:Dn,objc:Fn,kotlin:Wn,rust:Vn,powershell:Gn,dart:Zn,lua:Kn};async function he(t,e){let r=At.find(function(i){return i.id===t});if(!r)throw new Error("Unknown language: "+t);let n=Tn(e,!0),s=En(e);return Qn[r.id](e,s,n)}var qe={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},Jn=["POST","PUT","PATCH"];function D(t){try{return sessionStorage.getItem(t)||""}catch{return""}}function Ct(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function fe(){return!!(D("apikey")||D("oauthkey"))}function me(t){return t.example!==void 0?String(t.example):t.default!==void 0?String(t.default):t.enum?.length?String(t.enum[0]):t.type==="integer"||t.type==="number"?t.format==="int64"?"10":"1":t.type==="boolean"?"true":t.required&&t.in==="path"?"string":""}function be(t,e){let r=D("apikey"),n=D("oauthkey");for(let s of t.security)s.type==="apiKey"&&s.in==="header"?e.header[s.name]=r:s.type==="apiKey"&&s.in==="query"?e.query[s.name]=r:s.type==="basic"?e.header.Authorization=r?`Basic ${r}`:"":(s.type==="oauth2"||s.type==="bearer")&&(e.header.Authorization=n?`Bearer ${n}`:"")}function De(t,e){let r={baseUrl:e,path:{},query:{},header:{},bodyText:"",mimeType:t.consumes?.[0]||"application/json"};return t.parameters.path.forEach(n=>{r.path[n.name]=me(n)}),t.parameters.query.forEach(n=>{r.query[n.name]=n.required?me(n):""}),t.parameters.header.forEach(n=>{r.header[n.name]=n.required?me(n):""}),t.produces?.length&&(r.header.Accept=t.produces.includes("application/json")?"application/json":t.produces[0]),t.parameters.body&&(r.mimeType=t.parameters.body.contentType||r.mimeType,r.bodyText=ge(t.parameters.body.example)),be(t,r),r}function ge(t){return typeof t=="string"?t:JSON.stringify(t,null,2)??""}function ye(t,e){let r=t.path;for(let[s,i]of Object.entries(e.path))r=r.replace(`{${s}}`,encodeURIComponent(i??""));let n=!!t.parameters.body&&Jn.includes(t.method);return{method:t.method,url:`${e.baseUrl}${r}`,query:Object.entries(e.query).filter(([,s])=>s!==""),headers:Object.entries(e.header).filter(([,s])=>s!==""),bodyText:n?e.bodyText:"",mimeType:e.mimeType}}function Fe(t){let e=t.query.length?`${t.url}?${new URLSearchParams(t.query)}`:t.url,r=Object.fromEntries(t.headers);return t.bodyText&&(r["Content-Type"]=r["Content-Type"]||t.mimeType),{url:e,headers:r,headerLines:Object.entries(r).map(([n,s])=>`${n}: ${s}`).join(`
25
- `)}}async function We(t,e){let r=performance.now(),n=await fetch(e.url,{method:t.method,headers:e.headers,body:t.bodyText||void 0}),s=Math.round(performance.now()-r),i=await n.text();return{status:n.status,statusText:n.statusText,ms:s,headerLines:[...n.headers.entries()].map(([u,c])=>`${u}: ${c}`).join(`
26
- `),bodyText:Yn(i)}}function Yn(t){try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function Ve(t){let e=parseInt(t,10);return t==="default"||Number.isNaN(e)?"default":e<300?"2xx":e<400?"3xx":e<500?"4xx":"5xx"}function Ge(t,e,r){if(!t)return"";try{let n=new URL(e),s=new URL(r.derivedBaseUrl||r.baseUrl||e),i=new URL(t,`${n.href.replace(/\/$/,"")}/`);return i.host===s.host&&(i.protocol=n.protocol,i.username=n.username,i.password=n.password,i.host=n.host),i.href}catch{return String(t)}}function Ze(){return Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("")}function Ke({def:t,clientId:e,scopes:r,state:n,redirectUri:s,baseUrl:i,doc:u}){let c=new URL(Ge(t.authorizationUrl,i,u));return c.searchParams.set("response_type",t.flow==="implicit"?"token":"code"),e&&c.searchParams.set("client_id",e),c.searchParams.set("redirect_uri",s),r.length&&c.searchParams.set("scope",r.join(" ")),c.searchParams.set("state",n),c.toString()}async function Qe(t,e,r,n){if(!t)throw new Error("No tokenUrl defined for this scheme.");let s=new URLSearchParams;for(let[c,p]of Object.entries(e))p&&s.set(c,p);let i=await fetch(Ge(t,r,n),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:s.toString()}),u=await i.json().catch(()=>({}));if(!i.ok||!u.access_token)throw new Error(u.error_description||u.error||`HTTP ${i.status}`);return u.access_token}function Je(t,e,r){let n={client_id:e.clientId,client_secret:e.clientSecret,scope:r.join(" ")};return t==="password"?{grant_type:"password",username:e.username,password:e.password,...n}:{grant_type:"client_credentials",...n}}var Xn=["curl","csharp","go","node","ruby","php"],ts="(max-width: 1100px)";function Ye(t){return t==="DELETE"?"DEL":t}function es(){let t=[...document.scripts].find(e=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(e.src));return t?`${t.src.replace(/[?#].*$/,"").replace(/\/[^/]*$/,"")}/apidoc`:""}var F=class extends d{get children(){return this.props.groups.filter(e=>e.parent===this.props.group.name)}methodLabel(e){return Ye(e)}};a(F,"template","baseui.ApiDocGroup"),a(F,"props",{group:Object,groups:Array,current:String,href:Function,onSelect:Function});F.components={ApiDocGroup:F,Icon:O};var _=class extends d{setup(){this.rootRef=C("root"),this.mainRef=C("main"),this.doc=null,this.pendingOAuth=new Map,this.watchers=new Set,this.rowsCache=new WeakMap,this.overlayQuery=window.matchMedia(ts),this.state=E({status:"loading",error:"",current:"introduction",lang:this.props.language||"curl",sidebarOpen:!this.overlayQuery.matches,systemTheme:"light",themeOverride:"",drafts:{},snippet:"",result:null,respTab:0,respView:{},authOpen:!1,authed:fe(),stored:{apikey:"",oauthkey:""},inputs:{apikey:"",oauthkey:""},oauth:{},oauthStatus:{}}),this.onHashChange=()=>this.setCurrent(this.routeId()),this.onViewportChange=()=>{this.state.sidebarOpen=!this.overlayQuery.matches},this.onDocumentClick=e=>this.closeSidebarOnOutsideClick(e),this.onOAuthMessage=e=>this.handleOAuthMessage(e),this.onThemeChange=()=>this.readSystemTheme(),bt(()=>this.load(this.props)),L(e=>this.shouldReload(e)?this.load(e):void 0),N(()=>this.addListeners()),ft(()=>this.removeListeners())}get classNames(){return b("bu-apidoc",this.props.className)}get rootStyle(){return Nt(this.props.height?`--bu-apidoc-height:${this.props.height}`:"",this.props.style)}get theme(){return(this.props.theme==="light"||this.props.theme==="dark"?this.props.theme:"")||this.state.themeOverride||this.state.systemTheme}get title(){return this.props.title||this.doc?.info.title||"API Documentation"}get tryItEnabled(){return this.props.tryIt!==!1}get hasSecurity(){return this.props.authorize!==!1&&Object.keys(this.doc?.securityDefinitions||{}).length>0}get languages(){let e=this.props.languages;return e?.length?At.filter(r=>e.includes(r.id)):At}get currentLanguage(){return this.languages.find(e=>e.id===this.state.lang)||this.languages[0]}get op(){return this.state.current==="introduction"?null:this.doc.findOperation(this.state.current)}get draft(){return this.state.drafts[this.state.current]}get showTryIt(){return this.tryItEnabled&&!!this.op}get sidebarGroups(){let e=this.doc.groups.filter(r=>!r.parent);return this.doc.webhooks.length&&e.push({id:"webhooks",name:"Webhooks",items:this.doc.webhooks,kind:""}),e}get breadcrumb(){let e=this.op;if(!e)return[{label:"Home",id:"introduction",home:!0},{label:"Introduction"}];let r=this.doc.groups.find(n=>n.name===e.tag);return[{label:"Home",id:"introduction",home:!0},{label:this.title,id:"introduction"},{label:e.tag,id:r?r.items[0].id:"introduction"},{label:e.summary}]}get authSchemes(){return Object.entries(this.doc.securityDefinitions).map(([e,r])=>({key:e,def:r,scopes:Object.entries(r.scopes||{})}))}get serverOptions(){return this.doc.servers.length?this.doc.servers:[{url:this.doc.baseUrl,name:"",description:""}]}get tryItParams(){let{path:e,query:r,header:n}=this.op.parameters;return[...e.map(s=>({...s,group:"path"})),...r.map(s=>({...s,group:"query"})),...n.map(s=>({...s,group:"header"}))]}get selectedBaseUrl(){return this.draft?.baseUrl||this.doc.baseUrl}methodLabel(e){return Ye(e)}statusClass(e){return Ve(e)}formatExample(e){return ge(e)}serverLabel(e){let r=[e.name,e.description].filter(Boolean).join(" \u2014 ");return r?`${r} (${e.url})`:e.url}languageTone(e){return Xn.includes(e)?e:"default"}encodingEntries(e){return Object.entries(e)}oauthFlowLabel(e){return qe[e]||e||"unknown"}schemaRows(e){return this.rowsCache.has(e)||this.rowsCache.set(e,this.doc.schemaRows(e)),this.rowsCache.get(e)}depth(e){return(e.match(/\./g)||[]).length}lineNumbers(e){return String(e||"").split(`
27
- `).map((r,n)=>n+1)}iconUrl(e){let r=this.props.assetBase??this.assetBase??(this.assetBase=es());return r?`${r.replace(/\/$/,"")}/${e.icon}`:""}href(e){return this.props.hash?`#/${e}`:"#"}shouldReload(e){return e.src!==this.props.src||e.spec!==this.props.spec||e.serverUrl!==this.props.serverUrl}async load(e){this.state.status="loading";try{this.doc=e.spec?Ut(e.spec,e.serverUrl):await de(e.src,e.serverUrl)}catch(r){this.state.status="error",this.state.error=r.message||String(r),e.onError?.(r);return}this.state.drafts={},this.state.current=this.routeId(e),this.ensureDraft(),this.state.status="ready",this.updateSnippet(),e.onLoad?.(this.doc)}routeId(e=this.props){let r=e.hash?location.hash.replace(/^#\//,""):e.operation;return r&&this.doc.findOperation(r)?r:"introduction"}go(e,r){this.props.hash||(e.preventDefault(),this.setCurrent(r)),this.overlayQuery.matches&&(this.state.sidebarOpen=!1)}setCurrent(e){let r=this.state;r.current=e,r.result=null,r.respTab=0,r.respView={},this.ensureDraft(),this.updateSnippet(),this.mainRef.el&&(this.mainRef.el.scrollTop=0),this.props.onNavigate?.(e)}ensureDraft(){let e=this.op;e&&!this.state.drafts[e.id]&&(this.state.drafts[e.id]=De(e,this.doc.baseUrl))}toggleSidebar(){this.state.sidebarOpen=!this.state.sidebarOpen}closeSidebarOnOutsideClick(e){!this.overlayQuery.matches||!this.state.sidebarOpen||e.target.closest?.(".sidebar-shell, .sidebar-toggle")||(this.state.sidebarOpen=!1)}selectResponse(e){this.state.respTab=Number(e)}setResponseView(e,r){this.state.respView[e]=r}setLanguage(e){this.state.lang=e,this.updateSnippet()}onBaseUrl(e){this.draft.baseUrl=e,this.updateSnippet()}onParam(e,r,n){this.draft[r][n]=e,this.updateSnippet()}onBody(e){this.draft.bodyText=e,this.updateSnippet()}async updateSnippet(){let e=this.op;if(!e||!this.tryItEnabled)return;let r=this.currentLanguage;try{this.state.snippet=await he(r.id,ye(e,this.draft))}catch(n){this.state.snippet=`// Could not generate ${r.label} snippet: ${n.message}`}}async send(){let e=this.op,r=ye(e,this.draft),n=Fe(r),s={method:r.method,url:n.url,headerLines:n.headerLines,bodyText:r.bodyText};this.state.result={phase:"sending",sent:s};let i;try{i={phase:"done",sent:s,res:await We(r,n)}}catch(u){i={phase:"error",sent:s,message:u.message}}this.state.current===e.id&&(this.state.result=i)}clearResult(){this.state.result=null}collapseRequest(){this.rootRef.el.querySelectorAll(".tryit-card details").forEach((e,r)=>{r<3&&(e.open=!1)})}toggleTheme(){this.state.themeOverride=this.theme==="dark"?"light":"dark"}readSystemTheme(){let e=document.documentElement.getAttribute("data-bs-theme"),r=e?e==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches;this.state.systemTheme=r?"dark":"light"}openAuth(){var r;let e=this.state;e.stored.apikey=D("apikey"),e.stored.oauthkey=D("oauthkey"),e.inputs.apikey=e.stored.apikey,e.inputs.oauthkey=e.stored.oauthkey;for(let{key:n,def:s}of this.authSchemes)(r=e.oauth)[n]??(r[n]={clientId:"",clientSecret:"",username:"",password:"",scopes:Object.keys(s.scopes||{})});e.authOpen=!0}closeAuth(){this.state.authOpen=!1}setAuthOpen(e){this.state.authOpen=e}setAuthInput(e,r){this.state.inputs[e]=r}setField(e,r,n){e[r]=n}saveAuth(){Ct("apikey",this.state.inputs.apikey.trim()),Ct("oauthkey",this.state.inputs.oauthkey.trim()),this.closeAuth(),this.applyAuthToAll()}clearAuth(e){Ct(e,""),this.state.stored[e]="",this.state.inputs[e]="",this.applyAuthToAll()}applyAuthToAll(){for(let[e,r]of Object.entries(this.state.drafts))be(this.doc.findOperation(e),r);this.state.authed=fe(),this.updateSnippet()}toggleScope(e,r){let n=this.state.oauth[e].scopes,s=n.indexOf(r);s<0?n.push(r):n.splice(s,1)}setOAuthStatus(e,r,n=!1){this.state.oauthStatus[e]={message:r,isError:n}}applyOAuthToken(e,r,n){Ct("oauthkey",r),this.state.stored.oauthkey=r,this.state.inputs.oauthkey=r,Object.assign(this.state.oauth[e],{clientId:n.clientId,clientSecret:n.clientSecret}),this.applyAuthToAll(),this.setOAuthStatus(e,"Token acquired.")}async fetchToken(e,r,n){try{let s=await Qe(this.doc.securityDefinitions[e].tokenUrl,r,this.selectedBaseUrl,this.doc);this.applyOAuthToken(e,s,n)}catch(s){this.setOAuthStatus(e,`Token request failed: ${s.message}. This is usually a CORS restriction on the auth server.`,!0)}}startOAuth2Flow(e){let r=this.doc.securityDefinitions[e],n=this.state.oauth[e],s=[...n.scopes];if(r.flow==="implicit"||r.flow==="accessCode")return this.openOAuthPopup(e,r,n,s);if(r.flow==="password"||r.flow==="application")return this.setOAuthStatus(e,"Requesting token\u2026"),this.fetchToken(e,Je(r.flow,n,s),n);this.setOAuthStatus(e,`Unsupported OAuth2 flow: ${r.flow}`,!0)}openOAuthPopup(e,r,n,s){if(!r.authorizationUrl)return this.setOAuthStatus(e,"No authorizationUrl defined for this scheme.",!0);let i=Ze(),u=Ke({def:r,clientId:n.clientId,scopes:s,state:i,redirectUri:this.redirectUri,baseUrl:this.selectedBaseUrl,doc:this.doc}),c=window.open(u,`oauth2-authorize-${e}`,"width=560,height=680");if(!c)return this.setOAuthStatus(e,"Popup blocked \u2014 allow popups for this site and try again.",!0);this.pendingOAuth.set(i,{key:e,flow:r.flow,fields:{...n}}),this.setOAuthStatus(e,"Waiting for authorization in the popup\u2026"),this.watchPopup(c,i,e)}watchPopup(e,r,n){let s=setInterval(()=>{e.closed&&(clearInterval(s),this.watchers.delete(s),this.pendingOAuth.delete(r)&&this.setOAuthStatus(n,"Authorization window was closed before completing.",!0))},500);this.watchers.add(s)}get redirectUri(){return this.props.oauthRedirectUri||new URL("oauth2-redirect.html",document.baseURI).href}handleOAuthMessage(e){let r=e.data;if(e.origin!==window.location.origin||r?.source!=="oauth2-redirect")return;let n=this.pendingOAuth.get(r.state);if(!n)return;this.pendingOAuth.delete(r.state);let{key:s,flow:i,fields:u}=n;if(r.error)return this.setOAuthStatus(s,`Authorization failed: ${r.error}${r.errorDescription?" - "+r.errorDescription:""}`,!0);if(i==="implicit")return r.accessToken?this.applyOAuthToken(s,r.accessToken,u):this.setOAuthStatus(s,"Authorization server did not return an access token.",!0);if(!r.code)return this.setOAuthStatus(s,"Authorization server did not return a code.",!0);this.setOAuthStatus(s,"Exchanging code for token\u2026"),this.fetchToken(s,{grant_type:"authorization_code",code:r.code,redirect_uri:this.redirectUri,client_id:u.clientId,client_secret:u.clientSecret},u)}addListeners(){this.readSystemTheme(),this.themeObserver=new MutationObserver(this.onThemeChange),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-bs-theme"]}),window.addEventListener("hashchange",this.onHashChange),window.addEventListener("message",this.onOAuthMessage),document.addEventListener("click",this.onDocumentClick),this.overlayQuery.addEventListener("change",this.onViewportChange)}removeListeners(){this.themeObserver?.disconnect(),window.removeEventListener("hashchange",this.onHashChange),window.removeEventListener("message",this.onOAuthMessage),document.removeEventListener("click",this.onDocumentClick),this.overlayQuery.removeEventListener("change",this.onViewportChange),this.watchers.forEach(clearInterval)}};a(_,"template","baseui.ApiDoc"),a(_,"components",{ApiDocGroup:F,Markdown:B,Badge:j,Breadcrumb:ut,BreadcrumbItem:lt,BreadcrumbLink:pt,BreadcrumbList:ct,BreadcrumbPage:dt,BreadcrumbSeparator:q,Button:$,Checkbox:G,Dialog:Z,DialogContent:z,DialogDescription:Y,DialogFooter:Q,DialogHeader:K,DialogTitle:J,Icon:O,Input:et,NativeSelect:rt,TabContent:at,Tabs:st,TabsContainer:ot,TabsList:it,TabTrigger:H,Textarea:nt}),a(_,"props",{src:o(String),spec:o(Object),title:o(String),serverUrl:o(String),theme:o(String),themeToggle:o(Boolean),hash:o(Boolean),operation:o(String),tryIt:o(Boolean),authorize:o(Boolean),languages:o(Array),language:o(String),assetBase:o(String),oauthRedirectUri:o(String),height:o(String),onLoad:o(Function),onError:o(Function),onNavigate:o(Function),className:o(String),style:o([String,Object])});var rs=`<templates>
4
+ var BaseUIApiDoc=(()=>{var ne=Object.create;var fo=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var ie=(t,e,n)=>e in t?fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ho=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var pe=(t,e)=>{for(var n in e)fo(t,n,{get:e[n],enumerable:!0})},St=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of ce(e))!ae.call(t,c)&&c!==n&&fo(t,c,{get:()=>e[c],enumerable:!(r=re(e,c))||r.enumerable});return t};var $o=(t,e,n)=>(n=t!=null?ne(se(t)):{},St(e||!t||!t.__esModule?fo(n,"default",{value:t,enumerable:!0}):n,t)),le=t=>St(fo({},"__esModule",{value:!0}),t);var i=(t,e,n)=>ie(t,typeof e!="symbol"?e+"":e,n);var ir={};pe(ir,{ApiDoc:()=>N,mountApiDoc:()=>ar});var h=globalThis.owl;if(!h)throw new Error("BaseUI: load dist/baseui.min.js or dist/baseui.esm.js before this script (globalThis.owl is not set).");var ue=h.App,yt=h.Component,de=h.EventBus,xe=h.OwlError,he=h.__info__,Ie=h.batched,fe=h.blockDom,me=h.htmlEscape,jo=h.loadFile,ge=h.markRaw,Wo=h.markup,Ct=h.mount,be=h.onError,T=h.onMounted,U=h.onPatched,we=h.onRendered,mo=h.onWillDestroy,Se=h.onWillPatch,ye=h.onWillRender,go=h.onWillStart,F=h.onWillUnmount,B=h.onWillUpdateProps,Ce=h.reactive,ke=h.status,ve=h.toRaw,bo=h.useChildSubEnv,Ae=h.useComponent,_o=h.useEffect,qe=h.useEnv,Pe=h.useExternalListener,C=h.useRef,A=h.useState,Te=h.useSubEnv,Le=h.validate,Oe=h.validateType,Re=h.whenReady,Vo=h.xml;var qo={};function Be(t){let e=t.components;e?e!==qo&&Object.getPrototypeOf(e)===Object.prototype&&Object.setPrototypeOf(e,qo):t.components=Object.create(qo)}var x=class extends yt{constructor(...e){super(...e),Be(this.constructor)}};function kt(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,n,r="",c="")=>`<${n}${Ee(n,r)}${c}>`)}function Ee(t,e){let n=/\st-(att|attf|model|on)([.\s=-]|$)/.test(e),r=e.replace(/(\s)t-att\s*=/g,"$1t-props=").replace(/(\s)t-att-([A-Za-z_][\w:.-]*)\s*=/g,"$1$2=").replace(/(\s)t-attf-([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(c,a,p,l,d)=>`${a}${p}=${l}${De(d)}${l}`);return r=r.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(c,a,p,l,d)=>Ne(t,a,p,l,d,r)),n?Me(r):r}function Me(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,n,r,c,a)=>r.startsWith("t-")||r==="t-props"||Fe(a)?e:`${n}${r}=${c}${Ue(a)}${c}`)}function Ue(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function Fe(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function De(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,n,r)=>`\${${n||r}}`)}\``}function Ne(t,e,n,r,c,a){let p=/^(Checkbox|Switch)$/.test(t),l=ze(t,n),d=p?"checked":"value",f=new RegExp(`\\s${d}\\s*=`).test(a)?"":`${e}${d}=${r}${c}${r}`,b=new RegExp(`\\s${l}\\s*=`).test(a)?"":`${e}${l}=${r}${He(c,n,p)}${r}`;return`${f}${b}`}function ze(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea)$/.test(t)?"onInput":"onChange"}function He(t,e,n){if(n)return`(value) => { ${t} = value; }`;let r="value";return e.includes(".trim")&&(r=`(typeof ${r} === 'string' ? ${r}.trim() : ${r})`),e.includes(".number")&&(r=`Number.isNaN(Number(${r})) ? ${r} : Number(${r})`),`(value) => { ${t} = ${r}; }`}function vt(t,...e){return Array.isArray(t?.raw)?Vo({raw:t.raw.map(kt)},...e):Vo(t,...e)}function Po(t,e,n={}){let r=kt(n.templates);return t.components={...qo,...t.components||{}},Ct(t,e,r===n.templates?n:{...n,templates:r})}function m(...t){let e=[];for(let n of t)if(n){if(typeof n=="string")e.push(n);else if(Array.isArray(n)){let r=m(...n);r&&e.push(r)}else if(typeof n=="object")for(let[r,c]of Object.entries(n))c&&e.push(r)}return e.join(" ")}function s(t){return{type:t,optional:!0}}var g={className:s(String),style:s([String,Object]),slots:s(Object)};function E(t,e,n){return t[e]??(n?t[n]:void 0)}function To(t){return t===!0||t==="open"||t==="on"||t==="active"}function Lo(...t){let e=[];for(let n of t)if(n){if(typeof n=="string"){let r=n.trim().replace(/;$/,"");r&&e.push(r)}else if(typeof n=="object")for(let[r,c]of Object.entries(n)){if(c==null||c==="")continue;let a=r.replace(/[A-Z]/g,p=>"-"+p.toLowerCase());e.push(`${a}:${c}`)}}return e.join(";")}function Oo(t){return t.state!==void 0?To(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function Go(t){return t.state!==void 0||t.open!==void 0}var Xo={primary:"bu-badge-primary",secondary:"bu-badge-secondary",success:"bu-badge-success",warning:"bu-badge-warning",danger:"bu-badge-danger",info:"bu-badge-info",muted:"bu-badge-muted"};var D=class extends x{get classNames(){return m("badge",Xo[this.props.variant]||Xo.secondary,this.props.pill&&"rounded-pill",this.props.className)}};i(D,"template","baseui.Badge"),i(D,"props",{variant:s(String),pill:s(Boolean),label:s(String),...g});var $e="__BASEUI_VERSION__",Zo=new Map,wo=new WeakMap,Ro="[b-ui], [b-icon]",je="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";function We(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function Ko(t,e,n={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n}))}function _e(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function Ve(t,e){return e===document||e===t||e.contains(t)}function Ge(t,e={}){return!e.allowBootstrapControl&&t.matches(je)}var Qo=typeof window<"u"?window.thebase:void 0,G=Qo?.register?Qo:Object.assign(Qo||{},{version:$e,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return Zo.set(t,e),this},component(t){return Zo.get(t)},mount(t,e={}){let n=We(t);if(!n||Ge(n,e))return null;let r=_e(n,e),c=Zo.get(r);if(!c)return null;let a=wo.get(n);if(a?.name===r)return a;a&&(a.destroy?.(),wo.delete(n),Ko(n,"baseui:destroyed",{name:a.name}));let p=c.mount?.(n,this,e)||{},l={name:r,element:n,destroy:p.destroy};return wo.set(n,l),Ko(n,"baseui:mounted",{name:r,instance:l}),l},mountAll(t=document){let e=t||document,n=[...e.querySelectorAll?.(Ro)||[]];return e instanceof Element&&e.matches(Ro)&&n.unshift(e),n.map(r=>this.mount(r)).filter(Boolean)},destroy(t=document){let e=t||document,n=[...e.querySelectorAll?.(Ro)||[]];e instanceof Element&&e.matches(Ro)&&n.unshift(e);for(let r of n){let c=wo.get(r);c&&Ve(r,e)&&(c.destroy?.(),wo.delete(r),Ko(r,"baseui:destroyed",{name:c.name}))}},theme:{set(t){let e=document.documentElement;if(typeof t=="string"){e.setAttribute("b-theme",t),e.dataset.bsTheme=t;return}for(let[n,r]of Object.entries(t||{})){let c=n==="radius"||n==="--b-radius"?"--base-radius":n.startsWith("--")?n:`--b-${n}`;e.style.setProperty(c,r)}}}});typeof window<"u"&&(window.thebase=G,window.BaseUI=G);var At="1.31.0",Xe=`https://cdn.jsdelivr.net/npm/lucide-static@${At}/icons`,Eo="file",Ze=/^[a-z0-9][a-z0-9-]*$/,Jo=new Map;function Ke(t){return typeof Image>"u"?Promise.resolve(!0):(Jo.has(t)||Jo.set(t,new Promise(e=>{let n=new Image;n.onload=()=>e(!0),n.onerror=()=>e(!1),n.src=t})),Jo.get(t))}function Bo(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function So(t,e={}){let n=Bo(t);if(!Ze.test(n))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||G.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${n}.svg`}function Yo(t,e,n={}){let r=n.url||So(e,n),c=n.label??t.getAttribute("aria-label")??"";t.classList.add("bu-icon"),t.style.setProperty("--b-icon-url",`url("${r.replace(/"/g,"%22")}")`),(n.size||t.getAttribute("b-att-size"))&&t.style.setProperty("--b-icon-size",n.size||t.getAttribute("b-att-size")),c?(t.setAttribute("role","img"),t.setAttribute("aria-label",c)):t.setAttribute("aria-hidden","true");let a=n.fallback===!1?null:n.fallback||Eo;return a&&!n.url&&Bo(e)!==Bo(a)&&Ke(r).then(p=>{if(p||!t.isConnected)return;let l=So(a,n);t.style.setProperty("--b-icon-url",`url("${l.replace(/"/g,"%22")}")`)}),t}G.icons={...G.icons||{},lucide:{version:At,cdnBaseUrl:Xe,normalizeName:Bo,url:So,render:Yo}};var yo={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},Mo={xs:"btn-xs",sm:"btn-sm",lg:"btn-lg",icon:"btn-icon","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-lg":"btn-icon-lg"};var qr=["btn","bu-button","bu-clipboard-button",...Object.values(yo),...Object.values(Mo)];async function qt(t){let e=String(t??"");if(globalThis.navigator?.clipboard?.writeText)try{await globalThis.navigator.clipboard.writeText(e);return}catch{}if(typeof document>"u")throw new Error("BaseUI ClipboardButton: no clipboard API available in this environment.");let n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.opacity="0",n.style.pointerEvents="none",document.body.append(n),n.select(),n.setSelectionRange(0,e.length);let r;try{r=document.execCommand("copy")}catch{r=!1}if(n.remove(),!r)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var ot,tt,et,Qe=0;function Je(){return ot??(ot=import("./runtime/marked/marked.min.js").then(t=>{let e=t.marked||t.default?.marked||globalThis.marked;if(!e?.parse)throw new Error("BaseUI markdown: failed to load src/runtime/marked/marked.min.js");return e})),ot}function Ye(t){let e=t.closest("[data-bs-theme]")?.getAttribute("data-bs-theme")||document.documentElement.getAttribute("data-bs-theme");return(e?e==="dark":window.matchMedia?.("(prefers-color-scheme: dark)").matches)?"dark":"default"}function on(){return tt??(tt=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),tt}function tn(){return et??(et=import("./runtime/milkdown/milkdown-editor.js")),et}async function Pt(t,e={}){return(await Je()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function rt(t,e,n,r=""){t.classList.add("bu-markdown-diagram-error"),t.replaceChildren();let c=document.createElement("p");if(c.className="bu-markdown-diagram-error-message",c.textContent=`Unable to render ${e} diagram: ${n?.message||n}`,t.append(c),r){let a=document.createElement("pre"),p=document.createElement("code");p.textContent=r,a.append(p),t.append(a)}}async function en(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let n;try{n=await on()}catch(r){e.forEach(c=>{let a=c.closest("pre");a.replaceChildren(),a.className="bu-markdown-diagram bu-markdown-mermaid",rt(a,"mermaid",r,c.textContent)});return}n.initialize({startOnLoad:!1,securityLevel:"strict",theme:Ye(t)});for(let r of e){let c=r.textContent,a=r.closest("pre");a.replaceChildren(),a.className="bu-markdown-diagram bu-markdown-mermaid";try{let{svg:p}=await n.render(`bu-mermaid-${++Qe}`,c);a.innerHTML=p}catch(p){rt(a,"mermaid",p,c)}}}function nn(t){let e=globalThis.thebase;if(!e?.mountAll)return;let n=document.createElement("div");n.setAttribute("b-ui","toast"),n.setAttribute("b-att-state","open"),n.setAttribute("b-att-delay","2000"),n.className="bu-markdown-bu-copy-toast",n.textContent=t,document.body.append(n),e.mountAll(n),n.addEventListener("baseui:close",()=>n.remove(),{once:!0})}function rn(t){let e=document.createElement("div");e.className="bu-markdown-bu-code";let n=document.createElement("button");n.type="button",n.className="bu-markdown-bu-copy";let r=document.createElement("span");Yo(r,"copy",{label:"Copy code"}),n.append(r),n.addEventListener("click",async()=>{try{await qt(t),n.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),nn("Copied to clipboard")}catch(p){n.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:p}}))}}),e.append(n);let c=document.createElement("pre"),a=document.createElement("code");a.className="bu-markdown-bu-code-lines";for(let p of t.replace(/\n$/,"").split(`
5
+ `)){let l=document.createElement("span");l.className="bu-markdown-bu-code-line",l.textContent=p,a.append(l)}return c.append(a),e.append(c),e}var nt;function cn(){return nt??(nt=jo("/dist/baseui.templates.xml")),nt}var ct=new WeakMap;function st(t){let e=ct.get(t);if(e){ct.delete(t);for(let n of e)try{n.destroy()}catch{}}}var sn=/\bstate\.([A-Za-z_$][\w$]*)/g;function an(t){return new Set([...t.matchAll(sn)].map(e=>e[1]))}var pn=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,ln=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g;function un(t){let e=new Set;for(let n of t.matchAll(pn))e.add(n[1]);for(let n of t.matchAll(ln))e.add(n[2]);return e}function dn(t){let e=vt({raw:[t]}),n=an(t);class r extends x{setup(){this.state=A(Object.fromEntries([...n].map(a=>[a,""])))}}i(r,"template",e);for(let c of un(t))r.prototype[c]=function(){};return r}function Tt(t){t.querySelector("[data-slot='dropdown-menu'], .bu-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("bu-markdown-bu-preview-overlay")}async function xn(t,e){let[n,r]=await Promise.all([cn(),dn(e)]),c=await Po(r,t,{templates:n});return Tt(t),c}function hn(t,e){let n=globalThis.thebase;if(!n?.mountAll)throw new Error("BaseUI runtime not found on the page \u2014 load dist/baseui.min.js before mounting Markdown.");t.innerHTML=e,Tt(t),n.mountAll(t)}async function In(t){st(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let n=new Set;for(let r of e){let c=r.textContent,a=r.closest("pre");a.replaceChildren(),a.className="bu-markdown-live bu-markdown-baseui";let p=document.createElement("div");p.className="bu-markdown-bu-preview",a.append(p,rn(c));try{/<[A-Z]/.test(c)?n.add(await xn(p,c)):hn(p,c)}catch(l){rt(a,"BaseUI component",l,c)}}n.size&&ct.set(t,n)}function fn(t){for(let e of t.querySelectorAll("li > input[type=checkbox]:not([aria-label])"))e.setAttribute("aria-label",e.parentElement.textContent.trim())}async function Lt(t,{mermaid:e=!0,baseUi:n=!0}={}){fn(t),e&&await en(t),n&&await In(t)}async function Ot(t){return(await tn()).createMilkdownMarkdownEditor(t)}function Bt(t){let e=String(t??""),n=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!n)return{data:{},content:e};let r={};for(let c of n[1].split(/\r?\n/)){let a=c.trim();if(!a||a.startsWith("#"))continue;let p=a.indexOf(":");if(p===-1)continue;let l=a.slice(0,p).trim();l&&(r[l]=mn(a.slice(p+1).trim()))}return{data:r,content:e.slice(n[0].length)}}function Rt(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function mn(t){if(t==="")return"";if(t==="true")return!0;if(t==="false")return!1;if(/^-?\d+(\.\d+)?$/.test(t))return Number(t);if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1).trim();return e?e.split(",").map(n=>Rt(n.trim())):[]}return Rt(t)}var z=class extends x{setup(){this.rootRef=C("root"),this.editorRef=C("editor"),this.editorHandle=null,this.state=A({html:"",source:"",status:"loading",error:"",frontmatter:{}}),go(()=>this.load(this.props)),B(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),T(()=>this.afterRender()),U(()=>this.afterRender()),mo(()=>{this.destroyEditor(),this.rootRef.el&&st(this.rootRef.el)})}get classNames(){return m("bu-markdown",this.props.className)}get editorLabel(){return this.props.collaborative?"Collaborative Markdown editor":"Markdown editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.editable!==this.props.editable||e.collaborative!==this.props.collaborative||e.room!==this.props.room||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let n=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);n=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}try{this.state.source=n;let{data:r,content:c}=Bt(n);this.state.frontmatter=r,this.state.html=Wo(await Pt(c)),this.state.status="ready"}catch(r){this.state.status="error",this.state.error=r.message||String(r)}}get hasFrontmatterMeta(){let e=this.state.frontmatter;return!!(e.tags?.length||e.authors?.length)}enhance(){let e=this.rootRef.el;!e||this.state.status!=="ready"||Lt(e,{mermaid:this.props.mermaid!==!1,baseUi:this.props.baseUi!==!1})}afterRender(){this.props.editable?this.mountEditor():this.enhance()}async mountEditor(){let e=this.editorRef.el;if(!(!e||this.editorHandle||this.state.status!=="ready"))try{this.editorHandle=await Ot({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"bu-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(n,r,c)=>{this.state.source=n,this.props.onChange?.(n,r,c)}})}catch(n){this.state.status="error",this.state.error=n.message||String(n)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};i(z,"template","baseui.Markdown"),i(z,"components",{Badge:D}),i(z,"props",{content:s(String),src:s(String),mermaid:s(Boolean),baseUi:s(Boolean),editable:s(Boolean),collaborative:s(Boolean),room:s(String),password:s(String),signaling:s(Array),user:s(Object),onChange:s(Function),className:s(String),style:s([String,Object])});var q=class extends x{setup(){this.state=A({failed:!1}),_o(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===Eo)return;let n=new Image;return n.onerror=()=>{this.state.failed=!0},n.src=this.buildUrl(e),()=>{n.onload=null,n.onerror=null}},()=>[this.name])}buildUrl(e){return So(e,{baseUrl:E(this.props,"base-url","baseUrl")})}get name(){return E(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?Eo:this.name)}get style(){let e=[`--b-icon-url:url("${this.url.replace(/"/g,"%22")}")`];return this.props.size&&e.push(`--b-icon-size:${this.props.size}`),Lo(e.join(";"),this.props.style)}get classNames(){return m("bu-icon",this.props.className)}};i(q,"template","baseui.Icon"),i(q,"props",{icon:s(String),name:s(String),label:s(String),title:s(String),size:s(String),"base-url":s(String),baseUrl:s(String),className:s(String),style:s([String,Object])});function o(t){return class extends q{get name(){return E(this.props,"icon","name")||t}}}var O=class extends x{setup(){this.rootRef=C("root"),this.props.getRef&&(T(()=>this.props.getRef(this.rootRef.el)),F(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?m(this.props.className):m("btn","bu-button",yo[this.props.variant]||yo.default,Mo[this.props.size],this.isIconOnly&&"bu-button-icon",this.props.className)}get iconPosition(){return E(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return E(this.props,"aria-label","ariaLabel")}get ariaPressed(){return E(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=E(this.props,"aria-invalid","ariaInvalid");return e===!0?"true":e}get isIconOnly(){return!!(this.props.icon&&!this.props.label&&!this.props.slots?.default)}onClick(e){if(this.props.href&&this.props.disabled){e.preventDefault();return}this.props.onClick?.(e)}};i(O,"template","baseui.Button"),i(O,"components",{Icon:q}),i(O,"props",{variant:s(String),size:s(String),type:s(String),href:s(String),disabled:s(Boolean),label:s(String),icon:s(String),"icon-position":s(String),iconPosition:s(String),unstyled:s(Boolean),attrs:s(Object),getRef:s(Function),...g,id:s(String),title:s(String),"aria-label":s(String),ariaLabel:s(String),"aria-pressed":s(String),ariaPressed:s(String),"aria-invalid":s([String,Boolean]),ariaInvalid:s([String,Boolean]),onClick:s(Function)});var X=class extends x{onChange(e){this.props.onChange?.(e.target.checked,e)}};i(X,"template","baseui.Checkbox"),i(X,"props",{checked:s(Boolean),disabled:s(Boolean),...g,id:s(String),onChange:s(Function)});function H(){let t=globalThis.bootstrap;if(!t)throw new Error("BaseUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return t}function Et(t,e){B(n=>{Go(n)&&(t.open=Oo(n),t.open?e?.instance?.show():e?.instance?.hide())})}function Mt(t,e,n){Go(t)||(e.open=n),t.onOpenChange?.(n)}var Z=class extends x{setup(){this.dialogState=A({open:Oo(this.props)}),this.control={instance:null},bo({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),Et(this.dialogState,this.control)}setOpen(e){Mt(this.props,this.dialogState,e)}};i(Z,"template","baseui.Dialog"),i(Z,"props",{open:s(Boolean),state:s(String),"default-open":s(Boolean),defaultOpen:s(Boolean),onOpenChange:s(Function),style:s([String,Object]),slots:s(Object)});var $=class extends x{setup(){this.rootRef=C("root"),this.previousFocus=null,this.onShow=()=>{this.previousFocus=document.activeElement},this.onShown=()=>this.env.setDialogOpen(!0),this.onHidden=()=>{this.env.setDialogOpen(!1),this.previousFocus?.focus?.(),this.previousFocus=null},T(()=>{this.env.dialogControl.instance=H().Modal.getOrCreateInstance(this.rootRef.el,{backdrop:!0,keyboard:!0,focus:!0}),this.rootRef.el.addEventListener("show.bs.modal",this.onShow),this.rootRef.el.addEventListener("shown.bs.modal",this.onShown),this.rootRef.el.addEventListener("hidden.bs.modal",this.onHidden),this.env.dialog.open&&this.env.dialogControl.instance.show()}),F(()=>{this.rootRef.el.removeEventListener("show.bs.modal",this.onShow),this.rootRef.el.removeEventListener("shown.bs.modal",this.onShown),this.rootRef.el.removeEventListener("hidden.bs.modal",this.onHidden),this.env.dialogControl.instance?.dispose(),this.env.dialogControl.instance=null})}get showCloseButton(){return this.props.showCloseButton!==!1&&this.props["show-close-button"]!==!1}};i($,"template","baseui.DialogContent"),i($,"components",{Button:O}),i($,"props",{...g,showCloseButton:s(Boolean),"show-close-button":s(Boolean)});var K=class extends x{};i(K,"template","baseui.DialogHeader"),i(K,"props",g);var Q=class extends x{};i(Q,"template","baseui.DialogFooter"),i(Q,"props",g);var J=class extends x{};i(J,"template","baseui.DialogTitle"),i(J,"props",g);var Y=class extends x{};i(Y,"template","baseui.DialogDescription"),i(Y,"props",g);var mc=o("a-arrow-down"),gc=o("a-arrow-up"),bc=o("a-large-small"),wc=o("accessibility"),Sc=o("activity"),yc=o("activity-square"),Cc=o("ad"),kc=o("air-vent"),vc=o("airplay"),Ac=o("alarm-check"),qc=o("alarm-clock"),Pc=o("alarm-clock-check"),Tc=o("alarm-clock-minus"),Lc=o("alarm-clock-off"),Oc=o("alarm-clock-plus"),Rc=o("alarm-minus"),Bc=o("alarm-plus"),Ec=o("alarm-smoke"),Mc=o("album"),Uc=o("alert-circle"),Fc=o("alert-octagon"),Dc=o("alert-triangle"),Nc=o("align-center"),zc=o("align-center-horizontal"),Hc=o("align-center-vertical"),$c=o("align-end-horizontal"),jc=o("align-end-vertical"),Wc=o("align-horizontal-distribute-center"),_c=o("align-horizontal-distribute-end"),Vc=o("align-horizontal-distribute-start"),Gc=o("align-horizontal-justify-center"),Xc=o("align-horizontal-justify-end"),Zc=o("align-horizontal-justify-start"),Kc=o("align-horizontal-space-around"),Qc=o("align-horizontal-space-between"),Jc=o("align-justify"),Yc=o("align-left"),os=o("align-right"),ts=o("align-start-horizontal"),es=o("align-start-vertical"),ns=o("align-vertical-distribute-center"),rs=o("align-vertical-distribute-end"),cs=o("align-vertical-distribute-start"),ss=o("align-vertical-justify-center"),as=o("align-vertical-justify-end"),is=o("align-vertical-justify-start"),ps=o("align-vertical-space-around"),ls=o("align-vertical-space-between"),us=o("ambulance"),ds=o("ampersand"),xs=o("ampersands"),hs=o("amphora"),Is=o("anchor"),fs=o("angle"),ms=o("angry"),gs=o("annoyed"),bs=o("antenna"),ws=o("anvil"),Ss=o("aperture"),ys=o("app-window"),Cs=o("app-window-mac"),ks=o("apple"),vs=o("archive"),As=o("archive-restore"),qs=o("archive-x"),Ps=o("area-chart"),Ts=o("armchair"),Ls=o("arrow-big-down"),Os=o("arrow-big-down-dash"),Rs=o("arrow-big-left"),Bs=o("arrow-big-left-dash"),Es=o("arrow-big-right"),Ms=o("arrow-big-right-dash"),Us=o("arrow-big-up"),Fs=o("arrow-big-up-dash"),Ds=o("arrow-down"),Ns=o("arrow-down-01"),zs=o("arrow-down-10"),Hs=o("arrow-down-a-z"),$s=o("arrow-down-az"),js=o("arrow-down-circle"),Ws=o("arrow-down-from-line"),_s=o("arrow-down-left"),Vs=o("arrow-down-left-from-circle"),Gs=o("arrow-down-left-from-square"),Xs=o("arrow-down-left-square"),Zs=o("arrow-down-narrow-wide"),Ks=o("arrow-down-right"),Qs=o("arrow-down-right-from-circle"),Js=o("arrow-down-right-from-square"),Ys=o("arrow-down-right-square"),oa=o("arrow-down-square"),ta=o("arrow-down-to-dot"),ea=o("arrow-down-to-line"),na=o("arrow-down-up"),ra=o("arrow-down-wide-narrow"),ca=o("arrow-down-z-a"),sa=o("arrow-down-za"),aa=o("arrow-left"),ia=o("arrow-left-circle"),pa=o("arrow-left-from-line"),la=o("arrow-left-right"),ua=o("arrow-left-square"),da=o("arrow-left-to-line"),xa=o("arrow-right"),ha=o("arrow-right-circle"),Ia=o("arrow-right-from-line"),fa=o("arrow-right-left"),ma=o("arrow-right-square"),ga=o("arrow-right-to-line"),ba=o("arrow-up"),wa=o("arrow-up-01"),Sa=o("arrow-up-10"),ya=o("arrow-up-a-z"),Ca=o("arrow-up-az"),ka=o("arrow-up-circle"),va=o("arrow-up-down"),Aa=o("arrow-up-from-dot"),qa=o("arrow-up-from-line"),Pa=o("arrow-up-left"),Ta=o("arrow-up-left-from-circle"),La=o("arrow-up-left-from-square"),Oa=o("arrow-up-left-square"),Ra=o("arrow-up-narrow-wide"),Ba=o("arrow-up-right"),Ea=o("arrow-up-right-from-circle"),Ma=o("arrow-up-right-from-square"),Ua=o("arrow-up-right-square"),Fa=o("arrow-up-square"),Da=o("arrow-up-to-line"),Na=o("arrow-up-wide-narrow"),za=o("arrow-up-z-a"),Ha=o("arrow-up-za"),$a=o("arrows-up-from-line"),ja=o("asterisk"),Wa=o("asterisk-square"),_a=o("astroid"),Va=o("at-sign"),Ga=o("atom"),Xa=o("audio-lines"),Za=o("audio-lines-x"),Ka=o("audio-waveform"),Qa=o("award"),Ja=o("axe"),Ya=o("axis-3-d"),oi=o("axis-3d"),ti=o("baby"),ei=o("backpack"),ni=o("badge"),ri=o("badge-alert"),ci=o("badge-cent"),si=o("badge-check"),ai=o("badge-dollar-sign"),ii=o("badge-euro"),pi=o("badge-help"),li=o("badge-indian-rupee"),ui=o("badge-info"),di=o("badge-japanese-yen"),xi=o("badge-minus"),hi=o("badge-percent"),Ii=o("badge-plus"),fi=o("badge-pound-sterling"),mi=o("badge-question-mark"),gi=o("badge-russian-ruble"),bi=o("badge-swiss-franc"),wi=o("badge-turkish-lira"),Si=o("badge-x"),yi=o("baggage-claim"),Ci=o("balloon"),ki=o("ban"),vi=o("banana"),Ai=o("bandage"),qi=o("banknote"),Pi=o("banknote-arrow-down"),Ti=o("banknote-arrow-up"),Li=o("banknote-check"),Oi=o("banknote-x"),Ri=o("bar-chart"),Bi=o("bar-chart-2"),Ei=o("bar-chart-3"),Mi=o("bar-chart-4"),Ui=o("bar-chart-big"),Fi=o("bar-chart-horizontal"),Di=o("bar-chart-horizontal-big"),Ni=o("barcode"),zi=o("barrel"),Hi=o("baseline"),$i=o("bath"),ji=o("battery"),Wi=o("battery-charging"),_i=o("battery-full"),Vi=o("battery-low"),Gi=o("battery-medium"),Xi=o("battery-plus"),Zi=o("battery-warning"),Ki=o("beaker"),Qi=o("bean"),Ji=o("bean-off"),Yi=o("bed"),op=o("bed-double"),tp=o("bed-single"),ep=o("beef"),np=o("beef-off"),rp=o("beer"),cp=o("beer-off"),sp=o("bell"),ap=o("bell-check"),ip=o("bell-dot"),pp=o("bell-electric"),lp=o("bell-minus"),up=o("bell-off"),dp=o("bell-plus"),xp=o("bell-ring"),hp=o("between-horizonal-end"),Ip=o("between-horizonal-start"),fp=o("between-horizontal-end"),mp=o("between-horizontal-start"),gp=o("between-vertical-end"),bp=o("between-vertical-start"),wp=o("biceps-flexed"),Sp=o("bike"),yp=o("binary"),Cp=o("binoculars"),kp=o("biohazard"),vp=o("bird"),Ap=o("birdhouse"),qp=o("bitcoin"),Pp=o("blend"),Tp=o("blender"),Lp=o("blinds"),Op=o("blocks"),Rp=o("bluetooth"),Bp=o("bluetooth-connected"),Ep=o("bluetooth-off"),Mp=o("bluetooth-searching"),Up=o("bold"),Fp=o("bolt"),Dp=o("bomb"),Np=o("bone"),zp=o("bone-fracture"),Hp=o("book"),$p=o("book-a"),jp=o("book-alert"),Wp=o("book-audio"),_p=o("book-check"),Vp=o("book-copy"),Gp=o("book-dashed"),Xp=o("book-down"),Zp=o("book-headphones"),Kp=o("book-heart"),Qp=o("book-image"),Jp=o("book-key"),Yp=o("book-lock"),ol=o("book-marked"),tl=o("book-minus"),el=o("book-open"),nl=o("book-open-check"),rl=o("book-open-text"),cl=o("book-plus"),sl=o("book-search"),al=o("book-template"),il=o("book-text"),pl=o("book-type"),ll=o("book-up"),ul=o("book-up-2"),dl=o("book-user"),xl=o("book-x"),hl=o("bookmark"),Il=o("bookmark-check"),fl=o("bookmark-minus"),ml=o("bookmark-off"),gl=o("bookmark-plus"),bl=o("bookmark-x"),wl=o("boom-box"),Sl=o("bot"),yl=o("bot-message-square"),Cl=o("bot-off"),kl=o("bottle-wine"),vl=o("bow-arrow"),Al=o("box"),ql=o("box-select"),Pl=o("boxes"),Tl=o("braces"),Ll=o("brackets"),Ol=o("brain"),Rl=o("brain-circuit"),Bl=o("brain-cog"),El=o("brick-wall"),Ml=o("brick-wall-fire"),Ul=o("brick-wall-shield"),Fl=o("briefcase"),Dl=o("briefcase-business"),Nl=o("briefcase-conveyor-belt"),zl=o("briefcase-medical"),Hl=o("bring-to-front"),$l=o("broccoli"),jl=o("broom"),Wl=o("broom-sparkles"),_l=o("brush"),Vl=o("brush-cleaning"),Gl=o("bubbles"),Xl=o("bug"),Zl=o("bug-off"),Kl=o("bug-play"),Ql=o("building"),Jl=o("building-2"),Yl=o("bus"),ou=o("bus-front"),tu=o("cable"),eu=o("cable-car"),nu=o("cake"),ru=o("cake-slice"),cu=o("calculator"),su=o("calendar"),au=o("calendar-1"),iu=o("calendar-arrow-down"),pu=o("calendar-arrow-up"),lu=o("calendar-check"),uu=o("calendar-check-2"),du=o("calendar-clock"),xu=o("calendar-cog"),hu=o("calendar-days"),Iu=o("calendar-fold"),fu=o("calendar-heart"),mu=o("calendar-minus"),gu=o("calendar-minus-2"),bu=o("calendar-off"),wu=o("calendar-plus"),Su=o("calendar-plus-2"),yu=o("calendar-range"),Cu=o("calendar-search"),ku=o("calendar-sync"),vu=o("calendar-x"),Au=o("calendar-x-2"),qu=o("calendars"),Pu=o("camera"),Tu=o("camera-off"),Lu=o("candlestick-chart"),Ou=o("candy"),Ru=o("candy-cane"),Bu=o("candy-off"),Eu=o("cannabis"),Mu=o("cannabis-off"),Uu=o("captions"),Fu=o("captions-off"),Du=o("car"),Nu=o("car-front"),zu=o("car-taxi-front"),Hu=o("caravan"),$u=o("card-sim"),ju=o("carrot"),Wu=o("case-lower"),_u=o("case-sensitive"),Vu=o("case-upper"),Gu=o("cassette-tape"),Xu=o("cast"),Zu=o("castle"),Ku=o("cat"),Qu=o("cctv"),Ju=o("cctv-off"),Yu=o("chart-area"),od=o("chart-bar"),td=o("chart-bar-big"),ed=o("chart-bar-decreasing"),nd=o("chart-bar-increasing"),rd=o("chart-bar-stacked"),cd=o("chart-candlestick"),sd=o("chart-column"),ad=o("chart-column-big"),id=o("chart-column-decreasing"),pd=o("chart-column-increasing"),ld=o("chart-column-stacked"),ud=o("chart-gantt"),dd=o("chart-line"),xd=o("chart-network"),hd=o("chart-no-axes-column"),Id=o("chart-no-axes-column-decreasing"),fd=o("chart-no-axes-column-increasing"),md=o("chart-no-axes-combined"),gd=o("chart-no-axes-gantt"),bd=o("chart-pie"),wd=o("chart-scatter"),Sd=o("chart-spline"),yd=o("check"),Cd=o("check-check"),kd=o("check-circle"),vd=o("check-circle-2"),Ad=o("check-line"),qd=o("check-square"),Pd=o("check-square-2"),Td=o("chef-hat"),Ld=o("cherry"),Od=o("chess-bishop"),Rd=o("chess-king"),Bd=o("chess-knight"),Ed=o("chess-pawn"),Md=o("chess-queen"),Ud=o("chess-rook"),Fd=o("chevron-down"),Dd=o("chevron-down-circle"),Nd=o("chevron-down-square"),zd=o("chevron-first"),Hd=o("chevron-last"),$d=o("chevron-left"),jd=o("chevron-left-circle"),Wd=o("chevron-left-square"),_d=o("chevron-right"),Vd=o("chevron-right-circle"),Gd=o("chevron-right-square"),Xd=o("chevron-up"),Zd=o("chevron-up-circle"),Kd=o("chevron-up-square"),Qd=o("chevrons-down"),Jd=o("chevrons-down-up"),Yd=o("chevrons-left"),ox=o("chevrons-left-right"),tx=o("chevrons-left-right-ellipsis"),ex=o("chevrons-right"),nx=o("chevrons-right-left"),rx=o("chevrons-up"),cx=o("chevrons-up-down"),sx=o("church"),ax=o("cigarette"),ix=o("cigarette-off"),px=o("circle"),lx=o("circle-alert"),ux=o("circle-arrow-down"),dx=o("circle-arrow-left"),xx=o("circle-arrow-out-down-left"),hx=o("circle-arrow-out-down-right"),Ix=o("circle-arrow-out-up-left"),fx=o("circle-arrow-out-up-right"),mx=o("circle-arrow-right"),gx=o("circle-arrow-up"),bx=o("circle-check"),wx=o("circle-check-big"),Sx=o("circle-chevron-down"),yx=o("circle-chevron-left"),Cx=o("circle-chevron-right"),kx=o("circle-chevron-up"),vx=o("circle-dashed"),Ax=o("circle-divide"),qx=o("circle-dollar-sign"),Px=o("circle-dot"),Tx=o("circle-dot-dashed"),Lx=o("circle-ellipsis"),Ox=o("circle-equal"),Rx=o("circle-euro"),Bx=o("circle-fading-arrow-up"),Ex=o("circle-fading-plus"),Mx=o("circle-gauge"),Ux=o("circle-help"),Fx=o("circle-minus"),Dx=o("circle-off"),Nx=o("circle-parking"),zx=o("circle-parking-off"),Hx=o("circle-pause"),$x=o("circle-percent"),jx=o("circle-pile"),Wx=o("circle-play"),_x=o("circle-plus"),Vx=o("circle-pound-sterling"),Gx=o("circle-power"),Ut=o("circle-question-mark"),Xx=o("circle-slash"),Zx=o("circle-slash-2"),Kx=o("circle-slashed"),Qx=o("circle-small"),Jx=o("circle-star"),Yx=o("circle-stop"),oh=o("circle-user"),th=o("circle-user-round"),eh=o("circle-x"),nh=o("circuit-board"),rh=o("citrus"),ch=o("clapperboard"),sh=o("clipboard"),ah=o("clipboard-check"),ih=o("clipboard-clock"),ph=o("clipboard-copy"),lh=o("clipboard-edit"),uh=o("clipboard-list"),dh=o("clipboard-minus"),xh=o("clipboard-paste"),hh=o("clipboard-pen"),Ih=o("clipboard-pen-line"),fh=o("clipboard-plus"),mh=o("clipboard-signature"),gh=o("clipboard-type"),bh=o("clipboard-x"),wh=o("clock"),Sh=o("clock-1"),yh=o("clock-10"),Ch=o("clock-11"),kh=o("clock-12"),vh=o("clock-2"),Ah=o("clock-3"),qh=o("clock-4"),Ph=o("clock-5"),Th=o("clock-6"),Lh=o("clock-7"),Oh=o("clock-8"),Rh=o("clock-9"),Bh=o("clock-alert"),Eh=o("clock-arrow-down"),Mh=o("clock-arrow-left"),Uh=o("clock-arrow-right"),Fh=o("clock-arrow-up"),Dh=o("clock-check"),Nh=o("clock-fading"),zh=o("clock-plus"),Hh=o("closed-caption"),$h=o("cloud"),jh=o("cloud-alert"),Wh=o("cloud-backup"),_h=o("cloud-check"),Vh=o("cloud-cog"),Gh=o("cloud-download"),Xh=o("cloud-drizzle"),Zh=o("cloud-fog"),Kh=o("cloud-hail"),Qh=o("cloud-lightning"),Jh=o("cloud-moon"),Yh=o("cloud-moon-rain"),oI=o("cloud-off"),tI=o("cloud-rain"),eI=o("cloud-rain-wind"),nI=o("cloud-snow"),rI=o("cloud-sun"),cI=o("cloud-sun-rain"),sI=o("cloud-sync"),aI=o("cloud-upload"),iI=o("cloudy"),pI=o("clover"),lI=o("club"),uI=o("code"),dI=o("code-2"),xI=o("code-square"),hI=o("code-xml"),II=o("coffee"),fI=o("cog"),mI=o("coins"),gI=o("columns"),bI=o("columns-2"),wI=o("columns-3"),SI=o("columns-3-cog"),yI=o("columns-4"),CI=o("columns-settings"),kI=o("combine"),vI=o("command"),AI=o("compass"),qI=o("component"),PI=o("computer"),TI=o("concierge-bell"),LI=o("cone"),OI=o("construction"),RI=o("contact"),BI=o("contact-2"),EI=o("contact-round"),MI=o("container"),UI=o("contrast"),FI=o("cookie"),DI=o("cooking-pot"),NI=o("copy"),zI=o("copy-check"),HI=o("copy-minus"),$I=o("copy-plus"),jI=o("copy-slash"),WI=o("copy-x"),_I=o("copyleft"),VI=o("copyright"),GI=o("corner-down-left"),XI=o("corner-down-right"),ZI=o("corner-left-down"),KI=o("corner-left-up"),QI=o("corner-right-down"),JI=o("corner-right-up"),YI=o("corner-up-left"),of=o("corner-up-right"),tf=o("cpu"),ef=o("creative-commons"),nf=o("credit-card"),rf=o("croissant"),cf=o("crop"),sf=o("cross"),af=o("crosshair"),pf=o("crown"),lf=o("cuboid"),uf=o("cup-soda"),df=o("curly-braces"),xf=o("currency"),hf=o("cylinder"),If=o("dam"),ff=o("database"),mf=o("database-arrow-down"),gf=o("database-arrow-up"),bf=o("database-backup"),wf=o("database-check"),Sf=o("database-minus"),yf=o("database-plus"),Cf=o("database-search"),kf=o("database-x"),vf=o("database-zap"),Af=o("decimals-arrow-left"),qf=o("decimals-arrow-right"),Pf=o("delete"),Tf=o("dessert"),Lf=o("diameter"),Of=o("diamond"),Rf=o("diamond-minus"),Bf=o("diamond-percent"),Ef=o("diamond-plus"),Mf=o("dice-1"),Uf=o("dice-2"),Ff=o("dice-3"),Df=o("dice-4"),Nf=o("dice-5"),zf=o("dice-6"),Hf=o("dices"),$f=o("diff"),jf=o("disc"),Wf=o("disc-2"),_f=o("disc-3"),Vf=o("disc-album"),Gf=o("divide"),Xf=o("divide-circle"),Zf=o("divide-square"),Kf=o("dna"),Qf=o("dna-off"),Jf=o("dock"),Yf=o("dog"),om=o("dollar-sign"),tm=o("donut"),em=o("door-closed"),nm=o("door-closed-locked"),rm=o("door-open"),cm=o("dot"),sm=o("dot-square"),am=o("download"),im=o("download-cloud"),pm=o("drafting-compass"),lm=o("drama"),um=o("drill"),dm=o("drone"),xm=o("droplet"),hm=o("droplet-off"),Im=o("droplets"),fm=o("drum"),mm=o("drumstick"),gm=o("dumbbell"),bm=o("ear"),wm=o("ear-off"),Sm=o("earth"),ym=o("earth-lock"),Cm=o("eclipse"),km=o("edit"),vm=o("edit-2"),Am=o("edit-3"),qm=o("egg"),Pm=o("egg-fried"),Tm=o("egg-off"),Lm=o("eject"),Om=o("ellipse"),Rm=o("ellipsis"),Bm=o("ellipsis-vertical"),Em=o("equal"),Mm=o("equal-approximately"),Um=o("equal-not"),Fm=o("equal-square"),Dm=o("eraser"),Nm=o("ethernet-port"),zm=o("euro"),Hm=o("ev-charger"),$m=o("expand"),jm=o("external-link"),Wm=o("eye"),_m=o("eye-closed"),Vm=o("eye-dashed"),Gm=o("eye-off"),Xm=o("face-angry"),Zm=o("face-expressionless"),Km=o("face-grinning"),Qm=o("face-neutral"),Jm=o("face-slightly-frowning"),Ym=o("face-slightly-smiling"),og=o("face-slightly-smiling-plus"),tg=o("factory"),eg=o("fan"),ng=o("fast-forward"),rg=o("feather"),cg=o("fence"),sg=o("ferris-wheel"),ag=o("file"),ig=o("file-archive"),pg=o("file-audio"),lg=o("file-audio-2"),ug=o("file-axis-3-d"),dg=o("file-axis-3d"),xg=o("file-badge"),hg=o("file-badge-2"),Ig=o("file-bar-chart"),fg=o("file-bar-chart-2"),mg=o("file-box"),gg=o("file-braces"),bg=o("file-braces-corner"),wg=o("file-chart-column"),Sg=o("file-chart-column-increasing"),yg=o("file-chart-line"),Cg=o("file-chart-pie"),kg=o("file-check"),vg=o("file-check-2"),Ag=o("file-check-corner"),qg=o("file-clock"),Pg=o("file-code"),Tg=o("file-code-2"),Lg=o("file-code-corner"),Og=o("file-cog"),Rg=o("file-cog-2"),Bg=o("file-diff"),Eg=o("file-digit"),Mg=o("file-down"),Ug=o("file-edit"),Fg=o("file-exclamation-point"),Dg=o("file-headphone"),Ng=o("file-heart"),zg=o("file-image"),Hg=o("file-input"),$g=o("file-json"),jg=o("file-json-2"),Wg=o("file-key"),_g=o("file-key-2"),Vg=o("file-line-chart"),Gg=o("file-lock"),Xg=o("file-lock-2"),Zg=o("file-minus"),Kg=o("file-minus-2"),Qg=o("file-minus-corner"),Jg=o("file-music"),Yg=o("file-output"),ob=o("file-pen"),tb=o("file-pen-line"),eb=o("file-pie-chart"),nb=o("file-play"),rb=o("file-plus"),cb=o("file-plus-2"),sb=o("file-plus-corner"),ab=o("file-question"),ib=o("file-question-mark"),pb=o("file-scan"),lb=o("file-search"),ub=o("file-search-2"),db=o("file-search-corner"),xb=o("file-signal"),hb=o("file-signature"),Ib=o("file-sliders"),fb=o("file-spreadsheet"),mb=o("file-stack"),gb=o("file-symlink"),bb=o("file-terminal"),wb=o("file-text"),Sb=o("file-type"),yb=o("file-type-2"),Cb=o("file-type-corner"),kb=o("file-up"),vb=o("file-user"),Ab=o("file-video"),qb=o("file-video-2"),Pb=o("file-video-camera"),Tb=o("file-volume"),Lb=o("file-volume-2"),Ob=o("file-warning"),Rb=o("file-x"),Bb=o("file-x-2"),Eb=o("file-x-corner"),Mb=o("files"),Ub=o("film"),Fb=o("filter"),Db=o("filter-x"),Nb=o("fingerprint"),zb=o("fingerprint-pattern"),Hb=o("fire-extinguisher"),$b=o("fish"),jb=o("fish-off"),Wb=o("fish-symbol"),_b=o("fishing-hook"),Vb=o("fishing-rod"),Gb=o("flag"),Xb=o("flag-off"),Zb=o("flag-triangle-left"),Kb=o("flag-triangle-right"),Qb=o("flame"),Jb=o("flame-kindling"),Yb=o("flashlight"),ow=o("flashlight-off"),tw=o("flask-conical"),ew=o("flask-conical-off"),nw=o("flask-round"),rw=o("flip-horizontal"),cw=o("flip-horizontal-2"),sw=o("flip-vertical"),aw=o("flip-vertical-2"),iw=o("flower"),pw=o("flower-2"),lw=o("focus"),uw=o("fold-horizontal"),dw=o("fold-vertical"),xw=o("folder"),hw=o("folder-archive"),Iw=o("folder-bookmark"),fw=o("folder-check"),mw=o("folder-clock"),gw=o("folder-closed"),bw=o("folder-code"),ww=o("folder-cog"),Sw=o("folder-cog-2"),yw=o("folder-dot"),Cw=o("folder-down"),kw=o("folder-edit"),vw=o("folder-git"),Aw=o("folder-git-2"),qw=o("folder-heart"),Pw=o("folder-input"),Tw=o("folder-kanban"),Lw=o("folder-key"),Ow=o("folder-lock"),Rw=o("folder-minus"),Bw=o("folder-open"),Ew=o("folder-open-dot"),Mw=o("folder-output"),Uw=o("folder-pen"),Fw=o("folder-plus"),Dw=o("folder-root"),Nw=o("folder-search"),zw=o("folder-search-2"),Hw=o("folder-symlink"),$w=o("folder-sync"),jw=o("folder-tree"),Ww=o("folder-up"),_w=o("folder-x"),Vw=o("folders"),Gw=o("footprints"),Xw=o("fork-knife"),Zw=o("fork-knife-crossed"),Kw=o("forklift"),Qw=o("form"),Jw=o("form-input"),Yw=o("forward"),oS=o("frame"),tS=o("frown"),eS=o("fuel"),nS=o("fullscreen"),rS=o("function-square"),cS=o("funnel"),sS=o("funnel-plus"),aS=o("funnel-x"),iS=o("gallery-horizontal"),pS=o("gallery-horizontal-end"),lS=o("gallery-thumbnails"),uS=o("gallery-vertical"),dS=o("gallery-vertical-end"),xS=o("gamepad"),hS=o("gamepad-2"),IS=o("gamepad-directional"),fS=o("gantt-chart"),mS=o("gantt-chart-square"),gS=o("gauge"),bS=o("gauge-circle"),wS=o("gavel"),SS=o("gem"),yS=o("georgian-lari"),CS=o("ghost"),kS=o("gift"),vS=o("git-branch"),AS=o("git-branch-minus"),qS=o("git-branch-plus"),PS=o("git-commit"),TS=o("git-commit-horizontal"),LS=o("git-commit-vertical"),OS=o("git-compare"),RS=o("git-compare-arrows"),BS=o("git-fork"),ES=o("git-graph"),MS=o("git-merge"),US=o("git-merge-conflict"),FS=o("git-pull-request"),DS=o("git-pull-request-arrow"),NS=o("git-pull-request-closed"),zS=o("git-pull-request-create"),HS=o("git-pull-request-create-arrow"),$S=o("git-pull-request-draft"),jS=o("glass-water"),WS=o("glasses"),_S=o("globe"),VS=o("globe-2"),GS=o("globe-check"),XS=o("globe-lock"),ZS=o("globe-off"),KS=o("globe-x"),QS=o("goal"),JS=o("gpu"),YS=o("grab"),oy=o("graduation-cap"),ty=o("grape"),ey=o("grid"),ny=o("grid-2-x-2"),ry=o("grid-2-x-2-check"),cy=o("grid-2-x-2-plus"),sy=o("grid-2-x-2-x"),ay=o("grid-2x2"),iy=o("grid-2x2-check"),py=o("grid-2x2-plus"),ly=o("grid-2x2-x"),uy=o("grid-3-x-3"),dy=o("grid-3x2"),xy=o("grid-3x3"),hy=o("grip"),Iy=o("grip-horizontal"),fy=o("grip-vertical"),my=o("group"),gy=o("guitar"),by=o("ham"),wy=o("hamburger"),Sy=o("hammer"),yy=o("hand"),Cy=o("hand-coins"),ky=o("hand-fist"),vy=o("hand-grab"),Ay=o("hand-heart"),qy=o("hand-helping"),Py=o("hand-metal"),Ty=o("hand-platter"),Ly=o("handbag"),Oy=o("handshake"),Ry=o("hard-drive"),By=o("hard-drive-download"),Ey=o("hard-drive-upload"),My=o("hard-hat"),Uy=o("hash"),Fy=o("hat-glasses"),Dy=o("haze"),Ny=o("hd"),zy=o("hdmi-port"),Hy=o("heading"),$y=o("heading-1"),jy=o("heading-2"),Wy=o("heading-3"),_y=o("heading-4"),Vy=o("heading-5"),Gy=o("heading-6"),Xy=o("headphone-off"),Zy=o("headphones"),Ky=o("headset"),Qy=o("heart"),Jy=o("heart-crack"),Yy=o("heart-handshake"),oC=o("heart-minus"),tC=o("heart-off"),eC=o("heart-plus"),nC=o("heart-pulse"),rC=o("heart-x"),cC=o("heater"),sC=o("helicopter"),aC=o("help-circle"),iC=o("helping-hand"),pC=o("hexagon"),lC=o("highlighter"),uC=o("history"),dC=o("home"),xC=o("hop"),hC=o("hop-off"),IC=o("hospital"),fC=o("hotel"),mC=o("hourglass"),gC=o("house"),bC=o("house-heart"),wC=o("house-plug"),SC=o("house-plus"),yC=o("house-wifi"),CC=o("ice-cream"),kC=o("ice-cream-2"),vC=o("ice-cream-bowl"),AC=o("ice-cream-cone"),qC=o("id-card"),PC=o("id-card-lanyard"),TC=o("image"),LC=o("image-down"),OC=o("image-minus"),RC=o("image-off"),BC=o("image-play"),EC=o("image-plus"),MC=o("image-up"),UC=o("image-upscale"),FC=o("images"),DC=o("import"),NC=o("inbox"),zC=o("indent"),HC=o("indent-decrease"),$C=o("indent-increase"),jC=o("indian-rupee"),WC=o("infinity"),_C=o("info"),VC=o("inspect"),GC=o("inspection-panel"),XC=o("italic"),ZC=o("iteration-ccw"),KC=o("iteration-cw"),QC=o("japanese-yen"),JC=o("joystick"),YC=o("kanban"),ok=o("kanban-square"),tk=o("kanban-square-dashed"),ek=o("kayak"),nk=o("key"),rk=o("key-round"),ck=o("key-square"),sk=o("keyboard"),ak=o("keyboard-music"),ik=o("keyboard-off"),pk=o("lamp"),lk=o("lamp-ceiling"),uk=o("lamp-desk"),dk=o("lamp-floor"),xk=o("lamp-wall-down"),hk=o("lamp-wall-up"),Ik=o("land-plot"),fk=o("landmark"),mk=o("languages"),gk=o("laptop"),bk=o("laptop-2"),wk=o("laptop-minimal"),Sk=o("laptop-minimal-check"),yk=o("lasso"),Ck=o("lasso-select"),kk=o("laugh"),vk=o("layer-arrow-down"),Ak=o("layer-arrow-up"),qk=o("layers"),Pk=o("layers-2"),Tk=o("layers-3"),Lk=o("layers-arrow-down"),Ok=o("layers-arrow-up"),Rk=o("layers-minus"),Bk=o("layers-plus"),Ek=o("layout"),Mk=o("layout-dashboard"),Uk=o("layout-freeform"),Fk=o("layout-grid"),Dk=o("layout-list"),Nk=o("layout-panel-left"),zk=o("layout-panel-top"),Hk=o("layout-template"),$k=o("leaf"),jk=o("leafy-green"),Wk=o("lectern"),_k=o("lens-concave"),Vk=o("lens-convex"),Gk=o("letter-text"),Xk=o("library"),Zk=o("library-big"),Kk=o("library-square"),Qk=o("life-buoy"),Jk=o("ligature"),Yk=o("lightbulb"),ov=o("lightbulb-off"),tv=o("line-chart"),ev=o("line-dot-right-horizontal"),nv=o("line-squiggle"),rv=o("line-style"),cv=o("link"),sv=o("link-2"),av=o("link-2-off"),iv=o("list"),pv=o("list-check"),lv=o("list-checks"),uv=o("list-chevrons-down-up"),dv=o("list-chevrons-up-down"),xv=o("list-collapse"),hv=o("list-end"),Iv=o("list-filter"),fv=o("list-filter-plus"),mv=o("list-indent-decrease"),gv=o("list-indent-increase"),bv=o("list-minus"),wv=o("list-music"),Sv=o("list-ordered"),yv=o("list-plus"),Cv=o("list-restart"),kv=o("list-sort-ascending"),vv=o("list-sort-descending"),Av=o("list-start"),qv=o("list-todo"),Pv=o("list-tree"),Tv=o("list-video"),Lv=o("list-x"),Ov=o("loader"),Rv=o("loader-2"),Bv=o("loader-circle"),Ev=o("loader-pinwheel"),Mv=o("locate"),Uv=o("locate-fixed"),Fv=o("locate-off"),Dv=o("location-edit"),Nv=o("lock"),zv=o("lock-keyhole"),Hv=o("lock-keyhole-open"),$v=o("lock-open"),jv=o("log-in"),Wv=o("log-out"),_v=o("logs"),Vv=o("lollipop"),Gv=o("luggage"),Xv=o("m-square"),Zv=o("magnet"),Kv=o("mail"),Qv=o("mail-badge"),Jv=o("mail-check"),Yv=o("mail-minus"),oA=o("mail-open"),tA=o("mail-plus"),eA=o("mail-question"),nA=o("mail-question-mark"),rA=o("mail-search"),cA=o("mail-warning"),sA=o("mail-x"),aA=o("mailbox"),iA=o("mails"),pA=o("map"),lA=o("map-minus"),uA=o("map-pin"),dA=o("map-pin-check"),xA=o("map-pin-check-inside"),hA=o("map-pin-house"),IA=o("map-pin-minus"),fA=o("map-pin-minus-inside"),mA=o("map-pin-off"),gA=o("map-pin-pen"),bA=o("map-pin-plus"),wA=o("map-pin-plus-inside"),SA=o("map-pin-search"),yA=o("map-pin-x"),CA=o("map-pin-x-inside"),kA=o("map-pinned"),vA=o("map-plus"),AA=o("mars"),qA=o("mars-stroke"),PA=o("martini"),TA=o("maximize"),LA=o("maximize-2"),OA=o("medal"),RA=o("megaphone"),BA=o("megaphone-off"),EA=o("meh"),MA=o("memory-stick"),UA=o("menu"),FA=o("menu-square"),DA=o("merge"),NA=o("message-circle"),zA=o("message-circle-check"),HA=o("message-circle-code"),$A=o("message-circle-dashed"),jA=o("message-circle-heart"),WA=o("message-circle-more"),_A=o("message-circle-off"),VA=o("message-circle-plus"),GA=o("message-circle-question"),XA=o("message-circle-question-mark"),ZA=o("message-circle-reply"),KA=o("message-circle-warning"),QA=o("message-circle-x"),JA=o("message-square"),YA=o("message-square-check"),oq=o("message-square-code"),tq=o("message-square-dashed"),eq=o("message-square-diff"),nq=o("message-square-dot"),rq=o("message-square-heart"),cq=o("message-square-lock"),sq=o("message-square-more"),aq=o("message-square-off"),iq=o("message-square-plus"),pq=o("message-square-quote"),lq=o("message-square-reply"),uq=o("message-square-share"),dq=o("message-square-text"),xq=o("message-square-warning"),hq=o("message-square-x"),Iq=o("messages-square"),fq=o("metronome"),mq=o("mic"),gq=o("mic-2"),bq=o("mic-audio-lines"),wq=o("mic-off"),Sq=o("mic-signal"),yq=o("mic-vocal"),Cq=o("microchip"),kq=o("microscope"),vq=o("microwave"),Aq=o("milestone"),qq=o("milk"),Pq=o("milk-off"),Tq=o("minimize"),Lq=o("minimize-2"),Oq=o("minus"),Rq=o("minus-circle"),Bq=o("minus-square"),Eq=o("mirror-rectangular"),Mq=o("mirror-round"),Uq=o("monitor"),Fq=o("monitor-check"),Dq=o("monitor-cloud"),Nq=o("monitor-cog"),zq=o("monitor-dot"),Hq=o("monitor-down"),$q=o("monitor-off"),jq=o("monitor-pause"),Wq=o("monitor-play"),_q=o("monitor-smartphone"),Vq=o("monitor-speaker"),Gq=o("monitor-stop"),Xq=o("monitor-up"),Zq=o("monitor-x"),Kq=o("moon"),Qq=o("moon-star"),Jq=o("more-horizontal"),Yq=o("more-vertical"),oP=o("mosque"),tP=o("motorbike"),eP=o("mountain"),nP=o("mountain-snow"),rP=o("mouse"),cP=o("mouse-left"),sP=o("mouse-off"),aP=o("mouse-pointer"),iP=o("mouse-pointer-2"),pP=o("mouse-pointer-2-off"),lP=o("mouse-pointer-ban"),uP=o("mouse-pointer-click"),dP=o("mouse-pointer-square-dashed"),xP=o("mouse-right"),hP=o("move"),IP=o("move-3-d"),fP=o("move-3d"),mP=o("move-diagonal"),gP=o("move-diagonal-2"),bP=o("move-down"),wP=o("move-down-left"),SP=o("move-down-right"),yP=o("move-horizontal"),CP=o("move-left"),kP=o("move-right"),vP=o("move-up"),AP=o("move-up-left"),qP=o("move-up-right"),PP=o("move-vertical"),TP=o("music"),LP=o("music-2"),OP=o("music-3"),RP=o("music-4"),BP=o("navigation"),EP=o("navigation-2"),MP=o("navigation-2-off"),UP=o("navigation-off"),FP=o("network"),DP=o("newspaper"),NP=o("nfc"),zP=o("non-binary"),HP=o("notebook"),$P=o("notebook-pen"),jP=o("notebook-tabs"),WP=o("notebook-text"),_P=o("notepad-text"),VP=o("notepad-text-dashed"),GP=o("nut"),XP=o("nut-off"),ZP=o("octagon"),KP=o("octagon-alert"),QP=o("octagon-minus"),JP=o("octagon-pause"),YP=o("octagon-x"),oT=o("omega"),tT=o("option"),eT=o("orbit"),nT=o("origami"),rT=o("outdent"),cT=o("package"),sT=o("package-2"),aT=o("package-check"),iT=o("package-minus"),pT=o("package-open"),lT=o("package-plus"),uT=o("package-search"),dT=o("package-x"),xT=o("paint-bucket"),hT=o("paint-roller"),IT=o("paintbrush"),fT=o("paintbrush-2"),mT=o("paintbrush-vertical"),gT=o("palette"),bT=o("palmtree"),wT=o("panda"),ST=o("panel-bottom"),yT=o("panel-bottom-close"),CT=o("panel-bottom-dashed"),kT=o("panel-bottom-inactive"),vT=o("panel-bottom-open"),AT=o("panel-left"),qT=o("panel-left-close"),PT=o("panel-left-dashed"),TT=o("panel-left-inactive"),LT=o("panel-left-open"),OT=o("panel-left-right-dashed"),RT=o("panel-right"),BT=o("panel-right-close"),ET=o("panel-right-dashed"),MT=o("panel-right-inactive"),UT=o("panel-right-open"),FT=o("panel-top"),DT=o("panel-top-bottom-dashed"),NT=o("panel-top-close"),zT=o("panel-top-dashed"),HT=o("panel-top-inactive"),$T=o("panel-top-open"),jT=o("panels-left-bottom"),WT=o("panels-left-right"),_T=o("panels-right-bottom"),VT=o("panels-top-bottom"),GT=o("panels-top-left"),XT=o("paper-bag"),ZT=o("paperclip"),KT=o("parasol"),QT=o("parentheses"),JT=o("parking-circle"),YT=o("parking-circle-off"),oL=o("parking-meter"),tL=o("parking-square"),eL=o("parking-square-off"),nL=o("party-popper"),rL=o("pause"),cL=o("pause-circle"),sL=o("pause-octagon"),aL=o("paw-print"),iL=o("pc-case"),pL=o("pen"),lL=o("pen-box"),uL=o("pen-line"),dL=o("pen-off"),xL=o("pen-square"),hL=o("pen-tool"),IL=o("pencil"),fL=o("pencil-line"),mL=o("pencil-off"),gL=o("pencil-ruler"),bL=o("pencil-sparkles"),wL=o("pentagon"),SL=o("percent"),yL=o("percent-circle"),CL=o("percent-diamond"),kL=o("percent-square"),vL=o("person-standing"),AL=o("phi"),qL=o("philippine-peso"),PL=o("phone"),TL=o("phone-call"),LL=o("phone-forwarded"),OL=o("phone-incoming"),RL=o("phone-missed"),BL=o("phone-off"),EL=o("phone-outgoing"),ML=o("pi"),UL=o("pi-square"),FL=o("piano"),DL=o("pickaxe"),NL=o("picture-in-picture"),zL=o("picture-in-picture-2"),HL=o("pie-chart"),$L=o("piggy-bank"),jL=o("pilcrow"),WL=o("pilcrow-left"),_L=o("pilcrow-right"),VL=o("pilcrow-square"),GL=o("pill"),XL=o("pill-bottle"),ZL=o("pin"),KL=o("pin-off"),QL=o("pipette"),JL=o("pizza"),YL=o("plane"),oO=o("plane-landing"),tO=o("plane-takeoff"),eO=o("play"),nO=o("play-circle"),rO=o("play-off"),cO=o("play-square"),sO=o("plug"),aO=o("plug-2"),iO=o("plug-zap"),pO=o("plug-zap-2"),lO=o("plus"),uO=o("plus-circle"),dO=o("plus-square"),xO=o("pocket-knife"),hO=o("podcast"),IO=o("podium"),fO=o("pointer"),mO=o("pointer-off"),gO=o("popcorn"),bO=o("popsicle"),wO=o("pound-sterling"),SO=o("power"),yO=o("power-circle"),CO=o("power-off"),kO=o("power-square"),vO=o("presentation"),AO=o("printer"),qO=o("printer-check"),PO=o("printer-x"),TO=o("projector"),LO=o("proportions"),OO=o("puzzle"),RO=o("pyramid"),BO=o("qr-code"),EO=o("quote"),MO=o("rabbit"),UO=o("radar"),FO=o("radiation"),DO=o("radical"),NO=o("radio"),zO=o("radio-off"),HO=o("radio-receiver"),$O=o("radio-tower"),jO=o("radius"),WO=o("rainbow"),_O=o("rat"),VO=o("ratio"),GO=o("receipt"),XO=o("receipt-cent"),ZO=o("receipt-euro"),KO=o("receipt-indian-rupee"),QO=o("receipt-japanese-yen"),JO=o("receipt-pound-sterling"),YO=o("receipt-russian-ruble"),oR=o("receipt-swiss-franc"),tR=o("receipt-text"),eR=o("receipt-turkish-lira"),nR=o("rectangle-circle"),rR=o("rectangle-ellipsis"),cR=o("rectangle-goggles"),sR=o("rectangle-horizontal"),aR=o("rectangle-vertical"),iR=o("recycle"),pR=o("redo"),lR=o("redo-2"),uR=o("redo-dot"),dR=o("refresh-ccw"),xR=o("refresh-ccw-dot"),hR=o("refresh-cw"),IR=o("refresh-cw-off"),fR=o("refrigerator"),mR=o("regex"),gR=o("remove-formatting"),bR=o("repeat"),wR=o("repeat-1"),SR=o("repeat-2"),yR=o("repeat-off"),CR=o("replace"),kR=o("replace-all"),vR=o("reply"),AR=o("reply-all"),qR=o("rewind"),PR=o("ribbon"),TR=o("road"),LR=o("rocket"),OR=o("rocking-chair"),RR=o("roller-coaster"),BR=o("rose"),ER=o("rotate-3-d"),MR=o("rotate-3d"),UR=o("rotate-ccw"),FR=o("rotate-ccw-clock"),DR=o("rotate-ccw-key"),NR=o("rotate-ccw-square"),zR=o("rotate-cw"),HR=o("rotate-cw-fading-clock"),$R=o("rotate-cw-square"),jR=o("route"),WR=o("route-off"),_R=o("router"),VR=o("rows"),GR=o("rows-2"),XR=o("rows-3"),ZR=o("rows-4"),KR=o("rss"),QR=o("ruler"),JR=o("ruler-dimension-line"),YR=o("russian-ruble"),oB=o("sailboat"),tB=o("salad"),eB=o("sandwich"),nB=o("satellite"),rB=o("satellite-dish"),cB=o("saudi-riyal"),sB=o("save"),aB=o("save-all"),iB=o("save-check"),pB=o("save-off"),lB=o("save-pen"),uB=o("save-plus"),dB=o("scale"),xB=o("scale-3-d"),hB=o("scale-3d"),IB=o("scaling"),fB=o("scan"),mB=o("scan-barcode"),gB=o("scan-box"),bB=o("scan-eye"),wB=o("scan-face"),SB=o("scan-heart"),yB=o("scan-line"),CB=o("scan-qr-code"),kB=o("scan-search"),vB=o("scan-square"),AB=o("scan-text"),qB=o("scatter-chart"),PB=o("school"),TB=o("school-2"),LB=o("scissors"),OB=o("scissors-line-dashed"),RB=o("scissors-square"),BB=o("scissors-square-dashed-bottom"),EB=o("scooter"),MB=o("screen-share"),UB=o("screen-share-off"),FB=o("scroll"),DB=o("scroll-text"),NB=o("search"),zB=o("search-alert"),HB=o("search-check"),$B=o("search-code"),jB=o("search-slash"),WB=o("search-x"),_B=o("section"),VB=o("send"),GB=o("send-horizonal"),XB=o("send-horizontal"),ZB=o("send-to-back"),KB=o("separator-horizontal"),QB=o("separator-vertical"),JB=o("server"),YB=o("server-cog"),oE=o("server-crash"),tE=o("server-off"),eE=o("server-plus"),nE=o("settings"),rE=o("settings-2"),cE=o("shapes"),sE=o("share"),aE=o("share-2"),iE=o("sheet"),pE=o("shell"),lE=o("shelving-unit"),uE=o("shield"),dE=o("shield-alert"),xE=o("shield-ban"),hE=o("shield-check"),IE=o("shield-close"),fE=o("shield-cog"),mE=o("shield-cog-corner"),gE=o("shield-ellipsis"),bE=o("shield-half"),wE=o("shield-keyhole"),SE=o("shield-lock"),yE=o("shield-minus"),CE=o("shield-off"),kE=o("shield-plus"),vE=o("shield-question"),AE=o("shield-question-mark"),qE=o("shield-user"),PE=o("shield-x"),TE=o("ship"),LE=o("ship-wheel"),OE=o("shirt"),RE=o("shopping-bag"),BE=o("shopping-basket"),EE=o("shopping-cart"),ME=o("shovel"),UE=o("shower-head"),FE=o("shredder"),DE=o("shrimp"),NE=o("shrink"),zE=o("shrub"),HE=o("shuffle"),$E=o("sidebar"),jE=o("sidebar-close"),WE=o("sidebar-open"),_E=o("sigma"),VE=o("sigma-square"),GE=o("signal"),XE=o("signal-high"),ZE=o("signal-low"),KE=o("signal-medium"),QE=o("signal-zero"),JE=o("signature"),YE=o("signpost"),oM=o("signpost-big"),tM=o("siren"),eM=o("skip-back"),nM=o("skip-forward"),rM=o("skull"),cM=o("slash"),sM=o("slash-square"),aM=o("slice"),iM=o("sliders"),pM=o("sliders-horizontal"),lM=o("sliders-vertical"),uM=o("smartphone"),dM=o("smartphone-charging"),xM=o("smartphone-nfc"),hM=o("smile"),IM=o("smile-plus"),fM=o("snail"),mM=o("snowflake"),gM=o("soap-dispenser-droplet"),bM=o("sofa"),wM=o("solar-panel"),SM=o("sort-asc"),yM=o("sort-desc"),CM=o("soup"),kM=o("space"),vM=o("spade"),AM=o("sparkle"),qM=o("sparkles"),PM=o("speaker"),TM=o("speech"),LM=o("spell-check"),OM=o("spell-check-2"),RM=o("spline"),BM=o("spline-pointer"),EM=o("split"),MM=o("split-square-horizontal"),UM=o("split-square-vertical"),FM=o("spool"),DM=o("sport-shoe"),NM=o("spotlight"),zM=o("spray-can"),HM=o("sprout"),$M=o("square"),jM=o("square-activity"),WM=o("square-arrow-down"),_M=o("square-arrow-down-left"),VM=o("square-arrow-down-right"),GM=o("square-arrow-left"),XM=o("square-arrow-out-down-left"),ZM=o("square-arrow-out-down-right"),KM=o("square-arrow-out-up-left"),QM=o("square-arrow-out-up-right"),JM=o("square-arrow-right"),YM=o("square-arrow-right-enter"),oU=o("square-arrow-right-exit"),tU=o("square-arrow-up"),eU=o("square-arrow-up-left"),nU=o("square-arrow-up-right"),rU=o("square-asterisk"),cU=o("square-bottom-dashed-scissors"),sU=o("square-centerline-dashed-horizontal"),aU=o("square-centerline-dashed-vertical"),iU=o("square-chart-gantt"),pU=o("square-check"),lU=o("square-check-big"),uU=o("square-chevron-down"),dU=o("square-chevron-left"),xU=o("square-chevron-right"),hU=o("square-chevron-up"),IU=o("square-code"),fU=o("square-dashed"),mU=o("square-dashed-bottom"),gU=o("square-dashed-bottom-code"),bU=o("square-dashed-kanban"),wU=o("square-dashed-mouse-pointer"),SU=o("square-dashed-text"),yU=o("square-dashed-top-solid"),CU=o("square-divide"),kU=o("square-dot"),vU=o("square-equal"),AU=o("square-function"),qU=o("square-gantt-chart"),PU=o("square-kanban"),TU=o("square-library"),LU=o("square-m"),OU=o("square-menu"),RU=o("square-minus"),BU=o("square-mouse-pointer"),EU=o("square-off"),MU=o("square-parking"),UU=o("square-parking-off"),FU=o("square-pause"),DU=o("square-pen"),NU=o("square-percent"),zU=o("square-pi"),HU=o("square-pilcrow"),$U=o("square-play"),jU=o("square-plus"),WU=o("square-power"),_U=o("square-radical"),VU=o("square-round-corner"),GU=o("square-scissors"),XU=o("square-sigma"),ZU=o("square-slash"),KU=o("square-split-horizontal"),QU=o("square-split-vertical"),JU=o("square-square"),YU=o("square-stack"),oF=o("square-star"),tF=o("square-stop"),eF=o("square-terminal"),nF=o("square-user"),rF=o("square-user-round"),cF=o("square-x"),sF=o("squares-exclude"),aF=o("squares-intersect"),iF=o("squares-subtract"),pF=o("squares-unite"),lF=o("squircle"),uF=o("squircle-dashed"),dF=o("squirrel"),xF=o("stamp"),hF=o("star"),IF=o("star-check"),fF=o("star-half"),mF=o("star-minus"),gF=o("star-off"),bF=o("star-plus"),wF=o("star-x"),SF=o("stars"),yF=o("step-back"),CF=o("step-forward"),kF=o("stethoscope"),vF=o("sticker"),AF=o("sticky-note"),qF=o("sticky-note-check"),PF=o("sticky-note-minus"),TF=o("sticky-note-off"),LF=o("sticky-note-plus"),OF=o("sticky-note-x"),RF=o("sticky-notes"),BF=o("stone"),EF=o("stop-circle"),MF=o("store"),UF=o("stretch-horizontal"),FF=o("stretch-vertical"),DF=o("strikethrough"),NF=o("subscript"),zF=o("subtitles"),HF=o("summary"),$F=o("sun"),jF=o("sun-dim"),WF=o("sun-medium"),_F=o("sun-moon"),VF=o("sun-snow"),GF=o("sunrise"),XF=o("sunset"),ZF=o("superscript"),KF=o("swatch-book"),QF=o("swiss-franc"),JF=o("switch-camera"),YF=o("sword"),oD=o("swords"),tD=o("syringe"),eD=o("table"),nD=o("table-2"),rD=o("table-cells-merge"),cD=o("table-cells-split"),sD=o("table-columns-split"),aD=o("table-config"),iD=o("table-of-contents"),pD=o("table-properties"),lD=o("table-rows-split"),uD=o("tablet"),dD=o("tablet-smartphone"),xD=o("tablets"),hD=o("tag"),ID=o("tag-plus"),fD=o("tag-x"),mD=o("tags"),gD=o("tally-1"),bD=o("tally-2"),wD=o("tally-3"),SD=o("tally-4"),yD=o("tally-5"),CD=o("tangent"),kD=o("target"),vD=o("telescope"),AD=o("tent"),qD=o("tent-tree"),PD=o("terminal"),TD=o("terminal-square"),LD=o("test-tube"),OD=o("test-tube-2"),RD=o("test-tube-diagonal"),BD=o("test-tubes"),ED=o("text"),MD=o("text-align-center"),UD=o("text-align-end"),FD=o("text-align-justify"),DD=o("text-align-start"),ND=o("text-cursor"),zD=o("text-cursor-input"),HD=o("text-initial"),$D=o("text-quote"),jD=o("text-search"),WD=o("text-select"),_D=o("text-selection"),VD=o("text-wrap"),GD=o("theater"),XD=o("thermometer"),ZD=o("thermometer-snowflake"),KD=o("thermometer-sun"),QD=o("thumbs-down"),JD=o("thumbs-up"),YD=o("ticket"),oN=o("ticket-check"),tN=o("ticket-minus"),eN=o("ticket-percent"),nN=o("ticket-plus"),rN=o("ticket-slash"),cN=o("ticket-x"),sN=o("tickets"),aN=o("tickets-plane"),iN=o("timeline"),pN=o("timer"),lN=o("timer-off"),uN=o("timer-reset"),dN=o("toggle-left"),xN=o("toggle-right"),hN=o("toilet"),IN=o("tool-case"),fN=o("toolbox"),mN=o("tornado"),gN=o("torus"),bN=o("touchpad"),wN=o("touchpad-off"),SN=o("towel-rack"),yN=o("tower-control"),CN=o("toy-brick"),kN=o("tractor"),vN=o("traffic-cone"),AN=o("train"),qN=o("train-front"),PN=o("train-front-tunnel"),TN=o("train-track"),LN=o("tram-front"),ON=o("transgender"),RN=o("trash"),BN=o("trash-2"),EN=o("tree-deciduous"),MN=o("tree-palm"),UN=o("tree-pine"),FN=o("trees"),DN=o("trending-down"),NN=o("trending-up"),zN=o("trending-up-down"),HN=o("triangle"),$N=o("triangle-alert"),jN=o("triangle-dashed"),WN=o("triangle-right"),_N=o("trophy"),VN=o("truck"),GN=o("truck-electric"),XN=o("turkish-lira"),ZN=o("turntable"),KN=o("turtle"),QN=o("tv"),JN=o("tv-2"),YN=o("tv-minimal"),o2=o("tv-minimal-play"),t2=o("type"),e2=o("type-outline"),n2=o("umbrella"),r2=o("umbrella-off"),c2=o("underline"),s2=o("undo"),a2=o("undo-2"),i2=o("undo-dot"),p2=o("unfold-horizontal"),l2=o("unfold-vertical"),u2=o("ungroup"),d2=o("university"),x2=o("unlink"),h2=o("unlink-2"),I2=o("unlock"),f2=o("unlock-keyhole"),m2=o("unplug"),g2=o("upload"),b2=o("upload-cloud"),w2=o("usb"),S2=o("user"),y2=o("user-2"),C2=o("user-check"),k2=o("user-check-2"),v2=o("user-circle"),A2=o("user-circle-2"),q2=o("user-cog"),P2=o("user-cog-2"),T2=o("user-key"),L2=o("user-lock"),O2=o("user-minus"),R2=o("user-minus-2"),B2=o("user-pen"),E2=o("user-plus"),M2=o("user-plus-2"),U2=o("user-round"),F2=o("user-round-arrow-left"),D2=o("user-round-check"),N2=o("user-round-cog"),z2=o("user-round-key"),H2=o("user-round-minus"),$2=o("user-round-pen"),j2=o("user-round-plus"),W2=o("user-round-search"),_2=o("user-round-x"),V2=o("user-search"),G2=o("user-shield"),X2=o("user-square"),Z2=o("user-square-2"),K2=o("user-star"),Q2=o("user-x"),J2=o("user-x-2"),Y2=o("users"),oz=o("users-2"),tz=o("users-round"),ez=o("utensils"),nz=o("utensils-crossed"),rz=o("utility-pole"),cz=o("van"),sz=o("variable"),az=o("vault"),iz=o("vector-square"),pz=o("vegan"),lz=o("venetian-mask"),uz=o("venus"),dz=o("venus-and-mars"),xz=o("verified"),hz=o("vibrate"),Iz=o("vibrate-off"),fz=o("video"),mz=o("video-off"),gz=o("videotape"),bz=o("view"),wz=o("voicemail"),Sz=o("volleyball"),yz=o("volume"),Cz=o("volume-1"),kz=o("volume-2"),vz=o("volume-off"),Az=o("volume-x"),qz=o("vote"),Pz=o("wallet"),Tz=o("wallet-2"),Lz=o("wallet-cards"),Oz=o("wallet-minimal"),Rz=o("wallpaper"),Bz=o("wand"),Ez=o("wand-2"),Mz=o("wand-sparkles"),Uz=o("warehouse"),Fz=o("washing-machine"),Dz=o("watch"),Nz=o("waves"),zz=o("waves-arrow-down"),Hz=o("waves-arrow-up"),$z=o("waves-horizontal"),jz=o("waves-ladder"),Wz=o("waves-vertical"),_z=o("waypoints"),Vz=o("webcam"),Gz=o("webcam-off"),Xz=o("webhook"),Zz=o("webhook-off"),Kz=o("weight"),Qz=o("weight-tilde"),Jz=o("wheat"),Yz=o("wheat-off"),oH=o("whole-word"),tH=o("wifi"),eH=o("wifi-cog"),nH=o("wifi-high"),rH=o("wifi-low"),cH=o("wifi-off"),sH=o("wifi-pen"),aH=o("wifi-sync"),iH=o("wifi-zero"),pH=o("wind"),lH=o("wind-arrow-down"),uH=o("wine"),dH=o("wine-off"),xH=o("workflow"),hH=o("worm"),IH=o("wrap-text"),fH=o("wrench"),mH=o("wrench-off"),gH=o("x"),bH=o("x-circle"),wH=o("x-line-top"),SH=o("x-octagon"),yH=o("x-square"),CH=o("zap"),kH=o("zap-off"),vH=o("zodiac-aquarius"),AH=o("zodiac-aries"),qH=o("zodiac-cancer"),PH=o("zodiac-capricorn"),TH=o("zodiac-gemini"),LH=o("zodiac-leo"),OH=o("zodiac-libra"),RH=o("zodiac-ophiuchus"),BH=o("zodiac-pisces"),EH=o("zodiac-sagittarius"),MH=o("zodiac-scorpio"),UH=o("zodiac-taurus"),FH=o("zodiac-virgo"),DH=o("zoom-in"),NH=o("zoom-out");var oo=class extends x{setup(){this.state=A({open:To(this.props.state)}),this.triggerRef=C("trigger"),this.bufferRef=C("buffer"),this.bootstrapTooltip=null,this.lastContentHtml=null,this.onShown=()=>{this.state.open=!0},this.onHidden=()=>{this.state.open=!1},T(()=>{this.lastContentHtml=this.currentContentHtml();let e=this.triggerElement();this.bootstrapTooltip=new(H()).Tooltip(e,{title:this.lastContentHtml,html:!0,trigger:"hover focus"}),e.addEventListener("shown.bs.tooltip",this.onShown),e.addEventListener("hidden.bs.tooltip",this.onHidden),To(this.props.state)&&this.bootstrapTooltip.show()}),U(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),F(()=>{let e=this.triggerElement();e?.removeEventListener("shown.bs.tooltip",this.onShown),e?.removeEventListener("hidden.bs.tooltip",this.onHidden),this.bootstrapTooltip?.dispose()})}triggerElement(){return this.triggerRef.el?.firstElementChild||this.triggerRef.el}currentContentHtml(){return this.props.content??this.bufferRef.el?.innerHTML??""}show(){this.bootstrapTooltip?.show()}hide(){this.bootstrapTooltip?.hide()}};i(oo,"template","baseui.Tooltip"),i(oo,"props",{content:s(String),state:s(String),...g});var gn=0,to={label:s(String),labelBackground:s(String),supportingText:s(String),useTip:s(Number),errorText:s(String),leadingIcon:s(String),trailingIcon:s(String),maxLength:s(Number),invalid:s(Boolean),placeholder:s(String),disabled:s(Boolean),slots:s(Object)},M=class extends x{setup(){this.supportId=`bu-input-support-${gn++}`,this.box=C("box"),this.slotRefs={start:C("start"),end:C("end"),footer:C("footer")},T(()=>this.measureSlots()),U(()=>this.measureSlots())}get field(){return this.env.fieldProps?.()??{}}get label(){return this.props.label??this.field.label}get labelStyle(){let e=this.props.labelBackground??this.field.labelBackground;return e?`--bu-label-bg:${e}`:void 0}get isOutlined(){return!!this.label||this.hasStart||this.hasEnd||this.hasFooter}get hasStart(){return!!this.props.slots?.start}get hasEnd(){return!!this.props.slots?.end}get hasFooter(){return!!this.props.slots?.footer}measureSlots(){let e=this.box.el;if(!e)return;let{start:n,end:r,footer:c}=this.slotRefs;e.style.setProperty("--bu-slot-start",`${n.el?.offsetWidth??0}px`),e.style.setProperty("--bu-slot-end",`${r.el?.offsetWidth??0}px`),e.style.setProperty("--bu-slot-footer",`${c.el?.offsetHeight??0}px`)}get isInvalid(){return!!(this.props.invalid||this.field.invalid||this.errorText)}get errorText(){return this.props.errorText??this.field.error}get helperText(){return this.props.supportingText||this.field.description}get useTip(){return Number(this.props.useTip??this.field.useTip??0)===1}get supportingText(){return this.errorText||(this.useTip?void 0:this.helperText)}get tipText(){return this.useTip&&!this.errorText?this.helperText:void 0}get leadingIcon(){return this.props.leadingIcon}get trailingIcon(){return this.isInvalid?"circle-alert":this.props.trailingIcon}get fieldPlaceholder(){return this.props.placeholder??(this.isOutlined?" ":void 0)}get counter(){return`${(this.props.value??"").length}/${this.props.maxLength}`}get controlClass(){return this.isOutlined&&"bu-outlined-control"}get describedBy(){return this.supportingText?this.supportId:void 0}get outlinedClassNames(){return m("bu-input-outlined",this.isInvalid&&"is-invalid",this.props.disabled&&"is-disabled",this.props.placeholder&&"has-placeholder",this.leadingIcon&&"has-leading",this.trailingIcon&&"has-trailing",this.hasStart&&"has-start",this.hasEnd&&"has-end",this.hasFooter&&"has-footer")}};i(M,"components",{Icon:q,IconCircleQuestionMark:Ut,Tooltip:oo});function Ft({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var eo=class extends M{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return m("bu-input",Ft({tag:"input",type:this.props.type}),this.controlClass,this.isInvalid&&"is-invalid",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};i(eo,"template","baseui.Input"),i(eo,"props",{...to,value:s(String),type:s(String),readonly:s(Boolean),className:s(String),style:s([String,Object]),id:s(String),list:s(String),autocomplete:s(String),"aria-label":s(String),ariaLabel:s(String),min:s([String,Number]),max:s([String,Number]),step:s([String,Number]),onInput:s(Function),onChange:s(Function)});var no=class extends M{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return m("bu-native-select","form-select",this.controlClass,this.isInvalid&&"is-invalid",(this.props.size==="sm"||this.props.size==="lg")&&`form-select-${this.props.size}`,this.props.className)}onChange(e){this.props.onChange?.(e.target.value,e)}};i(no,"template","baseui.NativeSelect"),i(no,"props",{...to,value:s(String),size:s(String),...g,"aria-label":s(String),ariaLabel:s(String),id:s(String),onChange:s(Function)});var ro=class extends M{get outlinedClassNames(){return m(super.outlinedClassNames,"is-anchored")}get classNames(){return m("form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.resize==="none"&&"bu-textarea-no-resize",this.props.className)}onInput(e){this.props.onInput?.(e.target.value,e)}onChange(e){this.props.onChange?.(e.target.value,e)}};i(ro,"template","baseui.Textarea"),i(ro,"props",{...to,value:s(String),rows:s(Number),readonly:s(Boolean),resize:s(String),className:s(String),style:s([String,Object]),id:s(String),onInput:s(Function),onChange:s(Function)});var at={default:"bu-tabs-list-default",line:"bu-tabs-list-line"};function Dt(t,e,n,r="horizontal"){let c=r==="vertical",l=t===(c?"ArrowDown":"ArrowRight")?1:t===(c?"ArrowUp":"ArrowLeft")?-1:0;return!l||n===0?-1:(e+l+n)%n}var bn=0;function Nt(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var co=class extends x{setup(){this.tabsState=A({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++bn}`,bo({tabs:this.tabsState,selectTab:e=>this.select(e),tabsId:this.instanceId,orientation:this.orientation}),B(e=>{e.value!==void 0&&(this.tabsState.active=e.value)})}get orientation(){return this.props.orientation==="vertical"?"vertical":"horizontal"}get classNames(){return m("bu-tabs",this.props.className)}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};i(co,"template","baseui.Tabs"),i(co,"props",{value:s(String),defaultValue:s(String),orientation:s(String),onChange:s(Function),...g});var so=class extends x{};i(so,"template","baseui.TabsContainer"),i(so,"props",{...g});var ao=class extends x{setup(){this.listRef=C("list")}get classNames(){return m("bu-tabs-list",at[this.props.variant]||at.default,this.props.className)}onKeyDown(e){let n=[...this.listRef.el.querySelectorAll("[role='tab']")],r=n.indexOf(e.target),c=Dt(e.key,r,n.length,this.env.orientation);c!==-1&&(e.preventDefault(),n[c].focus(),n[c].click())}};i(ao,"template","baseui.TabsList"),i(ao,"props",{variant:s(String),...g});var j=class extends x{setup(){this.rootEl=null,this.tabInstance=null,this.onShown=()=>this.env.selectTab(this.props.value)}onRootRef(e){e?(this.rootEl=e,this.tabInstance=H().Tab.getOrCreateInstance(e),e.addEventListener("shown.bs.tab",this.onShown)):this.rootEl&&(this.rootEl.removeEventListener("shown.bs.tab",this.onShown),this.tabInstance?.dispose(),this.tabInstance=null,this.rootEl=null)}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`bu-tabs-panel-${this.env.tabsId}-${Nt(this.props.value)}`}get classNames(){return m("bu-tabs-trigger",this.isActive&&"active",this.props.className)}get tabAttrs(){return{role:"tab","data-bs-target":`#${this.panelId}`,"aria-selected":this.isActive?"true":"false",tabindex:this.isActive?0:-1}}onClick(){this.props.disabled||this.tabInstance?.show()}};i(j,"template","baseui.TabTrigger"),i(j,"components",{Button:O}),i(j,"props",{value:{type:String},disabled:s(Boolean),...g});var io=class extends x{setup(){this.initialActive=this.isActive}get isActive(){return this.env.tabs.active===this.props.value}get panelId(){return`bu-tabs-panel-${this.env.tabsId}-${Nt(this.props.value)}`}};i(io,"template","baseui.TabContent"),i(io,"props",{value:{type:String},...g});var po=class extends x{};i(po,"template","baseui.Breadcrumb"),i(po,"props",{...g});var lo=class extends x{};i(lo,"template","baseui.BreadcrumbList"),i(lo,"props",{...g});var uo=class extends x{get classNames(){return m("bu-breadcrumb-item",this.props.current&&"bu-breadcrumb-page",this.props.className)}};i(uo,"template","baseui.BreadcrumbItem"),i(uo,"props",{current:s(Boolean),...g});var xo=class extends x{get classNames(){return m("bu-breadcrumb-link",this.props.className)}onClick(e){this.props.onClick?.(e)}};i(xo,"template","baseui.BreadcrumbLink"),i(xo,"props",{href:s(String),target:s(String),rel:s(String),...g,onClick:s(Function)});var ho=class extends x{get classNames(){return m("bu-breadcrumb-page",this.props.className)}};i(ho,"template","baseui.BreadcrumbPage"),i(ho,"props",{...g});var W=class extends x{get classNames(){return m("bu-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};i(W,"template","baseui.BreadcrumbSeparator"),i(W,"components",{Icon:q}),i(W,"props",{...g});var Co=class extends x{get classNames(){return m("bu-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};i(Co,"template","baseui.BreadcrumbEllipsis"),i(Co,"components",{Icon:q}),i(Co,"props",{...g});var lt=["get","post","put","patch","delete","options","head","trace","query"];function wn(t,e,n){let r=String(t||"").trim();if(!r)return"";let c=r.replace(/\{([^}]+)\}/g,(a,p)=>{let l=n&&typeof n=="object"?n[p]:null;return l&&l.default!==void 0?String(l.default):`{${p}}`});try{return new URL(c,`${e}/`).href.replace(/\/$/,"")}catch{return c.replace(/\/$/,"")}}function v(t,e){if(t&&typeof t=="object"&&typeof t.$ref=="string"){let n=t.$ref.replace(/^#\//,"").split("/"),r=e;for(let c of n)r=r?.[decodeURIComponent(c.replace(/~1/g,"/").replace(/~0/g,"~"))];return r?{...r}:{}}return t}function dt(t,e){if(!Array.isArray(t?.allOf))return t;let n={...t,properties:{...t.properties},required:[...t.required||[]]};delete n.allOf;for(let r of t.allOf){let c=dt(v(r,e),e)||{};Object.assign(n.properties,c.properties),n.required.push(...c.required||[]),n.type||(n.type=c.type)}return n}function Sn(t,e){if(!t)return null;let n=v(t,e);return!n||typeof n!="object"?null:n}function ut(t){return t&&typeof t.$ref=="string"?t.$ref.split("/").pop():null}function Ht(t,e){if(!t||typeof t!="object")return null;for(let[n,r]of Object.entries(t)){let c=Sn(r,e);if(c){if(c.dataValue!==void 0)return{key:n,label:c.summary||n,value:c.dataValue,isAuto:!1};if(c.serializedValue!==void 0)return{key:n,label:c.summary||n,value:c.serializedValue,isAuto:!1};if(c.value!==void 0)return{key:n,label:c.summary||n,value:c.value,isAuto:!1};if(c.externalValue)return{key:n,label:c.summary||n,value:c.externalValue,isAuto:!1}}}return null}function xt(t){if(t){if(t.example!==void 0)return t.example;if(t.default!==void 0)return t.default;if(Array.isArray(t.enum)&&t.enum.length)return t.enum[0]}}function it(t,e){if(!t)return null;let n=Ht(t.examples,e);if(n)return n;if(t.example!==void 0)return{label:"media example",value:t.example,isAuto:!1};let r=v(t.schema,e),c=xt(r);return c!==void 0?{label:"schema example",value:c,isAuto:!1}:null}function $t(t,e){let n=Ht(t.examples,e);if(n)return n;if(t.example!==void 0)return{label:"example",value:t.example,isAuto:!1};let r=v(t.schema,e),c=xt(r);return c!==void 0?{label:"schema example",value:c,isAuto:!1}:null}function Io(t,e,n=new Set){if(!t)return null;let r=ut(t);if(r){if(n.has(r))return{};n=new Set(n).add(r)}let c=dt(v(t,e),e);if(!c)return null;let a=xt(c);if(a!==void 0)return a;if(c.type==="array"||c.items)return[Io(c.items||{},e,n)];if(c.properties||c.type==="object"){let p={};for(let[l,d]of Object.entries(c.properties||{}))p[l]=Io(d,e,n);return p}switch(c.type){case"integer":return c.minimum??0;case"number":return c.minimum??0;case"boolean":return!0;case"string":return c.format==="date-time"?new Date().toISOString():c.format==="date"?new Date().toISOString().slice(0,10):c.format==="byte"?"base64==":c.title||"string";default:return null}}function ko(t,e,{depth:n=0,prefix:r="",seen:c=new Set,required:a=!1,selfRow:p=!0}={}){if(!t||n>4)return[];let l=ut(t);if(l){if(c.has(l))return[];c=new Set(c).add(l)}let d=dt(v(t,e),e),f=[],b=d.contentMediaType||d.contentEncoding?[d.contentMediaType,d.contentEncoding&&`encoding:${d.contentEncoding}`].filter(Boolean).join(", "):"",S=d.discriminator?.propertyName?`discriminator: ${d.discriminator.propertyName}`:"";if(Array.isArray(d.prefixItems))return p&&f.push({path:r||"items",type:"tuple",required:a,description:d.description||""}),d.prefixItems.forEach((y,k)=>{f.push(...ko(y,e,{depth:n+1,prefix:`${r}[${k}]`,seen:c,required:!1}))}),d.items&&f.push(...ko(d.items,e,{depth:n+1,prefix:`${r}[n]`,seen:c,required:!1})),f;if(d.type==="array"||d.items)return p&&f.push({path:r||"items",type:"array",required:a,description:d.description||""}),f.push(...ko(d.items||{},e,{depth:n+1,prefix:`${r}[]`,seen:c,required:!1})),f;if(d.properties||d.type==="object"||d.patternProperties){let y=new Set(d.required||[]);for(let[k,u]of Object.entries(d.properties||{})){let w=v(u,e),L=r?`${r}.${k}`:k;f.push({path:L,type:w.type||(w.$ref?ut(u):"any")||"any",format:w.format||"",enum:w.enum,required:y.has(k),description:w.description||""}),(w.type==="object"||w.properties||w.type==="array"||w.items)&&f.push(...ko(u,e,{depth:n+1,prefix:L,seen:c,required:y.has(k),selfRow:!1}))}for(let[k,u]of Object.entries(d.patternProperties||{})){let w=v(u,e);f.push({path:r?`${r}.<${k}>`:`<${k}>`,type:w.type||"any",format:w.format||"",required:!1,description:w.description||""})}return f}return f.push({path:r||"value",type:d.type||"any",format:d.format||"",enum:d.enum,required:a,description:[d.description,b,S].filter(Boolean).join(" \u2014 ")}),f}function yn(t){let e=$t(t,this);return{name:t.name,in:t.in,required:!!t.required,type:t.type||t.schema?.type||"string",format:t.format||t.schema?.format||"",description:t.description||"",default:t.default??t.schema?.default,enum:t.enum||t.schema?.enum,example:e?e.value:void 0,exampleLabel:e?e.label:""}}var Cn={authorizationCode:"accessCode",implicit:"implicit",password:"password",clientCredentials:"application"};function kn(t){if(t.type==="http")return{...t,type:String(t.scheme).toLowerCase()==="basic"?"basic":"bearer"};if(t.type==="openIdConnect")return{...t,type:"bearer",oauth2MetadataUrl:t.openIdConnectUrl};if(t.type!=="oauth2"||!t.flows)return t;let[e,n]=Object.entries(t.flows)[0]||[];return{...t,...n,flow:Cn[e]||e,scopes:n?.scopes||{}}}function jt(t){let e=t.securityDefinitions||t.components?.securitySchemes||{};return Object.fromEntries(Object.entries(e).map(([n,r])=>[n,kn(v(r,t))]))}function vn(t,e){let n=jt(e),r=t.security||e.security||[],c=[];for(let a of r)for(let p of Object.keys(a)){let l=n[p];l&&c.push({key:p,...l})}return c}function pt(t,e,n,r){let c={path:[],query:[],header:[],formData:[],body:null};for(let f of r.parameters||[]){let b=v(f,t);if(b.in==="body"){let S={schema:b.schema},y=it(S,t);c.body={required:!!b.required,schema:b.schema,description:b.description||"",contentType:"application/json",example:y?y.value:Io(b.schema,t),exampleLabel:y?y.label:"auto",exampleIsAuto:!y}}else c[b.in]&&c[b.in].push(yn.call(t,b))}if(r.requestBody){let f=v(r.requestBody,t)||{},[b,S]=Object.entries(f.content||{})[0]||[];if(b&&S){let y=it(S,t);c.body={required:!!f.required,schema:S.schema||null,description:f.description||"",contentType:b,encoding:S.encoding||null,itemSchema:S.itemSchema||null,example:y?y.value:Io(S.schema,t),exampleLabel:y?y.label:"auto",exampleIsAuto:!y}}}let a=Object.entries(r.responses||{}).map(([f,b])=>{let S=v(b,t)||{},[y,k]=Object.entries(S.content||{})[0]||[],u=k?it(k,t):null;return{status:f,summary:S.summary||"",description:S.description||"",contentType:y||"application/json",schema:k?.schema||S.schema||null,encoding:k?.encoding||null,headers:An(S.headers,t),links:qn(S.links,t),example:u?u.value:k?.schema?Io(k.schema,t):null,exampleLabel:u?u.label:"auto",exampleIsAuto:!u&&!!k?.schema}}).sort((f,b)=>{let S=zt(f.status),y=zt(b.status);return S-y}),p=Pn(r.callbacks,t),l=n.toUpperCase();return{id:(r.operationId||`${n}-${e}`).replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),method:l,path:e,tag:r.tags&&r.tags[0]||"default",summary:r.summary||r.operationId||`${l} ${e}`,description:r.description||"",deprecated:!!r.deprecated,produces:r.produces||t.produces||["application/json"],consumes:r.consumes||t.consumes||(c.body?["application/json"]:[]),parameters:c,responses:a,callbacks:p,externalDocs:r.externalDocs||null,security:vn(r,t)}}function An(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([n,r])=>{let c=v(r,e)||{},a=$t({...c,in:"header"},e);return{name:n,required:!!c.required,deprecated:!!c.deprecated,type:c.schema?.type||"string",description:c.description||"",example:a?a.value:void 0}})}function qn(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([n,r])=>{let c=v(r,e)||{};return{name:n,operationId:c.operationId||"",operationRef:c.operationRef||"",description:c.description||"",parameters:c.parameters||{}}})}function Pn(t,e){if(!t||typeof t!="object")return[];let n=[];for(let[r,c]of Object.entries(t)){let a=v(c,e)||{};for(let[p,l]of Object.entries(a)){let d=v(l,e)||{};for(let f of lt)d[f]&&n.push({name:r,expression:p,method:f.toUpperCase(),summary:d[f].summary||"",description:d[f].description||""})}}return n}function zt(t){if(t==="default")return 999;let e=parseInt(t,10);return Number.isNaN(e)?998:e}async function ht(t,e=""){let n=await fetch(t);if(!n.ok)throw new Error(`Failed to fetch spec: HTTP ${n.status}`);return Uo(await n.json(),e)}function Uo(t,e=""){if(!t||typeof t!="object"||!t.paths&&!t.webhooks)throw new Error("Not an OpenAPI document (missing paths).");let n=t.schemes&&t.schemes.includes("https")?"https":t.schemes?.[0]||"https",r=t.host||location.host,c=t.basePath||"",a=`${n}://${r}${c}`.replace(/\/$/,""),p=e?[{name:"",url:e.replace(/\/$/,""),description:""}]:Array.isArray(t.servers)&&t.servers.length?t.servers.map(u=>({name:u?.name||"",url:wn(u?.url,a,u?.variables),description:String(u?.description||"").trim()})).filter(u=>u.url):[{name:"",url:a,description:""}],l=p[0]?.url||a,d=(t.tags||[]).map(u=>u.name),f=new Map((t.tags||[]).map(u=>[u.name,u])),b=[];for(let[u,w]of Object.entries(t.paths||{})){let L=v(w,t)||{};for(let R of lt)L[R]&&b.push(pt(t,u,R,L[R]));for(let[R,ee]of Object.entries(L.additionalOperations||{}))b.push(pt(t,u,R.toLowerCase(),ee))}let S=[];for(let[u,w]of Object.entries(t.webhooks||{})){let L=v(w,t)||{};for(let R of lt)L[R]&&S.push(pt(t,u,R,L[R]))}let k=[...new Set([...d,...b.map(u=>u.tag)])].map(u=>{let w=f.get(u);return{id:u.replace(/[^a-zA-Z0-9]+/g,"-").toLowerCase(),name:u,summary:w?.summary||"",description:w?.description||"",parent:w?.parent||"",kind:w?.kind||"",items:b.filter(L=>L.tag===u)}}).filter(u=>u.items.length);return{spec:t,info:t.info||{},baseUrl:l,derivedBaseUrl:a,servers:p,securityDefinitions:jt(t),groups:k,webhooks:S,resolveRef:u=>v(u,t),generateExample:u=>Io(u,t),schemaRows:u=>ko(u,t),findOperation:u=>b.find(w=>w.id===u)||S.find(w=>w.id===u),firstOperation:()=>b[0]}}var vo=[{id:"curl",label:"CURL",icon:"img/bash-plain.svg"},{id:"csharp",label:"CSHARP",icon:"img/csharp-original.svg"},{id:"go",label:"GO",icon:"img/go-original-wordmark.svg"},{id:"node",label:"NODEJS",icon:"img/nodejs-original.svg"},{id:"ruby",label:"RUBY",icon:"img/ruby-plain.svg"},{id:"php",label:"PHP",icon:"img/php-original.svg"},{id:"javascript",label:"JAVASCRIPT",icon:"img/javascript-original.svg"},{id:"python",label:"PYTHON",icon:"img/python-original.svg"},{id:"java",label:"JAVA",icon:"img/java-original.svg"},{id:"c",label:"C",icon:"img/c-original.svg"},{id:"swift",label:"SWIFT",icon:"img/swift-original.svg"},{id:"objc",label:"OBJECTIVE-C",icon:"img/objectivec-plain.svg"},{id:"kotlin",label:"KOTLIN",icon:"img/kotlin-original.svg"},{id:"rust",label:"RUST",icon:"img/rust-original.svg"},{id:"powershell",label:"POWERSHELL",icon:"img/windows8-original.svg"},{id:"dart",label:"DART",icon:"img/dart-original.svg"},{id:"lua",label:"LUA",icon:"img/lua.svg"}];function Tn(t){let e=new URL(t.url);return(t.query||[]).forEach(([n,r])=>{n&&e.searchParams.set(n,String(r||""))}),e.toString()}function Ln(t,e){let n=[];return(t.headers||[]).forEach(([c,a])=>{c&&n.push([c,String(a??"")])}),e&&t.bodyText&&!On(n,"Content-Type")&&n.push(["Content-Type",t.mimeType||"application/json"]),n}function On(t,e){let n=e.toLowerCase();return t.some(function(r){return String(r[0]||"").toLowerCase()===n})}function Rn(t,e){return String(t||"").split(`
6
+ `).map(function(n){return e+n}).join(`
7
+ `)}function P(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function I(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Bn(t){return String(t).replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}function En(t){return String(t).replace(/`/g,'` + "`" + `')}function Mn(t){return String(t).replace(/\\/g,"\\\\").replace(/"""/g,'\\"\\"\\"')}function Fo(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function Do(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\\\'")}function No(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function zo(t){return String(t).replace(/`/g,"``").replace(/"/g,'`"')}function Un(t){return String(t).replace(/\]=\]/g,']==] .. "]=" .. [=[')}function Fn(t,e){let n=e&&e.quote==="double"?'"':"'";return t.map(function(c){let a=n==='"'?I(c[0]):P(c[0]),p=n==='"'?I(c[1]):P(c[1]);return n+a+n+": "+n+p+n}).join(`,
8
+ `)}function Dn(t,e,n){let r=["curl --request "+t.method];return n.forEach(function(c){r.push("--header '"+P(c[0]+": "+c[1])+"'")}),t.bodyText&&r.push("--data '"+P(t.bodyText)+"'"),r.push("'"+P(e)+"'"),r.join(` \\
9
+ `)}function Wt(t,e,n){let r=["const url = '"+P(e)+"';","const options = {"," method: '"+P(t.method)+"',"];return n.length&&(r.push(" headers: {"),r.push(Rn(Fn(n)," ")),r.push(" },")),t.bodyText&&r.push(" body: `"+Bn(t.bodyText)+"`,"),r.push("};","","const response = await fetch(url, options);","const data = await response.text();","console.log(response.status, data);"),r.join(`
10
+ `)}function Nn(t,e,n){return Wt(t,e,n)}function zn(t,e,n){let r=["import requests","","url = '"+P(e)+"'"];return n.length?(r.push("headers = {"),n.forEach(function(c){r.push(" '"+P(c[0])+"': '"+P(c[1])+"',")}),r.push("}")):r.push("headers = {}"),t.bodyText?(r.push("",'payload = """'+Mn(t.bodyText)+'"""'),r.push("response = requests.request('"+P(t.method)+"', url, headers=headers, data=payload)")):r.push("","response = requests.request('"+P(t.method)+"', url, headers=headers)"),r.push("print(response.status_code)","print(response.text)"),r.join(`
11
+ `)}function Hn(t,e,n){let r=["package main","","import (",' "fmt"',' "io"',' "net/http"'];return t.bodyText&&r.push(' "strings"'),r.push(")","","func main() {"),t.bodyText?(r.push(" body := strings.NewReader(`"+En(t.bodyText)+"`)"),r.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", body)')):r.push(' req, err := http.NewRequest("'+t.method+'", "'+e+'", nil)'),r.push(" if err != nil {"," panic(err)"," }"),n.forEach(function(c){r.push(' req.Header.Set("'+I(c[0])+'", "'+I(c[1])+'")')}),r.push(""," res, err := http.DefaultClient.Do(req)"," if err != nil {"," panic(err)"," }"," defer res.Body.Close()",""," data, err := io.ReadAll(res.Body)"," if err != nil {"," panic(err)"," }",""," fmt.Println(res.StatusCode)"," fmt.Println(string(data))","}"),r.join(`
12
+ `)}function $n(t,e,n){let r=["OkHttpClient client = new OkHttpClient();","","Request.Builder builder = new Request.Builder()",' .url("'+I(e)+'")'];return n.forEach(function(c){r.push(' .addHeader("'+I(c[0])+'", "'+I(c[1])+'")')}),t.bodyText?r.push(";","",'MediaType mediaType = MediaType.parse("'+I(t.mimeType||"application/json")+'");','RequestBody body = RequestBody.create("""'+I(t.bodyText)+'""", mediaType);','Request request = builder.method("'+t.method+'", body).build();'):r.push(";","",'Request request = builder.method("'+t.method+'", null).build();'),r.push("","try (Response response = client.newCall(request).execute()) {"," System.out.println(response.code());",' System.out.println(response.body() != null ? response.body().string() : "");',"}"),r.join(`
13
+ `)}function jn(t,e,n){let c=["using var client = new HttpClient();","using var request = new HttpRequestMessage(HttpMethod."+(t.method.charAt(0)+t.method.slice(1).toLowerCase())+', "'+I(e)+'");'];return n.forEach(function(a){c.push('request.Headers.TryAddWithoutValidation("'+I(a[0])+'", "'+I(a[1])+'");')}),t.bodyText&&c.push('request.Content = new StringContent("""'+I(t.bodyText)+'""", Encoding.UTF8, "'+I(t.mimeType||"application/json")+'");'),c.push("","using var response = await client.SendAsync(request);","var body = await response.Content.ReadAsStringAsync();","Console.WriteLine((int)response.StatusCode);","Console.WriteLine(body);"),c.join(`
14
+ `)}function Wn(t,e,n){let r=["$ch = curl_init();","curl_setopt_array($ch, ["," CURLOPT_URL => '"+Fo(e)+"',"," CURLOPT_CUSTOMREQUEST => '"+Fo(t.method)+"',"," CURLOPT_RETURNTRANSFER => true,"];return n.length&&(r.push(" CURLOPT_HTTPHEADER => ["),n.forEach(function(c){r.push(" '"+Fo(c[0]+": "+c[1])+"',")}),r.push(" ],")),t.bodyText&&r.push(" CURLOPT_POSTFIELDS => '"+Fo(t.bodyText)+"',"),r.push("]);","","$response = curl_exec($ch);","echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE) . PHP_EOL;","echo $response;","curl_close($ch);"),r.join(`
15
+ `)}function _n(t,e,n){let r=t.method.charAt(0)+t.method.slice(1).toLowerCase(),c=['require "uri"','require "net/http"',"","uri = URI('"+Do(e)+"')","http = Net::HTTP.new(uri.host, uri.port)",'http.use_ssl = uri.scheme == "https"',"","request = Net::HTTP::"+r+".new(uri)"];return n.forEach(function(a){c.push("request['"+Do(a[0])+"'] = '"+Do(a[1])+"'")}),t.bodyText&&c.push("request.body = '"+Do(t.bodyText)+"'"),c.push("","response = http.request(request)","puts response.code","puts response.body"),c.join(`
16
+ `)}function Vn(t,e,n){let r=["#include <curl/curl.h>","","int main(void) {"," CURL *curl = curl_easy_init();"," if (!curl) return 1;",""," struct curl_slist *headers = NULL;"];return n.forEach(function(c){r.push(' headers = curl_slist_append(headers, "'+No(c[0]+": "+c[1])+'");')}),r.push(' curl_easy_setopt(curl, CURLOPT_URL, "'+No(e)+'");'),r.push(' curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "'+No(t.method)+'");'),n.length&&r.push(" curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);"),t.bodyText&&r.push(' curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "'+No(t.bodyText)+'");'),r.push(""," curl_easy_perform(curl);"," curl_slist_free_all(headers);"," curl_easy_cleanup(curl);"," return 0;","}"),r.join(`
17
+ `)}function Gn(t,e,n){let r=['var request = URLRequest(url: URL(string: "'+I(e)+'")!)','request.httpMethod = "'+I(t.method)+'"'];return n.forEach(function(c){r.push('request.setValue("'+I(c[1])+'", forHTTPHeaderField: "'+I(c[0])+'")')}),t.bodyText&&r.push('request.httpBody = """',t.bodyText,'""".data(using: .utf8)'),r.push("","URLSession.shared.dataTask(with: request) { data, response, error in"," if let error = error {"," print(error)"," return"," }"," let status = (response as? HTTPURLResponse)?.statusCode ?? 0"," print(status)",' print(String(data: data ?? Data(), encoding: .utf8) ?? "")',"}.resume()"),r.join(`
18
+ `)}function Xn(t,e,n){let r=['NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"'+I(e)+'"]];','request.HTTPMethod = @"'+I(t.method)+'";'];return n.forEach(function(c){r.push('[request setValue:@"'+I(c[1])+'" forHTTPHeaderField:@"'+I(c[0])+'"];')}),t.bodyText&&r.push('request.HTTPBody = [@"'+I(t.bodyText)+'" dataUsingEncoding:NSUTF8StringEncoding];'),r.push("","NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request"," completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"," if (error) {",' NSLog(@"%@", error);'," return;"," }"," NSInteger status = [(NSHTTPURLResponse *)response statusCode];"," NSString *body = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];",' NSLog(@"%ld", (long)status);',' NSLog(@"%@", body);',"}];","[task resume];"),r.join(`
19
+ `)}function Zn(t,e,n){let r=["val client = OkHttpClient()"];return t.bodyText&&r.push('val body = """',t.bodyText,'""".trimIndent().toRequestBody("'+I(t.mimeType||"application/json")+'".toMediaType())'),r.push("val request = Request.Builder()",' .url("'+I(e)+'")'),n.forEach(function(c){r.push(' .addHeader("'+I(c[0])+'", "'+I(c[1])+'")')}),r.push(t.bodyText?' .method("'+t.method+'", body)':' .method("'+t.method+'", null)'," .build()","","client.newCall(request).execute().use { response ->"," println(response.code)"," println(response.body?.string().orEmpty())","}"),r.join(`
20
+ `)}function Kn(t,e,n){let r=["let client = reqwest::Client::new();","let response = client"," ."+t.method.toLowerCase()+'("'+I(e)+'")'];return n.forEach(function(c){r.push(' .header("'+I(c[0])+'", "'+I(c[1])+'")')}),t.bodyText&&r.push(' .body(r#"'+t.bodyText.replace(/"#/g,'"#""#')+'"#)'),r.push(" .send()"," .await?;","",'println!("{}", response.status());','println!("{}", response.text().await?);'),r.join(`
21
+ `)}function Qn(t,e,n){let r=["$headers = @{"];return n.forEach(function(c){r.push(' "'+zo(c[0])+'" = "'+zo(c[1])+'"')}),r.push("}",""),t.bodyText&&r.push('$body = @"',t.bodyText,'"@',""),r.push("$response = Invoke-RestMethod -Method "+t.method+' -Uri "'+zo(e)+'" -Headers $headers'+(t.bodyText?' -Body $body -ContentType "'+zo(t.mimeType||"application/json")+'"':""),"$response | ConvertTo-Json -Depth 10"),r.join(`
22
+ `)}function Jn(t,e,n){let r=["import 'package:http/http.dart' as http;","","final uri = Uri.parse('"+P(e)+"');","final headers = <String, String>{"];return n.forEach(function(c){r.push(" '"+P(c[0])+"': '"+P(c[1])+"',")}),r.push("};",""),t.bodyText?r.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers, body: '''"+t.bodyText.replace(/'''/g,"'' '")+"''');"):r.push("final response = await http."+t.method.toLowerCase()+"(uri, headers: headers);"),r.push("print('Status: ${response.statusCode}');","print(response.body);"),r.join(`
23
+ `)}function Yn(t,e,n){let r=['local http = require("socket.http")','local ltn12 = require("ltn12")',"","local response_body = {}","local headers = {"];return n.forEach(function(c){r.push(' ["'+I(c[0])+'"] = "'+I(c[1])+'",')}),r.push("}",""),t.bodyText&&(r.push("local body = [==["+Un(t.bodyText)+"]==]",""),r.push('headers["Content-Length"] = tostring(#body)')),r.push("local _, code = http.request{",' url = "'+I(e)+'",',' method = "'+I(t.method)+'",'," headers = headers,"),t.bodyText&&r.push(" source = ltn12.source.string(body),"),r.push(" sink = ltn12.sink.table(response_body),","}","",'print("Status: " .. tostring(code))',"print(table.concat(response_body))"),r.join(`
24
+ `)}var or={curl:Dn,javascript:Wt,node:Nn,python:zn,go:Hn,java:$n,csharp:jn,php:Wn,ruby:_n,c:Vn,swift:Gn,objc:Xn,kotlin:Zn,rust:Kn,powershell:Qn,dart:Jn,lua:Yn};async function It(t,e){let n=vo.find(function(a){return a.id===t});if(!n)throw new Error("Unknown language: "+t);let r=Ln(e,!0),c=Tn(e);return or[n.id](e,c,r)}var _t={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},tr=["POST","PUT","PATCH"];function _(t){try{return sessionStorage.getItem(t)||""}catch{return""}}function Ao(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function mt(){return!!(_("apikey")||_("oauthkey"))}function ft(t){return t.example!==void 0?String(t.example):t.default!==void 0?String(t.default):t.enum?.length?String(t.enum[0]):t.type==="integer"||t.type==="number"?t.format==="int64"?"10":"1":t.type==="boolean"?"true":t.required&&t.in==="path"?"string":""}function gt(t,e){let n=_("apikey"),r=_("oauthkey");for(let c of t.security)c.type==="apiKey"&&c.in==="header"?e.header[c.name]=n:c.type==="apiKey"&&c.in==="query"?e.query[c.name]=n:c.type==="basic"?e.header.Authorization=n?`Basic ${n}`:"":(c.type==="oauth2"||c.type==="bearer")&&(e.header.Authorization=r?`Bearer ${r}`:"")}function Vt(t,e){let n={baseUrl:e,path:{},query:{},header:{},bodyText:"",mimeType:t.consumes?.[0]||"application/json"};return t.parameters.path.forEach(r=>{n.path[r.name]=ft(r)}),t.parameters.query.forEach(r=>{n.query[r.name]=r.required?ft(r):""}),t.parameters.header.forEach(r=>{n.header[r.name]=r.required?ft(r):""}),t.produces?.length&&(n.header.Accept=t.produces.includes("application/json")?"application/json":t.produces[0]),t.parameters.body&&(n.mimeType=t.parameters.body.contentType||n.mimeType,n.bodyText=bt(t.parameters.body.example)),gt(t,n),n}function bt(t){return typeof t=="string"?t:JSON.stringify(t,null,2)??""}function wt(t,e){let n=t.path;for(let[c,a]of Object.entries(e.path))n=n.replace(`{${c}}`,encodeURIComponent(a??""));let r=!!t.parameters.body&&tr.includes(t.method);return{method:t.method,url:`${e.baseUrl}${n}`,query:Object.entries(e.query).filter(([,c])=>c!==""),headers:Object.entries(e.header).filter(([,c])=>c!==""),bodyText:r?e.bodyText:"",mimeType:e.mimeType}}function Gt(t){let e=t.query.length?`${t.url}?${new URLSearchParams(t.query)}`:t.url,n=Object.fromEntries(t.headers);return t.bodyText&&(n["Content-Type"]=n["Content-Type"]||t.mimeType),{url:e,headers:n,headerLines:Object.entries(n).map(([r,c])=>`${r}: ${c}`).join(`
25
+ `)}}async function Xt(t,e){let n=performance.now(),r=await fetch(e.url,{method:t.method,headers:e.headers,body:t.bodyText||void 0}),c=Math.round(performance.now()-n),a=await r.text();return{status:r.status,statusText:r.statusText,ms:c,headerLines:[...r.headers.entries()].map(([p,l])=>`${p}: ${l}`).join(`
26
+ `),bodyText:er(a)}}function er(t){try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function Zt(t){let e=parseInt(t,10);return t==="default"||Number.isNaN(e)?"default":e<300?"2xx":e<400?"3xx":e<500?"4xx":"5xx"}function Kt(t,e,n){if(!t)return"";try{let r=new URL(e),c=new URL(n.derivedBaseUrl||n.baseUrl||e),a=new URL(t,`${r.href.replace(/\/$/,"")}/`);return a.host===c.host&&(a.protocol=r.protocol,a.username=r.username,a.password=r.password,a.host=r.host),a.href}catch{return String(t)}}function Qt(){return Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("")}function Jt({def:t,clientId:e,scopes:n,state:r,redirectUri:c,baseUrl:a,doc:p}){let l=new URL(Kt(t.authorizationUrl,a,p));return l.searchParams.set("response_type",t.flow==="implicit"?"token":"code"),e&&l.searchParams.set("client_id",e),l.searchParams.set("redirect_uri",c),n.length&&l.searchParams.set("scope",n.join(" ")),l.searchParams.set("state",r),l.toString()}async function Yt(t,e,n,r){if(!t)throw new Error("No tokenUrl defined for this scheme.");let c=new URLSearchParams;for(let[l,d]of Object.entries(e))d&&c.set(l,d);let a=await fetch(Kt(t,n,r),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:c.toString()}),p=await a.json().catch(()=>({}));if(!a.ok||!p.access_token)throw new Error(p.error_description||p.error||`HTTP ${a.status}`);return p.access_token}function oe(t,e,n){let r={client_id:e.clientId,client_secret:e.clientSecret,scope:n.join(" ")};return t==="password"?{grant_type:"password",username:e.username,password:e.password,...r}:{grant_type:"client_credentials",...r}}var nr=["curl","csharp","go","node","ruby","php"],rr="(max-width: 1100px)";function te(t){return t==="DELETE"?"DEL":t}function cr(){let t=[...document.scripts].find(e=>/\/baseui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(e.src));return t?`${t.src.replace(/[?#].*$/,"").replace(/\/[^/]*$/,"")}/apidoc`:""}var V=class extends x{get children(){return this.props.groups.filter(e=>e.parent===this.props.group.name)}methodLabel(e){return te(e)}};i(V,"template","baseui.ApiDocGroup"),i(V,"props",{group:Object,groups:Array,current:String,href:Function,onSelect:Function});V.components={ApiDocGroup:V,Icon:q};var N=class extends x{setup(){this.rootRef=C("root"),this.mainRef=C("main"),this.doc=null,this.pendingOAuth=new Map,this.watchers=new Set,this.rowsCache=new WeakMap,this.overlayQuery=window.matchMedia(rr),this.state=A({status:"loading",error:"",current:"introduction",lang:this.props.language||"curl",sidebarOpen:!this.overlayQuery.matches,systemTheme:"light",themeOverride:"",drafts:{},snippet:"",result:null,respTab:0,respView:{},authOpen:!1,authed:mt(),stored:{apikey:"",oauthkey:""},inputs:{apikey:"",oauthkey:""},oauth:{},oauthStatus:{}}),this.onHashChange=()=>this.setCurrent(this.routeId()),this.onViewportChange=()=>{this.state.sidebarOpen=!this.overlayQuery.matches},this.onDocumentClick=e=>this.closeSidebarOnOutsideClick(e),this.onOAuthMessage=e=>this.handleOAuthMessage(e),this.onThemeChange=()=>this.readSystemTheme(),go(()=>this.load(this.props)),B(e=>this.shouldReload(e)?this.load(e):void 0),T(()=>this.addListeners()),mo(()=>this.removeListeners())}get classNames(){return m("bu-apidoc",this.props.className)}get rootStyle(){return Lo(this.props.height?`--bu-apidoc-height:${this.props.height}`:"",this.props.style)}get theme(){return(this.props.theme==="light"||this.props.theme==="dark"?this.props.theme:"")||this.state.themeOverride||this.state.systemTheme}get title(){return this.props.title||this.doc?.info.title||"API Documentation"}get tryItEnabled(){return this.props.tryIt!==!1}get hasSecurity(){return this.props.authorize!==!1&&Object.keys(this.doc?.securityDefinitions||{}).length>0}get languages(){let e=this.props.languages;return e?.length?vo.filter(n=>e.includes(n.id)):vo}get currentLanguage(){return this.languages.find(e=>e.id===this.state.lang)||this.languages[0]}get op(){return this.state.current==="introduction"?null:this.doc.findOperation(this.state.current)}get draft(){return this.state.drafts[this.state.current]}get showTryIt(){return this.tryItEnabled&&!!this.op}get sidebarGroups(){let e=this.doc.groups.filter(n=>!n.parent);return this.doc.webhooks.length&&e.push({id:"webhooks",name:"Webhooks",items:this.doc.webhooks,kind:""}),e}get breadcrumb(){let e=this.op;if(!e)return[{label:"Home",id:"introduction",home:!0},{label:"Introduction"}];let n=this.doc.groups.find(r=>r.name===e.tag);return[{label:"Home",id:"introduction",home:!0},{label:this.title,id:"introduction"},{label:e.tag,id:n?n.items[0].id:"introduction"},{label:e.summary}]}get authSchemes(){return Object.entries(this.doc.securityDefinitions).map(([e,n])=>({key:e,def:n,scopes:Object.entries(n.scopes||{})}))}get serverOptions(){return this.doc.servers.length?this.doc.servers:[{url:this.doc.baseUrl,name:"",description:""}]}get tryItParams(){let{path:e,query:n,header:r}=this.op.parameters;return[...e.map(c=>({...c,group:"path"})),...n.map(c=>({...c,group:"query"})),...r.map(c=>({...c,group:"header"}))]}get selectedBaseUrl(){return this.draft?.baseUrl||this.doc.baseUrl}methodLabel(e){return te(e)}statusClass(e){return Zt(e)}formatExample(e){return bt(e)}serverLabel(e){let n=[e.name,e.description].filter(Boolean).join(" \u2014 ");return n?`${n} (${e.url})`:e.url}languageTone(e){return nr.includes(e)?e:"default"}encodingEntries(e){return Object.entries(e)}oauthFlowLabel(e){return _t[e]||e||"unknown"}schemaRows(e){return this.rowsCache.has(e)||this.rowsCache.set(e,this.doc.schemaRows(e)),this.rowsCache.get(e)}depth(e){return(e.match(/\./g)||[]).length}lineNumbers(e){return String(e||"").split(`
27
+ `).map((n,r)=>r+1)}iconUrl(e){let n=this.props.assetBase??this.assetBase??(this.assetBase=cr());return n?`${n.replace(/\/$/,"")}/${e.icon}`:""}href(e){return this.props.hash?`#/${e}`:"#"}shouldReload(e){return e.src!==this.props.src||e.spec!==this.props.spec||e.serverUrl!==this.props.serverUrl}async load(e){this.state.status="loading";try{this.doc=e.spec?Uo(e.spec,e.serverUrl):await ht(e.src,e.serverUrl)}catch(n){this.state.status="error",this.state.error=n.message||String(n),e.onError?.(n);return}this.state.drafts={},this.state.current=this.routeId(e),this.ensureDraft(),this.state.status="ready",this.updateSnippet(),e.onLoad?.(this.doc)}routeId(e=this.props){let n=e.hash?location.hash.replace(/^#\//,""):e.operation;return n&&this.doc.findOperation(n)?n:"introduction"}go(e,n){this.props.hash||(e.preventDefault(),this.setCurrent(n)),this.overlayQuery.matches&&(this.state.sidebarOpen=!1)}setCurrent(e){let n=this.state;n.current=e,n.result=null,n.respTab=0,n.respView={},this.ensureDraft(),this.updateSnippet(),this.mainRef.el&&(this.mainRef.el.scrollTop=0),this.props.onNavigate?.(e)}ensureDraft(){let e=this.op;e&&!this.state.drafts[e.id]&&(this.state.drafts[e.id]=Vt(e,this.doc.baseUrl))}toggleSidebar(){this.state.sidebarOpen=!this.state.sidebarOpen}closeSidebarOnOutsideClick(e){!this.overlayQuery.matches||!this.state.sidebarOpen||e.target.closest?.(".sidebar-shell, .sidebar-toggle")||(this.state.sidebarOpen=!1)}selectResponse(e){this.state.respTab=Number(e)}setResponseView(e,n){this.state.respView[e]=n}setLanguage(e){this.state.lang=e,this.updateSnippet()}onBaseUrl(e){this.draft.baseUrl=e,this.updateSnippet()}onParam(e,n,r){this.draft[n][r]=e,this.updateSnippet()}onBody(e){this.draft.bodyText=e,this.updateSnippet()}async updateSnippet(){let e=this.op;if(!e||!this.tryItEnabled)return;let n=this.currentLanguage;try{this.state.snippet=await It(n.id,wt(e,this.draft))}catch(r){this.state.snippet=`// Could not generate ${n.label} snippet: ${r.message}`}}async send(){let e=this.op,n=wt(e,this.draft),r=Gt(n),c={method:n.method,url:r.url,headerLines:r.headerLines,bodyText:n.bodyText};this.state.result={phase:"sending",sent:c};let a;try{a={phase:"done",sent:c,res:await Xt(n,r)}}catch(p){a={phase:"error",sent:c,message:p.message}}this.state.current===e.id&&(this.state.result=a)}clearResult(){this.state.result=null}collapseRequest(){this.rootRef.el.querySelectorAll(".tryit-card details").forEach((e,n)=>{n<3&&(e.open=!1)})}toggleTheme(){this.state.themeOverride=this.theme==="dark"?"light":"dark"}readSystemTheme(){let e=document.documentElement.getAttribute("data-bs-theme"),n=e?e==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches;this.state.systemTheme=n?"dark":"light"}openAuth(){var n;let e=this.state;e.stored.apikey=_("apikey"),e.stored.oauthkey=_("oauthkey"),e.inputs.apikey=e.stored.apikey,e.inputs.oauthkey=e.stored.oauthkey;for(let{key:r,def:c}of this.authSchemes)(n=e.oauth)[r]??(n[r]={clientId:"",clientSecret:"",username:"",password:"",scopes:Object.keys(c.scopes||{})});e.authOpen=!0}closeAuth(){this.state.authOpen=!1}setAuthOpen(e){this.state.authOpen=e}setAuthInput(e,n){this.state.inputs[e]=n}setField(e,n,r){e[n]=r}saveAuth(){Ao("apikey",this.state.inputs.apikey.trim()),Ao("oauthkey",this.state.inputs.oauthkey.trim()),this.closeAuth(),this.applyAuthToAll()}clearAuth(e){Ao(e,""),this.state.stored[e]="",this.state.inputs[e]="",this.applyAuthToAll()}applyAuthToAll(){for(let[e,n]of Object.entries(this.state.drafts))gt(this.doc.findOperation(e),n);this.state.authed=mt(),this.updateSnippet()}toggleScope(e,n){let r=this.state.oauth[e].scopes,c=r.indexOf(n);c<0?r.push(n):r.splice(c,1)}setOAuthStatus(e,n,r=!1){this.state.oauthStatus[e]={message:n,isError:r}}applyOAuthToken(e,n,r){Ao("oauthkey",n),this.state.stored.oauthkey=n,this.state.inputs.oauthkey=n,Object.assign(this.state.oauth[e],{clientId:r.clientId,clientSecret:r.clientSecret}),this.applyAuthToAll(),this.setOAuthStatus(e,"Token acquired.")}async fetchToken(e,n,r){try{let c=await Yt(this.doc.securityDefinitions[e].tokenUrl,n,this.selectedBaseUrl,this.doc);this.applyOAuthToken(e,c,r)}catch(c){this.setOAuthStatus(e,`Token request failed: ${c.message}. This is usually a CORS restriction on the auth server.`,!0)}}startOAuth2Flow(e){let n=this.doc.securityDefinitions[e],r=this.state.oauth[e],c=[...r.scopes];if(n.flow==="implicit"||n.flow==="accessCode")return this.openOAuthPopup(e,n,r,c);if(n.flow==="password"||n.flow==="application")return this.setOAuthStatus(e,"Requesting token\u2026"),this.fetchToken(e,oe(n.flow,r,c),r);this.setOAuthStatus(e,`Unsupported OAuth2 flow: ${n.flow}`,!0)}openOAuthPopup(e,n,r,c){if(!n.authorizationUrl)return this.setOAuthStatus(e,"No authorizationUrl defined for this scheme.",!0);let a=Qt(),p=Jt({def:n,clientId:r.clientId,scopes:c,state:a,redirectUri:this.redirectUri,baseUrl:this.selectedBaseUrl,doc:this.doc}),l=window.open(p,`oauth2-authorize-${e}`,"width=560,height=680");if(!l)return this.setOAuthStatus(e,"Popup blocked \u2014 allow popups for this site and try again.",!0);this.pendingOAuth.set(a,{key:e,flow:n.flow,fields:{...r}}),this.setOAuthStatus(e,"Waiting for authorization in the popup\u2026"),this.watchPopup(l,a,e)}watchPopup(e,n,r){let c=setInterval(()=>{e.closed&&(clearInterval(c),this.watchers.delete(c),this.pendingOAuth.delete(n)&&this.setOAuthStatus(r,"Authorization window was closed before completing.",!0))},500);this.watchers.add(c)}get redirectUri(){return this.props.oauthRedirectUri||new URL("oauth2-redirect.html",document.baseURI).href}handleOAuthMessage(e){let n=e.data;if(e.origin!==window.location.origin||n?.source!=="oauth2-redirect")return;let r=this.pendingOAuth.get(n.state);if(!r)return;this.pendingOAuth.delete(n.state);let{key:c,flow:a,fields:p}=r;if(n.error)return this.setOAuthStatus(c,`Authorization failed: ${n.error}${n.errorDescription?" - "+n.errorDescription:""}`,!0);if(a==="implicit")return n.accessToken?this.applyOAuthToken(c,n.accessToken,p):this.setOAuthStatus(c,"Authorization server did not return an access token.",!0);if(!n.code)return this.setOAuthStatus(c,"Authorization server did not return a code.",!0);this.setOAuthStatus(c,"Exchanging code for token\u2026"),this.fetchToken(c,{grant_type:"authorization_code",code:n.code,redirect_uri:this.redirectUri,client_id:p.clientId,client_secret:p.clientSecret},p)}addListeners(){this.readSystemTheme(),this.themeObserver=new MutationObserver(this.onThemeChange),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-bs-theme"]}),window.addEventListener("hashchange",this.onHashChange),window.addEventListener("message",this.onOAuthMessage),document.addEventListener("click",this.onDocumentClick),this.overlayQuery.addEventListener("change",this.onViewportChange)}removeListeners(){this.themeObserver?.disconnect(),window.removeEventListener("hashchange",this.onHashChange),window.removeEventListener("message",this.onOAuthMessage),document.removeEventListener("click",this.onDocumentClick),this.overlayQuery.removeEventListener("change",this.onViewportChange),this.watchers.forEach(clearInterval)}};i(N,"template","baseui.ApiDoc"),i(N,"components",{ApiDocGroup:V,Markdown:z,Badge:D,Breadcrumb:po,BreadcrumbItem:uo,BreadcrumbLink:xo,BreadcrumbList:lo,BreadcrumbPage:ho,BreadcrumbSeparator:W,Button:O,Checkbox:X,Dialog:Z,DialogContent:$,DialogDescription:Y,DialogFooter:Q,DialogHeader:K,DialogTitle:J,Icon:q,Input:eo,NativeSelect:no,TabContent:io,Tabs:co,TabsContainer:so,TabsList:ao,TabTrigger:j,Textarea:ro}),i(N,"props",{src:s(String),spec:s(Object),title:s(String),serverUrl:s(String),theme:s(String),themeToggle:s(Boolean),hash:s(Boolean),operation:s(String),tryIt:s(Boolean),authorize:s(Boolean),languages:s(Array),language:s(String),assetBase:s(String),oauthRedirectUri:s(String),height:s(String),onLoad:s(Function),onError:s(Function),onNavigate:s(Function),className:s(String),style:s([String,Object])});var sr=`<templates>
28
28
  <t t-name="baseui.ApiDoc">
29
29
  <div t-ref="root" t-att-class="classNames" t-att-style="rootStyle" t-att-data-theme="theme" t-att-data-bs-theme="theme" data-slot="apidoc" t-att-data-status="state.status">
30
30
  <header class="app-header">
@@ -747,14 +747,22 @@ var BaseUIApiDoc=(()=>{var tr=Object.create;var mt=Object.defineProperty;var er=
747
747
  ></span>
748
748
  </t>
749
749
  <t t-name="Icon" t-call="baseui.Icon"/>
750
- <t t-name="baseui.Outlined">
750
+ <t t-name="baseui.Outlined.label">
751
+ <div t-if="label" class="bu-input-label">
752
+ <span class="bu-input-label-text" t-esc="label"/>
753
+ <Tooltip t-if="tipText" content="tipText" className="'bu-input-tip'"><t t-set-slot="trigger"><IconCircleQuestionMark/></t></Tooltip>
754
+ </div>
755
+ </t>
756
+ <t t-name="baseui.Outlined">
751
757
  <div t-if="isOutlined" t-att-class="outlinedClassNames" t-att-style="labelStyle">
752
- <div class="bu-input-box">
758
+ <div class="bu-input-box" t-ref="box">
753
759
  <Icon t-if="leadingIcon" name="leadingIcon" className="'bu-input-icon bu-input-leading'"/>
754
760
  <t t-out="0"/>
755
- <span class="bu-input-label" t-esc="label"/>
761
+ <t t-call="baseui.Outlined.label"/>
756
762
  <Icon t-if="trailingIcon" name="trailingIcon" className="'bu-input-icon bu-input-trailing'"/>
757
- <Tooltip t-if="tipText" content="tipText" className="'bu-input-tip'"><t t-set-slot="trigger"><Icon name="'info'"/></t></Tooltip>
763
+ <div t-if="hasStart" class="bu-input-slot bu-input-slot-start" t-ref="start"><t t-slot="start"/></div>
764
+ <div t-if="hasEnd" class="bu-input-slot bu-input-slot-end" t-ref="end"><t t-slot="end"/></div>
765
+ <div t-if="hasFooter" class="bu-input-slot bu-input-slot-footer" t-ref="footer"><t t-slot="footer"/></div>
758
766
  </div>
759
767
  <div t-if="supportingText or props.maxLength" class="bu-input-support">
760
768
  <span t-att-id="supportId" t-esc="supportingText"/>
@@ -947,5 +955,5 @@ var BaseUIApiDoc=(()=>{var tr=Object.create;var mt=Object.defineProperty;var er=
947
955
  </span>
948
956
  </t>
949
957
  <t t-name="BreadcrumbEllipsis" t-call="baseui.BreadcrumbEllipsis"/>
950
- </templates>`;function ns(t,e={}){let r=typeof t=="string"?document.querySelector(t):t;return Tt(_,r,{templates:rs,props:e})}return ar(ss);})();
958
+ </templates>`;function ar(t,e={}){let n=typeof t=="string"?document.querySelector(t):t;return Po(N,n,{templates:sr,props:e})}return le(ir);})();
951
959
  window.thebase=window.thebase||{};window.thebase.apidoc=BaseUIApiDoc;