@manycore/custom-sdk 3.1.13 → 3.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- window.__customSdkVersion = '3.1.13';!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):"function"==typeof define&&define.amd?define(["servkit","lodash","react","react-dom","@manycore/custom-miniapp-sdk"],e):"object"==typeof exports?exports.CustomSdk=e(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):t.CustomSdk=e(t.servkit,t._,t.React,t.ReactDOM,t["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__7__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__12__,__WEBPACK_EXTERNAL_MODULE__150__,__WEBPACK_EXTERNAL_MODULE__321__){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1381)}([function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}r.d(e,"d",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"h",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"f",(function(){return c})),r.d(e,"b",(function(){return A})),r.d(e,"e",(function(){return l})),r.d(e,"k",(function(){return f})),r.d(e,"g",(function(){return h})),r.d(e,"i",(function(){return p})),r.d(e,"j",(function(){return d}));var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var a=function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function u(t,e,r,o){var i,a=arguments.length,s=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(e,r,s):i(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s}function c(t,e){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}Object.create;function f(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function p(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t}function d(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError},function(t,e,r){"use strict";var n=r(23);r.d(e,"b",(function(){return n.BBox2d})),r.d(e,"c",(function(){return n.BBox3d})),r.d(e,"d",(function(){return n.CCS2d})),r.d(e,"e",(function(){return n.CCS3d})),r.d(e,"g",(function(){return n.Interval})),r.d(e,"l",(function(){return n.Matrix2})),r.d(e,"m",(function(){return n.Matrix3})),r.d(e,"n",(function(){return n.Matrix4})),r.d(e,"i",(function(){return n.MPoint2d})),r.d(e,"j",(function(){return n.MVector2d})),r.d(e,"k",(function(){return n.MVector3d})),r.d(e,"o",(function(){return n.Num})),r.d(e,"p",(function(){return n.Point2d})),r.d(e,"q",(function(){return n.Point3d})),r.d(e,"r",(function(){return n.Point4d})),r.d(e,"s",(function(){return n.Quaternion})),r.d(e,"t",(function(){return n.TOLERANCE})),r.d(e,"u",(function(){return n.Tolerance})),r.d(e,"v",(function(){return n.Transform2d})),r.d(e,"w",(function(){return n.UV})),r.d(e,"x",(function(){return n.Vector2d})),r.d(e,"y",(function(){return n.Vector3d})),r.d(e,"a",(function(){return n.Algorithm})),r.d(e,"B",(function(){return n.op3d})),r.d(e,"C",(function(){return n.rpSolve})),r.d(e,"h",(function(){return n.LegendreGaussIntegration})),r.d(e,"A",(function(){return n.numericalGradient})),r.d(e,"E",(function(){return n.unconstrainedMinimize})),r.d(e,"z",(function(){return n.findWithValue})),r.d(e,"F",(function(){return n.unconstrainedMinimizeWithInvHMat})),r.d(e,"D",(function(){return n.svd})),r.d(e,"f",(function(){return n.GaussNewton}))},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
1
+ window.__customSdkVersion = '3.1.14';!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):"function"==typeof define&&define.amd?define(["servkit","lodash","react","react-dom","@manycore/custom-miniapp-sdk"],e):"object"==typeof exports?exports.CustomSdk=e(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):t.CustomSdk=e(t.servkit,t._,t.React,t.ReactDOM,t["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__7__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__12__,__WEBPACK_EXTERNAL_MODULE__150__,__WEBPACK_EXTERNAL_MODULE__321__){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1381)}([function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}r.d(e,"d",(function(){return i})),r.d(e,"a",(function(){return a})),r.d(e,"h",(function(){return s})),r.d(e,"c",(function(){return u})),r.d(e,"f",(function(){return c})),r.d(e,"b",(function(){return A})),r.d(e,"e",(function(){return l})),r.d(e,"k",(function(){return f})),r.d(e,"g",(function(){return h})),r.d(e,"i",(function(){return p})),r.d(e,"j",(function(){return d}));var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var a=function(){return(a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function u(t,e,r,o){var i,a=arguments.length,s=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(e,r,s):i(e,r))||s);return a>3&&s&&Object.defineProperty(e,r,s),s}function c(t,e){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}Object.create;function f(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function p(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t}function d(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError},function(t,e,r){"use strict";var n=r(23);r.d(e,"b",(function(){return n.BBox2d})),r.d(e,"c",(function(){return n.BBox3d})),r.d(e,"d",(function(){return n.CCS2d})),r.d(e,"e",(function(){return n.CCS3d})),r.d(e,"g",(function(){return n.Interval})),r.d(e,"l",(function(){return n.Matrix2})),r.d(e,"m",(function(){return n.Matrix3})),r.d(e,"n",(function(){return n.Matrix4})),r.d(e,"i",(function(){return n.MPoint2d})),r.d(e,"j",(function(){return n.MVector2d})),r.d(e,"k",(function(){return n.MVector3d})),r.d(e,"o",(function(){return n.Num})),r.d(e,"p",(function(){return n.Point2d})),r.d(e,"q",(function(){return n.Point3d})),r.d(e,"r",(function(){return n.Point4d})),r.d(e,"s",(function(){return n.Quaternion})),r.d(e,"t",(function(){return n.TOLERANCE})),r.d(e,"u",(function(){return n.Tolerance})),r.d(e,"v",(function(){return n.Transform2d})),r.d(e,"w",(function(){return n.UV})),r.d(e,"x",(function(){return n.Vector2d})),r.d(e,"y",(function(){return n.Vector3d})),r.d(e,"a",(function(){return n.Algorithm})),r.d(e,"B",(function(){return n.op3d})),r.d(e,"C",(function(){return n.rpSolve})),r.d(e,"h",(function(){return n.LegendreGaussIntegration})),r.d(e,"A",(function(){return n.numericalGradient})),r.d(e,"E",(function(){return n.unconstrainedMinimize})),r.d(e,"z",(function(){return n.findWithValue})),r.d(e,"F",(function(){return n.unconstrainedMinimizeWithInvHMat})),r.d(e,"D",(function(){return n.svd})),r.d(e,"f",(function(){return n.GaussNewton}))},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -143,7 +143,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
143
143
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
144
144
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
145
145
  PERFORMANCE OF THIS SOFTWARE.
146
- ***************************************************************************** */!function(t){t[t.NONE=0]="NONE",t[t.CIRCLE=1]="CIRCLE",t[t.LINE=2]="LINE",t[t.CUT_CIRCLE=3]="CUT_CIRCLE",t[t.CIRCLE_CENTER=5]="CIRCLE_CENTER"}(x||(x={})),function(t){t[t.SEGMENT=0]="SEGMENT",t[t.CIRCLE_ARC=1]="CIRCLE_ARC",t[t.CIRCLE_CENTER=4]="CIRCLE_CENTER"}(M||(M={})),function(t){t.TRUE="true",t.FALSE="false"}(R||(R={})),function(t){t.FROM_TOP="1",t.FROM_BOTTOM="2"}(L||(L={})),function(t){t.number="number",t.string="string",t.boolean="boolean"}(j||(j={})),function(t){t.FLOAT="float",t.FLOAT2="float2",t.FLOAT3="float3",t.FLOAT_BUFFER="floatbuf",t.FLOAT2_BUFFER="float2buf",t.FLOAT3_BUFFER="float3buf",t.REFERENCE="reference",t.INT="int",t.INT_BUFFER="intbuf",t.STRING="string",t.SHAPE="shape",t.MATERIAL="material",t.BOOLEAN="boolean",t.BOOLEAN_BUFFER="booleanbuf",t.FIT="fit",t.PATH="paramcornerpath",t.STYLE="style",t.FORMULA_STRING="formulaString",t.BOOLEAN_LIST="booleanlist"}(k||(k={})),function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LENGTH=1]="LENGTH",t[t.AREA=2]="AREA",t[t.NUMBER=3]="NUMBER"}(N||(N={})),function(t){t[t.SINGLE=0]="SINGLE",t[t.RANGE=1]="RANGE",t[t.OPTION=2]="OPTION",t[t.STEP=3]="STEP",t[t.COMPOUND_FORMULA=4]="COMPOUND_FORMULA",t[t.FIXED_FORMULA=5]="FIXED_FORMULA",t[t.FIXED_VALUE=6]="FIXED_VALUE",t[t.COMPOUND_FORMULA_OPTION=7]="COMPOUND_FORMULA_OPTION"}(F||(F={})),function(t){t.SENSE="SENSE",t.BRANDGOOD="BRANDGOOD",t.CATEGORY="CATEGORY",t.TEMPLATE_ID="TEMPLATE_ID"}(G||(G={})),function(t){t[t.PARAM_ENTITY=1]="PARAM_ENTITY",t[t.PARAM_FURNITURE=2]="PARAM_FURNITURE",t[t.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",t[t.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",t[t.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",t[t.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(U||(U={})),function(t){t.MINIAPP_APPEND="$$miniappAppend"}(z||(z={})),function(t){t[t.ATTRIBUTE=0]="ATTRIBUTE",t[t.STORE=1]="STORE",t[t.BZ_STORE=2]="BZ_STORE",t[t.PLANK_PATH=3]="PLANK_PATH"}(Y||(Y={})),function(t){t.NAME="name",t.REMARK="remark",t.POSITION="position",t.ROTATION="rotation",t.TOOL_TYPE="toolType",t.POSITION_FORMULA="positionFormula",t.ROTATION_FORMULA="rotationFormula",t.FLOORPLAN_RELATION="floorplanRelation"}(H||(H={})),function(t){t.PATH="path",t.HOLES="holes",t.SLOTS="slots"}(V||(V={})),function(t){t[t.ACCESSORY=0]="ACCESSORY",t[t.CHILD=1]="CHILD",t[t.REPLACE_CHILD=2]="REPLACE_CHILD"}(q||(q={})),function(t){t[t.COMMON=0]="COMMON",t[t.ASSEMBLY=1]="ASSEMBLY",t[t.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(W||(W={})),function(t){t.waiting="waiting",t.assigned="assigned",t.running="running",t.finished="finished",t.abnormal="abnormal",t.failed="failed"}(K||(K={})),function(t){t[t.GROOVE=1]="GROOVE",t[t.HOLE=2]="HOLE",t[t.HARDWARE=3]="HARDWARE",t[t.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",t.INTERSECTED="intersected",t.HOLE_V2="holeV2",t.SQUARE_GROOVE="squareGroove",t.ROUND_CORNER_GROOVE="roundCornerGroove",t.SPECIAL_SHAPED_GROOVE="specialShapedGroove",t.PATH_GROOVE="pathGroove"}(J||(J={})),function(t){t.SHELL="1",t.FACE="2",t.THROUGH_SHELL="3"}(X||(X={})),function(t){t.SHELL="1",t.THROUGH_SHELL="3"}(Z||(Z={})),function(t){t[t.BOTH_PLANK=0]="BOTH_PLANK",t[t.PLANK_FURNITURE=1]="PLANK_FURNITURE"}($||($={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.LOCK=1]="LOCK",t[t.UNLOCK=2]="UNLOCK",t[t.RAW=3]="RAW"}(tt||(tt={})),function(t){t[t.PLANK=0]="PLANK",t[t.HARDWARE=1]="HARDWARE",t[t.PRODUCT=2]="PRODUCT"}(et||(et={})),function(t){t[t.XY=0]="XY",t[t.YZ=1]="YZ",t[t.XZ=2]="XZ"}(rt||(rt={})),function(t){t.PLANK="PLANK",t.FITTING="FITTING",t.AUXILIARY="AUXILIARY",t.LAMELLO="LAMELLO",t.LOCK="LOCK",t.EDGE="EDGE",t.INVISIBLE="INVISIBLE",t.ARRAY="ARRAY"}(nt||(nt={})),function(t){t.PLANK="PLANK",t.FITTING="FITTING",t.AUXILIARY="AUXILIARY"}(ot||(ot={})),function(t){t.Space="spaceDivision",t.Relation="relationDivision"}(it||(it={})),function(t){t[t.CAD=7]="CAD",t[t.JPG=2]="JPG",t[t.PDF=3]="PDF"}(at||(at={})),function(t){t[t.MODEL_EDITABLE=0]="MODEL_EDITABLE"}(st||(st={})),function(t){t.PDF="pdf",t.EXCEL="excel"}(ut||(ut={})),function(t){t[t.entity=1]="entity",t[t.furniture=2]="furniture",t[t.primitive=3]="primitive",t[t.virtual=4]="virtual",t[t.assemblyInstance=5]="assemblyInstance",t[t.assembly=6]="assembly"}(ct||(ct={})),function(t){t[t.NONE=0]="NONE",t[t.CIRCLE=1]="CIRCLE",t[t.LINE=2]="LINE",t[t.CUT_CIRCLE=3]="CUT_CIRCLE",t[t.ELLIPSE=4]="ELLIPSE",t[t.CIRCLE_CENTER=5]="CIRCLE_CENTER"}(At||(At={})),function(t){t[t.SEGMENT=0]="SEGMENT",t[t.CIRCLE_ARC=1]="CIRCLE_ARC",t[t.ELLIPSE_ARC=3]="ELLIPSE_ARC",t[t.CIRCLE_CENTER=4]="CIRCLE_CENTER"}(lt||(lt={}));var It,Et=function(){return(Et=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function Ct(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function bt(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Bt(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function wt(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Bt(arguments[e]));return t}function Pt(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{if("function"==typeof t)return t.apply(this,e)}catch(t){setTimeout((function(){throw t}))}}}function St(t){return t&&"object"===A(t)&&"function"==typeof t.then&&"function"==typeof t.catch}!function(t){t.LEFT="left",t.RIGHT="right",t.BOTTOM="bottom",t.TOP="top",t.BACK="back",t.FRONT="front"}(It||(It={}));var _t=function(){function t(){this.namespace=""}return t.prototype.getName=function(){return this.name},t.prototype.getType=function(){return this.type},t.prototype.getValue=function(){return function(t,e){if(null!=t){if(e===j.boolean)return Boolean(parseFloat(t));if(e===j.number)return parseFloat(t)}return t}(this.value,this.type)},t.prototype.getNamespace=function(){return this.namespace},t.prototype.setValue=function(t){var e;if(!this.readonly&&this.ref){var r=null!==(e=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==e?e:1024,n=function(t,e){if(e===j.boolean)return t?"1":"0";return t.toString()}(t,this.type);if(function(t){for(var e=t.length,r=t.length-1;r>=0;r--){var n=t.charCodeAt(r);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&r--}return e}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:Y.BZ_STORE,attr:D(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},t.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:Y.BZ_STORE,attr:D(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},t.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},t}();function Qt(t,e,r){void 0===r&&(r={functions:["abs","toRadians","toDegrees","sin","cos","tan","asin","acos","atan","ceil","floor","round","left","right","mid","strToNum","min","max","sqrt","isValue","statusSum","average","rad","boolAt","boolAll","deRound","stretchSize","stretchPosition","getProductCustomAttr"],variables:["W","D","H"]});var n=r.functions,o=r.variables,i=e.getParent();if(!(null==i?void 0:i.productId))throw new Error("model not support set formula");if(-1===i.getChild().findIndex((function(t){return t.id===e.id})))throw new Error("only child support set formula");for(var a=/#([a-zA-z$_][a-zA-Z$_\d]*)(?=\()/g,s=null;s=a.exec(t);)if(!n.includes(s[1]))throw new Error("function "+s[0]+" not available!");var u=/#([a-zA-z$_][a-zA-Z$_\d]*)\(?/g;for(s=null;s=u.exec(t);)if(!s[0].endsWith("(")&&!o.includes(s[1])&&!i.hasParam(s[1]))throw new Error("variable "+s[0]+" not available!");var c=t.replace(u,(function(t,e,r){return t.endsWith("(")?e+"(":e})).replace(/\s+AND\s+/g," && ").replace(/\s+OR\s+/g," || ");try{new Function("return "+c)}catch(t){throw new SyntaxError("formula not correct!")}}var Ot=function(){function t(){this.data={name:"",displayName:"",simpleName:"",type:k.FIT,value:""}}return t.prototype.getName=function(){return this.data.name},t.prototype.getDescription=function(){return this.data.description},t.prototype.getSimpleName=function(){return this.data.simpleName},t.prototype.getDisplayName=function(){return this.data.displayName},t.prototype.getVisible=function(){return this.data.visible},t.prototype.isOverridden=function(){var t=this.ref;return t&&t.type===U.PARAM_PRIMITIVE&&"plankPath"===this.getName()?this.data.primitiveOverride:this.data.override},t.prototype.cancelOverride=function(){var t=this.ref;if(t&&"function"==typeof t.__trackUpdateField){var e=t&&t.type===U.PARAM_PRIMITIVE&&"plankPath"===this.getName()?"primitiveOverride":"override",r=this.data[e];t.__trackUpdateField({type:Y.STORE,attr:this.data.name},r,!1),!1!==r&&(this.data[e]=!1)}},t.prototype.getUnitType=function(){return this.data.valueFormat},t.prototype.getParamForm=function(){return this.data.paramForm},t.prototype.isUsingMixFormula=function(){return 1===this.data.status},t.prototype.useMixFormula=function(){if(void 0!==this.getParamForm()&&[F.COMPOUND_FORMULA,F.COMPOUND_FORMULA_OPTION].includes(this.getParamForm())){var t=this.ref;t&&"function"==typeof t.__trackUpdateField&&(t.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.data.status,1),this.data.status=1,this.data.formula=void 0)}},t.prototype.getValue=function(){return this.data.value},t.prototype.setValue=function(t){var e,r,n,o,i,a,s,u,c,A,l,f,h,p=this.ref,d=null==p?void 0:p.getRoot(),g=(null==d?void 0:d.option)||{};if(this.getEditable()){if(g.ruleValidate){if(!this.getVisible()&&!0!==(null===(n=null==p?void 0:p.option)||void 0===n?void 0:n.postHiddenVariable))throw new Error("Modifying the hidden parameter "+this.data.name+" on the current model ("+(null!==(o=null==p?void 0:p.name)&&void 0!==o?o:"")+") - ("+(null!==(i=null==p?void 0:p.id)&&void 0!==i?i:"")+") will not be saved to the design!");if(this.getType()===k.BOOLEAN_LIST){if(parseFloat(t)!=t)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(a=null==p?void 0:p.name)&&void 0!==a?a:"")+") - ("+(null!==(s=null==p?void 0:p.id)&&void 0!==s?s:"")+") must be a positive integer!");var y=0,v=Math.pow(2,this.getValueDisplayNames().length)-1;if(t<y&&t>v)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(u=null==p?void 0:p.name)&&void 0!==u?u:"")+") - ("+(null!==(c=null==p?void 0:p.id)&&void 0!==c?c:"")+") cannot be less than 0 and greater than "+v)}if(this.getParamForm()===F.STEP){v=this.getMax();if(t<(y=this.getMin())&&t>v)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(A=null==p?void 0:p.name)&&void 0!==A?A:"")+") - ("+(null!==(l=null==p?void 0:p.id)&&void 0!==l?l:"")+") must be within the range of "+y+" and "+v+".");if((t-y)%this.getStep()!=0)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(f=null==p?void 0:p.name)&&void 0!==f?f:"")+") - ("+(null!==(h=null==p?void 0:p.id)&&void 0!==h?h:"")+") must be in increments of "+this.getStep()+".")}}p&&"function"==typeof p.__trackUpdateField&&p.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.getValue(),t),this.data.value=t,void 0!==this.getParamForm()&&[F.COMPOUND_FORMULA,F.COMPOUND_FORMULA_OPTION].includes(this.getParamForm())&&(this.data.status=0);var m=p&&p.type===U.PARAM_PRIMITIVE&&"plankPath"===this.getName()?"primitiveOverride":"override";this.data[m]=!0,this.data.formula=void 0}else if(g.ruleValidate)throw new Error("The parameter "+this.data.name+" on the current model ("+(null!==(e=null==p?void 0:p.name)&&void 0!==e?e:"")+") - ("+(null!==(r=null==p?void 0:p.id)&&void 0!==r?r:"")+") cannot be edited!")},t.prototype.getFormula=function(){return this.data.formula},t.prototype.setFormula=function(t){var e=this.ref;this.getEditable()&&e&&"function"==typeof e.__trackUpdateField&&(Qt(t,e),e.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.getFormula(),t),this.data.formula=t)},t.prototype.toJSON=function(){return this.data},t.prototype.getMin=function(){return this.data.min},t.prototype.getEditable=function(){return!0===this.data.editable},t.prototype.getMax=function(){return this.data.max},t.prototype.getOptionValues=function(){return this.data.optionValues||[]},t.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},t.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},t.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},t.prototype.setPrimitiveOverride=function(t){var e,r,n=this.ref,o=null==n?void 0:n.getRoot(),i=(null==o?void 0:o.option)||{};if(this.getEditable())n&&"function"==typeof n.__trackUpdateField&&n.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.data.primitiveOverride,t),this.data.primitiveOverride=t;else if(i.ruleValidate)throw new Error("The parameter "+this.data.name+" on the current model ("+(null!==(e=null==n?void 0:n.name)&&void 0!==e?e:"")+") - ("+(null!==(r=null==n?void 0:n.id)&&void 0!==r?r:"")+") does not support the invocation of the setPrimitiveOverride method!")},t.prototype.getStep=function(){return this.data.step},t.prototype.getType=function(){return this.data.type},t.prototype.getParsedValue=function(){return this.getValue()},t.prototype.setParsedValue=function(t){return this.setValue(t)},t.prototype.getPackageId=function(){return this.data.packageId},t}();function Dt(t){var e=new Ot;return e.data=t,e}var xt=function(){function t(){}return t.prototype.getOriginOuterPath=function(){return this.data.originOuterPath},t.prototype.getOriginInnerHoles=function(){return this.data.originInnerHoles},t.prototype.getOriginSlots=function(){return this.data.originSlots},t.prototype.setOuterPath=function(t){mt(t,this.ref),this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Y.PLANK_PATH,attr:V.PATH},this.getOuterPath(),t),this.data.outerPath=t},t.prototype.setInnerHoles=function(t){var e=this;if(t.some((function(t){return!mt(t,e.ref)})))throw new Error("invalid path");this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Y.PLANK_PATH,attr:V.HOLES},this.getInnerHoles(),t),this.data.innerHoles=t},t.prototype.setSlots=function(t){var e=this;if(t.some((function(t){return!mt(t.path,e.ref)})))throw new Error("invalid slot path");this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Y.PLANK_PATH,attr:V.SLOTS},this.getSlots(),t),this.data.slots=t},t.prototype.getOuterPath=function(){return this.data.outerPath},t.prototype.getInnerHoles=function(){return this.data.innerHoles},t.prototype.getSlots=function(){return this.data.slots},t}();var Mt,Rt,Tt=function(){function t(t){this.option=t,this._changeMap={}}return Object.defineProperty(t.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),t.prototype.getRoot=function(t){var e=this.isRoot?this:this.root;if(t)for(var r;r=null==e?void 0:e.getParent();)e=r.getRoot()||e;return e},t.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===U.PARAM_PRIMITIVE)throw new Error("Primitive model do not support to clone!");var e=this.toJSON(),r=this.constructor.deserialize(JSON.stringify(e));return r._changeMap.cloned=!0,r._changeMap.forceUpdate=void 0,r._changeMap.originId||(r._changeMap.originId=r.id),r.id=function(){for(var t=0,e=0;e<36;e++)if(8===e||13===e||18===e||23===e)O[e]="-";else if(14===e)O[e]="4";else{t<=2&&(t=33554432+16777216*Math.random()|0);var r=15&t;t>>=4,O[e]=Q[19===e?3&r|8:r]}return O.join("")}(),r},t.prototype.getName=function(){return this.name},t.prototype.setName=function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.NAME},this.name,t),this.name=t},t.prototype.getRemark=function(){return this.remark},t.prototype.setRemark=function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.REMARK},this.remark,t),this.remark=t},t.prototype.setRotate=function(t){this.setRotation(t)},t.prototype.getRotate=function(){return this.getRotation()},t.prototype.setRotation=function(t){var e,r,n=this;if(null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate){var o=this.getRoot(!0).type,i=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(t){return t===n}));if((o===U.PARAM_ASSEMBLY||o===U.TEMPLATE_ASSEMBLY)&&i)throw new Error("Accessory under Assembly do not support to set rotation!")}this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.ROTATION,mutexAttr:H.ROTATION_FORMULA},this.rotation,t);var a=t.x,s=t.y,u=t.z;this.rotation={x:a,y:s,z:u}},t.prototype.getRotation=function(){return this.rotation},t.prototype.getRotationFormula=function(){return this.rotationFormula},t.prototype.setRotationFormula=function(t){var e=t.x,r=t.y,n=t.z;Qt(e,this),Qt(r,this),Qt(n,this),this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.ROTATION_FORMULA,mutexAttr:H.ROTATION},this.rotationFormula,t),this.rotationFormula={x:e,y:r,z:n}},t.prototype.setPosition=function(t){var e,r,n=this;if(null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate){var o=this.getRoot(!0).type,i=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(t){return t===n}));if((o===U.PARAM_ASSEMBLY||o===U.TEMPLATE_ASSEMBLY)&&i)throw new Error("Accessory under Assembly do not support to set position!")}this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.POSITION,mutexAttr:H.POSITION_FORMULA},this.position,t);var a=t.x,s=t.y,u=t.z;this.position={x:a,y:s,z:u}},t.prototype.getPosition=function(){return this.position},t.prototype.getPositionFormula=function(){return this.positionFormula},t.prototype.setPositionFormula=function(t){var e=t.x,r=t.y,n=t.z;Qt(e,this),Qt(r,this),Qt(n,this),this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.POSITION_FORMULA,mutexAttr:H.POSITION},this.positionFormula,t),this.positionFormula={x:e,y:r,z:n}},t.prototype.getToolType=function(){return this.toolType},t.prototype.setToolType=function(t){var e=function(t){return pt.get(t)}(t),r=(this.option||{}).allowToolTypes;if(this._origin===G.BRANDGOOD&&void 0!==e&&r){if(!r.includes(e))throw new Error("the custom model not support "+t+" tool");return this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.TOOL_TYPE},this.toolType,t),void(this.toolType=t)}throw new Error("the custom model not support set tool type!")},t.prototype.dispose=function(){if(this.getRoot()._origin!==G.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},t.prototype.getChild=function(){return this.children},t.prototype.getAccessory=function(){return this.accessories},t.prototype.appendChild=function(t){var e;if((null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate)&&Lt(this,t,!1),!this.children.some((function(e){return!e._changeMap.deleted&&e.id===t.id}))){t.isRoot||(t.root=this.isRoot?this:this.root),t._parent=this,this.children.push(t);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:q.CHILD,linkId:t.id})}},t.prototype.replaceChild=function(t,e,r){if(Lt(this,e,!1),!this.getChild().includes(t))throw new Error("The old model "+t.id+" with name "+t.name+" is not a submodel of the current model.");if(this.getChild().some((function(e){return e!==t&&e.id===t.id})))throw new Error("Models cannot be replaced with duplicates.");t.dispose(),e._changeMap.originId||(e._changeMap.originId=e.id),e.id=t.id,e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var n=this._changeMap.addNodes;n||(n=[],this._changeMap.addNodes=n),n.push({type:q.REPLACE_CHILD,linkId:e.id,option:r})},t.prototype.appendAccessory=function(t){var e;if((null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate)&&Lt(this,t,!0),!this.accessories.some((function(e){return e.id===t.id}))){t.root=void 0,t._parent=this,this.accessories.push(t);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:q.ACCESSORY,linkId:t.id})}},t.prototype.getParam=function(t){var e,r,n=this.params.get(t);if(!n)try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.params),i=o.next();!i.done;i=o.next()){var a=Bt(i.value,2)[1];if(a.getSimpleName()===t){n=a;break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n&&!n.ref&&(n.ref=this),n},t.prototype.hasParam=function(t){return this.params.has(t)},t.prototype.getBzProperty=function(t,e){var r,n=this.getRoot().option||{},o=D(t,null!==(r=null!=e?e:n.defaultNamespace)&&void 0!==r?r:""),i=this.bzProperties.get(o);return i&&!i.ref&&(i.ref=this),i},t.prototype.hasBzProperty=function(t,e){var r,n=this.getRoot().option||{},o=D(t,null!==(r=null!=e?e:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(o)},t.prototype.removeBzProperty=function(t,e){return!!this.hasBzProperty(t,e)&&(this.getBzProperty(t,e).remove(),!0)},t.prototype.getProductCode=function(){return this.productCode},t.prototype.toJSON=function(t,e){void 0===e&&(e=!0);var r=e&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,rotationFormula:r.rotationFormula,positionFormula:r.positionFormula,size:r.size,option:r.option,productCode:r.productCode,params:Array.from(r.params).map((function(t){var e=Bt(t,2);return[e[0],e[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(t){var e=Bt(t,2);return[e[0],e[1].toJSON()]})),plankPath:r._plankPath?r._plankPath.data:void 0,productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(t){return t.toJSON(void 0,!1)})),accessories:r.accessories.map((function(t){return t.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal,floorplanRelation:r.floorplanRelation,version:r.version};return e&&r!==this&&(n._currentId=this.id),n},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.deserialize=function(t){var e=this,r=JSON.parse(t);return function t(e,r,n,o){void 0===n&&(n=new Map);var i=r(e,o);i.id=e.id,i.type=e.type,i.name=e.name,i.remark=e.remark,i.position=e.position,i.rotation=e.rotation||e.rotate,i.size=e.size,i.params=new Map(e.params.map((function(t){return[t[0],Dt(t[1])]}))),i.bzProperties=new Map((e.bzProperties||[]).map((function(t){return[t[0],(e=t[1],r=new _t,Object.assign(r,e),r)];var e,r}))),i._plankPath=e.plankPath?function(t){var e=new xt;return e.data=t,e}(e.plankPath):void 0,i.positionFormula=e.positionFormula,i.rotationFormula=e.rotationFormula,i.productId=e.productId,i.category=e.category,i.isRoot=e.isRoot,i.modelType=e.modelType,i.isHidden=e.isHidden,i.toolType=e.toolType,i._origin=e._origin,i._changeMap=e._changeMap,i.legal=e.legal,i.productCode=e.productCode,i.floorplanRelation=e.floorplanRelation,i.version=e.version,!e.isRoot&&o&&(i.root=o);n.set(i.id,i);var a=i.isRoot?i:o;if(i.children=e.children.map((function(e){return t(e,r,n,a||i)})),i.accessories=e.accessories.map((function(e){return t(e,r,n,a||i)})),wt(i.children,i.accessories).forEach((function(t){return t._parent=i})),!o&&e._currentId&&n.has(e._currentId))return n.get(e._currentId);return i}(r,(function(t,n){return void 0===r._currentId&&!n||r._currentId===t.id?(e.option=t.option,e):new e.constructor(t.option)}))},t.serialize=function(t){return t.serialize()},t.deserialize=function(t){var e=new this;return e.deserialize(t),e},t.prototype.__trackUpdateField=function(t,e,r){var n=this._changeMap.update;n||(n=[]),n.some((function(e){return e.type===t.type&&e.attr===t.attr}))||e!==r&&(n.push(t),void 0!==t.mutexAttr&&(n=n.filter((function(e){return e.attr!=t.mutexAttr}))),this._changeMap.update=n)},t.prototype.getParent=function(){var t=this;if(this._parent)return this._parent;var e=function(e){return e.id===t.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var o=n.getChild(),i=n.getAccessory();if(o.some(e)||i.some(e))return this._parent=n,n;r.push.apply(r,wt(o)),r.push.apply(r,wt(i))}},t.prototype.forceUpdate=function(t){if(void 0===t&&(t=!0),!this.productId)throw new Error("When the model ("+this.id+") does not have the 'productId' attribute, it is not allowed to force an update.");if(this._origin!==G.SENSE||!this.isRoot)throw new Error("Force update is only supported for models ("+this.id+") included in the design.");this._changeMap.forceUpdate=t},t.prototype.getElementId=function(){var t=this.id,e=this.toolType,r=this.modelType;return r===W.ASSEMBLY||r===W.TEMPLATE_ASSEMBLY?{id:t,type:P.CustomGroup}:e?{id:t,type:yt(e)}:void 0},t.prototype.getPlankPathAsync=function(){return Ct(this,void 0,void 0,(function(){return bt(this,(function(t){throw new Error("not implemented")}))}))},t.prototype.getFloorplanRelation=function(){return this.floorplanRelation},t.prototype.setFloorplanRelation=function(t){throw new Error("not implemented")},t}();function Lt(t,e,r){var n=r?"accessory":"child";if([U.PARAM_ASSEMBLY,U.TEMPLATE_ASSEMBLY,U.PARAM_FURNITURE,U.PARAM_PRIMITIVE].includes(t.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model ("+t.id+") do not support to append "+n+"!");if(e.type===U.TEMPLATE_ASSEMBLY||e.type===U.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(e._origin===G.SENSE||e._origin===G.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!e.isRoot)throw new Error("Only root model can be append as "+n+"!");if(r&&e.type===U.PARAM_VIRTUAL)throw new Error("Virtual hardware does not support using appendAccessory. Please use the appendChild method instead.")}!function(t){t.Enterprise="enterprise",t.Public="public",t.Brand="brand",t.SupplyChain="supplyChain",t.My="my"}(Mt||(Mt={})),function(t){t[t.PRODUCT_LIBRARY=0]="PRODUCT_LIBRARY",t[t.ASSEMBLY_LIBRARY=1]="ASSEMBLY_LIBRARY",t[t.COMPONENT_LIBRARY=2]="COMPONENT_LIBRARY",t[t.TEXTURE_LIBRARY=3]="TEXTURE_LIBRARY",t[t.ALUMINIFEROUS_LIBRARY=4]="ALUMINIFEROUS_LIBRARY",t[t.RELATIONAL_COMPONENT_LIBRARY=5]="RELATIONAL_COMPONENT_LIBRARY",t[t.FITTING_PRODUCT_LIBRARY=6]="FITTING_PRODUCT_LIBRARY",t[t.MIX_LIBRARY=7]="MIX_LIBRARY",t[t.BOOL_MODELING_LIBRARY=8]="BOOL_MODELING_LIBRARY"}(Rt||(Rt={}));var jt,kt,Nt,Ft,Gt,Ut,zt,Yt,Ht,Vt,qt,Wt=[[Mt.Enterprise,"privateLibrary"],[Mt.Public,"publicLibrary"],[Mt.SupplyChain,"supplyChainLibrary"],[Mt.My,"personalLibrary"],[Mt.Brand,"brandLibrary"]];new Map(Wt);!function(t){t.publicLibrary="publicLibrary",t.privateLibrary="privateLibrary",t.myLibrary="myLibrary",t.coohomBrandHall="coohomBrandHall"}(jt||(jt={})),function(t){t[t.emergencyLevel=6]="emergencyLevel",t[t.receiptType=7]="receiptType"}(kt||(kt={})),function(t){t.Visible="visible",t.Editable="editable"}(Nt||(Nt={})),function(t){t[t.Hidden=0]="Hidden",t[t.Show=1]="Show"}(Ft||(Ft={})),function(t){t.ORDER="order-mini-app",t.QUOTATION="report-miniapp"}(Gt||(Gt={})),function(t){t[t.CONFIRMED=0]="CONFIRMED",t[t.ORDERED=1]="ORDERED",t[t.CLAIMED=2]="CLAIMED",t[t.PAY_PENDING=3]="PAY_PENDING",t[t.PAYED=4]="PAYED",t[t.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",t[t.REVIEWED=6]="REVIEWED",t[t.SPLIT_ORDER=7]="SPLIT_ORDER",t[t.RETURNED=8]="RETURNED",t[t.CANCELLED=9]="CANCELLED",t[t.BATCHED=10]="BATCHED",t[t.OPENED_MATERIAL=11]="OPENED_MATERIAL",t[t.EDGE_SEALED=12]="EDGE_SEALED",t[t.HOLES_ARRANGED=13]="HOLES_ARRANGED",t[t.PACKED=14]="PACKED",t[t.WAREHOUSED=15]="WAREHOUSED",t[t.SHIPPED=16]="SHIPPED",t[t.REVIEW_PENDING=17]="REVIEW_PENDING",t[t.CONFIRM_PENDING=18]="CONFIRM_PENDING",t[t.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",t[t.PAY_COLLECTED=20]="PAY_COLLECTED",t[t.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",t[t.COMPLETED=24]="COMPLETED"}(Ut||(Ut={})),function(t){t[t.OTHER=0]="OTHER",t[t.NATURAL=1]="NATURAL",t[t.MODEL_ROOM=2]="MODEL_ROOM",t[t.NEW_MEDIA=3]="NEW_MEDIA",t[t.LIVE=4]="LIVE",t[t.CROSS_COOP=5]="CROSS_COOP",t[t.TELEMARKETING=6]="TELEMARKETING",t[t.OLD_INTRODUCE=7]="OLD_INTRODUCE",t[t.REPURCHASE=8]="REPURCHASE"}(zt||(zt={})),function(t){t[t.FORWARD=0]="FORWARD",t[t.REVERSE=1]="REVERSE"}(Yt||(Yt={})),function(t){t[t.sys=0]="sys",t[t.custom=1]="custom"}(Ht||(Ht={})),function(t){t[t.DYNAMIC=0]="DYNAMIC",t[t.STATIC=1]="STATIC"}(Vt||(Vt={})),function(t){t.AUDIT_PASS="audit_pass",t.AUDIT_REJECT="audit_reject",t.RESUBMIT="resubmit"}(qt||(qt={}));var Kt,Jt,Xt,Zt,$t,te,ee;new Map([[qt.AUDIT_PASS,"pass"],[qt.AUDIT_REJECT,"reject"],[qt.RESUBMIT,"resubmit"]]);!function(t){t[t.DESIGN_ATTACHMENT=1]="DESIGN_ATTACHMENT",t[t.AUDIT=2]="AUDIT",t[t.SPLIT_ORDER_ATTACHMENT=3]="SPLIT_ORDER_ATTACHMENT",t[t.ORDER_ATTACHMENT=4]="ORDER_ATTACHMENT"}(Kt||(Kt={})),function(t){t[t.AUDIT=0]="AUDIT",t[t.ORDER_REMARK=1]="ORDER_REMARK",t[t.DESIGN_REMARK=2]="DESIGN_REMARK"}(Jt||(Jt={})),function(t){t.PASS="pass",t.REJECT="reject",t.RESUBMIT="resubmit",t.CREATE="create",t.ARRAIGNED="arraigned",t.CLAIM="claim",t.SEND_BACK="sendBack",t.CANCEL="cancel",t.PAY_REGISTER="payRegister",t.PAY_COLLECT_CONFIRM="payCollectConfirm",t.SPLIT_ORDER_CONFIRM="splitOrderConfirm",t.GEN_BATCH="genBatch",t.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",t.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",t.EDGE_SEALED_CONFIRM="edgeSealedConfirm",t.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",t.PICK_CONFIRM="pickConfirm",t.PACKED_CONFIRM="packedConfirm",t.WAREHOUSED_CONFIRM="warehousedConfirm",t.SHIPPED_CONFIRM="shippedConfirm",t.COMPLETED_CONFIRM="COMPLETED_CONFIRM",t.REVOKE="revoke",t.DESIGN_SUBMIT="designSubmit",t.EDIT="orderEdit"}(Xt||(Xt={})),function(t){t[t.CUSTOMER_NAME=1]="CUSTOMER_NAME",t[t.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",t[t.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(Zt||(Zt={})),function(t){t[t.MYSELF=1]="MYSELF",t[t.ALL=2]="ALL"}($t||($t={})),function(t){t[t.STR=0]="STR",t[t.INT=1]="INT",t[t.FLOAT=2]="FLOAT",t[t.BOOL=3]="BOOL"}(te||(te={})),function(t){t.API_CALL="API_CALL"}(ee||(ee={}));var re,ne,oe,ie,ae=function(){function t(){}return t.getEvent=function(){return t._event},t.setEvent=function(e){t._event=e},t.emitApiCalledEvent=function(e){var r=t.getEvent();r&&r.emit(e)},t.observeAsyncApiDeco=function(e){return function(r,n,o){return t.observeApiDeco(e)(r,n,o)}},t.observeSyncApiDeco=function(e){return function(r,n,o){return t.observeApiDeco(e)(r,n,o)}},t.observeApiDeco=function(e){return function(r,n,o){var i,a,s,u,c=o.value;return o.value=(i=c,s=Pt((a={beforeCalled:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return{apiName:c.name,status:!0,args:t,start:Date.now()}},afterCalled:function(r,o,i,a){t.emitApiCalledEvent(Et(Et({args:i,errMsg:r,status:!r,duration:Date.now()-o.start,return:a},{apiName:o.apiName||n}),e))}}).beforeCalled),u=Pt(a.afterCalled),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=s.apply(void 0,wt(t)),n=!1,o=function(){n=!0};try{var a=i.apply(this,t);if(St(a))return a.then((function(e){var i=u(void 0,r,t,e,{preventDefaultRet:o});return n?i:e})).catch((function(e){return u(e,r,t),Promise.reject(e)}));var c=u(void 0,r,t,a,{preventDefaultRet:o});return n?c:a}catch(e){throw u(e,r,t),e}}),o}},t}();!function(t){t[t.CABINET=0]="CABINET",t[t.WARDROBE=1]="WARDROBE",t[t.DOOR_WINDOW=2]="DOOR_WINDOW",t[t.CABINET_COPY=4]="CABINET_COPY",t[t.WARDROBE_COPY=5]="WARDROBE_COPY",t[t.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(re||(re={})),function(t){t[t.ADD=0]="ADD",t[t.UPDATE=1]="UPDATE",t[t.REMOVE=2]="REMOVE",t[t.NONE=3]="NONE"}(ne||(ne={})),function(t){t[t.CROWN=0]="CROWN",t[t.LIGHT=1]="LIGHT",t[t.SKIRT=2]="SKIRT",t[t.COUNTERTOP=3]="COUNTERTOP"}(oe||(oe={})),function(t){t.ZH_CN="zh_CN",t.EN_US="en_US",t.DE_DE="de_DE",t.FR_FR="fr_FR",t.JA_JP="ja_JP",t.ZH_TW="zh_TW",t.RU_RU="ru_RU",t.KO_KR="ko_KR",t.ES_ES="es_ES",t.AR_EG="ar_EG",t.EN_CN="en_CN",t.VI="vi"}(ie||(ie={}));var se,ue,ce,Ae,le="$$geometry_color",fe="$$geometry_opacity",he=[596,2048,2049];!function(t){t[t.TOP=0]="TOP",t[t.LEFT=1]="LEFT",t[t.FRONT=2]="FRONT",t[t.RIGHT=3]="RIGHT",t[t.BACK=4]="BACK",t[t.BOT=5]="BOT"}(se||(se={})),function(t){t.CUSTOM="custom",t.TOP_MODEL="top_model",t.ACCESSORY="accessory",t.PRODUCT="product"}(ue||(ue={})),function(t){t.CLICK="click",t.DB_CLICK="double_click"}(ce||(ce={})),function(t){t.PARAM_MODEL="param_model",t.PARAM_MODEL_ASSEMBLY="param_model_assembly",t.FITTING_MODEL="fitting_model"}(Ae||(Ae={}));var pe,de,ge,ye,ve,me,Ie,Ee,Ce=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(t){t[t.Perspective=0]="Perspective",t[t.Orthographic=1]="Orthographic"}(pe||(pe={})),function(t){t[t.Default=0]="Default",t[t.Classical=1]="Classical"}(de||(de={})),function(t){t.V1="v1",t.V2="v2"}(ge||(ge={})),function(t){t.INNER="inner",t.OUTER="outer"}(ye||(ye={})),function(t){t.X="DirectionX",t.Y="DirectionY",t.Z="DirectionZ"}(ve||(ve={})),function(t){t.PARAM_MODEL="paramModel",t.PARAM_MODEL_ASSEMBLY="paramModelAssembly",t.HOLE="hole",t.GROOVE="groove",t.HARDWARE="hardware",t.HARDWARE_GROOVE="hardwareGroove",t.HOLE_V2="holeV2",t.SQUARE_GROOVE="squareGroove",t.ROUND_CORNER_GROOVE="roundCornerGroove",t.SPECIAL_SHAPED_GROOVE="specialShapedGroove",t.PATH_GROOVE="pathGroove"}(me||(me={})),(Ee=Ie||(Ie={})).Bottom="bottom",Ee.Front="front",Ee.Left="left",Ee.Right="right",Ee.Back="back",Ee.Top="top";var be=r(111),Be=r(120),we=r(88),Pe=r(233),Se=r(9),_e=r(114);function Qe(t){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,De(n.key),n)}}function De(t){var e=function(t,e){if("object"!=Qe(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qe(e)?e:String(e)}function xe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Me(t,e){return(Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Re(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Le(t);if(e){var o=Le(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Te(this,r)}}function Te(t,e){if(e&&("object"===Qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Le(t){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var je=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Me(t,e)}(i,t);var e,r,n,o=Re(i);function i(){return xe(this,i),o.apply(this,arguments)}return e=i,r&&Oe(e.prototype,r),n&&Oe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(_e.CoreCustom),ke=r(503),Ne=r(189),Fe=r.n(Ne),Ge=r(908);function Ue(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ze(n.key),n)}}function ze(t){var e=function(t,e){if("object"!=Je(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Je(e)?e:String(e)}function Ye(){return(Ye="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=He(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function He(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ke(t)););return t}function Ve(t,e){return(Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ke(t);if(e){var o=Ke(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return We(this,r)}}function We(t,e){if(e&&("object"===Je(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ke(t){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Je(t){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Xe,Ze=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Je(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},$e=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Je(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},tr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ve(t,e)}(i,t);var e,r,n,o=qe(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).doc=new ke.CDoc,t.versionStore=new Ge.VersionStore,t.setCustom(new je),t.setContextProvider(t.doc.getElementContext),t}return e=i,(r=[{key:"compareVersion",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return Ye(Ke(i.prototype),"compareVersion",this).call(this,t)&&this.custom.compareVersion(t)}},{key:"exportVersion",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;t.clear(),Ye(Ke(i.prototype),"exportVersion",this).call(this,t),this.custom.exportVersion(t)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(t){return this.custom&&this.custom.setContextProvider(),this.custom=t.setContextProvider(this.provideContext()),this}}])&&Ue(e.prototype,r),n&&Ue(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Fe.a);Ze([Object(Ne.property)(),$e("design:type","function"==typeof(Xe=void 0!==je&&je)?Xe:Object)],tr.prototype,"custom",void 0);var er=r(243),rr=r.n(er),nr=r(8);function or(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ir(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ar(n.key),n)}}function ar(t){var e=function(t,e){if("object"!=lr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lr(e)?e:String(e)}function sr(t,e){return(sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ur(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ar(t);if(e){var o=Ar(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cr(this,r)}}function cr(t,e){if(e&&("object"===lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ar(t){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function lr(t){return(lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fr,hr=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},pr=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},dr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sr(t,e)}(i,t);var e,r,n,o=ur(i);function i(){var t;return or(this,i),(t=o.apply(this,arguments)).outlineMode=nr.OutlineMode.Outlined,t.linkedIds=[],t}return e=i,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(t){this.isAppendHardware=t}},{key:"setLinkedIds",value:function(t){this.linkedIds=t}},{key:"setHardwareData",value:function(t){this.hardwareData=t}},{key:"setHardwareVersion",value:function(t){this.hardwareVersion=t}}])&&ir(e.prototype,r),n&&ir(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(rr.a);function gr(t){return(gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mr(n.key),n)}}function mr(t){var e=function(t,e){if("object"!=gr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gr(e)?e:String(e)}function Ir(t,e){return(Ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Er(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=br(t);if(e){var o=br(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Cr(this,r)}}function Cr(t,e){if(e&&("object"===gr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function br(t){return(br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}hr([Object(Ne.property)(),pr("design:type",Boolean)],dr.prototype,"isAppendHardware",void 0),hr([Object(Ne.property)(),pr("design:type","function"==typeof(fr=void 0!==nr.OutlineMode&&nr.OutlineMode)?fr:Object)],dr.prototype,"outlineMode",void 0);var Br,wr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ir(t,e)}(i,t);var e,r,n,o=Er(i);function i(){return yr(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"paramModelConstructor",get:function(){return dr}}])&&vr(e.prototype,r),n&&vr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_e.CoreParamModelAssembly),Pr=r(157),Sr=new Pr.EventEmitter;!function(t){t.FITTING_MODEL_CHANGE="fittingModelChange",t.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",t.PLANK_FACE_CLICK="plankFaceClick",t.PLANK_FACE_HOVER="plankFaceHover",t.API_CALLED="apiCalled",t.DETECT_RESULT_CHANGE="detectResultChange"}(Br||(Br={}));var _r=r(60),Qr=r(11),Or=r(506),Dr=Object(Or.createKElementBaseClass)(),xr=_r.advanced.reportObserved,Mr=_r.advanced.reportChanged;function Rr(t){return function(t){if(Array.isArray(t))return Tr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Tr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tr(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jr(n.key),n)}}function jr(t){var e=function(t,e){if("object"!=Ur(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ur(e)?e:String(e)}function kr(t,e){return(kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Nr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Gr(t);if(e){var o=Gr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fr(this,r)}}function Fr(t,e){if(e&&("object"===Ur(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Gr(t){return(Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ur(t){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Dr.onGet=function(t){xr(t)},Dr.addSetHook((function(t){Mr(t)}));var zr=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ur(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Yr=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Ur(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};function Hr(t,e,r){var n=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var o=n.apply(this,e);return Sr.emit(Br.FITTING_MODEL_CHANGE),o}}var Vr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(i,t);var e,r,n,o=Nr(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).setFittings([]),t.setIntersects([]),t.setGrooveFittings([]),t.setPlankFaceHintModels([]),t.setFittingHintModels([]),t.setPlankOutlineHintModels([]),t.setHoleModels([]),t.setSquareGrooveModels([]),t.setRoundCornerGrooveModels([]),t.setSpecialShapedGrooveModels([]),t.setPathGrooveModels([]),t.setPlankAreaFaceHints([]),t}return e=i,(r=[{key:"getFittings",value:function(t){if(t){if("ids"in t)return this.fittings.filter((function(e){return t.ids.includes(e.id)}));if("types"in t)return this.fittings.filter((function(e){return t.types.includes(e.type)}))}return this.fittings}},{key:"setFittings",value:function(t){this.fittings=t}},{key:"addFittings",value:function(t){this.fittings=[].concat(Rr(t),Rr(this.fittings))}},{key:"removeFittings",value:function(t){var e=Object(Qr.difference)(this.fittings,this.getFittings(t));this.setFittings(e)}},{key:"setIntersects",value:function(t){this.intersects=t}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(t){this.grooveFittings=t}},{key:"addGrooveFittings",value:function(t){this.grooveFittings=[].concat(Rr(this.grooveFittings),Rr(t))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(t){this.plankFaceHintModels=t}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(t){this.fittingHintModels=t}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(t){this.plankOutlineHintModels=t}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}},{key:"getHoleModels",value:function(){return this.holeModels}},{key:"setHoleModels",value:function(t){this.holeModels=t}},{key:"addHoleModels",value:function(t){this.holeModels=[].concat(Rr(this.holeModels),Rr(t))}},{key:"getSquareGrooveModels",value:function(){return this.squareGrooveModels}},{key:"setSquareGrooveModels",value:function(t){this.squareGrooveModels=t}},{key:"addSquareGrooveModels",value:function(t){this.squareGrooveModels=[].concat(Rr(this.squareGrooveModels),Rr(t))}},{key:"getRoundCornerGrooveModels",value:function(){return this.roundCornerGrooveModels}},{key:"setRoundCornerGrooveModels",value:function(t){this.roundCornerGrooveModels=t}},{key:"addRoundCornerGrooveModels",value:function(t){this.roundCornerGrooveModels=[].concat(Rr(this.roundCornerGrooveModels),Rr(t))}},{key:"getSpecialShapedGrooveModels",value:function(){return this.specialShapedGrooveModels}},{key:"setSpecialShapedGrooveModels",value:function(t){this.specialShapedGrooveModels=t}},{key:"addSpecialShapedGrooveModels",value:function(t){this.specialShapedGrooveModels=[].concat(Rr(this.specialShapedGrooveModels),Rr(t))}},{key:"getPathGrooveModels",value:function(){return this.pathGrooveModels}},{key:"setPathGrooveModels",value:function(t){this.pathGrooveModels=t}},{key:"addPathGrooveModels",value:function(t){this.pathGrooveModels=[].concat(Rr(this.pathGrooveModels),Rr(t))}},{key:"setPlankAreaFaceHints",value:function(t){this.plankAreaFaceHints=t}},{key:"getPlankAreaFaceHints",value:function(){return this.plankAreaFaceHints}}])&&Lr(e.prototype,r),n&&Lr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"fittings",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"intersects",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"grooveFittings",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"plankFaceHintModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"fittingHintModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"plankOutlineHintModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"holeModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"squareGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"roundCornerGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"specialShapedGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"pathGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"plankAreaFaceHints",void 0),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"setFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"addFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Object]),Yr("design:returntype",void 0)],Vr.prototype,"removeFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"setGrooveFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"addGrooveFittings",null);var qr={},Wr={};function Kr(t,e,r){void 0===r&&(r=Or.TrackablePropertyLevel.MODEL),Object.defineProperty(t,e,function(t,e){var r=e===Or.TrackablePropertyLevel.ALL?Wr:qr;return r[t]||(r[t]={configurable:!0,enumerable:!0,get:function(){return this.trackableGet(t,e)},set:function(r){this.trackableSet(t,r,e)}})}(e,r))}var Jr=r(143);function Xr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zr(n.key),n)}}function Zr(t){var e=function(t,e){if("object"!=nn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==nn(e)?e:String(e)}function $r(t,e){return($r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rn(t);if(e){var o=rn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return en(this,r)}}function en(t,e){if(e&&("object"===nn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rn(t){return(rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function nn(t){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var on=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":nn(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},an=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":nn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},sn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$r(t,e)}(i,t);var e,r,n,o=tn(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var r=Object(Jr.default)();return e.setId(r),e.linkModel=t.linkModel,e.hintOutline=t.hintOutline,e.visible=t.linkModel instanceof rr.a?!t.linkModel.getInvisible():t.linkModel.visible,e}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}}])&&Xr(e.prototype,r),n&&Xr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function un(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cn(n.key),n)}}function cn(t){var e=function(t,e){if("object"!=pn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pn(e)?e:String(e)}function An(t,e){return(An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ln(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hn(t);if(e){var o=hn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(t,e){if(e&&("object"===pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hn(t){return(hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pn(t){return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}on([Kr,an("design:type",Object)],sn.prototype,"linkModel",void 0),on([Kr,an("design:type","function"!=typeof!1&&Object)],sn.prototype,"hintOutline",void 0),on([Kr,an("design:type",Boolean)],sn.prototype,"visible",void 0);var dn,gn,yn,vn,mn=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pn(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},In=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},En=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}(i,t);var e,r,n,o=ln(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).fittingData=n,a.visible=!1,a.viewColor=0,a.opacity=1;var s=r.position,u=r.size,c=r.rotate,A=r.height,l=r.boundingBox,f=t||Object(Jr.default)();return a.setId(f),a.position=s instanceof Se.default?s:new Se.default(s),a.size=u instanceof Se.default?u:new Se.default(u),a.rotate=c instanceof Se.default?c:new Se.default(u),a.height=A,a.type="fittingType"in n?n.fittingType:J.INTERSECTED,a.visible=a.type!==J.INTERSECTED,a.linkParamModelId=e,a.boundingBox=l,a}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}},{key:"setViewColor",value:function(t){this.viewColor=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&un(e.prototype,r),n&&un(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);mn([Kr,In("design:type","function"==typeof(dn=void 0!==Se.default&&Se.default)?dn:Object)],En.prototype,"position",void 0),mn([Kr,In("design:type","function"==typeof(gn=void 0!==Se.default&&Se.default)?gn:Object)],En.prototype,"size",void 0),mn([Kr,In("design:type",Number)],En.prototype,"height",void 0),mn([Kr,In("design:type","function"==typeof(yn=void 0!==J&&J)?yn:Object)],En.prototype,"type",void 0),mn([Kr,In("design:type","function"==typeof(vn=void 0!==Se.default&&Se.default)?vn:Object)],En.prototype,"rotate",void 0),mn([Kr,In("design:type",Number)],En.prototype,"radius",void 0),mn([Kr,In("design:type",Object)],En.prototype,"visible",void 0),mn([Kr,In("design:type",Object)],En.prototype,"viewColor",void 0),mn([Kr,In("design:type",Object)],En.prototype,"opacity",void 0);var Cn=r(13);function bn(t){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return wn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Pn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sn(n.key),n)}}function Sn(t){var e=function(t,e){if("object"!=bn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bn(e)?e:String(e)}var _n=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=0,this.clockwise=e.clockwise,this.type=e.type,this.radius=e.radius,this.minorArc=e.minorArc,this.majorRadius=e.majorRadius,this.minorRadius=e.minorRadius,this.ellipseCenter=e.ellipseCenter,this.path=r,this.id=Object(Jr.default)()}var e,r,n;return e=t,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var t=this.start,e=this.end;return t&&e?function(t,e){return new c.Vector2d(e.x-t.x,e.y-t.y)}(t.getPosition(),e.getPosition()):new c.Vector2d}},{key:"getRealLine",value:function(){var t=Bn(this.start.getPointsForRender(),2)[1],e=Bn(this.end.getPointsForRender(),1)[0];return this.getType()===lt.SEGMENT?new c.LineSeg2d(t,e):this.getType()===lt.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var t=new c.CCS2d(new c.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new c.Vector2d(1,0)),e=new c.Ellipse2d(t,this.majorRadius,this.minorRadius);return c.EllipticalArc2d.makeByStartEndPoints(e,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var t,e,r=this.start,n=this.end,o=this.getType(),i=r.getPosition(),a=n.getPosition();if(o!==lt.CIRCLE_ARC||(e=a,(t=i).x===e.x&&t.y===e.y&&0===this.radius))return new c.LineSeg2d(i,a);var s,u,A,l,f,h,p,d,g,y,v,m=this.getVector().length/2;return this.radius<m&&(this.radius=m),s=this.radius,u=i,A=a,l=this.minorArc,f=this.clockwise,h=new c.LineSeg2d(u,A),p=h.length/2,d=h.getPoint(p),g=Math.sqrt(s*s-p*p),y=(f?l?h.rightNormal:h.leftNormal:l?h.leftNormal:h.rightNormal).multiplied(g/h.leftNormal.length),v=d.added(y),c.Arc2d.makeArcByStartEndPoints(v,u,A,!f)}},{key:"getLineLength",value:function(){var t=this.getRealLine();return t?new c.LineSeg2d(t.startPoint,t.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Bn(this.start.getPointsForRender(),2)[1],Bn(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(t){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,t),this.hint=t}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Pn(e.prototype,r),n&&Pn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qn(t){return(Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function On(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Dn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mn(n.key),n)}}function Mn(t){var e=function(t,e){if("object"!=Qn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qn(e)?e:String(e)}var Rn=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.clockwise=!!e.clockwise,this.type=e.type,this.position=new c.Point2d(e.position),this.radius=e.radius,this.cornerCutDistance=e.cornerCutDistance,this.path=r,this.majorRadius=e.majorRadius,this.minorRadius=e.minorRadius,this.offset=new c.Vector2d(e.offset||{x:0,y:0}),this.id=Object(Jr.default)()}var e,r,n;return e=t,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===At.NONE)return 0;var t=this.getCurveLineAndPoints().curveLine;return new c.LineSeg2d(t.startPoint,t.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var t=this.clockwise,e=this.prevLine,r=this.nextLine,n=this.offset,o=this.getType(),i=this.getPosition(),a=this.getPointsForRender(),s=On(a,2),u=s[0],A=s[1];if(o===At.CIRCLE||o===At.CUT_CIRCLE){if(o===At.CIRCLE){var l=e.getVector().getPerpVector(),f=r.getVector().getPerpVector();if(l.isParallel(f))return{curveLine:c.Arc2d.makeArcByStartEndPoints(u,u,A,!0),renderPoints:a};var h=new c.Line2d(u,l),p=new c.Line2d(A,f),d=On(h.intersectCurve(p),1)[0];if(!d)return{curveLine:new c.LineSeg2d(u,A),renderPoints:a};var g=c.Arc2d.makeArcByStartEndPoints(d.point,u,A,!1);return this.radius=void 0===this.radius?g.radius:this.radius,Math.abs(g.arcAngle)>Math.PI&&(g=c.Arc2d.makeArcByStartEndPoints(d.point,u,A,!0)),{curveLine:g,renderPoints:a}}return{curveLine:c.Arc2d.makeArcByStartEndPoints(i.added(n),u,A,!t),renderPoints:a}}if(o===At.ELLIPSE){var y=i.added(n),v=new c.CCS2d(new c.Point2d(y.x,y.y),new c.Vector2d(1,0)),m=new c.Ellipse2d(v,this.majorRadius,this.minorRadius);return{curveLine:c.EllipticalArc2d.makeByStartEndPoints(m,u,A,!t),renderPoints:a}}return{curveLine:new c.LineSeg2d(u,A),renderPoints:a}}},{key:"getPointsForRender",value:function(){var t=this.radius,e=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,o=void 0===n?[0,0]:n,i=this.offset,a=this.getType(),s=this.getPosition();if(a===At.NONE)return[s,s];if(!e||!r)return[s,s];var u=new c.Ray2d(e.end.getPosition(),e.getVector().reversed()),A=new c.Ray2d(r.start.getPosition(),r.getVector());if(a===At.LINE)return[u.getPoint(o[0]),A.getPoint(o[1])];if(a===At.CIRCLE){if(void 0!==t){var l=u.direction,f=A.direction,h=l.angleTo(f),p=Math.abs(t/Math.tan(h/2));return[u.getPoint(p),A.getPoint(p)]}if(o)return[u.getPoint(o[0]),A.getPoint(o[0])]}if(a===At.CUT_CIRCLE){var d=s.added(i),g=new c.Circle2d(d,t),y=g.intersectCurve(u),v=g.intersectCurve(A);if(y.length&&v.length)return[y[0].point,v[0].point]}if(a===At.ELLIPSE){var m=s.added(i),I=new c.CCS2d(new c.Point2d(m.x,m.y),new c.Vector2d(1,0)),E=new c.Ellipse2d(I,this.majorRadius,this.minorRadius),C=E.intersectCurve(u),b=E.intersectCurve(A);if(C.length&&b.length)return[C[0].point,b[0].point]}return[s,s]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(t){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,t),this.hint=t}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&xn(e.prototype,r),n&&xn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Tn(t){return(Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ln(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jn(t,e,r){return(e=zn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kn(t){return function(t){if(Array.isArray(t))return Gn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Fn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nn(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Fn(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Fn(t,e){if(t){if("string"==typeof t)return Gn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gn(t,e):void 0}}function Gn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Un(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zn(n.key),n)}}function zn(t){var e=function(t,e){if("object"!=Tn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Tn(e)?e:String(e)}var Yn=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(t,e,r){e.getType()===At.NONE&&(t=t.concat(e.getPosition())),e.getType()===At.LINE&&(t=t.concat(e.getPointsForRender())),e.getType()!==At.CIRCLE&&e.getType()!==At.CUT_CIRCLE||(t=t.concat(e.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=e.nextLine;if(!n)return t;if(n.getType()===lt.CIRCLE_ARC){var o=n.getCurveLine().getApproximatePoints();t=t.concat(o.slice(1,o.length-1))}return t}),[])},this.getEdges=function(){var t,e=r.getPoints(),n=r.getLines(),o=[],i=Nn(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;a.getType()!==At.NONE&&o.push(a.getCurveLineAndPoints().curveLine)}}catch(t){i.e(t)}finally{i.f()}var s,u=Nn(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;o.push(c.getRealLine())}}catch(t){u.e(t)}finally{u.f()}return o},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(t){return new c.Point3d(t.x,t.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(t){return new c.Point3d(t.x,t.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=e.type,o=e.points,i=void 0===o?[]:o,a=e.lines,s=void 0===a?[]:a,u=e.forceCCW,A=void 0===u||u,l=e.depth,f=e.matrix4,h=e.offset;if(this.id=Object(Jr.default)(),this.type=n,this.depth=l,this.matrix4=f,this.offset=h,this.setPoints(i),this.setLines(s),this.linkPointsAndLines(),A){var p=c.GeomLoop2d.makeByPoints(this.getPoints().map((function(t){return t.getPosition()})));p.isSelfIntersect()||p.isCCW()||this.turnover()}this.forceCCW=A,this.adjustClockwise()}var e,r,n;return e=t,(r=[{key:"points",get:function(){return this._points},set:function(t){this.setPoints(t)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(t){var e=this;this._points=t,t.forEach((function(t){t.path=e})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(t){this.setLines(t)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(t){var e=this;this._lines=t,t.forEach((function(t){t.path=e})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(t){return t.clockwise=!t.clockwise,t})));var t=this.getLines().slice().reverse().map((function(t){return t.clockwise=!t.clockwise,t}));this.setLines(t.slice(1).concat(t[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var t=this,e=this.getLines(),r=this.getPoints();r.forEach((function(t){t.prevLine=void 0,t.nextLine=void 0})),e.forEach((function(n,o){n.start=void 0,n.end=void 0;var i,a=r[o];i=o===e.length-1&&t.isClosedPath()?r[0]:r[o+1],n.path=t,a.path=t,i.path=t,a.nextLine=n,i.prevLine=n,n.start=a,n.end=i}))}},{key:"getAllRenderPoints",value:function(){var t=[];return this.getPoints().forEach((function(e){e.getType()!==At.NONE?t.push.apply(t,kn(e.getPointsForRender())):t.push(e.getPosition())})),t}},{key:"getAllRealPathCurves",value:function(){var t=[];return this.getLines().forEach((function(e){var r,n;if((null===(r=e.start)||void 0===r?void 0:r.getType())!==At.NONE){var o=null===(n=e.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;o&&t.push(o)}var i=e.getRealLine();t.push(i)})),t}},{key:"transformPathToFace2D",value:function(){var t={loops:[]};return t.loops.push(this.getAllRealPathCurves()),t}},{key:"transformPathToGeomLoop2d",value:function(){return new c.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var t=new c.BBox2d;return this.getPoints().forEach((function(e){e.getType()!==At.NONE&&t.merge(e.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(e){t.merge(e.getRealLine().getBounding())})),t}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var t=c.GeomLoop2d.makeByPoints(this.getPoints().map((function(t){return t.getPosition()})));if(!t.isSelfIntersect()&&!t.isCCW()){this.setPoints(this.getPoints().slice().reverse());var e=this.getLines().slice().reverse();this.setLines(e.slice(1).concat(e[0]).map((function(t){return t.type===lt.CIRCLE_ARC&&(t.clockwise=!t.clockwise),t}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var t=this.getPoints(),e=this.getLines(),r=function(t){return{curve:t.getRealLine(),source:t}};return t.reduce((function(t,n,o){var i;n.getType()!==At.NONE&&(i={curve:n.getCurveLineAndPoints().curveLine,source:n});var a=i?[i]:[];return t.concat(e[o]?[].concat(a,[r(e[o])]):[].concat(a))}),[]).concat(e.slice(t.length).map(r))}},{key:"getRedundantPoints",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var o=this.getPoints().indexOf(t);if(-1===o)return[];var i=[];return(r?[1]:[1,-1]).forEach((function(r){var a=(o+r+n)%n,s=e.getPoints()[a];t.getPosition().isEqual(s.getPosition(),1)&&(s.nextLine.getType()!==lt.SEGMENT?i.push(t):i.push(s))})),i}},{key:"getRenderPoints",value:function(){var t=[];return this.points.forEach((function(e){e.getType()===At.NONE?t.push(e.getPosition()):t.push.apply(t,kn(e.getRenderPoints()))})),t}}])&&Un(e.prototype,r),n&&Un(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Hn(t,e){var r=e.paramPoints.map((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ln(Object(r),!0).forEach((function(e){jn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ln(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t);return 0==e.radius&&[At.CIRCLE,At.CUT_CIRCLE,At.ELLIPSE].includes(e.type)&&(e.type=At.NONE),new Rn(e)})),n=e.paramPathLines.map((function(t){return new _n(t)}));return new Yn({type:t,offset:e.offset,points:r,lines:n,forceCCW:!1})}function Vn(t){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wn(n.key),n)}}function Wn(t){var e=function(t,e){if("object"!=Vn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vn(e)?e:String(e)}var Kn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=e.type,n=e.bulge,o=e.isCCW,i=e.minorArc,a=e.radius;this.type=r,this.bulge=n,this.isCCW=o,this.minorArc=i,this.radius=a}var e,r,n;return e=t,(r=[{key:"getCurveLine",value:function(){var t=this.type,e=this.start,r=this.end,n=this.bulge,o=this.isCCW,i=this.minorArc,a=this.radius,s=e.getPosition(),u=r.getPosition();if(t===C.LineSeg)return new c.LineSeg2d(s,u);if(t===C.Arc){if(void 0!==n){var A=new c.LineSeg2d(s,u);return c.Arc2d.makeArcByChordAndBulge(A,n)}if(void 0!==o&&void 0!==i&&void 0!==a)return c.Arc2d.makeArcByTwoPointsAndRadius(s,u,a,i,o)}throw new Error("points/curves data error!")}}])&&qn(e.prototype,r),n&&qn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Jn(t){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zn(n.key),n)}}function Zn(t){var e=function(t,e){if("object"!=Jn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Jn(e)?e:String(e)}var $n=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getLines().reduce((function(t,e){var r=e.getCurveLine();return r instanceof c.LineSeg2d&&(t=t.concat(r.startPoint,r.endPoint)),r instanceof c.Arc2d&&(t=t.concat(r.getApproximatePoints())),t}),[])};var n=e.points,o=void 0===n?[]:n,i=e.lines,a=void 0===i?[]:i,s=e.depth,u=e.matrix4;this.id=Object(Jr.default)(),this.depth=s,this.matrix4=u,this.setPoints(o),this.setLines(a),this.linkPointsAndLines()}var e,r,n;return e=t,(r=[{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(t){var e=this;this._points=t,t.forEach((function(t){t.path=e}))}},{key:"lines",get:function(){return this.getLines()},set:function(t){this.setLines(t)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(t){var e=this;this._lines=t,t.forEach((function(t){t.path=e}))}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var t=this,e=this.getLines(),r=this.getPoints();r.forEach((function(t){t.prevLine=void 0,t.nextLine=void 0})),e.forEach((function(n,o){n.start=void 0,n.end=void 0;var i,a=r[o];i=o===e.length-1&&t.isClosedPath()?r[0]:r[o+1],n.path=t,a.path=t,i.path=t,a.nextLine=n,i.prevLine=n,n.start=a,n.end=i}))}}])&&Xn(e.prototype,r),n&&Xn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function to(t){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ro(n.key),n)}}function ro(t){var e=function(t,e){if("object"!=to(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=to(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==to(e)?e:String(e)}var no=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.position=new c.Point2d(e.position)}var e,r,n;return e=t,(r=[{key:"getPosition",value:function(){return this.position}}])&&eo(e.prototype,r),n&&eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function oo(t){return function(t){if(Array.isArray(t))return io(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return io(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return io(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function io(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ao(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,so(n.key),n)}}function so(t){var e=function(t,e){if("object"!=fo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fo(e)?e:String(e)}function uo(t,e){return(uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function co(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lo(t);if(e){var o=lo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ao(this,r)}}function Ao(t,e){if(e&&("object"===fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lo(t){return(lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fo(t){return(fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ho,po,go=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":fo(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yo=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":fo(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uo(t,e)}(i,t);var e,r,n,o=co(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).viewColor=0,e.visible=!1;var r=t.data,n=t.path,a=t.model;return e.setId(r.id),e.type=J.HARDWARE_GROOVE,e.path=n,e.depth=r.depth,e.model=a,e.linkParamModelId=a.id,e.fittingData=r,e}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))}},{key:"getBottomRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,-t.depth).appliedMatrix4(e)}))}},{key:"pointToGlobalMatrix",value:function(){var t=new c.Matrix4,e=this.model.getSize();return t.fromArray(oo(this.model.getConcatenatedMatrix().multiply((new we.default).makeTranslation(new Se.default(-e.x/2,e.y/2,-e.z/2))).elements.values())),t.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(t){this.viewColor=t}},{key:"setOpacity",value:function(t){this.opacity=t}},{key:"setVisible",value:function(t){this.visible=t}}])&&ao(e.prototype,r),n&&ao(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);go([Kr,yo("design:type",Object)],vo.prototype,"viewColor",void 0),go([Kr,yo("design:type",Object)],vo.prototype,"visible",void 0),go([Kr,yo("design:type","function"==typeof(ho=void 0!==J&&J)?ho:Object)],vo.prototype,"type",void 0),go([Kr,yo("design:type","function"==typeof(po=void 0!==Yn&&Yn)?po:Object)],vo.prototype,"path",void 0),go([Kr,yo("design:type",Number)],vo.prototype,"depth",void 0),go([Kr,yo("design:type",Number)],vo.prototype,"opacity",void 0);var mo=r(274),Io=r.n(mo);function Eo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Co(n.key),n)}}function Co(t){var e=function(t,e){if("object"!=So(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=So(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==So(e)?e:String(e)}function bo(t,e){return(bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Po(t);if(e){var o=Po(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wo(this,r)}}function wo(t,e){if(e&&("object"===So(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Po(t){return(Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function So(t){return(So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _o,Qo,Oo,Do,xo,Mo=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":So(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ro=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":So(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},To=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bo(t,e)}(i,t);var e,r,n,o=Bo(i);function i(t,e,r,n,a,s,u){var c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this)).viewColor=0;var A=t||Object(Jr.default)();return c.setId(A),c.position=r instanceof Se.default?r:new Se.default(r),c.size=a instanceof Se.default?a:new Se.default(a),c.rotate=n instanceof Se.default?n:new Se.default(a),c.type=e,c.geometryModel=s,c.originPoints=u,c.bbox=new be.default(c.size.clone(),c.position.clone(),c.rotate.clone()),c}return e=i,(r=[{key:"setViewColor",value:function(t){this.viewColor=t}}])&&Eo(e.prototype,r),n&&Eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Lo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jo(n.key),n)}}function jo(t){var e=function(t,e){if("object"!=Uo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uo(e)?e:String(e)}function ko(t,e){return(ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function No(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Go(t);if(e){var o=Go(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fo(this,r)}}function Fo(t,e){if(e&&("object"===Uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Go(t){return(Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uo(t){return(Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Mo([Kr,Ro("design:type","function"==typeof(_o=void 0!==X&&X)?_o:Object)],To.prototype,"type",void 0),Mo([Kr,Ro("design:type","function"==typeof(Qo=void 0!==Se.default&&Se.default)?Qo:Object)],To.prototype,"position",void 0),Mo([Kr,Ro("design:type","function"==typeof(Oo=void 0!==Se.default&&Se.default)?Oo:Object)],To.prototype,"size",void 0),Mo([Kr,Ro("design:type","function"==typeof(Do=void 0!==Se.default&&Se.default)?Do:Object)],To.prototype,"rotate",void 0),Mo([Kr,Ro("design:type","function"==typeof(xo=void 0!==Io.a&&Io.a)?xo:Object)],To.prototype,"geometryModel",void 0),Mo([Kr,Ro("design:type",Array)],To.prototype,"originPoints",void 0),Mo([Kr,Ro("design:type",Object)],To.prototype,"viewColor",void 0);var zo=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Uo(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Yo=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Uo(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ho=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ko(t,e)}(i,t);var e,r,n,o=No(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var r=t.faces,n=t.color,a=t.opacity,s=t.faceId,u=t.linkPlankArea,c=t.linkModel;return e.setId(Object(Jr.default)()),e.visible=!0,e.color=n||"#ecfdf0",e.opacity=a||1,e.faces=r,e.faceId=s,e.linkPlankArea=u,e.linkModel=c,e}return e=i,(r=[{key:"setColor",value:function(t){this.color=null!=t?t:"#ecfdf0"}},{key:"setOpacity",value:function(t){this.opacity=null!=t?t:1}}])&&Lo(e.prototype,r),n&&Lo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Vo(t){return(Vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wo(n.key),n)}}function Wo(t){var e=function(t,e){if("object"!=Vo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vo(e)?e:String(e)}function Ko(t,e){return(Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Zo(t);if(e){var o=Zo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xo(this,r)}}function Xo(t,e){if(e&&("object"===Vo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zo(t){return(Zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}zo([Kr,Yo("design:type",String)],Ho.prototype,"linkPlankArea",void 0),zo([Kr,Yo("design:type",Object)],Ho.prototype,"color",void 0),zo([Kr,Yo("design:type",Number)],Ho.prototype,"opacity",void 0),zo([Kr,Yo("design:type",Boolean)],Ho.prototype,"visible",void 0),zo([Kr,Yo("design:type",Array)],Ho.prototype,"faces",void 0),zo([Kr,Yo("design:type",Object)],Ho.prototype,"linkModel",void 0);var $o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ko(t,e)}(i,t);var e,r,n,o=Jo(i);function i(t){var e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var n=null!==(r=t.id)&&void 0!==r?r:Object(Jr.default)();return e.setId(n),e.linkModel=t.linkModel,e.plankFaces=t.plankFaces,e.hintOutline=t.hintOutline,e}return e=i,r&&qo(e.prototype,r),n&&qo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Dr);function ti(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ei(n.key),n)}}function ei(t){var e=function(t,e){if("object"!=ai(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ai(e)?e:String(e)}function ri(t,e){return(ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ni(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ii(t);if(e){var o=ii(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oi(this,r)}}function oi(t,e){if(e&&("object"===ai(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ii(t){return(ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ai(t){return(ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var si=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ai(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},ui=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ai(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ci=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(i,t);var e,r,n,o=ni(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var r=t.points,n=t.linkModel,a=t.color,s=t.opacity,u=t.height,c=t.id;return e.setId(c),e.visible=!0,e.viewColor=a,e.opacity=s,e.points=r,e.height=u,e.linkModel=n,e}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}},{key:"setViewColor",value:function(t){this.viewColor=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&ti(e.prototype,r),n&&ti(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);si([Kr,ui("design:type",Object)],ci.prototype,"linkModel",void 0),si([Kr,ui("design:type",Object)],ci.prototype,"viewColor",void 0),si([Kr,ui("design:type",Number)],ci.prototype,"opacity",void 0),si([Kr,ui("design:type",Boolean)],ci.prototype,"visible",void 0),si([Kr,ui("design:type",Array)],ci.prototype,"points",void 0),si([Kr,ui("design:type",Number)],ci.prototype,"height",void 0);var Ai=r(146);function li(t){var e=new we.default;return e.fromString(t.toArray().join(",")),e}function fi(t){return(fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hi(t,e,r){var n;return n=function(t,e){if("object"!=fi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==fi(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pi=hi(hi(hi({},w.XY,new c.Euler(0,0,0,c.EulerOrder.ZYX)),w.YZ,new c.Euler(0,-Math.PI/2,0,c.EulerOrder.ZYX)),w.XZ,new c.Euler(Math.PI/2,-Math.PI/2,0,c.EulerOrder.ZYX));function di(t,e){return e===w.YZ?{x:t.z,y:t.y,z:t.x}:e===w.XZ?{x:t.z,y:t.x,z:t.y}:{x:t.x,y:t.y,z:t.z}}function gi(t){return c.Matrix4.makeRotationFromEuler(pi[t])}function yi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vi(n.key),n)}}function vi(t){var e=function(t,e){if("object"!=bi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bi(e)?e:String(e)}function mi(t,e){return(mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ii(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ci(t);if(e){var o=Ci(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ei(this,r)}}function Ei(t,e){if(e&&("object"===bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ci(t){return(Ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function bi(t){return(bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Bi,wi,Pi=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":bi(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Si=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":bi(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},_i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mi(t,e)}(i,t);var e,r,n,o=Ii(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.HOLE_V2;var s=e.start,u=e.end,c=e.diameter,A=e.holeId;a.setId(A);var l=n||{},f=l.offset,h=l.referencePlane,p=h?li(gi(h)):new we.default,d=f?(new we.default).makeTranslation(new Se.default(f.x,f.y,f.z).negate()):new we.default,g=p.multiply(d),y=r.getConcatenatedMatrix().clone().multiply(g),v=new Ai.a(new Se.default(s),new Se.default(u)),m=v.getCenter(),I=v.length();a.position=new Se.default(m).applyMatrix4(y);var E=Se.default.Y_AXIS,C=new Se.default(u).sub(new Se.default(s)).normalize(),b=(new Pe.default).setFromTwoVectors(E,C),B=y.clone().multiply((new we.default).makeRotationFromQuaternion(b));a.rotate=new Se.default((new Be.default).setFromRotationMatrix(B)),a.radius=c/2,a.height=I;var w=new Se.default(c,I,c);return a.boundingBox=new be.default(w,a.position,a.rotate),a}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&yi(e.prototype,r),n&&yi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Qi(t){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Di(n.key),n)}}function Di(t){var e=function(t,e){if("object"!=Qi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qi(e)?e:String(e)}Pi([Kr,Si("design:type",Number)],_i.prototype,"height",void 0),Pi([Kr,Si("design:type",Number)],_i.prototype,"radius",void 0),Pi([Kr,Si("design:type","function"==typeof(Bi=void 0!==Se.default&&Se.default)?Bi:Object)],_i.prototype,"position",void 0),Pi([Kr,Si("design:type","function"==typeof(wi=void 0!==Se.default&&Se.default)?wi:Object)],_i.prototype,"rotate",void 0),Pi([Kr,Si("design:type",Object)],_i.prototype,"visible",void 0),Pi([Kr,Si("design:type",Object)],_i.prototype,"color",void 0),Pi([Kr,Si("design:type",Object)],_i.prototype,"opacity",void 0);var xi=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"offsetPoint",value:function(t,e,r){var n=t.getTangent(e).getPerpVector().multiplied(-r);return e.added(n)}},{key:"offsetCurve",value:function(e,r){var n=function(n){return t.offsetPoint(e,n,r)};if(e instanceof c.LineSeg2d)return new c.LineSeg2d(n(e.startPoint),n(e.endPoint));if(e instanceof c.Arc2d)return(e.isCCW?-1:1)*r>0&&c.Num.isEqual(Math.abs(r),e.radius)?new c.LineSeg2d(n(e.startPoint),n(e.endPoint)):c.Arc2d.makeArcByThreePoints(n(e.startPoint),n(e.middlePoint),n(e.endPoint));throw new Error("Curve2d not supported: ".concat(e))}},{key:"getUnboundedCurve2d",value:function(t){if(t instanceof c.LineSeg2d)return new c.Line2d(t.startPoint,t.direction);if(t instanceof c.Arc2d)return t.circle;throw new Error("Curve2d not supported: ".concat(t))}},{key:"curveIntersect",value:function(t,e,r){var n=c.Curve2dIntersect.curve2dIntersectCurve2d(t,e);if(n.length>0)return r&&n.sort((function(e,n){var o=e.point.squaredDistanceTo(r)-n.point.squaredDistanceTo(r);return 0!==o?o:t.isPointOnCurve(e.point)?-1:1})),n[0].point}},{key:"unBoundedCurveIntersect",value:function(e,r,n){var o=e instanceof c.Line2d?e:t.getUnboundedCurve2d(e),i=r instanceof c.Line2d?r:t.getUnboundedCurve2d(r),a=c.Curve2dIntersect.curve2dIntersectCurve2d(o,i);if(a.length>0)return n&&a.sort((function(t,r){var o=t.point.squaredDistanceTo(n)-r.point.squaredDistanceTo(n);return c.Num.isEqual(o,0)?e.isPointOnCurve(t.point)?-1:1:o})),a[0].point}}],(r=null)&&Oi(e.prototype,r),n&&Oi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Mi(t){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ri(t){return function(t){if(Array.isArray(t))return ji(t)}(t)||ki(t)||Li(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ti(t){return function(t){if(Array.isArray(t))return t}(t)||ki(t)||Li(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Li(t,e){if(t){if("string"==typeof t)return ji(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ji(t,e):void 0}}function ji(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ki(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function Ni(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ni(Object(r),!0).forEach((function(e){Gi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ni(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gi(t,e,r){var n;return n=function(t,e){if("object"!=Mi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Mi(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ui(t){for(var e=[],r=0;r<t.length;r+=2){var n=[t[r],t[r+1]];e.push(n)}return e.map((function(t){return new c.Point2d(t[0],t[1])}))}function zi(t){return new no({position:t})}function Yi(t){return new Kn(t)}function Hi(t,e,r){var n=e.clone().inversed(),o=new c.Point3d(t.x,t.y,t.z),i=(r||{}).offset;if(i){var a=new c.Matrix4;a.setTranslation(i);var s=a.clone().inversed();o=o.clone().appliedMatrix4(s)}return o=o.clone().appliedMatrix4(n),new c.Point2d(o)}function Vi(t,e){var r=Number(e);if([0,5].includes(r))return new c.Point3d(t.x,t.y,0);throw new Error("plankFaceId must be 0 or 5")}function qi(t,e,r){var n,o,i,a,s,u,A,l,f,h,p=t.depth,d=t.width,g=function(t,e,r){var n=t.path,o=n.points,i=n.curves,a=t.depth,s=t.plankFaceId;return new $n({points:Ui(o).map((function(t){return zi(Hi(Vi(t,s),e,r))})),lines:i.map(Yi),depth:a,matrix4:e})}(t,e,r);return(o=function(t,e){return t.reduce((function(t,r,n,o){var i=t.prevIntersectPoint,a=o[n+1],s=i&&r.split([i])[1]||r;if(a){var u=s.endPoint,c=a.startPoint,A=xi.unBoundedCurveIntersect(s,a,u);if(A){var l=s.split([A])[0];if(l)return{prevIntersectPoint:A,continuousLines:t.continuousLines.concat(l)}}if(u.isEqual(c,.01))return{prevIntersectPoint:void 0,continuousLines:t.continuousLines.concat(s)};var f=e(u,c,n);return{prevIntersectPoint:void 0,continuousLines:t.continuousLines.concat(s).concat(f)}}return t={prevIntersectPoint:void 0,continuousLines:t.continuousLines.concat(s)}}),{prevIntersectPoint:void 0,continuousLines:[]}).continuousLines},i=function(t){var e=t.slice(),r=e.shift(),n=e.pop(),i=Ti(o([n,r],(function(t,e){return c.Arc2d.makeArcByStartEndPoints(s[0].getPosition(),t,e,!1)})).reverse()),a=i[0],u=i.slice(1);return[a].concat(Ri(e),Ri(u.reverse()))},a=(n=g).getLines(),s=n.getPoints(),u=n.isClosedPath(),A=a.map((function(t){return xi.offsetCurve(t.getCurveLine(),-d/2)})).filter((function(t){return t.length>c.Tolerance.Tolerance.DIST_TOL})),l=a.map((function(t){var e=d/2;if(t.type===C.Arc&&e>t.radius)throw new Error("error path groove data: width / 2 greater than curve.radius");return xi.offsetCurve(t.getCurveLine(),e)})).filter((function(t){return t.length>c.Tolerance.Tolerance.DIST_TOL})),f=o(A,(function(t,e,r){return c.Arc2d.makeArcByStartEndPoints(s[r+1].getPosition(),t,e,!1)})),h=o(l,(function(t,e,r){return c.Arc2d.makeArcByStartEndPoints(s[r+1].getPosition(),t,e,!0)})).map((function(t){return t.reversed()})).reverse(),u&&(f=i(f),h=i(h)),[f,h].map((function(t){return{points:t.reduce((function(t,e,r){return 0===r&&(t=t.concat(e.startPoint)),t=t.concat(e.endPoint)}),[]).map(zi),lines:t.map((function(t){return function(t){var e=[t.startPoint,t.endPoint],r=e[0],n=e[1];if(t instanceof c.LineSeg2d)return{points:[r.x,r.y,n.x,n.y],curves:[{type:C.LineSeg}]};if(t instanceof c.Arc2d){var o=t.radius,i=t.isCCW,a=t.length<Math.PI*o;return{points:[r.x,r.y,n.x,n.y],curves:[{type:C.Arc,isCCW:i,radius:o,minorArc:a}]}}throw new Error("unSupport curve type")}(t).curves[0]})).map(Yi)}}))).map((function(t){return new $n(Fi(Fi({},t),{},{depth:p,matrix4:e}))}))}function Wi(t){return function(t){if(Array.isArray(t))return Ki(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ki(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ki(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ki(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ji(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xi(n.key),n)}}function Xi(t){var e=function(t,e){if("object"!=ra(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ra(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ra(e)?e:String(e)}function Zi(t,e){return(Zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $i(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ea(t);if(e){var o=ea(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ta(this,r)}}function ta(t,e){if(e&&("object"===ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ea(t){return(ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ra(t){return(ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var na=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ra(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},oa=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ra(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zi(t,e)}(i,t);var e,r,n,o=$i(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.PATH_GROOVE,a.setId(e.grooveId);var s=(n||{}).referencePlane,u=void 0===s?w.XY:s,c=Xa(e.plankFaceId,r.getSize(),u);return a.connectivePath=qi(e,c,n),a.depth=e.depth,a}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.connectivePath.map((function(e){return e.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))})).flat()}},{key:"getBottomRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.connectivePath.map((function(r){return r.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,-t.depth).appliedMatrix4(e)}))})).flat()}},{key:"pointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(Wi(this.model.getConcatenatedMatrix().elements.values()));var e=(this.option||{}).referencePlane,r=gi(void 0===e?w.XY:e);return t.multiply(r),t.multiplied(this.connectivePath[0].matrix4)}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&Ji(e.prototype,r),n&&Ji(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function aa(t){return function(t){if(Array.isArray(t))return sa(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return sa(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sa(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ua(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ca(n.key),n)}}function ca(t){var e=function(t,e){if("object"!=pa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pa(e)?e:String(e)}function Aa(t,e){return(Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function la(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ha(t);if(e){var o=ha(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fa(this,r)}}function fa(t,e){if(e&&("object"===pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ha(t){return(ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pa(t){return(pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}na([Kr,oa("design:type",Array)],ia.prototype,"connectivePath",void 0),na([Kr,oa("design:type",Number)],ia.prototype,"depth",void 0),na([Kr,oa("design:type",Object)],ia.prototype,"visible",void 0),na([Kr,oa("design:type",Object)],ia.prototype,"color",void 0),na([Kr,oa("design:type",Object)],ia.prototype,"opacity",void 0);var da,ga=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pa(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},ya=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},va=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(i,t);var e,r,n,o=la(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.ROUND_CORNER_GROOVE,a.setId(e.grooveId);var s=e.start,u=e.end,A=new c.Matrix4,l=new c.Matrix4;l.setTranslation(new c.Vector3d(s));var f=Ka(e.plankFaceId,w.XY).extractBasis().zAxis,h=new c.Vector3d(u).subtracted(new c.Vector3d(s)).normalized(),p=f.clone().cross(h).normalized(),d=h.clone().cross(p).normalized(),g=c.Matrix4.makeBasis(h,p,d),y=A.multiplied(l).multiplied(g);return a.path=function(t,e,r){var n,o,i=t.start,a=t.end,s=t.width,u=t.depth,A=t.radius,l=Hi(i,e,r),f=Hi(a,e,r),h=new c.Vector2d(f).subtracted(new c.Vector2d(l)),p=h.normalized(),d=p.reversed(),g=h.getPerpVector(),y=g.reversed(),v=s/2;return new $n(Fi(Fi({},(n=[l.added(g.multiplied(v-A)),l.added(g.multiplied(v)).added(p.multiplied(A)),f.added(g.multiplied(v)).added(d.multiplied(A)),f.added(g.multiplied(v-A)),f.added(y.multiplied(v-A)),f.added(y.multiplied(v)).added(d.multiplied(A)),l.added(y.multiplied(v)).added(p.multiplied(A)),l.added(y.multiplied(v-A))],o=n.map((function(t,e){return new Kn(e%2==0?{type:C.Arc,isCCW:!1,radius:A,minorArc:!0}:{type:C.LineSeg})})),{points:n.map(zi),lines:o})),{},{depth:u,matrix4:e}))}(e,y),a.depth=e.depth,a}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,t.depth).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){return this.originPointToGlobalMatrix().multiplied(this.path.matrix4)}},{key:"originPointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(aa(this.model.getConcatenatedMatrix().elements.values()));var e=this.option||{},r=e.offset,n=e.referencePlane,o=gi(void 0===n?w.XY:n);if(t.multiply(o),r){var i=new c.Matrix4;i.setTranslation(r.reversed()),t.multiply(i)}return t}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&ua(e.prototype,r),n&&ua(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function ma(t){return function(t){if(Array.isArray(t))return Ia(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ia(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ia(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ia(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ea(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ca(n.key),n)}}function Ca(t){var e=function(t,e){if("object"!=Sa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Sa(e)?e:String(e)}function ba(t,e){return(ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ba(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pa(t);if(e){var o=Pa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wa(this,r)}}function wa(t,e){if(e&&("object"===Sa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pa(t){return(Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Sa(t){return(Sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}ga([Kr,ya("design:type","function"==typeof(da=void 0!==$n&&$n)?da:Object)],va.prototype,"path",void 0),ga([Kr,ya("design:type",Number)],va.prototype,"depth",void 0),ga([Kr,ya("design:type",Object)],va.prototype,"visible",void 0),ga([Kr,ya("design:type",Object)],va.prototype,"color",void 0),ga([Kr,ya("design:type",Object)],va.prototype,"opacity",void 0);var _a,Qa=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Sa(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Oa=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Sa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Da=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ba(t,e)}(i,t);var e,r,n,o=Ba(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.SPECIAL_SHAPED_GROOVE,a.setId(e.grooveId);var s=(n||{}).referencePlane,u=void 0===s?w.XY:s,c=Xa(e.plankFaceId,r.getSize(),u);return a.path=function(t,e,r){var n=t.profile,o=n.points,i=n.curves,a=t.depth,s=t.plankFaceId;return new $n({points:Ui(o).map((function(t){return zi(Hi(Vi(t,s),e,r))})),lines:i.map(Yi),depth:a,matrix4:e})}(e,c,n),a.depth=e.depth,a}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))}},{key:"getBottomRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,-t.depth).appliedMatrix4(e)}))}},{key:"pointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(ma(this.model.getConcatenatedMatrix().elements.values()));var e=(this.option||{}).referencePlane,r=gi(void 0===e?w.XY:e);return t.multiply(r),t.multiplied(this.path.matrix4)}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&Ea(e.prototype,r),n&&Ea(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function xa(t){return function(t){if(Array.isArray(t))return Ma(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ma(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ma(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ma(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ra(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ta(n.key),n)}}function Ta(t){var e=function(t,e){if("object"!=Fa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fa(e)?e:String(e)}function La(t,e){return(La=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ja(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Na(t);if(e){var o=Na(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ka(this,r)}}function ka(t,e){if(e&&("object"===Fa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Na(t){return(Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fa(t){return(Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Qa([Kr,Oa("design:type","function"==typeof(_a=void 0!==$n&&$n)?_a:Object)],Da.prototype,"path",void 0),Qa([Kr,Oa("design:type",Number)],Da.prototype,"depth",void 0),Qa([Kr,Oa("design:type",Object)],Da.prototype,"visible",void 0),Qa([Kr,Oa("design:type",Object)],Da.prototype,"color",void 0),Qa([Kr,Oa("design:type",Object)],Da.prototype,"opacity",void 0);var Ga,Ua=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},za=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&La(t,e)}(i,t);var e,r,n,o=ja(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.SQUARE_GROOVE,a.setId(e.grooveId);var s=e.start,u=e.end,A=new c.Matrix4,l=new c.Matrix4;l.setTranslation(new c.Vector3d(s));var f=Ka(e.plankFaceId,w.XY).extractBasis().zAxis,h=new c.Vector3d(u).subtracted(new c.Vector3d(s)).normalized(),p=f.clone().cross(h).normalized(),d=h.clone().cross(p).normalized(),g=c.Matrix4.makeBasis(h,p,d);return a.grooveMatrix=A.multiplied(l).multiplied(g),a.shapePointsInGroove=a.getShapePoints(),a.depth=e.depth,a}return e=i,(r=[{key:"getShapePoints",value:function(){var t=this.grooveMatrix,e=this.data,r=e.start,n=e.end,o=e.width,i=Hi(r,t),a=Hi(n,t),s=a.subtracted(i),u=s.getPerpVector().clone().multiplied(o/2),c=s.getPerpVector().reversed().multiplied(o/2);return[i.added(u),a.added(u),a.added(c),i.added(c)]}},{key:"getTopRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.shapePointsInGroove.map((function(e){return new c.Point3d(e.x,e.y,t.depth)})).map((function(t){return t.appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.shapePointsInGroove.map((function(t){return new c.Point3d(t.x,t.y,0)})).map((function(e){return e.appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){return this.originPointToGlobalMatrix().clone().multiplied(this.grooveMatrix)}},{key:"originPointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(xa(this.model.getConcatenatedMatrix().elements.values()));var e=this.option||{},r=e.offset,n=e.referencePlane,o=gi(void 0===n?w.XY:n);if(t.multiply(o),r){var i=new c.Matrix4;i.setTranslation(r.reversed()),t.multiply(i)}return t}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&Ra(e.prototype,r),n&&Ra(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Ha(t){return(Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Va(t,e,r){var n;return n=function(t,e){if("object"!=Ha(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Ha(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w.XY,n=Number(t),o=[0,0,0];return r===w.XY?0===n?o[2]=1:1===n?o[0]=-1:2===n?o[1]=-1:3===n?o[0]=1:4===n?o[1]=1:5===n&&(o[2]=-1):r===w.XZ?0===n?o[1]=-1:1===n?o[2]=-1:2===n?o[0]=1:3===n?o[2]=1:4===n?o[0]=-1:5===n&&(o[1]=1):r===w.YZ&&(0===n?o[0]=-1:1===n?o[2]=-1:2===n?o[1]=-1:3===n?o[2]=1:4===n?o[1]=1:5===n&&(o[0]=1)),new e({x:o[0],y:o[1],z:o[2]})}Ua([Kr,za("design:type",Number)],Ya.prototype,"depth",void 0),Ua([Kr,za("design:type",Array)],Ya.prototype,"shapePointsInGroove",void 0),Ua([Kr,za("design:type","function"==typeof(Ga=void 0!==c.Matrix4&&c.Matrix4)?Ga:Object)],Ya.prototype,"grooveMatrix",void 0),Ua([Kr,za("design:type",Object)],Ya.prototype,"visible",void 0),Ua([Kr,za("design:type",Object)],Ya.prototype,"color",void 0),Ua([Kr,za("design:type",Object)],Ya.prototype,"opacity",void 0);var Wa=Va(Va(Va({},w.XY,[new c.Vector3d({x:1,y:0,z:0}),new c.Vector3d({x:0,y:1,z:0}),new c.Vector3d({x:0,y:0,z:1})]),w.YZ,[new c.Vector3d({x:-1,y:0,z:0}),new c.Vector3d({x:0,y:0,z:1}),new c.Vector3d({x:0,y:1,z:0})]),w.XZ,[new c.Vector3d({x:0,y:0,z:1}),new c.Vector3d({x:-1,y:0,z:0}),new c.Vector3d({x:0,y:-1,z:0})]);function Ka(t,e){var r=qa(t,c.Vector3d,e),n=Wa[e].find((function(t){return 0===t.dot(r)})),o=r.clone().cross(n).normalized();return c.Matrix4.makeBasis(n,o,r)}function Ja(t,e){var r=Ka(t,w.XY);return r.setTranslation(new c.Vector3d(function(t,e){var r=Number(t),n={x:0,y:0,z:0};0===r?n.z=e.z:3===r?n.x=e.x:2===r&&(n.y=-e.y);return n}(t,e))),r}function Xa(t,e,r){var n=Number(t);if(![0,5].includes(n))throw new Error("Only 0 and 5 plankFaceId are allowed");var o=di(e,r).z,i=new c.Matrix4;return i.setTranslation(new c.Vector3d(0,0,o/2)),(5===n?c.Matrix4.makeBasis(c.Vector3d.xAxis,c.Vector3d.yAxis,c.Vector3d.zAxis.reversed()):c.Matrix4.makeBasis(c.Vector3d.xAxis,c.Vector3d.yAxis,c.Vector3d.zAxis)).multiplied(i)}function Za(t){return!(!t||t.fittingType!==J.HOLE)}function $a(t){return!(!t||t.fittingType!==J.GROOVE)}function ts(t,e,r){var n,o,i=r.holeColor,a=r.grooveColor,s=r.holeOpacity,u=r.grooveOpacity,A=function(t,e){var r,n,o=e.start,i=e.end,a=e.plankFaceId,s=t.getSize(),u=(new we.default).makeTranslation(new Se.default(-s.x/2,s.y/2,-s.z/2)),A=t.getConcatenatedMatrix().multiply(u),l=new c.Point3d(o),f=new c.Point3d(i),h=new c.LineSeg3d(l,f),p=h.getPoint(h.length/2),d=new Se.default(p).applyMatrix4(A);if(Za(e)){var g=e.diameter;r=new Se.default(g,h.length,g),n=Se.default.Y_AXIS}if($a(e)){var y=e.width,v=e.depth;[0,5].includes(a)?(r=new Se.default(y,h.length,v),n=Se.default.Y_AXIS):[2,4].includes(a)?(r=new Se.default(y,v,h.length),n=Se.default.Z_AXIS):[1,3].includes(a)&&(r=new Se.default(v,y,h.length),n=Se.default.Z_AXIS)}var m=new Se.default(i).sub(new Se.default(o)).normalize(),I=(new Pe.default).setFromTwoVectors(n,m),E=A.clone().multiply((new we.default).makeRotationFromQuaternion(I)),C=new Se.default((new Be.default).setFromRotationMatrix(E)),b=new be.default(r,d,C);return new En(e.id,t.id,{position:d,size:r,rotate:C,height:h.length,boundingBox:b},e)}(e,t);Za(t)?(n=i,o=s):$a(t)&&(n=a,o=u);var l=t.params||[],f=l.find((function(t){return t.key===le})),h=l.find((function(t){return t.key===fe}));return A.setVisible(!0),A.setViewColor(f?f.value:n),A.setOpacity(h?Number(h.value):o),A}var es=r(33),rs=r(218),ns=r.n(rs),os=r(226),is=r(237),as=r(170),ss=r(260),us=r(497),cs=r(0),As=r(117),ls=new Se.default,fs=new Se.default,hs=new Se.default,ps=function(){function t(t){this.points=t||[]}return t.prototype.setFromPointsAndIndex=function(t,e){return this.points[0]=t[e.x],this.points[1]=t[e.y],this.points[2]=t[e.z],this},t.prototype.getArea=function(){var t=Object(cs.g)(this.points,3),e=t[0],r=t[1],n=t[2];return.5*Se.default.cross3(e,r,n,ls).length()},t.prototype.getCentroid=function(t){var e=Object(cs.g)(this.points,3),r=e[0],n=e[1],o=e[2];return(t||new Se.default).addVectors(r,n).add(o).mul(1/3)},t.prototype.getNormal=function(t){var e=Object(cs.g)(this.points,3),r=e[0],n=e[1],o=e[2],i=Se.default.cross3(r,n,o,t);return i.isZero()?void 0:i.normalize()},t.prototype.isDegenerate=function(){var t=Object(cs.g)(this.points,3),e=t[0],r=t[1],n=t[2];return Se.default.cross3(e,r,n,ls).isZero()},t.prototype.containsPoint=function(t){var e=Object(cs.g)(this.points,3),r=e[0],n=e[1],o=e[2],i=ls.subVectors(n,r),a=fs.subVectors(o,r),s=hs.subVectors(t,r),u=Se.default.dot2(i,i),c=Se.default.dot2(i,a),A=Se.default.dot2(i,s),l=Se.default.dot2(a,a),f=Se.default.dot2(a,s),h=c*c-u*l;if(As.default.isZero(h))return!1;var p=h>0?1:-1,d=(c*f-l*A)*p,g=(c*A-u*f)*p;return g>=0&&d>=0&&g+d<=h*p},t.prototype.clone=function(){return new t(this.points)},t.prototype.toString=function(){return"Triangle3 {a: "+this.points[0].toParenString()+", b: "+this.points[1].toParenString()+", c: "+this.points[2].toParenString()+"}"},t}(),ds=r(103),gs=r(235);function ys(t){var e=[];t.shapes.forEach((function(t){var r=t.getTriangles();r&&0!==r.length&&ds.default.addElements(e,r)}));var r=function(t){var e=[];return t.forEach((function(t){return ds.default.addUniqueElements(e,t.points)})),e}(e),n=function(t,e){return t.map((function(t){var r=new Se.default;return r.x=e.indexOf(t.points[0]),r.y=e.indexOf(t.points[1]),r.z=e.indexOf(t.points[2]),r}))}(e,r);return{vertices:r,textures:function(t,e){if(!e){var r=(new gs.default).includePoints(t);e=new Cn.default(r.min.x,r.max.y)}return t.map((function(t){return Cn.default.sub(t,e)}))}(r,t.pivot),indices:n}}var vs=new Se.default(0,0,0);function ms(t){var e=t.planeTransform;return function(t){try{var e=ys(t),r=new Io.a;return r.vertices=new Float32Array(Se.default.toFloatArray(t.computeVertices(e.vertices))),r.normals=new Float32Array(Se.default.toFloatArray(t.computeNormals(e.vertices))),r.textures=new Float32Array(Cn.default.toFloatArray(e.textures)),r.indices=new Uint16Array(Se.default.toFloatArray(e.indices)),r}catch(t){return void console.error(t)}}({shapes:t.shapes,pivot:t.pivot,computeVertices:function(t){return t.map((function(t){return vs.set(t.x,t.y,0),e.localToWorld(vs)}))},computeNormals:function(t){var r=e.basicZ.clone().normalize();return t.map((function(){return r.clone()}))}})}function Is(t){return function(t){if(Array.isArray(t))return Es(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Es(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Es(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Es(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Cs=new Se.default(0,0,0);function bs(t,e,r){for(var n,o=t.id,i=r.getConcatenatedMatrix(),a=li(function(t){var e=t.originSize,r=t.plane,n=void 0===r?w.XY:r,o=t.isOutputIgnoreScale,i=t.scale,a=di(e,n),s=new c.Matrix4;if(o){var u=di(i,n),A=u.x,l=u.y,f=u.z;s=c.Matrix4.makeScale(1/A,1/l,1/f)}var h=new c.Matrix4;return h.setTranslation(new c.Vector3d(-a.x/2,a.y/2,-a.z/2)),c.Matrix4.makeRotationFromEuler(pi[n]).multiplied(h).multiplied(s)}({originSize:r.getSize(),plane:e.referencePlane,scale:r.getScale(),isOutputIgnoreScale:!!e.referencePlane&&r.getType()===es.ParamModelType.PARAM_FURNITURE})),s=i.clone().multiply(a),u=e["@type"],A=(n=u===X.FACE?_s(e,s):4===e.points.length?function(t,e){var r=[],n=[],o=[],i=[],a=t.points.map((function(t){return new Se.default(t).applyMatrix4(e)})),s=[0,1,2,3];s.forEach((function(t){var e=a[t],n=e.x,o=e.y,i=e.z;r.push(n,o,i)})),n.push.apply(n,Ps),i.push.apply(i,Ss);var u=new ps(s.slice(0,3).map((function(t){return a[t]}))).getNormal(),c=new Array(4).fill([u.x,u.y,u.z]);o.push.apply(o,Is(c.flat()));var A=new Io.a;return A.vertices=new Float32Array(r),A.indices=new Float32Array(n),A.normals=new Float32Array(o),A.textures=new Float32Array(i),A}(e,s):function(t,e){var r=[],n=[],o=[],i=[],a=t.points.map((function(t){return new Se.default(t).applyMatrix4(e)}));ws.forEach((function(t,e){t.forEach((function(t){var e=a[t],n=e.x,o=e.y,i=e.z;r.push(n,o,i)})),n.push.apply(n,Is(Ps.map((function(t){return t+4*e})))),i.push.apply(i,Ss);var s=new ps(t.slice(0,3).map((function(t){return a[t]}))).getNormal(),u=new Array(4).fill([s.x,s.y,s.z]);o.push.apply(o,Is(u.flat()))}));var s=new Io.a;return s.vertices=new Float32Array(r),s.indices=new Float32Array(n),s.normals=new Float32Array(o),s.textures=new Float32Array(i),s}(e,s)).getBoundingBox3().getCenter(),l=ns.a.decompose(s).rotation,f=ns.a.compose(A,l,Se.default.ONE),h=(new we.default).getInverse(f),p=new Float32Array(n.vertices),d=new os.default,g=0;g<p.length;g+=3)Cs.set(p[g],p[g+1],p[g+2]).applyMatrix4(h),d.includePoint(Cs);return new To(o,u,A,l,d.getSize(),n,e.points.map((function(t){return new Se.default(t).applyMatrix4(s)})))}var Bs,ws=[[0,1,2,3],[4,5,6,7],[0,4,7,3],[1,5,6,2],[0,1,5,4],[2,6,7,3]],Ps=[0,1,2,2,3,0],Ss=[0,0,1,0,1,1,0,1];function _s(t,e){var r=t.points.map((function(t){return new Se.default(t).applyMatrix4(e)})),n=(new is.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,o=r[1].clone().sub(r[0]).normalize(),i=n.clone().cross(o).normalize(),a=new us.a(o,i,n,r[0]),s=r.map((function(t){return new Cn.default(a.worldToLocal(t))})),u=new as.default(s);return ms({planeTransform:a,shapes:[new ss.a(u)]})}function Qs(t){return(Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Os(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ds(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Os(Object(r),!0).forEach((function(e){xs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Os(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xs(t,e,r){var n;return n=function(t,e){if("object"!=Qs(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Qs(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ms(t,e){var r=e.clone().inversed(),n=new Yn({id:t.id,type:ye.OUTER,points:t.points.map((function(t){return Ds(Ds({},t),{},{position:(e=t.position,n=new c.Point3d(e).appliedMatrix4(r),new c.Point2d(n))});var e,n})).map(Rs),lines:t.lines.map(Ts),depth:t.depth,matrix4:e});return n.linkPointsAndLines(),n}function Rs(t){return new Rn(t)}function Ts(t){return new _n(t)}!function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE"}(Bs||(Bs={}));var Ls=new c.Tolerance.Tolerance(.01,.01,.01);function js(t){if(t.getType()===At.NONE)return!0;var e=t.prevLine,r=t.nextLine;return e.type!==lt.CIRCLE_ARC&&r.type!==lt.CIRCLE_ARC&&(0!==t.radius&&(!t.cornerCutDistance||0!==t.cornerCutDistance[0]&&0!==t.cornerCutDistance[1]))}function ks(t){return t.type===lt.SEGMENT||(!(t.type!==lt.CIRCLE_ARC||!c.Num.isEqual(t.getVector().length,2*t.radius))||(t.type!==lt.CIRCLE_ARC||!c.Num.isBigger(t.getVector().length,2*t.radius)))}function Ns(t){return t.type===Bs.POINT?t.val.getCurveLineAndPoints().curveLine:t.type===Bs.LINE?t.val.getRealLine():void 0}function Fs(t,e){if(t.type===Bs.POINT&&t.val.getType()===At.NONE)return!0;if(e.type===Bs.POINT&&e.val.getType()===At.NONE)return!0;var r=Ns(t),n=Ns(e);if(!r||!n)return!1;var o=c.Curve2dIntersect.curve2dIntersectCurve2d(r,n,Ls);return!(1===o.length&&!o[0].point.isEqual(r.startPoint,.01)&&!o[0].point.isEqual(r.endPoint,.01))&&(!(o.length>1)||o.every((function(t){return t.point.isEqual(o[0].point,.01)})))}function Gs(t,e,r){var n=r.grooveColor,o=r.grooveOpacity,i=Ja(t.plankFaceId,e.getSize()),a=new vo({data:t,path:Ms(t,i),model:e});a.setVisible(!0);var s=(t.params||[]).find((function(t){return t.key===le})),u=(t.params||[]).find((function(t){return t.key===fe}));return a.setViewColor(s?s.value:n),a.setOpacity(u?Number(u.value):o),a}var Us=r(65),zs=r(770),Ys=r(12),Hs=r.n(Ys);function Vs(t){return(Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ws(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ks(n.key),n)}}function Ks(t){var e=function(t,e){if("object"!=Vs(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vs(e)?e:String(e)}function Js(t,e){return(Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Xs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$s(t);if(e){var o=$s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zs(this,r)}}function Zs(t,e){if(e&&("object"===Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $s(t){return($s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Js(t,e)}(i,t);var e,r,n,o=Xs(i);function i(){return qs(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return null}}])&&Ws(e.prototype,r),n&&Ws(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent);function eu(t){return(eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ru(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ou(n.key),n)}}function ou(t){var e=function(t,e){if("object"!=eu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eu(e)?e:String(e)}function iu(t,e){return(iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function au(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=uu(t);if(e){var o=uu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return su(this,r)}}function su(t,e){if(e&&("object"===eu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function uu(t){return(uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cu,Au=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iu(t,e)}(i,t);var e,r,n,o=au(i);function i(){return ru(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"module",value:function(){return"entry"}}])&&nu(e.prototype,r),n&&nu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);cu||(cu={});var lu,fu=[];!function(t){t.SAVE_CUSTOM="saveCustom",t.UNDO_REDO="undoRedo",t.PARSE_DOCUMENT="parseDocument"}(lu||(lu={}));var hu,pu,du={};function gu(t){return(gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yu(Object(r),!0).forEach((function(e){mu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mu(t,e,r){var n;return n=function(t,e){if("object"!=gu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gu(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iu(t,e){!function(t){hu.log(Eu(t))}(t);var r={eventType:t.behavior+"_ktr",data:{},labels:{}};pu&&Object.assign(r.labels,pu()),e.dataKeys.forEach((function(e){return r.data[e]=t[e]})),e.labelKeys&&(Array.isArray(e.labelKeys)?e.labelKeys.forEach((function(e){return r.labels[e]=t[e]})):Object.assign(r.labels,e.labelKeys)),function(t){hu.logByKtracker(t)}(r)}function Eu(t){return vu(vu({},t),{},{pluginName:"customPad"})}function Cu(t){return(Cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wu(n.key),n)}}function wu(t){var e=function(t,e){if("object"!=Cu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Cu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Cu(e)?e:String(e)}function Pu(){return(Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Su(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Su(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Du(t)););return t}function _u(t,e){return(_u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Qu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Du(t);if(e){var o=Du(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ou(this,r)}}function Ou(t,e){if(e&&("object"===Cu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Du(t){return(Du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xu={entry:Au,monitor:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_u(t,e)}(i,t);var e,r,n,o=Qu(i);function i(){return bu(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"init",value:function(){Pu(Du(i.prototype),"init",this).call(this),this.addConfig({sendLog:Iu,perfLogConfig:fu,timeLogConfig:du})}}])&&Bu(e.prototype,r),n&&Bu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.Monitor)};var Mu,Ru,Tu=r(50),Lu=r(762),ju=r(359);function ku(t){return(ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Nu=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==ku(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ku(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Fu(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Gu(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fu(i,n,o,a,s,"next",t)}function s(t){Fu(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Uu(t){return function(t){if(Array.isArray(t))return Hu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Yu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zu(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Yu(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Yu(t,e){if(t){if("string"==typeof t)return Hu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hu(t,e):void 0}}function Hu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qu(n.key),n)}}function qu(t){var e=function(t,e){if("object"!=ku(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ku(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ku(e)?e:String(e)}!function(t){t[t.autoBackup=1]="autoBackup",t[t.transaction=2]="transaction",t[t.version=4]="version",t[t.modelBinding=8]="modelBinding",t[t.autoSave=16]="autoSave"}(Mu||(Mu={})),function(t){t[t.requestBackup=0]="requestBackup",t[t.forceBackup=1]="forceBackup",t[t.mergeRecorder=2]="mergeRecorder",t[t.notifyModelChange=3]="notifyModelChange",t[t.autoSave=4]="autoSave",t[t.save=5]="save",t[t.revert=6]="revert"}(Ru||(Ru={}));var Wu=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.autoSaveInterruptSwitch=new Lu.InterruptSwitch((function(t){t?e.kafDocument.autoSave.stop():e.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(Tu.throttleInRaf)((function(){Us.Util.safeExec((function(){++e.requestBackupTimes>e.maxRequestBackupTimes?Object(ju.devError)("requestBackup long time on backup"):e.kafDocument.autoBackupBlockKeys.size>0?e.requestBackup():e.docs.some((function(t){return!t.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.requestBackup()}))}),1)}var e,r,n;return e=t,(r=[{key:"revert",value:function(){var t=this;Us.Util.safeExec((function(){var e,r=zu(t.docs);try{for(r.s();!(e=r.n()).done;)e.value.getDoc().getTransactionContext().revert()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var t=this;Us.Util.safeExec((function(){t.docs.some((function(t){return!t.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var t=this;Us.Util.safeExec((function(){var e,r=zu(t.docs);try{for(r.s();!(e=r.n()).done;)e.value.getDoc().getTransactionContext().mergeRecorder()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var t=this;Us.Util.safeExec((function(){var e,r=zu(t.docs);try{for(r.s();!(e=r.n()).done;)e.value.getDoc().notifyModelChange()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"save",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Us.Util.safeExec((function(){t.kafDocument.saveDocument(e)}))}},{key:"interruptSingle",value:function(t,e){var r=this,n={};return e.includes(Mu.autoBackup)&&Us.Util.safeExec((function(){n[Mu.autoBackup]=(new Date).getTime().toString()+t.getId(),r.kafDocument.pauseAutoBackup(n[Mu.autoBackup])}),!1),e.includes(Mu.transaction)&&Us.Util.safeExec((function(){n[Mu.transaction]=t.getDoc().getTransactionSwitch().interrupt()})),e.includes(Mu.version)&&Us.Util.safeExec((function(){n[Mu.version]=t.getDoc().getVersionSwitch().interrupt()})),e.includes(Mu.modelBinding)&&Us.Util.safeExec((function(){n[Mu.modelBinding]=t.getDoc().getModelBindingSwitch().interrupt()})),e.includes(Mu.autoSave)&&Us.Util.safeExec((function(){n[Mu.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(t,e){var r,n=this,o={},i=zu(this.docs);try{for(i.s();!(r=i.n()).done;){var a=r.value;o[a.getId()]=this.interruptSingle(a,t)}}catch(t){i.e(t)}finally{i.f()}return this.keyCache.add(o),e&&setTimeout((function(){return n.resume(o)}),e),o}},{key:"resumeSingle",value:function(t,e){var r=this;e[Mu.autoBackup]&&Us.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(e[Mu.autoBackup])}),!1),e[Mu.transaction]&&Us.Util.safeExec((function(){t.getDoc().getTransactionSwitch().resume(e[Mu.transaction])})),e[Mu.version]&&Us.Util.safeExec((function(){t.getDoc().getVersionSwitch().resume(e[Mu.version])})),e[Mu.modelBinding]&&Us.Util.safeExec((function(){t.getDoc().getModelBindingSwitch().resume(e[Mu.modelBinding])})),e[Mu.autoSave]&&Us.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(e[Mu.autoSave])}))}},{key:"resume",value:function(t,e){var r,n=zu(this.docs);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=t[o.getId()];i&&this.resumeSingle(o,i)}}catch(t){n.e(t)}finally{n.f()}this.keyCache.delete(t),e&&this.afterActions(e)}},{key:"forceResumeAll",value:function(){var t=this;Uu(this.keyCache.values()).forEach((function(e){return t.resume(e)}))}},{key:"interruptActions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Mu.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ru.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return function(){var i={};try{i=o.interrupt(e,n);for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=t.apply(this,s);return c}finally{o.resume(i,r)}}}},{key:"interruptActionsAsync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Mu.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ru.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return Gu(Nu().mark((function i(){var a,s,u,c,A,l=arguments;return Nu().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(a={},i.prev=1,a=o.interrupt(e,n),s=l.length,u=new Array(s),c=0;c<s;c++)u[c]=l[c];return i.next=6,t.apply(this,u);case 6:return A=i.sent,i.abrupt("return",A);case 8:return i.prev=8,o.resume(a,r),i.finish(8);case 11:case"end":return i.stop()}}),i,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(t){t.includes(Ru.mergeRecorder)&&this.mergeRecorder(),t.includes(Ru.requestBackup)?this.requestBackup():t.includes(Ru.forceBackup)?this.forceBackup():t.includes(Ru.revert)&&this.revert(),t.includes(Ru.notifyModelChange)&&this.notifyModelChange(),t.includes(Ru.autoSave)?this.save(!0):t.includes(Ru.save)&&this.save()}}])&&Vu(e.prototype,r),n&&Vu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ku=r(657),Ju=r.n(Ku),Xu=r(893),Zu=r(249);function $u(t){return($u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ec(n.key),n)}}function ec(t){var e=function(t,e){if("object"!=$u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$u(e)?e:String(e)}function rc(t,e){return(rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ic(t);if(e){var o=ic(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oc(this,r)}}function oc(t,e){if(e&&("object"===$u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ic(t){return(ic=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ac=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rc(t,e)}(i,t);var e,r,n,o=nc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).model=t,e}return e=i,(r=[{key:"toModel",value:function(){return this.model}}])&&tc(e.prototype,r),n&&tc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Zu.a);function sc(t){return(sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ac(n.key),n)}}function cc(t,e,r){return e&&uc(t.prototype,e),r&&uc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ac(t){var e=function(t,e){if("object"!=sc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==sc(e)?e:String(e)}var lc=cc((function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.doc=e,this.key=r,this.BackupItemImpl=ac,this.getModel=function(){var t=n.doc.getTransactionContext();return t.commitRecorder(),{recorderId:t.getCurrentId()}},this.onUpdateModel=function(t,e){var r=n.doc.getTransactionContext();e===Zu.b.redo?r.redoToRecorder(t.recorderId):e===Zu.b.undo?r.undoToRecorder(t.recorderId):e===Zu.b.revert&&r.revert()},this.updateListeners=function(t,e){var r=n.doc;t?(r.getTransactionSwitch().resumeAll(),r.requestCommit=e):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}}));function fc(t){return(fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hc(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */hc=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==fc(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(fc(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function pc(t){return function(t){if(Array.isArray(t))return yc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dc(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gc(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function gc(t,e){if(t){if("string"==typeof t)return yc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yc(t,e):void 0}}function yc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vc(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function mc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ic(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cc(n.key),n)}}function Ec(t,e,r){return e&&Ic(t.prototype,e),r&&Ic(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Cc(t){var e=function(t,e){if("object"!=fc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fc(e)?e:String(e)}function bc(t,e){return(bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pc(t);if(e){var o=Pc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wc(this,r)}}function wc(t,e){if(e&&("object"===fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pc(t){return(Pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sc=Xu.ib.DocumentStateManager,_c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bc(t,e)}(r,t);var e=Bc(r);function r(){var t;return mc(this,r),(t=e.apply(this,arguments)).doc=new ke.CDoc,t}return Ec(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(Ju()(Object)),Qc=new(function(){function t(){mc(this,t),this.stacks=[{documentAction:new Wu}]}var e,r;return Ec(t,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(t,e){var r=this.getTopDocumentAction();return r.docs=t,r.kafDocument=e,r}},{key:"pushDocumentAction",value:(e=hc().mark((function t(){var e,r,n,o,i,a,s,u,c,A,l,f,h,p,d,g=arguments;return hc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=g.length>0&&void 0!==g[0]?g[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([Mu.autoBackup]),o=new Wu,i=new _c,a=new Sc,s=dc(this.stacks);try{for(s.s();!(u=s.n()).done;){c=u.value,A=dc(c.documentAction.docs);try{for(A.s();!(l=A.n()).done;)l.value.getDoc().addTransactionHook(i.getDoc().onTrackTransaction)}catch(t){A.e(t)}finally{A.f()}}}catch(t){s.e(t)}finally{s.f()}o.docs=[i].concat(pc(e)),o.kafDocument=a,f=new lc(i.getDoc(),"tempDocumentSource".concat(this.stacks.length)),a.addDocumentSource(f),h=dc(e);try{for(h.s();!(p=h.n()).done;)d=p.value,a.addDocumentSource(new lc(d.getDoc(),d.getId()))}catch(t){h.e(t)}finally{h.f()}return a.initState(),t.next=17,a.start();case 17:return this.stacks.push({documentAction:o,interruptKey:n,tempDoc:i,tempDocumentSource:f}),t.abrupt("return",a);case 19:case"end":return t.stop()}}),t,this)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){vc(i,n,o,a,s,"next",t)}function s(t){vc(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var t,e=this.stacks.pop(),r=e.tempDoc,n=e.documentAction,o=e.interruptKey,i=dc(this.stacks);try{for(i.s();!(t=i.n()).done;){var a,s=dc(t.value.documentAction.docs);try{for(s.s();!(a=s.n()).done;){a.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(t){s.e(t)}finally{s.f()}}}catch(t){i.e(t)}finally{i.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(o,[Ru.requestBackup])}}]),t}());function Oc(t){return(Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xc(n.key),n)}}function xc(t){var e=function(t,e){if("object"!=Oc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Oc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Oc(e)?e:String(e)}function Mc(t,e){return(Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Lc(t);if(e){var o=Lc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tc(this,r)}}function Tc(t,e){if(e&&("object"===Oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Lc(t){return(Lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mc(t,e)}(i,t);var e,r,n,o=Rc(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t.getDoc(),e)).key=e,r}return e=i,r&&Dc(e.prototype,r),n&&Dc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(lc);function kc(t){return(kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fc(n.key),n)}}function Fc(t){var e=function(t,e){if("object"!=kc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==kc(e)?e:String(e)}function Gc(t,e){return(Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Uc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Yc(t);if(e){var o=Yc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zc(this,r)}}function zc(t,e){if(e&&("object"===kc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Yc(t){return(Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gc(t,e)}(i,t);var e,r,n,o=Uc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).model=t,e}return e=i,(r=[{key:"toModel",value:function(){return this.model}}])&&Nc(e.prototype,r),n&&Nc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Zu.a);function Vc(t){return(Vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kc(n.key),n)}}function Wc(t,e,r){return e&&qc(t.prototype,e),r&&qc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kc(t){var e=function(t,e){if("object"!=Vc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vc(e)?e:String(e)}var Jc,Xc,Zc=Wc((function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.design=e,this.key=r,this.disposeListener=Qr.noop,this.BackupItemImpl=Hc,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(t){n.design=t},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(t){Dr.addSetHook(t)},this.beforeDispose=function(){}})),$c=r(257),tA=r(509),eA=r(463),rA=r(190);!function(t){t[t.theme=1735419]="theme",t[t.sceneBG=15461612]="sceneBG",t[t.outline=0]="outline"}(Jc||(Jc={})),function(t){t.SELECTED="SELECTED"}(Xc||(Xc={}));var nA,oA=Symbol("paramModelAssembly"),iA=Symbol("paramModel");function aA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sA(n.key),n)}}function sA(t){var e=function(t,e){if("object"!=fA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fA(e)?e:String(e)}function uA(t,e){return(uA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function cA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lA(t);if(e){var o=lA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return AA(this,r)}}function AA(t,e){if(e&&("object"===fA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lA(t){return(lA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fA(t){return(fA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){t.Unset="unset",t.Translucent="translucent",t.Transparent="transparent"}(nA||(nA={}));var hA,pA=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":fA(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},dA=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":fA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},gA=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uA(t,e)}(i,t);var e,r,n,o=cA(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).model=t,e._parent=void 0,e._children=[],e.entityType=oA,e.entityId=t.getId(),e}return e=i,r&&aA(e.prototype,r),n&&aA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a),yA=gA=pA([Object(rA.b)([new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),dA("design:paramtypes",["function"==typeof(hA=void 0!==_e.CoreParamModelAssembly&&_e.CoreParamModelAssembly)?hA:Object])],gA);function vA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,IA(n.key),n)}}function mA(t,e,r){return e&&vA(t.prototype,e),r&&vA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function IA(t){var e=function(t,e){if("object"!=SA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=SA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==SA(e)?e:String(e)}function EA(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CA(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bA(t,e)}function bA(t,e){return(bA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function BA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=PA(t);if(e){var o=PA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wA(this,r)}}function wA(t,e){if(e&&("object"===SA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function PA(t){return(PA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function SA(t){return(SA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _A=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":SA(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},QA=function(t){CA(r,t);var e=BA(r);function r(t,n){var o;return EA(this,r),(o=e.call(this)).model=t,o.context=n,o._parent=void 0,o._children=[],o.entityType=n.type,o.entityId=t.getId(),o}return mA(r)}(eA.a),OA=function(t){CA(r,t);var e=BA(r);function r(){return EA(this,r),e.apply(this,arguments)}return mA(r)}(QA);OA=_A([Object(rA.b)([new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],OA);var DA=r(1398);function xA(t,e,r){var n=Object(Qr.differenceBy)(t,e,r),o=[];return 0===n.length&&e.length===t.length||(o=Object(Qr.differenceBy)(e,t,r)),{add:o,update:t.filter((function(t){return!n.includes(t)})),delete:n}}var MA=r(238);function RA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,LA(n.key),n)}}function TA(t,e,r){return e&&RA(t.prototype,e),r&&RA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function LA(t){var e=function(t,e){if("object"!=jA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jA(e)?e:String(e)}function jA(t){return(jA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var kA,NA=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},FA=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},GA=TA((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.selectable=!0}));function UA(t){return(UA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function YA(t,e,r){var n;return n=function(t,e){if("object"!=UA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==UA(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}NA([_r.observable,FA("design:type",Number)],GA.prototype,"opacity",void 0),NA([_r.observable,FA("design:type",Object)],GA.prototype,"color",void 0),NA([_r.observable,FA("design:type",Boolean)],GA.prototype,"visible",void 0),NA([_r.observable,FA("design:type",Object)],GA.prototype,"overrideMaterial",void 0),NA([_r.observable,FA("design:type","function"==typeof(kA=void 0!==nr.OutlineMode&&nr.OutlineMode)?kA:Object)],GA.prototype,"outlineMode",void 0);var HA={hardware:2,customModel:0};function VA(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zA(Object(r),!0).forEach((function(e){YA(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zA(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},HA)}function qA(t){return function(e,r){var n=function(t,e){try{var r=t.materialReplacedInfos,n=t.materialUVEditInfos,o=t.texture,i=t.opacity;if(!(r&&r.length||n&&n.length||o))return e.getMesh()+(1!==i?String(i):"")+e.getMtl().reduce((function(t,e){var r=[];return r.push(t,e.getObjName(),e.getDiffuseTexture(),e.getReflectGlossiness(),e.getFresnel(),e.getU(),e.getV(),e.getW(),e.getH()),e.getDiffuseTextureScale()&&r.push(e.getDiffuseTextureScale().toString()),e.getDiffuseColor()&&r.push(e.getDiffuseColor().toString()),e.getReflectColor()&&r.push(e.getReflectColor().toString()),e.getRefractColor()&&r.push(e.getRefractColor().toString()),r.join("#")}),"")}catch(t){a=t,setTimeout((function(){throw a}))}var a;return null}(e,r);return t+n}}function WA(t){return(WA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function KA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,JA(n.key),n)}}function JA(t){var e=function(t,e){if("object"!=WA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WA(e)?e:String(e)}function XA(t,e){return(XA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ZA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=tl(t);if(e){var o=tl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $A(this,r)}}function $A(t,e){if(e&&("object"===WA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tl(t){return(tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var el=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&XA(t,e)}(i,t);var e,r,n,o=ZA(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).props=t,e.outlineMode=nr.OutlineMode.Disabled,e.castPlanarShadow=!1,e.castShadow=!1,e.setOnlyMaterial(new nr.LineBasicMaterial({color:Jc.outline})),e.update({}),e}return e=i,(r=[{key:"updateProps",value:function(t){var e=this.props;this.props=t,this.update(e)}},{key:"update",value:function(t){var e,r,n=this.props.points;if(t.points!==n){var o=(e=n,(r=new nr.BufferGeometry).addAttribute("position",new nr.BufferAttribute(new Float32Array(e),3)),r);this.geometry=o,nr.geomOperator.computeLineDistances(o)}var i=this.props,a=i.color,s=void 0===a?Jc.outline:a,u=i.visible,c=void 0===u||u;this.expectOnlyMaterial().setValues({color:s}),this.visible=c}}])&&KA(e.prototype,r),n&&KA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nr.LineSegments),rl=r(354),nl=r(76);function ol(t){return(ol="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function il(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function al(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?il(Object(r),!0).forEach((function(e){sl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):il(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function sl(t,e,r){var n;return n=function(t,e){if("object"!=ol(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ol(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ul=al(al({side:nr.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15}),{},{transparent:!1});function cl(t){return(cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Al(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Al=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==cl(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(cl(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ll(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ll(Object(r),!0).forEach((function(e){hl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ll(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hl(t,e,r){var n;return n=function(t,e){if("object"!=cl(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==cl(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pl(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function dl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){pl(i,n,o,a,s,"next",t)}function s(t){pl(i,n,o,a,s,"throw",t)}a(void 0)}))}}var gl=function(t){return Object(rl.b)(t)},yl=function(t){return Object(rl.c)(t,{wrapS:nr.WebGLTextureWrap.Repeat,wrapT:nr.WebGLTextureWrap.Repeat,cacheReject:!0})};function vl(t){return ml.apply(this,arguments)}function ml(){return(ml=dl(Al().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p,d,g,y,v,m,I,E;return Al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.material,n=e.materialInfo,o=e.opacity,i=void 0===o?1:o,a=e.color,s=e.textureUrl,u=e.textureSize,c=fl(fl({},ul),{},{color:a}),l=[s,null==n?void 0:n.getDiffuseTexture()],f=0,h=l;case 4:if(!(f<h.length)){t.next=26;break}if(!(p=h[f])){t.next=23;break}if(t.prev=7,u){t.next=13;break}return t.next=11,gl(p);case 11:d=t.sent,u={x:d.naturalWidth,y:d.naturalHeight};case 13:return t.next=15,yl(p);case 15:return A=t.sent,r.diffuseTextureUrl=p,t.abrupt("break",26);case 20:t.prev=20,t.t0=t.catch(7),console.error("updateMaterial",t.t0);case 23:f++,t.next=4;break;case 26:A?((g=new nr.Matrix3).setUVTransform(0,0,1/u.x,1/u.y,0,0,0),c.uvTransform=g,c.texture=A):((y=null==n?void 0:n.getDiffuseColor())&&(c.color=new nr.Color(y.x,y.y,y.z).getHex()),c.texture=null),v=null==n?void 0:n.getRefractColor(),m=1,v&&(I=Object(nl.a)(Math.max(v.x,v.y,v.z),0,1),c.transparent=I>.01,m=Math.max(1-I,.1)),i<1?(c.transparent=!0,c.opacity=i*m):c.opacity=m,void 0!==(E=null==n?void 0:n.getTransparenType())&&(c.transparent=c.transparent||1===E),c.depthWrite=!(Object(Qr.isNil)(c.transparent)?r.transparent:c.transparent),r.setValues(c);case 35:case"end":return t.stop()}}),t,null,[[7,20]])})))).apply(this,arguments)}function Il(t){return(Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function El(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */El=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Il(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Il(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Cl(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function bl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Cl(i,n,o,a,s,"next",t)}function s(t){Cl(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Bl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wl(n.key),n)}}function wl(t){var e=function(t,e){if("object"!=Il(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Il(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Il(e)?e:String(e)}function Pl(t,e){return(Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ql(t);if(e){var o=Ql(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _l(this,r)}}function _l(t,e){if(e&&("object"===Il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ql(t){return(Ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ol=new nr.BufferGeometry;var Dl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pl(t,e)}(s,t);var e,r,n,o,i,a=Sl(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).props=t,e.categoryId=Us.EDCCountCategory.PHONG,e.material=new nr.MeshPhongMaterial({transparent:!0}),e.setMaterials([e.material]),e.update({}),e}return e=s,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(t){var e=this.props;this.props=t,this.update(e)}},{key:"update",value:(i=bl(El().mark((function t(e){var r,n;return El().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==e.geometry&&this.updateGeometry(),this.props.textureSize===e.textureSize&&this.props.tiledImgUrl===e.tiledImgUrl&&this.props.opacity===e.opacity&&this.props.color===e.color&&this.props.popBufferMtl===e.popBufferMtl){t.next=5;break}return t.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"updateGeometry",value:function(){var t,e,r,n,o,i,a=this.props.geometry;this.geometry&&this.geometry.destroy(),this.geometry=a?(t=a,e=new nr.BufferGeometry,r=new Uint32Array(t.indices),n=new Float32Array(t.vertices),o=new Float32Array(t.normals),i=new Float32Array(t.textures),e.index=new nr.BufferAttribute(r,1),e.addAttribute("position",new nr.BufferAttribute(n,3)),e.addAttribute("uv",new nr.BufferAttribute(i,2)),o&&o.length?e.addAttribute("normal",new nr.BufferAttribute(o,3)):nr.geomOperator.computeNormalsByPosition(e),e):Ol}},{key:"updateMaterial",value:(o=bl(El().mark((function t(){var e,r,n,o,i,a;return El().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props,r=e.popBufferMtl,n=e.opacity,o=e.tiledImgUrl,i=e.textureSize,a=e.color,t.next=3,vl({material:this.material,materialInfo:r,opacity:n,color:a,textureUrl:o,textureSize:i});case 3:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}])&&Bl(e.prototype,r),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(nr.Mesh);function xl(t){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ml(t){return function(t){if(Array.isArray(t))return Ll(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Tl(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rl(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Tl(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Tl(t,e){if(t){if("string"==typeof t)return Ll(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ll(t,e):void 0}}function Ll(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kl(t,e,r){return(e=Fl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fl(n.key),n)}}function Fl(t){var e=function(t,e){if("object"!=xl(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xl(e)?e:String(e)}var Gl={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var Ul=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.props=e,this.context=r,this.modelDepProps=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jl(Object(r),!0).forEach((function(e){kl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Gl),this.displayInfoDrawableMesh=[],this.displayInfoDrawables=[],this.displayInfoDrawablesProps=[],this.meshes=[],this.childNodeDrawbleMap=new Map,this.childNodeMeshesMap=new Map,this.displayInfoMeshs=[],this.state=new GA,this.id=e.model.getId(),this.type=r.type;var n,o=Rl(r.stateReducers);try{for(o.s();!(n=o.n()).done;){(0,n.value)(e.model,!1,this.state)}}catch(t){o.e(t)}finally{o.f()}}var e,r,n;return e=t,(r=[{key:"interactionPriority",get:function(){var t=VA();return this.props.model.isAppendHardware?t.hardware:t.customModel}},{key:"overrideMaterial",get:function(){return this.state.overrideMaterial}},{key:"materialParams",get:function(){var t=this.context.store.transparentMode,e=kl(kl(kl({},nA.Unset,1),nA.Translucent,.4),nA.Transparent,0);return{opacity:Object(Qr.isNil)(this.state.opacity)?e[t]:this.state.opacity,color:this.state.color}}},{key:"pickActualInteractiveEntity",value:function(t){var e=this,r=t.intersection.object,n=function(){for(;r;){var t=e.context.objectManager.getInfo(r);if(t)return{entityId:t.id,entityType:t.type};r=r.parent}return{entityId:e.id,entityType:e.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:t.intersection.point})}},{key:"create",value:function(t){var e,r=this.props.model,n=new nr.Group;return n.uuid=this.id,n.visible=null===(e=this.state.visible)||void 0===e||e,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,t),this.renderChildNodeMeshes(n,r,t),this.renderDisplayInfoMesh(n,r,t),this.renderDisplayInfoMeshes(n,r,t),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(t,e){var r,n=this,o=this.props.model;t.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(t,o,e),this.renderChildNodeMeshes(t,o,e),this.renderDisplayInfoMesh(t,o,e),this.renderDisplayInfoMeshes(t,o,e),this.renderLineSegments(t,o),this.applyTransform(t,o),t.traverse((function(t){t instanceof nr.Mesh&&(t.outlineMode=n.state.outlineMode)}))}},{key:"dispose",value:function(t){this.disposeMeshes(t),this.disposeDisplayInfoMesh(t),this.disposeDisplayInfoMeshs(t),this.disposeChildNodeMeshes(t),this.disposeLineSegments(t),this.context.objectManager.removeObject(t)}},{key:"applyTransform",value:function(t,e){var r=e.getPosition(),n=e.getScale(),o=e.getRotation();t.position.set(r.x,r.y,r.z),t.rotation.set(o.x,o.y,o.z),t.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(t){for(var e=0;e<this.meshes.length;e++)Object(MA.a)(this.meshes[e]);t.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(t){var e=this;this.childNodeDrawbleMap.forEach((function(t,r){var n=e.childNodeMeshesMap.get(r);t.dispose(n)}));var r=Ml(this.childNodeMeshesMap.values());r.forEach((function(t){return Object(MA.a)(t)})),t.removeObjects(r)}},{key:"disposeChildNodeMesh",value:function(t,e){var r=this.childNodeDrawbleMap.get(e),n=this.childNodeMeshesMap.get(e);n&&(r&&r.dispose(n),Object(MA.a)(n),t.remove(n))}},{key:"createChildNodeMesh",value:function(t,e,r){var n=this.props.renderChild(e),o=n.create(r);this.childNodeDrawbleMap.set(e,n),this.childNodeMeshesMap.set(e,o),t.add(o)}},{key:"updateChildNodeMesh",value:function(t,e,r){var n=this.childNodeDrawbleMap.get(e),o=this.childNodeMeshesMap.get(e);n&&o&&n.update(o,r)}},{key:"disposeDisplayInfoMesh",value:function(t){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(MA.a)(this.displayInfoMesh),this.displayInfoDrawableProps=void 0,t.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(t){for(var e=0;e<this.displayInfoDrawables.length;e++)this.displayInfoDrawables[e].dispose(this.displayInfoMeshs[e]),Object(MA.a)(this.displayInfoMeshs[e]);this.displayInfoDrawablesProps=[],t.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(t){this.lineSegments&&(Object(MA.a)(this.lineSegments),t.remove(this.lineSegments))}},{key:"renderMeshes",value:function(t,e,r){var n,o,i=this.modelDepProps,a=this.materialParams,s=a.opacity,u=a.color,c=e.getMeshModels(),A=e.getLegal(),l=e.getLegalMesh();if(i.meshModels.length!==c.length||i.legal!==A||i.legalMesh!==l){i.meshModels=c,i.legal=A,i.legalMesh=l,this.disposeMeshes(t);var f=[];if(A&&l)for(var h,p=c.length;p--;)h=c[p],h=new Dl({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(n=h.texture)||void 0===n?void 0:n.size,opacity:s,color:u,popBufferMtl:h.displayMaterial}),f[p]=h,t.add(h);this.meshes=f}else for(var d,g=this.meshes,y=c.length;y--;)d=c[y],g[y].updateProps({geometry:d.geometry,tiledImgUrl:d.texture&&(d.texture.hdTiledImageUrl||d.texture.tiledImgUrl),textureSize:null===(o=d.texture)||void 0===o?void 0:o.size,opacity:s,color:u,popBufferMtl:d.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(t,e,r){var n,o=this,i=(n=e,n.getChildren().filter((function(t){return t.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel),a=xA(this.modelDepProps.renderChildNodes,i,(function(t){return t}));a.delete.forEach((function(e){return o.disposeChildNodeMesh(t,e)})),a.add.forEach((function(e){return o.createChildNodeMesh(t,e,r)})),a.update.forEach((function(e){return o.updateChildNodeMesh(t,e,r)})),this.modelDepProps.renderChildNodes=i}},{key:"renderDisplayInfoMesh",value:function(t,e,r){var n,o=this,i=e.getFurnitureModel(),a=null!==(n=this.materialParams.opacity)&&void 0!==n?n:1;if(this.modelDepProps.furnitureModel!==i)this.modelDepProps.furnitureModel=i,this.disposeDisplayInfoMesh(t),i&&(this.displayInfoDrawableProps={displayInfo:i.displayInfo,position:i.furnitureTranslation||Se.default.ZERO,size:i.size,scale:Se.default.ONE,rotation:Se.default.ZERO,generateComponentInstanceKey:qA(e.getId()),getMaterialSideProperty:function(){return nr.Side.DoubleSide},opacity:a,onMaterialLoadSuccess:function(t,e){var r=o.displayInfoDrawableMesh=e,n=o.overrideMaterial;if(n){t.removeObjects(r);var i=r.map((function(t){return new nr.Mesh(t.geometry.clone(),new nr.LineBasicMaterial({color:n.color,opacity:n.opacity}))}));t.add(i)}}},this.displayInfoDrawable=new DA.a(this.displayInfoDrawableProps),this.displayInfoMesh=this.displayInfoDrawable.create(r),t.add(this.displayInfoMesh));else if(this.displayInfoDrawable&&this.displayInfoDrawableProps){this.displayInfoDrawableProps.opacity=a;var s=this.overrideMaterial,u=this.displayInfoMesh;if(s){u.removeAllChildren();var c=this.displayInfoDrawableMesh.map((function(t){return new nr.Mesh(t.geometry.clone(),new nr.LineBasicMaterial({color:s.color,opacity:s.opacity}))}));u.add(c)}else u&&u.children!==this.displayInfoDrawableMesh&&this.displayInfoDrawableMesh.length&&(u.removeAllChildren(),u.add(this.displayInfoDrawableMesh));this.displayInfoDrawable.update(u)}}},{key:"renderDisplayInfoMeshes",value:function(t,e,r){var n,o=e.getFurnitureModels(),i=null!==(n=this.materialParams.opacity)&&void 0!==n?n:1;if(this.modelDepProps.furnitureModels!==o){if(this.modelDepProps.furnitureModels=o,this.disposeDisplayInfoMeshs(t),this.displayInfoDrawablesProps=o.map((function(t){return{displayInfo:t.displayInfo,position:t.position,size:t.size,scale:t.scale,rotation:t.rotate,generateComponentInstanceKey:qA(e.getId()),opacity:i}})),this.displayInfoDrawables=this.displayInfoDrawablesProps.map((function(t){return new DA.a(t)})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(t){return t.create(r)})),this.displayInfoMeshs.length>0){var a,s=Rl(this.displayInfoMeshs);try{for(s.s();!(a=s.n()).done;){var u=a.value;t.add(u)}}catch(t){s.e(t)}finally{s.f()}}}else for(var c=0;c<this.displayInfoDrawables.length;c++){this.displayInfoDrawablesProps[c].opacity=i;var A=this.displayInfoDrawables[c],l=this.displayInfoMeshs[c];A.update(l)}}},{key:"renderLineSegments",value:function(t,e){var r;if(e.getMeshModels()&&e.getMeshModels().length){var n=e.getWireFrames(),o=this.context.store,i=o.showOutline,a=o.showPlankOutline||i;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(t),this.lineSegments=new el({points:n||[],visible:a}),t.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:a})}}}])&&Nl(e.prototype,r),n&&Nl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Yl(n.key),n)}}function Yl(t){var e=function(t,e){if("object"!=Jl(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Jl(e)?e:String(e)}function Hl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vl(t,e){return(Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ql(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kl(t);if(e){var o=Kl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wl(this,r)}}function Wl(t,e){if(e&&("object"===Jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kl(t){return(Kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jl(t){return(Jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Xl=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Jl(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Zl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vl(t,e)}(i,t);var e,r,n,o=ql(i);function i(){var t;return Hl(this,i),(t=o.apply(this,arguments))._parent=void 0,t}return e=i,r&&zl(e.prototype,r),n&&zl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(QA);function $l(t){return($l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ef(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nf(n.key),n)}}function rf(t,e,r){return e&&ef(t.prototype,e),r&&ef(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function nf(t){var e=function(t,e){if("object"!=$l(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=$l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$l(e)?e:String(e)}function of(t,e,r){var n=r.getEntity(t)||function(t,e){if(e.filterParamModel(t))return t.isRoot()?new Zl(t,e):new OA(t,e)}(t,e);if(n){r.registerEntity(t,n);var o=t.getParent();return o&&(n._parent=r.getEntity(o)),n._children=t.getChildNodes().map((function(t){return of(t,e,r)})).filter((function(t){return!!t})),n}}Zl=Xl([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return new Ul({model:this.model,renderChild:function e(r){return new Ul({model:r,renderChild:e},t.context)}},this.context)})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],Zl);var af=function(){function t(e){var r=this;tf(this,t),this.context=e,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(t,e){r.entityCaches.has(t)||r.entityCaches.set(t,e),r.entities.push(e)},this.getEntity=function(t){return r.entityCaches.get(t)}}return rf(t,[{key:"createEntities",value:function(t){var e={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=t.length;r<n;r++)of(t[r],this.context,e);return this.entities}},{key:"createAssemblyEntities",value:function(t){return t.map((function(t){return new yA(t)}))}}]),t}(),sf=function(){function t(e,r){tf(this,t),this.getCustom=e,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new af(r)}return rf(t,[{key:"getParamModelEntities",value:function(){var t=this.getCustom();return void 0!==t?this.factory.createEntities(t.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var t=this.getCustom();return void 0!==t?this.factory.createAssemblyEntities(t.getParamModelAssemblies()):[]}}]),t}();function uf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Af(n.key),n)}}function cf(t,e,r){return e&&uf(t.prototype,e),r&&uf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Af(t){var e=function(t,e){if("object"!=lf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lf(e)?e:String(e)}function lf(t){return(lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ff,hf=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lf(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},pf=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":lf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},df=cf((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.showOutline=!1,this.showPlankOutline=!1,this.transparentMode=nA.Unset,this.selected=[]}));function gf(t){return(gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yf(t){return function(t){if(Array.isArray(t))return vf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return vf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vf(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,If(n.key),n)}}function If(t){var e=function(t,e){if("object"!=gf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gf(e)?e:String(e)}hf([_r.observable,pf("design:type",Object)],df.prototype,"showOutline",void 0),hf([_r.observable,pf("design:type",Object)],df.prototype,"showPlankOutline",void 0),hf([_r.observable,pf("design:type","function"==typeof(ff=void 0!==nA&&nA)?ff:Object)],df.prototype,"transparentMode",void 0),hf([_r.observable,pf("design:type",Array)],df.prototype,"selected",void 0);var Ef=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.infoMap=new Map,this.idMap=new Map}var e,r,n;return e=t,(r=[{key:"addObject",value:function(t,e){this.infoMap.set(t,e),this.idMap.set(e.id,e)}},{key:"removeObject",value:function(t){var e=this.infoMap.get(t);e&&(this.infoMap.delete(t),e===this.idMap.get(e.id)&&this.idMap.delete(e.id))}},{key:"getInfo",value:function(t){return t instanceof nr.Object3D?this.infoMap.get(t):this.idMap.get(t)}},{key:"getInfos",value:function(){return yf(this.idMap.entries())}}])&&mf(e.prototype,r),n&&mf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Cf=r(168);function bf(t){return(bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wf(n.key),n)}}function wf(t){var e=function(t,e){if("object"!=bf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bf(e)?e:String(e)}var Pf=function(){function t(e,r,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.selectionStateManager=e,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){o.onStateChange()},this.init()}var e,r,n;return e=t,(r=[{key:"isSelected",value:function(t){return!!this.selected.find((function(e){return e.entityId===t}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Cf.a,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Cf.a,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var t=this.selectionStateManager.state.value,e=this.rawSelected,r=this.selected;if(this.rawSelected!==t){this.rawSelected=t;var n=this.resolveSelected(t)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}e!==t&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(t){var e=this;return t.filter((function(t){return e.entityTypes.includes(t.entityType)}))}},{key:"resolveSelectedChanged",value:function(t,e){if(t.length!==e.length)return!0;if(0===t.length&&0===e.length)return!1;for(var r=function(t,e){return t>e?1:t===e?0:-1},n=t.map((function(t){return t.entityId+"%%"+t.entityType.toString()})).sort(r),o=e.map((function(t){return t.entityId+"%%"+t.entityType.toString()})).sort(r),i=0,a=o.length;i<a;++i)if(n[i]!==o[i])return!0;return!1}}])&&Bf(e.prototype,r),n&&Bf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Sf(t){return(Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Of(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qf(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Of(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Of(t,e){if(t){if("string"==typeof t)return Df(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Df(t,e):void 0}}function Df(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Rf(n.key),n)}}function Rf(t){var e=function(t,e){if("object"!=Sf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Sf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Sf(e)?e:String(e)}function Tf(t,e){return(Tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Lf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kf(t);if(e){var o=kf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jf(this,r)}}function jf(t,e){if(e&&("object"===Sf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kf(t){return(kf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Pf.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var Nf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tf(t,e)}(i,t);var e,r,n,o=Lf(i);function i(){var t;return xf(this,i),(t=o.apply(this,arguments)).store=new df,t.objectManager=new Ef,t.stateReducers=[],t.onScene3DInit=function(e){var r=t.appService.stateManager.registerView(t._scene3dId);Xu.pb.registerDefaultSystems3D(r,t._scene3dId,e),r.activeView(t._scene3dId)},t.toggleShowModelOutline=function(e){t.store.showOutline=e},t.togglePlankOutline=function(e){t.store.showPlankOutline=e},t.updateTransparentMode=function(e){t.store.transparentMode=e},t.updateModelState=function(e,r){var n=t.objectManager.getInfo(e),o=t.selectManager.isSelected(e);r(n.drawableState,o)},t.updateModelsState=function(e){var r,n=Qf(t.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var o=_f(r.value,2),i=o[0],a=o[1],s=t.selectManager.isSelected(i);e(i,a.drawableState,s)}}catch(t){n.e(t)}finally{n.f()}},t}return e=i,(r=[{key:"config",value:function(t,e){var r=this;this._scene3dId=e.scene3dID||"scene3d",this.appService=t;var n=t.stateManager,o=e.paramModelSymbol,i=e.getDoc,a=e.getCustom,s=e.pickActualInteractiveEntity,u=void 0===s?function(t){return t}:s,c=e.filterParamModel;this.selectManager=new Pf(n.selection,[o],(function(t,e){r.store.selected=t,r.emit(Xc.SELECTED,{selected:t,oldSelected:e})})),t.registerEntityDocument(new sf(a,{store:this.store,type:o,objectManager:this.objectManager,pickActualInteractiveEntity:u,stateReducers:this.stateReducers,filterParamModel:c}));var A=i().getElementContext();return A.getterEmitter.on((function(t){_r.advanced.reportObserved(t.instance)})),A.setterEmitter.on((function(t){_r.advanced.reportChanged(t.instance)})),this}},{key:"registerReducer",value:function(t){this.stateReducers.push(t)}},{key:"triggerReducer",value:function(t){var e,r=Qf(this.objectManager.getInfos());try{for(r.s();!(e=r.n()).done;){var n=_f(e.value,2),o=n[0],i=n[1];if(!t||t.includes(o)){var a,s=this.selectManager.isSelected(o),u=Qf(this.stateReducers);try{for(u.s();!(a=u.n()).done;)(0,a.value)(i.model,s,i.drawableState)}catch(t){u.e(t)}finally{u.f()}}}}catch(t){r.e(t)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}},{key:"setInteractionPriorityConfig",value:function(t,e){!function(t,e){HA.hardware=t,HA.customModel=e}(t,e)}}])&&Mf(e.prototype,r),n&&Mf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pr.EventEmitter),Ff=r(350),Gf=r(767);function Uf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Hf(n.key),n)}}function Yf(t,e,r){return e&&zf(t.prototype,e),r&&zf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hf(t){var e=function(t,e){if("object"!=Vf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vf(e)?e:String(e)}function Vf(t){return(Vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var qf,Wf,Kf,Jf,Xf=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vf(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Zf=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Vf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};function $f(t){var e=this;if(e===Kf.GUARD)return function(t,e,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var t,r=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(Jf){if(o!==Jf)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(Jf=o,Fe.a.begGetDeps(o));try{t=n.apply(this,arguments)}catch(t){r=t}if(o&&(Jf=void 0,Fe.a.endGetDeps(o)),r)throw r.message="CUSTOM: ["+e+"] "+r.message,r;return t},r};var r=0===arguments.length;return function(n,o){if(r){var i="get"+o[0].toLocaleUpperCase()+o.slice(1);t=function(t){return t[i]()}}if(!n.hasOwnProperty("__lazyKeys")){var a=[],s=[],u=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:s}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:u});var c=n.__accessLazyValues,A=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){A&&A.call(this);for(var t=void 0,e=0,r=s.length;e<r;++e)t=u[e],this[s[e]]=Object(Qr.isFunction)(t)?t(this.__DONT_USE_ME):t}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var t=0,e=a.length;t<e;++t)this[a[t]]}})}e===Kf.LAZY?(n.__lazyKeys.push(o),Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){var e=this.__LAZY_VALUES;if(e.__keys[o])return e[o];var r=t;if(Object(Qr.isFunction)(t)){var n=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(Jf){if(i!==Jf)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(Jf=i,Fe.a.begGetDeps(i));try{r=t(this.__DONT_USE_ME,this)}catch(t){n=t}if(i&&(Jf=void 0,Fe.a.endGetDeps(i)),n)throw n.message="CUSTOM: ["+o+"] "+n.message,n}return e[o]=r,e.__keys[o]=!0,r}})):(n.__immeKeys.push(o),n.__immeVals.push(t))}}!function(t){t.LAZY="__@access@lazy@__",t.IMMEDIATE="__@access@imme@__",t.GUARD="__@access@guard@__"}(Kf||(Kf={}));var th={lazy:$f.bind(Kf.LAZY),imme:$f.bind(Kf.IMMEDIATE),guard:$f.bind(Kf.GUARD),castTo:void 0};th.castTo=function(){return th};var eh=function(){function t(e){Uf(this,t),this.__DONT_USE_ME=e,Jf&&(this.__TRANSFORM_CONTEXT_ADD_DEP=Jf),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return Yf(t,[{key:"asStub",value:function(){var t=ke.CDoc.transformModelContext;if(t&&t.deps&&t.rms){var e=t.deps,r=t.rms,n=this.__DONT_USE_ME;e.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(t){t!==n&&(e.add(t),r.listeningTypes.add(t.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var t=function(t,e){for(var r,n=Object.getOwnPropertyNames(t),o=0,i=n.length;o<i;++o)(r=n[o]).startsWith("$")||r.startsWith("_")||(e[r]=t[r]);return e},e={};return t(this,e),t(this.__LAZY_VALUES,e),e}},{key:"guard",value:function(t){return t(this)}}]),t}();Xf([th.imme(),Zf("design:type",String)],eh.prototype,"id",void 0),Xf([th.imme((function(t){return t.constructor})),Zf("design:type","function"==typeof(qf=void 0!==Gf.ConstructorOf&&Gf.ConstructorOf)?qf:Object)],eh.prototype,"kType",void 0),Xf([th.lazy((function(t){return t})),Zf("design:type",Boolean)],eh.prototype,"$model",void 0),Xf([th.guard(),Zf("design:type",Function),Zf("design:paramtypes",[Function]),Zf("design:returntype","function"==typeof(Wf="undefined"!=typeof T&&T)?Wf:Object)],eh.prototype,"guard",null);var rh=function(){function t(){Uf(this,t)}return Yf(t,null,[{key:"registeCreator",value:function(t,e){this.creators.set(t,e)}},{key:"get",value:function(t,e){if(e||!t.__modelDataFacade){var r=this.creators.get(t.constructor);if(!r)return;t.__modelDataFacade=r(t)}return t.__modelDataFacade}},{key:"put",value:function(t){t.__modelDataFacade&&(t.__modelDataFacade=void 0)}}]),t}();rh.creators=new Map;var nh=r(388);function oh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ih(n.key),n)}}function ih(t){var e=function(t,e){if("object"!=lh(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lh(e)?e:String(e)}function ah(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sh(t,e){return(sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function uh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ah(t);if(e){var o=Ah(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ch(this,r)}}function ch(t,e){if(e&&("object"===lh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ah(t){return(Ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function lh(t){return(lh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fh,hh,ph,dh,gh,yh=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lh(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},vh=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":lh(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mh=Symbol("baseParamModel"),Ih=th.castTo(),Eh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sh(t,e)}(i,t);var e,r,n,o=uh(i);function i(){return ah(this,i),o.apply(this,arguments)}return e=i,r&&oh(e.prototype,r),n&&oh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eh);function Ch(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bh(n.key),n)}}function bh(t){var e=function(t,e){if("object"!=_h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_h(e)?e:String(e)}function Bh(t,e){return(Bh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Sh(t);if(e){var o=Sh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ph(this,r)}}function Ph(t,e){if(e&&("object"===_h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Sh(t){return(Sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _h(t){return(_h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}yh([Ih.lazy(),vh("design:type",String)],Eh.prototype,"modelInstanceId",void 0),yh([Ih.imme(mh),vh("design:type",Symbol)],Eh.prototype,"type",void 0),yh([Ih.lazy((function(t){return t.getType()})),vh("design:type","function"==typeof(fh=void 0!==es.ParamModelType&&es.ParamModelType)?fh:Object)],Eh.prototype,"modelType",void 0),yh([Ih.lazy(),vh("design:type",String)],Eh.prototype,"name",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(hh=void 0!==Se.default&&Se.default)?hh:Object)],Eh.prototype,"size",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(ph=void 0!==be.default&&be.default)?ph:Object)],Eh.prototype,"box3",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(dh=void 0!==nh.ParamStore&&nh.ParamStore)?dh:Object)],Eh.prototype,"paramStore",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(gh=void 0!==es.ParamModelCategory&&es.ParamModelCategory)?gh:Object)],Eh.prototype,"category",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"legal",void 0),yh([Ih.lazy((function(t){return t.getHasAttached()})),vh("design:type",Boolean)],Eh.prototype,"attached",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"deletable",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"replaceable",void 0),yh([Ih.lazy(),vh("design:type",Number)],Eh.prototype,"attachedVersion",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"paramOverride",void 0);var Qh,Oh,Dh=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_h(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},xh=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":_h(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Mh=th.castTo(),Rh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bh(t,e)}(i,t);var e,r,n,o=wh(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t)).parent=e,r}return e=i,(r=[{key:"visit",value:function(t,e){this.$model.visit(t,e)}},{key:"upVisit",value:function(t,e){this.$model.upVisit(t,e)}}])&&Ch(e.prototype,r),n&&Ch(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function Th(t){return(Th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lh(Object(r),!0).forEach((function(e){kh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kh(t,e,r){return(e=Kh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nh(t){return function(t){if(Array.isArray(t))return Fh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Fh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fh(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Gh(){return(Gh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Uh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Uh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vh(t)););return t}function zh(t,e){return(zh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Vh(t);if(e){var o=Vh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Hh(this,r)}}function Hh(t,e){if(e&&("object"===Th(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Vh(t){return(Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kh(n.key),n)}}function Wh(t,e,r){return e&&qh(t.prototype,e),r&&qh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kh(t){var e=function(t,e){if("object"!=Th(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Th(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Th(e)?e:String(e)}function Jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Dh([Mh.lazy((function(t,e){for(var r=e;r.parent;)r=r.parent;return r})),xh("design:type",Rh)],Rh.prototype,"root",void 0),Dh([Mh.imme(iA),xh("design:type",Symbol)],Rh.prototype,"type",void 0),Dh([Mh.lazy((function(t){return t.isRoot()})),xh("design:type",Boolean)],Rh.prototype,"isRoot",void 0),Dh([Mh.lazy((function(t){return t.isAccessory()})),xh("design:type",Boolean)],Rh.prototype,"isAccessory",void 0),Dh([Mh.lazy((function(t){return t.getAssembly()?t.getAssembly().getId():void 0})),xh("design:type",String)],Rh.prototype,"assemblyId",void 0),Dh([Mh.lazy((function(t,e){return t.getChildren().map((function(t){return rh.get(t)}))})),xh("design:type",Array)],Rh.prototype,"children",void 0),Dh([Mh.lazy((function(t,e){return t.getAccessories().map((function(t){return rh.get(t)}))})),xh("design:type",Array)],Rh.prototype,"accessories",void 0),Dh([Mh.lazy((function(t,e){return e.children.concat(e.accessories)})),xh("design:type",Array)],Rh.prototype,"childNodes",void 0),Dh([Mh.lazy((function(t,e){return!!t.getAssembly()&&t.getAssembly().isTemplateAssembly()})),xh("design:type",Boolean)],Rh.prototype,"belongsToTemplateAssembly",void 0),Dh([Mh.guard(),xh("design:type",Function),xh("design:paramtypes",["function"==typeof(Qh=void 0!==er.ParamModelVisitor&&er.ParamModelVisitor)?Qh:Object,Boolean]),xh("design:returntype",void 0)],Rh.prototype,"visit",null),Dh([Mh.guard(),xh("design:type",Function),xh("design:paramtypes",["function"==typeof(Oh=void 0!==er.ParamModelVisitor&&er.ParamModelVisitor)?Oh:Object,Boolean]),xh("design:returntype",void 0)],Rh.prototype,"upVisit",null),rh.registeCreator(dr,(function(t){return t.isRoot()?new Rh(t):rh.get(t.getParent()).guard((function(e){return new Rh(t,e)}))}));Symbol("paramModelMultiSelectionEntity");var Xh=Wh((function t(){Jh(this,t),this.paramModels=[],this.paramModelAssembies=[]})),Zh=function(t,e){return e.paramsMap[t]||e.paramsChildrenMap[t]},$h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zh(t,e)}(r,t);var e=Yh(r);function r(t){var n;return Jh(this,r),(n=e.call(this,t)).findModelOrAssemblyModelById=function(t){var e=n.findModel(t);return e?e.$model:n.findParamModelAssembly(t)},n.modelsMap={paramsMap:{},paramsChildrenMap:{}},n.childrenMap={},n}return Wh(r,[{key:"updateState",value:function(t){var e=this.state?this.state.paramModels:[],n=this.state?this.state.paramModelAssembies:[];Gh(Vh(r.prototype),"updateState",this).call(this,t);var o=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(e,o),e===o&&n===i||this.emit(r.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(t,e){var r=Us.Util.diffArray(t,e),n=this.modelsMap.paramsMap,o=r.removed;o.push.apply(o,Nh(r.updatedOld));var i,a,s=r.added;s.push.apply(s,Nh(r.updatedNew));for(var u=this.childrenMap,c=this.modelsMap.paramsChildrenMap,A=0,l=o.length;A<l;++A){if(delete n[a=o[A].id],(i=u[a])&&i.length>0)for(var f=0,h=i.length;f<h;++f)delete c[i[f]];delete u[a]}for(var p=0,d=s.length;p<d;++p)n[a=s[p].id]=s[p].$model,i=[],s[p].visit((function(t){a=t.getId(),i.push(a),c[a]=t,rh.put(t)}),!0),u[a]=i}},{key:"initState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(jh(jh({},t),new Xh)),this.state}},{key:"initModelBindingState",value:function(t){}},{key:"bindDesign",value:function(t){var e=this.reactiveModelState;e||(e=new(Ff.default.createBase({defaultArrayItemSyncPoint:function(t,e){return!0},shouldIgnoreBinderCheck:function(t){return t&&t.type===iA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=e);var r=t.getDoc();e.initModelState({paramModels:Object(Ff.bindArray)(r.addDependency((function(){return t.getCustom().getParamModels()}),e)).map(r.addDependency((function(t){var e=rh.get(t,!0);return e.asStub(),e}),e)),paramModelAssembies:Object(Ff.bindArray)(r.addDependency((function(){return t.getCustom().getParamModelAssemblies()}),e)).map(r.addDependency((function(t){return t}),e))})}},{key:"findModelEx",value:function(t,e){return e(t,this.modelsMap)}},{key:"findModel",value:function(t){var e=this.findModelEx(t,Zh);return e?rh.get(e):void 0}},{key:"findParamModelAssembly",value:function(t){return this.state.paramModelAssembies.find((function(e){return e.id===t}))}}]),r}(tA.a);function tp(t){return(tp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ep(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,np(n.key),n)}}function np(t){var e=function(t,e){if("object"!=tp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tp(e)?e:String(e)}function op(){return(op="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=ip(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function ip(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=cp(t)););return t}function ap(t,e){return(ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=cp(t);if(e){var o=cp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return up(this,r)}}function up(t,e){if(e&&("object"===tp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function cp(t){return(cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}$h.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var Ap,lp=Object($c.getConnector)().setRootState,fp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ap(t,e)}(i,t);var e,r,n,o=sp(i);function i(){var t;return ep(this,i),(t=o.apply(this,arguments)).design=new tr,t.fittingDesign=new Vr,t}return e=i,(r=[{key:"initState",value:function(){op(cp(i.prototype),"initState",this).call(this);var t=Id().getDependentPlugin(zs.a);return this.kaf=t.stateManager,this.pad.bindDesign(this.design),this.state}}])&&rp(e.prototype,r),n&&rp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Xu.Jb.combine({pad:$h}));function hp(t){return(hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dp(n.key),n)}}function dp(t){var e=function(t,e){if("object"!=hp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hp(e)?e:String(e)}!function(t){t[t.NONE=0]="NONE",t[t.NORMAL=0]="NORMAL",t[t.ENCRYPTED=1]="ENCRYPTED",t[t.COMPRESSED=2]="COMPRESSED"}(Ap||(Ap={}));var gp=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"toNetParams",value:function(t,e,r){var n={};return n.api=t,n.params=e?e.params:void 0,n.data=r,void 0===n.data&&(n.data=e?e.data:void 0),n.headers=e&&e.headers||{},n}},{key:"toAxiosConfig",value:function(t){t.method||(t.method=Us.ERequest.GET),t.method===Us.ERequest.GET&&t.data&&(t.params?Object.keys(t.data).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==t.params[e]&&console.warn("HTTP GET params ["+e+"] overwrited by data"),t.params[e]=t.data[e]})):t.params=t.data,delete t.data);var e={};if(e.url=t.url||t.api,e.params=t.params,e.data=t.data,e.headers=t.headers,e.method=t.method,t.extend){var r=e,n=t.extend;Object.keys(n).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[t]&&console.warn("[CUSTOM] Request config ["+t+"] overwrited by extend"),r[t]=n[t]}))}return e}}],(r=null)&&pp(e.prototype,r),n&&pp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yp(t){return(yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mp(n.key),n)}}function mp(t){var e=function(t,e){if("object"!=yp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=yp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==yp(e)?e:String(e)}var Ip=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.net=e}var e,r,n;return e=t,(r=[{key:"addClientInterceptors",value:function(t){}},{key:"encryptedGet",value:function(t,e){return this._get(Ap.ENCRYPTED,t,e)}},{key:"encryptedDelete",value:function(t,e){return this._delete(Ap.ENCRYPTED,t,e)}},{key:"encryptedPost",value:function(t,e,r){return this._post(Ap.ENCRYPTED,t,e,r)}},{key:"encryptedPut",value:function(t,e,r){return this._put(Ap.ENCRYPTED,t,e,r)}},{key:"gzipGet",value:function(t,e){return this._get(Ap.COMPRESSED,t,e)}},{key:"gzipPost",value:function(t,e,r){return this._post(Ap.COMPRESSED,t,e,r)}},{key:"request",value:function(t){var e=gp.toNetParams(t.url,t);return this.net.get(e)}},{key:"get",value:function(t,e){return this._get(Ap.NORMAL,t,e)}},{key:"delete",value:function(t,e){return this._delete(Ap.NORMAL,t,e)}},{key:"post",value:function(t,e,r){return this._post(Ap.NORMAL,t,e,r)}},{key:"put",value:function(t,e,r){return this._put(Ap.NORMAL,t,e,r)}},{key:"_get",value:function(t,e,r){var n=gp.toNetParams(e,r);return this.net.get(n,{mode:t})}},{key:"_delete",value:function(t,e,r){var n=gp.toNetParams(e,r);return this.net.delete(n,{mode:t})}},{key:"_post",value:function(t,e,r,n){var o=gp.toNetParams(e,n,r);return this.net.post(o,{mode:t})}},{key:"_put",value:function(t,e,r,n){var o=gp.toNetParams(e,n,r);return o.method="PUT",this.net.request(o,{mode:t})}}])&&vp(e.prototype,r),n&&vp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ep(t){return(Ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function bp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Cp(Object(r),!0).forEach((function(e){Bp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bp(t,e,r){return(e=Qp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */wp=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Ep(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ep(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Pp(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Sp(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Pp(i,n,o,a,s,"next",t)}function s(t){Pp(i,n,o,a,s,"throw",t)}a(void 0)}))}}function _p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qp(n.key),n)}}function Qp(t){var e=function(t,e){if("object"!=Ep(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ep(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ep(e)?e:String(e)}var Op=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.request=function(){var t=Sp(wp().mark((function t(r){var n,o;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.convertRequest(r),t.next=3,e.service.request(n);case 3:return o=t.sent,t.abrupt("return",e.wrapResponse(r,o));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.get=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.get(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.delete=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.delete(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.post=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.post(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.put=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.put(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.encryptedRequest=function(){var t=Sp(wp().mark((function t(r){var n,o;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.convertRequest(r),t.next=3,e.service.encryptedRequest(n);case 3:return o=t.sent,t.abrupt("return",e.wrapResponse(r,o));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.encryptedGet=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.encryptedGet(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.encryptedDelete=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.encryptedDelete(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.encryptedPost=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.encryptedPost(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.encryptedPut=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.encryptedPut(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.gzipRequest=function(){var t=Sp(wp().mark((function t(r){var n,o;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.convertRequest(r),t.next=3,e.service.gzipRequest(n);case 3:return o=t.sent,t.abrupt("return",e.wrapResponse(r,o));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.gzipGet=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.gzipGet(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.gzipPost=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.gzipPost(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.gzipPut=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.gzipPut(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.pbGzipGet=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.pbGzipGet(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.pbGzipPost=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.pbGzipPost(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()}var e,r,n;return e=t,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(t){return this._service=t,this}},{key:"convertRequest",value:function(t){var e,r;return{url:t.url,method:t.method,baseURL:t.baseURL,params:t.params,data:t.data,timeout:t.timeout,extra:{isRequestBodyJson:null===(r=null===(e=t)||void 0===e?void 0:e.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(t,e){return{data:e.data,status:200,statusText:"ok",headers:{},config:t,encryptedDataLength:0,dataLength:0}}}])&&_p(e.prototype,r),n&&_p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Dp=r(909),xp=r(101),Mp=r(378),Rp=r(305),Tp=r(183);function Lp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jp(n.key),n)}}function jp(t){var e=function(t,e){if("object"!=zp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zp(e)?e:String(e)}function kp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Np(t,e){return(Np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Up(t);if(e){var o=Up(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gp(this,r)}}function Gp(t,e){if(e&&("object"===zp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Up(t){return(Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function zp(t){return(zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Yp,Hp,Vp,qp,Wp,Kp,Jp,Xp,Zp=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":zp(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},$p=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":zp(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},td=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Np(t,e)}(i,t);var e,r,n,o=Fp(i);function i(){var t;return kp(this,i),(t=o.apply(this,arguments)).client=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.encryptedClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.encryptInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.gzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.gzipEncryptBase64Interceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.pbEncryptedClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.encryptInterceptorWithArrayBuffer,xp.encryptInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.pbGzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.gzipEncryptInterceptorWithArrayBuffer,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.ossGzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.gzipEncryptBase64Interceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.ossDegradedEncryptedClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.ossDegradedEncryptInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.ossDegradedGzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.ossDegradedGzipEncryptBase64Interceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t}return e=i,r&&Lp(e.prototype,r),n&&Lp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Dp.RequestClient);Zp([xp.retryRequest,$p("design:type","function"==typeof(Yp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Yp:Object)],td.prototype,"client",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Hp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Hp:Object)],td.prototype,"encryptedClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Vp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Vp:Object)],td.prototype,"gzippedEncryptClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(qp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?qp:Object)],td.prototype,"pbEncryptedClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Wp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Wp:Object)],td.prototype,"pbGzippedEncryptClient",void 0),Zp([Object(xp.retryRequest)(!0),$p("design:type","function"==typeof(Kp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Kp:Object)],td.prototype,"ossGzippedEncryptClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Jp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Jp:Object)],td.prototype,"ossDegradedEncryptedClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Xp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Xp:Object)],td.prototype,"ossDegradedGzippedEncryptClient",void 0);var ed=Object(Qr.once)((function(){return new td})),rd=Object(Qr.once)((function(){return new Op}));function nd(t){return(nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function od(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */od=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==nd(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(nd(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function id(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function ad(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sd(n.key),n)}}function sd(t){var e=function(t,e){if("object"!=nd(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=nd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==nd(e)?e:String(e)}var ud=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,i;return e=t,(r=[{key:"addClientInterceptors",value:function(t){return ed().addClientInterceptors(t)}},{key:"send",value:(o=od().mark((function t(e,r){var n,o;return od().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=ed(),o=gp.toAxiosConfig(e),r.mode!==Ap.COMPRESSED){t.next=6;break}return t.abrupt("return",n.gzipRequest(o));case 6:if(r.mode!==Ap.ENCRYPTED){t.next=10;break}return t.abrupt("return",n.encryptedRequest(o));case 10:return t.abrupt("return",n.request(o));case 11:case"end":return t.stop()}}),t)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){id(i,r,n,a,s,"next",t)}function s(t){id(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}])&&ad(e.prototype,r),n&&ad(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function cd(t){return(cd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ad(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ld(n.key),n)}}function ld(t){var e=function(t,e){if("object"!=cd(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==cd(e)?e:String(e)}function fd(){return(fd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=hd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function hd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yd(t)););return t}function pd(t,e){return(pd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yd(t);if(e){var o=yd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gd(this,r)}}function gd(t,e){if(e&&("object"===cd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yd(t){return(yd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vd=new Us.SingletonRef,md=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pd(t,e)}(i,t);var e,r,n,o=dd(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.core",name:"cCoreApp",Component:tu,axrs:xu,singleton:vd},t)).stateManager=e,r}return e=i,(r=[{key:"init",value:function(){fd(yd(i.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var t=this.getDependentPlugin(zs.a);this.initLogger(t);var e=this.stateManager,r=e.design,n=e.fittingDesign;Qc.configTopDocumentAction([r],t.stateManager.document),t.addDocumentSource(new jc(r,"custom-pad-document")),t.addDocumentSource(new Zc(n,"fitting-document"));var o=r.getDoc().getElementContext();o.getterEmitter.on((function(t){_r.advanced.reportObserved(t.instance)})),o.setterEmitter.on((function(t){_r.advanced.reportChanged(t.instance)}))}},{key:"initLogger",value:function(t){var e;e=t.logger,hu=e}},{key:"initStateManager",value:function(){this.stateManager.initState(),lp(this.stateManager)}},{key:"initNet",value:function(){fd(yd(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new ud),this.client=new Ip(this.net)}}])&&Ad(e.prototype,r),n&&Ad(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.PluginApplication),Id=vd.instance;function Ed(t){return(Ed="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cd(t){return function(t){if(Array.isArray(t))return bd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bd(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Bd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wd(t,e,r){var n;return n=function(t,e){if("object"!=Ed(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ed(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Ed(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pd(t,e){var r=e.findRelativeModel,n=e.transformModel,o=e.color,i=e.defaultConfig;return Object(Qr.map)(t,(function(t,e){var a=r(e);return a?Object(Qr.map)(t,(function(t){var e=n(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bd(Object(r),!0).forEach((function(e){wd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t),a,i);return o&&e.setViewColor(o),e})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function Sd(t,e){if(!(t instanceof Rn&&t.type===At.NONE)){var r=Id().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),o=t.path.plankArea.modelID,i=n.find((function(e){return e.id===t.id&&e.linkModel.id===o})),a=t.getHint();if(i)i.setViewColor(a.color),i.setOpacity(a.opacity);else{var s=function(t){var e=t instanceof _n?t.getRealLine():t.getCurveLineAndPoints().curveLine;if(e instanceof c.Arc2d||e instanceof c.EllipticalArc2d){var r=t.path.getAllCurves().map((function(t){return t.curve}));if(e instanceof c.Arc2d){var n=e.circle.clone();n.radius+=1,e=new c.Arc2d(n,e.startAngle,e.endAngle,e.isCCW),t.path.type===ye.OUTER!=(c.PtInLoop.pointInLoop2D(e.middlePoint,r).ptInLoopType===c.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,e=new c.Arc2d(n,e.startAngle,e.endAngle,e.isCCW))}if(e instanceof c.EllipticalArc2d){var o=e.ccs,i=e.majorRadius+1,a=e.minorRadius+1,s=e.startParam,u=e.endParam,A=e.clockSign;e=new c.EllipticalArc2d(o,i,a,s,u,A),t.path.type===ye.OUTER!=(c.PtInLoop.pointInLoop2D(e.middlePoint,r).ptInLoopType===c.PtInLoop.PtInLoopType.Outside)&&(i=e.majorRadius-1,a=e.minorRadius-1,e=new c.EllipticalArc2d(o,i,a,s,u,A))}}return e}(t);e&&s.transform(e);var u=function(t){var e,r=t.linkModelId,n=t.hintModelId,o=t.curveLine,i=t.hint,a=Id().getStateManager().pad.findModelOrAssemblyModelById(r);if(a){var s=null===(e=a.getParam("thickness"))||void 0===e?void 0:e.getData().value,u=o instanceof c.EllipticalArc2d?o.getApproximatePoints(.01):o.getApproximatePoints();return new ci({linkModel:a,points:u,color:i.color,opacity:i.opacity,height:s?+s:0,id:n})}}({hint:a,curveLine:s,hintModelId:t.id,linkModelId:o});u&&r.setPlankOutlineHintModels([].concat(Cd(n),[u]))}}}function _d(t,e){var r=Id().getStateManager().fittingDesign,n=t.color,o=t.opacity,i=r.getPlankAreaFaceHints(),a=i.find((function(r){return r.faceId===t.id&&r.linkPlankArea===e.id}));if(a)a.setColor(n),a.setOpacity(o);else{var s=function(t,e){var r=t.id,n=t.color,o=t.opacity,i=e._isRealPath?e.getCenterPoint():null,a=i?c.Matrix3.makeTranslation(-i.x,-i.y):void 0,s=Id().getStateManager().pad.findModelOrAssemblyModelById(e.modelID);if(s){var u=function(t){return a?t.appliedMatrix3(a):t},A=e.paths.filter((function(t){return t.type===ye.OUTER})).map((function(t){return{outer:t.getAllPolygonPoints().map(u),inners:(e.pathMap.get(t)||[]).map((function(t){return t.getAllPolygonPoints().map(u)}))}}));return new Ho({faceId:r,color:n,opacity:o,linkPlankArea:e.id,faces:A,linkModel:s})}throw new Error("Can not find plankArea.model:"+e.modelID)}(t,e);s&&r.setPlankAreaFaceHints([].concat(Cd(i),[s]))}}function Qd(t,e){var r=Id().getStateManager().fittingDesign,n=r.getPlankAreaFaceHints(),o=n.findIndex((function(r){return r.faceId===t&&r.linkPlankArea===e}));if(o>-1){var i=Cd(n);i.splice(o,1),r.setPlankAreaFaceHints(i)}}function Od(t,e,r,n){var o=n.color,i=n.opacity,a=new _i(t,e,r,n);return void 0!==o&&a.setColor(o),void 0!==i&&a.setOpacity(i),a}function Dd(t,e,r,n){var o=n.color,i=n.opacity,a=new Ya(t,e,r,n);return void 0!==o&&a.setColor(o),void 0!==i&&a.setOpacity(i),a}function xd(t,e,r,n){var o=n.color,i=n.opacity,a=new va(t,e,r,n);return void 0!==o&&a.setColor(o),void 0!==i&&a.setOpacity(i),a}function Md(t,e,r,n){var o=n||{},i=o.color,a=o.opacity,s=new Da(t,e,r,n);return void 0!==i&&s.setColor(i),void 0!==a&&s.setOpacity(a),s}function Rd(t,e,r,n){var o=n||{},i=o.color,a=o.opacity,s=new ia(t,e,r,n);return void 0!==i&&s.setColor(i),void 0!==a&&s.setOpacity(a),s}function Td(t){return(Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ld(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ld(Object(r),!0).forEach((function(e){kd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kd(t,e,r){var n;return n=function(t,e){if("object"!=Td(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Td(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Td(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nd(t){var e=t.getChildNodes().filter((function(t){return t.getLegal()&&!!t.getParam("plankPath")&&t.getType()===_e.ParamModelType.PARAM_PRIMITIVE}));if(0===e.length)throw new Error("model:".concat(t.id," has not primitive"));if(e.length>1)throw new Error("model:".concat(t.id," has multiple primitive"));return e[0]}function Fd(t){var e=function(t){var e=t.points,r=t.curves;return new $n({points:Ui(e).map(zi),lines:r.map(Yi),depth:0,matrix4:new c.Matrix4})}(t).getLines().map((function(t){return t.getCurveLine()})),r=new c.GeomLoop2d(e).getBounding().center;return new c.Vector3d(r.x,r.y,0)}function Gd(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.modelId,o=t.renderProperty,i=t.finishedProfile,a=t.referencePlane,s=e.findRelativeModel,u=e.transformModel,c=s(n);if(c){var A=a?c:Nd(c);return u(n,t,A,jd(jd(jd({},r),o),{},{offset:i?Fd(i):void 0,referencePlane:a}))}throw new Error("model:".concat(n," is not exist"))}var Ud=r(7);function zd(t){return(zd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
146
+ ***************************************************************************** */!function(t){t[t.NONE=0]="NONE",t[t.CIRCLE=1]="CIRCLE",t[t.LINE=2]="LINE",t[t.CUT_CIRCLE=3]="CUT_CIRCLE",t[t.CIRCLE_CENTER=5]="CIRCLE_CENTER"}(x||(x={})),function(t){t[t.SEGMENT=0]="SEGMENT",t[t.CIRCLE_ARC=1]="CIRCLE_ARC",t[t.CIRCLE_CENTER=4]="CIRCLE_CENTER"}(M||(M={})),function(t){t.TRUE="true",t.FALSE="false"}(R||(R={})),function(t){t.FROM_TOP="1",t.FROM_BOTTOM="2"}(L||(L={})),function(t){t.number="number",t.string="string",t.boolean="boolean"}(j||(j={})),function(t){t.FLOAT="float",t.FLOAT2="float2",t.FLOAT3="float3",t.FLOAT_BUFFER="floatbuf",t.FLOAT2_BUFFER="float2buf",t.FLOAT3_BUFFER="float3buf",t.REFERENCE="reference",t.INT="int",t.INT_BUFFER="intbuf",t.STRING="string",t.SHAPE="shape",t.MATERIAL="material",t.BOOLEAN="boolean",t.BOOLEAN_BUFFER="booleanbuf",t.FIT="fit",t.PATH="paramcornerpath",t.STYLE="style",t.FORMULA_STRING="formulaString",t.BOOLEAN_LIST="booleanlist"}(k||(k={})),function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LENGTH=1]="LENGTH",t[t.AREA=2]="AREA",t[t.NUMBER=3]="NUMBER"}(N||(N={})),function(t){t[t.SINGLE=0]="SINGLE",t[t.RANGE=1]="RANGE",t[t.OPTION=2]="OPTION",t[t.STEP=3]="STEP",t[t.COMPOUND_FORMULA=4]="COMPOUND_FORMULA",t[t.FIXED_FORMULA=5]="FIXED_FORMULA",t[t.FIXED_VALUE=6]="FIXED_VALUE",t[t.COMPOUND_FORMULA_OPTION=7]="COMPOUND_FORMULA_OPTION"}(F||(F={})),function(t){t.SENSE="SENSE",t.BRANDGOOD="BRANDGOOD",t.CATEGORY="CATEGORY",t.TEMPLATE_ID="TEMPLATE_ID"}(G||(G={})),function(t){t[t.PARAM_ENTITY=1]="PARAM_ENTITY",t[t.PARAM_FURNITURE=2]="PARAM_FURNITURE",t[t.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",t[t.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",t[t.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY",t[t.TEMPLATE_ASSEMBLY=6]="TEMPLATE_ASSEMBLY"}(U||(U={})),function(t){t.MINIAPP_APPEND="$$miniappAppend"}(z||(z={})),function(t){t[t.ATTRIBUTE=0]="ATTRIBUTE",t[t.STORE=1]="STORE",t[t.BZ_STORE=2]="BZ_STORE",t[t.PLANK_PATH=3]="PLANK_PATH"}(Y||(Y={})),function(t){t.NAME="name",t.REMARK="remark",t.POSITION="position",t.ROTATION="rotation",t.TOOL_TYPE="toolType",t.POSITION_FORMULA="positionFormula",t.ROTATION_FORMULA="rotationFormula",t.FLOORPLAN_RELATION="floorplanRelation"}(H||(H={})),function(t){t.PATH="path",t.HOLES="holes",t.SLOTS="slots"}(V||(V={})),function(t){t[t.ACCESSORY=0]="ACCESSORY",t[t.CHILD=1]="CHILD",t[t.REPLACE_CHILD=2]="REPLACE_CHILD"}(q||(q={})),function(t){t[t.COMMON=0]="COMMON",t[t.ASSEMBLY=1]="ASSEMBLY",t[t.TEMPLATE_ASSEMBLY=2]="TEMPLATE_ASSEMBLY"}(W||(W={})),function(t){t.waiting="waiting",t.assigned="assigned",t.running="running",t.finished="finished",t.abnormal="abnormal",t.failed="failed"}(K||(K={})),function(t){t[t.GROOVE=1]="GROOVE",t[t.HOLE=2]="HOLE",t[t.HARDWARE=3]="HARDWARE",t[t.HARDWARE_GROOVE=4]="HARDWARE_GROOVE",t.INTERSECTED="intersected",t.HOLE_V2="holeV2",t.SQUARE_GROOVE="squareGroove",t.ROUND_CORNER_GROOVE="roundCornerGroove",t.SPECIAL_SHAPED_GROOVE="specialShapedGroove",t.PATH_GROOVE="pathGroove"}(J||(J={})),function(t){t.SHELL="1",t.FACE="2",t.THROUGH_SHELL="3"}(X||(X={})),function(t){t.SHELL="1",t.THROUGH_SHELL="3"}(Z||(Z={})),function(t){t[t.BOTH_PLANK=0]="BOTH_PLANK",t[t.PLANK_FURNITURE=1]="PLANK_FURNITURE"}($||($={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.LOCK=1]="LOCK",t[t.UNLOCK=2]="UNLOCK",t[t.RAW=3]="RAW"}(tt||(tt={})),function(t){t[t.PLANK=0]="PLANK",t[t.HARDWARE=1]="HARDWARE",t[t.PRODUCT=2]="PRODUCT"}(et||(et={})),function(t){t[t.XY=0]="XY",t[t.YZ=1]="YZ",t[t.XZ=2]="XZ"}(rt||(rt={})),function(t){t.PLANK="PLANK",t.FITTING="FITTING",t.AUXILIARY="AUXILIARY",t.LAMELLO="LAMELLO",t.LOCK="LOCK",t.EDGE="EDGE",t.INVISIBLE="INVISIBLE",t.ARRAY="ARRAY"}(nt||(nt={})),function(t){t.PLANK="PLANK",t.FITTING="FITTING",t.AUXILIARY="AUXILIARY"}(ot||(ot={})),function(t){t.Space="spaceDivision",t.Relation="relationDivision"}(it||(it={})),function(t){t[t.CAD=7]="CAD",t[t.JPG=2]="JPG",t[t.PDF=3]="PDF"}(at||(at={})),function(t){t[t.MODEL_EDITABLE=0]="MODEL_EDITABLE"}(st||(st={})),function(t){t.PDF="pdf",t.EXCEL="excel"}(ut||(ut={})),function(t){t[t.entity=1]="entity",t[t.furniture=2]="furniture",t[t.primitive=3]="primitive",t[t.virtual=4]="virtual",t[t.assemblyInstance=5]="assemblyInstance",t[t.assembly=6]="assembly"}(ct||(ct={})),function(t){t[t.NONE=0]="NONE",t[t.CIRCLE=1]="CIRCLE",t[t.LINE=2]="LINE",t[t.CUT_CIRCLE=3]="CUT_CIRCLE",t[t.ELLIPSE=4]="ELLIPSE",t[t.CIRCLE_CENTER=5]="CIRCLE_CENTER"}(At||(At={})),function(t){t[t.SEGMENT=0]="SEGMENT",t[t.CIRCLE_ARC=1]="CIRCLE_ARC",t[t.ELLIPSE_ARC=3]="ELLIPSE_ARC",t[t.CIRCLE_CENTER=4]="CIRCLE_CENTER"}(lt||(lt={}));var It,Et=function(){return(Et=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function Ct(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function bt(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Bt(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function wt(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Bt(arguments[e]));return t}function Pt(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{if("function"==typeof t)return t.apply(this,e)}catch(t){setTimeout((function(){throw t}))}}}function St(t){return t&&"object"===A(t)&&"function"==typeof t.then&&"function"==typeof t.catch}!function(t){t.LEFT="left",t.RIGHT="right",t.BOTTOM="bottom",t.TOP="top",t.BACK="back",t.FRONT="front"}(It||(It={}));var _t=function(){function t(){this.namespace=""}return t.prototype.getName=function(){return this.name},t.prototype.getType=function(){return this.type},t.prototype.getValue=function(){return function(t,e){if(null!=t){if(e===j.boolean)return Boolean(parseFloat(t));if(e===j.number)return parseFloat(t)}return t}(this.value,this.type)},t.prototype.getNamespace=function(){return this.namespace},t.prototype.setValue=function(t){var e;if(!this.readonly&&this.ref){var r=null!==(e=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==e?e:1024,n=function(t,e){if(e===j.boolean)return t?"1":"0";return t.toString()}(t,this.type);if(function(t){for(var e=t.length,r=t.length-1;r>=0;r--){var n=t.charCodeAt(r);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&r--}return e}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:Y.BZ_STORE,attr:D(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},t.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:Y.BZ_STORE,attr:D(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},t.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},t}();function Qt(t,e,r){void 0===r&&(r={functions:["abs","toRadians","toDegrees","sin","cos","tan","asin","acos","atan","ceil","floor","round","left","right","mid","strToNum","min","max","sqrt","isValue","statusSum","average","rad","boolAt","boolAll","deRound","stretchSize","stretchPosition","getProductCustomAttr"],variables:["W","D","H"]});var n=r.functions,o=r.variables,i=e.getParent();if(!(null==i?void 0:i.productId))throw new Error("model not support set formula");if(-1===i.getChild().findIndex((function(t){return t.id===e.id})))throw new Error("only child support set formula");for(var a=/#([a-zA-z$_][a-zA-Z$_\d]*)(?=\()/g,s=null;s=a.exec(t);)if(!n.includes(s[1]))throw new Error("function "+s[0]+" not available!");var u=/#([a-zA-z$_][a-zA-Z$_\d]*)\(?/g;for(s=null;s=u.exec(t);)if(!s[0].endsWith("(")&&!o.includes(s[1])&&!i.hasParam(s[1]))throw new Error("variable "+s[0]+" not available!");var c=t.replace(u,(function(t,e,r){return t.endsWith("(")?e+"(":e})).replace(/\s+AND\s+/g," && ").replace(/\s+OR\s+/g," || ");try{new Function("return "+c)}catch(t){throw new SyntaxError("formula not correct!")}}var Ot=function(){function t(){this.data={name:"",displayName:"",simpleName:"",type:k.FIT,value:""}}return t.prototype.getName=function(){return this.data.name},t.prototype.getDescription=function(){return this.data.description},t.prototype.getSimpleName=function(){return this.data.simpleName},t.prototype.getDisplayName=function(){return this.data.displayName},t.prototype.getVisible=function(){return this.data.visible},t.prototype.isOverridden=function(){var t=this.ref;return t&&t.type===U.PARAM_PRIMITIVE&&"plankPath"===this.getName()?this.data.primitiveOverride:this.data.override},t.prototype.cancelOverride=function(){var t=this.ref;if(t&&"function"==typeof t.__trackUpdateField){var e=t&&t.type===U.PARAM_PRIMITIVE&&"plankPath"===this.getName()?"primitiveOverride":"override",r=this.data[e];t.__trackUpdateField({type:Y.STORE,attr:this.data.name},r,!1),!1!==r&&(this.data[e]=!1)}},t.prototype.getUnitType=function(){return this.data.valueFormat},t.prototype.getParamForm=function(){return this.data.paramForm},t.prototype.isUsingMixFormula=function(){return 1===this.data.status},t.prototype.useMixFormula=function(){if(void 0!==this.getParamForm()&&[F.COMPOUND_FORMULA,F.COMPOUND_FORMULA_OPTION].includes(this.getParamForm())){var t=this.ref;t&&"function"==typeof t.__trackUpdateField&&(t.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.data.status,1),this.data.status=1,this.data.formula=void 0)}},t.prototype.getValue=function(){return this.data.value},t.prototype.setValue=function(t){var e,r,n,o,i,a,s,u,c,A,l,f,h,p=this.ref,d=null==p?void 0:p.getRoot(),g=(null==d?void 0:d.option)||{};if(this.getEditable()){if(g.ruleValidate){if(!this.getVisible()&&!0!==(null===(n=null==p?void 0:p.option)||void 0===n?void 0:n.postHiddenVariable))throw new Error("Modifying the hidden parameter "+this.data.name+" on the current model ("+(null!==(o=null==p?void 0:p.name)&&void 0!==o?o:"")+") - ("+(null!==(i=null==p?void 0:p.id)&&void 0!==i?i:"")+") will not be saved to the design!");if(this.getType()===k.BOOLEAN_LIST){if(parseFloat(t)!=t)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(a=null==p?void 0:p.name)&&void 0!==a?a:"")+") - ("+(null!==(s=null==p?void 0:p.id)&&void 0!==s?s:"")+") must be a positive integer!");var y=0,v=Math.pow(2,this.getValueDisplayNames().length)-1;if(t<y&&t>v)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(u=null==p?void 0:p.name)&&void 0!==u?u:"")+") - ("+(null!==(c=null==p?void 0:p.id)&&void 0!==c?c:"")+") cannot be less than 0 and greater than "+v)}if(this.getParamForm()===F.STEP){v=this.getMax();if(t<(y=this.getMin())&&t>v)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(A=null==p?void 0:p.name)&&void 0!==A?A:"")+") - ("+(null!==(l=null==p?void 0:p.id)&&void 0!==l?l:"")+") must be within the range of "+y+" and "+v+".");if((t-y)%this.getStep()!=0)throw new Error("The value set for parameter "+this.data.name+" on the current model ("+(null!==(f=null==p?void 0:p.name)&&void 0!==f?f:"")+") - ("+(null!==(h=null==p?void 0:p.id)&&void 0!==h?h:"")+") must be in increments of "+this.getStep()+".")}}p&&"function"==typeof p.__trackUpdateField&&p.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.getValue(),t),this.data.value=t,void 0!==this.getParamForm()&&[F.COMPOUND_FORMULA,F.COMPOUND_FORMULA_OPTION].includes(this.getParamForm())&&(this.data.status=0);var m=p&&p.type===U.PARAM_PRIMITIVE&&"plankPath"===this.getName()?"primitiveOverride":"override";this.data[m]=!0,this.data.formula=void 0}else if(g.ruleValidate)throw new Error("The parameter "+this.data.name+" on the current model ("+(null!==(e=null==p?void 0:p.name)&&void 0!==e?e:"")+") - ("+(null!==(r=null==p?void 0:p.id)&&void 0!==r?r:"")+") cannot be edited!")},t.prototype.getFormula=function(){return this.data.formula},t.prototype.setFormula=function(t){var e=this.ref;this.getEditable()&&e&&"function"==typeof e.__trackUpdateField&&(Qt(t,e),e.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.getFormula(),t),this.data.formula=t)},t.prototype.toJSON=function(){return this.data},t.prototype.getMin=function(){return this.data.min},t.prototype.getEditable=function(){return!0===this.data.editable},t.prototype.getMax=function(){return this.data.max},t.prototype.getOptionValues=function(){return this.data.optionValues||[]},t.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},t.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},t.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},t.prototype.setPrimitiveOverride=function(t){var e,r,n=this.ref,o=null==n?void 0:n.getRoot(),i=(null==o?void 0:o.option)||{};if(this.getEditable())n&&"function"==typeof n.__trackUpdateField&&n.__trackUpdateField({type:Y.STORE,attr:this.data.name},this.data.primitiveOverride,t),this.data.primitiveOverride=t;else if(i.ruleValidate)throw new Error("The parameter "+this.data.name+" on the current model ("+(null!==(e=null==n?void 0:n.name)&&void 0!==e?e:"")+") - ("+(null!==(r=null==n?void 0:n.id)&&void 0!==r?r:"")+") does not support the invocation of the setPrimitiveOverride method!")},t.prototype.getStep=function(){return this.data.step},t.prototype.getType=function(){return this.data.type},t.prototype.getParsedValue=function(){return this.getValue()},t.prototype.setParsedValue=function(t){return this.setValue(t)},t.prototype.getPackageId=function(){return this.data.packageId},t}();function Dt(t){var e=new Ot;return e.data=t,e}var xt=function(){function t(){}return t.prototype.getOriginOuterPath=function(){return this.data.originOuterPath},t.prototype.getOriginInnerHoles=function(){return this.data.originInnerHoles},t.prototype.getOriginSlots=function(){return this.data.originSlots},t.prototype.setOuterPath=function(t){mt(t,this.ref),this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Y.PLANK_PATH,attr:V.PATH},this.getOuterPath(),t),this.data.outerPath=t},t.prototype.setInnerHoles=function(t){var e=this;if(t.some((function(t){return!mt(t,e.ref)})))throw new Error("invalid path");this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Y.PLANK_PATH,attr:V.HOLES},this.getInnerHoles(),t),this.data.innerHoles=t},t.prototype.setSlots=function(t){var e=this;if(t.some((function(t){return!mt(t.path,e.ref)})))throw new Error("invalid slot path");this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:Y.PLANK_PATH,attr:V.SLOTS},this.getSlots(),t),this.data.slots=t},t.prototype.getOuterPath=function(){return this.data.outerPath},t.prototype.getInnerHoles=function(){return this.data.innerHoles},t.prototype.getSlots=function(){return this.data.slots},t}();var Mt,Rt,Tt=function(){function t(t){this.option=t,this._changeMap={}}return Object.defineProperty(t.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),t.prototype.getRoot=function(t){var e=this.isRoot?this:this.root;if(t)for(var r;r=null==e?void 0:e.getParent();)e=r.getRoot()||e;return e},t.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===U.PARAM_PRIMITIVE)throw new Error("Primitive model do not support to clone!");var e=this.toJSON(),r=this.constructor.deserialize(JSON.stringify(e));return r._changeMap.cloned=!0,r._changeMap.forceUpdate=void 0,r._changeMap.originId||(r._changeMap.originId=r.id),r.id=function(){for(var t=0,e=0;e<36;e++)if(8===e||13===e||18===e||23===e)O[e]="-";else if(14===e)O[e]="4";else{t<=2&&(t=33554432+16777216*Math.random()|0);var r=15&t;t>>=4,O[e]=Q[19===e?3&r|8:r]}return O.join("")}(),r},t.prototype.getName=function(){return this.name},t.prototype.setName=function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.NAME},this.name,t),this.name=t},t.prototype.getRemark=function(){return this.remark},t.prototype.setRemark=function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.REMARK},this.remark,t),this.remark=t},t.prototype.setRotate=function(t){this.setRotation(t)},t.prototype.getRotate=function(){return this.getRotation()},t.prototype.setRotation=function(t){var e,r,n=this;if(null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate){var o=this.getRoot(!0).type,i=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(t){return t===n}));if((o===U.PARAM_ASSEMBLY||o===U.TEMPLATE_ASSEMBLY)&&i)throw new Error("Accessory under Assembly do not support to set rotation!")}this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.ROTATION,mutexAttr:H.ROTATION_FORMULA},this.rotation,t);var a=t.x,s=t.y,u=t.z;this.rotation={x:a,y:s,z:u}},t.prototype.getRotation=function(){return this.rotation},t.prototype.getRotationFormula=function(){return this.rotationFormula},t.prototype.setRotationFormula=function(t){var e=t.x,r=t.y,n=t.z;Qt(e,this),Qt(r,this),Qt(n,this),this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.ROTATION_FORMULA,mutexAttr:H.ROTATION},this.rotationFormula,t),this.rotationFormula={x:e,y:r,z:n}},t.prototype.setPosition=function(t){var e,r,n=this;if(null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate){var o=this.getRoot(!0).type,i=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(t){return t===n}));if((o===U.PARAM_ASSEMBLY||o===U.TEMPLATE_ASSEMBLY)&&i)throw new Error("Accessory under Assembly do not support to set position!")}this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.POSITION,mutexAttr:H.POSITION_FORMULA},this.position,t);var a=t.x,s=t.y,u=t.z;this.position={x:a,y:s,z:u}},t.prototype.getPosition=function(){return this.position},t.prototype.getPositionFormula=function(){return this.positionFormula},t.prototype.setPositionFormula=function(t){var e=t.x,r=t.y,n=t.z;Qt(e,this),Qt(r,this),Qt(n,this),this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.POSITION_FORMULA,mutexAttr:H.POSITION},this.positionFormula,t),this.positionFormula={x:e,y:r,z:n}},t.prototype.getToolType=function(){return this.toolType},t.prototype.setToolType=function(t){var e=function(t){return pt.get(t)}(t),r=(this.option||{}).allowToolTypes;if(this._origin===G.BRANDGOOD&&void 0!==e&&r){if(!r.includes(e))throw new Error("the custom model not support "+t+" tool");return this.__trackUpdateField({type:Y.ATTRIBUTE,attr:H.TOOL_TYPE},this.toolType,t),void(this.toolType=t)}throw new Error("the custom model not support set tool type!")},t.prototype.dispose=function(){if(this.getRoot()._origin!==G.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},t.prototype.getChild=function(){return this.children},t.prototype.getAccessory=function(){return this.accessories},t.prototype.appendChild=function(t){var e;if((null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate)&&Lt(this,t,!1),!this.children.some((function(e){return!e._changeMap.deleted&&e.id===t.id}))){t.isRoot||(t.root=this.isRoot?this:this.root),t._parent=this,this.children.push(t);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:q.CHILD,linkId:t.id})}},t.prototype.replaceChild=function(t,e,r){if(Lt(this,e,!1),!this.getChild().includes(t))throw new Error("The old model "+t.id+" with name "+t.name+" is not a submodel of the current model.");if(this.getChild().some((function(e){return e!==t&&e.id===t.id})))throw new Error("Models cannot be replaced with duplicates.");t.dispose(),e._changeMap.originId||(e._changeMap.originId=e.id),e.id=t.id,e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var n=this._changeMap.addNodes;n||(n=[],this._changeMap.addNodes=n),n.push({type:q.REPLACE_CHILD,linkId:e.id,option:r})},t.prototype.appendAccessory=function(t){var e;if((null===(e=this.getRoot().option)||void 0===e?void 0:e.ruleValidate)&&Lt(this,t,!0),!this.accessories.some((function(e){return e.id===t.id}))){t.root=void 0,t._parent=this,this.accessories.push(t);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:q.ACCESSORY,linkId:t.id})}},t.prototype.getParam=function(t){var e,r,n=this.params.get(t);if(!n)try{for(var o=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.params),i=o.next();!i.done;i=o.next()){var a=Bt(i.value,2)[1];if(a.getSimpleName()===t){n=a;break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n&&!n.ref&&(n.ref=this),n},t.prototype.hasParam=function(t){return this.params.has(t)},t.prototype.getBzProperty=function(t,e){var r,n=this.getRoot().option||{},o=D(t,null!==(r=null!=e?e:n.defaultNamespace)&&void 0!==r?r:""),i=this.bzProperties.get(o);return i&&!i.ref&&(i.ref=this),i},t.prototype.hasBzProperty=function(t,e){var r,n=this.getRoot().option||{},o=D(t,null!==(r=null!=e?e:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(o)},t.prototype.removeBzProperty=function(t,e){return!!this.hasBzProperty(t,e)&&(this.getBzProperty(t,e).remove(),!0)},t.prototype.getProductCode=function(){return this.productCode},t.prototype.toJSON=function(t,e){void 0===e&&(e=!0);var r=e&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,rotationFormula:r.rotationFormula,positionFormula:r.positionFormula,size:r.size,option:r.option,productCode:r.productCode,params:Array.from(r.params).map((function(t){var e=Bt(t,2);return[e[0],e[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(t){var e=Bt(t,2);return[e[0],e[1].toJSON()]})),plankPath:r._plankPath?r._plankPath.data:void 0,productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(t){return t.toJSON(void 0,!1)})),accessories:r.accessories.map((function(t){return t.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal,floorplanRelation:r.floorplanRelation,version:r.version};return e&&r!==this&&(n._currentId=this.id),n},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.deserialize=function(t){var e=this,r=JSON.parse(t);return function t(e,r,n,o){void 0===n&&(n=new Map);var i=r(e,o);i.id=e.id,i.type=e.type,i.name=e.name,i.remark=e.remark,i.position=e.position,i.rotation=e.rotation||e.rotate,i.size=e.size,i.params=new Map(e.params.map((function(t){return[t[0],Dt(t[1])]}))),i.bzProperties=new Map((e.bzProperties||[]).map((function(t){return[t[0],(e=t[1],r=new _t,Object.assign(r,e),r)];var e,r}))),i._plankPath=e.plankPath?function(t){var e=new xt;return e.data=t,e}(e.plankPath):void 0,i.positionFormula=e.positionFormula,i.rotationFormula=e.rotationFormula,i.productId=e.productId,i.category=e.category,i.isRoot=e.isRoot,i.modelType=e.modelType,i.isHidden=e.isHidden,i.toolType=e.toolType,i._origin=e._origin,i._changeMap=e._changeMap,i.legal=e.legal,i.productCode=e.productCode,i.floorplanRelation=e.floorplanRelation,i.version=e.version,!e.isRoot&&o&&(i.root=o);n.set(i.id,i);var a=i.isRoot?i:o;if(i.children=e.children.map((function(e){return t(e,r,n,a||i)})),i.accessories=e.accessories.map((function(e){return t(e,r,n,a||i)})),wt(i.children,i.accessories).forEach((function(t){return t._parent=i})),!o&&e._currentId&&n.has(e._currentId))return n.get(e._currentId);return i}(r,(function(t,n){return void 0===r._currentId&&!n||r._currentId===t.id?(e.option=t.option,e):new e.constructor(t.option)}))},t.serialize=function(t){return t.serialize()},t.deserialize=function(t){var e=new this;return e.deserialize(t),e},t.prototype.__trackUpdateField=function(t,e,r){var n=this._changeMap.update;n||(n=[]),n.some((function(e){return e.type===t.type&&e.attr===t.attr}))||e!==r&&(n.push(t),void 0!==t.mutexAttr&&(n=n.filter((function(e){return e.attr!=t.mutexAttr}))),this._changeMap.update=n)},t.prototype.getParent=function(){var t=this;if(this._parent)return this._parent;var e=function(e){return e.id===t.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var o=n.getChild(),i=n.getAccessory();if(o.some(e)||i.some(e))return this._parent=n,n;r.push.apply(r,wt(o)),r.push.apply(r,wt(i))}},t.prototype.forceUpdate=function(t){if(void 0===t&&(t=!0),!this.productId)throw new Error("When the model ("+this.id+") does not have the 'productId' attribute, it is not allowed to force an update.");if(this._origin!==G.SENSE||!this.isRoot)throw new Error("Force update is only supported for models ("+this.id+") included in the design.");this._changeMap.forceUpdate=t},t.prototype.getElementId=function(){var t=this.id,e=this.toolType,r=this.modelType;return r===W.ASSEMBLY||r===W.TEMPLATE_ASSEMBLY?{id:t,type:P.CustomGroup}:e?{id:t,type:yt(e)}:void 0},t.prototype.getPlankPathAsync=function(){return Ct(this,void 0,void 0,(function(){return bt(this,(function(t){throw new Error("not implemented")}))}))},t.prototype.getFloorplanRelation=function(){return this.floorplanRelation},t.prototype.setFloorplanRelation=function(t){throw new Error("not implemented")},t}();function Lt(t,e,r){var n=r?"accessory":"child";if([U.PARAM_ASSEMBLY,U.TEMPLATE_ASSEMBLY,U.PARAM_FURNITURE,U.PARAM_PRIMITIVE].includes(t.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model ("+t.id+") do not support to append "+n+"!");if(e.type===U.TEMPLATE_ASSEMBLY||e.type===U.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(e._origin===G.SENSE||e._origin===G.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!e.isRoot)throw new Error("Only root model can be append as "+n+"!");if(r&&e.type===U.PARAM_VIRTUAL)throw new Error("Virtual hardware does not support using appendAccessory. Please use the appendChild method instead.")}!function(t){t.Enterprise="enterprise",t.Public="public",t.Brand="brand",t.SupplyChain="supplyChain",t.My="my"}(Mt||(Mt={})),function(t){t[t.PRODUCT_LIBRARY=0]="PRODUCT_LIBRARY",t[t.ASSEMBLY_LIBRARY=1]="ASSEMBLY_LIBRARY",t[t.COMPONENT_LIBRARY=2]="COMPONENT_LIBRARY",t[t.TEXTURE_LIBRARY=3]="TEXTURE_LIBRARY",t[t.ALUMINIFEROUS_LIBRARY=4]="ALUMINIFEROUS_LIBRARY",t[t.RELATIONAL_COMPONENT_LIBRARY=5]="RELATIONAL_COMPONENT_LIBRARY",t[t.FITTING_PRODUCT_LIBRARY=6]="FITTING_PRODUCT_LIBRARY",t[t.MIX_LIBRARY=7]="MIX_LIBRARY",t[t.BOOL_MODELING_LIBRARY=8]="BOOL_MODELING_LIBRARY"}(Rt||(Rt={}));var jt,kt,Nt,Ft,Gt,Ut,zt,Yt,Ht,Vt,qt,Wt=[[Mt.Enterprise,"privateLibrary"],[Mt.Public,"publicLibrary"],[Mt.SupplyChain,"supplyChainLibrary"],[Mt.My,"personalLibrary"],[Mt.Brand,"brandLibrary"]];new Map(Wt);!function(t){t.publicLibrary="publicLibrary",t.privateLibrary="privateLibrary",t.myLibrary="myLibrary",t.coohomBrandHall="coohomBrandHall"}(jt||(jt={})),function(t){t[t.emergencyLevel=6]="emergencyLevel",t[t.receiptType=7]="receiptType"}(kt||(kt={})),function(t){t.Visible="visible",t.Editable="editable"}(Nt||(Nt={})),function(t){t[t.Hidden=0]="Hidden",t[t.Show=1]="Show"}(Ft||(Ft={})),function(t){t.ORDER="order-mini-app",t.QUOTATION="report-miniapp"}(Gt||(Gt={})),function(t){t[t.CONFIRMED=0]="CONFIRMED",t[t.ORDERED=1]="ORDERED",t[t.CLAIMED=2]="CLAIMED",t[t.PAY_PENDING=3]="PAY_PENDING",t[t.PAYED=4]="PAYED",t[t.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",t[t.REVIEWED=6]="REVIEWED",t[t.SPLIT_ORDER=7]="SPLIT_ORDER",t[t.RETURNED=8]="RETURNED",t[t.CANCELLED=9]="CANCELLED",t[t.BATCHED=10]="BATCHED",t[t.OPENED_MATERIAL=11]="OPENED_MATERIAL",t[t.EDGE_SEALED=12]="EDGE_SEALED",t[t.HOLES_ARRANGED=13]="HOLES_ARRANGED",t[t.PACKED=14]="PACKED",t[t.WAREHOUSED=15]="WAREHOUSED",t[t.SHIPPED=16]="SHIPPED",t[t.REVIEW_PENDING=17]="REVIEW_PENDING",t[t.CONFIRM_PENDING=18]="CONFIRM_PENDING",t[t.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",t[t.PAY_COLLECTED=20]="PAY_COLLECTED",t[t.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",t[t.COMPLETED=24]="COMPLETED"}(Ut||(Ut={})),function(t){t[t.OTHER=0]="OTHER",t[t.NATURAL=1]="NATURAL",t[t.MODEL_ROOM=2]="MODEL_ROOM",t[t.NEW_MEDIA=3]="NEW_MEDIA",t[t.LIVE=4]="LIVE",t[t.CROSS_COOP=5]="CROSS_COOP",t[t.TELEMARKETING=6]="TELEMARKETING",t[t.OLD_INTRODUCE=7]="OLD_INTRODUCE",t[t.REPURCHASE=8]="REPURCHASE"}(zt||(zt={})),function(t){t[t.FORWARD=0]="FORWARD",t[t.REVERSE=1]="REVERSE"}(Yt||(Yt={})),function(t){t[t.sys=0]="sys",t[t.custom=1]="custom"}(Ht||(Ht={})),function(t){t[t.DYNAMIC=0]="DYNAMIC",t[t.STATIC=1]="STATIC"}(Vt||(Vt={})),function(t){t.AUDIT_PASS="audit_pass",t.AUDIT_REJECT="audit_reject",t.RESUBMIT="resubmit"}(qt||(qt={}));var Kt,Jt,Xt,Zt,$t,te,ee;new Map([[qt.AUDIT_PASS,"pass"],[qt.AUDIT_REJECT,"reject"],[qt.RESUBMIT,"resubmit"]]);!function(t){t[t.DESIGN_ATTACHMENT=1]="DESIGN_ATTACHMENT",t[t.AUDIT=2]="AUDIT",t[t.SPLIT_ORDER_ATTACHMENT=3]="SPLIT_ORDER_ATTACHMENT",t[t.ORDER_ATTACHMENT=4]="ORDER_ATTACHMENT"}(Kt||(Kt={})),function(t){t[t.AUDIT=0]="AUDIT",t[t.ORDER_REMARK=1]="ORDER_REMARK",t[t.DESIGN_REMARK=2]="DESIGN_REMARK"}(Jt||(Jt={})),function(t){t.PASS="pass",t.REJECT="reject",t.RESUBMIT="resubmit",t.CREATE="create",t.ARRAIGNED="arraigned",t.CLAIM="claim",t.SEND_BACK="sendBack",t.CANCEL="cancel",t.PAY_REGISTER="payRegister",t.PAY_COLLECT_CONFIRM="payCollectConfirm",t.SPLIT_ORDER_CONFIRM="splitOrderConfirm",t.GEN_BATCH="genBatch",t.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",t.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",t.EDGE_SEALED_CONFIRM="edgeSealedConfirm",t.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",t.PICK_CONFIRM="pickConfirm",t.PACKED_CONFIRM="packedConfirm",t.WAREHOUSED_CONFIRM="warehousedConfirm",t.SHIPPED_CONFIRM="shippedConfirm",t.COMPLETED_CONFIRM="COMPLETED_CONFIRM",t.REVOKE="revoke",t.DESIGN_SUBMIT="designSubmit",t.EDIT="orderEdit"}(Xt||(Xt={})),function(t){t[t.CUSTOMER_NAME=1]="CUSTOMER_NAME",t[t.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",t[t.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(Zt||(Zt={})),function(t){t[t.MYSELF=1]="MYSELF",t[t.ALL=2]="ALL"}($t||($t={})),function(t){t[t.STR=0]="STR",t[t.INT=1]="INT",t[t.FLOAT=2]="FLOAT",t[t.BOOL=3]="BOOL"}(te||(te={})),function(t){t.API_CALL="API_CALL"}(ee||(ee={}));var re,ne,oe,ie,ae=function(){function t(){}return t.getEvent=function(){return t._event},t.setEvent=function(e){t._event=e},t.emitApiCalledEvent=function(e){var r=t.getEvent();r&&r.emit(e)},t.observeAsyncApiDeco=function(e){return function(r,n,o){return t.observeApiDeco(e)(r,n,o)}},t.observeSyncApiDeco=function(e){return function(r,n,o){return t.observeApiDeco(e)(r,n,o)}},t.observeApiDeco=function(e){return function(r,n,o){var i,a,s,u,c=o.value;return o.value=(i=c,s=Pt((a={beforeCalled:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return{apiName:c.name,status:!0,args:t,start:Date.now()}},afterCalled:function(r,o,i,a){t.emitApiCalledEvent(Et(Et({args:i,errMsg:r,status:!r,duration:Date.now()-o.start,return:a},{apiName:o.apiName||n}),e))}}).beforeCalled),u=Pt(a.afterCalled),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=s.apply(void 0,wt(t)),n=!1,o=function(){n=!0};try{var a=i.apply(this,t);if(St(a))return a.then((function(e){var i=u(void 0,r,t,e,{preventDefaultRet:o});return n?i:e})).catch((function(e){return u(e,r,t),Promise.reject(e)}));var c=u(void 0,r,t,a,{preventDefaultRet:o});return n?c:a}catch(e){throw u(e,r,t),e}}),o}},t}();!function(t){t[t.CABINET=0]="CABINET",t[t.WARDROBE=1]="WARDROBE",t[t.DOOR_WINDOW=2]="DOOR_WINDOW",t[t.CABINET_COPY=4]="CABINET_COPY",t[t.WARDROBE_COPY=5]="WARDROBE_COPY",t[t.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(re||(re={})),function(t){t[t.ADD=0]="ADD",t[t.UPDATE=1]="UPDATE",t[t.REMOVE=2]="REMOVE",t[t.NONE=3]="NONE"}(ne||(ne={})),function(t){t[t.CROWN=0]="CROWN",t[t.LIGHT=1]="LIGHT",t[t.SKIRT=2]="SKIRT",t[t.COUNTERTOP=3]="COUNTERTOP"}(oe||(oe={})),function(t){t.ZH_CN="zh_CN",t.EN_US="en_US",t.DE_DE="de_DE",t.FR_FR="fr_FR",t.JA_JP="ja_JP",t.ZH_TW="zh_TW",t.RU_RU="ru_RU",t.KO_KR="ko_KR",t.ES_ES="es_ES",t.AR_EG="ar_EG",t.EN_CN="en_CN",t.VI="vi"}(ie||(ie={}));var se,ue,ce,Ae,le="$$geometry_color",fe="$$geometry_opacity",he=[596,2048,2049];!function(t){t[t.TOP=0]="TOP",t[t.LEFT=1]="LEFT",t[t.FRONT=2]="FRONT",t[t.RIGHT=3]="RIGHT",t[t.BACK=4]="BACK",t[t.BOT=5]="BOT"}(se||(se={})),function(t){t.CUSTOM="custom",t.TOP_MODEL="top_model",t.ACCESSORY="accessory",t.PRODUCT="product"}(ue||(ue={})),function(t){t.CLICK="click",t.DB_CLICK="double_click"}(ce||(ce={})),function(t){t.PARAM_MODEL="param_model",t.PARAM_MODEL_ASSEMBLY="param_model_assembly",t.FITTING_MODEL="fitting_model"}(Ae||(Ae={}));var pe,de,ge,ye,ve,me,Ie,Ee,Ce=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(t){t[t.Perspective=0]="Perspective",t[t.Orthographic=1]="Orthographic"}(pe||(pe={})),function(t){t[t.Default=0]="Default",t[t.Classical=1]="Classical"}(de||(de={})),function(t){t.V1="v1",t.V2="v2"}(ge||(ge={})),function(t){t.INNER="inner",t.OUTER="outer"}(ye||(ye={})),function(t){t.X="DirectionX",t.Y="DirectionY",t.Z="DirectionZ"}(ve||(ve={})),function(t){t.PARAM_MODEL="paramModel",t.PARAM_MODEL_ASSEMBLY="paramModelAssembly",t.HOLE="hole",t.GROOVE="groove",t.HARDWARE="hardware",t.HARDWARE_GROOVE="hardwareGroove",t.HOLE_V2="holeV2",t.SQUARE_GROOVE="squareGroove",t.ROUND_CORNER_GROOVE="roundCornerGroove",t.SPECIAL_SHAPED_GROOVE="specialShapedGroove",t.PATH_GROOVE="pathGroove"}(me||(me={})),(Ee=Ie||(Ie={})).Bottom="bottom",Ee.Front="front",Ee.Left="left",Ee.Right="right",Ee.Back="back",Ee.Top="top";var be=r(111),Be=r(120),we=r(88),Pe=r(233),Se=r(9),_e=r(114);function Qe(t){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,De(n.key),n)}}function De(t){var e=function(t,e){if("object"!=Qe(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qe(e)?e:String(e)}function xe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Me(t,e){return(Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Re(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Le(t);if(e){var o=Le(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Te(this,r)}}function Te(t,e){if(e&&("object"===Qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Le(t){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var je=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Me(t,e)}(i,t);var e,r,n,o=Re(i);function i(){return xe(this,i),o.apply(this,arguments)}return e=i,r&&Oe(e.prototype,r),n&&Oe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(_e.CoreCustom),ke=r(503),Ne=r(189),Fe=r.n(Ne),Ge=r(908);function Ue(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ze(n.key),n)}}function ze(t){var e=function(t,e){if("object"!=Je(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Je(e)?e:String(e)}function Ye(){return(Ye="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=He(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function He(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ke(t)););return t}function Ve(t,e){return(Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ke(t);if(e){var o=Ke(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return We(this,r)}}function We(t,e){if(e&&("object"===Je(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ke(t){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Je(t){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Xe,Ze=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Je(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},$e=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Je(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},tr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ve(t,e)}(i,t);var e,r,n,o=qe(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).doc=new ke.CDoc,t.versionStore=new Ge.VersionStore,t.setCustom(new je),t.setContextProvider(t.doc.getElementContext),t}return e=i,(r=[{key:"compareVersion",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return Ye(Ke(i.prototype),"compareVersion",this).call(this,t)&&this.custom.compareVersion(t)}},{key:"exportVersion",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;t.clear(),Ye(Ke(i.prototype),"exportVersion",this).call(this,t),this.custom.exportVersion(t)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(t){return this.custom&&this.custom.setContextProvider(),this.custom=t.setContextProvider(this.provideContext()),this}}])&&Ue(e.prototype,r),n&&Ue(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Fe.a);Ze([Object(Ne.property)(),$e("design:type","function"==typeof(Xe=void 0!==je&&je)?Xe:Object)],tr.prototype,"custom",void 0);var er=r(243),rr=r.n(er),nr=r(8);function or(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ir(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ar(n.key),n)}}function ar(t){var e=function(t,e){if("object"!=lr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lr(e)?e:String(e)}function sr(t,e){return(sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ur(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ar(t);if(e){var o=Ar(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cr(this,r)}}function cr(t,e){if(e&&("object"===lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ar(t){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function lr(t){return(lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fr,hr=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},pr=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":lr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},dr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sr(t,e)}(i,t);var e,r,n,o=ur(i);function i(){var t;return or(this,i),(t=o.apply(this,arguments)).outlineMode=nr.OutlineMode.Outlined,t.linkedIds=[],t}return e=i,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(t){this.isAppendHardware=t}},{key:"setLinkedIds",value:function(t){this.linkedIds=t}},{key:"setHardwareData",value:function(t){this.hardwareData=t}},{key:"setHardwareVersion",value:function(t){this.hardwareVersion=t}}])&&ir(e.prototype,r),n&&ir(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(rr.a);function gr(t){return(gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mr(n.key),n)}}function mr(t){var e=function(t,e){if("object"!=gr(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gr(e)?e:String(e)}function Ir(t,e){return(Ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Er(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=br(t);if(e){var o=br(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Cr(this,r)}}function Cr(t,e){if(e&&("object"===gr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function br(t){return(br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}hr([Object(Ne.property)(),pr("design:type",Boolean)],dr.prototype,"isAppendHardware",void 0),hr([Object(Ne.property)(),pr("design:type","function"==typeof(fr=void 0!==nr.OutlineMode&&nr.OutlineMode)?fr:Object)],dr.prototype,"outlineMode",void 0);var Br,wr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ir(t,e)}(i,t);var e,r,n,o=Er(i);function i(){return yr(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"paramModelConstructor",get:function(){return dr}}])&&vr(e.prototype,r),n&&vr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_e.CoreParamModelAssembly),Pr=r(157),Sr=new Pr.EventEmitter;!function(t){t.FITTING_MODEL_CHANGE="fittingModelChange",t.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",t.PLANK_FACE_CLICK="plankFaceClick",t.PLANK_FACE_HOVER="plankFaceHover",t.API_CALLED="apiCalled",t.DETECT_RESULT_CHANGE="detectResultChange"}(Br||(Br={}));var _r=r(60),Qr=r(11),Or=r(506),Dr=Object(Or.createKElementBaseClass)(),xr=_r.advanced.reportObserved,Mr=_r.advanced.reportChanged;function Rr(t){return function(t){if(Array.isArray(t))return Tr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Tr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tr(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jr(n.key),n)}}function jr(t){var e=function(t,e){if("object"!=Ur(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ur(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ur(e)?e:String(e)}function kr(t,e){return(kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Nr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Gr(t);if(e){var o=Gr(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fr(this,r)}}function Fr(t,e){if(e&&("object"===Ur(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Gr(t){return(Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ur(t){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Dr.onGet=function(t){xr(t)},Dr.addSetHook((function(t){Mr(t)}));var zr=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ur(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Yr=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Ur(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};function Hr(t,e,r){var n=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var o=n.apply(this,e);return Sr.emit(Br.FITTING_MODEL_CHANGE),o}}var Vr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(i,t);var e,r,n,o=Nr(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).setFittings([]),t.setIntersects([]),t.setGrooveFittings([]),t.setPlankFaceHintModels([]),t.setFittingHintModels([]),t.setPlankOutlineHintModels([]),t.setHoleModels([]),t.setSquareGrooveModels([]),t.setRoundCornerGrooveModels([]),t.setSpecialShapedGrooveModels([]),t.setPathGrooveModels([]),t.setPlankAreaFaceHints([]),t}return e=i,(r=[{key:"getFittings",value:function(t){if(t){if("ids"in t)return this.fittings.filter((function(e){return t.ids.includes(e.id)}));if("types"in t)return this.fittings.filter((function(e){return t.types.includes(e.type)}))}return this.fittings}},{key:"setFittings",value:function(t){this.fittings=t}},{key:"addFittings",value:function(t){this.fittings=[].concat(Rr(t),Rr(this.fittings))}},{key:"removeFittings",value:function(t){var e=Object(Qr.difference)(this.fittings,this.getFittings(t));this.setFittings(e)}},{key:"setIntersects",value:function(t){this.intersects=t}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(t){this.grooveFittings=t}},{key:"addGrooveFittings",value:function(t){this.grooveFittings=[].concat(Rr(this.grooveFittings),Rr(t))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(t){this.plankFaceHintModels=t}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(t){this.fittingHintModels=t}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(t){this.plankOutlineHintModels=t}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}},{key:"getHoleModels",value:function(){return this.holeModels}},{key:"setHoleModels",value:function(t){this.holeModels=t}},{key:"addHoleModels",value:function(t){this.holeModels=[].concat(Rr(this.holeModels),Rr(t))}},{key:"getSquareGrooveModels",value:function(){return this.squareGrooveModels}},{key:"setSquareGrooveModels",value:function(t){this.squareGrooveModels=t}},{key:"addSquareGrooveModels",value:function(t){this.squareGrooveModels=[].concat(Rr(this.squareGrooveModels),Rr(t))}},{key:"getRoundCornerGrooveModels",value:function(){return this.roundCornerGrooveModels}},{key:"setRoundCornerGrooveModels",value:function(t){this.roundCornerGrooveModels=t}},{key:"addRoundCornerGrooveModels",value:function(t){this.roundCornerGrooveModels=[].concat(Rr(this.roundCornerGrooveModels),Rr(t))}},{key:"getSpecialShapedGrooveModels",value:function(){return this.specialShapedGrooveModels}},{key:"setSpecialShapedGrooveModels",value:function(t){this.specialShapedGrooveModels=t}},{key:"addSpecialShapedGrooveModels",value:function(t){this.specialShapedGrooveModels=[].concat(Rr(this.specialShapedGrooveModels),Rr(t))}},{key:"getPathGrooveModels",value:function(){return this.pathGrooveModels}},{key:"setPathGrooveModels",value:function(t){this.pathGrooveModels=t}},{key:"addPathGrooveModels",value:function(t){this.pathGrooveModels=[].concat(Rr(this.pathGrooveModels),Rr(t))}},{key:"setPlankAreaFaceHints",value:function(t){this.plankAreaFaceHints=t}},{key:"getPlankAreaFaceHints",value:function(){return this.plankAreaFaceHints}}])&&Lr(e.prototype,r),n&&Lr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"fittings",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"intersects",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"grooveFittings",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"plankFaceHintModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"fittingHintModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"plankOutlineHintModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"holeModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"squareGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"roundCornerGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"specialShapedGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"pathGrooveModels",void 0),zr([_r.observable,Yr("design:type",Array)],Vr.prototype,"plankAreaFaceHints",void 0),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"setFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"addFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Object]),Yr("design:returntype",void 0)],Vr.prototype,"removeFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"setGrooveFittings",null),zr([Hr,Yr("design:type",Function),Yr("design:paramtypes",[Array]),Yr("design:returntype",void 0)],Vr.prototype,"addGrooveFittings",null);var qr={},Wr={};function Kr(t,e,r){void 0===r&&(r=Or.TrackablePropertyLevel.MODEL),Object.defineProperty(t,e,function(t,e){var r=e===Or.TrackablePropertyLevel.ALL?Wr:qr;return r[t]||(r[t]={configurable:!0,enumerable:!0,get:function(){return this.trackableGet(t,e)},set:function(r){this.trackableSet(t,r,e)}})}(e,r))}var Jr=r(143);function Xr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zr(n.key),n)}}function Zr(t){var e=function(t,e){if("object"!=nn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==nn(e)?e:String(e)}function $r(t,e){return($r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rn(t);if(e){var o=rn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return en(this,r)}}function en(t,e){if(e&&("object"===nn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rn(t){return(rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function nn(t){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var on=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":nn(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},an=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":nn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},sn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$r(t,e)}(i,t);var e,r,n,o=tn(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var r=Object(Jr.default)();return e.setId(r),e.linkModel=t.linkModel,e.hintOutline=t.hintOutline,e.visible=t.linkModel instanceof rr.a?!t.linkModel.getInvisible():t.linkModel.visible,e}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}}])&&Xr(e.prototype,r),n&&Xr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function un(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cn(n.key),n)}}function cn(t){var e=function(t,e){if("object"!=pn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pn(e)?e:String(e)}function An(t,e){return(An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ln(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=hn(t);if(e){var o=hn(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fn(this,r)}}function fn(t,e){if(e&&("object"===pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function hn(t){return(hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pn(t){return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}on([Kr,an("design:type",Object)],sn.prototype,"linkModel",void 0),on([Kr,an("design:type","function"!=typeof!1&&Object)],sn.prototype,"hintOutline",void 0),on([Kr,an("design:type",Boolean)],sn.prototype,"visible",void 0);var dn,gn,yn,vn,mn=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pn(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},In=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},En=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}(i,t);var e,r,n,o=ln(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).fittingData=n,a.visible=!1,a.viewColor=0,a.opacity=1;var s=r.position,u=r.size,c=r.rotate,A=r.height,l=r.boundingBox,f=t||Object(Jr.default)();return a.setId(f),a.position=s instanceof Se.default?s:new Se.default(s),a.size=u instanceof Se.default?u:new Se.default(u),a.rotate=c instanceof Se.default?c:new Se.default(u),a.height=A,a.type="fittingType"in n?n.fittingType:J.INTERSECTED,a.visible=a.type!==J.INTERSECTED,a.linkParamModelId=e,a.boundingBox=l,a}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}},{key:"setViewColor",value:function(t){this.viewColor=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&un(e.prototype,r),n&&un(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);mn([Kr,In("design:type","function"==typeof(dn=void 0!==Se.default&&Se.default)?dn:Object)],En.prototype,"position",void 0),mn([Kr,In("design:type","function"==typeof(gn=void 0!==Se.default&&Se.default)?gn:Object)],En.prototype,"size",void 0),mn([Kr,In("design:type",Number)],En.prototype,"height",void 0),mn([Kr,In("design:type","function"==typeof(yn=void 0!==J&&J)?yn:Object)],En.prototype,"type",void 0),mn([Kr,In("design:type","function"==typeof(vn=void 0!==Se.default&&Se.default)?vn:Object)],En.prototype,"rotate",void 0),mn([Kr,In("design:type",Number)],En.prototype,"radius",void 0),mn([Kr,In("design:type",Object)],En.prototype,"visible",void 0),mn([Kr,In("design:type",Object)],En.prototype,"viewColor",void 0),mn([Kr,In("design:type",Object)],En.prototype,"opacity",void 0);var Cn=r(13);function bn(t){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return wn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Pn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sn(n.key),n)}}function Sn(t){var e=function(t,e){if("object"!=bn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bn(e)?e:String(e)}var _n=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=0,this.clockwise=e.clockwise,this.type=e.type,this.radius=e.radius,this.minorArc=e.minorArc,this.majorRadius=e.majorRadius,this.minorRadius=e.minorRadius,this.ellipseCenter=e.ellipseCenter,this.path=r,this.id=Object(Jr.default)()}var e,r,n;return e=t,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var t=this.start,e=this.end;return t&&e?function(t,e){return new c.Vector2d(e.x-t.x,e.y-t.y)}(t.getPosition(),e.getPosition()):new c.Vector2d}},{key:"getRealLine",value:function(){var t=Bn(this.start.getPointsForRender(),2)[1],e=Bn(this.end.getPointsForRender(),1)[0];return this.getType()===lt.SEGMENT?new c.LineSeg2d(t,e):this.getType()===lt.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var t=new c.CCS2d(new c.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new c.Vector2d(1,0)),e=new c.Ellipse2d(t,this.majorRadius,this.minorRadius);return c.EllipticalArc2d.makeByStartEndPoints(e,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var t,e,r=this.start,n=this.end,o=this.getType(),i=r.getPosition(),a=n.getPosition();if(o!==lt.CIRCLE_ARC||(e=a,(t=i).x===e.x&&t.y===e.y&&0===this.radius))return new c.LineSeg2d(i,a);var s,u,A,l,f,h,p,d,g,y,v,m=this.getVector().length/2;return this.radius<m&&(this.radius=m),s=this.radius,u=i,A=a,l=this.minorArc,f=this.clockwise,h=new c.LineSeg2d(u,A),p=h.length/2,d=h.getPoint(p),g=Math.sqrt(s*s-p*p),y=(f?l?h.rightNormal:h.leftNormal:l?h.leftNormal:h.rightNormal).multiplied(g/h.leftNormal.length),v=d.added(y),c.Arc2d.makeArcByStartEndPoints(v,u,A,!f)}},{key:"getLineLength",value:function(){var t=this.getRealLine();return t?new c.LineSeg2d(t.startPoint,t.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Bn(this.start.getPointsForRender(),2)[1],Bn(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(t){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,t),this.hint=t}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Pn(e.prototype,r),n&&Pn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qn(t){return(Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function On(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Dn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mn(n.key),n)}}function Mn(t){var e=function(t,e){if("object"!=Qn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qn(e)?e:String(e)}var Rn=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.clockwise=!!e.clockwise,this.type=e.type,this.position=new c.Point2d(e.position),this.radius=e.radius,this.cornerCutDistance=e.cornerCutDistance,this.path=r,this.majorRadius=e.majorRadius,this.minorRadius=e.minorRadius,this.offset=new c.Vector2d(e.offset||{x:0,y:0}),this.id=Object(Jr.default)()}var e,r,n;return e=t,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===At.NONE)return 0;var t=this.getCurveLineAndPoints().curveLine;return new c.LineSeg2d(t.startPoint,t.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var t=this.clockwise,e=this.prevLine,r=this.nextLine,n=this.offset,o=this.getType(),i=this.getPosition(),a=this.getPointsForRender(),s=On(a,2),u=s[0],A=s[1];if(o===At.CIRCLE||o===At.CUT_CIRCLE){if(o===At.CIRCLE){var l=e.getVector().getPerpVector(),f=r.getVector().getPerpVector();if(l.isParallel(f))return{curveLine:c.Arc2d.makeArcByStartEndPoints(u,u,A,!0),renderPoints:a};var h=new c.Line2d(u,l),p=new c.Line2d(A,f),d=On(h.intersectCurve(p),1)[0];if(!d)return{curveLine:new c.LineSeg2d(u,A),renderPoints:a};var g=c.Arc2d.makeArcByStartEndPoints(d.point,u,A,!1);return this.radius=void 0===this.radius?g.radius:this.radius,Math.abs(g.arcAngle)>Math.PI&&(g=c.Arc2d.makeArcByStartEndPoints(d.point,u,A,!0)),{curveLine:g,renderPoints:a}}return{curveLine:c.Arc2d.makeArcByStartEndPoints(i.added(n),u,A,!t),renderPoints:a}}if(o===At.ELLIPSE){var y=i.added(n),v=new c.CCS2d(new c.Point2d(y.x,y.y),new c.Vector2d(1,0)),m=new c.Ellipse2d(v,this.majorRadius,this.minorRadius);return{curveLine:c.EllipticalArc2d.makeByStartEndPoints(m,u,A,!t),renderPoints:a}}return{curveLine:new c.LineSeg2d(u,A),renderPoints:a}}},{key:"getPointsForRender",value:function(){var t=this.radius,e=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,o=void 0===n?[0,0]:n,i=this.offset,a=this.getType(),s=this.getPosition();if(a===At.NONE)return[s,s];if(!e||!r)return[s,s];var u=new c.Ray2d(e.end.getPosition(),e.getVector().reversed()),A=new c.Ray2d(r.start.getPosition(),r.getVector());if(a===At.LINE)return[u.getPoint(o[0]),A.getPoint(o[1])];if(a===At.CIRCLE){if(void 0!==t){var l=u.direction,f=A.direction,h=l.angleTo(f),p=Math.abs(t/Math.tan(h/2));return[u.getPoint(p),A.getPoint(p)]}if(o)return[u.getPoint(o[0]),A.getPoint(o[0])]}if(a===At.CUT_CIRCLE){var d=s.added(i),g=new c.Circle2d(d,t),y=g.intersectCurve(u),v=g.intersectCurve(A);if(y.length&&v.length)return[y[0].point,v[0].point]}if(a===At.ELLIPSE){var m=s.added(i),I=new c.CCS2d(new c.Point2d(m.x,m.y),new c.Vector2d(1,0)),E=new c.Ellipse2d(I,this.majorRadius,this.minorRadius),C=E.intersectCurve(u),b=E.intersectCurve(A);if(C.length&&b.length)return[C[0].point,b[0].point]}return[s,s]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(t){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,t),this.hint=t}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&xn(e.prototype,r),n&&xn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Tn(t){return(Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ln(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jn(t,e,r){return(e=zn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kn(t){return function(t){if(Array.isArray(t))return Gn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Fn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nn(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Fn(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Fn(t,e){if(t){if("string"==typeof t)return Gn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gn(t,e):void 0}}function Gn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Un(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zn(n.key),n)}}function zn(t){var e=function(t,e){if("object"!=Tn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Tn(e)?e:String(e)}var Yn=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(t,e,r){e.getType()===At.NONE&&(t=t.concat(e.getPosition())),e.getType()===At.LINE&&(t=t.concat(e.getPointsForRender())),e.getType()!==At.CIRCLE&&e.getType()!==At.CUT_CIRCLE||(t=t.concat(e.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=e.nextLine;if(!n)return t;if(n.getType()===lt.CIRCLE_ARC){var o=n.getCurveLine().getApproximatePoints();t=t.concat(o.slice(1,o.length-1))}return t}),[])},this.getEdges=function(){var t,e=r.getPoints(),n=r.getLines(),o=[],i=Nn(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;a.getType()!==At.NONE&&o.push(a.getCurveLineAndPoints().curveLine)}}catch(t){i.e(t)}finally{i.f()}var s,u=Nn(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;o.push(c.getRealLine())}}catch(t){u.e(t)}finally{u.f()}return o},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(t){return new c.Point3d(t.x,t.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(t){return new c.Point3d(t.x,t.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=e.type,o=e.points,i=void 0===o?[]:o,a=e.lines,s=void 0===a?[]:a,u=e.forceCCW,A=void 0===u||u,l=e.depth,f=e.matrix4,h=e.offset;if(this.id=Object(Jr.default)(),this.type=n,this.depth=l,this.matrix4=f,this.offset=h,this.setPoints(i),this.setLines(s),this.linkPointsAndLines(),A){var p=c.GeomLoop2d.makeByPoints(this.getPoints().map((function(t){return t.getPosition()})));p.isSelfIntersect()||p.isCCW()||this.turnover()}this.forceCCW=A,this.adjustClockwise()}var e,r,n;return e=t,(r=[{key:"points",get:function(){return this._points},set:function(t){this.setPoints(t)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(t){var e=this;this._points=t,t.forEach((function(t){t.path=e})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(t){this.setLines(t)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(t){var e=this;this._lines=t,t.forEach((function(t){t.path=e})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(t){return t.clockwise=!t.clockwise,t})));var t=this.getLines().slice().reverse().map((function(t){return t.clockwise=!t.clockwise,t}));this.setLines(t.slice(1).concat(t[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var t=this,e=this.getLines(),r=this.getPoints();r.forEach((function(t){t.prevLine=void 0,t.nextLine=void 0})),e.forEach((function(n,o){n.start=void 0,n.end=void 0;var i,a=r[o];i=o===e.length-1&&t.isClosedPath()?r[0]:r[o+1],n.path=t,a.path=t,i.path=t,a.nextLine=n,i.prevLine=n,n.start=a,n.end=i}))}},{key:"getAllRenderPoints",value:function(){var t=[];return this.getPoints().forEach((function(e){e.getType()!==At.NONE?t.push.apply(t,kn(e.getPointsForRender())):t.push(e.getPosition())})),t}},{key:"getAllRealPathCurves",value:function(){var t=[];return this.getLines().forEach((function(e){var r,n;if((null===(r=e.start)||void 0===r?void 0:r.getType())!==At.NONE){var o=null===(n=e.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;o&&t.push(o)}var i=e.getRealLine();t.push(i)})),t}},{key:"transformPathToFace2D",value:function(){var t={loops:[]};return t.loops.push(this.getAllRealPathCurves()),t}},{key:"transformPathToGeomLoop2d",value:function(){return new c.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var t=new c.BBox2d;return this.getPoints().forEach((function(e){e.getType()!==At.NONE&&t.merge(e.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(e){t.merge(e.getRealLine().getBounding())})),t}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var t=c.GeomLoop2d.makeByPoints(this.getPoints().map((function(t){return t.getPosition()})));if(!t.isSelfIntersect()&&!t.isCCW()){this.setPoints(this.getPoints().slice().reverse());var e=this.getLines().slice().reverse();this.setLines(e.slice(1).concat(e[0]).map((function(t){return t.type===lt.CIRCLE_ARC&&(t.clockwise=!t.clockwise),t}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var t=this.getPoints(),e=this.getLines(),r=function(t){return{curve:t.getRealLine(),source:t}};return t.reduce((function(t,n,o){var i;n.getType()!==At.NONE&&(i={curve:n.getCurveLineAndPoints().curveLine,source:n});var a=i?[i]:[];return t.concat(e[o]?[].concat(a,[r(e[o])]):[].concat(a))}),[]).concat(e.slice(t.length).map(r))}},{key:"getRedundantPoints",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var o=this.getPoints().indexOf(t);if(-1===o)return[];var i=[];return(r?[1]:[1,-1]).forEach((function(r){var a=(o+r+n)%n,s=e.getPoints()[a];t.getPosition().isEqual(s.getPosition(),1)&&(s.nextLine.getType()!==lt.SEGMENT?i.push(t):i.push(s))})),i}},{key:"getRenderPoints",value:function(){var t=[];return this.points.forEach((function(e){e.getType()===At.NONE?t.push(e.getPosition()):t.push.apply(t,kn(e.getRenderPoints()))})),t}}])&&Un(e.prototype,r),n&&Un(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Hn(t,e){var r=e.paramPoints.map((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ln(Object(r),!0).forEach((function(e){jn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ln(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t);return 0==e.radius&&[At.CIRCLE,At.CUT_CIRCLE,At.ELLIPSE].includes(e.type)&&(e.type=At.NONE),new Rn(e)})),n=e.paramPathLines.map((function(t){return new _n(t)}));return new Yn({type:t,offset:e.offset,points:r,lines:n,forceCCW:!1})}function Vn(t){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wn(n.key),n)}}function Wn(t){var e=function(t,e){if("object"!=Vn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vn(e)?e:String(e)}var Kn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=e.type,n=e.bulge,o=e.isCCW,i=e.minorArc,a=e.radius;this.type=r,this.bulge=n,this.isCCW=o,this.minorArc=i,this.radius=a}var e,r,n;return e=t,(r=[{key:"getCurveLine",value:function(){var t=this.type,e=this.start,r=this.end,n=this.bulge,o=this.isCCW,i=this.minorArc,a=this.radius,s=e.getPosition(),u=r.getPosition();if(t===C.LineSeg)return new c.LineSeg2d(s,u);if(t===C.Arc){if(void 0!==n){var A=new c.LineSeg2d(s,u);return c.Arc2d.makeArcByChordAndBulge(A,n)}if(void 0!==o&&void 0!==i&&void 0!==a)return c.Arc2d.makeArcByTwoPointsAndRadius(s,u,a,i,o)}throw new Error("points/curves data error!")}}])&&qn(e.prototype,r),n&&qn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Jn(t){return(Jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zn(n.key),n)}}function Zn(t){var e=function(t,e){if("object"!=Jn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Jn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Jn(e)?e:String(e)}var $n=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getLines().reduce((function(t,e){var r=e.getCurveLine();return r instanceof c.LineSeg2d&&(t=t.concat(r.startPoint,r.endPoint)),r instanceof c.Arc2d&&(t=t.concat(r.getApproximatePoints())),t}),[])};var n=e.points,o=void 0===n?[]:n,i=e.lines,a=void 0===i?[]:i,s=e.depth,u=e.matrix4;this.id=Object(Jr.default)(),this.depth=s,this.matrix4=u,this.setPoints(o),this.setLines(a),this.linkPointsAndLines()}var e,r,n;return e=t,(r=[{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(t){var e=this;this._points=t,t.forEach((function(t){t.path=e}))}},{key:"lines",get:function(){return this.getLines()},set:function(t){this.setLines(t)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(t){var e=this;this._lines=t,t.forEach((function(t){t.path=e}))}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var t=this,e=this.getLines(),r=this.getPoints();r.forEach((function(t){t.prevLine=void 0,t.nextLine=void 0})),e.forEach((function(n,o){n.start=void 0,n.end=void 0;var i,a=r[o];i=o===e.length-1&&t.isClosedPath()?r[0]:r[o+1],n.path=t,a.path=t,i.path=t,a.nextLine=n,i.prevLine=n,n.start=a,n.end=i}))}}])&&Xn(e.prototype,r),n&&Xn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function to(t){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function eo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ro(n.key),n)}}function ro(t){var e=function(t,e){if("object"!=to(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=to(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==to(e)?e:String(e)}var no=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.position=new c.Point2d(e.position)}var e,r,n;return e=t,(r=[{key:"getPosition",value:function(){return this.position}}])&&eo(e.prototype,r),n&&eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function oo(t){return function(t){if(Array.isArray(t))return io(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return io(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return io(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function io(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ao(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,so(n.key),n)}}function so(t){var e=function(t,e){if("object"!=fo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fo(e)?e:String(e)}function uo(t,e){return(uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function co(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lo(t);if(e){var o=lo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ao(this,r)}}function Ao(t,e){if(e&&("object"===fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lo(t){return(lo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fo(t){return(fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ho,po,go=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":fo(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},yo=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":fo(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uo(t,e)}(i,t);var e,r,n,o=co(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).viewColor=0,e.visible=!1;var r=t.data,n=t.path,a=t.model;return e.setId(r.id),e.type=J.HARDWARE_GROOVE,e.path=n,e.depth=r.depth,e.model=a,e.linkParamModelId=a.id,e.fittingData=r,e}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))}},{key:"getBottomRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,-t.depth).appliedMatrix4(e)}))}},{key:"pointToGlobalMatrix",value:function(){var t=new c.Matrix4,e=this.model.getSize();return t.fromArray(oo(this.model.getConcatenatedMatrix().multiply((new we.default).makeTranslation(new Se.default(-e.x/2,e.y/2,-e.z/2))).elements.values())),t.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(t){this.viewColor=t}},{key:"setOpacity",value:function(t){this.opacity=t}},{key:"setVisible",value:function(t){this.visible=t}}])&&ao(e.prototype,r),n&&ao(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);go([Kr,yo("design:type",Object)],vo.prototype,"viewColor",void 0),go([Kr,yo("design:type",Object)],vo.prototype,"visible",void 0),go([Kr,yo("design:type","function"==typeof(ho=void 0!==J&&J)?ho:Object)],vo.prototype,"type",void 0),go([Kr,yo("design:type","function"==typeof(po=void 0!==Yn&&Yn)?po:Object)],vo.prototype,"path",void 0),go([Kr,yo("design:type",Number)],vo.prototype,"depth",void 0),go([Kr,yo("design:type",Number)],vo.prototype,"opacity",void 0);var mo=r(274),Io=r.n(mo);function Eo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Co(n.key),n)}}function Co(t){var e=function(t,e){if("object"!=So(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=So(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==So(e)?e:String(e)}function bo(t,e){return(bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Po(t);if(e){var o=Po(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wo(this,r)}}function wo(t,e){if(e&&("object"===So(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Po(t){return(Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function So(t){return(So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _o,Qo,Oo,Do,xo,Mo=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":So(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Ro=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":So(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},To=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bo(t,e)}(i,t);var e,r,n,o=Bo(i);function i(t,e,r,n,a,s,u){var c;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(c=o.call(this)).viewColor=0;var A=t||Object(Jr.default)();return c.setId(A),c.position=r instanceof Se.default?r:new Se.default(r),c.size=a instanceof Se.default?a:new Se.default(a),c.rotate=n instanceof Se.default?n:new Se.default(a),c.type=e,c.geometryModel=s,c.originPoints=u,c.bbox=new be.default(c.size.clone(),c.position.clone(),c.rotate.clone()),c}return e=i,(r=[{key:"setViewColor",value:function(t){this.viewColor=t}}])&&Eo(e.prototype,r),n&&Eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Lo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jo(n.key),n)}}function jo(t){var e=function(t,e){if("object"!=Uo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uo(e)?e:String(e)}function ko(t,e){return(ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function No(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Go(t);if(e){var o=Go(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fo(this,r)}}function Fo(t,e){if(e&&("object"===Uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Go(t){return(Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uo(t){return(Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Mo([Kr,Ro("design:type","function"==typeof(_o=void 0!==X&&X)?_o:Object)],To.prototype,"type",void 0),Mo([Kr,Ro("design:type","function"==typeof(Qo=void 0!==Se.default&&Se.default)?Qo:Object)],To.prototype,"position",void 0),Mo([Kr,Ro("design:type","function"==typeof(Oo=void 0!==Se.default&&Se.default)?Oo:Object)],To.prototype,"size",void 0),Mo([Kr,Ro("design:type","function"==typeof(Do=void 0!==Se.default&&Se.default)?Do:Object)],To.prototype,"rotate",void 0),Mo([Kr,Ro("design:type","function"==typeof(xo=void 0!==Io.a&&Io.a)?xo:Object)],To.prototype,"geometryModel",void 0),Mo([Kr,Ro("design:type",Array)],To.prototype,"originPoints",void 0),Mo([Kr,Ro("design:type",Object)],To.prototype,"viewColor",void 0);var zo=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Uo(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Yo=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Uo(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ho=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ko(t,e)}(i,t);var e,r,n,o=No(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var r=t.faces,n=t.color,a=t.opacity,s=t.faceId,u=t.linkPlankArea,c=t.linkModel;return e.setId(Object(Jr.default)()),e.visible=!0,e.color=n||"#ecfdf0",e.opacity=a||1,e.faces=r,e.faceId=s,e.linkPlankArea=u,e.linkModel=c,e}return e=i,(r=[{key:"setColor",value:function(t){this.color=null!=t?t:"#ecfdf0"}},{key:"setOpacity",value:function(t){this.opacity=null!=t?t:1}}])&&Lo(e.prototype,r),n&&Lo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Vo(t){return(Vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wo(n.key),n)}}function Wo(t){var e=function(t,e){if("object"!=Vo(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vo(e)?e:String(e)}function Ko(t,e){return(Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Zo(t);if(e){var o=Zo(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xo(this,r)}}function Xo(t,e){if(e&&("object"===Vo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zo(t){return(Zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}zo([Kr,Yo("design:type",String)],Ho.prototype,"linkPlankArea",void 0),zo([Kr,Yo("design:type",Object)],Ho.prototype,"color",void 0),zo([Kr,Yo("design:type",Number)],Ho.prototype,"opacity",void 0),zo([Kr,Yo("design:type",Boolean)],Ho.prototype,"visible",void 0),zo([Kr,Yo("design:type",Array)],Ho.prototype,"faces",void 0),zo([Kr,Yo("design:type",Object)],Ho.prototype,"linkModel",void 0);var $o=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ko(t,e)}(i,t);var e,r,n,o=Jo(i);function i(t){var e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var n=null!==(r=t.id)&&void 0!==r?r:Object(Jr.default)();return e.setId(n),e.linkModel=t.linkModel,e.plankFaces=t.plankFaces,e.hintOutline=t.hintOutline,e}return e=i,r&&qo(e.prototype,r),n&&qo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Dr);function ti(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ei(n.key),n)}}function ei(t){var e=function(t,e){if("object"!=ai(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ai(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ai(e)?e:String(e)}function ri(t,e){return(ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ni(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ii(t);if(e){var o=ii(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oi(this,r)}}function oi(t,e){if(e&&("object"===ai(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ii(t){return(ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ai(t){return(ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var si=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ai(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},ui=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ai(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ci=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(i,t);var e,r,n,o=ni(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this);var r=t.points,n=t.linkModel,a=t.color,s=t.opacity,u=t.height,c=t.id;return e.setId(c),e.visible=!0,e.viewColor=a,e.opacity=s,e.points=r,e.height=u,e.linkModel=n,e}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}},{key:"setViewColor",value:function(t){this.viewColor=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&ti(e.prototype,r),n&&ti(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);si([Kr,ui("design:type",Object)],ci.prototype,"linkModel",void 0),si([Kr,ui("design:type",Object)],ci.prototype,"viewColor",void 0),si([Kr,ui("design:type",Number)],ci.prototype,"opacity",void 0),si([Kr,ui("design:type",Boolean)],ci.prototype,"visible",void 0),si([Kr,ui("design:type",Array)],ci.prototype,"points",void 0),si([Kr,ui("design:type",Number)],ci.prototype,"height",void 0);var Ai=r(146);function li(t){var e=new we.default;return e.fromString(t.toArray().join(",")),e}function fi(t){return(fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hi(t,e,r){var n;return n=function(t,e){if("object"!=fi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==fi(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pi=hi(hi(hi({},w.XY,new c.Euler(0,0,0,c.EulerOrder.ZYX)),w.YZ,new c.Euler(0,-Math.PI/2,0,c.EulerOrder.ZYX)),w.XZ,new c.Euler(Math.PI/2,-Math.PI/2,0,c.EulerOrder.ZYX));function di(t,e){return e===w.YZ?{x:t.z,y:t.y,z:t.x}:e===w.XZ?{x:t.z,y:t.x,z:t.y}:{x:t.x,y:t.y,z:t.z}}function gi(t){return c.Matrix4.makeRotationFromEuler(pi[t])}function yi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vi(n.key),n)}}function vi(t){var e=function(t,e){if("object"!=bi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bi(e)?e:String(e)}function mi(t,e){return(mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ii(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ci(t);if(e){var o=Ci(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ei(this,r)}}function Ei(t,e){if(e&&("object"===bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ci(t){return(Ci=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function bi(t){return(bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Bi,wi,Pi=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":bi(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Si=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":bi(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},_i=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mi(t,e)}(i,t);var e,r,n,o=Ii(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.HOLE_V2;var s=e.start,u=e.end,c=e.diameter,A=e.holeId;a.setId(A);var l=n||{},f=l.offset,h=l.referencePlane,p=h?li(gi(h)):new we.default,d=f?(new we.default).makeTranslation(new Se.default(f.x,f.y,f.z).negate()):new we.default,g=p.multiply(d),y=r.getConcatenatedMatrix().clone().multiply(g),v=new Ai.a(new Se.default(s),new Se.default(u)),m=v.getCenter(),I=v.length();a.position=new Se.default(m).applyMatrix4(y);var E=Se.default.Y_AXIS,C=new Se.default(u).sub(new Se.default(s)).normalize(),b=(new Pe.default).setFromTwoVectors(E,C),B=y.clone().multiply((new we.default).makeRotationFromQuaternion(b));a.rotate=new Se.default((new Be.default).setFromRotationMatrix(B)),a.radius=c/2,a.height=I;var w=new Se.default(c,I,c);return a.boundingBox=new be.default(w,a.position,a.rotate),a}return e=i,(r=[{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&yi(e.prototype,r),n&&yi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Qi(t){return(Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Di(n.key),n)}}function Di(t){var e=function(t,e){if("object"!=Qi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qi(e)?e:String(e)}Pi([Kr,Si("design:type",Number)],_i.prototype,"height",void 0),Pi([Kr,Si("design:type",Number)],_i.prototype,"radius",void 0),Pi([Kr,Si("design:type","function"==typeof(Bi=void 0!==Se.default&&Se.default)?Bi:Object)],_i.prototype,"position",void 0),Pi([Kr,Si("design:type","function"==typeof(wi=void 0!==Se.default&&Se.default)?wi:Object)],_i.prototype,"rotate",void 0),Pi([Kr,Si("design:type",Object)],_i.prototype,"visible",void 0),Pi([Kr,Si("design:type",Object)],_i.prototype,"color",void 0),Pi([Kr,Si("design:type",Object)],_i.prototype,"opacity",void 0);var xi=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"offsetPoint",value:function(t,e,r){var n=t.getTangent(e).getPerpVector().multiplied(-r);return e.added(n)}},{key:"offsetCurve",value:function(e,r){var n=function(n){return t.offsetPoint(e,n,r)};if(e instanceof c.LineSeg2d)return new c.LineSeg2d(n(e.startPoint),n(e.endPoint));if(e instanceof c.Arc2d)return(e.isCCW?-1:1)*r>0&&c.Num.isEqual(Math.abs(r),e.radius)?new c.LineSeg2d(n(e.startPoint),n(e.endPoint)):c.Arc2d.makeArcByThreePoints(n(e.startPoint),n(e.middlePoint),n(e.endPoint));throw new Error("Curve2d not supported: ".concat(e))}},{key:"getUnboundedCurve2d",value:function(t){if(t instanceof c.LineSeg2d)return new c.Line2d(t.startPoint,t.direction);if(t instanceof c.Arc2d)return t.circle;throw new Error("Curve2d not supported: ".concat(t))}},{key:"curveIntersect",value:function(t,e,r){var n=c.Curve2dIntersect.curve2dIntersectCurve2d(t,e);if(n.length>0)return r&&n.sort((function(e,n){var o=e.point.squaredDistanceTo(r)-n.point.squaredDistanceTo(r);return 0!==o?o:t.isPointOnCurve(e.point)?-1:1})),n[0].point}},{key:"unBoundedCurveIntersect",value:function(e,r,n){var o=e instanceof c.Line2d?e:t.getUnboundedCurve2d(e),i=r instanceof c.Line2d?r:t.getUnboundedCurve2d(r),a=c.Curve2dIntersect.curve2dIntersectCurve2d(o,i);if(a.length>0)return n&&a.sort((function(t,r){var o=t.point.squaredDistanceTo(n)-r.point.squaredDistanceTo(n);return c.Num.isEqual(o,0)?e.isPointOnCurve(t.point)?-1:1:o})),a[0].point}}],(r=null)&&Oi(e.prototype,r),n&&Oi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Mi(t){return(Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ri(t){return function(t){if(Array.isArray(t))return ji(t)}(t)||ki(t)||Li(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ti(t){return function(t){if(Array.isArray(t))return t}(t)||ki(t)||Li(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Li(t,e){if(t){if("string"==typeof t)return ji(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ji(t,e):void 0}}function ji(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ki(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function Ni(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ni(Object(r),!0).forEach((function(e){Gi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ni(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gi(t,e,r){var n;return n=function(t,e){if("object"!=Mi(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Mi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Mi(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ui(t){for(var e=[],r=0;r<t.length;r+=2){var n=[t[r],t[r+1]];e.push(n)}return e.map((function(t){return new c.Point2d(t[0],t[1])}))}function zi(t){return new no({position:t})}function Yi(t){return new Kn(t)}function Hi(t,e,r){var n=e.clone().inversed(),o=new c.Point3d(t.x,t.y,t.z),i=(r||{}).offset;if(i){var a=new c.Matrix4;a.setTranslation(i);var s=a.clone().inversed();o=o.clone().appliedMatrix4(s)}return o=o.clone().appliedMatrix4(n),new c.Point2d(o)}function Vi(t,e){var r=Number(e);if([0,5].includes(r))return new c.Point3d(t.x,t.y,0);throw new Error("plankFaceId must be 0 or 5")}function qi(t,e,r){var n,o,i,a,s,u,A,l,f,h,p=t.depth,d=t.width,g=function(t,e,r){var n=t.path,o=n.points,i=n.curves,a=t.depth,s=t.plankFaceId;return new $n({points:Ui(o).map((function(t){return zi(Hi(Vi(t,s),e,r))})),lines:i.map(Yi),depth:a,matrix4:e})}(t,e,r);return(o=function(t,e){return t.reduce((function(t,r,n,o){var i=t.prevIntersectPoint,a=o[n+1],s=i&&r.split([i])[1]||r;if(a){var u=s.endPoint,c=a.startPoint,A=xi.unBoundedCurveIntersect(s,a,u);if(A){var l=s.split([A])[0];if(l)return{prevIntersectPoint:A,continuousLines:t.continuousLines.concat(l)}}if(u.isEqual(c,.01))return{prevIntersectPoint:void 0,continuousLines:t.continuousLines.concat(s)};var f=e(u,c,n);return{prevIntersectPoint:void 0,continuousLines:t.continuousLines.concat(s).concat(f)}}return t={prevIntersectPoint:void 0,continuousLines:t.continuousLines.concat(s)}}),{prevIntersectPoint:void 0,continuousLines:[]}).continuousLines},i=function(t){var e=t.slice(),r=e.shift(),n=e.pop(),i=Ti(o([n,r],(function(t,e){return c.Arc2d.makeArcByStartEndPoints(s[0].getPosition(),t,e,!1)})).reverse()),a=i[0],u=i.slice(1);return[a].concat(Ri(e),Ri(u.reverse()))},a=(n=g).getLines(),s=n.getPoints(),u=n.isClosedPath(),A=a.map((function(t){return xi.offsetCurve(t.getCurveLine(),-d/2)})).filter((function(t){return t.length>c.Tolerance.Tolerance.DIST_TOL})),l=a.map((function(t){var e=d/2;if(t.type===C.Arc&&e>t.radius)throw new Error("error path groove data: width / 2 greater than curve.radius");return xi.offsetCurve(t.getCurveLine(),e)})).filter((function(t){return t.length>c.Tolerance.Tolerance.DIST_TOL})),f=o(A,(function(t,e,r){return c.Arc2d.makeArcByStartEndPoints(s[r+1].getPosition(),t,e,!1)})),h=o(l,(function(t,e,r){return c.Arc2d.makeArcByStartEndPoints(s[r+1].getPosition(),t,e,!0)})).map((function(t){return t.reversed()})).reverse(),u&&(f=i(f),h=i(h)),[f,h].map((function(t){return{points:t.reduce((function(t,e,r){return 0===r&&(t=t.concat(e.startPoint)),t=t.concat(e.endPoint)}),[]).map(zi),lines:t.map((function(t){return function(t){var e=[t.startPoint,t.endPoint],r=e[0],n=e[1];if(t instanceof c.LineSeg2d)return{points:[r.x,r.y,n.x,n.y],curves:[{type:C.LineSeg}]};if(t instanceof c.Arc2d){var o=t.radius,i=t.isCCW,a=t.length<Math.PI*o;return{points:[r.x,r.y,n.x,n.y],curves:[{type:C.Arc,isCCW:i,radius:o,minorArc:a}]}}throw new Error("unSupport curve type")}(t).curves[0]})).map(Yi)}}))).map((function(t){return new $n(Fi(Fi({},t),{},{depth:p,matrix4:e}))}))}function Wi(t){return function(t){if(Array.isArray(t))return Ki(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ki(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ki(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ki(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ji(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xi(n.key),n)}}function Xi(t){var e=function(t,e){if("object"!=ra(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ra(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ra(e)?e:String(e)}function Zi(t,e){return(Zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $i(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ea(t);if(e){var o=ea(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ta(this,r)}}function ta(t,e){if(e&&("object"===ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ea(t){return(ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ra(t){return(ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var na=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ra(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},oa=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ra(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zi(t,e)}(i,t);var e,r,n,o=$i(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.PATH_GROOVE,a.setId(e.grooveId);var s=(n||{}).referencePlane,u=void 0===s?w.XY:s,c=Xa(e.plankFaceId,r.getSize(),u);return a.connectivePath=qi(e,c,n),a.depth=e.depth,a}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.connectivePath.map((function(e){return e.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))})).flat()}},{key:"getBottomRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.connectivePath.map((function(r){return r.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,-t.depth).appliedMatrix4(e)}))})).flat()}},{key:"pointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(Wi(this.model.getConcatenatedMatrix().elements.values()));var e=(this.option||{}).referencePlane,r=gi(void 0===e?w.XY:e);return t.multiply(r),t.multiplied(this.connectivePath[0].matrix4)}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&Ji(e.prototype,r),n&&Ji(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function aa(t){return function(t){if(Array.isArray(t))return sa(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return sa(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sa(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ua(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ca(n.key),n)}}function ca(t){var e=function(t,e){if("object"!=pa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pa(e)?e:String(e)}function Aa(t,e){return(Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function la(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ha(t);if(e){var o=ha(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fa(this,r)}}function fa(t,e){if(e&&("object"===pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ha(t){return(ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pa(t){return(pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}na([Kr,oa("design:type",Array)],ia.prototype,"connectivePath",void 0),na([Kr,oa("design:type",Number)],ia.prototype,"depth",void 0),na([Kr,oa("design:type",Object)],ia.prototype,"visible",void 0),na([Kr,oa("design:type",Object)],ia.prototype,"color",void 0),na([Kr,oa("design:type",Object)],ia.prototype,"opacity",void 0);var da,ga=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":pa(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},ya=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},va=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(i,t);var e,r,n,o=la(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.ROUND_CORNER_GROOVE,a.setId(e.grooveId);var s=e.start,u=e.end,A=new c.Matrix4,l=new c.Matrix4;l.setTranslation(new c.Vector3d(s));var f=Ka(e.plankFaceId,w.XY).extractBasis().zAxis,h=new c.Vector3d(u).subtracted(new c.Vector3d(s)).normalized(),p=f.clone().cross(h).normalized(),d=h.clone().cross(p).normalized(),g=c.Matrix4.makeBasis(h,p,d),y=A.multiplied(l).multiplied(g);return a.path=function(t,e,r){var n,o,i=t.start,a=t.end,s=t.width,u=t.depth,A=t.radius,l=Hi(i,e,r),f=Hi(a,e,r),h=new c.Vector2d(f).subtracted(new c.Vector2d(l)),p=h.normalized(),d=p.reversed(),g=h.getPerpVector(),y=g.reversed(),v=s/2;return new $n(Fi(Fi({},(n=[l.added(g.multiplied(v-A)),l.added(g.multiplied(v)).added(p.multiplied(A)),f.added(g.multiplied(v)).added(d.multiplied(A)),f.added(g.multiplied(v-A)),f.added(y.multiplied(v-A)),f.added(y.multiplied(v)).added(d.multiplied(A)),l.added(y.multiplied(v)).added(p.multiplied(A)),l.added(y.multiplied(v-A))],o=n.map((function(t,e){return new Kn(e%2==0?{type:C.Arc,isCCW:!1,radius:A,minorArc:!0}:{type:C.LineSeg})})),{points:n.map(zi),lines:o})),{},{depth:u,matrix4:e}))}(e,y),a.depth=e.depth,a}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,t.depth).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){return this.originPointToGlobalMatrix().multiplied(this.path.matrix4)}},{key:"originPointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(aa(this.model.getConcatenatedMatrix().elements.values()));var e=this.option||{},r=e.offset,n=e.referencePlane,o=gi(void 0===n?w.XY:n);if(t.multiply(o),r){var i=new c.Matrix4;i.setTranslation(r.reversed()),t.multiply(i)}return t}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&ua(e.prototype,r),n&&ua(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function ma(t){return function(t){if(Array.isArray(t))return Ia(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ia(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ia(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ia(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ea(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ca(n.key),n)}}function Ca(t){var e=function(t,e){if("object"!=Sa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Sa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Sa(e)?e:String(e)}function ba(t,e){return(ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ba(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pa(t);if(e){var o=Pa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wa(this,r)}}function wa(t,e){if(e&&("object"===Sa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pa(t){return(Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Sa(t){return(Sa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}ga([Kr,ya("design:type","function"==typeof(da=void 0!==$n&&$n)?da:Object)],va.prototype,"path",void 0),ga([Kr,ya("design:type",Number)],va.prototype,"depth",void 0),ga([Kr,ya("design:type",Object)],va.prototype,"visible",void 0),ga([Kr,ya("design:type",Object)],va.prototype,"color",void 0),ga([Kr,ya("design:type",Object)],va.prototype,"opacity",void 0);var _a,Qa=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Sa(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Oa=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Sa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Da=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ba(t,e)}(i,t);var e,r,n,o=Ba(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.SPECIAL_SHAPED_GROOVE,a.setId(e.grooveId);var s=(n||{}).referencePlane,u=void 0===s?w.XY:s,c=Xa(e.plankFaceId,r.getSize(),u);return a.path=function(t,e,r){var n=t.profile,o=n.points,i=n.curves,a=t.depth,s=t.plankFaceId;return new $n({points:Ui(o).map((function(t){return zi(Hi(Vi(t,s),e,r))})),lines:i.map(Yi),depth:a,matrix4:e})}(e,c,n),a.depth=e.depth,a}return e=i,(r=[{key:"getTopRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(e){return new c.Point3d(e.x,e.y,0).appliedMatrix4(t)}))}},{key:"getBottomRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new c.Point3d(r.x,r.y,-t.depth).appliedMatrix4(e)}))}},{key:"pointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(ma(this.model.getConcatenatedMatrix().elements.values()));var e=(this.option||{}).referencePlane,r=gi(void 0===e?w.XY:e);return t.multiply(r),t.multiplied(this.path.matrix4)}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&Ea(e.prototype,r),n&&Ea(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function xa(t){return function(t){if(Array.isArray(t))return Ma(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ma(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ma(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ma(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ra(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ta(n.key),n)}}function Ta(t){var e=function(t,e){if("object"!=Fa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fa(e)?e:String(e)}function La(t,e){return(La=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ja(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Na(t);if(e){var o=Na(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ka(this,r)}}function ka(t,e){if(e&&("object"===Fa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Na(t){return(Na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fa(t){return(Fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Qa([Kr,Oa("design:type","function"==typeof(_a=void 0!==$n&&$n)?_a:Object)],Da.prototype,"path",void 0),Qa([Kr,Oa("design:type",Number)],Da.prototype,"depth",void 0),Qa([Kr,Oa("design:type",Object)],Da.prototype,"visible",void 0),Qa([Kr,Oa("design:type",Object)],Da.prototype,"color",void 0),Qa([Kr,Oa("design:type",Object)],Da.prototype,"opacity",void 0);var Ga,Ua=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},za=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Fa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&La(t,e)}(i,t);var e,r,n,o=ja(i);function i(t,e,r,n){var a;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).linkParamModelId=t,a.data=e,a.model=r,a.option=n,a.visible=!0,a.color=0,a.opacity=1,a.type=J.SQUARE_GROOVE,a.setId(e.grooveId);var s=e.start,u=e.end,A=new c.Matrix4,l=new c.Matrix4;l.setTranslation(new c.Vector3d(s));var f=Ka(e.plankFaceId,w.XY).extractBasis().zAxis,h=new c.Vector3d(u).subtracted(new c.Vector3d(s)).normalized(),p=f.clone().cross(h).normalized(),d=h.clone().cross(p).normalized(),g=c.Matrix4.makeBasis(h,p,d);return a.grooveMatrix=A.multiplied(l).multiplied(g),a.shapePointsInGroove=a.getShapePoints(),a.depth=e.depth,a}return e=i,(r=[{key:"getShapePoints",value:function(){var t=this.grooveMatrix,e=this.data,r=e.start,n=e.end,o=e.width,i=Hi(r,t),a=Hi(n,t),s=a.subtracted(i),u=s.getPerpVector().clone().multiplied(o/2),c=s.getPerpVector().reversed().multiplied(o/2);return[i.added(u),a.added(u),a.added(c),i.added(c)]}},{key:"getTopRenderPoints",value:function(){var t=this,e=this.pointToGlobalMatrix();return this.shapePointsInGroove.map((function(e){return new c.Point3d(e.x,e.y,t.depth)})).map((function(t){return t.appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var t=this.pointToGlobalMatrix();return this.shapePointsInGroove.map((function(t){return new c.Point3d(t.x,t.y,0)})).map((function(e){return e.appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){return this.originPointToGlobalMatrix().clone().multiplied(this.grooveMatrix)}},{key:"originPointToGlobalMatrix",value:function(){var t=new c.Matrix4;t.fromArray(xa(this.model.getConcatenatedMatrix().elements.values()));var e=this.option||{},r=e.offset,n=e.referencePlane,o=gi(void 0===n?w.XY:n);if(t.multiply(o),r){var i=new c.Matrix4;i.setTranslation(r.reversed()),t.multiply(i)}return t}},{key:"setVisible",value:function(t){this.visible=t}},{key:"setColor",value:function(t){this.color=t}},{key:"setOpacity",value:function(t){this.opacity=t}}])&&Ra(e.prototype,r),n&&Ra(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Dr);function Ha(t){return(Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Va(t,e,r){var n;return n=function(t,e){if("object"!=Ha(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Ha(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w.XY,n=Number(t),o=[0,0,0];return r===w.XY?0===n?o[2]=1:1===n?o[0]=-1:2===n?o[1]=-1:3===n?o[0]=1:4===n?o[1]=1:5===n&&(o[2]=-1):r===w.XZ?0===n?o[1]=-1:1===n?o[2]=-1:2===n?o[0]=1:3===n?o[2]=1:4===n?o[0]=-1:5===n&&(o[1]=1):r===w.YZ&&(0===n?o[0]=-1:1===n?o[2]=-1:2===n?o[1]=-1:3===n?o[2]=1:4===n?o[1]=1:5===n&&(o[0]=1)),new e({x:o[0],y:o[1],z:o[2]})}Ua([Kr,za("design:type",Number)],Ya.prototype,"depth",void 0),Ua([Kr,za("design:type",Array)],Ya.prototype,"shapePointsInGroove",void 0),Ua([Kr,za("design:type","function"==typeof(Ga=void 0!==c.Matrix4&&c.Matrix4)?Ga:Object)],Ya.prototype,"grooveMatrix",void 0),Ua([Kr,za("design:type",Object)],Ya.prototype,"visible",void 0),Ua([Kr,za("design:type",Object)],Ya.prototype,"color",void 0),Ua([Kr,za("design:type",Object)],Ya.prototype,"opacity",void 0);var Wa=Va(Va(Va({},w.XY,[new c.Vector3d({x:1,y:0,z:0}),new c.Vector3d({x:0,y:1,z:0}),new c.Vector3d({x:0,y:0,z:1})]),w.YZ,[new c.Vector3d({x:-1,y:0,z:0}),new c.Vector3d({x:0,y:0,z:1}),new c.Vector3d({x:0,y:1,z:0})]),w.XZ,[new c.Vector3d({x:0,y:0,z:1}),new c.Vector3d({x:-1,y:0,z:0}),new c.Vector3d({x:0,y:-1,z:0})]);function Ka(t,e){var r=qa(t,c.Vector3d,e),n=Wa[e].find((function(t){return 0===t.dot(r)})),o=r.clone().cross(n).normalized();return c.Matrix4.makeBasis(n,o,r)}function Ja(t,e){var r=Ka(t,w.XY);return r.setTranslation(new c.Vector3d(function(t,e){var r=Number(t),n={x:0,y:0,z:0};0===r?n.z=e.z:3===r?n.x=e.x:2===r&&(n.y=-e.y);return n}(t,e))),r}function Xa(t,e,r){var n=Number(t);if(![0,5].includes(n))throw new Error("Only 0 and 5 plankFaceId are allowed");var o=di(e,r).z,i=new c.Matrix4;return i.setTranslation(new c.Vector3d(0,0,o/2)),(5===n?c.Matrix4.makeBasis(c.Vector3d.xAxis,c.Vector3d.yAxis,c.Vector3d.zAxis.reversed()):c.Matrix4.makeBasis(c.Vector3d.xAxis,c.Vector3d.yAxis,c.Vector3d.zAxis)).multiplied(i)}function Za(t){return!(!t||t.fittingType!==J.HOLE)}function $a(t){return!(!t||t.fittingType!==J.GROOVE)}function ts(t,e,r){var n,o,i=r.holeColor,a=r.grooveColor,s=r.holeOpacity,u=r.grooveOpacity,A=function(t,e){var r,n,o=e.start,i=e.end,a=e.plankFaceId,s=t.getSize(),u=(new we.default).makeTranslation(new Se.default(-s.x/2,s.y/2,-s.z/2)),A=t.getConcatenatedMatrix().multiply(u),l=new c.Point3d(o),f=new c.Point3d(i),h=new c.LineSeg3d(l,f),p=h.getPoint(h.length/2),d=new Se.default(p).applyMatrix4(A);if(Za(e)){var g=e.diameter;r=new Se.default(g,h.length,g),n=Se.default.Y_AXIS}if($a(e)){var y=e.width,v=e.depth;[0,5].includes(a)?(r=new Se.default(y,h.length,v),n=Se.default.Y_AXIS):[2,4].includes(a)?(r=new Se.default(y,v,h.length),n=Se.default.Z_AXIS):[1,3].includes(a)&&(r=new Se.default(v,y,h.length),n=Se.default.Z_AXIS)}var m=new Se.default(i).sub(new Se.default(o)).normalize(),I=(new Pe.default).setFromTwoVectors(n,m),E=A.clone().multiply((new we.default).makeRotationFromQuaternion(I)),C=new Se.default((new Be.default).setFromRotationMatrix(E)),b=new be.default(r,d,C);return new En(e.id,t.id,{position:d,size:r,rotate:C,height:h.length,boundingBox:b},e)}(e,t);Za(t)?(n=i,o=s):$a(t)&&(n=a,o=u);var l=t.params||[],f=l.find((function(t){return t.key===le})),h=l.find((function(t){return t.key===fe}));return A.setVisible(!0),A.setViewColor(f?f.value:n),A.setOpacity(h?Number(h.value):o),A}var es=r(33),rs=r(218),ns=r.n(rs),os=r(226),is=r(237),as=r(170),ss=r(260),us=r(497),cs=r(0),As=r(117),ls=new Se.default,fs=new Se.default,hs=new Se.default,ps=function(){function t(t){this.points=t||[]}return t.prototype.setFromPointsAndIndex=function(t,e){return this.points[0]=t[e.x],this.points[1]=t[e.y],this.points[2]=t[e.z],this},t.prototype.getArea=function(){var t=Object(cs.g)(this.points,3),e=t[0],r=t[1],n=t[2];return.5*Se.default.cross3(e,r,n,ls).length()},t.prototype.getCentroid=function(t){var e=Object(cs.g)(this.points,3),r=e[0],n=e[1],o=e[2];return(t||new Se.default).addVectors(r,n).add(o).mul(1/3)},t.prototype.getNormal=function(t){var e=Object(cs.g)(this.points,3),r=e[0],n=e[1],o=e[2],i=Se.default.cross3(r,n,o,t);return i.isZero()?void 0:i.normalize()},t.prototype.isDegenerate=function(){var t=Object(cs.g)(this.points,3),e=t[0],r=t[1],n=t[2];return Se.default.cross3(e,r,n,ls).isZero()},t.prototype.containsPoint=function(t){var e=Object(cs.g)(this.points,3),r=e[0],n=e[1],o=e[2],i=ls.subVectors(n,r),a=fs.subVectors(o,r),s=hs.subVectors(t,r),u=Se.default.dot2(i,i),c=Se.default.dot2(i,a),A=Se.default.dot2(i,s),l=Se.default.dot2(a,a),f=Se.default.dot2(a,s),h=c*c-u*l;if(As.default.isZero(h))return!1;var p=h>0?1:-1,d=(c*f-l*A)*p,g=(c*A-u*f)*p;return g>=0&&d>=0&&g+d<=h*p},t.prototype.clone=function(){return new t(this.points)},t.prototype.toString=function(){return"Triangle3 {a: "+this.points[0].toParenString()+", b: "+this.points[1].toParenString()+", c: "+this.points[2].toParenString()+"}"},t}(),ds=r(103),gs=r(235);function ys(t){var e=[];t.shapes.forEach((function(t){var r=t.getTriangles();r&&0!==r.length&&ds.default.addElements(e,r)}));var r=function(t){var e=[];return t.forEach((function(t){return ds.default.addUniqueElements(e,t.points)})),e}(e),n=function(t,e){return t.map((function(t){var r=new Se.default;return r.x=e.indexOf(t.points[0]),r.y=e.indexOf(t.points[1]),r.z=e.indexOf(t.points[2]),r}))}(e,r);return{vertices:r,textures:function(t,e){if(!e){var r=(new gs.default).includePoints(t);e=new Cn.default(r.min.x,r.max.y)}return t.map((function(t){return Cn.default.sub(t,e)}))}(r,t.pivot),indices:n}}var vs=new Se.default(0,0,0);function ms(t){var e=t.planeTransform;return function(t){try{var e=ys(t),r=new Io.a;return r.vertices=new Float32Array(Se.default.toFloatArray(t.computeVertices(e.vertices))),r.normals=new Float32Array(Se.default.toFloatArray(t.computeNormals(e.vertices))),r.textures=new Float32Array(Cn.default.toFloatArray(e.textures)),r.indices=new Uint16Array(Se.default.toFloatArray(e.indices)),r}catch(t){return void console.error(t)}}({shapes:t.shapes,pivot:t.pivot,computeVertices:function(t){return t.map((function(t){return vs.set(t.x,t.y,0),e.localToWorld(vs)}))},computeNormals:function(t){var r=e.basicZ.clone().normalize();return t.map((function(){return r.clone()}))}})}function Is(t){return function(t){if(Array.isArray(t))return Es(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Es(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Es(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Es(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Cs=new Se.default(0,0,0);function bs(t,e,r){for(var n,o=t.id,i=r.getConcatenatedMatrix(),a=li(function(t){var e=t.originSize,r=t.plane,n=void 0===r?w.XY:r,o=t.isOutputIgnoreScale,i=t.scale,a=di(e,n),s=new c.Matrix4;if(o){var u=di(i,n),A=u.x,l=u.y,f=u.z;s=c.Matrix4.makeScale(1/A,1/l,1/f)}var h=new c.Matrix4;return h.setTranslation(new c.Vector3d(-a.x/2,a.y/2,-a.z/2)),c.Matrix4.makeRotationFromEuler(pi[n]).multiplied(h).multiplied(s)}({originSize:r.getSize(),plane:e.referencePlane,scale:r.getScale(),isOutputIgnoreScale:!!e.referencePlane&&r.getType()===es.ParamModelType.PARAM_FURNITURE})),s=i.clone().multiply(a),u=e["@type"],A=(n=u===X.FACE?_s(e,s):4===e.points.length?function(t,e){var r=[],n=[],o=[],i=[],a=t.points.map((function(t){return new Se.default(t).applyMatrix4(e)})),s=[0,1,2,3];s.forEach((function(t){var e=a[t],n=e.x,o=e.y,i=e.z;r.push(n,o,i)})),n.push.apply(n,Ps),i.push.apply(i,Ss);var u=new ps(s.slice(0,3).map((function(t){return a[t]}))).getNormal(),c=new Array(4).fill([u.x,u.y,u.z]);o.push.apply(o,Is(c.flat()));var A=new Io.a;return A.vertices=new Float32Array(r),A.indices=new Float32Array(n),A.normals=new Float32Array(o),A.textures=new Float32Array(i),A}(e,s):function(t,e){var r=[],n=[],o=[],i=[],a=t.points.map((function(t){return new Se.default(t).applyMatrix4(e)}));ws.forEach((function(t,e){t.forEach((function(t){var e=a[t],n=e.x,o=e.y,i=e.z;r.push(n,o,i)})),n.push.apply(n,Is(Ps.map((function(t){return t+4*e})))),i.push.apply(i,Ss);var s=new ps(t.slice(0,3).map((function(t){return a[t]}))).getNormal(),u=new Array(4).fill([s.x,s.y,s.z]);o.push.apply(o,Is(u.flat()))}));var s=new Io.a;return s.vertices=new Float32Array(r),s.indices=new Float32Array(n),s.normals=new Float32Array(o),s.textures=new Float32Array(i),s}(e,s)).getBoundingBox3().getCenter(),l=ns.a.decompose(s).rotation,f=ns.a.compose(A,l,Se.default.ONE),h=(new we.default).getInverse(f),p=new Float32Array(n.vertices),d=new os.default,g=0;g<p.length;g+=3)Cs.set(p[g],p[g+1],p[g+2]).applyMatrix4(h),d.includePoint(Cs);return new To(o,u,A,l,d.getSize(),n,e.points.map((function(t){return new Se.default(t).applyMatrix4(s)})))}var Bs,ws=[[0,1,2,3],[4,5,6,7],[0,4,7,3],[1,5,6,2],[0,1,5,4],[2,6,7,3]],Ps=[0,1,2,2,3,0],Ss=[0,0,1,0,1,1,0,1];function _s(t,e){var r=t.points.map((function(t){return new Se.default(t).applyMatrix4(e)})),n=(new is.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,o=r[1].clone().sub(r[0]).normalize(),i=n.clone().cross(o).normalize(),a=new us.a(o,i,n,r[0]),s=r.map((function(t){return new Cn.default(a.worldToLocal(t))})),u=new as.default(s);return ms({planeTransform:a,shapes:[new ss.a(u)]})}function Qs(t){return(Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Os(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ds(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Os(Object(r),!0).forEach((function(e){xs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Os(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xs(t,e,r){var n;return n=function(t,e){if("object"!=Qs(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Qs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Qs(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ms(t,e){var r=e.clone().inversed(),n=new Yn({id:t.id,type:ye.OUTER,points:t.points.map((function(t){return Ds(Ds({},t),{},{position:(e=t.position,n=new c.Point3d(e).appliedMatrix4(r),new c.Point2d(n))});var e,n})).map(Rs),lines:t.lines.map(Ts),depth:t.depth,matrix4:e});return n.linkPointsAndLines(),n}function Rs(t){return new Rn(t)}function Ts(t){return new _n(t)}!function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE"}(Bs||(Bs={}));var Ls=new c.Tolerance.Tolerance(.01,.01,.01);function js(t){if(t.getType()===At.NONE)return!0;var e=t.prevLine,r=t.nextLine;return e.type!==lt.CIRCLE_ARC&&r.type!==lt.CIRCLE_ARC&&(0!==t.radius&&(!t.cornerCutDistance||0!==t.cornerCutDistance[0]&&0!==t.cornerCutDistance[1]))}function ks(t){return t.type===lt.SEGMENT||(!(t.type!==lt.CIRCLE_ARC||!c.Num.isEqual(t.getVector().length,2*t.radius))||(t.type!==lt.CIRCLE_ARC||!c.Num.isBigger(t.getVector().length,2*t.radius)))}function Ns(t){return t.type===Bs.POINT?t.val.getCurveLineAndPoints().curveLine:t.type===Bs.LINE?t.val.getRealLine():void 0}function Fs(t,e){if(t.type===Bs.POINT&&t.val.getType()===At.NONE)return!0;if(e.type===Bs.POINT&&e.val.getType()===At.NONE)return!0;var r=Ns(t),n=Ns(e);if(!r||!n)return!1;var o=c.Curve2dIntersect.curve2dIntersectCurve2d(r,n,Ls);return!(1===o.length&&!o[0].point.isEqual(r.startPoint,.01)&&!o[0].point.isEqual(r.endPoint,.01))&&(!(o.length>1)||o.every((function(t){return t.point.isEqual(o[0].point,.01)})))}function Gs(t,e,r){var n=r.grooveColor,o=r.grooveOpacity,i=Ja(t.plankFaceId,e.getSize()),a=new vo({data:t,path:Ms(t,i),model:e});a.setVisible(!0);var s=(t.params||[]).find((function(t){return t.key===le})),u=(t.params||[]).find((function(t){return t.key===fe}));return a.setViewColor(s?s.value:n),a.setOpacity(u?Number(u.value):o),a}var Us=r(65),zs=r(770),Ys=r(12),Hs=r.n(Ys);function Vs(t){return(Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ws(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ks(n.key),n)}}function Ks(t){var e=function(t,e){if("object"!=Vs(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vs(e)?e:String(e)}function Js(t,e){return(Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Xs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$s(t);if(e){var o=$s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zs(this,r)}}function Zs(t,e){if(e&&("object"===Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $s(t){return($s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var tu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Js(t,e)}(i,t);var e,r,n,o=Xs(i);function i(){return qs(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return null}}])&&Ws(e.prototype,r),n&&Ws(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent);function eu(t){return(eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ru(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ou(n.key),n)}}function ou(t){var e=function(t,e){if("object"!=eu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eu(e)?e:String(e)}function iu(t,e){return(iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function au(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=uu(t);if(e){var o=uu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return su(this,r)}}function su(t,e){if(e&&("object"===eu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function uu(t){return(uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cu,Au=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iu(t,e)}(i,t);var e,r,n,o=au(i);function i(){return ru(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"module",value:function(){return"entry"}}])&&nu(e.prototype,r),n&&nu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);cu||(cu={});var lu,fu=[];!function(t){t.SAVE_CUSTOM="saveCustom",t.UNDO_REDO="undoRedo",t.PARSE_DOCUMENT="parseDocument"}(lu||(lu={}));var hu,pu,du={};function gu(t){return(gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yu(Object(r),!0).forEach((function(e){mu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mu(t,e,r){var n;return n=function(t,e){if("object"!=gu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==gu(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iu(t,e){!function(t){hu.log(Eu(t))}(t);var r={eventType:t.behavior+"_ktr",data:{},labels:{}};pu&&Object.assign(r.labels,pu()),e.dataKeys.forEach((function(e){return r.data[e]=t[e]})),e.labelKeys&&(Array.isArray(e.labelKeys)?e.labelKeys.forEach((function(e){return r.labels[e]=t[e]})):Object.assign(r.labels,e.labelKeys)),function(t){hu.logByKtracker(t)}(r)}function Eu(t){return vu(vu({},t),{},{pluginName:"customPad"})}function Cu(t){return(Cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wu(n.key),n)}}function wu(t){var e=function(t,e){if("object"!=Cu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Cu(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Cu(e)?e:String(e)}function Pu(){return(Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Su(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Su(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Du(t)););return t}function _u(t,e){return(_u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Qu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Du(t);if(e){var o=Du(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ou(this,r)}}function Ou(t,e){if(e&&("object"===Cu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Du(t){return(Du=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xu={entry:Au,monitor:function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_u(t,e)}(i,t);var e,r,n,o=Qu(i);function i(){return bu(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"init",value:function(){Pu(Du(i.prototype),"init",this).call(this),this.addConfig({sendLog:Iu,perfLogConfig:fu,timeLogConfig:du})}}])&&Bu(e.prototype,r),n&&Bu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.Monitor)};var Mu,Ru,Tu=r(50),Lu=r(762),ju=r(359);function ku(t){return(ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Nu=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==ku(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ku(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Fu(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Gu(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fu(i,n,o,a,s,"next",t)}function s(t){Fu(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Uu(t){return function(t){if(Array.isArray(t))return Hu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Yu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zu(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Yu(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Yu(t,e){if(t){if("string"==typeof t)return Hu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hu(t,e):void 0}}function Hu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qu(n.key),n)}}function qu(t){var e=function(t,e){if("object"!=ku(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ku(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ku(e)?e:String(e)}!function(t){t[t.autoBackup=1]="autoBackup",t[t.transaction=2]="transaction",t[t.version=4]="version",t[t.modelBinding=8]="modelBinding",t[t.autoSave=16]="autoSave"}(Mu||(Mu={})),function(t){t[t.requestBackup=0]="requestBackup",t[t.forceBackup=1]="forceBackup",t[t.mergeRecorder=2]="mergeRecorder",t[t.notifyModelChange=3]="notifyModelChange",t[t.autoSave=4]="autoSave",t[t.save=5]="save",t[t.revert=6]="revert"}(Ru||(Ru={}));var Wu=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.autoSaveInterruptSwitch=new Lu.InterruptSwitch((function(t){t?e.kafDocument.autoSave.stop():e.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(Tu.throttleInRaf)((function(){Us.Util.safeExec((function(){++e.requestBackupTimes>e.maxRequestBackupTimes?Object(ju.devError)("requestBackup long time on backup"):e.kafDocument.autoBackupBlockKeys.size>0?e.requestBackup():e.docs.some((function(t){return!t.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.requestBackup()}))}),1)}var e,r,n;return e=t,(r=[{key:"revert",value:function(){var t=this;Us.Util.safeExec((function(){var e,r=zu(t.docs);try{for(r.s();!(e=r.n()).done;)e.value.getDoc().getTransactionContext().revert()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var t=this;Us.Util.safeExec((function(){t.docs.some((function(t){return!t.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var t=this;Us.Util.safeExec((function(){var e,r=zu(t.docs);try{for(r.s();!(e=r.n()).done;)e.value.getDoc().getTransactionContext().mergeRecorder()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var t=this;Us.Util.safeExec((function(){var e,r=zu(t.docs);try{for(r.s();!(e=r.n()).done;)e.value.getDoc().notifyModelChange()}catch(t){r.e(t)}finally{r.f()}}))}},{key:"save",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Us.Util.safeExec((function(){t.kafDocument.saveDocument(e)}))}},{key:"interruptSingle",value:function(t,e){var r=this,n={};return e.includes(Mu.autoBackup)&&Us.Util.safeExec((function(){n[Mu.autoBackup]=(new Date).getTime().toString()+t.getId(),r.kafDocument.pauseAutoBackup(n[Mu.autoBackup])}),!1),e.includes(Mu.transaction)&&Us.Util.safeExec((function(){n[Mu.transaction]=t.getDoc().getTransactionSwitch().interrupt()})),e.includes(Mu.version)&&Us.Util.safeExec((function(){n[Mu.version]=t.getDoc().getVersionSwitch().interrupt()})),e.includes(Mu.modelBinding)&&Us.Util.safeExec((function(){n[Mu.modelBinding]=t.getDoc().getModelBindingSwitch().interrupt()})),e.includes(Mu.autoSave)&&Us.Util.safeExec((function(){n[Mu.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(t,e){var r,n=this,o={},i=zu(this.docs);try{for(i.s();!(r=i.n()).done;){var a=r.value;o[a.getId()]=this.interruptSingle(a,t)}}catch(t){i.e(t)}finally{i.f()}return this.keyCache.add(o),e&&setTimeout((function(){return n.resume(o)}),e),o}},{key:"resumeSingle",value:function(t,e){var r=this;e[Mu.autoBackup]&&Us.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(e[Mu.autoBackup])}),!1),e[Mu.transaction]&&Us.Util.safeExec((function(){t.getDoc().getTransactionSwitch().resume(e[Mu.transaction])})),e[Mu.version]&&Us.Util.safeExec((function(){t.getDoc().getVersionSwitch().resume(e[Mu.version])})),e[Mu.modelBinding]&&Us.Util.safeExec((function(){t.getDoc().getModelBindingSwitch().resume(e[Mu.modelBinding])})),e[Mu.autoSave]&&Us.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(e[Mu.autoSave])}))}},{key:"resume",value:function(t,e){var r,n=zu(this.docs);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=t[o.getId()];i&&this.resumeSingle(o,i)}}catch(t){n.e(t)}finally{n.f()}this.keyCache.delete(t),e&&this.afterActions(e)}},{key:"forceResumeAll",value:function(){var t=this;Uu(this.keyCache.values()).forEach((function(e){return t.resume(e)}))}},{key:"interruptActions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Mu.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ru.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return function(){var i={};try{i=o.interrupt(e,n);for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=t.apply(this,s);return c}finally{o.resume(i,r)}}}},{key:"interruptActionsAsync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[Mu.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Ru.requestBackup],n=arguments.length>3?arguments[3]:void 0,o=this;return Gu(Nu().mark((function i(){var a,s,u,c,A,l=arguments;return Nu().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:for(a={},i.prev=1,a=o.interrupt(e,n),s=l.length,u=new Array(s),c=0;c<s;c++)u[c]=l[c];return i.next=6,t.apply(this,u);case 6:return A=i.sent,i.abrupt("return",A);case 8:return i.prev=8,o.resume(a,r),i.finish(8);case 11:case"end":return i.stop()}}),i,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(t){t.includes(Ru.mergeRecorder)&&this.mergeRecorder(),t.includes(Ru.requestBackup)?this.requestBackup():t.includes(Ru.forceBackup)?this.forceBackup():t.includes(Ru.revert)&&this.revert(),t.includes(Ru.notifyModelChange)&&this.notifyModelChange(),t.includes(Ru.autoSave)?this.save(!0):t.includes(Ru.save)&&this.save()}}])&&Vu(e.prototype,r),n&&Vu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ku=r(657),Ju=r.n(Ku),Xu=r(893),Zu=r(249);function $u(t){return($u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ec(n.key),n)}}function ec(t){var e=function(t,e){if("object"!=$u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=$u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$u(e)?e:String(e)}function rc(t,e){return(rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ic(t);if(e){var o=ic(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oc(this,r)}}function oc(t,e){if(e&&("object"===$u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ic(t){return(ic=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ac=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rc(t,e)}(i,t);var e,r,n,o=nc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).model=t,e}return e=i,(r=[{key:"toModel",value:function(){return this.model}}])&&tc(e.prototype,r),n&&tc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Zu.a);function sc(t){return(sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ac(n.key),n)}}function cc(t,e,r){return e&&uc(t.prototype,e),r&&uc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ac(t){var e=function(t,e){if("object"!=sc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==sc(e)?e:String(e)}var lc=cc((function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.doc=e,this.key=r,this.BackupItemImpl=ac,this.getModel=function(){var t=n.doc.getTransactionContext();return t.commitRecorder(),{recorderId:t.getCurrentId()}},this.onUpdateModel=function(t,e){var r=n.doc.getTransactionContext();e===Zu.b.redo?r.redoToRecorder(t.recorderId):e===Zu.b.undo?r.undoToRecorder(t.recorderId):e===Zu.b.revert&&r.revert()},this.updateListeners=function(t,e){var r=n.doc;t?(r.getTransactionSwitch().resumeAll(),r.requestCommit=e):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}}));function fc(t){return(fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hc(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */hc=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==fc(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(fc(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function pc(t){return function(t){if(Array.isArray(t))return yc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||gc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dc(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=gc(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function gc(t,e){if(t){if("string"==typeof t)return yc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yc(t,e):void 0}}function yc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vc(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function mc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ic(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cc(n.key),n)}}function Ec(t,e,r){return e&&Ic(t.prototype,e),r&&Ic(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Cc(t){var e=function(t,e){if("object"!=fc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fc(e)?e:String(e)}function bc(t,e){return(bc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Pc(t);if(e){var o=Pc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wc(this,r)}}function wc(t,e){if(e&&("object"===fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pc(t){return(Pc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sc=Xu.ib.DocumentStateManager,_c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bc(t,e)}(r,t);var e=Bc(r);function r(){var t;return mc(this,r),(t=e.apply(this,arguments)).doc=new ke.CDoc,t}return Ec(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(Ju()(Object)),Qc=new(function(){function t(){mc(this,t),this.stacks=[{documentAction:new Wu}]}var e,r;return Ec(t,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(t,e){var r=this.getTopDocumentAction();return r.docs=t,r.kafDocument=e,r}},{key:"pushDocumentAction",value:(e=hc().mark((function t(){var e,r,n,o,i,a,s,u,c,A,l,f,h,p,d,g=arguments;return hc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=g.length>0&&void 0!==g[0]?g[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([Mu.autoBackup]),o=new Wu,i=new _c,a=new Sc,s=dc(this.stacks);try{for(s.s();!(u=s.n()).done;){c=u.value,A=dc(c.documentAction.docs);try{for(A.s();!(l=A.n()).done;)l.value.getDoc().addTransactionHook(i.getDoc().onTrackTransaction)}catch(t){A.e(t)}finally{A.f()}}}catch(t){s.e(t)}finally{s.f()}o.docs=[i].concat(pc(e)),o.kafDocument=a,f=new lc(i.getDoc(),"tempDocumentSource".concat(this.stacks.length)),a.addDocumentSource(f),h=dc(e);try{for(h.s();!(p=h.n()).done;)d=p.value,a.addDocumentSource(new lc(d.getDoc(),d.getId()))}catch(t){h.e(t)}finally{h.f()}return a.initState(),t.next=17,a.start();case 17:return this.stacks.push({documentAction:o,interruptKey:n,tempDoc:i,tempDocumentSource:f}),t.abrupt("return",a);case 19:case"end":return t.stop()}}),t,this)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){vc(i,n,o,a,s,"next",t)}function s(t){vc(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var t,e=this.stacks.pop(),r=e.tempDoc,n=e.documentAction,o=e.interruptKey,i=dc(this.stacks);try{for(i.s();!(t=i.n()).done;){var a,s=dc(t.value.documentAction.docs);try{for(s.s();!(a=s.n()).done;){a.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(t){s.e(t)}finally{s.f()}}}catch(t){i.e(t)}finally{i.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(o,[Ru.requestBackup])}}]),t}());function Oc(t){return(Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xc(n.key),n)}}function xc(t){var e=function(t,e){if("object"!=Oc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Oc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Oc(e)?e:String(e)}function Mc(t,e){return(Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Lc(t);if(e){var o=Lc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tc(this,r)}}function Tc(t,e){if(e&&("object"===Oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Lc(t){return(Lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mc(t,e)}(i,t);var e,r,n,o=Rc(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t.getDoc(),e)).key=e,r}return e=i,r&&Dc(e.prototype,r),n&&Dc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(lc);function kc(t){return(kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fc(n.key),n)}}function Fc(t){var e=function(t,e){if("object"!=kc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=kc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==kc(e)?e:String(e)}function Gc(t,e){return(Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Uc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Yc(t);if(e){var o=Yc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zc(this,r)}}function zc(t,e){if(e&&("object"===kc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Yc(t){return(Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gc(t,e)}(i,t);var e,r,n,o=Uc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).model=t,e}return e=i,(r=[{key:"toModel",value:function(){return this.model}}])&&Nc(e.prototype,r),n&&Nc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Zu.a);function Vc(t){return(Vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kc(n.key),n)}}function Wc(t,e,r){return e&&qc(t.prototype,e),r&&qc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kc(t){var e=function(t,e){if("object"!=Vc(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vc(e)?e:String(e)}var Jc,Xc,Zc=Wc((function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.design=e,this.key=r,this.disposeListener=Qr.noop,this.BackupItemImpl=Hc,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(t){n.design=t},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(t){Dr.addSetHook(t)},this.beforeDispose=function(){}})),$c=r(257),tA=r(509),eA=r(463),rA=r(190);!function(t){t[t.theme=1735419]="theme",t[t.sceneBG=15461612]="sceneBG",t[t.outline=0]="outline"}(Jc||(Jc={})),function(t){t.SELECTED="SELECTED"}(Xc||(Xc={}));var nA,oA=Symbol("paramModelAssembly"),iA=Symbol("paramModel");function aA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sA(n.key),n)}}function sA(t){var e=function(t,e){if("object"!=fA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fA(e)?e:String(e)}function uA(t,e){return(uA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function cA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=lA(t);if(e){var o=lA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return AA(this,r)}}function AA(t,e){if(e&&("object"===fA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function lA(t){return(lA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fA(t){return(fA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){t.Unset="unset",t.Translucent="translucent",t.Transparent="transparent"}(nA||(nA={}));var hA,pA=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":fA(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},dA=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":fA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},gA=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uA(t,e)}(i,t);var e,r,n,o=cA(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).model=t,e._parent=void 0,e._children=[],e.entityType=oA,e.entityId=t.getId(),e}return e=i,r&&aA(e.prototype,r),n&&aA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a),yA=gA=pA([Object(rA.b)([new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),dA("design:paramtypes",["function"==typeof(hA=void 0!==_e.CoreParamModelAssembly&&_e.CoreParamModelAssembly)?hA:Object])],gA);function vA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,IA(n.key),n)}}function mA(t,e,r){return e&&vA(t.prototype,e),r&&vA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function IA(t){var e=function(t,e){if("object"!=SA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=SA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==SA(e)?e:String(e)}function EA(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CA(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bA(t,e)}function bA(t,e){return(bA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function BA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=PA(t);if(e){var o=PA(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wA(this,r)}}function wA(t,e){if(e&&("object"===SA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function PA(t){return(PA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function SA(t){return(SA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _A=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":SA(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},QA=function(t){CA(r,t);var e=BA(r);function r(t,n){var o;return EA(this,r),(o=e.call(this)).model=t,o.context=n,o._parent=void 0,o._children=[],o.entityType=n.type,o.entityId=t.getId(),o}return mA(r)}(eA.a),OA=function(t){CA(r,t);var e=BA(r);function r(){return EA(this,r),e.apply(this,arguments)}return mA(r)}(QA);OA=_A([Object(rA.b)([new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],OA);var DA=r(1398);function xA(t,e,r){var n=Object(Qr.differenceBy)(t,e,r),o=[];return 0===n.length&&e.length===t.length||(o=Object(Qr.differenceBy)(e,t,r)),{add:o,update:t.filter((function(t){return!n.includes(t)})),delete:n}}var MA=r(238);function RA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,LA(n.key),n)}}function TA(t,e,r){return e&&RA(t.prototype,e),r&&RA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function LA(t){var e=function(t,e){if("object"!=jA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jA(e)?e:String(e)}function jA(t){return(jA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var kA,NA=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},FA=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},GA=TA((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.selectable=!0}));function UA(t){return(UA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function YA(t,e,r){var n;return n=function(t,e){if("object"!=UA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==UA(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}NA([_r.observable,FA("design:type",Number)],GA.prototype,"opacity",void 0),NA([_r.observable,FA("design:type",Object)],GA.prototype,"color",void 0),NA([_r.observable,FA("design:type",Boolean)],GA.prototype,"visible",void 0),NA([_r.observable,FA("design:type",Object)],GA.prototype,"overrideMaterial",void 0),NA([_r.observable,FA("design:type","function"==typeof(kA=void 0!==nr.OutlineMode&&nr.OutlineMode)?kA:Object)],GA.prototype,"outlineMode",void 0);var HA={hardware:2,customModel:0};function VA(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zA(Object(r),!0).forEach((function(e){YA(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zA(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},HA)}function qA(t){return function(e,r){var n=function(t,e){try{var r=t.materialReplacedInfos,n=t.materialUVEditInfos,o=t.texture,i=t.opacity;if(!(r&&r.length||n&&n.length||o))return e.getMesh()+(1!==i?String(i):"")+e.getMtl().reduce((function(t,e){var r=[];return r.push(t,e.getObjName(),e.getDiffuseTexture(),e.getReflectGlossiness(),e.getFresnel(),e.getU(),e.getV(),e.getW(),e.getH()),e.getDiffuseTextureScale()&&r.push(e.getDiffuseTextureScale().toString()),e.getDiffuseColor()&&r.push(e.getDiffuseColor().toString()),e.getReflectColor()&&r.push(e.getReflectColor().toString()),e.getRefractColor()&&r.push(e.getRefractColor().toString()),r.join("#")}),"")}catch(t){a=t,setTimeout((function(){throw a}))}var a;return null}(e,r);return t+n}}function WA(t){return(WA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function KA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,JA(n.key),n)}}function JA(t){var e=function(t,e){if("object"!=WA(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WA(e)?e:String(e)}function XA(t,e){return(XA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ZA(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=tl(t);if(e){var o=tl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $A(this,r)}}function $A(t,e){if(e&&("object"===WA(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tl(t){return(tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var el=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&XA(t,e)}(i,t);var e,r,n,o=ZA(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).props=t,e.outlineMode=nr.OutlineMode.Disabled,e.castPlanarShadow=!1,e.castShadow=!1,e.setOnlyMaterial(new nr.LineBasicMaterial({color:Jc.outline})),e.update({}),e}return e=i,(r=[{key:"updateProps",value:function(t){var e=this.props;this.props=t,this.update(e)}},{key:"update",value:function(t){var e,r,n=this.props.points;if(t.points!==n){var o=(e=n,(r=new nr.BufferGeometry).addAttribute("position",new nr.BufferAttribute(new Float32Array(e),3)),r);this.geometry=o,nr.geomOperator.computeLineDistances(o)}var i=this.props,a=i.color,s=void 0===a?Jc.outline:a,u=i.visible,c=void 0===u||u;this.expectOnlyMaterial().setValues({color:s}),this.visible=c}}])&&KA(e.prototype,r),n&&KA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(nr.LineSegments),rl=r(354),nl=r(76);function ol(t){return(ol="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function il(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function al(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?il(Object(r),!0).forEach((function(e){sl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):il(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function sl(t,e,r){var n;return n=function(t,e){if("object"!=ol(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ol(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ol(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ul=al(al({side:nr.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15}),{},{transparent:!1});function cl(t){return(cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Al(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Al=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==cl(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(cl(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ll(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ll(Object(r),!0).forEach((function(e){hl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ll(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hl(t,e,r){var n;return n=function(t,e){if("object"!=cl(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==cl(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pl(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function dl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){pl(i,n,o,a,s,"next",t)}function s(t){pl(i,n,o,a,s,"throw",t)}a(void 0)}))}}var gl=function(t){return Object(rl.b)(t)},yl=function(t){return Object(rl.c)(t,{wrapS:nr.WebGLTextureWrap.Repeat,wrapT:nr.WebGLTextureWrap.Repeat,cacheReject:!0})};function vl(t){return ml.apply(this,arguments)}function ml(){return(ml=dl(Al().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p,d,g,y,v,m,I,E;return Al().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.material,n=e.materialInfo,o=e.opacity,i=void 0===o?1:o,a=e.color,s=e.textureUrl,u=e.textureSize,c=fl(fl({},ul),{},{color:a}),l=[s,null==n?void 0:n.getDiffuseTexture()],f=0,h=l;case 4:if(!(f<h.length)){t.next=26;break}if(!(p=h[f])){t.next=23;break}if(t.prev=7,u){t.next=13;break}return t.next=11,gl(p);case 11:d=t.sent,u={x:d.naturalWidth,y:d.naturalHeight};case 13:return t.next=15,yl(p);case 15:return A=t.sent,r.diffuseTextureUrl=p,t.abrupt("break",26);case 20:t.prev=20,t.t0=t.catch(7),console.error("updateMaterial",t.t0);case 23:f++,t.next=4;break;case 26:A?((g=new nr.Matrix3).setUVTransform(0,0,1/u.x,1/u.y,0,0,0),c.uvTransform=g,c.texture=A):((y=null==n?void 0:n.getDiffuseColor())&&(c.color=new nr.Color(y.x,y.y,y.z).getHex()),c.texture=null),v=null==n?void 0:n.getRefractColor(),m=1,v&&(I=Object(nl.a)(Math.max(v.x,v.y,v.z),0,1),c.transparent=I>.01,m=Math.max(1-I,.1)),i<1?(c.transparent=!0,c.opacity=i*m):c.opacity=m,void 0!==(E=null==n?void 0:n.getTransparenType())&&(c.transparent=c.transparent||1===E),c.depthWrite=!(Object(Qr.isNil)(c.transparent)?r.transparent:c.transparent),r.setValues(c);case 35:case"end":return t.stop()}}),t,null,[[7,20]])})))).apply(this,arguments)}function Il(t){return(Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function El(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */El=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Il(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Il(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Cl(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function bl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Cl(i,n,o,a,s,"next",t)}function s(t){Cl(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Bl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wl(n.key),n)}}function wl(t){var e=function(t,e){if("object"!=Il(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Il(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Il(e)?e:String(e)}function Pl(t,e){return(Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ql(t);if(e){var o=Ql(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _l(this,r)}}function _l(t,e){if(e&&("object"===Il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ql(t){return(Ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ol=new nr.BufferGeometry;var Dl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pl(t,e)}(s,t);var e,r,n,o,i,a=Sl(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).props=t,e.categoryId=Us.EDCCountCategory.PHONG,e.material=new nr.MeshPhongMaterial({transparent:!0}),e.setMaterials([e.material]),e.update({}),e}return e=s,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(t){var e=this.props;this.props=t,this.update(e)}},{key:"update",value:(i=bl(El().mark((function t(e){var r,n;return El().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==e.geometry&&this.updateGeometry(),this.props.textureSize===e.textureSize&&this.props.tiledImgUrl===e.tiledImgUrl&&this.props.opacity===e.opacity&&this.props.color===e.color&&this.props.popBufferMtl===e.popBufferMtl){t.next=5;break}return t.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"updateGeometry",value:function(){var t,e,r,n,o,i,a=this.props.geometry;this.geometry&&this.geometry.destroy(),this.geometry=a?(t=a,e=new nr.BufferGeometry,r=new Uint32Array(t.indices),n=new Float32Array(t.vertices),o=new Float32Array(t.normals),i=new Float32Array(t.textures),e.index=new nr.BufferAttribute(r,1),e.addAttribute("position",new nr.BufferAttribute(n,3)),e.addAttribute("uv",new nr.BufferAttribute(i,2)),o&&o.length?e.addAttribute("normal",new nr.BufferAttribute(o,3)):nr.geomOperator.computeNormalsByPosition(e),e):Ol}},{key:"updateMaterial",value:(o=bl(El().mark((function t(){var e,r,n,o,i,a;return El().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.props,r=e.popBufferMtl,n=e.opacity,o=e.tiledImgUrl,i=e.textureSize,a=e.color,t.next=3,vl({material:this.material,materialInfo:r,opacity:n,color:a,textureUrl:o,textureSize:i});case 3:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}])&&Bl(e.prototype,r),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(nr.Mesh);function xl(t){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ml(t){return function(t){if(Array.isArray(t))return Ll(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Tl(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rl(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Tl(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Tl(t,e){if(t){if("string"==typeof t)return Ll(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ll(t,e):void 0}}function Ll(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kl(t,e,r){return(e=Fl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fl(n.key),n)}}function Fl(t){var e=function(t,e){if("object"!=xl(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xl(e)?e:String(e)}var Gl={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var Ul=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.props=e,this.context=r,this.modelDepProps=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jl(Object(r),!0).forEach((function(e){kl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},Gl),this.displayInfoDrawableMesh=[],this.displayInfoDrawables=[],this.displayInfoDrawablesProps=[],this.meshes=[],this.childNodeDrawbleMap=new Map,this.childNodeMeshesMap=new Map,this.displayInfoMeshs=[],this.state=new GA,this.id=e.model.getId(),this.type=r.type;var n,o=Rl(r.stateReducers);try{for(o.s();!(n=o.n()).done;){(0,n.value)(e.model,!1,this.state)}}catch(t){o.e(t)}finally{o.f()}}var e,r,n;return e=t,(r=[{key:"interactionPriority",get:function(){var t=VA();return this.props.model.isAppendHardware?t.hardware:t.customModel}},{key:"overrideMaterial",get:function(){return this.state.overrideMaterial}},{key:"materialParams",get:function(){var t=this.context.store.transparentMode,e=kl(kl(kl({},nA.Unset,1),nA.Translucent,.4),nA.Transparent,0);return{opacity:Object(Qr.isNil)(this.state.opacity)?e[t]:this.state.opacity,color:this.state.color}}},{key:"pickActualInteractiveEntity",value:function(t){var e=this,r=t.intersection.object,n=function(){for(;r;){var t=e.context.objectManager.getInfo(r);if(t)return{entityId:t.id,entityType:t.type};r=r.parent}return{entityId:e.id,entityType:e.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:t.intersection.point})}},{key:"create",value:function(t){var e,r=this.props.model,n=new nr.Group;return n.uuid=this.id,n.visible=null===(e=this.state.visible)||void 0===e||e,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,t),this.renderChildNodeMeshes(n,r,t),this.renderDisplayInfoMesh(n,r,t),this.renderDisplayInfoMeshes(n,r,t),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(t,e){var r,n=this,o=this.props.model;t.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(t,o,e),this.renderChildNodeMeshes(t,o,e),this.renderDisplayInfoMesh(t,o,e),this.renderDisplayInfoMeshes(t,o,e),this.renderLineSegments(t,o),this.applyTransform(t,o),t.traverse((function(t){t instanceof nr.Mesh&&(t.outlineMode=n.state.outlineMode)}))}},{key:"dispose",value:function(t){this.disposeMeshes(t),this.disposeDisplayInfoMesh(t),this.disposeDisplayInfoMeshs(t),this.disposeChildNodeMeshes(t),this.disposeLineSegments(t),this.context.objectManager.removeObject(t)}},{key:"applyTransform",value:function(t,e){var r=e.getPosition(),n=e.getScale(),o=e.getRotation();t.position.set(r.x,r.y,r.z),t.rotation.set(o.x,o.y,o.z),t.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(t){for(var e=0;e<this.meshes.length;e++)Object(MA.a)(this.meshes[e]);t.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(t){var e=this;this.childNodeDrawbleMap.forEach((function(t,r){var n=e.childNodeMeshesMap.get(r);t.dispose(n)}));var r=Ml(this.childNodeMeshesMap.values());r.forEach((function(t){return Object(MA.a)(t)})),t.removeObjects(r)}},{key:"disposeChildNodeMesh",value:function(t,e){var r=this.childNodeDrawbleMap.get(e),n=this.childNodeMeshesMap.get(e);n&&(r&&r.dispose(n),Object(MA.a)(n),t.remove(n))}},{key:"createChildNodeMesh",value:function(t,e,r){var n=this.props.renderChild(e),o=n.create(r);this.childNodeDrawbleMap.set(e,n),this.childNodeMeshesMap.set(e,o),t.add(o)}},{key:"updateChildNodeMesh",value:function(t,e,r){var n=this.childNodeDrawbleMap.get(e),o=this.childNodeMeshesMap.get(e);n&&o&&n.update(o,r)}},{key:"disposeDisplayInfoMesh",value:function(t){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(MA.a)(this.displayInfoMesh),this.displayInfoDrawableProps=void 0,t.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(t){for(var e=0;e<this.displayInfoDrawables.length;e++)this.displayInfoDrawables[e].dispose(this.displayInfoMeshs[e]),Object(MA.a)(this.displayInfoMeshs[e]);this.displayInfoDrawablesProps=[],t.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(t){this.lineSegments&&(Object(MA.a)(this.lineSegments),t.remove(this.lineSegments))}},{key:"renderMeshes",value:function(t,e,r){var n,o,i=this.modelDepProps,a=this.materialParams,s=a.opacity,u=a.color,c=e.getMeshModels(),A=e.getLegal(),l=e.getLegalMesh();if(i.meshModels.length!==c.length||i.legal!==A||i.legalMesh!==l){i.meshModels=c,i.legal=A,i.legalMesh=l,this.disposeMeshes(t);var f=[];if(A&&l)for(var h,p=c.length;p--;)h=c[p],h=new Dl({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(n=h.texture)||void 0===n?void 0:n.size,opacity:s,color:u,popBufferMtl:h.displayMaterial}),f[p]=h,t.add(h);this.meshes=f}else for(var d,g=this.meshes,y=c.length;y--;)d=c[y],g[y].updateProps({geometry:d.geometry,tiledImgUrl:d.texture&&(d.texture.hdTiledImageUrl||d.texture.tiledImgUrl),textureSize:null===(o=d.texture)||void 0===o?void 0:o.size,opacity:s,color:u,popBufferMtl:d.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(t,e,r){var n,o=this,i=(n=e,n.getChildren().filter((function(t){return t.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel),a=xA(this.modelDepProps.renderChildNodes,i,(function(t){return t}));a.delete.forEach((function(e){return o.disposeChildNodeMesh(t,e)})),a.add.forEach((function(e){return o.createChildNodeMesh(t,e,r)})),a.update.forEach((function(e){return o.updateChildNodeMesh(t,e,r)})),this.modelDepProps.renderChildNodes=i}},{key:"renderDisplayInfoMesh",value:function(t,e,r){var n,o=this,i=e.getFurnitureModel(),a=null!==(n=this.materialParams.opacity)&&void 0!==n?n:1;if(this.modelDepProps.furnitureModel!==i)this.modelDepProps.furnitureModel=i,this.disposeDisplayInfoMesh(t),i&&(this.displayInfoDrawableProps={displayInfo:i.displayInfo,position:i.furnitureTranslation||Se.default.ZERO,size:i.size,scale:Se.default.ONE,rotation:Se.default.ZERO,generateComponentInstanceKey:qA(e.getId()),getMaterialSideProperty:function(){return nr.Side.DoubleSide},opacity:a,onMaterialLoadSuccess:function(t,e){var r=o.displayInfoDrawableMesh=e,n=o.overrideMaterial;if(n){t.removeObjects(r);var i=r.map((function(t){return new nr.Mesh(t.geometry.clone(),new nr.LineBasicMaterial({color:n.color,opacity:n.opacity}))}));t.add(i)}}},this.displayInfoDrawable=new DA.a(this.displayInfoDrawableProps),this.displayInfoMesh=this.displayInfoDrawable.create(r),t.add(this.displayInfoMesh));else if(this.displayInfoDrawable&&this.displayInfoDrawableProps){this.displayInfoDrawableProps.opacity=a;var s=this.overrideMaterial,u=this.displayInfoMesh;if(s){u.removeAllChildren();var c=this.displayInfoDrawableMesh.map((function(t){return new nr.Mesh(t.geometry.clone(),new nr.LineBasicMaterial({color:s.color,opacity:s.opacity}))}));u.add(c)}else u&&u.children!==this.displayInfoDrawableMesh&&this.displayInfoDrawableMesh.length&&(u.removeAllChildren(),u.add(this.displayInfoDrawableMesh));this.displayInfoDrawable.update(u)}}},{key:"renderDisplayInfoMeshes",value:function(t,e,r){var n,o=e.getFurnitureModels(),i=null!==(n=this.materialParams.opacity)&&void 0!==n?n:1;if(this.modelDepProps.furnitureModels!==o){if(this.modelDepProps.furnitureModels=o,this.disposeDisplayInfoMeshs(t),this.displayInfoDrawablesProps=o.map((function(t){return{displayInfo:t.displayInfo,position:t.position,size:t.size,scale:t.scale,rotation:t.rotate,generateComponentInstanceKey:qA(e.getId()),opacity:i}})),this.displayInfoDrawables=this.displayInfoDrawablesProps.map((function(t){return new DA.a(t)})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(t){return t.create(r)})),this.displayInfoMeshs.length>0){var a,s=Rl(this.displayInfoMeshs);try{for(s.s();!(a=s.n()).done;){var u=a.value;t.add(u)}}catch(t){s.e(t)}finally{s.f()}}}else for(var c=0;c<this.displayInfoDrawables.length;c++){this.displayInfoDrawablesProps[c].opacity=i;var A=this.displayInfoDrawables[c],l=this.displayInfoMeshs[c];A.update(l)}}},{key:"renderLineSegments",value:function(t,e){var r;if(e.getMeshModels()&&e.getMeshModels().length){var n=e.getWireFrames(),o=this.context.store,i=o.showOutline,a=o.showPlankOutline||i;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(t),this.lineSegments=new el({points:n||[],visible:a}),t.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:a})}}}])&&Nl(e.prototype,r),n&&Nl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Yl(n.key),n)}}function Yl(t){var e=function(t,e){if("object"!=Jl(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Jl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Jl(e)?e:String(e)}function Hl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vl(t,e){return(Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ql(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Kl(t);if(e){var o=Kl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wl(this,r)}}function Wl(t,e){if(e&&("object"===Jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Kl(t){return(Kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jl(t){return(Jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Xl=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Jl(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Zl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vl(t,e)}(i,t);var e,r,n,o=ql(i);function i(){var t;return Hl(this,i),(t=o.apply(this,arguments))._parent=void 0,t}return e=i,r&&zl(e.prototype,r),n&&zl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(QA);function $l(t){return($l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ef(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nf(n.key),n)}}function rf(t,e,r){return e&&ef(t.prototype,e),r&&ef(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function nf(t){var e=function(t,e){if("object"!=$l(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=$l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$l(e)?e:String(e)}function of(t,e,r){var n=r.getEntity(t)||function(t,e){if(e.filterParamModel(t))return t.isRoot()?new Zl(t,e):new OA(t,e)}(t,e);if(n){r.registerEntity(t,n);var o=t.getParent();return o&&(n._parent=r.getEntity(o)),n._children=t.getChildNodes().map((function(t){return of(t,e,r)})).filter((function(t){return!!t})),n}}Zl=Xl([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return new Ul({model:this.model,renderChild:function e(r){return new Ul({model:r,renderChild:e},t.context)}},this.context)})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],Zl);var af=function(){function t(e){var r=this;tf(this,t),this.context=e,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(t,e){r.entityCaches.has(t)||r.entityCaches.set(t,e),r.entities.push(e)},this.getEntity=function(t){return r.entityCaches.get(t)}}return rf(t,[{key:"createEntities",value:function(t){var e={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=t.length;r<n;r++)of(t[r],this.context,e);return this.entities}},{key:"createAssemblyEntities",value:function(t){return t.map((function(t){return new yA(t)}))}}]),t}(),sf=function(){function t(e,r){tf(this,t),this.getCustom=e,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new af(r)}return rf(t,[{key:"getParamModelEntities",value:function(){var t=this.getCustom();return void 0!==t?this.factory.createEntities(t.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var t=this.getCustom();return void 0!==t?this.factory.createAssemblyEntities(t.getParamModelAssemblies()):[]}}]),t}();function uf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Af(n.key),n)}}function cf(t,e,r){return e&&uf(t.prototype,e),r&&uf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Af(t){var e=function(t,e){if("object"!=lf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lf(e)?e:String(e)}function lf(t){return(lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ff,hf=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lf(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},pf=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":lf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},df=cf((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.showOutline=!1,this.showPlankOutline=!1,this.transparentMode=nA.Unset,this.selected=[]}));function gf(t){return(gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yf(t){return function(t){if(Array.isArray(t))return vf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return vf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vf(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function mf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,If(n.key),n)}}function If(t){var e=function(t,e){if("object"!=gf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gf(e)?e:String(e)}hf([_r.observable,pf("design:type",Object)],df.prototype,"showOutline",void 0),hf([_r.observable,pf("design:type",Object)],df.prototype,"showPlankOutline",void 0),hf([_r.observable,pf("design:type","function"==typeof(ff=void 0!==nA&&nA)?ff:Object)],df.prototype,"transparentMode",void 0),hf([_r.observable,pf("design:type",Array)],df.prototype,"selected",void 0);var Ef=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.infoMap=new Map,this.idMap=new Map}var e,r,n;return e=t,(r=[{key:"addObject",value:function(t,e){this.infoMap.set(t,e),this.idMap.set(e.id,e)}},{key:"removeObject",value:function(t){var e=this.infoMap.get(t);e&&(this.infoMap.delete(t),e===this.idMap.get(e.id)&&this.idMap.delete(e.id))}},{key:"getInfo",value:function(t){return t instanceof nr.Object3D?this.infoMap.get(t):this.idMap.get(t)}},{key:"getInfos",value:function(){return yf(this.idMap.entries())}}])&&mf(e.prototype,r),n&&mf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Cf=r(168);function bf(t){return(bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wf(n.key),n)}}function wf(t){var e=function(t,e){if("object"!=bf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bf(e)?e:String(e)}var Pf=function(){function t(e,r,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.selectionStateManager=e,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){o.onStateChange()},this.init()}var e,r,n;return e=t,(r=[{key:"isSelected",value:function(t){return!!this.selected.find((function(e){return e.entityId===t}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Cf.a,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(Cf.a,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var t=this.selectionStateManager.state.value,e=this.rawSelected,r=this.selected;if(this.rawSelected!==t){this.rawSelected=t;var n=this.resolveSelected(t)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}e!==t&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(t){var e=this;return t.filter((function(t){return e.entityTypes.includes(t.entityType)}))}},{key:"resolveSelectedChanged",value:function(t,e){if(t.length!==e.length)return!0;if(0===t.length&&0===e.length)return!1;for(var r=function(t,e){return t>e?1:t===e?0:-1},n=t.map((function(t){return t.entityId+"%%"+t.entityType.toString()})).sort(r),o=e.map((function(t){return t.entityId+"%%"+t.entityType.toString()})).sort(r),i=0,a=o.length;i<a;++i)if(n[i]!==o[i])return!0;return!1}}])&&Bf(e.prototype,r),n&&Bf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Sf(t){return(Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Of(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qf(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Of(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Of(t,e){if(t){if("string"==typeof t)return Df(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Df(t,e):void 0}}function Df(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Rf(n.key),n)}}function Rf(t){var e=function(t,e){if("object"!=Sf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Sf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Sf(e)?e:String(e)}function Tf(t,e){return(Tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Lf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kf(t);if(e){var o=kf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jf(this,r)}}function jf(t,e){if(e&&("object"===Sf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kf(t){return(kf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Pf.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var Nf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tf(t,e)}(i,t);var e,r,n,o=Lf(i);function i(){var t;return xf(this,i),(t=o.apply(this,arguments)).store=new df,t.objectManager=new Ef,t.stateReducers=[],t.onScene3DInit=function(e){var r=t.appService.stateManager.registerView(t._scene3dId);Xu.pb.registerDefaultSystems3D(r,t._scene3dId,e),r.activeView(t._scene3dId)},t.toggleShowModelOutline=function(e){t.store.showOutline=e},t.togglePlankOutline=function(e){t.store.showPlankOutline=e},t.updateTransparentMode=function(e){t.store.transparentMode=e},t.updateModelState=function(e,r){var n=t.objectManager.getInfo(e),o=t.selectManager.isSelected(e);r(n.drawableState,o)},t.updateModelsState=function(e){var r,n=Qf(t.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var o=_f(r.value,2),i=o[0],a=o[1],s=t.selectManager.isSelected(i);e(i,a.drawableState,s)}}catch(t){n.e(t)}finally{n.f()}},t}return e=i,(r=[{key:"config",value:function(t,e){var r=this;this._scene3dId=e.scene3dID||"scene3d",this.appService=t;var n=t.stateManager,o=e.paramModelSymbol,i=e.getDoc,a=e.getCustom,s=e.pickActualInteractiveEntity,u=void 0===s?function(t){return t}:s,c=e.filterParamModel;this.selectManager=new Pf(n.selection,[o],(function(t,e){r.store.selected=t,r.emit(Xc.SELECTED,{selected:t,oldSelected:e})})),t.registerEntityDocument(new sf(a,{store:this.store,type:o,objectManager:this.objectManager,pickActualInteractiveEntity:u,stateReducers:this.stateReducers,filterParamModel:c}));var A=i().getElementContext();return A.getterEmitter.on((function(t){_r.advanced.reportObserved(t.instance)})),A.setterEmitter.on((function(t){_r.advanced.reportChanged(t.instance)})),this}},{key:"registerReducer",value:function(t){this.stateReducers.push(t)}},{key:"triggerReducer",value:function(t){var e,r=Qf(this.objectManager.getInfos());try{for(r.s();!(e=r.n()).done;){var n=_f(e.value,2),o=n[0],i=n[1];if(!t||t.includes(o)){var a,s=this.selectManager.isSelected(o),u=Qf(this.stateReducers);try{for(u.s();!(a=u.n()).done;)(0,a.value)(i.model,s,i.drawableState)}catch(t){u.e(t)}finally{u.f()}}}}catch(t){r.e(t)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}},{key:"setInteractionPriorityConfig",value:function(t,e){!function(t,e){HA.hardware=t,HA.customModel=e}(t,e)}}])&&Mf(e.prototype,r),n&&Mf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Pr.EventEmitter),Ff=r(350),Gf=r(767);function Uf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Hf(n.key),n)}}function Yf(t,e,r){return e&&zf(t.prototype,e),r&&zf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hf(t){var e=function(t,e){if("object"!=Vf(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Vf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vf(e)?e:String(e)}function Vf(t){return(Vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var qf,Wf,Kf,Jf,Xf=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vf(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Zf=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Vf(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};function $f(t){var e=this;if(e===Kf.GUARD)return function(t,e,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var t,r=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(Jf){if(o!==Jf)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(Jf=o,Fe.a.begGetDeps(o));try{t=n.apply(this,arguments)}catch(t){r=t}if(o&&(Jf=void 0,Fe.a.endGetDeps(o)),r)throw r.message="CUSTOM: ["+e+"] "+r.message,r;return t},r};var r=0===arguments.length;return function(n,o){if(r){var i="get"+o[0].toLocaleUpperCase()+o.slice(1);t=function(t){return t[i]()}}if(!n.hasOwnProperty("__lazyKeys")){var a=[],s=[],u=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:s}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:u});var c=n.__accessLazyValues,A=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){A&&A.call(this);for(var t=void 0,e=0,r=s.length;e<r;++e)t=u[e],this[s[e]]=Object(Qr.isFunction)(t)?t(this.__DONT_USE_ME):t}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var t=0,e=a.length;t<e;++t)this[a[t]]}})}e===Kf.LAZY?(n.__lazyKeys.push(o),Object.defineProperty(n,o,{configurable:!0,enumerable:!0,get:function(){var e=this.__LAZY_VALUES;if(e.__keys[o])return e[o];var r=t;if(Object(Qr.isFunction)(t)){var n=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(Jf){if(i!==Jf)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(Jf=i,Fe.a.begGetDeps(i));try{r=t(this.__DONT_USE_ME,this)}catch(t){n=t}if(i&&(Jf=void 0,Fe.a.endGetDeps(i)),n)throw n.message="CUSTOM: ["+o+"] "+n.message,n}return e[o]=r,e.__keys[o]=!0,r}})):(n.__immeKeys.push(o),n.__immeVals.push(t))}}!function(t){t.LAZY="__@access@lazy@__",t.IMMEDIATE="__@access@imme@__",t.GUARD="__@access@guard@__"}(Kf||(Kf={}));var th={lazy:$f.bind(Kf.LAZY),imme:$f.bind(Kf.IMMEDIATE),guard:$f.bind(Kf.GUARD),castTo:void 0};th.castTo=function(){return th};var eh=function(){function t(e){Uf(this,t),this.__DONT_USE_ME=e,Jf&&(this.__TRANSFORM_CONTEXT_ADD_DEP=Jf),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return Yf(t,[{key:"asStub",value:function(){var t=ke.CDoc.transformModelContext;if(t&&t.deps&&t.rms){var e=t.deps,r=t.rms,n=this.__DONT_USE_ME;e.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(t){t!==n&&(e.add(t),r.listeningTypes.add(t.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var t=function(t,e){for(var r,n=Object.getOwnPropertyNames(t),o=0,i=n.length;o<i;++o)(r=n[o]).startsWith("$")||r.startsWith("_")||(e[r]=t[r]);return e},e={};return t(this,e),t(this.__LAZY_VALUES,e),e}},{key:"guard",value:function(t){return t(this)}}]),t}();Xf([th.imme(),Zf("design:type",String)],eh.prototype,"id",void 0),Xf([th.imme((function(t){return t.constructor})),Zf("design:type","function"==typeof(qf=void 0!==Gf.ConstructorOf&&Gf.ConstructorOf)?qf:Object)],eh.prototype,"kType",void 0),Xf([th.lazy((function(t){return t})),Zf("design:type",Boolean)],eh.prototype,"$model",void 0),Xf([th.guard(),Zf("design:type",Function),Zf("design:paramtypes",[Function]),Zf("design:returntype","function"==typeof(Wf="undefined"!=typeof T&&T)?Wf:Object)],eh.prototype,"guard",null);var rh=function(){function t(){Uf(this,t)}return Yf(t,null,[{key:"registeCreator",value:function(t,e){this.creators.set(t,e)}},{key:"get",value:function(t,e){if(e||!t.__modelDataFacade){var r=this.creators.get(t.constructor);if(!r)return;t.__modelDataFacade=r(t)}return t.__modelDataFacade}},{key:"put",value:function(t){t.__modelDataFacade&&(t.__modelDataFacade=void 0)}}]),t}();rh.creators=new Map;var nh=r(388);function oh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ih(n.key),n)}}function ih(t){var e=function(t,e){if("object"!=lh(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lh(e)?e:String(e)}function ah(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sh(t,e){return(sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function uh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ah(t);if(e){var o=Ah(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ch(this,r)}}function ch(t,e){if(e&&("object"===lh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ah(t){return(Ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function lh(t){return(lh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fh,hh,ph,dh,gh,yh=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":lh(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},vh=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":lh(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mh=Symbol("baseParamModel"),Ih=th.castTo(),Eh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sh(t,e)}(i,t);var e,r,n,o=uh(i);function i(){return ah(this,i),o.apply(this,arguments)}return e=i,r&&oh(e.prototype,r),n&&oh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eh);function Ch(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bh(n.key),n)}}function bh(t){var e=function(t,e){if("object"!=_h(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_h(e)?e:String(e)}function Bh(t,e){return(Bh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Sh(t);if(e){var o=Sh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ph(this,r)}}function Ph(t,e){if(e&&("object"===_h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Sh(t){return(Sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _h(t){return(_h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}yh([Ih.lazy(),vh("design:type",String)],Eh.prototype,"modelInstanceId",void 0),yh([Ih.imme(mh),vh("design:type",Symbol)],Eh.prototype,"type",void 0),yh([Ih.lazy((function(t){return t.getType()})),vh("design:type","function"==typeof(fh=void 0!==es.ParamModelType&&es.ParamModelType)?fh:Object)],Eh.prototype,"modelType",void 0),yh([Ih.lazy(),vh("design:type",String)],Eh.prototype,"name",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(hh=void 0!==Se.default&&Se.default)?hh:Object)],Eh.prototype,"size",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(ph=void 0!==be.default&&be.default)?ph:Object)],Eh.prototype,"box3",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(dh=void 0!==nh.ParamStore&&nh.ParamStore)?dh:Object)],Eh.prototype,"paramStore",void 0),yh([Ih.lazy(),vh("design:type","function"==typeof(gh=void 0!==es.ParamModelCategory&&es.ParamModelCategory)?gh:Object)],Eh.prototype,"category",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"legal",void 0),yh([Ih.lazy((function(t){return t.getHasAttached()})),vh("design:type",Boolean)],Eh.prototype,"attached",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"deletable",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"replaceable",void 0),yh([Ih.lazy(),vh("design:type",Number)],Eh.prototype,"attachedVersion",void 0),yh([Ih.lazy(),vh("design:type",Boolean)],Eh.prototype,"paramOverride",void 0);var Qh,Oh,Dh=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_h(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},xh=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":_h(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Mh=th.castTo(),Rh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bh(t,e)}(i,t);var e,r,n,o=wh(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,t)).parent=e,r}return e=i,(r=[{key:"visit",value:function(t,e){this.$model.visit(t,e)}},{key:"upVisit",value:function(t,e){this.$model.upVisit(t,e)}}])&&Ch(e.prototype,r),n&&Ch(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Eh);function Th(t){return(Th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lh(Object(r),!0).forEach((function(e){kh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kh(t,e,r){return(e=Kh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nh(t){return function(t){if(Array.isArray(t))return Fh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Fh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fh(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Gh(){return(Gh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Uh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Uh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Vh(t)););return t}function zh(t,e){return(zh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Vh(t);if(e){var o=Vh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Hh(this,r)}}function Hh(t,e){if(e&&("object"===Th(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Vh(t){return(Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kh(n.key),n)}}function Wh(t,e,r){return e&&qh(t.prototype,e),r&&qh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kh(t){var e=function(t,e){if("object"!=Th(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Th(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Th(e)?e:String(e)}function Jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Dh([Mh.lazy((function(t,e){for(var r=e;r.parent;)r=r.parent;return r})),xh("design:type",Rh)],Rh.prototype,"root",void 0),Dh([Mh.imme(iA),xh("design:type",Symbol)],Rh.prototype,"type",void 0),Dh([Mh.lazy((function(t){return t.isRoot()})),xh("design:type",Boolean)],Rh.prototype,"isRoot",void 0),Dh([Mh.lazy((function(t){return t.isAccessory()})),xh("design:type",Boolean)],Rh.prototype,"isAccessory",void 0),Dh([Mh.lazy((function(t){return t.getAssembly()?t.getAssembly().getId():void 0})),xh("design:type",String)],Rh.prototype,"assemblyId",void 0),Dh([Mh.lazy((function(t,e){return t.getChildren().map((function(t){return rh.get(t)}))})),xh("design:type",Array)],Rh.prototype,"children",void 0),Dh([Mh.lazy((function(t,e){return t.getAccessories().map((function(t){return rh.get(t)}))})),xh("design:type",Array)],Rh.prototype,"accessories",void 0),Dh([Mh.lazy((function(t,e){return e.children.concat(e.accessories)})),xh("design:type",Array)],Rh.prototype,"childNodes",void 0),Dh([Mh.lazy((function(t,e){return!!t.getAssembly()&&t.getAssembly().isTemplateAssembly()})),xh("design:type",Boolean)],Rh.prototype,"belongsToTemplateAssembly",void 0),Dh([Mh.guard(),xh("design:type",Function),xh("design:paramtypes",["function"==typeof(Qh=void 0!==er.ParamModelVisitor&&er.ParamModelVisitor)?Qh:Object,Boolean]),xh("design:returntype",void 0)],Rh.prototype,"visit",null),Dh([Mh.guard(),xh("design:type",Function),xh("design:paramtypes",["function"==typeof(Oh=void 0!==er.ParamModelVisitor&&er.ParamModelVisitor)?Oh:Object,Boolean]),xh("design:returntype",void 0)],Rh.prototype,"upVisit",null),rh.registeCreator(dr,(function(t){return t.isRoot()?new Rh(t):rh.get(t.getParent()).guard((function(e){return new Rh(t,e)}))}));Symbol("paramModelMultiSelectionEntity");var Xh=Wh((function t(){Jh(this,t),this.paramModels=[],this.paramModelAssembies=[]})),Zh=function(t,e){return e.paramsMap[t]||e.paramsChildrenMap[t]},$h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zh(t,e)}(r,t);var e=Yh(r);function r(t){var n;return Jh(this,r),(n=e.call(this,t)).findModelOrAssemblyModelById=function(t){var e=n.findModel(t);return e?e.$model:n.findParamModelAssembly(t)},n.modelsMap={paramsMap:{},paramsChildrenMap:{}},n.childrenMap={},n}return Wh(r,[{key:"updateState",value:function(t){var e=this.state?this.state.paramModels:[],n=this.state?this.state.paramModelAssembies:[];Gh(Vh(r.prototype),"updateState",this).call(this,t);var o=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(e,o),e===o&&n===i||this.emit(r.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(t,e){var r=Us.Util.diffArray(t,e),n=this.modelsMap.paramsMap,o=r.removed;o.push.apply(o,Nh(r.updatedOld));var i,a,s=r.added;s.push.apply(s,Nh(r.updatedNew));for(var u=this.childrenMap,c=this.modelsMap.paramsChildrenMap,A=0,l=o.length;A<l;++A){if(delete n[a=o[A].id],(i=u[a])&&i.length>0)for(var f=0,h=i.length;f<h;++f)delete c[i[f]];delete u[a]}for(var p=0,d=s.length;p<d;++p)n[a=s[p].id]=s[p].$model,i=[],s[p].visit((function(t){a=t.getId(),i.push(a),c[a]=t,rh.put(t)}),!0),u[a]=i}},{key:"initState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(jh(jh({},t),new Xh)),this.state}},{key:"initModelBindingState",value:function(t){}},{key:"bindDesign",value:function(t){var e=this.reactiveModelState;e||(e=new(Ff.default.createBase({defaultArrayItemSyncPoint:function(t,e){return!0},shouldIgnoreBinderCheck:function(t){return t&&t.type===iA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=e);var r=t.getDoc();e.initModelState({paramModels:Object(Ff.bindArray)(r.addDependency((function(){return t.getCustom().getParamModels()}),e)).map(r.addDependency((function(t){var e=rh.get(t,!0);return e.asStub(),e}),e)),paramModelAssembies:Object(Ff.bindArray)(r.addDependency((function(){return t.getCustom().getParamModelAssemblies()}),e)).map(r.addDependency((function(t){return t}),e))})}},{key:"findModelEx",value:function(t,e){return e(t,this.modelsMap)}},{key:"findModel",value:function(t){var e=this.findModelEx(t,Zh);return e?rh.get(e):void 0}},{key:"findParamModelAssembly",value:function(t){return this.state.paramModelAssembies.find((function(e){return e.id===t}))}}]),r}(tA.a);function tp(t){return(tp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ep(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,np(n.key),n)}}function np(t){var e=function(t,e){if("object"!=tp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tp(e)?e:String(e)}function op(){return(op="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=ip(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function ip(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=cp(t)););return t}function ap(t,e){return(ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=cp(t);if(e){var o=cp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return up(this,r)}}function up(t,e){if(e&&("object"===tp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function cp(t){return(cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}$h.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var Ap,lp=Object($c.getConnector)().setRootState,fp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ap(t,e)}(i,t);var e,r,n,o=sp(i);function i(){var t;return ep(this,i),(t=o.apply(this,arguments)).design=new tr,t.fittingDesign=new Vr,t}return e=i,(r=[{key:"initState",value:function(){op(cp(i.prototype),"initState",this).call(this);var t=Id().getDependentPlugin(zs.a);return this.kaf=t.stateManager,this.pad.bindDesign(this.design),this.state}}])&&rp(e.prototype,r),n&&rp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Xu.Jb.combine({pad:$h}));function hp(t){return(hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dp(n.key),n)}}function dp(t){var e=function(t,e){if("object"!=hp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hp(e)?e:String(e)}!function(t){t[t.NONE=0]="NONE",t[t.NORMAL=0]="NORMAL",t[t.ENCRYPTED=1]="ENCRYPTED",t[t.COMPRESSED=2]="COMPRESSED"}(Ap||(Ap={}));var gp=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,n=[{key:"toNetParams",value:function(t,e,r){var n={};return n.api=t,n.params=e?e.params:void 0,n.data=r,void 0===n.data&&(n.data=e?e.data:void 0),n.headers=e&&e.headers||{},n}},{key:"toAxiosConfig",value:function(t){t.method||(t.method=Us.ERequest.GET),t.method===Us.ERequest.GET&&t.data&&(t.params?Object.keys(t.data).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==t.params[e]&&console.warn("HTTP GET params ["+e+"] overwrited by data"),t.params[e]=t.data[e]})):t.params=t.data,delete t.data);var e={};if(e.url=t.url||t.api,e.params=t.params,e.data=t.data,e.headers=t.headers,e.method=t.method,t.extend){var r=e,n=t.extend;Object.keys(n).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[t]&&console.warn("[CUSTOM] Request config ["+t+"] overwrited by extend"),r[t]=n[t]}))}return e}}],(r=null)&&pp(e.prototype,r),n&&pp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yp(t){return(yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mp(n.key),n)}}function mp(t){var e=function(t,e){if("object"!=yp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=yp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==yp(e)?e:String(e)}var Ip=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.net=e}var e,r,n;return e=t,(r=[{key:"addClientInterceptors",value:function(t){}},{key:"encryptedGet",value:function(t,e){return this._get(Ap.ENCRYPTED,t,e)}},{key:"encryptedDelete",value:function(t,e){return this._delete(Ap.ENCRYPTED,t,e)}},{key:"encryptedPost",value:function(t,e,r){return this._post(Ap.ENCRYPTED,t,e,r)}},{key:"encryptedPut",value:function(t,e,r){return this._put(Ap.ENCRYPTED,t,e,r)}},{key:"gzipGet",value:function(t,e){return this._get(Ap.COMPRESSED,t,e)}},{key:"gzipPost",value:function(t,e,r){return this._post(Ap.COMPRESSED,t,e,r)}},{key:"request",value:function(t){var e=gp.toNetParams(t.url,t);return this.net.get(e)}},{key:"get",value:function(t,e){return this._get(Ap.NORMAL,t,e)}},{key:"delete",value:function(t,e){return this._delete(Ap.NORMAL,t,e)}},{key:"post",value:function(t,e,r){return this._post(Ap.NORMAL,t,e,r)}},{key:"put",value:function(t,e,r){return this._put(Ap.NORMAL,t,e,r)}},{key:"_get",value:function(t,e,r){var n=gp.toNetParams(e,r);return this.net.get(n,{mode:t})}},{key:"_delete",value:function(t,e,r){var n=gp.toNetParams(e,r);return this.net.delete(n,{mode:t})}},{key:"_post",value:function(t,e,r,n){var o=gp.toNetParams(e,n,r);return this.net.post(o,{mode:t})}},{key:"_put",value:function(t,e,r,n){var o=gp.toNetParams(e,n,r);return o.method="PUT",this.net.request(o,{mode:t})}}])&&vp(e.prototype,r),n&&vp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ep(t){return(Ep="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function bp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Cp(Object(r),!0).forEach((function(e){Bp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bp(t,e,r){return(e=Qp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */wp=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==Ep(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ep(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Pp(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Sp(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Pp(i,n,o,a,s,"next",t)}function s(t){Pp(i,n,o,a,s,"throw",t)}a(void 0)}))}}function _p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qp(n.key),n)}}function Qp(t){var e=function(t,e){if("object"!=Ep(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ep(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ep(e)?e:String(e)}var Op=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.request=function(){var t=Sp(wp().mark((function t(r){var n,o;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.convertRequest(r),t.next=3,e.service.request(n);case 3:return o=t.sent,t.abrupt("return",e.wrapResponse(r,o));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.get=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.get(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.delete=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.delete(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.post=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.post(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.put=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.put(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.encryptedRequest=function(){var t=Sp(wp().mark((function t(r){var n,o;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.convertRequest(r),t.next=3,e.service.encryptedRequest(n);case 3:return o=t.sent,t.abrupt("return",e.wrapResponse(r,o));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.encryptedGet=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.encryptedGet(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.encryptedDelete=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.encryptedDelete(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.encryptedPost=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.encryptedPost(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.encryptedPut=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.encryptedPut(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.gzipRequest=function(){var t=Sp(wp().mark((function t(r){var n,o;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.convertRequest(r),t.next=3,e.service.gzipRequest(n);case 3:return o=t.sent,t.abrupt("return",e.wrapResponse(r,o));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.gzipGet=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.gzipGet(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.gzipPost=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.gzipPost(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.gzipPut=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.gzipPut(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),this.pbGzipGet=function(){var t=Sp(wp().mark((function t(r){var n,o,i,a=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},o=e.convertRequest(bp(bp({},n),{},{url:r})),t.next=4,e.service.pbGzipGet(o);case 4:return i=t.sent,t.abrupt("return",e.wrapResponse(n,i));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.pbGzipPost=function(){var t=Sp(wp().mark((function t(r,n){var o,i,a,s=arguments;return wp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s.length>2&&void 0!==s[2]?s[2]:{},i=e.convertRequest(bp(bp({},o),{},{data:n,url:r})),t.next=4,e.service.pbGzipPost(i);case 4:return a=t.sent,t.abrupt("return",e.wrapResponse(o,a));case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()}var e,r,n;return e=t,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(t){return this._service=t,this}},{key:"convertRequest",value:function(t){var e,r;return{url:t.url,method:t.method,baseURL:t.baseURL,params:t.params,data:t.data,timeout:t.timeout,extra:{isRequestBodyJson:null===(r=null===(e=t)||void 0===e?void 0:e.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(t,e){return{data:e.data,status:200,statusText:"ok",headers:{},config:t,encryptedDataLength:0,dataLength:0}}}])&&_p(e.prototype,r),n&&_p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Dp=r(909),xp=r(101),Mp=r(378),Rp=r(305),Tp=r(183);function Lp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jp(n.key),n)}}function jp(t){var e=function(t,e){if("object"!=zp(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zp(e)?e:String(e)}function kp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Np(t,e){return(Np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Fp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Up(t);if(e){var o=Up(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gp(this,r)}}function Gp(t,e){if(e&&("object"===zp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Up(t){return(Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function zp(t){return(zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Yp,Hp,Vp,qp,Wp,Kp,Jp,Xp,Zp=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":zp(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},$p=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":zp(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},td=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Np(t,e)}(i,t);var e,r,n,o=Fp(i);function i(){var t;return kp(this,i),(t=o.apply(this,arguments)).client=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.encryptedClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.encryptInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.gzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.gzipEncryptBase64Interceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.pbEncryptedClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.encryptInterceptorWithArrayBuffer,xp.encryptInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.pbGzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.gzipEncryptInterceptorWithArrayBuffer,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.ossGzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.gzipEncryptBase64Interceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.ossDegradedEncryptedClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.ossDegradedEncryptInterceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t.ossDegradedGzippedEncryptClient=Object(Rp.a)([xp.interceptor,Mp.errorCodeInterceptor,xp.ossDegradedGzipEncryptBase64Interceptor,xp.parseCDNInterceptor,xp.parseJSONInterceptor]),t}return e=i,r&&Lp(e.prototype,r),n&&Lp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Dp.RequestClient);Zp([xp.retryRequest,$p("design:type","function"==typeof(Yp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Yp:Object)],td.prototype,"client",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Hp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Hp:Object)],td.prototype,"encryptedClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Vp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Vp:Object)],td.prototype,"gzippedEncryptClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(qp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?qp:Object)],td.prototype,"pbEncryptedClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Wp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Wp:Object)],td.prototype,"pbGzippedEncryptClient",void 0),Zp([Object(xp.retryRequest)(!0),$p("design:type","function"==typeof(Kp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Kp:Object)],td.prototype,"ossGzippedEncryptClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Jp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Jp:Object)],td.prototype,"ossDegradedEncryptedClient",void 0),Zp([xp.retryRequest,$p("design:type","function"==typeof(Xp=void 0!==Tp.AxiosInstance&&Tp.AxiosInstance)?Xp:Object)],td.prototype,"ossDegradedGzippedEncryptClient",void 0);var ed=Object(Qr.once)((function(){return new td})),rd=Object(Qr.once)((function(){return new Op}));function nd(t){return(nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function od(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */od=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function A(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),s=new Q(n||[]);return o(a,"_invoke",{value:w(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=A;var f="suspendedStart",h="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};c(m,a,(function(){return this}));var I=Object.getPrototypeOf,E=I&&I(I(O([])));E&&E!==r&&n.call(E,a)&&(m=E);var C=v.prototype=g.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,e){function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,A=c.value;return A&&"object"==nd(A)&&n.call(A,"__await")?e.resolve(A.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(A).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function w(e,r,n){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=l(e,r,n);if("normal"===c.type){if(o=n.done?p:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=p,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=l(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(nd(e)+" is not iterable")}return y.prototype=v,o(C,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:y,configurable:!0}),y.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},b(B.prototype),c(B.prototype,s,(function(){return this})),e.AsyncIterator=B,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new B(A(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(C),c(C,u,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,Q.prototype={constructor:Q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function id(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function ad(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sd(n.key),n)}}function sd(t){var e=function(t,e){if("object"!=nd(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=nd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==nd(e)?e:String(e)}var ud=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,i;return e=t,(r=[{key:"addClientInterceptors",value:function(t){return ed().addClientInterceptors(t)}},{key:"send",value:(o=od().mark((function t(e,r){var n,o;return od().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=ed(),o=gp.toAxiosConfig(e),r.mode!==Ap.COMPRESSED){t.next=6;break}return t.abrupt("return",n.gzipRequest(o));case 6:if(r.mode!==Ap.ENCRYPTED){t.next=10;break}return t.abrupt("return",n.encryptedRequest(o));case 10:return t.abrupt("return",n.request(o));case 11:case"end":return t.stop()}}),t)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){id(i,r,n,a,s,"next",t)}function s(t){id(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t,e){return i.apply(this,arguments)})}])&&ad(e.prototype,r),n&&ad(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function cd(t){return(cd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ad(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ld(n.key),n)}}function ld(t){var e=function(t,e){if("object"!=cd(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==cd(e)?e:String(e)}function fd(){return(fd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=hd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function hd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=yd(t)););return t}function pd(t,e){return(pd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=yd(t);if(e){var o=yd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gd(this,r)}}function gd(t,e){if(e&&("object"===cd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yd(t){return(yd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vd=new Us.SingletonRef,md=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pd(t,e)}(i,t);var e,r,n,o=dd(i);function i(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,{id:"com.custom.core",name:"cCoreApp",Component:tu,axrs:xu,singleton:vd},t)).stateManager=e,r}return e=i,(r=[{key:"init",value:function(){fd(yd(i.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var t=this.getDependentPlugin(zs.a);this.initLogger(t);var e=this.stateManager,r=e.design,n=e.fittingDesign;Qc.configTopDocumentAction([r],t.stateManager.document),t.addDocumentSource(new jc(r,"custom-pad-document")),t.addDocumentSource(new Zc(n,"fitting-document"));var o=r.getDoc().getElementContext();o.getterEmitter.on((function(t){_r.advanced.reportObserved(t.instance)})),o.setterEmitter.on((function(t){_r.advanced.reportChanged(t.instance)}))}},{key:"initLogger",value:function(t){var e;e=t.logger,hu=e}},{key:"initStateManager",value:function(){this.stateManager.initState(),lp(this.stateManager)}},{key:"initNet",value:function(){fd(yd(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new ud),this.client=new Ip(this.net)}}])&&Ad(e.prototype,r),n&&Ad(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.PluginApplication),Id=vd.instance;function Ed(t){return(Ed="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cd(t){return function(t){if(Array.isArray(t))return bd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return bd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bd(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Bd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wd(t,e,r){var n;return n=function(t,e){if("object"!=Ed(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ed(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Ed(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pd(t,e){var r=e.findRelativeModel,n=e.transformModel,o=e.color,i=e.defaultConfig;return Object(Qr.map)(t,(function(t,e){var a=r(e);return a?Object(Qr.map)(t,(function(t){var e=n(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bd(Object(r),!0).forEach((function(e){wd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t),a,i);return o&&e.setViewColor(o),e})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function Sd(t,e){if(!(t instanceof Rn&&t.type===At.NONE)){var r=Id().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),o=t.path.plankArea.modelID,i=n.find((function(e){return e.id===t.id&&e.linkModel.id===o})),a=t.getHint();if(i)i.setViewColor(a.color),i.setOpacity(a.opacity);else{var s=function(t){var e=t instanceof _n?t.getRealLine():t.getCurveLineAndPoints().curveLine;if(e instanceof c.Arc2d||e instanceof c.EllipticalArc2d){var r=t.path.getAllCurves().map((function(t){return t.curve}));if(e instanceof c.Arc2d){var n=e.circle.clone();n.radius+=1,e=new c.Arc2d(n,e.startAngle,e.endAngle,e.isCCW),t.path.type===ye.OUTER!=(c.PtInLoop.pointInLoop2D(e.middlePoint,r).ptInLoopType===c.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,e=new c.Arc2d(n,e.startAngle,e.endAngle,e.isCCW))}if(e instanceof c.EllipticalArc2d){var o=e.ccs,i=e.majorRadius+1,a=e.minorRadius+1,s=e.startParam,u=e.endParam,A=e.clockSign;e=new c.EllipticalArc2d(o,i,a,s,u,A),t.path.type===ye.OUTER!=(c.PtInLoop.pointInLoop2D(e.middlePoint,r).ptInLoopType===c.PtInLoop.PtInLoopType.Outside)&&(i=e.majorRadius-1,a=e.minorRadius-1,e=new c.EllipticalArc2d(o,i,a,s,u,A))}}return e}(t);e&&s.transform(e);var u=function(t){var e,r=t.linkModelId,n=t.hintModelId,o=t.curveLine,i=t.hint,a=Id().getStateManager().pad.findModelOrAssemblyModelById(r);if(a){var s=null===(e=a.getParam("thickness"))||void 0===e?void 0:e.getData().value,u=o instanceof c.EllipticalArc2d?o.getApproximatePoints(.01):o.getApproximatePoints();return new ci({linkModel:a,points:u,color:i.color,opacity:i.opacity,height:s?+s:0,id:n})}}({hint:a,curveLine:s,hintModelId:t.id,linkModelId:o});u&&r.setPlankOutlineHintModels([].concat(Cd(n),[u]))}}}function _d(t,e){var r=Id().getStateManager().fittingDesign,n=t.color,o=t.opacity,i=r.getPlankAreaFaceHints(),a=i.find((function(r){return r.faceId===t.id&&r.linkPlankArea===e.id}));if(a)a.setColor(n),a.setOpacity(o);else{var s=function(t,e){var r=t.id,n=t.color,o=t.opacity,i=e._isRealPath?e.getCenterPoint():null,a=i?c.Matrix3.makeTranslation(-i.x,-i.y):void 0,s=Id().getStateManager().pad.findModelOrAssemblyModelById(e.modelID);if(s){var u=function(t){return a?t.appliedMatrix3(a):t},A=e.paths.filter((function(t){return t.type===ye.OUTER})).map((function(t){return{outer:t.getAllPolygonPoints().map(u),inners:(e.pathMap.get(t)||[]).map((function(t){return t.getAllPolygonPoints().map(u)}))}}));return new Ho({faceId:r,color:n,opacity:o,linkPlankArea:e.id,faces:A,linkModel:s})}throw new Error("Can not find plankArea.model:"+e.modelID)}(t,e);s&&r.setPlankAreaFaceHints([].concat(Cd(i),[s]))}}function Qd(t,e){var r=Id().getStateManager().fittingDesign,n=r.getPlankAreaFaceHints(),o=n.findIndex((function(r){return r.faceId===t&&r.linkPlankArea===e}));if(o>-1){var i=Cd(n);i.splice(o,1),r.setPlankAreaFaceHints(i)}}function Od(t,e,r,n){var o=n.color,i=n.opacity,a=new _i(t,e,r,n);return void 0!==o&&a.setColor(o),void 0!==i&&a.setOpacity(i),a}function Dd(t,e,r,n){var o=n.color,i=n.opacity,a=new Ya(t,e,r,n);return void 0!==o&&a.setColor(o),void 0!==i&&a.setOpacity(i),a}function xd(t,e,r,n){var o=n.color,i=n.opacity,a=new va(t,e,r,n);return void 0!==o&&a.setColor(o),void 0!==i&&a.setOpacity(i),a}function Md(t,e,r,n){var o=n||{},i=o.color,a=o.opacity,s=new Da(t,e,r,n);return void 0!==i&&s.setColor(i),void 0!==a&&s.setOpacity(a),s}function Rd(t,e,r,n){var o=n||{},i=o.color,a=o.opacity,s=new ia(t,e,r,n);return void 0!==i&&s.setColor(i),void 0!==a&&s.setOpacity(a),s}function Td(t){return(Td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ld(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function jd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ld(Object(r),!0).forEach((function(e){kd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kd(t,e,r){var n;return n=function(t,e){if("object"!=Td(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Td(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Td(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nd(t){var e=t.getChildNodes().filter((function(t){return t.getLegal()&&!!t.getParam("plankPath")&&t.getType()===_e.ParamModelType.PARAM_PRIMITIVE}));if(0===e.length)return t;if(e.length>1)throw new Error("model:".concat(t.id," has multiple primitive"));return e[0]}function Fd(t){var e=function(t){var e=t.points,r=t.curves;return new $n({points:Ui(e).map(zi),lines:r.map(Yi),depth:0,matrix4:new c.Matrix4})}(t).getLines().map((function(t){return t.getCurveLine()})),r=new c.GeomLoop2d(e).getBounding().center;return new c.Vector3d(r.x,r.y,0)}function Gd(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.modelId,o=t.renderProperty,i=t.finishedProfile,a=t.referencePlane,s=e.findRelativeModel,u=e.transformModel,c=s(n);if(c){var A=a?c:Nd(c);return u(n,t,A,jd(jd(jd({},r),o),{},{offset:i?Fd(i):void 0,referencePlane:a}))}throw new Error("model:".concat(n," is not exist"))}var Ud=r(7);function zd(t){return(zd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
147
147
  /*!
148
148
  * @qunhe/custom-miniapp-outer-sdk v0.20.18
149
149
  * (c) 2024