UNPKG

cydran

Version:

Unobtrusive Javascript presentation framework

24 lines (23 loc) 218 kB
"use strict";/* 0.2.1 --- Cydran <http://cydran.io/> Copyright (c) 2018 The Cydran Team and other contributors <http://cydran.io/> Released under MIT license <http://cydran.io/license> --- Derivative work based on Lodash 4.17.15 <https://lodash.com/license> Copyright (c) 2019 OpenJS Foundation and other contributors <https://openjsf.org/> --- Derivative work based on Underscore.js Copyright (c) 2012 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors --- Derivative work based on docReady <https://github.com/jfriend00/docReady/blob/master/license> Copyright (c) 2014, John Friend <https://github.com/jfriend00/docReady/> --- Derivative work based on Math.uuid.js <http://www.broofa.com> Copyright (c) 2010 Robert Kieffer <https://www.broofa.com/2008/09/javascript-uuid-function/> --- Derivative work based on UMD <https://github.com/umdjs/umd/blob/master/LICENSE.md> Copyright (c) 2014 the UMD contributors <https://github.com/umdjs/umd/> */ var cydran=(function(){var s=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}};var Tu=s(function(xe){"use strict";var wf=xe&&xe.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(xe,"__esModule",{value:!0});var Rf=function(e){wf(t,e);function t(r){var n=this.constructor,i=e.call(this)||this;return i.name=n.name,i.message=r,i}return t}(Error);xe.default=Rf});var P=s(function(v){"use strict";var L=v&&v.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lf=v&&v.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(v,"__esModule",{value:!0});v.OutputStrategyError=v.IllegalArgumentError=v.UnknownInputError=v.InvalidStateError=v.UnknownStateError=v.ValidationError=v.UnknownRegionError=v.UnknownElementError=v.UnknownComponentError=v.TemplateError=v.SetComponentError=v.SelectorError=v.ScopeError=v.RegistrationError=v.RecursionError=v.NullValueError=v.ModuleAffinityError=v.MalformedOnEventError=v.LockedRegionError=v.InvalidTypeError=v.DigestLoopError=v.AmbiguousMarkupError=v.ComponentStateError=v.CydranError=v.BehaviorError=void 0;var S=Lf(Tu());v.CydranError=S.default;var bf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.AmbiguousMarkupError=bf;var qf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.DigestLoopError=qf;var Ff=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.InvalidTypeError=Ff;var Uf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.LockedRegionError=Uf;var Bf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.MalformedOnEventError=Bf;var xf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.ModuleAffinityError=xf;var jf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.NullValueError=jf;var Yf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.RecursionError=Yf;var Vf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.RegistrationError=Vf;var $f=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.ScopeError=$f;var Gf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.SelectorError=Gf;var Hf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.SetComponentError=Hf;var Kf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.TemplateError=Kf;var kf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.UnknownComponentError=kf;var Wf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.UnknownElementError=Wf;var Xf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.UnknownRegionError=Xf;var zf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.ValidationError=zf;var Qf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.UnknownStateError=Qf;var Zf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.InvalidStateError=Zf;var Jf=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.UnknownInputError=Jf;var th=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.ComponentStateError=th;var eh=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.BehaviorError=eh;var rh=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.IllegalArgumentError=rh;var nh=function(e){L(t,e);function t(r){return e.call(this,r)||this}return t}(S.default);v.OutputStrategyError=nh});var us=s(function(dt,Ye){"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.isEqual=dt.cloneDeep=void 0;var qu=P(),ih=200,oh="Expected a function",vi="__lodash_hash_undefined__",Fu=1,ah=2,Uu=4,Nn=1,Bu=2,xu=9007199254740991,Ae="[object Arguments]",vn="[object Array]",uh="[object AsyncFunction]",Dn="[object Boolean]",An="[object Date]",Di="[object Error]",On="[object Function]",ju="[object GeneratorFunction]",Lt="[object Map]",Tn="[object Number]",sh="[object Null]",Nt="[object Object]",Cu="[object Promise]",lh="[object Proxy]",Cn="[object RegExp]",bt="[object Set]",Sn="[object String]",Ai="[object Symbol]",ch="[object Undefined]",gn="[object WeakMap]",Pn="[object ArrayBuffer]",Oe="[object DataView]",Oi="[object Float32Array]",Ti="[object Float64Array]",Ci="[object Int8Array]",Si="[object Int16Array]",Pi="[object Int32Array]",Mi="[object Uint8Array]",wi="[object Uint8ClampedArray]",Ri="[object Uint16Array]",Li="[object Uint32Array]",fh=/[\\^$.*+?()[\]{}|]/g,hh=/\w*$/,ph=/^\[object .+?Constructor\]$/,dh=/^(?:0|[1-9]\d*)$/,M={};M[Oi]=M[Ti]=M[Ci]=M[Si]=M[Pi]=M[Mi]=M[wi]=M[Ri]=M[Li]=!0;M[Ae]=M[vn]=M[Pn]=M[Dn]=M[Oe]=M[An]=M[Di]=M[On]=M[Lt]=M[Tn]=M[Nt]=M[Cn]=M[bt]=M[Sn]=M[gn]=!1;var T={};T[Ae]=T[vn]=T[Pn]=T[Oe]=T[Dn]=T[An]=T[Oi]=T[Ti]=T[Ci]=T[Si]=T[Pi]=T[Lt]=T[Tn]=T[Nt]=T[Cn]=T[bt]=T[Sn]=T[Ai]=T[Mi]=T[wi]=T[Ri]=T[Li]=!0;T[Di]=T[On]=T[gn]=!1;var _h=typeof global=="object"&&global&&global.Object===Object&&global,vh=typeof self=="object"&&self&&self.Object===Object&&self,gh=_h||vh||Function("return this")(),Yu=typeof dt=="object"&&dt&&!dt.nodeType&&dt,Su=Yu&&typeof Ye=="object"&&Ye&&!Ye.nodeType&&Ye,yh=Su&&Su.exports===Yu;function Eh(e,t){for(var r=e==null?0:e.length,n=-1;++n<r&&t(e[n],n,e)!==!1;);return e}function mh(e,t){for(var r=e==null?0:e.length,n=[],i=-1,o=0;++i<r;){var a=e[i];t(a,i,e)&&(n[o++]=a)}return n}function Vu(e,t){for(var r=t.length,n=e.length,i=-1;++i<r;)e[n+i]=t[i];return e}function Ih(e,t){for(var r=e==null?0:e.length,n=-1;++n<r;)if(t(e[n],n,e))return!0;return!1}function Nh(e,t){for(var r=Array(e),n=-1;++n<e;)r[n]=t(n);return r}function Dh(e,t){return e.has(t)}function Ah(e,t){return e==null?void 0:e[t]}function Oh(e){var t=Array(e.size),r=-1;return e.forEach(function(n,i){t[++r]=[i,n]}),t}function $u(e,t){return function(r){return e(t(r))}}function Th(e){var t=Array(e.size),r=-1;return e.forEach(function(n){t[++r]=n}),t}var vt=gh,Ch=Array.prototype,Sh=Function.prototype,Mn=Object.prototype,_i=vt["__core-js_shared__"],Gu=Sh.toString,it=Mn.hasOwnProperty,Pu=function(){var e=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return e?"Symbol(src)_1.".concat(e):""}(),Hu=Mn.toString,Ph=RegExp("^"+Gu.call(it).replace(fh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yn=yh?vt.Buffer:void 0,En=vt.Symbol,mn=vt.Uint8Array,Mu=yn?yn.allocUnsafe:void 0,Ku=$u(Object.getPrototypeOf,Object),wu=Object.create,ku=Mn.propertyIsEnumerable,Mh=Ch.splice,Rt=En?En.toStringTag:void 0,gi=Object.getOwnPropertySymbols,wh=yn?yn.isBuffer:void 0,Rh=$u(Object.keys,Object),yi=Te(vt,"DataView"),$e=Te(vt,"Map"),Ei=Te(vt,"Promise"),mi=Te(vt,"Set"),Ii=Te(vt,"WeakMap"),je=Te(Object,"create"),Lh=Ft(yi),bh=Ft($e),qh=Ft(Ei),Fh=Ft(mi),Uh=Ft(Ii),Ru=En?En.prototype:void 0,Ve=Ru?Ru.valueOf:void 0,Bh=function(){function e(){}return function(t){if(!Ke(t))return{};if(wu)return wu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Lu=function(){function e(t){var r=-1,n=t==null?0:t.length;for(this.clear();++r<n;){var i=t[r];this.set(i[0],i[1])}}return e.prototype.clear=function(){this.__DATA__=je?je(null):{},this.size=0},e.prototype.delete=function(t){var r=this.has(t)&&delete this.__DATA__[t];return this.size-=r?1:0,r},e.prototype.get=function(t){var r=this.__DATA__;if(je){var n=r[t];return n===vi?void 0:n}return it.call(r,t)?r[t]:void 0},e.prototype.has=function(t){var r=this.__DATA__;return je?r[t]!==void 0:it.call(r,t)},e.prototype.set=function(t,r){var n=this.__DATA__;return this.size+=this.has(t)?0:1,n[t]=je&&r===void 0?vi:r,this},e}(),pn=function(){function e(t){var r=-1,n=t==null?0:t.length;for(this.clear();++r<n;){var i=t[r];this.set(i[0],i[1])}}return e.prototype.clear=function(){this.__DATA__=[],this.size=0},e.prototype.delete=function(t){var r=this.__DATA__,n=fn(r,t);if(n<0)return!1;var i=r.length-1;return n==i?r.pop():Mh.call(r,n,1),--this.size,!0},e.prototype.get=function(t){var r=this.__DATA__,n=fn(r,t);return n<0?void 0:r[n][1]},e.prototype.has=function(t){return fn(this.__DATA__,t)>-1},e.prototype.set=function(t,r){var n=this.__DATA__,i=fn(n,t);return i<0?(++this.size,n.push([t,r])):n[i][1]=r,this},e}(),wn=function(){function e(t){var r=-1,n=t==null?0:t.length;for(this.clear();++r<n;){var i=t[r];this.set(i[0],i[1])}}return e.prototype.clear=function(){this.size=0,this.__DATA__={hash:new Lu,map:new($e||pn),string:new Lu}},e.prototype.delete=function(t){var r=hn(this,t).delete(t);return this.size-=r?1:0,r},e.prototype.get=function(t){return hn(this,t).get(t)},e.prototype.has=function(t){return hn(this,t).has(t)},e.prototype.set=function(t,r){var n=hn(this,t),i=n.size;return n.set(t,r),this.size+=n.size==i?0:1,this},e}(),xh=function(){function e(t){var r=-1,n=t==null?0:t.length;for(this.__DATA__=new wn;++r<n;)this.add(t[r])}return e.prototype.push=function(t){return this.add(t)},e.prototype.add=function(t){return this.__DATA__.set(t,vi),this},e.prototype.has=function(t){return this.__DATA__.has(t)},e}(),dn=function(){function e(t){var r=this.__DATA__=new pn(t);this.size=r.size}return e.prototype.clear=function(){this.__DATA__=new pn,this.size=0},e.prototype.delete=function(t){var r=this.__DATA__,n=r.delete(t);return this.size=r.size,n},e.prototype.get=function(t){return this.__DATA__.get(t)},e.prototype.has=function(t){return this.__DATA__.has(t)},e.prototype.set=function(t,r){var n=this.__DATA__;if(n instanceof pn){var i=n.__DATA__;if(!$e||i.length<ih-1)return i.push([t,r]),this.size=++n.size,this;n=this.__DATA__=new wn(i)}return n.set(t,r),this.size=n.size,this},e}();function Wu(e,t){var r=Ge(e),n=!r&&_p(e),i=!r&&!n&&In(e),o=!r&&!n&&!i&&is(e),a=r||n||i||o,u=a?Nh(e.length,String):[],l=u.length;for(var c in e)(t||it.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||cp(c,l)))&&u.push(c);return u}function fn(e,t){for(var r=e.length;r--;)if(Ui(e[r][0],t))return r;return-1}function jh(e,t){return e&&Rn(t,Bi(t),e)}function Yh(e,t){return e&&Rn(t,xi(t),e)}function Xu(e,t,r){t=="__proto__"&&Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function zu(e,t,r){var n=t(e);return Ge(e)?n:Vu(n,r(e))}function He(e){return e==null?e===void 0?ch:sh:Rt&&Rt in Object(e)?ap(e):dp(e)}function bu(e){return qt(e)&&He(e)==Ae}function Qu(e,t,r,n,i,o){if(e<=0)throw new qu.RecursionError("Recursive depth reached while comparing object");return t===r?!0:t==null||r==null||!qt(t)&&!qt(r)?t!==t&&r!==r:Vh(e-1,t,r,n,i,Qu,o)}function Vh(e,t,r,n,i,o,a){var u=Ge(t),l=Ge(r),c=u?vn:ct(t),f=l?vn:ct(r);c=c==Ae?Nt:c,f=f==Ae?Nt:f;var E=c==Nt,_=f==Nt,d=c==f;if(d&&In(t)){if(!In(r))return!1;u=!0,E=!1}if(d&&!E)return a=a||new dn,u||is(t)?Zu(e,t,r,n,i,o,a):np(e,t,r,c,n,i,o,a);if(!(n&Nn)){var q=E&&it.call(t,"__wrapped__"),A=_&&it.call(r,"__wrapped__");if(q||A){var O=q?t.value():t,D=A?r.value():r;return a=a||new dn,o(e,O,D,n,i,a)}}return d?(a=a||new dn,ip(e,t,r,n,i,o,a)):!1}function $h(e){return qt(e)&&ct(e)==Lt}function Gh(e){if(!Ke(e)||hp(e))return!1;var t=rs(e)?Ph:ph;return t.test(Ft(e))}function Hh(e){return qt(e)&&ct(e)==bt}function Kh(e){return qt(e)&&ns(e.length)&&!!M[He(e)]}function kh(e){if(!Fi(e))return Rh(e);var t=[];for(var r in Object(e))it.call(e,r)&&r!="constructor"&&t.push(r);return t}function Wh(e){if(!Ke(e))return pp(e);var t=Fi(e),r=[];for(var n in e)n=="constructor"&&(t||!it.call(e,n))||r.push(n);return r}function Xh(e,t){if(t)return e.slice();var r=e.length,n=e.constructor,i=Mu?Mu(r):new n(r);return e.copy(i),i}function bi(e){var t=e.constructor,r=new t(e.byteLength);return new mn(r).set(new mn(e)),r}function zh(e,t){var r=t?bi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function Qh(e){var t=new e.constructor(e.source,hh.exec(e));return t.lastIndex=e.lastIndex,t}function Zh(e){return Ve?Object(Ve.call(e)):{}}function Jh(e,t){var r=t?bi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function tp(e,t){var r=-1,n=e.length;for(t=t||Array(n);++r<n;)t[r]=e[r];return t}function Rn(e,t,r,n){var i=!r;r=i?{}:r;for(var o=-1,a=t.length;++o<a;){var u=t[o],l=n?n(r[u],e[u],u,r,e):void 0;l===void 0&&(l=e[u]),i?Xu(r,u,l):as(r,u,l)}return r}function ep(e,t){return Rn(e,qi(e),t)}function rp(e,t){return Rn(e,Ju(e),t)}function Zu(e,t,r,n,i,o,a){var u=n&Nn,l=t.length,c=r.length;if(l!=c&&!(u&&c>l))return!1;var f=a.get(t);if(f&&a.get(r))return f==r;var E=-1,_=!0,d=n&Bu?new xh:void 0;a.set(t,r),a.set(r,t);for(var q=function(){var O=t[E],D=r[E],$=void 0;if(i&&($=u?i(D,O,E,r,t,a):i(O,D,E,t,r,a)),$!==void 0)return $?"continue":(_=!1,"break");if(d){if(!Ih(r,function(De,wt){if(!Dh(d,wt)&&(O===De||o(e,O,De,n,i,a)))return d.push(wt)}))return _=!1,"break"}else if(!(O===D||o(e,O,D,n,i,a)))return _=!1,"break"};++E<l;){var A=q();if(A==="break")break}return a.delete(t),a.delete(r),_}function np(e,t,r,n,i,o,a,u){var l;switch(n){case Oe:if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case Pn:return!(t.byteLength!=r.byteLength||!a(e,new mn(t),new mn(r)));case Dn:case An:case Tn:return Ui(+t,+r);case Di:return t.name==r.name&&t.message==r.message;case Cn:case Sn:return t==r+"";case Lt:l=Oh;case bt:var c=i&Nn;if(l=l||Th,t.size!=r.size&&!c)return!1;var f=u.get(t);if(f)return f==r;i|=Bu,u.set(t,r);var E=Zu(e,l(t),l(r),i,o,a,u);return u.delete(t),E;case Ai:if(Ve)return Ve.call(t)==Ve.call(r)}return!1}function ip(e,t,r,n,i,o,a){var u=n&Nn,l=Ni(t),c=l.length,f=Ni(r),E=f.length;if(c!=E&&!u)return!1;for(var _=c;_--;){var d=l[_];if(!(u?d in r:it.call(r,d)))return!1}var q=a.get(t);if(q&&a.get(r))return q==r;var A=!0;a.set(t,r),a.set(r,t);for(var O=!!u;++_<c;){var d=l[_],D=t[d],$=r[d],De=void 0;if(i&&(De=u?i($,D,d,r,t,a):i(D,$,d,t,r,a)),!(De===void 0?D===$||o(e,D,$,n,i,a):De)){A=!1;break}O=O||d=="constructor"}if(A&&!O){var wt=t.constructor,cn=r.constructor;wt!=cn&&"constructor"in t&&"constructor"in r&&!(typeof wt=="function"&&wt instanceof wt&&typeof cn=="function"&&cn instanceof cn)&&(A=!1)}return a.delete(t),a.delete(r),A}function Ni(e){return zu(e,Bi,qi)}function op(e){return zu(e,xi,Ju)}function hn(e,t){var r=e.__DATA__;return fp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Te(e,t){var r=Ah(e,t);return Gh(r)?r:void 0}function ap(e){var t=it.call(e,Rt),r=e[Rt],n=!1;try{e[Rt]=void 0,n=!0}catch(o){}var i=Hu.call(e);return n&&(t?e[Rt]=r:delete e[Rt]),i}var qi=gi?function(e){return e==null?[]:(e=Object(e),mh(gi(e),function(t){return ku.call(e,t)}))}:os,Ju=gi?function(e){for(var t=[];e;)Vu(t,qi(e)),e=Ku(e);return t}:os,ct=He;(yi&&ct(new yi(new ArrayBuffer(1)))!==Oe||$e&&ct(new $e)!==Lt||Ei&&ct(Ei.resolve())!==Cu||mi&&ct(new mi)!==bt||Ii&&ct(new Ii)!==gn)&&(ct=function(e){var t=He(e),r=t===Nt?e.constructor:void 0,n=r?Ft(r):"";if(n)switch(n){case Lh:return Oe;case bh:return Lt;case qh:return Cu;case Fh:return bt;case Uh:return gn}return t});function up(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&it.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function sp(e){return typeof e.constructor=="function"&&!Fi(e)?Bh(Ku(e)):{}}function lp(e,t,r){var n=e.constructor;switch(t){case Pn:return bi(e);case Dn:case An:return new n(+e);case Oe:return zh(e,r);case Oi:case Ti:case Ci:case Si:case Pi:case Mi:case wi:case Ri:case Li:return Jh(e,r);case Lt:return new n;case Tn:case Sn:return new n(e);case Cn:return Qh(e);case bt:return new n;case Ai:return Zh(e)}}function cp(e,t){var r=typeof e;return t=t==null?xu:t,!!t&&(r==="number"||r!=="symbol"&&dh.test(e))&&e>-1&&e%1===0&&e<t}function fp(e){var t=typeof e;return t==="string"||t==="number"||t==="symbol"||t==="boolean"?e!=="__proto__":e===null}function hp(e){return!!Pu&&Pu in e}function Fi(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Mn;return e===r}function pp(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function dp(e){return Hu.call(e)}function Ft(e){if(e!=null){try{return Gu.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function ts(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(oh);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(ts.Cache||wn),r}ts.Cache=wn;function Ui(e,t){return e===t||e!==e&&t!==t}var _p=bu(function(){return arguments}())?bu:function(e){return qt(e)&&it.call(e,"callee")&&!ku.call(e,"callee")},Ge=Array.isArray;function es(e){return e!=null&&ns(e.length)&&!rs(e)}var In=wh||Ep;function vp(e,t,r){return Qu(e,t,r)}dt.isEqual=vp;function rs(e){if(!Ke(e))return!1;var t=He(e);return t===On||t===ju||t===uh||t===lh}function ns(e){return typeof e=="number"&&e>-1&&e%1===0&&e<=xu}function Ke(e){var t=typeof e;return e!=null&&(t==="object"||t==="function")}function qt(e){return e!=null&&typeof e=="object"}var gp=$h,yp=Hh,is=Kh;function Bi(e){return es(e)?Wu(e):kh(e)}function xi(e){return es(e)?Wu(e,!0):Wh(e)}function os(){return[]}function Ep(){return!1}function as(e,t,r){var n=e[t];(!(it.call(e,t)&&Ui(n,r))||r===void 0&&!(t in e))&&Xu(e,t,r)}function _n(e,t,r,n,i,o,a){if(e<=0)throw new qu.RecursionError("Recursive depth reached while cloning object");var u,l=r&Fu,c=r&ah,f=r&Uu;if(n&&(u=o?n(t,i,o,a):n(t)),u!==void 0)return u;if(!Ke(t))return t;var E=Ge(t);if(E){if(u=up(t),!l)return tp(t,u)}else{var _=ct(t),d=_==On||_==ju;if(In(t))return Xh(t,!!l);if(_==Nt||_==Ae||d&&!o){if(u=c||d?{}:sp(t),!l)return c?rp(t,Yh(u,t)):ep(t,jh(u,t))}else{if(!T[_])return o?t:{};u=lp(t,_,!!l)}}a=a||new dn;var q=a.get(t);if(q)return q;a.set(t,u),yp(t)?t.forEach(function(D){u.add(_n(e-1,D,r,n,D,t,a))}):gp(t)&&t.forEach(function(D,$){u.set($,_n(e-1,D,r,n,$,t,a))});var A=f?c?op:Ni:c?xi:Bi,O=E?void 0:A(t);return Eh(O||t,function(D,$){O&&($=D,D=t[$]),as(u,$,_n(e-1,D,r,n,$,t,a))}),u}function mp(e,t){return _n(e,t,Fu|Uu)}dt.cloneDeep=mp});var W=s(function(m){"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.VALID_KEY=m.VALID_ID=m.RESET_KEY=m.INPUT_KEY=m.CHANGE_KEY=m.DOM_KEY=m.CYDRAN_DISPOSE_FN_NAME=m.CYDRAN_KEY=m.DEFAULT_EQUALS_DEPTH=m.DEFAULT_CLONE_DEPTH=m.CYDRAN_SCRIPT_PREFIX=m.ANONYMOUS_REGION_PREFIX=m.ATTRIBUTE_DELIMITER=m.DEFAULT_PREFIX=m.DEFAULT_LOG_STRATEGY=m.DEFAULT_MODULE_KEY=m.INTERNAL_CHANNEL_NAME=m.MODULE_FIELD_NAME=m.BEHAVIOR_FORM_RESET=m.CYDRAN_PUBLIC_CHANNEL=void 0;var Ip="Cydran$$Public$$Channel";m.CYDRAN_PUBLIC_CHANNEL=Ip;var Np="Cydran$$Internal$$Channel";m.INTERNAL_CHANNEL_NAME=Np;var Dp="____internal$$cydran$$module____";m.MODULE_FIELD_NAME=Dp;var Ap="DEFAULT";m.DEFAULT_MODULE_KEY=Ap;var Op="default";m.DEFAULT_LOG_STRATEGY=Op;var Tp="c";m.DEFAULT_PREFIX=Tp;var Cp="-";m.ATTRIBUTE_DELIMITER=Cp;var Sp="%%%Region_";m.ANONYMOUS_REGION_PREFIX=Sp;var ss="cydran";m.CYDRAN_KEY=ss;var Pp="$dispose";m.CYDRAN_DISPOSE_FN_NAME=Pp;var Mp="".concat(ss,"/");m.CYDRAN_SCRIPT_PREFIX=Mp;var wp=50;m.DEFAULT_CLONE_DEPTH=wp;var Rp=50;m.DEFAULT_EQUALS_DEPTH=Rp;var Lp="dom";m.DOM_KEY=Lp;var bp="change";m.CHANGE_KEY=bp;var qp="input";m.INPUT_KEY=qp;var Fp="reset";m.RESET_KEY=Fp;var Up=/^[a-zA-Z][a-zA-Z\d\$\@\-\_\.\:\\\/]*$/m;m.VALID_ID=Up;var Bp=new RegExp(/^[a-zA-Z\$\_][a-zA-Z\d\$\_]*$/);m.VALID_KEY=Bp;var xp="cydran:behavior:form:reset";m.BEHAVIOR_FORM_RESET=xp});var Ut=s(function(ji){"use strict";Object.defineProperty(ji,"__esModule",{value:!0});var jp={STR:"string",BOOL:"boolean",BIGINT:"bigint",NUM:"number",SYM:"symbol",FN:"function",OBJ:"object"};ji.default=jp});var h=s(function(p){"use strict";var Yp=p&&p.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:!0});p.orNull=p.defaulted=p.enumKeys=p.padText=p.padRight=p.padLeft=p.safeCydranDisposal=p.elementAsString=p.extractKeys=p.extractAttributeNames=p.extractAttribute=p.removeChildElements=p.overlay=p.merge=p.setStrictTypeChecksEnabled=p.encodeHtml=p.hasContents=p.isDefined=p.requireObjectType=p.requireType=p.requireValid=p.requireNotNull=p.equals=p.clone=p.extractAttributes=p.extractClassName=p.trim=p.endsWith=p.removeFromBeginning=p.startsWith=p.uuidV4=void 0;var ls=us(),Ce=P(),cs=W(),fs=Yp(Ut());function Vp(e){for(;e.firstChild;)e.removeChild(e.lastChild)}p.removeChildElements=Vp;function $p(e){var t;return w(e)?(t=e==null?void 0:e.constructor)===null||t===void 0?void 0:t.name:"null"}p.extractClassName=$p;function Gp(e,t,r){if(!w(e)||!w(t)||!w(r))return null;var n=t+cs.ATTRIBUTE_DELIMITER+r;return e.hasAttribute(n)?e.getAttribute(n):null}p.extractAttribute=Gp;function Hp(e){var t=e.attributes,r=t.length,n="<";n+=e.nodeName.toLowerCase();for(var i=0;i<r;i++)n+=" ".concat(t[i].name,'="').concat(t[i].value,'"');return n+=">",n}p.elementAsString=Hp;var Kp={'"':"&quot;","&":"&amp;","'":"&#39;","<":"&lt;",">":"&gt;"};function kp(e){return Kp[e]}function Wp(e){return e===null?null:(e+"").replace(/[&"'<>]/g,kp)}p.encodeHtml=Wp;function w(e){return e!=null}p.isDefined=w;function Xp(e){return w(e)&&e.length>0}p.hasContents=Xp;var hs="shall not be null";function Bt(e,t){if(e==null)throw new Ce.NullValueError("".concat(t," ").concat(hs));return e}p.requireNotNull=Bt;function zp(e,t,r){if(e==null)throw new Ce.NullValueError("".concat(t," ").concat(hs));if(!r.test(e))throw new Ce.ValidationError("".concat(t," must be valid"));return e}p.requireValid=zp;var ps="must be of type";function Qp(e,t,r){Bt(t,r);var n=typeof t;if(n!==e)throw new Ce.InvalidTypeError("".concat(r," ").concat(ps," ").concat(e," but was ").concat(n));return t}p.requireType=Qp;function ds(e,t){if(!w(t))return!1;var r=Object.getPrototypeOf(t);return!w(r)||!w(r.constructor)||!w(r.constructor.name)||r.constructor.name==="Object"?!1:r.constructor.name===e?!0:ds(e,r)}function Zp(e,t,r){if(Bt(t,r),typeof t!==fs.default.OBJ)throw new Ce.InvalidTypeError("".concat(r," is not an object but was ").concat(typeof t));if(!ds(e,t))throw new Ce.InvalidTypeError("".concat(r," ").concat(ps," ").concat(e));return t}var _s=!1;function Jp(e,t,r){return _s?Zp(e,t,r):Bt(t,r)}p.requireObjectType=Jp;function td(e){_s=!!e}p.setStrictTypeChecksEnabled=td;function ed(e,t){return(0,ls.cloneDeep)(e,t)}p.clone=ed;function rd(e,t,r){return(0,ls.isEqual)(e,t,r)}p.equals=rd;function nd(e,t){return Bt(e,"sources"),vs({},e,t)}p.merge=nd;function vs(e,t,r){if(Bt(e,"target"),Bt(t,"sources"),w(r))for(var n=0,i=t;n<i.length;n++){var o=i[n];if(!!w(o)){for(var a in o)if(!!o.hasOwnProperty(a)&&!!w(o[a])){var u=r[a];e[a]=w(u)?u(e[a],o[a]):o[a]}}}else for(var l=0,c=t;l<c.length;l++){var o=c[l];if(!!w(o))for(var f in o)!o.hasOwnProperty(f)||!w(o[f])||(e[f]=o[f])}return e}p.overlay=vs;function gs(e){return w(e.getAttributeNames)?e.getAttributeNames():ys(e.attributes)}p.extractAttributeNames=gs;function ys(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}p.extractKeys=ys;function id(e,t){return w(t)&&w(t.attributes)?od(e,t):{}}p.extractAttributes=id;function od(e,t){for(var r={},n=e.toLowerCase(),i=gs(t),o=e.length,a=0;a<i.length;a++){var u=i[a];if(Yi(u,n)){var l=u.slice(o),c=t.getAttribute(u);r[l]=c,t.removeAttribute(u)}}return r}function Yi(e,t){return e.indexOf(t)===0}p.startsWith=Yi;function ad(e,t){var r=e.indexOf(t),n=e.length-t.length;return r===n}p.endsWith=ad;function ud(e,t){return Yi(e,t)?e.substring(t.length):e}p.removeFromBeginning=ud;function sd(e,t,r){var n=e.length>4&&e.indexOf(t)===0&&e.indexOf(r,e.length-2)!==-1?e.substring(2,e.length-2):e;return n}p.trim=sd;var ld="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");function cd(){for(var e=ld,t=new Array(36),r=0,n=null,i=0;i<36;i++)i===8||i===13||i===18||i===23?t[i]="-":i===14?t[i]="4":(r<=2&&(r=33554432+Math.random()*16777216|0),n=r&15,r=r>>4,t[i]=e[i===19?n&3|8:n]);return t.join("")}p.uuidV4=cd;function fd(e){if(!!w(e)){var t=e[cs.CYDRAN_DISPOSE_FN_NAME];w(t)&&typeof t===fs.default.FN&&e.$dispose()}}p.safeCydranDisposal=fd;function hd(e,t,r){r===void 0&&(r=" ");for(var n=w(e)?e:"";n.length<t;)n=r+n;return n}p.padLeft=hd;function Es(e,t,r){r===void 0&&(r=" ");for(var n=w(e)?e:"";n.length<t;)n=n+r;return n}p.padRight=Es;function pd(e,t){return Es(e,t," ")}p.padText=pd;function dd(e){return Object.keys(e).filter(function(t){return Number.isNaN(+t)})}p.enumKeys=dd;function _d(e,t){return w(e)?e:t}p.defaulted=_d;function vd(e){return w(e)?e:null}p.orNull=vd});var $i=s(function(Vi){"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var Se=h(),ke="key",gd=function(){function e(){this.values={}}return e.prototype.has=function(t){return(0,Se.requireNotNull)(t,ke),!!this.values[t]},e.prototype.lacks=function(t){return(0,Se.requireNotNull)(t,ke),!this.has(t)},e.prototype.get=function(t){(0,Se.requireNotNull)(t,ke);var r=this.values[t];return(0,Se.isDefined)(r)?r:null},e.prototype.put=function(t,r){(0,Se.requireNotNull)(t,ke),this.values[t]=r},e.prototype.computeIfAbsent=function(t,r){if((0,Se.requireNotNull)(t,ke),this.lacks(t)){var n=r(t);this.put(t,n)}return this.get(t)},e.prototype.each=function(t){for(var r in this.values)if(!!this.values.hasOwnProperty(r)){var n=this.values[r];t(n)}},e.prototype.clear=function(){this.values={}},e}();Vi.default=gd});var ms=s(function(Gi){"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});var Ln=h(),Pe=W(),yd=P(),Ed=function(){function e(t){if(this.prefix=(0,Ln.requireNotNull)(t,"prefix"),this.eventPrefix=this.prefix+Pe.ATTRIBUTE_DELIMITER+"on",this.delimitedPrefix=this.prefix+Pe.ATTRIBUTE_DELIMITER,(0,Ln.startsWith)(t,Pe.ATTRIBUTE_DELIMITER)||(0,Ln.endsWith)(t,Pe.ATTRIBUTE_DELIMITER))throw new yd.IllegalArgumentError("Malformed prefix: "+t)}return e.prototype.extract=function(t,r){return(0,Ln.extractAttribute)(t,this.prefix,r)},e.prototype.remove=function(t,r){t.removeAttribute(this.delimitedPrefix+r)},e.prototype.isEventAttribute=function(t){return t.indexOf(this.eventPrefix)===0&&this.extractEventName(t).indexOf(Pe.ATTRIBUTE_DELIMITER)===-1},e.prototype.isBehaviorAttribute=function(t){return t.indexOf(this.delimitedPrefix)===0&&this.extractBehaviorName(t).indexOf(Pe.ATTRIBUTE_DELIMITER)===-1},e.prototype.extractEventName=function(t){return t.substr(this.eventPrefix.length)},e.prototype.extractBehaviorName=function(t){return t.substr(this.delimitedPrefix.length)},e.prototype.asTypePrefix=function(t){return this.delimitedPrefix+t},e.prototype.getPrefix=function(){return this.prefix},e}();Gi.default=Ed});var Is=s(function(Hi){"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});var md=h(),Id=function(){function e(){this.behaviors=[]}return e.prototype.tell=function(t,r){for(var n=0,i=this.behaviors;n<i.length;n++){var o=i[n];o.tell(t,r)}},e.prototype.message=function(t,r,n){for(var i=0,o=this.behaviors;i<o.length;i++){var a=o[i];a.message(t,r,n)}},e.prototype.add=function(t){(0,md.requireNotNull)(t,"behavior"),this.behaviors.push(t)},e.prototype.isEmpty=function(){return this.behaviors.length===0},e.prototype.isPopulated=function(){return!this.isEmpty()},e}();Hi.default=Id});var Ns=s(function(ki){"use strict";Object.defineProperty(ki,"__esModule",{value:!0});var Ki;(function(e){e.BOOTSTRAPPED="BOOTSTRAPPED",e.VALIDATED="VALIDATED",e.UNINITIALIZED="UNINITIALIZED",e.INITIALIZED="INITIALIZED",e.READY="READY",e.MOUNTED="MOUNTED",e.UNMOUNTED="UNMOUNTED"})(Ki||(Ki={}));ki.default=Ki});var We=s(function(Xi){"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});var Wi;(function(e){e.BOOTSTRAP="bootstrap",e.VALIDATE="validate",e.INIT="init",e.MOUNT="mount",e.UNMOUNT="unmount"})(Wi||(Wi={}));Xi.default=Wi});var Ds=s(function(zi){"use strict";Object.defineProperty(zi,"__esModule",{value:!0});var Nd=W(),Dd={prefix:Nd.DEFAULT_PREFIX,parentModelFn:null,metadata:{},alwaysConnected:!1};zi.default=Dd});var Zi=s(function(Qi){"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var Ad=h(),Od=function(){function e(t){this.element=(0,Ad.requireNotNull)(t,"element")}return e.prototype.get=function(){return this.element},e.prototype.focus=function(){var t=this;setTimeout(function(){t.element.focus()},1)},e.prototype.blur=function(){var t=this;setTimeout(function(){t.element.blur()},1)},e}();Qi.default=Od});var bn=s(function(to){"use strict";Object.defineProperty(to,"__esModule",{value:!0});var Ji;(function(e){e.AFTER_CHILD_ADDED="AFTER_CHILD_ADDED",e.AFTER_CHILD_CHANGED="AFTER_CHILD_CHANGED",e.AFTER_CHILD_REMOVED="AFTER_CHILD_REMOVED",e.AFTER_PARENT_ADDED="AFTER_PARENT_ADDED",e.AFTER_PARENT_CHANGED="AFTER_PARENT_CHANGED",e.AFTER_PARENT_REMOVED="AFTER_PARENT_REMOVED",e.BEFORE_CHILD_ADDED="BEFORE_CHILD_ADDED",e.BEFORE_CHILD_CHANGED="BEFORE_CHILD_CHANGED",e.BEFORE_CHILD_REMOVED="BEFORE_CHILD_REMOVED",e.BEFORE_PARENT_ADDED="BEFORE_PARENT_ADDED",e.BEFORE_PARENT_CHANGED="BEFORE_PARENT_CHANGED",e.BEFORE_PARENT_REMOVED="BEFORE_PARENT_REMOVED",e.COMPONENT_NESTING_CHANGED="COMPONENT_NESTING_CHANGED",e.CYDRAN_PREAPP_DISPOSAL="CYDRAN_PREAPP_DISPOSAL"})(Ji||(Ji={}));to.default=Ji});var ro=s(function(eo){"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var Td=function(){function e(t,r){this.logger=r,this.expression=t}return e.prototype.get=function(t){var r="'use strict'; ".concat(t.getCode()," return (").concat(this.expression,");"),n=null;try{n=Function(r).apply({},[t.getItems()])}catch(i){this.logInvocationError(r,i)}return n},e.prototype.logInvocationError=function(t,r){var n=this;this.logger.ifError(function(){return"\n(".concat(r.name,") thrown invoking behavior expression: ").concat(n.expression,"\n\nContext:\n").concat(t,"\nMessage: ").concat(r.message)},r)},e}();eo.default=Td});var io=s(function(no){"use strict";Object.defineProperty(no,"__esModule",{value:!0});var Cd=h(),Sd=function(){function e(t){this.element=(0,Cd.requireNotNull)(t,"element")}return e.prototype.render=function(){return this.element},e}();no.default=Sd});var As=s(function(oo){"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var Pd=function(){function e(t,r){this.logger=r,this.expression=t}return e.prototype.set=function(t,r){var n=this,i="'use strict'; ".concat(t.getCode()," ").concat(this.expression," = arguments[1];");try{Function(i).apply({},[t.getItems(),r])}catch(o){this.logger.ifError(function(){return"\n(".concat(o.name,") thrown invoking behavior expression: ").concat(n.expression,"\n\nContext:\n").concat(i,"\nMessage: ").concat(o.message)},o)}},e}();oo.default=Pd});var F=s(function(et){"use strict";var Md=et&&et.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(et,"__esModule",{value:!0});et.asNumber=et.asString=et.asJSON=et.asBoolean=et.asIdentity=void 0;var ao=Md(Ut()),uo=h();function wd(e){return e}et.asIdentity=wd;function Rd(e){return Boolean(e)}et.asBoolean=Rd;function Ld(e){var t=null;return(0,uo.isDefined)(e)&&(t=e.toString()),t}et.asString=Ld;function bd(e){var t=null;if((0,uo.isDefined)(e))switch(typeof e){case ao.default.BIGINT:case ao.default.SYM:case ao.default.FN:break;default:t=JSON.stringify(e);break}return t}et.asJSON=bd;function qd(e){return(0,uo.isDefined)(e)?Number(e):null}et.asNumber=qd});var Os=s(function(lo){"use strict";Object.defineProperty(lo,"__esModule",{value:!0});var so;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.READY="READY",e.MOUNTED="MOUNTED",e.UNMOUNTED="UNMOUNTED",e.DISPOSED="DISPOSED"})(so||(so={}));lo.default=so});var Cs=s(function(co){"use strict";Object.defineProperty(co,"__esModule",{value:!0});var Ts=h(),Fd=function(){function e(t,r){this.state=(0,Ts.requireNotNull)(t,"state"),this.model=(0,Ts.requireNotNull)(r,"model")}return e.prototype.getState=function(){return this.state},e.prototype.isState=function(t){return t===this.state},e.prototype.setState=function(t){this.state=t},e.prototype.getModel=function(){return this.model},e.prototype.$dispose=function(){this.state=null,this.model=null},e}();co.default=Fd});var Ss=s(function(ho){"use strict";Object.defineProperty(ho,"__esModule",{value:!0});var fo=h(),Ud=P(),Bd=function(){function e(t,r,n){this.target=(0,fo.requireNotNull)(t,"target"),this.predicate=(0,fo.isDefined)(n)?n:function(i){return!0},this.callbacks=(0,fo.requireNotNull)(r,"callbacks")}return e.prototype.execute=function(t,r){var n=this.predicate.apply(t.getModel(),[r,t.getModel()]);if(n)for(var i=0,o=this.callbacks;i<o.length;i++){var a=o[i];a.apply(t.getModel(),[r,t.getModel()])}return n},e.prototype.getTarget=function(){return this.target},e.prototype.validate=function(t,r){for(var n=!1,i=0,o=t;i<o.length;i++){var a=o[i];if(this.target===a){n=!0;break}}if(!n)throw new Ud.ValidationError("State ".concat(this.target," is not a valid state id"))},e.prototype.$dispose=function(){this.predicate=null},e}();ho.default=Bd});var Ps=s(function(ze){"use strict";var xd=ze&&ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});var jd=xd(Ss()),Xe=h(),Yd=P(),Vd=function(){function e(t,r){this.id=(0,Xe.requireNotNull)(t,"id"),this.transitions={},this.callbacks=(0,Xe.requireNotNull)(r,"callbacks")}return e.prototype.evaluate=function(t,r,n){var i=this.transitions[t],o=!1;if((0,Xe.isDefined)(i))for(var a=0,u=i;a<u.length;a++){var l=u[a],c=l.execute(r,n);if(c){var f=l.getTarget();r.setState(f),o=!0;break}}return o},e.prototype.enter=function(t,r){for(var n=0,i=this.callbacks;n<i.length;n++){var o=i[n];o.apply(t,[r,t])}},e.prototype.withTransition=function(t,r,n,i){(0,Xe.isDefined)(this.transitions[t])||(this.transitions[t]=[]),this.transitions[t].push(new jd.default(r,n,i))},e.prototype.validate=function(t,r){for(var n=!1,i=0,o=t;i<o.length;i++){var a=o[i];if(this.id===a){n=!0;break}}if(!n)throw new Yd.ValidationError("State ".concat(this.id," is not a valid state id"));for(var u in this.transitions)if(this.transitions.hasOwnProperty(u))for(var l=this.transitions[u],c=0,f=l;c<f.length;c++){var E=f[c];E.validate(t,r)}},e.prototype.$dispose=function(){for(var t in this.transitions)if(this.transitions.hasOwnProperty(t))for(var r=this.transitions[t],n=0,i=r;n<i.length;n++){var o=i[n];(0,Xe.safeCydranDisposal)(o)}this.transitions={}},e}();ze.default=Vd});var _o=s(function(po){"use strict";Object.defineProperty(po,"__esModule",{value:!0});var Ms=h(),$d="Errors",Gd=function(){function e(t){this.prefix=(0,Ms.isDefined)(t)?t:$d,this.messages=[]}return e.prototype.add=function(t){if(!!(0,Ms.isDefined)(t)){var r=t.trim();r.length>0&&this.messages.push(r)}},e.prototype.addIf=function(t,r){t&&this.add(r())},e.prototype.getMessages=function(){return this.messages.length===0?"":this.prefix+":\n - "+this.messages.join("\n - ")+"\n"},e.prototype.clear=function(){this.messages=[]},e.prototype.hasMessages=function(){return this.messages.length>0},e.prototype.ifMessages=function(t){this.hasMessages()&&t(this.getMessages())},e}();po.default=Gd});var ws=s(function(Ze){"use strict";var vo=Ze&&Ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ze,"__esModule",{value:!0});var Hd=vo(Cs()),Kd=vo(Ps()),Qe=h(),qn=P(),kd=vo(_o()),Wd=function(){function e(t){this.startState=(0,Qe.requireNotNull)(t,"startState"),this.states={}}return e.prototype.create=function(t){return new Hd.default(this.startState,t)},e.prototype.evaluate=function(t,r,n){var i=r.getState(),o=this.states[i];if(!(0,Qe.isDefined)(o))throw new qn.UnknownStateError("Unknown state: ".concat(i));var a=o.evaluate(t,r,n);if(a){var u=this.states[r.getState()];if(!(0,Qe.isDefined)(u))throw new qn.UnknownStateError("Unknown state: ".concat(i));u.enter(r.getModel(),n)}},e.prototype.validate=function(){var t=this,r=new kd.default("Machine definition is invalid");r.addIf(!this.states.hasOwnProperty(this.startState),function(){return"Start state is not a validate state: ".concat(t.startState)});var n=[];for(var i in this.states)this.states.hasOwnProperty(i)&&n.push(i);for(var i in this.states)if(this.states.hasOwnProperty(i)){var o=this.states[i];o.validate(n,r)}r.ifMessages(function(a){throw new qn.ValidationError(a)})},e.prototype.withState=function(t,r){this.states[t]=new Kd.default(t,r)},e.prototype.withTransition=function(t,r,n,i,o){if(!(0,Qe.isDefined)(this.states[t]))throw new qn.UnknownStateError("Unknown state: ".concat(t));this.states[t].withTransition(r,n,i,o)},e.prototype.$dispose=function(){for(var t in this.states)this.states.hasOwnProperty(t)&&(0,Qe.safeCydranDisposal)(this.states[t]);this.states={}},e}();Ze.default=Wd});var Ls=s(function(Je){"use strict";var Xd=Je&&Je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Je,"__esModule",{value:!0});var Rs=h(),zd=Xd(ws()),Qd=P(),Zd=function(){function e(t){(0,Rs.requireNotNull)(t,"startState"),this.instance=new zd.default(t)}return e.prototype.withState=function(t,r){return this.instance.withState(t,r),this},e.prototype.withTransition=function(t,r,n,i,o){return this.instance.withTransition(t,r,n,i,o),this},e.prototype.build=function(){if(!(0,Rs.isDefined)(this.instance))throw new Qd.ValidationError("No start state set");return this.instance.validate(),this.instance},e}();Je.default=Zd});var er=s(function(tr){"use strict";var Jd=tr&&tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0});var t_=Jd(Ls());function e_(e){return new t_.default(e)}tr.default=e_});var Eo=s(function(yo){"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var go;(function(e){e.INIT="init",e.DISPOSE="dispose",e.MOUNT="mount",e.UNMOUNT="unmount"})(go||(go={}));yo.default=go});var qs=s(function(rr){"use strict";var nr=rr&&rr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rr,"__esModule",{value:!0});var r_=nr(ro()),n_=nr(As()),Dt=h(),i_=F(),H=nr(Os()),o_=nr(er()),Me=nr(Eo()),xt=function(){function e(t,r,n,i,o,a){this.reducerFn=(0,Dt.isDefined)(n)?n:i_.asIdentity,this.expression=(0,Dt.requireNotNull)(t,"expression"),this.scope=(0,Dt.requireNotNull)(r,"scope"),this.logger=a.getLogger("Mediator: ".concat(t)),this.previous=null,this.digestActive=!1,this.watchContext={},this.target=null,this.getter=new r_.default(t,a.getLogger("Getter: ".concat(t))),this.setter=new n_.default(t,a.getLogger("Setter: ".concat(t))),this.cloneFn=(0,Dt.requireNotNull)(i,"cloneFn"),this.equalsFn=(0,Dt.requireNotNull)(o,"equalsFn"),this.machineContext=bs.create(this)}return e.prototype.tell=function(t,r){bs.evaluate(t,this.machineContext,r)},e.prototype.get=function(){var t=this.getter.get(this.scope),r=this.reducerFn.apply({},[t]);return r},e.prototype.set=function(t){this.setter.set(this.scope,t)},e.prototype.evaluate=function(){var t=this,r=!1;if(this.digestActive&&(0,Dt.isDefined)(this.target)){var n=this.get();this.equalsFn(this.previous,n)||(this.logger.ifTrace(function(){return{current:n,previous:t.previous}}),this.logger.ifTrace(function(){return"Invoking listener"}),this.swap(n),r=!0)}return r},e.prototype.notify=function(){this.watchDispatchPending&&(this.target.apply(this.watchContext,[this.watchPrevious,this.watchCurrent]),this.watchDispatchPending=!1)},e.prototype.watch=function(t,r){this.watchContext=(0,Dt.requireNotNull)(t,"watchContext"),this.target=(0,Dt.requireNotNull)(r,"target")},e.prototype.getExpression=function(){return this.expression},e.prototype.initialize=function(){},e.prototype.mount=function(){this.populate(),this.digestActive=!0},e.prototype.unmount=function(){this.digestActive=!1},e.prototype.remount=function(){this.digestActive=!0},e.prototype.$dispose=function(){this.previous=null,this.watchContext=null,this.target=null,this.watchPrevious=null,this.watchCurrent=null,this.watchDispatchPending=!1},e.prototype.populate=function(){var t=this.get(),r=this.cloneFn(t);this.watchCurrent=r,this.watchPrevious=r,this.previous=r},e.prototype.swap=function(t){var r=this.cloneFn(t);this.watchPrevious=this.previous,this.watchCurrent=t,this.watchDispatchPending=!0,this.previous=r},e}(),bs=(0,o_.default)(H.default.UNINITIALIZED).withState(H.default.UNINITIALIZED,[]).withState(H.default.READY,[]).withState(H.default.MOUNTED,[]).withState(H.default.UNMOUNTED,[]).withState(H.default.DISPOSED,[]).withTransition(H.default.UNINITIALIZED,Me.default.INIT,H.default.READY,[xt.prototype.initialize]).withTransition(H.default.READY,Me.default.DISPOSE,H.default.DISPOSED,[xt.prototype.$dispose]).withTransition(H.default.READY,Me.default.MOUNT,H.default.MOUNTED,[xt.prototype.mount]).withTransition(H.default.MOUNTED,Me.default.UNMOUNT,H.default.UNMOUNTED,[xt.prototype.unmount]).withTransition(H.default.UNMOUNTED,Me.default.MOUNT,H.default.MOUNTED,[xt.prototype.remount]).withTransition(H.default.UNMOUNTED,Me.default.DISPOSE,H.default.DISPOSED,[xt.prototype.$dispose]).build();rr.default=xt});var No=s(function(Io){"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var mo;(function(e){e[e.COMMENT=8]="COMMENT",e[e.ELEMENT=1]="ELEMENT",e[e.TEXT=3]="TEXT"})(mo||(mo={}));Io.default=mo});var we=s(function(Ao){"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var Do;(function(e){e.CYDRAN_DIGEST_MAX_EVALUATIONS="cydran.digest.maxEvaluations",e.CYDRAN_CLONE_MAX_EVALUATIONS="cydran.clone.maxEvaluations",e.CYDRAN_EQUALS_MAX_EVALUATIONS="cydran.equals.maxEvaluations",e.CYDRAN_STARTUP_SYNCHRONOUS="cydran.startup.synchronous",e.CYDRAN_STRICT_ENABLED="cydran.strict.enabled",e.CYDRAN_STRICT_STARTPHRASE="cydran.strict.startphrase",e.CYDRAN_LAZY_STARTPHRASE="cydran.lazy.startphrase",e.CYDRAN_STRICT_MESSAGE="cydran.strict.message",e.CYDRAN_LOG_LEVEL="cydran.logging.level",e.CYDRAN_STYLES_ENABLED="cydran.styles.enabled",e.CYDRAN_OVERRIDE_WINDOW="cydran.override.window",e.CYDRAN_LOG_STRATEGY="cydran.logging.strategy",e.CYDRAN_LOG_COLOR_PREFIX="cydran.logging.color",e.CYDRAN_LOG_LABEL="cydran.logging.label",e.CYDRAN_LOG_LABEL_VISIBLE="cydran.logging.label.visible",e.CYDRAN_LOG_PREAMBLE_ORDER="cydran.logging.pramble.order"})(Do||(Do={}));Ao.default=Do});var Co=s(function(To){"use strict";Object.defineProperty(To,"__esModule",{value:!0});var Oo;(function(e){e.STAGE="$stage"})(Oo||(Oo={}));To.default=Oo});var U=s(function(I){"use strict";var So=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});I.Ids=I.PropertyKeys=I.RESET_KEY=I.INPUT_KEY=I.CHANGE_KEY=I.DOM_KEY=I.VALID_KEY=I.VALID_ID=I.CYDRAN_KEY=I.CYDRAN_SCRIPT_PREFIX=I.DEFAULT_EQUALS_DEPTH=I.DEFAULT_CLONE_DEPTH=I.ANONYMOUS_REGION_PREFIX=I.NodeTypes=I.MODULE_FIELD_NAME=I.CYDRAN_PUBLIC_CHANNEL=I.INTERNAL_CHANNEL_NAME=I.DEFAULT_MODULE_KEY=void 0;var a_=So(No());I.NodeTypes=a_.default;var u_=So(we());I.PropertyKeys=u_.default;var s_=So(Co());I.Ids=s_.default;var X=W();Object.defineProperty(I,"CYDRAN_PUBLIC_CHANNEL",{enumerable:!0,get:function(){return X.CYDRAN_PUBLIC_CHANNEL}});Object.defineProperty(I,"MODULE_FIELD_NAME",{enumerable:!0,get:function(){return X.MODULE_FIELD_NAME}});Object.defineProperty(I,"INTERNAL_CHANNEL_NAME",{enumerable:!0,get:function(){return X.INTERNAL_CHANNEL_NAME}});Object.defineProperty(I,"DEFAULT_MODULE_KEY",{enumerable:!0,get:function(){return X.DEFAULT_MODULE_KEY}});Object.defineProperty(I,"ANONYMOUS_REGION_PREFIX",{enumerable:!0,get:function(){return X.ANONYMOUS_REGION_PREFIX}});Object.defineProperty(I,"CYDRAN_SCRIPT_PREFIX",{enumerable:!0,get:function(){return X.CYDRAN_SCRIPT_PREFIX}});Object.defineProperty(I,"DEFAULT_CLONE_DEPTH",{enumerable:!0,get:function(){return X.DEFAULT_CLONE_DEPTH}});Object.defineProperty(I,"DEFAULT_EQUALS_DEPTH",{enumerable:!0,get:function(){return X.DEFAULT_EQUALS_DEPTH}});Object.defineProperty(I,"CYDRAN_KEY",{enumerable:!0,get:function(){return X.CYDRAN_KEY}});Object.defineProperty(I,"DOM_KEY",{enumerable:!0,get:function(){return X.DOM_KEY}});Object.defineProperty(I,"CHANGE_KEY",{enumerable:!0,get:function(){return X.CHANGE_KEY}});Object.defineProperty(I,"INPUT_KEY",{enumerable:!0,get:function(){return X.INPUT_KEY}});Object.defineProperty(I,"RESET_KEY",{enumerable:!0,get:function(){return X.RESET_KEY}});Object.defineProperty(I,"VALID_ID",{enumerable:!0,get:function(){return X.VALID_ID}});Object.defineProperty(I,"VALID_KEY",{enumerable:!0,get:function(){return X.VALID_KEY}})});var wo=s(function(Mo){"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});var Po;(function(e){e.V="v",e.VALUE="value",e.M="m",e.MODEL="model",e.P="p",e.PARAM="param",e.COMPARE="compare"})(Po||(Po={}));Mo.default=Po});var ir=s(function(gt){"use strict";var l_=gt&&gt.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),c_=gt&&gt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f_=gt&&gt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&l_(t,e,r);return c_(t,e),t};Object.defineProperty(gt,"__esModule",{value:!0});var Ro=P(),h_=U(),p_=h(),d_=f_(wo()),__=function(){function e(t){this.children=[],this.localItems={},this.items={},this.code="",this.parent=null,this.restricted=t==null||t}return e.prototype.setParent=function(t){!t||(this.parent&&this.parent.removeChild(this),this.parent=t,this.parent.addChild(this),this.refresh())},e.prototype.addChild=function(t){t&&this.children.push(t)},e.prototype.removeChild=function(t){var r=this.children.indexOf(t);r>=0&&this.children.splice(r,1)},e.prototype.getItems=function(){return this.items},e.prototype.getCode=function(){return this.code},e.prototype.add=function(t,r){this.checkName(t),this.localItems[t]=r,this.refresh(),this.refreshChildren()},e.prototype.remove=function(t){this.checkName(t),delete this.localItems[t],this.refresh(),this.refreshChildren()},e.prototype.get=function(t){var r=this.localItems[t];return(0,p_.isDefined)(r)?r:null},e.prototype.checkName=function(t){if(t==null)throw new Ro.NullValueError("name must not be null or undefined.");if(!h_.VALID_KEY.test(t))throw new Ro.ScopeError("Only objects with names starting with a letter and containing letters and numbers are allowed.");if(this.restricted&&t.toUpperCase()in d_)throw new Ro.ScopeError("".concat(t," is a reserved name in the scope."))},e.prototype.refresh=function(){if(this.items={},this.parent){var t=this.parent.getItems();for(var r in t)!t.hasOwnProperty(r)||(this.items[r]=t[r])}for(var r in this.localItems)!this.localItems.hasOwnProperty(r)||(this.items[r]=this.localItems[r]);this.refreshCode()},e.prototype.refreshCode=function(){this.code="";for(var t in this.items)if(!!this.items.hasOwnProperty(t)){var r="var ".concat(t," = arguments[0]['").concat(t,"'];\n");this.code+=r}},e.prototype.refreshChildren=function(){for(var t=0,r=this.children;t<r.length;t++){var n=r[t];n.refresh()}},e}();gt.default=__});var jt=s(function(Lo){"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var ot=h(),v_=F(),At={KEY:"key",WRITE:"write",DELETE:"delete"},g_=function(){function e(t){this.parent=t,this.clear()}return e.prototype.get=function(t){(0,ot.requireNotNull)(t,At.KEY);var r=null;return this.properties.hasOwnProperty(t)?r=this.properties[t]:(0,ot.isDefined)(this.parent)&&(r=this.parent.get(t)),r},e.prototype.attributesOf=function(t){var r;(0,ot.requireNotNull)(t,At.KEY);var n=null;if(this.properties.hasOwnProperty(t)){var i=Object.getOwnPropertyDescriptor(this.properties,t);n=(r={},r[At.KEY]=t,r[At.WRITE]=i.writable,r[At.DELETE]=i.configurable,r)}else(0,ot.isDefined)(this.parent)&&(n=this.parent.attributesOf(t));return n},e.prototype.isDefined=function(t){return(0,ot.isDefined)(this.get(t))},e.prototype.familyGroupKeysFrom=function(t,r){var n=this;r===void 0&&(r=!1),(0,ot.requireNotNull)(t,"partial");var i=[];(0,ot.isDefined)(this.parent)&&(i=this.parent.familyGroupKeysFrom(t,r));var o=Object.getOwnPropertyNames(this.properties).filter(function(u){var l=Object.getOwnPropertyDescriptor(n.properties,u).writable;return u.indexOf(t)===0&&(l||!l&&r)}),a=i.concat(o);return a.filter(function(u,l){return a.inde