text: !function(){"use strict";
  /*! *****************************************************************************
      Copyright (c) Microsoft Corporation.
  
      Permission to use, copy, modify, and/or distribute this software for any
      purpose with or without fee is hereby granted.
  
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
      OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      PERFORMANCE OF THIS SOFTWARE.
      ***************************************************************************** */var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n,r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function i(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function o(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))}function a(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}function u(t,e){var n=h[t]||"Unknown error";return Error(n.replace("%s",e))}var h=((n={})[0]="[ActivationContext] Invalid path: %s",n[1]="[ViewActivity] Render context not found (not a child component?)",n[2]="[ViewActivity] Application instance not found",n[3]="[ViewActivity] Dialog builder not found",n[4]="Invalid ViewComponent child component",n[5]="[ViewComponent] Render context not found (not a child component?)",n[6]="[Binding] Unknown binding filter: %s",n[7]="[Binding] Binding not found for: %s",n[8]="[Binding] Bound parent binding not found for: %s",n[9]="[Binding] Component not bound",n[10]="[Format] Cannot convert object value to string",n[11]="[Format] Invalid format type: %s",n[12]="[Component] Not an event handler method: %s",n[13]="[Component] Invalid event handler preset: %s",n[14]="[List] Symbol not supported",n[15]="[List] Existing objects are not of given type",n[16]="[List] Cannot add objects to a destroyed list",n[17]="[List] Cannot insert object that is already in this list",n[18]="[List] Object not found",n[19]="[List] Index out of bounds: %s",n[20]="[Map] Existing objects are not of given type",n[21]="[Map] Cannot add objects to a destroyed map",n[22]="[Object] Cannot add event handler to base class",n[23]="[Object] Argument is not a managed event",n[24]="[Object] Event recursion limit reached: %s",n[25]="[Object] Cannot deactivate managed object",n[26]="[Object] Managed object is already destroyed",n[27]="[Object] State transition cancelled",n[28]="[Object] Invalid object reference",n[29]="[Object] Referenced object has been destroyed",n[30]="[Object] Can only create managed properties on managed object instances",n[31]="[Object] Cannot turn properties with getters and/or setters into managed references",n[32]="[Object] Property is not writable",n[33]="[Record] Property is not serializable: %s",n[34]="[Object] Existing reference is not of given type",n[35]="[Service] Missing property name",n[36]="[Service] Service name cannot be blank",n[37]="[Object] Cannot observe events on parent reference",n[38]="[Object] Shadow observable can only be added to properties with getters",n[39]="[Object] Rate limit can only be applied to async handlers",n[40]="[Object] Recursion in observer constructor detected",n[41]="[Object] Synchronous observers are not allowed for property: %s",n[42]="[Object] Property is already managed in a base class: %s",n[43]="[Style] Invalid style set instance",n[44]="[Menu] Builder not found",n[45]="[Modal] modal property cannot be bound",n),d=function(){function t(t){void 0===t&&(t=""),this.name=t}return t.prototype.freeze=function(){return Object.freeze&&Object.freeze(this),this},t}(),p=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._coreEventMarker=!0,e}return e(n,t),n.isCoreEvent=function(t){return!!t._coreEventMarker},n}(d);!function(t){t.ACTIVE=new t("Active").freeze(),t.INACTIVE=new t("Inactive").freeze(),t.DESTROYED=new t("Destroyed").freeze()}(p||(p={}));var f=function(t){function n(e,n){var r=t.call(this,"ManagedParentChange")||this;return r.parent=e,r.propertyName=n,r}return e(n,t),n}(p),v=function(t){function n(e){return void 0===e&&(e="Change"),t.call(this,e)||this}return e(n,t),n}(d),y=(new v).freeze(),m=function(t){function n(e,n){void 0===e&&(e="ManagedListChange");var r=t.call(this,e)||this;return r.source=n,r}return e(n,t),n}(v),g=function(t){function n(e,n,r){var i=t.call(this,"ManagedObjectAdded",e)||this;return i.object=n,i.key=r,i}return e(n,t),n}(m),b=function(t){function n(e,n,r){var i=t.call(this,"ManagedObjectRemoved",e)||this;return i.object=n,i.key=r,i}return e(n,t),n}(m);function w(t,e,n,i,o){var a,s=e,c=!1,l=o,h=function(r,i,s){for(var l=a=Object.getOwnPropertyDescriptor(t,r),d=t;;){if(!l||i){if(!(d=Object.getPrototypeOf(d)))return;l=d&&Object.getOwnPropertyDescriptor(d,r)}if(l){var p=l.get;if(p){if(!n&&p["-async"])throw u(41);if(p["-shadow"])return e=p["-shadow"],c=!0,h(e,i,!0);s||o||l.set&&l.set["^-ch"]||(o=p)}return l}}};if(h(e),a&&a.set&&a.set["^-ch"]){var d=a.set["^-ch"];return o&&Object.defineProperty(t,e,r(r({},a),{get:o})),void(a.set["^-ch"]=function(){var t=d();return{getter:o||t.getter,setter:t.setter,makeHandler:function(e,n,r){return i(e,n,t&&t.makeHandler(e,n,r))}}})}var p=function(t){var n,r,i=p["^-ch"](),l=i.makeHandler(this,e),u=function(t){i.setter&&i.setter.call(this,t),l(n=t,void 0,l)},h=i.getter;h||(h=c?function(){if(r)return n;r=!0;try{return this[s]}finally{r=!1}}:o||function(){return n});Object.defineProperty(this,e,{configurable:!0,enumerable:!a||a.enumerable,get:h,set:u}),void 0!==t&&u.call(this,t)};p["^-ch"]=function(){var t=h(s,!0),n=t&&t.set&&t.set["^-ch"]&&t.set["^-ch"]();if(n&&n.getter&&l)throw u(42,e);return{getter:o||n&&n.getter,setter:n?n.setter:t&&t.set,makeHandler:function(t,e,r){return i(t,e,n&&n.makeHandler(t,e,r))}}};var f=o||function(){return a&&a.value};Object.defineProperty(t,e,{configurable:!0,enumerable:!a||a.enumerable,get:f,set:p})}function _(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i,o=n[0]&&"function"==typeof n[0]&&!(n[0].prototype instanceof d)&&n[0]!==d,a=o?n[0]:void 0,s=a?function(t,e){var n=this;if(i!==t&&this["^$"]){var r=a.call(this,t,e);r&&(Array.isArray(r)?r.forEach((function(t){p.isCoreEvent(t)||n.emit(i=t)})):p.isCoreEvent(r)||this.emit(i=r),i=void 0)}}:function(t){i!==t&&this["^$"]&&(n.length&&!n.some((function(e){return t===e||"function"==typeof e&&t instanceof e}))||p.isCoreEvent(t)||(this.emit(i=t),i=void 0))};Object.defineProperty(t,"^-ec",{configurable:!0,enumerable:!1,value:s}),e||Object.defineProperty(t,"^-en",{configurable:!0,enumerable:!1,value:s})}var C=function(){};function x(t){C=t}var S=Object.freeze({__proto__:null,defineChainableProperty:w,propagateEvents:_,get exceptionHandler(){return C},setExceptionHandler:x}),E=1e3,O="^o:uid",k=Promise.resolve();function A(t,e){var n=!0;t._addInitializer((function(){var r="function"==typeof e?e():t[e];r&&(n&&function(t,e){var n,r,i=function(n,r,i){!function(t,e,n,r,i){if(i){var s,c,l,u=r["^o:rate"];e.addEventHandler((function(e){return o(this,void 0,void 0,(function(){var i,o,h,d;return a(this,(function(a){switch(a.label){case 0:if(n&&!n(e))return[3,12];a.label=1;case 1:return a.trys.push([1,11,,12]),u>=0?(c=e,s?[2]:(s=!0,i=Date.now(),(o=l+u-i)>0?[4,new Promise((function(t){setTimeout(t,o)}))]:[3,3])):[3,6];case 2:return a.sent(),[3,5];case 3:return[4,k];case 4:a.sent(),a.label=5;case 5:return l=Date.now(),s=!1,e=c,[3,8];case 6:return[4,k];case 7:a.sent(),a.label=8;case 8:return c=void 0,h=M(this,t),e?[4,r.call(h,e)]:[3,10];case 9:a.sent(),a.label=10;case 10:return[3,12];case 11:return d=a.sent(),C(d),[3,12];case 12:return[2]}}))}))}))}else e.addEventHandler((function(e){if(!n||n(e)){var i=M(this,t);try{r.call(i,e)}catch(t){C(t)}}}))}(e,t,n,r,i)},c=function(t,e){var n=function(e){t.call(this,e.parent,e,"managedParent")};n["^o:rate"]=t["^o:rate"],i((function(t){return t instanceof f}),n,e)},l=t.prototype,h=function(t){var n,r;if(!Object.prototype.hasOwnProperty.call(e.prototype,t))return"continue";var o=e.prototype[t];if("function"==typeof o)if(Array.isArray(o["^o:prop"])){var a="Async"===t.slice(-5);try{for(var h=(n=void 0,s(o["^o:prop"])),d=h.next();!d.done;d=h.next()){var p=d.value;if(".referenceCount"===p)P(e,l,"^-in",o,!1,a,0);else if(".managedParent"===p)c(o,a);else{if("!managedParent"===p)throw u(37);var f="!"===p[0];P(e,l,p.slice(1),o,f,a)}}}catch(t){n={error:t}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}else if("o"===t[0]&&"n"===t[1])switch(t){case"onChangeAsync":i((function(t){return"Change"===t.name||t instanceof v}),o,!0);break;case"onChange":i((function(t){return"Change"===t.name||t instanceof v}),o);break;case"onEventAsync":i(void 0,o,!0);break;case"onEvent":i(void 0,o);break;case"onManagedParentChangeAsync":c(o,!0);break;case"onManagedParentChange":c(o);break;case"onReferenceCountChangeAsync":P(e,l,"^-in",o,!1,!0,0);break;case"onReferenceCountChange":P(e,l,"^-in",o,!1,!1,0);break;default:"Change"===t.slice(-6)?(t=("_"!==t[2]?t[2].toLowerCase():"")+t.slice(3,-6),P(e,l,t,o)):"ChangeAsync"===t.slice(-11)?(t=("_"!==t[2]?t[2].toLowerCase():"")+t.slice(3,-11),P(e,l,t,o,!1,!0)):"Async"===t.slice(-5)?(t=t.slice(2,-5),i((function(e){return e.name===t}),o,!0)):(t=t.slice(2),i((function(e){return e.name===t}),o,!1))}};try{for(var d=s(Object.getOwnPropertyNames(e.prototype)),p=d.next();!p.done;p=d.next()){h(p.value)}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}(t,r),n=!1,M(this,r))}))}function R(t,e){return function(n,r){var i=Object.getOwnPropertyDescriptor(n,r);if(!i||!i.get)throw u(38);i.get["-shadow"]=t,i.get["-async"]=!!e}}function I(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e,n){var r,i,o=e[n];if("function"!=typeof o)throw TypeError();o["^o:prop"]||(o["^o:prop"]=[]);var a=o["^o:prop"],c=function(t){a.some((function(e){return e==="."+t}))||a.push("."+t)};try{for(var l=s(t),u=l.next();!u.done;u=l.next()){c(u.value)}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}function P(t,e,n,r,i,s,c){var l=this;if(s){var u=r["^o:rate"];w(e,n,!0,(function(e,s,h){var d,p,f,y=c,m=s!==n,g=0,b=M(e,t);return function(t,s,c){return o(l,void 0,void 0,(function(){var o,l,w,_,x;return a(this,(function(a){switch(a.label){case 0:if(h&&h(t,s,c),m&&(t=e[n]),o=s?s instanceof v:y!==t,i?!(s&&t instanceof N):!o)return[2];a.label=1;case 1:return a.trys.push([1,10,,11]),y=t,u>=0?(p=s,d?[2]:(l=++g,d=!0,w=Date.now(),(_=f+u-w)>0?[4,new Promise((function(t){setTimeout(t,_)}))]:[3,3])):[3,6];case 2:return a.sent(),[3,5];case 3:return[4,k];case 4:a.sent(),a.label=5;case 5:return g!==l?[2]:(f=Date.now(),d=!1,s=p,[3,8]);case 6:return d?[2]:(d=s&&s.name||!0,[4,k]);case 7:a.sent(),d=!1,a.label=8;case 8:return p=void 0,[4,r.call(b,y,s,n)];case 9:return a.sent(),[3,11];case 10:return x=a.sent(),C(x),[3,11];case 11:return[2]}}))}))}}))}else w(e,n,!1,(function(e,o,a){var s=c,l=o!==n,u=M(e,t);return function(t,o,c){if(a&&a(t,o,c),l&&(t=e[n]),i?o&&t instanceof N:o?o instanceof v:s!==t){s=t;try{r.call(u,t,o,n)}catch(t){C(t)}}}}))}function M(t,e){var n=e["^o:uid"]||(e["^o:uid"]=E++),r=t[O+n];if(r){if(!0===r)throw u(40)}else Object.defineProperty(t,O+n,{enumerable:!1,configurable:!1,writable:!0,value:!0}),r=t[O+n]=new e(t),t["^$"]===T.ACTIVE&&r.onActive&&r.onActive();return r}var T,D=Object.prototype.hasOwnProperty;!function(t){t[t.DESTROYED=0]="DESTROYED",t[t.CREATED=1]="CREATED",t[t.ACTIVATING=2]="ACTIVATING",t[t.ACTIVE=3]="ACTIVE",t[t.DEACTIVATING=4]="DEACTIVATING",t[t.INACTIVE=5]="INACTIVE",t[t.DESTROYING=6]="DESTROYING"}(T||(T={}));for(var F=[],L=0;L<250;L++)F[L]={u:0,a:void 0,b:void 0,p:"",j:void 0,k:void 0,f:void 0,g:void 0};var j=16,B=16,N=function(){function t(){this.managedId=j++,this["^$"]=T.CREATED,Object.defineProperty(this,"^$",r(r({},Object.getOwnPropertyDescriptor(this,"^$")),{writable:!0,enumerable:!1})),this["^-in"]=0,Object.defineProperty(this,"^-in",r(r({},Object.getOwnPropertyDescriptor(this,"^-in")),{enumerable:!1})),Object.defineProperty(this,"^-out",{value:[],writable:!1,configurable:!1,enumerable:!1}),this["^-new"]()}return t.addObserver=function(t){return A(this,(function(){return t})),this},t.addEventHandler=function(e){if(this===t)throw u(22);var n,r;return D.call(this.prototype,"^-ev")?r=this.prototype["^-ev"]:(n=Object.getPrototypeOf(this.prototype),Object.defineProperty(this.prototype,"^-ev",{enumerable:!1,configurable:!1,writable:!0})),this.prototype["^-ev"]=function(t){n&&n["^-ev"]?n["^-ev"].call(this,t):r&&r.call(this,t);try{e.call(this,t)}catch(t){C(t)}},this},t.prototype["^-new"]=function(){},t._addInitializer=function(t){var e=D.call(this.prototype,"^-new")&&this.prototype["^-new"];if(e)this.prototype["^-new"]=function(){e.call(this),t.call(this)};else{var n=Object.getPrototypeOf(this.prototype);this.prototype["^-new"]=function(){var e=n["^-new"];e&&e.call(this),t.call(this)}}},Object.defineProperty(t.prototype,"managedState",{get:function(){return this["^$"]},enumerable:!1,configurable:!0}),t.prototype.getReferenceCount=function(){return this["^-in"]},t.prototype.getManagedReferrers=function(){var t=Object.create(null),e=[];return this["^-out"].forEach((function(n){var r=n.a;r.managedState&&!t[r.managedId]&&e.push(r)})),e},t.prototype.getManagedParent=function(t){var e=this["^-out"].parent,n=e&&e.a;if(t&&n&&!(n instanceof t)){var r=n["^-out"].parent;if((n=r&&r.a)&&!(n instanceof t)){n=(r=n["^-out"].parent)&&r.a;for(var i=void 0;n&&!(n instanceof t)&&((i||(i=Object.create(null)))[n.managedId]=!0,!(n=(r=n["^-out"].parent)&&r.a)||!i[n.managedId]););}}return n&&n!==this?n:void 0},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];if(!this["^$"]&&t!==p.DESTROYED)throw u(26);if("string"==typeof t&&(t=new d(t).freeze()),"function"==typeof t&&(t=(new(t.bind.apply(t,l([void 0],c(r))))).freeze()),!(t instanceof d))throw u(23);if(void 0===this._emitting)Object.defineProperty(this,"_emitting",{enumerable:!1,writable:!0,value:0});else if(this._emitting>4)throw u(24,t.name);try{this._emitting=this._emitting+1,this["^-ev"]&&this["^-ev"](t),this["^-out"].forEach((function(e){e&&e.a&&e.f&&e.f.call(void 0,t,e.a,n)}))}catch(t){e=t}return this._emitting--,e&&C(e),this},t.prototype.emitChange=function(t){void 0===t?this.emit(y):this.emit(v,t)},t.prototype.propagateChildEvents=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _.apply(S,l([this,!0],c(t))),this},t.prototype.activateManagedAsync=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(e){return[2,this._transitionManagedState(T.ACTIVE,(function(){return o(t,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return this["^$"]=T.ACTIVATING,[4,this.onManagedStateActivatingAsync()];case 1:return t.sent(),[2]}}))}))}),p.ACTIVE,this.onManagedStateActiveAsync)]}))}))},t.prototype.deactivateManagedAsync=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(e){switch(e.label){case 0:return[4,this._transitionManagedState(T.INACTIVE,(function(){return o(t,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return this["^$"]=T.DEACTIVATING,[4,this.onManagedStateDeactivatingAsync()];case 1:return t.sent(),[2]}}))}))}),p.INACTIVE,this.onManagedStateInactiveAsync)];case 1:return e.sent(),[2]}}))}))},t.prototype.destroyManagedAsync=function(){return o(this,void 0,void 0,(function(){var e,n,r=this;return a(this,(function(i){switch(i.label){case 0:e=3,i.label=1;case 1:if((n=this["^$"])!==T.ACTIVE&&n!==T.ACTIVATING&&n!==T.DEACTIVATING)return[3,3];if(e--<=0)throw u(25);return[4,this.deactivateManagedAsync()];case 2:return i.sent(),[3,1];case 3:return n?[4,this._transitionManagedState(T.DESTROYED,(function(){return o(r,void 0,void 0,(function(){var e,n,r,i=this;return a(this,(function(o){switch(o.label){case 0:return this["^$"]=T.DESTROYING,[4,this.onManagedStateDestroyingAsync()];case 1:for(r in o.sent(),delete(e=this["^-out"]).parent,delete e.head,delete e.tail,n=[],e)e[r]&&(e[r].g&&n.push(e[r].g),t._discardRefLink(e[r]));return this["^$"]=T.DESTROYED,n.forEach((function(t){try{t(i)}catch(t){}})),[2]}}))}))}),p.DESTROYED)]:[2];case 4:return i.sent(),[2]}}))}))},t.prototype.onManagedStateActivatingAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2]}))}))},t.prototype.onManagedStateActiveAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2]}))}))},t.prototype.onManagedStateDeactivatingAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2]}))}))},t.prototype.onManagedStateInactiveAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2]}))}))},t.prototype.onManagedStateDestroyingAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2]}))}))},t.prototype._transitionManagedState=function(t,e,n,r){var i=this;D.call(this,"_transition")||Object.defineProperty(this,"_transition",{configurable:!1,writable:!0,enumerable:!1});var s=function(s){var c,l,h={state:t,p:new Promise((function(d,p){c=p;var f=function(){var s;l||d((s=h,o(i,void 0,void 0,(function(){var i,o;return a(this,(function(a){switch(a.label){case 0:if(i=this["^$"],t===i)return[2];if(!i)throw u(26);this._transition=s,a.label=1;case 1:return a.trys.push([1,,3,4]),[4,e.call(this)];case 2:return a.sent(),this["^$"]=t,o=!0,this.emit(n),r&&r.call(this),[3,4];case 3:return o||(this["^$"]=i),this._transition=s.pending||void 0,[7];case 4:return[2]}}))}))))};s.then(f,f)})),reject:function(){l=!0,c(u(27))}};return h};if(this._transition){if(this._transition.pending){if(this._transition.pending.state===t)return this._transition.pending.p;this._transition.pending.reject(),this._transition.pending=void 0}return this._transition.state===t?this._transition.p:(this._transition.pending=s(this._transition.p)).p}return(this._transition=s(Promise.resolve())).p},t._createRefLink=function(t,e,n,r,i){var o,a=e["^-out"];return F.length?((o=F.pop()).a=t,o.b=e,o.p=n,o.f=r,o.g=i,o.u=a.length,o.j=o.k=void 0):o={u:a.length,a:t,b:e,p:n,f:r,g:i,j:void 0,k:void 0},a.push(o),e["^-in"]++,t["^-out"][n]=o,o},t._discardRefLink=function(t){if(!(t&&t.u>=0&&t.a&&t.b))return!1;var e=t.a&&t.a["^-out"];e&&e[t.p]===t&&("@"===t.p[0]?(e.head===t&&(e.head=t.k),e.tail===t&&(e.tail=t.j),t.j&&t.j.k===t&&(t.j.k=t.k),t.k&&t.k.j===t&&(t.k.j=t.j),delete e[t.p]):e[t.p]=void 0);var n=t.b&&t.b["^-out"];if(n&&n[t.u]===t){if(t.b["^-in"]--,t.u>=0&&t.u===n.length-1){for(var r=n.length-2;r>=0&&void 0===n[r];)r--;n.length=r+1}else delete n[t.u];n.parent===t&&t.b!==t.a&&(n.parent=void 0,t.b.destroyManagedAsync().catch(C))}return F.length<1e3&&F.push(t),!0},t._makeManagedChildRefLink=function(t,e){var n=t.b,r=n["^-out"];if(r[t.u]===t){var i=r.parent;if(!i||i.a!==t.a){if(r.parent=t,i){this._discardRefLink(i);try{i.g&&i.g(this)}catch(t){}}else n._makeRefManagedParent();n["^$"]&&n.emit(f,t.a,e)}}},t._isManagedChildRefLink=function(t){return t.b["^-out"].parent===t},t._validateReferenceAssignment=function(e,n,r){if(void 0===r&&(r=t),void 0!==n){if(!e["^$"])throw u(29);if(!(n instanceof r))throw u(28);if(!n["^$"])throw u(29)}},t.createManagedReferenceProperty=function(e,n,r,i,o){if(!(e instanceof t))throw u(30);var a=Object.getOwnPropertyDescriptor(e,n);if(a&&(!a.set||!a.set["^-ch"]))throw u(31);var s="P"+B++;return w(e,n,!1,(function(e,a,c){return function(l,h,d){if(h){if(i){if(l!==i)return;l=i.get()}c&&c(l,h,d)}else{if(i&&l!==i)throw u(32);t._validateReferenceAssignment(e,l,o);var p=e["^-out"][s];if(!p||!l||p.b!==l||i){if(t._discardRefLink(p),l){var f=t._createRefLink(e,l,s,(function(t,e,i){d(i,t,d),r&&e["^-ec"]&&e["^-ec"](t,n)}),(function(){e[a]=void 0}));r&&t._makeManagedChildRefLink(f,n)}i&&(l=i.get()),c&&c(l,h,d)}}}}),(function(){var e=this["^-out"][s];return i?(e||(t._createRefLink(this,i,s),this[n]=i),i.get()):e&&e.b}))},t.prototype._makeRefManagedParent=function(){},t}(),U=function(t){function n(){return t.call(this)||this}return e(n,t),n.prototype.propagateEvents=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _.apply(S,l([this,!1],c(t))),this},n.prototype.restrict=function(t){if(this.objects().some((function(e){return!(e instanceof t)})))throw u(20);return this._managedClassRestriction=t,this},n.prototype.get=function(t){if(this["^$"]){var e=this["^-out"]["%"+String(t)];return e&&e.b}},n.prototype.has=function(t){return!!this["^$"]&&!!this["^-out"]["%"+String(t)]},n.prototype.unset=function(t){var e=this["^-out"]["%"+String(t)],n=e&&e.b;e&&N._discardRefLink(e)&&this.managedState&&this.emit(b,this,n,t)},n.prototype.set=function(t,e){var n=this;if(!this["^$"])throw u(21);var r=this["^-out"];if(t=String(t),N._validateReferenceAssignment(this,e,this._managedClassRestriction),!e)return this.unset(t);var i="%"+t,o=r[i];if(o){if(e&&o.b===e)return;N._discardRefLink(o)}var a=N._createRefLink(this,e,i,(function(t){n["^-en"]?n["^-en"](t,""):n["^-ec"]&&N._isManagedChildRefLink(a)&&n["^-ec"](t,"")}),(function(e){n.managedState&&n.emit(b,n,e,t)}));return r.parent&&!this._isWeakRef&&N._makeManagedChildRefLink(a),this.emit(g,this,e,t),this},n.prototype.remove=function(t){var e,n,r=this["^-out"];for(var i in r)r[i]&&r[i].b===t&&N._discardRefLink(r[i])&&(n=i.slice(1),e=!0);return e&&this.managedState&&this.emit(b,this,t,n),this},n.prototype.clear=function(){var t,e=this["^-out"];for(var n in e)if("%"===n[0]){var r=e[n];N._discardRefLink(r)&&(t=!0)}return t&&this.emitChange(),this},n.prototype.objects=function(){var t=[];if(!this["^$"])return t;var e=Object.create(null),n=this["^-out"];for(var r in n)if("%"===r[0]){var i=n[r]&&n[r].b;i&&!e[i.managedId]&&(e[i.managedId]=!0,t.push(i))}return t},n.prototype.keys=function(){var t=[],e=this["^-out"];if(!e)return t;for(var n in e)"%"===n[0]&&e[n]&&t.push(n.slice(1));return t},n.prototype.forEach=function(t){var e=this["^-out"];if(e)for(var n in e)if("%"===n[0]&&e[n]){var r=n.slice(1),i=e[n]&&e[n].b;i&&t(r,i)}},n.prototype.includes=function(t){var e=this;return t instanceof N&&t["^-out"].some((function(t){return t.a===e&&"%"===t.p[0]}))},n.prototype.toObject=function(){var t=Object.create(null);if(!this["^$"])return t;var e=this["^-out"];for(var n in e)"%"===n[0]&&e[n]&&(t[n.slice(1)]=e[n].b);return t},n.prototype.toJSON=function(){return this.toObject()},n.prototype.weakRef=function(){return this._isWeakRef=!0,this},n.prototype._makeRefManagedParent=function(){if(!this._isWeakRef){var t=this["^-out"];for(var e in t)t[e]&&t[e].a===this&&N._makeManagedChildRefLink(t[e])}},n}(N),V="P*ref",z=function(t){function n(e){var n=t.call(this)||this;return e&&n.set(e),n}return e(n,t),n.prototype.propagateEvents=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _.apply(S,l([this,!1],c(t))),this},n.prototype.restrict=function(t){var e=this.get();if(e&&!(e instanceof t))throw u(34);return this._managedClassRestriction=t,this},n.prototype.get=function(){var t=this["^-out"]["P*ref"];return t&&t.b},n.prototype.clear=function(){return this.set()},n.prototype.set=function(t){var e=this;N._validateReferenceAssignment(this,t,this._managedClassRestriction);var n=this["^-out"]["P*ref"];if(n){if(t&&n.b===t)return;N._discardRefLink(n)}if(t){var r=N._createRefLink(this,t,V,(function(t){var n=e["^-en"]||e["^-ec"];n&&n.call(e,t,"")}),(function(){e.managedState&&e.emit(v)}));this["^-out"].parent&&!this._isWeakRef&&N._makeManagedChildRefLink(r)}return this.emitChange(),this},n.prototype.weakRef=function(){return this._isWeakRef=!0,this},n.prototype._makeRefManagedParent=function(){if(!this._isWeakRef){var t=this["^-out"];t["P*ref"]&&N._makeManagedChildRefLink(t["P*ref"])}},n.prototype.toJSON=function(){var t=this.get();return{$ref:t?t.managedId:void 0}},n}(N);function W(t,e){N.createManagedReferenceProperty(t,e)}function K(t,e){N.createManagedReferenceProperty(t,e,!0)}var H=function(t){function n(){var e=t.call(this)||this;return e.services=new U,e}return e(n,t),n.instance=new n,i([K],n.prototype,"services",void 0),n}(N);function $(t){return function(e,n){var r=String(t).toUpperCase(),i=H.instance.services.get(r);i||(i=(new z).restrict(q).propagateEvents(),H.instance.services.set(r,i)),N.createManagedReferenceProperty(e,n,!1,i)}}var q=function(t){function n(e){var n=t.call(this)||this;return e&&(n.name=e),n}return e(n,t),n.find=function(t){var e=String(t).toUpperCase(),n=H.instance.services.get(e);return n&&n.get()},n.link=function(t,e,n){if(!n)throw u(35);$(t)(e.prototype,n)},n.prototype.register=function(){var t=String(this.name||"").toUpperCase();if(!t)throw u(36);var e=H.instance.services.get(t);return e?e.set(this):(e=new z(this).restrict(n).propagateEvents(),H.instance.services.set(t,e)),this},n}(N),G=function(t){function n(e){var n=t.call(this,"ERROR")||this;return n.error=e,n}return e(n,t),n}(d),Y=function(t){function n(){var e=t.call(this)||this;if(n.instance)throw Error();return e}return e(n,t),n.emitError=function(t){console.error?console.error(t):console.log&&console.log(t),n.instance.emit(G,t)},n.instance=new n,n}(N);function X(t){Y.emitError(t)}function J(t,e){"{"===t[0]&&(t=t.slice(1,-1));var n=t.match(/^([-0+ ]+)?(\d+)?(\.\d+)?([%ndiufFeEgGxXsc])$/);if(!n){var r=t.split(":"),i=et[r.shift()];return i?i.apply(void 0,l([e],c(r))):(X(u(11,t)),"???")}var o=c(n,5),a=o[1],s=o[2],h=o[3],d=o[4],p=void 0,f=void 0,v=void 0;a&&(a.indexOf("-")>=0?p=!0:a.indexOf("0")>=0&&(v="0"),a.indexOf("+")>=0?f="+":a.indexOf(" ")>=0&&(f=" "));var y=+s||0,m=h?+h.slice(1)||0:void 0,g=void 0;switch(d){case"%":return"%";case"d":case"i":case"u":return Z(String(Math.round(Math.abs(+e))||0),e<0,y,p,f,v);case"n":case"N":var b=Math.abs(+e).toFixed(null!=m?m:6);return b.length&&(b=b.replace(/\.?0+$/,"")),Z(b,e<0,y,p,f,v);case"f":case"F":return Z(Math.abs(+e).toFixed(null!=m?m:6),e<0,y,p,f,v);case"e":case"E":return g=Z(Math.abs(+e).toExponential(null!=m?m:6),e<0,y,p,f,v),"E"===d?g.toUpperCase():g;case"g":case"G":var w=Math.abs(+e).toExponential(null!=m?m:6).replace(/\.?0+e/,"e"),_=+w.split("e")[1]||0;return _>=-4&&_<=(null!=m?m:6)&&(w=Math.abs(+e).toFixed(null!=m?m:6)).length&&(w=w.replace(/\.?0+$/,"")),g=Z(w,e<0,y,p,f,v),"G"===d?g.toUpperCase():g;case"x":case"X":return g=Z(Math.abs(+e||0).toString(16),e<0,y,p,f,v),"X"===d?g.toUpperCase():g;case"c":e=null==e?"":String.fromCharCode(+e);case"s":return g=String(null!=e?e:""),y>0&&(g=p?Q(g,y):tt(g,y," ")),m>0&&(g=g.slice(0,m)),g}}function Z(t,e,n,r,i,o){var a=e?"-":i||"";if(r)return Q(a+t,n);if(o&&/^[\da-f]/.test(t)||(o=" "),a)return a+tt(t,n-1,o);var s=it.get();return s&&"."!==s.decimalSeparator&&(t=t.replace(".",s.decimalSeparator)),tt(t,n,o||" ")}function Q(t,e){if(t.length>=e)return t;for(var n=t.length;n<e;n++)t+=" ";return t}function tt(t,e,n){if(t.length>=e)return t;for(var r=t.length;r<e;r++)t=n+t;return t}x(Y.emitError);var et={_:function(){},"!":function(t){return!t},"not?":function(t){return!t},"?":function(t){return!!t},"!!":function(t){return!!t},n:function(t){return+t},num:function(t){return+t},then:function(t,e,n){return t&&e||n},else:function(t,e){return t||e},or:function(t,e){return t||e},uc:function(t){return null==t?t:String(t).toUpperCase()},lc:function(t){return null==t?t:String(t).toLowerCase()},uniq:function(t){if(!Array.isArray(t)){if(!t||!t.toArray)return t;if(t=t.toArray(),!Array.isArray(t))return t}var e=[],n=Object.create(null);return t.filter((function(t){return null!=t&&("string"==typeof t?!n[t]&&(n[t]=!0):!(e.indexOf(t)>=0)&&(e.push(t),!0))}))},pluck:function(t,e){if(!Array.isArray(t)){if(!t||!t.toArray)return t;if(t=t.toArray(),!Array.isArray(t))return t}return t.map((function(t){return t&&t[e]}))},local:function(){var t=it.get();return t?t.format.apply(t,arguments):"???"}};var nt=new z,rt=0,it=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Core.I18n",e.decimalSeparator=".",e}return e(n,t),n.get=function(){return nt.get()},n.prototype.register=function(){return t.prototype.register.call(this),nt.set(this),rt++,this},n.prototype.loadTexts=function(t){var e,n;this._loadedTexts||(this._loadedTexts={});try{for(var r=s(t),i=r.next();!i.done;i=r.next()){var o=i.value;o[1]&&(this._loadedTexts[o[0]]=o[1])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}rt++},n.prototype.getText=function(t){var e;return(null===(e=this._loadedTexts)||void 0===e?void 0:e[t])?this._loadedTexts[t]:t},n.prototype.getPlural=function(t,e){return e[1==t?0:1]||""},n}(q),ot=function(){function t(t,e){this.format=t,e&&this.update(e)}return t.prototype.toString=function(){return""},t.prototype.update=function(t){var e,n=this,r=this.format,i=rt;return this.toString=function(){if(rt!==i&&(e=void 0,n.text=void 0),void 0!==e)return e;var o;if(void 0===n.text&&(n.text=((o=nt.get())?o.getText(String(r)):String(r)).replace(/\*\*\*\{.*\}\*\*\*/g,"")),!t.length)return e=n.text;var a=n.text.replace(/\#(?:(\d+)\$)?\{([^}]*)\}/g,(o=o||nt.get())?function(e,n,r){return o.getPlural(+t[n?n-1:0]||0,r.split("/"))}:function(e,n,r){return r.split("/")[1==t[n?n-1:0]?0:1]});return e=function(t,e){var n=0;return t.replace(/\%(?:(\d+)\$)?(\{[^\}]*\}|[-+*.0-9 ]*[%a-zA-Z])/g,(function(t,r,i){var o;if("s"===i)return String(null!==(o=r?e[r-1]:e[n++])&&void 0!==o?o:"");var a=J(i=i.replace(/\*/g,(function(){return String(e[n++])})),r?e[r-1]:e[n++]);if("object"==typeof a){if(a.toString===Object.prototype.toString)return X(u(10)),"???";if(a.toString===Array.prototype.toString&&a.map===Array.prototype.map)return a.map((function(t){return null!=t&&String(t)||""})).join(", ")}return String(null!=a?a:"")}))}(a,t)},this},t}();function at(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t instanceof ot?e.length?new ot(t.format,e):t:new ot(t,e)}var st=function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.call(this)||this}return e(n,t),n.type=function(t,r){var i,o=at(r);return(i=function(n){function r(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=n.call(this)||this;return i.code=t,i.message=o.update([e]).toString(),i}return e(r,n),r}(n)).code=t,i},n}(Error);if("function"!=typeof Symbol){if("object"!=typeof window)throw u(14);window.Symbol={iterator:"Symbol.iterator_shim_"+Math.random()}}var ct=function(t){function n(){for(var e,n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=t.call(this)||this;a["^count"]=0,a["^count"]=0,Object.defineProperty(a,"_managedCount",r(r({},Object.getOwnPropertyDescriptor(a,"_managedCount")),{enumerable:!1}));try{for(var c=s(i),l=c.next();!l.done;l=c.next()){var u=l.value;a.insert(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}return a}return e(n,t),n.prototype.propagateEvents=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return _.apply(S,l([this,!1],c(t))),this},n.prototype.restrict=function(t){if(this.toArray().some((function(e){return!(e instanceof t)})))throw u(15);return this._managedClassRestriction=t,this},Object.defineProperty(n.prototype,"count",{get:function(){return this["^-out"].head?this["^count"]:0},enumerable:!1,configurable:!0}),n.prototype.add=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{for(var i=s(n),o=i.next();!o.done;o=i.next()){var a=o.value;this.insert(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}return this},n.prototype.insert=function(t,e){var n=this;if(!this["^$"])throw u(16);var r=this["^-out"];if(N._validateReferenceAssignment(this,t,this._managedClassRestriction),void 0===t)throw ReferenceError();if(this.includes(t))throw u(17);var i=e&&r["@"+e.managedId];if(e&&(!i||i.b!==e))throw u(18);var o="@"+t.managedId,a=N._createRefLink(this,t,o,(function(t){n["^-en"]?n["^-en"](t,""):n["^-ec"]&&N._isManagedChildRefLink(a)&&n["^-ec"](t,"")}),(function(t){n["^count"]--,n.managedState&&n.emit(b,n,t)}));return i?(r.head===i&&(r.head=a),(a.j=i.j)&&(a.j.k=a),a.k=i,i.j=a):r.tail?(r.tail.k=a,a.j=r.tail,a.k=void 0,r.tail=a):r.head=r.tail=a,this["^count"]++,r.parent&&!this._isWeakRef&&N._makeManagedChildRefLink(a),this.emit(g,this,t),this},n.prototype.remove=function(t){if(!(t instanceof N))throw TypeError();var e=t instanceof N&&this["^-out"]["@"+t.managedId];return e&&e.b===t&&N._discardRefLink(e)&&(this["^count"]--,this.managedState&&this.emit(b,this,t)),this},n.prototype.splice=function(t,e){for(var n,r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(void 0!==t&&!(t instanceof N))throw TypeError();var a,c=[];for("number"==typeof e&&(a=e);t&&t!==e&&!(a--<1);){var l=t instanceof N&&this["^-out"]["@"+t.managedId],u=l&&l.k&&l.k.b;l&&l.b===t&&(c.push(t),N._discardRefLink(l)&&(this["^count"]--,this.emit(b,this,t))),t=u}try{for(var h=s(i),d=h.next();!d.done;d=h.next()){var p=d.value;this.insert(p,t)}}catch(t){n={error:t}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return c},n.prototype.replace=function(t){var e,n,r,i,o,a,c,l,u,h=this,d=this["^-out"],p=[],f=function(t,e){return p.unshift((function(){return h.insert(t,e)}))},v=[],y=function(t){return v.push((function(){return h.remove(t)}))},g=[],b=function(t,e){return g.unshift((function(){var n=d["@"+t.managedId];if(n){var r=e&&d["@"+e.managedId];n!==r&&n.k!==r&&(u=!0,d.head===n&&(d.head=n.k),d.tail===n&&(d.tail=n.j),n.j&&(n.j.k=n.k),n.k&&(n.k.j=n.j),n.k=r,r?(n.j=r.j,r.j&&(r.j.k=n),r.j=n):(n.j=d.tail,n.j&&(n.j.k=n)),n.j||(d.head=n),n.k||(d.tail=n))}}))},w=Object.create(null),_=[];try{for(var C=s(t),x=C.next();!x.done;x=C.next()){var S=x.value;if(void 0!==S)if(S instanceof N&&(w[S.managedId]=!0),this.includes(S))for(_.unshift(b.bind(this,S));_.length>1;)_.pop()(S);else _.push(f.bind(this,S))}}catch(t){e={error:t}}finally{try{x&&!x.done&&(n=C.return)&&n.call(C)}finally{if(e)throw e.error}}for(;_.length;)_.pop()(void 0);for(var E=this["^-out"].head;E;)w[E.b.managedId]||y(E.b),E=E.k;try{for(var O=s(v),k=O.next();!k.done;k=O.next()){(0,k.value)()}}catch(t){r={error:t}}finally{try{k&&!k.done&&(i=O.return)&&i.call(O)}finally{if(r)throw r.error}}try{for(var A=s(g),R=A.next();!R.done;R=A.next()){(0,R.value)()}}catch(t){o={error:t}}finally{try{R&&!R.done&&(a=A.return)&&a.call(A)}finally{if(o)throw o.error}}u&&this.emit(m,void 0,this);try{for(var I=s(p),P=I.next();!P.done;P=I.next()){(0,P.value)()}}catch(t){c={error:t}}finally{try{P&&!P.done&&(l=I.return)&&l.call(I)}finally{if(c)throw c.error}}return this},n.prototype.clear=function(){var t,e,n=this.toArray();try{for(var r=s(n),i=r.next();!i.done;i=r.next()){var o=i.value;this.remove(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return this},n.prototype.includes=function(t){var e=t&&t.managedId,n=e&&this["^-out"]["@"+e];return!!n&&n.b===t},n.prototype.first=function(){var t=this["^-out"].head;return t&&t.b},n.prototype.last=function(){var t=this["^-out"].tail;return t&&t.b},n.prototype.get=function(t){if(this["^$"]&&t>=0){for(var e=this["^-out"].head,n=t;e&&n>0;n--)e=e.k;if(e&&e.b)return e.b}throw u(19,t)},n.prototype.find=function(t){var e=this["^-out"]["@"+t];if(!e||e.b.managedId!==t)throw u(18);return e.b},n.prototype.take=function(t,e){return this._take(t,e)},n.prototype.takeLast=function(t,e){return this._take(t,e,!0)},n.prototype._take=function(t,e,n){var r,i=[];if(!this["^$"])return i;for(r=e&&this.includes(e)?this["^-out"]["@"+e.managedId]:this["^-out"][n?"tail":"head"];r&&t-- >0;)i[n?"unshift":"push"](r.b),r=n?r.j:r.k;return i},n.prototype.indexOf=function(t){if(!this["^$"])return-1;for(var e=this["^-out"].head,n=0;e;n++,e=e.k)if(e.b===t)return n;return-1},n.prototype.toArray=function(){if(!this["^$"])return[];for(var t=new Array(this.count),e=0,n=this["^-out"].head;n;)t[e++]=n.b,n=n.k;return t},n.prototype.toJSON=function(){return this.toArray()},n.prototype.some=function(t){var e,n;try{for(var r=s(this),i=r.next();!i.done;i=r.next()){if(t(i.value))return!0}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!1},n.prototype.every=function(t){var e,n;try{for(var r=s(this),i=r.next();!i.done;i=r.next()){if(!t(i.value))return!1}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return!0},n.prototype.forEach=function(t){var e,n;try{for(var r=s(this),i=r.next();!i.done;i=r.next()){t(i.value)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},n.prototype.map=function(t){var e,n,r=[];try{for(var i=s(this),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(t(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},n.prototype.pluck=function(t){if(!this["^$"])return[];for(var e=new Array(this.count),n=0,r=this["^-out"].head;r;)e[n++]=r.b[t],r=r.k;return e},n.prototype[Symbol.iterator]=function(){var t=this["^-out"],e=this["^-out"].head,n=e?e.b:0;return{next:function(){var r=n;return r&&t[e.p]===e?(e=e.k,n=e?e.b:0,{value:r,done:!1}):{done:!0}}}},n.prototype.weakRef=function(){return this._isWeakRef=!0,this},n.prototype._makeRefManagedParent=function(){var t,e;if(!this._isWeakRef){var n=this["^-out"];if(n.head){for(var r=[],i=n.head;i;i=i.k)r.push(i);try{for(var o=s(r),a=o.next();!a.done;a=o.next()){n[(i=a.value).p]===i&&N._makeManagedChildRefLink(i)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}}}},i([R("^count")],n.prototype,"count",null),n}(N),lt=16,ut=function(){function t(t,e){var n,r,i;this.id="^^bind:"+lt++;var o=void 0!==t?String(t):void 0;if(o&&(this._source=t),void 0!==o){var a=String(o).split("|");for(i=a.shift().split("."),o=i.shift();"!"===o[0];)o=o.slice(1),this.addFilter("!");i.length||(i=void 0);try{for(var c=s(a),l=c.next();!l.done;l=c.next()){var u=l.value;this.addFilter(u)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}this.propertyName=o;var h=this;this.Reader=function(){function t(t){this.boundParent=t}return t.prototype.getValue=function(t){var n=arguments.length>0?t:void 0!==o?this.boundParent[o]:void 0;if(i)for(var r=0;r<i.length&&null!=n;r++){var a=i[r];n="object"!=typeof n||a in n||"function"!=typeof n.get?n[a]:n.get(a)}return h._filter&&(n=h._filter(n,this.boundParent)),void 0===n&&void 0!==e?e:n},t}()}return t.isBinding=function(e){return!!(e&&e.isComponentBinding&&e instanceof t)},t.prototype.isComponentBinding=function(){return!0},Object.defineProperty(t.prototype,"bindings",{get:function(){return this._bindings},enumerable:!1,configurable:!0}),t.prototype.addFilter=function(t){t=String(t).trim();var e=this._filter;return this._filter=function(n,r){return e&&(n=e(n,r)),J(t,n)},this},t.prototype.then=function(t){var e=this._filter;return this._filter=function(n,r){return e&&(n=e(n,r)),n?t:n},this},t.prototype.else=function(t){var e=this._filter;return this._filter=function(n,r){return e&&(n=e(n,r)),n||t},this},t.prototype.match=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this._filter;return this._filter=function(e,r){return n&&(e=n(e,r)),t.some((function(t){return t===e}))},this},t.prototype.nonMatch=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this._filter;return this._filter=function(e,r){return n&&(e=n(e,r)),!t.some((function(t){return t===e}))},this},t.prototype.and=function(e,n){var r=this,i=e instanceof t?e:new t(e,n);i.parent=this,this._source&&(this._source+=" and "+String(e)),this._bindings||(this._bindings=[]),this._bindings.push(i);var o=this._filter;return this._filter=function(t,e){o&&(t=o(t,e));var n=e.getBoundBinding(i);if(!n)throw u(7,r.toString());return t&&n.value},this},t.prototype.or=function(e,n){var r=this,i=e instanceof t?e:new t(e,n);i.parent=this,this._source&&(this._source+=" or "+String(e)),this._bindings||(this._bindings=[]),this._bindings.push(i);var o=this._filter;return this._filter=function(t,e){o&&(t=o(t,e));var n=e.getBoundBinding(i);if(!n)throw u(7,r.toString());return t||n.value},this},t.prototype.debuggerLog=function(){var t=this,e=this._filter;return this._filter=function(n,r){return e&&(n=e(n,r)),console.log("--- ",t.toString(),n),n},this},t.prototype.toString=function(){return"bind("+(this._source||"")+")"},t}(),ht=function(t){function n(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=t.call(this,void 0)||this;o._format=n,r.length||(n=String(n).replace(/\$\{[^}]+\}/g,(function(t){return r.push(t.slice(2,-1)),"%s"})));var a=o._bindings=r.map((function(t){var e=t instanceof ut?t:new ut(t);return e.parent=o,e}));return o.Reader=function(t){function i(e){var r=t.call(this,e)||this;return r.i18nString=new ot(n),r}return e(i,t),i.prototype.getValue=function(){var e=this,n=a.map((function(t,n){var i=e.boundParent.getBoundBinding(t);if(!i)throw u(7,r[n]);return i.value})),i=this.i18nString.update(n).toString();return t.prototype.getValue.call(this,i)},i}(o.Reader),o}return e(n,t),n.prototype.toString=function(){return"bindf("+JSON.stringify(this._format)+")"},n}(ut);function dt(t,e){return new ut(t,e)}!function(t){var n=function(t){function n(e,n){var r=t.call(this)||this;if(r.binding=e,e.parent){var i=n.getBoundBinding(e.parent);if(!i)throw u(8);r.parent=i}return r.propertyName=e.propertyName,r._reader=new e.Reader(n),r}return e(n,t),n.prototype.hasValue=function(){return!!this._updatedValue},Object.defineProperty(n.prototype,"value",{get:function(){return this._updatedValue?this._lastValue:this._reader.getValue()},enumerable:!1,configurable:!0}),n.prototype.updateComponents=function(t){var e;if(this.count||this.parent){var n=(e=this._reader).getValue.apply(e,l([],c(arguments)));if(!this._updatedValue||this._lastValue!==n){this._updatedValue=!0;var r=this._lastValue;if(this._lastValue=n,this.parent)return void this.parent.updateComponents();var i=this.binding.id;this.forEach((function(t){try{if("function"!=typeof t[i])throw u(9);t[i](n,r)}catch(t){X(t)}}))}}else this._updatedValue=!1},n}(ct);t.Bound=n}(ut||(ut={}));var pt=function(t){function n(e,n,r){var i=t.call(this,e)||this;return i.source=n,i.inner=r,i}return e(n,t),n}(d),ft=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(pt);!function(t){function n(e){var n=t.call(this,"ChildComponentAdded")||this;return n.source=e.component,n.observer=e,n}e(n,t)}(d),function(t){function n(e,n){var r=t.call(this,"CompositeParentChange")||this;return r.source=e,r.composite=n,r}e(n,t)}(d);var vt=function(t){function n(){return t.call(this)||this}return e(n,t),n.with=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,i=this,o=function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=t.apply(this,l([],c(e)))||this;return r.call(i),i}return e(n,t),n.prototype.isPresetComponent=function(){return!0},n}(i),a=t[0];return r="object"!=typeof a||Object.getPrototypeOf(a)!==Object.prototype?o.preset.apply(o,l([Object.create(null)],c(t))):o.preset.apply(o,l([],c(t))),o},n.preset=function(t){for(var e,r,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];for(var a in t){var s=t[a];ut.isBinding(s)?(this.presetBinding(a,s),delete t[a]):s&&"o"===a[0]&&"n"===a[1]&&(a[2]<"a"||a[2]>"z")?("string"==typeof s&&(s[0]<"a"||s[0]>"z")?("+"===s[0]&&(s=s.slice(1)),e||(e=Object.create(null)),e[a.slice(2)]=s):(r||(r=Object.create(null)),r[a.slice(2)]="function"==typeof s?s:yt(String(s))),delete t[a]):"function"==typeof s&&s.prototype instanceof n&&i.push(s)}return i.length&&this.presetBindingsFrom.apply(this,l([],c(i))),e&&this.addEventHandler((function(t){var n=e[t.name];n&&this.emitAction(n,t)})),r&&this.addEventHandler((function(t){var e=r[t.name];e&&e.call(this,t)})),function(){for(var e in t){var n=t[e];void 0!==n&&wt(this,e,n)}}},n.presetBinding=function(t,e,n){this.prototype.hasOwnProperty("^+bnd")||(this.prototype["^+bnd"]=Object.create(this.prototype["^+bnd"])),this.prototype["^+bnd"][t]=e,n||(n=function(e,n){wt(this,t,e,n)}),this.prototype[e.id]=n},n.presetBindingsFrom=function(){for(var t,e,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this.prototype.hasOwnProperty("^+bndI")){var o=this.prototype["^+bndI"];this.prototype["^+bndI"]=o?o.slice():[]}try{for(var a=s(r),c=a.next();!c.done;c=a.next()){var l=c.value;if(l){if(!(l.prototype&&l.prototype instanceof n))throw TypeError();this.prototype["^+bndI"].push(l)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}},n.presetBoundComponent=function(t){for(var e,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];this.prototype.hasOwnProperty("^+bndC")||(this.prototype["^+bndC"]=r({},this.prototype["^+bndC"]));var a=new((e=n.BoundComposition).bind.apply(e,l([void 0,this],c(i))));return this.prototype["^+bndC"][t]=a,a},n.prototype.isPresetComponent=function(){return!1},n.prototype.delegateEvent=function(t,e){var n,r=this[(n=t.name,"on"+(n[0]<"a"||n[0]>"z"?n:String.fromCharCode(n.charCodeAt(0)-32)+n.slice(1)))];return!0===("function"==typeof r&&r.call(this,t,e))||(t instanceof ft?(this.emit(t),!0):void 0)},n.prototype.getParentComponent=function(t){return this.getManagedParent(t||n)},n.prototype.getBoundParentComponent=function(t){var e=this["^+bndO"];if(!t)return e&&e.boundParent;for(var n=e&&e.boundParent;n&&!(n instanceof t);)n=n.getBoundParentComponent();return n},n.prototype.emitAction=function(t,e,n){var r=new ft(t,this,e);r.context=n,this.emit(r.freeze())},n.prototype.propagateComponentEvent=function(t,e){this.managedState&&this.emit(pt,t,this,e)},n.prototype.getBoundBinding=function(t){return this["^+bndO"]&&this["^+bndO"].getCompositeBound(t)},n}(N);function yt(t){if("()"===t.slice(-2)){var e=t.slice(0,-2);return function(t){for(var n=this.getBoundParentComponent();n;){var r=n&&n[e];if("function"==typeof r)return r.call(n,t);n=n.getBoundParentComponent()}throw u(12,e)}}throw u(13,t)}vt.prototype["^+bnd"]=Object.create(null),vt.prototype["^+bndI"]=[],vt.prototype["^+bndC"]=Object.create(null),function(t){var e=function(){function t(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.Composite=t,this._bindings=this._getAllBindings.apply(this,l([],c(n))),A(t,(function(){return e._createObserver()}))}return t.prototype.getBindings=function(){return this._bindings.slice()},t.prototype.limitBindings=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=[];this._unbound||(this._unbound=[]);var o=function(t){n.some((function(e){return t.propertyName===e}))||t.bindings&&t.bindings.some((function(t){return n.some((function(e){return t.propertyName===e}))}))?i.push(t):a._unbound.push(t)},a=this;try{for(var c=s(this._bindings),l=c.next();!l.done;l=c.next()){var u=l.value;o(u)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}this._bindings=i},t.prototype._createObserver=function(){var t=this._bindings.filter((function(t){return void 0!==t.propertyName})).map((function(t){return t.propertyName}));if(t.length)return function(){function e(t){this.c=t}return e.prototype.updatePropertyAsync=function(t,e,n){var r=this.c["^+bndO"];r&&r.updateCompositeBound(n,t)},i([I.apply(void 0,l([],c(t)))],e.prototype,"updatePropertyAsync",null),e}()},t.prototype._getAllBindings=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=[],r=function(t){n.push(t),t.bindings&&t.bindings.forEach((function(t){return r(t)}))},i=function(t){var e,n;if(t){var o=t.prototype["^+bnd"];for(var a in o)r(o[a]);var c=t.prototype["^+bndI"];try{for(var l=s(c),u=l.next();!u.done;u=l.next()){var h=u.value;i(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}var d=t.prototype["^+bndC"];for(var a in d){var p=d[a]._unbound;if(p)for(var f in p)r(p[f])}}};return t.forEach(i),n},t}();t.BoundComposition=e;var n=function(){function t(t){this.component=t,this._childObservers=Object.create(null),this._nChildren=0,Object.defineProperty(t,"^+bndO",{enumerable:!1,writable:!1,value:this})}return t.prototype.getCompositeBound=function(t){return this._compositeBound&&this._compositeBound.get(t.id)||this.boundParent&&this.boundParent["^+bndO"]&&this.boundParent["^+bndO"].getCompositeBound(t)},t.prototype.onEvent=function(t){if(t===p.DESTROYED)this._parentObserver&&(this._parentObserver._removeChildObserver(this),this._unbind(),this.boundParent=void 0);else if(t instanceof f){var e=this.component.getParentComponent(),n=e&&e["^+bndO"];if(n===this._parentObserver)return;if(this._parentObserver&&(this._parentObserver._removeChildObserver(this),this._unbind(),this.boundParent=void 0),this._parentObserver=n,n){if(n._addChildObserver(this),t.parent===e&&t.propertyName&&e["^+bndC"][t.propertyName]){var r=e["^+bndC"][t.propertyName];this.boundParent=e,n._addCompositeBound(r.getBindings())}else this.boundParent=n.boundParent;this._bind()}for(var i in this._childObservers)this._childObservers[i]._updateParent(this,!0)}},t.prototype.updateCompositeBound=function(t,e){if(this._compositeBound)return t?arguments.length<2?this._compositeBound.forEach((function(e,n){n.propertyName===t&&n.updateComponents()})):this._compositeBound.forEach((function(n,r){r.propertyName===t&&r.updateComponents(e)})):this._compositeBound.forEach((function(t,e){e.updateComponents()})),this},t.prototype._addChildObserver=function(t){var e=t.component.managedId;this._childObservers[e]||(this._childObservers[e]=t,this._nChildren=(this._nChildren||0)+1)},t.prototype._removeChildObserver=function(t){var e=t.component.managedId;this._childObservers[e]&&(delete this._childObservers[e],!--this._nChildren&&this._compositeBound&&this._compositeBound.clear())},t.prototype._updateParent=function(t,e){for(var n in e&&t.component===this.boundParent&&(e=!1),e&&(this._unbind(),this.boundParent=t.boundParent),this._bind(),this._childObservers)this._childObservers[n]._updateParent(this,e)},t.prototype._unbind=function(){if(this._ownBound){for(var t in this._ownBound)this._ownBound[t].remove(this.component);this._ownBound=void 0}},t.prototype._bind=function(){var t,e;if(this.boundParent){var n=this.component,r=this.boundParent["^+bndO"],i=n["^+bnd"],o=this._ownBound||(this._ownBound=Object.create(null));for(var a in i)if(!o[a]){var s=i[a];(c=r.getCompositeBound(s))&&!c.includes(n)&&(o[a]=c.add(n))}for(var a in o){var c=o[a];try{null===(e=(t=n)[c.binding.id])||void 0===e||e.call(t,c.value)}catch(t){X(t)}}}},t.prototype._addCompositeBound=function(t){var e,n;this._compositeBound||(this._compositeBound=new U);try{for(var r=s(t),i=r.next();!i.done;i=r.next()){var o=i.value;this._compositeBound.has(o.id)||this._compositeBound.set(o.id,new ut.Bound(o,this.component))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t}();t.ComponentObserver=n,t.addObserver(n)}(vt||(vt={}));var mt=function(t){function n(e){var n=t.call(this)||this;return n.value=e,n}return e(n,t),n.prototype.valueOf=function(){return this.value},n}(N);function gt(t,e){var n=void 0;function r(t,e){if(!(t.constructor.prototype instanceof vt))throw TypeError();N.createManagedReferenceProperty(t,e,!0,void 0,n||vt),t.constructor.presetBoundComponent(e,n)}if(!e)return t&&(n=t),r;r(t,e)}function bt(t,e){w(t,e,!1,(function(t,n,r){var i;return function(n,o,a){if(r&&r(n,o,a),o){if(i===o||!t["^$"])return;try{t.delegateEvent(i=o,e),i=void 0}catch(t){C(t)}}}}))}function wt(t,e,n,r){var i=t[e];if(i&&i instanceof ct){if(Array.isArray(n))return void i.replace(n.map((function(t){return t instanceof N?t:new mt(t)})));if(void 0===n&&r!==i)return void i.clear()}t[e]=n}var _t,Ct=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.create=function(t){var e=new this;if(t)for(var n in t)e[n]=t[n];return e},n.prototype.serialize=function(){var t=this,e=Object.create(null),r=function(e,i){if(null==i||"string"==typeof i||"number"==typeof i||"boolean"==typeof i)return i;if(Array.isArray(i))return i.map((function(t,n){return r(e+"."+n,t)}));if(!(i instanceof N))throw u(33,e);if(i instanceof n&&i.getParentRecord()===t)return i.serialize();if(i instanceof z)return r(e,i.get());if(i instanceof ct)return i.map((function(t){return r(e,t)}));if(i instanceof U){var o=Object.create(null);return i.forEach((function(t,n){o[t]=r(e+"#"+t,n)})),o}};for(var i in this)if(this.hasOwnProperty(i)&&"_"!==i[0]&&"managedId"!==i){var o=r(i,this[i]);void 0!==o&&(e[i]=o)}return e},n.prototype.getParentRecord=function(t){return this.getManagedParent(t||n)},n.prototype.getNextSibling=function(){var t=this.getManagedParent();if(t instanceof ct){var e=t.take(2,this)[1];if(e instanceof n)return e}},n.prototype.getPreviousSibling=function(){var t=this.getManagedParent();if(t instanceof ct){var e=t.takeLast(2,this);if(e.length>1&&e[0]instanceof n)return e[0]}},n.prototype.getReferrerRecords=function(t){var e=Object.create(null),r=[],i=t||n,o=function(t){t["^-out"].forEach((function(t){var n=t.a;n.managedState&&!e[n.managedId]&&(e[n.managedId]=!0,n instanceof i?r.push(n):(n instanceof ct||n instanceof U||n instanceof z)&&o(n))}))};return o(this),r},n}(vt),xt=1,St=Object.create(null),Et={},Ot=function(){function t(t,e,n,r){this._inherit=n&&e?e.map((function(t){return t[n]})).filter((function(t){return!!t})):[],n&&t&&t[n]&&this._inherit.unshift(t[n]),this._style=r}return t.prototype.getStyle=function(){return this._style},t.prototype._value=function(t){for(var e,n=this._inherit.length-1;n>=0&&void 0===(e=this._inherit[n][t]);n--);return e},t}(),kt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.create=function(t,e,n){var r=new this(t,e,"dimensions",n);return Object.defineProperties(r,{width:{enumerable:!0,get:r._value.bind(r,"width")},height:{enumerable:!0,get:r._value.bind(r,"height")},minWidth:{enumerable:!0,get:r._value.bind(r,"minWidth")},maxWidth:{enumerable:!0,get:r._value.bind(r,"maxWidth")},minHeight:{enumerable:!0,get:r._value.bind(r,"minHeight")},maxHeight:{enumerable:!0,get:r._value.bind(r,"maxHeight")},grow:{enumerable:!0,get:r._value.bind(r,"grow")},shrink:{enumerable:!0,get:r._value.bind(r,"shrink")}}),r},n}(Ot),At=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.create=function(t,e,n){var r=new this(t,e,"position",n);return Object.defineProperties(r,{gravity:{enumerable:!0,get:r._value.bind(r,"gravity")},top:{enumerable:!0,get:r._value.bind(r,"top")},bottom:{enumerable:!0,get:r._value.bind(r,"bottom")},left:{enumerable:!0,get:r._value.bind(r,"left")},right:{enumerable:!0,get:r._value.bind(r,"right")}}),r},n}(Ot),Rt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.create=function(t,e,n){var r=new this(t,e,"textStyle",n);return Object.defineProperties(r,{align:{enumerable:!0,get:r._value.bind(r,"align")},color:{enumerable:!0,get:r._value.bind(r,"color")},fontFamily:{enumerable:!0,get:r._value.bind(r,"fontFamily")},fontSize:{enumerable:!0,get:r._value.bind(r,"fontSize")},fontWeight:{enumerable:!0,get:r._value.bind(r,"fontWeight")},letterSpacing:{enumerable:!0,get:r._value.bind(r,"letterSpacing")},lineHeight:{enumerable:!0,get:r._value.bind(r,"lineHeight")},lineBreakMode:{enumerable:!0,get:r._value.bind(r,"lineBreakMode")},bold:{enumerable:!0,get:r._value.bind(r,"bold")},italic:{enumerable:!0,get:r._value.bind(r,"italic")},uppercase:{enumerable:!0,get:r._value.bind(r,"uppercase")},smallCaps:{enumerable:!0,get:r._value.bind(r,"smallCaps")},underline:{enumerable:!0,get:r._value.bind(r,"underline")},strikeThrough:{enumerable:!0,get:r._value.bind(r,"strikeThrough")}}),r},n}(Ot),It=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.create=function(t,e,n){var r=new this(t,e,"decoration",n);return Object.defineProperties(r,{background:{enumerable:!0,get:r._value.bind(r,"background")},textColor:{enumerable:!0,get:r._value.bind(r,"textColor")},borderColor:{enumerable:!0,get:r._value.bind(r,"borderColor")},borderStyle:{enumerable:!0,get:r._value.bind(r,"borderStyle")},borderThickness:{enumerable:!0,get:r._value.bind(r,"borderThickness")},borderRadius:{enumerable:!0,get:r._value.bind(r,"borderRadius")},padding:{enumerable:!0,get:r._value.bind(r,"padding")},dropShadow:{enumerable:!0,get:r._value.bind(r,"dropShadow")},opacity:{enumerable:!0,get:r._value.bind(r,"opacity")},css:{enumerable:!0,get:function(){for(var t=Object.create(null),e=0;e<this._inherit.length;e++){var n=this._inherit[e].css;if(n)for(var r in n)t[r]=n[r]}return t}},cssClassNames:{enumerable:!0,get:function(){for(var t,e,n=Object.create(null),r=this._inherit.length-1;r>=0;r--){var i=this._inherit[r].cssClassNames;if(i)if("string"==typeof i)n[i]=!0;else try{for(var o=(t=void 0,s(i)),a=o.next();!a.done;a=o.next()){n[a.value]=!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}}return Object.keys(n)}}}),r},n}(Ot),Pt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.create=function(t,e,n){var r=new this(t,e,"containerLayout",n);return Object.defineProperties(r,{axis:{enumerable:!0,get:r._value.bind(r,"axis")},distribution:{enumerable:!0,get:r._value.bind(r,"distribution")},gravity:{enumerable:!0,get:r._value.bind(r,"gravity")},wrapContent:{enumerable:!0,get:r._value.bind(r,"wrapContent")},clip:{enumerable:!0,get:r._value.bind(r,"clip")},separator:{enumerable:!0,get:r._value.bind(r,"separator")}}),r},n}(Ot),Mt=Object.freeze(new Ot),Tt=function(){function t(t,e){void 0===t&&(t="");for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(this.name=t,t?(t=t.replace(/[^\w\d_\-]/g,""),this.id="S_"+(Et[t]?t+"--"+xt++:Et[t]=t)):this.id="S__"+xt++,this.ids=e?l(l([],c(e.ids)),[this.id]):[this.id],this.conditionalStyles=e?r({},e.conditionalStyles):Object.create(null),e||n.length){this.inherited=e&&l(l([],c(e.inherited)),[e])||[];var o=e&&e.getStyles();this._styles=Object.freeze({dimensions:kt.create(void 0,n,this),position:At.create(void 0,n,this),textStyle:Rt.create(void 0,n,this),decoration:It.create(void 0,n,this),containerLayout:Pt.create(void 0,n,this)}),this._combined=Object.freeze({dimensions:kt.create(o,n,this),position:At.create(o,n,this),textStyle:Rt.create(o,n,this),decoration:It.create(o,n,this),containerLayout:Pt.create(o,n,this)})}else this.inherited=[],this._styles=Object.freeze(Object.create(null)),this._combined=Object.freeze({dimensions:Mt,position:Mt,textStyle:Mt,decoration:Mt,containerLayout:Mt})}return t.create=function(e,n){return void 0===n&&(n=e),"string"!=typeof e&&(e="UIStyle_"+xt++),new t(e,void 0,n||Object.create(null))},t.group=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=Object.create(null);try{for(var a=s(r),c=a.next();!c.done;c=a.next()){var l=c.value;for(var u in l){var h=l[u];o[u]=u in o?o[u].extend(h instanceof t?h.getStyles():h):h instanceof t?h:t.create(u,h)}}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return o},t.isStyleOverride=function(t,e){return t&&(!(t instanceof Ot)||e&&t.getStyle()!==e)},t.prototype.mixin=function(e){if(!e)return this;var n=this.id+"+"+e.id;if(St[n])return St[n];var r=new t(this.name+"--"+e.name,this,e._combined);for(var i in e.conditionalStyles)e.conditionalStyles[i]&&(r.conditionalStyles[i]=e.conditionalStyles[i]);return St[n]=r,r},t.prototype.extend=function(e,n){return new t(n||this.name,this,e)},t.prototype.addState=function(e,n){return this.conditionalStyles[e]?this.conditionalStyles[e]=this.conditionalStyles[e].extend(n):this.conditionalStyles[e]=t.create(this.name+":"+e,n),this},t.prototype.getStyles=function(){return this._combined},t.prototype.getOwnStyles=function(){return this._styles},t}(),Dt=function(){},Ft=function(){},Lt=function(){function t(t){t&&(this._f=function(){var e=String(jt.current&&jt.current.colors[t]||t);return"@"===e[0]?jt.replaceColor(e):e})}return t.prototype.toString=function(){return this._f?this._f():"transparent"},t.prototype.text=function(){var e=this,n=new t;return n._f=function(){return jt.getTextColor(String(e))},n},t.prototype.alpha=function(e){var n=this,r=new t;return r._f=function(){return jt.mixColors(String(n),"rgba(,,,0)",1-e)},r},t.prototype.lum=function(e,n){var r=this,i=new t;return i._f=function(){var t=String(r);return n&&!jt.isBrightColor(t)&&(e=-e),jt.mixColors(t,e>0?"#fff":"#000",Math.abs(e))},i},t.Black=new t("black"),t.DarkerGray=new t("darkerGray"),t.DarkGray=new t("darkGray"),t.Gray=new t("gray"),t.LightGray=new t("lightGray"),t.White=new t("white"),t.Slate=new t("slate"),t.Red=new t("red"),t.Orange=new t("orange"),t.Yellow=new t("yellow"),t.Lime=new t("lime"),t.Green=new t("green"),t.Turquoise=new t("turquoise"),t.Cyan=new t("cyan"),t.Blue=new t("blue"),t.Violet=new t("violet"),t.Purple=new t("purple"),t.Magenta=new t("magenta"),t.Primary=new t("primary"),t.Accent=new t("accent"),t.Background=new t("background"),t.Text=new t("text"),t}(),jt=function(){function t(){this.modalDialogShadeOpacity=.3,this.spacing=8,this.colors={black:"#000000",darkerGray:"#333333",darkGray:"#777777",gray:"#aaaaaa",lightGray:"#dddddd",white:"#ffffff",slate:"#667788",red:"#ff0000",orange:"#ee9933",yellow:"#ffff00",lime:"#77ff00",green:"#007700",turquoise:"#33aa99",cyan:"#00ffff",blue:"#0000ff",violet:"#ee77cc",purple:"#aa3399",magenta:"#ff00ff",primary:"@blue",accent:"@purple",background:"@white",text:"@background.text",separator:"@background^-50%/20%",modalShade:"@black"},this.icons=Object.create(null),this.styles={container:Tt.create("_container",{position:{gravity:"stretch"},dimensions:{grow:1,shrink:0},containerLayout:{gravity:"stretch",axis:"vertical",distribution:"start",wrapContent:!1}}),scroll:Tt.create("_scroll",{dimensions:{grow:1,shrink:1}}),cell:Tt.create("_cell",{containerLayout:{distribution:"center",gravity:"center"},position:{top:0}}),cell_flow:Tt.create("_cell_flow",{dimensions:{grow:0,shrink:0}}),cell_cover:Tt.create("_cell_cover",{position:{gravity:"overlay",top:0,bottom:0,left:0,right:0}}),form:Tt.create("_form",{dimensions:{grow:0}}),column:Tt.create("_column",{containerLayout:{axis:"vertical",gravity:"start"},dimensions:{grow:0,shrink:0}}),row:Tt.create("_row",{containerLayout:{axis:"horizontal",gravity:"center"},dimensions:{grow:0,shrink:0}}),row_opposite:Tt.create("_row_opposite",{containerLayout:{distribution:"end"}}),row_center:Tt.create("_row_center",{containerLayout:{distribution:"center"}}),control:Tt.create("_control",{dimensions:{shrink:1,grow:0}})}}return t.getStyle=function(t,e){var n=this.current.styles[t];return e&&this.current.styles[e]&&(n=n.mixin(this.current.styles[e])),n},t.getTextColor=function(t){return this.isBrightColor(String(t))?"rgba(0,0,0,.8)":"rgba(255,255,255,.95)"},t.isBrightColor=function(t){var e=String(t);if("#"===e[0])return 4===e.length&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),.3*parseInt(e.slice(1,3),16)+.6*parseInt(e.slice(3,5),16)+.1*parseInt(e.slice(5,7),16)>140;if("rgb("===e.slice(0,4)||"rgba("===e.slice(0,5)){var n=e.slice(4).split(",").map(parseFloat);return.3*n[0]+.6*n[1]+.1*n[2]>140}return"hsl("!==e.slice(0,4)||parseFloat(e.slice(4).split(",")[2])>55},t.mixColors=function(t,e,n){function r(t){var e=[0,0,0,1];return"#"===t[0]?(4===t.length&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),e[0]=parseInt(t.slice(1,3),16),e[1]=parseInt(t.slice(3,5),16),e[2]=parseInt(t.slice(5,7),16)):"rgba("===t.slice(0,5)?t.slice(5).split(",").forEach((function(t,n){e[n]=parseFloat(t)})):"rgb("===t.slice(0,4)?t.slice(4).split(",").forEach((function(t,n){e[n]=parseFloat(t)})):"transparent"===t&&(e[3]=0),e}var i=1-n;function o(t,e){return t===e?t:isNaN(t)?e:isNaN(e)?t:Math.floor(i*t+n*e)}var a=r(String(t)),s=r(String(e)),c=o(a[0],s[0])+","+o(a[1],s[1])+","+o(a[2],s[2]),l=i*a[3]+n*s[3];return l>=1?"rgb("+c+")":"rgba("+c+","+l+")"},t.replaceColor=function(t){var e=this,n=String(t);return!n||t instanceof Lt?n:n.replace(/\@(\w+)([.:]text)?((\^)?[\+\-]\d+\%)?([.:]text)?(\/\d+\%)?([.:]text)?/g,(function(t,n,r,i,o,a,s,c){var l=e.current.colors[n]||"rgba(1,2,3,0)";if(/\@\w/.test(l)&&(l=e.replaceColor(l)),r&&(l=e.getTextColor(l)),i){var u=parseFloat(o?i.slice(1):i)/100;o&&!e.isBrightColor(l)&&(u=-u),l=e.mixColors(l,u>0?"#fff":"#000",Math.abs(u))}if(a&&(l=e.getTextColor(l)),s){u=parseFloat(s.slice(1))/100;l=e.mixColors(l,"rgba(,,,0)",1-u)}return c&&(l=e.getTextColor(l)),l}))},t.prototype.clone=function(){var e=new t;return e.modalDialogShadeOpacity=this.modalDialogShadeOpacity,e.spacing=this.spacing,e.ConfirmationDialogBuilder=this.ConfirmationDialogBuilder,e.MenuBuilder=this.MenuBuilder,e.colors=r({},this.colors),e.icons=r({},this.icons),e.styles=r({},this.styles),e},t.prototype.setStyle=function(t,e){return this.styles[t]&&(e=r(r({},this.styles[t].getStyles()),e)),this.styles[t]=Tt.create(t,e)},t}(),Bt=new Tt,Nt=function(t){function n(e,n,r,i){var o=t.call(this,e,n,r)||this;return o.event=i,o}return e(n,t),n}(pt),Ut=function(t){function n(e){var n=t.call(this,"BeforeRender")||this;return n.source=e,n}return e(n,t),n}(d),Vt=function(t){function n(e,n){var r=t.call(this,"UIRender")||this;return r.source=e,r.renderCallback=n,r}return e(n,t),n}(d);!function(t){t[t.SELF=0]="SELF",t[t.FORWARD=1]="FORWARD",t[t.REVERSE=-1]="REVERSE"}(_t||(_t={}));var zt=function(t){function n(e,n){void 0===n&&(n=_t.SELF);var r=t.call(this,"UIFocusRequest")||this;return r.source=e,r.direction=n,r}return e(n,t),n}(d),Wt=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._style=Bt,e}return e(n,t),n.preset=function(e){for(var n,i,o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];e.requestFocus&&(delete e.requestFocus,e.onRendered=function(){this._requestedFocusBefore||(this._requestedFocusBefore=!0,this.requestFocus())}),"string"==typeof e.style?i=e.style:n=e.style;var s,u,h,d=e.dimensions,p=e.position;delete e.style,delete e.dimensions,delete e.position,ut.isBinding(n)&&(this.presetBinding("style",n,(function(t){this.style=t?s.mixin(t):s})),n=void 0),ut.isBinding(d)&&(this.presetBinding("dimensions",d,(function(t){this.dimensions=t?r(r({},u),t):u})),d=void 0),ut.isBinding(p)&&(this.presetBinding("position",p,(function(t){this.position=t?r(r({},h),t):h})),p=void 0);var f=t.preset.apply(this,l([e],c(o)));return function(){f.call(this);var t=n||i&&jt.current.styles[i];t?this._style===Bt?this.style=t:this.style=this._style.mixin(t):s=this.style,d?this.dimensions=r(r({},this.dimensions),d):u=this.dimensions,p?this.position=r(r({},this.position),p):h=this.position}},n.prototype.propagateComponentEvent=function(t,e,n){this.managedState&&(!n&&e instanceof Nt&&(n=e.event),this.emit(Nt,t,this,e,n))},n.prototype.delegateEvent=function(e,n){if(!0!==t.prototype.delegateEvent.call(this,e,n)&&e instanceof Nt)return this.emit(e),!0},n.prototype.render=function(t){this._firstRendered||(this._firstRendered=!0,this.emit(Ut,this)),this.emit(Vt,this,t)},n.prototype.isFocusable=function(){return!1},n.prototype.isKeyboardFocusable=function(){return!1},n.prototype.requestFocus=function(){this.emit(zt,this)},n.prototype.requestFocusNext=function(){this.emit(zt,this,_t.FORWARD)},n.prototype.requestFocusPrevious=function(){this.emit(zt,this,_t.REVERSE)},n.prototype.applyStyle=function(t){t&&(this.dimensions=t.getStyles().dimensions,this.position=t.getStyles().position)},Object.defineProperty(n.prototype,"style",{get:function(){return this._style},set:function(t){if(t!==this._style){if(!(t instanceof Tt))throw u(43);this.applyStyle(this._style=t)}},enumerable:!1,configurable:!0}),n}(vt);!function(t){var e=function(){function t(){this._seq=0}return t.prototype.render=function(t,e){var n=this;if(this._seq++,!t&&this._renderCallback&&(this._renderCallback=this._renderCallback(void 0)),e&&e!==this._renderCallback&&(this._renderCallback&&this._renderCallback(void 0),this._renderCallback=e),t&&this._renderCallback){var r=this._seq,i=function(t,e){return r===n._seq&&(n._renderCallback=n._renderCallback(t,e),r=++n._seq),i};t.render(i)}},t.prototype.removeAsync=function(){var t=this;if(this._renderCallback)return new Promise((function(e){t._renderCallback=t._renderCallback(void 0,e),t._seq++}))},t}();t.DynamicRendererWrapper=e}(Wt||(Wt={}));var Kt,Ht=function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.call(this)||this;return r.content=(new ct).restrict(vt).propagateEvents(pt),e.length&&r.content.replace(e),r}return e(n,t),n.preset=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o,a=e.layout;delete e.layout,ut.isBinding(a)&&(this.presetBinding("layout",a,(function(t){this.layout=t?r(r({},o),t):o})),a=void 0);var s=t.preset.apply(this,l([e],c(n)));return function(){var t;s.call(this),a?this.layout=r(r({},this.layout),a):o=this.layout,n.length&&(t=this.content).add.apply(t,l([],c(n.filter((function(t){return!!t})).map((function(t){return new t})))))}},n.prototype.applyStyle=function(e){e&&(t.prototype.applyStyle.call(this,e),this.layout=e.getStyles().containerLayout)},n.prototype.isFocusable=function(){return!(!this.allowFocus&&!this.allowKeyboardFocus)},n.prototype.isKeyboardFocusable=function(){return!!this.allowKeyboardFocus},i([bt,K],n.prototype,"content",void 0),n}(Wt);!function(t){t.right="right",t.left="left",t.up="up",t.down="down",t.fade="fade",t.rightFast="right-fast",t.leftFast="left-fast",t.upFast="up-fast",t.downFast="down-fast",t.fadeFast="fade-fast"}(Kt||(Kt={}));var $t,qt=function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,l([],c(e)))||this;return r.style=jt.getStyle("container","cell"),r}return e(n,t),n.preset=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o,a=e.decoration;delete e.decoration,ut.isBinding(a)&&(this.presetBinding("decoration",a,(function(t){this.decoration=t?r(r({},o),t):o})),a=void 0),e.allowKeyboardFocus&&(e.allowFocus=e.allowKeyboardFocus),e.selectOnFocus&&(e.allowFocus=!0,e.onFocusIn="Select",delete e.selectOnFocus);var s=t.preset.apply(this,l([e],c(n)));return function(){s.call(this),a&&(this.decoration=r(r({},this.decoration),a))}},n.prototype.isFocusable=function(){return!(!this.allowFocus&&!this.allowKeyboardFocus)},n.prototype.isKeyboardFocusable=function(){return!!this.allowKeyboardFocus},n.prototype.applyStyle=function(e){e&&(t.prototype.applyStyle.call(this,e),this.decoration=e.getStyles().decoration)},n}(Ht),Gt=qt.with({style:"cell_flow"}),Yt=qt.with({style:"cell_cover"}),Xt=function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,l([],c(e)))||this;return r.spacing=jt.current.spacing,r.style=jt.getStyle("container","column"),r}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.preset.apply(this,l([e],c(n)))},n.prototype.hasComponentSpacing=function(){return!!this.spacing},n}(Ht),Jt=Xt.with({spacing:0}),Zt=dt("renderContext"),Qt=dt("renderContext.viewportContext");!function(t){t[t.NONE=0]="NONE",t[t.PAGE=1]="PAGE",t[t.DIALOG=2]="DIALOG",t[t.DRAWER=3]="DRAWER",t[t.DROPDOWN=4]="DROPDOWN",t[t.DROPDOWN_COVER=5]="DROPDOWN_COVER",t[t.POPOVER=6]="POPOVER",t[t.POPOVER_ABOVE=7]="POPOVER_ABOVE",t[t.POPOVER_LEFT=8]="POPOVER_LEFT",t[t.POPOVER_RIGHT=9]="POPOVER_RIGHT"}($t||($t={}));var te=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.emitRenderChange=function(){this.emitChange()},n.prototype.getAppComponents=function(){return this.getManagedReferrers().filter((function(t){return t instanceof Ze}))},n}(N);!function(t){var e=function(t,e,n,r){this.source=t,this.element=e,this.placement=n,this.placementRef=r};t.Output=e}(te||(te={}));var ee=function(t){function n(e){var n=t.call(this)||this;return n._renderer=new Wt.DynamicRendererWrapper,n.content=e||(n._ContentClass?new n._ContentClass:void 0),n}return e(n,t),n.preset=function(e,n){return this.prototype._ContentClass=n,t.preset.call(this,e,n)},n.prototype.delegateEvent=function(e,n){if(!0!==t.prototype.delegateEvent.call(this,e,n)&&e instanceof Nt)return this.emit(e),!0},n.prototype.render=function(t){this._renderer.render(this.content,t)},i([W],n.prototype,"renderContext",void 0),i([bt,gt],n.prototype,"content",void 0),n}(vt.with({renderContext:Zt}));ee.addObserver(function(){function t(t){this.component=t}return t.prototype.onContentChange=function(){this.component.render()},t}());var ne=qt.with({style:"form",accessibleRole:"form"}),re=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=e.formContext||dt("formContext");delete e.formContext;var o=ne.with.apply(ne,l([e],c(n)));return this.presetBoundComponent("content",o).limitBindings("formContext"),t.preset.call(this,{formContext:i},o)},i([W],n.prototype,"formContext",void 0),n}(ee),ie=function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,l([],c(e)))||this;return r.spacing=jt.current.spacing,r.style=jt.getStyle("container","row"),r}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.preset.apply(this,l([e],c(n)))},n.prototype.hasComponentSpacing=function(){return!!this.spacing},n}(Ht),oe=ie.with({style:"row_opposite"}),ae=ie.with({style:"row_center"}),se=ie.with({spacing:0}),ce=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(Nt),le=function(t){function n(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,l([],c(e)))||this;return r.topThreshold=0,r.bottomThreshold=0,r.leftThreshold=0,r.rightThreshold=0,r.verticalScrollEnabled=!0,r.horizontalScrollEnabled=!0,r._vertScrollState={up:!1,down:!1,slowing:0,high:0,velocity:0},r._horzScrollState={left:!1,right:!1,slowing:0,high:0,velocity:0},r.style=jt.getStyle("container","scroll"),r}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.preset.apply(this,l([e],c(n)))},n.prototype.handleScrollSnap=function(t){if(this.horizontalSnap||this.verticalSnap){var e=this._vertScrollState,n=this._horzScrollState;"ScrollEnd"===t.name?(e.up=e.down=!1,n.left=n.right=!1,e.high=0,n.high=0):(t.scrolledUp&&e.up||t.scrolledDown&&e.down?t.verticalVelocity>=e.velocity?(e.slowing=0,t.verticalVelocity>e.high&&(e.high=t.verticalVelocity)):(e.slowing++,e.slowing>1&&t.verticalVelocity<.75*e.high&&(e.slowing=e.high=0,e.up&&"start"===this.verticalSnap&&this.emitAction("ScrollSnapUp",t),e.down&&"end"===this.verticalSnap&&this.emitAction("ScrollSnapDown",t))):(e.slowing=0,e.high=0),e.up=!!t.scrolledUp,e.down=!!t.scrolledDown,e.velocity=t.verticalVelocity,t.scrolledLeft&&n.left||t.scrolledRight&&n.right?t.horizontalVelocity>=n.velocity?(n.slowing=0,t.horizontalVelocity>n.high&&(n.high=t.horizontalVelocity)):(n.slowing++,n.slowing>1&&t.horizontalVelocity<.75*n.high&&(n.slowing=n.high=0,n.left&&"start"===this.horizontalSnap&&this.emitAction("ScrollSnapLeft",t),n.right&&"end"===this.horizontalSnap&&this.emitAction("ScrollSnapRight",t))):(n.slowing=0,n.high=0),n.left=!!t.scrolledLeft,n.right=!!t.scrolledRight,n.velocity=t.horizontalVelocity)}},n}(Ht);le.addEventHandler((function(t){t instanceof ce&&this.handleScrollSnap(t)}));var ue=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.shrinkwrap=!0,e}return e(n,t),n.preset=function(e){var n,i,o=e.decoration,a=e.textStyle;delete e.decoration,delete e.textStyle,ut.isBinding(o)&&(this.presetBinding("decoration",o,(function(t){this.decoration=t?r(r({},n),t):n})),o=void 0),ut.isBinding(a)&&(this.presetBinding("textStyle",a,(function(t){this.textStyle=t?r(r({},i),t):i})),a=void 0);var s=t.preset.call(this,e);return function(){s.call(this),o?this.decoration=r(r({},this.decoration),o):n=this.decoration,a?this.textStyle=r(r({},this.textStyle),a):i=this.textStyle}},n.prototype.applyStyle=function(e){e&&(t.prototype.applyStyle.call(this,e),this.decoration=e.getStyles().decoration,this.textStyle=e.getStyles().textStyle)},n}(Wt),he=function(t){function n(e){var n=t.call(this)||this;return n.style=jt.getStyle("control","button"),n.shrinkwrap=!0,void 0!==e&&(n.label=e),n}return e(n,t),n.preset=function(e){return"text"in e&&(e.label=e.text),e.navigateTo&&!e.accessibleRole&&(e.accessibleRole="link"),t.preset.call(this,e)},n.withLabel=function(t,e){return"string"==typeof t&&(t=at(t)),this.with({label:t,onClick:e})},n.withIcon=function(t,e,n,r){return this.with({icon:t,iconSize:n,iconColor:r,onClick:e})},n.prototype.isFocusable=function(){return!0},n.prototype.isKeyboardFocusable=function(){return!this.disableKeyboardFocus},n}(ue),de=he.with({style:"button_primary"}),pe=he.with({style:"button_borderless"}),fe=he.with({style:"button_outline"}),ve=he.with({style:"button_link"}),ye=he.with({style:"button_large"}),me=he.with({style:"button_small"}),ge=he.with({style:"button_icon"}),be=function(t){function n(e){var n=t.call(this)||this;return n.style=jt.getStyle("control","image"),n.shrinkwrap=!0,void 0!==e&&(n.url=e),n}return e(n,t),n.withUrl=function(t,e){return this.with({url:t,style:e})},n.preset=function(e){return e.allowKeyboardFocus&&(e.allowFocus=e.allowKeyboardFocus),t.preset.call(this,e)},n.prototype.isFocusable=function(){return!(!this.allowFocus&&!this.allowKeyboardFocus)},n.prototype.isKeyboardFocusable=function(){return!!this.allowKeyboardFocus},n}(ue),we=function(t){function n(e){var n=t.call(this)||this;return n.htmlFormat=!1,n.style=jt.getStyle("control","label"),n.shrinkwrap=!0,void 0!==e&&(n.text=e),n}return e(n,t),n.withText=function(t,e){return"string"==typeof t&&(t=at(t)),e instanceof Tt||"string"==typeof e?this.with({text:t,style:e}):e?this.with({text:t,textStyle:e}):this.with({text:t})},n.withIcon=function(t,e,n){return this.with({icon:t,iconSize:e,iconColor:n})},n.preset=function(e){return e.allowKeyboardFocus&&(e.allowFocus=e.allowKeyboardFocus),t.preset.call(this,e)},n.prototype.isFocusable=function(){return!(!this.allowFocus&&!this.allowKeyboardFocus)},n.prototype.isKeyboardFocusable=function(){return!!this.allowKeyboardFocus},n}(ue),_e=we.with({headingLevel:1,style:"heading1"}),Ce=we.with({headingLevel:2,style:"heading2"}),xe=we.with({headingLevel:3,style:"heading3"}),Se=we.with({style:"paragraph"}),Ee=we.with({style:"label_close"}),Oe=we.with({shrinkwrap:!1}),ke=function(t){function n(){var e=t.call(this)||this;return e.thickness=1,e.color="@separator",e.style=jt.getStyle("control","separator"),e}return e(n,t),n.preset=function(e){return t.preset.call(this,e)},n}(ue),Ae=function(t){function n(e,n,i){var o=t.call(this)||this;return o.style=jt.getStyle("control","spacer"),o.shrinkwrap=!1,void 0===e&&void 0===n||(o.dimensions=r(r({},o.dimensions),{width:void 0!==e?e:o.dimensions.width,height:void 0!==n?n:o.dimensions.height,grow:0,shrink:i?1:0}),o.shrinkwrap=!0),o}return e(n,t),n.preset=function(e){void 0!==e.height&&((e.dimensions||(e.dimensions={})).minHeight=e.height,e.shrinkwrap=!0);void 0!==e.width&&((e.dimensions||(e.dimensions={})).minWidth=e.width,e.shrinkwrap=!0);return t.preset.call(this,e)},n.withHeight=function(t,e){return void 0===e&&(e=!0),this.with({dimensions:{minHeight:t},shrinkwrap:e})},n.withWidth=function(t,e){return void 0===e&&(e=!0),this.with({dimensions:{minWidth:t},shrinkwrap:e})},n}(ue),Re=dt("formContext"),Ie=st.type("FORM_REQUIRED","%s is required"),Pe=function(t){function n(e){var n=t.call(this,"FormChange")||this;return n.source=e,n}return e(n,t),n}(v),Me=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.errors=Object.create(null),e._values=Object.create(null),e._validations=Object.create(null),e._changeEvent=new Pe(e).freeze(),e}return e(n,t),n.create=function(t){var e=new n;return e._values=t,e},n.prototype.get=function(t){if(void 0!==t)return this._values[t]},n.prototype.has=function(t){return t in this._values},n.prototype.set=function(t,e,n,r){t&&("number"==typeof this._values[t]&&(e=+e),this._values[t]!==e?(this._values[t]=e,n&&this.validate(t),r||this.emit(this._changeEvent)):n&&this.validate(t))},n.prototype.unset=function(t){t&&t in this._values&&(delete this._values[t],delete this.errors[t],this.emit(this._changeEvent))},n.prototype.clear=function(){for(var t in this._values)delete this._values[t],delete this.errors[t];this.emit(this._changeEvent)},n.prototype.serialize=function(){var t=Object.create(null);for(var e in this._values)t[e]=this._values[e];return t},n.prototype.required=function(t,e){return this.test(t,(function(t){return t.required(e)})),this},n.prototype.test=function(t,e){return this._validations[t]=e,this},n.prototype.validate=function(t){var e=this._values[t];if(this._validations[t])try{var r=new n.ValidationTest(t,e);this._validations[t](r),this.errors[t]=void 0}catch(e){this.errors[t]=e}else this.errors[t]=void 0;return!this.errors[t]},n.prototype.validateAll=function(){for(var t in this._values)this.validate(t);return this},Object.defineProperty(n.prototype,"errorCount",{get:function(){var t=0;for(var e in this.errors)this.errors[e]&&t++;return t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"valid",{get:function(){for(var t in this.errors)if(this.errors[t])return!1;return!0},enumerable:!1,configurable:!0}),n}(vt);!function(t){var e=function(){function t(t,e){this.name=t,this.value=e}return t.prototype.required=function(t){if(0!==this.value&&!this.value)throw new Ie(t||this.name);return this},t.prototype.typeOf=function(t){if(typeof this.value!==t)throw new TypeError;return this},t.prototype.assert=function(t,e){var n=st.type("FORM_TEST",e);if(!t)throw new n(this.value);return this},t}();t.ValidationTest=e}(Me||(Me={}));var Te=function(t){function n(){var e=t.call(this)||this;return e.type="text",e.style=jt.getStyle("control","textfield"),e.shrinkwrap=!1,e}return e(n,t),n.preset=function(e){return"text"in e&&(e.placeholder=e.text),t.preset.call(this,e)},n.withName=function(t,e){return this.with({name:t,placeholder:e})},n.prototype.isFocusable=function(){return!0},n.prototype.isKeyboardFocusable=function(){return!0},n.UITextFieldObserver=function(){function t(t){this.component=t}return t.prototype.onFormContextChange=function(){if(this.component.formContext&&this.component.name){var t=this.component.formContext.get(this.component.name);this.component.value=void 0===t?"":String(t)}},t.prototype.onInput=function(){var t;null===(t=this.component.formContext)||void 0===t||t.set(this.component.name,this.component.value)},t.prototype.onChange=function(){var t;null===(t=this.component.formContext)||void 0===t||t.set(this.component.name,this.component.value,!0)},t}(),i([W],n.prototype,"formContext",void 0),i([A],n,"UITextFieldObserver",void 0),n}(ue);Te.presetBinding("formContext",Re);var De=Te.with({style:"textfield_borderless"}),Fe=function(t){function n(){var e=t.call(this)||this;return e.style=jt.getStyle("control","toggle"),e.shrinkwrap=!0,e}return e(n,t),n.preset=function(e){return"text"in e&&(e.label=e.text),t.preset.call(this,e)},n.withName=function(t,e){return this.with({name:t,label:e})},n.prototype.isFocusable=function(){return!0},n.prototype.isKeyboardFocusable=function(){return!0},n.UIToggleObserver=function(){function t(t){this.component=t}return t.prototype.onFormContextChange=function(){if(this.component.formContext&&this.component.name){var t=this.component.formContext.get(this.component.name);this.component.state=!!t}},t.prototype.onStateChange=function(){var t;null===(t=this.component.formContext)||void 0===t||t.set(this.component.name,this.component.state,!0)},t}(),i([W],n.prototype,"formContext",void 0),i([A],n,"UIToggleObserver",void 0),n}(ue);Fe.presetBinding("formContext",Re);var Le=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.preset=function(e,n){return this.presetBindingsFrom(n),this.prototype._ConditionalContentClass=n,t.preset.call(this,e)},n.UIConditionalObserver=function(){function t(t){this.component=t}return t.prototype.onStateChange=function(){this.component._ConditionalContentClass&&!!this.component.content!=!!this.component.state&&(this.component.content=this.component.state?new this.component._ConditionalContentClass:void 0)},t}(),i([A],n,"UIConditionalObserver",void 0),n}(ee),je=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.preset=function(e,n){return n&&this.presetBoundComponent("content",n).limitBindings("formContext"),t.preset.call(this,e,n)},i([W],n.prototype,"formContext",void 0),n}(ee),Be=function(t){function n(e,n,r){var i=t.call(this,e,n,r)||this;if(!n.content)throw TypeError();return i.context=n.object,i.object=n.object,i.cell=n.content,i.value=n.value,i}return e(n,t),n}(ft),Ne=function(t){function n(e){var n=t.call(this)||this;return n._selected=!1,n._hovered=!1,n.object=e,n.value=e.valueOf(),n}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i={},o={};for(var a in e)("o"===a[0]&&"n"===a[1]&&(a.charCodeAt(2)<97||a.charCodeAt(2)>122)?o:i)[a]=e[a];i.accessibleRole||(i.accessibleRole="listitem");var s=qt.with.apply(qt,l([i],c(n))),u=this.presetBoundComponent("content",s);return u.limitBindings("object","value","selected","hovered"),t.preset.call(this,o,s)},n.prototype.propagateComponentEvent=function(t,e){this.managedState&&this.emit(Be,t,this,e)},n.prototype.emitAction=function(t,e,n){var r=new Be(t,this,e);r.context=n,this.emit(r.freeze())},n.prototype.delegateEvent=function(e,n){return(e instanceof ft&&!(e instanceof Be)||e instanceof Nt)&&(e=new Be(e.name,this,e)),t.prototype.delegateEvent.call(this,e,n)},Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"hovered",{get:function(){return this._hovered},enumerable:!1,configurable:!0}),n.prototype.requestFocus=function(){this.content&&this.content.requestFocus()},n.prototype.requestFocusNext=function(){this.content&&this.content.requestFocusNext()},n.prototype.requestFocusPrevious=function(){this.content&&this.content.requestFocusPrevious()},n.UIListCellAdapterObserver=function(){function t(t){this.adapter=t}return t.prototype.onSelect=function(t){t.source!==this.adapter&&t.source!==this.adapter.content||(this.adapter._selected=!0)},t.prototype.onDeselect=function(t){t.source!==this.adapter&&t.source!==this.adapter.content||(this.adapter._selected=!1)},t.prototype.onMouseEnter=function(t){t.source!==this.adapter&&t.source!==this.adapter.content||(this.adapter._hovered=!0)},t.prototype.onMouseLeave=function(t){t.source!==this.adapter&&t.source!==this.adapter.content||(this.adapter._hovered=!1)},t}(),i([W],n.prototype,"object",void 0),i([R("_selected")],n.prototype,"selected",null),i([R("_hovered")],n.prototype,"hovered",null),i([A],n,"UIListCellAdapterObserver",void 0),n}(ee),Ue=Jt.with({accessibleRole:"list"}),Ve=Promise.resolve(),ze=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.items=new ct,e.firstIndex=0,e.lastFocusedIndex=0,e._updateQueued=!1,e._contentMap=new U,e}return e(n,t),n.preset=function(e,n,r,i){return void 0===r&&(r=Ue),this.presetBindingsFrom(n,i),this.addObserver(function(){function t(t){this.controller=t,this.Adapter=n,!this.Adapter||this.Adapter.prototype instanceof N||(this.Adapter=this.Adapter(this)),this.BookEnd=i}return t.prototype.onFocusIn=function(t){if(t.source!==this.controller.content){var e=this.controller.getIndexOfComponent(t.source);this.controller.lastFocusedIndex=Math.max(0,e)}else this.controller.restoreFocus()},t.prototype.onFirstIndexChangeAsync=function(){return this.controller._doUpdateAsync(this.Adapter,this.BookEnd)},t.prototype.onMaxItemsChangeAsync=function(){return this.controller._doUpdateAsync(this.Adapter,this.BookEnd)},t.prototype.onItemsChange=function(t,e){(!e||e instanceof m)&&this.controller._doUpdateAsync(this.Adapter,this.BookEnd)},t}()),t.preset.call(this,e,r)},n.prototype.onFocusIn=function(t){if(t.source!==this.content){var e=this.getIndexOfComponent(t.source);this.lastFocusedIndex=Math.max(0,e)}else this.restoreFocus();return!0},n.prototype.onArrowUpKeyPress=function(){if(!this.focusPreviousItem()){var t=this.getParentComponent(n);t&&t.enableArrowKeyFocus&&t.restoreFocus()}return!0},n.prototype.onArrowDownKeyPress=function(){if(!this.focusNextItem()){var t=this.getParentComponent(n);if(t&&t.enableArrowKeyFocus)return!1}return!0},n.prototype.getIndexOfComponent=function(t){var e=this.content;if(!e)return-1;for(;t&&t.getParentComponent()!==e;)t=t.getParentComponent();return t?e.content.indexOf(t):-1},n.prototype.restoreFocus=function(){var t=this.content;if(t&&t.content.count>0){var e=Math.max(this.lastFocusedIndex,0),n=Math.min(t.content.count-1,e),r=t.content.get(n);"function"==typeof r.requestFocus&&r.requestFocus()}},n.prototype.focusPreviousItem=function(){return this.lastFocusedIndex>0&&(this.lastFocusedIndex--,this.restoreFocus(),!0)},n.prototype.focusNextItem=function(){return this.lastFocusedIndex<this.items.count-1&&(this.lastFocusedIndex++,this.restoreFocus(),!0)},n.prototype._doUpdateAsync=function(t,e){return o(this,void 0,void 0,(function(){var n,r,i,o,c,l,u,h,d,p,f,v,y,m,g,b;return a(this,(function(a){switch(a.label){case 0:return this._updateQueued?[2]:(this._updateQueued=!0,[4,Ve]);case 1:if(a.sent(),this._updateQueued=!1,n=this.content,r=n&&n.content,i=this.items,!r)return[2];if(!i||!t)return r.clear(),[2];(o=this.firstIndex)>=0||(o=0),c=this.maxItems,l=o>0||c>=0?i.count>0&&o<i.count?i.take(c>=0?c:i.count,i.get(this.firstIndex)):[]:i,u=this._contentMap,h=[],d=u.toObject();try{for(p=s(l),f=p.next();!f.done;f=p.next())v=f.value,(y=d[v.managedId])?delete d[v.managedId]:(y=new t(v),u.set(String(v.managedId),y)),h.push(y)}catch(t){g={error:t}}finally{try{f&&!f.done&&(b=p.return)&&b.call(p)}finally{if(g)throw g.error}}for(m in e&&(r.last()instanceof e?h.push(r.last()):h.push(new e)),r.replace(h),d)u.remove(d[m]);return this.enableArrowKeyFocus&&(n.allowKeyboardFocus=!!h.length),this.managedState&&this.emitAction("ListItemsChange"),[2]}}))}))},i([W],n.prototype,"items",void 0),n}(ee),We=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.placement=$t.DIALOG,e}return e(n,t),n.preset=function(e,n,r){var i=r||e.modal;if(delete e.modal,ut.isBinding(i))throw u(45);return n&&this.presetBoundComponent("content",n).limitBindings(),i&&(this.presetBoundComponent("modal",i).limitBindings(),this.prototype._ModalClass=i),t.preset.call(this,e,n)},n.prototype.onShowModal=function(){return this.showModal(),!0},n.prototype.onCloseModal=function(){return this.closeModal(),!0},n.prototype.showModal=function(){this._ModalClass&&(this.modal=new this._ModalClass)},n.prototype.closeModal=function(){this.modal=void 0},i([bt,K],n.prototype,"modal",void 0),n}(ee);We.addObserver(function(){function t(t){this.controller=t}return t.prototype.onModalChange=function(){var t=this;if((this._renderCallback&&(this._renderCallback=this._renderCallback(void 0)),this.controller.modal&&this.controller.renderContext)&&this._getReferenceComponent()){this._renderCallback=this.controller.renderContext.getRenderCallback();var e=function(n,r){return t._renderCallback?(n&&n.element?(void 0===n.modalShadeOpacity&&(n.modalShadeOpacity=t.controller.modalShadeOpacity),n.placement||(n.placement=t.controller.placement,n.placementRef=t._getReferenceComponent()),t._renderCallback=t._renderCallback(n,r)):(t._renderCallback=t._renderCallback(void 0),t.controller.modal=void 0),e):e};this.controller.modal.render(e)}},t.prototype._getReferenceComponent=function(){for(var t=this.controller;t;){if(t instanceof Wt)return t;t instanceof ee&&(t=t.content)}},t}());var Ke=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.onSelect=function(t){if(t.source!==this.selected){for(;t.inner instanceof pt&&"Select"===t.inner.name;)if((t=t.inner).source===this.selected)return;var e=this.selected;this.selected=t.source,e&&e.managedState&&e.emitAction("Deselect")}},n.prototype.onDeselect=function(t){for(t.source===this.selected&&(this.selected=void 0);t.inner instanceof pt&&"Deselect"===t.inner.name;)(t=t.inner).source===this.selected&&(this.selected=void 0)},i([W],n.prototype,"selected",void 0),n}(ee),He=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.preset=function(e,n){return t.preset.call(this,e,n)},n}(ee);He.addObserver(function(){function t(t){this.controller=t,this._initial=!0}return t.prototype.onContentChange=function(){var t=this.controller.content;if(t instanceof Wt){var e=t.style,n=Object.create(null),r=0;Tt.isStyleOverride(t.dimensions,e)&&(n.dimensions=t.dimensions,r++),Tt.isStyleOverride(t.position,e)&&(n.position=t.position,r++),t instanceof Ht&&(Tt.isStyleOverride(t.layout,e)&&(n.containerLayout=t.layout,r++),t instanceof qt&&Tt.isStyleOverride(t.decoration,e)&&(n.decoration=t.decoration,r++)),t instanceof ue&&(Tt.isStyleOverride(t.decoration,e)&&(n.decoration=t.decoration,r++),Tt.isStyleOverride(t.textStyle,e)&&(n.textStyle=t.textStyle,r++)),this.controller.baseStyle=r?e.extend(n):e,this.onStateChange()}},t.prototype.onStateChange=function(){var t,e=this.controller;if(e.baseStyle&&e.content instanceof Wt){var n=e.baseStyle,r=null===(t=e.styles)||void 0===t?void 0:t[String(e.state)];!r&&e.state&&(r=e.style),"string"==typeof r&&(r=jt.getStyle(r)),r instanceof Tt?(this._initial=!1,e.content.style=n.mixin(r)):this._initial||(e.content.style=n)}},t}());var $e=function(t){function n(e,n,r){var i=t.call(this,e,n)||this;return i.key=r,i}return e(n,t),n}(Nt),qe=function(t){function n(){var e=t.call(this)||this;if(e.options=[],!jt.current.MenuBuilder)throw u(44);return e.builder=new jt.current.MenuBuilder,e}return e(n,t),n.preset=function(e){return t.preset.call(this,e)},n.prototype.render=function(t){var e,n;if(this.options.length){this.builder.clear();try{for(var r=s(this.options),i=r.next();!i.done;i=r.next()){var o=i.value;this.builder.addOption(o.key,String(o.text))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}this.gravity&&this.builder.setGravity(this.gravity),this.emitAction("Build");var a=this.builder.build();(this.menu=new a).render(t)},n.prototype.onSelectMenuItem=function(t){return this.selected=t.key,this.emit(t),!0},i([bt,gt],n.prototype,"menu",void 0),n}(vt),Ge=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.index=0,e._renderer=new Wt.DynamicRendererWrapper,e}return e(n,t),n.preset=function(e){return t.preset.call(this,e)},n.withBoundContent=function(t){return void 0===t&&(t="content"),this.with({view:dt(t)})},n.prototype.delegateEvent=function(e,n){if(!0!==t.prototype.delegateEvent.call(this,e,n)&&e instanceof Nt)return this.emit(e),!0},n.prototype.render=function(t){(t||this.view!==this._lastRendered)&&(this._lastRendered=this.view,this._renderer.render(this.view,t))},i([W],n.prototype,"managedList",void 0),i([W],n.prototype,"managedMap",void 0),i([bt,W],n.prototype,"view",void 0),n}(vt),Ye=function(){function t(t){this.component=t}return t.prototype.onViewChange=function(){this.component.render()},t.prototype.updateView=function(){if(this.component.index>=0&&this.component.managedList&&this.component.index<this.component.managedList.count){var t=this.component.index;this.component.view=this.component.managedList.get(t)}else"string"==typeof this.component.index&&this.component.managedMap&&this.component.managedMap.has(this.component.index)?this.component.view=this.component.managedMap.get(this.component.index):this.component.view=void 0},i([I("managedList","managedMap","index")],t.prototype,"updateView",null),t}();Ge.addObserver(Ye);var Xe,Je=dt("activationContext"),Ze=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),i([W],n.prototype,"renderContext",void 0),i([W],n.prototype,"viewportContext",void 0),i([W],n.prototype,"activationContext",void 0),n}(vt.with({renderContext:Zt,viewportContext:Qt,activationContext:Je})),Qe=function(t){function n(e,n){var r=t.call(this)||this;return r.name=e,r.path=n,r}return e(n,t),n.preset=function(e){return t.preset.call(this,e)},Object.defineProperty(n.prototype,"match",{get:function(){return this._matchedPath},enumerable:!1,configurable:!0}),n.prototype.getParentActivity=function(){return this.getManagedParent(n)},n.prototype.getApplication=function(){return this.getManagedParent(n.Application)},n.prototype.activateAsync=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this._matchedPath=Object.freeze(t||{path:""}),[4,this.activateManagedAsync()];case 1:return e.sent(),[2]}}))}))},n.prototype.destroyAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.destroyManagedAsync()];case 1:return t.sent(),[2]}}))}))},n.prototype.isActive=function(){return this.managedState===T.ACTIVE},n.ActivityObserver=function(){function t(t){this.activity=t}return t.prototype.onActive=function(){this.activity.activated=Date.now()},t.prototype.onInactive=function(){this.activity.deactivated=Date.now()},t.prototype.onPathChangeAsync=function(){return this.checkActivateAsync()},t.prototype.onActivationContextChangeAsync=function(){return this.checkActivateAsync()},t.prototype.checkActivateAsync=function(){return o(this,void 0,void 0,(function(){var t;return a(this,(function(e){switch(e.label){case 0:return"string"!=typeof this.activity.path?[3,4]:(t=void 0,this.activity.activationContext&&(t=this.activity.activationContext.match(this.activity.path,this.activity))?[4,this.activity.activateAsync(t)]:[3,2]);case 1:return e.sent(),[3,4];case 2:return this.activity.managedState!==T.ACTIVATING&&this.activity.managedState!==T.ACTIVE?[3,4]:[4,this.activity.deactivateManagedAsync()];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))},t}(),i([R("_matchedPath")],n.prototype,"match",null),i([A],n,"ActivityObserver",void 0),n}(Ze),tn=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._target="",e._split=[],e}return e(n,t),Object.defineProperty(n.prototype,"target",{get:function(){return this._target},set:function(t){var e=String(t||"").replace(/^\/|\/\s*$/g,"");this._target!==e&&(this._target=e,this._split=e?e.split("/"):[],this.emitChange())},enumerable:!1,configurable:!0}),n.prototype.navigate=function(t){},n.prototype.match=function(t,e){for(t=String(t||"");e&&"."===t[0]&&"/"===t[1];)(e=e.getParentActivity())instanceof Qe&&"string"==typeof e.path&&(t=e.path.replace(/\/$/,"")+t.slice(1));var n=!1;"/"===t.slice(-1)&&(t=t.slice(0,-1),n=!0),"/"===t[0]&&(t=t.slice(1));for(var r=t?t.split("/"):[],i={path:this._target},o=0;o<this._split.length;){if(o>=r.length)return n?i:void 0;if("*"===r[o][0]){if(r.length>o+1)throw u(0,t);return i[r[o].slice(1)]=this._split.slice(o).join("/"),i}if(":"===r[o][0]&&this._split[o])i[r[o].slice(1)]=this._split[o];else if(r[o]!==this._split[o])return;o++}return o===r.length?i:void 0},n}(N),en=function(t){function n(){var e=t.call(this)||this;return e.$list=(new ct).restrict(Qe),e.$list.propagateEvents((function(t){return t instanceof ft?t:t===p.ACTIVE||t===p.INACTIVE?y:void 0})),e}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.preset.apply(this,l([e],c(n))),function(){this.add.apply(this,l([],c(n.map((function(t){return new t})))))}},Object.defineProperty(n.prototype,"count",{get:function(){return this.$list.count},enumerable:!1,configurable:!0}),n.prototype.add=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.$list).add.apply(t,l([],c(e))),this},n.prototype.remove=function(t){return this.$list.remove(t),this},n.prototype.clear=function(){return this.$list.clear(),this},n.prototype.get=function(t){return this.$list.get(t)},n.prototype.includes=function(t){return this.$list.includes(t)},n.prototype.forEach=function(t){this.$list.forEach(t)},n.prototype.map=function(t){return this.$list.map(t)},n.prototype.toArray=function(){return this.$list.toArray()},n.prototype.delegateEvent=function(t){this.emit(t)},i([bt,K],n.prototype,"$list",void 0),n}(vt),nn=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Application",e}var r;return e(n,t),n.run=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.with.apply(this,l([],c(t)));return(new n).activate()},n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(n.length){var i=en.with.apply(en,l([],c(n)));this.presetBoundComponent("activities",i),this.addEventHandler((function(t){(t===p.INACTIVE&&(this.activities=void 0),t===p.ACTIVE)&&(this.activities=new i,this.activities.map((function(t){return t.path})).filter((function(t){return!!t})).length||this.activities.forEach((function(t){t.activateAsync().catch(X)})))}))}return t.preset.call(this,e)},n.setAutoUpdateHandler=function(t){Xe=t},n.registerAutoUpdate=function(t,e,n){setTimeout((function(){Xe&&Xe(t,e,n)}),10)},n.prototype.activate=function(){return this.activateAsync().catch(X),this},n.prototype.activateAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.activateManagedAsync()];case 1:return t.sent(),[2]}}))}))},n.prototype.deactivateAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.deactivateManagedAsync()];case 1:return t.sent(),[2]}}))}))},n.prototype.destroyAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.destroyManagedAsync()];case 1:return t.sent(),[2]}}))}))},n.prototype.navigate=function(t){return this.activationContext&&this.activationContext.navigate(t),this},n.prototype.goBack=function(){return this.activationContext&&this.activationContext.navigate(":back"),this},n.prototype.add=function(){for(var t,e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this.activities||(this.activities=new en),(t=this.activities).add.apply(t,l([],c(n.filter((function(t){return!e.activities.includes(t)}))))),this},n.prototype.showViewActivityAsync=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.add(t),[4,t.activateAsync()];case 1:return e.sent(),[2,t]}}))}))},n.prototype.findService=function(t){return q.find(t)},n.active=(r=new ct,n.addObserver(function(){function t(t){this.instance=t}return t.prototype.onActive=function(){r.includes(this.instance)||r.add(this.instance)},t.prototype.onInactive=function(){r.remove(this.instance)},t}()),r),i([bt,K],n.prototype,"activities",void 0),i([K],n.prototype,"renderContext",void 0),i([K],n.prototype,"activationContext",void 0),n}(vt);nn.presetBoundComponent("activities",Qe),Qe.Application=nn;var rn=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.placement=$t.NONE,e._renderer=new Wt.DynamicRendererWrapper,e}return e(n,t),n.autoUpdate=function(t){nn.registerAutoUpdate(t,this,"@reload")},n["@reload"]=function(t,e){t.prototype._OrigClass&&(t=t.prototype._OrigClass),e.prototype._OrigClass=t;var n=Object.getOwnPropertyDescriptors(e.prototype);for(var r in n)Object.defineProperty(t.prototype,r,n[r]);var i=t.prototype._ViewClass=e.prototype._ViewClass;if(i&&t.prototype._PresetClass)for(var o in t.prototype._PresetClass.presetBoundComponent("view",i,Qe),t.prototype._allActive){var a=t.prototype._allActive[o];a.isActive()&&(a.view=new i)}},n.preset=function(e,n){return n&&(this.presetBoundComponent("view",n,Qe),this.prototype._allActive||(this.prototype._allActive=Object.create(null)),this.prototype._ViewClass=n,this.prototype._PresetClass=this),t.preset.call(this,e)},n.prototype.render=function(t){var e=this;if(this._cbContext!==this.renderContext&&(this._renderCallback=void 0,this._cbContext=this.renderContext),t&&t!==this._renderCallback&&(this._renderCallback&&this._renderCallback(void 0),this._renderCallback=t),!this._renderCallback){if(!this.placement)return;if(!this.renderContext)throw u(1);var n=this.placement,r=this.renderContext.getRenderCallback(),i=function(t,o){return t&&(t.placement=n,t.modalShadeOpacity=e.modalShadeOpacity),r=r(t,o),i};this._renderCallback=i}this._renderer.render(this.view,this._renderCallback)},n.prototype.removeViewAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this._renderer.removeAsync()];case 1:return t.sent(),[2]}}))}))},n.prototype.restoreFocus=function(t){t?this.firstFocused&&this.firstFocused.requestFocus():this.lastFocused&&this.lastFocused.requestFocus()},n.prototype.onFocusIn=function(t){t.source instanceof Wt&&(this.firstFocused||(this.firstFocused=t.source),this.lastFocused=t.source)},n.prototype.showDialogAsync=function(t,n){var r=this.getApplication();if(!r)throw u(2);var i=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(on.with(t));n&&(i.prototype.delegateEvent=n);var o=new i;return r.showViewActivityAsync(o)},n.prototype.showConfirmationDialogAsync=function(t,e,n,r){var i=this,o=jt.current.ConfirmationDialogBuilder;if(!o)throw u(3);var a=new o;Array.isArray(t)?t.forEach((function(t){return a.addMessage(t)})):a.addMessage(t),e&&a.setTitle(e),n&&a.setConfirmButtonLabel(n),r&&a.setCancelButtonLabel(r);var s=a.build();return new Promise((function(t){i.showDialogAsync(s,(function(e){"Confirm"===e.name&&(t(!0),this.destroyAsync()),"CloseModal"===e.name&&r&&(t(!1),this.destroyAsync())}))}))},n.ViewActivityObserver=function(){function t(t){this.activity=t}return t.prototype.onActive=function(){this.activity._allActive&&(this.activity._allActive[this.activity.managedId]=this.activity),this.activity._ViewClass&&(this.activity.view=new this.activity._ViewClass)},t.prototype.onInactive=function(){this.activity._allActive&&delete this.activity._allActive[this.activity.managedId],this.activity.view=void 0},t.prototype.onRenderContextChange=function(){return o(this,void 0,void 0,(function(){var t=this;return a(this,(function(e){switch(e.label){case 0:return this.activity.isActive()&&this.activity._ViewClass?(this.activity.view=void 0,this.activity.renderContext?[4,Promise.resolve()]:[3,2]):[3,2];case 1:e.sent(),setTimeout((function(){!t.activity.view&&t.activity.renderContext&&t.activity.isActive()&&t.activity._ViewClass&&(t.activity.view=new t.activity._ViewClass)}),1),e.label=2;case 2:return[2]}}))}))},t.prototype.onViewChangeAsync=function(){this.checkAndRender()},t.prototype.checkAndRender=function(){this.activity.renderContext&&this.activity.view?this.activity.render():this.activity.removeViewAsync().catch(X)},t}(),i([bt,K],n.prototype,"view",void 0),i([W],n.prototype,"firstFocused",void 0),i([W],n.prototype,"lastFocused",void 0),i([A],n,"ViewActivityObserver",void 0),n}(Qe);!function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.placement=$t.PAGE,e}e(n,t)}(rn);var on=function(t){function n(){var e=t.call(this)||this;return e.placement=$t.DIALOG,e.modalShadeOpacity=jt.current.modalDialogShadeOpacity,e}return e(n,t),n.prototype.onCloseModal=function(){return this.destroyAsync(),!0},n}(rn),an=function(t){function n(){var e=t.call(this)||this;if(e._renderer=new Wt.DynamicRendererWrapper,e._Views)for(var n in e._Views)e[n]=new e._Views[n];return e}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(n.length>1)throw u(4);return n[0]&&this.presetChildView("view",n[0],!0),t.preset.call(this,e)},n.with=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!t||"function"==typeof t||!t.view)return vt.with.apply(this,arguments);var i=t;i.content||(i.content=["content"]);var o=i.defaults,a=function(t){function n(e){var n=t.call(this)||this,r=function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e];if(r instanceof ut)throw TypeError();n[e]=r}};return o&&r(o),e&&r(e),n}return e(n,t),n.preset=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var o=0;o<n.length;o++){var a=i.content[o];a&&n[o]&&(K(this.prototype,a),this.presetChildView(a,n[o]))}return t.preset.call(this,e)},n.prototype.isPresetComponent=function(){return!0},n.with=vt.with,n}(this);if("function"==typeof o){var s=o;o=void 0,a._addInitializer((function(){o=s()}))}return a.presetChildView("view",i.view,!0),a},n.presetChildView=function(t,e,n){void 0===n&&(n=[]);var r=this.presetBoundComponent(t,e,rn);!0!==n&&r.limitBindings.apply(r,l([],c(n))),Object.prototype.hasOwnProperty.call(this.prototype,"_Views")||(this.prototype._Views=Object.create(this.prototype._Views||null)),this.prototype._Views[t]=e},n.prototype.delegateEvent=function(e,n){if(!0!==t.prototype.delegateEvent.call(this,e,n)&&e instanceof Nt)return this.emit(e),!0},n.prototype.render=function(t){if(!this.renderContext)throw u(5);this.beforeRender(),this._renderer.render(this.view,t)},n.prototype.beforeRender=function(){},n.prototype.removeViewAsync=function(t){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return t&&this.managedState===T.ACTIVE?[4,this.deactivateManagedAsync()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[4,this._renderer.removeAsync()];case 3:return e.sent(),[2]}}))}))},n.prototype.requestFocus=function(){"function"==typeof(this.view&&this.view.requestFocus)&&this.view.requestFocus()},i([bt,gt],n.prototype,"view",void 0),n}(Ze);an.addObserver(function(){function t(t){this.component=t}return t.prototype.onRenderContextChange=function(t){t?this.component.render():this.component.removeViewAsync(!0).catch(X)},t}());var sn={cell:qt,covercell:Yt,flowcell:Gt,form:re,row:ie,closerow:se,centerrow:ae,oppositerow:oe,column:Xt,closecolumn:Jt,scrollcontainer:le,button:he,iconbutton:ge,largebutton:ye,smallbutton:me,linkbutton:ve,outlinebutton:fe,borderlessbutton:pe,primarybutton:de,label:we,closelabel:Ee,expandedlabel:Oe,p:Se,h1:_e,h2:Ce,h3:xe,textfield:Te,borderlesstextfield:De,img:be,toggle:Fe,separator:ke,spacer:Ae,conditional:Le,formcontext:je,list:ze,listcell:Ne,menu:qe,modal:We,selection:Ke,style:He,view:Ge,viewcontent:Ge.withBoundContent()};function cn(t,e){for(var n,i,o,a=[],u=2;u<arguments.length;u++)a[u-2]=arguments[u];a=ln(a);var h,d,p="",f=[];try{for(var v=s(a),y=v.next();!y.done;y=v.next()){var m=y.value;"string"==typeof m?(p+=m,h=!0):m instanceof ut?(d||(d=[]),d.push(m),p+="%s"):f.push(m)}}catch(t){n={error:t}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}var g=e?r({},e):{};if(p&&(d?h||1!==d.length?g.text=new(ht.bind.apply(ht,l([void 0,p],c(d)))):g.text=d[0]:g.text=at(p)),"string"==typeof t){var b=cn.intrinsicTags[t];if(!b)throw Error("[JSX] Invalid tag: "+t);return b.with.apply(b,l([g],c(f)))}return t.prototype instanceof vt?(o=t).with.apply(o,l([g],c(f))):t.apply(void 0,l([g],c(f)))}function ln(t){var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,l([],c(ln(t)))):e.push(t)})),e}!function(t){t.intrinsicTags=sn,t.tag=function(t){function e(){return this instanceof e?new t:t.with.apply(t,arguments)}return e.prototype=t.prototype,e.with=e,e}}(cn||(cn={}));var un,hn,dn=16,pn={start:"flex-start",end:"flex-end",center:"center",fill:"space-between","space-around":"space-around","":""},fn={start:"flex-start",end:"flex-end",center:"center",stretch:"stretch",baseline:"baseline","":""},vn={},yn=[];function mn(t){for(var e in hn||(hn={}),t)hn[e]=t[e];Nn.scheduleRender((function(){un||(un=function(){var t=document.createElement("style");t.setAttribute("type","text/css"),document.head.appendChild(t);var e={};return function(n,i){for(var o in n)"@"===o[0]&&e[o]?e[o]=r(r({},e[o]),n[o]):e[o]=r({},n[o]);var a="";for(var o in e)if("@"===o[0]){for(var s in a+=o+" {\n",e[o])a+="  "+s+" { "+On(e[o][s])+"}\n";a+="}\n"}else a+=o+" { "+On(e[o])+"}\n";t.textContent=i.map((function(t){return"@import url("+JSON.stringify(t)+");\n"}))+".UI { display: block }\n"+a}}()),hn&&un(hn,yn),hn=void 0}))}function gn(t,e,n,r){if(t.hidden)return e.hidden=!0,void(e.style.cssText="");e.hidden&&(e.hidden=!1);var i=t.style,o={},a="UI";if(Tt.isStyleOverride(t.dimensions,i)&&Cn(o,t.dimensions),Tt.isStyleOverride(t.position,i)&&xn(o,t.position),t instanceof Ht)Tt.isStyleOverride(t.layout,i)&&_n(o,t.layout),t instanceof qt&&Tt.isStyleOverride(t.decoration,i)&&En(o,t.decoration),function(t,e){e instanceof qt?(En(t,e),void 0!==e.margin&&(t.margin=bn(e.margin))):e instanceof ie?void 0===e.height||t.height||(t.height=bn(e.height)):e instanceof Xt&&(void 0===e.width||t.width||(t.width=bn(e.width)));e.verticalScrollEnabled&&(t.overflowY="auto");e.horizontalScrollEnabled&&(t.overflowX="auto")}(o,t);else if(t instanceof ue&&(Tt.isStyleOverride(t.decoration,i)?En(o,t.decoration):t.decoration.cssClassNames&&(o.className=t.decoration.cssClassNames.join(" ")),Tt.isStyleOverride(t.textStyle,i)&&Sn(o,t.textStyle),(t.shrinkwrap&&t.dimensions.grow||!t.shrinkwrap&&!t.dimensions.grow)&&(o.flexGrow=t.shrinkwrap?"0":"1"),t instanceof ke)){if(o.borderWidth=bn(t.thickness),t.margin){var s=bn(t.margin);o.margin=t.vertical?"0 "+s:s+" 0"}t.color&&(o.borderColor=jt.replaceColor(t.color))}vn[i.id]||wn(i),i.ids.length&&(a+=" "+i.ids.join(" ")),o.className&&(a+=" "+o.className,delete o.className),r&&(a+=" "+r),e.className=a;var c=On(o);!c&&n||(e.style.cssText=c)}function bn(t,e){if(void 0===e&&(e="auto"),"string"==typeof t)return t;if("number"==typeof t)return t/16+"rem";if("object"==typeof t){var n=0,r=0,i=0,o=0;return t.x&&(i=o=bn(t.x)),t.y&&(n=r=bn(t.y)),t.top&&(n=bn(t.top)),t.bottom&&(r=bn(t.bottom)),t.left&&(i=bn(t.left)),t.right&&(o=bn(t.right)),n+" "+o+" "+r+" "+i}return e}function wn(t){var e,n,r;vn[t.id]=!0;var i=function(t){var e={};return t.containerLayout&&_n(e,t.containerLayout),t.dimensions&&Cn(e,t.dimensions),t.position&&xn(e,t.position),t.textStyle&&Sn(e,t.textStyle),t.decoration&&En(e,t.decoration),e};mn(((e={})[".UI"+t.ids.map((function(t){return"."+t})).join("")]=i(t.getOwnStyles()),e));var o=function(e,n){var r,o=t.conditionalStyles[n];o&&mn(((r={})[".UI"+t.ids.map((function(t){return"."+t})).join("")+e]=i(o.getStyles()),r))};if(o(":focus","focused"),o(":hover:not([disabled])","hover"),o(":active:not([disabled])","pressed"),o("[disabled]","disabled"),o("[data-selected]","selected"),t.inherited.length)try{for(var a=s(t.inherited),c=a.next();!c.done;c=a.next()){var l=c.value;vn[l.id]||wn(l)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}function _n(t,e){var n=e.axis;void 0!==n&&(t.flexDirection="horizontal"===n?"row":"column");var r=e.distribution;void 0!==r&&(t.justifyContent=pn[r]||"");var i=e.gravity;void 0!==i&&(t.alignItems=fn[i]||"");var o=e.wrapContent;void 0!==o&&(t.flexWrap=o?"wrap":"nowrap");var a=e.clip;void 0!==a&&(t.overflow=a?"hidden":"visible")}function Cn(t,e){var n=e.width;void 0!==n&&(t.width=bn(n));var r=e.height;void 0!==r&&(t.height=bn(r));var i=e.minWidth;void 0!==i&&(t.minWidth=bn(i,""));var o=e.minHeight;void 0!==o&&(t.minHeight=bn(o,""));var a=e.maxWidth;void 0!==a&&(t.maxWidth=bn(a,""));var s=e.maxHeight;void 0!==s&&(t.maxHeight=bn(s,""));var c=e.grow;void 0!==c&&(t.flexGrow=c);var l=e.shrink;void 0!==l&&(t.flexShrink=l)}function xn(t,e){var n=e.gravity;"overlay"===n?(t.position="absolute",t.zIndex="100",t.top=bn(e.top),t.bottom=bn(e.bottom),t.left=bn(e.left),t.right=bn(e.right),void 0===e.left&&void 0===e.right&&(t.margin="auto")):(n&&(t.alignSelf=fn[n]),void 0===e.top&&void 0===e.bottom&&void 0===e.left&&void 0===e.right||(t.position="relative",void 0!==e.top&&(t.top=bn(e.top)),void 0!==e.bottom&&(t.bottom=bn(e.bottom)),void 0!==e.left&&(t.left=bn(e.left)),void 0!==e.right&&(t.right=bn(e.right))))}function Sn(t,e){var n=e.align;void 0!==n&&(t.textAlign=n);var r=e.color;void 0!==r&&(t.color=jt.replaceColor(r));var i=e.fontFamily;void 0!==i&&(t.fontFamily=i);var o=e.fontSize;void 0!==o&&(t.fontSize=bn(o,"inherit"));var a=e.fontWeight;void 0!==a&&(t.fontWeight=String(a));var s=e.letterSpacing;void 0!==s&&(t.letterSpacing=bn(s));var c=e.lineHeight;void 0!==c&&(t.lineHeight=String(c));var l=e.lineBreakMode;"clip"===l?(t.overflow="hidden",t.textOverflow="clip"):"ellipsis"===l?(t.overflow="hidden",t.textOverflow="ellipsis"):void 0!==l&&(t.whiteSpace=l),e.bold&&(t.fontWeight="bold");var u=e.italic;void 0!==u&&(t.fontStyle=u?"italic":"normal");var h=e.uppercase;void 0!==h&&(t.textTransform=h?"uppercase":"none");var d=e.smallCaps;void 0!==d&&(t.fontVariant=d?"small-caps":"normal");var p=e.underline,f=e.strikeThrough;p?t.textDecoration="underline"+(f?" line-through":""):f?t.textDecoration="line-through":!1!==p&&!1!==f||(t.textDecoration="none")}function En(t,e){var n=e.background;void 0!==n&&(t.background=jt.replaceColor(n));var r=e.textColor;void 0!==r&&(t.color=jt.replaceColor(r));var i=e.borderThickness;void 0!==i&&(t.borderWidth=bn(i));var o=e.borderColor;null!=o&&(t.borderColor=jt.replaceColor(o)),null!=e.borderStyle&&(t.borderStyle=e.borderStyle),void 0!==e.borderRadius&&(t.borderRadius=bn(e.borderRadius));var a=e.padding;if(void 0!==a&&(t.padding=bn(a)),void 0!==e.dropShadow&&(t.boxShadow=function(t){void 0===t&&(t=0);var e="";t<0&&(e="inset ",t=-t);return(t=Math.min(1,Math.max(0,t)))>0?e+"0 0 "+2*t+"rem "+-.25*t+"rem rgba(0,0,0,"+t*t*.3+"),"+e+"0 "+.85*t+"rem "+1*t+"rem "+-.25*t+"rem rgba(0,0,0,"+(.15*t+.1)+"),"+e+"0 "+(t*t*.5+.6*t)+"rem "+1*t+"rem "+-1*t+"rem rgba(0,0,0,.4),"+e+"0 "+t*t*1.5+"rem "+3*t+"rem "+-1*t+"rem rgba(0,0,0,.3),"+e+"0 "+t*t*3+"rem "+2.5*t+"rem "+-2*t+"rem rgba(0,0,0,.3)":"none"}(e.dropShadow)),e.opacity>=0&&(t.opacity=String(e.opacity)),e.css)for(var s in e.css)t[s]=e.css[s];e.cssClassNames&&(t.className=e.cssClassNames.join(" "))}function On(t){var e="",n=function(n){if("className"===n||""===t[n]||null==t[n])return"continue";var r=n.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^(webkit|o|ms|moz)-/,"-$1-");String(t[n]).split("||").reverse().forEach((function(t){e+=r+": "+t+"; "}))};for(var r in t)n(r);return e}var kn,An,Rn=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.narrow=!1,e.wide=!1,e.short=!1,e.tall=!1,e._smallBreakpoint=590,e._largeBreakpoint=1150,e}return e(n,t),n.prototype.setBreakpoints=function(t,e){this._smallBreakpoint=t,this._largeBreakpoint=e,this.update()},n.prototype.update=function(){var t=!1,e=window.innerWidth/dn*16,n=window.innerHeight/dn*16,r=e<this._smallBreakpoint,i=e>this._largeBreakpoint,o=n<this._smallBreakpoint,a=n>this._largeBreakpoint;return this.width=e,this.height=n,this.narrow!==r&&(this.narrow=r,t=!0),this.wide!==i&&(this.wide=i,t=!0),this.short!==o&&(this.short=o,t=!0),this.tall!==a&&(this.tall=a,t=!0),t&&this.emitChange(),!1},n}(N),In=(window.DOM_UI_RENDER_MODULE_ID=(window.DOM_UI_RENDER_MODULE_ID||1e3)+1)+Math.floor(1e6*Math.random())+"_RendererBase";function Pn(t){var e=this.lastChild;e&&t.target&&t.target!==e&&(e.compareDocumentPosition(t.target)&Node.DOCUMENT_POSITION_CONTAINED_BY||(t.preventDefault(),setTimeout((function(){var t=document.createElement("div");t.tabIndex=-1,e.insertBefore(t,e.firstChild),t.focus(),e.removeChild(t)}),0)))}var Mn=["click","dblclick","contextmenu","mouseup","mousedown","keydown","keypress","keyup","focusin","focusout","touchstart","touchend"];function Tn(t){for(var e=t.target;e&&e!==this;){var n=e[In];if(n&&n.DOM_EMIT)return n.DOM_EMIT.call(n,t);e=e.parentNode}}var Dn=["change","input","copy","cut","paste"];function Fn(t){var e=t.target,n=e[In]||e.parentNode&&e.parentNode[In];if(n&&n.DOM_CONTROL_EMIT)return n.DOM_CONTROL_EMIT.call(n,t)}var Ln=["mouseenter","mouseleave","submit"];function jn(t){for(var e=t.target;e&&e!==this;){var n=e[In];if(n&&n.DOM_CELL_EMIT)return n.DOM_CELL_EMIT.call(n,t);e=e.parentNode}}var Bn,Nn=function(t){function n(e){var r=t.call(this)||this;return r.viewportContext=new Rn,r._updateViewportContext=function(){return r.viewportContext.update()},e||(e=n.createFixedRootElement(),r._isFixedRoot=!0),r.root=e,r.addEventListeners(),r.viewportContext.update(),r}return e(n,t),n.scheduleRender=function(t,e){if(e&&!An&&(An=[]),!kn){kn=[];var n=function(){for(var t=Date.now();kn&&kn.length||An;){for(;kn&&kn.length;)if(kn.shift()(),Date.now()-t>30)return void setTimeout(r,10);if(An){var e=An.shift();An.length||(An=void 0),kn=[e]}}kn=void 0},r=function(){if("function"==typeof window.requestAnimationFrame){var t=0,e=function(){t||n(t=1)};window.requestAnimationFrame(e),setTimeout(e,200)}else setTimeout(n,10)};r()}return new Promise((function(n,r){(e?An:kn).push((function(){try{n(t())}catch(t){r(t)}}))}))},n.createFixedRootElement=function(){var t=document.createElement("app");return t.className="App__FixedRoot",t.style.opacity="0",setTimeout((function(){t.style.background=jt.replaceColor("@appBackground"),t.style.color=jt.replaceColor("@text"),t.style.opacity="1"}),0),document.body.appendChild(t),t},n.prototype.addEventListeners=function(){var t,e,n,r,i,o;window.addEventListener("resize",this._updateViewportContext),this._updateViewportTimer=setInterval(this._updateViewportContext,500),this.root.removeEventListener("focusin",Pn,!0),this.root.addEventListener("focusin",Pn,!0);try{for(var a=s(Mn),c=a.next();!c.done;c=a.next()){var l=c.value;this.root.removeEventListener(l,Tn),this.root.addEventListener(l,Tn)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}try{for(var u=s(Dn),h=u.next();!h.done;h=u.next()){var d=h.value;this.root.removeEventListener(d,Fn),this.root.addEventListener(d,Fn)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}try{for(var p=s(Ln),f=p.next();!f.done;f=p.next()){var v=f.value;this.root.removeEventListener(v,jn,!0),this.root.addEventListener(v,jn,!0)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}},n.prototype.clear=function(){this.root.innerHTML=""},n.prototype.onManagedStateDestroyingAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,t.prototype.onManagedStateDestroyingAsync.call(this)];case 1:return e.sent(),window.removeEventListener("resize",this._updateViewportContext),clearInterval(this._updateViewportTimer),this.clear(),this._isFixedRoot&&this.root.parentNode&&document.body.removeChild(this.root),[2]}}))}))},n.prototype.getRenderCallback=function(){var t=this,e=function(n,r){return n?n.placement===$t.PAGE?t._placePage(n,r):t._placeModal(n,r):e};return e},n.prototype._placePage=function(t,e){var r=this,i=function(t){if(r.managedState){if(t.detach&&t.detach(),r._page){var e=r._page.element.nextSibling;r.root.insertBefore(t.element,e),r._page.element!==t.element&&r._rm(r._page.element)}else r.root.insertBefore(t.element,r.root.firstChild);r._page=t;for(var n=t.source.getParentComponent(Qe);n&&!n.name;)n=n.getParentActivity();n&&n.name&&(document.title=n.name)}},o=t;n.scheduleRender((function(){return r._page!==t&&i(t),t})).then(e).catch(X);var a=function(t,e){return t&&t.placement!==$t.PAGE?(o&&r._rm(o.element),r._placeModal(t,e)):(n.scheduleRender((function(){if(r.managedState)return r._page===o&&(t?(i(t),o=t):(o&&r._rm(o.element),o=r._page=void 0)),t})).then(e).catch(X),t?a:r.getRenderCallback())};return a},n.prototype._placeModal=function(t,e){var r=this,i=document.createElement("div");i.className="App__ModalShader",i.tabIndex=0,Kn.transitionsDisabled&&(i.style.transition="none"),i.addEventListener("click",(function(e){e.target!==i&&e.target!==o||(e.stopPropagation(),t.source instanceof Wt&&n.$touchData.last<Date.now()-1e3&&t.source.emitAction("CloseModal"))}),!0),i.addEventListener("touchend",(function(e){e.target!==i&&e.target!==o||(e.stopPropagation(),t.source instanceof Wt&&(n.$touchData.last=Date.now(),t.source.emitAction("CloseModal")))}),!0),i.addEventListener("keydown",(function(e){27===e.keyCode?(e.stopPropagation(),t.source instanceof Wt&&(t.source.emit(Nt,"EscapeKeyPress",t.source,void 0,e),t.source.emitAction("CloseModal"))):t.source instanceof Wt&&(37===e.keyCode?t.source.emit(Nt,"ArrowLeftKeyPress",t.source,void 0,e):38===e.keyCode?t.source.emit(Nt,"ArrowUpKeyPress",t.source,void 0,e):39===e.keyCode?t.source.emit(Nt,"ArrowRightKeyPress",t.source,void 0,e):40===e.keyCode&&t.source.emit(Nt,"ArrowDownKeyPress",t.source,void 0,e))}),!0);var o=document.createElement("div");o.className="App__ModalWrapper",o.setAttribute("aria-modal","true"),i.appendChild(o);var a=document.activeElement;n.scheduleRender((function(){if(r.managedState)return r._addModalContent(o,t),r.root.appendChild(i),setTimeout(e,0),setTimeout(e,10),setTimeout(e,100),setTimeout((function(){i.dataset.transitionT="revealed"}),0),t;function e(){document.activeElement?i.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_CONTAINED_BY||i.focus():i.focus()}})).then(e).catch(X);var s=function(t,e){return t&&t.placement===$t.PAGE?(r._rm(i),r._placePage(t,e)):(n.scheduleRender((function(){if(r.managedState){if(t)r._addModalContent(o,t);else if(i.style.background="",zn(i,o.firstChild),a)try{a.focus()}catch(t){}return t}})).then(e).catch(X),t?s:r.getRenderCallback())};return s},n.prototype._addModalContent=function(t,e){for(var n=t.firstChild;n;)n.dataset&&n.dataset.uiRemoved||t.removeChild(n),n=n.nextSibling;setTimeout((function(){var n=100*(e.modalShadeOpacity||0)+"%",r=jt.replaceColor("@modalShade/"+n),i=t.parentNode;i&&(i.style.backgroundColor=r)}),0),e.detach&&e.detach(),t.appendChild(e.element),t.style.cssText="";var r=e.placementRef&&e.placementRef.lastRenderOutput,i=r&&r.element,o=i&&i.getBoundingClientRect&&i.getBoundingClientRect();switch(e.placement){case $t.DROPDOWN:case $t.DROPDOWN_COVER:if(t.style.position="absolute",!o)break;t.style.top=e.placement===$t.DROPDOWN?o.bottom+"px":o.top+"px",t.style.left=o.left+"px",t.style.width=o.width+"px",t.style.flexDirection="column",t.style.opacity="0",setTimeout((function(){Un(t,o.top)}),0);break;case $t.POPOVER:if(t.style.position="absolute",!o)break;var a=(o.left+o.right)/2;t.style.top=o.bottom+8+"px",t.style.left=a-70+"px",t.style.width="140px",t.style.flexDirection="column",t.style.opacity="0",setTimeout((function(){Un(t)}),0);break;case $t.POPOVER_ABOVE:if(t.style.position="relative",!o)break;var s=(o.left+o.right)/2;t.style.top=o.top-8+"px",t.style.height="0px",t.style.left=s-70+"px",t.style.width="140px",t.style.flexDirection="column",t.style.justifyContent="flex-end",t.style.flexGrow="0",t.style.opacity="0",setTimeout((function(){Un(t)}),0);break;case $t.POPOVER_LEFT:if(t.style.position="absolute",!o)break;var c=(o.top+o.bottom)/2;t.style.top=c-16+"px",t.style.height="32px",t.style.left=o.left-8+"px",t.style.width="0px",t.style.flexDirection="row",t.style.alignItems="center",t.style.justifyContent="flex-end",t.style.opacity="0",setTimeout((function(){Vn(t)}),0);break;case $t.POPOVER_RIGHT:if(t.style.position="absolute",!o)break;var l=(o.top+o.bottom)/2;t.style.top=l-16+"px",t.style.height="32px",t.style.left=o.right+8+"px",t.style.width="0px",t.style.flexDirection="row",t.style.alignItems="center",t.style.justifyContent="flex-start",t.style.opacity="0",setTimeout((function(){Vn(t)}),0);break;case $t.DRAWER:t.style.flexDirection="column",t.style.alignItems="start",t.style.justifyContent="space-around";break;case $t.DIALOG:default:t.style.flexDirection="row",t.style.alignItems="center",t.style.justifyContent="space-around"}},n.prototype._rm=function(t){t&&t.parentNode===this.root&&this.root.removeChild(t)},n.$touchData={last:0},i([K],n.prototype,"viewportContext",void 0),n}(te);function Un(t,e){void 0===e&&(e=-1);var n=t.firstChild;if(n&&n.dataset&&"revealing"===n.dataset.transitionT){t.style.opacity="";var r=function(){n.removeEventListener("animationend",r),n.removeEventListener("animationcancel",r),n.removeEventListener("transitionend",r),n.removeEventListener("transitioncancel",r),Un(t,e)};return n.addEventListener("animationend",r),n.addEventListener("animationcancel",r),n.addEventListener("transitionend",r),n.addEventListener("transitioncancel",r),void setTimeout((function(){Nn.scheduleRender(r)}),1e3)}var i=(n||t).getBoundingClientRect();i.left<0?(t.style.left="0px",t.style.width=i.width>window.innerWidth?i.width+"px":"auto"):i.right>window.innerWidth&&(t.style.left=Math.max(0,window.innerWidth-i.width)+"px",t.style.width=i.width+"px"),i.top<0?(t.style.top="0px",t.style.bottom="",t.style.justifyContent="flex-start"):i.bottom>window.innerHeight&&(e>0&&i.height<e?(t.style.top=e+"px",t.style.height="0px",t.style.justifyContent="flex-end"):i.height<window.innerHeight?(t.style.bottom="0px",t.style.top="",t.style.justifyContent="flex-end"):(t.style.top="0px",t.style.bottom="",t.style.justifyContent="flex-start")),t.style.opacity=""}function Vn(t){var e=t.firstChild;if(e&&e.dataset&&"revealing"===e.dataset.transitionT){t.style.opacity="";var n=function(){e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),e.removeEventListener("transitionend",n),e.removeEventListener("transitioncancel",n),Vn(t)};return e.addEventListener("animationend",n),e.addEventListener("animationcancel",n),e.addEventListener("transitionend",n),e.addEventListener("transitioncancel",n),void setTimeout((function(){Nn.scheduleRender(n)}),1e3)}var r=(e||t).getBoundingClientRect();r.left<0?(t.style.left="0px",t.style.width=r.width>window.innerWidth?r.width+"px":"auto",t.style.justifyContent="flex-start"):r.right>window.innerWidth&&(t.style.left=Math.max(0,window.innerWidth-r.width)+"px",t.style.width=r.width+"px",t.style.justifyContent="flex-end"),r.top<0?(t.style.top="0px",t.style.bottom="",t.style.height=r.height+"px"):r.bottom>window.innerHeight&&(t.style.top=Math.max(0,window.innerHeight-r.height)+"px",t.style.bottom="",t.style.height=r.height+"px"),t.style.opacity=""}function zn(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=t.parentNode;if(r){t.dataset.uiRemoved="removed";var i,o=0;s(t),e.forEach(s),o?i=setTimeout((function(){o=0,a()}),2e3):Promise.resolve().then((function(){return a()}))}function a(){this&&this.removeEventListener("animationend",a),this&&this.removeEventListener("animationcancel",a),this&&this.removeEventListener("transitionend",a),this&&this.removeEventListener("transitioncancel",a),this!==t&&--o>0||(t.parentNode===r&&r.removeChild(t),i&&clearTimeout(i))}function s(t){t&&t.dataset.transitionExit&&(t.addEventListener("animationend",a),t.addEventListener("animationcancel",a),t.addEventListener("transitionend",a),t.addEventListener("transitioncancel",a),t.dataset.transitionT="exiting",o++)}}!function(t){t.enableViewReload=function(t,e){return e}}(Bn||(Bn={}));var Wn=!1;nn.setAutoUpdateHandler((function(t,e,n){var r;if(t.hot){t.hot.accept();var i=null===(r=t.hot.data)||void 0===r?void 0:r.autoUpdate;setTimeout((function(){i&&e[n]&&e[n](i,e)}),0),e[n]&&t.hot.dispose((function(n){(n||t.hot.data).autoUpdate=e}))}}));var Kn=function(t){function n(e){var n=t.call(this)||this;return n._root=e,n}return e(n,t),n.setGlobalDpSize=function(t){void 0===t&&(t=1),function(t){mn({html:{fontSize:(dn=16*t)+"px"}})}(t)},n.importStylesheet=function(t){!function(t){yn.push(t),mn({})}(t)},n.disableTransitions=function(){Wn=!0},Object.defineProperty(n,"transitionsDisabled",{get:function(){return Wn},enumerable:!1,configurable:!0}),n.prototype.onManagedStateActivatingAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,t.prototype.onManagedStateActivatingAsync.call(this)];case 1:return e.sent(),this.renderContext||(this._root||(document.body.innerHTML=""),this.renderContext=new Nn(this._root)),this.activationContext||(this.activationContext=this._useHistoryAPI?new qn:new $n),[2]}}))}))},n.prototype.onManagedStateInactiveAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,t.prototype.onManagedStateInactiveAsync.call(this)];case 1:return e.sent(),this.renderContext=void 0,this.activationContext=void 0,[2]}}))}))},n.prototype.mount=function(t){return this._root=t,this.renderContext&&(this.renderContext=new Nn(t)),this},n.prototype.unmount=function(){return this._root=void 0,this.renderContext=void 0,this},n.prototype.useHistoryAPI=function(){return this._useHistoryAPI=!0,this.activationContext&&(this.activationContext=new qn),this},n}(nn);Kn.addObserver(function(){function t(){}return t.prototype.onRenderContextChange=function(){vn={}},t}());var Hn,$n=function(t){function n(){var e=t.call(this)||this;return e._handler=function(){e._setPath()},window.addEventListener("hashchange",e._handler),e._setPath(),e}return e(n,t),n.prototype.getPathHref=function(t){var e="";if(!t||":"===t[0])return"";if("#"===t[0]&&(t=t.slice(1)),"/"===t[0])e=t;else{var n=this.target;"/"!==n.slice(-1)&&(n+="/"),e="/"+n+t}e=e.replace(/\/+/g,"/");for(var r=0;/\/\.\.?\//.test(e)&&!(r++>100);)e=e.replace(/\/\.\//g,"/").replace(/\/[^\/]+\/\.\.\//g,"/").replace(/^\/?\.\.\//,"/");return"#/"+e.replace(/^\/+/,"")},n.prototype.navigate=function(t){":back"!==(t=String(t))?window.location.hash=this.getPathHref(t):window.history.back()},n.prototype.onManagedStateDestroyingAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return window.removeEventListener("hashchange",this._handler),[2]}))}))},n.prototype._setPath=function(){var t=String(window.location.hash||"").replace(/^\#\/?/,"");this.target=t},n}(tn),qn=function(t){function n(){var e=t.call(this)||this;return e._handler=function(){e._setPath()},window.addEventListener("popstate",e._handler),e._setPath(),e}return e(n,t),n.prototype.getPathHref=function(t){var e="";if(!t||":"===t[0])return"";if("#"===t[0]&&(t=t.slice(1)),"/"===t[0])e=t;else{var n=this.target;"/"!==n.slice(-1)&&(n+="/"),e="/"+n+t}e=e.replace(/\/+/g,"/");for(var r=0;/\/\.\.?\//.test(e)&&!(r++>100);)e=e.replace(/\/\.\//g,"/").replace(/\/[^\/]+\/\.\.\//g,"/").replace(/^\/?\.\.\//,"/");return"/"+e.replace(/^\/+/,"")},n.prototype.navigate=function(t){":back"!==(t=String(t))?(window.history.pushState({},document.title,this.getPathHref(t)),this._setPath()):window.history.back()},n.prototype.onManagedStateDestroyingAsync=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return window.removeEventListener("popstate",this._handler),[2]}))}))},n.prototype._setPath=function(){var t=String(window.location.pathname||"").replace(/^\/?/,"");this.target=t},n}(tn),Gn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.beforeRender=function(){var t,e,n=[];try{for(var r=s(this.messages),i=r.next();!i.done;i=r.next()){var o=i.value;n.push(new Se(o))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this.messageLabels=n},n}(an.with({defaults:function(){return{messages:[],title:void 0,confirmButtonLabel:at("Dismiss"),cancelButtonLabel:void 0}},view:qt.with({background:"@background",borderRadius:4,position:{gravity:"center"},dimensions:{maxWidth:400,width:"95vw"},dropShadow:.65,revealTransition:"up-fast"},Gt.with({background:"@primary",dimensions:{height:40},hidden:dt("title|!"),onMouseDown:"+DragContainer"},se.with(Ae.withWidth(16),Oe.withText(dt("title"),{color:"@primary:text"}),pe.with({position:{gravity:"center"},icon:"close",onClick:"+CloseModal",iconSize:18,iconColor:"@primary:text",disableKeyboardFocus:!0}))),qt.with({padding:16},Jt.with({content:dt("messageLabels",[])}),Ae.withHeight(24),oe.with({padding:0},ve.with({hidden:dt("cancelButtonLabel|!"),label:dt("cancelButtonLabel"),onClick:"+CloseModal"}),de.with({label:dt("confirmButtonLabel"),onClick:"+Confirm",requestFocus:!0}))))})),Yn=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._presets={messages:[]},e}return e(n,t),n.prototype.build=function(){return Gn.with(this._presets)},n.prototype.setTitle=function(t){return this._presets.title=t,this},n.prototype.setConfirmButtonLabel=function(t){return this._presets.confirmButtonLabel=t,this},n.prototype.setCancelButtonLabel=function(t){return this._presets.cancelButtonLabel=t,this},n.prototype.addMessage=function(t){return this._presets.messages.push(t),this},n}(Dt),Xn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.emitMenuItemSelectedEvent=function(t){this.emit($e,"SelectMenuItem",this,t)},n}(qt.with({background:"@background",dimensions:{minWidth:50,maxWidth:280},borderRadius:4,dropShadow:.8,onArrowDownKeyPress:function(t){var e,n;if(t.source instanceof Xn)try{for(var r=s(this.content),i=r.next();!i.done;i=r.next()){var o=i.value;if(o instanceof qt)return void o.requestFocus()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}})),Jn=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._items=[],e._gravity="end",e}return e(n,t),n.prototype.clear=function(){return this._items.length=0,this},n.prototype.addOption=function(t,e,r,i,o,a,s){function c(){var e=this.getParentComponent(Xn);e&&e.emitMenuItemSelectedEvent(t),this.emitAction("CloseModal")}return void 0===a&&(a=n.labelStyleMixin),void 0===s&&(s=n.hintStyleMixin),this._items.push(qt.with({layout:{axis:"horizontal"},css:{cursor:"pointer"},allowKeyboardFocus:!0,onMouseEnter:function(){this.background="@primary",this.textColor="@primary:text"},onMouseLeave:function(){this.background="",this.textColor=""},onClick:c,onEnterKeyPress:c,onArrowDownKeyPress:function(){this.requestFocusNext()},onArrowUpKeyPress:function(){this.requestFocusPrevious()}},Ae.with({dimensions:{width:16,shrink:0},shrinkwrap:!0}),Oe.with({text:e,icon:r,iconMargin:8,textStyle:a}),i?Ae.withWidth(8):void 0,i?we.with({text:i,icon:o,textStyle:s}):void 0,Ae.withWidth(16))),this},n.prototype.addSelectionGroup=function(t,e,n){var r,i;try{for(var o=s(t),a=o.next();!a.done;a=o.next()){var c=a.value;this.addOption(c.key,c.text,c.key===e?"check":"blank",void 0,void 0,n)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return this},n.prototype.addSeparator=function(){return this._items.push(ke.with({margin:8})),this},n.prototype.setGravity=function(t){return this._gravity=t,this},n.prototype.setRevealTransition=function(t){return this._revealTransition=t,this},n.prototype.setExitTransition=function(t){return this._exitTransition=t,this},n.prototype.build=function(){return Xn.with({position:{gravity:this._gravity},revealTransition:this._revealTransition,exitTransition:this._exitTransition,content:l(l([new Ae(8,8)],c(this._items.map((function(t){return new t})))),[new Ae(8,8)])})},n.labelStyleMixin={},n.hintStyleMixin={color:"@text/50%",fontSize:12},n}(Ft),Zn=function(t){function n(){var e=t.call(this)||this;return e.ConfirmationDialogBuilder=Yn,e.MenuBuilder=Jn,e.colors={black:"#000000",darkerGray:"#333333",darkGray:"#777777",lightGray:"#dddddd",white:"#ffffff",slate:"#667788",lightSlate:"#c0c8d0",red:"#ee3333",orange:"#ee9922",yellow:"#ddcc33",lime:"#99bb33",green:"#44aa44",turquoise:"#33aaaa",cyan:"#33bbbb",blue:"#3355aa",violet:"#5533aa",purple:"#8833aa",magenta:"#dd4488",primary:"@blue",accent:"@purple",background:"@white",appBackground:"@background",text:"@background:text",controlBase:"@background",separator:"@background^-50%/20%",modalShade:"@black"},e.icons={blank:'<svg viewBox="0 0 48 48"></svg>',close:'<svg viewBox="0 0 48 48"><path d="M38 12.83L35.17 10 24 21.17 12.83 10 10 12.83 21.17 24 10 35.17 12.83 38 24 26.83 35.17 38 38 35.17 26.83 24z"/></svg>',expandDown:'<svg viewBox="0 0 48 48"><path d="M33.17 17.17L24 26.34l-9.17-9.17L12 20l12 12 12-12z"/></svg>',menu:'<svg viewBox="0 0 48 48"><path d="M6 36h36v-4H6v4zm0-10h36v-4H6v4zm0-14v4h36v-4H6z"/></svg>',check:'<svg viewBox="0 0 48 48"><path d="M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z"/></svg>'},e.setStyle("container",{decoration:{css:{display:"flex",textAlign:"start||left"}}}),e.setStyle("control",{textStyle:{fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, "Helvetica Neue", Arial, sans-serif',fontSize:14,fontWeight:"normal",lineHeight:"normal",italic:!1,lineBreakMode:"pre"}}),e.setStyle("spacer",{dimensions:{grow:1,width:8,height:8},position:{gravity:"stretch"}}),e.setStyle("separator",{dimensions:{grow:0,shrink:0},position:{gravity:"stretch"}}),e.setStyle("label",{dimensions:{maxWidth:"100%"},decoration:{css:{margin:"calc(1rem - .5em) 0"}},textStyle:{lineBreakMode:"ellipsis"}}),e.setStyle("label_close",{decoration:{css:{margin:"0"}}}),e.setStyle("heading1",{textStyle:{fontSize:60,fontWeight:200,letterSpacing:-.5}}),e.setStyle("heading2",{textStyle:{fontSize:24}}),e.setStyle("heading3",{textStyle:{fontSize:18,bold:!0}}),e.setStyle("paragraph",{textStyle:{lineBreakMode:"pre-wrap",lineHeight:1.4},decoration:{css:{cursor:"text"}}}),e.setStyle("button",{dimensions:{minWidth:96},textStyle:{align:"center",lineBreakMode:"ellipsis"},decoration:{borderThickness:0,background:"@controlBase",textColor:"@primary",borderRadius:4,padding:{y:8,x:12},css:{cursor:"pointer",transition:"all .2s ease"}}}).addState("pressed",{decoration:{background:"@primary",textColor:"@primary:text"}}).addState("hover",{decoration:{background:"@primary",textColor:"@primary:text"}}).addState("disabled",{decoration:{borderThickness:0,background:"@controlBase",textColor:"@primary",css:{opacity:".5",cursor:"inherit"}}}),e.setStyle("button_primary",{decoration:{background:"@primary",textColor:"@primary:text",borderThickness:1,borderColor:"@primary"}}).addState("hover",{decoration:{background:"@primary^+30%",borderThickness:1,borderColor:"@primary^+30%"}}),e.setStyle("button_borderless",{dimensions:{minWidth:16,minHeight:16},decoration:{background:"transparent",borderThickness:1,borderColor:"transparent",padding:{y:6,x:12}}}).addState("hover",{decoration:{background:"@controlBase^-50%/30%",textColor:"@primary"}}),e.setStyle("button_outline",{decoration:{borderThickness:1,borderColor:"@primary"}}),e.setStyle("button_link",{dimensions:{minWidth:16,minHeight:16},textStyle:{align:"start||left"},decoration:{background:"transparent"}}).addState("hover",{textStyle:{underline:!0},decoration:{background:"transparent",textColor:"@primary"}}).addState("disabled",{decoration:{background:"transparent",textColor:"@primary"}}),e.setStyle("button_large",{dimensions:{minWidth:128},textStyle:{fontWeight:200,fontSize:16},decoration:{background:"@primary",textColor:"@primary:text",borderRadius:32,padding:{y:12,x:16}}}),e.setStyle("button_small",{dimensions:{minWidth:64},textStyle:{fontSize:12},decoration:{borderThickness:1,borderColor:"@controlBase^-20%",padding:{y:4,x:8}}}),e.setStyle("button_icon",{dimensions:{minWidth:32,minHeight:32},position:{gravity:"center"},decoration:{background:"transparent",borderRadius:"50%",padding:0}}).addState("hover",{decoration:{background:"@decoration^-50%/30%",textColor:"@primary"}}),e.setStyle("textfield",{decoration:{background:"@white",textColor:"@white:text",borderColor:"@controlBase^-20%",borderThickness:1,borderRadius:4,padding:8,css:{cursor:"text"}},textStyle:{lineBreakMode:"pre-wrap"}}),e.setStyle("textfield_borderless",{decoration:{background:"transparent",borderThickness:0,borderRadius:0,padding:0}}).addState("focused",{decoration:{css:{boxShadow:"none"}}}),e.setStyle("toggle",{decoration:{textColor:"@text",cssClassNames:["UI__CustomToggle"]}}),e.setStyle("image",{position:{gravity:"center"}}),e}return e(n,t),n.prototype.setFocusOutline=function(t,e,n){void 0===t&&(t=2),void 0===e&&(e=0),void 0===n&&(n="@primary/50%");var r="0 0 "+bn(e)+" "+bn(t)+" "+jt.replaceColor(n);return mn({".UI[tabindex]:focus":{boxShadow:r},".UI.ShowFocusWithin[tabindex]:focus-within":{boxShadow:r},".UI>[tabindex]:focus+label>control":{boxShadow:r}}),this},n}(jt);function Qn(t,e,n,r){var i,o="";e&&(o="opacity "+e),n&&(o+=(o?", ":"")+"transform "+n),mn(((i={})["[data-transition-reveal="+t+"][data-transition-t=revealing]"]={opacity:r[0][0],transform:r[0][1]},i["[data-transition-reveal="+t+"][data-transition-t=revealed]"]={opacity:r[1][0],transform:r[1][1],transition:o},i["[data-transition-exit="+t+"][data-transition-t=exiting]"]={opacity:(r[2]||r[0])[0],transform:(r[2]||r[0])[1],transition:o},i))}!function(){mn({".UI":{margin:"0",padding:"0",border:"0 solid transparent",outline:"0",cursor:"inherit",boxSizing:"border-box",textOverflow:"ellipsis",textDecoration:"none"},".UI[hidden]":{display:"none !important"},".App__FixedRoot":{position:"fixed",top:"0",bottom:"0",left:"0",right:"0",display:"flex",flexDirection:"column",cursor:"default",overflow:"hidden"},".App__ModalShader":{zIndex:"1000",position:"fixed",top:"0",left:"0",bottom:"0",right:"0",outline:"0",overflow:"auto",display:"flex",flexDirection:"column",justifyContent:"stretch",alignContent:"stretch",transition:"background-color .2s ease-in-out",background:"transparent"},".App__ModalWrapper":{flex:"1 0 auto",display:"flex"},".App__ModalWrapper>.UI":{zIndex:"10000",overflow:"hidden"},".UIRender__Separator--line":{flex:"0 0 auto",margin:"0",padding:"0",border:"0",borderTopStyle:"solid",borderWidth:"1px",alignSelf:"stretch"},".UIRender__Separator--line-vertical":{borderTopStyle:"none",borderLeftStyle:"solid",borderWidth:"1px"},".UIRender__Separator--spacer":{flex:"0 0 auto",width:"1px",height:"1px",alignSelf:"center"},".UI__CustomToggle":{lineHeight:"1.5rem",position:"relative",padding:".25rem 0"},".UI__CustomToggle>input":{position:"absolute",top:".25rem",left:"0",width:"1rem",height:"1rem",margin:"0",padding:"0",border:"0",opacity:"0"},".UI__CustomToggle>input+label":{display:"inline-block",paddingLeft:"1rem"},".UI__CustomToggle>input[disabled]+label":{opacity:".5"},".UI__CustomToggle>input:not([disabled])+label":{cursor:"pointer"},".UI__CustomToggle>input+label>control":{content:"''",position:"absolute",top:".25rem",left:"0",width:".875rem",height:".875rem",background:"#fff",border:"1px solid #aaa",borderRadius:".25rem"},".UI__CustomToggle>input:checked+label>control":{borderColor:"#666",background:"#666"},".UI__CustomToggle>input:checked+label>control::after":{content:"''",boxSizing:"border-box",display:"block",position:"absolute",top:"0",left:".25rem",height:".75rem",width:".375rem",transform:"rotate(45deg)",borderBottom:".125rem solid #fff",borderRight:".125rem solid #fff"},"a.UI":{display:"flex",flexDirection:"column",justifyContent:"center"}});var t=[1],e=[0,"translateY(-50%)"],n=[0,"translateY(50%)"],r=[0,"translateX(-50%)"],i=[0,"translateX(50%)"];Qn("fade",".5s ease-in-out","",[[0],t]),Qn("fade-fast",".2s ease-in-out","",[[0],t]),Qn("down",".5s ease-in-out",".5s ease",[e,t,n]),Qn("down-fast",".2s ease-in-out",".15s ease",[e,t,n]),Qn("up",".5s ease-in-out",".5s ease",[n,t,e]),Qn("up-fast",".2s ease-in-out",".15s ease",[n,t,e]),Qn("left",".5s ease-in-out",".5s ease",[i,t,r]),Qn("left-fast",".2s ease-in-out",".15s ease",[i,t,r]),Qn("right",".5s ease-in-out",".5s ease",[r,t,i]),Qn("right-fast",".2s ease-in-out",".15s ease",[r,t,i])}(),Hn=new Zn,jt.current=Hn,Hn.setFocusOutline();var tr=new d("Rendered").freeze();var er,nr,rr={click:"Click",dblclick:"DoubleClick",contextmenu:"ContextMenu",mouseup:"MouseUp",mousedown:"MouseDown",mouseenter:"MouseEnter",mouseleave:"MouseLeave",touchstart:"TouchStart",touchend:"TouchEnd",keydown:"KeyDown",keyup:"KeyUp",keypress:"KeyPress",focusin:"FocusIn",focusout:"FocusOut",change:"Change",input:"Input",copy:"Copy",cut:"Cut",paste:"Paste",submit:"Submit"},ir={Enter:"EnterKey",Spacebar:"Spacebar"," ":"Spacebar",Backspace:"BackspaceKey",Delete:"DeleteKey",Del:"DeleteKey",Escape:"EscapeKey",Esc:"EscapeKey",ArrowLeft:"ArrowLeftKey",Left:"ArrowLeftKey",ArrowUp:"ArrowUpKey",Up:"ArrowUpKey",ArrowRight:"ArrowRightKey",Right:"ArrowRightKey",ArrowDown:"ArrowDownKey",Down:"ArrowDownKey"},or={ArrowLeftKey:!0,ArrowRightKey:!0,ArrowUpKey:!0,ArrowDownKey:!0},ar=function(){function t(t){this.DOM_EMIT=this.emitComponentEvent,this.component=t}return t.prototype.afterRender=function(t){this.component.managedState&&this.component.emit(tr);var e=this._renderedElement;e&&"revealing"===e.dataset.transitionT&&setTimeout((function(){"revealing"===e.dataset.transitionT&&(e.dataset.transitionT="revealed")}),0)},t.prototype.emitComponentEvent=function(t,e){var n=this;if("click"!==t.type&&"mousedown"!==t.type&&"mouseup"!==t.type||!(Nn.$touchData.last>Date.now()-1e3)){"submit"===t.type&&t.preventDefault();var r=e||function(t){return rr[t.type]}(t);if(this._emitUIEvent(r,t),"TouchStart"===r&&(Nn.$touchData.last=Date.now(),er=this,nr||window.addEventListener("touchmove",nr=function(){window.removeEventListener("touchmove",nr),nr=void 0,er=void 0}),this._emitUIEvent("MouseDown",t)),"TouchEnd"===r&&(Nn.$touchData.last=Date.now(),er===this&&(this._emitUIEvent("MouseUp",t),this._emitUIEvent("Click",t))),"KeyDown"===r){var i=t.key,o=i?ir[i]:"",a=!1;if("EnterKey"===o){var s=t.target,c=String(s.nodeName).toLowerCase();a="button"===c||"textarea"===c}!or[o]||"list"!==this.component.accessibleRole&&"listitem"!==this.component.accessibleRole||t.preventDefault(),!a&&o&&setTimeout((function(){n._emitUIEvent(o+"Press",t)}),0)}t.stopPropagation()}},t.prototype._emitUIEvent=function(t,e){this.component&&this.component.managedState&&this.component.emit(Nt,t,this.component,void 0,e)},t.prototype.handleRenderEvent=function(t){if(t.source===this.component){var e=!this._renderedElement,n=this._renderedElement||(this._renderedElement=this.createElement());n[In]=this;var r=this.component;r.accessibleRole&&n.setAttribute("role",r.accessibleRole),r.accessibleLabel&&n.setAttribute("aria-label",r.accessibleLabel),!Kn.transitionsDisabled&&r instanceof qt&&(e&&r.revealTransition&&(n.dataset.transitionReveal=r.revealTransition,n.dataset.transitionT="revealing"),r.exitTransition&&(n.dataset.transitionExit=r.exitTransition,n.dataset.transitionT="revealing"));var i=r.lastRenderOutput&&r.lastRenderOutput.element===n?r.lastRenderOutput:r.lastRenderOutput=new te.Output(r,n);this._lastRenderCallback=t.renderCallback(i,this.afterRender.bind(this))}},t.prototype.handleFocusRequestEvent=function(t){if(t.source===this.component&&this.component.lastRenderOutput){var e=this.component.lastRenderOutput.element;if(t.direction===_t.SELF)return void e.focus();var n=this.component.getParentComponent(Wt),r=n&&n instanceof Wt&&n.lastRenderOutput&&n.lastRenderOutput.element;if(!r)return;var i=r.querySelectorAll("[tabIndex]");if(t.direction===_t.REVERSE)for(var o=i.length-1;o>=0;o--){if((s=e.compareDocumentPosition(i[o]))&Node.DOCUMENT_POSITION_PRECEDING){for(var a=0;a<o&&!((s=i[a].compareDocumentPosition(i[o]))&Node.DOCUMENT_POSITION_CONTAINED_BY);)a++;return void i[a].focus()}}else for(o=0;o<i.length;o++){var s;if((s=e.compareDocumentPosition(i[o]))&Node.DOCUMENT_POSITION_FOLLOWING&&!(s&Node.DOCUMENT_POSITION_CONTAINED_BY))return void i[o].focus()}}},t.prototype.updateElement=function(t){if(this._renderedElement=t,this._lastRenderCallback){var e=new te.Output(this.component,t);this.component.lastRenderOutput=e,this._lastRenderCallback=this._lastRenderCallback.call(void 0,e,this.afterRender.bind(this))}},t.prototype.scheduleStyleUpdate=function(t){var e=this;this._addClass=t,this._renderedElement&&!this._sched&&(this._sched=!0,Promise.resolve().then((function(){e._sched=!1,e._renderedElement&&gn(e.component,e._renderedElement,!1,e._addClass)})))},t.prototype.getElement=function(){return this._renderedElement},t.prototype.isRendered=function(){return!!this._lastRenderCallback&&!!this._renderedElement},t}(),sr=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,n.DOM_CONTROL_EMIT=n.DOM_EMIT,n}return e(n,t),n.prototype.createElement=function(){var t=document.createElement(this.component.headingLevel?"h"+this.component.headingLevel:"span");return this.component.isKeyboardFocusable()?t.tabIndex=0:this.component.isFocusable()&&(t.tabIndex=-1),gn(this.component,t,!0),cr(t,{text:this.component.text,htmlFormat:this.component.htmlFormat,icon:this.component.icon,iconColor:this.component.iconColor||this.component.textStyle.color,iconSize:this.component.iconSize,iconMargin:this.component.iconMargin,iconAfter:this.component.iconAfter}),t},n.prototype.onUIRender=function(t){this.handleRenderEvent(t)},n.prototype.onUIFocusRequestAsync=function(t){this.handleFocusRequestEvent(t)},n.prototype.setText=function(){var t=this.getElement();t&&cr(t,{text:this.component.text,htmlFormat:this.component.htmlFormat,icon:this.component.icon,iconColor:this.component.iconColor||this.component.textStyle.color,iconSize:this.component.iconSize,iconMargin:this.component.iconMargin,iconAfter:this.component.iconAfter})},n.prototype.onHeadingLevelChange=function(){this.isRendered()&&this.updateElement(this.createElement())},n.prototype.updateStyle=function(){this.scheduleStyleUpdate()},i([I("text","htmlFormat","icon","iconColor","iconSize","iconMargin","iconAfter")],n.prototype,"setText",null),i([I("hidden","style","shrinkwrap","disabled","textStyle","decoration","dimensions","position")],n.prototype,"updateStyle",null),n}(ar);function cr(t,e){var n=null==e.text?"":String(e.text);if(e.icon){var r=document.createElement("span");r.style.display="flex",r.style.flexDirection="row",r.style.alignItems="center",r.style.justifyContent="space-around",r.style.textOverflow="inherit";try{var i=function(t){var e=bn(t.iconSize,"1rem"),n=t.iconColor?jt.replaceColor(t.iconColor):"",r=t.icon+":"+e+":"+n;if(ur[r])return ur[r].cloneNode(!0);var i,o=document.createElement("div");o.innerHTML=jt.current.icons[t.icon]||t.icon;var a=o.firstChild;a||(a=document.createTextNode(""));if("svg"===String(a.nodeName).toLowerCase())(i=a).hasAttribute("stroke")?i.style.stroke=n||"currentColor":i.style.fill=n||"currentColor",i.style.display="inline-block",i.style.width=e,i.style.height="auto";else{var s=document.createElement("icon");s.style.display="inline-block",s.appendChild(a),t.iconSize&&(s.style.fontSize=e),n&&(s.style.color=n),i=s}return i.style.flex="0 0 "+e,i.style.width=e,ur[r]=i.cloneNode(!0),i}(e);i.style.order=e.iconAfter?"2":"0",r.appendChild(i)}catch(t){lr[e.icon]||(lr[e.icon]=!0,X(t))}if(n){var o=bn(e.iconMargin,".5rem"),a=document.createElement("span");a.style.flex="0 0 "+o,a.style.width=o,a.style.order="1",r.appendChild(a);var s=document.createElement("span");s.style.flex="1 0 0",s.style.order=e.iconAfter?"0":"2",s.style.textOverflow="inherit",s.style.overflow="hidden",e.htmlFormat?s.innerHTML=n:s.textContent=n,r.appendChild(s),r.style.justifyContent="start"}t.innerHTML="",t.appendChild(r)}else e.htmlFormat?t.innerHTML=n:t.textContent=n}var lr={},ur={};we.addObserver(sr);var hr=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,n.DOM_CONTROL_EMIT=n.DOM_EMIT,n}return e(n,t),n.prototype.createElement=function(){var t=this,e=document.createElement("link"===this.component.accessibleRole?"a":"button");return e.tabIndex=this.component.isKeyboardFocusable()?0:-1,gn(this.component,e,!0),cr(e,{text:this.component.label,icon:this.component.icon,iconColor:this.component.iconColor,iconSize:this.component.iconSize,iconMargin:this.component.iconMargin,iconAfter:this.component.iconAfter}),this.component.navigateTo&&(e.href=dr(this.component,this.component.navigateTo)),this.component.disabled&&e.setAttribute("disabled","disabled"),e.addEventListener("click",(function(e){if(t.component.navigateTo)if(e.ctrlKey||e.altKey||e.metaKey)e.stopPropagation(),e.stopImmediatePropagation();else if(e.preventDefault(),!t.component.disabled){var n=t.component.getParentComponent(Kn);n&&n.navigate(t.component.navigateTo)}})),e},n.prototype.onUIRender=function(t){this.handleRenderEvent(t)},n.prototype.onUIFocusRequestAsync=function(t){this.handleFocusRequestEvent(t)},n.prototype.setText=function(){var t=this.getElement();t&&cr(t,{text:this.component.label,icon:this.component.icon,iconColor:this.component.iconColor,iconSize:this.component.iconSize,iconMargin:this.component.iconMargin,iconAfter:this.component.iconAfter})},n.prototype.onNavigateToChange=function(){var t=this.getElement();t&&(t.href=dr(this.component,this.component.navigateTo))},n.prototype.onDisabledChange=function(){var t=this.getElement();t&&(this.component.disabled?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled"))},n.prototype.onSelect=function(){var t=this.getElement();t&&(t.dataset.selected="selected")},n.prototype.onDeselect=function(){var t=this.getElement();t&&delete t.dataset.selected},n.prototype.updateStyle=function(){this.scheduleStyleUpdate()},i([I("label","icon","iconColor","iconSize","iconMargin","iconAfter")],n.prototype,"setText",null),i([I("hidden","style","shrinkwrap","textStyle","decoration","dimensions","position")],n.prototype,"updateStyle",null),n}(ar);function dr(t,e){var n=t.getParentComponent(Kn),r=n&&n.activationContext;return r&&r.getPathHref&&r.getPathHref(e)||""}he.addObserver(hr);var pr=function(){function t(t){this.component=t}return t.prototype.updateStyle=function(){var t,e=this;if(!this._sched){var n=null===(t=this.component.lastRenderOutput)||void 0===t?void 0:t.element;n&&(this._sched=!0,Promise.resolve().then((function(){e._sched=!1,gn(e.component,n)})))}},i([I("css","decoration","margin","background","textColor","borderThickness","borderColor","borderStyle","borderRadius","dropShadow","opacity")],t.prototype,"updateStyle",null),t}();qt.addObserver(pr);var fr=16,vr=function(){function t(t,e){this._content={},this.element=t,e&&(this.separator=r({},e))}return t.prototype.setAsyncCreate=function(t){this._asyncChildren=!!t},t.prototype.setAnimationTimeMs=function(t){this._animationTimeMs=t},t.prototype.setAnimationSpeed=function(t){this._animationSpeed=t,t>0?this._animationTimeMs||(this._animationTimeMs=5e3):this._animationTimeMs=0},t.prototype.stop=function(){this._stopped=!0},t.prototype.update=function(t){var e=this;if(this.element)if(this._updatePending)this._updatePending=t;else{this._updatePending=t;var n=Nn.scheduleRender((function(){var r,i;if(!e._stopped&&e._updatePending){t=e._updatePending,e._updatePending=void 0,e._rendered||(e._rendered=!0,e.element.innerHTML="");var o=!!e._animationTimeMs;if(o){e._animatePositions={};for(var a=e._animatePositions,c=e.element.firstChild;c;){if(c.getBoundingClientRect&&!c.dataset.uiRemoved)a[c.dataset.uiAnimateId||(c.dataset.uiAnimateId="anim_"+fr++)]=c.getBoundingClientRect();c=c.nextSibling}}var l=[],u={},h=function(t){var r=t.managedId,i=e._content[r]||e._addChildComponent(t,n);u[r]=i,l.push(i.element),i.element&&i.element.parentNode&&i.element.parentNode!==e.element&&(i.detach&&i.detach(),i.element.parentNode&&i.element.parentNode.removeChild(i.element)),i.detach=function(){if(i.element&&i.element.parentNode===e.element){var n=e._content[r]=e._getPlaceholder(t);i.element.parentNode.replaceChild(n.element,i.element)}}};try{for(var d=s(t),p=d.next();!p.done;p=d.next()){h(p.value)}}catch(t){r={error:t}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}var f={};for(var v in e._content)u[v]||(f[v]=e._content[v]);for(var v in e._content=u,f){var y=f[v].element;if(y.parentNode===e.element){var m=void 0;e.separator&&((m=y.previousSibling)&&!m.dataset.uiRemoved||(m=y.nextSibling)),zn(y),m&&zn(m)}}for(var g=e.element.lastChild;g&&g.dataset&&g.dataset.uiRemoved;)g=g.previousSibling;for(var b=g&&g.nextSibling,w=l.length-1;w>=0;w--){if(!(c=l[w]).parentNode||c.nextSibling!==b){m=e.separator&&(c.previousSibling||e._makeSeparator());if(e.element.insertBefore(c,b),m){var _=c.previousSibling;!_||_.dataset&&_.dataset.uiRemoved?c.nextSibling&&e.element.insertBefore(m,c.nextSibling):e.element.insertBefore(m,c)}}for(b=c,e.separator&&c.previousSibling&&!c.previousSibling.dataset.uiRemoved&&(b=c.previousSibling);b.previousSibling&&b.previousSibling.dataset&&b.previousSibling.dataset.uiRemoved;)b=b.previousSibling}o&&e._animateElements()}}))}},t.prototype._makeSeparator=function(){if(!this.separator)throw Error;var t;if(this.separator.lineThickness){var e=bn(this.separator.lineThickness,""),n=bn(this.separator.lineMargin,"");(t=document.createElement("hr")).className="UIRender__Separator--line"+(this.separator.vertical?" UIRender__Separator--line-vertical":""),t.style.borderWidth=e,t.style.margin=n?this.separator.vertical?"0 "+n:n+" 0":"",t.style.borderColor=jt.replaceColor(this.separator.lineColor||"@separator")}else{e=bn(this.separator.space,"0");(t=document.createElement("spacer")).className="UIRender__Separator--spacer",!1!==this.separator.vertical&&(t.style.width=e),this.separator.vertical||(t.style.height=e)}return t},t.prototype._addChildComponent=function(t,e){var n,r=this,i=t.managedId,o=!1,a=function(s,c){return n||!s||o?Nn.scheduleRender((function(){if(r._stopped||!t.managedState)return s;if(n&&n!==s&&n.element.parentNode===r.element){if(s&&s.element){if(s.element.parentNode){var e=r._getPlaceholder(t),o=s.element;o.parentNode.replaceChild(e.element,o),s.element=e.element,e.element=o,s=e}}else s=r._getPlaceholder(t);r.element.replaceChild(s.element,n.element),r._content[i]=n=s}return s})).then(c).catch(X):(r._content[i]=n=s,e.then((function(){return c&&c(s)})).catch(X)),a};return this._asyncChildren?Nn.scheduleRender((function(){t.render(a)}),!0):t.render(a),n||(n=this._content[i]=this._getPlaceholder(t)),o=!0,n},t.prototype._getPlaceholder=function(t){var e=document.createElement("placeholder");return e.id="placeholder:"+t.managedId,e.hidden=!0,new te.Output(t,e)},t.prototype._animateElements=function(t){var e=this;if(void 0===t&&(t=!0),this._animatePositions){for(var n=this._animationTimeMs,r=this._animationSpeed?this._animationSpeed*(window.innerHeight+window.innerWidth)/2e3:1,i=[],o=[],a=[],c=[],l=[],u=this.element.firstChild,h=function(){if(u.dataset)if(u.dataset.uiAnimateId&&!u.dataset.uiRemoved)u.style.transition="transform 0s",u.style.transform="";else if(u.dataset.uiRemoved){var t=u;if(u.dataset.transitionExit){var e=u.getBoundingClientRect();c.push((function(){t.style.position="fixed",t.style.top=e.top+"px",t.style.left=e.left+"px",t.style.width=e.width+"px",t.style.height=e.height+"px"}))}else c.push((function(){t.style.display="none"})),l.push((function(){t.style.display=""}))}u=u.nextSibling};u;)h();for(c.forEach((function(t){return t()})),u=this.element.firstChild;u;){if(!u.dataset.uiRemoved)if(u.dataset&&u.dataset.uiAnimateId&&this._animatePositions[u.dataset.uiAnimateId]){var d=u.getBoundingClientRect(),p=this._animatePositions[u.dataset.uiAnimateId],f=Math.floor(p.left-d.left),v=Math.floor(p.top-d.top);i.push(u);var y=Math.floor(Math.min(n,Math.abs(f+v)/r));o.push(y),u.style.transform="translateX("+f+"px) translateY("+v+"px)"}else if(t&&u.getBoundingClientRect){var m=u.getBoundingClientRect();(m.height<1||m.width<1)&&a.push(u)}u=u.nextSibling}setTimeout((function(){for(var t,n,r=i.length-1;r>=0;r--)i[r].style.transition="transform "+o[r]+"ms ease-in-out",i[r].style.transform="";try{for(var c=s(a),l=c.next();!l.done;l=c.next()){var u=l.value.getBoundingClientRect();if(u.width>=1&&u.height>=1)return void setTimeout((function(){e._animateElements(!1)}),0)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}setTimeout((function(){var t,e;try{for(var n=s(i),r=n.next();!r.done;r=n.next()){var o=r.value;o.style.transform="",o.style.transition=""}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}}),100)}),0),l.forEach((function(t){return t()}))}},t}(),yr={};var mr,gr=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,e instanceof qt&&(n.DOM_CELL_EMIT=n.DOM_EMIT),n}return e(n,t),n.prototype.createElement=function(){var t=document.createElement("form"===this.component.accessibleRole?"form":"container");return this.component.isKeyboardFocusable()?t.tabIndex=0:this.component.isFocusable()&&(t.tabIndex=-1),gn(this.component,t,!0),t},n.prototype.afterRender=function(){if(t.prototype.afterRender.call(this),this.component.managedState&&this.component instanceof le){var e=this.component;if(this.isRendered()){var n,r,i,o,a=this.getElement(),s=0,c=0,l=0,u=Date.now(),h=!1,d=function(t){var p,f=(Date.now()-u)/1e3,v=a.scrollTop-s,y=a.scrollLeft-c;v<0&&(r=!(n=!0)),v>0&&(r=!(n=!1)),y<0&&(o=!(i=!0)),y>0&&(o=!(i=!1)),s=a.scrollTop,c=a.scrollLeft,u=Date.now(),l<u-200?(p=new ce("ScrollEnd",e,void 0,t),h=!1):(p=new ce("Scroll",e,void 0,t),setTimeout(d,250),h=!0),p.scrolledDown=r,p.scrolledUp=n,p.scrolledLeft=i,p.scrolledRight=o,p.atTop=s<=e.topThreshold,p.atLeft=c<=e.leftThreshold,p.atBottom=s+a.clientHeight>=a.scrollHeight-e.bottomThreshold,p.atRight=c+a.clientWidth>=a.scrollWidth-e.rightThreshold,p.verticalVelocity=Math.abs(v/(window.innerHeight||1))/(f||.1),p.horizontalVelocity=Math.abs(y/(window.innerWidth||1))/(f||.1),e.managedState&&e.emit(p.freeze())};a.onscroll=function(t){l=Date.now(),h||d(t)}}}},n.prototype.onUIRender=function(t){this.handleRenderEvent(t),this._separator=this._getSeparator(),this._refreshUpdater()},n.prototype.onUIFocusRequestAsync=function(t){this.handleFocusRequestEvent(t)},n.prototype.onFocusIn=function(t){if(t.source!==this.component&&this.component.isKeyboardFocusable()){var e=this.getElement();e&&(e.tabIndex=-1),this.lastFocused=t.source}},n.prototype.onFocusOut=function(t){if(t.source!==this.component&&this.component.isKeyboardFocusable()){var e=this.getElement();e&&(e.tabIndex=0),this.lastFocused=void 0}},n.prototype.onContentChangeAsync=function(){return o(this,void 0,void 0,(function(){var t;return a(this,(function(e){return this.component.content?(this._updater&&this._updater.update(this.component.content),this.component.isKeyboardFocusable()&&this.lastFocused&&!this.component.content.includes(this.lastFocused)&&((t=this.getElement())&&(t.tabIndex=0),this.lastFocused=void 0),[2]):(this._updater&&(this._updater.stop(),this._updater=void 0),[2])}))}))},n.prototype.onAsyncContentRenderingChange=function(){this._updater&&this._updater.setAsyncCreate(this.component.asyncContentRendering)},n.prototype.onAnimatedContentRenderingDurationChange=function(){this._updater&&this._updater.setAnimationTimeMs(this.component.animatedContentRenderingDuration||0)},n.prototype.onAnimatedContentRenderingVelocityChange=function(){this._updater&&this._updater.setAnimationSpeed(this.component.animatedContentRenderingVelocity||0)},n.prototype.updateStyle=function(){this.scheduleStyleUpdate();var t=this._getSeparator();this._separator!==t&&(this._separator=t,this._refreshUpdater())},n.prototype.onScrollEnd=function(t){var e,n,r,i,o,a,c,l,u,h,d,p,f=this.getElement();if(f&&this.component instanceof le){for(var v=this.component,y=f.getBoundingClientRect(),m=document.activeElement,g=[],b=void 0,w=f.firstChild;w;){if(w.getBoundingClientRect)(H=w.getBoundingClientRect()).bottom>y.top&&H.top<y.bottom&&(w===m&&(b=H),g.push(H));w=w.nextSibling}if("ScrollEnd"===t.name||"ScrollSnapUp"===t.name||"ScrollSnapDown"===t.name){var _=void 0,C=y.height,x="ScrollEnd"===t.name?0:"ScrollSnapUp"===t.name?.25:-.25;switch(v.verticalSnap){case"start":try{for(var S=s(g),E=S.next();!E.done;E=S.next()){var O=(H=E.value).top+x*H.height,k=Math.abs(O-y.top);H===b&&(k-=H.height/2),k<C&&(_=H.top,C=k)}}catch(t){e={error:t}}finally{try{E&&!E.done&&(n=S.return)&&n.call(S)}finally{if(e)throw e.error}}break;case"end":try{for(var A=s(g),R=A.next();!R.done;R=A.next()){var I=(H=R.value).bottom+x*H.height;k=Math.abs(I-y.bottom);H===b&&(k-=H.height/2),k<C&&(_=H.bottom-y.height,C=k)}}catch(t){r={error:t}}finally{try{R&&!R.done&&(i=A.return)&&i.call(A)}finally{if(r)throw r.error}}break;case"center":var P=y.top+y.height/2;try{for(var M=s(g),T=M.next();!T.done;T=M.next()){var D=(H=T.value).top+H.height/2+x*H.height;k=Math.abs(D-P);H===b&&(k-=H.height/2),k<C&&(_=D-y.height/2,C=k)}}catch(t){o={error:t}}finally{try{T&&!T.done&&(a=M.return)&&a.call(M)}finally{if(o)throw o.error}}}if(null!=_){var F=f.scrollTop+(_-y.top);f.scrollTo({behavior:"smooth",top:F})}}if("ScrollEnd"===t.name||"ScrollSnapLeft"===t.name||"ScrollSnapRight"===t.name){var L=void 0;C=y.width,x="ScrollEnd"===t.name?0:"ScrollSnapLeft"===t.name?.25:-.25;switch(v.horizontalSnap){case"start":try{for(var j=s(g),B=j.next();!B.done;B=j.next()){var N=(H=B.value).left+x*H.width;k=Math.abs(N-y.left);H===b&&(k-=H.width/2),k<C&&(L=H.left,C=k)}}catch(t){c={error:t}}finally{try{B&&!B.done&&(l=j.return)&&l.call(j)}finally{if(c)throw c.error}}break;case"end":try{for(var U=s(g),V=U.next();!V.done;V=U.next()){var z=(H=V.value).right+x*H.width;k=Math.abs(z-y.right);H===b&&(k-=H.width/2),k<C&&(L=H.right-y.width,C=k)}}catch(t){u={error:t}}finally{try{V&&!V.done&&(h=U.return)&&h.call(U)}finally{if(u)throw u.error}}break;case"center":P=y.left+y.width/2;try{for(var W=s(g),K=W.next();!K.done;K=W.next()){var H;D=(H=K.value).left+H.width/2+x*H.width,k=Math.abs(D-P);H===b&&(k-=H.width/2),k<C&&(L=D-y.width/2,C=k)}}catch(t){d={error:t}}finally{try{K&&!K.done&&(p=W.return)&&p.call(W)}finally{if(d)throw d.error}}}if(null!=L){N=f.scrollLeft+(L-y.left);f.scrollTo({behavior:"smooth",left:N})}}}},n.prototype.onScrollSnapUp=function(t){"start"===this.component.verticalSnap&&this.onScrollEnd(t)},n.prototype.onScrollSnapDown=function(t){"end"===this.component.verticalSnap&&this.onScrollEnd(t)},n.prototype.onScrollSnapLeft=function(t){"start"===this.component.horizontalSnap&&this.onScrollEnd(t)},n.prototype.onScrollSnapRight=function(t){"end"===this.component.horizontalSnap&&this.onScrollEnd(t)},n.prototype.onSelect=function(t){if(t.source===this.component){var e=this.getElement();e&&(e.dataset.selected="selected")}},n.prototype.onDeselect=function(t){if(t.source===this.component){var e=this.getElement();e&&delete e.dataset.selected}},n.prototype._refreshUpdater=function(){var t=this.getElement();t&&(this._updater&&this._updater.stop(),this._updater=new vr(t,this._separator),this.component.asyncContentRendering&&this._updater.setAsyncCreate(!0),this.component.animatedContentRenderingDuration>=0&&this._updater.setAnimationTimeMs(this.component.animatedContentRenderingDuration),this.component.animatedContentRenderingVelocity>=0&&this._updater.setAnimationSpeed(this.component.animatedContentRenderingVelocity),this._updater.update(this.component.content))},n.prototype._getSeparator=function(){if(this.component.layout){var t,e=this.component.layout.separator;if(!e&&("function"==typeof(t=this.component).hasComponentSpacing&&t.hasComponentSpacing())){var n=this.component.spacing,r=this.component.layout.axis,i=n+"|"+r;e=yr[i]||(yr[i]={space:n,vertical:"horizontal"===r})}return e}},i([I("hidden","style","layout","spacing","dimensions","position","padding","height","width","verticalScrollEnabled","horizontalScrollEnabled")],n.prototype,"updateStyle",null),n}(ar);Ht.addEventHandler((function(t){if("DragContainer"===t.name){if(mr>Date.now()-40||this.getParentComponent()instanceof Wt)return;var e,n=this.lastRenderOutput&&this.lastRenderOutput.element;if(!n)return;for(;t&&!e;)if(t instanceof Nt&&t.event)e=t.event;else{if(!(t instanceof pt&&t.inner))break;t=t.inner}if(!e||e.button)return;var r=e.touches&&e.touches[0].screenX||e.screenX,i=e.touches&&e.touches[0].screenY||e.screenY;if(void 0===r||void 0===i)return;mr=Date.now();var o=!1,a=n.getBoundingClientRect(),s=function(t){var e=t.touches&&t.touches[0].screenX||t.screenX,s=t.touches&&t.touches[0].screenY||t.screenY,c=e-r,l=s-i;if(!o){if(Math.abs(c)<2&&Math.abs(l)<2)return;o=!0,n.style.position="absolute",n.style.bottom="auto",n.style.right="auto"}t.preventDefault(),t.stopPropagation();var u=Math.max(0,a.top+l);n.style.top=Math.min(u,window.innerHeight-40)+"px";var h=Math.max(40-n.clientWidth,a.left+c);n.style.left=Math.min(h,window.innerWidth-64)+"px"},c=function(t){o&&(t.preventDefault(),t.stopPropagation()),mr=0,Nn.scheduleRender((function(){window.removeEventListener("touchmove",s,!0),window.removeEventListener("mousemove",s,!0),window.removeEventListener("touchend",c,!0),window.removeEventListener("mouseup",c,!0),window.removeEventListener("click",c,!0)}))};window.addEventListener("touchmove",s,!0),window.addEventListener("mousemove",s,!0),window.addEventListener("touchend",c,!0),window.addEventListener("mouseup",c,!0),window.addEventListener("click",c,!0)}})),Ht.addObserver(gr);var br=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,n.DOM_CONTROL_EMIT=n.DOM_EMIT,n}return e(n,t),n.prototype.createElement=function(){var t=this,e=document.createElement("img");return e.onerror=function(e){t.component.managedState&&t.component.emit(Nt,"LoadError",t.component,void 0,e)},this.component.isKeyboardFocusable()?e.tabIndex=0:this.component.isFocusable()&&(e.tabIndex=-1),gn(this.component,e,!0),e.src=String(this.component.url||""),e},n.prototype.onUIRender=function(t){this.handleRenderEvent(t)},n.prototype.onUIFocusRequestAsync=function(t){this.handleFocusRequestEvent(t)},n.prototype.onUrlChange=function(){var t=this.getElement();t&&(t.src=String(this.component.url||""))},n.prototype.updateStyle=function(){this.scheduleStyleUpdate()},i([I("hidden","style","shrinkwrap","disabled","textStyle","decoration","dimensions","position")],n.prototype,"updateStyle",null),n}(ar);be.addObserver(br);var wr=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,n}return e(n,t),n.prototype.createElement=function(){var t=document.createElement("hr"),e="UIRender__Separator--line"+(this.component.vertical?" UIRender__Separator--line-vertical":"");if(gn(this.component,t,!0,e),this.component.margin){var n=bn(this.component.margin);t.style.margin=this.component.vertical?"0 "+n:n+" 0"}return t},n.prototype.onUIRender=function(t){this.handleRenderEvent(t)},n.prototype.updateStyle=function(){this.scheduleStyleUpdate("UIRender__Separator--line"+(this.component.vertical?" UIRender__Separator--line-vertical":""))},i([I("hidden","style","vertical","dimensions","color","thickness","margin","position")],n.prototype,"updateStyle",null),n}(ar);ke.addObserver(wr);var _r=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,n}return e(n,t),n.prototype.createElement=function(){var t=document.createElement("spacer");return gn(this.component,t,!0),t},n.prototype.onUIRender=function(t){this.handleRenderEvent(t)},n.prototype.updateStyle=function(){this.scheduleStyleUpdate()},i([I("hidden","style","shrinkwrap","decoration","dimensions","position")],n.prototype,"updateStyle",null),n}(ar);Ae.addObserver(_r);var Cr=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,n.DOM_CONTROL_EMIT=n.DOM_EMIT,n}return e(n,t),n.prototype.createElement=function(){var t=document.createElement(this.component.multiline?"textarea":"input");t.tabIndex=this.component.isKeyboardFocusable()?0:-1,this.component.multiline||(t.type=this.component.type),t.placeholder=String(this.component.placeholder||" ");var e=this.component.value;return t.value=null==e?"":String(e),this.component.name&&(t.name=this.component.name),this.component.disabled&&(t.disabled=!0),gn(this.component,t,!0),t},n.prototype.emitComponentEvent=function(e){var n=this.getElement();n&&(this.component.value=n.value),t.prototype.emitComponentEvent.call(this,e)},n.prototype.onUIRender=function(t){this.handleRenderEvent(t)},n.prototype.onUIFocusRequestAsync=function(t){this.handleFocusRequestEvent(t)},n.prototype.onMultilineChange=function(){this.isRendered()&&this.updateElement(this.createElement())},n.prototype.updateControl=function(){var t=this.getElement();if(t){var e=String(this.component.placeholder||" ");t.placeholder!==e&&(t.placeholder=e),this.component.multiline||t.type===this.component.type||(t.type=this.component.type),this.component.name&&(t.name=this.component.name);var n=this.component.value;n=null==n?"":String(n),t.value!=n&&(t.value=n)}},n.prototype.onDisabledChange=function(){var t=this.getElement();t&&(t.disabled=!!this.component.disabled)},n.prototype.updateStyle=function(){this.scheduleStyleUpdate()},i([I("name","value","type","placeholder")],n.prototype,"updateControl",null),i([I("hidden","style","shrinkwrap","textStyle","decoration","dimensions","position")],n.prototype,"updateStyle",null),n}(ar);Te.addObserver(Cr);var xr=function(t){function n(e){var n=t.call(this,e)||this;return n.component=e,n.DOM_CONTROL_EMIT=n.DOM_EMIT,n}return e(n,t),n.prototype.createElement=function(){var t=document.createElement("span"),e=document.createElement("input");e.tabIndex=this.component.isKeyboardFocusable()?0:-1,e.type="checkbox",e.checked=!!this.component.state,e.id="UIToggle::"+this.component.managedId,e.name=this.component.name||"UIToggle::"+this.component.managedId,this.component.disabled&&(e.disabled=!0);var n=document.createElement("label");return n.htmlFor="UIToggle::"+this.component.managedId,this._setLabelContent(n),t.appendChild(e),t.appendChild(n),gn(this.component,t,!0),t},n.prototype.emitComponentEvent=function(e){var n=this.getElement();if(n){var r=n.firstChild;this.component.state=!!r.checked}t.prototype.emitComponentEvent.call(this,e)},n.prototype.onUIRender=function(t){this.handleRenderEvent(t)},n.prototype.onUIFocusRequestAsync=function(t){this.handleFocusRequestEvent(t)},n.prototype.updateControl=function(){var t=this.getElement();if(t){var e=t.firstChild;this.component.name&&(e.name=this.component.name),e.checked&&!this.component.state?e.checked=!1:!e.checked&&this.component.state&&(e.checked=!0)}},n.prototype.onLabelChange=function(){var t=this.getElement();t&&this._setLabelContent(t.lastChild)},n.prototype.onDisabledChange=function(){var t=this.getElement();t&&(t.firstChild.disabled=!!this.component.disabled)},n.prototype._setLabelContent=function(t){t.innerHTML="";var e=document.createElement("control");this.component.highlightColor&&(e.style.background=jt.replaceColor(this.component.highlightColor));var n=this.component.label;n=null==n?"":String(n),t.textContent=n?"  "+n:"",t.insertBefore(e,t.firstChild)},n.prototype.updateStyle=function(){this.scheduleStyleUpdate()},n.prototype.onHighlightColorChangeAsync=function(){var t=this.getElement();if(t){var e=t.firstChild.nextSibling,n=jt.replaceColor(this.component.highlightColor||"transparent");e.style.background=n}},i([I("name","state")],n.prototype,"updateControl",null),i([I("hidden","style","shrinkwrap","disabled","textStyle","decoration","dimensions","position")],n.prototype,"updateStyle",null),n}(ar);Fe.addObserver(xr);var Sr=Tt.group({main:{position:{gravity:"start"},dimensions:{width:"90%",maxWidth:384},decoration:{css:{margin:"0 5% 0 auto"},background:"@background",borderColor:"@primary",borderThickness:{top:4},borderRadius:4,dropShadow:.5}},listcell:Tt.create().addState("selected",{decoration:{background:"@background^-10%",textColor:"@text"}}).addState("focused",{decoration:{background:"@primary",textColor:"@primary.text"}}),footer:{textStyle:{lineHeight:1.8}}}),Er=Gt.with({style:Sr.main,onArrowDownKeyPress:"+IgnoreArrowPress",onArrowUpKeyPress:"+IgnoreArrowPress"},qt.with({padding:{x:16,y:8}},ie.with(be.with({url:"/assets/icons/search.svg",dimensions:{height:16,width:16}}),De.with({placeholder:dt("search.loaded|then:API search term...:Loading..."),onInput:"+SetSearchFilter",onEnterKeyPress:"+NavigateFirst",onArrowDownKeyPress:"+FocusFirst",textStyle:{lineHeight:2},requestFocus:!0}))),qt.with({hidden:dt("!search.error"),padding:{x:16,y:8}},ie.with(we.withText("An error occurred, please reload",{color:"@text/50%"}))),Ke.with(ze.with({items:dt("filtered"),enableArrowKeyFocus:!0},Ne.with({padding:{x:16},allowKeyboardFocus:!0,selectOnFocus:!0,style:Sr.listcell,onMouseEnter:"+Select",onClick:"+NavigateResult",onEnterKeyPress:"+NavigateResult"},ie.with(be.with({dimensions:{width:16,height:16},url:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return new(ht.bind.apply(ht,l([void 0,t],c(e))))}("/assets/icons/spec-${object.type|or:var}.svg"),decoration:{css:{opacity:".5"}}}),Oe.with({text:dt("object.id"),decoration:{css:{cursor:"pointer"}}}))))),ke,ie.with(ve.with({label:"Documentation index",shrinkwrap:!1,style:Sr.footer,onClick:"+GoIndex"}))),Or=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.placement=$t.DIALOG,e.filtered=new ct,e}return e(n,t),n.prototype.close=function(){this.getApplication().deactivateAsync()},n.prototype.onCloseModal=function(){return this.close(),!0},n.prototype.updateFiltered=function(){var t=this,e=this.search.find(this.filter||"");this.filtered.replace(e.map((function(e){var n,r;try{for(var i=s(t.filtered),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.id===e.id&&a.type===e.type)return a}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return Ct.create(e)})))},n.prototype.onSetSearchFilter=function(t){this.filter=t.source.value||""},n.prototype.onFocusFirst=function(t){var e=t.source.getParentComponent(qt);e&&e.requestFocusNext()},n.prototype.onNavigateFirst=function(){var t=this.filtered.first();t&&(this.close(),document.location.href="/docs/ref/"+t.path)},n.prototype.onNavigateResult=function(t){t.object&&t.object.path&&(this.close(),document.location.href="/docs/ref/"+t.object.path)},n.prototype.onGoIndex=function(){this.close(),document.location.href="/docs"},n.prototype.onIgnoreArrowPress=function(t){t.inner instanceof Nt&&t.inner.event.preventDefault()},i([K],n.prototype,"filtered",void 0),i([$("App.Search")],n.prototype,"search",void 0),n}(on.with(Er)),kr=function(){function t(t){this.activity=t}var e;return t.prototype.onFilterChangeAsync=function(){this.activity.updateFiltered()},i([(e=80,function(t,n){if("function"!=typeof t[n]||"string"!=typeof n||"Async"!==n.slice(-5))throw u(39);t[n]["^o:rate"]=e})],t.prototype,"onFilterChangeAsync",null),t}();Or.addObserver(kr);var Ar=function(){function t(t,e){this.service=t,this.candidates=e,this._results={},this._follow={}}return t.prototype.search=function(e){var n=this;e=e.replace(/^[\s\.]+/,"").replace(/[\s\.]+$/,""),this._lastInput=e;var r=this._results,i=this._follow;this._results={},this._follow={};var o=Math.max(e.indexOf(" "),e.indexOf(".")),a=o>=0?e.slice(0,o):e;if(!a.length)return this;var s="$",u=[];return this.service.forEachToken((function(h,d){var p="#"+h;a.length<=h.length?0===h.indexOf(a)&&(o<0?n._results[p]=r[p]||n._merge(d):(s+=h,u.push.apply(u,l([],c(d))))):a.startsWith(h)&&(n._follow[p]=(i[p]||new t(n.service,n._merge(d))).search(e.slice(h.length)))})),o>=0&&(this._follow[s]=(i[s]||new t(this.service,this._merge(u))).search(e.slice(o))),this},t.prototype.getResults=function(t){var e,n;void 0===t&&(t=12);var r=[];if(!this._lastInput)return r;var i={},o=this._lastInput.replace(/\s/g,"");try{for(var a=s(this._getAllResults()),c=a.next();!c.done;c=a.next()){var l=c.value;if(!(l.id in i)){var u=l.id.toLowerCase().indexOf(o),h="class"===l.type||"interface"===l.type?120:100;if(u&&(h-=l.id.length),u>=0){h+=400,u&&(h-="."!==l.id[u-1]?100:50);var d=l.id.length-(u+o.length);d&&(h-=Math.min(100,10*d))}else l.id.indexOf(".",u+o.length)>0&&(h-=20);i[l.id]=h,r.push(l)}}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return r.sort((function(t,e){var n=i[e.id]-i[t.id];return n||(t.id>e.id?1:-1)})),r.slice(0,t)},t.prototype._getAllResults=function(){var t=[];for(var e in this._results)t.push.apply(t,l([],c(this._results[e])));for(var e in this._follow)t.push.apply(t,l([],c(this._follow[e]._getAllResults())));return t},t.prototype._merge=function(t){var e,n,r,i;if(!this.candidates)return t.slice();var o={};try{for(var a=s(t),c=a.next();!c.done;c=a.next()){var l=c.value;o[l.id]=1}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}try{for(var u=s(this.candidates),h=u.next();!h.done;h=u.next()){l=h.value;o[l.id]&&(o[l.id]=2)}}catch(t){r={error:t}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return t.filter((function(t){return o[t.id]>1}))},t}(),Rr=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="App.Search",e._tokens={},e._search=new Ar(e),e}return e(n,t),n.prototype.loadAsync=function(){return o(this,void 0,void 0,(function(){var t,e,n,r,i,o,c,l,u,h,d,p=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),[4,fetch("/assets/ref.json")];case 1:return t=a.sent(),(n=t.ok)?[4,t.json()]:[3,3];case 2:n=a.sent(),a.label=3;case 3:if(!(e=n))throw Error("Cannot load search data");r=this._decompress(e.content).split("+").map((function(t){return t.split("|")})),i=function(t){var e={id:t[0].replace(/\.$/,""),type:t[1],path:t[2]};e.id.split(/\W|(?=[A-Z][a-z])/).filter((function(t){return!!t})).map((function(t){return"#"+t.toLowerCase()})).forEach((function(t){(p._tokens[t]||(p._tokens[t]=[])).push(e)}))};try{for(o=s(r),c=o.next();!c.done;c=o.next())l=c.value,i(l)}catch(t){h={error:t}}finally{try{c&&!c.done&&(d=o.return)&&d.call(o)}finally{if(h)throw h.error}}return this.loaded=!0,this.emitChange(),[3,5];case 4:return u=a.sent(),console.log(u),this.loaded=!0,this.error=String(u),this.emitChange(),[3,5];case 5:return[2]}}))}))},n.prototype.find=function(t,e){return t=t.replace(/[A-Z][a-z]|[A-Z]\W|[A-Z]$/g,(function(t){return" "+t})).trim().toLowerCase(),this._search.search(t),this._search.getResults(e)},n.prototype.forEachToken=function(t){for(var e in this._tokens)t(e.slice(1),this._tokens[e])},n.prototype._decompress=function(t){var e=[];return t.replace(/\=/g,"|1+").replace(/\!/g,"|2#0:2+").replace(/\?/g,"|2#0:2+1").replace(/\*/g,"|3#0:3:3+2.2").replace(/(\d+)|\w+/g,(function(t,n){return n&&(t=e.splice(n,1)[0]),e.unshift(t),t}))},n}(q),Ir=document.createElement("div");Ir.style.position="fixed",Ir.style.zIndex="1000000",document.body.appendChild(Ir);var Pr=new Rr;Pr.register(),Pr.loadAsync().catch((function(t){console.error(t)}));var Mr=new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(Kn.with(Or)))(Ir);window.showDocWidget=function(){Mr.activate()},window.addEventListener("keydown",(function(t){"/"===t.key&&(Mr.activate(),t.preventDefault())}))}();
  