UNPKG

lingo3d-vanilla

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

2 lines 1.27 MB
/*! For license information please see main.js.LICENSE.txt */ (()=>{var t,e,n,i,r={7751:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>o,B:()=>a});var i=n(7691),r=n(6721);const o=class{constructor(){this.cbsMap=new Map}on(t,e){var n;if(Array.isArray(t)){const n=new i.KQ;for(const i of t)n.watch(this.on(i,e));return n}(null===(n=this.states)||void 0===n?void 0:n.has(t))&&e(this.states.get(t));const o=(0,r.Ze)(this.cbsMap,t,(()=>new Set));return o.add(e),new i.KQ((()=>o.delete(e)))}once(t,e){const n=new i.KQ;return n.watch(this.on(t,(t=>{n.cancel(),e(t)}))),n}emit(t,e){if(this.cbsMap.has(t))for(const n of this.cbsMap.get(t))n(e)}hasState(t){var e;return!!(null===(e=this.states)||void 0===e?void 0:e.has(t))}setState(t,e){var n;null!==(n=this.states)&&void 0!==n||(this.states=new Map),this.states.has(t)&&this.states.get(t)===e||(this.states.set(t,e),this.emit(t,e))}getState(t){var e;return null===(e=this.states)||void 0===e?void 0:e.get(t)}deleteState(t){var e;null===(e=this.states)||void 0===e||e.delete(t)}clear(){var t;this.cbsMap.clear(),null===(t=this.states)||void 0===t||t.clear()}};class s{constructor(){this.cbs=new Set}on(t){return"state"in this&&t(this.state),this.cbs.add(t),new i.KQ((()=>this.cbs.delete(t)))}once(t){const e=new i.KQ;return e.watch(this.on((n=>{e.cancel(),t(n)}))),e}emit(t){for(const e of this.cbs)e(t)}setState(t){"state"in this&&this.state===t||(this.state=t,this.emit(t))}getState(){return this.state}}const a=()=>{const t=new s;return[e=>t.emit(e),(e,n)=>n?t.once(e):t.on(e),e=>t.setState(e),()=>t.getState()]}},8541:(t,e,n)=>{"use strict";n.d(e,{E9:()=>i,HM:()=>h,O$:()=>u,SJ:()=>d,TO:()=>r,X6:()=>l,mf:()=>s,v5:()=>o,xj:()=>c});class i{constructor(t,e){this.x=t,this.y=e}}class r{constructor(t,e,n){this.x=t,this.y=e,this.z=n}}const o=180/Math.PI,s=Math.PI/180,a=(t,e,n,i)=>Math.sqrt((t-n)**2+(e-i)**2),l=(t,e,n,i,r,o)=>Math.sqrt((t-i)**2+(e-r)**2+(n-o)**2),u=(t,e,n,i)=>{const r=a(t.x,t.y,e.x,e.y),s=a(t.x,t.y,n.x,n.y),l=a(e.x,e.y,n.x,n.y),u=Math.acos((r*r+s*s-l*l)/(2*r*s))*o;return i?360-u:u},c=(t,e,n)=>{const r=n*s,o=t.x-e.x,a=t.y-e.y,l=o*Math.cos(r)-a*Math.sin(r),u=o*Math.sin(r)+a*Math.cos(r);return new i(l+e.x,u+e.y)},h=(t,e,n,i)=>t>=n&&e<=i?1:t<=n&&e<=i?2:t<=n&&e>=i?3:4,d=(t,e,n,r)=>{const o=n*=s;return new i(t+r*Math.cos(o),e+r*Math.sin(o))}},7691:(t,e,n)=>{"use strict";n.d(e,{JT:()=>a,KQ:()=>s,XU:()=>o,ci:()=>u});var i=n(6721);class r{constructor(t){this._cb=t,this.done=void 0,this._value=void 0,this._callbacks=void 0,this._watched=void 0}then(t){var e;return this.done?(t(this._value),l):((null!==(e=this._callbacks)&&void 0!==e?e:this._callbacks=new Set).add(t),new s((()=>this._callbacks.delete(t))))}watch(t){var e;return this.done?t._resolve(this._value):((null!==(e=this._watched)&&void 0!==e?e:this._watched=new Set).add(t),t.then((()=>this._watched.delete(t))),t)}_resolve(t){var e;if(this.done)return this;if(this.done=!0,this._value=t,null===(e=this._cb)||void 0===e||e.call(this,t),this._callbacks)for(const n of this._callbacks)n(t);if(this._watched)for(const n of this._watched)n._resolve(t);return this}}class o extends r{constructor(t){super(t)}resolve(t){return this._resolve(t)}}class s extends r{constructor(t){super(t)}cancel(){return this._resolve()}}class a extends r{constructor(t){super(t)}_resolve(){return this.dispose(),this}dispose(){return super._resolve()}}const l=(new s).cancel();class u{constructor(){this.queue=[],this.count=0}then(t){return 0==this.count++?(t(),l):(this.queue.push(t),new s((()=>(0,i.X4)(this.queue,t))))}resolve(){var t;return this.count--,null===(t=this.queue.shift())||void 0===t||t(),this}}},5394:(t,e,n)=>{"use strict";n.d(e,{Bn:()=>x,GW:()=>g,_R:()=>v,Vf:()=>y,ZP:()=>s,X4:()=>u,VF:()=>l,bi:()=>c,mc:()=>h});var i=n(7751),r=n(7691);const o=new WeakSet,s=t=>{const[,e,n,s]=(0,i.B)();n(t);const a=t=>{if(t){const n=new r.KQ;return n.watch(e((e=>t(e,n)))),n}return s()};return o.add(a),[n,a]};var a=n(6721);const l=(t,e)=>n=>{const i=e();i&&t([...i,n])},u=(t,e)=>n=>{const i=e();i&&t(i.filter((t=>t!==n)))},c=(t,e)=>()=>{const n=e();n&&(Array.isArray(n)?t([...n]):t({...n}))},h=(t,e)=>{const n=e();return n&&"object"==typeof n&&((0,a.fw)(n,((t,e)=>Object.freeze(e))),Object.freeze(n)),()=>t(n)},d=[],p=t=>{var e,n,i;const r=d[d.length-1];return null!==(e=(n=r.fiber)[i=r.count++])&&void 0!==e?e:n[i]=t()},f=t=>{var e,n;const i=d[d.length-1],r=i.count++;return null!==(e=(n=i.fiber)[r])&&void 0!==e||(n[r]=t),[()=>i.fiber[r],t=>i.fiber[r]=t]},m=(t,e,n,i,r,o)=>{d.push({count:0,fiber:n,handle:t});const s=i.map((t=>"function"==typeof t?t():t)),a=!r||s.some(((t,e)=>t!==r[e]));a&&"function"==typeof e&&e();const l=a?o():void 0;return d.pop(),[l,s,a]},v=(t,e)=>{const n=p((()=>d[d.length-1].handle.watch(new r.KQ((()=>{var t;return null===(t=o())||void 0===t?void 0:t()})))));if(n.done)return n;const i=p((()=>[])),[o,s]=f(void 0),[a,l]=f(void 0),u=o(),c=a();u&&"function"!=typeof u&&console.warn("cleanup is not a function");const[h,v,g]=m(n,u,i,e,c,t);return g&&s("function"==typeof h?h:void 0),l(v),n},g=(t,e)=>{const n=new r.KQ((()=>setTimeout((()=>null==o?void 0:o())))),i=[];let o,s;const l=(0,a.Ds)((()=>{const[r,a,l]=m(n,o,i,e,s,t);l&&(o="function"==typeof r?r:void 0),s=a}),0,"trailing");l();for(const r of e)"function"==typeof r&&n.watch(r(l));return n},y=t=>{var e,n,i;const r=d[d.length-1];return null!==(e=(n=r.fiber)[i=r.count++])&&void 0!==e?e:n[i]={current:"function"==typeof t?t():t}};class x{constructor(t){[this.set,this.get]=s(t)}}},6721:(t,e,n)=>{"use strict";n.d(e,{CE:()=>i.omit,Ds:()=>d,GL:()=>i.kebabCase,P2:()=>c,Vo:()=>m,X4:()=>a,Z$:()=>l,Ze:()=>r,by:()=>p,dt:()=>f,ef:()=>v,fw:()=>s,jC:()=>i.upperFirst,nt:()=>o,qW:()=>u,w6:()=>i.range});var i=n(9520);const r=(t,e,n)=>{if(!t.has(e)){const i=n();return t.set(e,i),i}return t.get(e)},o=t=>{throw new Error("unexpected value: "+t)},s=(t,e,n=new WeakSet)=>{if(Array.isArray(t)){if(n.has(t))return;n.add(t);for(let i=0;i<t.length;++i){const r=t[i];e(i,r,t),s(r,e,n)}}else if(t&&"object"==typeof t){if(n.has(t))return;n.add(t);for(const[i,r]of Object.entries(t))e(i,r,t),s(r,e,n)}},a=(t,e)=>{const n=t.indexOf(e);return-1!==n&&(t.splice(n,1),!0)},l=(t,e=-1)=>t[t.length+e],u=t=>{const e=t.split(".");if(1===e.length)return e;const n=e.pop();return[e.join("."),n]},c=(t,e,n)=>{let i,r,o,s=!1,a="trailingPromise"===n?new Promise((t=>o=t)):void 0;return(...l)=>{if(r=l,s)return null!=a?a:i;s=!0,"leading"!==n&&"both"!==n||(i=t(...r));const u=()=>{"trailing"!==n&&"both"!==n&&"trailingPromise"!==n||(i=t(...r),null==o||o(i),a="trailingPromise"===n?new Promise((t=>o=t)):void 0),s=!1};return e>0?setTimeout(u,e):queueMicrotask(u),null!=a?a:i}},h=(t,e)=>{if(0===e){let e=!0;return queueMicrotask((()=>e&&t())),()=>e=!1}const n=setTimeout(t,e);return()=>clearTimeout(n)},d=(t,e,n)=>{let i,r,o,s,a="trailingPromise"===n?new Promise((t=>s=t)):void 0;return(...l)=>(o=l,i?i():"leading"!==n&&"both"!==n||(r=t(...o)),i=h((()=>{"trailing"!==n&&"both"!==n&&"trailingPromise"!==n||(r=t(...o),null==s||s(r),a="trailingPromise"===n?new Promise((t=>s=t)):void 0),i=void 0}),e),null!=a?a:r)},p=(t,e,n)=>{const i=new WeakMap,r=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap;return(l,...u)=>{var c;return"trailingPromise"!==n||a.has(l)||a.set(l,new Promise((t=>s.set(l,t)))),o.set(l,u),i.has(l)?i.get(l)():"leading"!==n&&"both"!==n||r.set(l,t(...u)),i.set(l,h((()=>{var e;if("trailing"===n||"both"===n||"trailingPromise"===n){const i=t(...o.get(l));r.set(l,i),null===(e=s.get(l))||void 0===e||e(i),a.set(l,"trailingPromise"===n?new Promise((t=>s.set(l,t))):void 0)}i.delete(l)}),e)),null!==(c=a.get(l))&&void 0!==c?c:r.get(l)}},f=t=>t,m=(new WeakMap,(t,e)=>{let n,i=!1,r=null==e?void 0:e();return(...o)=>{if(e){const t=e();r!==t&&(i=!1),r=t}return i?n:(i=!0,n=t(...o))}}),v=(t,e)=>{for(const n of e)for(const e of Object.getOwnPropertyNames(n.prototype))!(e in t.prototype)&&Object.defineProperty(t.prototype,e,Object.getOwnPropertyDescriptor(n.prototype,e)||Object.create(null))}},7168:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonApi=void 0;var o=n(1586),s=n(987),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this.controller_.props.get("label")},set:function(t){this.controller_.props.set("label",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){var t;return null!==(t=this.controller_.valueController.props.get("title"))&&void 0!==t?t:""},set:function(t){this.controller_.valueController.props.set("title",t)},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=this,i=e.bind(this);return this.controller_.valueController.emitter.on(t,(function(){i(new s.TpEvent(n))})),this},e}(o.BladeApi);e.ButtonApi=a},7033:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonController=void 0;var i=n(6873),r=n(6010),o=function(){function t(t,e){this.emitter=new i.Emitter,this.onClick_=this.onClick_.bind(this),this.props=e.props,this.viewProps=e.viewProps,this.view=new r.ButtonView(t,{props:this.props,viewProps:this.viewProps}),this.view.buttonElement.addEventListener("click",this.onClick_)}return t.prototype.onClick_=function(){this.emitter.emit("click",{sender:this})},t}();e.ButtonController=o},5165:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonBladePlugin=void 0;var i=n(430),r=n(656),o=n(9449),s=n(7168),a=n(7033);e.ButtonBladePlugin={id:"button",type:"blade",accept:function(t){var e=r.ParamsParsers,n=(0,r.parseParams)(t,{title:e.required.string,view:e.required.constant("button"),label:e.optional.string});return n?{params:n}:null},controller:function(t){return new o.LabelController(t.document,{blade:t.blade,props:i.ValueMap.fromObject({label:t.params.label}),valueController:new a.ButtonController(t.document,{props:i.ValueMap.fromObject({title:t.params.title}),viewProps:t.viewProps})})},api:function(t){return t.controller instanceof o.LabelController&&t.controller.valueController instanceof a.ButtonController?new s.ButtonApi(t.controller):null}}},6010:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonView=void 0;var i=n(684),r=n(320),o=(0,i.ClassName)("btn"),s=function(t,e){this.element=t.createElement("div"),this.element.classList.add(o()),e.viewProps.bindClassModifiers(this.element);var n=t.createElement("button");n.classList.add(o("b")),e.viewProps.bindDisabled(n),this.element.appendChild(n),this.buttonElement=n;var i=t.createElement("div");i.classList.add(o("t")),(0,r.bindValueToTextContent)(e.props.value("title"),i),this.buttonElement.appendChild(i)};e.ButtonView=s},39:function(t,e){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.addTabAsBlade=e.addSeparatorAsBlade=e.addFolderAsBlade=e.addButtonAsBlade=void 0,e.addButtonAsBlade=function(t,e){return t.addBlade(n(n({},e),{view:"button"}))},e.addFolderAsBlade=function(t,e){return t.addBlade(n(n({},e),{view:"folder"}))},e.addSeparatorAsBlade=function(t,e){var i=null!=e?e:{};return t.addBlade(n(n({},i),{view:"separator"}))},e.addTabAsBlade=function(t,e){return t.addBlade(n(n({},e),{view:"tab"}))}},1586:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BladeApi=void 0;var n=function(){function t(t){this.controller_=t}return Object.defineProperty(t.prototype,"element",{get:function(){return this.controller_.view.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.controller_.viewProps.get("disabled")},set:function(t){this.controller_.viewProps.set("disabled",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hidden",{get:function(){return this.controller_.viewProps.get("hidden")},set:function(t){this.controller_.viewProps.set("hidden",t)},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.controller_.viewProps.set("disposed",!0)},t}();e.BladeApi=n},7302:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},1209:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},4793:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RackLikeApi=void 0;var o=function(t){function e(e,n){var i=t.call(this,e)||this;return i.rackApi_=n,i}return r(e,t),e}(n(1586).BladeApi);e.RackLikeApi=o},987:function(t,e){"use strict";var n,i=this&&this.__extends||(n=function(t,e){return n=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])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.TpTabSelectEvent=e.TpFoldEvent=e.TpUpdateEvent=e.TpChangeEvent=e.TpEvent=void 0;var r=function(t){this.target=t};e.TpEvent=r;var o=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.value=n,o.presetKey=i,o.last=null==r||r,o}return i(e,t),e}(r);e.TpChangeEvent=o;var s=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.value=n,r.presetKey=i,r}return i(e,t),e}(r);e.TpUpdateEvent=s;var a=function(t){function e(e,n){var i=t.call(this,e)||this;return i.expanded=n,i}return i(e,t),e}(r);e.TpFoldEvent=a;var l=function(t){function e(e,n){var i=t.call(this,e)||this;return i.index=n,i}return i(e,t),e}(r);e.TpTabSelectEvent=l},5019:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BladeController=void 0;var i=n(1480),r=n(684),o=n(7101),s=(0,r.ClassName)(""),a={veryfirst:"vfst",first:"fst",last:"lst",verylast:"vlst"},l=function(){function t(t){var e=this;this.parent_=null,this.blade=t.blade,this.view=t.view,this.viewProps=t.viewProps;var n=this.view.element;this.blade.value("positions").emitter.on("change",(function(){(0,o.getAllBladePositions)().forEach((function(t){n.classList.remove(s(void 0,a[t]))})),e.blade.get("positions").forEach((function(t){n.classList.add(s(void 0,a[t]))}))})),this.viewProps.handleDispose((function(){(0,i.disposeElement)(n)}))}return Object.defineProperty(t.prototype,"parent",{get:function(){return this.parent_},enumerable:!1,configurable:!0}),t}();e.BladeController=l},3530:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RackLikeController=void 0;var o=function(t){function e(e){var n=t.call(this,{blade:e.blade,view:e.view,viewProps:e.rackController.viewProps})||this;return n.rackController=e.rackController,n}return r(e,t),e}(n(5019).BladeController);e.RackLikeController=o},3220:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ValueBladeController=void 0;var o=function(t){function e(e){var n=t.call(this,e)||this;return n.value=e.value,n}return r(e,t),e}(n(5019).BladeController);e.ValueBladeController=o},7101:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAllBladePositions=void 0,e.getAllBladePositions=function(){return["veryfirst","first","last","verylast"]}},5172:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BladeRack=void 0;var i=n(6873),r=n(9275),o=n(6448),s=n(9155),a=n(8016),l=n(7613),u=n(3530),c=n(3220),h=n(3820);function d(t){return t instanceof l.RackController?t.rack:t instanceof u.RackLikeController?t.rackController.rack:null}function p(t){var e=d(t);return e?e.bcSet_:null}var f=function(){function t(t){var e;this.onBladePositionsChange_=this.onBladePositionsChange_.bind(this),this.onSetAdd_=this.onSetAdd_.bind(this),this.onSetRemove_=this.onSetRemove_.bind(this),this.onChildDispose_=this.onChildDispose_.bind(this),this.onChildPositionsChange_=this.onChildPositionsChange_.bind(this),this.onChildInputChange_=this.onChildInputChange_.bind(this),this.onChildMonitorUpdate_=this.onChildMonitorUpdate_.bind(this),this.onChildValueChange_=this.onChildValueChange_.bind(this),this.onChildViewPropsChange_=this.onChildViewPropsChange_.bind(this),this.onDescendantLayout_=this.onDescendantLayout_.bind(this),this.onDescendantInputChange_=this.onDescendantInputChange_.bind(this),this.onDescendantMonitorUpdate_=this.onDescendantMonitorUpdate_.bind(this),this.emitter=new i.Emitter,this.blade_=null!=t?t:null,null===(e=this.blade_)||void 0===e||e.value("positions").emitter.on("change",this.onBladePositionsChange_),this.bcSet_=new h.NestedOrderedSet(p),this.bcSet_.emitter.on("add",this.onSetAdd_),this.bcSet_.emitter.on("remove",this.onSetRemove_)}return Object.defineProperty(t.prototype,"children",{get:function(){return this.bcSet_.items},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){t.parent&&t.parent.remove(t),t.parent_=this,this.bcSet_.add(t,e)},t.prototype.remove=function(t){t.parent_=null,this.bcSet_.remove(t)},t.prototype.find=function(t){return(0,o.forceCast)(this.bcSet_.allItems().filter((function(e){return e instanceof t})))},t.prototype.onSetAdd_=function(t){this.updatePositions_();var e=t.target===t.root;if(this.emitter.emit("add",{bladeController:t.item,index:t.index,isRoot:e,sender:this}),e){var n=t.item;if(n.viewProps.emitter.on("change",this.onChildViewPropsChange_),n.blade.value("positions").emitter.on("change",this.onChildPositionsChange_),n.viewProps.handleDispose(this.onChildDispose_),n instanceof s.InputBindingController)n.binding.emitter.on("change",this.onChildInputChange_);else if(n instanceof a.MonitorBindingController)n.binding.emitter.on("update",this.onChildMonitorUpdate_);else if(n instanceof c.ValueBladeController)n.value.emitter.on("change",this.onChildValueChange_);else{var i=d(n);if(i){var r=i.emitter;r.on("layout",this.onDescendantLayout_),r.on("inputchange",this.onDescendantInputChange_),r.on("monitorupdate",this.onDescendantMonitorUpdate_)}}}},t.prototype.onSetRemove_=function(t){this.updatePositions_();var e=t.target===t.root;if(this.emitter.emit("remove",{bladeController:t.item,isRoot:e,sender:this}),e){var n=t.item;if(n instanceof s.InputBindingController)n.binding.emitter.off("change",this.onChildInputChange_);else if(n instanceof a.MonitorBindingController)n.binding.emitter.off("update",this.onChildMonitorUpdate_);else if(n instanceof c.ValueBladeController)n.value.emitter.off("change",this.onChildValueChange_);else{var i=d(n);if(i){var r=i.emitter;r.off("layout",this.onDescendantLayout_),r.off("inputchange",this.onDescendantInputChange_),r.off("monitorupdate",this.onDescendantMonitorUpdate_)}}}},t.prototype.updatePositions_=function(){var t=this,e=this.bcSet_.items.filter((function(t){return!t.viewProps.get("hidden")})),n=e[0],i=e[e.length-1];this.bcSet_.items.forEach((function(e){var r=[];e===n&&(r.push("first"),t.blade_&&!t.blade_.get("positions").includes("veryfirst")||r.push("veryfirst")),e===i&&(r.push("last"),t.blade_&&!t.blade_.get("positions").includes("verylast")||r.push("verylast")),e.blade.set("positions",r)}))},t.prototype.onChildPositionsChange_=function(){this.updatePositions_(),this.emitter.emit("layout",{sender:this})},t.prototype.onChildViewPropsChange_=function(t){this.updatePositions_(),this.emitter.emit("layout",{sender:this})},t.prototype.onChildDispose_=function(){var t=this;this.bcSet_.items.filter((function(t){return t.viewProps.get("disposed")})).forEach((function(e){t.bcSet_.remove(e)}))},t.prototype.onChildInputChange_=function(t){var e=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(i instanceof s.InputBindingController&&i.binding===e)return i}return null}(this.find(s.InputBindingController),t.sender);if(!e)throw r.TpError.shouldNeverHappen();this.emitter.emit("inputchange",{bladeController:e,options:t.options,sender:this})},t.prototype.onChildMonitorUpdate_=function(t){var e=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(i instanceof a.MonitorBindingController&&i.binding===e)return i}return null}(this.find(a.MonitorBindingController),t.sender);if(!e)throw r.TpError.shouldNeverHappen();this.emitter.emit("monitorupdate",{bladeController:e,sender:this})},t.prototype.onChildValueChange_=function(t){var e=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(i instanceof c.ValueBladeController&&i.value===e)return i}return null}(this.find(c.ValueBladeController),t.sender);if(!e)throw r.TpError.shouldNeverHappen();this.emitter.emit("inputchange",{bladeController:e,options:t.options,sender:this})},t.prototype.onDescendantLayout_=function(t){this.updatePositions_(),this.emitter.emit("layout",{sender:this})},t.prototype.onDescendantInputChange_=function(t){this.emitter.emit("inputchange",{bladeController:t.bladeController,options:t.options,sender:this})},t.prototype.onDescendantMonitorUpdate_=function(t){this.emitter.emit("monitorupdate",{bladeController:t.bladeController,sender:this})},t.prototype.onBladePositionsChange_=function(){this.updatePositions_()},t}();e.BladeRack=f},7550:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createBlade=void 0;var i=n(430),r=n(1583),o=n(6448);e.createBlade=function(){return new i.ValueMap({positions:(0,r.createValue)([],{equals:o.deepEqualsArray})})}},5231:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.bindFoldable=e.getFoldableStyleHeight=e.getFoldableStyleExpanded=e.createFoldable=e.Foldable=void 0;var o=n(1926),s=n(9991),a=n(430),l=n(6448),u=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.create=function(t){var n={completed:!0,expanded:t,expandedHeight:null,shouldFixHeight:!1,temporaryExpanded:null};return new e(a.ValueMap.createCore(n))},Object.defineProperty(e.prototype,"styleExpanded",{get:function(){var t;return null!==(t=this.get("temporaryExpanded"))&&void 0!==t?t:this.get("expanded")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleHeight",{get:function(){if(!this.styleExpanded)return"0";var t=this.get("expandedHeight");return this.get("shouldFixHeight")&&!(0,l.isEmpty)(t)?t+"px":"auto"},enumerable:!1,configurable:!0}),e.prototype.bindExpandedClass=function(t,e){var n=this,i=function(){n.styleExpanded?t.classList.add(e):t.classList.remove(e)};(0,s.bindValueMap)(this,"expanded",i),(0,s.bindValueMap)(this,"temporaryExpanded",i)},e.prototype.cleanUpTransition=function(){this.set("shouldFixHeight",!1),this.set("expandedHeight",null),this.set("completed",!0)},e}(a.ValueMap);function c(t,e){e.style.height=t.styleHeight}e.Foldable=u,e.createFoldable=function(t){return u.create(t)},e.getFoldableStyleExpanded=function(t){return t.styleExpanded},e.getFoldableStyleHeight=function(t){return t.styleHeight},e.bindFoldable=function(t,e){t.value("expanded").emitter.on("beforechange",(function(){var n,i,r;t.set("completed",!1),(0,l.isEmpty)(t.get("expandedHeight"))&&t.set("expandedHeight",(n=t,i=e,r=0,(0,o.disableTransitionTemporarily)(i,(function(){n.set("expandedHeight",null),n.set("temporaryExpanded",!0),(0,o.forceReflow)(i),r=i.clientHeight,n.set("temporaryExpanded",null),(0,o.forceReflow)(i)})),r)),t.set("shouldFixHeight",!0),(0,o.forceReflow)(e)})),t.emitter.on("change",(function(){c(t,e)})),c(t,e),e.addEventListener("transitionend",(function(e){"height"===e.propertyName&&t.cleanUpTransition()}))}},3820:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NestedOrderedSet=void 0;var i=n(6873),r=n(9275),o=function(){function t(t){this.emitter=new i.Emitter,this.items_=[],this.cache_=new Set,this.onSubListAdd_=this.onSubListAdd_.bind(this),this.onSubListRemove_=this.onSubListRemove_.bind(this),this.extract_=t}return Object.defineProperty(t.prototype,"items",{get:function(){return this.items_},enumerable:!1,configurable:!0}),t.prototype.allItems=function(){return Array.from(this.cache_)},t.prototype.find=function(t){for(var e=0,n=this.allItems();e<n.length;e++){var i=n[e];if(t(i))return i}return null},t.prototype.includes=function(t){return this.cache_.has(t)},t.prototype.add=function(t,e){var n=this;if(this.includes(t))throw r.TpError.shouldNeverHappen();var i=void 0!==e?e:this.items_.length;this.items_.splice(i,0,t),this.cache_.add(t);var o=this.extract_(t);o&&(o.emitter.on("add",this.onSubListAdd_),o.emitter.on("remove",this.onSubListRemove_),o.allItems().forEach((function(t){n.cache_.add(t)}))),this.emitter.emit("add",{index:i,item:t,root:this,target:this})},t.prototype.remove=function(t){var e=this.items_.indexOf(t);if(!(e<0)){this.items_.splice(e,1),this.cache_.delete(t);var n=this.extract_(t);n&&(n.emitter.off("add",this.onSubListAdd_),n.emitter.off("remove",this.onSubListRemove_)),this.emitter.emit("remove",{index:e,item:t,root:this,target:this})}},t.prototype.onSubListAdd_=function(t){this.cache_.add(t.item),this.emitter.emit("add",{index:t.index,item:t.item,root:this,target:t.target})},t.prototype.onSubListRemove_=function(t){this.cache_.delete(t.item),this.emitter.emit("remove",{index:t.index,item:t.item,root:this,target:t.target})},t}();e.NestedOrderedSet=o},3002:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bladeContainerClassName=void 0;var i=n(684);e.bladeContainerClassName=(0,i.ClassName)("cnt")},1897:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FolderApi=void 0;var o=n(6873),s=n(4793),a=n(987),l=n(3315),u=function(t){function e(e,n){var i=t.call(this,e,new l.RackApi(e.rackController,n))||this;return i.emitter_=new o.Emitter,i.controller_.foldable.value("expanded").emitter.on("change",(function(t){i.emitter_.emit("fold",{event:new a.TpFoldEvent(i,t.sender.rawValue)})})),i.rackApi_.on("change",(function(t){i.emitter_.emit("change",{event:t})})),i.rackApi_.on("update",(function(t){i.emitter_.emit("update",{event:t})})),i}return r(e,t),Object.defineProperty(e.prototype,"expanded",{get:function(){return this.controller_.foldable.get("expanded")},set:function(t){this.controller_.foldable.set("expanded",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.controller_.props.get("title")},set:function(t){this.controller_.props.set("title",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.rackApi_.children},enumerable:!1,configurable:!0}),e.prototype.addInput=function(t,e,n){return this.rackApi_.addInput(t,e,n)},e.prototype.addMonitor=function(t,e,n){return this.rackApi_.addMonitor(t,e,n)},e.prototype.addFolder=function(t){return this.rackApi_.addFolder(t)},e.prototype.addButton=function(t){return this.rackApi_.addButton(t)},e.prototype.addSeparator=function(t){return this.rackApi_.addSeparator(t)},e.prototype.addTab=function(t){return this.rackApi_.addTab(t)},e.prototype.add=function(t,e){return this.rackApi_.add(t,e)},e.prototype.remove=function(t){this.rackApi_.remove(t)},e.prototype.addBlade=function(t){return this.rackApi_.addBlade(t)},e.prototype.on=function(t,e){var n=e.bind(this);return this.emitter_.on(t,(function(t){n(t.event)})),this},e}(s.RackLikeApi);e.FolderApi=u},9761:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.FolderController=void 0;var s=n(3530),a=n(5231),l=n(7613),u=n(6743),c=function(t){function e(e,n){var i,r=this,s=a.Foldable.create(null===(i=n.expanded)||void 0===i||i),c=new l.RackController(e,{blade:n.blade,root:n.root,viewProps:n.viewProps});return(r=t.call(this,o(o({},n),{rackController:c,view:new u.FolderView(e,{containerElement:c.view.element,foldable:s,props:n.props,viewName:n.root?"rot":void 0,viewProps:n.viewProps})}))||this).onTitleClick_=r.onTitleClick_.bind(r),r.props=n.props,r.foldable=s,(0,a.bindFoldable)(r.foldable,r.view.containerElement),r.rackController.rack.emitter.on("add",(function(){r.foldable.cleanUpTransition()})),r.rackController.rack.emitter.on("remove",(function(){r.foldable.cleanUpTransition()})),r.view.buttonElement.addEventListener("click",r.onTitleClick_),r}return r(e,t),Object.defineProperty(e.prototype,"document",{get:function(){return this.view.element.ownerDocument},enumerable:!1,configurable:!0}),e.prototype.onTitleClick_=function(){this.foldable.set("expanded",!this.foldable.get("expanded"))},e}(s.RackLikeController);e.FolderController=c},6826:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FolderBladePlugin=void 0;var i=n(430),r=n(656),o=n(1897),s=n(9761);e.FolderBladePlugin={id:"folder",type:"blade",accept:function(t){var e=r.ParamsParsers,n=(0,r.parseParams)(t,{title:e.required.string,view:e.required.constant("folder"),expanded:e.optional.boolean});return n?{params:n}:null},controller:function(t){return new s.FolderController(t.document,{blade:t.blade,expanded:t.params.expanded,props:i.ValueMap.fromObject({title:t.params.title}),viewProps:t.viewProps})},api:function(t){return t.controller instanceof s.FolderController?new o.FolderApi(t.controller,t.pool):null}}},6743:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FolderView=void 0;var i=n(9991),r=n(684),o=n(320),s=n(6448),a=n(3002),l=function(t,e){var n,l=this;this.className_=(0,r.ClassName)(null!==(n=e.viewName)&&void 0!==n?n:"fld"),this.element=t.createElement("div"),this.element.classList.add(this.className_(),(0,a.bladeContainerClassName)()),e.viewProps.bindClassModifiers(this.element),this.foldable_=e.foldable,this.foldable_.bindExpandedClass(this.element,this.className_(void 0,"expanded")),(0,i.bindValueMap)(this.foldable_,"completed",(0,o.valueToClassName)(this.element,this.className_(void 0,"cpl")));var u=t.createElement("button");u.classList.add(this.className_("b")),(0,i.bindValueMap)(e.props,"title",(function(t){(0,s.isEmpty)(t)?l.element.classList.add(l.className_(void 0,"not")):l.element.classList.remove(l.className_(void 0,"not"))})),e.viewProps.bindDisabled(u),this.element.appendChild(u),this.buttonElement=u;var c=t.createElement("div");c.classList.add(this.className_("t")),(0,o.bindValueToTextContent)(e.props.value("title"),c),this.buttonElement.appendChild(c),this.titleElement=c;var h=t.createElement("div");h.classList.add(this.className_("m")),this.buttonElement.appendChild(h);var d=e.containerElement;d.classList.add(this.className_("c")),this.element.appendChild(d),this.containerElement=d};e.FolderView=l},9124:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.InputBindingApi=void 0;var o=n(6873),s=n(6448),a=n(1586),l=n(987),u=function(t){function e(e){var n=t.call(this,e)||this;return n.onBindingChange_=n.onBindingChange_.bind(n),n.emitter_=new o.Emitter,n.controller_.binding.emitter.on("change",n.onBindingChange_),n}return r(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this.controller_.props.get("label")},set:function(t){this.controller_.props.set("label",t)},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=e.bind(this);return this.emitter_.on(t,(function(t){n(t.event)})),this},e.prototype.refresh=function(){this.controller_.binding.read()},e.prototype.onBindingChange_=function(t){var e=t.sender.target.read();this.emitter_.emit("change",{event:new l.TpChangeEvent(this,(0,s.forceCast)(e),this.controller_.binding.target.presetKey,t.options.last)})},e}(a.BladeApi);e.InputBindingApi=u},9155:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.InputBindingController=void 0;var o=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.binding=n.binding,i}return r(e,t),e}(n(9449).LabelController);e.InputBindingController=o},9449:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.LabelController=void 0;var s=n(5019),a=n(3088),l=function(t){function e(e,n){var i=this,r=n.valueController.viewProps;return(i=t.call(this,o(o({},n),{view:new a.LabelView(e,{props:n.props,viewProps:r}),viewProps:r}))||this).props=n.props,i.valueController=n.valueController,i.view.valueElement.appendChild(i.valueController.view.element),i}return r(e,t),e}(s.BladeController);e.LabelController=l},4601:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.LabeledValueController=void 0;var s=n(3220),a=n(3088),l=function(t){function e(e,n){var i=this,r=n.valueController.viewProps;return(i=t.call(this,o(o({},n),{value:n.valueController.value,view:new a.LabelView(e,{props:n.props,viewProps:r}),viewProps:r}))||this).props=n.props,i.valueController=n.valueController,i.view.valueElement.appendChild(i.valueController.view.element),i}return r(e,t),e}(s.ValueBladeController);e.LabeledValueController=l},3088:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LabelView=void 0;var i=n(1926),r=n(9991),o=n(684),s=n(6448),a=(0,o.ClassName)("lbl");var l=function(t,e){var n=this;this.element=t.createElement("div"),this.element.classList.add(a()),e.viewProps.bindClassModifiers(this.element);var o=t.createElement("div");o.classList.add(a("l")),(0,r.bindValueMap)(e.props,"label",(function(e){(0,s.isEmpty)(e)?n.element.classList.add(a(void 0,"nol")):(n.element.classList.remove(a(void 0,"nol")),(0,i.removeChildNodes)(o),o.appendChild(function(t,e){var n=t.createDocumentFragment();return e.split("\n").map((function(e){return t.createTextNode(e)})).forEach((function(e,i){i>0&&n.appendChild(t.createElement("br")),n.appendChild(e)})),n}(t,e)))})),this.element.appendChild(o),this.labelElement=o;var l=t.createElement("div");l.classList.add(a("v")),this.element.appendChild(l),this.valueElement=l};e.LabelView=l},2709:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.MonitorBindingApi=void 0;var o=n(6873),s=n(6448),a=n(1586),l=n(987),u=function(t){function e(e){var n=t.call(this,e)||this;return n.onBindingUpdate_=n.onBindingUpdate_.bind(n),n.emitter_=new o.Emitter,n.controller_.binding.emitter.on("update",n.onBindingUpdate_),n}return r(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this.controller_.props.get("label")},set:function(t){this.controller_.props.set("label",t)},enumerable:!1,configurable:!0}),e.prototype.on=function(t,e){var n=e.bind(this);return this.emitter_.on(t,(function(t){n(t.event)})),this},e.prototype.refresh=function(){this.controller_.binding.read()},e.prototype.onBindingUpdate_=function(t){var e=t.sender.target.read();this.emitter_.emit("update",{event:new l.TpUpdateEvent(this,(0,s.forceCast)(e),this.controller_.binding.target.presetKey)})},e}(a.BladeApi);e.MonitorBindingApi=u},8016:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.MonitorBindingController=void 0;var o=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.binding=n.binding,i.viewProps.bindDisabled(i.binding.ticker),i.viewProps.handleDispose((function(){i.binding.dispose()})),i}return r(e,t),e}(n(9449).LabelController);e.MonitorBindingController=o},9598:function(t,e,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.createBladeController=void 0;var r=n(4008),o=n(656),s=n(6448),a=n(7550);e.createBladeController=function(t,e){var n=t.accept(e.params);if(!n)return null;var l=o.ParamsParsers.optional.boolean(e.params.disabled).value,u=o.ParamsParsers.optional.boolean(e.params.hidden).value;return t.controller({blade:(0,a.createBlade)(),document:e.document,params:(0,s.forceCast)(i(i({},n.params),{disabled:l,hidden:u})),viewProps:r.ViewProps.create({disabled:l,hidden:u})})}},3315:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RackApi=e.findSubBladeApiSet=void 0;var o=n(3546),s=n(6873),a=n(9275),l=n(6448),u=n(1586),c=n(39),h=n(4793),d=n(987),p=n(3220),f=n(3820),m=n(9124),v=n(9155),g=n(2709),y=n(8016);function x(t){return t instanceof w?t.apiSet_:t instanceof h.RackLikeApi?t.rackApi_.apiSet_:null}function b(t,e){var n=t.find((function(t){return t.controller_===e}));if(!n)throw a.TpError.shouldNeverHappen();return n}function _(t,e,n){if(!o.BindingTarget.isBindable(t))throw a.TpError.notBindable();return new o.BindingTarget(t,e,n)}e.findSubBladeApiSet=x;var w=function(t){function e(e,n){var i=t.call(this,e)||this;i.onRackAdd_=i.onRackAdd_.bind(i),i.onRackRemove_=i.onRackRemove_.bind(i),i.onRackInputChange_=i.onRackInputChange_.bind(i),i.onRackMonitorUpdate_=i.onRackMonitorUpdate_.bind(i),i.emitter_=new s.Emitter,i.apiSet_=new f.NestedOrderedSet(x),i.pool_=n;var r=i.controller_.rack;return r.emitter.on("add",i.onRackAdd_),r.emitter.on("remove",i.onRackRemove_),r.emitter.on("inputchange",i.onRackInputChange_),r.emitter.on("monitorupdate",i.onRackMonitorUpdate_),r.children.forEach((function(t){i.setUpApi_(t)})),i}return r(e,t),Object.defineProperty(e.prototype,"children",{get:function(){var t=this;return this.controller_.rack.children.map((function(e){return b(t.apiSet_,e)}))},enumerable:!1,configurable:!0}),e.prototype.addInput=function(t,e,n){var i=null!=n?n:{},r=this.controller_.view.element.ownerDocument,o=this.pool_.createInput(r,_(t,e,i.presetKey),i),s=new m.InputBindingApi(o);return this.add(s,i.index)},e.prototype.addMonitor=function(t,e,n){var i=null!=n?n:{},r=this.controller_.view.element.ownerDocument,o=this.pool_.createMonitor(r,_(t,e),i),s=new g.MonitorBindingApi(o);return(0,l.forceCast)(this.add(s,i.index))},e.prototype.addFolder=function(t){return(0,c.addFolderAsBlade)(this,t)},e.prototype.addButton=function(t){return(0,c.addButtonAsBlade)(this,t)},e.prototype.addSeparator=function(t){return(0,c.addSeparatorAsBlade)(this,t)},e.prototype.addTab=function(t){return(0,c.addTabAsBlade)(this,t)},e.prototype.add=function(t,e){this.controller_.rack.add(t.controller_,e);var n=this.apiSet_.find((function(e){return e.controller_===t.controller_}));return n&&this.apiSet_.remove(n),this.apiSet_.add(t),t},e.prototype.remove=function(t){this.controller_.rack.remove(t.controller_)},e.prototype.addBlade=function(t){var e=this.controller_.view.element.ownerDocument,n=this.pool_.createBlade(e,t),i=this.pool_.createBladeApi(n);return this.add(i,t.index)},e.prototype.on=function(t,e){var n=e.bind(this);return this.emitter_.on(t,(function(t){n(t.event)})),this},e.prototype.setUpApi_=function(t){this.apiSet_.find((function(e){return e.controller_===t}))||this.apiSet_.add(this.pool_.createBladeApi(t))},e.prototype.onRackAdd_=function(t){this.setUpApi_(t.bladeController)},e.prototype.onRackRemove_=function(t){if(t.isRoot){var e=b(this.apiSet_,t.bladeController);this.apiSet_.remove(e)}},e.prototype.onRackInputChange_=function(t){var e=t.bladeController;if(e instanceof v.InputBindingController){var n=b(this.apiSet_,e),i=e.binding;this.emitter_.emit("change",{event:new d.TpChangeEvent(n,(0,l.forceCast)(i.target.read()),i.target.presetKey,t.options.last)})}else if(e instanceof p.ValueBladeController){n=b(this.apiSet_,e);this.emitter_.emit("change",{event:new d.TpChangeEvent(n,e.value.rawValue,void 0,t.options.last)})}},e.prototype.onRackMonitorUpdate_=function(t){if(!(t.bladeController instanceof y.MonitorBindingController))throw a.TpError.shouldNeverHappen();var e=b(this.apiSet_,t.bladeController),n=t.bladeController.binding;this.emitter_.emit("update",{event:new d.TpUpdateEvent(e,(0,l.forceCast)(n.target.read()),n.target.presetKey)})},e}(u.BladeApi);e.RackApi=w},7613:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.RackController=void 0;var s=n(1926),a=n(5180),l=n(5019),u=n(5172),c=function(t){function e(e,n){var i=t.call(this,o(o({},n),{view:new a.PlainView(e,{viewName:"brk",viewProps:n.viewProps})}))||this;i.onRackAdd_=i.onRackAdd_.bind(i),i.onRackRemove_=i.onRackRemove_.bind(i);var r=new u.BladeRack(n.root?void 0:n.blade);return r.emitter.on("add",i.onRackAdd_),r.emitter.on("remove",i.onRackRemove_),i.rack=r,i.viewProps.handleDispose((function(){for(var t=i.rack.children.length-1;t>=0;t--){i.rack.children[t].viewProps.set("disposed",!0)}})),i}return r(e,t),e.prototype.onRackAdd_=function(t){t.isRoot&&(0,s.insertElementAt)(this.view.element,t.bladeController.view.element,t.index)},e.prototype.onRackRemove_=function(t){t.isRoot&&(0,s.removeElement)(t.bladeController.view.element)},e}(l.BladeController);e.RackController=c},9952:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorApi=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(n(1586).BladeApi);e.SeparatorApi=o},9329:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=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])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},o.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Separator