@thebase/ui 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -260
- package/LICENSE +1 -1
- package/README.md +98 -93
- package/bin/{create-baseui-app.mjs → create-nodexui-app.mjs} +65 -65
- package/dist/{baseui.apidoc.esm.js → nodexui.apidoc.esm.js} +136 -136
- package/dist/{baseui.apidoc.min.js → nodexui.apidoc.min.js} +137 -137
- package/dist/nodexui.esm.js +58 -0
- package/dist/nodexui.i18n.esm.js +2 -0
- package/dist/nodexui.i18n.min.js +2 -0
- package/dist/nodexui.icons.esm.js +1 -0
- package/dist/{baseui.min.css → nodexui.min.css} +1 -1
- package/dist/nodexui.min.js +77 -0
- package/dist/{baseui.pwa.esm.js → nodexui.pwa.esm.js} +5 -5
- package/dist/{baseui.registry.json → nodexui.registry.json} +162 -162
- package/dist/{baseui.templates.xml → nodexui.templates.xml} +573 -573
- package/dist/{baseui.vite.esm.js → nodexui.vite.esm.js} +6 -6
- package/dist/runtime/mermaid/mermaid.esm.min.mjs +2 -2
- package/dist/runtime/milkdown/milkdown-editor.js +1 -1
- package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
- package/dist/themes/{baseui-dark.css → nodexui-dark.css} +2 -2
- package/dist/themes/{baseui-light.css → nodexui-light.css} +2 -2
- package/dist/types/analytics.d.ts +12 -12
- package/dist/types/apidoc.d.ts +1 -1
- package/dist/types/i18n.d.ts +25 -0
- package/dist/types/index.d.ts +16 -14
- package/dist/types/vite.d.ts +2 -2
- package/docs/analytics.md +12 -12
- package/docs/base-ui-skill.md +4 -4
- package/docs/blocks.md +6 -6
- package/docs/components/accordion.md +4 -4
- package/docs/components/alert-dialog.md +2 -2
- package/docs/components/alert.md +5 -5
- package/docs/components/apidoc.md +14 -14
- package/docs/components/aspect-ratio.md +2 -2
- package/docs/components/attachment.md +5 -5
- package/docs/components/avatar.md +7 -7
- package/docs/components/badge.md +2 -2
- package/docs/components/block-viewer.md +8 -8
- package/docs/components/breadcrumb.md +3 -3
- package/docs/components/bubble.md +2 -2
- package/docs/components/button-group.md +2 -2
- package/docs/components/button.md +2 -2
- package/docs/components/calendar.md +7 -7
- package/docs/components/card.md +2 -2
- package/docs/components/carousel.md +9 -9
- package/docs/components/chart.md +7 -7
- package/docs/components/checkbox.md +2 -2
- package/docs/components/clipboard-button.md +7 -7
- package/docs/components/code-editor.md +1 -1
- package/docs/components/collapsible.md +4 -4
- package/docs/components/combobox.md +7 -7
- package/docs/components/command.md +7 -7
- package/docs/components/context-menu.md +7 -7
- package/docs/components/data-table.md +9 -9
- package/docs/components/date-picker.md +7 -7
- package/docs/components/dialog.md +5 -5
- package/docs/components/direction.md +2 -2
- package/docs/components/drawer.md +4 -4
- package/docs/components/dropdown-menu.md +3 -3
- package/docs/components/empty.md +3 -3
- package/docs/components/field.md +1 -1
- package/docs/components/form.md +3 -3
- package/docs/components/hover-card.md +2 -2
- package/docs/components/icon.md +3 -3
- package/docs/components/input-otp.md +7 -7
- package/docs/components/input.md +6 -6
- package/docs/components/item.md +3 -3
- package/docs/components/kbd.md +2 -2
- package/docs/components/label.md +2 -2
- package/docs/components/markdown.md +13 -13
- package/docs/components/marker.md +2 -2
- package/docs/components/menubar.md +2 -2
- package/docs/components/message-scroller.md +7 -7
- package/docs/components/message.md +7 -7
- package/docs/components/native-select.md +3 -3
- package/docs/components/navigation-menu.md +3 -3
- package/docs/components/pagination.md +3 -3
- package/docs/components/popover.md +10 -10
- package/docs/components/progress.md +2 -2
- package/docs/components/pwa.md +4 -4
- package/docs/components/questionnaire.md +7 -7
- package/docs/components/radio-group.md +2 -2
- package/docs/components/resizable.md +7 -7
- package/docs/components/scroll-area.md +7 -7
- package/docs/components/select.md +2 -2
- package/docs/components/separator.md +2 -2
- package/docs/components/sheet.md +3 -3
- package/docs/components/shell.md +7 -7
- package/docs/components/sidebar.md +3 -3
- package/docs/components/skeleton.md +2 -2
- package/docs/components/slider.md +2 -2
- package/docs/components/spinner.md +4 -4
- package/docs/components/switch.md +2 -2
- package/docs/components/table.md +2 -2
- package/docs/components/tabs.md +6 -6
- package/docs/components/text-editor.md +6 -6
- package/docs/components/textarea.md +3 -3
- package/docs/components/theme-button.md +6 -6
- package/docs/components/toast.md +6 -6
- package/docs/components/toggle-group.md +7 -7
- package/docs/components/toggle.md +7 -7
- package/docs/components/tooltip.md +9 -9
- package/docs/components/typography.md +9 -9
- package/docs/i18n.md +119 -0
- package/docs/icons.md +9 -9
- package/docs/installation.md +31 -32
- package/docs/owl-components.md +36 -38
- package/docs/registry.md +14 -13
- package/docs/runtime-api.md +14 -12
- package/docs/theming.md +15 -15
- package/docs/usage-guide.md +54 -56
- package/package.json +51 -35
- package/dist/baseui.esm.js +0 -58
- package/dist/baseui.icons.esm.js +0 -1
- package/dist/baseui.min.js +0 -77
- /package/dist/{baseui.analytics.esm.js → nodexui.analytics.esm.js} +0 -0
- /package/dist/{baseui.analytics.min.js → nodexui.analytics.min.js} +0 -0
- /package/dist/themes/{baseui-dark.min.css → nodexui-dark.min.css} +0 -0
- /package/dist/themes/{baseui-light.min.css → nodexui-light.min.css} +0 -0
|
@@ -1,31 +1,31 @@
|
|
|
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)):([["&","&"],["<","<"],[">",">"],["'","'"],['"',"""],["`","`"]].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 fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jt=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(s){throw r=[s],s}};var or=(t,e)=>{for(var r in e)fe(t,r,{get:e[r],enumerable:!0})};var a=(t,e,r)=>nr(t,typeof e!="symbol"?e+"":e,r);function gs(t,e,r){let s=String(t||"").trim();if(!s)return"";let n=s.replace(/\{([^}]+)\}/g,(i,c)=>{let l=r&&typeof r=="object"?r[c]:null;return l&&l.default!==void 0?String(l.default):`{${c}}`});try{return new URL(n,`${e}/`).href.replace(/\/$/,"")}catch{return n.replace(/\/$/,"")}}function E(t,e){if(t&&typeof t=="object"&&typeof t.$ref=="string"){let r=t.$ref.replace(/^#\//,"").split("/"),s=e;for(let n of r)s=s?.[decodeURIComponent(n.replace(/~1/g,"/").replace(/~0/g,"~"))];return s?{...s}:{}}return t}function pe(t,e){if(!Array.isArray(t?.allOf))return t;let r={...t,properties:{...t.properties},required:[...t.required||[]]};delete r.allOf;for(let s of t.allOf){let n=pe(E(s,e),e)||{};Object.assign(r.properties,n.properties),r.required.push(...n.required||[]),r.type||(r.type=n.type)}return r}function ys(t,e){if(!t)return null;let r=E(t,e);return!r||typeof r!="object"?null:r}function ue(t){return t&&typeof t.$ref=="string"?t.$ref.split("/").pop():null}function We(t,e){if(!t||typeof t!="object")return null;for(let[r,s]of Object.entries(t)){let n=ys(s,e);if(n){if(n.dataValue!==void 0)return{key:r,label:n.summary||r,value:n.dataValue,isAuto:!1};if(n.serializedValue!==void 0)return{key:r,label:n.summary||r,value:n.serializedValue,isAuto:!1};if(n.value!==void 0)return{key:r,label:n.summary||r,value:n.value,isAuto:!1};if(n.externalValue)return{key:r,label:n.summary||r,value:n.externalValue,isAuto:!1}}}return null}function de(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 ae(t,e){if(!t)return null;let r=We(t.examples,e);if(r)return r;if(t.example!==void 0)return{label:"media example",value:t.example,isAuto:!1};let s=E(t.schema,e),n=de(s);return n!==void 0?{label:"schema example",value:n,isAuto:!1}:null}function Ve(t,e){let r=We(t.examples,e);if(r)return r;if(t.example!==void 0)return{label:"example",value:t.example,isAuto:!1};let s=E(t.schema,e),n=de(s);return n!==void 0?{label:"schema example",value:n,isAuto:!1}:null}function ht(t,e,r=new Set){if(!t)return null;let s=ue(t);if(s){if(r.has(s))return{};r=new Set(r).add(s)}let n=pe(E(t,e),e);if(!n)return null;let i=de(n);if(i!==void 0)return i;if(n.type==="array"||n.items)return[ht(n.items||{},e,r)];if(n.properties||n.type==="object"){let c={};for(let[l,p]of Object.entries(n.properties||{}))c[l]=ht(p,e,r);return c}switch(n.type){case"integer":return n.minimum??0;case"number":return n.minimum??0;case"boolean":return!0;case"string":return n.format==="date-time"?new Date().toISOString():n.format==="date"?new Date().toISOString().slice(0,10):n.format==="byte"?"base64==":n.title||"string";default:return null}}function vt(t,e,{depth:r=0,prefix:s="",seen:n=new Set,required:i=!1,selfRow:c=!0}={}){if(!t||r>4)return[];let l=ue(t);if(l){if(n.has(l))return[];n=new Set(n).add(l)}let p=pe(E(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 c&&f.push({path:s||"items",type:"tuple",required:i,description:p.description||""}),p.prefixItems.forEach((x,A)=>{f.push(...vt(x,e,{depth:r+1,prefix:`${s}[${A}]`,seen:n,required:!1}))}),p.items&&f.push(...vt(p.items,e,{depth:r+1,prefix:`${s}[n]`,seen:n,required:!1})),f;if(p.type==="array"||p.items)return c&&f.push({path:s||"items",type:"array",required:i,description:p.description||""}),f.push(...vt(p.items||{},e,{depth:r+1,prefix:`${s}[]`,seen:n,required:!1})),f;if(p.properties||p.type==="object"||p.patternProperties){let x=new Set(p.required||[]);for(let[A,u]of Object.entries(p.properties||{})){let w=E(u,e),k=s?`${s}.${A}`:A;f.push({path:k,type:w.type||(w.$ref?ue(u):"any")||"any",format:w.format||"",enum:w.enum,required:x.has(A),description:w.description||""}),(w.type==="object"||w.properties||w.type==="array"||w.items)&&f.push(...vt(u,e,{depth:r+1,prefix:k,seen:n,required:x.has(A),selfRow:!1}))}for(let[A,u]of Object.entries(p.patternProperties||{})){let w=E(u,e);f.push({path:s?`${s}.<${A}>`:`<${A}>`,type:w.type||"any",format:w.format||"",required:!1,description:w.description||""})}return f}return f.push({path:s||"value",type:p.type||"any",format:p.format||"",enum:p.enum,required:i,description:[p.description,y,S].filter(Boolean).join(" \u2014 ")}),f}function ws(t){let e=Ve(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:""}}function xs(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:Ss[e]||e,scopes:r?.scopes||{}}}function Ze(t){let e=t.securityDefinitions||t.components?.securitySchemes||{};return Object.fromEntries(Object.entries(e).map(([r,s])=>[r,xs(E(s,t))]))}function vs(t,e){let r=Ze(e),s=t.security||e.security||[],n=[];for(let i of s)for(let c of Object.keys(i)){let l=r[c];l&&n.push({key:c,...l})}return n}function ce(t,e,r,s){let n={path:[],query:[],header:[],formData:[],body:null};for(let f of s.parameters||[]){let y=E(f,t);if(y.in==="body"){let S={schema:y.schema},x=ae(S,t);n.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 n[y.in]&&n[y.in].push(ws.call(t,y))}if(s.requestBody){let f=E(s.requestBody,t)||{},[y,S]=Object.entries(f.content||{})[0]||[];if(y&&S){let x=ae(S,t);n.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(s.responses||{}).map(([f,y])=>{let S=E(y,t)||{},[x,A]=Object.entries(S.content||{})[0]||[],u=A?ae(A,t):null;return{status:f,summary:S.summary||"",description:S.description||"",contentType:x||"application/json",schema:A?.schema||S.schema||null,encoding:A?.encoding||null,headers:As(S.headers,t),links:Es(S.links,t),example:u?u.value:A?.schema?ht(A.schema,t):null,exampleLabel:u?u.label:"auto",exampleIsAuto:!u&&!!A?.schema}}).sort((f,y)=>{let S=Fe(f.status),x=Fe(y.status);return S-x}),c=Cs(s.callbacks,t),l=r.toUpperCase();return{id:(s.operationId||`${r}-${e}`).replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),method:l,path:e,tag:s.tags&&s.tags[0]||"default",summary:s.summary||s.operationId||`${l} ${e}`,description:s.description||"",deprecated:!!s.deprecated,produces:s.produces||t.produces||["application/json"],consumes:s.consumes||t.consumes||(n.body?["application/json"]:[]),parameters:n,responses:i,callbacks:c,externalDocs:s.externalDocs||null,security:vs(s,t)}}function As(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([r,s])=>{let n=E(s,e)||{},i=Ve({...n,in:"header"},e);return{name:r,required:!!n.required,deprecated:!!n.deprecated,type:n.schema?.type||"string",description:n.description||"",example:i?i.value:void 0}})}function Es(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([r,s])=>{let n=E(s,e)||{};return{name:r,operationId:n.operationId||"",operationRef:n.operationRef||"",description:n.description||"",parameters:n.parameters||{}}})}function Cs(t,e){if(!t||typeof t!="object")return[];let r=[];for(let[s,n]of Object.entries(t)){let i=E(n,e)||{};for(let[c,l]of Object.entries(i)){let p=E(l,e)||{};for(let f of le)p[f]&&r.push({name:s,expression:c,method:f.toUpperCase(),summary:p[f].summary||"",description:p[f].description||""})}}return r}function Fe(t){if(t==="default")return 999;let e=parseInt(t,10);return Number.isNaN(e)?998:e}async function Ge(t,e=""){let r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch spec: HTTP ${r.status}`);return he(await r.json(),e)}function he(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",s=t.host||location.host,n=t.basePath||"",i=`${r}://${s}${n}`.replace(/\/$/,""),c=e?[{name:"",url:e.replace(/\/$/,""),description:""}]:Array.isArray(t.servers)&&t.servers.length?t.servers.map(u=>({name:u?.name||"",url:gs(u?.url,i,u?.variables),description:String(u?.description||"").trim()})).filter(u=>u.url):[{name:"",url:i,description:""}],l=c[0]?.url||i,p=(t.tags||[]).map(u=>u.name),f=new Map((t.tags||[]).map(u=>[u.name,u])),y=[];for(let[u,w]of Object.entries(t.paths||{})){let k=E(w,t)||{};for(let R of le)k[R]&&y.push(ce(t,u,R,k[R]));for(let[R,sr]of Object.entries(k.additionalOperations||{}))y.push(ce(t,u,R.toLowerCase(),sr))}let S=[];for(let[u,w]of Object.entries(t.webhooks||{})){let k=E(w,t)||{};for(let R of le)k[R]&&S.push(ce(t,u,R,k[R]))}let A=[...new Set([...p,...y.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:y.filter(k=>k.tag===u)}}).filter(u=>u.items.length);return{spec:t,info:t.info||{},baseUrl:l,derivedBaseUrl:i,servers:c,securityDefinitions:Ze(t),groups:A,webhooks:S,resolveRef:u=>E(u,t),generateExample:u=>ht(u,t),schemaRows:u=>vt(u,t),findOperation:u=>y.find(w=>w.id===u)||S.find(w=>w.id===u),firstOperation:()=>y[0]}}var le,Ss,Ke=jt(()=>{le=["get","post","put","patch","delete","options","head","trace","query"];Ss={authorizationCode:"accessCode",implicit:"implicit",password:"password",clientCredentials:"application"}});function Ts(t){let e=new URL(t.url);return(t.query||[]).forEach(([r,s])=>{r&&e.searchParams.set(r,String(s||""))}),e.toString()}function Os(t,e){let r=[];return(t.headers||[]).forEach(([n,i])=>{n&&r.push([n,String(i??"")])}),e&&t.bodyText&&!Ns(r,"Content-Type")&&r.push(["Content-Type",t.mimeType||"application/json"]),r}function Ns(t,e){let r=e.toLowerCase();return t.some(function(s){return String(s[0]||"").toLowerCase()===r})}function ks(t,e){return String(t||"").split(`
|
|
4
|
+
var fe=Object.defineProperty;var or=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jt=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var sr=(t,e)=>{for(var r in e)fe(t,r,{get:e[r],enumerable:!0})};var a=(t,e,r)=>or(t,typeof e!="symbol"?e+"":e,r);function yn(t,e,r){let n=String(t||"").trim();if(!n)return"";let o=n.replace(/\{([^}]+)\}/g,(i,c)=>{let l=r&&typeof r=="object"?r[c]:null;return l&&l.default!==void 0?String(l.default):`{${c}}`});try{return new URL(o,`${e}/`).href.replace(/\/$/,"")}catch{return o.replace(/\/$/,"")}}function E(t,e){if(t&&typeof t=="object"&&typeof t.$ref=="string"){let r=t.$ref.replace(/^#\//,"").split("/"),n=e;for(let o of r)n=n?.[decodeURIComponent(o.replace(/~1/g,"/").replace(/~0/g,"~"))];return n?{...n}:{}}return t}function pe(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 o=pe(E(n,e),e)||{};Object.assign(r.properties,o.properties),r.required.push(...o.required||[]),r.type||(r.type=o.type)}return r}function xn(t,e){if(!t)return null;let r=E(t,e);return!r||typeof r!="object"?null:r}function ue(t){return t&&typeof t.$ref=="string"?t.$ref.split("/").pop():null}function We(t,e){if(!t||typeof t!="object")return null;for(let[r,n]of Object.entries(t)){let o=xn(n,e);if(o){if(o.dataValue!==void 0)return{key:r,label:o.summary||r,value:o.dataValue,isAuto:!1};if(o.serializedValue!==void 0)return{key:r,label:o.summary||r,value:o.serializedValue,isAuto:!1};if(o.value!==void 0)return{key:r,label:o.summary||r,value:o.value,isAuto:!1};if(o.externalValue)return{key:r,label:o.summary||r,value:o.externalValue,isAuto:!1}}}return null}function de(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 ae(t,e){if(!t)return null;let r=We(t.examples,e);if(r)return r;if(t.example!==void 0)return{label:"media example",value:t.example,isAuto:!1};let n=E(t.schema,e),o=de(n);return o!==void 0?{label:"schema example",value:o,isAuto:!1}:null}function Ve(t,e){let r=We(t.examples,e);if(r)return r;if(t.example!==void 0)return{label:"example",value:t.example,isAuto:!1};let n=E(t.schema,e),o=de(n);return o!==void 0?{label:"schema example",value:o,isAuto:!1}:null}function ht(t,e,r=new Set){if(!t)return null;let n=ue(t);if(n){if(r.has(n))return{};r=new Set(r).add(n)}let o=pe(E(t,e),e);if(!o)return null;let i=de(o);if(i!==void 0)return i;if(o.type==="array"||o.items)return[ht(o.items||{},e,r)];if(o.properties||o.type==="object"){let c={};for(let[l,p]of Object.entries(o.properties||{}))c[l]=ht(p,e,r);return c}switch(o.type){case"integer":return o.minimum??0;case"number":return o.minimum??0;case"boolean":return!0;case"string":return o.format==="date-time"?new Date().toISOString():o.format==="date"?new Date().toISOString().slice(0,10):o.format==="byte"?"base64==":o.title||"string";default:return null}}function vt(t,e,{depth:r=0,prefix:n="",seen:o=new Set,required:i=!1,selfRow:c=!0}={}){if(!t||r>4)return[];let l=ue(t);if(l){if(o.has(l))return[];o=new Set(o).add(l)}let p=pe(E(t,e),e),f=[],y=p.contentMediaType||p.contentEncoding?[p.contentMediaType,p.contentEncoding&&`encoding:${p.contentEncoding}`].filter(Boolean).join(", "):"",w=p.discriminator?.propertyName?`discriminator: ${p.discriminator.propertyName}`:"";if(Array.isArray(p.prefixItems))return c&&f.push({path:n||"items",type:"tuple",required:i,description:p.description||""}),p.prefixItems.forEach((S,A)=>{f.push(...vt(S,e,{depth:r+1,prefix:`${n}[${A}]`,seen:o,required:!1}))}),p.items&&f.push(...vt(p.items,e,{depth:r+1,prefix:`${n}[n]`,seen:o,required:!1})),f;if(p.type==="array"||p.items)return c&&f.push({path:n||"items",type:"array",required:i,description:p.description||""}),f.push(...vt(p.items||{},e,{depth:r+1,prefix:`${n}[]`,seen:o,required:!1})),f;if(p.properties||p.type==="object"||p.patternProperties){let S=new Set(p.required||[]);for(let[A,u]of Object.entries(p.properties||{})){let x=E(u,e),k=n?`${n}.${A}`:A;f.push({path:k,type:x.type||(x.$ref?ue(u):"any")||"any",format:x.format||"",enum:x.enum,required:S.has(A),description:x.description||""}),(x.type==="object"||x.properties||x.type==="array"||x.items)&&f.push(...vt(u,e,{depth:r+1,prefix:k,seen:o,required:S.has(A),selfRow:!1}))}for(let[A,u]of Object.entries(p.patternProperties||{})){let x=E(u,e);f.push({path:n?`${n}.<${A}>`:`<${A}>`,type:x.type||"any",format:x.format||"",required:!1,description:x.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,w].filter(Boolean).join(" \u2014 ")}),f}function wn(t){let e=Ve(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:""}}function vn(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:Sn[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,vn(E(n,t))]))}function An(t,e){let r=Ze(e),n=t.security||e.security||[],o=[];for(let i of n)for(let c of Object.keys(i)){let l=r[c];l&&o.push({key:c,...l})}return o}function ce(t,e,r,n){let o={path:[],query:[],header:[],formData:[],body:null};for(let f of n.parameters||[]){let y=E(f,t);if(y.in==="body"){let w={schema:y.schema},S=ae(w,t);o.body={required:!!y.required,schema:y.schema,description:y.description||"",contentType:"application/json",example:S?S.value:ht(y.schema,t),exampleLabel:S?S.label:"auto",exampleIsAuto:!S}}else o[y.in]&&o[y.in].push(wn.call(t,y))}if(n.requestBody){let f=E(n.requestBody,t)||{},[y,w]=Object.entries(f.content||{})[0]||[];if(y&&w){let S=ae(w,t);o.body={required:!!f.required,schema:w.schema||null,description:f.description||"",contentType:y,encoding:w.encoding||null,itemSchema:w.itemSchema||null,example:S?S.value:ht(w.schema,t),exampleLabel:S?S.label:"auto",exampleIsAuto:!S}}}let i=Object.entries(n.responses||{}).map(([f,y])=>{let w=E(y,t)||{},[S,A]=Object.entries(w.content||{})[0]||[],u=A?ae(A,t):null;return{status:f,summary:w.summary||"",description:w.description||"",contentType:S||"application/json",schema:A?.schema||w.schema||null,encoding:A?.encoding||null,headers:En(w.headers,t),links:Cn(w.links,t),example:u?u.value:A?.schema?ht(A.schema,t):null,exampleLabel:u?u.label:"auto",exampleIsAuto:!u&&!!A?.schema}}).sort((f,y)=>{let w=Fe(f.status),S=Fe(y.status);return w-S}),c=Tn(n.callbacks,t),l=r.toUpperCase();return{id:(n.operationId||`${r}-${e}`).replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase(),method:l,path:e,tag:n.tags&&n.tags[0]||"default",summary:n.summary||n.operationId||`${l} ${e}`,description:n.description||"",deprecated:!!n.deprecated,produces:n.produces||t.produces||["application/json"],consumes:n.consumes||t.consumes||(o.body?["application/json"]:[]),parameters:o,responses:i,callbacks:c,externalDocs:n.externalDocs||null,security:An(n,t)}}function En(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([r,n])=>{let o=E(n,e)||{},i=Ve({...o,in:"header"},e);return{name:r,required:!!o.required,deprecated:!!o.deprecated,type:o.schema?.type||"string",description:o.description||"",example:i?i.value:void 0}})}function Cn(t,e){return!t||typeof t!="object"?[]:Object.entries(t).map(([r,n])=>{let o=E(n,e)||{};return{name:r,operationId:o.operationId||"",operationRef:o.operationRef||"",description:o.description||"",parameters:o.parameters||{}}})}function Tn(t,e){if(!t||typeof t!="object")return[];let r=[];for(let[n,o]of Object.entries(t)){let i=E(o,e)||{};for(let[c,l]of Object.entries(i)){let p=E(l,e)||{};for(let f of le)p[f]&&r.push({name:n,expression:c,method:f.toUpperCase(),summary:p[f].summary||"",description:p[f].description||""})}}return r}function Fe(t){if(t==="default")return 999;let e=parseInt(t,10);return Number.isNaN(e)?998:e}async function Ge(t,e=""){let r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch spec: HTTP ${r.status}`);return he(await r.json(),e)}function he(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,o=t.basePath||"",i=`${r}://${n}${o}`.replace(/\/$/,""),c=e?[{name:"",url:e.replace(/\/$/,""),description:""}]:Array.isArray(t.servers)&&t.servers.length?t.servers.map(u=>({name:u?.name||"",url:yn(u?.url,i,u?.variables),description:String(u?.description||"").trim()})).filter(u=>u.url):[{name:"",url:i,description:""}],l=c[0]?.url||i,p=(t.tags||[]).map(u=>u.name),f=new Map((t.tags||[]).map(u=>[u.name,u])),y=[];for(let[u,x]of Object.entries(t.paths||{})){let k=E(x,t)||{};for(let R of le)k[R]&&y.push(ce(t,u,R,k[R]));for(let[R,nr]of Object.entries(k.additionalOperations||{}))y.push(ce(t,u,R.toLowerCase(),nr))}let w=[];for(let[u,x]of Object.entries(t.webhooks||{})){let k=E(x,t)||{};for(let R of le)k[R]&&w.push(ce(t,u,R,k[R]))}let A=[...new Set([...p,...y.map(u=>u.tag)])].map(u=>{let x=f.get(u);return{id:u.replace(/[^a-zA-Z0-9]+/g,"-").toLowerCase(),name:u,summary:x?.summary||"",description:x?.description||"",parent:x?.parent||"",kind:x?.kind||"",items:y.filter(k=>k.tag===u)}}).filter(u=>u.items.length);return{spec:t,info:t.info||{},baseUrl:l,derivedBaseUrl:i,servers:c,securityDefinitions:Ze(t),groups:A,webhooks:w,resolveRef:u=>E(u,t),generateExample:u=>ht(u,t),schemaRows:u=>vt(u,t),findOperation:u=>y.find(x=>x.id===u)||w.find(x=>x.id===u),firstOperation:()=>y[0]}}var le,Sn,Ke=jt(()=>{le=["get","post","put","patch","delete","options","head","trace","query"];Sn={authorizationCode:"accessCode",implicit:"implicit",password:"password",clientCredentials:"application"}});function On(t){let e=new URL(t.url);return(t.query||[]).forEach(([r,n])=>{r&&e.searchParams.set(r,String(n||""))}),e.toString()}function Nn(t,e){let r=[];return(t.headers||[]).forEach(([o,i])=>{o&&r.push([o,String(i??"")])}),e&&t.bodyText&&!kn(r,"Content-Type")&&r.push(["Content-Type",t.mimeType||"application/json"]),r}function kn(t,e){let r=e.toLowerCase();return t.some(function(n){return String(n[0]||"").toLowerCase()===r})}function $n(t,e){return String(t||"").split(`
|
|
5
5
|
`).map(function(r){return e+r}).join(`
|
|
6
|
-
`)}function O(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function m(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function
|
|
7
|
-
`)}function
|
|
8
|
-
`)}function Qe(t,e,r){let
|
|
9
|
-
`)}function
|
|
10
|
-
`)}function
|
|
11
|
-
`)}function
|
|
12
|
-
`)}function
|
|
13
|
-
`)}function
|
|
14
|
-
`)}function
|
|
15
|
-
`)}function
|
|
16
|
-
`)}function
|
|
17
|
-
`)}function
|
|
18
|
-
`)}function
|
|
19
|
-
`)}function
|
|
20
|
-
`)}function
|
|
21
|
-
`)}function
|
|
22
|
-
`)}function
|
|
23
|
-
`)}async function Je(t,e){let r=me.find(function(i){return i.id===t});if(!r)throw new Error("Unknown language: "+t);let s=Os(e,!0),n=Ts(e);return Js[r.id](e,n,s)}var me,Js,Ye=jt(()=>{me=[{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"}];Js={curl:Ps,javascript:Qe,node:js,python:Bs,go:_s,java:Ms,csharp:zs,php:Hs,ruby:qs,c:Ds,swift:Fs,objc:Ws,kotlin:Vs,rust:Zs,powershell:Gs,dart:Ks,lua:Qs}});var Xe={};or(Xe,{LANGUAGES:()=>me,buildOpenApiDoc:()=>he,generateSnippet:()=>Je,loadOpenApiDoc:()=>Ge});var tr=jt(()=>{Ke();Ye()});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 ir=h.App,be=h.Component,ar=h.EventBus,cr=h.OwlError,lr=h.__info__,ur=h.batched,pr=h.blockDom,dr=h.htmlEscape,Bt=h.loadFile,hr=h.markRaw,_t=h.markup,ge=h.mount,mr=h.onError,N=h.onMounted,P=h.onPatched,fr=h.onRendered,mt=h.onWillDestroy,br=h.onWillPatch,gr=h.onWillRender,ft=h.onWillStart,j=h.onWillUnmount,L=h.onWillUpdateProps,yr=h.reactive,wr=h.status,Sr=h.toRaw,bt=h.useChildSubEnv,xr=h.useComponent,Mt=h.useEffect,vr=h.useEnv,Ar=h.useExternalListener,v=h.useRef,C=h.useState,Er=h.useSubEnv,Cr=h.validate,Tr=h.validateType,Or=h.whenReady,zt=h.xml;var At={};function Nr(t){let e=t.components;e?e!==At&&Object.getPrototypeOf(e)===Object.prototype&&Object.setPrototypeOf(e,At):t.components=Object.create(At)}var d=class extends be{constructor(...e){super(...e),Nr(this.constructor)}};function ye(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,r,s="",n="")=>`<${r}${kr(r,s)}${n}>`)}function kr(t,e){let r=/\st-(att|attf|model|on)([.\s=-]|$)/.test(e),s=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,(n,i,c,l,p)=>`${i}${c}=${l}${Ir(p)}${l}`);return s=s.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(n,i,c,l,p)=>Ur(t,i,c,l,p,s)),r?$r(s):s}function $r(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,r,s,n,i)=>s.startsWith("t-")||s==="t-props"||Lr(i)?e:`${r}${s}=${n}${Rr(i)}${n}`)}function Rr(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function Lr(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function Ir(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,r,s)=>`\${${r||s}}`)}\``}function Ur(t,e,r,s,n,i){let c=/^(Checkbox|Switch)$/.test(t),l=Pr(t,r),p=c?"checked":"value",f=new RegExp(`\\s${p}\\s*=`).test(i)?"":`${e}${p}=${s}${n}${s}`,y=new RegExp(`\\s${l}\\s*=`).test(i)?"":`${e}${l}=${s}${jr(n,r,c)}${s}`;return`${f}${y}`}function Pr(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea)$/.test(t)?"onInput":"onChange"}function jr(t,e,r){if(r)return`(value) => { ${t} = value; }`;let s="value";return e.includes(".trim")&&(s=`(typeof ${s} === 'string' ? ${s}.trim() : ${s})`),e.includes(".number")&&(s=`Number.isNaN(Number(${s})) ? ${s} : Number(${s})`),`(value) => { ${t} = ${s}; }`}function we(t,...e){return Array.isArray(t?.raw)?zt({raw:t.raw.map(ye)},...e):zt(t,...e)}function Et(t,e,r={}){let s=ye(r.templates);return t.components={...At,...t.components||{}},ge(t,e,s===r.templates?r:{...r,templates:s})}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 s=b(...r);s&&e.push(s)}else if(typeof r=="object")for(let[s,n]of Object.entries(r))n&&e.push(s)}return e.join(" ")}function o(t){return{type:t,optional:!0}}var g={className:o(String),style:o([String,Object]),slots:o(Object)};function I(t,e,r){return t[e]??(r?t[r]:void 0)}function Ct(t){return t===!0||t==="open"||t==="on"||t==="active"}function Tt(...t){let e=[];for(let r of t)if(r){if(typeof r=="string"){let s=r.trim().replace(/;$/,"");s&&e.push(s)}else if(typeof r=="object")for(let[s,n]of Object.entries(r)){if(n==null||n==="")continue;let i=s.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());e.push(`${i}:${n}`)}}return e.join(";")}function Ot(t){return t.state!==void 0?Ct(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function Ht(t){return t.state!==void 0||t.open!==void 0}var qt={primary:"b-badge-primary",secondary:"b-badge-secondary",success:"b-badge-success",warning:"b-badge-warning",danger:"b-badge-danger",info:"b-badge-info",muted:"b-badge-muted"};var B=class extends d{get classNames(){return b("badge",qt[this.props.variant]||qt.secondary,this.props.pill&&"rounded-pill",this.props.className)}};a(B,"template","baseui.Badge"),a(B,"props",{variant:o(String),pill:o(Boolean),label:o(String),...g});var Br="__BASEUI_VERSION__",Dt=new Map,gt=new WeakMap,Nt="[b-ui], [b-icon]",_r="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";function Mr(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function Ft(t,e,r={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:r}))}function zr(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function Hr(t,e){return e===document||e===t||e.contains(t)}function qr(t,e={}){return!e.allowBootstrapControl&&t.matches(_r)}var Wt=typeof window<"u"?window.thebase:void 0,V=Wt?.register?Wt:Object.assign(Wt||{},{version:Br,register(t,e){if(!t||!e)throw new Error("BaseUI.register requires a name and component definition.");return Dt.set(t,e),this},component(t){return Dt.get(t)},mount(t,e={}){let r=Mr(t);if(!r||qr(r,e))return null;let s=zr(r,e),n=Dt.get(s);if(!n)return null;let i=gt.get(r);if(i?.name===s)return i;i&&(i.destroy?.(),gt.delete(r),Ft(r,"baseui:destroyed",{name:i.name}));let c=n.mount?.(r,this,e)||{},l={name:s,element:r,destroy:c.destroy};return gt.set(r,l),Ft(r,"baseui:mounted",{name:s,instance:l}),l},mountAll(t=document){let e=t||document,r=[...e.querySelectorAll?.(Nt)||[]];return e instanceof Element&&e.matches(Nt)&&r.unshift(e),r.map(s=>this.mount(s)).filter(Boolean)},destroy(t=document){let e=t||document,r=[...e.querySelectorAll?.(Nt)||[]];e instanceof Element&&e.matches(Nt)&&r.unshift(e);for(let s of r){let n=gt.get(s);n&&Hr(s,e)&&(n.destroy?.(),gt.delete(s),Ft(s,"baseui:destroyed",{name:n.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,s]of Object.entries(t||{})){let n=r==="radius"||r==="--b-radius"?"--base-radius":r.startsWith("--")?r:`--b-${r}`;e.style.setProperty(n,s)}}}});typeof window<"u"&&(window.thebase=V,window.BaseUI=V);var Se="1.31.0",Dr=`https://cdn.jsdelivr.net/npm/lucide-static@${Se}/icons`,$t="file",Fr=/^[a-z0-9][a-z0-9-]*$/,Vt=new Map;function Wr(t){return typeof Image>"u"?Promise.resolve(!0):(Vt.has(t)||Vt.set(t,new Promise(e=>{let r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src=t})),Vt.get(t))}function kt(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function yt(t,e={}){let r=kt(t);if(!Fr.test(r))throw new Error(`BaseUI icon name is invalid: ${t}`);return`${String(e.baseUrl||V.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${r}.svg`}function Zt(t,e,r={}){let s=r.url||yt(e,r),n=r.label??t.getAttribute("aria-label")??"";t.classList.add("b-icon"),t.style.setProperty("--b-icon-url",`url("${s.replace(/"/g,"%22")}")`),(r.size||t.getAttribute("b-att-size"))&&t.style.setProperty("--b-icon-size",r.size||t.getAttribute("b-att-size")),n?(t.setAttribute("role","img"),t.setAttribute("aria-label",n)):t.setAttribute("aria-hidden","true");let i=r.fallback===!1?null:r.fallback||$t;return i&&!r.url&&kt(e)!==kt(i)&&Wr(s).then(c=>{if(c||!t.isConnected)return;let l=yt(i,r);t.style.setProperty("--b-icon-url",`url("${l.replace(/"/g,"%22")}")`)}),t}V.icons={...V.icons||{},lucide:{version:Se,cdnBaseUrl:Dr,normalizeName:kt,url:yt,render:Zt}};var wt={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},Rt={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 vn=["btn","b-button","b-clipboard-button",...Object.values(wt),...Object.values(Rt)];async function xe(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 s;try{s=document.execCommand("copy")}catch{s=!1}if(r.remove(),!s)throw new Error("BaseUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var Gt,Kt,Qt,Vr=0;function Zr(){return Gt??(Gt=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})),Gt}function Gr(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 Kr(){return Kt??(Kt=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),Kt}function Qr(){return Qt??(Qt=import("./runtime/milkdown/milkdown-editor.js")),Qt}async function ve(t,e={}){return(await Zr()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function Yt(t,e,r,s=""){t.classList.add("b-markdown-diagram-error"),t.replaceChildren();let n=document.createElement("p");if(n.className="b-markdown-diagram-error-message",n.textContent=`Unable to render ${e} diagram: ${r?.message||r}`,t.append(n),s){let i=document.createElement("pre"),c=document.createElement("code");c.textContent=s,i.append(c),t.append(i)}}async function Jr(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let r;try{r=await Kr()}catch(s){e.forEach(n=>{let i=n.closest("pre");i.replaceChildren(),i.className="b-markdown-diagram b-markdown-mermaid",Yt(i,"mermaid",s,n.textContent)});return}r.initialize({startOnLoad:!1,securityLevel:"strict",theme:Gr(t)});for(let s of e){let n=s.textContent,i=s.closest("pre");i.replaceChildren(),i.className="b-markdown-diagram b-markdown-mermaid";try{let{svg:c}=await r.render(`b-mermaid-${++Vr}`,n);i.innerHTML=c}catch(c){Yt(i,"mermaid",c,n)}}}function Yr(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="b-markdown-b-copy-toast",r.textContent=t,document.body.append(r),e.mountAll(r),r.addEventListener("baseui:close",()=>r.remove(),{once:!0})}function Xr(t){let e=document.createElement("div");e.className="b-markdown-b-code";let r=document.createElement("button");r.type="button",r.className="b-markdown-b-copy";let s=document.createElement("span");Zt(s,"copy",{label:"Copy code"}),r.append(s),r.addEventListener("click",async()=>{try{await xe(t),r.dispatchEvent(new CustomEvent("baseui:markdown-copy",{bubbles:!0,detail:{source:t}})),Yr("Copied to clipboard")}catch(c){r.dispatchEvent(new CustomEvent("baseui:markdown-copy-error",{bubbles:!0,detail:{error:c}}))}}),e.append(r);let n=document.createElement("pre"),i=document.createElement("code");i.className="b-markdown-b-code-lines";for(let c of t.replace(/\n$/,"").split(`
|
|
24
|
-
`)){let l=document.createElement("span");l.className="b-markdown-b-code-line",l.textContent=c,i.append(l)}return n.append(i),e.append(n),e}var Jt;function ts(){return Jt??(Jt=Bt("/dist/baseui.templates.xml")),Jt}var Xt=new WeakMap;function te(t){let e=Xt.get(t);if(e){Xt.delete(t);for(let r of e)try{r.destroy()}catch{}}}var es=/\bstate\.([A-Za-z_$][\w$]*)/g;function rs(t){return new Set([...t.matchAll(es)].map(e=>e[1]))}var ss=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,ns=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g;function os(t){let e=new Set;for(let r of t.matchAll(ss))e.add(r[1]);for(let r of t.matchAll(ns))e.add(r[2]);return e}function is(t){let e=we({raw:[t]}),r=rs(t);class s extends d{setup(){this.state=C(Object.fromEntries([...r].map(i=>[i,""])))}}a(s,"template",e);for(let n of os(t))s.prototype[n]=function(){};return s}function Ae(t){t.querySelector("[data-slot='dropdown-menu'], .b-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("b-markdown-b-preview-overlay")}async function as(t,e){let[r,s]=await Promise.all([ts(),is(e)]),n=await Et(s,t,{templates:r});return Ae(t),n}function cs(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,Ae(t),r.mountAll(t)}async function ls(t){te(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let r=new Set;for(let s of e){let n=s.textContent,i=s.closest("pre");i.replaceChildren(),i.className="b-markdown-live b-markdown-baseui";let c=document.createElement("div");c.className="b-markdown-b-preview",i.append(c,Xr(n));try{/<[A-Z]/.test(n)?r.add(await as(c,n)):cs(c,n)}catch(l){Yt(i,"BaseUI component",l,n)}}r.size&&Xt.set(t,r)}function us(t){for(let e of t.querySelectorAll("li > input[type=checkbox]:not([aria-label])"))e.setAttribute("aria-label",e.parentElement.textContent.trim())}async function Ee(t,{mermaid:e=!0,baseUi:r=!0}={}){us(t),e&&await Jr(t),r&&await ls(t)}async function Ce(t){return(await Qr()).createMilkdownMarkdownEditor(t)}function Oe(t){let e=String(t??""),r=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e);if(!r)return{data:{},content:e};let s={};for(let n of r[1].split(/\r?\n/)){let i=n.trim();if(!i||i.startsWith("#"))continue;let c=i.indexOf(":");if(c===-1)continue;let l=i.slice(0,c).trim();l&&(s[l]=ps(i.slice(c+1).trim()))}return{data:s,content:e.slice(r[0].length)}}function Te(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function ps(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=>Te(r.trim())):[]}return Te(t)}var _=class extends d{setup(){this.rootRef=v("root"),this.editorRef=v("editor"),this.editorHandle=null,this.state=C({html:"",source:"",status:"loading",error:"",frontmatter:{}}),ft(()=>this.load(this.props)),L(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),N(()=>this.afterRender()),P(()=>this.afterRender()),mt(()=>{this.destroyEditor(),this.rootRef.el&&te(this.rootRef.el)})}get classNames(){return b("b-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 s=await fetch(e.src);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);r=await s.text()}catch(s){this.state.status="error",this.state.error=s.message||String(s);return}try{this.state.source=r;let{data:s,content:n}=Oe(r);this.state.frontmatter=s,this.state.html=_t(await ve(n)),this.state.status="ready"}catch(s){this.state.status="error",this.state.error=s.message||String(s)}}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"||Ee(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 Ce({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"b-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(r,s,n)=>{this.state.source=r,this.props.onChange?.(r,s,n)}})}catch(r){this.state.status="error",this.state.error=r.message||String(r)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};a(_,"template","baseui.Markdown"),a(_,"components",{Badge:B}),a(_,"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 T=class extends d{setup(){this.state=C({failed:!1}),Mt(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===$t)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 yt(e,{baseUrl:I(this.props,"base-url","baseUrl")})}get name(){return I(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?$t: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}`),Tt(e.join(";"),this.props.style)}get classNames(){return b("b-icon",this.props.className)}};a(T,"template","baseui.Icon"),a(T,"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])});function Ne(t){return class extends T{get name(){return I(this.props,"icon","name")||t}}}var $=class extends d{setup(){this.rootRef=v("root"),this.props.getRef&&(N(()=>this.props.getRef(this.rootRef.el)),j(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?b(this.props.className):b("btn","b-button",wt[this.props.variant]||wt.default,Rt[this.props.size],this.isIconOnly&&"b-button-icon",this.props.className)}get iconPosition(){return I(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return I(this.props,"aria-label","ariaLabel")}get ariaPressed(){return I(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=I(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:T}),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 Z=class extends d{onChange(e){this.props.onChange?.(e.target.checked,e)}};a(Z,"template","baseui.Checkbox"),a(Z,"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 ke(t,e){L(r=>{Ht(r)&&(t.open=Ot(r),t.open?e?.instance?.show():e?.instance?.hide())})}function $e(t,e,r){Ht(t)||(e.open=r),t.onOpenChange?.(r)}var G=class extends d{setup(){this.dialogState=C({open:Ot(this.props)}),this.control={instance:null},bt({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),ke(this.dialogState,this.control)}setOpen(e){$e(this.props,this.dialogState,e)}};a(G,"template","baseui.Dialog"),a(G,"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=v("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()}),j(()=>{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=C({open:Ct(this.props.state)}),this.triggerRef=v("trigger"),this.bufferRef=v("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),Ct(this.props.state)&&this.bootstrapTooltip.show()}),P(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),j(()=>{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 ds=Ne("circle-question-mark"),hs=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),slots:o(Object)},U=class extends d{setup(){this.supportId=`b-input-support-${hs++}`,this.box=v("box"),this.slotRefs={start:v("start"),end:v("end"),footer:v("footer")},N(()=>this.measureSlots()),P(()=>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?`--b-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:r,end:s,footer:n}=this.slotRefs;e.style.setProperty("--b-slot-start",`${r.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-end",`${s.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-footer",`${n.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&&"b-outlined-control"}get describedBy(){return this.supportingText?this.supportId:void 0}get outlinedClassNames(){return b("b-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")}};a(U,"components",{Icon:T,IconCircleQuestionMark:ds,Tooltip:X});function Re({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var et=class extends U{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return b("b-input",Re({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 U{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return b("b-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 st=class extends U{get outlinedClassNames(){return b(super.outlinedClassNames,"is-anchored")}get classNames(){return b("form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.resize==="none"&&"b-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(st,"template","baseui.Textarea"),a(st,"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 ee={default:"b-tabs-list-default",line:"b-tabs-list-line"};function Le(t,e,r,s="horizontal"){let n=s==="vertical",l=t===(n?"ArrowDown":"ArrowRight")?1:t===(n?"ArrowUp":"ArrowLeft")?-1:0;return!l||r===0?-1:(e+l+r)%r}var ms=0;function Ie(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var nt=class extends d{setup(){this.tabsState=C({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++ms}`,bt({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("b-tabs",this.props.className)}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};a(nt,"template","baseui.Tabs"),a(nt,"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=v("list")}get classNames(){return b("nav","b-tabs-list",ee[this.props.variant]||ee.default,this.props.className)}onKeyDown(e){let r=[...this.listRef.el.querySelectorAll("[role='tab']")],s=r.indexOf(e.target),n=Le(e.key,s,r.length,this.env.orientation);n!==-1&&(e.preventDefault(),r[n].focus(),r[n].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`b-tabs-panel-${this.env.tabsId}-${Ie(this.props.value)}`}get classNames(){return b("nav-link","b-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`b-tabs-panel-${this.env.tabsId}-${Ie(this.props.value)}`}};a(at,"template","baseui.TabContent"),a(at,"props",{value:{type:String},...g});var ct=class extends d{};a(ct,"template","baseui.Breadcrumb"),a(ct,"props",{...g});var lt=class extends d{};a(lt,"template","baseui.BreadcrumbList"),a(lt,"props",{...g});var ut=class extends d{get classNames(){return b("b-breadcrumb-item",this.props.current&&"b-breadcrumb-page",this.props.className)}};a(ut,"template","baseui.BreadcrumbItem"),a(ut,"props",{current:o(Boolean),...g});var pt=class extends d{get classNames(){return b("b-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("b-breadcrumb-page",this.props.className)}};a(dt,"template","baseui.BreadcrumbPage"),a(dt,"props",{...g});var q=class extends d{get classNames(){return b("b-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(q,"template","baseui.BreadcrumbSeparator"),a(q,"components",{Icon:T}),a(q,"props",{...g});var St=class extends d{get classNames(){return b("b-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(St,"template","baseui.BreadcrumbEllipsis"),a(St,"components",{Icon:T}),a(St,"props",{...g});var Ue={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},fs=["POST","PUT","PATCH"];function D(t){try{return sessionStorage.getItem(t)||""}catch{return""}}function xt(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function se(){return!!(D("apikey")||D("oauthkey"))}function re(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 ne(t,e){let r=D("apikey"),s=D("oauthkey");for(let n of t.security)n.type==="apiKey"&&n.in==="header"?e.header[n.name]=r:n.type==="apiKey"&&n.in==="query"?e.query[n.name]=r:n.type==="basic"?e.header.Authorization=r?`Basic ${r}`:"":(n.type==="oauth2"||n.type==="bearer")&&(e.header.Authorization=s?`Bearer ${s}`:"")}function Pe(t,e){let r={baseUrl:e,path:{},query:{},header:{},bodyText:"",mimeType:t.consumes?.[0]||"application/json"};return t.parameters.path.forEach(s=>{r.path[s.name]=re(s)}),t.parameters.query.forEach(s=>{r.query[s.name]=s.required?re(s):""}),t.parameters.header.forEach(s=>{r.header[s.name]=s.required?re(s):""}),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=oe(t.parameters.body.example)),ne(t,r),r}function oe(t){return typeof t=="string"?t:JSON.stringify(t,null,2)??""}function ie(t,e){let r=t.path;for(let[n,i]of Object.entries(e.path))r=r.replace(`{${n}}`,encodeURIComponent(i??""));let s=!!t.parameters.body&&fs.includes(t.method);return{method:t.method,url:`${e.baseUrl}${r}`,query:Object.entries(e.query).filter(([,n])=>n!==""),headers:Object.entries(e.header).filter(([,n])=>n!==""),bodyText:s?e.bodyText:"",mimeType:e.mimeType}}function je(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(([s,n])=>`${s}: ${n}`).join(`
|
|
25
|
-
`)}}async function
|
|
26
|
-
`),bodyText:
|
|
27
|
-
`).map((r,
|
|
28
|
-
<t t-name="
|
|
6
|
+
`)}function O(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function m(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Rn(t){return String(t).replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}function Ln(t){return String(t).replace(/`/g,'` + "`" + `')}function In(t){return String(t).replace(/\\/g,"\\\\").replace(/"""/g,'\\"\\"\\"')}function Lt(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'")}function It(t){return String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\\\'")}function Ut(t){return String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function Pt(t){return String(t).replace(/`/g,"``").replace(/"/g,'`"')}function Un(t){return String(t).replace(/\]=\]/g,']==] .. "]=" .. [=[')}function Pn(t,e){let r=e&&e.quote==="double"?'"':"'";return t.map(function(o){let i=r==='"'?m(o[0]):O(o[0]),c=r==='"'?m(o[1]):O(o[1]);return r+i+r+": "+r+c+r}).join(`,
|
|
7
|
+
`)}function jn(t,e,r){let n=["curl --request "+t.method];return r.forEach(function(o){n.push("--header '"+O(o[0]+": "+o[1])+"'")}),t.bodyText&&n.push("--data '"+O(t.bodyText)+"'"),n.push("'"+O(e)+"'"),n.join(` \\
|
|
8
|
+
`)}function Qe(t,e,r){let n=["const url = '"+O(e)+"';","const options = {"," method: '"+O(t.method)+"',"];return r.length&&(n.push(" headers: {"),n.push($n(Pn(r)," ")),n.push(" },")),t.bodyText&&n.push(" body: `"+Rn(t.bodyText)+"`,"),n.push("};","","const response = await fetch(url, options);","const data = await response.text();","console.log(response.status, data);"),n.join(`
|
|
9
|
+
`)}function _n(t,e,r){return Qe(t,e,r)}function Bn(t,e,r){let n=["import requests","","url = '"+O(e)+"'"];return r.length?(n.push("headers = {"),r.forEach(function(o){n.push(" '"+O(o[0])+"': '"+O(o[1])+"',")}),n.push("}")):n.push("headers = {}"),t.bodyText?(n.push("",'payload = """'+In(t.bodyText)+'"""'),n.push("response = requests.request('"+O(t.method)+"', url, headers=headers, data=payload)")):n.push("","response = requests.request('"+O(t.method)+"', url, headers=headers)"),n.push("print(response.status_code)","print(response.text)"),n.join(`
|
|
10
|
+
`)}function Mn(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(`"+Ln(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(o){n.push(' req.Header.Set("'+m(o[0])+'", "'+m(o[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(`
|
|
11
|
+
`)}function zn(t,e,r){let n=["OkHttpClient client = new OkHttpClient();","","Request.Builder builder = new Request.Builder()",' .url("'+m(e)+'")'];return r.forEach(function(o){n.push(' .addHeader("'+m(o[0])+'", "'+m(o[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(`
|
|
12
|
+
`)}function Hn(t,e,r){let o=["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){o.push('request.Headers.TryAddWithoutValidation("'+m(i[0])+'", "'+m(i[1])+'");')}),t.bodyText&&o.push('request.Content = new StringContent("""'+m(t.bodyText)+'""", Encoding.UTF8, "'+m(t.mimeType||"application/json")+'");'),o.push("","using var response = await client.SendAsync(request);","var body = await response.Content.ReadAsStringAsync();","Console.WriteLine((int)response.StatusCode);","Console.WriteLine(body);"),o.join(`
|
|
13
|
+
`)}function qn(t,e,r){let n=["$ch = curl_init();","curl_setopt_array($ch, ["," CURLOPT_URL => '"+Lt(e)+"',"," CURLOPT_CUSTOMREQUEST => '"+Lt(t.method)+"',"," CURLOPT_RETURNTRANSFER => true,"];return r.length&&(n.push(" CURLOPT_HTTPHEADER => ["),r.forEach(function(o){n.push(" '"+Lt(o[0]+": "+o[1])+"',")}),n.push(" ],")),t.bodyText&&n.push(" CURLOPT_POSTFIELDS => '"+Lt(t.bodyText)+"',"),n.push("]);","","$response = curl_exec($ch);","echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE) . PHP_EOL;","echo $response;","curl_close($ch);"),n.join(`
|
|
14
|
+
`)}function Dn(t,e,r){let n=t.method.charAt(0)+t.method.slice(1).toLowerCase(),o=['require "uri"','require "net/http"',"","uri = URI('"+It(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){o.push("request['"+It(i[0])+"'] = '"+It(i[1])+"'")}),t.bodyText&&o.push("request.body = '"+It(t.bodyText)+"'"),o.push("","response = http.request(request)","puts response.code","puts response.body"),o.join(`
|
|
15
|
+
`)}function Fn(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(o){n.push(' headers = curl_slist_append(headers, "'+Ut(o[0]+": "+o[1])+'");')}),n.push(' curl_easy_setopt(curl, CURLOPT_URL, "'+Ut(e)+'");'),n.push(' curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "'+Ut(t.method)+'");'),r.length&&n.push(" curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);"),t.bodyText&&n.push(' curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "'+Ut(t.bodyText)+'");'),n.push(""," curl_easy_perform(curl);"," curl_slist_free_all(headers);"," curl_easy_cleanup(curl);"," return 0;","}"),n.join(`
|
|
16
|
+
`)}function Wn(t,e,r){let n=['var request = URLRequest(url: URL(string: "'+m(e)+'")!)','request.httpMethod = "'+m(t.method)+'"'];return r.forEach(function(o){n.push('request.setValue("'+m(o[1])+'", forHTTPHeaderField: "'+m(o[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(`
|
|
17
|
+
`)}function Vn(t,e,r){let n=['NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"'+m(e)+'"]];','request.HTTPMethod = @"'+m(t.method)+'";'];return r.forEach(function(o){n.push('[request setValue:@"'+m(o[1])+'" forHTTPHeaderField:@"'+m(o[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(`
|
|
18
|
+
`)}function Zn(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(o){n.push(' .addHeader("'+m(o[0])+'", "'+m(o[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(`
|
|
19
|
+
`)}function Gn(t,e,r){let n=["let client = reqwest::Client::new();","let response = client"," ."+t.method.toLowerCase()+'("'+m(e)+'")'];return r.forEach(function(o){n.push(' .header("'+m(o[0])+'", "'+m(o[1])+'")')}),t.bodyText&&n.push(' .body(r#"'+t.bodyText.replace(/"#/g,'"#""#')+'"#)'),n.push(" .send()"," .await?;","",'println!("{}", response.status());','println!("{}", response.text().await?);'),n.join(`
|
|
20
|
+
`)}function Kn(t,e,r){let n=["$headers = @{"];return r.forEach(function(o){n.push(' "'+Pt(o[0])+'" = "'+Pt(o[1])+'"')}),n.push("}",""),t.bodyText&&n.push('$body = @"',t.bodyText,'"@',""),n.push("$response = Invoke-RestMethod -Method "+t.method+' -Uri "'+Pt(e)+'" -Headers $headers'+(t.bodyText?' -Body $body -ContentType "'+Pt(t.mimeType||"application/json")+'"':""),"$response | ConvertTo-Json -Depth 10"),n.join(`
|
|
21
|
+
`)}function Qn(t,e,r){let n=["import 'package:http/http.dart' as http;","","final uri = Uri.parse('"+O(e)+"');","final headers = <String, String>{"];return r.forEach(function(o){n.push(" '"+O(o[0])+"': '"+O(o[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(`
|
|
22
|
+
`)}function Jn(t,e,r){let n=['local http = require("socket.http")','local ltn12 = require("ltn12")',"","local response_body = {}","local headers = {"];return r.forEach(function(o){n.push(' ["'+m(o[0])+'"] = "'+m(o[1])+'",')}),n.push("}",""),t.bodyText&&(n.push("local body = [==["+Un(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(`
|
|
23
|
+
`)}async function Je(t,e){let r=me.find(function(i){return i.id===t});if(!r)throw new Error("Unknown language: "+t);let n=Nn(e,!0),o=On(e);return Yn[r.id](e,o,n)}var me,Yn,Ye=jt(()=>{me=[{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"}];Yn={curl:jn,javascript:Qe,node:_n,python:Bn,go:Mn,java:zn,csharp:Hn,php:qn,ruby:Dn,c:Fn,swift:Wn,objc:Vn,kotlin:Zn,rust:Gn,powershell:Kn,dart:Qn,lua:Jn}});var Xe={};sr(Xe,{LANGUAGES:()=>me,buildOpenApiDoc:()=>he,generateSnippet:()=>Je,loadOpenApiDoc:()=>Ge});var tr=jt(()=>{Ke();Ye()});var h=globalThis.owl;if(!h)throw new Error("NodexUI: load dist/nodexui.min.js or dist/nodexui.esm.js before this script (globalThis.owl is not set).");var ir=h.App,be=h.Component,ar=h.EventBus,cr=h.OwlError,lr=h.__info__,ur=h.batched,pr=h.blockDom,dr=h.htmlEscape,_t=h.loadFile,hr=h.markRaw,Bt=h.markup,ge=h.mount,mr=h.onError,N=h.onMounted,P=h.onPatched,fr=h.onRendered,mt=h.onWillDestroy,br=h.onWillPatch,gr=h.onWillRender,ft=h.onWillStart,j=h.onWillUnmount,L=h.onWillUpdateProps,yr=h.reactive,xr=h.status,wr=h.toRaw,bt=h.useChildSubEnv,Sr=h.useComponent,Mt=h.useEffect,vr=h.useEnv,Ar=h.useExternalListener,v=h.useRef,C=h.useState,Er=h.useSubEnv,Cr=h.validate,Tr=h.validateType,Or=h.whenReady,zt=h.xml;var At={};function Nr(t){let e=t.components;e?e!==At&&Object.getPrototypeOf(e)===Object.prototype&&Object.setPrototypeOf(e,At):t.components=Object.create(At)}var d=class extends be{constructor(...e){super(...e),Nr(this.constructor)}};function ye(t){return typeof t!="string"||!/\st-(att|attf|model)([.\s=-]|$)/.test(t)?t:t.replace(/<([A-Z][\w.:-]*)(\s[^<>]*?)?(\/?)>/g,(e,r,n="",o="")=>`<${r}${kr(r,n)}${o}>`)}function kr(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,(o,i,c,l,p)=>`${i}${c}=${l}${Ir(p)}${l}`);return n=n.replace(/(\s)t-model((?:\.[\w-]+)*)\s*=\s*(["'])(.*?)\3/g,(o,i,c,l,p)=>Ur(t,i,c,l,p,n)),r?$r(n):n}function $r(t){return t.replace(/(\s)([A-Za-z_][\w:.-]*)\s*=\s*(["'])(.*?)\3/g,(e,r,n,o,i)=>n.startsWith("t-")||n==="t-props"||Lr(i)?e:`${r}${n}=${o}${Rr(i)}${o}`)}function Rr(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function Lr(t){let e=t.trim();return!e||/^(['"`[{(]|-?\d+(?:\.\d+)?$)/.test(e)||/[?.()[\]+*/]|=>|===|!==|&&|\|\|/.test(e)||/^(true|false|null|undefined)$/.test(e)}function Ir(t){return`\`${t.replace(/`/g,"\\`").replace(/{{\s*([\s\S]*?)\s*}}|#\{\s*([\s\S]*?)\s*\}/g,(e,r,n)=>`\${${r||n}}`)}\``}function Ur(t,e,r,n,o,i){let c=/^(Checkbox|Switch)$/.test(t),l=Pr(t,r),p=c?"checked":"value",f=new RegExp(`\\s${p}\\s*=`).test(i)?"":`${e}${p}=${n}${o}${n}`,y=new RegExp(`\\s${l}\\s*=`).test(i)?"":`${e}${l}=${n}${jr(o,r,c)}${n}`;return`${f}${y}`}function Pr(t,e){return e.includes(".lazy")?"onChange":/^(Input|Textarea)$/.test(t)?"onInput":"onChange"}function jr(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 xe(t,...e){return Array.isArray(t?.raw)?zt({raw:t.raw.map(ye)},...e):zt(t,...e)}function Et(t,e,r={}){let n=ye(r.templates);return t.components={...At,...t.components||{}},ge(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,o]of Object.entries(r))o&&e.push(n)}return e.join(" ")}function s(t){return{type:t,optional:!0}}var g={className:s(String),style:s([String,Object]),slots:s(Object)};function I(t,e,r){return t[e]??(r?t[r]:void 0)}function Ct(t){return t===!0||t==="open"||t==="on"||t==="active"}function Tt(...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,o]of Object.entries(r)){if(o==null||o==="")continue;let i=n.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());e.push(`${i}:${o}`)}}return e.join(";")}function Ot(t){return t.state!==void 0?Ct(t.state):t.open!==void 0?t.open:t["default-open"]!==void 0?t["default-open"]:t.defaultOpen??!1}function Ht(t){return t.state!==void 0||t.open!==void 0}var qt={primary:"b-badge-primary",secondary:"b-badge-secondary",success:"b-badge-success",warning:"b-badge-warning",danger:"b-badge-danger",info:"b-badge-info",muted:"b-badge-muted"};var _=class extends d{get classNames(){return b("badge",qt[this.props.variant]||qt.secondary,this.props.pill&&"rounded-pill",this.props.className)}};a(_,"template","nodexui.Badge"),a(_,"props",{variant:s(String),pill:s(Boolean),label:s(String),...g});var _r="__NODEXUI_VERSION__",Dt=new Map,gt=new WeakMap,Nt="[b-ui], [b-icon]",Br="[data-bs-toggle], [data-bs-target], [data-bs-dismiss]";function Mr(t){return typeof t=="string"?document.querySelector(t):t instanceof Element?t:null}function Ft(t,e,r={}){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:r}))}function zr(t,e={}){return t.hasAttribute("b-icon")?"icon":e.name||t.getAttribute("b-ui")}function Hr(t,e){return e===document||e===t||e.contains(t)}function qr(t,e={}){return!e.allowBootstrapControl&&t.matches(Br)}var Wt=typeof window<"u"?window.thebase:void 0,V=Wt?.register?Wt:Object.assign(Wt||{},{version:_r,register(t,e){if(!t||!e)throw new Error("NodexUI.register requires a name and component definition.");return Dt.set(t,e),this},component(t){return Dt.get(t)},mount(t,e={}){let r=Mr(t);if(!r||qr(r,e))return null;let n=zr(r,e),o=Dt.get(n);if(!o)return null;let i=gt.get(r);if(i?.name===n)return i;i&&(i.destroy?.(),gt.delete(r),Ft(r,"nodexui:destroyed",{name:i.name}));let c=o.mount?.(r,this,e)||{},l={name:n,element:r,destroy:c.destroy};return gt.set(r,l),Ft(r,"nodexui:mounted",{name:n,instance:l}),l},mountAll(t=document){let e=t||document,r=[...e.querySelectorAll?.(Nt)||[]];return e instanceof Element&&e.matches(Nt)&&r.unshift(e),r.map(n=>this.mount(n)).filter(Boolean)},destroy(t=document){let e=t||document,r=[...e.querySelectorAll?.(Nt)||[]];e instanceof Element&&e.matches(Nt)&&r.unshift(e);for(let n of r){let o=gt.get(n);o&&Hr(n,e)&&(o.destroy?.(),gt.delete(n),Ft(n,"nodexui:destroyed",{name:o.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 o=r==="radius"||r==="--b-radius"?"--base-radius":r.startsWith("--")?r:`--b-${r}`;e.style.setProperty(o,n)}}}});typeof window<"u"&&(window.thebase=V,window.NodexUI=V);var we="1.31.0",Dr=`https://cdn.jsdelivr.net/npm/lucide-static@${we}/icons`,$t="file",Fr=/^[a-z0-9][a-z0-9-]*$/,Vt=new Map;function Wr(t){return typeof Image>"u"?Promise.resolve(!0):(Vt.has(t)||Vt.set(t,new Promise(e=>{let r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src=t})),Vt.get(t))}function kt(t){return String(t||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function yt(t,e={}){let r=kt(t);if(!Fr.test(r))throw new Error(`NodexUI icon name is invalid: ${t}`);return`${String(e.baseUrl||V.icons.lucide.cdnBaseUrl).replace(/\/+$/,"")}/${r}.svg`}function Zt(t,e,r={}){let n=r.url||yt(e,r),o=r.label??t.getAttribute("aria-label")??"";t.classList.add("b-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")),o?(t.setAttribute("role","img"),t.setAttribute("aria-label",o)):t.setAttribute("aria-hidden","true");let i=r.fallback===!1?null:r.fallback||$t;return i&&!r.url&&kt(e)!==kt(i)&&Wr(n).then(c=>{if(c||!t.isConnected)return;let l=yt(i,r);t.style.setProperty("--b-icon-url",`url("${l.replace(/"/g,"%22")}")`)}),t}V.icons={...V.icons||{},lucide:{version:we,cdnBaseUrl:Dr,normalizeName:kt,url:yt,render:Zt}};var xt={default:"btn-primary",secondary:"btn-secondary",destructive:"btn-danger",outline:"btn-outline-secondary",ghost:"btn-light",link:"btn-link"},Rt={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 Ao=["btn","b-button","b-clipboard-button",...Object.values(xt),...Object.values(Rt)];async function Se(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("NodexUI 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("NodexUI ClipboardButton: clipboard copy is unavailable in this browser/context.")}var Gt,Kt,Qt,Vr=0;function Zr(){return Gt??(Gt=import("./runtime/marked/marked.min.js").then(t=>{let e=t.marked||t.default?.marked||globalThis.marked;if(!e?.parse)throw new Error("NodexUI markdown: failed to load src/runtime/marked/marked.min.js");return e})),Gt}function Gr(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 Kr(){return Kt??(Kt=import("./runtime/mermaid/mermaid.esm.min.mjs").then(t=>{let e=t.default||t;return e.initialize({startOnLoad:!1,securityLevel:"strict"}),e})),Kt}function Qr(){return Qt??(Qt=import("./runtime/milkdown/milkdown-editor.js")),Qt}async function ve(t,e={}){return(await Zr()).parse(String(t??""),{gfm:!0,breaks:!1,...e})}function Yt(t,e,r,n=""){t.classList.add("b-markdown-diagram-error"),t.replaceChildren();let o=document.createElement("p");if(o.className="b-markdown-diagram-error-message",o.textContent=`Unable to render ${e} diagram: ${r?.message||r}`,t.append(o),n){let i=document.createElement("pre"),c=document.createElement("code");c.textContent=n,i.append(c),t.append(i)}}async function Jr(t){let e=[...t.querySelectorAll("pre > code.language-mermaid")];if(!e.length)return;let r;try{r=await Kr()}catch(n){e.forEach(o=>{let i=o.closest("pre");i.replaceChildren(),i.className="b-markdown-diagram b-markdown-mermaid",Yt(i,"mermaid",n,o.textContent)});return}r.initialize({startOnLoad:!1,securityLevel:"strict",theme:Gr(t)});for(let n of e){let o=n.textContent,i=n.closest("pre");i.replaceChildren(),i.className="b-markdown-diagram b-markdown-mermaid";try{let{svg:c}=await r.render(`b-mermaid-${++Vr}`,o);i.innerHTML=c}catch(c){Yt(i,"mermaid",c,o)}}}function Yr(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="b-markdown-b-copy-toast",r.textContent=t,document.body.append(r),e.mountAll(r),r.addEventListener("nodexui:close",()=>r.remove(),{once:!0})}function Xr(t){let e=document.createElement("div");e.className="b-markdown-b-code";let r=document.createElement("button");r.type="button",r.className="b-markdown-b-copy";let n=document.createElement("span");Zt(n,"copy",{label:"Copy code"}),r.append(n),r.addEventListener("click",async()=>{try{await Se(t),r.dispatchEvent(new CustomEvent("nodexui:markdown-copy",{bubbles:!0,detail:{source:t}})),Yr("Copied to clipboard")}catch(c){r.dispatchEvent(new CustomEvent("nodexui:markdown-copy-error",{bubbles:!0,detail:{error:c}}))}}),e.append(r);let o=document.createElement("pre"),i=document.createElement("code");i.className="b-markdown-b-code-lines";for(let c of t.replace(/\n$/,"").split(`
|
|
24
|
+
`)){let l=document.createElement("span");l.className="b-markdown-b-code-line",l.textContent=c,i.append(l)}return o.append(i),e.append(o),e}var Jt;function tn(){return Jt??(Jt=_t("/dist/nodexui.templates.xml")),Jt}var Xt=new WeakMap;function te(t){let e=Xt.get(t);if(e){Xt.delete(t);for(let r of e)try{r.destroy()}catch{}}}var en=/\bstate\.([A-Za-z_$][\w$]*)/g;function rn(t){return new Set([...t.matchAll(en)].map(e=>e[1]))}var nn=/\bthis\.([A-Za-z_$][\w$]*)\s*\(/g,on=/\bt-on-[\w:-]+\s*=\s*(["'])([A-Za-z_$][\w$]*)\1/g;function sn(t){let e=new Set;for(let r of t.matchAll(nn))e.add(r[1]);for(let r of t.matchAll(on))e.add(r[2]);return e}function an(t){let e=xe({raw:[t]}),r=rn(t);class n extends d{setup(){this.state=C(Object.fromEntries([...r].map(i=>[i,""])))}}a(n,"template",e);for(let o of sn(t))n.prototype[o]=function(){};return n}function Ae(t){t.querySelector("[data-slot='dropdown-menu'], .b-dropdown-menu, [b-ui='dropdown-menu'], [b-dropdown-menu]")&&t.classList.add("b-markdown-b-preview-overlay")}async function cn(t,e){let[r,n]=await Promise.all([tn(),an(e)]),o=await Et(n,t,{templates:r});return Ae(t),o}function ln(t,e){let r=globalThis.thebase;if(!r?.mountAll)throw new Error("NodexUI runtime not found on the page \u2014 load dist/nodexui.min.js before mounting Markdown.");t.innerHTML=e,Ae(t),r.mountAll(t)}async function un(t){te(t);let e=[...t.querySelectorAll("pre > code.language-base-ui")];if(!e.length)return;let r=new Set;for(let n of e){let o=n.textContent,i=n.closest("pre");i.replaceChildren(),i.className="b-markdown-live b-markdown-nodexui";let c=document.createElement("div");c.className="b-markdown-b-preview",i.append(c,Xr(o));try{/<[A-Z]/.test(o)?r.add(await cn(c,o)):ln(c,o)}catch(l){Yt(i,"NodexUI component",l,o)}}r.size&&Xt.set(t,r)}function pn(t){for(let e of t.querySelectorAll("li > input[type=checkbox]:not([aria-label])"))e.setAttribute("aria-label",e.parentElement.textContent.trim())}async function Ee(t,{mermaid:e=!0,nodexUi:r=!0}={}){pn(t),e&&await Jr(t),r&&await un(t)}async function Ce(t){return(await Qr()).createMilkdownMarkdownEditor(t)}function Oe(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 o of r[1].split(/\r?\n/)){let i=o.trim();if(!i||i.startsWith("#"))continue;let c=i.indexOf(":");if(c===-1)continue;let l=i.slice(0,c).trim();l&&(n[l]=dn(i.slice(c+1).trim()))}return{data:n,content:e.slice(r[0].length)}}function Te(t){return t.length>=2&&(t[0]==='"'&&t.at(-1)==='"'||t[0]==="'"&&t.at(-1)==="'")?t.slice(1,-1):t}function dn(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=>Te(r.trim())):[]}return Te(t)}var B=class extends d{setup(){this.rootRef=v("root"),this.editorRef=v("editor"),this.editorHandle=null,this.state=C({html:"",source:"",status:"loading",error:"",frontmatter:{}}),ft(()=>this.load(this.props)),L(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),N(()=>this.afterRender()),P(()=>this.afterRender()),mt(()=>{this.destroyEditor(),this.rootRef.el&&te(this.rootRef.el)})}get classNames(){return b("b-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:o}=Oe(r);this.state.frontmatter=n,this.state.html=Bt(await ve(o)),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"||Ee(e,{mermaid:this.props.mermaid!==!1,nodexUi:this.props.nodexUi!==!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 Ce({root:e,value:this.state.source,collaborative:!!this.props.collaborative,room:this.props.room||"b-markdown",password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(r,n,o)=>{this.state.source=r,this.props.onChange?.(r,n,o)}})}catch(r){this.state.status="error",this.state.error=r.message||String(r)}}destroyEditor(){this.editorHandle?.destroy?.(),this.editorHandle=null}};a(B,"template","nodexui.Markdown"),a(B,"components",{Badge:_}),a(B,"props",{content:s(String),src:s(String),mermaid:s(Boolean),nodexUi: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 T=class extends d{setup(){this.state=C({failed:!1}),Mt(e=>{if(this.state.failed=!1,typeof Image>"u"||!e||e===$t)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 yt(e,{baseUrl:I(this.props,"base-url","baseUrl")})}get name(){return I(this.props,"icon","name")}get url(){return this.buildUrl(this.state.failed?$t: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}`),Tt(e.join(";"),this.props.style)}get classNames(){return b("b-icon",this.props.className)}};a(T,"template","nodexui.Icon"),a(T,"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 Ne(t){return class extends T{get name(){return I(this.props,"icon","name")||t}}}var $=class extends d{setup(){this.rootRef=v("root"),this.props.getRef&&(N(()=>this.props.getRef(this.rootRef.el)),j(()=>this.props.getRef(null)))}get classNames(){return this.props.unstyled?b(this.props.className):b("btn","b-button",xt[this.props.variant]||xt.default,Rt[this.props.size],this.isIconOnly&&"b-button-icon",this.props.className)}get iconPosition(){return I(this.props,"icon-position","iconPosition")==="end"?"end":"start"}get ariaLabel(){return I(this.props,"aria-label","ariaLabel")}get ariaPressed(){return I(this.props,"aria-pressed","ariaPressed")}get ariaInvalid(){let e=I(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","nodexui.Button"),a($,"components",{Icon:T}),a($,"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 Z=class extends d{onChange(e){this.props.onChange?.(e.target.checked,e)}};a(Z,"template","nodexui.Checkbox"),a(Z,"props",{checked:s(Boolean),disabled:s(Boolean),...g,id:s(String),onChange:s(Function)});function M(){let t=globalThis.bootstrap;if(!t)throw new Error("NodexUI: load dist/bootstrap.bundle.min.js before this script (globalThis.bootstrap is not set).");return t}function ke(t,e){L(r=>{Ht(r)&&(t.open=Ot(r),t.open?e?.instance?.show():e?.instance?.hide())})}function $e(t,e,r){Ht(t)||(e.open=r),t.onOpenChange?.(r)}var G=class extends d{setup(){this.dialogState=C({open:Ot(this.props)}),this.control={instance:null},bt({dialog:this.dialogState,dialogControl:this.control,setDialogOpen:e=>this.setOpen(e)}),ke(this.dialogState,this.control)}setOpen(e){$e(this.props,this.dialogState,e)}};a(G,"template","nodexui.Dialog"),a(G,"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 z=class extends d{setup(){this.rootRef=v("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()}),j(()=>{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","nodexui.DialogContent"),a(z,"components",{Button:$}),a(z,"props",{...g,showCloseButton:s(Boolean),"show-close-button":s(Boolean)});var K=class extends d{};a(K,"template","nodexui.DialogHeader"),a(K,"props",g);var Q=class extends d{};a(Q,"template","nodexui.DialogFooter"),a(Q,"props",g);var J=class extends d{};a(J,"template","nodexui.DialogTitle"),a(J,"props",g);var Y=class extends d{};a(Y,"template","nodexui.DialogDescription"),a(Y,"props",g);var X=class extends d{setup(){this.state=C({open:Ct(this.props.state)}),this.triggerRef=v("trigger"),this.bufferRef=v("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),Ct(this.props.state)&&this.bootstrapTooltip.show()}),P(()=>{let e=this.currentContentHtml();e!==this.lastContentHtml&&(this.lastContentHtml=e,this.bootstrapTooltip?.setContent({".tooltip-inner":e}))}),j(()=>{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","nodexui.Tooltip"),a(X,"props",{content:s(String),state:s(String),...g});var hn=Ne("circle-question-mark"),mn=0,tt={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)},U=class extends d{setup(){this.supportId=`b-input-support-${mn++}`,this.box=v("box"),this.slotRefs={start:v("start"),end:v("end"),footer:v("footer")},N(()=>this.measureSlots()),P(()=>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?`--b-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:r,end:n,footer:o}=this.slotRefs;e.style.setProperty("--b-slot-start",`${r.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-end",`${n.el?.offsetWidth??0}px`),e.style.setProperty("--b-slot-footer",`${o.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&&"b-outlined-control"}get describedBy(){return this.supportingText?this.supportId:void 0}get outlinedClassNames(){return b("b-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")}};a(U,"components",{Icon:T,IconCircleQuestionMark:hn,Tooltip:X});function Re({tag:t="input",type:e}={}){return t==="select"?"form-select":e==="checkbox"||e==="radio"?"form-check-input":"form-control"}var et=class extends U{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return b("b-input",Re({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","nodexui.Input"),a(et,"props",{...tt,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 rt=class extends U{get ariaLabel(){return this.props["aria-label"]??this.props.ariaLabel}get classNames(){return b("b-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","nodexui.NativeSelect"),a(rt,"props",{...tt,value:s(String),size:s(String),...g,"aria-label":s(String),ariaLabel:s(String),id:s(String),onChange:s(Function)});var nt=class extends U{get outlinedClassNames(){return b(super.outlinedClassNames,"is-anchored")}get classNames(){return b("form-control",this.controlClass,this.isInvalid&&"is-invalid",this.props.resize==="none"&&"b-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","nodexui.Textarea"),a(nt,"props",{...tt,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 ee={default:"b-tabs-list-default",line:"b-tabs-list-line"};function Le(t,e,r,n="horizontal"){let o=n==="vertical",l=t===(o?"ArrowDown":"ArrowRight")?1:t===(o?"ArrowUp":"ArrowLeft")?-1:0;return!l||r===0?-1:(e+l+r)%r}var fn=0;function Ie(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"_")}var ot=class extends d{setup(){this.tabsState=C({active:this.props.value??this.props.defaultValue??""}),this.instanceId=`t${++fn}`,bt({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("b-tabs",this.props.className)}select(e){this.props.value===void 0&&(this.tabsState.active=e),this.props.onChange?.(e)}};a(ot,"template","nodexui.Tabs"),a(ot,"props",{value:s(String),defaultValue:s(String),orientation:s(String),onChange:s(Function),...g});var st=class extends d{};a(st,"template","nodexui.TabsContainer"),a(st,"props",{...g});var it=class extends d{setup(){this.listRef=v("list")}get classNames(){return b("nav","b-tabs-list",ee[this.props.variant]||ee.default,this.props.className)}onKeyDown(e){let r=[...this.listRef.el.querySelectorAll("[role='tab']")],n=r.indexOf(e.target),o=Le(e.key,n,r.length,this.env.orientation);o!==-1&&(e.preventDefault(),r[o].focus(),r[o].click())}};a(it,"template","nodexui.TabsList"),a(it,"props",{variant:s(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`b-tabs-panel-${this.env.tabsId}-${Ie(this.props.value)}`}get classNames(){return b("nav-link","b-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","nodexui.TabTrigger"),a(H,"components",{Button:$}),a(H,"props",{value:{type:String},disabled:s(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`b-tabs-panel-${this.env.tabsId}-${Ie(this.props.value)}`}};a(at,"template","nodexui.TabContent"),a(at,"props",{value:{type:String},...g});var ct=class extends d{};a(ct,"template","nodexui.Breadcrumb"),a(ct,"props",{...g});var lt=class extends d{};a(lt,"template","nodexui.BreadcrumbList"),a(lt,"props",{...g});var ut=class extends d{get classNames(){return b("b-breadcrumb-item",this.props.current&&"b-breadcrumb-page",this.props.className)}};a(ut,"template","nodexui.BreadcrumbItem"),a(ut,"props",{current:s(Boolean),...g});var pt=class extends d{get classNames(){return b("b-breadcrumb-link",this.props.className)}onClick(e){this.props.onClick?.(e)}};a(pt,"template","nodexui.BreadcrumbLink"),a(pt,"props",{href:s(String),target:s(String),rel:s(String),...g,onClick:s(Function)});var dt=class extends d{get classNames(){return b("b-breadcrumb-page",this.props.className)}};a(dt,"template","nodexui.BreadcrumbPage"),a(dt,"props",{...g});var q=class extends d{get classNames(){return b("b-breadcrumb-separator",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(q,"template","nodexui.BreadcrumbSeparator"),a(q,"components",{Icon:T}),a(q,"props",{...g});var wt=class extends d{get classNames(){return b("b-breadcrumb-ellipsis",this.props.className)}get hasCustomContent(){return!!this.props.slots?.default}};a(wt,"template","nodexui.BreadcrumbEllipsis"),a(wt,"components",{Icon:T}),a(wt,"props",{...g});var Ue={implicit:"Implicit",password:"Resource Owner Password Credentials",application:"Client Credentials",accessCode:"Authorization Code"},bn=["POST","PUT","PATCH"];function D(t){try{return sessionStorage.getItem(t)||""}catch{return""}}function St(t,e){try{e?sessionStorage.setItem(t,e):sessionStorage.removeItem(t)}catch{}}function ne(){return!!(D("apikey")||D("oauthkey"))}function re(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 oe(t,e){let r=D("apikey"),n=D("oauthkey");for(let o of t.security)o.type==="apiKey"&&o.in==="header"?e.header[o.name]=r:o.type==="apiKey"&&o.in==="query"?e.query[o.name]=r:o.type==="basic"?e.header.Authorization=r?`Basic ${r}`:"":(o.type==="oauth2"||o.type==="bearer")&&(e.header.Authorization=n?`Bearer ${n}`:"")}function Pe(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]=re(n)}),t.parameters.query.forEach(n=>{r.query[n.name]=n.required?re(n):""}),t.parameters.header.forEach(n=>{r.header[n.name]=n.required?re(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=se(t.parameters.body.example)),oe(t,r),r}function se(t){return typeof t=="string"?t:JSON.stringify(t,null,2)??""}function ie(t,e){let r=t.path;for(let[o,i]of Object.entries(e.path))r=r.replace(`{${o}}`,encodeURIComponent(i??""));let n=!!t.parameters.body&&bn.includes(t.method);return{method:t.method,url:`${e.baseUrl}${r}`,query:Object.entries(e.query).filter(([,o])=>o!==""),headers:Object.entries(e.header).filter(([,o])=>o!==""),bodyText:n?e.bodyText:"",mimeType:e.mimeType}}function je(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,o])=>`${n}: ${o}`).join(`
|
|
25
|
+
`)}}async function _e(t,e){let r=performance.now(),n=await fetch(e.url,{method:t.method,headers:e.headers,body:t.bodyText||void 0}),o=Math.round(performance.now()-r),i=await n.text();return{status:n.status,statusText:n.statusText,ms:o,headerLines:[...n.headers.entries()].map(([c,l])=>`${c}: ${l}`).join(`
|
|
26
|
+
`),bodyText:gn(i)}}function gn(t){try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function Be(t){let e=parseInt(t,10);return t==="default"||Number.isNaN(e)?"default":e<300?"2xx":e<400?"3xx":e<500?"4xx":"5xx"}function Me(t,e,r){if(!t)return"";try{let n=new URL(e),o=new URL(r.derivedBaseUrl||r.baseUrl||e),i=new URL(t,`${n.href.replace(/\/$/,"")}/`);return i.host===o.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 He({def:t,clientId:e,scopes:r,state:n,redirectUri:o,baseUrl:i,doc:c}){let l=new URL(Me(t.authorizationUrl,i,c));return l.searchParams.set("response_type",t.flow==="implicit"?"token":"code"),e&&l.searchParams.set("client_id",e),l.searchParams.set("redirect_uri",o),r.length&&l.searchParams.set("scope",r.join(" ")),l.searchParams.set("state",n),l.toString()}async function qe(t,e,r,n){if(!t)throw new Error("No tokenUrl defined for this scheme.");let o=new URLSearchParams;for(let[l,p]of Object.entries(e))p&&o.set(l,p);let i=await fetch(Me(t,r,n),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:o.toString()}),c=await i.json().catch(()=>({}));if(!i.ok||!c.access_token)throw new Error(c.error_description||c.error||`HTTP ${i.status}`);return c.access_token}function De(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 er;function Xn(){return er??(er=Promise.resolve().then(()=>(tr(),Xe)))}var to=["curl","csharp","go","node","ruby","php"],eo="(max-width: 1100px)";function rr(t){return t==="DELETE"?"DEL":t}function ro(){let t=[...document.scripts].find(e=>/\/nodexui(\.[\w-]+)*\.(min\.)?js(\?|$)/.test(e.src));return t?`${t.src.replace(/[?#].*$/,"").replace(/\/[^/]*$/,"")}/apidoc`:""}var W=class extends d{get children(){return this.props.groups.filter(e=>e.parent===this.props.group.name)}methodLabel(e){return rr(e)}};a(W,"template","nodexui.ApiDocGroup"),a(W,"props",{group:Object,groups:Array,current:String,href:Function,onSelect:Function});W.components={ApiDocGroup:W,Icon:T};var F=class extends d{setup(){this.rootRef=v("root"),this.mainRef=v("main"),this.doc=null,this.pendingOAuth=new Map,this.watchers=new Set,this.rowsCache=new WeakMap,this.overlayQuery=window.matchMedia(eo),this.state=C({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:ne(),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(),ft(()=>this.load(this.props)),L(e=>this.shouldReload(e)?this.load(e):void 0),N(()=>this.addListeners()),mt(()=>this.removeListeners())}get classNames(){return b("b-apidoc",this.props.className)}get rootStyle(){return Tt(this.props.height?`--b-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.logic?.LANGUAGES||[],r=this.props.languages;return r?.length?e.filter(n=>r.includes(n.id)):e}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(o=>({...o,group:"path"})),...r.map(o=>({...o,group:"query"})),...n.map(o=>({...o,group:"header"}))]}get selectedBaseUrl(){return this.draft?.baseUrl||this.doc.baseUrl}methodLabel(e){return rr(e)}statusClass(e){return Be(e)}formatExample(e){return se(e)}serverLabel(e){let r=[e.name,e.description].filter(Boolean).join(" \u2014 ");return r?`${r} (${e.url})`:e.url}languageTone(e){return to.includes(e)?e:"default"}encodingEntries(e){return Object.entries(e)}oauthFlowLabel(e){return Ue[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=ro());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.logic=await Xn(),this.doc=e.spec?this.logic.buildOpenApiDoc(e.spec,e.serverUrl):await this.logic.loadOpenApiDoc(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]=Pe(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 this.logic.generateSnippet(r.id,ie(e,this.draft))}catch(n){this.state.snippet=`// Could not generate ${r.label} snippet: ${n.message}`}}async send(){let e=this.op,r=ie(e,this.draft),n=je(r),o={method:r.method,url:n.url,headerLines:n.headerLines,bodyText:r.bodyText};this.state.result={phase:"sending",sent:o};let i;try{i={phase:"done",sent:o,res:await _e(r,n)}}catch(c){i={phase:"error",sent:o,message:c.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:o}of this.authSchemes)(r=e.oauth)[n]??(r[n]={clientId:"",clientSecret:"",username:"",password:"",scopes:Object.keys(o.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(){St("apikey",this.state.inputs.apikey.trim()),St("oauthkey",this.state.inputs.oauthkey.trim()),this.closeAuth(),this.applyAuthToAll()}clearAuth(e){St(e,""),this.state.stored[e]="",this.state.inputs[e]="",this.applyAuthToAll()}applyAuthToAll(){for(let[e,r]of Object.entries(this.state.drafts))oe(this.doc.findOperation(e),r);this.state.authed=ne(),this.updateSnippet()}toggleScope(e,r){let n=this.state.oauth[e].scopes,o=n.indexOf(r);o<0?n.push(r):n.splice(o,1)}setOAuthStatus(e,r,n=!1){this.state.oauthStatus[e]={message:r,isError:n}}applyOAuthToken(e,r,n){St("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 o=await qe(this.doc.securityDefinitions[e].tokenUrl,r,this.selectedBaseUrl,this.doc);this.applyOAuthToken(e,o,n)}catch(o){this.setOAuthStatus(e,`Token request failed: ${o.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],o=[...n.scopes];if(r.flow==="implicit"||r.flow==="accessCode")return this.openOAuthPopup(e,r,n,o);if(r.flow==="password"||r.flow==="application")return this.setOAuthStatus(e,"Requesting token\u2026"),this.fetchToken(e,De(r.flow,n,o),n);this.setOAuthStatus(e,`Unsupported OAuth2 flow: ${r.flow}`,!0)}openOAuthPopup(e,r,n,o){if(!r.authorizationUrl)return this.setOAuthStatus(e,"No authorizationUrl defined for this scheme.",!0);let i=ze(),c=He({def:r,clientId:n.clientId,scopes:o,state:i,redirectUri:this.redirectUri,baseUrl:this.selectedBaseUrl,doc:this.doc}),l=window.open(c,`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(i,{key:e,flow:r.flow,fields:{...n}}),this.setOAuthStatus(e,"Waiting for authorization in the popup\u2026"),this.watchPopup(l,i,e)}watchPopup(e,r,n){let o=setInterval(()=>{e.closed&&(clearInterval(o),this.watchers.delete(o),this.pendingOAuth.delete(r)&&this.setOAuthStatus(n,"Authorization window was closed before completing.",!0))},500);this.watchers.add(o)}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:o,flow:i,fields:c}=n;if(r.error)return this.setOAuthStatus(o,`Authorization failed: ${r.error}${r.errorDescription?" - "+r.errorDescription:""}`,!0);if(i==="implicit")return r.accessToken?this.applyOAuthToken(o,r.accessToken,c):this.setOAuthStatus(o,"Authorization server did not return an access token.",!0);if(!r.code)return this.setOAuthStatus(o,"Authorization server did not return a code.",!0);this.setOAuthStatus(o,"Exchanging code for token\u2026"),this.fetchToken(o,{grant_type:"authorization_code",code:r.code,redirect_uri:this.redirectUri,client_id:c.clientId,client_secret:c.clientSecret},c)}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(F,"template","nodexui.ApiDoc"),a(F,"components",{ApiDocGroup:W,Markdown:B,Badge:_,Breadcrumb:ct,BreadcrumbItem:ut,BreadcrumbLink:pt,BreadcrumbList:lt,BreadcrumbPage:dt,BreadcrumbSeparator:q,Button:$,Checkbox:Z,Dialog:G,DialogContent:z,DialogDescription:Y,DialogFooter:Q,DialogHeader:K,DialogTitle:J,Icon:T,Input:et,NativeSelect:rt,TabContent:at,Tabs:ot,TabsContainer:st,TabsList:it,TabTrigger:H,Textarea:nt}),a(F,"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 no=`<templates>
|
|
28
|
+
<t t-name="nodexui.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">
|
|
31
31
|
<div class="header-left">
|
|
@@ -46,7 +46,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
46
46
|
<DialogDescription>Values are stored locally in your browser and applied to Try It requests.</DialogDescription>
|
|
47
47
|
</DialogHeader>
|
|
48
48
|
<section t-if="state.authOpen" class="auth-dialog-body">
|
|
49
|
-
<t t-call="
|
|
49
|
+
<t t-call="nodexui.ApiDocAuthBody"/>
|
|
50
50
|
</section>
|
|
51
51
|
<DialogFooter>
|
|
52
52
|
<Button variant="'ghost'" label="'Close'" onClick="() => this.closeAuth()"/>
|
|
@@ -73,19 +73,19 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
73
73
|
<section t-ref="main" class="doc-main">
|
|
74
74
|
<div t-if="state.status === 'loading'" class="empty-state" role="status">Loading API documentation\u2026</div>
|
|
75
75
|
<div t-elif="state.status === 'error'" class="empty-state" role="alert">Failed to load API spec: <t t-esc="state.error"/></div>
|
|
76
|
-
<t t-elif="op" t-call="
|
|
77
|
-
<t t-else="" t-call="
|
|
76
|
+
<t t-elif="op" t-call="nodexui.ApiDocOperation"/>
|
|
77
|
+
<t t-else="" t-call="nodexui.ApiDocIntro"/>
|
|
78
78
|
</section>
|
|
79
79
|
<aside t-if="state.status === 'ready' and showTryIt" class="tryit-panel">
|
|
80
|
-
<t t-call="
|
|
80
|
+
<t t-call="nodexui.ApiDocTryIt"/>
|
|
81
81
|
</aside>
|
|
82
82
|
</main>
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
85
85
|
</t>
|
|
86
|
-
<t t-name="ApiDoc" t-call="
|
|
86
|
+
<t t-name="ApiDoc" t-call="nodexui.ApiDoc"/>
|
|
87
87
|
|
|
88
|
-
<t t-name="
|
|
88
|
+
<t t-name="nodexui.ApiDocGroup">
|
|
89
89
|
<li class="sidebar-group-wrap">
|
|
90
90
|
<details class="sidebar-group" open="open">
|
|
91
91
|
<summary>
|
|
@@ -107,7 +107,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
107
107
|
</li>
|
|
108
108
|
</t>
|
|
109
109
|
|
|
110
|
-
<t t-name="
|
|
110
|
+
<t t-name="nodexui.ApiDocBreadcrumb">
|
|
111
111
|
<Breadcrumb>
|
|
112
112
|
<BreadcrumbList>
|
|
113
113
|
<t t-foreach="breadcrumb" t-as="part" t-key="part_index">
|
|
@@ -124,13 +124,13 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
124
124
|
</Breadcrumb>
|
|
125
125
|
</t>
|
|
126
126
|
|
|
127
|
-
<t t-name="
|
|
127
|
+
<t t-name="nodexui.ApiDocIntro">
|
|
128
128
|
<div class="doc-pane">
|
|
129
|
-
<t t-call="
|
|
129
|
+
<t t-call="nodexui.ApiDocBreadcrumb"/>
|
|
130
130
|
<h1 t-esc="title"/>
|
|
131
131
|
<Badge t-if="doc.info.version" variant="'muted'" label="'v' + doc.info.version"/>
|
|
132
132
|
<p t-if="doc.info.summary" class="param-desc" t-esc="doc.info.summary"/>
|
|
133
|
-
<div t-if="doc.info.description" class="prose"><Markdown t-key="theme" content="doc.info.description"
|
|
133
|
+
<div t-if="doc.info.description" class="prose"><Markdown t-key="theme" content="doc.info.description" nodexUi="false"/></div>
|
|
134
134
|
<div class="intro-card">
|
|
135
135
|
<header><h3>Base URL</h3></header>
|
|
136
136
|
<section><code t-esc="doc.baseUrl"/></section>
|
|
@@ -148,7 +148,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
148
148
|
</div>
|
|
149
149
|
</t>
|
|
150
150
|
|
|
151
|
-
<t t-name="
|
|
151
|
+
<t t-name="nodexui.ApiDocParams">
|
|
152
152
|
<details t-if="paramList.length" class="param-group" open="open">
|
|
153
153
|
<summary><span class="param-group-head"><span class="caret"/><t t-esc="paramTitle.toUpperCase()"/></span></summary>
|
|
154
154
|
<ul>
|
|
@@ -168,7 +168,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
168
168
|
</details>
|
|
169
169
|
</t>
|
|
170
170
|
|
|
171
|
-
<t t-name="
|
|
171
|
+
<t t-name="nodexui.ApiDocSchema">
|
|
172
172
|
<t t-set="rows" t-value="schemaRows(schemaNode)"/>
|
|
173
173
|
<p t-if="!rows.length" class="apidoc-muted">No schema available.</p>
|
|
174
174
|
<ul t-else="" class="schema-tree">
|
|
@@ -180,27 +180,27 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
180
180
|
</ul>
|
|
181
181
|
</t>
|
|
182
182
|
|
|
183
|
-
<t t-name="
|
|
183
|
+
<t t-name="nodexui.ApiDocCode">
|
|
184
184
|
<pre class="snippet-block"><span class="snippet-gutter"><span t-foreach="lineNumbers(codeText)" t-as="n" t-key="n" t-esc="n"/></span><span class="snippet-code"><code t-esc="codeText"/></span></pre>
|
|
185
185
|
</t>
|
|
186
186
|
|
|
187
|
-
<t t-name="
|
|
187
|
+
<t t-name="nodexui.ApiDocOperation">
|
|
188
188
|
<div class="doc-pane">
|
|
189
|
-
<t t-call="
|
|
189
|
+
<t t-call="nodexui.ApiDocBreadcrumb"/>
|
|
190
190
|
<h1><t t-esc="op.summary"/><Badge t-if="op.deprecated" variant="'warning'" label="'Deprecated'"/></h1>
|
|
191
191
|
<div class="endpoint-box">
|
|
192
192
|
<span class="method-badge" t-att-data-method="op.method" t-esc="methodLabel(op.method)"/>
|
|
193
193
|
<code class="endpoint-url" t-esc="doc.baseUrl + op.path"/>
|
|
194
194
|
</div>
|
|
195
|
-
<section t-if="op.description" class="doc-section"><div class="prose"><Markdown t-key="op.id + theme" content="op.description"
|
|
195
|
+
<section t-if="op.description" class="doc-section"><div class="prose"><Markdown t-key="op.id + theme" content="op.description" nodexUi="false"/></div></section>
|
|
196
196
|
<p t-if="op.externalDocs and op.externalDocs.url" class="param-desc"><a t-att-href="op.externalDocs.url" target="_blank" rel="noopener noreferrer"><t t-esc="op.externalDocs.description || 'External documentation'"/></a></p>
|
|
197
197
|
|
|
198
198
|
<section class="doc-section">
|
|
199
199
|
<h2>Request</h2>
|
|
200
|
-
<t t-call="
|
|
201
|
-
<t t-call="
|
|
202
|
-
<t t-call="
|
|
203
|
-
<t t-call="
|
|
200
|
+
<t t-call="nodexui.ApiDocParams"><t t-set="paramTitle" t-value="'Path Parameters'"/><t t-set="paramList" t-value="op.parameters.path"/></t>
|
|
201
|
+
<t t-call="nodexui.ApiDocParams"><t t-set="paramTitle" t-value="'Query Parameters'"/><t t-set="paramList" t-value="op.parameters.query"/></t>
|
|
202
|
+
<t t-call="nodexui.ApiDocParams"><t t-set="paramTitle" t-value="'Header Parameters'"/><t t-set="paramList" t-value="op.parameters.header"/></t>
|
|
203
|
+
<t t-call="nodexui.ApiDocParams"><t t-set="paramTitle" t-value="'Form Data'"/><t t-set="paramList" t-value="op.parameters.formData"/></t>
|
|
204
204
|
<details t-if="op.parameters.body" class="param-group" open="open">
|
|
205
205
|
<t t-set="body" t-value="op.parameters.body"/>
|
|
206
206
|
<summary><span class="param-group-head"><span class="caret"/>BODY<t t-if="body.required"> (required)</t></span></summary>
|
|
@@ -217,7 +217,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
217
217
|
</t>
|
|
218
218
|
<p class="param-desc">example<t t-if="body.exampleIsAuto"> (auto)</t><t t-elif="body.exampleLabel"> (<t t-esc="body.exampleLabel"/>)</t>:</p>
|
|
219
219
|
<pre><code t-esc="formatExample(body.example)"/></pre>
|
|
220
|
-
<t t-call="
|
|
220
|
+
<t t-call="nodexui.ApiDocSchema"><t t-set="schemaNode" t-value="body.schema"/></t>
|
|
221
221
|
</details>
|
|
222
222
|
</section>
|
|
223
223
|
|
|
@@ -234,7 +234,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
234
234
|
<TabContent t-foreach="op.responses" t-as="r" t-key="r.status" value="'' + r_index">
|
|
235
235
|
<p t-if="r.summary" class="response-desc"><strong t-esc="r.summary"/></p>
|
|
236
236
|
<p class="response-desc" t-esc="r.description"/>
|
|
237
|
-
<t t-call="
|
|
237
|
+
<t t-call="nodexui.ApiDocParams"><t t-set="paramTitle" t-value="'Response Headers'"/><t t-set="paramList" t-value="r.headers"/></t>
|
|
238
238
|
<div t-if="r.schema" class="response-body">
|
|
239
239
|
<div class="response-body-head">
|
|
240
240
|
<Badge variant="'secondary'" label="r.contentType || 'application/json'"/>
|
|
@@ -244,7 +244,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
244
244
|
</div>
|
|
245
245
|
</div>
|
|
246
246
|
<pre t-if="state.respView[r_index] === 'example'"><code t-esc="formatExample(r.example)"/></pre>
|
|
247
|
-
<div t-else=""><t t-call="
|
|
247
|
+
<div t-else=""><t t-call="nodexui.ApiDocSchema"><t t-set="schemaNode" t-value="r.schema"/></t></div>
|
|
248
248
|
</div>
|
|
249
249
|
<p t-else="" class="apidoc-muted">No response body.</p>
|
|
250
250
|
<details t-if="r.links.length" class="param-group">
|
|
@@ -279,25 +279,25 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
279
279
|
</div>
|
|
280
280
|
</t>
|
|
281
281
|
|
|
282
|
-
<t t-name="
|
|
282
|
+
<t t-name="nodexui.ApiDocResultRequest">
|
|
283
283
|
<div class="result-section">
|
|
284
284
|
<h4 class="result-section-title">Request</h4>
|
|
285
285
|
<details class="param-group" open="open">
|
|
286
286
|
<summary><span class="param-group-head"><span class="caret"/>URL</span></summary>
|
|
287
|
-
<t t-call="
|
|
287
|
+
<t t-call="nodexui.ApiDocCode"><t t-set="codeText" t-value="state.result.sent.url"/></t>
|
|
288
288
|
</details>
|
|
289
289
|
<details class="param-group" open="open">
|
|
290
290
|
<summary><span class="param-group-head"><span class="caret"/>Headers</span></summary>
|
|
291
|
-
<t t-call="
|
|
291
|
+
<t t-call="nodexui.ApiDocCode"><t t-set="codeText" t-value="state.result.sent.headerLines || '(none)'"/></t>
|
|
292
292
|
</details>
|
|
293
293
|
<details t-if="state.result.sent.bodyText" class="param-group" open="open">
|
|
294
294
|
<summary><span class="param-group-head"><span class="caret"/>Body</span></summary>
|
|
295
|
-
<t t-call="
|
|
295
|
+
<t t-call="nodexui.ApiDocCode"><t t-set="codeText" t-value="state.result.sent.bodyText"/></t>
|
|
296
296
|
</details>
|
|
297
297
|
</div>
|
|
298
298
|
</t>
|
|
299
299
|
|
|
300
|
-
<t t-name="
|
|
300
|
+
<t t-name="nodexui.ApiDocTryIt">
|
|
301
301
|
<div class="tryit-stack">
|
|
302
302
|
<section class="sdk-card">
|
|
303
303
|
<div class="sdk-strip" role="tablist" aria-label="Code language">
|
|
@@ -309,7 +309,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
309
309
|
</Button>
|
|
310
310
|
</div>
|
|
311
311
|
<Badge variant="'secondary'" className="'sdk-current'" label="currentLanguage.label"/>
|
|
312
|
-
<div class="snippet-shell"><t t-call="
|
|
312
|
+
<div class="snippet-shell"><t t-call="nodexui.ApiDocCode"><t t-set="codeText" t-value="state.snippet"/></t></div>
|
|
313
313
|
</section>
|
|
314
314
|
|
|
315
315
|
<section class="tryit-card">
|
|
@@ -363,10 +363,10 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
363
363
|
<Badge variant="'muted'" label="state.result.sent.method"/>
|
|
364
364
|
<span class="apidoc-muted">Sending\u2026</span>
|
|
365
365
|
</div>
|
|
366
|
-
<t t-call="
|
|
366
|
+
<t t-call="nodexui.ApiDocResultRequest"/>
|
|
367
367
|
</t>
|
|
368
368
|
<t t-else="">
|
|
369
|
-
<t t-call="
|
|
369
|
+
<t t-call="nodexui.ApiDocResultRequest"/>
|
|
370
370
|
<div class="result-section">
|
|
371
371
|
<h4 class="result-section-title">Response</h4>
|
|
372
372
|
<t t-if="state.result.phase === 'done'">
|
|
@@ -376,9 +376,9 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
376
376
|
</div>
|
|
377
377
|
<details class="param-group">
|
|
378
378
|
<summary><span class="param-group-head"><span class="caret"/>Headers</span></summary>
|
|
379
|
-
<t t-call="
|
|
379
|
+
<t t-call="nodexui.ApiDocCode"><t t-set="codeText" t-value="state.result.res.headerLines || '(none)'"/></t>
|
|
380
380
|
</details>
|
|
381
|
-
<t t-call="
|
|
381
|
+
<t t-call="nodexui.ApiDocCode"><t t-set="codeText" t-value="state.result.res.bodyText"/></t>
|
|
382
382
|
</t>
|
|
383
383
|
<t t-else="">
|
|
384
384
|
<div class="tryit-result-head"><Badge variant="'danger'" label="'Request failed'"/></div>
|
|
@@ -391,7 +391,7 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
391
391
|
</div>
|
|
392
392
|
</t>
|
|
393
393
|
|
|
394
|
-
<t t-name="
|
|
394
|
+
<t t-name="nodexui.ApiDocStoredField">
|
|
395
395
|
<div class="auth-field">
|
|
396
396
|
<label class="tryit-field auth-field">
|
|
397
397
|
<span class="auth-field-label" t-esc="fieldLabel"/>
|
|
@@ -404,15 +404,15 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
404
404
|
</div>
|
|
405
405
|
</t>
|
|
406
406
|
|
|
407
|
-
<t t-name="
|
|
407
|
+
<t t-name="nodexui.ApiDocAuthBody">
|
|
408
408
|
<div class="auth-global-fields">
|
|
409
|
-
<t t-call="
|
|
409
|
+
<t t-call="nodexui.ApiDocStoredField">
|
|
410
410
|
<t t-set="fieldName" t-value="'apikey'"/>
|
|
411
411
|
<t t-set="fieldLabel" t-value="'API Key'"/>
|
|
412
412
|
<t t-set="fieldPlaceholder" t-value="'Enter API key'"/>
|
|
413
413
|
<t t-set="fieldHelp" t-value="'Stored in this tab\\'s session storage as apikey. Used for apiKey-type schemes and as the Basic auth credential (Authorization: Basic <API Key>).'"/>
|
|
414
414
|
</t>
|
|
415
|
-
<t t-call="
|
|
415
|
+
<t t-call="nodexui.ApiDocStoredField">
|
|
416
416
|
<t t-set="fieldName" t-value="'oauthkey'"/>
|
|
417
417
|
<t t-set="fieldLabel" t-value="'Bearer / OAuth token'"/>
|
|
418
418
|
<t t-set="fieldPlaceholder" t-value="'Bearer token (auto-filled by Authorize/Get token below)'"/>
|
|
@@ -475,10 +475,10 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
475
475
|
</details>
|
|
476
476
|
</div>
|
|
477
477
|
</t>
|
|
478
|
-
<t t-name="
|
|
478
|
+
<t t-name="nodexui.markdown">
|
|
479
479
|
<div class="b-markdown"/>
|
|
480
480
|
</t>
|
|
481
|
-
<t t-name="
|
|
481
|
+
<t t-name="nodexui.Markdown">
|
|
482
482
|
<div t-ref="root" t-att-class="classNames" t-att-style="props.style" data-slot="markdown" t-att-data-status="state.status">
|
|
483
483
|
<div t-if="state.status === 'loading'" class="b-markdown-loading" role="status">Loading\u2026</div>
|
|
484
484
|
<div t-elif="state.status === 'error'" class="b-markdown-error" role="alert">
|
|
@@ -505,9 +505,9 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
505
505
|
</t>
|
|
506
506
|
</div>
|
|
507
507
|
</t>
|
|
508
|
-
<t t-name="Markdown" t-call="
|
|
508
|
+
<t t-name="Markdown" t-call="nodexui.Markdown"/>
|
|
509
509
|
|
|
510
|
-
<t t-name="
|
|
510
|
+
<t t-name="nodexui.MarkdownTree">
|
|
511
511
|
<div t-att-class="'b-markdown-tree' + (props.className ? ' ' + props.className : '')" t-att-style="props.style" data-slot="markdown-tree">
|
|
512
512
|
<div t-if="state.status === 'loading'" class="b-markdown-tree-loading" role="status">Loading\u2026</div>
|
|
513
513
|
<div t-elif="state.status === 'error'" class="b-markdown-tree-error" role="alert">
|
|
@@ -522,9 +522,9 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
522
522
|
</SidebarGroup>
|
|
523
523
|
</div>
|
|
524
524
|
</t>
|
|
525
|
-
<t t-name="MarkdownTree" t-call="
|
|
525
|
+
<t t-name="MarkdownTree" t-call="nodexui.MarkdownTree"/>
|
|
526
526
|
|
|
527
|
-
<t t-name="
|
|
527
|
+
<t t-name="nodexui.MarkdownTreeNode">
|
|
528
528
|
<t t-if="props.node.type === 'file'">
|
|
529
529
|
<t t-if="props.nested">
|
|
530
530
|
<DropdownMenuItem onClick="() => this.select(props.node.path)">
|
|
@@ -586,15 +586,15 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
586
586
|
</t>
|
|
587
587
|
</t>
|
|
588
588
|
</t>
|
|
589
|
-
<t t-name="MarkdownTreeNode" t-call="
|
|
590
|
-
<t t-name="
|
|
589
|
+
<t t-name="MarkdownTreeNode" t-call="nodexui.MarkdownTreeNode"/>
|
|
590
|
+
<t t-name="nodexui.Badge">
|
|
591
591
|
<span t-att-class="classNames" t-att-style="props.style">
|
|
592
592
|
<t t-if="props.label" t-esc="props.label"/>
|
|
593
593
|
<t t-else="" t-slot="default"/>
|
|
594
594
|
</span>
|
|
595
595
|
</t>
|
|
596
|
-
<t t-name="Badge" t-call="
|
|
597
|
-
<t t-name="
|
|
596
|
+
<t t-name="Badge" t-call="nodexui.Badge"/>
|
|
597
|
+
<t t-name="nodexui.Button">
|
|
598
598
|
<a
|
|
599
599
|
t-if="props.href"
|
|
600
600
|
t-ref="root"
|
|
@@ -642,11 +642,11 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
642
642
|
<Icon t-if="props.icon && iconPosition === 'end'" name="props.icon"/>
|
|
643
643
|
</button>
|
|
644
644
|
</t>
|
|
645
|
-
<t t-name="Button" t-call="
|
|
646
|
-
<t t-name="
|
|
645
|
+
<t t-name="Button" t-call="nodexui.Button"/>
|
|
646
|
+
<t t-name="nodexui.checkbox">
|
|
647
647
|
<label b-ui="checkbox"><input type="checkbox"/><t t-slot="default"/></label>
|
|
648
648
|
</t>
|
|
649
|
-
<t t-name="
|
|
649
|
+
<t t-name="nodexui.Checkbox">
|
|
650
650
|
<label t-att-class="'form-check b-check ' + (props.className || '')" t-att-style="props.style">
|
|
651
651
|
<input
|
|
652
652
|
type="checkbox"
|
|
@@ -659,22 +659,22 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
659
659
|
<t t-slot="default"/>
|
|
660
660
|
</label>
|
|
661
661
|
</t>
|
|
662
|
-
<t t-name="Checkbox" t-call="
|
|
663
|
-
<t t-name="
|
|
662
|
+
<t t-name="Checkbox" t-call="nodexui.Checkbox"/>
|
|
663
|
+
<t t-name="nodexui.Dialog">
|
|
664
664
|
<div data-slot="dialog" t-att-style="props.style">
|
|
665
665
|
<t t-slot="default"/>
|
|
666
666
|
</div>
|
|
667
667
|
</t>
|
|
668
|
-
<t t-name="Dialog" t-call="
|
|
668
|
+
<t t-name="Dialog" t-call="nodexui.Dialog"/>
|
|
669
669
|
|
|
670
|
-
<t t-name="
|
|
670
|
+
<t t-name="nodexui.DialogTrigger">
|
|
671
671
|
<span class="b-dialog-trigger" data-slot="dialog-trigger" t-att-style="props.style" t-on-click="onClick">
|
|
672
672
|
<t t-slot="default"/>
|
|
673
673
|
</span>
|
|
674
674
|
</t>
|
|
675
|
-
<t t-name="DialogTrigger" t-call="
|
|
675
|
+
<t t-name="DialogTrigger" t-call="nodexui.DialogTrigger"/>
|
|
676
676
|
|
|
677
|
-
<t t-name="
|
|
677
|
+
<t t-name="nodexui.DialogContent">
|
|
678
678
|
<div t-ref="root" class="modal fade b-dialog-backdrop" data-slot="dialog-overlay" tabindex="-1" aria-hidden="true" t-att-style="props.style">
|
|
679
679
|
<div class="modal-dialog modal-dialog-centered">
|
|
680
680
|
<div t-att-class="'modal-content b-dialog-panel' + (props.className ? ' ' + props.className : '')" data-slot="dialog-content">
|
|
@@ -694,37 +694,37 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
694
694
|
</div>
|
|
695
695
|
</div>
|
|
696
696
|
</t>
|
|
697
|
-
<t t-name="DialogContent" t-call="
|
|
697
|
+
<t t-name="DialogContent" t-call="nodexui.DialogContent"/>
|
|
698
698
|
|
|
699
|
-
<t t-name="
|
|
699
|
+
<t t-name="nodexui.DialogHeader">
|
|
700
700
|
<div t-att-class="'b-dialog-header' + (props.className ? ' ' + props.className : '')" t-att-style="props.style" data-slot="dialog-header">
|
|
701
701
|
<t t-slot="default"/>
|
|
702
702
|
</div>
|
|
703
703
|
</t>
|
|
704
|
-
<t t-name="DialogHeader" t-call="
|
|
704
|
+
<t t-name="DialogHeader" t-call="nodexui.DialogHeader"/>
|
|
705
705
|
|
|
706
|
-
<t t-name="
|
|
706
|
+
<t t-name="nodexui.DialogFooter">
|
|
707
707
|
<div t-att-class="'b-dialog-footer' + (props.className ? ' ' + props.className : '')" t-att-style="props.style" data-slot="dialog-footer">
|
|
708
708
|
<t t-slot="default"/>
|
|
709
709
|
</div>
|
|
710
710
|
</t>
|
|
711
|
-
<t t-name="DialogFooter" t-call="
|
|
711
|
+
<t t-name="DialogFooter" t-call="nodexui.DialogFooter"/>
|
|
712
712
|
|
|
713
|
-
<t t-name="
|
|
713
|
+
<t t-name="nodexui.DialogTitle">
|
|
714
714
|
<h2 t-att-class="'b-dialog-title' + (props.className ? ' ' + props.className : '')" t-att-style="props.style" data-slot="dialog-title">
|
|
715
715
|
<t t-slot="default"/>
|
|
716
716
|
</h2>
|
|
717
717
|
</t>
|
|
718
|
-
<t t-name="DialogTitle" t-call="
|
|
718
|
+
<t t-name="DialogTitle" t-call="nodexui.DialogTitle"/>
|
|
719
719
|
|
|
720
|
-
<t t-name="
|
|
720
|
+
<t t-name="nodexui.DialogDescription">
|
|
721
721
|
<p t-att-class="'b-dialog-description' + (props.className ? ' ' + props.className : '')" t-att-style="props.style" data-slot="dialog-description">
|
|
722
722
|
<t t-slot="default"/>
|
|
723
723
|
</p>
|
|
724
724
|
</t>
|
|
725
|
-
<t t-name="DialogDescription" t-call="
|
|
725
|
+
<t t-name="DialogDescription" t-call="nodexui.DialogDescription"/>
|
|
726
726
|
|
|
727
|
-
<t t-name="
|
|
727
|
+
<t t-name="nodexui.DialogClose">
|
|
728
728
|
<Button
|
|
729
729
|
variant="'outline'"
|
|
730
730
|
className="'b-dialog-close' + (props.className ? ' ' + props.className : '')"
|
|
@@ -734,8 +734,8 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
734
734
|
<t t-slot="default"/>
|
|
735
735
|
</Button>
|
|
736
736
|
</t>
|
|
737
|
-
<t t-name="DialogClose" t-call="
|
|
738
|
-
<t t-name="
|
|
737
|
+
<t t-name="DialogClose" t-call="nodexui.DialogClose"/>
|
|
738
|
+
<t t-name="nodexui.Icon">
|
|
739
739
|
<span
|
|
740
740
|
t-att-b-icon="name"
|
|
741
741
|
t-att-class="classNames"
|
|
@@ -746,19 +746,19 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
746
746
|
t-att-aria-hidden="props.label ? undefined : 'true'"
|
|
747
747
|
></span>
|
|
748
748
|
</t>
|
|
749
|
-
<t t-name="Icon" t-call="
|
|
750
|
-
<t t-name="
|
|
749
|
+
<t t-name="Icon" t-call="nodexui.Icon"/>
|
|
750
|
+
<t t-name="nodexui.Outlined.label">
|
|
751
751
|
<div t-if="label" class="b-input-label">
|
|
752
752
|
<span class="b-input-label-text" t-esc="label"/>
|
|
753
753
|
<Tooltip t-if="tipText" content="tipText" className="'b-input-tip'"><t t-set-slot="trigger"><IconCircleQuestionMark/></t></Tooltip>
|
|
754
754
|
</div>
|
|
755
755
|
</t>
|
|
756
|
-
<t t-name="
|
|
756
|
+
<t t-name="nodexui.Outlined">
|
|
757
757
|
<div t-if="isOutlined" t-att-class="outlinedClassNames" t-att-style="labelStyle">
|
|
758
758
|
<div class="b-input-box" t-ref="box">
|
|
759
759
|
<Icon t-if="leadingIcon" name="leadingIcon" className="'b-input-icon b-input-leading'"/>
|
|
760
760
|
<t t-out="0"/>
|
|
761
|
-
<t t-call="
|
|
761
|
+
<t t-call="nodexui.Outlined.label"/>
|
|
762
762
|
<Icon t-if="trailingIcon" name="trailingIcon" className="'b-input-icon b-input-trailing'"/>
|
|
763
763
|
<div t-if="hasStart" class="b-input-slot b-input-slot-start" t-ref="start"><t t-slot="start"/></div>
|
|
764
764
|
<div t-if="hasEnd" class="b-input-slot b-input-slot-end" t-ref="end"><t t-slot="end"/></div>
|
|
@@ -771,10 +771,10 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
771
771
|
</div>
|
|
772
772
|
<t t-else="" t-out="0"/>
|
|
773
773
|
</t>
|
|
774
|
-
<t t-name="
|
|
775
|
-
<t t-call="
|
|
774
|
+
<t t-name="nodexui.Input">
|
|
775
|
+
<t t-call="nodexui.Outlined"><t t-call="nodexui.Input.field"/></t>
|
|
776
776
|
</t>
|
|
777
|
-
<t t-name="
|
|
777
|
+
<t t-name="nodexui.Input.field">
|
|
778
778
|
<input
|
|
779
779
|
t-att-class="classNames"
|
|
780
780
|
t-att-style="props.style"
|
|
@@ -797,14 +797,14 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
797
797
|
t-on-change="onChange"
|
|
798
798
|
/>
|
|
799
799
|
</t>
|
|
800
|
-
<t t-name="Input" t-call="
|
|
801
|
-
<t t-name="
|
|
800
|
+
<t t-name="Input" t-call="nodexui.Input"/>
|
|
801
|
+
<t t-name="nodexui.native-select">
|
|
802
802
|
<select b-ui="native-select"><t t-slot="default"/></select>
|
|
803
803
|
</t>
|
|
804
|
-
<t t-name="
|
|
805
|
-
<t t-call="
|
|
804
|
+
<t t-name="nodexui.NativeSelect">
|
|
805
|
+
<t t-call="nodexui.Outlined"><t t-call="nodexui.NativeSelect.field"/></t>
|
|
806
806
|
</t>
|
|
807
|
-
<t t-name="
|
|
807
|
+
<t t-name="nodexui.NativeSelect.field">
|
|
808
808
|
<select t-att-class="classNames" t-att-disabled="props.disabled" t-att-value="props.value"
|
|
809
809
|
t-att-aria-label="ariaLabel" t-att-id="props.id" t-att-style="props.style"
|
|
810
810
|
t-att-aria-invalid="isInvalid ? 'true' : undefined" t-att-aria-describedby="describedBy"
|
|
@@ -812,14 +812,14 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
812
812
|
<t t-slot="default"/>
|
|
813
813
|
</select>
|
|
814
814
|
</t>
|
|
815
|
-
<t t-name="NativeSelect" t-call="
|
|
816
|
-
<t t-name="
|
|
815
|
+
<t t-name="NativeSelect" t-call="nodexui.NativeSelect"/>
|
|
816
|
+
<t t-name="nodexui.textarea">
|
|
817
817
|
<textarea b-ui="textarea"></textarea>
|
|
818
818
|
</t>
|
|
819
|
-
<t t-name="
|
|
820
|
-
<t t-call="
|
|
819
|
+
<t t-name="nodexui.Textarea">
|
|
820
|
+
<t t-call="nodexui.Outlined"><t t-call="nodexui.Textarea.field"/></t>
|
|
821
821
|
</t>
|
|
822
|
-
<t t-name="
|
|
822
|
+
<t t-name="nodexui.Textarea.field">
|
|
823
823
|
<textarea
|
|
824
824
|
t-att-class="classNames"
|
|
825
825
|
t-att-style="props.style"
|
|
@@ -836,45 +836,45 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
836
836
|
t-on-change="onChange"
|
|
837
837
|
></textarea>
|
|
838
838
|
</t>
|
|
839
|
-
<t t-name="Textarea" t-call="
|
|
840
|
-
<t t-name="
|
|
839
|
+
<t t-name="Textarea" t-call="nodexui.Textarea"/>
|
|
840
|
+
<t t-name="nodexui.Tabs">
|
|
841
841
|
<div t-att-class="classNames" t-att-data-orientation="orientation" t-att-style="props.style">
|
|
842
842
|
<t t-slot="default"/>
|
|
843
843
|
</div>
|
|
844
844
|
</t>
|
|
845
|
-
<t t-name="Tabs" t-call="
|
|
845
|
+
<t t-name="Tabs" t-call="nodexui.Tabs"/>
|
|
846
846
|
|
|
847
|
-
<t t-name="
|
|
847
|
+
<t t-name="nodexui.TabsList">
|
|
848
848
|
<div t-ref="list" role="tablist" t-att-class="classNames" t-att-style="props.style" t-on-keydown="onKeyDown">
|
|
849
849
|
<t t-slot="default"/>
|
|
850
850
|
</div>
|
|
851
851
|
</t>
|
|
852
|
-
<t t-name="TabsList" t-call="
|
|
852
|
+
<t t-name="TabsList" t-call="nodexui.TabsList"/>
|
|
853
853
|
|
|
854
|
-
<t t-name="
|
|
854
|
+
<t t-name="nodexui.TabTrigger">
|
|
855
855
|
<Button unstyled="true" className="classNames" style="props.style" disabled="props.disabled" attrs="tabAttrs" getRef="(el) => this.onRootRef(el)" onClick="() => this.onClick()">
|
|
856
856
|
<t t-slot="default"/>
|
|
857
857
|
</Button>
|
|
858
858
|
</t>
|
|
859
|
-
<t t-name="TabTrigger" t-call="
|
|
859
|
+
<t t-name="TabTrigger" t-call="nodexui.TabTrigger"/>
|
|
860
860
|
|
|
861
|
-
<t t-name="
|
|
861
|
+
<t t-name="nodexui.TabsContainer">
|
|
862
862
|
<div t-att-class="'tab-content b-tabs-contents' + (props.className ? ' ' + props.className : '')" t-att-style="props.style">
|
|
863
863
|
<t t-slot="default"/>
|
|
864
864
|
</div>
|
|
865
865
|
</t>
|
|
866
|
-
<t t-name="TabsContainer" t-call="
|
|
866
|
+
<t t-name="TabsContainer" t-call="nodexui.TabsContainer"/>
|
|
867
867
|
|
|
868
|
-
<t t-name="
|
|
868
|
+
<t t-name="nodexui.TabContent">
|
|
869
869
|
<div t-att-id="panelId" role="tabpanel" t-att-class="'tab-pane fade b-tabs-panel' + (initialActive ? ' show active' : '') + (props.className ? ' ' + props.className : '')" t-att-style="props.style">
|
|
870
870
|
<t t-slot="default"/>
|
|
871
871
|
</div>
|
|
872
872
|
</t>
|
|
873
|
-
<t t-name="TabContent" t-call="
|
|
874
|
-
<t t-name="
|
|
873
|
+
<t t-name="TabContent" t-call="nodexui.TabContent"/>
|
|
874
|
+
<t t-name="nodexui.breadcrumb">
|
|
875
875
|
<nav b-ui="breadcrumb" aria-label="breadcrumb"><ol><t t-slot="default"/></ol></nav>
|
|
876
876
|
</t>
|
|
877
|
-
<t t-name="
|
|
877
|
+
<t t-name="nodexui.Breadcrumb">
|
|
878
878
|
<nav
|
|
879
879
|
data-slot="breadcrumb"
|
|
880
880
|
t-att-class="'b-breadcrumb' + (props.className ? ' ' + props.className : '')"
|
|
@@ -884,8 +884,8 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
884
884
|
<t t-slot="default"/>
|
|
885
885
|
</nav>
|
|
886
886
|
</t>
|
|
887
|
-
<t t-name="Breadcrumb" t-call="
|
|
888
|
-
<t t-name="
|
|
887
|
+
<t t-name="Breadcrumb" t-call="nodexui.Breadcrumb"/>
|
|
888
|
+
<t t-name="nodexui.BreadcrumbList">
|
|
889
889
|
<ol
|
|
890
890
|
data-slot="breadcrumb-list"
|
|
891
891
|
t-att-class="'breadcrumb b-breadcrumb-list' + (props.className ? ' ' + props.className : '')"
|
|
@@ -894,14 +894,14 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
894
894
|
<t t-slot="default"/>
|
|
895
895
|
</ol>
|
|
896
896
|
</t>
|
|
897
|
-
<t t-name="BreadcrumbList" t-call="
|
|
898
|
-
<t t-name="
|
|
897
|
+
<t t-name="BreadcrumbList" t-call="nodexui.BreadcrumbList"/>
|
|
898
|
+
<t t-name="nodexui.BreadcrumbItem">
|
|
899
899
|
<li data-slot="breadcrumb-item" t-att-class="classNames" t-att-aria-current="props.current ? 'page' : undefined" t-att-style="props.style">
|
|
900
900
|
<t t-slot="default"/>
|
|
901
901
|
</li>
|
|
902
902
|
</t>
|
|
903
|
-
<t t-name="BreadcrumbItem" t-call="
|
|
904
|
-
<t t-name="
|
|
903
|
+
<t t-name="BreadcrumbItem" t-call="nodexui.BreadcrumbItem"/>
|
|
904
|
+
<t t-name="nodexui.BreadcrumbLink">
|
|
905
905
|
<a
|
|
906
906
|
data-slot="breadcrumb-link"
|
|
907
907
|
t-att-href="props.href || '#'"
|
|
@@ -914,8 +914,8 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
914
914
|
<t t-slot="default"/>
|
|
915
915
|
</a>
|
|
916
916
|
</t>
|
|
917
|
-
<t t-name="BreadcrumbLink" t-call="
|
|
918
|
-
<t t-name="
|
|
917
|
+
<t t-name="BreadcrumbLink" t-call="nodexui.BreadcrumbLink"/>
|
|
918
|
+
<t t-name="nodexui.BreadcrumbPage">
|
|
919
919
|
<span
|
|
920
920
|
data-slot="breadcrumb-page"
|
|
921
921
|
role="link"
|
|
@@ -927,8 +927,8 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
927
927
|
<t t-slot="default"/>
|
|
928
928
|
</span>
|
|
929
929
|
</t>
|
|
930
|
-
<t t-name="BreadcrumbPage" t-call="
|
|
931
|
-
<t t-name="
|
|
930
|
+
<t t-name="BreadcrumbPage" t-call="nodexui.BreadcrumbPage"/>
|
|
931
|
+
<t t-name="nodexui.BreadcrumbSeparator">
|
|
932
932
|
<li
|
|
933
933
|
data-slot="breadcrumb-separator"
|
|
934
934
|
role="presentation"
|
|
@@ -940,8 +940,8 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
940
940
|
<Icon t-else="" name="'chevron-right'" className="'b-breadcrumb-separator-icon'"/>
|
|
941
941
|
</li>
|
|
942
942
|
</t>
|
|
943
|
-
<t t-name="BreadcrumbSeparator" t-call="
|
|
944
|
-
<t t-name="
|
|
943
|
+
<t t-name="BreadcrumbSeparator" t-call="nodexui.BreadcrumbSeparator"/>
|
|
944
|
+
<t t-name="nodexui.BreadcrumbEllipsis">
|
|
945
945
|
<span
|
|
946
946
|
data-slot="breadcrumb-ellipsis"
|
|
947
947
|
role="presentation"
|
|
@@ -954,5 +954,5 @@ var fe=Object.defineProperty;var nr=(t,e,r)=>e in t?fe(t,e,{enumerable:!0,config
|
|
|
954
954
|
<span class="visually-hidden">More</span>
|
|
955
955
|
</span>
|
|
956
956
|
</t>
|
|
957
|
-
<t t-name="BreadcrumbEllipsis" t-call="
|
|
958
|
-
</templates>`;function
|
|
957
|
+
<t t-name="BreadcrumbEllipsis" t-call="nodexui.BreadcrumbEllipsis"/>
|
|
958
|
+
</templates>`;function xi(t,e={}){let r=typeof t=="string"?document.querySelector(t):t;return Et(F,r,{templates:no,props:e})}export{F as ApiDoc,xi as mountApiDoc};
|