@odoo/owl 3.0.0-alpha.20 → 3.0.0-alpha.21
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/README.md +100 -110
- package/dist/compile_templates.mjs +84 -80
- package/dist/compiler.js +2356 -2356
- package/dist/owl-devtools.zip +0 -0
- package/dist/owl.cjs.js +1596 -1459
- package/dist/owl.cjs.runtime.js +4362 -3952
- package/dist/owl.es.js +1596 -1459
- package/dist/owl.es.runtime.js +4360 -3950
- package/dist/owl.iife.js +1596 -1459
- package/dist/owl.iife.min.js +1 -1
- package/dist/owl.iife.runtime.js +4363 -3953
- package/dist/owl.iife.runtime.min.js +1 -1
- package/dist/types/common/types.d.ts +1 -1
- package/dist/types/compiler/code_generator.d.ts +1 -2
- package/dist/types/compiler/inline_expressions.d.ts +7 -24
- package/dist/types/compiler/parser.d.ts +3 -8
- package/dist/types/owl.d.ts +33 -27
- package/dist/types/runtime/blockdom/attributes.d.ts +2 -0
- package/dist/types/runtime/component_node.d.ts +2 -0
- package/dist/types/runtime/error_handling.d.ts +13 -13
- package/dist/types/runtime/fibers.d.ts +37 -37
- package/dist/types/runtime/plugin_manager.d.ts +2 -0
- package/dist/types/runtime/portal.d.ts +15 -12
- package/dist/types/runtime/reactivity/computations.d.ts +1 -0
- package/dist/types/runtime/reactivity.d.ts +57 -57
- package/dist/types/runtime/rendering/scheduler.d.ts +1 -1
- package/dist/types/runtime/rendering/template_helpers.d.ts +2 -2
- package/dist/types/runtime/scheduler.d.ts +21 -21
- package/dist/types/runtime/types.d.ts +3 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +24 -1
- package/dist/types/runtime/cancellableContext.d.ts +0 -15
- package/dist/types/runtime/cancellablePromise.d.ts +0 -15
- package/dist/types/runtime/executionContext.d.ts +0 -0
- package/dist/types/runtime/listOperation.d.ts +0 -1
- package/dist/types/runtime/model.d.ts +0 -48
- package/dist/types/runtime/plugins.d.ts +0 -36
- package/dist/types/runtime/reactivity/async_computed.d.ts +0 -1
- package/dist/types/runtime/reactivity/derived.d.ts +0 -7
- package/dist/types/runtime/reactivity/reactivity.d.ts +0 -46
- package/dist/types/runtime/reactivity/signals.d.ts +0 -30
- package/dist/types/runtime/reactivity/state.d.ts +0 -48
- package/dist/types/runtime/relationalModel/discussModel.d.ts +0 -19
- package/dist/types/runtime/relationalModel/discussModelTypes.d.ts +0 -22
- package/dist/types/runtime/relationalModel/field.d.ts +0 -20
- package/dist/types/runtime/relationalModel/model.d.ts +0 -59
- package/dist/types/runtime/relationalModel/modelData.d.ts +0 -18
- package/dist/types/runtime/relationalModel/modelRegistry.d.ts +0 -3
- package/dist/types/runtime/relationalModel/modelUtils.d.ts +0 -4
- package/dist/types/runtime/relationalModel/store.d.ts +0 -16
- package/dist/types/runtime/relationalModel/types.d.ts +0 -83
- package/dist/types/runtime/relationalModel/util.d.ts +0 -1
- package/dist/types/runtime/relationalModel/web/WebDataPoint.d.ts +0 -25
- package/dist/types/runtime/relationalModel/web/WebRecord.d.ts +0 -131
- package/dist/types/runtime/relationalModel/web/WebStaticList.d.ts +0 -63
- package/dist/types/runtime/relationalModel/web/webModel.d.ts +0 -5
- package/dist/types/runtime/relationalModel/web/webModelTypes.d.ts +0 -139
- package/dist/types/runtime/signals.d.ts +0 -19
- package/dist/types/runtime/suspense.d.ts +0 -5
- package/dist/types/runtime/task.d.ts +0 -12
- package/dist/types/utils/registry.d.ts +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){"use strict";class e extends Error{}class n{constructor(t){this.__owl__=t}setup(){}render(t=!1){this.__owl__.render(!0===t)}}function o(t){let e=!1;return async(...n)=>{e||(e=!0,await Promise.resolve(),e=!1,t(...n))}}n.template="";class r extends EventTarget{trigger(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e}))}}class i extends String{}function s(t){return t instanceof i?t:void 0===t?l(""):"number"==typeof t?l(String(t)):([["&","&"],["<","<"],[">",">"],["'","'"],['"',"""],["`","`"]].forEach(e=>{t=String(t).replace(new RegExp(e[0],"g"),e[1])}),l(t))}function l(t,...e){if(!Array.isArray(t))return new i(t);const n=t;let o="",r=0;for(;r<e.length;++r)o+=n[r]+s(e[r]);return o+=n[r],new i(o)}var c;let a,h;function u(t){h&&(h.sources.add(t),t.observers.add(h))}function d(t){!function(t){if(a)return t();a=[];try{return t()}finally{}}(()=>{for(const e of t.observers)e.state===c.EXECUTED&&(e.isDerived?b(e):a.push(e)),e.state=c.STALE}),f()}!function(t){t[t.EXECUTED=0]="EXECUTED",t[t.STALE=1]="STALE",t[t.PENDING=2]="PENDING"}(c||(c={}));const f=o(function(){if(!a)return;for(const t of a)y(t);a=void 0});function p(){return h}function m(t){h=t}function g(t,e){const n=h;let o;h=t;try{o=e()}finally{h=n}return o}function y(t){var e;const n=t.state;if(n===c.EXECUTED)return;if(n===c.PENDING&&(function(t){for(const e of t.sources)"compute"in e&&y(e)}(t),t.state!==c.STALE))return void(t.state=c.EXECUTED);v(t);const o=h;h=t,t.value=null===(e=t.compute)||void 0===e?void 0:e.call(t),t.state=c.EXECUTED,h=o}function v(t){const e=t.sources;for(const n of e){n.observers.delete(t)}e.clear()}function b(t){for(const e of t.observers)e.state||(e.state=c.PENDING,e.isDerived?b(e):a.push(e))}const w=new WeakMap,x=new WeakMap;function N(t,n){try{t.destroy()}catch(t){}return Object.assign(new e("[Owl] Unhandled error. Destroying the root component"),{cause:n})}function E(t,e){if(!t)return!1;const n=t.fiber;n&&w.set(n,e);const o=x.get(t);if(o){let n=!1;const r=()=>N(t.app,e);for(let t=o.length-1;t>=0;t--)try{o[t](e,r),n=!0;break}catch(t){e=t}if(n)return!0}return E(t.parent,e)}function _(t){let{error:e}=t;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,t=t.parent}while(t);w.set(o.root,e)}if(!E(n,e))throw N(n.app,e)}function D(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 O={shouldNormalizeDom:!0,mainEventHandler:(t,e,n)=>("function"==typeof t?t(e):Array.isArray(t)&&(t=D(t).data)[0](t[1],e),!1)},T=document.createTextNode("");class k{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;if(this.key===t.key)n.patch(o,e);else{const r=n.firstNode();r.parentElement.insertBefore(T,r),e&&n.beforeRemove(),n.remove(),o.mount(this.parentEl,T),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 k(t,e)}const{setAttribute:R,removeAttribute:C}=Element.prototype,M=DOMTokenList.prototype,I=M.add,P=M.remove,B=Array.isArray,{split:j,trim:A}=String.prototype,L=/\s+/;function V(t,e){switch(e){case!1:case void 0:C.call(this,t);break;case!0:R.call(this,t,"");break;default:R.call(this,t,e)}}function $(t){return function(e){V.call(this,t,e)}}function F(t){if(B(t))"class"===t[0]?H.call(this,t[1]):V.call(this,t[0],t[1]);else for(let e in t)"class"===e?H.call(this,t[e]):V.call(this,e,t[e])}function W(t,e){if(B(t)){const n=t[0],o=t[1];if(n===e[0]){if(o===e[1])return;"class"===n?X.call(this,o,e[1]):V.call(this,n,o)}else C.call(this,e[0]),V.call(this,n,o)}else{for(let n in e)n in t||("class"===n?X.call(this,"",e[n]):C.call(this,n));for(let n in t){const o=t[n];o!==e[n]&&("class"===n?X.call(this,o,e[n]):V.call(this,n,o))}}}function U(t){const e={};switch(typeof t){case"string":const n=A.call(t);if(!n)return{};let o=j.call(n,L);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=A.call(n),!n)continue;const t=j.call(n,L);for(let n of t)e[n]=o}}return e;case"undefined":return{};case"number":return{[t]:!0};default:return{[t]:!0}}}function H(t){t=""===t?{}:U(t);const e=this.classList;for(let n in t)I.call(e,n)}function X(t,e){e=""===e?{}:U(e),t=""===t?{}:U(t);const n=this.classList;for(let o in e)o in t||P.call(n,o);for(let o in t)o in e||I.call(n,o)}function q(t){const e=t.split(".")[0],n=t.includes(".capture");return t.includes(".synthetic")?function(t,e=!1){let n=`__event__synthetic_${t}`;e&&(n=`${n}_capture`);!function(t,e,n=!1){if(G[e])return;document.addEventListener(t,t=>function(t,e){let n=e.target;for(;null!==n;){const o=n[t];if(o)for(const t of Object.values(o)){if(O.mainEventHandler(t,e,n))return}n=n.parentNode}}(e,t),{capture:n}),G[e]=!0}(t,n,e);const o=K++;function r(t){const e=this[n]||{};e[o]=t,this[n]=e}function i(){delete this[n]}return{setup:r,update:r,remove:i}}(e,n):function(t,e=!1){let n=`__event__${t}_${z++}`;e&&(n=`${n}_capture`);function o(t){const e=t.currentTarget;if(!e||!function(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)}(e))return;const o=e[n];o&&O.mainEventHandler(o,t,e)}function r(r){this[n]=r,this.addEventListener(t,o,{capture:e})}function i(){delete this[n],this.removeEventListener(t,o,{capture:e})}function s(t){this[n]=t}return{setup:r,update:s,remove:i}}(e,n)}let z=1;let K=1;const G={};const J=Node.prototype,Z=J.insertBefore,Q=(Y=J,tt="textContent",Object.getOwnPropertyDescriptor(Y,tt)).set;var Y,tt;const et=J.removeChild;class nt{constructor(t){this.children=t}mount(t,e){const n=this.children,o=n.length,r=new Array(o);for(let i=0;i<o;i++){let o=n[i];if(o)o.mount(t,e);else{const n=document.createTextNode("");r[i]=n,Z.call(t,n,e)}}this.anchors=r,this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children,o=this.anchors;for(let r=0,i=n.length;r<i;r++){let i=n[r];if(i)i.moveBeforeDOMNode(t,e);else{const n=o[r];Z.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,r=this.anchors;for(let t=0,i=n.length;t<i;t++){let i=n[t];if(i)i.moveBeforeVNode(null,e);else{const n=r[t];Z.call(o,n,e)}}}patch(t,e){if(this===t)return;const n=this.children,o=t.children,r=this.anchors,i=this.parentEl;for(let t=0,s=n.length;t<s;t++){const s=n[t],l=o[t];if(s)if(l)s.patch(l,e);else{const o=s.firstNode(),l=document.createTextNode("");r[t]=l,Z.call(i,l,o),e&&s.beforeRemove(),s.remove(),n[t]=void 0}else if(l){n[t]=l;const e=r[t];l.mount(i,e),et.call(i,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)Q.call(t,"");else{const e=this.children,n=this.anchors;for(let o=0,r=e.length;o<r;o++){const r=e[o];r?r.remove():et.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 ot(t){return new nt(t)}const rt=Node.prototype,it=CharacterData.prototype,st=rt.insertBefore,lt=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(it,"data").set,ct=rt.removeChild;class at{constructor(t){this.text=t}mountNode(t,e,n){this.parentEl=e,st.call(e,t,n),this.el=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,st.call(e,this.el,t)}moveBeforeVNode(t,e){st.call(this.parentEl,this.el,t?t.el:e)}beforeRemove(){}remove(){ct.call(this.parentEl,this.el)}firstNode(){return this.el}toString(){return this.text}}class ht extends at{mount(t,e){this.mountNode(document.createTextNode(pt(this.text)),t,e)}patch(t){const e=t.text;this.text!==e&&(lt.call(this.el,pt(e)),this.text=e)}}class ut extends at{mount(t,e){this.mountNode(document.createComment(pt(this.text)),t,e)}patch(){}}function dt(t){return new ht(t)}function ft(t){return new ut(t)}function pt(t){switch(typeof t){case"string":return t;case"number":return String(t);case"boolean":return t?"true":"false";default:return t||""}}const mt=(t,e)=>Object.getOwnPropertyDescriptor(t,e),gt=Node.prototype,yt=Element.prototype,vt=mt(CharacterData.prototype,"data").set,bt=mt(gt,"firstChild").get,wt=mt(gt,"nextSibling").get,xt=()=>{};function Nt(t){return function(e){this[t]=0===e?0:e?e.valueOf():""}}const Et={};function _t(t){if(t in Et)return Et[t];const e=(new DOMParser).parseFromString(`<t>${t}</t>`,"text/xml").firstChild.firstChild;O.shouldNormalizeDom&&Dt(e);const n=Ot(e),o=St(n),r=function(t,e){let n=function(t,e){const{refN:n,collectors:o,children:r,locations:i,cbRefs:s}=e,l=o.length;i.sort((t,e)=>t.idx-e.idx);const c=i.length,a=r.length,h=r,u=n>0,d=gt.cloneNode,f=gt.insertBefore,p=yt.remove;class m{constructor(t){this.data=t}beforeRemove(){}remove(){p.call(this.el)}firstNode(){return this.el}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,f.call(e,this.el,t)}moveBeforeVNode(t,e){f.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=d.call(t,!0);f.call(e,o,n),this.el=o,this.parentEl=e}patch(t,e){}}u&&(m.prototype.mount=function(e,r){const u=d.call(t,!0),p=new Array(n);this.refs=p,p[0]=u;for(let t=0;t<l;t++){const e=o[t];p[e.idx]=e.getVal.call(p[e.prevIdx])}if(c){const t=this.data;for(let e=0;e<c;e++){const n=i[e];n.setData.call(p[n.refIdx],t[e])}}if(f.call(e,u,r),a){const t=this.children;for(let e=0;e<a;e++){const n=t[e];if(n){const t=h[e],o=t.afterRefIdx?p[t.afterRefIdx]:null;n.isOnlyChild=t.isOnlyChild,n.mount(p[t.parentRefIdx],o)}}}if(this.el=u,this.parentEl=e,s.length){const t=this.data,e=this.refs;for(let n of s){const{idx:o,refIdx:r}=i[n];(0,t[o])(e[r],null)}}},m.prototype.patch=function(t,e){if(this===t)return;const n=this.refs;if(c){const e=this.data,o=t.data;for(let t=0;t<c;t++){const r=e[t],s=o[t];if(r!==s){const e=i[t];e.updateData.call(n[e.refIdx],s,r)}}this.data=o}if(a){let o=this.children;const r=t.children;for(let t=0;t<a;t++){const i=o[t],s=r[t];if(i)s?i.patch(s,e):(e&&i.beforeRemove(),i.remove(),o[t]=void 0);else if(s){const e=h[t],r=e.afterRefIdx?n[e.afterRefIdx]:null;s.mount(n[e.parentRefIdx],r),o[t]=s}}}},m.prototype.remove=function(){if(s.length){const t=this.data,e=this.refs;for(let n of s){const{idx:o,refIdx:r}=i[n];(0,t[o])(null,e[r])}}p.call(this.el)});return m}(t,e);if(e.children.length)return n=class extends n{constructor(t,e){super(t),this.children=e}},n.prototype.beforeRemove=nt.prototype.beforeRemove,(t,e=[])=>new n(t,e);return t=>new n(t)}(n.el,o);return Et[t]=r,r}function Dt(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)Dt(t.childNodes.item(e))}else t.remove()}function Ot(t,n=null,o=null){switch(t.nodeType){case Node.ELEMENT_NODE:{let e=o&&o.currentNS;const r=t.tagName;let i;const s=[];if(r.startsWith("block-text-")){const t=parseInt(r.slice(11),10);s.push({type:"text",idx:t}),i=document.createTextNode("")}if(r.startsWith("block-child-")){o.isRef||Tt(o);const t=parseInt(r.slice(12),10);s.push({type:"child",idx:t}),i=document.createTextNode("")}if(e||(e=t.namespaceURI),i||(i=e?document.createElementNS(e,r):document.createElement(r)),i instanceof Element){if(!o){document.createElement("template").content.appendChild(i)}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);s.push({type:"handler",idx:t,event:o})}else if(n.startsWith("block-attribute-")){const t=parseInt(n.slice(16),10);s.push({type:"attribute",idx:t,name:o,tag:r})}else if(n.startsWith("block-property-")){const t=parseInt(n.slice(15),10);s.push({type:"property",idx:t,name:o,tag:r})}else"block-attributes"===n?s.push({type:"attributes",idx:parseInt(o,10)}):"block-ref"===n?s.push({type:"ref",idx:parseInt(o,10)}):i.setAttribute(e[t].name,o)}}const l={parent:n,firstChild:null,nextSibling:null,el:i,info:s,refN:0,currentNS:e};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);s.push({idx:n,type:"child",isOnlyChild:!0})}else{l.firstChild=Ot(t.firstChild,l,l),i.appendChild(l.firstChild.el);let e=t.firstChild,n=l.firstChild;for(;e=e.nextSibling;)n.nextSibling=Ot(e,n,l),i.appendChild(n.nextSibling.el),n=n.nextSibling}}return l.info.length&&Tt(l),l}case Node.TEXT_NODE:case Node.COMMENT_NODE:return{parent:n,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 e("boom")}function Tt(t){t.isRef=!0;do{t.refN++}while(t=t.parent)}function kt(t){let e=t.parent;for(;e&&e.nextSibling===t;)t=e,e=e.parent;return e}function St(t,e,n){if(!e){e={collectors:[],locations:[],children:new Array(t.info.filter(t=>"child"===t.type).length),cbRefs:[],refN:t.refN},n=0}if(t.refN){const o=n,r=t.isRef,i=t.firstChild?t.firstChild.refN:0,s=t.nextSibling?t.nextSibling.refN:0;if(r){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:Rt,updateData:Rt});break;case"child":n.isOnlyChild?t.children[n.idx]={parentRefIdx:n.refIdx,isOnlyChild:!0}:t.children[n.idx]={parentRefIdx:kt(e).refIdx,afterRefIdx:n.refIdx};break;case"property":{const e=n.refIdx,o=Nt(n.name);t.locations.push({idx:n.idx,refIdx:e,setData:o,updateData:o});break}case"attribute":{const e=n.refIdx;let o,r;"class"===n.name?(r=H,o=X):(r=$(n.name),o=r),t.locations.push({idx:n.idx,refIdx:e,setData:r,updateData:o});break}case"attributes":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:F,updateData:W});break;case"handler":{const{setup:e,update:o}=q(n.event);t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:e,updateData:o});break}case"ref":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:xt,updateData:xt}),t.cbRefs.push(n.idx)}}(e,t),n++}if(s){const r=n+i;e.collectors.push({idx:r,prevIdx:o,getVal:wt}),St(t.nextSibling,e,r)}i&&(e.collectors.push({idx:n,prevIdx:o,getVal:bt}),St(t.firstChild,e,n))}return e}function Rt(t){vt.call(this,pt(t))}const Ct=Node.prototype,Mt=Ct.insertBefore,It=Ct.appendChild,Pt=Ct.removeChild,Bt=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(Ct,"textContent").set;class jt{constructor(t){this.children=t}mount(t,e){const n=this.children,o=document.createTextNode("");this.anchor=o,Mt.call(t,o,e);const r=n.length;if(r){const e=n[0].mount;for(let i=0;i<r;i++)e.call(n[i],t,o)}this.parentEl=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;const n=this.children;for(let o=0,r=n.length;o<r;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 r=o[0]||n[0],{mount:i,patch:s,remove:l,beforeRemove:c,moveBeforeVNode:a,firstNode:h}=r,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++)c.call(n[t]);return Bt.call(f,""),void It.call(f,u)}let p,m=0,g=0,y=n[0],v=o[0],b=n.length-1,w=o.length-1,x=n[b],N=o[w];for(;m<=b&&g<=w;){if(null===y){y=n[++m];continue}if(null===x){x=n[--b];continue}let t=y.key,r=v.key;if(t===r){s.call(y,v,e),o[g]=y,y=n[++m],v=o[++g];continue}let l=x.key,c=N.key;if(l===c){s.call(x,N,e),o[w]=x,x=n[--b],N=o[--w];continue}if(t===c){s.call(y,N,e),o[w]=y;const t=o[w+1];a.call(y,t,u),y=n[++m],N=o[--w];continue}if(l===r){s.call(x,v,e),o[g]=x;const t=n[m];a.call(x,t,u),x=n[--b],v=o[++g];continue}p=p||Lt(n,m,b);let d=p[r];if(void 0===d)i.call(v,f,h.call(y)||null);else{const t=n[d];a.call(t,y,null),s.call(t,v,e),o[g]=t,n[d]=null}v=o[++g]}if(m<=b||g<=w)if(m>b){const t=o[w+1],e=t?h.call(t)||null:u;for(let t=g;t<=w;t++)i.call(o[t],f,e)}else for(let t=m;t<=b;t++){let o=n[t];o&&(e&&c.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)Bt.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])}Pt.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 At(t){return new jt(t)}function Lt(t,e,n){let o={};for(let r=e;r<=n;r++)o[t[r].key]=r;return o}const Vt=Node.prototype,$t=Vt.insertBefore,Ft=Vt.removeChild;class Wt{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)$t.call(t,n,e);if(!this.content.length){const n=document.createTextNode("");this.content.push(n),$t.call(t,n,e)}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;for(let n of this.content)$t.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],r=document.createElement("template");r.innerHTML=e;const i=[...r.content.childNodes];for(let t of i)$t.call(n,t,o);if(!i.length){const t=document.createTextNode("");i.push(t),$t.call(n,t,o)}this.remove(),this.content=i,this.html=t.html}}beforeRemove(){}remove(){const t=this.parentEl;for(let e of this.content)Ft.call(t,e)}firstNode(){return this.content[0]}toString(){return this.html}}function Ut(t){return new Wt(t)}function Ht(t,e,n=null){t.mount(e,n)}function Xt(t){let e=t.fiber;if(e){let t=e.root;return t.locked=!0,t.setCounter(t.counter+1-zt(e.children)),t.locked=!1,e.children=[],e.childrenMap={},e.bdom=null,w.has(e)&&(w.delete(e),w.delete(t),e.appliedToDom=!1,e instanceof Gt&&(e.mounted=e instanceof Jt?[e]:[])),e}const n=new Gt(t,null);return t.willPatch.length&&n.willPatch.push(n),t.patched.length&&n.patched.push(n),n}function qt(){throw new e("Attempted to render cancelled fiber")}function zt(t){let e=0;for(let n of t){let t=n.node;n.render=qt,0===t.status&&t.cancel(),t.fiber=null,n.bdom?t.forceNextRender=!0:e++,e+=zt(n.children)}return e}class Kt{constructor(t,e){if(this.bdom=null,this.children=[],this.appliedToDom=!1,this.childrenMap={},this.node=t,this.parent=e,e){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;e&&(g(t.signalComputation,()=>{try{this.bdom=!0,this.bdom=t.renderFn()}catch(e){t.app.handleError({node:t,error:e})}}),e.setCounter(e.counter-1))}}class Gt extends Kt{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 Jt extends Gt{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)Ht(e.bdom,this.target);else{const t=this.target.childNodes[0];Ht(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})}}}let Zt=null;function Qt(){if(!Zt)throw new e("No active component (a hook function should only be called in 'setup')");return Zt}class Yt{constructor(t,e,n,o,r){this.fiber=null,this.bdom=null,this.status=0,this.forceNextRender=!1,this.children=Object.create(null),this.willStart=[],this.willUnmount=[],this.mounted=[],this.willPatch=[],this.patched=[],this.willDestroy=[],this.name=t.name,Zt=this,this.app=n,this.parent=o,this.parentKey=r,this.pluginManager=o?o.pluginManager:n.pluginManager,this.signalComputation={value:void 0,compute:()=>this.render(!1),sources:new Set,state:c.EXECUTED},this.props=Object.assign({},e);const i=p();m(void 0),this.component=new t(this);const s={this:this.component,__owl__:this};this.renderFn=n.getTemplate(t.template).bind(this.component,s,this),this.component.setup(),m(i),Zt=null}mountComponent(t,e){const n=new Jt(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{let t;g(void 0,()=>{t=this.willStart.map(t=>t.call(e))}),await Promise.all(t)}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&&!e.bdom&&!w.has(e)||!e&&!this.bdom)return;const n=Xt(this);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}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}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()}_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()}}function te(t,n){const o=ee(t,n);if(o.length){const t=JSON.stringify(o,(t,e)=>"function"==typeof e?e.name:e,2);throw new e(`Value does not match the type\n${t}`)}}function ee(t,e){return e(t)}const ne=function(t){return"string"!=typeof t?[{type:"type",expected:String,received:t}]:[]};function oe(...t){return function(e){if("object"!=typeof e)return[{type:"type",expected:Object,received:e}];const n=Object.keys(e),o=t.filter(t=>!!t.endsWith("?")||!n.includes(t));return o.length?[{type:"missing keys",value:e,missingKeys:o}]:[]}}function re(t){return function(e){if("object"!=typeof e)return[{type:"type",expected:Object,received:e}];if(t){const n=[],o=[];for(let r in t){const i=ee(e[r],t[r]);r in e?o.push(...i):n.push(r)}return n.length&&o.push({type:"missing keys",value:e,missingKeys:n}),o}return[]}}var ie={__proto__:null,any:function(){return[]},boolean:function(t){return"boolean"!=typeof t?[{type:"type",expected:Boolean,received:t}]:[]},number:function(t){return"number"!=typeof t?[{type:"type",expected:Number,received:t}]:[]},string:ne,array:function(t){return function(e){return Array.isArray(e)?t?e.flatMap(e=>ee(e,t)):[]:[{type:"type",expected:Array,received:e}]}},func:function(t,e){return function(t){return"function"!=typeof t?[{type:"type",expected:Function,received:t}]:[]}},instanceOf:function(t){return function(e){return e instanceof t?[]:[{type:"type",expected:t,received:e}]}},keys:oe,literal:function(t){return function(e){return e!==t?[{type:"exact value",expected:t,received:e}]:[]}},object:re,optional:function(t){return function(e){return void 0===e?[]:ee(e,t)}},record:function(t){return function(e){if("object"!=typeof e)return[{type:"type",expected:Object,received:e}];const n=[];for(let o in e)n.push(...ee(e[o],t));return n}},tuple:function(...t){return function(e){return Array.isArray(e)?e.length!==t.length?[{type:"length",expected:t.length,received:e.length}]:t.flatMap((t,n)=>ee(e[n],t)):[{type:"type",expected:Array,received:e}]}},constructor:function(t){return function(e){return"function"==typeof e&&(e===t||e.prototype instanceof t)?[]:[{type:"type"}]}},union:function(...t){return function(e){return t.filter(t=>ee(e,t).length).length?[{type:"union"}]:[]}},signal:function(t){return function(t){return"function"!=typeof t?[{type:"type",expected:Function,received:t}]:"function"!=typeof t.set?[{type:"type",expected:Function,received:t.set}]:[]}},reactiveValue:function(t){return function(t){return"function"!=typeof t?[{type:"type",expected:Function,received:t}]:[]}}};let se={};class le{constructor(t){var e;this.children=[],this.onDestroyCb=[],this.status=0,this.parent=t||null,null===(e=this.parent)||void 0===e||e.children.push(this),this.plugins=this.parent?Object.create(this.parent.plugins):{}}destroy(){for(let t of this.children)t.destroy();const t=this.onDestroyCb;for(;t.length;)t.pop()();this.status=3}getPluginById(t){return this.plugins[t]||null}getPlugin(t){return this.getPluginById(t.id)}startPlugins(t,n={}){const o=le.current;le.current=this;const r=[];for(const i of t){if(!i.id)throw le.current=o,new e(`Plugin "${i.name}" has no id`);if(this.plugins.hasOwnProperty(i.id)){const t=this.getPluginById(i.id).constructor;if(t!==i)throw le.current=o,new e(`Trying to start a plugin with the same id as an other plugin (id: '${i.id}', existing plugin: '${t.name}', starting plugin: '${i.name}')`);continue}se=n[i.id]||{};const t=new i;this.plugins[i.id]=t,r.push(t)}se={};for(let t of r)t.setup();return le.current=o,le.current||(this.status=1),r}}function ce(t){const n=le.current||Qt().pluginManager;let o=n.getPluginById(t.id);if(!o){if(n!==le.current)throw new e(`Unknown plugin "${t.id}"`);n.startPlugins([t]),o=n.getPluginById(t.id)}return o}le.current=null,ce.props=function(t,e={}){function n(t){return void 0===se[t]?e[t]:se[t]}const o=Object.create(null);function r(t){for(const e of t)Reflect.defineProperty(o,e,{enumerable:!0,get:n.bind(null,e)})}if(t){const e=t&&!Array.isArray(t);r((e?Object.keys(t):t).map(t=>t.endsWith("?")?t.slice(0,-1):t));if(Qt().app.dev){const n=e?re(t):oe(...t);te(se,n)}}else r(Object.keys(se));return se};const ae=Symbol("Key changes"),he=Object.prototype.toString,ue=Object.prototype.hasOwnProperty,de=["Object","Array","Set","Map","WeakMap"],fe=["Set","Map","WeakMap"];function pe(t){return he.call(be(t)).slice(8,-1)}function me(t){return"object"==typeof t&&de.includes(pe(t))}function ge(t,e){return!e&&me(t)?Oe(t):t}const ye=new WeakSet;function ve(t){return ye.add(t),t}function be(t){return Ee.has(t)?Ee.get(t):t}const we=new WeakMap;function xe(t,e,n){u(null!=n?n:function(t,e){let n=we.get(t);n||(n=new Map,we.set(t,n));let o=n.get(e);return o||(o={value:void 0,observers:new Set},n.set(e,o)),o}(t,e))}function Ne(t,e,n){if(!n){const o=we.get(t);if(!o)return;if(!o.has(e))return;n=o.get(e)}d(n)}const Ee=new WeakMap,_e=new WeakMap;function De(t,n){if(!me(t))throw new e("Cannot make the given value reactive");if(ye.has(t))return t;if(Ee.has(t))return t;const o=_e.get(t);if(o)return o;const r=pe(t),i=fe.includes(r)?function(t,e,n){const o=Ie[e](t,n);return Object.assign(Te(n),{get:(t,e)=>ue.call(o,e)?o[e]:(xe(t,e,n),ge(t[e],n))})}(t,r,n):Te(n),s=new Proxy(t,i);return _e.set(t,s),Ee.set(s,t),s}function Oe(t){return De(t,null)}function Te(t){return{get(e,n,o){const r=Object.getOwnPropertyDescriptor(e,n);return!r||r.writable||r.configurable?(xe(e,n,t),ge(Reflect.get(e,n,o),t)):Reflect.get(e,n,o)},set(e,n,o,r){const i=ue.call(e,n),s=Reflect.get(e,n,r),l=Reflect.set(e,n,be(o),r);return!i&&ue.call(e,n)&&Ne(e,ae,t),(s!==Reflect.get(e,n,r)||"length"===n&&Array.isArray(e))&&Ne(e,n,t),l},deleteProperty(e,n){const o=Reflect.deleteProperty(e,n);return Ne(e,ae,t),Ne(e,n,t),o},ownKeys:e=>(xe(e,ae,t),Reflect.ownKeys(e)),has:(e,n)=>(xe(e,ae,t),Reflect.has(e,n))}}function ke(t,e,n){return o=>(o=be(o),xe(e,o,n),ge(e[t](o),n))}function Se(t,e,n){return function*(){xe(e,ae,n);const o=e.keys();for(const r of e[t]()){const t=o.next().value;xe(e,t,n),yield ge(r,n)}}}function Re(t,e){return function(n,o){xe(t,ae,e),t.forEach(function(r,i,s){xe(t,i,e),n.call(o,ge(r,e),ge(i,e),ge(s,e))},o)}}function Ce(t,e,n,o){return(r,i)=>{r=be(r);const s=n.has(r),l=n[e](r),c=n[t](r,i);return s!==n.has(r)&&Ne(n,ae,o),l!==n[e](r)&&Ne(n,r,o),c}}function Me(t,e){return()=>{const n=[...t.keys()];t.clear(),Ne(t,ae,e);for(const o of n)Ne(t,o,e)}}const Ie={Set:(t,e)=>({has:ke("has",t,e),add:Ce("add","has",t,e),delete:Ce("delete","has",t,e),keys:Se("keys",t,e),values:Se("values",t,e),entries:Se("entries",t,e),[Symbol.iterator]:Se(Symbol.iterator,t,e),forEach:Re(t,e),clear:Me(t,e),get size(){return xe(t,ae,e),t.size}}),Map:(t,e)=>({has:ke("has",t,e),get:ke("get",t,e),set:Ce("set","get",t,e),delete:Ce("delete","has",t,e),keys:Se("keys",t,e),values:Se("values",t,e),entries:Se("entries",t,e),[Symbol.iterator]:Se(Symbol.iterator,t,e),forEach:Re(t,e),clear:Me(t,e),get size(){return xe(t,ae,e),t.size}}),WeakMap:(t,e)=>({has:ke("has",t,e),get:ke("get",t,e),set:Ce("set","get",t,e),delete:Ce("delete","has",t,e)})};class Pe{constructor(){this.tasks=new Set,this.frame=0,this.delayedRenders=[],this.cancelledNodes=new Set,this.processing=!1,this.requestAnimationFrame=Pe.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=w.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)}}function Be(t,e,n){const o=e.bind(t.component);if(t.app.dev){const t=e.name?` <${e.name}>`:"";Reflect.defineProperty(o,"name",{value:n+t})}return o}function je(t){const e=Qt();e.mounted.push(Be(e,t,"onMounted"))}function Ae(t){const e=Qt();e.willUnmount.unshift(Be(e,t,"onWillUnmount"))}function Le(t){const e=le.current;if(e)e.onDestroyCb.push(t);else{const e=Qt();e.willDestroy.unshift(Be(e,t,"onWillDestroy"))}}function Ve(t,e={}){const n=Qt(),o=Object.create(null);function r(t){for(const r of t)o[r]=void 0===n.props?e[r]:n.props[r]}if(t){const e=t&&!Array.isArray(t);if(r((e?Object.keys(t):t).map(t=>t.endsWith("?")?t.slice(0,-1):t)),n.app.dev){const o=e?re(t):oe(...t);te(n.props,o)}}else r(Object.keys(n.props));return o}Pe.requestAnimationFrame=window.requestAnimationFrame.bind(window);const $e=dt("").constructor;class Fe extends $e{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 We extends n{constructor(){super(...arguments),this.props=Ve({target:ne})}setup(){const t=this.__owl__;je(()=>{const n=t.bdom;if(!n.target){const o=document.querySelector(t.props.target);if(!o)throw new e("invalid portal target");n.content.moveBeforeDOMNode(o.firstChild,o)}}),Ae(()=>{t.bdom.remove()})}}We.template="__portal__";const Ue=Object.create;function He(t){const e=Ue(t);for(let n in t)e[n]=t[n];return e}const Xe=Symbol("isBoundary");class qe{constructor(t,e,n,o,r){this.fn=t,this.ctx=He(e),this.component=n,this.node=o,this.key=r}evaluate(){return this.fn.call(this.component,this.ctx,this.node,this.key)}toString(){return this.evaluate().toString()}}const ze={withDefault:function(t,e){return null==t||!1===t?e:t},zero:Symbol("zero"),isBoundary:Xe,callSlot:function(t,e,n,o,r,i,s){n=n+"__slot_"+o;const l=t.__owl__.props.slots||{},{__render:c,__ctx:a,__scope:h}=l[o]||{},u=Ue(a||{});h&&(u[h]=i);const d=c?c(u,e,n):null;if(s){let i,l;return d?i=r?S(o,d):d:l=s(t,e,n),ot([i,l])}return d||dt("")},capture:He,withKey:function(t,e){return t.key=e,t},prepareList:function(t){let n,o;if(Array.isArray(t))n=t,o=t;else if(t instanceof Map)n=[...t.keys()],o=[...t.values()];else if(Symbol.iterator in Object(t))n=[...t],o=n;else{if(!t||"object"!=typeof t)throw new e(`Invalid loop expression: "${t}" is not iterable`);o=Object.values(t),n=Object.keys(t)}const r=o.length;return[n,o,r,new Array(r)]},setContextValue:function(t,e,n){const o=t;for(;!t.hasOwnProperty(e)&&!t.hasOwnProperty(Xe);){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},LazyValue:qe,safeOutput:function(t,e){if(null==t)return e?S("default",e):S("undefined",dt(""));let n,o;return t instanceof i?(n="string_safe",o=Ut(t)):t instanceof qe?(n="lazy_value",o=t.evaluate()):(n="string_unsafe",o=dt(t)),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],r=q(n);this.handlerFns[o]=r,r.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 r=this;e[n]=function(t){const e=t.target;let n=r.child.firstNode();const i=r.afterNode;for(;n&&n!==i;){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:ve,OwlError:e,createRef:function(t){if(!t)throw new e("Ref is undefined or null");let n,o;if(t.add&&t.remove)n=t.add.bind(t),o=t.remove.bind(t);else{if(!t.set)throw new e("Ref should implement either a 'set' function or 'add' and 'remove' functions");n=t.set.bind(t),o=()=>t.set(null)}return(t,e)=>{e&&o(e),t&&n(t)}},modelExpr:function(t){if(!t.set||"function"!=typeof t)throw new e("Invalid t-model expression: expression should evaluate to a function with a 'set' method defined on it");return t}};const Ke={text:dt,createBlock:_t,list:At,multi:ot,html:Ut,toggler:S,comment:ft};class Ge{static registerTemplate(t,e){Je[t]=e}constructor(t={}){if(this.rawTemplates=Object.create(Je),this.templates={},this.Portal=We,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={...ze,__globals__:t.globalValues||{}},this.hasGlobalValues=Boolean(t.globalValues&&Object.keys(t.globalValues).length)}addTemplate(t,n){if(t in this.rawTemplates){if(!this.dev)return;const o=this.rawTemplates[t];if(("string"==typeof o?o:o instanceof Element?o.outerHTML:o.toString())===("string"==typeof n?n:n.outerHTML))return;throw new e(`Template ${t} already defined with different content`)}this.rawTemplates[t]=n}addTemplates(t){if(t){t=t instanceof Document?t:function(t){const n=(new DOMParser).parseFromString(t,"text/xml");if(n.getElementsByTagName("parsererror").length){let o="Invalid XML in template.";const r=n.getElementsByTagName("parsererror")[0].textContent;if(r){o+="\nThe parser has produced the following error message:\n"+r;const e=/\d+/g,n=e.exec(r);if(n){const i=Number(n[0]),s=t.split("\n")[i-1],l=e.exec(r);if(s&&l){const t=Number(l[0])-1;s[t]&&(o+=`\nThe error might be located at xml line ${i} column ${t}\n${s}\n${"-".repeat(t-1)}^`)}}}throw new e(o)}return n}(t);for(const e of t.querySelectorAll("[t-name]")){const t=e.getAttribute("t-name");this.addTemplate(t,e)}}}getTemplate(t){var n;if(!(t in this.templates)){const o=(null===(n=this.getRawTemplate)||void 0===n?void 0:n.call(this,t))||this.rawTemplates[t];if(void 0===o){let n="";try{n=` (for component "${Qt().component.constructor.name}")`}catch{}throw new e(`Missing template: "${t}"${n}`)}const r="function"==typeof o&&!(o instanceof Element)?o:this._compileTemplate(t,o),i=this.templates;this.templates[t]=function(e,n){return i[t].call(this,e,n)};const s=r(this,Ke,this.runtimeUtils);this.templates[t]=s}return this.templates[t]}_compileTemplate(t,n){throw new e("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 Je={};function Ze(...t){const e="__template__"+Ze.nextId++,n=String.raw(...t);return Je[e]=n,e}Ze.nextId=1,Ge.registerTemplate("__portal__",function(t,e,n){let{callSlot:o}=n;return function(t,e,n=""){return new Fe(t.this.props.target,o(t,e,n,"default",!1,null))}});let Qe=!1;const Ye=new Set;window.__OWL_DEVTOOLS__||(window.__OWL_DEVTOOLS__={apps:Ye,Fiber:Kt,RootFiber:Gt,toRaw:be,proxy:Oe});class tn extends Ge{constructor(t={}){super(t),this.scheduler=new Pe,this.roots=new Set,this.name=t.name||"",Ye.add(this),this.pluginManager=t.pluginManager||new le(null),t.plugins&&this.pluginManager.startPlugins(t.plugins),t.test&&(this.dev=!0),!this.dev||t.test||Qe||(console.info("Owl is running in 'dev' mode."),Qe=!0)}createRoot(t,e={}){const n=e.props||{};let o,r;const i=new Promise((t,e)=>{o=t,r=e}),s=function(){let t=Zt;return()=>{Zt=t}}();let l,c=null;try{l=this.makeNode(t,n)}catch(t){c=t,r(t)}finally{s()}const a={node:l,promise:i,mount:(t,e)=>(c||(tn.validateTarget(t),this.mountNode(l,t,o,r,e)),i),destroy:()=>{this.roots.delete(a),l.destroy(),this.scheduler.processTasks()}};return this.roots.add(a),a}makeNode(t,e){return new Yt(t,e,this,null,null)}mountNode(t,e,n,o,r){let i=x.get(t);i||(i=[],x.set(t,i)),i.unshift((t,e)=>{const n=e();o(n)}),t.mounted.push(()=>{n(t.component),i.shift()}),t.mountComponent(e,r)}destroy(){for(let t of this.roots)t.destroy();this.scheduler.processTasks(),Ye.delete(this)}createComponent(t,o){const r=!o,i=Yt.prototype.initiateRender;return(s,l,c,a,h)=>{let u=c.children,d=u[l];r&&d&&d.component.constructor!==h&&(d=void 0);const f=c.fiber;if(!d){if(o){const o=a.constructor.components;if(!o)throw new e(`Cannot find the definition of component "${t}", missing static components key in parent`);if(!(h=o[t]))throw new e(`Cannot find the definition of component "${t}"`);if(!(h.prototype instanceof n))throw new e(`"${t}" is not a Component. It must inherit from the Component class`)}d=new Yt(h,s,this,c,l),u[l]=d,i.call(d,new Kt(d,f))}return f.childrenMap[l]=d,d}}handleError(...t){return _(...t)}}tn.validateTarget=function(t){const n=t&&t.ownerDocument;if(n){if(!n.defaultView)throw new e("Cannot mount a component: the target document is not attached to a window (defaultView is missing)");if(t instanceof n.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,n))throw new e("Cannot mount a component on a detached dom node");return}}throw new e("Cannot mount component: the target is not a valid DOM element")},tn.apps=Ye,tn.version="3.0.0-alpha";function en(t,e){let n;return()=>(null!=n||(n={state:c.STALE,sources:new Set,compute:()=>(d(n),t()),isDerived:!0,value:void 0,observers:new Set,name:null==e?void 0:e.name}),y(n),u(n),n.value)}const nn=Symbol("Signal");function on(t,e,n){const o={value:t,observers:new Set,name:null==n?void 0:n.name};let r=e(o);const i=()=>(u(o),r);return i[nn]=o,i.set=t=>{Object.is(o.value,t)||(o.value=t,r=e(o),d(o))},i}function rn(t,e){return on(t,t=>t.value,e)}rn.invalidate=function(t){if(!(nn in t))throw new e(`Value is not a signal (${t})`);d(t[nn])},rn.Array=function(t,e){return on(t,t=>De(t.value,t),e)},rn.Object=function(t,e){return on(t,t=>De(t.value,t),e)},rn.Map=function(t,e){return on(t,t=>De(t.value,t),e)},rn.Set=function(t,e){return on(t,t=>De(t.value,t),e)};function sn(t,e){var n,o,r;const i={state:c.STALE,value:void 0,compute:()=>(m(void 0),ln(i),m(i),t()),sources:new Set,childrenEffect:[],name:null==e?void 0:e.name};return null===(r=null===(o=null===(n=p())||void 0===n?void 0:n.childrenEffect)||void 0===o?void 0:o.push)||void 0===r||r.call(o,i),y(i),()=>{const t=p();m(void 0),ln(i),m(t)}}function ln(t){v(t),function(t){const e=t.value;e&&"function"==typeof e&&(e(),t.value=void 0)}(t);for(const e of t.childrenEffect)e.state=c.EXECUTED,v(e),ln(e);t.childrenEffect.length=0}O.shouldNormalizeDom=!1,O.mainEventHandler=(t,n,o)=>{const{data:r,modifiers:i}=D(t);t=r;let s=!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 s;case"prevent":(t&&e||!t)&&n.preventDefault();continue;case"stop":(t&&e||!t)&&n.stopPropagation(),s=!0;continue}}if(Object.hasOwnProperty.call(t,0)){const o=t[0];if("function"!=typeof o)throw new e(`Invalid handler (expected a function, received: '${o}')`);let r=t[1]?t[1].__owl__:null;r&&1!==r.status||o.call(r?r.component:null,n)}return s};const cn={config:O,mount:Ht,patch:function(t,e,n=!1){t.patch(e,n)},remove:function(t,e=!1){e&&t.beforeRemove(),t.remove()},list:At,multi:ot,text:dt,toggler:S,createBlock:_t,html:Ut,comment:ft},an={version:tn.version};t.App=tn,t.Component=n,t.EventBus=r,t.OwlError=e,t.Plugin=class{static get id(){var t;return null!==(t=this._shadowId)&&void 0!==t?t:this.name}static set id(t){this._shadowId=t}setup(){}},t.PluginManager=le,t.Registry=class{constructor(t={}){this._map=rn.Object(Object.create(null)),this.entries=en(()=>Object.entries(this._map()).sort((t,e)=>t[1][0]-e[1][0]).map(([t,e])=>[t,e[1]])),this.items=en(()=>this.entries().map(t=>t[1])),this._name=t.name||"registry",this._validation=t.validation}addById(t,n=50){if(!t.id)throw new e(`Item should have an id key (registry '${this._name}')`);return this.add(t.id,t,n)}add(t,e,n=50){return this._validation&&te(e,this._validation),this._map()[t]=[n,e],this}get(t,e){const n=t in this._map();if(!n&&arguments.length<2)throw new Error(`KeyNotFoundError: Cannot find key "${t}" (registry '${this._name}')`);return n?this._map()[t][1]:e}remove(t){delete this._map()[t]}has(t){return t in this._map()}},t.Resource=class{constructor(t={}){this._items=rn.Array([]),this.items=en(()=>this._items().sort((t,e)=>t[0]-e[0]).map(t=>t[1])),this._validation=t.validation}add(t,e=50){return this._validation&&te(t,this._validation),this._items().push([e,t]),this}remove(t){const e=this._items().filter(([e,n])=>n!==t);return this._items.set(e),this}has(t){return this._items().some(([e,n])=>n===t)}},t.__info__=an,t.assertType=te,t.batched=o,t.blockDom=cn,t.computed=en,t.effect=sn,t.htmlEscape=s,t.markRaw=ve,t.markup=l,t.mount=async function(t,e,n={}){return new tn(n).createRoot(t,n).mount(e,n)},t.onError=function(t){const e=Qt();let n=x.get(e);n||(n=[],x.set(e,n)),n.push(t.bind(e.component))},t.onMounted=je,t.onPatched=function(t){const e=Qt();e.patched.push(Be(e,t,"onPatched"))},t.onWillDestroy=Le,t.onWillPatch=function(t){const e=Qt();e.willPatch.unshift(Be(e,t,"onWillPatch"))},t.onWillStart=function(t){const e=Qt();e.willStart.push(Be(e,t,"onWillStart"))},t.onWillUnmount=Ae,t.plugin=ce,t.props=Ve,t.providePlugins=function(t,e){const n=Qt(),o=new le(n.pluginManager);return n.pluginManager=o,Le(()=>o.destroy()),o.startPlugins(t,e)},t.proxy=Oe,t.signal=rn,t.status=function(){const t=le.current,e=t||Qt();return()=>{switch(e.status){case 0:return"new";case 2:return"cancelled";case 1:return t?"started":"mounted";case 3:return"destroyed"}}},t.toRaw=be,t.types=ie,t.untrack=function(t){return g(void 0,t)},t.useComponent=function(){return Zt.component},t.useEffect=function(t){Le(sn(t))},t.useListener=function(t,e,n,o){t.addEventListener(e,n,o),Le(()=>t.removeEventListener(e,n,o))},t.useResource=function(t,e){for(let n of e)t.add(n);Le(()=>{for(let n of e)t.remove(n)})},t.validateType=ee,t.whenReady=function(t){return new Promise(function(t){"loading"!==document.readyState?t(!0):document.addEventListener("DOMContentLoaded",t,!1)}).then(t||function(){})},t.xml=Ze,Object.defineProperty(t,"__esModule",{value:!0}),an.date="2026-01-14T19:21:38.789Z",an.hash="2278017",an.url="https://github.com/odoo/owl"}(this.owl=this.owl||{});
|
|
1
|
+
!function(t){"use strict";class e extends Error{cause}let n=[];function o(t){const o=n.at(-1);if(!o)throw new e("No active context");if(t&&t!==o.type)throw new e(`Expected to be in a ${t} context`);return o}function s(t,n){return async function(...o){if(t.status>1)throw new e(`Function called after the end of life of the ${t.type}`);const s=await n.call(this,...o);return t.status>1?new Promise(()=>{}):s}}function i(t){let e=!1;return function(...n){e||(e=!0,queueMicrotask(()=>{e=!1,t(...n)}))}}function r(t){const n=t&&t.ownerDocument;if(n){if(!n.defaultView)throw new e("Cannot mount a component: the target document is not attached to a window (defaultView is missing)");if(t instanceof n.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,n))throw new e("Cannot mount a component on a detached dom node");return}}throw new e("Cannot mount component: the target is not a valid DOM element")}class l extends EventTarget{trigger(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e}))}}class a extends String{}function c(t){return t instanceof a?t:void 0===t?u(""):"number"==typeof t?u(String(t)):([["&","&"],["<","<"],[">",">"],["'","'"],['"',"""],["`","`"]].forEach(e=>{t=String(t).replace(new RegExp(e[0],"g"),e[1])}),u(t))}function u(t,...e){if(!Array.isArray(t))return new a(t);const n=t;let o="",s=0;for(;s<e.length;++s)o+=n[s]+c(e[s]);return o+=n[s],new a(o)}var h;!function(t){t[t.EXECUTED=0]="EXECUTED",t[t.STALE=1]="STALE",t[t.PENDING=2]="PENDING"}(h||(h={}));const d=Symbol("Atom");let f,p=[];function m(t,e,n=h.STALE){return{state:n,value:void 0,compute:t,sources:new Set,observers:new Set,isDerived:e}}function g(t){f&&(f.sources.add(t),t.observers.add(f))}function y(t){for(const e of t.observers)e.state===h.EXECUTED&&(e.isDerived?_(e):p.push(e)),e.state=h.STALE;v()}const v=i(function(){for(let t=0;t<p.length;t++)N(p[t]);p.length=0});function b(){return f}function w(t){f=t}function N(t){const e=t.state;if(e===h.EXECUTED)return;if(e===h.PENDING){for(const e of t.sources)"compute"in e&&N(e);if(t.state!==h.STALE)return void(t.state=h.EXECUTED)}E(t);const n=f;f=t,t.value=t.compute(),t.state=h.EXECUTED,f=n}function E(t){const e=t.sources;for(const n of e){n.observers.delete(t)}e.clear()}function x(t){for(const e of t.sources)e.observers.delete(t),"compute"in e&&e.isDerived&&0===e.observers.size&&x(e);t.sources.clear(),t.state=h.STALE}function _(t){const e=[t];let n;for(;n=e.pop();)for(const t of n.observers)t.state||(t.state=h.PENDING,t.isDerived?e.push(t):p.push(t))}function D(t){const e=f;let n;f=void 0;try{n=t()}finally{f=e}return n}const k=new WeakMap,T=new WeakMap;function O(t,n){try{t.destroy()}catch(t){}return Object.assign(new e("[Owl] Unhandled error. Destroying the root component"),{cause:n})}function C(t,e){if(!t)return!1;const n=t.fiber;n&&k.set(n,e);const o=T.get(t);if(o){let n=!1;const s=()=>O(t.app,e);for(let t=o.length-1;t>=0;t--)try{o[t](e,s),n=!0;break}catch(t){e=t}if(n)return!0}return C(t.parent,e)}function I(t){let{error:e}=t;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,k.set(t,e),t=t.parent}while(t);k.set(o.root,e)}if(!C(n,e))throw O(n.app,e)}function S(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 R={shouldNormalizeDom:!0,mainEventHandler:(t,e,n)=>("function"==typeof t?t(e):Array.isArray(t)&&(t=S(t).data)[0](t[1],e),!1)},P=document.createTextNode("");class M{key;child;parentEl;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;if(this.key===t.key)n.patch(o,e);else{const s=n.firstNode();s.parentElement.insertBefore(P,s),e&&n.beforeRemove(),n.remove(),o.mount(this.parentEl,P),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 A(t,e){return new M(t,e)}let j,B,$,L;if("undefined"!=typeof Element){({setAttribute:j,removeAttribute:B}=Element.prototype);const t=DOMTokenList.prototype;$=t.add,L=t.remove}const V=Array.isArray,{split:W,trim:F}=String.prototype,U=/\s+/;function q(t,e){switch(e){case!1:case void 0:B.call(this,t);break;case!0:j.call(this,t,"");break;default:j.call(this,t,e)}}function K(t){return function(e){q.call(this,t,e)}}function H(t){if(V(t))"class"===t[0]?G.call(this,t[1]):"style"===t[0]?tt.call(this,t[1]):q.call(this,t[0],t[1]);else for(let e in t)"class"===e?G.call(this,t[e]):"style"===e?tt.call(this,t[e]):q.call(this,e,t[e])}function X(t,e){if(V(t)){const n=t[0],o=t[1];if(n===e[0]){if(o===e[1])return;"class"===n?Z.call(this,o,e[1]):"style"===n?et.call(this,o,e[1]):q.call(this,n,o)}else B.call(this,e[0]),q.call(this,n,o)}else{for(let n in e)n in t||("class"===n?Z.call(this,"",e[n]):"style"===n?et.call(this,"",e[n]):B.call(this,n));for(let n in t){const o=t[n];o!==e[n]&&("class"===n?Z.call(this,o,e[n]):"style"===n?et.call(this,o,e[n]):q.call(this,n,o))}}}function z(t){const e={};switch(typeof t){case"string":const n=F.call(t);if(!n)return{};let o=W.call(n,U);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=F.call(n),!n)continue;const t=W.call(n,U);for(let n of t)e[n]=o}}return e;case"undefined":return{};case"number":return{[t]:!0};default:return{[t]:!0}}}function G(t){t=""===t?{}:z(t);const e=this.classList;for(let n in t)$.call(e,n)}function Z(t,e){e=""===e?{}:z(e),t=""===t?{}:z(t);const n=this.classList;for(let o in e)o in t||L.call(n,o);for(let o in t)o in e||$.call(n,o)}const J={};function Q(t){if(t in J)return J[t];const e=t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase());return J[t]=e,e}function Y(t){const e={};switch(typeof t){case"string":{const n=F.call(t);if(!n)return{};const o=n.split(";");for(let t of o){if(t=F.call(t),!t)continue;const n=t.indexOf(":");if(-1===n)continue;const o=F.call(t.slice(0,n)),s=F.call(t.slice(n+1));o&&s&&(e[o]=s)}return e}case"object":for(let n in t){const o=t[n];(o||0===o)&&(e[Q(n)]=String(o))}return e;default:return{}}}function tt(t){t=""===t?{}:Y(t);const e=this.style;for(let n in t)e.setProperty(n,t[n])}function et(t,e){e=""===e?{}:Y(e),t=""===t?{}:Y(t);const n=this.style;for(let o in e)o in t||n.removeProperty(o);for(let o in t)t[o]!==e[o]&&n.setProperty(o,t[o])}function nt(t){const e=t.split(".")[0],n=t.includes(".capture"),o=t.includes(".passive");return t.includes(".synthetic")?function(t,e=!1,n=!1){let o=`__event__synthetic_${t}`;e&&(o=`${o}_capture`);!function(t,e,n=!1,o=!1){if(it[e])return;document.addEventListener(t,t=>function(t,e){let n=e.target;for(;null!==n;){const o=n[t];if(o)for(const t of Object.values(o)){if(R.mainEventHandler(t,e,n))return}n=n.parentNode}}(e,t),{capture:n,passive:o}),it[e]=!0}(t,o,e,n);const s=st++;function i(t){const e=this[o]||{};e[s]=t,this[o]=e}function r(){delete this[o]}return{setup:i,update:i,remove:r}}(e,n,o):function(t,e=!1,n=!1){let o=`__event__${t}_${ot++}`;e&&(o=`${o}_capture`);function s(t){const e=t.currentTarget;if(!e||!function(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)}(e))return;const n=e[o];n&&R.mainEventHandler(n,t,e)}const i={capture:e,passive:n};function r(e){this[o]=e,this.addEventListener(t,s,i)}function l(){delete this[o],this.removeEventListener(t,s,i)}function a(t){this[o]=t}return{setup:r,update:a,remove:l}}(e,n,o)}let ot=1;let st=1;const it={};let rt,lt,at;if("undefined"!=typeof Node){const t=Node.prototype;rt=t.insertBefore,lt=(ct=t,ut="textContent",Object.getOwnPropertyDescriptor(ct,ut)).set,at=t.removeChild}var ct,ut;class ht{children;anchors;parentEl;isOnlyChild;constructor(t){this.children=t}mount(t,e){const n=this.children,o=n.length,s=new Array(o);for(let i=0;i<o;i++){let o=n[i];if(o)o.mount(t,e);else{const n=document.createTextNode("");s[i]=n,rt.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,i=n.length;s<i;s++){let i=n[s];if(i)i.moveBeforeDOMNode(t,e);else{const n=o[s];rt.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,i=n.length;t<i;t++){let i=n[t];if(i)i.moveBeforeVNode(null,e);else{const n=s[t];rt.call(o,n,e)}}}patch(t,e){if(this===t)return;const n=this.children,o=t.children,s=this.anchors,i=this.parentEl;for(let t=0,r=n.length;t<r;t++){const r=n[t],l=o[t];if(r)if(l)r.patch(l,e);else{const o=r.firstNode(),l=document.createTextNode("");s[t]=l,rt.call(i,l,o),e&&r.beforeRemove(),r.remove(),n[t]=void 0}else if(l){n[t]=l;const e=s[t];l.mount(i,e),at.call(i,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)lt.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():at.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 dt(t){return new ht(t)}let ft,pt,mt;if("undefined"!=typeof Node){const t=Node.prototype;ft=t.insertBefore,mt=t.removeChild,pt=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(CharacterData.prototype,"data").set}class gt{text;parentEl;el;constructor(t){this.text=t}mountNode(t,e,n){this.parentEl=e,ft.call(e,t,n),this.el=t}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,ft.call(e,this.el,t)}moveBeforeVNode(t,e){ft.call(this.parentEl,this.el,t?t.el:e)}beforeRemove(){}remove(){mt.call(this.parentEl,this.el)}firstNode(){return this.el}toString(){return this.text}}class yt extends gt{mount(t,e){this.mountNode(document.createTextNode(Nt(this.text)),t,e)}patch(t){const e=t.text;this.text!==e&&(pt.call(this.el,Nt(e)),this.text=e)}}class vt extends gt{mount(t,e){this.mountNode(document.createComment(Nt(this.text)),t,e)}patch(){}}function bt(t){return new yt(t)}function wt(t){return new vt(t)}function Nt(t){switch(typeof t){case"string":return t;case"number":return String(t);case"boolean":return t?"true":"false";default:return t||""}}const Et=(t,e)=>Object.getOwnPropertyDescriptor(t,e);let xt,_t,Dt,kt,Tt;"undefined"!=typeof Node&&(xt=Node.prototype,_t=Element.prototype,Dt=Et(CharacterData.prototype,"data").set,kt=Et(xt,"firstChild").get,Tt=Et(xt,"nextSibling").get);const Ot=()=>{};function Ct(t){return function(e){this[t]=0===e?0:e?e.valueOf():""}}const It={};function St(t){if(t in It)return It[t];const e=(new DOMParser).parseFromString(`<t>${t}</t>`,"text/xml").firstChild.firstChild;R.shouldNormalizeDom&&Rt(e);const n=Pt(e),o=jt(n),s=function(t,e){let n=function(t,e){const{refN:n,collectors:o,children:s,locations:i,cbRefs:r}=e;i.sort((t,e)=>t.idx-e.idx);const l=i.length,a=s.length,c=n>0,u=i.map(t=>t.refIdx),h=i.map(t=>t.setData),d=i.map(t=>t.updateData),f=[Tt,kt],p=o.length,m=o.map(t=>32767&t.idx|(32767&t.prevIdx)<<15|(t.getVal===kt?1:0)<<30),g=s.map(t=>32767&t.parentRefIdx|(t.isOnlyChild?1:0)<<15|(32767&(t.afterRefIdx??0))<<16),y=xt.cloneNode,v=xt.insertBefore,b=_t.remove;class w{el;parentEl;data;children;refs;constructor(t){this.data=t}beforeRemove(){}remove(){b.call(this.el)}firstNode(){return this.el}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e,v.call(e,this.el,t)}moveBeforeVNode(t,e){v.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=y.call(t,!0);v.call(e,o,n),this.el=o,this.parentEl=e}patch(t,e){}}c&&(w.prototype.mount=function(e,o){const s=y.call(t,!0),i=new Array(n);this.refs=i,i[0]=s;for(let t=0;t<p;t++){const e=m[t];i[32767&e]=f[e>>30&1].call(i[e>>15&32767])}if(l){const t=this.data;for(let e=0;e<l;e++)h[e].call(i[u[e]],t[e])}if(a){const t=this.children;for(let e=0;e<a;e++){const n=t[e];if(n){const t=g[e],o=t>>16&32767,s=o?i[o]:null;n.isOnlyChild=!!(32768&t),n.mount(i[32767&t],s)}}}if(v.call(e,s,o),this.el=s,this.parentEl=e,r.length){const t=this.data,e=this.refs;for(let n of r){(0,t[n])(e[u[n]],null)}}},w.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],i=o[t];s!==i&&d[t].call(n[u[t]],i,s)}this.data=o}if(a){let o=this.children;const s=t.children;for(let t=0;t<a;t++){const i=o[t],r=s[t];if(i)r?i.patch(r,e):(e&&i.beforeRemove(),i.remove(),o[t]=void 0);else if(r){const e=g[t],s=e>>16&32767,i=s?n[s]:null;r.mount(n[32767&e],i),o[t]=r}}}},w.prototype.remove=function(){if(r.length){const t=this.data,e=this.refs;for(let n of r){(0,t[n])(null,e[u[n]])}}b.call(this.el)});return w}(t,e);if(e.children.length)return n=class extends n{children;constructor(t,e){super(t),this.children=e}},n.prototype.beforeRemove=ht.prototype.beforeRemove,(t,e=[])=>new n(t,e);return t=>new n(t)}(n.el,o);return It[t]=s,s}function Rt(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)Rt(t.childNodes.item(e))}else t.remove()}function Pt(t,n=null,o=null){switch(t.nodeType){case Node.ELEMENT_NODE:{let e=o&&o.currentNS;const s=t.tagName;let i;const r=[];if(s.startsWith("block-text-")){const t=parseInt(s.slice(11),10);r.push({type:"text",idx:t}),i=document.createTextNode("")}if(s.startsWith("block-child-")){o.isRef||Mt(o);const t=parseInt(s.slice(12),10);r.push({type:"child",idx:t}),i=document.createTextNode("")}if(e||=t.namespaceURI,i||(i=e?document.createElementNS(e,s):document.createElement(s)),i instanceof Element){if(!o){document.createElement("template").content.appendChild(i)}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);r.push({type:"handler",idx:t,event:o})}else if(n.startsWith("block-attribute-")){const t=parseInt(n.slice(16),10);r.push({type:"attribute",idx:t,name:o,tag:s})}else if(n.startsWith("block-property-")){const t=parseInt(n.slice(15),10);r.push({type:"property",idx:t,name:o,tag:s})}else"block-attributes"===n?r.push({type:"attributes",idx:parseInt(o,10)}):"block-ref"===n?r.push({type:"ref",idx:parseInt(o,10)}):i.setAttribute(e[t].name,o)}}const l={parent:n,firstChild:null,nextSibling:null,el:i,info:r,refN:0,currentNS:e};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);r.push({idx:n,type:"child",isOnlyChild:!0})}else{l.firstChild=Pt(t.firstChild,l,l),i.appendChild(l.firstChild.el);let e=t.firstChild,n=l.firstChild;for(;e=e.nextSibling;)n.nextSibling=Pt(e,n,l),i.appendChild(n.nextSibling.el),n=n.nextSibling}}return l.info.length&&Mt(l),l}case Node.TEXT_NODE:case Node.COMMENT_NODE:return{parent:n,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 e("boom")}function Mt(t){t.isRef=!0;do{t.refN++}while(t=t.parent)}function At(t){let e=t.parent;for(;e&&e.nextSibling===t;)t=e,e=e.parent;return e}function jt(t,e,n){if(!e){e={collectors:[],locations:[],children:new Array(t.info.filter(t=>"child"===t.type).length),cbRefs:[],refN:t.refN},n=0}if(t.refN){const o=n,s=t.isRef,i=t.firstChild?t.firstChild.refN:0,r=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:Bt,updateData:Bt});break;case"child":n.isOnlyChild?t.children[n.idx]={parentRefIdx:n.refIdx,isOnlyChild:!0}:t.children[n.idx]={parentRefIdx:At(e).refIdx,afterRefIdx:n.refIdx};break;case"property":{const e=n.refIdx,o=Ct(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=G,o=Z):"style"===n.name?(s=tt,o=et):(s=K(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:H,updateData:X});break;case"handler":{const{setup:e,update:o}=nt(n.event);t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:e,updateData:o});break}case"ref":t.locations.push({idx:n.idx,refIdx:n.refIdx,setData:Ot,updateData:Ot}),t.cbRefs.push(n.idx)}}(e,t),n++}if(r){const s=n+i;e.collectors.push({idx:s,prevIdx:o,getVal:Tt}),jt(t.nextSibling,e,s)}i&&(e.collectors.push({idx:n,prevIdx:o,getVal:kt}),jt(t.firstChild,e,n))}return e}function Bt(t){Dt.call(this,Nt(t))}let $t,Lt,Vt,Wt,Ft,Ut;if("undefined"!=typeof Node){const t=Node.prototype;$t=t.insertBefore,Lt=t.appendChild,Vt=t.removeChild,Wt=((t,e)=>Object.getOwnPropertyDescriptor(t,e))(t,"textContent").set}class qt{children;anchor;parentEl;isOnlyChild;constructor(t){this.children=t}mount(t,e){const n=this.children,o=document.createTextNode("");this.anchor=o,$t.call(t,o,e);const s=n.length;if(s){const e=n[0].mount;for(let i=0;i<s;i++)e.call(n[i],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:i,patch:r,remove:l,beforeRemove:a,moveBeforeVNode:c,firstNode:u}=s,h=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 Wt.call(f,""),void Lt.call(f,h)}let p,m=0,g=0,y=n[0],v=o[0],b=n.length-1,w=o.length-1,N=n[b],E=o[w];for(;m<=b&&g<=w;){if(null===y){y=n[++m];continue}if(null===N){N=n[--b];continue}let t=y.key,s=v.key;if(t===s){r.call(y,v,e),o[g]=y,y=n[++m],v=o[++g];continue}let l=N.key,a=E.key;if(l===a){r.call(N,E,e),o[w]=N,N=n[--b],E=o[--w];continue}if(t===a){r.call(y,E,e),o[w]=y;const t=o[w+1];c.call(y,t,h),y=n[++m],E=o[--w];continue}if(l===s){r.call(N,v,e),o[g]=N;const t=n[m];c.call(N,t,h),N=n[--b],v=o[++g];continue}p=p||Ht(n,m,b);let d=p[s];if(void 0===d)i.call(v,f,u.call(y)||null);else{const t=n[d];c.call(t,y,null),r.call(t,v,e),o[g]=t,n[d]=null}v=o[++g]}if(m<=b||g<=w)if(m>b){const t=o[w+1],e=t?u.call(t)||null:h;for(let t=g;t<=w;t++)i.call(o[t],f,e)}else for(let t=m;t<=b;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)Wt.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])}Vt.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 Kt(t){return new qt(t)}function Ht(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;Ft=t.insertBefore,Ut=t.removeChild}class Xt{html;parentEl;content=[];constructor(t){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)Ft.call(t,n,e);if(!this.content.length){const n=document.createTextNode("");this.content.push(n),Ft.call(t,n,e)}}moveBeforeDOMNode(t,e=this.parentEl){this.parentEl=e;for(let n of this.content)Ft.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 i=[...s.content.childNodes];for(let t of i)Ft.call(n,t,o);if(!i.length){const t=document.createTextNode("");i.push(t),Ft.call(n,t,o)}this.remove(),this.content=i,this.html=t.html}}beforeRemove(){}remove(){const t=this.parentEl;for(let e of this.content)Ut.call(t,e)}firstNode(){return this.content[0]}toString(){return this.html}}function zt(t){return new Xt(t)}function Gt(t,e,n=null){t.mount(e,n)}function Zt(){throw new e("Attempted to render cancelled fiber")}function Jt(t){let e=0;for(let n of t){let t=n.node;n.render=Zt,0===t.status&&t.cancel(),t.fiber=null,n.bdom?t.forceNextRender=!0:e++,e+=Jt(n.children)}return e}class Qt{node;bdom=null;root;parent;children=[];appliedToDom=!1;deep=!1;childrenMap={};constructor(t,e){if(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){const n=b();E(t.signalComputation),w(t.signalComputation);try{this.bdom=!0,this.bdom=t.renderFn()}catch(e){t.app.handleError({node:t,error:e})}w(n),e.setCounter(e.counter-1)}}}class Yt extends Qt{counter=1;willPatch=[];patched=[];mounted=[];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 te extends Yt{target;position;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)Gt(e.bdom,this.target);else{const t=this.target.childNodes[0];Gt(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})}}}class ee{el;app;fiber=null;component;bdom=null;status=0;forceNextRender=!1;parentKey;props;defaultProps={};renderFn;parent;children=Object.create(null);willStart=[];willUpdateProps=[];willUnmount=[];mounted=[];willPatch=[];patched=[];willDestroy=[];signalComputation;computations=[];pluginManager;constructor(t,e,o,s,i){this.app=o,this.parent=s,this.parentKey=i,this.pluginManager=s?s.pluginManager:o.pluginManager,this.signalComputation=m(()=>this.render(!1),!1,h.EXECUTED),this.props=e,n.push({type:"component",app:o,componentName:t.name,node:this,get status(){return this.node.status}});const r=b();w(void 0),this.component=new t(this);const l={this:this.component,__owl__:this};this.renderFn=o.getTemplate(t.template).bind(this.component,l,this),this.component.setup(),w(r),n.length=0}mountComponent(t,e){const n=new te(this,t,e);this.app.scheduler.addFiber(n);let o=b();this.initiateRender(n),w(o)}async initiateRender(t){this.fiber=t,this.mounted.length&&t.root.mounted.push(t);const e=this.component;let n=b();w(void 0);try{let t=this.willStart.map(t=>t.call(e));w(n),await Promise.all(t)}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&&!k.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-Jt(e.children)),t.locked=!1,e.children=[],e.childrenMap={},e.bdom=null,k.has(e)&&(k.delete(e),k.delete(t),e.appliedToDom=!1,e instanceof Yt&&(e.mounted=e instanceof te?[e]:[])),e}const n=new Yt(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 in this.children)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})}for(const t of this.computations)x(t);x(this.signalComputation),this.status=3}async updateAndRender(t,e){t=Object.assign({},t);for(const e in this.defaultProps)void 0===t[e]&&(t[e]=this.defaultProps[e]);const n=function(t,e){let n=t.fiber;return n&&(Jt(n.children),n.root=null),new Qt(t,e)}(this,e);this.fiber=n;const o=this.component;let s=b();w(void 0);let i=this.willUpdateProps.map(e=>e.call(o,t));if(w(s),await Promise.all(i),n!==this.fiber)return;this.props=t,n.render();const r=e.root;this.willPatch.length&&r.willPatch.push(n),this.patched.length&&r.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}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()}_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()}}function ne(t){const e=m(()=>(w(void 0),oe(e),w(e),t()),!1);return b()?.observers.add(e),N(e),function(){const t=b();w(void 0),oe(e),w(t)}}function oe(t){E(t),function(t){const e=t.value;e&&"function"==typeof e&&(e(),t.value=void 0)}(t);for(const e of t.observers)e.state=h.EXECUTED,E(e),oe(e);t.observers.clear()}class se{static _shadowId;static get id(){return this._shadowId??this.name}static set id(t){this._shadowId=t}__owl__;constructor(t){this.__owl__=t}setup(){}}class ie{app;config;onDestroyCb=[];computations=[];plugins;status=0;constructor(t,e={}){if(this.app=t,this.config=e.config??{},e.parent){const t=e.parent;t.onDestroyCb.push(()=>this.destroy()),this.plugins=Object.create(t.plugins)}else this.plugins={}}destroy(){const t=this.onDestroyCb;for(;t.length;)t.pop()();for(const t of this.computations)x(t);this.status=3}getPluginById(t){return this.plugins[t]||null}getPlugin(t){return this.getPluginById(t.id)}startPlugin(t){if(!t.id)throw new e(`Plugin "${t.name}" has no id`);if(this.plugins.hasOwnProperty(t.id)){const n=this.getPluginById(t.id).constructor;if(n!==t)throw new e(`Trying to start a plugin with the same id as an other plugin (id: '${t.id}', existing plugin: '${n.name}', starting plugin: '${t.name}')`);return null}const n=new t(this);return this.plugins[t.id]=n,n.setup(),n}startPlugins(t){n.push({type:"plugin",app:this.app,manager:this,get status(){return this.manager.status}});try{for(const e of t)this.startPlugin(e)}finally{n.pop()}this.status=1}}function re(t,e){Array.isArray(e)?t.startPlugins(e):t.onDestroyCb.push(ne(()=>{const n=e.items();D(()=>t.startPlugins(n))}))}const le=Symbol("Key changes"),ae=Object.prototype.toString,ce=Object.prototype.hasOwnProperty;function ue(t){if("object"!=typeof t||null===t)return!1;const e=pe(t);return!!(Array.isArray(e)||e instanceof Set||e instanceof Map||e instanceof WeakMap)||"[object Object]"===ae.call(e)}function he(t,e){return!e&&ue(t)?Ne(t):t}const de=new WeakSet;function fe(t){return de.add(t),t}function pe(t){return ve.has(t)?ve.get(t):t}const me=new WeakMap;function ge(t,e,n){g(n??function(t,e){let n=me.get(t);n||(n=new Map,me.set(t,n));let o=n.get(e);return o||(o={value:void 0,observers:new Set},n.set(e,o)),o}(t,e))}function ye(t,e,n){if(!n){const o=me.get(t);if(!o)return;if(!o.has(e))return;n=o.get(e)}y(n)}const ve=new WeakMap,be=new WeakMap;function we(t,n){if(!ue(t))throw new e("Cannot make the given value reactive");if(de.has(t))return t;if(ve.has(t))return t;const o=be.get(t);if(o)return o;let s;s=t instanceof Map?Ce(t,"Map",n):t instanceof Set?Ce(t,"Set",n):t instanceof WeakMap?Ce(t,"WeakMap",n):Ee(n);const i=new Proxy(t,s);return be.set(t,i),ve.set(i,t),i}function Ne(t){return we(t,null)}function Ee(t){return{get(e,n,o){ge(e,n,t);const s=Reflect.get(e,n,o);if(t||"object"!=typeof s||null===s)return s;if(!ue(s))return s;const i=Object.getOwnPropertyDescriptor(e,n);return!i||i.writable||i.configurable?we(s,null):s},set(e,n,o,s){const i=ce.call(e,n),r=Reflect.get(e,n,s),l=Reflect.set(e,n,pe(o),s);return!i&&ce.call(e,n)&&ye(e,le,t),(r!==Reflect.get(e,n,s)||"length"===n&&Array.isArray(e))&&ye(e,n,t),l},deleteProperty(e,n){const o=Reflect.deleteProperty(e,n);return ye(e,le,t),ye(e,n,t),o},ownKeys:e=>(ge(e,le,t),Reflect.ownKeys(e)),has:(e,n)=>(ge(e,le,t),Reflect.has(e,n))}}function xe(t,e,n){return o=>(o=pe(o),ge(e,o,n),he(e[t](o),n))}function _e(t,e,n){return function*(){ge(e,le,n);const o=e.keys();for(const s of e[t]()){const t=o.next().value;ge(e,t,n),yield he(s,n)}}}function De(t,e){return function(n,o){ge(t,le,e),t.forEach(function(s,i,r){ge(t,i,e),n.call(o,he(s,e),he(i,e),he(r,e))},o)}}function ke(t,e,n,o){return(s,i)=>{s=pe(s);const r=n.has(s),l=n[e](s),a=n[t](s,i);return r!==n.has(s)&&ye(n,le,o),l!==n[e](s)&&ye(n,s,o),a}}function Te(t,e){return()=>{const n=[...t.keys()];t.clear(),ye(t,le,e);for(const o of n)ye(t,o,e)}}const Oe={Set:(t,e)=>({has:xe("has",t,e),add:ke("add","has",t,e),delete:ke("delete","has",t,e),keys:_e("keys",t,e),values:_e("values",t,e),entries:_e("entries",t,e),[Symbol.iterator]:_e(Symbol.iterator,t,e),forEach:De(t,e),clear:Te(t,e),get size(){return ge(t,le,e),t.size}}),Map:(t,e)=>({has:xe("has",t,e),get:xe("get",t,e),set:ke("set","get",t,e),delete:ke("delete","has",t,e),keys:_e("keys",t,e),values:_e("values",t,e),entries:_e("entries",t,e),[Symbol.iterator]:_e(Symbol.iterator,t,e),forEach:De(t,e),clear:Te(t,e),get size(){return ge(t,le,e),t.size}}),WeakMap:(t,e)=>({has:xe("has",t,e),get:xe("get",t,e),set:ke("set","get",t,e),delete:ke("delete","has",t,e)})};function Ce(t,e,n){const o=Oe[e](t,n);return Object.assign(Ee(n),{get:(t,e)=>ce.call(o,e)?o[e]:(ge(t,e,n),he(t[e],n))})}let Ie;"undefined"!=typeof window&&(Ie=window.requestAnimationFrame.bind(window));class Se{static requestAnimationFrame=Ie;tasks=new Set;requestAnimationFrame;frame=0;delayedRenders=[];cancelledNodes=new Set;processing=!1;constructor(){this.requestAnimationFrame=Se.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=k.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)}}class Re{static template="";__owl__;constructor(t){this.__owl__=t}setup(){}}const Pe=Object.create;class Me{fn;ctx;component;node;key;constructor(t,e,n,o,s){this.fn=t,this.ctx=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()}}const Ae={withDefault:function(t,e){return null==t||!1===t?e:t},zero:Symbol("zero"),callSlot:function(t,e,n,o,s,i,r){n=n+"__slot_"+o;const l=t.__owl__.props.slots||{},{__render:a,__ctx:c,__scope:u}=l[o]||{},h=Pe(c||{});u&&(h[u]=i);const d=a?a(h,e,n):null;if(r){let i,l;return d?i=s?A(o,d):d:l=r(t,e,n),dt([i,l])}return d||bt("")},withKey:function(t,e){return t.key=e,t},prepareList:function(t){let n,o;if(Array.isArray(t))n=t,o=t;else if(t instanceof Map)n=[...t.keys()],o=[...t.values()];else if(Symbol.iterator in Object(t))n=[...t],o=n;else{if(!t||"object"!=typeof t)throw new e(`Invalid loop expression: "${t}" is not iterable`);o=Object.values(t),n=Object.keys(t)}const s=o.length;return[n,o,s,new Array(s)]},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},LazyValue:Me,safeOutput:function(t,e){if(null==t)return e?A("default",e):A("undefined",bt(""));let n,o;return t instanceof a?(n="string_safe",o=zt(t)):t instanceof Me?(n="lazy_value",o=t.evaluate()):(n="string_unsafe",o=bt(t)),A(n,o)},createCatcher:function(t){const e=Object.keys(t).length;class n{child;handlerData;handlerFns=[];parentEl;afterNode=null;constructor(t,e){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=nt(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,e){const n=e.target;let i=s.child.firstNode();const r=s.afterNode;for(;i&&i!==r;){if(i.contains(n))return o(t,e);i=i.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:fe,OwlError:e,createRef:function(t){if(!t)throw new e("Ref is undefined or null");let n,o;if(t.add&&t.delete)n=t.add.bind(t),o=t.delete.bind(t);else{if(!t.set)throw new e("Ref should implement either a 'set' function or 'add' and 'delete' functions");n=t.set.bind(t),o=()=>t.set(null)}return(t,e)=>{e&&o(e),t&&n(t)}},modelExpr:function(t){if("function"!=typeof t||"function"!=typeof t.set)throw new e("Invalid t-model expression: expression should evaluate to a function with a 'set' method defined on it");return t},createComponent:function(t,n,o,s,i,r){const l=!o;let a;const c=0===r.length;a=s?(t,e)=>!0:i?function(t,e){for(let n in t)if(t[n]!==e[n])return!0;return Object.keys(t).length!==Object.keys(e).length}:c?(t,e)=>!1:function(t,e){for(let n of r)if(t[n]!==e[n])return!0;return!1};const u=ee.prototype.updateAndRender,h=ee.prototype.initiateRender;return(s,i,r,c,d)=>{let f=r.children,p=f[i];l&&p&&p.component.constructor!==d&&(p=void 0);const m=r.fiber;if(p)(a(p.props,s)||m.deep||p.forceNextRender)&&(p.forceNextRender=!1,u.call(p,s,m));else{if(o){const t=c.constructor.components;if(!t)throw new e(`Cannot find the definition of component "${n}", missing static components key in parent`);if(!(d=t[n]))throw new e(`Cannot find the definition of component "${n}"`);if(!(d.prototype instanceof Re))throw new e(`"${n}" is not a Component. It must inherit from the Component class`)}p=new ee(d,s,t,r,i),f[i]=p,h.call(p,new Qt(p,m))}return m.childrenMap[i]=p,p}},callTemplate:function(t,e,n,o,s,i){return A(t,n.getTemplate(t).call(e,o,s,i+t))},callHandler:function(t,n,o){if("function"!=typeof t)throw new e(`Invalid handler expression: the \`t-on\` expression should evaluate to a function, but got '${typeof t}'. Did you mean to use an arrow function? (e.g. \`t-on-click="() => expr"\`)`);t.call(n.this,o)}},je={text:bt,createBlock:St,list:Kt,multi:dt,html:zt,toggler:A,comment:wt};class Be{static registerTemplate(t,e){$e[t]=e}dev;rawTemplates=Object.create($e);templates={};getRawTemplate;translateFn;translatableAttributes;customDirectives;runtimeUtils;hasGlobalValues;constructor(t={}){if(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={...Ae,__globals__:t.globalValues||{}},this.hasGlobalValues=Boolean(t.globalValues&&Object.keys(t.globalValues).length)}addTemplate(t,n){if(t in this.rawTemplates){if(!this.dev)return;const o=this.rawTemplates[t];if(("string"==typeof o?o:o instanceof Element?o.outerHTML:o.toString())===("string"==typeof n?n:n.outerHTML))return;throw new e(`Template ${t} already defined with different content`)}this.rawTemplates[t]=n}addTemplates(t){if(t){t=t instanceof Document?t:function(t){const n=(new DOMParser).parseFromString(t,"text/xml");if(n.getElementsByTagName("parsererror").length){let o="Invalid XML in template.";const s=n.getElementsByTagName("parsererror")[0].textContent;if(s){o+="\nThe parser has produced the following error message:\n"+s;const e=/\d+/g,n=e.exec(s);if(n){const i=Number(n[0]),r=t.split("\n")[i-1],l=e.exec(s);if(r&&l){const t=Number(l[0])-1;r[t]&&(o+=`\nThe error might be located at xml line ${i} column ${t}\n${r}\n${"-".repeat(t-1)}^`)}}}throw new e(o)}return n}(t);for(const e of t.querySelectorAll("[t-name]")){const t=e.getAttribute("t-name");this.addTemplate(t,e)}}}getTemplate(t){const n=t;if(!(n in this.templates)){const s=this.getRawTemplate?.(t)||this.rawTemplates[t];if(void 0===s){let n="";try{const{componentName:t}=o("component");n=` (for component "${t}")`}catch{}throw new e(`Missing template: "${t}"${n}`)}const i="function"==typeof s&&!(s instanceof Element)?s:this._compileTemplate(t,s),r=this.templates;this.templates[n]=function(t,e){return r[n].call(this,t,e)};const l=i(this,je,this.runtimeUtils);this.templates[n]=l}return this.templates[n]}_compileTemplate(t,n){throw new e("Unable to compile a template. Please use owl full build instead")}}const $e={};function Le(...t){const e="__template__"+Le.nextId++,n=String.raw(...t);return $e[e]=n,e}Le.nextId=1;let Ve=!1;const We=new Set;"undefined"!=typeof window&&(window.__OWL_DEVTOOLS__||={apps:We,Fiber:Qt,RootFiber:Yt,toRaw:pe,proxy:Ne});class Fe extends Be{static validateTarget=r;static apps=We;static version="3.0.0-alpha.21";name;scheduler=new Se;roots=new Set;pluginManager;constructor(t={}){super(t),this.name=t.name||"",We.add(this),this.pluginManager=new ie(this,{config:t.config}),t.plugins&&re(this.pluginManager,t.plugins),t.test&&(this.dev=!0),!this.dev||t.test||Ve||(console.info("Owl is running in 'dev' mode."),Ve=!0)}createRoot(t,e={}){const o=e.props||{};let s,i;const r=new Promise((t,e)=>{s=t,i=e}),l=function(){const t=n.slice();return()=>{n=t}}();let a,c=null;try{a=new ee(t,o,this,null,null)}catch(t){c=t,i(t)}finally{l()}const u={node:a,promise:r,mount:(t,e)=>(c||(Fe.validateTarget(t),this.mountNode(a,t,s,i,e)),r),destroy:()=>{this.roots.delete(u),a.destroy(),this.scheduler.processTasks()}};return this.roots.add(u),u}mountNode(t,e,n,o,s){let i=T.get(t);i||(i=[],T.set(t,i)),i.unshift((t,e)=>{const n=e();o(n)}),t.mounted.push(()=>{n(t.component),i.shift()}),t.mountComponent(e,s)}destroy(){for(let t of this.roots)t.destroy();this.pluginManager.destroy(),this.scheduler.processTasks(),We.delete(this)}handleError(...t){return I(...t)}}function Ue(t,e,n){const o=e.bind(t.component);if(t.app.dev){const t=e.name?` <${e.name}>`:"";Reflect.defineProperty(o,"name",{value:n+t})}return o}function qe(t){const e=o();"component"===e.type?e.node.willDestroy.unshift(Ue(e.node,t,"onWillDestroy")):e.manager.onDestroyCb.push(t)}function Ke(t,e={}){const o=m(()=>{const e=t();return Object.is(o.value,e)||y(o),e},!0);function s(){return o.state!==h.EXECUTED&&N(o),g(o),o.value}s[d]=o,s.set=e.set??(()=>{});const i=n.at(-1);return i&&("component"===i.type?i.node.computations.push(o):"plugin"===i.type&&i.manager.computations.push(o)),s}function He(t,e){const n={type:"signal",value:t,observers:new Set};let o=e(n);const s=()=>(g(n),o);return s[d]=n,s.set=function(t){Object.is(n.value,t)||(n.value=t,o=e(n),y(n))},s}function Xe(t){return He(t,t=>t.value)}function ze(t,n,o="Value does not match the type"){const s=Ze(t,n);if(s.length){const t=JSON.stringify(s,(t,e)=>"function"==typeof e?e.name:e,2);throw new e(`${o}\n${t}`)}}function Ge(t,e,n,o){return{issueDepth:0,path:n,value:e,get isValid(){return!t.length},addIssue(e){t.push({received:this.value,path:this.path,...e})},mergeIssues(e){t.push(...e)},validate(t){t(this),!this.isValid&&o&&(o.issueDepth=this.issueDepth+1)},withIssues(t){return Ge(t,this.value,this.path,this)},withKey(e){return Ge(t,this.value[e],this.path.concat(e),this)}}}function Ze(t,e){const n=[];return e(Ge(n,t,[])),n}Xe.invalidate=function(t){if("function"!=typeof t||"signal"!==t[d]?.type)throw new e(`Value is not a signal (${t})`);y(t[d])},Xe.Array=function(t){return He(t,t=>we(t.value,t))},Xe.Map=function(t){return He(t,t=>we(t.value,t))},Xe.Object=function(t){return He(t,t=>we(t.value,t))},Xe.Set=function(t){return He(t,t=>we(t.value,t))};function Je(t){return function(e){e.value instanceof t||e.addIssue({message:`value is not an instance of '${t.name}'`})}}function Qe(t){return function(e){e.value!==t&&e.addIssue({message:`value is not equal to ${"string"==typeof t?`'${t}'`:t}`})}}function Ye(t,e,n){if("object"!=typeof t.value||Array.isArray(t.value)||null===t.value)return void t.addIssue({message:"value is not an object"});if(!e)return;const o=!Array.isArray(e);let s=e;if(Array.isArray(e)){s={};for(const t of e)s[t]=null}const i=[];for(const e in s){const n=e.endsWith("?")?e.slice(0,-1):e;void 0!==t.value[n]?o&&t.withKey(n).validate(s[e]):e.endsWith("?")||i.push(n)}if(i.length&&t.addIssue({message:"object value has missing keys",missingKeys:i}),n){const e=[];for(const n in t.value)n in s||`${n}?`in s||e.push(n);e.length&&t.addIssue({message:"object value has unknown keys",unknownKeys:e})}}function tn(t){return function(e){let n=0;const o=[];for(const s of t){const t=e.withIssues(o);if(t.validate(s),o.length===n||t.issueDepth>0)return void e.mergeIssues(o.slice(n));n=o.length}e.addIssue({message:"value does not match union type",subIssues:o})}}const en={and:function(t){return function(e){for(const n of t)e.validate(n)}},any:function(){},array:function(t){return function(e){if(Array.isArray(e.value)){if(t)for(let n=0;n<e.value.length;n++)e.withKey(n).validate(t)}else e.addIssue({message:"value is not an array"})}},boolean:function(t){"boolean"!=typeof t.value&&t.addIssue({message:"value is not a boolean"})},constructor:function(t){return function(e){"function"==typeof e.value&&(e.value===t||e.value.prototype instanceof t)||e.addIssue({message:`value is not '${t.name}' or an extension`})}},customValidator:function(t,e,n="value does not match custom validation"){return function(o){o.validate(t),o.isValid&&(e(o.value)||o.addIssue({message:n}))}},function:function(t=[],e=void 0){return function(t){"function"!=typeof t.value&&t.addIssue({message:"value is not a function"})}},instanceOf:Je,literal:Qe,number:function(t){"number"!=typeof t.value&&t.addIssue({message:"value is not a number"})},object:function(t={}){return function(e){Ye(e,t,!1)}},or:tn,promise:function(t){return function(t){t.value instanceof Promise||t.addIssue({message:"value is not a promise"})}},record:function(t){return function(e){if("object"!=typeof e.value||Array.isArray(e.value)||null===e.value)e.addIssue({message:"value is not an object"});else if(t)for(const n in e.value)e.withKey(n).validate(t)}},ref:function(t){return tn([Qe(null),Je(t)])},selection:function(t){return tn(t.map(Qe))},signal:function(t){return function(t){"function"==typeof t.value&&t.value[d]||t.addIssue({message:"value is not a reactive value"})}},strictObject:function(t){return function(e){Ye(e,t,!0)}},string:function(t){"string"!=typeof t.value&&t.addIssue({message:"value is not a string"})},tuple:function(t){return function(e){if(Array.isArray(e.value))if(e.value.length===t.length)for(let n=0;n<t.length;n++)e.withKey(n).validate(t[n]);else e.addIssue({message:"tuple value does not have the correct length"});else e.addIssue({message:"value is not an array"})}}};function nn(t){qe(ne(t))}R.shouldNormalizeDom=!1,R.mainEventHandler=(t,n,o)=>{const{data:s,modifiers:i}=S(t);t=s;let r=!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 r;case"prevent":(t&&e||!t)&&n.preventDefault();continue;case"stop":(t&&e||!t)&&n.stopPropagation(),r=!0;continue}}if(Object.hasOwnProperty.call(t,0)){const o=t[0];if("function"!=typeof o)throw new e(`Invalid handler (expected a function, received: '${o}')`);let s=t[1]?t[1].__owl__:null;s&&1!==s.status||o(t[1],n)}return r};const on={config:R,mount:Gt,patch:function(t,e,n=!1){t.patch(e,n)},remove:function(t,e=!1){e&&t.beforeRemove(),t.remove()},list:Kt,multi:dt,text:bt,toggler:A,createBlock:St,html:zt,comment:wt},sn={version:Fe.version};t.App=Fe,t.Component=Re,t.EventBus=l,t.OwlError=e,t.Plugin=se,t.Registry=class{_map=Xe.Object(Object.create(null));_name;_validation;constructor(t={}){this._name=t.name||"registry",this._validation=t.validation}entries=Ke(()=>Object.entries(this._map()).sort((t,e)=>t[1][0]-e[1][0]).map(([t,e])=>[t,e[1]]));items=Ke(()=>this.entries().map(t=>t[1]));addById(t,n={}){if(!t.id)throw new e(`Item should have an id key (registry '${this._name}')`);return this.add(t.id,t,{sequence:n.sequence??50})}add(t,e,n={}){if(this._validation){const n=this._name?` (registry '${this._name}', key: '${t}')`:` (key: '${t}')`;ze(e,this._validation,`Registry entry does not match the type${n}`)}return this._map()[t]=[n.sequence??50,e],this}get(t,e){const n=t in this._map();if(!n&&arguments.length<2)throw new Error(`KeyNotFoundError: Cannot find key "${t}" (registry '${this._name}')`);return n?this._map()[t][1]:e}delete(t){delete this._map()[t]}has(t){return t in this._map()}},t.Resource=class{_items=Xe.Array([]);_name;_validation;constructor(t={}){this._name=t.name,this._validation=t.validation}items=Ke(()=>this._items().sort((t,e)=>t[0]-e[0]).map(t=>t[1]));add(t,e={}){if(this._validation){const e=this._name?` (resource '${this._name}')`:"";ze(t,this._validation,`Resource item does not match the type${e}`)}return this._items().push([e.sequence??50,t]),this}delete(t){const e=this._items().filter(([e,n])=>n!==t);return this._items.set(e),this}has(t){return this._items().some(([e,n])=>n===t)}},t.__info__=sn,t.assertType=ze,t.batched=i,t.blockDom=on,t.computed=Ke,t.config=function(t,e){const{app:n,manager:s}=o("plugin");return n.dev&&e&&ze(s.config,en.object({[t]:e}),"Config does not match the type"),s.config[t.endsWith("?")?t.slice(0,-1):t]},t.effect=ne,t.htmlEscape=c,t.markRaw=fe,t.markup=u,t.mount=async function(t,e,n={}){return new Fe(n).createRoot(t,n).mount(e,n)},t.onError=function(t){const{node:e}=o("component");let n=T.get(e);n||(n=[],T.set(e,n)),n.push(t.bind(e.component))},t.onMounted=function(t){const{node:e}=o("component");e.mounted.push(Ue(e,t,"onMounted"))},t.onPatched=function(t){const{node:e}=o("component");e.patched.push(Ue(e,t,"onPatched"))},t.onWillDestroy=qe,t.onWillPatch=function(t){const{node:e}=o("component");e.willPatch.unshift(Ue(e,t,"onWillPatch"))},t.onWillStart=function(t){const{node:e}=o("component");e.willStart.push(Ue(e,t,"onWillStart"))},t.onWillUnmount=function(t){const{node:e}=o("component");e.willUnmount.unshift(Ue(e,t,"onWillUnmount"))},t.onWillUpdateProps=function(t){const{node:e}=o("component");e.willUpdateProps.push(Ue(e,t,"onWillUpdateProps"))},t.plugin=function(t){const n=o(),s="component"===n.type?n.node.pluginManager:n.manager;let i=s.getPluginById(t.id);if(!i){if("plugin"!==n.type)throw new e(`Unknown plugin "${t.id}"`);i=s.startPlugin(t)}return i},t.props=function(t,e){const{node:n,app:s,componentName:i}=o("component");function r(t){return void 0===n.props[t]&&e?e[t]:n.props[t]}Object.assign(n.defaultProps,e);const l=Object.create(null);function a(t){for(const e of t)Reflect.defineProperty(l,e,{enumerable:!0,get:r.bind(null,e)})}if(t){if(a((Array.isArray(t)?t:Object.keys(t)).map(t=>t.endsWith("?")?t.slice(0,-1):t)),s.dev){const o=e?function(t,e){const n=(Array.isArray(t)?t:Object.keys(t)).filter(t=>!t.endsWith("?")&&t in e);return e=>{n.length&&e.addIssue({message:"props have default values on mandatory keys",keys:n}),e.validate(en.object(t))}}(t,e):en.object(t);ze(n.props,o,`Invalid component props (${i})`),n.willUpdateProps.push(t=>{ze(t,o,`Invalid component props (${i})`)})}}else{const t=t=>{const n=[];for(const e in t)1!==e.charCodeAt(0)&&n.push(e);if(e)for(const o in e)o in t||n.push(o);return n};let o=t(n.props);a(o),n.willUpdateProps.push(e=>{for(const t of o)Reflect.deleteProperty(l,t);o=t(e),a(o)})}return l},t.providePlugins=function(t,e){const{node:n}=o("component"),s=new ie(n.app,{parent:n.pluginManager,config:e});n.pluginManager=s,qe(()=>s.destroy()),re(s,t)},t.proxy=Ne,t.signal=Xe,t.status=function(t){switch(t.__owl__.status){case 0:return"new";case 2:return"cancelled";case 1:return t instanceof se?"started":"mounted";case 3:return"destroyed"}},t.toRaw=pe,t.types=en,t.untrack=D,t.useApp=function(){return o().app},t.useContext=function(){const t=n.at(-1);return{run(e){if(t){let o;n.push(t);try{o=e()}finally{n.pop()}return o}return e()},protectAsync:e=>(t&&(e=s(t,e)),e),runWithAsyncProtection:e=>(t&&(e=s(t,e)),e())}},t.useEffect=nn,t.useListener=function(t,e,n,o){"function"==typeof t?nn(()=>{const s=t();if(s)return s.addEventListener(e,n,o),()=>s.removeEventListener(e,n,o)}):(t.addEventListener(e,n,o),qe(()=>t.removeEventListener(e,n,o)))},t.useResource=function(t,e){for(let n of e)t.add(n);qe(()=>{for(let n of e)t.delete(n)})},t.validateType=Ze,t.whenReady=function(t){return new Promise(function(t){"loading"!==document.readyState?t(!0):document.addEventListener("DOMContentLoaded",t,!1)}).then(t||function(){})},t.xml=Le,sn.date="2026-04-02T10:48:47.408Z",sn.hash="d172095",sn.url="https://github.com/odoo/owl"}(this.owl=this.owl||{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type customDirectives = Record<string, (node: Element, value: string, modifier: string[]) => void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AST, ASTComment, ASTComponent, ASTDebug, ASTDomNode, ASTLog, ASTMulti, ASTTCall, ASTTCallBlock, ASTTCallSlot, ASTText, ASTTForEach, ASTTif, ASTTKey, ASTTOut,
|
|
1
|
+
import { AST, ASTComment, ASTComponent, ASTDebug, ASTDomNode, ASTLog, ASTMulti, ASTTCall, ASTTCallBlock, ASTTCallSlot, ASTText, ASTTForEach, ASTTif, ASTTKey, ASTTOut, ASTTranslation, ASTTranslationContext, ASTTSet, EventHandlers } from "./parser";
|
|
2
2
|
type BlockType = "block" | "text" | "multi" | "list" | "html" | "comment";
|
|
3
3
|
export interface Config {
|
|
4
4
|
translateFn?: (s: string, translationCtx: string) => string;
|
|
@@ -129,6 +129,5 @@ export declare class CodeGenerator {
|
|
|
129
129
|
compileTCallSlot(ast: ASTTCallSlot, ctx: Context): string;
|
|
130
130
|
compileTTranslation(ast: ASTTranslation, ctx: Context): string | null;
|
|
131
131
|
compileTTranslationContext(ast: ASTTranslationContext, ctx: Context): string | null;
|
|
132
|
-
compileTPortal(ast: ASTTPortal, ctx: Context): string;
|
|
133
132
|
}
|
|
134
133
|
export {};
|
|
@@ -26,32 +26,15 @@ interface Token {
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
export declare function tokenize(expr: string): Token[];
|
|
29
|
+
interface ProcessedExpr {
|
|
30
|
+
expr: string;
|
|
31
|
+
freeVariables: string[] | null;
|
|
32
|
+
}
|
|
29
33
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* proper lookups in the context.
|
|
33
|
-
*
|
|
34
|
-
* Usually, this kind of code would be very simple to do if we had an AST (so,
|
|
35
|
-
* if we had a javascript parser), since then, we would only need to find the
|
|
36
|
-
* variables and replace them. However, a parser is more complicated, and there
|
|
37
|
-
* are no standard builtin parser API.
|
|
38
|
-
*
|
|
39
|
-
* Since this method is applied to simple javasript expressions, and the work to
|
|
40
|
-
* be done is actually quite simple, we actually can get away with not using a
|
|
41
|
-
* parser, which helps with the code size.
|
|
42
|
-
*
|
|
43
|
-
* Here is the heuristic used by this method to determine if a token is a
|
|
44
|
-
* variable:
|
|
45
|
-
* - by default, all symbols are considered a variable
|
|
46
|
-
* - unless the previous token is a dot (in that case, this is a property: `a.b`)
|
|
47
|
-
* - or if the previous token is a left brace or a comma, and the next token is
|
|
48
|
-
* a colon (in that case, this is an object key: `{a: b}`)
|
|
49
|
-
*
|
|
50
|
-
* Some specific code is also required to support arrow functions. If we detect
|
|
51
|
-
* the arrow operator, then we add the current (or some previous tokens) token to
|
|
52
|
-
* the list of variables so it does not get replaced by a lookup in the context
|
|
34
|
+
* Processes a javascript expression: compiles variable lookups and detects
|
|
35
|
+
* top-level arrow functions with their free variables, all in a single pass.
|
|
53
36
|
*/
|
|
54
|
-
export declare function
|
|
37
|
+
export declare function processExpr(expr: string): ProcessedExpr;
|
|
55
38
|
export declare function compileExpr(expr: string): string;
|
|
56
39
|
export declare const INTERP_REGEXP: RegExp;
|
|
57
40
|
export declare function interpolate(s: string): string;
|
|
@@ -22,8 +22,7 @@ export declare const enum ASTType {
|
|
|
22
22
|
TCallSlot = 13,
|
|
23
23
|
TCallBlock = 14,
|
|
24
24
|
TTranslation = 15,
|
|
25
|
-
TTranslationContext = 16
|
|
26
|
-
TPortal = 17
|
|
25
|
+
TTranslationContext = 16
|
|
27
26
|
}
|
|
28
27
|
export interface BaseAST {
|
|
29
28
|
type: ASTType;
|
|
@@ -45,6 +44,7 @@ interface TModelInfo {
|
|
|
45
44
|
shouldNumberize: boolean;
|
|
46
45
|
hasDynamicChildren: boolean;
|
|
47
46
|
specialInitTargetAttr: string | null;
|
|
47
|
+
isProxy: boolean;
|
|
48
48
|
}
|
|
49
49
|
export interface ASTDomNode extends BaseAST {
|
|
50
50
|
type: ASTType.DomNode;
|
|
@@ -165,11 +165,6 @@ export interface ASTTranslationContext extends BaseAST {
|
|
|
165
165
|
content: AST | null;
|
|
166
166
|
translationCtx: string;
|
|
167
167
|
}
|
|
168
|
-
export
|
|
169
|
-
type: ASTType.TPortal;
|
|
170
|
-
target: string;
|
|
171
|
-
content: AST;
|
|
172
|
-
}
|
|
173
|
-
export type AST = ASTText | ASTComment | ASTDomNode | ASTMulti | ASTTif | ASTTSet | ASTTCall | ASTTOut | ASTTForEach | ASTTKey | ASTComponent | ASTTCallSlot | ASTTCallBlock | ASTLog | ASTDebug | ASTTranslation | ASTTranslationContext | ASTTPortal;
|
|
168
|
+
export type AST = ASTText | ASTComment | ASTDomNode | ASTMulti | ASTTif | ASTTSet | ASTTCall | ASTTOut | ASTTForEach | ASTTKey | ASTComponent | ASTTCallSlot | ASTTCallBlock | ASTLog | ASTDebug | ASTTranslation | ASTTranslationContext;
|
|
174
169
|
export declare function parse(xml: string | Element, customDir?: CustomDirectives): AST;
|
|
175
170
|
export {};
|
package/dist/types/owl.d.ts
CHANGED
|
@@ -166,6 +166,32 @@ declare class Registry<T> {
|
|
|
166
166
|
has(key: string): boolean;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
interface ReactiveValue<TRead, TWrite = TRead> {
|
|
170
|
+
(): TRead;
|
|
171
|
+
/**
|
|
172
|
+
* Update the value of the reactive with a new value. If the new value is different
|
|
173
|
+
* from the previous values, all computations that depends on this reactive will
|
|
174
|
+
* be invalidated, and effects will rerun.
|
|
175
|
+
*/
|
|
176
|
+
set(nextValue: TWrite): void;
|
|
177
|
+
}
|
|
178
|
+
declare enum ComputationState {
|
|
179
|
+
EXECUTED = 0,
|
|
180
|
+
STALE = 1,
|
|
181
|
+
PENDING = 2
|
|
182
|
+
}
|
|
183
|
+
interface Atom<T = any> {
|
|
184
|
+
observers: Set<ComputationAtom>;
|
|
185
|
+
value: T;
|
|
186
|
+
}
|
|
187
|
+
interface ComputationAtom<T = any> extends Atom<T> {
|
|
188
|
+
compute: () => T;
|
|
189
|
+
isDerived: boolean;
|
|
190
|
+
sources: Set<Atom>;
|
|
191
|
+
state: ComputationState;
|
|
192
|
+
}
|
|
193
|
+
declare function untrack<T>(fn: (...args: any[]) => T): T;
|
|
194
|
+
|
|
169
195
|
declare const enum STATUS {
|
|
170
196
|
NEW = 0,
|
|
171
197
|
MOUNTED = 1,// is ready, and in DOM. It has a valid el
|
|
@@ -195,6 +221,7 @@ declare class PluginManager {
|
|
|
195
221
|
app: App;
|
|
196
222
|
config: Record<string, any>;
|
|
197
223
|
onDestroyCb: Function[];
|
|
224
|
+
computations: ComputationAtom[];
|
|
198
225
|
plugins: Record<string, Plugin>;
|
|
199
226
|
status: STATUS;
|
|
200
227
|
constructor(app: App, options?: PluginManagerOptions);
|
|
@@ -205,32 +232,6 @@ declare class PluginManager {
|
|
|
205
232
|
startPlugins(pluginConstructors: PluginConstructor[]): void;
|
|
206
233
|
}
|
|
207
234
|
|
|
208
|
-
interface ReactiveValue<TRead, TWrite = TRead> {
|
|
209
|
-
(): TRead;
|
|
210
|
-
/**
|
|
211
|
-
* Update the value of the reactive with a new value. If the new value is different
|
|
212
|
-
* from the previous values, all computations that depends on this reactive will
|
|
213
|
-
* be invalidated, and effects will rerun.
|
|
214
|
-
*/
|
|
215
|
-
set(nextValue: TWrite): void;
|
|
216
|
-
}
|
|
217
|
-
declare enum ComputationState {
|
|
218
|
-
EXECUTED = 0,
|
|
219
|
-
STALE = 1,
|
|
220
|
-
PENDING = 2
|
|
221
|
-
}
|
|
222
|
-
interface Atom<T = any> {
|
|
223
|
-
observers: Set<ComputationAtom>;
|
|
224
|
-
value: T;
|
|
225
|
-
}
|
|
226
|
-
interface ComputationAtom<T = any> extends Atom<T> {
|
|
227
|
-
compute: () => T;
|
|
228
|
-
isDerived: boolean;
|
|
229
|
-
sources: Set<Atom>;
|
|
230
|
-
state: ComputationState;
|
|
231
|
-
}
|
|
232
|
-
declare function untrack<T>(fn: (...args: any[]) => T): T;
|
|
233
|
-
|
|
234
235
|
declare class Fiber {
|
|
235
236
|
node: ComponentNode;
|
|
236
237
|
bdom: BDom | null;
|
|
@@ -275,6 +276,7 @@ declare class ComponentNode implements VNode<ComponentNode> {
|
|
|
275
276
|
forceNextRender: boolean;
|
|
276
277
|
parentKey: string | null;
|
|
277
278
|
props: Record<string, any>;
|
|
279
|
+
defaultProps: Record<string, any>;
|
|
278
280
|
renderFn: Function;
|
|
279
281
|
parent: ComponentNode | null;
|
|
280
282
|
children: {
|
|
@@ -288,6 +290,7 @@ declare class ComponentNode implements VNode<ComponentNode> {
|
|
|
288
290
|
patched: LifecycleHook[];
|
|
289
291
|
willDestroy: LifecycleHook[];
|
|
290
292
|
signalComputation: ComputationAtom;
|
|
293
|
+
computations: ComputationAtom[];
|
|
291
294
|
pluginManager: PluginManager;
|
|
292
295
|
constructor(C: ComponentConstructor, props: Record<string, any>, app: App, parent: ComponentNode | null, parentKey: string | null);
|
|
293
296
|
mountComponent(target: any, options?: MountOptions): void;
|
|
@@ -364,6 +367,8 @@ declare function literalSelection<const T extends LiteralTypes>(literals: T[]):
|
|
|
364
367
|
declare function objectType(): Record<string, any>;
|
|
365
368
|
declare function objectType<const Keys extends string[]>(keys: Keys): ResolveOptionalEntries<KeyedObject<Keys>>;
|
|
366
369
|
declare function objectType<Shape extends {}>(shape: Shape): ResolveOptionalEntries<Shape>;
|
|
370
|
+
declare function strictObjectType<const Keys extends string[]>(keys: Keys): ResolveOptionalEntries<KeyedObject<Keys>>;
|
|
371
|
+
declare function strictObjectType<Shape extends {}>(shape: Shape): ResolveOptionalEntries<Shape>;
|
|
367
372
|
declare function promiseType(): Promise<void>;
|
|
368
373
|
declare function promiseType<T>(type: T): Promise<T>;
|
|
369
374
|
declare function recordType(): Record<PropertyKey, any>;
|
|
@@ -392,6 +397,7 @@ declare const types: {
|
|
|
392
397
|
ref: typeof ref;
|
|
393
398
|
selection: typeof literalSelection;
|
|
394
399
|
signal: typeof reactiveValueType;
|
|
400
|
+
strictObject: typeof strictObjectType;
|
|
395
401
|
string: string;
|
|
396
402
|
tuple: typeof tuple;
|
|
397
403
|
};
|
|
@@ -471,7 +477,7 @@ type ErrorParams = {
|
|
|
471
477
|
declare function handleError(params: ErrorParams): void;
|
|
472
478
|
|
|
473
479
|
declare class Scheduler {
|
|
474
|
-
static requestAnimationFrame: (
|
|
480
|
+
static requestAnimationFrame: (callback: FrameRequestCallback) => number;
|
|
475
481
|
tasks: Set<RootFiber>;
|
|
476
482
|
requestAnimationFrame: Window["requestAnimationFrame"];
|
|
477
483
|
frame: number;
|
|
@@ -4,3 +4,5 @@ export declare function attrsSetter(this: HTMLElement, attrs: any): void;
|
|
|
4
4
|
export declare function attrsUpdater(this: HTMLElement, attrs: any, oldAttrs: any): void;
|
|
5
5
|
export declare function setClass(this: HTMLElement, val: any): void;
|
|
6
6
|
export declare function updateClass(this: HTMLElement, val: any, oldVal: any): void;
|
|
7
|
+
export declare function setStyle(this: HTMLElement, val: any): void;
|
|
8
|
+
export declare function updateStyle(this: HTMLElement, val: any, oldVal: any): void;
|
|
@@ -16,6 +16,7 @@ export declare class ComponentNode implements VNode<ComponentNode> {
|
|
|
16
16
|
forceNextRender: boolean;
|
|
17
17
|
parentKey: string | null;
|
|
18
18
|
props: Record<string, any>;
|
|
19
|
+
defaultProps: Record<string, any>;
|
|
19
20
|
renderFn: Function;
|
|
20
21
|
parent: ComponentNode | null;
|
|
21
22
|
children: {
|
|
@@ -29,6 +30,7 @@ export declare class ComponentNode implements VNode<ComponentNode> {
|
|
|
29
30
|
patched: LifecycleHook[];
|
|
30
31
|
willDestroy: LifecycleHook[];
|
|
31
32
|
signalComputation: ComputationAtom;
|
|
33
|
+
computations: ComputationAtom[];
|
|
32
34
|
pluginManager: PluginManager;
|
|
33
35
|
constructor(C: ComponentConstructor, props: Record<string, any>, app: App, parent: ComponentNode | null, parentKey: string | null);
|
|
34
36
|
mountComponent(target: any, options?: MountOptions): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { ComponentNode } from "./component_node";
|
|
2
|
-
import type { Fiber } from "./fibers";
|
|
3
|
-
export declare const fibersInError: WeakMap<Fiber, any>;
|
|
4
|
-
export declare const nodeErrorHandlers: WeakMap<ComponentNode, ((error: any) => void)[]>;
|
|
5
|
-
|
|
6
|
-
error: any;
|
|
7
|
-
} & ({
|
|
8
|
-
node: ComponentNode;
|
|
9
|
-
} | {
|
|
10
|
-
fiber: Fiber;
|
|
11
|
-
});
|
|
12
|
-
export declare function handleError(params: ErrorParams): void;
|
|
13
|
-
export {};
|
|
1
|
+
import type { ComponentNode } from "./component_node";
|
|
2
|
+
import type { Fiber } from "./fibers";
|
|
3
|
+
export declare const fibersInError: WeakMap<Fiber, any>;
|
|
4
|
+
export declare const nodeErrorHandlers: WeakMap<ComponentNode, ((error: any) => void)[]>;
|
|
5
|
+
type ErrorParams = {
|
|
6
|
+
error: any;
|
|
7
|
+
} & ({
|
|
8
|
+
node: ComponentNode;
|
|
9
|
+
} | {
|
|
10
|
+
fiber: Fiber;
|
|
11
|
+
});
|
|
12
|
+
export declare function handleError(params: ErrorParams): void;
|
|
13
|
+
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { BDom } from "./blockdom";
|
|
2
|
-
import type { ComponentNode } from "./component_node";
|
|
3
|
-
export declare function makeChildFiber(node: ComponentNode, parent: Fiber): Fiber;
|
|
4
|
-
export declare function makeRootFiber(node: ComponentNode): Fiber;
|
|
5
|
-
export declare class Fiber {
|
|
6
|
-
node: ComponentNode;
|
|
7
|
-
bdom: BDom | null;
|
|
8
|
-
root: RootFiber | null;
|
|
9
|
-
parent: Fiber | null;
|
|
10
|
-
children: Fiber[];
|
|
11
|
-
appliedToDom: boolean;
|
|
12
|
-
deep: boolean;
|
|
13
|
-
childrenMap: ComponentNode["children"];
|
|
14
|
-
constructor(node: ComponentNode, parent: Fiber | null);
|
|
15
|
-
render(): void;
|
|
16
|
-
_render(): void;
|
|
17
|
-
}
|
|
18
|
-
export declare class RootFiber extends Fiber {
|
|
19
|
-
counter: number;
|
|
20
|
-
willPatch: Fiber[];
|
|
21
|
-
patched: Fiber[];
|
|
22
|
-
mounted: Fiber[];
|
|
23
|
-
locked: boolean;
|
|
24
|
-
complete(): void;
|
|
25
|
-
setCounter(newValue: number): void;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface MountOptions {
|
|
29
|
-
position?: Position;
|
|
30
|
-
}
|
|
31
|
-
export declare class MountFiber extends RootFiber {
|
|
32
|
-
target: HTMLElement;
|
|
33
|
-
position: Position;
|
|
34
|
-
constructor(node: ComponentNode, target: HTMLElement, options?: MountOptions);
|
|
35
|
-
complete(): void;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
1
|
+
import { BDom } from "./blockdom";
|
|
2
|
+
import type { ComponentNode } from "./component_node";
|
|
3
|
+
export declare function makeChildFiber(node: ComponentNode, parent: Fiber): Fiber;
|
|
4
|
+
export declare function makeRootFiber(node: ComponentNode): Fiber;
|
|
5
|
+
export declare class Fiber {
|
|
6
|
+
node: ComponentNode;
|
|
7
|
+
bdom: BDom | null;
|
|
8
|
+
root: RootFiber | null;
|
|
9
|
+
parent: Fiber | null;
|
|
10
|
+
children: Fiber[];
|
|
11
|
+
appliedToDom: boolean;
|
|
12
|
+
deep: boolean;
|
|
13
|
+
childrenMap: ComponentNode["children"];
|
|
14
|
+
constructor(node: ComponentNode, parent: Fiber | null);
|
|
15
|
+
render(): void;
|
|
16
|
+
_render(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class RootFiber extends Fiber {
|
|
19
|
+
counter: number;
|
|
20
|
+
willPatch: Fiber[];
|
|
21
|
+
patched: Fiber[];
|
|
22
|
+
mounted: Fiber[];
|
|
23
|
+
locked: boolean;
|
|
24
|
+
complete(): void;
|
|
25
|
+
setCounter(newValue: number): void;
|
|
26
|
+
}
|
|
27
|
+
type Position = "first-child" | "last-child";
|
|
28
|
+
export interface MountOptions {
|
|
29
|
+
position?: Position;
|
|
30
|
+
}
|
|
31
|
+
export declare class MountFiber extends RootFiber {
|
|
32
|
+
target: HTMLElement;
|
|
33
|
+
position: Position;
|
|
34
|
+
constructor(node: ComponentNode, target: HTMLElement, options?: MountOptions);
|
|
35
|
+
complete(): void;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { App } from "./app";
|
|
2
|
+
import { ComputationAtom } from "./reactivity/computations";
|
|
2
3
|
import { Resource } from "./resource";
|
|
3
4
|
import { STATUS } from "./status";
|
|
4
5
|
export interface PluginConstructor {
|
|
@@ -21,6 +22,7 @@ export declare class PluginManager {
|
|
|
21
22
|
app: App;
|
|
22
23
|
config: Record<string, any>;
|
|
23
24
|
onDestroyCb: Function[];
|
|
25
|
+
computations: ComputationAtom[];
|
|
24
26
|
plugins: Record<string, Plugin>;
|
|
25
27
|
status: STATUS;
|
|
26
28
|
constructor(app: App, options?: PluginManagerOptions);
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { Component } from "./component";
|
|
2
|
-
/**
|
|
3
|
-
* kind of similar to <t t-slot="default"/>, but it wraps it around a VPortal
|
|
4
|
-
*/
|
|
5
|
-
export declare function portalTemplate(app: any, bdom: any, helpers: any): (ctx: any, node: any, key?: string) => any;
|
|
6
|
-
export declare class Portal extends Component {
|
|
7
|
-
static template: string;
|
|
8
|
-
props:
|
|
9
|
-
target:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { Component } from "./component";
|
|
2
|
+
/**
|
|
3
|
+
* kind of similar to <t t-slot="default"/>, but it wraps it around a VPortal
|
|
4
|
+
*/
|
|
5
|
+
export declare function portalTemplate(app: any, bdom: any, helpers: any): (ctx: any, node: any, key?: string) => any;
|
|
6
|
+
export declare class Portal extends Component {
|
|
7
|
+
static template: string;
|
|
8
|
+
static props: {
|
|
9
|
+
readonly target: {
|
|
10
|
+
readonly type: StringConstructor;
|
|
11
|
+
};
|
|
12
|
+
readonly slots: true;
|
|
13
|
+
};
|
|
14
|
+
setup(): void;
|
|
15
|
+
}
|
|
@@ -30,4 +30,5 @@ export declare function getCurrentComputation(): ComputationAtom<any> | undefine
|
|
|
30
30
|
export declare function setComputation(computation: ComputationAtom | undefined): void;
|
|
31
31
|
export declare function updateComputation(computation: ComputationAtom): void;
|
|
32
32
|
export declare function removeSources(computation: ComputationAtom): void;
|
|
33
|
+
export declare function disposeComputation(computation: ComputationAtom): void;
|
|
33
34
|
export declare function untrack<T>(fn: (...args: any[]) => T): T;
|