@manycore/custom-sdk 3.1.12 → 3.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
window.__customSdkVersion = '3.1.
|
|
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)}
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -206,4 +206,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
206
206
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
207
207
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
208
208
|
PERFORMANCE OF THIS SOFTWARE.
|
|
209
|
-
***************************************************************************** */var zv,Yv=function(t,e){return(Yv=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 Hv(t,e){function r(){this.constructor=t}Yv(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Vv(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":Uv(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}function qv(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 Wv(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(qv(arguments[e]));return t}!function(t){t.CABINET="CABINET",t.WARDROBE="WARDROBE",t.DOOR_WINDOW="DW",t.CABINET_COPY="CABINET_COPY",t.WARDROBE_COPY="WARDROBE_COPY",t.DOOR_WINDOW_COPY="DW_COPY"}(zv||(zv={}));var Kv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hv(e,t),e.prototype.getParamModelDataByIds=function(t,e){return Object(Ud.API_UNSUPPORT)()},e.prototype.getTopParamModels=function(t){return Object(Ud.API_UNSUPPORT)()},Vv([Ud.anno.decl.api()],e.prototype,"getParamModelDataByIds",null),Vv([Ud.anno.decl.api()],e.prototype,"getTopParamModels",null),e=Vv([Ud.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:Iy.INNER})],e)}(Ud.ServService);var Jv,Xv,Zv,$v=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PopBufferMtl=void 0,e.toPopBufferMtl=function(t){var e=t.parameters,r=new a;r.setObjName(t.objName),t.brandGoodId&&r.setBrandGoodId(t.brandGoodId);if(e)for(var o=0,i=e.length;o<i;o++){var s=e[o];switch(s.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(s.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(s.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(s.value));break;case"transparentType":r.setTransparentType(Number(s.value))}}return r};var r,n=(r=Se.default)&&r.__esModule?r:{default:r};function o(t){return(o="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 i(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,(i=n.key,a=void 0,a=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(a)?a:String(a)),n)}var i,a}var a=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,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(t){return this.objName=t,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(t){return this.brandGoodId=t,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(t){return this.diffuseTexture=t,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(t){return this.diffuseColor=t,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(t){return this.refractColor=t,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(t){return this.transparentType=t,this}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.PopBufferMtl=a})),tm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hv(e,t),e.prototype.toJSON=function(){return{paramPackages:Wv(this.paramPackages.values()),hardwares:Wv(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(t){var e=qv(t,2);e[0];var r=e[1],n=new Ev.a;return Object(Qr.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Wv(this.displayInfos.values()),wireFrames:Object(Qr.fromPairs)(Wv(this.wireGeometrysMap.entries()).map((function(t){return[t[0],t[1].vertices]})))}},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.unSerialize=function(t){var e=this,r="string"==typeof t?JSON.parse(t):t,n=Object(Qr.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(t){var e=new Ev.a;if(Object(Qr.extend)(e,t),e.meshModels=e.meshModels.map((function(t){var e=t.displayMaterial,r=new yv.a,n=new Io.a;return Object(Qr.extend)(n,t.geometry),r.texture=t.texture,r.displayMaterial=e?$v.toPopBufferMtl(e):void 0,r.geometry=n,r})),e.furnitureModel){var r=new dv.FurnitureModel;Object(Qr.extend)(r,e.furnitureModel),r.size=new Se.default(r.size),r.position=new Se.default(r.position),r.rotate=new Se.default(r.rotate),r.scale=new Se.default(r.scale),e.furnitureModel=r}return e}))),r.wireFrames&&Object(Qr.each)(r.wireFrames,(function(t,r){e.addWireGeometrysMap(r,t)})),this.addCustomResources(n)},e}(mv.a);!function(t){t[t.willExit=0]="willExit"}(Jv||(Jv={})),function(t){t[t.exit=0]="exit"}(Xv||(Xv={})),function(t){t[t.personalLibrary=1]="personalLibrary",t[t.enterpriseLibrary=2]="enterpriseLibrary"}(Zv||(Zv={}));var em=r(219),rm=r(262),nm=function(){function t(t){var e=this;this.keyValue={},this.keyEnum={},this.keyExist={},t.values().forEach((function(t){var r=t.name();e.keyEnum[r]=t,e.keyExist[r]=!1})),this.keyType=t}return t.prototype.clear=function(){var t=this;Object.keys(this.keyExist).forEach((function(e){t.keyExist[e]=!1})),this.keyValue={}},t.prototype.delete=function(t){var e=t.name(),r=this.keyExist[e];return r&&(this.keyExist[e]=!1,delete this.keyValue[e]),r},t.prototype.forEach=function(t,e){var r=this;Object.keys(this.keyValue).forEach((function(n){t.call(e,r.keyValue[n],r.keyEnum[n],r)}))},t.prototype.get=function(t){return this.keyValue[t.name()]},t.prototype.has=function(t){return this.keyExist[t.name()]},t.prototype.set=function(t,e){var r=t.name();return this.keyExist[r]=!0,this.keyValue[r]=e,this},t.prototype.keys=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyEnum[e]}))},t.prototype.values=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyValue[e]}))},t.prototype.entries=function(){var t=this,e=[];return Object.keys(this.keyValue).forEach((function(r){e.push([t.keyEnum[r],t.keyValue[r]])})),e},t.prototype.clone=function(){var e=new t(this.keyType);return this.forEach((function(t,r){return e.set(r,t)})),e},t}(),om=r(369),im=r(699),am=function(t,e){this.points=t,this.transform=e,this.polygon=new as.default(t.map((function(t){return new Cn.default(e.worldToLocal(t))})))},sm=function(t,e,r){this.point=t,this.normal=e,this.position=r},um=r(210),cm=r(100),Am=r(303),lm=function(t,e){this.point=t,this.offset=e},fm=function(){function t(t,e,r,n){this.points=[t,e],this.isStart=r,this.isEnd=n,this.lineSegment=new cm.default(t.point,e.point),this.lengthRange=new um.default(t.position,e.position)}return t.prototype.intersect=function(t,e){var r=this.lineSegment,n=t.lineSegment,o=cm.default.estimateLineAndLine(r,n,!1);if(o.status===Am.a.JOINT){var i=!0;e?(this.isStart||void 0===o.parameterA||(i=o.parameterA>0),this.isEnd||void 0===o.parameterA||(i=i&&o.parameterA<1),t.isStart||void 0===o.parameterB||(i=i&&o.parameterB>0),t.isEnd||void 0===o.parameterB||(i=i&&o.parameterB<1)):i=o.areSegmentsIntersected(!1);var a=new Cn.default;return a.x=this.lengthRange.interpolate(o.parameterA),a.y=t.lengthRange.interpolate(o.parameterB),i?new lm(o.point,a):void 0}},t}(),hm=r(538),pm=function(){function t(t){this.lengths=t,this.intersections=[]}return t.prototype.addIntersection=function(t){this.intersections.push(t)},t.prototype.getPoints=function(){return this.intersections.map((function(t){return t.point}))},t.prototype.getPointsInside=function(t){var e,r,n=[];try{for(var o=Object(cs.k)(this.intersections),i=o.next();!i.done;i=o.next()){var a=i.value;a.offset.x>-t&&a.offset.x<this.lengths.x+t&&a.offset.y>-t&&a.offset.y<this.lengths.y+t&&n.push(a.point)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t}();function dm(t,e){void 0===e&&(e=1);var r,n=[];return t.forEach((function(t){void 0!==r&&Cn.default.isEqual(t,r,e)||(r=t,n.push(t))})),n[n.length-1]=t[t.length-1],n}var gm=function(){function t(t){if(this.pointCount=0,t.length<2)throw new Error("Polyline must has more than one valid Point.");this.buildPolyline(dm(t))}return t.prototype.getPoint=function(t){if(0===t)return this.getStart().clone();if(1===t)return this.getEnd().clone();for(var e=t*this.length(),r=this.pointCount-1,n=0;n<this.pointCount;n++)if(this.getPositionAt(n)>=e){r=n;break}if(0===r)return this.getStart().clone();var o=this.getLengthRangeAt(r-1).getParameter(e);return this.getLineSegmentAt(r-1).interpolate(o)},t.prototype.getTangent=function(t){return this.getRightNormal(t).leftDirect()},t.prototype.getRightNormal=function(t){return this.getRightNormalByPosition(t*this.length())},t.prototype.getRightNormalByPosition=function(t){for(var e=1;e<this.pointCount;e++)if(!(this.getPositionAt(e)<=t)){var r=(t-this.getPositionAt(e-1))/(this.getPositionAt(e)-this.getPositionAt(e-1));return Cn.default.lerp(this.getNormalAt(e-1),this.getNormalAt(e),r)}return this.getNormalAt(this.pointCount-1).clone()},t.prototype.getNearestPointParameter=function(t){if(this.pointCount<2)return 0;for(var e=Number.MAX_VALUE,r=0,n=0;n<this.pointCount-1;n++){var o=this.getLineSegmentAt(n),i=this.getLengthRangeAt(n),a=o.getNearestPointParameter(t,!0),s=o.interpolate(a),u=t.distanceSquared(s),c=i.interpolate(a);u<e&&(e=u,r=c)}return r/this.length()},t.prototype.getPoints=function(){return this.polylinePoints.map((function(t){return t.point}))},t.prototype.getPointParameters=function(){var t=this.length();return this.getPositions().map((function(e){return e/t}))},t.prototype.getSegmentPoints=function(t){if(!this.length())return this.getPoints();for(var e=um.default.mul(t,this.length()),r=[this.getPoint(t.min)],n=0;n<this.pointCount&&!(this.getPositionAt(n)>e.max);n++)this.getPositionAt(n)>e.min&&r.push(this.getPointAt(n));return r.push(this.getPoint(t.max)),dm(r)},t.prototype.getPolylineIntersection=function(t,e){var r=new pm(new Cn.default(this.length(),t.length()));if(!e&&!this.boundingBox.intersects(t.boundingBox,!0))return r;var n=this.polylineSegments,o=t.polylineSegments;return n.forEach((function(t){return o.forEach((function(n){var o=t.intersect(n,e);o&&r.addIntersection(o)}))})),r},t.prototype.extend=function(e,r){var n=this.getSegmentPoints((new um.default).setFromPoints([e,r]));if(0!==n.length)return new t(e>r?n.reverse():n)},t.prototype.intersect=function(t,e){return void 0===e&&(e=1),this.boundingBox.intersects(t.boundingBox,!0,2*e)?this.getPolylineIntersection(t,!0).getPointsInside(e):[]},t.prototype.getStart=function(){return this.getPointAt(0)},t.prototype.getEnd=function(){return this.getPointAt(this.pointCount-1)},t.prototype.getEndpoints=function(){return[this.getStart(),this.getEnd()]},t.prototype.length=function(){return 0===this.pointCount?0:this.getPositionAt(this.pointCount-1)},t.prototype.toString=function(){return"Polyline2 {points: "+this.getPoints().map((function(t){return t.toParenString()})).join(",")+", length: "+this.length()},t.prototype.buildPolyline=function(t){this.pointCount=t.length,this.boundingBox=(new gs.default).includePoints(t),this.polylinePoints=[],this.polylineSegments=[];var e=this.pointCount;if(1===e)return this.polylinePoints.push(new sm(t[0],new Cn.default(0,0),0)),void console.warn("Polyline must has more than one valid Point.");for(var r=new Cn.default,n=new Cn.default,o=0,i=0;i<e;i++){var a=t[i],s=0!==i?t[i-1]:void 0,u=i<e-1?t[i+1]:void 0;s&&(o+=s.distance(a));var c=void 0;!s&&u?c=Cn.default.sub(u,a).rightDirect().normalize():!u&&s?c=Cn.default.sub(a,s).rightDirect().normalize():s&&u&&(c=Cn.default.bisectorCounterClockwise(r.subVectors(s,a),n.subVectors(u,a))),this.polylinePoints.push(new sm(a,c,o)),s&&this.polylineSegments.push(new fm(this.polylinePoints[i-1],this.polylinePoints[i],1===i,i===e-1))}},t.prototype.getPositions=function(){return this.polylinePoints.map((function(t){return t.position}))},t.prototype.getPointAt=function(t){return this.polylinePoints[t].point},t.prototype.getNormalAt=function(t){return this.polylinePoints[t].normal},t.prototype.getPositionAt=function(t){return this.polylinePoints[t].position},t.prototype.getLineSegmentAt=function(t){return this.polylineSegments[t].lineSegment},t.prototype.getLengthRangeAt=function(t){return this.polylineSegments[t].lengthRange},t}(),ym=r(697),vm=r(703),mm=r(315),Im=r(285),Em=function(t,e){this.start=t,this.end=e},Cm=function(){function t(t,e){this.points=t,this.lines=e}return t.fromPolyline=function(e,r){void 0===r&&(r=!0);for(var n=[],o=e.length,i=0;i<o;i++)n.push(new Em(i,(i+1)%o));return!1===r&&n.splice(o-1,1),new t(e,n)},t.fromShapeSize=function(e){var r=[new Cn.default(0,0),new Cn.default(e.x,0),new Cn.default(e.x,e.y),new Cn.default(0,e.y)];return t.fromPolyline(r,!0)},t}(),bm=r(688),Bm=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[gs.default,os.default,om.default,be.default,im.a,Be.default,am,um.default,cm.default,Ai.a,hm.default,we.default,is.a,as.default,ss.a,gm,ym.a,vm.a,Pe.default,mm.a,Im.default,Cm,Em,us.a,bm.a,ps,Cn.default,Se.default,ArrayBuffer,nr.Vector3,rm.default,nm,nh.ParamStore,sm,fm,yv.a,Io.a,dv.FurnitureModel,Map,nr.SkyBackground]:[];Object(em.b)({isKnownImmutableInstance:function(t){return Bm.some((function(e){return t instanceof e}))}});em.a;var wm=r(345);function Pm(t){return(Pm="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 Sm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _m(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,Qm(n.key),n)}}function Qm(t){var e=function(t,e){if("object"!=Pm(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Pm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Pm(e)?e:String(e)}function Om(t,e){return(Om=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Dm(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=Mm(t);if(e){var o=Mm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return xm(this,r)}}function xm(t,e){if(e&&("object"===Pm(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 Mm(t){return(Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rm,Tm=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&&Om(t,e)}(i,t);var e,r,n,o=Dm(i);function i(){var t;return Sm(this,i),(t=o.apply(this,arguments)).rootState=new fp,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new md(this,this.rootState);t.init(),t.run()}}])&&_m(e.prototype,r),n&&_m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(wm.a);Tm.dependencies=[zs.a];var Lm,jm,km,Nm,Fm,Gm,Um,zm=function(t){if(!Rm)throw new Error("please new Application before call method");return Rm.getCustomMiniAppService(t)},Ym=r(1399),Hm={maxAge:6e5,max:20},Vm=Symbol("fitting-data"),qm=Symbol("groove-fitting-entity"),Wm=Symbol("intersect-data"),Km=Symbol("param-model-hint-entity"),Jm=Symbol("fitting-hint-entity"),Xm=Symbol("plank-outline-hint-entity"),Zm=Symbol("hole-entity"),$m=Symbol("square-groove-entity"),tI=Symbol("round-corner-groove-entity"),eI=Symbol("special-shaped-groove-entity"),rI=Symbol("path-groove-entity"),nI=Symbol("plank-area-face-hint-entity");!function(t){t.FAIL="fail",t.SUCCESS="success",t.LOADING="loading"}(Lm||(Lm={})),function(t){t[t.READY=0]="READY",t[t.LOADING=1]="LOADING",t[t.FAILED=2]="FAILED",t[t.INVALID=3]="INVALID",t[t.SUCCESS=4]="SUCCESS"}(jm||(jm={})),function(t){t[t.READY=0]="READY",t[t.RUNNING=1]="RUNNING",t[t.FAILED=2]="FAILED",t[t.SUCCESS=3]="SUCCESS"}(km||(km={})),function(t){t.SCENE_ID="cp"}(Nm||(Nm={})),function(t){t[t.theme=1735419]="theme",t[t.sceneBG=15461612]="sceneBG",t[t.outline=0]="outline"}(Fm||(Fm={})),function(t){t.selectBlank="sb",t.renderModeChange="r",t.doorVisibilityChange="d"}(Gm||(Gm={})),function(t){t.SHADING="0",t.OUTLINE_WITH_SHADING="1",t.TRANSLUCENT="2",t.OUTLINE_AND_TRANSLUCENT="3",t.FULLY_TRANSPARENT="4"}(Um||(Um={}));Um.SHADING,Um.OUTLINE_WITH_SHADING,Um.TRANSLUCENT,Um.OUTLINE_AND_TRANSLUCENT,Um.FULLY_TRANSPARENT;var oI,iI,aI,sI=[_e.ParamModelType.PARAM_ENTITY,_e.ParamModelType.PARAM_FURNITURE,_e.ParamModelType.PARAM_PRIMITIVE],uI={scene3D:Symbol("scene3D")},cI=r(321),AI=r(251),lI=r(557);function fI(t){aI=t}function hI(t){return(hI="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 pI=["paramModelData"];function dI(t){return function(t){if(Array.isArray(t))return gI(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 gI(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 gI(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 gI(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 yI(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function vI(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */vI=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"==hI(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(hI(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 mI(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 II(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){mI(i,n,o,a,s,"next",t)}function s(t){mI(i,n,o,a,s,"throw",t)}a(void 0)}))}}function EI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CI(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,bI(n.key),n)}}function bI(t){var e=function(t,e){if("object"!=hI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hI(e)?e:String(e)}function BI(t,e){return(BI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wI(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=SI(t);if(e){var o=SI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return PI(this,r)}}function PI(t,e){if(e&&("object"===hI(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 SI(t){return(SI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _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&&BI(t,e)}(i,t);var e,r,n,o=wI(i);function i(){var t;return EI(this,i),(t=o.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0},t.lastCurrentCustomDataArgs=[],t.getCurrentBaseDesignInfo=II(vI().mark((function e(){var r,n;return vI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.state.designInfo)){e.next=3;break}return e.abrupt("return",r);case 3:return n=zm(cI.MiniAppDesignBaseInfoService),e.next=6,n.getDesignBaseInfo();case 6:return r=e.sent,t.state.designInfo=r,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)}))),t.getCurrentCustomData=function(){var e=II(vI().mark((function e(r){var n,o;return vI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.state.currentCustomData,r){e.next=3;break}return e.abrupt("return",n);case 3:if(o=Object(Qr.castArray)(r),!Object(Qr.difference)(o,t.lastCurrentCustomDataArgs).length&&n){e.next=11;break}return e.next=8,LL(r);case 8:n=e.sent,e.next=12;break;case 11:return e.abrupt("return",n);case 12:return t.lastCurrentCustomDataArgs=o,t.state.currentCustomData=n,e.abrupt("return",n);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.loadFittingHardwareToSense=function(){var e=II(vI().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p,d,g=arguments;return vI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=g.length>1&&void 0!==g[1]?g[1]:ge.V1,(o=Object(Qr.uniq)(Object(Qr.flatten)(Object(Qr.map)(r.hardware,(function(t){return t.map((function(t){return t.brandGoodId}))}))))).length){e.next=4;break}return e.abrupt("return");case 4:return i=t.getStateManager().core,a=i.design,s=i.pad,e.next=8,Promise.allSettled(Object(Qr.map)(o,function(){var t=II(vI().mark((function t(e){var r;return vI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$L(e);case 2:return r=t.sent,t.abrupt("return",[e,r]);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 8:return u=e.sent,e.next=11,tj(o);case 11:c=e.sent,A=Object(Qr.mapValues)(Object(Qr.keyBy)(Object(Qr.filter)(u,(function(t){return"fulfilled"===t.status})).map((function(t){return t.value})),(function(t){return t[0]})),(function(t){return t[1]})),l=a.getCustom(),f=[],h={},p=vI().mark((function t(){var e,o,i,a,u,l,p;return vI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.hardware[d],(o=s.findModelOrAssemblyModelById(d))?(i=o.getConcatenatedMatrix(),a=o.getSize(),u=(new we.default).makeTranslation(new Se.default(-a.x/2,a.y/2,-a.z/2)),l=n===ge.V2?i.clone():i.clone().multiply(u),p=Object(Qr.map)(e,(function(t){var e=A[t.brandGoodId],r=c[t.brandGoodId]||{x:0,y:0,z:0};if(e){var i=e.paramModelData,a=yI(e,pI),s=t.rotate,u=(new dr).parse(i);Object(AI.attach)(u,Object(AI.toAttachedMap)(a)),u.setIsAppendHardware(!0),u.setLinkedIds(t.linkedIds),u.setHardwareData(t),u.setHardwareVersion(n),u.linkParamModelId=o.id;var f=l.clone().multiply((new we.default).compose(new Se.default(t.position),new Be.default(s.x,s.y,s.z),new Se.default(t.scale)).multiply((new we.default).setPosition(new Se.default(r)))),p=ns.a.decompose(f),d=p.rotation,g=p.position,y=p.scale,v=new Se.default(g);return u.setPosition({x:v.x,y:v.y,z:v.z}),u.setRotation({x:d.x,y:d.y,z:d.z}),u.setScale(y),u.assignUniqueId(),h[t.id]=u.id,u}})).filter((function(t){return!!t})),f.push.apply(f,dI(p))):Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!");case 3:case"end":return t.stop()}}),t)})),e.t0=vI().keys(r.hardware);case 18:if((e.t1=e.t0()).done){e.next=23;break}return d=e.t1.value,e.delegateYield(p(),"t2",21);case 21:e.next=18;break;case 23:if(!f.length){e.next=27;break}return e.next=26,oI.updateAttacheds(f);case 26:l.addParamModels.apply(l,f);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=i,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&CI(e.prototype,r),n&&CI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR),QI=r(127),OI=r(80);function DI(t){return(DI="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 xI(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=jI(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 MI(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 RI(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?MI(Object(r),!0).forEach((function(e){TI(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):MI(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function TI(t,e,r){return(e=FI(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function LI(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)||jI(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 jI(t,e){if(t){if("string"==typeof t)return kI(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)?kI(t,e):void 0}}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 NI(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,FI(n.key),n)}}function FI(t){var e=function(t,e){if("object"!=DI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=DI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DI(e)?e:String(e)}var GI=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._isRealPath=!1,this._changeMap={},this.faceHint={},this.id=Object(Jr.default)(),this.modelID=e,this.paths=r,r.forEach((function(t){t.plankArea=o})),this.pathMap=n}var e,r,n;return e=t,(r=[{key:"getRealPaths",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var r=e.force,n=void 0!==r&&r,o=e.resetCenter,i=void 0===o||o;if(!n&&i&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!n&&!i&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new t(this.modelID,[],new Map);var a=this.getFace2ds();if(this.paths.length>1){var s=[];c.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),c.FacesBoolean.FaceBooleanType.subtract,s),a=s}if(i&&a.length){var u,A={loops:(u=[]).concat.apply(u,LI(a.map((function(t){return t.loops}))))};Object(OI.b)(A);var l=A.box.center,f=c.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(t){t.loops.forEach((function(t){t.forEach((function(t){t.transform(f)}))}))}))}var h=[],p=[],d=new Map;a.forEach((function(t){var e=t.loops[0],r=t.loops.slice(1),n=zI(ye.OUTER,e),o=r.map((function(t){return zI(ye.INNER,t,!0)}));h.push(n),p.push.apply(p,LI(o)),d.set(n,o)}));var g=new t(this.modelID,[].concat(h,p),d);return i?this._realPathsResetCenterCache=g:this._realPathsCache=g,g._isRealPath=!0,g}},{key:"getCenterPoint",value:function(){var t,e,r=this.paths.filter((function(t){return t.type===ye.OUTER}));if(r.length)return(t=r.map(UI),e=new c.BBox2d,t.forEach((function(t){if(t.bcGroups){var r,n=xI(t.bcGroups);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.box=new c.BBox2d;var i,a=xI(o.boundedCurves);try{for(a.s();!(i=a.n()).done;){var s=i.value;o.box.merge(s.getBounding())}}catch(t){a.e(t)}finally{a.f()}e.merge(o.box)}}catch(t){n.e(t)}finally{n.f()}}else{var u,A=xI(t.loops);try{for(A.s();!(u=A.n()).done;){var l,f=xI(u.value);try{for(f.s();!(l=f.n()).done;){var h=l.value;e.merge(h.getBounding())}}catch(t){f.e(t)}finally{f.f()}}}catch(t){A.e(t)}finally{A.f()}}})),e).center}},{key:"getFace2ds",value:function(){return this.paths.map(UI)}},{key:"_trackUpdateField",value:function(t,e,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,o=t.field;e===r||n.some((function(e){return e.field===o&&e.context.id===t.context.id}))||n.push(t)}},{key:"changeMap",get:function(){return this._changeMap},set:function(t){this._changeMap=t}},{key:"getFaceHint",value:function(){return this.faceHint}},{key:"setFaceHint",value:function(t){this.faceHint[t.id]=t}},{key:"removeFaceHint",value:function(t){this.faceHint[t]=void 0}}])&&NI(e.prototype,r),n&&NI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function UI(t){var e=[];if(t.lines.forEach((function(t){var r=t.start;r.getType()!==At.NONE&&e.push(r.getCurveLineAndPoints().curveLine),e.push(t.getRealLine())})),t.offset){var r=(0,c.LoopCCW.isPolygonCCW2D)(e.map((function(t){return t.startPoint})))?t.offset:-t.offset;return{loops:c.Path2dOffset.offsetPath2d(e,r).resultPaths}}return{loops:[e]}}function zI(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.map((function(t){return new Rn({type:At.NONE,position:t.startPoint})})),o=e.map((function(t){var e;return e=t instanceof c.LineSeg2d?{type:lt.SEGMENT}:t instanceof c.Arc2d?YI(t):HI(t),new _n(e)})),i=c.LoopCCW.isPolygonCCW2D(n.map((function(t){return t.getPosition()})));r!==i&&(n=n.reverse(),o=(o=o.reverse().map((function(t){return"boolean"==typeof t.clockwise&&(t.clockwise=!t.clockwise),t}))).slice(1).concat(o[0]));var a=WI(n.map((function(t){return t.getPosition()})));return n=n.slice(a).concat(n.slice(0,a)),o=o.slice(a).concat(o.slice(0,a)),new Yn({type:t,points:n,lines:o,forceCCW:!1})}function YI(t){var e={};e.type=lt.CIRCLE_ARC,e.radius=t.radius,e.clockwise=!t.isCCW;var r=t.center,n=t.startPoint,o=t.endPoint,i=new c.LineSeg2d(n,o),a=i.length/2,s=new c.Vector2d(i.getPoint(a)),u=new c.Vector2d(r).subtracted(s).normalized();return e.clockwise?e.minorArc=u.isSameDirection(i.rightNormal):e.minorArc=u.isSameDirection(i.leftNormal),e}function HI(t){var e={};return e.type=lt.ELLIPSE_ARC,e.majorRadius=t.majorRadius,e.minorRadius=t.minorRadius,e.clockwise=!t.isCCW,e.ellipseCenter=t.ccs.origin,e}var VI=void 0;function qI(t){VI=t;var e=t.changeMap.update;if(e&&e.length>0){var r=t._isRealPath?t.getCenterPoint():null,n=r?c.Matrix3.makeTranslation(-r.x,-r.y):void 0;e.forEach((function(t){var e=t.field,r=t.context;"hint"===e&&((r=r).getHint()?Sd(r,n):function(t,e){var r=Id().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),o=n.findIndex((function(r){return r.linkModel.id===t&&r.id===e}));if(o>-1){var i=Cd(n);i.splice(o,1),r.setPlankOutlineHintModels(i)}}(r.path.plankArea.modelID,r.id))})),t.changeMap=RI(RI({},t.changeMap),{},{update:[]})}!function(t){var e=t.getFaceHint();e[se.TOP]?_d(e[se.TOP],t):Qd(se.TOP,t.id);e[se.BOT]?_d(e[se.BOT],t):Qd(se.BOT,t.id)}(t)}function WI(t){if(!t.length)return 0;var e=t[0].y,r=t[0].x;t.slice(1).forEach((function(t){e<t.y&&(e=t.y),r>t.x&&(r=t.x)}));var n,o,i=-r,a=-e;return t.forEach((function(e,r){var s=e.x,u=e.y,c=Math.pow(s+i,2)+Math.pow(u+a,2);void 0===n||c<n?(n=c,o=r):n===c&&t[o].x>e.x&&(o=r)})),o}function KI(t){return(KI="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 JI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XI(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,ZI(n.key),n)}}function ZI(t){var e=function(t,e){if("object"!=KI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KI(e)?e:String(e)}function $I(t,e){return($I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tE(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=rE(t);if(e){var o=rE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eE(this,r)}}function eE(t,e){if(e&&("object"===KI(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 rE(t){return(rE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nE=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&&$I(t,e)}(i,t);var e,r,n,o=tE(i);function i(){var t;return JI(this,i),(t=o.apply(this,arguments)).paramModelConstructor=dr,t}return e=i,(r=[{key:"parseParamModelAssemblies",value:function(t){var e=this;return t.forEach((function(t){var r=(new wr).parse(t,e,{isRootWorldMatrix:!0});e.addParamModelAssembly(r)})),this}}])&&XI(e.prototype,r),n&&XI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tm);function oE(t){return(oE="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 iE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aE(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,sE(n.key),n)}}function sE(t){var e=function(t,e){if("object"!=oE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oE(e)?e:String(e)}function uE(){return(uE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=cE(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 cE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=hE(t)););return t}function AE(t,e){return(AE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lE(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=hE(t);if(e){var o=hE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fE(this,r)}}function fE(t,e){if(e&&("object"===oE(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 hE(t){return(hE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pE=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&&AE(t,e)}(i,t);var e,r,n,o=lE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return iE(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return nE}},{key:"generate",value:function(t){return t=uE(hE(i.prototype),"generate",this).call(this,t)}}])&&aE(e.prototype,r),n&&aE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_e.CoreParamModelAssemblyBackup);function dE(t){return(dE="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 gE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yE(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,vE(n.key),n)}}function vE(t){var e=function(t,e){if("object"!=dE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dE(e)?e:String(e)}function mE(){return(mE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=IE(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 IE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=BE(t)););return t}function EE(t,e){return(EE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CE(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=BE(t);if(e){var o=BE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bE(this,r)}}function bE(t,e){if(e&&("object"===dE(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 BE(t){return(BE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wE=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&&EE(t,e)}(i,t);var e,r,n,o=CE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return gE(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return nE}},{key:"generate",value:function(t){return t=mE(BE(i.prototype),"generate",this).call(this,t)}}])&&yE(e.prototype,r),n&&yE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_e.CoreParamModelBackup),PE=r(332);function SE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nE;e.parseParamModels(t.paramModels).parseParamModelGroups(t.paramModelGroups).parseParamModelAssemblies(t.paramModelCombinations);var r=e.getParamModelAssemblies(),n=e.getParamModels().filter((function(t){return!t.isAccessory()}));return Object(Qr.uniqBy)(PE.ParamModelUtils.collectAccessories(n),"id").forEach((function(t){t.toLocalMatrix()})),{paramModels:n,paramModelAssemblies:r}}var _E=Math.sqrt(2),QE=Math.PI/6,OE=Math.PI/3+Math.PI;function DE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:QE,n=t.getPosition(),o=t.getSize(),i=n.clone(),a=o.length()*_E,s=new Se.default(Math.cos(r)*Math.cos(e),Math.cos(r)*Math.sin(e),Math.sin(r)).mul(a).applyMatrix4(t.getMatrix());return{lookAt:i,position:s}}var xE,ME=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,e=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,t,e)}))};function RE(t){var e,r,n,o=function(t){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t.call.apply(t,[this].concat(r))}};return{promise:new Promise((function(i,a){e=o(i),r=o(a),"number"==typeof t&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(t,"ms")))}),t))})),resolve:e,reject:r}}function TE(t){return(TE="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 LE(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 jE(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?LE(Object(r),!0).forEach((function(e){kE(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LE(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kE(t,e,r){var n;return n=function(t,e){if("object"!=TE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=TE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==TE(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function NE(t){return t["@type"]===X.THROUGH_SHELL}function FE(t){var e=t.elements;return(new nr.Matrix4).set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}function GE(t,e){return Se.default.sub(t,e.clone().mul(Se.default.dot2(t,e)/Se.default.dot2(e,e)))}function UE(t){return(UE="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 zE(t,e,r){var n;return n=function(t,e){if("object"!=UE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==UE(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function YE(t,e){var r=t.getSize(),n=(new we.default).getInverse(t.getConcatenatedMatrix()),o=e.clone().applyMatrix4(FE(n)),i=o.x,a=o.y,s=o.z,u=zE(zE(zE(zE(zE(zE({},xE.TOP,Math.abs(s-r.z/2)),xE.LEFT,Math.abs(i+r.x/2)),xE.BACK,Math.abs(a+r.y/2)),xE.RIGHT,Math.abs(i-r.x/2)),xE.FRONT,Math.abs(a-r.y/2)),xE.BOT,Math.abs(s+r.z/2)),c=Object.entries(u).reduce((function(t,e){return e[1]<t[1]?e:t}));return c[1]<.01?+c[0]:xE.UNKNOWN}function HE(t){if(t instanceof wr)return t;var e=t.getRoot(),r=e.getAssembly();return r||e}function VE(t){return(VE="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 qE(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 WE(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qE(Object(r),!0).forEach((function(e){KE(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qE(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function KE(t,e,r){var n;return n=function(t,e){if("object"!=VE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=VE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==VE(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.UNKNOWN=-1]="UNKNOWN",t[t.TOP=0]="TOP",t[t.LEFT=1]="LEFT",t[t.BACK=2]="BACK",t[t.RIGHT=3]="RIGHT",t[t.FRONT=4]="FRONT",t[t.BOT=5]="BOT"}(xE||(xE={}));var JE={getJsonConfig:{defaultTemplateId:void 0,ignoreResetPosition:!1}};function XE(t){return JE[t]}function ZE(t){return t<1?{transparent:!0,opacity:t,depthWrite:!1}:{transparent:!1,opacity:t,depthWrite:!0}}function $E(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e&&(t.outlineMode=nr.OutlineMode.Disabled),r&&nr.TypeAssert.isMesh(t)&&(t.useOriginMaterialInTransparentMode=!0),n&&(t.castPlanarShadow=!1,t.castShadow=!1)}var tC=[];function eC(t){return(eC="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 rC,nC=["paramModelData"],oC=["paramModelData"];function iC(t){return function(t){if(Array.isArray(t))return aC(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 aC(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 aC(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 aC(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 sC(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 uC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){sC(i,n,o,a,s,"next",t)}function s(t){sC(i,n,o,a,s,"throw",t)}a(void 0)}))}}function cC(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */cC=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"==eC(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(eC(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 AC(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function lC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fC(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,hC(n.key),n)}}function hC(t){var e=function(t,e){if("object"!=eC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eC(e)?e:String(e)}function pC(t,e){return(pC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dC(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 gC(this,r)}}function gC(t,e){if(e&&("object"===eC(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)}!function(t){t.design="design",t.series="series"}(rC||(rC={}));var vC=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&&pC(t,e)}(i,t);var e,r,n,o=dC(i);function i(){var t;return lC(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({main:jm.READY,design:jm.READY,series:jm.READY}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionLoad=t.unitCreator.async((function(e){e.started.latest(cC().mark((function t(e,r){var n,o,i,a;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,iI.getParamModelDataByBrandGoodId(e);case 2:return n=t.sent,o=n.paramModelData,i=AC(n,nC),a=(new dr).parse(o),Object(AI.attach)(a,Object(AI.toAttachedMap)(i)),t.next=9,oI.updateAttacheds([a]);case 9:return r.core.design.getCustom().addParamModels(a),r.core.fittingDesign.setFittings(tC),t.next=13,Object(QI.put)(this.$actionLoad.done.message({params:e,result:jm.SUCCESS}));case 13:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddModelToSense=t.unitCreator.async((function(e){e.started.latest((function(t,e){var r=this,n=t.custom,o=t.needAttach;return cC().mark((function t(){var i,a,s,u;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.getParamModels(),a=n.getParamModelAssemblies(),!o){t.next=5;break}return t.next=5,Promise.all(i.map(function(){var t=uC(cC().mark((function t(e){var r;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,iI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(AI.attach)(e,Object(AI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:if(e.core.design.setCustom(n),s=i.filter((function(t){return!t.getAssembly()})),!o){t.next=11;break}return u=[].concat(iC(s),iC(a)),t.next=11,oI.updateAttacheds(u);case 11:return t.next=13,Object(QI.put)(r.$actionAddModelToSense.done.message({params:{custom:n,needAttach:o},result:jm.SUCCESS}));case 13:case"end":return t.stop()}}),t)}))()})),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAutoRefreshModel=t.unitCreator.sync((function(t){})),t.$actionAddParamModelToSense=t.unitCreator.async((function(e){e.started.latest(cC().mark((function t(e,r){var n,o;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.map((function(t){var e=t.paramModelData,r=AC(t,oC),n=(new dr).parse(e,new nE);return Object(AI.attach)(n,Object(AI.toAttachedMap)(r)),n})),t.next=3,oI.updateAttacheds(o);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,iC(o)),t.next=6,Object(QI.put)(this.$actionAddParamModelToSense.done.message({params:e,result:jm.SUCCESS}));case 6:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddParamModelAssemblyToSense=t.unitCreator.async((function(e){e.started.latest(cC().mark((function t(e,r){var n,o,i,a;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.core.design.getCustom(),o=new nE,i=e.map((function(t){return(new wr).parse(t,o)})),a=o.getParamModels(),t.next=6,Promise.all(a.map(function(){var t=uC(cC().mark((function t(e){var r;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,iI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(AI.attach)(e,Object(AI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 6:return t.next=8,oI.updateAttacheds(iC(i));case 8:return n.addParamModelAssemblies.apply(n,iC(i)),n.addParamModels.apply(n,iC(a)),t.next=12,Object(QI.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:e,result:jm.SUCCESS}));case 12:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t}return e=i,(r=[{key:"module",value:function(){return"entry"}}])&&fC(e.prototype,r),n&&fC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);function mC(t){return(mC="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 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"!=mC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mC(e)?e:String(e)}function bC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BC(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&&wC(t,e)}function wC(t,e){return(wC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function PC(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=_C(t);if(e){var o=_C(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return SC(this,r)}}function SC(t,e){if(e&&("object"===mC(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 _C(t){return(_C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Us.AXR;var QC=function(t){BC(r,t);var e=PC(r);function r(){return bC(this,r),e.apply(this,arguments)}return EC(r)}(Us.AXRPartial),OC=(Us.AXRManager,r(155));function DC(t){return(DC="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 xC(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xC=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"==DC(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(DC(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 MC(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 RC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){MC(i,n,o,a,s,"next",t)}function s(t){MC(i,n,o,a,s,"throw",t)}a(void 0)}))}}var TC=function(){var t=RC(xC().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f;return xC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p_(),n=r.baseDesignInfo,t.next=3,n.getCurrentBaseDesignInfo();case 3:return o=t.sent,i=o.designId,a=o.levelid,s={modelid:null!=e?e:"",designid:i,levelid:a,toolType:0},u=n.getStateManager().core.design.getCustom(),e||((c=u.getParamModelAssemblies()).length?s.modelid=c[0].id:(A=u.getParamModels().filter((function(t){return!t.isAppendHardware}))).length&&(s.modelid=A[0].id)),t.next=11,n.getCurrentCustomData(null!=e?e:s.modelid);case 11:return l=t.sent,f=l.toolType,s.toolType=f,t.abrupt("return",s);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),LC=function(t){var e=Id().getStateManager().pad,r=p_().viewParamModel.state.state.currModelId,n=e.findModelOrAssemblyModelById(t);if(n){var o=n.getIdPath(),i=n.getRoot();if(i instanceof dr){var a=i.getAssembly();a&&o.unshift(a.id)}return o.includes(r)?n:void 0}},jC=function(t){var e,r;if(t instanceof wr)return t.getInvisible();for(;t;){if(t.getInvisible())return!0;r=t,t=t.getParent()}return(null===(e=null==r?void 0:r.getAssembly())||void 0===e?void 0:e.getInvisible())||!1},kC=function(){var t=RC(xC().mark((function t(e){var r,n,o,i,a;return xC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p_(),n=r.scene,o=n.getStateManager(),i=o.scene3D,a=RE(5e3),i.once(OC.h.CameraUpdate.symbol,(function(){return a.resolve()})),i.updateCameraAttributes(e),t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function NC(t){return(NC="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 FC(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 GC(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?FC(Object(r),!0).forEach((function(e){UC(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):FC(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function UC(t,e,r){return(e=WC(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zC(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 YC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){zC(i,n,o,a,s,"next",t)}function s(t){zC(i,n,o,a,s,"throw",t)}a(void 0)}))}}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"==NC(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(NC(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 VC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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,WC(n.key),n)}}function WC(t){var e=function(t,e){if("object"!=NC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=NC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==NC(e)?e:String(e)}function KC(){return(KC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=JC(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 JC(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=tb(t)););return t}function XC(t,e){return(XC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ZC(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=tb(t);if(e){var o=tb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $C(this,r)}}function $C(t,e){if(e&&("object"===NC(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 tb(t){return(tb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function eb(t){return function(t){if(Array.isArray(t))return rb(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 rb(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 rb(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 rb(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 nb={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}};function ob(t){return Object(Qr.values)(t).some((function(t){return Object(Qr.isEmpty)(t)}))}function ib(t,e){var r=t.getParamModelAssemblies().find((function(t){return t.id===e}));if(r||(r=t.getParamModels().find((function(t){return t.id===e}))),!r)return[];for(var n=[],o=[r];o.length;){var i=o.shift();n.push(i.id),o.push.apply(o,eb(i.getChildNodes()))}return n}function ab(t){return Object(Qr.uniq)(["holes","grooves","hardwares","hardwareGrooves"].map((function(e){return Object(Qr.keys)(t[e]).sort()})).flat())}function sb(t,e){var r=new Set(e);return t.filter((function(t){return!r.has(t)}))}var ub=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&&XC(t,e)}(i,t);var e,r,n,o=ZC(i);function i(){var t;return VC(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({autoSave:!0,designLoading:Lm.FAIL,design:Object(Qr.cloneDeep)(nb)}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(HC().mark((function t(e,r){var n,o,i,a,s,u,c,A;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(vC);case 1:return o=n.$actionAddModelToSense.done.messageType(),i=this.$actionRestoreFittingDesign.messageType(),a=n.$actionAutoRefreshModel.messageType(),t.next=7,Object(QI.take)([o,i,a]);case 7:s=r.core,u=s.fittingDesign,c=s.design,u.setFittings([]),u.setGrooveFittings([]),c.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V1&&t.dispose()})),A=this.state.state.design,this.fittingAddDataToFittingDesignSense(A),this.getAxr(_I).loadFittingHardwareToSense({hardware:A.hardwares}),t.next=1;break;case 17:case"end":return t.stop()}}),t,this)})))})),t.$actionEnableAutoSave=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.autoSave=e}))})),t.initFittingDesign=function(){t.$actionRestoreFittingDesign.dispatch(Object(Qr.cloneDeep)(nb))},t.getConnectedFittingDesign=function(){var e=YC(HC().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h=arguments;return HC().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],o=t.state.state.design,r){e.next=4;break}return e.abrupt("return",Object(Qr.cloneDeep)(o));case 4:if(i={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){e.next=26;break}a=o.hardwares||{},e.t0=HC().keys(a);case 8:if((e.t1=e.t0()).done){e.next=18;break}if(c=e.t1.value,!a.hasOwnProperty(c)){e.next=16;break}if(!(A=Object(Qr.find)(a[c]||[],(function(t){return t.id===r})))){e.next=16;break}return u=c,s=A,e.abrupt("break",18);case 16:e.next=8;break;case 18:if(s&&u){e.next=20;break}throw new Error("当前五金不存在!");case 20:l=s.linkedIds,f=function(t){return l.includes(t.id)},i.holes[u]=Object(Qr.filter)(o.holes[u],f),i.grooves[u]=Object(Qr.filter)(o.grooves[u],f),e.next=27;break;case 26:Object(Qr.keys)(i).forEach((function(t){o[t]&&o[t][r]&&(i[t][r]=Object(Qr.cloneDeep)(o[t][r]))}));case 27:return e.abrupt("return",i);case 28:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.fittingAddDataToFittingDesignSense=function(){var e=YC(HC().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p;return HC().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ME(1);case 2:n=t.stateManager.core,o=n.fittingDesign,i=n.pad,a=p_().fittingDesign.senseSetting.getSenseSettings(),s=Object(Qr.pick)(a,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,A=r.grooves,l=void 0===A?{}:A,f=r.hardwareGrooves,h=void 0===f?{}:f,p={findRelativeModel:i.findModelOrAssemblyModelById,transformModel:ts},o.setFittings([].concat(eb(Pd(c,GC(GC({},p),{},{type:J.HOLE,defaultConfig:s}))),eb(Pd(l,GC(GC({},p),{},{type:J.GROOVE,defaultConfig:s}))))),o.setGrooveFittings(Pd(h,GC(GC({},p),{},{type:J.HARDWARE_GROOVE,transformModel:Gs,defaultConfig:s})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.appendFittingDataToFittingDesign=function(){var e=YC(HC().mark((function e(r,n){var o,i,a,s,u,c,A,l,f,h,p;return HC().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.state.state,a=i.design,s=i.autoSave,u=!r.id||r.id===a.id,c=nb,A=n.timeout,l=n.save,f=void 0===l?s:l,h={id:null!==(o=r.id)&&void 0!==o?o:a.id,holes:GC(GC({},u?a.holes:c.holes),r.holes||{}),grooves:GC(GC({},u?a.grooves:c.grooves),r.grooves||{}),hardwares:GC(GC({},u?a.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:GC(GC({},u?a.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Qr.pull)(Object(Qr.keys)(h),"id").forEach((function(t){var e=h[t];Object(Qr.keys)(e).forEach((function(t){0===e[t].length&&delete e[t]}))})),!f){e.next=12;break}return p=RE(A),t.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),e.abrupt("return",p.promise);case 12:t.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.$actionRestoreFittingDesign=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.design=e}))})),t.$actionLoadFittingDesign=t.unitCreator.async((function(t){t.started.every(HC().mark((function t(e,r){var n,o,i,a,s=this;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.$actionLoadFittingDesign,o=e.params,t.next=4,TC(o.modelid);case 4:return i=t.sent,t.prev=5,t.next=8,PL(GC(GC({},o),i));case 8:a=t.sent,Us.Util.safeExec((function(){var t=r.core.design.getCustom(),n=s.getAxr(bw).state.state.currModelId;if(n===e.params.modelid&&a){var o=ib(t,n),i=ab(a),u=sb(i,o);zm(Tv).log({logKey:"miniAppFittingDesignRead",modelId:n,fittingConnectedIds:i.join(","),notExistsIds:u.join(","),notExistsIdsCount:!!u.length})}})),n.done.dispatch({params:e,result:{designData:a,modelId:i.modelid}}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(5),n.failed.dispatch({params:e});case 16:case"end":return t.stop()}}),t,this,[[5,13]])}))),t.done.every((function(t,e){var r=this.$actionRestoreFittingDesign,n=t.result.designData?t.result.designData:Object(Qr.cloneDeep)(nb),o=this.getAxr(bw).state.state.currModelId;t.result.modelId===o&&r.dispatch(n);var i=t.params.defer;i&&i.resolve(t.result.designData)})),t.failed.every((function(t,e){var r,n=this.getAxr(bw).state.state.currModelId;(null===(r=t.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var o=t.params.defer;o&&o.reject(new Error("load fitting design error"))}))})),t.$actionClearFittingDesign=t.unitCreator.async((function(t){t.started.every(HC().mark((function t(e,r){var n,o,i,a,s;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getAxr(bw).state.state.currModelId,o=e.modelId,i=void 0===o?n:o,t.next=4,TC(i);case 4:return a=t.sent,s=this.$actionClearFittingDesign,t.prev=6,t.next=9,DL(a);case 9:s.done.dispatch({params:e,result:void 0}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(6),s.failed.dispatch({params:e});case 15:case"end":return t.stop()}}),t,this,[[6,12]])}))),t.done.every(HC().mark((function t(e,r){var n,o,i;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=this.getAxr(bw).state.state.currModelId,(null!==(n=e.params.modelId)&&void 0!==n?n:o)===o&&this.initFittingDesign(),(i=e.params.defer)&&i.resolve();case 5:case"end":return t.stop()}}),t,this)}))),t.failed.every(HC().mark((function t(e,r){var n;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return t.stop()}}),t)})))})),t.$actionSaveFittingDesign=t.unitCreator.async((function(t){t.started.every(HC().mark((function t(e,r){var n,o,i,a,s,u=this;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.state.state.design,o=e.design,i=void 0===o?n:o,t.next=4,TC(i.id);case 4:return a=t.sent,s=this.$actionSaveFittingDesign,Us.Util.safeExec((function(){var t=zm(Tv),e=u.getAxr(bw).state.state.currModelId,o=r.core.design.getCustom();if(i&&(!i.id||e===a.modelid)){var s=ib(o,e),c=ab(i),A=sb(c,s);ob(Object(Qr.omit)(n,["id"]))?t.log({logKey:"FittingDesignCreate",modelId:a.modelid,allModelIds:s.join(","),fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length}):t.log({logKey:"FittingDesignUpdate",modelId:a.modelid,fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length})}})),t.prev=7,t.next=10,OL(GC(GC({},i),{},{id:a.modelid}),a);case 10:s.done.dispatch({params:e,result:void 0}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(7),s.failed.dispatch({params:e,result:t.t0});case 16:case"end":return t.stop()}}),t,this,[[7,13]])}))),t.failed.every(HC().mark((function t(e,r){var n,o;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&(o=e.result||new Error("保存失败"),n.reject(o));case 2:case"end":return t.stop()}}),t)}))),t.done.every(HC().mark((function t(e,r){var n,o,i;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.params.design,o=this.getAxr(bw).state.state.currModelId,!n||n.id&&n.id!==o||this.$actionRestoreFittingDesign.dispatch(n),(i=e.params.defer)&&setTimeout((function(){i.resolve()}));case 5:case"end":return t.stop()}}),t,this)})))})),t}return e=i,(r=[{key:"init",value:function(){KC(tb(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&qC(e.prototype,r),n&&qC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function cb(t){return(cb="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 Ab(t){return function(t){if(Array.isArray(t))return lb(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 lb(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 lb(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 lb(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 fb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */fb=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"==cb(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(cb(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 hb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pb(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,db(n.key),n)}}function db(t){var e=function(t,e){if("object"!=cb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==cb(e)?e:String(e)}function gb(){return(gb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=yb(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 yb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eb(t)););return t}function vb(t,e){return(vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mb(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=Eb(t);if(e){var o=Eb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ib(this,r)}}function Ib(t,e){if(e&&("object"===cb(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 Eb(t){return(Eb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Cb=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&&vb(t,e)}(i,t);var e,r,n,o=mb(i);function i(){var t;return hb(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshFittingHint=t.unitCreator.sync((function(t){t.latest(fb().mark((function t(){var e,r;return fb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateFittingHintConf=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){gb(Eb(i.prototype),"init",this).call(this),this.$actionRefreshFittingHint.dispatch()}},{key:"setFittingHint",value:function(t){this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"clearFittingHint",value:function(t){var e=t?Object(Qr.omit)(this.state.state.option,t):{};this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"setFittingHardwareHint",value:function(t){var e=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),r=Object(Qr.fromPairs)(e.map((function(t){return t.hardwareData?[t.hardwareData.id,t.id]:[]})).filter((function(t){return 2===t.length})));p_().scene.$actionModelHint.dispatch(Object(Qr.mapKeys)(t,(function(t,e){return r[e]||""})))}},{key:"clearFittingHardwareHint",value:function(t){t||p_().scene.$actionModelHint.dispatch({});var e=Object(Qr.castArray)(t),r=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),n=Object(Qr.fromPairs)(r.map((function(t){return t.hardwareData?[t.id,t.hardwareData.id]:[]})).filter((function(t){return 2===t.length}))),o=p_().scene.state.state.overrideMaterialOption;p_().scene.$actionModelHint.dispatch(Object(Qr.omitBy)(o,(function(t,r){var o=n[r];return!!o&&e.includes(o)})))}},{key:"rerenderToSense",value:function(){var t=this.state.state.option,e=this.stateManager.core,r=e.design,n=e.fittingDesign,o=r.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),i=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getRoundCornerGrooveModels(),A=n.getSpecialShapedGrooveModels(),l=n.getPathGrooveModels(),f=Object(Qr.map)(t,(function(t,e){var r=[].concat(Ab(o),Ab(i),Ab(a),Ab(s),Ab(u),Ab(c),Ab(A),Ab(l)).find((function(t){return t.id===e}));if(r)return new sn({linkModel:r,hintOutline:t.outline})})).filter((function(t){return!!t}));n.setFittingHintModels(f)}}])&&pb(e.prototype,r),n&&pb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function bb(t){return(bb="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 Bb(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,wb(n.key),n)}}function wb(t){var e=function(t,e){if("object"!=bb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bb(e)?e:String(e)}var Pb=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.__changeMap={}}var e,r,n;return e=t,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({field:"isHidden"},this.isHidden,t),this.isHidden=t}},{key:"__trackUpdateField",value:function(t,e,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,o=t.field;e===r||n.some((function(t){return t.field===o}))||n.push({field:o})}}])&&Bb(e.prototype,r),n&&Bb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Sb(t){var e,r=new Pb;if(r.id=t.id,t instanceof dr){if(!t.isAppendHardware)return;e=J.HARDWARE,r.isHidden=t.getInvisible(),r.originalData=t.hardwareData}else t instanceof En||t instanceof vo?(r.isHidden=!t.visible,e=t.type,r.originalData=t.fittingData):(r.isHidden=!t.visible,e=t.type,r.originalData=t.data);return r.linkParamModelId=t.linkParamModelId,r.modelType=e,r}function _b(t){return(_b="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 Qb(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Db(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 Ob(t){return function(t){if(Array.isArray(t))return xb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Db(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 Db(t,e){if(t){if("string"==typeof t)return xb(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)?xb(t,e):void 0}}function xb(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 Mb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rb(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,Tb(n.key),n)}}function Tb(t){var e=function(t,e){if("object"!=_b(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_b(e)?e:String(e)}function Lb(t,e){return(Lb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jb(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=Nb(t);if(e){var o=Nb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kb(this,r)}}function kb(t,e){if(e&&("object"===_b(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 Nb(t){return(Nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fb=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&&Lb(t,e)}(i,t);var e,r,n,o=jb(i);function i(){return Mb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAllFittingModels",value:function(t){var e=new Set;if(t){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(t);if(!r)return[];for(var n=[r];n.length;){var o=n.shift();e.add(o.id),n.push.apply(n,Ob((null==o?void 0:o.getChildNodes())||[]))}}var i=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),a=this.stateManager.core.fittingDesign.getFittings(),s=this.stateManager.core.fittingDesign.getGrooveFittings(),u=this.stateManager.core.fittingDesign.getHoleModels(),c=this.stateManager.core.fittingDesign.getSquareGrooveModels(),A=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),l=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),f=this.stateManager.core.fittingDesign.getPathGrooveModels(),h=[].concat(Ob(i),Ob(a),Ob(s),Ob(u),Ob(c),Ob(A),Ob(l),Ob(f));return e.size>0&&(h=h.filter((function(t){return e.has(t.linkParamModelId)}))),h.map((function(t){return Sb(t)}))}},{key:"findHardwareParamModels",value:function(t){var e,r=[],n=Qb(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.isAppendHardware&&r.push(o),r.push.apply(r,Ob(this.findHardwareParamModels(o.getChildNodes())))}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"save",value:function(t){var e,r=[],n=[],o=Qb(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;i.modelType===J.HARDWARE?r.push(i):n.push(i)}}catch(t){o.e(t)}finally{o.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(t){var e=this.stateManager.core.pad;t.forEach((function(t){var r=e.findModelOrAssemblyModelById(t.id);if(r){var n=t.__changeMap.update;(void 0===n?[]:n).forEach((function(e){"isHidden"===e.field&&r.setInvisible(t.getHidden())})),t.__changeMap.update=[]}})),fL().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(t){var e=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getHoleModels(),o=this.stateManager.core.fittingDesign.getSquareGrooveModels(),i=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),a=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),s=this.stateManager.core.fittingDesign.getPathGrooveModels(),u=this.stateManager.core.fittingDesign.getFittingHintModels();t.forEach((function(t){var c;t.modelType===J.HARDWARE_GROOVE?c=r.find((function(e){return e.id===t.id})):t.modelType===J.HOLE||t.modelType===J.GROOVE?c=e.find((function(e){return e.id===t.id})):t.modelType===J.HOLE_V2?c=n.find((function(e){return e.id===t.id})):t.modelType===J.SQUARE_GROOVE?c=o.find((function(e){return e.id===t.id})):t.modelType===J.ROUND_CORNER_GROOVE?c=i.find((function(e){return e.id===t.id})):t.modelType===J.SPECIAL_SHAPED_GROOVE?c=a.find((function(e){return e.id===t.id})):t.modelType===J.PATH_GROOVE&&(c=s.find((function(e){return e.id===t.id})));var A=u.find((function(e){return e.linkModel.id===t.id}));if(c){var l=t.__changeMap.update;(void 0===l?[]:l).forEach((function(e){"isHidden"===e.field&&(null==c||c.setVisible(!t.getHidden()),null==A||A.setVisible(!t.getHidden()))})),t.__changeMap.update=[]}}))}}])&&Rb(e.prototype,r),n&&Rb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function Gb(t){return(Gb="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 Ub(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 zb(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ub(i,n,o,a,s,"next",t)}function s(t){Ub(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Yb(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 Hb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yb(Object(r),!0).forEach((function(e){Vb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vb(t,e,r){return(e=Zb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */qb=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"==Gb(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(Gb(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 Wb(t){return function(t){if(Array.isArray(t))return Kb(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 Kb(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 Kb(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 Kb(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 Jb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xb(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,Zb(n.key),n)}}function Zb(t){var e=function(t,e){if("object"!=Gb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Gb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gb(e)?e:String(e)}function $b(){return($b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=tB(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 tB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oB(t)););return t}function eB(t,e){return(eB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rB(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=oB(t);if(e){var o=oB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nB(this,r)}}function nB(t,e){if(e&&("object"===Gb(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 oB(t){return(oB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iB=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&&eB(t,e)}(a,t);var e,r,n,o,i=rB(a);function a(){var t;return Jb(this,a),(t=i.apply(this,arguments)).state=t.stateCreator.create({fittings:[],hardwares:[]}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionAddFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.fittings=[].concat(Wb(t.fittings),[e])}))})),t.$actionClearFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.fittings=[]}))})),t.$actionAddHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.hardwares=[].concat(Wb(t.hardwares),[e])}))})),t.$actionClearHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.hardwares=[]}))})),t.$actionViewerInit=t.unitCreator.sync((function(t){t.latest(qb().mark((function t(e,r){var n,o;return qb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(vC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(QI.take)([o]);case 5:this.clearHardware(),this.clearFitting(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshFittingViewer=t.unitCreator.sync((function(t){t.latest(qb().mark((function t(){var e,r,n,o,i=this;return qb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:n=this.state.state.hardwares,o=this.state.state.fittings,this.clearHardware(),this.clearFitting(),o.forEach((function(t){return i.addFitting(t)})),n.forEach((function(t){return i.addHardware(t)})),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.addFitting=function(e){var r,n,o=Object(Qr.cloneDeep)(e);return null===(r=o.holes)||void 0===r||r.forEach((function(t){Object(Qr.isNil)(t.holeId)&&(t.holeId=Object(Jr.default)())})),null===(n=o.grooves)||void 0===n||n.forEach((function(t){Object(Qr.isNil)(t.grooveId)&&(t.grooveId=Object(Jr.default)())})),t.addDataToFittingViewer(o),t.$actionAddFitting.dispatch(o),o},t.clearFitting=function(){var e=t.stateManager.core.fittingDesign;e.setHoleModels([]),e.setSquareGrooveModels([]),e.setRoundCornerGrooveModels([]),e.setSpecialShapedGrooveModels([]),e.setPathGrooveModels([]),t.$actionClearFitting.dispatch()},t.getFitting=function(e){var r=t.state.state.fittings,n=Object(Qr.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.getHardware=function(e){var r=t.state.state.hardwares,n=Object(Qr.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.addDataToFittingViewer=function(e){var r,n,o,i,a,s,u,c,A,l=t.stateManager.core.fittingDesign,h=p_().fittingDesign.senseSetting.getSenseSettings(),p=Object(Qr.pick)(h,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),d={findRelativeModel:LC},g=e.modelId,y=e.finishedProfile,v=e.holes,m=e.grooves,I=e.referencePlane;if(v&&(a=v.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Od}),{color:p.holeColor,opacity:p.holeOpacity})}))),m){var E=Object(Qr.groupBy)(m,"geometryType");s=null===(r=E[f.SQUARE])||void 0===r?void 0:r.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Dd}),{color:p.grooveColor,opacity:p.grooveOpacity})})),u=null===(n=E[f.ROUND_CORNER])||void 0===n?void 0:n.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:xd}),{color:p.grooveColor,opacity:p.grooveOpacity})})),c=null===(o=E[f.SPECIAL_SHAPED])||void 0===o?void 0:o.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Md}),{color:p.grooveColor,opacity:p.grooveOpacity})})),A=null===(i=E[f.PATH])||void 0===i?void 0:i.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Rd}),{color:p.grooveColor,opacity:p.grooveOpacity})}))}a&&a.length>0&&l.addHoleModels(a),s&&s.length>0&&l.addSquareGrooveModels(s),u&&u.length>0&&l.addRoundCornerGrooveModels(u),c&&c.length>0&&l.addSpecialShapedGrooveModels(c),A&&A.length>0&&l.addPathGrooveModels(A)},t.addHardwareToViewer=function(){var e=zb(qb().mark((function e(r){var n,o,i,a;return qb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.modelId,o=r.hardwares,i=LC(n)){e.next=4;break}throw new Error("".concat(n," 关联的模型不存在"));case 4:return a=Nd(i),e.next=7,t.getAxr(_I).loadFittingHardwareToSense({hardware:Vb({},a.id,o)},ge.V2);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=a,(r=[{key:"init",value:function(){$b(oB(a.prototype),"init",this).call(this),this.$actionViewerInit.dispatch(),this.$actionRefreshFittingViewer.dispatch()}},{key:"initFittingViewer",value:function(){this.clearHardware(),this.clearFitting()}},{key:"addHardware",value:(o=zb(qb().mark((function t(e){var r,n;return qb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(Qr.cloneDeep)(e),null===(r=n.hardwares)||void 0===r||r.forEach((function(t){Object(Qr.isNil)(t.id)&&(t.id=Object(Jr.default)())})),t.next=4,this.addHardwareToViewer(n);case 4:return this.$actionAddHardware.dispatch(n),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"clearHardware",value:function(){this.stateManager.core.design.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V2&&t.dispose()})),this.$actionClearHardware.dispatch()}}])&&Xb(e.prototype,r),n&&Xb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(QC);function aB(t){return(aB="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 sB=["modelId","defer"],uB=["timeout","modelId"];function cB(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 AB(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 lB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?AB(Object(r),!0).forEach((function(e){fB(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fB(t,e,r){return(e=yB(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hB(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function pB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */pB=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"==aB(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(aB(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 dB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gB(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,yB(n.key),n)}}function yB(t){var e=function(t,e){if("object"!=aB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aB(e)?e:String(e)}function vB(){return(vB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=mB(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 mB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=bB(t)););return t}function IB(t,e){return(IB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function EB(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=bB(t);if(e){var o=bB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return CB(this,r)}}function CB(t,e){if(e&&("object"===aB(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 bB(t){return(bB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var BB=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&&IB(t,e)}(s,t);var e,r,n,o,i,a=EB(s);function s(){var t;return dB(this,s),(t=a.apply(this,arguments)).state=t.stateCreator.create({intersectedLoading:Lm.FAIL,intersectedResult:void 0,intersectedVisible:!1}),t.$reducerState=t.reducerCreator.create(t.state),t._getParamModelIntersectedCallback=[],t.$actionRefreshIntersect=t.unitCreator.sync((function(t){t.latest(pB().mark((function t(){var e,r,n;return pB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:(n=this.state.state.intersectedResult)&&this.$actionAddIntersectedDataToSense.dispatch(n),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionLoadParamModelIntersectedData=t.unitCreator.async((function(e){e.started.every(pB().mark((function t(e,r){var n,o,i,a,s,u,c,A,l;return pB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,TC(e.modelId);case 2:return n=t.sent,o=zm(Ov),i=e.modelId,a=void 0===i?n.modelid:i,s=e.defer,u=hB(e,sB),c=p_().viewParamModel.state.state.currModelId===a,A=this.$actionLoadParamModelIntersectedData,t.prev=7,t.next=10,o.getIntersectedById(lB({modelId:a},u));case 10:if(l=t.sent,!c){t.next=14;break}return t.next=14,A.done.dispatch({params:e,result:{result:l,modelId:a}});case 14:s&&s.resolve(l),t.next=21;break;case 17:t.prev=17,t.t0=t.catch(7),this._getParamModelIntersectedCallback.forEach((function(e){e.reject(t.t0)}));case 21:case"end":return t.stop()}}),t,this,[[7,17]])}))),e.done.every((function(e,r){var n=e.params.defer,o=p_().viewParamModel.state.state.currModelId;n&&n.resolve(e.result.result),e.result.modelId===o&&t.$actionAddIntersectedDataToSense.dispatch(e.result.result)})),e.started.produce(t.$reducerState,(function(t,e){t.intersectedLoading=Lm.LOADING})),e.done.produce(t.$reducerState,(function(t,e){t.intersectedLoading=Lm.SUCCESS,t.intersectedResult=e.result.result})),e.failed.produce(t.$reducerState,(function(t,e){t.intersectedLoading=Lm.FAIL}))})),t.$actionAddIntersectedDataToSense=t.unitCreator.sync((function(e){e.every((function(e,r){var n=r.core,o=n.fittingDesign,i=n.pad,a=t.state.state.intersectedVisible,s=t.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),u=s.intersectedColor,c=s.intersectedBodyColor,A=s.intersectedThroughColor,l=s.grooveIntersectedColor,f=s.grooveIntersectedBodyColor;o.setIntersects([]);var h=e.option,p=void 0===h?{}:h,d=e.intersectedGroups,g=Object(Qr.map)(d,(function(t){var e=!0===p.references?1:0,r=t.intersecteds[e],n=r["@type"],o=t.intersectType;if(void 0!==p.plankFaceIds){var a=NE(r)||Object(Qr.isNil)(r.plankFaceId)?null:r.plankFaceId;if(!p.plankFaceIds.includes(a))return!1}var s=i.findModelOrAssemblyModelById(r.linkedModelId);if(s){var h=bs(t,r,s),d=new Map([[$.BOTH_PLANK,new Map([[X.FACE,u],[X.SHELL,c],[X.THROUGH_SHELL,A]])],[$.PLANK_FURNITURE,new Map([[X.FACE,l],[X.SHELL,f]])]]).get(o).get(n);return h.setViewColor(d),h}})).filter((function(t){return!!t}));o.setIntersects(g),a||r.kaf.invisibleManager.hide("scene3d",Wm,g.map((function(t){return t.id})))}))})),t.$actionToggleShowIntersected=t.unitCreator.sync((function(e){e.latest((function(t,e){var r=e.core.fittingDesign;t?e.kaf.invisibleManager.display("scene3d",Wm,r.getIntersects().map((function(t){return t.id}))):e.kaf.invisibleManager.hide("scene3d",Wm,r.getIntersects().map((function(t){return t.id})))})),e.produce(t.$reducerState,(function(t,e){t.intersectedVisible=e}))})),t.toggleShowIntersectGroupData=function(e){var r=t.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");t.$actionAddIntersectedDataToSense.dispatch(lB(lB({},r),{},{option:e}))},t}return e=s,(r=[{key:"init",value:function(){vB(bB(s.prototype),"init",this).call(this),this.$actionRefreshIntersect.dispatch()}},{key:"getParamModelIntersectedData",value:(o=pB().mark((function t(e){var r,n,o,i,a,s,u,c,A,l=this;return pB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p_().viewParamModel.state.state.currModelId,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r:a,u=hB(n,uB),c=RE(i),this.$actionLoadParamModelIntersectedData.started.dispatch(lB(lB({modelId:s},u),{},{defer:c,timeout:i})),this._getParamModelIntersectedCallback.push(c),A=function(){var t=l._getParamModelIntersectedCallback.indexOf(c);l._getParamModelIntersectedCallback.splice(t,1)},t.abrupt("return",c.promise.then((function(t){return A(),t})).catch((function(t){return A(),Promise.reject(t)})));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){cB(i,r,n,a,s,"next",t)}function s(t){cB(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&gB(e.prototype,r),n&&gB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(QC);function wB(t){return(wB="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 PB(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 SB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?PB(Object(r),!0).forEach((function(e){_B(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):PB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _B(t,e,r){var n;return n=function(t,e){if("object"!=wB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=wB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==wB(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QB(t,e){var r=e.x,n=e.y,o=e.z;[0,5].includes(t)&&(r-=.1,n-=.1),[1,3].includes(t)&&(o-=.1,r-=.1),[2,4].includes(t)&&(o-=.1,n-=.1);var i=r/2,a=n/2,s=o/2,u=[{x:-i,y:-a,z:s},{x:i,y:-a,z:s},{x:i,y:a,z:s},{x:-i,y:a,z:s}],c=u.map((function(t){return SB(SB({},t),{},{z:-t.z})}));switch(t){case 0:return u;case 1:return[u[0],c[0],c[3],u[3]];case 2:return[u[0],c[0],c[1],u[1]];case 3:return[u[1],c[1],c[2],u[2]];case 4:return[u[2],c[2],c[3],u[3]];case 5:return c}return[]}function OB(t){return(OB="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 DB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */DB=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"==OB(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(OB(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 xB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MB(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,RB(n.key),n)}}function RB(t){var e=function(t,e){if("object"!=OB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OB(e)?e:String(e)}function TB(){return(TB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=LB(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 LB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=FB(t)););return t}function jB(t,e){return(jB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kB(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=FB(t);if(e){var o=FB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return NB(this,r)}}function NB(t,e){if(e&&("object"===OB(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 FB(t){return(FB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GB={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},UB=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&&jB(t,e)}(i,t);var e,r,n,o=kB(i);function i(){var t;return xB(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{},defaultConfig:GB}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshPlankFaceHint=t.unitCreator.sync((function(t){t.latest(DB().mark((function t(){var e,r;return DB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateDefaultOption=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.defaultConfig=Object(Qr.extend)({},t.defaultConfig,e)}))})),t.$actionUpdateHintOption=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){TB(FB(i.prototype),"init",this).call(this),this.$actionRefreshPlankFaceHint.dispatch()}},{key:"setDefaultHintConfig",value:function(t){this.$actionUpdateDefaultOption.dispatch(t)}},{key:"setModelHint",value:function(t){var e=this,r=Object(Qr.mapValues)(t,(function(t){return function(t,e){var r={};return Object(Qr.isObject)(t.hintOutline)?r.hintOutline=t.hintOutline:!0===t.hintOutline&&(r.hintOutline=e.outline),t.hintPlankFace&&t.hintPlankFace.length&&(r.hintPlankFace=t.hintPlankFace.map((function(t){var r="color"in t?t:e.plankFace,n=r.color,o=r.opacity;return Object(Qr.isArray)(t.plankFaceId)?t.plankFaceId.map((function(t){return{color:n,opacity:o,plankFaceId:t}})):{plankFaceId:t.plankFaceId,color:n,opacity:o}})).flat()),r}(t,e.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(t){var e=t?Object(Qr.omit)(this.state.state.option,t):{};this.setModelHint(e)}},{key:"rerenderToSense",value:function(){var t=this.stateManager.core,e=t.fittingDesign,r=t.pad,n=this.state.state.option,o=Object(Qr.map)(n,(function(t,e){var n=r.findModelOrAssemblyModelById(e);if(n)return function(t,e){var r={linkModel:e};if(t.hintPlankFace&&t.hintPlankFace.length){var n=e.getSize();r.plankFaces=t.hintPlankFace.map((function(t){var e=qa(t.plankFaceId,Se.default).mul(.1),r=QB(t.plankFaceId,n).map((function(t){var r=new Se.default(t).add(e);return{x:r.x,y:r.y,z:r.z}}));return SB(SB({},t),{},{points:r})}))}if(t.hintOutline&&(r.hintOutline=t.hintOutline),r.plankFaces||r.hintOutline)return new $o(r)}(t,n)})).filter((function(t){return!!t}));e.setPlankFaceHintModels(o)}}])&&MB(e.prototype,r),n&&MB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function zB(t){return(zB="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 YB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HB(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,VB(n.key),n)}}function VB(t){var e=function(t,e){if("object"!=zB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zB(e)?e:String(e)}function qB(t,e){return(qB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function WB(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=JB(t);if(e){var o=JB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return KB(this,r)}}function KB(t,e){if(e&&("object"===zB(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 JB(t){return(JB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var XB=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&&qB(t,e)}(i,t);var e,r,n,o=WB(i);function i(){var t;return YB(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:he,holeOpacity:1,grooveOpacity:1,attachOrderRender:!0}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionSenseSetting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){e.renderIgnoreCategory&&(e.renderIgnoreCategory=Object(Qr.castArray)(e.renderIgnoreCategory)),Object(Qr.extend)(t,e)}))})),t}return e=i,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&HB(e.prototype,r),n&&HB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function ZB(t){return(ZB="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 $B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tw(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,ew(n.key),n)}}function ew(t){var e=function(t,e){if("object"!=ZB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ZB(e)?e:String(e)}function rw(t,e){return(rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nw(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=iw(t);if(e){var o=iw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ow(this,r)}}function ow(t,e){if(e&&("object"===ZB(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 iw(t){return(iw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var aw=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&&rw(t,e)}(i,t);var e,r,n,o=nw(i);function i(){var t;return $B(this,i),(t=o.apply(this,arguments)).fittingDesignSense=t.partialCreator.create(ub),t.intersected=t.partialCreator.create(BB),t.senseSetting=t.partialCreator.create(XB),t.fittingModel=t.partialCreator.create(Fb),t.plankFaceHint=t.partialCreator.create(UB),t.fittingHint=t.partialCreator.create(Cb),t.fittingViewer=t.partialCreator.create(iB),t}return e=i,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&tw(e.prototype,r),n&&tw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);function sw(t){return(sw="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 uw(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 cw(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){uw(i,n,o,a,s,"next",t)}function s(t){uw(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Aw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Aw=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"==sw(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(sw(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 lw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fw(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,hw(n.key),n)}}function hw(t){var e=function(t,e){if("object"!=sw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=sw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==sw(e)?e:String(e)}function pw(){return(pw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=dw(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 dw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mw(t)););return t}function gw(t,e){return(gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yw(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=mw(t);if(e){var o=mw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vw(this,r)}}function vw(t,e){if(e&&("object"===sw(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 mw(t){return(mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Iw(t){return function(t){if(Array.isArray(t))return Ew(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 Ew(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 Ew(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 Ew(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 Cw(t){var e=t.map((function(t){return t.subModels&&t.subModels.length?Cw(t.subModels):[]})).flat();return e.push.apply(e,Iw(t)),e}var bw=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&&gw(t,e)}(f,t);var e,r,n,o,i,a,s,u,c,A,l=yw(f);function f(){var t;return lw(this,f),(t=l.apply(this,arguments)).state=t.stateCreator.create({loading:Lm.FAIL,allSubModels:[],result:void 0,currModelId:""}),t.$reducerState=t.reducerCreator.create(t.state),t._startAutoSyncModelView=Object(Qr.once)((function(){zL(!0);var e=Object(Qr.debounce)((function(e){t._refreshCustomModel(e)}),500),r=function(r){var n=t.state.state.currModelId;r.some((function(t){return t.id===n}))&&e(n)};FL().on(r),GL().on(r),UL().on(r)})),t.$actionSetModelId=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.currModelId!==e&&(t.result=void 0,t.allSubModels=[]),t.currModelId=e}))})),t.$actionLoadParamModelJsonData=t.unitCreator.async((function(e){e.started.every(Aw().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 Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.defer,o=e.hasFitting,i=void 0!==o&&o,a=e.force,s=void 0!==a&&a,u=e.templateId,c=void 0===u?XE("getJsonConfig").defaultTemplateId:u,A=e.timeout,l=e.ignoreResetPosition,f=void 0===l?XE("getJsonConfig").ignoreResetPosition:l,h=this.state.state,p=h.currModelId,d=h.result,g=h.currTemplateId,r){t.next=4;break}throw new Error("not selected model!");case 4:if(y=r===p,v=g===c,m=this.$actionLoadParamModelJsonData,t.prev=7,I=y&&!s&&v?d:void 0,!i||I){t.next=13;break}return t.next=12,jL(r,c);case 12:I=t.sent;case 13:if(I){t.next=18;break}return BL.delete(r),t.next=17,kL(r,c,f,A);case 17:I=t.sent;case 18:if(I){t.next=20;break}throw new Error("输入json数据出现异常");case 20:return E=y&&!c?Cw(I.paramModel):this.state.state.allSubModels,y&&p_().scene.$actionToggleSelectModel.dispatch(!0),t.next=24,m.done.dispatch({params:e,result:{ossContent:I,allSubModels:E}});case 24:t.next=31;break;case 26:return t.prev=26,t.t0=t.catch(7),t.next=30,m.failed.dispatch({params:e});case 30:n&&n.reject(t.t0);case 31:case"end":return t.stop()}}),t,this,[[7,26]])}))),e.done.every((function(t){var e=t.params.defer;e&&e.resolve(t.result.ossContent)})),e.started.produce(t.$reducerState,(function(t,e){t.loading=Lm.LOADING})),e.done.produce(t.$reducerState,(function(t,e){var r=e.result,n=r.ossContent,o=r.allSubModels,i=e.params,a=i.templateId,s=i.modelId===t.currModelId;t.loading=Lm.SUCCESS,t.result=s?n:t.result,t.allSubModels=s?o:t.allSubModels,t.currTemplateId=a})),e.failed.produce(t.$reducerState,(function(t,e){t.loading=Lm.FAIL}))})),t}return e=f,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"init",value:function(){pw(mw(f.prototype),"init",this).call(this)}},{key:"_refreshCustomModel",value:(A=cw(Aw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p=this;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.state.state.currModelId===e){t.next=2;break}return t.abrupt("return");case 2:return r=this.getStateManager().core.design.getCustom(),n=r.getParamModels().filter((function(t){return!t.isAppendHardware})),o=r.getParamModelAssemblies(),t.next=7,LL(e);case 7:i=t.sent,a=new nE,i.context&&a.unSerialize(i.context),s=SE(i,a),u=s.paramModels,c=s.paramModelAssemblies;try{A=Object(Qr.keyBy)(u,(function(t){return t.id})),(l=xA(n,u,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModels(t)})),l.delete.forEach((function(t){return r.removeParamModel(t)})),l.update.forEach((function(t){return new wE(A[t.id]).generate(t)})),f=Object(Qr.keyBy)(c,(function(t){return t.id})),(h=xA(o,c,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModelAssemblies(t)})),h.delete.forEach((function(t){return r.removeParamModelAssembly(t)})),h.update.forEach((function(t){return new pE(f[t.id]).generate(t)})),this.getAxr(vC).$actionAutoRefreshModel.dispatch()}catch(t){console.error("partial sync model view fail",t),r.setParamModels(u),r.setParamModelAssemblies(c)}this.getStateManager().core.pad.once($h.EVENT_PARAM_MODELS_CHANGED,(function(){p.getAxr(vC).$actionAutoRefreshModel.dispatch(),VI&&qI(VI)}));case 14:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"viewParamModelById",value:(c=cw(Aw().mark((function t(e){var r,n,o,i,a,s,u,c,A;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Qr.isArray)(e)?e[0]:e,this.$actionSetModelId.dispatchResolve(r),(n=p_().scene).cameraController.$actionInit.dispatch(),this.resetView(),(o=this.getAxr(aw).fittingDesignSense).initFittingDesign(),this.getAxr(aw).fittingViewer.initFittingViewer(),function(){var t=cw(Aw().mark((function t(){var e;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=RE(),o.$actionLoadFittingDesign.started.dispatch({defer:e,params:{modelid:r}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),t.next=14,this.getAxr(_I).getCurrentCustomData(r);case 14:return i=t.sent,a=new nE,i.context&&a.unSerialize(i.context),s=SE(i,a),(u=new je).addParamModels.apply(u,Iw(s.paramModels)),u.addParamModelAssemblies.apply(u,Iw(s.paramModelAssemblies)),t.next=23,this.getAxr(vC).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!i.context});case 23:if(t.prev=23,!p_().fittingDesign.senseSetting.getSenseSettings().attachOrderRender){t.next=30;break}return t.next=28,NL(r);case 28:(c=t.sent).length&&(A=c.reduce((function(t,e){return t[e.id]={opacity:.15,color:"#000000"},t}),{}),p_().scene.$actionSetCustomModelMaterial.dispatch(A));case 30:t.next=35;break;case 32:t.prev=32,t.t0=t.catch(23),console.error("组件提审模型获取失败",t.t0);case 35:case"end":return t.stop()}}),t,this,[[23,32]])}))),function(t){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=cw(Aw().mark((function t(){var e,r,n,o,i,a,s,u,c,A;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getStateManager().core.design.getCustom(),r=e.getParamModels().filter((function(t){return!t.isAppendHardware})),n=e.getParamModelAssemblies(),o=this.state.state.currModelId,(0!==r.length||0!==n.length)&&o){t.next=6;break}throw new Error("No custom model in the scene!");case 6:return e.clearAllParamModels(),t.next=9,LL(this.state.state.currModelId);case 9:return i=t.sent,a=new nE,i.context&&a.unSerialize(i.context),s=SE(i,a),e.addParamModels.apply(e,Iw(s.paramModels)),e.addParamModelAssemblies.apply(e,Iw(s.paramModelAssemblies)),u=this.getAxr(aw).fittingViewer,t.next=18,u.getFitting();case 18:return c=t.sent,t.next=21,u.getHardware();case 21:return A=t.sent,this.stateManager.core.pad.once($h.EVENT_PARAM_MODELS_CHANGED,(function(){c.map((function(t){return u.addFitting(t)})),A.map((function(t){return u.addHardware(t)}))})),t.next=26,this.getAxr(vC).$actionAddModelToSense.started.dispatchResolve({custom:e,needAttach:!i.context});case 26:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(s=cw(Aw().mark((function t(){var e,r;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=zm(cI.MiniAppSelectModelService),t.next=3,null==e?void 0:e.getSelected();case 3:if(!(null==(r=t.sent)?void 0:r.length)){t.next=9;break}return t.next=7,this.viewParamModelById(Object(Qr.map)(r,"id").filter((function(t){return!!t})));case 7:t.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"getParamModelJsonData",value:(a=cw(Aw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state.state,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r.currModelId:a,u=n.force,c=void 0!==u&&u,A=n.templateId,l=n.ignoreResetPosition,c){t.next=14;break}return h=RE(),this.getAxr(aw).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:h,params:{modelid:s}}),t.prev=5,t.next=8,h.promise;case 8:f=t.sent,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),console.log(t.t0);case 14:return p=RE(i),this.$actionLoadParamModelJsonData.started.dispatch({defer:p,modelId:s,hasFitting:!!f,force:c,templateId:A,timeout:"number"==typeof i?i/1e3:void 0,ignoreResetPosition:l}),t.abrupt("return",p.promise);case 17:case"end":return t.stop()}}),t,this,[[5,11]])}))),function(t){return a.apply(this,arguments)})},{key:"validateModelStable",value:function(t){var e=this.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(e){for(var r=[e],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var o=r.shift();o.getType()===es.ParamModelType.PARAM_PRIMITIVE&&o.getLegal()?(n.total++,o.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(o.id))):r.push.apply(r,Iw(o.getChildNodes()))}return n}}},{key:"getTopModelList",value:(i=cw(Aw().mark((function t(e){var r;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=zm(Kv),t.next=3,r.getTopParamModels(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(o=cw(Aw().mark((function t(e){var r,n,o,i;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Object(Qr.castArray)(e),n=zm(cI.MiniAppParamModelDataInfoService),o=[],i=r.length-1;case 4:if(!(i>=0)){t.next=10;break}return t.next=7,n.getParamModelPhotoById(r[i]).then((function(t){o.push(t)}));case 7:--i,t.next=4;break;case 10:return t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"resetView",value:function(){var t=this.getStateManager().core,e=t.design.getCustom();e.clearAllParamModels();var r=e.getParamModelAssemblies();r.length&&r.map((function(t){return e.removeParamModelAssembly(t)})),t.fittingDesign.setIntersects([]),t.fittingDesign.setPlankFaceHintModels([]),t.fittingDesign.setFittingHintModels([]),t.fittingDesign.setPlankOutlineHintModels([]),t.fittingDesign.setPlankAreaFaceHints([]),VI=void 0}}])&&fw(e.prototype,r),n&&fw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(Us.AXR);function Bw(t){return(Bw="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 ww(t){return function(t){if(Array.isArray(t))return Pw(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 Pw(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 Pw(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 Pw(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 Sw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Sw=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"==Bw(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(Bw(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 _w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qw(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,Ow(n.key),n)}}function Ow(t){var e=function(t,e){if("object"!=Bw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Bw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Bw(e)?e:String(e)}function Dw(){return(Dw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=xw(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 xw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lw(t)););return t}function Mw(t,e){return(Mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rw(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=Lw(t);if(e){var o=Lw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tw(this,r)}}function Tw(t,e){if(e&&("object"===Bw(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 Lw(t){return(Lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jw=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&&Mw(t,e)}(i,t);var e,r,n,o=Rw(i);function i(){var t;return _w(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({show:!1,message:"模型数据更新提示",description:"设计方案中的模型数据已更新,建议完成模型数据更新后继续操作",defaultPosition:{x:(window.innerWidth-360-12)/window.innerWidth,y:12/window.innerHeight}}),t.$reducerState=t.reducerCreator.create(t.state),t._detectionResultMap=new Map,t._prevDetectResult=void 0,t.$actionInit=t.unitCreator.sync((function(t){t.latest(Sw().mark((function t(e,r){var n,o,i,a;return Sw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(bw);case 1:return o=n.$actionSetModelId.messageType(),t.next=5,Object(QI.take)([o]);case 5:i=t.sent,a=i.payload,this._detectionResultMap.clear(),this._prevDetectResult=void 0,this.$actionMergeState.dispatch({show:!1}),HL(a),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.debEmitDetectResult=Object(Qr.debounce)((function(t){return Sr.emit(Br.DETECT_RESULT_CHANGE,t)}),100),t.getDetectResult=function(t){return ww(t.values()).every((function(t){return t}))},t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.enableDetectionOnce=Object(Qr.once)((function(){t.toggleDetection(!0)})),t.setDetectionUIOnce=Object(Qr.once)((function(e){var r=Object(Qr.cloneDeep)(e),n=r.defaultPosition;n&&(r.defaultPosition={x:n.x/window.innerWidth,y:n.y/window.innerHeight}),t.$actionMergeState.dispatch(r)})),t}return e=i,(r=[{key:"module",value:function(){return"Detection"}},{key:"init",value:function(){Dw(Lw(i.prototype),"init",this).call(this),this.$actionInit.dispatch(),this.initialization()}},{key:"initialization",value:function(){var t=this;YL().on((function(e){var r=e.productId,n=e.detectRuleItem,o=e.result;if(t.getAxr(bw).state.state.currModelId===r){t._detectionResultMap.set(n,o);var i=t.getDetectResult(t._detectionResultMap);i!==t._prevDetectResult&&(t.debEmitDetectResult({productId:r,result:i}),t._prevDetectResult=i),i?t.$actionMergeState.dispatch({show:!1}):t.$actionMergeState.dispatch({show:!0})}}))}},{key:"toggleDetection",value:function(t){VL(t)}}])&&Qw(e.prototype,r),n&&Qw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);function kw(t,e){for(var r=t.toFixed(e).split("."),n=r[1];"0"===n.charAt(n.length-1);)n=n.slice(0,n.length-1);return n?r[0]+"."+n:r[0]}function Nw(t){var e=new c.BBox3d;return t.forEach((function(t){e.addPoint(t.clone())})),new be.default(new Se.default({x:e.width,y:e.height,z:e.depth}),new Se.default(e.center),new Se.default({x:0,y:0,z:0}))}function Fw(t){return(Fw="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 Gw(t,e,r){var n;return n=function(t,e){if("object"!=Fw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Fw(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uw(t){return(Uw="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 zw(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,Hw(n.key),n)}}function Yw(t,e,r){return e&&zw(t.prototype,e),r&&zw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hw(t){var e=function(t,e){if("object"!=Uw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uw(e)?e:String(e)}var Vw=Yw((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.start=e,this.end=r,this.getMainLine=function(){var t=n.start.point,e=n.end.point;return new Ai.a(t.clone(),e.clone())},this.getCapLines=function(t){var e=n.start,r=e.point,o=e.face,i=e.element,a=n.end.point,s=n.getLineDirection,u=o.getNormal().clone(),c=r.clone(),A=a.clone(),l=s(),f=new Se.default,h=HE(i).getConcatenatedMatrix(),p=ns.a.decompose(h).euler,d=(new Pe.default).setFromEuler(p).invert();if(l===ve.Z)f=GE(new Se.default(0,t,0).applyQuaternion(d),u);else if(l===ve.Y){f=GE(new Se.default(t,0,0).applyQuaternion(d),u)}else{f=GE(new Se.default(0,0,t).applyQuaternion(d),u)}var g=f.clone().normalize().mul(t),y=f.clone().negate().normalize().mul(t);return[new Ai.a(new Se.default(c.x,c.y,c.z).add(g),new Se.default(c.x,c.y,c.z).add(y)),new Ai.a(new Se.default(A.x,A.y,A.z).add(g),new Se.default(A.x,A.y,A.z).add(y))]},this.getLineDirection=function(){var t=n.start,e=t.point,r=t.element,o=n.end.point,i=e.clone(),a=o.clone().clone().sub(i.clone()),s=HE(r).getConcatenatedMatrix(),u=ns.a.decompose(s).euler,c=(new Pe.default).setFromEuler(u);a.applyQuaternion(c);var A,l=(A=a,new Se.default(Math.abs(A.x),Math.abs(A.y),Math.abs(A.z))).normalize(),f=l.x,h=l.y,p=l.z,d=Math.max(f,h,p);return d===f?ve.X:d===h?ve.Y:ve.Z}}));function qw(t){return function(t){if(Array.isArray(t))return Jw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Kw(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 Ww(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)||Kw(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 Kw(t,e){if(t){if("string"==typeof t)return Jw(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)?Jw(t,e):void 0}}function Jw(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 Xw=new Map([[ve.X,{indexArray:[7,6],offsetNormal:new Se.default(0,0,1),lineColor:"#FF5533",lineOpacity:1,textStyle:{color:"#FF5533",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[ve.Y,{indexArray:[7,4],offsetNormal:new Se.default(-1,0,0),lineColor:"#16D9A8",lineOpacity:1,textStyle:{color:"#16D9A8",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[ve.Z,{indexArray:[0,4],offsetNormal:new Se.default(0,-1,0),lineColor:"#338BFF",lineOpacity:1,textStyle:{color:"#338BFF",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}]]),Zw=new Map([[ve.X,.5],[ve.Y,.7],[ve.Z,.3]]);function $w(t,e){var r=Xw.get(e);if(!r)throw new Error("unknown direction");var n=function(t){if(0!==t.length){var e=t[0].getMatrix(),r=(new we.default).getInverse(e),n=new os.default,o=ns.a.decompose(e).rotation;return t.forEach((function(t){n.includePoints(t.getPoints().map((function(t){return t.clone().applyMatrix4(r)})))})),new be.default(n.getSize().clone(),n.getCenter().clone().applyMatrix4(e),o)}}(t.map((function(t){return t.getConcatenatedBox3()})));if(!n)throw new Error("mergedBox not exist");var o=n.getPoints(),i=n.getRotation(),a=Ww(r.indexArray,2),s=a[0],u=a[1],c=r.offsetNormal,A=r.lineColor,l=r.lineOpacity,f=r.textStyle,h=c.clone().applyQuaternion((new Pe.default).setFromEuler(new Be.default(i.x,i.y,i.z))).normalize(),p=h.clone().mul(30),d=o[s].add(p),g=o[u].add(p),y=new Ai.a(d,g),v=h.clone().mul(20),m=v.clone().negate();return{mainLine:y,capLines:[new Ai.a(d.clone().add(v),d.clone().add(m)),new Ai.a(g.clone().add(v),g.clone().add(m))],lineStyle:{color:A,opacity:l},textStyle:f}}function tP(t){var e=new Map(t.map((function(t){return[t.getConcatenatedBox3(),t]}))),r=new Map(qw(e.keys()).map((function(t){return Object.values(function(t){var e=t.getPoints();function r(t,r,n){var o=e[t].clone(),i=Se.default.sub(e[r],o),a=Se.default.sub(e[n],o);return new Im.default(o,i,a)}return{faces:Gw(Gw(Gw(Gw(Gw(Gw({},Ie.Bottom,r(3,2,0)),Ie.Front,r(0,1,4)),Ie.Left,r(3,0,7)),Ie.Right,r(1,2,5)),Ie.Back,r(2,3,6)),Ie.Top,r(4,5,7))}}(t).faces).map((function(e){return[e,t]}))})).flat(1)),n=qw(r.keys()).reduce((function(t,e){var r=e.getNormal().clone(),n=qw(t.keys()).find((function(t){return Se.default.isParallel(t,r,.01)}));return n?t.get(n).push(e):t.set(r,[e]),t}),new Map);n.forEach((function(t,e){var n=t.map((function(t){return{face:t,faceOrder:Se.default.dot2(t.getCenter(),e),boxOrder:Se.default.dot2(r.get(t).getPosition(),e)}}));n.sort((function(t,e){return t.faceOrder-e.faceOrder}));var o=[];n.forEach((function(t){var e=o[o.length-1]||[],r=e[0];if(r&&c.Num.isEqual(r.faceOrder,t.faceOrder,.01))return void e.push(t);o.push([t])})),o.forEach((function(t){t.length>1&&t.sort((function(t,e){return t.boxOrder-e.boxOrder}))}));var i=new Map(o.flat(1).map((function(t,e){return[t.face,e]})));t.sort((function(t,e){return i.get(t)-i.get(e)}))}));var o=new Map;n.forEach((function(t,e){t.forEach((function(t,r,n){for(var i=t.getNormal().clone(),a=t.getCenter().clone(),s=new mm.a(a,i),u=Se.default.dot2(i,e)>0;;){u?r++:r--;var c=n[r];if(!c)break;var A=c.intersectRay(s,!1);if(A){if(Se.default.dot2(i,c.getNormal())>0)break;var l={facePair:[t,c],line:new Ai.a(a,A)};o.has(e)?o.get(e).push(l):o.set(e,[l]);break}}}))}));var i=qw(o.values()).map((function(t){return e=t,r=Object(Qr.groupBy)(e,(function(t){return t.facePair.map((function(t){return t.toString()})).slice().sort().join("-")})),Object.entries(r).map((function(t){var e=Ww(t,2),r=(e[0],e[1]);return r.sort((function(t,e){return Se.default.cross2(t.facePair[0].directionU.clone(),t.facePair[0].directionV.clone()).length()-Se.default.cross2(e.facePair[0].directionU.clone(),e.facePair[0].directionV.clone()).length()})),r[0]}));var e,r})).flat(1).filter((function(t){return t.line.length()>.4})).map((function(t){return new Vw({point:t.line.start,face:t.facePair[0],box:r.get(t.facePair[0]),element:e.get(r.get(t.facePair[0]))},{point:t.line.end,face:t.facePair[1],box:r.get(t.facePair[1]),element:e.get(r.get(t.facePair[1]))})})),a=Object(Qr.groupBy)(i,(function(t){return t.getLineDirection()})),s=new Map;return Object.entries(a).forEach((function(t){var e=Ww(t,2),r=e[0],n=e[1],o=Xw.get(r);s.set(r,{lineStyle:{color:o.lineColor,opacity:o.lineOpacity},textStyle:o.textStyle,lines:n.map((function(t){return{mainLine:t.getMainLine(),capLines:t.getCapLines(20)}}))})})),s}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 rP(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)||oP(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 nP(t){return function(t){if(Array.isArray(t))return iP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||oP(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 oP(t,e){if(t){if("string"==typeof t)return iP(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)?iP(t,e):void 0}}function iP(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 aP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */aP=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 sP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uP(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,cP(n.key),n)}}function cP(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)}function AP(t,e){return(AP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lP(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=hP(t);if(e){var o=hP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fP(this,r)}}function fP(t,e){if(e&&("object"===eP(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 hP(t){return(hP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pP=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=lP(i);function i(){var t;return sP(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({dimensionRulers:new Map,spacingDistanceRulers:new Map}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(aP().mark((function t(e,r){var n,o;return aP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(vC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(QI.take)([o]);case 5:this.$actionSetDimensionRulers.dispatch(new Map),this.$actionSetSpacingDistanceRulers.dispatch(new Map),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshRulerLines=t.unitCreator.sync((function(t){t.latest(aP().mark((function t(){var e,r;return aP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:this.refreshDimensionRulers(),this.refreshSpacingDistanceRulers(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionSetDimensionRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.dimensionRulers=e}))})),t.$actionSetSpacingDistanceRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.spacingDistanceRulers=e}))})),t.refreshDimensionRulers=function(){var e=t.state.state.dimensionRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeDimensionRulerConfig(i,a);r.set(n,{originData:o,rulerConfig:s})})),t.$actionSetDimensionRulers.dispatch(r)},t}return e=i,(r=[{key:"module",value:function(){return"RulerLine"}},{key:"init",value:function(){this.$actionInit.dispatch(),this.$actionRefreshRulerLines.dispatch()}},{key:"refreshSpacingDistanceRulers",value:function(){var t=this,e=this.state.state.spacingDistanceRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeSpacingDistanceRulers(i,a);r.set(n,{originData:o,rulerConfigs:s})})),this.$actionSetSpacingDistanceRulers.dispatch(r)}},{key:"_computeDimensionRulerConfig",value:function(t,e){var r,n,o,i,a,s=this,u=t.modelIds,c=t.direction;if(0===u.length)throw new Error("modelIds parameter array length must be greater than 0");var A=u.map((function(t){return s.stateManager.core.pad.findModelOrAssemblyModelById(t)})),l=A.filter((function(t){return!t}));if(l.length>0)throw new Error("model: ".concat(l.join(",")," not exist"));var f=$w(A,c),h=f.mainLine,p=f.capLines,d=f.lineStyle,g=f.textStyle;return{mainLine:h,capLines:p,text:kw(h.length(),1),textPosition:h.getCenter(),lineStyle:{color:null!==(n=null===(r=null==e?void 0:e.lineStyle)||void 0===r?void 0:r.color)&&void 0!==n?n:d.color,opacity:null!==(i=null===(o=null==e?void 0:e.lineStyle)||void 0===o?void 0:o.opacity)&&void 0!==i?i:d.opacity},textStyle:null!==(a=null==e?void 0:e.textStyle)&&void 0!==a?a:g}}},{key:"_computeSpacingDistanceRulers",value:function(t,e){var r=t.modelFilter,n=this.stateManager.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),a=PE.ParamModelUtils.flattenModels(o,{getAccessories:function(t){return t.getChildNodes().filter((function(t){return t.getLegal()}))}}),s=[].concat(nP(a),nP(i));return nP(tP(s.filter((function(t){return r({id:(e=t).id,prodCatId:e.getCategory().categoryId});var e}))).entries()).map((function(t){var e=rP(t,2),r=e[0],n=e[1],o=n.lineStyle,i=n.lines,a=n.textStyle;return i.map((function(t){var e=t.mainLine;return{mainLine:e,capLines:t.capLines,lineStyle:o,textStyle:a,text:kw(e.length(),1),textPosition:new Se.default(new c.LineSeg3d(c.Point3d.fromObject(e.start),c.Point3d.fromObject(e.end)).getPoint(e.length()*Zw.get(r)))}}))})).flat()}},{key:"addDimensionRuler",value:function(t,e){var r=this._computeDimensionRulerConfig(t),n=Object(Jr.default)(),o=new Map(this.state.state.dimensionRulers).set(n,{originData:{param:t,option:e},rulerConfig:r});return this.$actionSetDimensionRulers.dispatch(o),n}},{key:"removeDimensionRuler",value:function(t){if(t){var e=new Map(this.state.state.dimensionRulers);e.delete(t),this.$actionSetDimensionRulers.dispatch(e)}else this.$actionSetDimensionRulers.dispatch(new Map)}},{key:"addSpacingDistanceRuler",value:function(t,e){var r=this._computeSpacingDistanceRulers(t,e),n=Object(Jr.default)(),o=new Map(this.state.state.spacingDistanceRulers).set(n,{originData:{param:t,option:e},rulerConfigs:r});return this.$actionSetSpacingDistanceRulers.dispatch(o),n}},{key:"removeSpacingDistanceRuler",value:function(t){if(t){var e=new Map(this.state.state.spacingDistanceRulers);e.delete(t),this.$actionSetSpacingDistanceRulers.dispatch(e)}else this.$actionSetSpacingDistanceRulers.dispatch(new Map)}}])&&uP(e.prototype,r),n&&uP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR),dP=r(761),gP=r.n(dP);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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mP(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,IP(n.key),n)}}function IP(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)}function EP(t,e){return(EP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CP(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=BP(t);if(e){var o=BP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bP(this,r)}}function bP(t,e){if(e&&("object"===yP(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 BP(t){return(BP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wP=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&&EP(t,e)}(i,t);var e,r,n,o=CP(i);function i(){var t;return vP(this,i),(t=o.apply(this,arguments)).bzProperties=new Map,t}return e=i,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:"isHidden"},this.isHidden,t),this.isHidden=t}}])&&mP(e.prototype,r),n&&mP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Tt);function PP(t){return(PP="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 SP(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 _P(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?SP(Object(r),!0).forEach((function(e){QP(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function QP(t,e,r){var n;return n=function(t,e){if("object"!=PP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=PP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==PP(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var OP={x:0,y:0,z:0},DP={x:0,y:0,z:0};function xP(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,o=e.category,i=e.origin,a=new wP,s=!(t instanceof dr)||t.isRoot(),u=n||s?t:t.getRoot(),c=u instanceof dr;a.id=u.id,a.isRoot=!c||u.isRoot(),a.isHidden=!!u.getInvisible(),a.name=u.getName();var A=W.ASSEMBLY;if(c?A=W.COMMON:t.isTemplateAssembly()&&(A=W.TEMPLATE_ASSEMBLY),a.modelType=A,a.position=a.isRoot?OP:u.getPosition(),a.rotation=a.isRoot?DP:u.getRotation(),a.size="function"==typeof u.getScaledSize?u.getScaledSize():u.getSize(),a.params=RP(u),a.category=o||u.getCategory().categoryId,c){var l=u.getModel();a.productId=null==l?void 0:l.obsBrandGoodId}return n&&(a.root=n),a.isRoot&&(a._origin=i),a.children=(c?u.getChildren():u.getParamModels()).map((function(t){return xP(t,e,r,n||a)})),a.accessories=(c?u.getAccessories():[]).map((function(t){return xP(t,e,r,n||a)})),r.set(a.id,a),u!==t&&r.has(t.id)?r.get(t.id):a}function MP(t,e){var r=t.isRoot?t:t.root;if(!r)return{};var n=r._changeMap,o=e.getUnSafeParamModelFromParamModelLite(r);if(!o)return{};var i=o.getCustom(),a=n.cloned;return a&&(o=o.clone(!1)),o=function t(e,r,n,o){var i=e._changeMap;if(i.cloned&&i.deleted)return;if(i.deleted)return n.dispose(),n;var a=i.update,s=void 0===a?[]:a,u=i.addNodes,c=void 0===u?[]:u,A=o?_P({},o):{parentModelLite:e,parentModel:n,rootModelLite:e,rootModel:n};s.forEach((function(t){if(t.type===Y.ATTRIBUTE)switch(t.attr){case"position":n.setPosition(e.getPosition());break;case"rotate":n.setRotation(e.getRotation());break;case"isHidden":n.setInvisible(e.getHidden()),function(t){var e=t.getInvisible();p_().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===t.id&&r.setVisible(!e)}))}(n)}if(t.type===Y.STORE){var o=n.getParamStore().getParam(t.attr),i=e.getParam(t.attr);if(o&&i){var a=i.getValue();[es.ParamType.MATERIAL,es.ParamType.SHAPE].includes(o.getType())&&(a=r.getUnSafeObsBrandGoodToBrandGoodId(a)),a&&o.setValue(a),i.getPrimitiveOverride()!==o.getPrimitiveOverride()&&o.setPrimitiveOverride(i.getPrimitiveOverride())}}})),c.forEach((function(o){var i=o.type,a=o.linkId,s=(i===q.CHILD?e.getChild():e.getAccessory()).find((function(t){return t.id===a}));if(s){var u=r.getUnSafeParamModelFromParamModelLite(s);u&&((s._changeMap.cloned||s._origin!==G.SENSE)&&(u=u.clone(!1)),i===q.CHILD?(u.setIsAppend(!0),u.setAppendType(gP.a.CENTER),n.addChild(u)):n.addAccessory(u),t(s,r,u,_P(_P({},A),{},{parentModel:n,parentModelLite:e})),(s._changeMap.cloned||s._origin!==G.SENSE)&&u.assignUniqueId())}}));var l=function(o){return function(i){if(!c.some((function(t){return t.type===o&&t.linkId===i.id}))){var a=n instanceof _e.CoreParamModelAssembly?n.getParamModels():o===q.ACCESSORY?n.getAccessories():n.getChildren(),s=i._changeMap.originId||i.id,u=a.find((function(t){return t.id===s}));u&&t(i,r,u,_P(_P({},A),{},{parentModel:n,parentModelLite:e}))}}};return e.getChild().forEach(l(q.CHILD)),e.getAccessory().forEach(l(q.ACCESSORY)),n}(r,e,o),a&&o&&o.assignUniqueId(),{create:a,custom:i,model:o}}function RP(t){var e=new Map;return t.getParamStore().forEach((function(t,r){e.set(r,function(t){var e=new Ot;if(e.data={type:t.getType(),displayName:t.getDisplayName(),name:t.getName(),value:t.getValue(),max:t.getMax(),min:t.getMin(),editable:t.getEditable()||t.getOverridable(),optionValues:t.getOptionValues().map((function(t){return{name:t.name,value:t.value}})),recommendValues:t.getRecommendValues().map((function(t){return{name:t.name,value:t.value}})),primitiveOverride:t.getPrimitiveOverride(),step:t.getStep()},[k.MATERIAL,k.SHAPE].includes(e.getType())){var r=t.getProduct();e.data.value=r?r.obsBrandGoodId:""}return e}(t))})),e}var TP=r(272),LP=r.n(TP);function jP(t){return(jP="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 kP(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 NP(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?kP(Object(r),!0).forEach((function(e){FP(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kP(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function FP(t,e,r){var n;return n=function(t,e){if("object"!=jP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==jP(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */GP=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"==jP(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(jP(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 UP(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 zP(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){UP(i,n,o,a,s,"next",t)}function s(t){UP(i,n,o,a,s,"throw",t)}a(void 0)}))}}LP()(function(){var t=zP(GP().mark((function t(e){var r,n;return GP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=rd(),t.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:e});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),NP({promise:!0},Hm));function YP(){return(YP=zP(GP().mark((function t(e){var r,n,o,i,a;return GP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,rd().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function HP(){return(HP=zP(GP().mark((function t(e){var r,n,o,i,a;return GP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,rd().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var VP=LP()((function(t){return YP.apply(this,arguments)}),NP(NP({},Hm),{},{promise:!0})),qP=LP()((function(t){return HP.apply(this,arguments)}),NP(NP({},Hm),{},{promise:!0}));function WP(t){return(WP="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 KP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */KP=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"==WP(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(WP(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 JP(t){return function(t){if(Array.isArray(t))return XP(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 XP(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 XP(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 XP(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 ZP(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 $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,tS(n.key),n)}}function tS(t){var e=function(t,e){if("object"!=WP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WP(e)?e:String(e)}var eS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cached=new Map}var e,r,n,o,i;return e=t,(r=[{key:"setProduct",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(e);r||(r=new Map,this.cached.set(e,r)),r.set(t.brandGoodId,t.obsBrandGoodId),r.set(t.obsBrandGoodId,t.brandGoodId)}},{key:"getToggledBrandGood",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(e=this.cached.get(r))||void 0===e?void 0:e.get(t)}},{key:"removeCachedModel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(t)}},{key:"safeGetToggleBrandGood",value:(o=KP().mark((function t(e){var r,n,o,i,a,s,u=this,c=arguments;return KP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Qr.castArray)(e),o=[],i=[],a=new Map,n.forEach((function(t){var e=u.getToggledBrandGood(t,r);e?a.set(t,e):/^[0-9]$/.test(t.toString())?i.push(t):o.push(t)})),s=function(t){return[].concat(JP(t.hardwares||[]),JP(t.textures||[]),JP(t.virtualModels||[]),JP(t.paramModelProducts||[]),JP(t.moldings||[]))},!o.length){t.next=12;break}return t.next=10,VP(o).then(s);case 10:t.sent.forEach((function(t){u.setProduct(t,r)}));case 12:if(!i.length){t.next=17;break}return t.next=15,qP(i).then(s);case 15:t.sent.forEach((function(t){u.setProduct(t,r)}));case 17:return[].concat(o,i).forEach((function(t){var e=u.getToggledBrandGood(t,r);e&&a.set(t,e)})),t.abrupt("return",a);case 19: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){ZP(i,r,n,a,s,"next",t)}function s(t){ZP(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&$P(e.prototype,r),n&&$P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function rS(t){return(rS="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 nS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nS=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"==rS(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(rS(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 oS(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 iS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){oS(i,n,o,a,s,"next",t)}function s(t){oS(i,n,o,a,s,"throw",t)}a(void 0)}))}}function aS(t){return function(t){if(Array.isArray(t))return sS(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 sS(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 sS(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 sS(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 uS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cS(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,AS(n.key),n)}}function AS(t){var e=function(t,e){if("object"!=rS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rS(e)?e:String(e)}var lS,fS=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new eS;uS(this,t),this.callback=e,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var e,r,n,o;return e=t,(r=[{key:"getParamModelFromId",value:function(t){if(this.cached.has(t))return this.cached.get(t);var e=this.callback(t);return e?(this.cached.set(t,e),e):void 0}},{key:"getUnSafeParamModel",value:function(t){return this.cached.get(t)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(t){return this.brandGoodsTranslate.getToggledBrandGood(t)}},{key:"addParamModelLite",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=this.models).push.apply(t,aS(r.map((function(t){return t.root||t}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(t){var e,r=t.root||t;switch(t._origin||r._origin){case G.BRANDGOOD:case G.CATEGORY:break;case G.SENSE:var n=r._changeMap.originId||r.id;e=this.getUnSafeParamModel(n)}if(!e||r===t)return e;for(var o,i=t._changeMap.originId||t.id,a=[e];o=a.pop();){if(o.id===i)return o;a.push.apply(a,aS(o.getChildNodes()))}}},{key:"attach",value:(o=iS(nS().mark((function t(){var e,r,n,o,i,a,s,u,c=this;return nS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(o=e.pop())){t.next=18;break}a=(i=o)._changeMap,s=i._origin,t.t0=s,t.next=t.t0===G.SENSE?8:t.t0===G.CATEGORY||t.t0===G.BRANDGOOD||t.t0===G.TEMPLATE_ID?11:12;break;case 8:return u=a.originId||o.id,r.modelIds.push(u),t.abrupt("break",12);case 11:return t.abrupt("break",12);case 12:if(!a.deleted){t.next=14;break}return t.abrupt("continue",3);case 14:a.update&&a.update.forEach((function(t){if(o&&t.type===Y.STORE&&o.hasParam(t.attr)){var e=o.getParam(t.attr);e&&[k.MATERIAL,k.SHAPE].includes(e.getType())&&e.getValue()&&n.push(e.getValue())}})),e.push.apply(e,aS(o.getChild()).concat(aS(o.getAccessory()))),t.next=3;break;case 18:return t.next=20,Promise.allSettled(aS(Object(Qr.uniq)(r.modelIds).map(function(){var t=iS(nS().mark((function t(e){return nS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",c.getParamModelFromId(e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 20:return t.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}])&&cS(e.prototype,r),n&&cS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function hS(t){lS=t}var pS=r(768);function dS(t){return(dS="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 gS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */gS=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"==dS(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(dS(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 yS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vS(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,mS(n.key),n)}}function mS(t){var e=function(t,e){if("object"!=dS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dS(e)?e:String(e)}function IS(){return(IS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=ES(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 ES(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wS(t)););return t}function CS(t,e){return(CS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bS(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=wS(t);if(e){var o=wS(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return BS(this,r)}}function BS(t,e){if(e&&("object"===dS(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 wS(t){return(wS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var PS=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&&CS(t,e)}(i,t);var e,r,n,o=bS(i);function i(){var t;return yS(this,i),(t=o.apply(this,arguments)).$actionInit=t.unitCreator.sync((function(t){t.latest(gS().mark((function t(e,r){var n;return gS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getAxr(vC),t.next=3,Object(QI.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==jm.SUCCESS){t.next=13;break}return t.next=6,Object(QI.put)(this.$actionSetCamera.message(!0));case 6:return t.next=9,Object(QI.take)(this.$actionSyncCamera.messageType());case 9:return t.next=11,Object(QI.put)(this.$actionSetCamera.message(!1));case 11:t.next=6;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.$actionSyncCamera=t.unitCreator.sync((function(t){})),t.$actionSetCamera=t.unitCreator.sync((function(t){t.latest(gS().mark((function t(e,r){var n,o,i,a,s,u;return gS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),(a=r.scene3D).updateEnableCameraAnimation(!1),s=o.length?Object(pS.computeAssemblyBox)(o.map((function(t){return t.getBox3()})),o[0].getMatrix4()):Object(pS.computeAssemblyBox)(i.map((function(t){return t.getBox3()})),i[0].getMatrix4()),u=DE(s),a.updateInitCameraAttributes(u),a.updateScaleFactorRange(.5,4),e?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 10:case"end":return t.stop()}}),t)})))})),t}return e=i,(r=[{key:"init",value:function(){IS(wS(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&vS(e.prototype,r),n&&vS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function SS(t){return(SS="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 _S(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=OS(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 QS(t){return function(t){if(Array.isArray(t))return DS(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||OS(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 OS(t,e){if(t){if("string"==typeof t)return DS(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)?DS(t,e):void 0}}function DS(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 xS(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 MS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){xS(i,n,o,a,s,"next",t)}function s(t){xS(i,n,o,a,s,"throw",t)}a(void 0)}))}}function RS(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 TS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?RS(Object(r),!0).forEach((function(e){HS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):RS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function LS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */LS=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"==SS(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(SS(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 jS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kS(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,VS(n.key),n)}}function NS(){return(NS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=FS(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 FS(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=YS(t)););return t}function GS(t,e){return(GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function US(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=YS(t);if(e){var o=YS(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"===SS(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 YS(t){return(YS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function HS(t,e,r){return(e=VS(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VS(t){var e=function(t,e){if("object"!=SS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=SS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==SS(e)?e:String(e)}var qS=HS(HS(HS(HS(HS(HS(HS(HS(HS(HS({},me.HOLE,4),me.GROOVE,1),me.HARDWARE_GROOVE,2),me.HARDWARE,3),me.PARAM_MODEL,0),me.HOLE_V2,5),me.SQUARE_GROOVE,5),me.ROUND_CORNER_GROOVE,5),me.SPECIAL_SHAPED_GROOVE,5),me.PATH_GROOVE,5),WS=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&&GS(t,e)}(l,t);var e,r,n,o,i,a,s,u,A=US(l);function l(){var t;return jS(this,l),(t=A.apply(this,arguments)).cameraController=t.partialCreator.create(PS),t.state=t.stateCreator.create({renderMode:nr.RenderMode.SHADING,selectable:!0,overrideMaterialOption:{},interactionPriority:qS,customModelMaterial:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.$actionToggleRenderMode=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e,r){var n,o,i;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=nr.RenderMode.SHADING,o=nA.Unset,t.t0=e.mode,t.next=t.t0===Um.SHADING?5:t.t0===Um.OUTLINE_WITH_SHADING?7:t.t0===Um.TRANSLUCENT?9:t.t0===Um.OUTLINE_AND_TRANSLUCENT?11:t.t0===Um.FULLY_TRANSPARENT?14:17;break;case 5:return n=nr.RenderMode.SHADING,t.abrupt("break",17);case 7:return n=nr.RenderMode.OUTLINE_WITH_SHADING,t.abrupt("break",17);case 9:return o=nA.Translucent,t.abrupt("break",17);case 11:return n=nr.RenderMode.OUTLINE_WITH_SHADING,o=nA.Translucent,t.abrupt("break",17);case 14:return n=nr.RenderMode.OUTLINE_WITH_SHADING,o=nA.Transparent,t.abrupt("break",17);case 17:return t.next=19,Object(QI.put)(this.$actionMergeState.message({renderMode:n}));case 19:i=[nr.RenderMode.OUTLINE_WITH_SHADING,nr.RenderMode.TRANSPARENT_LINE].includes(n),fL().viewer.toggleShowModelOutline(i),fL().viewer.togglePlankOutline(!1),i&&this.enableHardwaresOutline(),fL().viewer.updateTransparentMode(o),r.scene3D.updateRenderMode(n),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 27:case"end":return t.stop()}}),t,this)})))})),t.$whiteMode=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e,r){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.scene3D.updateRenderMode(e?nr.RenderMode.OUTLINE_ONLY:nr.RenderMode.SHADING),fL().viewer.togglePlankOutline(e),e?this.disableHardwaresOutline():this.enableHardwaresOutline(),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 5:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderBorder=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e,r){var n;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.enableHardwaresOutline(),n=e?nr.RenderMode.OUTLINE_WITH_SHADING:nr.RenderMode.SHADING,t.next=4,Object(QI.put)(this.$actionMergeState.message({renderMode:n}));case 4:fL().viewer.toggleShowModelOutline(n===nr.RenderMode.OUTLINE_WITH_SHADING),fL().viewer.togglePlankOutline(!1),r.scene3D.updateRenderMode(n),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderTranslucent=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:fL().viewer.updateTransparentMode(e?nA.Translucent:nA.Unset),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 3:case"end":return t.stop()}}),t,this)})))})),t.$actionModelHint=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(QI.put)(this.$actionMergeState.message({overrideMaterialOption:e}));case 2:fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 4:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleSelectModel=t.unitCreator.sync((function(t){t.every(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(QI.put)(this.$actionMergeState.message({selectable:e}));case 2:case"end":return t.stop()}}),t,this)})))})),t.setInteractionPriority=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){var r=Object.assign(t,{interactionPriority:TS(TS({},t.interactionPriority),e)});fL().viewer.setInteractionPriorityConfig(r.interactionPriority.hardware,r.interactionPriority.paramModel)}))})),t.$actionSetCustomModelMaterial=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(QI.put)(this.$actionMergeState.message({customModelMaterial:e}));case 2:fL().viewer.triggerReducer();case 3:case"end":return t.stop()}}),t,this)})))})),t}return e=l,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var t=this;NS(YS(l.prototype),"init",this).call(this),fL().viewer.registerReducer((function(e,r,n){var o=t.state.state.customModelMaterial[e.id]||{},i=o.opacity,a=o.color;n.opacity=e.isAppendHardware?1:i,n.outlineMode=e.outlineMode,n.color=a})),fL().viewer.registerReducer((function(e,r,n){var o=e.getAssembly(),i=!0;o&&(i=!o.getInvisible()),i&&(i=!e.getInvisible()),e.isAppendHardware&&(n.overrideMaterial=t.state.state.overrideMaterialOption[e.id]),n.visible=i}))}},{key:"getAllHardwares",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware}))}},{key:"disableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=nr.OutlineMode.Disabled}))}},{key:"enableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=nr.OutlineMode.Outlined}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return!t.isAppendHardware}))}},{key:"getAllCustomModels",value:(u=MS(LS().mark((function t(){var e;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getAllParamModels(),t.abrupt("return",e.map((function(t){return xP(t,{origin:G.SENSE})})));case 2:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"getCustomModelById",value:(s=MS(LS().mark((function t(e){var r;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(e))){t.next=3;break}return t.abrupt("return",xP(r,{origin:G.SENSE}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"save",value:(a=MS(LS().mark((function t(e){var r,n,o,i,a,s,u,c,A;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,n=this.getStateManager().core.pad,(o=new fS(n.findModelOrAssemblyModelById)).addParamModelLite.apply(o,QS(r)),t.next=6,o.attach();case 6:return t.next=8,Promise.all(r.map((function(t){return MP(t,o)})));case 8:i=t.sent,a=[],s=[],u=_S(i);try{for(u.s();!(c=u.n()).done;)(A=c.value).create&&A.custom&&A.model&&a.push(A),!A.create&&A.model&&s.push(A.model)}catch(t){u.e(t)}finally{u.f()}(a.length||s.length)&&a.length&&a.forEach((function(t){var e;null===(e=t.custom)||void 0===e||e.addParamModels(t.model)})),fL().viewer.triggerReducer();case 15:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"focusFace",value:function(t){var e=p_().viewParamModel.state.state.currModelId;if(e){var r,n=this.getStateManager(),o=n.core,i=n.scene3D,a=o.design.getCustom().getParamModels().find((function(t){return t.$id===e})),s=o.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e})),u=(a||s).getBox3(),c=u.getPosition(),A=u.getSize().length()*_E,l=u.getMatrix();switch(t){case Ie.Right:r=new Se.default(A,0,0).applyMatrix4(l);break;case Ie.Left:r=new Se.default(-A,0,0).applyMatrix4(l);break;case Ie.Front:r=new Se.default(0,-A,0).applyMatrix4(l);break;case Ie.Back:r=new Se.default(0,A,0).applyMatrix4(l);break;case Ie.Top:this.focusFace(Ie.Front),r=new Se.default(0,0,A).applyMatrix4(l);break;case Ie.Bottom:this.focusFace(Ie.Front),r=new Se.default(0,0,-A).applyMatrix4(l)}i.updateCameraAttributes({lookAt:c,position:r})}}},{key:"updateCameraType",value:function(t){this.getStateManager().scene3D.updateCameraType(t===pe.Orthographic?OC.a.Orthographic:OC.a.Perspective,!0)}},{key:"lookAt",value:(i=MS(LS().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.keepView,o=void 0===n||n,i=this.getStateManager(),a=i.scene3D,s=LC(r)){t.next=5;break}throw new Error("".concat(r,"模型不存在"));case 5:if(!jC(s)){t.next=8;break}throw new Error("".concat(r,"模型不可见"));case 8:if(u=s.getConcatenatedBox3(),c=u.getPosition(),!o){t.next=18;break}return A=a.state.cameraAttributes,l=A.lookAt,f=A.position,h=f.clone().sub(l.clone()).normalize(),p=f.distance(l),t.next=16,kC({lookAt:c,position:c.clone().add(h.clone().mul(p))});case 16:t.next=20;break;case 18:return t.next=20,kC({lookAt:c});case 20:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"adaptViewer",value:(o=MS(LS().mark((function t(e){var r,n,o,i,a,s,u,A,l,f,h,p,d,g,y,v,m,I,E,C,b,B,w,P,S,_,Q,O,D,x,M,R,T,L,j,k,N,F,G,U;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,!((n=e.scale)<=0)){t.next=4;break}throw new Error("不支持小于等于".concat(0," 的比例"));case 4:if(o=this.getStateManager(),i=o.scene3D,a=LC(r)){t.next=8;break}throw new Error("".concat(r,"模型不存在"));case 8:if(!jC(a)){t.next=11;break}throw new Error("".concat(r,"模型不可见"));case 11:if(s=a.getConcatenatedBox3(),u=s.getPoints().map((function(t){return new c.Point3d(t)})),l=(A=lS).getCamera(),f=u.map((function(t){return new nr.Vector3(t.x,t.y,t.z).applyMatrix4(l.matrixWorldInverse)})),h=new c.BBox3d,f.forEach((function(t){h.addPoint(t)})),p=i.state.perspectiveCameraFov,d=i.state.cameraAttributes,g=d.lookAt,y=d.position,v=d.frustumSize,m=d.near,I=d.far,E=A.getSize(),C=E.width/E.height,b=h.width,B=h.height,w=h.depth,P=new c.Vector3d(g),S=w/2,_=n/100,!(l instanceof nr.PerspectiveCamera)){t.next=39;break}return Q=l.zoom,O=p/2,D=B/2/_*Q/Math.tan(O*(Math.PI/180)),x=180*Math.atan(Math.tan(O*Math.PI/180)*C)/Math.PI,M=b/2/_*Q/Math.tan(x*(Math.PI/180)),R=Math.max(M,D),T=Object(nl.a)(R+S,m+S,I-S),L=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(T)),t.next=37,kC({position:new Se.default(L.x,L.y,L.z)});case 37:t.next=47;break;case 39:return j=B/_/v,k=b/_/(v*C),N=Math.max(j,k),F=(m+I)/2,G=Object(nl.a)(F,m+S,I-S),U=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(G)),t.next=47,kC({frustumSize:N*v,position:new Se.default(U.x,U.y,U.z)});case 47:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&kS(e.prototype,r),n&&kS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(Us.AXR);function KS(t){return(KS="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 JS(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 XS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?JS(Object(r),!0).forEach((function(e){ZS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ZS(t,e,r){return(e=n_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $S(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 t_(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 t_(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 t_(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 e_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r_(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,n_(n.key),n)}}function n_(t){var e=function(t,e){if("object"!=KS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KS(e)?e:String(e)}function o_(){return(o_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=i_(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 i_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c_(t)););return t}function a_(t,e){return(a_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s_(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=c_(t);if(e){var o=c_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u_(this,r)}}function u_(t,e){if(e&&("object"===KS(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 c_(t){return(c_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var A_={rawSelected:[],selectedData:[],selectedDataV2:[]},l_=function(t,e){var r=t.entityId+"%%"+t.entityType.toString(),n=e.entityId+"%%"+e.entityType.toString();return r>n?1:r===n?0:-1},f_=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&&a_(t,e)}(i,t);var e,r,n,o=s_(i);function i(){var t;return e_(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create(A_).mutable(),t.onModelsChange=function(){var e=t.selected.map((function(e){return t.stateManager.core.pad.findModel(e.entityId)})).filter((function(t){return!!t})),r=t.state.state.selectedData;e.length===r.length&&Object(Qr.unzip)([e,r]).every((function(t){var e=$S(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return XS(XS({},t),{},{selectedData:e})})),t.emit(i.EVENT_SELECT_CHANGED))},t.onModelChangeV2=function(){setTimeout((function(){t.onModelsChange()}),0);var e=t.stateManager.core,r=e.pad,n=e.fittingDesign,o=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getRoundCornerGrooveModels(),A=n.getSpecialShapedGrooveModels(),l=n.getPathGrooveModels(),f=t.rawSelected.map((function(t){switch(t.entityType){case iA:return r.findModelEx(t.entityId,Zh);case oA:return r.findParamModelAssembly(t.entityId);case Vm:return o.find((function(e){return e.id===t.entityId}));case qm:return a.find((function(e){return e.id===t.entityId}));case Zm:return s.find((function(e){return e.id===t.entityId}));case $m:return u.find((function(e){return e.id===t.entityId}));case tI:return c.find((function(e){return e.id===t.entityId}));case eI:return A.find((function(e){return e.id===t.entityId}));case rI:return l.find((function(e){return e.id===t.entityId}));default:return}})).filter((function(t){return!!t})),h=t.state.state.selectedDataV2;h.length===f.length&&Object(Qr.unzip)([h,f]).every((function(t){var e=$S(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return XS(XS({},t),{},{selectedDataV2:f})})),t.emit(i.EVENT_SELECT_CHANGED_V2))},t._onSelectionChange=function(){t.onStateChange()},t}return e=i,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(t){this.selectionStateManager.select(t)}},{key:"unSelect",value:function(t){this.selectionStateManager.unSelect(t)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){o_(c_(i.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),o_(c_(i.prototype),"release",this).call(this)}},{key:"onEnable",value:function(t){o_(c_(i.prototype),"onEnable",this).call(this,t),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Cf.a,this._onSelectionChange),this.stateManager.core.pad.on($h.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Sr.on(Br.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(t){this.stateManager.core.pad.off($h.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Sr.off(Br.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return A_})),this.selectionStateManager.off(Cf.a,this._onSelectionChange),this.rawSelected=[],this.selected=[],o_(c_(i.prototype),"onDisable",this).call(this,t)}},{key:"onStateChange",value:function(){var t=this.selectionStateManager.state.value;if(t.sort(l_),this.rawSelected!==t){this.rawSelected=t;var e=this.resolveSelected(t)||[];this.selectedIsChanged(this.selected,e)&&(this.selected=e),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(t){return t.filter((function(t){return t.entityType===iA}))}},{key:"selectedIsChanged",value:function(t,e){if(t.length!==e.length)return!0;if(0===t.length&&0===e.length)return!1;for(var r=t.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),n=e.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),o=0,i=n.length;o<i;++o)if(r[o]!==n[o])return!0;return!1}}])&&r_(e.prototype,r),n&&r_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);f_.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",f_.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var h_={entry:vC,scene:WS,select:f_,fittingDesign:aw,baseDesignInfo:_I,viewParamModel:bw,rulerLine:pP,detection:jw};function p_(){return fL().axr.axrs}var d_=Object($c.getConnector)(),g_=d_.connect,y_=d_.setRootState;function v_(t,e,r){return g_((function(){return t(p_(),fL().getStateManager())}),e,r)}var m_=r(504),I_=r.n(m_),E_=r(910),C_=r.n(E_);function b_(t){return(b_="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 B_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w_(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,P_(n.key),n)}}function P_(t){var e=function(t,e){if("object"!=b_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=b_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==b_(e)?e:String(e)}function S_(t,e){return(S_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function __(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=O_(t);if(e){var o=O_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Q_(this,r)}}function Q_(t,e){if(e&&("object"===b_(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 O_(t){return(O_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var D_,x_=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&&S_(t,e)}(i,t);var e,r,n,o=__(i);function i(){return B_(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.tip,r=t.noImg,n=t.imgSrc,o=t.className;return Hs.a.createElement("div",{className:I_()(C_.a.empty,o)},!r&&Hs.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),e&&Hs.a.createElement("p",null,e))}}])&&w_(e.prototype,r),n&&w_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent);function M_(t){return(M_="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 R_=["prefixCls","className","disabled","onDragStartT","onDragMoveT","onDragEndT","onDragCancelT"];function T_(){return(T_=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function L_(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function j_(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return k_(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 k_(t,e)}(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 k_(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 N_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F_(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,U_(n.key),n)}}function G_(t,e,r){return e&&F_(t.prototype,e),r&&F_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function U_(t){var e=function(t,e){if("object"!=M_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=M_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==M_(e)?e:String(e)}function z_(t,e){return(z_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Y_(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=V_(t);if(e){var o=V_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return H_(this,r)}}function H_(t,e){if(e&&("object"===M_(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 V_(t){return(V_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var q_="tui-draggable",W_={prefixCls:q_},K_="".concat(q_,"-ignore"),J_=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&&z_(t,e)}(r,t);var e=Y_(r);function r(){var t;return N_(this,r),(t=e.apply(this,arguments)).elementRef=Ys.createRef(),t.listening=!1,t.waitingMove=!1,t.handleMouseDown=function(e){var r=e.nativeEvent.target;r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLElement&&r.classList.contains(K_)||function(){var t,r=j_(e.nativeEvent.composedPath());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n instanceof HTMLElement&&n.classList.contains(K_))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}()||(t.handleCancel(),0===e.button&&t.startDrag(e))},t.handleMouseMove=function(e){var r=t.props,n=r.onDragMoveT,o=r.onDragStartT,i=new X_(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});if(t.waitingMove){if(!i.moved)return;t.waitingMove=!1;var a=o&&o(e,i);a&&a.start||t.clearDragging()}else n&&n(e,i);e.preventDefault()},t.handleMouseUp=function(e){var r=t.props.onDragEndT;if(!t.waitingMove){var n=new X_(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});r&&r(e,n)}t.clearDragging()},t}return G_(r,[{key:"componentDidUpdate",value:function(t){!t.disabled&&this.props.disabled&&this.handleCancel()}},{key:"componentWillUnmount",value:function(){this.handleCancel()}},{key:"render",value:function(){var t,e,r,n=this.props,o=n.prefixCls,i=n.className,a=n.disabled,s=(n.onDragStartT,n.onDragMoveT,n.onDragEndT,n.onDragCancelT,L_(n,R_)),u=I_()(o,i,(t={},e="".concat(o,"-disabled"),r=a,(e=U_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t));return Ys.createElement("div",T_({ref:this.elementRef,className:u,onMouseDown:a?void 0:this.handleMouseDown},s),this.props.children)}},{key:"startDrag",value:function(t){if((e=t.nativeEvent)!==D_&&(D_=e,1)){var e;if(this.startPageX=t.pageX,this.startPageY=t.pageY,this.elementRef.current){var r=this.elementRef.current.getBoundingClientRect();this.startPositionX=r.left,this.startPositionY=r.top}this.addDragListeners(),t.preventDefault()}}},{key:"addDragListeners",value:function(){document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),this.listening=!0,this.waitingMove=!0}},{key:"removeDragListeners",value:function(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.listening=!1,this.waitingMove=!1}},{key:"handleCancel",value:function(){if(this.listening){var t=this.props.onDragCancelT;t&&t()}this.clearDragging()}},{key:"clearDragging",value:function(){this.removeDragListeners()}}]),r}(Ys.Component);J_.defaultProps=W_;var X_=function(){function t(e,r){N_(this,t),this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.dx=this.pageX-r.startPageX,this.dy=this.pageY-r.startPageY,this.offsetX=r.startPageX-r.startPositionX,this.offsetY=r.startPageY-r.startPositionY}return G_(t,[{key:"moved",get:function(){return Math.abs(this.dx)>=1||Math.abs(this.dy)>=1}}]),t}(),Z_=J_,$_=r(895);function tQ(t){return(tQ="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 eQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rQ(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,nQ(n.key),n)}}function nQ(t){var e=function(t,e){if("object"!=tQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tQ(e)?e:String(e)}function oQ(t,e){return(oQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iQ(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=sQ(t);if(e){var o=sQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aQ(this,r)}}function aQ(t,e){if(e&&("object"===tQ(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 sQ(t){return(sQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uQ=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&&oQ(t,e)}(i,t);var e,r,n,o=iQ(i);function i(){return eQ(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props;return Hs.a.createElement($_.b,t)}}])&&rQ(e.prototype,r),n&&rQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ys.PureComponent),cQ=r(911),AQ=r.n(cQ);function lQ(t){return(lQ="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 fQ(){return(fQ=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function hQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pQ(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,dQ(n.key),n)}}function dQ(t){var e=function(t,e){if("object"!=lQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lQ(e)?e:String(e)}function gQ(t,e){return(gQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yQ(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=mQ(t);if(e){var o=mQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vQ(this,r)}}function vQ(t,e){if(e&&("object"===lQ(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 mQ(t){return(mQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Ys.PureComponent;var IQ,EQ=r(516),CQ=r.n(EQ);function bQ(t){return(bQ="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 BQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wQ(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,OQ(n.key),n)}}function PQ(t,e){return(PQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SQ(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=QQ(t);if(e){var o=QQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _Q(this,r)}}function _Q(t,e){if(e&&("object"===bQ(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 QQ(t){return(QQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OQ(t){var e=function(t,e){if("object"!=bQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bQ(e)?e:String(e)}function DQ(){return Hs.a.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"14px",height:"14px",fill:"#FFAB00","aria-hidden":"true"},Hs.a.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}))}!function(t){t.Warning="warning"}(IQ||(IQ={}));var xQ,MQ,RQ,TQ=(xQ={},MQ=IQ.Warning,RQ=Hs.a.createElement(DQ,null),(MQ=OQ(MQ))in xQ?Object.defineProperty(xQ,MQ,{value:RQ,enumerable:!0,configurable:!0,writable:!0}):xQ[MQ]=RQ,xQ),LQ={x:0,y:0},jQ=v_((function(t){return{detection:t.detection.state}}),(function(t){return{message:t.detection.message,description:t.detection.description,defaultPosition:t.detection.defaultPosition,show:t.detection.show}}),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&&PQ(t,e)}(i,t);var e,r,n,o=SQ(i);function i(){var t;return BQ(this,i),(t=o.apply(this,arguments)).state={position:LQ},t.elementRef=Hs.a.createRef(),t.dragStartPosition=LQ,t.prevTranslate=LQ,t.getAbsolutePosition=function(t){var e=t.x,r=t.y,n=window;return{x:e*n.innerWidth,y:r*n.innerHeight}},t.handleResize=function(){var e=t.getAbsolutePosition(t.prevTranslate),r=e.x,n=e.y,o=t.props.defaultPosition,i=t.getAbsolutePosition(o),a=window.innerWidth-i.x-t.elementRef.current.clientWidth,s=window.innerHeight-i.y-t.elementRef.current.clientHeight;t.setState({position:{x:Math.min(r,a),y:Math.min(n,s)}})},t.handleDragStart=function(){return t.dragStartPosition=t.state.position,{start:!0}},t.handleDragMove=function(e,r){var n=t.props.defaultPosition,o=t.getAbsolutePosition(n),i=window.innerWidth-o.x-t.elementRef.current.clientWidth,a=window.innerHeight-o.y-t.elementRef.current.clientHeight,s={x:Object(nl.a)(t.dragStartPosition.x+r.dx,0-o.x,i),y:Object(nl.a)(t.dragStartPosition.y+r.dy,0-o.y,a)};t.setState({position:s}),t.prevTranslate={x:s.x/window.innerWidth,y:s.y/window.innerHeight}},t.handleDragEnd=function(){t.dragStartPosition=LQ},t.handleDragCancel=function(){t.dragStartPosition=LQ},t}return e=i,(r=[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize)}},{key:"render",value:function(){var t=this.props,e=t.message,r=t.description,n=t.defaultPosition,o=t.show,i=this.state.position,a="translate("+i.x+"px, "+i.y+"px)";return o?Hs.a.createElement(Z_,{style:{transform:a,left:"".concat(100*n.x,"%"),top:"".concat(100*n.y,"%")},className:CQ.a.noticeDraggable,onDragStartT:this.handleDragStart,onDragMoveT:this.handleDragMove,onDragEndT:this.handleDragEnd,onDragCancelT:this.handleDragCancel},Hs.a.createElement("div",{className:CQ.a.noticeContent,ref:this.elementRef},Hs.a.createElement("span",{className:CQ.a.noticeIcon},TQ[IQ.Warning]),Hs.a.createElement("div",{className:CQ.a.noticeMessage},e),Hs.a.createElement("div",{className:CQ.a.noticeDescription},r))):null}}])&&wQ(e.prototype,r),n&&wQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent)),kQ=r(912),NQ=r.n(kQ),FQ=r(556);function GQ(t){return(GQ="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 UQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zQ(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,HQ(n.key),n)}}function YQ(t,e,r){return e&&zQ(t.prototype,e),r&&zQ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function HQ(t){var e=function(t,e){if("object"!=GQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=GQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==GQ(e)?e:String(e)}function VQ(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&&qQ(t,e)}function qQ(t,e){return(qQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function WQ(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=JQ(t);if(e){var o=JQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return KQ(this,r)}}function KQ(t,e){if(e&&("object"===GQ(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 JQ(t){return(JQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var XQ=Symbol("layout"),ZQ=v_((function(t){return{status:t.entry.state}}),(function(t){return{status:t.status.main}}),function(t){VQ(r,t);var e=WQ(r);function r(){return UQ(this,r),e.apply(this,arguments)}return YQ(r,[{key:"render",value:function(){return this.state.views.map((function(t){return t.content}))}}]),r}(FQ.a)),$Q=function(t){VQ(r,t);var e=WQ(r);function r(){return UQ(this,r),e.apply(this,arguments)}return YQ(r,[{key:"render",value:function(){return Hs.a.createElement(ZQ,{mountPointId:XQ})}}]),r}(Hs.a.PureComponent),tO=r(165);function eO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rO(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,nO(n.key),n)}}function nO(t){var e=function(t,e){if("object"!=AO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AO(e)?e:String(e)}function oO(){return(oO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=iO(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 iO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=cO(t)););return t}function aO(t,e){return(aO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sO(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=cO(t);if(e){var o=cO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uO(this,r)}}function uO(t,e){if(e&&("object"===AO(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 cO(t){return(cO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function AO(t){return(AO="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 lO=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":AO(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};function fO(t,e){return t===e||t&&e&&t.equals(e)}var 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&&aO(t,e)}(i,t);var e,r,n,o=sO(i);function i(){var t;return eO(this,i),(t=o.apply(this,arguments)).basicMaterial=new nr.default.LineBasicMaterial({transparent:!0}),t.dashedMaterial=new nr.default.LineDashedMaterial({transparent:!0,gapSize:20,dashSize:20}),t}return e=i,(r=[{key:"buildMesh",value:function(){var t=new nr.default.Line(void 0,void 0);return t.outlineMode=nr.default.OutlineMode.Disabled,t}},{key:"componentDidMount",value:function(){oO(cO(i.prototype),"componentDidMount",this).call(this),this.update({})}},{key:"componentDidUpdate",value:function(t,e){oO(cO(i.prototype),"componentDidUpdate",this).call(this,t,e),this.update(t)}},{key:"update",value:function(t){var e=this.props,r=e.start,n=e.end,o=e.dashed,i=e.interactive,a=void 0===i||i,s=e.color,u=e.alwaysTop,c=void 0===u||u,A=e.visible,l=void 0===A||A,f=e.opacity;if(!fO(t.start,r)||!fO(t.end,n)){var h=[];h.push(r.x,r.y,r.z),h.push(n.x,n.y,n.z);var p=new nr.default.BufferGeometry;p.addAttribute("position",new nr.default.BufferAttribute(new Float32Array(h),3)),nr.geomOperator.computeLineDistances(p),this.mesh.geometry=p}this.mesh.setMaterials(o?this.dashedMaterial:this.basicMaterial),this.mesh.expectOnlyMaterial().setValues({color:s,depthTest:!c,opacity:f}),this.mesh.visible=l,this.mesh.renderOrder=c?999:0,this.mesh.interactionLayers=new nr.default.Layers,this.mesh.interactionLayers.set(a?0:1)}}])&&rO(e.prototype,r),n&&rO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(92).b),pO=hO=lO([tO.a],hO),dO=r(393);function gO(t){return(gO="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 yO(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 vO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yO(Object(r),!0).forEach((function(e){mO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mO(t,e,r){return(e=CO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function IO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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"!=gO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gO(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"===gO(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)}var SO=v_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{cameraPosition:t.scene3D.cameraAttributes.position,cameraLookAt:t.scene3D.cameraAttributes.lookAt,frustumSize:t.scene3D.cameraAttributes.frustumSize}}),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(){return IO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.position,r=t.text,n=t.style;return Hs.a.createElement(dO.b,null,(function(t){var o=t.sceneToCanvas(e),i={position:"absolute",top:0,left:0,transform:"translate(-50%, -50%) translate(".concat(o.x,"px, ").concat(o.y,"px)")};return Hs.a.createElement("div",{style:vO(vO({},n),i)},r)}))}}])&&EO(e.prototype,r),n&&EO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent));function _O(t){return(_O="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){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)||DO(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 OO(t){return function(t){if(Array.isArray(t))return xO(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||DO(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 DO(t,e){if(t){if("string"==typeof t)return xO(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)?xO(t,e):void 0}}function xO(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 MO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RO(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,TO(n.key),n)}}function TO(t){var e=function(t,e){if("object"!=_O(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_O(e)?e:String(e)}function LO(t,e){return(LO=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=NO(t);if(e){var o=NO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kO(this,r)}}function kO(t,e){if(e&&("object"===_O(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 NO(t){return(NO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var FO=v_((function(t){return{rulerLine:t.rulerLine.state}}),(function(t){return{dimensionRulers:new Map(OO(t.rulerLine.dimensionRulers.entries()).map((function(t){var e=QO(t,2);return[e[0],e[1].rulerConfig]}))),spacingDistanceRulers:new Map(OO(t.rulerLine.spacingDistanceRulers.entries()).map((function(t){var e=QO(t,2);return[e[0],e[1].rulerConfigs]})))}}),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&&LO(t,e)}(i,t);var e,r,n,o=jO(i);function i(){return MO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.dimensionRulers,r=t.spacingDistanceRulers;return Hs.a.createElement(Hs.a.Fragment,null,OO(e.entries()).map((function(t){var e=QO(t,2),r=e[0],n=e[1],o=n.mainLine,i=n.capLines,a=n.lineStyle,s=a.color,u=a.opacity,c=n.textStyle,A=n.text,l=n.textPosition;return Hs.a.createElement(Ys.Fragment,{key:r},[o].concat(OO(i)).map((function(t,e){return Hs.a.createElement(pO,{opacity:u,color:s,key:e,start:t.start,end:t.end})})),Hs.a.createElement(SO,{position:l,text:A,style:c}))})),OO(r.entries()).map((function(t){var e=QO(t,2),r=e[0];return e[1].map((function(t,e){var n=t.mainLine,o=t.capLines,i=t.lineStyle,a=i.color,s=i.opacity,u=t.textStyle,c=t.text,A=t.textPosition;return Hs.a.createElement(Ys.Fragment,{key:"".concat(r,"-").concat(e)},[n].concat(OO(o)).map((function(t,e){return Hs.a.createElement(pO,{opacity:s,color:a,key:e,start:t.start,end:t.end})})),Hs.a.createElement(SO,{position:A,text:c,style:u}))}))})))}}])&&RO(e.prototype,r),n&&RO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent)),GO=r(213);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)}function zO(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,HO(n.key),n)}}function YO(t,e,r){return e&&zO(t.prototype,e),r&&zO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function HO(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 VO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qO(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&&WO(t,e)}function WO(t,e){return(WO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function KO(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=XO(t);if(e){var o=XO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return JO(this,r)}}function JO(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 XO(t){return(XO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ZO=v_((function(t,e){return{scene3D:e.scene3D}}),(function(t){var e=t.scene3D;return{cameraType:e.cameraType,cameraAttributes:e.cameraAttributes,initCameraAttributes:e.initCameraAttributes,perspectiveCameraMode:e.perspectiveCameraMode,perspectiveCameraFov:e.perspectiveCameraFov,groundGridConfig:e.groundGridConfig,enableCameraAnimation:e.enableCameraAnimation,renderMode:e.renderMode,cameraControlMode:e.cameraControlMode}}),function(t){qO(r,t);var e=KO(r);function r(){return VO(this,r),e.apply(this,arguments)}return YO(r)}(Xu.ob.DeprecatedFullScene3D)),$O=function(t){qO(r,t);var e=KO(r);function r(){return VO(this,r),e.apply(this,arguments)}return YO(r,[{key:"render",value:function(){return this.state.views.map((function(t){t.key;return t.content}))}}]),r}(FQ.a),tD=v_((function(){return{}}),(function(){return{}}),function(t){qO(r,t);var e=KO(r);function r(){var t;return VO(this,r),(t=e.apply(this,arguments)).onInit=function(t){var e=t.viewer.config;hS(t.viewer),e.autoInstance.enabled.set(!0),e.popMeshMerge.enabled.set(!0),e.background.active.set(nr.BackgroundMode.SolidColorBackground),e.background.solid.color.set(new nr.Color(Fm.sceneBG)),e.ground.enabled.set(!1),e.effects.planarShadow.enabled.set(!1),e.effects.taa.enabled.set(!1),e.staticFrameCache.enabled.set(!1),e.isExtraCopyBeforeScreenEnabled.set(!1),e.effects.ao.enabled.set(!1),fL().viewer.onScene3DInit(t)},t.onGrabStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateGrabing(!0)},t.onGrabEnd=function(){t.props.rootState.scene3D.updateGrabing(!1)},t.onZoomStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateZooming(!0)},t.onZoomEnd=function(){t.props.rootState.scene3D.updateZooming(!1)},t.onCameraAnimationEnd=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1)},t}return YO(r,[{key:"render",value:function(){var t=this.props,e=t.rootState.scene3D,r=t.containerId,n=t.size;return Hs.a.createElement(ZO,{enableAO:!1,onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:e.updateScale,onCameraAttributesChange:e.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd,orthCameraDirectionChangeable:!0,cameraControlMode:GO.a.defaultMode},Hs.a.createElement($O,{mountPointId:uI.scene3D}))}}]),r}(Hs.a.PureComponent));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 rD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nD(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,oD(n.key),n)}}function oD(t){var e=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)}(t,"string");return"symbol"==eD(e)?e:String(e)}function iD(t,e){return(iD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function aD(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=uD(t);if(e){var o=uD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sD(this,r)}}function sD(t,e){if(e&&("object"===eD(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 uD(t){return(uD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cD=v_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{size:t.scene3D.size}}),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&&iD(t,e)}(i,t);var e,r,n,o=aD(i);function i(){var t;return rD(this,i),(t=o.apply(this,arguments)).rootRef=Hs.a.createRef(),t.updateLayout=Object(Qr.throttle)((function(){var e=t.rootRef.current;if(e){var r=e.getBoundingClientRect();t.props.rootState.scene3D.updateSize(new Cn.default(r.width,r.height))}}),200),t}return e=i,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var t=this.props,e=t.size,r=t.className;return Hs.a.createElement("div",{ref:this.rootRef,id:Nm.SCENE_ID,className:r},Hs.a.createElement(tD,{containerId:Nm.SCENE_ID,size:new c.Vector2d(e.x,e.y)}))}}])&&nD(e.prototype,r),n&&nD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent));r(1380);function AD(t){return(AD="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fD(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,hD(n.key),n)}}function hD(t){var e=function(t,e){if("object"!=AD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AD(e)?e:String(e)}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"===AD(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=v_((function(){return{}}),(function(){return{}}),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(){return lD(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return Hs.a.createElement(Hs.a.Fragment,null,Hs.a.createElement(Ym.a,{mountPointId:XQ},Hs.a.createElement(cD,{key:"s3",className:NQ.a.scene3D}),Hs.a.createElement(jQ,null)),Hs.a.createElement(Ym.a,{mountPointId:uI.scene3D},Hs.a.createElement(FO,null)))}}])&&fD(e.prototype,r),n&&fD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent));function mD(t,e){if(t.length!==e.length)return[];for(var r=t.length,n=[],o=0;o<r-1;o++)n.push(t[o].x,t[o].y,t[o].z),n.push(t[o+1].x,t[o+1].y,t[o+1].z),n.push(e[o].x,e[o].y,e[o].z),n.push(e[o].x,e[o].y,e[o].z),n.push(e[o+1].x,e[o+1].y,e[o+1].z),n.push(t[o+1].x,t[o+1].y,t[o+1].z);return n}function ID(t){return(ID="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 ED(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 CD(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ED(Object(r),!0).forEach((function(e){bD(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ED(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bD(t,e,r){var n;return n=function(t,e){if("object"!=ID(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ID(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ID(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function BD(t){var e=t.color,r=t.side,n=t.opacity,o=t.points,i=t.matrix,a=t.depth,s=new nr.Shape,u=new nr.MeshBasicMaterial(CD({color:e,side:r},ZE(n)));s.setFromPoints(o.map((function(t){return new nr.Vector2(t.x,t.y)})));var c=nr.shapeBuilder.shape({shapes:s}),A=new nr.Mesh(c,u);return A.position.set(0,0,a),A.applyMatrix(i),$E(A),A}function wD(t){var e=t.matrix,r=t.side,n=t.color,o=t.opacity,i=new nr.MeshBasicMaterial(CD({side:r,color:n},ZE(o))),a=new nr.BufferGeometry,s=mD(t.topPoints,t.bottomPoints);a.addAttribute("position",new nr.BufferAttribute(new Float32Array(s),3));var u=new nr.Mesh(a,i);return u.applyMatrix(e),$E(u),u}function PD(t){var e=nr.geomOperator.createEdge(t,25),r=new nr.LineBasicMaterial({color:Fm.outline,depthTest:!0,depthWrite:!0}),n=new nr.LineSegments(e,r);return $E(n),n}function SD(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 _D(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?SD(Object(r),!0).forEach((function(e){QD(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SD(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function QD(t,e,r){return(e=DD(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OD(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,DD(n.key),n)}}function DD(t){var e=function(t,e){if("object"!=LD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LD(e)?e:String(e)}function xD(t,e){return(xD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function MD(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=TD(t);if(e){var o=TD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return RD(this,r)}}function RD(t,e){if(e&&("object"===LD(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 TD(t){return(TD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LD(t){return(LD="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 jD,kD,ND=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":LD(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},FD=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":LD(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},GD=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&&xD(t,e)}(i,t);var e,r,n,o=MD(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)).$model=t,r.entityMap=e,r.entityType=Vm,r.wireFrames=[],r.renderCubeMesh=function(){var t=r.$model,e=t.position,n=t.size,o=t.rotate,i=t.visible,a=t.viewColor,s=t.opacity,u=nr.shapeBuilder.box({width:n.x,height:n.y,depth:n.z}),c=new nr.MeshBasicMaterial(_D({color:a,visible:i},ZE(s))),A=new nr.Mesh(u,c);A.position.set(e.x,e.y,e.z),A.rotation.set(o.x,o.y,o.z),A.visible=i,$E(A);var l=[A].map((function(t){var e=PD(t.geometry);return t.add(e),e}));return r.wireFrames=l,r.updateWireFrameVisibility(),A},r.renderCylinderMesh=function(){var t=r.$model,e=t.position,n=t.visible,o=t.rotate,i=t.height,a=t.viewColor,s=t.opacity,u=t.fittingData.diameter/2,c=nr.shapeBuilder.cylinder({radiusTop:u,radiusBottom:u,height:i}),A=new nr.MeshBasicMaterial(_D({color:a,visible:n},ZE(s))),l=new nr.Mesh(c,A);l.position.set(e.x,e.y,e.z),l.rotation.set(o.x,o.y,o.z),$E(l);var f=[l].map((function(t){var e=PD(t.geometry);return t.add(e),e}));return r.wireFrames=f,r.updateWireFrameVisibility(),l},r.entityId=t.id,r}return e=i,(r=[{key:"createRenderMesh",value:function(){var t=this.$model.type;return t===J.GROOVE?this.renderCubeMesh():t===J.HOLE?this.renderCylinderMesh():void 0}},{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&OD(e.prototype,r),n&&OD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function UD(t){return function(t){if(Array.isArray(t))return zD(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 zD(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 zD(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 zD(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 YD(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 HD(t,e,r){return(e=qD(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VD(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,qD(n.key),n)}}function qD(t){var e=function(t,e){if("object"!=ZD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ZD(e)?e:String(e)}function WD(t,e){return(WD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function KD(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=XD(t);if(e){var o=XD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return JD(this,r)}}function JD(t,e){if(e&&("object"===ZD(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 XD(t){return(XD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}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)}GD=ND([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this,e=this.$model.type;return{create:function(){var e=t.createRenderMesh();return t.entityMap.set(e,{entityId:t.$model.id,entityType:Vm}),e},update:function(e){var r=t.$model,n=r.position,o=r.visible;e.position.set(n.x,n.y,n.z),e.visible=o,e.material&&(e.material.visible=o),t.updateWireFrameVisibility()},get interactionPriority(){return e===J.HOLE?p_().scene.state.state.interactionPriority.hole:p_().scene.state.state.interactionPriority.groove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),FD("design:paramtypes",["function"==typeof(jD=void 0!==En&&En)?jD:Object,"function"==typeof(kD="undefined"!=typeof Map&&Map)?kD:Object])],GD);var $D,tx=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":ZD(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},ex=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ZD(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},rx=Xu.ib.Highlighters.generateWireGeometryForHighlighterGeometry,nx=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&&WD(t,e)}(i,t);var e,r,n,o=KD(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.entityType=Jm,e.entityId=t.id,e}return e=i,(r=[{key:"createOutlineMesh",value:function(){var t=this.$model.hintOutline,e=t.color,r=t.opacity,n=this.$model.visible,o=function(t){var e=new nr.BufferGeometry,r=t.getVertices(),n=[];t.getIndices().forEach((function(t){n.push(r[t.x],r[t.y])})),e.setAttribute("position",Xu.ib.createBufferAttribute(n)),e.computeBoundingBox();var o=e.getBoundingBox().getCenter(new nr.Vector3);return e.setAttribute("position",Xu.ib.createBufferAttribute(n.map((function(t){return function(t,e){var r=new nr.Vector3(e.x,e.y,e.z).sub(t);return t.clone().add(r)}(o,t)})))),e}(this.getGeometry()),i=new nr.LineBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?YD(Object(r),!0).forEach((function(e){HD(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):YD(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:e},ZE(r))),a=new nr.LineSegments(o,i);return nr.geomOperator.computeLineDistances(o),a.renderOrder=999,a.outlineMode=nr.OutlineMode.Disabled,a.castPlanarShadow=!1,a.castShadow=!1,a.visible=n,i.visible=n,a}},{key:"getGeometry",value:function(){var t,e=this.$model.linkModel;return t=e instanceof _e.CoreParamModel?e.getConcatenatedBox3():e instanceof En||e instanceof _i?e.boundingBox:Nw([].concat(UD(e.getTopRenderPoints()),UD(e.getBottomRenderPoints()))),rx(t)}}])&&VD(e.prototype,r),n&&VD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a),ox=nx=tx([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createOutlineMesh()},update:function(e){var r=t.$model.visible;e.visible=r,e.getMaterials().forEach((function(t){t.visible=r}))}}}))]),ex("design:paramtypes",["function"==typeof($D=void 0!==sn&&sn)?$D:Object])],nx);function ix(t){return function(t){if(Array.isArray(t))return ax(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 ax(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 ax(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 ax(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 sx(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,ux(n.key),n)}}function ux(t){var e=function(t,e){if("object"!=hx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hx(e)?e:String(e)}function cx(t,e){return(cx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ax(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=fx(t);if(e){var o=fx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lx(this,r)}}function lx(t,e){if(e&&("object"===hx(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 fx(t){return(fx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hx(t){return(hx="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 px,dx,gx=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":hx(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},yx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":hx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vx=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&&cx(t,e)}(i,t);var e,r,n,o=Ax(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)).$model=t,r.entityMap=e,r.entityType=qm,r.wireFrames=[],r.entityId=t.id,r}return e=i,(r=[{key:"createGrooveFittingRender",value:function(){var t=this.$model,e=new nr.Group,r=t.pointToGlobalMatrix(),n=t.depth,o=t.viewColor,i=t.opacity,a=t.visible,s=void 0!==a&&a,u=t.path.getAllPolygonPoints(),A=new we.default;A.fromString(r.toArray().join(","));var l=FE(A),f=BD({matrix:l,depth:0,points:u,color:o,side:nr.Side.FrontSide,opacity:i}),h=BD({matrix:l,depth:-n,points:u,color:o,side:nr.Side.BackSide,opacity:i}),p=[].concat(ix(u),[u[0]]),d=wD({matrix:l,topPoints:p.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:p.map((function(t){return new c.Point3d(t.x,t.y,-n)})),color:o,side:nr.Side.DoubleSide,opacity:i});[f,h,d,e].forEach((function(t){t.visible=s}));var g=[f,h,d],y=g.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return this.wireFrames=y,this.updateWireFrameVisibility(),e.add(g),e}},{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&sx(e.prototype,r),n&&sx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function mx(t){var e=new c.BBox3d;return[].concat(ix(t.getTopRenderPoints()),ix(t.getBottomRenderPoints())).forEach((function(t){e.addPoint(new c.Point3d(t))})),new be.default(new Se.default({x:e.width,y:e.height,z:e.depth}),new Se.default(e.center),new Se.default({x:0,y:0,z:0}))}function Ix(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 Ex(t,e,r){return(e=bx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cx(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,bx(n.key),n)}}function bx(t){var e=function(t,e){if("object"!=_x(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_x(e)?e:String(e)}function Bx(t,e){return(Bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wx(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=Sx(t);if(e){var o=Sx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Px(this,r)}}function Px(t,e){if(e&&("object"===_x(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 Sx(t){return(Sx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _x(t){return(_x="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)}vx=gx([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){var e=t.createGrooveFittingRender();return t.entityMap.set(e,{entityId:t.$model.id,entityType:qm}),e},update:function(e){var r=t.$model.visible;e.traverse((function(t){t.visible=r,t instanceof nr.Mesh&&t.getMaterials().forEach((function(t){t.visible=r}))})),e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.hardwareGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:mx(this.$model)}}))]),yx("design:paramtypes",["function"==typeof(px=void 0!==vo&&vo)?px:Object,"function"==typeof(dx="undefined"!=typeof Map&&Map)?dx:Object])],vx);var Qx,Ox=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":_x(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},Dx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":_x(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},xx=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&&Bx(t,e)}(i,t);var e,r,n,o=wx(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.entityType=Zm,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.height,n=t.color,o=t.opacity,i=t.position,a=t.rotate,s=t.radius,u=new nr.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ix(Object(r),!0).forEach((function(e){Ex(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ix(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:n},ZE(o))),c=nr.shapeBuilder.cylinder({radiusTop:s,radiusBottom:s,height:r}),A=new nr.Mesh(c,u);A.position.set(i.x,i.y,i.z),A.rotation.set(a.x,a.y,a.z),$E(A);var l=[A].map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=l,e.updateWireFrameVisibility(),A},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&Cx(e.prototype,r),n&&Cx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function Mx(t){var e=new nr.BufferGeometry;if(e.index=new nr.BufferAttribute(new Uint16Array(t.indices),1),e.addAttribute("position",new nr.BufferAttribute(new Float32Array(t.vertices),3)),e.addAttribute("uv",new nr.BufferAttribute(new Float32Array(t.textures),2)),t.normals){var r=new Float32Array(t.normals);e.addAttribute("normal",new nr.BufferAttribute(r,3))}else nr.geomOperator.computeNormalsByPosition(e);return e}function Rx(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,Tx(n.key),n)}}function Tx(t){var e=function(t,e){if("object"!=Fx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fx(e)?e:String(e)}function Lx(t,e){return(Lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jx(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=Nx(t);if(e){var o=Nx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kx(this,r)}}function kx(t,e){if(e&&("object"===Fx(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 Nx(t){return(Nx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fx(t){return(Fx="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)}xx=Ox([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,e.material&&(e.material.visible=r),t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.holeV2}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),Dx("design:paramtypes",["function"==typeof(Qx=void 0!==_i&&_i)?Qx:Object])],xx);var Gx,Ux=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":Fx(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},zx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Fx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yx=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&&Lx(t,e)}(i,t);var e,r,n,o=jx(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.entityType=Wm,e.entityId=t.id,e}return e=i,r&&Rx(e.prototype,r),n&&Rx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a),Hx=Yx=Ux([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.geometryModel,n=e.viewColor,o=e.originPoints,i=new nr.Group,a=Mx(r),s=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:nr.Side.DoubleSide}),u=new nr.Mesh(a,s);u.renderOrder=998,i.add(u),$E(u),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&i.add(o.map((function(t){var e=new nr.Mesh(Vx,qx);return e.position.set(t.x,t.y,t.z),e.renderOrder=999,e})));return i}(t)},update:function(){}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.bbox}}))]),zx("design:paramtypes",["function"==typeof(Gx=void 0!==To&&To)?Gx:Object])],Yx),Vx=new nr.shapeBuilder.SphereBufferGeometry(3),qx=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function Wx(t){return function(t){if(Array.isArray(t))return Kx(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 Kx(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 Kx(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 Kx(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 Jx(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,Xx(n.key),n)}}function Xx(t){var e=function(t,e){if("object"!=rM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rM(e)?e:String(e)}function Zx(t,e){return(Zx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $x(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=eM(t);if(e){var o=eM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tM(this,r)}}function tM(t,e){if(e&&("object"===rM(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 eM(t){return(eM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function rM(t){return(rM="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 nM,oM=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":rM(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},iM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":rM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},aM=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&&Zx(t,e)}(i,t);var e,r,n,o=$x(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.entityType=rI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new nr.Group,n=t.pointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.connectivePath.map((function(t){return t.getAllPolygonPoints()})).flat(),u=new we.default;u.fromString(n.toArray().join(","));var A=FE(u),l=BD({matrix:A,depth:0,points:s,color:i,side:nr.Side.FrontSide,opacity:a}),f=BD({matrix:A,depth:-o,points:s,color:i,side:nr.Side.BackSide,opacity:a}),h=[].concat(Wx(s),[s[0]]),p=[l,f,wD({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:nr.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&Jx(e.prototype,r),n&&Jx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function sM(t){return Nw([].concat(Wx(t.getTopRenderPoints()),Wx(t.getBottomRenderPoints())))}function uM(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,cM(n.key),n)}}function cM(t){var e=function(t,e){if("object"!=pM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pM(e)?e:String(e)}function AM(t,e){return(AM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lM(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=hM(t);if(e){var o=hM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fM(this,r)}}function fM(t,e){if(e&&("object"===pM(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 hM(t){return(hM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pM(t){return(pM="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)}aM=oM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.pathGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:sM(this.$model)}}))]),iM("design:paramtypes",["function"==typeof(nM=void 0!==ia&&ia)?nM:Object])],aM);var dM,gM=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":pM(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},yM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vM=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&&AM(t,e)}(i,t);var e,r,n,o=lM(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.entityType=nI,e.entityId=t.id,e}return e=i,r&&uM(e.prototype,r),n&&uM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a);function mM(t){var e=t.linkModel,r=t.faceId,n=e.getConcatenatedMatrix(),o=function(t){var e,r=null===(e=t.getParam("thickness"))||void 0===e?void 0:e.getData().value;return r?+r:0}(e),i=r===se.TOP?o/2:-o/2;return{position:new Se.default(0,0,i).applyMatrix4(n),rotation:(new nr.Euler).setFromRotationMatrix(FE(n))}}function IM(t){var e=t.outer,r=t.inners,n=EM(e),o=r.map(EM);return n.holes=o,n}function EM(t){var e=t[0],r=new nr.Shape;return r.moveTo(e.x,e.y),t.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(e.x,e.y),r}function CM(t){return function(t){if(Array.isArray(t))return bM(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 bM(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 bM(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 bM(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 BM(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,wM(n.key),n)}}function wM(t){var e=function(t,e){if("object"!=OM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OM(e)?e:String(e)}function PM(t,e){return(PM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SM(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=QM(t);if(e){var o=QM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _M(this,r)}}function _M(t,e){if(e&&("object"===OM(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 QM(t){return(QM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OM(t){return(OM="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)}vM=gM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.color,r=t.opacity,n=t.faces,o=t.visible,i=t.faceId===se.TOP?nr.Side.FrontSide:nr.Side.BackSide,a=new nr.MeshBasicMaterial({transparent:!0,opacity:r,color:e,side:i}),s=n.map(IM),u=nr.shapeBuilder.shape({shapes:s}),c=new nr.Mesh(u,a),A=mM(t),l=A.position,f=A.rotation;return c.position.set(l.x,l.y,l.z),c.rotation.set(f.x,f.y,f.z),c.visible=o,a.visible=o,$E(c),c}(t.$model)},update:function(e){var r=t.$model,n=r.visible,o=r.color,i=r.opacity;e.visible=n,e.expectOnlyMaterial().setValues({opacity:i,color:o,visible:n});var a=mM(t.$model),s=a.position,u=a.rotation;e.position.set(s.x,s.y,s.z),e.rotation.set(u.x,u.y,u.z)}}}))]),yM("design:paramtypes",["function"==typeof(dM=void 0!==Ho&&Ho)?dM:Object])],vM);var DM,xM=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":OM(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},MM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":OM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},RM=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&&PM(t,e)}(i,t);var e,r,n,o=SM(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.entityType=Km,e.entityId=t.id,e}return e=i,r&&BM(e.prototype,r),n&&BM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a),TM=RM=xM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.plankFaces,n=e.linkModel,o=e.hintOutline,i=n.getConcatenatedMatrix(),a=new nr.Group;r&&r.forEach((function(t){var e=Mx(_s(t,i)),r=new nr.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:t.color,opacity:t.opacity,transparent:!0,side:nr.Side.DoubleSide}),n=new nr.Mesh(e,r);n.renderOrder=998,$E(n),a.add(n)}));if(o){var s=n.getSize(),u=n.getWireFrames();if(!u){var c=QB(0,s),A=QB(5,s);u=[].concat(CM(Object(Qr.zip)(c,[].concat(CM(c.slice(1)),[c[0]]))),CM(Object(Qr.zip)(A,[].concat(CM(A.slice(1)),[A[0]]))),CM(Object(Qr.zip)(c,A))).flat().map((function(t){return[t.x,t.y,t.z]})).flat()}var l=Object(Qr.chunk)(u,3).map((function(t){return new Se.default(t[0],t[1],t[2]).applyMatrix4(i)})).map((function(t){return[t.x,t.y,t.z]})).flat(),f=new el({points:l,visible:!0,color:parseInt(o.color.replace(/^#/,""),16)});a.add(f)}return a}(t)},update:function(){}}}))]),MM("design:paramtypes",["function"==typeof(DM=void 0!==$o&&$o)?DM:Object])],RM);function LM(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 jM(t,e,r){return(e=NM(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kM(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,NM(n.key),n)}}function NM(t){var e=function(t,e){if("object"!=YM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=YM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==YM(e)?e:String(e)}function FM(t,e){return(FM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GM(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=zM(t);if(e){var o=zM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UM(this,r)}}function UM(t,e){if(e&&("object"===YM(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 zM(t){return(zM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YM(t){return(YM="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 HM,VM=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":YM(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},qM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":YM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},WM=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&&FM(t,e)}(i,t);var e,r,n,o=GM(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.entityType=Xm,e.entityId=t.id,e}return e=i,(r=[{key:"createMesh",value:function(){var t=this.$model,e=t.viewColor,r=t.opacity,n=t.visible;if(t.linkModel){var o=new nr.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?LM(Object(r),!0).forEach((function(e){jM(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LM(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},ZE(r))),i=new nr.Mesh(new nr.BufferGeometry,o);return o.setValues({side:nr.Side.DoubleSide,color:e}),i.useOriginMaterialInTransparentMode=!0,i.outlineMode=nr.OutlineMode.Disabled,i.castShadow=!1,i.castPlanarShadow=!1,i.visible=n,o.visible=n,this.updateMesh(i),i}}},{key:"updateMesh",value:function(t){var e=this.$model,r=e.points,n=e.linkModel,o=e.height,i=r.map((function(t){return new c.Point3d(t.x,t.y,o/2)})),a=r.map((function(t){return new c.Point3d(t.x,t.y,-o/2)}));if(t.geometry instanceof nr.BufferGeometry){var s=mD(i,a);t.geometry.addAttribute("position",new nr.BufferAttribute(new Float32Array(s),3)),t.geometry.destroy()}var u=n.getConcatenatedMatrix(),A=new Se.default(0,0,0).applyMatrix4(u);return t.position.set(A.x,A.y,A.z),t.rotation.setFromRotationMatrix(FE(u)),t}}])&&kM(e.prototype,r),n&&kM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a),KM=WM=VM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createMesh()},update:function(e){var r=t.$model,n=r.visible,o=r.viewColor,i=r.opacity;e.visible=n,e.getMaterials().forEach((function(t){t.setValues({opacity:i,color:o,visible:n})})),t.updateMesh(e)}}}))]),qM("design:paramtypes",["function"==typeof(HM=void 0!==ci&&ci)?HM:Object])],WM);function JM(t){return function(t){if(Array.isArray(t))return XM(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 XM(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 XM(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 XM(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 ZM(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,$M(n.key),n)}}function $M(t){var e=function(t,e){if("object"!=oR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oR(e)?e:String(e)}function tR(t,e){return(tR=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=nR(t);if(e){var o=nR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rR(this,r)}}function rR(t,e){if(e&&("object"===oR(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 nR(t){return(nR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function oR(t){return(oR="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 iR,aR=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":oR(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},sR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":oR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},uR=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&&tR(t,e)}(i,t);var e,r,n,o=eR(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.entityType=tI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new nr.Group,n=t.pointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.data,u=t.path.getAllPolygonPoints(),A=FE(n),l=BD({matrix:A,depth:o,points:u,color:i,side:nr.Side.FrontSide,opacity:a}),f=BD({matrix:A,depth:0,points:u,color:i,side:nr.Side.BackSide,opacity:a}),h=[].concat(JM(u),[u[0]]),p=[l,f,wD({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,o)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),color:i,side:nr.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&r.add([s.start,s.end].map((function(e,r){var n=new nr.Mesh(AR,0===r?lR:fR);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=FE(t.originPointToGlobalMatrix());return n.applyMatrix(o),n}))),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&ZM(e.prototype,r),n&&ZM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function cR(t){return Nw([].concat(JM(t.getTopRenderPoints()),JM(t.getBottomRenderPoints())))}uR=aR([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.roundCornerGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:cR(this.$model)}}))]),sR("design:paramtypes",["function"==typeof(iR=void 0!==va&&va)?iR:Object])],uR);var AR=new nr.shapeBuilder.SphereBufferGeometry(3),lR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),fR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function hR(t){return function(t){if(Array.isArray(t))return pR(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 pR(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 pR(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 pR(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 dR(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,gR(n.key),n)}}function gR(t){var e=function(t,e){if("object"!=ER(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ER(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ER(e)?e:String(e)}function yR(t,e){return(yR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vR(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=IR(t);if(e){var o=IR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mR(this,r)}}function mR(t,e){if(e&&("object"===ER(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 IR(t){return(IR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ER(t){return(ER="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 CR,bR=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":ER(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},BR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ER(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},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&&yR(t,e)}(i,t);var e,r,n,o=vR(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.entityType=eI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new nr.Group,n=t.pointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.path.getAllPolygonPoints(),u=new we.default;u.fromString(n.toArray().join(","));var A=FE(u),l=BD({matrix:A,depth:0,points:s,color:i,side:nr.Side.FrontSide,opacity:a}),f=BD({matrix:A,depth:-o,points:s,color:i,side:nr.Side.BackSide,opacity:a}),h=[].concat(hR(s),[s[0]]),p=[l,f,wD({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:nr.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&dR(e.prototype,r),n&&dR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function PR(t){return Nw([].concat(hR(t.getTopRenderPoints()),hR(t.getBottomRenderPoints())))}function SR(t){return function(t){if(Array.isArray(t))return _R(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 _R(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 _R(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 _R(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 QR(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 OR(t,e,r){return(e=xR(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function DR(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,xR(n.key),n)}}function xR(t){var e=function(t,e){if("object"!=jR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jR(e)?e:String(e)}function MR(t,e){return(MR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RR(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=LR(t);if(e){var o=LR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TR(this,r)}}function TR(t,e){if(e&&("object"===jR(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 LR(t){return(LR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jR(t){return(jR="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)}wR=bR([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.specialShapedGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:PR(this.$model)}}))]),BR("design:paramtypes",["function"==typeof(CR=void 0!==Da&&Da)?CR:Object])],wR);var kR,NR=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":jR(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},FR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":jR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},GR=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&&MR(t,e)}(i,t);var e,r,n,o=RR(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.entityType=$m,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.color,n=t.opacity,o=t.depth,i=t.shapePointsInGroove,a=t.data,s=new nr.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?QR(Object(r),!0).forEach((function(e){OR(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QR(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({side:nr.Side.DoubleSide,color:r},ZE(n))),u=i,c=u[0],A=new nr.Shape;A.moveTo(c.x,c.y),u.forEach((function(t){A.lineTo(t.x,t.y)})),A.lineTo(c.x,c.y);var l=nr.shapeBuilder.extrude(A,{bevelEnabled:!1,depth:o}),f=new nr.Mesh(l,s),h=FE(t.pointToGlobalMatrix());f.applyMatrix(h),$E(f);var p=[f].map((function(t){var e=PD(t.geometry);return t.add(e),e}));e.wireFrames=p,e.updateWireFrameVisibility();var d=new nr.Group;return d.add(f),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&d.add([a.start,a.end].map((function(e,r){var n=new nr.Mesh(zR,0===r?YR:HR);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=FE(t.originPointToGlobalMatrix());return n.applyMatrix(o),n}))),d},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&DR(e.prototype,r),n&&DR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function UR(t){return Nw([].concat(SR(t.getTopRenderPoints()),SR(t.getBottomRenderPoints())))}GR=NR([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.squareGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:UR(this.$model)}}))]),FR("design:paramtypes",["function"==typeof(kR=void 0!==Ya&&Ya)?kR:Object])],GR);var zR=new nr.shapeBuilder.SphereBufferGeometry(3),YR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),HR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function VR(t){return(VR="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 qR(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,KR(n.key),n)}}function WR(t,e,r){return e&&qR(t.prototype,e),r&&qR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function KR(t){var e=function(t,e){if("object"!=VR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=VR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==VR(e)?e:String(e)}var JR=WR((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.getDesignDoc=e,this.objectEntityMap=new Map,this.createFittingEntities=Xu.ob.flatEntitiesCreator((function(t){return new GD(t,r.objectEntityMap)})),this.createIntersectEntities=Xu.ob.flatEntitiesCreator((function(t){return new Hx(t)})),this.createGrooveFittingEntities=Xu.ob.flatEntitiesCreator((function(t){return new vx(t,r.objectEntityMap)})),this.createPlankFaceHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new TM(t)})),this.careateFittingHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new ox(t)})),this.careatePlankOutlineHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new KM(t)})),this.createHoleEntities=Xu.ob.flatEntitiesCreator((function(t){return new xx(t)})),this.createSquareGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new GR(t)})),this.createRoundCornerGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new uR(t)})),this.createSpecialShapedGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new wR(t)})),this.createPathGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new aM(t)})),this.createPlankAreaFaceHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new vM(t)})),this.getFittingEntities=function(){var t=r.getDesignDoc();return t?r.createFittingEntities(t.getFittings()):[]},this.getGrooveFittingEntities=function(){var t=r.getDesignDoc();return t?r.createGrooveFittingEntities(t.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var t=r.getDesignDoc();return t?r.createIntersectEntities(t.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankFaceHintEntities(t.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var t=r.getDesignDoc();return t?r.careateFittingHintEntities(t.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var t=r.getDesignDoc();return t?r.careatePlankOutlineHintEntities(t.getPlankOutlineHintModels()):[]},this.getHoleEntities=function(){var t=r.getDesignDoc();return t?r.createHoleEntities(t.getHoleModels()):[]},this.getSquareGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSquareGrooveEntities(t.getSquareGrooveModels()):[]},this.getRoundCornerGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createRoundCornerGrooveEntities(t.getRoundCornerGrooveModels()):[]},this.getSpecialShapedGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSpecialShapedGrooveEntities(t.getSpecialShapedGrooveModels()):[]},this.getPathGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createPathGrooveEntities(t.getPathGrooveModels()):[]},this.getPlankAreaFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankAreaFaceHintEntities(t.getPlankAreaFaceHints()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities,this.getHoleEntities,this.getSquareGrooveEntities,this.getRoundCornerGrooveEntities,this.getSpecialShapedGrooveEntities,this.getPathGrooveEntities,this.getPlankAreaFaceHintEntities]}));function XR(t){return(XR="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 ZR(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return $R(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 $R(t,e)}(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 $R(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 tT(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,eT(n.key),n)}}function eT(t){var e=function(t,e){if("object"!=XR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=XR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==XR(e)?e:String(e)}var rT=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.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){e.pressMap.forEach((function(t,r){e.pressMap.set(r,!1)}))},this.onKeyDown=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)||e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!0)},this.onKeyUp=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)&&(e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!1))},this.active()}var e,r,n;return e=t,(r=[{key:"addKeyboardKeyListener",value:function(t){var e=this,r=Object(Qr.castArray)(t);if(r.some((function(t){return!e.isValidKeyboardKey(t)})))throw new Error("keyboard-key is invalid");var n,o=ZR(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.pressMap.set(i,!1)}}catch(t){o.e(t)}finally{o.f()}}},{key:"removeKeyboardKeyListener",value:function(t){var e,r=ZR(Object(Qr.castArray)(t));try{for(r.s();!(e=r.n()).done;){var n=e.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(t){r.e(t)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(t){var e=this;return Object(Qr.castArray)(t).every((function(t){return e.pressMap.get(t)}))}},{key:"getKeyBoardKey",value:function(t){return t.key.toLowerCase()}},{key:"isPrevent",value:function(t){if(this.disabled)return!0;var e=t.target;if(!e)return!1;if("INPUT"===e.tagName){var r=e.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===e.tagName||"TEXTAREA"===e.tagName}},{key:"isValidKeyboardKey",value:function(t){return Ce.includes(t)}}])&&tT(e.prototype,r),n&&tT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),nT=new Map([[es.ParamModelCategory.FRAME,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SPECIAL_FRAME,es.ParamModelCategory.EMBED_FRAME_W,es.ParamModelCategory.POLE_W,es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,es.ParamModelCategory.BOARD,es.ParamModelCategory.DRAWER,es.ParamModelCategory.SPACE_GROUP,es.ParamModelCategory.SINGLE_SLIDING_DOOR,es.ParamModelCategory.FRAME,es.ParamModelCategory.SLIDING_DOOR_BOARD,es.ParamModelCategory.PARAM_FURNITURE_PART,es.ParamModelCategory.SANITARY_COMPONENT,es.ParamModelCategory.DOOR_LEAF,es.ParamModelCategory.DECORATIVE_MOLDING_C,es.ParamModelCategory.DECORATIVE_MOLDING_W,es.ParamModelCategory.HANDS_FREE,es.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[es.ParamModelCategory.SHOWER_ROOM,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SPECIAL_FRAME,es.ParamModelCategory.EMBED_FRAME_W,es.ParamModelCategory.POLE_W,es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,es.ParamModelCategory.BOARD,es.ParamModelCategory.DRAWER,es.ParamModelCategory.SPACE_GROUP,es.ParamModelCategory.SINGLE_SLIDING_DOOR,es.ParamModelCategory.FRAME,es.ParamModelCategory.PARAM_FURNITURE_PART,es.ParamModelCategory.SANITARY_COMPONENT,es.ParamModelCategory.DOOR_LEAF,es.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SPECIAL_FRAME,es.ParamModelCategory.EMBED_FRAME_W,es.ParamModelCategory.BOARD,es.ParamModelCategory.SPACE_GROUP,es.ParamModelCategory.POLE_W,es.ParamModelCategory.SINGLE_SLIDING_DOOR,es.ParamModelCategory.SLIDING_DOOR_BOARD,es.ParamModelCategory.DRAWER,es.ParamModelCategory.RAIL,es.ParamModelCategory.DOOR_LEAF]],[es.ParamModelCategory.SLIDING_DOOR_C,[es.ParamModelCategory.RAIL,es.ParamModelCategory.SINGLE_SLIDING_DOOR]],[es.ParamModelCategory.SPACE_GROUP,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,es.ParamModelCategory.BOARD,es.ParamModelCategory.SPECIAL_BOARD,es.ParamModelCategory.SPACE_GROUP]],[es.ParamModelCategory.SINGLE_SLIDING_DOOR,[es.ParamModelCategory.SLIDING_DOOR_CORE,es.ParamModelCategory.DOOR_WAIST_LINE]],[es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[es.ParamModelCategory.SWING_DOOR]],[es.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[es.ParamModelCategory.BOARD]],[es.ParamModelCategory.SWING_DOOR,[es.ParamModelCategory.DOOR_CORE,es.ParamModelCategory.DOOR_WAIST_LINE,es.ParamModelCategory.DECORATIVE_MOLDING,es.ParamModelCategory.BOARD]],[es.ParamModelCategory.DRAWER,[es.ParamModelCategory.DRAWER_PANEL,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.BOARD]],[es.ParamModelCategory.PARAM_FURNITURE,[es.ParamModelCategory.FURNITURE_LEG]],[es.ParamModelCategory.KADA,[es.ParamModelCategory.BYOBU,es.ParamModelCategory.BYOBU_FRAME,es.ParamModelCategory.BYOBU_PANEL]]]);function oT(t){return(oT="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 iT(t){return function(t){if(Array.isArray(t))return aT(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 aT(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 aT(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 aT(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 sT(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,uT(n.key),n)}}function uT(t){var e=function(t,e){if("object"!=oT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oT(e)?e:String(e)}var cT=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.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=ue.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new rT,this.memoGetHintModelLite=LP()((function(t){return e.isFittingLikeModel(t)?Sb(t):e.getParamModelLite(t)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var e,r,n;return e=t,(r=[{key:"isAccessory",value:function(t){var e;if(this.isAccessoryCache.has(t.id))return this.isAccessoryCache.get(t.id);var r=null===(e=null==t?void 0:t.getParent)||void 0===e?void 0:e.call(t),n=(nT.get(r?r.getCategory().getRoot():void 0)||[]).some((function(e){return t.getCategory().belongsTo(e)}));return this.isAccessoryCache.set(t.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(t,e){for(var r,n,o=this,i=[],a=e;a&&a!==t;)i.unshift(a),a=(null===(r=a.getParent)||void 0===r?void 0:r.call(a))||(null===(n=a.getAssembly)||void 0===n?void 0:n.call(a));return i.find((function(t){return o.isAccessory(t)}))||e}},{key:"getParamModelLite",value:function(t){var e=(t.isRoot()?t:t.getRoot()).getAssembly();return e?xP(t,{origin:G.SENSE},void 0,xP(e,{origin:G.SENSE})):xP(t,{origin:G.SENSE})}},{key:"topModelModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o,i,a,s=t.isRoot()?t:t.getRoot(),u=s.getAssembly(),c=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=!1;if(c&&(i=vL(c))&&!this.isFittingLikeModel(i)&&(c.entityType===iA?a=(a=i.isRoot()?i:i.getRoot()).getAssembly()||a:(A=!0,a=i),o=a===s||a===u),o){for(var l=!1,f=!1,h=i instanceof _e.CoreParamModel?i.getParent():void 0,p=t;p;){if(p===i){l=!0;break}if(p===h){f=!0;break}p=(null===(r=p.getParent)||void 0===r?void 0:r.call(p))||(null===(n=p.getAssembly)||void 0===n?void 0:n.call(p))}if(e===ce.CLICK)return l?i:f?this.getAccessoryAtFirstLevel(h,t):a instanceof _e.CoreParamModelAssembly?(i.isRoot()?i:i.getRoot())===s?this.getAccessoryAtFirstLevel(s,t):s:this.getAccessoryAtFirstLevel(s,t);if(e===ce.DB_CLICK)return l?A?s:this.getAccessoryAtFirstLevel(i,t):this.getAccessoryAtFirstLevel(s,t)}else{if(e===ce.CLICK)return u||s;if(e===ce.DB_CLICK)return u?s:this.getAccessoryAtFirstLevel(s,t)}}},{key:"accessoryModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o=t.isRoot()?t:t.getRoot(),i=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,a=i&&vL(i),s=!1;if(a&&!this.isFittingLikeModel(a)&&(s=(a.isRoot()?a:a.getRoot())===o),s){for(var u=!1,c=!1,A=null==a?void 0:a.getParent(),l=t;l;){if(l===a){u=!0;break}if(l===A){c=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(e===ce.CLICK)return u?a:this.getAccessoryAtFirstLevel(c?A:o,t);if(e===ce.DB_CLICK){if(u)return this.getAccessoryAtFirstLevel(a,t);var f=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(f,t)}}else{if(e===ce.CLICK)return this.getAccessoryAtFirstLevel(o,t);if(e===ce.DB_CLICK){var h=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(h,t)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(t){var e,r;if(this.isFittingLikeModel(t))return t;var n,o,i=t.isRoot()?t:t.getRoot(),a=i.getAssembly(),s=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,u=!1;if(s&&(n=vL(s))&&!this.isFittingLikeModel(n)&&(u=(o=s.entityType===iA?(o=n.isRoot()?n:n.getRoot()).getAssembly()||o:n)===i||o===a),n&&u){for(var c=!1,A=!1,l=n instanceof _e.CoreParamModel?n.getParent():void 0,f=t;f;){if(f===n){c=!0;break}if(f===l){A=!0;break}f=(null===(e=f.getParent)||void 0===e?void 0:e.call(f))||(null===(r=f.getAssembly)||void 0===r?void 0:r.call(f))}return c?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof _e.CoreParamModelAssembly?i:this.getAccessoryAtFirstLevel(n,t):A?this.getAccessoryAtFirstLevel(l,t):this.designMode===ue.TOP_MODEL&&i!==n&&i!==n.getRoot()?i:this.getAccessoryAtFirstLevel(i,t)}return this.designMode===ue.TOP_MODEL?i.getAssembly()||i:this.getAccessoryAtFirstLevel(i,t)}},{key:"setCurSelectEntity",value:function(t){this.curSelectEntity=t}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(t){this.curHintEntity=t}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(t,e){this.designMode=t,t===ue.CUSTOM?(this.customModeFindSelectModel=null==e?void 0:e.findSelectModel,this.customModeFindHintModel=null==e?void 0:e.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(Qr.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(t){var e=mL[t.type];return{entityId:t.id,entityType:e}}},{key:"customModeSelectModel",value:function(t,e){var r,n;n=this.isFittingLikeModel(t)?Sb(t):this.getParamModelLite(t);var o=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,e);return Object(Qr.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(t){var e,r=this,n=this.memoGetHintModelLite(t),o=null===(e=this.customModeFindHintModel)||void 0===e?void 0:e.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Qr.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(t){return t instanceof _i||t instanceof Ya||t instanceof va||t instanceof Da||t instanceof ia||t instanceof vo||t instanceof En||t instanceof dr&&Boolean(t.isAppendHardware)}},{key:"getSelectEntity",value:function(t,e){var r;if(this.isMultiSelect&&this.designMode!==ue.CUSTOM){switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t}if(!r)return;var n=yL(r),o=Object(Qr.castArray)(this.curSelectEntity).filter((function(t){return t}));this.prevModeSelectEntity.length&&o.push.apply(o,iT(this.prevModeSelectEntity));var i=o[0]&&vL(o[0]);if(i&&this.isFittingLikeModel(i)!==this.isFittingLikeModel(r))return n;var a=o.filter((function(t){return t.entityId!==n.entityId}));return a.length!==o.length?a:[].concat(iT(a),[n])}switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t;break;case ue.CUSTOM:return this.customModeSelectModel(t,e)}return yL(r||t)}},{key:"getHintEntity",value:function(t){var e;switch(this.designMode){case ue.TOP_MODEL:case ue.ACCESSORY:e=this.topModelModeAndAccessoryModeHint(t);break;case ue.PRODUCT:e=t;break;case ue.CUSTOM:return this.customModeHintModel(t)}var r=this.curSelectEntity&&Object(Qr.castArray)(this.curSelectEntity)||[];if(!([].concat(iT(r),iT(this.prevModeSelectEntity)).findIndex((function(t){return t.entityId===e.id}))>-1))return yL(e)}},{key:"registerMultiSelectShortcut",value:function(t){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=t,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&sT(e.prototype,r),n&&sT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function AT(t){return(AT="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 lT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fT(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,hT(n.key),n)}}function hT(t){var e=function(t,e){if("object"!=AT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AT(e)?e:String(e)}function pT(t,e){return(pT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dT(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=yT(t);if(e){var o=yT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gT(this,r)}}function gT(t,e){if(e&&("object"===AT(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 yT(t){return(yT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vT=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&&pT(t,e)}(i,t);var e,r,n,o=dT(i);function i(){return lT(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"pickRayTarget",value:function(t){return t&&vL(t)}},{key:"selection",get:function(){return fL().getStateManager().kaf.selection}},{key:"hint",get:function(){return fL().getStateManager().kaf.hint}},{key:"designModeCtx",get:function(){return fL().designModeContext}}])&&fT(e.prototype,r),n&&fT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(593).a.Feature);function mT(t){return(mT="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 IT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ET(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,CT(n.key),n)}}function CT(t){var e=function(t,e){if("object"!=mT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mT(e)?e:String(e)}function bT(t,e){return(bT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function BT(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=PT(t);if(e){var o=PT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wT(this,r)}}function wT(t,e){if(e&&("object"===mT(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 PT(t){return(PT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ST=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&&bT(t,e)}(i,t);var e,r,n,o=BT(i);function i(){var t;return IT(this,i),(t=o.apply(this,arguments)).isMouseDown=!1,t}return e=i,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(t){if(!this.isMouseDown){var e=this.context.pick(t.sceneId,t.event),r=this.pickRayTarget(null==e?void 0:e.entity);if(Sr.eventNames().includes(Br.PLANK_FACE_HOVER)&&r instanceof _e.CoreParamModel){var n=e.entity,o=n.point,i={modelId:n.entityId,id:YE(r,o)};Sr.emit(Br.PLANK_FACE_HOVER,i)}if(r){var a=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),ue.CUSTOM,this.hint.hint(a)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&ET(e.prototype,r),n&&ET(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(vT);function _T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return QT(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 QT(t,e)}(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 QT(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 OT(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,DT(n.key),n)}}function DT(t){var e=function(t,e){if("object"!=LT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LT(e)?e:String(e)}function xT(t,e){return(xT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function MT(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=TT(t);if(e){var o=TT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return RT(this,r)}}function RT(t,e){if(e&&("object"===LT(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 TT(t){return(TT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LT(t){return(LT="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 jT=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":LT(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},kT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":LT(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},NT=Xu.ib.Highlighters.WireGeometry,FT=Xu.ib.Highlighters.generateWireGeometryForHighlighterGeometry,GT=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&&xT(t,e)}(i,t);var e,r,n,o=MT(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)).models=t,r.createFittingModelBox=e,r}return e=i,(r=[{key:"getGeometry",value:function(){var t,e=new NT,r=_T(this.models);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=void 0;o=n instanceof _e.CoreParamModel||n instanceof _e.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var i=FT(o);e.append(i)}}catch(t){r.e(t)}finally{r.f()}return e}}])&&OT(e.prototype,r),n&&OT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a),UT=GT=jT([Object(rA.b)([new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),kT("design:paramtypes",[Array,Function])],GT);function zT(t){return(zT="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 YT(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,HT(n.key),n)}}function HT(t){var e=function(t,e){if("object"!=zT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zT(e)?e:String(e)}function VT(t,e){return(VT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qT(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=KT(t);if(e){var o=KT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return WT(this,r)}}function WT(t,e){if(e&&("object"===zT(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 KT(t){return(KT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var JT=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&&VT(t,e)}(i,t);var e,r,n,o=qT(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))._init(),t}return e=i,(r=[{key:"_init",value:function(){var t=this,e={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(e){var r=e.map((function(t){return vL(t)}));return new UT(r.filter((function(t){return t})),t.createFittingModelBox)}};this.selection.addMultiSelectionConfig(e)}},{key:"createFittingModelBox",value:function(t){var e;if(t instanceof En)e=t.boundingBox;else if(t instanceof vo)e=mx(t);else if(t instanceof _i)e=t.boundingBox;else if(t instanceof Ya)e=UR(t);else if(t instanceof va)e=cR(t);else if(t instanceof Da)e=PR(t);else{if(!(t instanceof ia))throw new Error("不支持的多选类型");e=sM(t)}return e}},{key:"onClick",value:function(t){this.triggerClick(t,ce.CLICK)}},{key:"onDblClick",value:function(t){this.designModeCtx.isMultiSelect||this.triggerClick(t,ce.DB_CLICK)}},{key:"triggerClick",value:function(t,e){var r=this.context.pick(t.sceneId,t.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(Sr.eventNames().includes(Br.PLANK_FACE_CLICK)&&n instanceof _e.CoreParamModel){var o=r.entity,i=o.point,a={modelId:o.entityId,id:YE(n,i)};Sr.emit(Br.PLANK_FACE_CLICK,a)}if(n){var s=this.designModeCtx.getSelectEntity(n,e);this.designModeCtx.getDesignMode()===ue.CUSTOM?s&&this.selection.select(s):(this.selection.select(s),this.designModeCtx.setCurSelectEntity(s))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&YT(e.prototype,r),n&&YT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(vT);function XT(t){return(XT="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 ZT(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 $T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ZT(Object(r),!0).forEach((function(e){tL(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZT(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function tL(t,e,r){return(e=rL(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eL(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,rL(n.key),n)}}function rL(t){var e=function(t,e){if("object"!=XT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=XT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==XT(e)?e:String(e)}function nL(){return(nL="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=oL(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 oL(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=uL(t)););return t}function iL(t,e){return(iL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function aL(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=uL(t);if(e){var o=uL(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sL(this,r)}}function sL(t,e){if(e&&("object"===XT(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 uL(t){return(uL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cL,AL=new Us.SingletonRef,lL=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&&iL(t,e)}(i,t);var e,r,n,o=aL(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.pad",name:"cFrameApp",Component:vD,axrs:h_,singleton:AL},t)).stateManager=e,r.viewer=new Nf,r.designModeContext=new cT,r}return e=i,(r=[{key:"init",value:function(){nL(uL(i.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var t=this.stateManager;t.initState(),y_(t);var e=this.getDependentPlugin(zs.a),r=this.getDependentPlugin(Tm);t.kaf=e.stateManager,t.core=r.stateManager}},{key:"initNet",value:function(){nL(uL(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new ud),this.client=new Ip(this.net)}},{key:"initApp",value:function(){var t=this,e=this.stateManager,r=e.core,n=r.design,o=r.pad,i=this.getDependentPlugin(zs.a);this.viewer.config(i,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return t.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(t,e){for(var r=e.point,n=o.findModelOrAssemblyModelById(t.entityId);n&&!sI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:iA,point:r}:$T($T({},t),{},{point:r})},paramModelSymbol:iA,filterParamModel:function(e){return!t.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(e.getCategory().categoryId)}}),i.registerEntityDocument(new JR((function(){return e.core.fittingDesign}))),e.kaf.toolbox.addIdleToolFeature((function(){return new JT})),e.kaf.toolbox.addIdleToolFeature((function(){return new ST})),i.setLayout($Q)}}])&&eL(e.prototype,r),n&&eL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.PluginApplication),fL=AL.instance;function hL(t){return(hL="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 pL(t,e,r){var n;return n=function(t,e){if("object"!=hL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==hL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dL(t,e){var r=new Map;return function(){var n,o=e.apply(void 0,arguments);if(r.has(o))n=r.get(o);else if(n=t.apply(void 0,arguments),Object(Qr.isObject)(n)&&Object(Qr.isFunction)(n.then)&&Object(Qr.isFunction)(n.catch)){var i=Promise.resolve(n);r.set(o,i),i.finally((function(){r.delete(o)}))}return n}}function gL(t){return t instanceof dr?iA:t instanceof wr?oA:t instanceof En?Vm:t instanceof vo?qm:t instanceof _i?Zm:t instanceof Ya?$m:t instanceof va?tI:t instanceof Da?eI:t instanceof ia?rI:void 0}function yL(t){return{entityId:t.id,entityType:gL(t)}}function vL(t){var e=t.entityId,r=t.entityType,n=fL().getStateManager().core,o=n.fittingDesign,i=n.pad;switch(r){case iA:return i.findModelOrAssemblyModelById(e);case oA:return i.findParamModelAssembly(e);case qm:return o.getGrooveFittings().find((function(t){return t.id===e}));case Vm:return o.getFittings().find((function(t){return t.id===e}));case Zm:return o.getHoleModels().find((function(t){return t.id===e}));case $m:return o.getSquareGrooveModels().find((function(t){return t.id===e}));case tI:return o.getRoundCornerGrooveModels().find((function(t){return t.id===e}));case eI:return o.getSpecialShapedGrooveModels().find((function(t){return t.id===e}));case rI:return o.getPathGrooveModels().find((function(t){return t.id===e}));default:return}}var mL=(pL(pL(pL(pL(pL(pL(pL(pL(pL(pL(cL={},me.PARAM_MODEL,iA),me.PARAM_MODEL_ASSEMBLY,oA),me.HOLE,Vm),me.GROOVE,Vm),me.HARDWARE_GROOVE,qm),me.HARDWARE,iA),me.HOLE_V2,Zm),me.SQUARE_GROOVE,$m),me.ROUND_CORNER_GROOVE,tI),me.SPECIAL_SHAPED_GROOVE,eI),pL(cL,me.PATH_GROOVE,rI));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)}))}}var BL=new Map;function wL(t){return["designid","levelid","modelid","toolType"].map((function(e){return t[e]||""})).join(":")}var PL=dL(function(){var t=bL(EL().mark((function t(e){var r,n,o;return EL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=rd(),n=wL(e),!BL.has(n)){t.next=4;break}return t.abrupt("return",BL.get(n));case 4:return t.next=6,r.get("/cos/api/fitting-design",{params:e});case 6:return o=t.sent,BL.set(n,o.data.d),t.abrupt("return",o.data.d);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),wL);function SL(t,e){var r=zm(Qv);"function"==typeof r.fittingDesignHasChanged&&r.fittingDesignHasChanged({modelId:t,isLock:e}).catch((function(){}))}var _L,QL,OL=function(){var t=bL(EL().mark((function t(e,r){var n,o;return EL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=rd(),o=wL(r),t.prev=2,t.next=5,n.post("/cos/api/fitting-design",e,{params:r});case 5:BL.set(o,e),SL(r.modelid,!0),t.next=14;break;case 9:if(t.prev=9,t.t0=t.catch(2),null===(i=t.t0)||!Object(Qr.isObject)(i)||"0"===i.c||!i.m){t.next=13;break}throw new Error("错误码:".concat(t.t0.c,";错误信息:").concat(t.t0.m));case 13:throw t.t0;case 14:case"end":return t.stop()}var i}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}(),DL=function(){var t=bL(EL().mark((function t(e){var r,n;return EL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=rd(),n=wL(e),t.prev=2,t.next=5,r.delete("/cos/api/fitting-design",{params:e});case 5:BL.has(n)&&BL.delete(n),SL(e.modelid,!1),t.next=12;break;case 9:throw t.prev=9,t.t0=t.catch(2),t.t0;case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}();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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ML=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"==xL(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(xL(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 RL(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 TL(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){RL(i,n,o,a,s,"next",t)}function s(t){RL(i,n,o,a,s,"throw",t)}a(void 0)}))}}!function(t){t.UNKNOWN="UNKNOWN",t.PENDING="PENDING",t.RUNNING="RUNNING",t.SAVING="SAVING",t.SUCCESS="SUCCESS",t.FAIL="FAIL",t.CANCEL="CANCEL",t.TIMEOUT="TIMEOUT"}(_L||(_L={})),function(t){t[t.CABINET=0]="CABINET",t[t.WARDROBE=1]="WARDROBE",t[t.DOOR_WINDOW=2]="DOOR_WINDOW"}(QL||(QL={}));var LL=function(){var t=TL(ML().mark((function t(e){var r,n;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Qr.castArray)(e),n=zm(Kv),t.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),jL=dL(function(){var t=TL(ML().mark((function t(e,r){var n;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=zm(cI.MiniAppParamModelJsonDataService),t.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:e,templateId:r}));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),kL=dL(function(){var t=TL(ML().mark((function t(e,r,n,o){var i;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=zm(cI.MiniAppParamModelJsonDataService),t.abrupt("return",i.getModelJsonDataByModelId({modelIds:e,templateId:r,ignoreResetPosition:n,timeout:o},{timeout:-1}));case 2:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),NL=function(){var t=TL(ML().mark((function t(e){var r;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=zm(Gv),t.abrupt("return",r.findUnProductiveModels(e));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),FL=function(){return zm(Dv).modelAdd},GL=function(){return zm(Dv).modelUpdate},UL=function(){return zm(Dv).modelDelete},zL=function(t){return zm(Dv).toggleMonitor(t)},YL=function(){return zm(Fv).afterDetect},HL=function(t){return zm(Fv).setDetectionProduct(t)},VL=function(t){return zm(Fv).toggleDetection(t)};function qL(t){return(qL="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 WL(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){var n;return n=function(t,e){if("object"!=qL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==qL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */JL=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"==qL(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(qL(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 XL(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 ZL(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){XL(i,n,o,a,s,"next",t)}function s(t){XL(i,n,o,a,s,"throw",t)}a(void 0)}))}}var $L=LP()(function(){var t=ZL(JL().mark((function t(e){var r,n;return JL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=rd(),t.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:e,cache:!0}});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?WL(Object(r),!0).forEach((function(e){KL(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):WL(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({promise:!0},Hm)),tj=LP()(function(){var t=ZL(JL().mark((function t(e){var r,n,o;return JL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=rd(),t.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:e});case 3:return o=t.sent,t.abrupt("return",(null===(r=o.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Qr.mapValues)(o.data.d.modelCenterMap,(function(t){return JSON.parse(t)})):{});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());function ej(t){return(ej="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 rj(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,oj(n.key),n)}}function nj(t,e,r){return e&&rj(t.prototype,e),r&&rj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function oj(t){var e=function(t,e){if("object"!=ej(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ej(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ej(e)?e:String(e)}var ij=nj((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));function aj(t){return(aj="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 sj(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sj=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"==aj(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(aj(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 uj(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 cj(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?uj(Object(r),!0).forEach((function(e){Aj(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uj(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Aj(t,e,r){return(e=dj(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lj(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 fj(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){lj(i,n,o,a,s,"next",t)}function s(t){lj(i,n,o,a,s,"throw",t)}a(void 0)}))}}function hj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pj(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,dj(n.key),n)}}function dj(t){var e=function(t,e){if("object"!=aj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aj(e)?e:String(e)}function gj(t,e){return(gj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yj(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=mj(t);if(e){var o=mj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vj(this,r)}}function vj(t,e){if(e&&("object"===aj(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 mj(t){return(mj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ij=function(){return p_().fittingDesign.fittingDesignSense},Ej=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&&gj(t,e)}(c,t);var e,r,n,o,i,a,s,u=yj(c);function c(){return hj(this,c),u.apply(this,arguments)}return e=c,(r=[{key:"toggleAutoSave",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Ij().$actionEnableAutoSave.dispatch(t)}},{key:"isAutoSave",value:function(){return Ij().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(s=fj(sj().mark((function t(e){var r;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&(p_().viewParamModel.state.state.currModelId!==e||Ij().state.state.design.id!==e)){t.next=3;break}return t.abrupt("return",this.getConnectedFittingDesign());case 3:return t.next=5,TC(e);case 5:return r=t.sent,t.abrupt("return",PL(cj(cj({},r),{},{modelid:e})));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Ij().getConnectedFittingDesign(t,e)}},{key:"validateFittingDesign",value:function(t,e){var r=p_().entry.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(!r)return{validated:!1};var n=p_().fittingDesign.senseSetting.getSenseSettings();return{validated:function(t){if(!t.isClosedPath())return!1;for(var e=t.points,r=t.lines,n=e.length,o=0;o<n;o++){var i={type:Bs.POINT,val:e[o]},a={type:Bs.LINE,val:r[o]};if(!js(i.val))return!1;if(!ks(a.val))return!1;if(!Fs(i,a))return!1;for(var s=o+1;s<n;s++){var u={type:Bs.POINT,val:e[s]},c={type:Bs.LINE,val:r[s]};if(!Fs(i,u))return!1;if(!Fs(i,c))return!1;if(!Fs(a,u))return!1;if(!Fs(a,c))return!1}}return!0}(Gs(t,r,Object(Qr.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(a=fj(sj().mark((function t(e){var r,n=arguments;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},t.abrupt("return",Ij().appendFittingDataToFittingDesign(e,r));case 2:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"saveDesign",value:(i=fj(sj().mark((function t(e){var r,n,o,i=arguments;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},n=r.timeout,o=RE(n),Ij().$actionSaveFittingDesign.started.dispatch({defer:o,design:e}),t.abrupt("return",o.promise);case 5:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"clearDesign",value:(o=fj(sj().mark((function t(e){var r,n,o,i,a;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e||{}).timeout,o=void 0===n?5e4:n,i=r.modelId,a=RE(o),Ij().$actionClearFittingDesign.started.dispatch({defer:a,modelId:i}),t.abrupt("return",a.promise);case 4:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&pj(e.prototype,r),n&&pj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(ij);function Cj(t){return(Cj="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 bj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bj(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,wj(n.key),n)}}function wj(t){var e=function(t,e){if("object"!=Cj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Cj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Cj(e)?e:String(e)}function Pj(t,e){return(Pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sj(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=Qj(t);if(e){var o=Qj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _j(this,r)}}function _j(t,e){if(e&&("object"===Cj(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 Qj(t){return(Qj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Oj=(new os.default).setFromCenterAndSize(new Se.default(0,0,0),new Se.default(200,200,100)),Dj=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&&Pj(t,e)}(i,t);var e,r,n,o=Sj(i);function i(){return bj(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"resetDistanceAndLookAt",value:function(){var t=this.state,e=t.initCameraAttributes,r=e.position,n=e.lookAt,o=t.cameraAttributes.position,i=n.clone().sub(r).length(),a=n.clone().add(o.clone().sub(n).normalize().mul(i));this.updateCameraAttributes({position:a,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return Oj}}])&&Bj(e.prototype,r),n&&Bj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(OC.i);function xj(t){return(xj="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 Mj(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,Rj(n.key),n)}}function Rj(t){var e=function(t,e){if("object"!=xj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xj(e)?e:String(e)}function Tj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lj(t,e){return(Lj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jj(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=Nj(t);if(e){var o=Nj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kj(this,r)}}function kj(t,e){if(e&&("object"===xj(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 Nj(t){return(Nj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fj=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&&Lj(t,e)}(i,t);var e,r,n,o=jj(i);function i(){return Tj(this,i),o.apply(this,arguments)}return e=i,r&&Mj(e.prototype,r),n&&Mj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Xu.Jb.combine({scene3D:Dj})),Gj=window.document.createElement("script");Gj.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(Gj);function Uj(t){return(Uj="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 zj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yj(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,Hj(n.key),n)}}function Hj(t){var e=function(t,e){if("object"!=Uj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uj(e)?e:String(e)}function Vj(t,e){return(Vj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qj(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=Kj(t);if(e){var o=Kj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wj(this,r)}}function Wj(t,e){if(e&&("object"===Uj(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 Kj(t){return(Kj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jj=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&&Vj(t,e)}(i,t);var e,r,n,o=qj(i);function i(){var t;return zj(this,i),(t=o.apply(this,arguments)).rootState=new Fj,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new lL(this,this.rootState);t.init(),t.run()}}])&&Yj(e.prototype,r),n&&Yj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(wm.a);function Xj(t){return(Xj="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 Zj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $j(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,tk(n.key),n)}}function tk(t){var e=function(t,e){if("object"!=Xj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xj(e)?e:String(e)}function ek(t,e){return(ek=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rk(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=ok(t);if(e){var o=ok(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nk(this,r)}}function nk(t,e){if(e&&("object"===Xj(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 ok(t){return(ok=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Jj.dependencies=[zs.a,Tm];var ik=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&&ek(t,e)}(i,t);var e,r,n,o=rk(i);function i(){return Zj(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleModelViewIntersected",value:function(t){p_().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(t)}},{key:"toggleModelViewedIntersected",value:function(t){p_().fittingDesign.intersected.toggleShowIntersectGroupData(t)}}])&&$j(e.prototype,r),n&&$j(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function ak(t){return(ak="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 sk(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sk=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"==ak(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(ak(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 uk(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 ck(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){uk(i,n,o,a,s,"next",t)}function s(t){uk(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Ak(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lk(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,fk(n.key),n)}}function fk(t){var e=function(t,e){if("object"!=ak(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ak(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ak(e)?e:String(e)}function hk(t,e){return(hk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pk(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=gk(t);if(e){var o=gk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dk(this,r)}}function dk(t,e){if(e&&("object"===ak(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 gk(t){return(gk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yk=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&&hk(t,e)}(u,t);var e,r,n,o,i,a,s=pk(u);function u(){return Ak(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"getAllCustomModels",value:(a=ck(sk().mark((function t(){return sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().scene.getAllCustomModels());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"getCustomModelById",value:(i=ck(sk().mark((function t(e){return sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().scene.getCustomModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=ck(sk().mark((function t(e){return sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().scene.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&lk(e.prototype,r),n&&lk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(ij);function vk(t){return(vk="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 mk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ik(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,Ek(n.key),n)}}function Ek(t){var e=function(t,e){if("object"!=vk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=vk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vk(e)?e:String(e)}function Ck(t,e){return(Ck=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bk(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=wk(t);if(e){var o=wk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Bk(this,r)}}function Bk(t,e){if(e&&("object"===vk(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 wk(t){return(wk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pk=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&&Ck(t,e)}(i,t);var e,r,n,o=bk(i);function i(){return mk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setFittingHint",value:function(t){p_().fittingDesign.fittingHint.setFittingHint(t)}},{key:"clearFittingHint",value:function(t){p_().fittingDesign.fittingHint.clearFittingHint(t)}},{key:"setFittingHardwareHint",value:function(t){p_().fittingDesign.fittingHint.setFittingHardwareHint(t)}},{key:"clearFittingHardwareHint",value:function(t){p_().fittingDesign.fittingHint.clearFittingHardwareHint(t)}}])&&Ik(e.prototype,r),n&&Ik(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function Sk(t){return(Sk="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 _k(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_k=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"==Sk(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(Sk(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 Qk(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 Ok(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Qk(i,n,o,a,s,"next",t)}function s(t){Qk(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Dk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xk(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,Mk(n.key),n)}}function Mk(t){var e=function(t,e){if("object"!=Sk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Sk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Sk(e)?e:String(e)}function Rk(t,e){return(Rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tk(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=jk(t);if(e){var o=jk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lk(this,r)}}function Lk(t,e){if(e&&("object"===Sk(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 jk(t){return(jk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var kk,Nk,Fk=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&&Rk(t,e)}(s,t);var e,r,n,o,i,a=Tk(s);function s(){return Dk(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getAllFittingModels",value:(i=Ok(_k().mark((function t(e){return _k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().fittingDesign.fittingModel.getAllFittingModels(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=Ok(_k().mark((function t(e){return _k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().fittingDesign.fittingModel.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&xk(e.prototype,r),n&&xk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(ij),Gk=r(128);function Uk(t){return(Uk="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 zk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yk(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,Hk(n.key),n)}}function Hk(t){var e=function(t,e){if("object"!=Uk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uk(e)?e:String(e)}function Vk(t,e){return(Vk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qk(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=Kk(t);if(e){var o=Kk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wk(this,r)}}function Wk(t,e){if(e&&("object"===Uk(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 Kk(t){return(Kk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.View3D="view3d",t.Roamer="roamer"}(kk||(kk={})),function(t){t.UP="UP",t.DOWN="DOWN",t.LEFT="LEFT",t.RIGHT="RIGHT",t.FRONT="FRONT",t.BACK="BACK"}(Nk||(Nk={}));var Jk=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&&Vk(t,e)}(i,t);var e,r,n,o=qk(i);function i(){return zk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleCameraMode",value:function(t){var e;switch(t){case kk.View3D:e=GO.c.View3D;break;case kk.Roamer:e=GO.c.Roamer}fL().getStateManager().scene3D.updatePerspectiveCameraMode(e)}},{key:"moveCamera",value:function(t){var e,r=fL().getStateManager().scene3D;switch(t){case Nk.UP:case Nk.FRONT:e=Gk.a.UP;break;case Nk.DOWN:case Nk.BACK:e=Gk.a.DOWN;break;case Nk.LEFT:e=Gk.a.LEFT;break;case Nk.RIGHT:e=Gk.a.RIGHT}if(e){if(t===Nk.UP||t===Nk.DOWN)return void r.onQEPress(e);r.onWASDPress(e)}}},{key:"focusFace",value:function(t){return p_().scene.focusFace(t)}},{key:"updateCameraType",value:function(t){return p_().scene.updateCameraType(t)}},{key:"lookAt",value:function(t){return p_().scene.lookAt(t)}},{key:"unstable__adaptViewer",value:function(t){return p_().scene.adaptViewer(t)}},{key:"toggleCameraTranslateMode",value:function(t){var e=t===de.Default?GO.a.defaultMode:GO.a.classicalMode;fL().getStateManager().scene3D.setCameraControlMode(e)}}])&&Yk(e.prototype,r),n&&Yk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function Xk(t){return(Xk="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 Zk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $k(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,tN(n.key),n)}}function tN(t){var e=function(t,e){if("object"!=Xk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xk(e)?e:String(e)}function eN(t,e){return(eN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rN(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=oN(t);if(e){var o=oN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nN(this,r)}}function nN(t,e){if(e&&("object"===Xk(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 oN(t){return(oN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iN=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&&eN(t,e)}(i,t);var e,r,n,o=rN(i);function i(){return Zk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDefaultHint",value:function(t){p_().fittingDesign.plankFaceHint.setDefaultHintConfig(t)}},{key:"setModelHint",value:function(t){p_().fittingDesign.plankFaceHint.setModelHint(t)}},{key:"clearModelHint",value:function(t){p_().fittingDesign.plankFaceHint.clearModelHint(t)}}])&&$k(e.prototype,r),n&&$k(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function aN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */aN=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"==gN(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(gN(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 sN(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 uN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){sN(i,n,o,a,s,"next",t)}function s(t){sN(i,n,o,a,s,"throw",t)}a(void 0)}))}}function cN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AN(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,lN(n.key),n)}}function lN(t){var e=function(t,e){if("object"!=gN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gN(e)?e:String(e)}function fN(t,e){return(fN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function hN(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=dN(t);if(e){var o=dN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pN(this,r)}}function pN(t,e){if(e&&("object"===gN(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 dN(t){return(dN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function gN(t){return(gN="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 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":gN(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":gN(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&&fN(t,e)}(s,t);var e,r,n,o,i,a=hN(s);function s(){return cN(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getParamData",value:(i=uN(aN().mark((function t(e){return aN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.getParamModelJsonData(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamIntersected",value:(o=uN(aN().mark((function t(e){var r;return aN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p_().fittingDesign.intersected.getParamModelIntersectedData(e);case 2:return r=t.sent,t.abrupt("return",(n=r,{intersectedGroups:Object(Qr.map)(n.intersectedGroups,(function(t){return jE(jE({},t),{},{intersecteds:Object(Qr.map)(t.intersecteds,(function(t){return Object(Qr.omit)(t,["shell"])}))})}))}));case 4:case"end":return t.stop()}var n}),t)}))),function(t){return o.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.ignoreCategory||(t.ignoreCategory=he),p_().viewParamModel.getTopModelList(t)}},{key:"getParamModelPhotoById",value:function(t){return p_().viewParamModel.getParamModelPhotoData(t)}}])&&AN(e.prototype,r),n&&AN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(ij);function CN(t){return(CN="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BN(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"!=CN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=CN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==CN(e)?e:String(e)}function PN(t,e){return(PN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SN(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=QN(t);if(e){var o=QN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _N(this,r)}}function _N(t,e){if(e&&("object"===CN(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 QN(t){return(QN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mN([ae.observeAsyncApiDeco({serviceName:"ModelService"}),IN("design:type",Function),IN("design:paramtypes",["function"!=typeof!1&&Object]),IN("design:returntype","function"==typeof(yN="undefined"!=typeof Promise&&Promise)?yN:Object)],EN.prototype,"getParamData",null),mN([ae.observeAsyncApiDeco({serviceName:"ModelService"}),IN("design:type",Function),IN("design:paramtypes",["function"!=typeof!1&&Object]),IN("design:returntype","function"==typeof(vN="undefined"!=typeof Promise&&Promise)?vN:Object)],EN.prototype,"getParamIntersected",null);var ON=function(){return p_().select},DN=function(){return fL().designModeContext},xN=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&&PN(t,e)}(i,t);var e,r,n,o=SN(i);function i(){var t;return bN(this,i),(t=o.apply(this,arguments)).hasWatchSelectionChange=!1,t.plankFaceClickEvent={on:function(t){Sr.on(Br.PLANK_FACE_CLICK,t)},once:function(t){Sr.once(Br.PLANK_FACE_CLICK,t)},off:function(t){Sr.off(Br.PLANK_FACE_CLICK,t)}},t.plankFaceHoverEvent={on:function(t){Sr.on(Br.PLANK_FACE_HOVER,t)},once:function(t){Sr.once(Br.PLANK_FACE_HOVER,t)},off:function(t){Sr.off(Br.PLANK_FACE_HOVER,t)}},t.onSelectedChanged=function(){Sr.emit(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t.getSelected())},t}return e=i,(r=[{key:"getSelected",value:function(){return ON().state.state.selectedDataV2.map(this._genElement).filter((function(t){return!!t}))}},{key:"select",value:function(t){var e=Object(Qr.castArray)(t).map(this._genEntityFromElement);ON().select(e),DN().setCurSelectEntity(e)}},{key:"unSelect",value:function(t){if(t){var e=Object(Qr.castArray)(t).map(this._genEntityFromElement);ON().unSelect(e);var r=DN().getCurSelectEntity();r&&(Array.isArray(r)?DN().setCurSelectEntity(Object(Qr.difference)(r,e)):e.includes(r)&&DN().setCurSelectEntity(void 0))}else ON().select(),DN().setCurSelectEntity(void 0)}},{key:"on",value:function(t){this.startWatchSelectedChangedEvent(),Sr.on(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"off",value:function(t){Sr.off(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"once",value:function(t){this.startWatchSelectedChangedEvent(),Sr.once(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,ON().on(f_.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(t){var e={entityId:t.id,entityType:mL[t.type]};return"__intersected_model"===t.type&&(e.entityType=Wm),e}},{key:"_genElement",value:function(t){var e,r=t.id;if(t instanceof dr?t.isAppendHardware?(e=me.HARDWARE,r=t.hardwareData.id):e=me.PARAM_MODEL:t instanceof wr?e=me.PARAM_MODEL_ASSEMBLY:t instanceof vo?e=me.HARDWARE_GROOVE:t instanceof En?e=t.type===J.HOLE?me.HOLE:me.GROOVE:t instanceof _i?e=me.HOLE_V2:t instanceof Ya?e=me.SQUARE_GROOVE:t instanceof va?e=me.ROUND_CORNER_GROOVE:t instanceof Da?e=me.SPECIAL_SHAPED_GROOVE:t instanceof ia&&(e=me.PATH_GROOVE),e)return{id:r,type:e}}},{key:"__onDestroy",value:function(){ON().off(f_.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&BN(e.prototype,r),n&&BN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function MN(t){return(MN="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 RN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */RN=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"==MN(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(MN(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 TN(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 LN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){TN(i,n,o,a,s,"next",t)}function s(t){TN(i,n,o,a,s,"throw",t)}a(void 0)}))}}function jN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kN(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,NN(n.key),n)}}function NN(t){var e=function(t,e){if("object"!=MN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=MN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==MN(e)?e:String(e)}function FN(t,e){return(FN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GN(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=zN(t);if(e){var o=zN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UN(this,r)}}function UN(t,e){if(e&&("object"===MN(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 zN(t){return(zN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var YN=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&&FN(t,e)}(u,t);var e,r,n,o,i,a,s=GN(u);function u(){return jN(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"viewSelected",value:(a=LN(RN().mark((function t(){return RN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.viewSelectedParamModel());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"viewModelById",value:(i=LN(RN().mark((function t(e){return RN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.viewParamModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"resetPerspective",value:function(){var t=fL().getStateManager().scene3D;t.updateEnableCameraAnimation(!0),t.reset()}},{key:"toggleModelBorder",value:function(t){p_().scene.$actionToggleRenderBorder.dispatch(t)}},{key:"toggleModelTransparent",value:function(t){p_().scene.$actionToggleRenderTranslucent.dispatch(t)}},{key:"toggleModelFullTransparent",value:function(t){p_().scene.$actionToggleRenderMode.dispatch({mode:t?Um.FULLY_TRANSPARENT:Um.SHADING})}},{key:"toggleWhiteMode",value:function(t){p_().scene.$whiteMode.dispatch(t)}},{key:"setting",value:function(t){p_().fittingDesign.senseSetting.$actionSenseSetting.dispatch(t)}},{key:"refreshModel",value:(o=LN(RN().mark((function t(){return RN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.refreshCustomModelData());case 1:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"setInteractionPriority",value:function(t){if(Object.values(t).some((function(t){return"number"!=typeof t})))throw new Error("Interaction priority must be a number.");p_().scene.setInteractionPriority.dispatch(t)}},{key:"getInteractionPriority",value:function(){return Object(Qr.cloneDeep)(p_().scene.state.state.interactionPriority)}}])&&kN(e.prototype,r),n&&kN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(ij);function HN(t){return(HN="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 VN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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"!=HN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=HN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==HN(e)?e:String(e)}function KN(t,e){return(KN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function JN(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=ZN(t);if(e){var o=ZN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return XN(this,r)}}function XN(t,e){if(e&&("object"===HN(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 ZN(t){return(ZN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $N=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&&KN(t,e)}(i,t);var e,r,n,o=JN(i);function i(){return VN(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"parseModelPlankPath",value:function(t){return e=t.modelID,r=t.data,n=[],o=r.path?Hn(ye.OUTER,r.path):void 0,i=r.holes.map((function(t){return Hn(ye.INNER,t)})),a=new Map,o&&(n.push(o),a.set(o,i)),n.push.apply(n,LI(i)),new GI(e,n,a);var e,r,n,o,i,a}},{key:"syncModelPlankPath",value:function(t){qI(t)}}])&&qN(e.prototype,r),n&&qN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function tF(t){return(tF="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 eF(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */eF=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"==tF(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(tF(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 rF(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 nF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oF(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"!=tF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tF(e)?e:String(e)}function aF(t,e){return(aF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sF(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=cF(t);if(e){var o=cF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uF(this,r)}}function uF(t,e){if(e&&("object"===tF(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 cF(t){return(cF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var AF=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&&aF(t,e)}(s,t);var e,r,n,o,i,a=sF(s);function s(){return nF(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"stable",value:(o=eF().mark((function t(e){return eF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.validateModelStable(e.modelId));case 1: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){rF(i,r,n,a,s,"next",t)}function s(t){rF(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&oF(e.prototype,r),n&&oF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(ij);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)}function fF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hF(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,pF(n.key),n)}}function pF(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 dF(t,e){return(dF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gF(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=vF(t);if(e){var o=vF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yF(this,r)}}function yF(t,e){if(e&&("object"===lF(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 vF(t){return(vF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mF=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&&dF(t,e)}(i,t);var e,r,n,o=gF(i);function i(){var t;return fF(this,i),(t=o.apply(this,arguments)).drawDimensionLine=function(t,e){return p_().rulerLine.addDimensionRuler(t,e)},t}return e=i,(r=[{key:"removeDimensionLine",value:function(t){return p_().rulerLine.removeDimensionRuler(t)}},{key:"clearDimensionLine",value:function(){return p_().rulerLine.removeDimensionRuler()}},{key:"drawSpacingDistanceLine",value:function(t,e){return p_().rulerLine.addSpacingDistanceRuler(t,e)}},{key:"removeSpacingDistanceLine",value:function(t){return p_().rulerLine.removeSpacingDistanceRuler(t)}},{key:"clearSpacingDistanceLine",value:function(){return p_().rulerLine.removeSpacingDistanceRuler()}}])&&hF(e.prototype,r),n&&hF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function IF(t){return(IF="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 EF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CF(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,bF(n.key),n)}}function bF(t){var e=function(t,e){if("object"!=IF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=IF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==IF(e)?e:String(e)}function BF(t,e){return(BF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wF(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=SF(t);if(e){var o=SF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return PF(this,r)}}function PF(t,e){if(e&&("object"===IF(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 SF(t){return(SF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _F=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&&BF(t,e)}(i,t);var e,r,n,o=wF(i);function i(){return EF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDesignMode",value:function(t){var e=t.mode,r=t.customModeCb;fL().designModeContext.setDesignMode(e,r)}},{key:"registerMultiSelectShortcut",value:function(t){fL().designModeContext.registerMultiSelectShortcut(t)}}])&&CF(e.prototype,r),n&&CF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function QF(t){return(QF="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 OF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DF(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,xF(n.key),n)}}function xF(t){var e=function(t,e){if("object"!=QF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=QF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==QF(e)?e:String(e)}function MF(t,e){return(MF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RF(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=LF(t);if(e){var o=LF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TF(this,r)}}function TF(t,e){if(e&&("object"===QF(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 LF(t){return(LF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jF=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&&MF(t,e)}(i,t);var e,r,n,o=RF(i);function i(){return OF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setGetJsonConfig",value:function(t){if(!t||"object"!==QF(t))throw new Error("option 必须是一个对象");!function(t,e){JE[t]=WE(WE({},JE[t]),e)}("getJsonConfig",t)}}])&&DF(e.prototype,r),n&&DF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function kF(t){return(kF="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 NF(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */NF=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"==kF(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(kF(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 FF(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 GF(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){FF(i,n,o,a,s,"next",t)}function s(t){FF(i,n,o,a,s,"throw",t)}a(void 0)}))}}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,YF(n.key),n)}}function YF(t){var e=function(t,e){if("object"!=kF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=kF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==kF(e)?e:String(e)}function HF(t,e){return(HF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function VF(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=WF(t);if(e){var o=WF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qF(this,r)}}function qF(t,e){if(e&&("object"===kF(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 WF(t){return(WF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var KF=function(){return p_().fittingDesign.fittingViewer},JF=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&&HF(t,e)}(l,t);var e,r,n,o,i,a,s,u,c,A=VF(l);function l(){return UF(this,l),A.apply(this,arguments)}return e=l,(r=[{key:"addFitting",value:(c=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().addFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)})},{key:"clearFitting",value:(u=GF(NF().mark((function t(){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:KF().clearFitting();case 1:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"getFitting",value:(s=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().getFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"addHardware",value:(a=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().addHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"clearHardware",value:(i=GF(NF().mark((function t(){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:KF().clearHardware();case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getHardware",value:(o=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().getHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&zF(e.prototype,r),n&&zF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(ij);function XF(t){return(XF="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 ZF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $F(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,tG(n.key),n)}}function tG(t){var e=function(t,e){if("object"!=XF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=XF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==XF(e)?e:String(e)}function eG(t,e){return(eG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rG(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=oG(t);if(e){var o=oG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nG(this,r)}}function nG(t,e){if(e&&("object"===XF(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 oG(t){return(oG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iG=function(){return p_().detection},aG=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&&eG(t,e)}(i,t);var e,r,n,o=rG(i);function i(){var t;return ZF(this,i),(t=o.apply(this,arguments)).onAfterDetect=function(t){Sr.on(Br.DETECT_RESULT_CHANGE,t)},t.offAfterDetect=function(t){Sr.off(Br.DETECT_RESULT_CHANGE,t)},t}return e=i,(r=[{key:"enableDetection",value:function(){iG().enableDetectionOnce()}},{key:"setDetectionUI",value:function(t){iG().setDetectionUIOnce(t)}}])&&$F(e.prototype,r),n&&$F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij),sG=r(317),uG=r.n(sG),cG=new Us.I18NManager,AG="custom_order_split",lG={"custom.pad.resetPerspective":"重置视角","custom.pad.confirm":"确定","custom.pad.cannotAdd":"无法适配该模型","custom.pad.chooseBasicModule":"请选择基础模块","custom.pad.loadSeriesFailed":"加载系列失败","custom.pad.invalidSeries":"系列信息无效","custom.pad.invalidURL":"页面走丢了","custom.pad.loadDesignFailed":"产品加载失败","custom.pad.invalidDesign":"产品信息无效","custom.pad.loadFailed":"数据加载失败","custom.pad.invalidData":"数据无效","custom.pad.saveFailed":"产品保存失败","custom.pad.previewFailed":"生成预览图失败","custom.pad.save":"保存","custom.pad.saveAs":"另存为","custom.pad.saveTitle":"产品保存","custom.pad.saveAsTitle":"产品另存为","custom.pad.saveName":"产品名称","custom.pad.saveNameHolder":"请输入产品名称","custom.pad.saveRequired":"该项为必填项","custom.pad.savePos":"存储位置","custom.pad.savePersonal":"个人库","custom.pad.saveEnterprise":"企业库","custom.pad.cancel":"取消","custom.pad.askSave":"是否保存?","custom.pad.askSaveDesc":"是否要保存当前产品方案?","custom.pad.notSave":"不保存","custom.pad.getAuthFailed":"获取用户账号类型失败","custom.pad.uploadCoverFailed":"上传图片封面失败","custom.pad.hideDoor":"隐藏柜门","custom.pad.showDoor":"显示柜门","custom.pad.showDoorTip":"柜门已隐藏, 点击此处可显示柜门","custom.pad.shadingMode":"材质","custom.pad.outlineShadingMode":"材质 + 线框","custom.pad.frameStyle":"柜体样式","custom.pad.replaceFail":"修改样式失败","custom.pad.productNameExist":"产品名称已存在","custom.pad.saveSuccess":"产品保存成功","custom.pad.defaultSaveName":"未命名","custom.pad.showRuler":"显示尺寸","custom.pad.hideRuler":"隐藏尺寸"};function fG(t){return(fG="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 hG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */hG=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"==fG(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(fG(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 pG(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 dG(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){pG(i,n,o,a,s,"next",t)}function s(t){pG(i,n,o,a,s,"throw",t)}a(void 0)}))}}var gG=Object(Qr.once)((function(){return!!Object(Ud.parseServQueryParams)()}));function yG(){return vG.apply(this,arguments)}function vG(){return(vG=dG(hG().mark((function t(){var e,r,n=arguments;return hG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=Ud.servkit.createTerminal({id:e.clientId||"custom-order-split",type:Ud.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:Ud.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.parent,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mG=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"==OG(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(OG(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 IG(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 EG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CG(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,BG(n.key),n)}}function bG(t,e,r){return e&&CG(t.prototype,e),r&&CG(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function BG(t){var e=function(t,e){if("object"!=OG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OG(e)?e:String(e)}function wG(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&&PG(t,e)}function PG(t,e){return(PG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SG(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=QG(t);if(e){var o=QG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _G(this,r)}}function _G(t,e){if(e&&("object"===OG(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 QG(t){return(QG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OG(t){return(OG="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 DG,xG,MG=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":OG(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},RG=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":OG(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},TG=function(t){wG(r,t);var e=SG(r);function r(){return EG(this,r),e.apply(this,arguments)}return bG(r,[{key:"postMessageToHost",value:function(t,e){return Object(Ud.API_UNSUPPORT)()}}]),r}(Ud.ServService);MG([Ud.anno.decl.event(),RG("design:type","function"==typeof(DG=void 0!==Ud.ServEventer&&Ud.ServEventer)?DG:Object)],TG.prototype,"watcher",void 0),MG([Ud.anno.decl.api(),RG("design:type",Function),RG("design:paramtypes",[Object,String]),RG("design:returntype","function"==typeof(xG=void 0!==Ud.ServAPIRetn&&Ud.ServAPIRetn)?xG:Object)],TG.prototype,"postMessageToHost",null);var LG=function(t){wG(o,t);var e,r,n=SG(o);function o(){return EG(this,o),n.apply(this,arguments)}return bG(o,[{key:"postMessageToHost",value:(e=mG().mark((function t(e,r){return mG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.parent.postMessage(e,null!=r?r:"*");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){IG(i,n,o,a,s,"next",t)}function s(t){IG(i,n,o,a,s,"throw",t)}a(void 0)}))},function(t,e){return r.apply(this,arguments)})}]),o}(TG=MG([Ud.anno.decl({id:"com.custom.miniapp.model.viewer.booter.message.service",version:"1.0.0"})],TG));function jG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */jG=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"==WG(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(WG(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 kG(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 NG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FG(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,UG(n.key),n)}}function GG(t,e,r){return e&&FG(t.prototype,e),r&&FG(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function UG(t){var e=function(t,e){if("object"!=WG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WG(e)?e:String(e)}function zG(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&&YG(t,e)}function YG(t,e){return(YG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function HG(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=qG(t);if(e){var o=qG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return VG(this,r)}}function VG(t,e){if(e&&("object"===WG(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 qG(t){return(qG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function WG(t){return(WG="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)}LG=MG([Ud.anno.impl()],LG);var KG,JG=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":WG(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},XG=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":WG(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ZG=function(t){zG(r,t);var e=HG(r);function r(){return NG(this,r),e.apply(this,arguments)}return GG(r,[{key:"heart",value:function(){return Object(Ud.API_UNSUPPORT)()}}]),r}(Ud.ServService);JG([Ud.anno.decl.api(),XG("design:type",Function),XG("design:paramtypes",[]),XG("design:returntype","function"==typeof(KG=void 0!==Ud.ServAPIRetn&&Ud.ServAPIRetn)?KG:Object)],ZG.prototype,"heart",null);var $G=function(t){zG(o,t);var e,r,n=HG(o);function o(){return NG(this,o),n.apply(this,arguments)}return GG(o,[{key:"heart",value:(e=jG().mark((function t(){return jG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){kG(i,n,o,a,s,"next",t)}function s(t){kG(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})}]),o}(ZG=JG([Ud.anno.decl({id:"com.custom.miniapp.model.viewer.booter.session.service",version:"1.0.0"})],ZG));function tU(t){return(tU="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 eU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */eU=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"==tU(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(tU(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 rU(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 nU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){rU(i,n,o,a,s,"next",t)}function s(t){rU(i,n,o,a,s,"throw",t)}a(void 0)}))}}function oU(t){return iU.apply(this,arguments)}function iU(){return(iU=nU(eU().mark((function t(e){var r,n,o;return eU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.onlineChecker,n=e.interval,o=e.onBreak,t.next=3,ME(n);case 3:return t.next=5,r();case 5:t.sent?oU(e):o&&"function"==typeof o&&o();case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function aU(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,uU(n.key),n)}}function sU(t,e,r){return e&&aU(t.prototype,e),r&&aU(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uU(t){var e=function(t,e){if("object"!=dU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dU(e)?e:String(e)}function cU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AU(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&&lU(t,e)}function lU(t,e){return(lU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fU(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=pU(t);if(e){var o=pU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hU(this,r)}}function hU(t,e){if(e&&("object"===dU(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 pU(t){return(pU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dU(t){return(dU="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)}$G=JG([Ud.anno.impl()],$G);var gU,yU=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":dU(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},vU=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":dU(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mU=function(t){AU(r,t);var e=fU(r);function r(){return cU(this,r),e.apply(this,arguments)}return sU(r)}(Ud.ServService);yU([Ud.anno.decl.event(),vU("design:type","function"==typeof(gU=void 0!==Ud.ServEventer&&Ud.ServEventer)?gU:Object)],mU.prototype,"offlineWatcher",void 0);var IU=function(t){AU(r,t);var e=fU(r);function r(){return cU(this,r),e.apply(this,arguments)}return sU(r)}(mU=yU([Ud.anno.decl({id:"com.custom.miniapp.model.viewer.independent.state.service",version:"1.0.0"})],mU));IU=yU([Ud.anno.impl()],IU);var EU=[{decl:mU,impl:IU}];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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bU=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"==CU(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(CU(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 BU(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 wU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){BU(i,n,o,a,s,"next",t)}function s(t){BU(i,n,o,a,s,"throw",t)}a(void 0)}))}}var PU="custom-order-split-transfer";function SU(t){return _U.apply(this,arguments)}function _U(){return(_U=wU(bU().mark((function t(e){var r,n,o=arguments;return bU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=Ud.servkit.createTerminal({id:r.clientId||PU,type:Ud.EServTerminal.MASTER,server:{serviceRefer:/.*/,service:{services:[]}},session:{channel:{type:Ud.EServChannel.WINDOW,config:{master:{createWindow:function(t){return{target:e,origin:"*"}},destroyWindow:function(){e.close()}}}}}}),t.next=4,n.openSession({timeout:r.timeout||3e4});case 4:return t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function QU(){return OU.apply(this,arguments)}function OU(){return(OU=wU(bU().mark((function t(){var e,r,n=arguments;return bU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=Ud.servkit.createTerminal({id:e.clientId||PU,type:Ud.EServTerminal.SLAVE,server:{serviceRefer:/.*/,service:{services:EU}},session:{channel:{type:Ud.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.opener,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var DU=r(836),xU=r(150);function MU(t){return(MU="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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */RU=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"==MU(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(MU(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 TU(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 LU(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 LU(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 LU(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 jU(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)}window.React=Hs.a;var kU=document.getElementById("root");function NU(){return Promise.resolve([DU.a,Jj]).then(function(){var t,e=(t=RU().mark((function t(e){var r,n,o,i;return RU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=TU(e,2),n=r[0],o=r[1],i=new n,t.next=4,i.registerPlugin(o).start({fpsDetectorEnabled:!0});case 4:return t.next=6,FU(i.getAppNodeId());case 6:document.body.removeChild(kU);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){jU(i,n,o,a,s,"next",t)}function s(t){jU(i,n,o,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()).catch((function(t){Object(xU.unmountComponentAtNode)(kU),Object(xU.render)(Hs.a.createElement(x_,null),kU),console.error("micros/pad",t)}))}function FU(t){var e=RE(5e3);return function r(){requestAnimationFrame((function(){document.querySelector("#".concat(t))?e.resolve():r()}))}(),e.promise}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 UU(t,e,r){return(e=qU(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zU=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"==GU(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(GU(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 YU(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 HU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){YU(i,n,o,a,s,"next",t)}function s(t){YU(i,n,o,a,s,"throw",t)}a(void 0)}))}}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"!=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)}(t,"string");return"symbol"==GU(e)?e:String(e)}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.serviceMap=new Map,this.getHost=function(){return t.isIndependentMiniApp()?{booter:window.opener,postMessage:function(t,r){return e.sappSDK.client.getService(TG).postMessageToHost(t,r)},onMessageReceive:function(t){return e.sappSDK.client.getService(TG).watcher.on(t)}}:{postMessage:function(t,e){return window.parent.postMessage(t,null!=e?e:"*")},onMessageReceive:function(t){return window.addEventListener("message",t)}}},this.initLange(ie.ZH_CN,{zh_CN:lG}),function(t){Rm=t}(this)}var e,r,n,o,i;return e=t,r=[{key:"startOnApiCalledEvent",value:function(){var t=this,e={on:function(t){return Sr.on(Br.API_CALLED,t),function(){return Sr.off(Br.API_CALLED,t)}},once:function(t){return Sr.once(Br.API_CALLED,t),function(){return Sr.off(Br.API_CALLED,t)}},emit:function(t){Sr.emit(Br.API_CALLED,t)}};ae.setEvent(e),e.on((function(e){var r=e.args,n=e.errMsg,o=e.status,i=e.apiName,a=e.duration,s=e.serviceName,u=t.getCustomMiniAppService(Tv);if(u){var c="".concat(s,".").concat(i);if(u.logApiCalledInfo({status:o,apiType:"CUSTOM_SPLIT_API",apiName:c,duration:a}),!o){var A;A=n instanceof Error?[n.name,n.message,n.stack].filter((function(t){return!!t})).join("\n"):null==n?"unknown":"errorCodeData"in n?JSON.stringify(n.errorCodeData):JSON.stringify(n);var l="\n called ".concat(c," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(A,"\n ");u.logApiError({messagePrefix:"miniAppApiCalledError",name:"Error",message:l,stack:""})}}}))}},{key:"isInCustomMiniAppMode",value:function(){return gG()}},{key:"createDebugUtils",value:function(){var t=this.serviceMap,e={enableDebug:function(){window.__customsdk__.services=t}};window.__customsdk__=e}},{key:"start",value:(i=HU(zU().mark((function e(r){var n,o=this;return zU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!t.isIndependentMiniApp()){e.next=11;break}return e.next=4,QU(r);case 4:return this.sappSDK=e.sent,e.next=7,ME(30);case 7:oU({onlineChecker:function(){var t=HU(zU().mark((function t(){return zU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.race([o.sappSDK.client.getService(ZG).heart().then((function(){return!0})),ME(2e3).then((function(){return Promise.resolve(!1)}))]);case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",!1);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),interval:5e3,onBreak:function(){return window.close()}}),window.addEventListener("beforeunload",(function(){o.sappSDK.server.getService(mU).offlineWatcher.emit()})),e.next=23;break;case 11:if(!this.isInCustomMiniAppMode()){e.next=18;break}if(Ud.sappSDK.isStarted){e.next=15;break}return e.next=15,Ud.sappSDK.setConfig({useTerminalId:null==r?void 0:r.clientId,onClose:function(){var t=HU(zU().mark((function t(e){return zU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.stop();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}).start();case 15:this.sappSDK=Ud.sappSDK,e.next=23;break;case 18:return e.next=20,ME(30);case 20:return e.next=22,yG(r);case 22:this.sappSDK=e.sent;case 23:return this.startOnApiCalledEvent(),e.next=26,NU();case 26:(n=this.getCustomMiniAppService(Sv))?(rd().setMiniAppHttpProxyClientService(n),fI(rd())):fI(ed()),(oI=new lI.AttachedService).config.setRequestClient(aI),iI=new lI.ParamModelDataService({paramModelConstructor:dr,requestClient:aI}),new lI.ParamModelAssemblyDataService({paramModelAssemblyConstructor:wr,requestClient:aI});case 29:case"end":return e.stop()}}),e,this)}))),function(t){return i.apply(this,arguments)})},{key:"initLange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie.ZH_CN,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Qr.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),uG.a.init({lang:t,debug:!1,initImmediate:!0,translatorType:sG.ENUM.TranslatorType.I18next,packages:[AG],resource:UU({},AG,e)}),cG.init({namespace:AG,resources:AG})}},{key:"stop",value:(o=HU(zU().mark((function t(){var e;return zU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.getCustomMiniAppService(Qv))){t.next=4;break}return t.next=4,e.lockModelBySplit();case 4:this.serviceMap.forEach((function(t){Object(Qr.isFunction)(t.__onDestroy)&&t.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getService",value:function(t){if(ij.isPrototypeOf(t)){var e=this.serviceMap,r=e.get(t);return r||(r=new t,e.set(t,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof Ud.SappSDK?e.getService(t):e.client.getService(t)}},{key:"getCustomMiniAppServiceUnSafe",value:function(t){return this.getCustomMiniAppService(t)}}],n=[{key:"isIndependentMiniApp",value:function(){return!!window.opener}}],r&&VU(e.prototype,r),n&&VU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),KU=[{decl:ZG,impl:$G},{decl:TG,impl:LG}];function JU(t){return(JU="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 XU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZU(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,tz(n.key),n)}}function $U(t,e,r){return e&&ZU(t.prototype,e),r&&ZU(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function tz(t){var e=function(t,e){if("object"!=JU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=JU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==JU(e)?e:String(e)}function ez(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&&rz(t,e)}function rz(t,e){return(rz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nz(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=iz(t);if(e){var o=iz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oz(this,r)}}function oz(t,e){if(e&&("object"===JU(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 iz(t){return(iz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function az(t){return function(t){if(Array.isArray(t))return sz(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 sz(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 sz(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 sz(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 uz=[cI.MiniAppDesignBaseInfoService,cI.MiniAppParamModelJsonDataService,Tv,Ov,Sv,Qv,Kv];function cz(){for(var t=new Map,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){var r=e.meta(),n=(null==r?void 0:r.id)||"";t.has(n)||t.set(n,e)})),az(t.values())}var Az=function(t){return function(e){ez(n,e);var r=nz(n);function n(){return XU(this,n),r.apply(this,arguments)}return $U(n,[{key:"meta",value:function(){return t}}],[{key:"meta",value:function(){return t}}]),n}(Ud.ServService)};function lz(t,e,r){return t.map((function(t){var n=t.meta()||{},o=n.apis,i=n.evts,a=function(t){ez(r,t);var e=nz(r);function r(){return XU(this,r),e.apply(this,arguments)}return $U(r)}(t);return null==o||o.forEach((function(r){var n=r.name;a.prototype[n]=e(t)[n]})),null==i||i.forEach((function(n){var o=n.name;e(t)[o].on((function(e){r(t)[o].emit(e)}))})),{decl:t,impl:a}}))}function fz(t){return(fz="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 hz(t){return function(t){if(Array.isArray(t))return pz(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 pz(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 pz(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 pz(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 dz(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */dz=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"==fz(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(fz(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 gz(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 yz(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gz(i,n,o,a,s,"next",t)}function s(t){gz(i,n,o,a,s,"throw",t)}a(void 0)}))}}function vz(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,mz(n.key),n)}}function mz(t){var e=function(t,e){if("object"!=fz(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fz(e)?e:String(e)}var Iz=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.proxyTerminals=new Set,this.initializeServer=function(){var t=yz(dz().mark((function t(e){var n;return dz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!gG()){t.next=7;break}if(Ud.sappSDK.isStarted){t.next=4;break}return t.next=4,Ud.sappSDK.setConfig({useTerminalId:null==e?void 0:e.clientId}).start();case 4:r.sappSDK=Ud.sappSDK,t.next=12;break;case 7:return t.next=9,ME(30);case 9:return t.next=11,yG(e);case 11:r.sappSDK=t.sent;case 12:return t.next=14,r.getCustomMiniAppService(_v).getAllAvailableService();case 14:return n=t.sent,window.addEventListener("message",(function(t){t.source===window.parent&&r.proxyTerminals.forEach((function(e){e.server.getService(TG).watcher.emit({data:t.data,origin:t.origin})}))})),t.abrupt("return",n);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.serverDefer=this.initializeServer(e)}var e,r,n,o;return e=t,(r=[{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof Ud.SappSDK?e.getService(t):e.client.getService(t)}},{key:"bootstrap",value:(o=yz(dz().mark((function t(e){var r,n,o,i,a,s,u,c,A=this;return dz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.proxyTerminals.size>0)){t.next=2;break}throw new Error("当前仅支持打开一个独立小程序");case 2:return t.next=4,this.serverDefer;case 4:if(r=t.sent,n=e.url,o=window.open(n)){t.next=9;break}throw new Error("打开小程序失败!请检查url或者主动解除弹窗限制");case 9:return i=function(){a.closeSession(),A.proxyTerminals.delete(a)},t.next=12,SU(o);case 12:return a=t.sent,s=r.map(Az),u=cz.apply(void 0,hz(s).concat(hz(uz))),c=lz(u,(function(t){return A.getCustomMiniAppService(t)}),(function(t){return a.server.getService(t)})),a.server.addServices([].concat(hz(c),hz(KU))),a.client.getService(mU).offlineWatcher.on(i),this.proxyTerminals.add(a),t.abrupt("return",o);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&vz(e.prototype,r),n&&vz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},function(t,e,r){"use strict";r.r(e),r.d(e,"changeLanguage",(function(){return X})),r.d(e,"cloneInstance",(function(){return Z})),r.d(e,"createInstance",(function(){return $})),r.d(e,"dir",(function(){return tt})),r.d(e,"exists",(function(){return et})),r.d(e,"getFixedT",(function(){return rt})),r.d(e,"init",(function(){return nt})),r.d(e,"loadLanguages",(function(){return ot})),r.d(e,"loadNamespaces",(function(){return it})),r.d(e,"loadResources",(function(){return at})),r.d(e,"off",(function(){return st})),r.d(e,"on",(function(){return ut})),r.d(e,"setDefaultNamespace",(function(){return ct})),r.d(e,"t",(function(){return At})),r.d(e,"use",(function(){return lt}));var n=r(286),o=r.n(n),i=r(197),a=r.n(i),s=r(208),u=r.n(s),c=r(209),A=r.n(c),l=r(372),f=r.n(l),h=r(398),p=r.n(h),d=r(399),g=r.n(d),y=r(223),v=r.n(y),m=r(906),I=r.n(m),E={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){var r;console&&console[t]&&(r=console)[t].apply(r,I()(e))}},C=new(function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.init(e,r)}return A()(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||E,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,r,n){return n&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(r).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,a()({},{prefix:"".concat(this.prefix,":").concat(e,":")},this.options))}}]),t}()),b=function(){function t(){u()(this,t),this.observers={}}return A()(t,[{key:"on",value:function(t,e){var r=this;return t.split(" ").forEach((function(t){r.observers[t]=r.observers[t]||[],r.observers[t].push(e)})),this}},{key:"off",value:function(t,e){var r=this;this.observers[t]&&this.observers[t].forEach((function(){if(e){var n=r.observers[t].indexOf(e);n>-1&&r.observers[t].splice(n,1)}else delete r.observers[t]}))}},{key:"emit",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach((function(t){t.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(e){e.apply(e,[t].concat(r))}))}}}]),t}();function B(){var t,e,r=new Promise((function(r,n){t=r,e=n}));return r.resolve=t,r.reject=e,r}function w(t){return null==t?"":""+t}function P(t,e,r){t.forEach((function(t){e[t]&&(r[t]=e[t])}))}function S(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function _(t,e,r){var n=S(t,e,Object);n.obj[n.k]=r}function Q(t,e){var r=S(t,e),n=r.obj,o=r.k;if(n)return n[o]}function O(t,e,r){for(var n in e)n in t?"string"==typeof t[n]||t[n]instanceof String||"string"==typeof e[n]||e[n]instanceof String?r&&(t[n]=e[n]):O(t[n],e[n],r):t[n]=e[n];return t}function D(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return x[t]})):t}var R=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),r.data=t||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return g()(e,t),A()(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[t,e];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(i=t.split(".")),Q(this.data,i)}},{key:"addResource",value:function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[t,e];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(n=e,e=(a=t.split("."))[1]),this.addNamespaces(e),_(this.data,a,n),o.silent||this.emit("added",t,e,r,n)}},{key:"addResources",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,e,o,r[o],{silent:!0});n.silent||this.emit("added",t,e,r)}},{key:"addResourceBundle",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(n=r,r=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var u=Q(this.data,s)||{};n?O(u,r,o):u=a()({},u,r),_(this.data,s,u),i.silent||this.emit("added",t,e,r)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?a()({},{},this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(b),T={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,r,n,o){var i=this;return t.forEach((function(t){i.processors[t]&&(e=i.processors[t].process(e,r,n,o))})),e}},L=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),P(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],t,v()(v()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=C.create("translator"),r}return g()(e,t),A()(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,e);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(t,e){var r=e.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,o=e.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var i=t.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(n)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function(t,e){var r=this;if("object"!==o()(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=this.extractFromKey(t[t.length-1],e),s=i.key,u=i.namespaces,c=u[u.length-1],A=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(A&&"cimode"===A.toLowerCase()){if(l){var f=e.nsSeparator||this.options.nsSeparator;return c+f+s}return s}var h=this.resolve(t,e),p=h&&h.res,d=h&&h.usedKey||s,g=h&&h.exactUsedKey||s,y=Object.prototype.toString.apply(p),v=["[object Number]","[object Function]","[object RegExp]"],m=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p;if(I&&p&&E&&v.indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,p,e):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(n){var C="[object Array]"===y,b=C?[]:{},B=C?g:d;for(var w in p)if(Object.prototype.hasOwnProperty.call(p,w)){var P="".concat(B).concat(n).concat(w);b[w]=this.translate(P,a()({},e,{joinArrays:!1,ns:u})),b[w]===P&&(b[w]=p[w])}p=b}}else if(I&&"string"==typeof m&&"[object Array]"===y)(p=p.join(m))&&(p=this.extendTranslation(p,t,e));else{var S=!1,_=!1;if(!this.isValidLookup(p)&&void 0!==e.defaultValue){if(S=!0,void 0!==e.count){var Q=this.pluralResolver.getSuffix(A,e.count);p=e["defaultValue".concat(Q)]}p||(p=e.defaultValue)}this.isValidLookup(p)||(_=!0,p=s);var O=e.defaultValue&&e.defaultValue!==p&&this.options.updateMissing;if(_||S||O){this.logger.log(O?"updateKey":"missingKey",A,c,s,O?e.defaultValue:p);var D=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var M=0;M<x.length;M++)D.push(x[M]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(e.lng||this.language):D.push(e.lng||this.language);var R=function(t,n){r.options.missingKeyHandler?r.options.missingKeyHandler(t,c,n,O?e.defaultValue:p,O,e):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(t,c,n,O?e.defaultValue:p,O,e),r.emit("missingKey",t,c,n,p)};if(this.options.saveMissing){var T=void 0!==e.count&&"string"!=typeof e.count;this.options.saveMissingPlurals&&T?D.forEach((function(t){r.pluralResolver.getPluralFormsOfKey(t,s).forEach((function(e){return R([t],e)}))})):R(D,s)}}p=this.extendTranslation(p,t,e,h),_&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(c,":").concat(s)),_&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(t,e,r,n){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(a()({},r,{interpolation:a()({},this.options.interpolation,r.interpolation)}));var i=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(i=a()({},this.options.interpolation.defaultVariables,i)),t=this.interpolator.interpolate(t,i,r.lng||this.language,r),!1!==r.nest&&(t=this.interpolator.nest(t,(function(){return o.translate.apply(o,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var s=r.postProcess||this.options.postProcess,u="string"==typeof s?[s]:s;return null!=t&&u&&u.length&&!1!==r.applyPostProcessor&&(t=T.handle(u,t,e,r,this)),t}},{key:"resolve",value:function(t){var e,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!a.isValidLookup(e)){var u=a.extractFromKey(t,s),c=u.key;r=c;var A=u.namespaces;a.options.fallbackNS&&(A=A.concat(a.options.fallbackNS));var l=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);A.forEach((function(t){a.isValidLookup(e)||(i=t,h.forEach((function(r){if(!a.isValidLookup(e)){o=r;var i,u,A=c,h=[A];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(h,c,r,t,s);else l&&(i=a.pluralResolver.getSuffix(r,s.count)),l&&f&&h.push(A+i),f&&h.push(A+="".concat(a.options.contextSeparator).concat(s.context)),l&&h.push(A+=i);for(;u=h.pop();)a.isValidLookup(e)||(n=u,e=a.getResource(r,t,u,s))}})))}))}})),{res:e,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,r,n):this.resourceStore.getResource(t,e,r,n)}}]),e}(b);function j(t){return t.charAt(0).toUpperCase()+t.slice(1)}var k=function(){function t(e){u()(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=C.create("languageUtils")}return A()(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(t){return t.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=j(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=j(r[1].toLowerCase())),e.indexOf(r[2].toLowerCase())>-1&&(r[2]=j(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,e){var r=this,n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),o=[],i=function(t){t&&(r.isWhitelisted(t)?o.push(t):r.logger.warn("rejecting non-whitelisted language code: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),n.forEach((function(t){o.indexOf(t)<0&&i(r.formatLanguageCode(t))})),o}}]),t}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],F={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1===t?0:2===t?1:(t<0||t>10)&&t%10==0?2:3)}};function G(){var t={};return N.forEach((function(e){e.lngs.forEach((function(r){t[r]={numbers:e.nr,plurals:F[e.fc]}}))})),t}var U=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.languageUtils=e,this.options=r,this.logger=C.create("pluralResolver"),this.rules=G()}return A()(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=this.getRule(t);return e&&e.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var r=this,n=[],o=this.getRule(t);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(t,o);n.push("".concat(e).concat(i))})),n):n}},{key:"getSuffix",value:function(t,e){var r=this,n=this.getRule(t);if(n){var o=n.noAbs?n.plurals(e):n.plurals(Math.abs(e)),i=n.numbers[o];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),t}(),z=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t),this.logger=C.create("interpolator"),this.init(e,!0)}return A()(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;e&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t}),t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=void 0!==r.escape?r.escape:M,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?D(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?D(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?D(r.nestingPrefix):r.nestingPrefixEscaped||D("$t("),this.nestingSuffix=r.nestingSuffix?D(r.nestingSuffix):r.nestingSuffixEscaped||D(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,e,r,n){var o,i,a,s=this;function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(t.indexOf(s.formatSeparator)<0)return Q(e,t);var n=t.split(s.formatSeparator),o=n.shift().trim(),i=n.join(s.formatSeparator).trim();return s.format(Q(e,o),i,r)};this.resetRegExp();var A=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;(o=this.regexpUnescape.exec(t))&&(i=c(o[1].trim()),t=t.replace(o[0],i),this.regexpUnescape.lastIndex=0,!(++a>=this.maxReplaces)););for(a=0;o=this.regexp.exec(t);){if(void 0===(i=c(o[1].trim())))if("function"==typeof A){var l=A(t,o,n);i="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),i="";else"string"==typeof i||this.useRawValueToEscape||(i=w(i));if(i=this.escapeValue?u(this.escape(i)):u(i),t=t.replace(o[0],i),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return t}},{key:"nest",value:function(t,e){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a()({},o);function s(t,e){if(t.indexOf(",")<0)return t;var r=t.split(",");t=r.shift();var n=r.join(",");n=(n=this.interpolate(n,i)).replace(/'/g,'"');try{i=JSON.parse(n),e&&(i=a()({},e,i))}catch(e){this.logger.error("failed parsing options string in nesting for key ".concat(t),e)}return t}for(i.applyPostProcessor=!1;r=this.nestingRegexp.exec(t);){if((n=e(s.call(this,r[1].trim(),i),i))&&r[0]===t&&"string"!=typeof n)return n;"string"!=typeof n&&(n=w(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(t)),n=""),t=t.replace(r[0],n),this.regexp.lastIndex=0}return t}}]),t}(),Y=r(766),H=r.n(Y);var V=function(t){function e(t,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u()(this,e),o=f()(this,p()(e).call(this)),b.call(v()(v()(o))),o.backend=t,o.store=r,o.languageUtils=n.languageUtils,o.options=i,o.logger=C.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return g()(e,t),A()(e,[{key:"queueLoad",value:function(t,e,r,n){var o=this,i=[],a=[],s=[],u=[];return t.forEach((function(t){var n=!0;e.forEach((function(e){var s="".concat(t,"|").concat(e);!r.reload&&o.store.hasResourceBundle(t,e)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(e)<0&&u.push(e)))})),n||s.push(t)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(t,e,r){var n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];e&&this.emit("failedLoading",i,a,e),r&&this.store.addResourceBundle(i,a,r),this.state[t]=e?-1:2;var s={};this.queue.forEach((function(r){var n,o,u,c,A,l;n=r.loaded,o=a,c=S(n,[i],Object),A=c.obj,l=c.k,A[l]=A[l]||[],u&&(A[l]=A[l].concat(o)),u||A[l].push(o),function(t,e){for(var r=t.indexOf(e);-1!==r;)t.splice(r,1),r=t.indexOf(e)}(r.pending,t),e&&r.errors.push(e),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){s[t]||(s[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(e){s[t].indexOf(e)<0&&s[t].push(e)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,e,(function(s,u){s&&u&&o<5?setTimeout((function(){n.read.call(n,t,e,r,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(t){r.loadOne(t)}))}},{key:"load",value:function(t,e,r){this.prepareLoading(t,e,{},r)}},{key:"reload",value:function(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}},{key:"loadOne",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];this.read(i,a,"read",null,null,(function(n,o){n&&e.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(i," failed"),n),!n&&o&&e.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(i),o),e.loaded(t,n,o)}))}},{key:"saveMissing",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(t,e,r,n,null,a()({},i,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],e,r,n)}}]),e}(b);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===o()(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===o()(t[2])||"object"===o()(t[3])){var r=t[3]||t[2];Object.keys(r).forEach((function(t){e[t]=r[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function W(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function K(){}var J=new(function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(u()(this,e),t=f()(this,p()(e).call(this)),b.call(v()(v()(t))),t.options=W(r),t.services={},t.logger=C,t.modules={external:[]},n&&!t.isInitialized&&!r.isClone){if(!t.options.initImmediate)return t.init(r,n),f()(t,v()(v()(t)));setTimeout((function(){t.init(r,n)}),0)}return t}return g()(e,t),A()(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(r=e,e={}),this.options=a()({},q(),this.options,W(e)),this.format=this.options.interpolation.format,r||(r=K),!this.options.isClone){this.modules.logger?C.init(n(this.modules.logger),this.options):C.init(null,this.options);var o=new k(this.options);this.store=new R(this.options.resources,this.options);var i=this.services;i.logger=C,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new U(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new z(this.options),i.backendConnector=new V(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].concat(n))})),this.modules.languageDetector&&(i.languageDetector=n(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=n(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new L(this.services,this.options),this.translator.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].concat(n))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}var s=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var u=B(),c=function(){t.changeLanguage(t.options.lng,(function(e,n){t.isInitialized=!0,t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(n),r(e,n)}))};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return e();var r=[],n=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(t){r.indexOf(t)<0&&r.push(t)}))};if(this.language)n(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach((function(t){return n(t)}))}this.options.preload&&this.options.preload.forEach((function(t){return n(t)})),this.services.backendConnector.load(r,this.options.ns,e)}else e(null)}},{key:"reloadResources",value:function(t,e,r){var n=B();return t||(t=this.languages),e||(e=this.options.ns),r||(r=K),this.services.backendConnector.reload(t,e,(function(t){n.resolve(),r(t)})),n}},{key:"use",value:function(t){return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&T.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,e){var r=this,n=B();this.emit("languageChanging",t);var o=function(t){t&&(r.language=t,r.languages=r.services.languageUtils.toResolveHierarchy(t),r.translator.language||r.translator.changeLanguage(t),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(t)),r.loadResources((function(o){!function(t,o){r.translator.changeLanguage(o),o&&(r.emit("languageChanged",o),r.logger.log("languageChanged",o)),n.resolve((function(){return r.t.apply(r,arguments)})),e&&e(t,(function(){return r.t.apply(r,arguments)}))}(o,t)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(t,e){var r=this,n=function t(e,n){var i=a()({},n);if("object"!==o()(n)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([e,n].concat(u))}return i.lng=i.lng||t.lng,i.lngs=i.lngs||t.lngs,i.ns=i.ns||t.ns,r.t(e,i)};return"string"==typeof t?n.lng=t:n.lngs=t,n.ns=e,n}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"loadNamespaces",value:function(t,e){var r=this,n=B();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(t){r.options.ns.indexOf(t)<0&&r.options.ns.push(t)})),this.loadResources((function(t){n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var r=B();"string"==typeof t&&(t=[t]);var n=this.options.preload||[],o=t.filter((function(t){return n.indexOf(t)<0}));return o.length?(this.options.preload=n.concat(o),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new e(t,r)}},{key:"cloneInstance",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,o=a()({},this.options,r,{isClone:!0}),i=new e(o),s=["store","services","language"];return s.forEach((function(e){i[e]=t[e]})),i.translator=new L(i.services,i.options),i.translator.on("*",(function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];i.emit.apply(i,[t].concat(r))})),i.init(o,n),i.translator.options=i.options,i}}]),e}(b)),X=(e.default=J,J.changeLanguage.bind(J)),Z=J.cloneInstance.bind(J),$=J.createInstance.bind(J),tt=J.dir.bind(J),et=J.exists.bind(J),rt=J.getFixedT.bind(J),nt=J.init.bind(J),ot=J.loadLanguages.bind(J),it=J.loadNamespaces.bind(J),at=J.loadResources.bind(J),st=J.off.bind(J),ut=J.on.bind(J),ct=J.setDefaultNamespace.bind(J),At=J.t.bind(J),lt=J.use.bind(J)},function(t,e,r){"use strict";r.r(e);var n=new(function(){function t(){var t=this;this.profiling={frames:[],interactions:[]},this.profilingStarted=!1,this.indexRecordMap=new Map,this.interactionMapToPayload=new Map,this.startProfiling=function(){t.profilingStarted=!0,t.profiling={frames:[],interactions:[]},t.indexRecordMap.clear(),t.interactionMapToPayload.clear()},this.stopProfiling=function(){t.profilingStarted=!1},this.getProfiling=function(){return t.profiling},this.getPayloadFromInteraction=function(e){return t.interactionMapToPayload.get(e)},this.getIndexRecordByName=function(e){var r=t.indexRecordMap.get(e);return r&&0!==r.length?r:null},this.onFrame=function(e){t.profilingStarted&&t.profiling.frames.push(e)}}return Object.defineProperty(t.prototype,"isProfiling",{get:function(){return this.profilingStarted},enumerable:!0,configurable:!0}),t.prototype.onInteraction=function(t,e){var r=this.indexRecordMap.get(t.name);if(r&&0!==r.length){var n=r[r.length-1],o=this.profiling.frames.length-1;n.endIndex=o,this.profiling.interactions.push(t),this.interactionMapToPayload.set(t,e)}},t.prototype.onInteractionStart=function(t){var e=t.name,r=this.indexRecordMap.get(e)||[];r.push({startIndex:this.profiling.frames.length,endIndex:0}),this.indexRecordMap.set(e,r)},t}()),o=r(105),i=r(87),a=function(){function t(){this.onFrame=n.onFrame}return t.prototype.onInteraction=function(t,e){var r=t.name;r===o.a.IDLE||e.__INTERNAL__merged||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.a)(r),n.isProfiling&&n.onInteraction(t,e))},t.prototype.onInteractionStart=function(t){var e=t.name;e===o.a.IDLE||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.g)(e),n.isProfiling&&n.onInteractionStart(t))},t}();e.default=a},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(0),o=r(154),i=r(764),a=function(){function t(){}return t.prototype.__INTERNAL__beforeInit=function(){var t;this._session=this.createSession(),null===(t=this.beforeInit)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterInit=function(){var t;try{null===(t=this.afterInit)||void 0===t||t.call(this)}finally{this._session.__INTERNAL__afterInit()}},t.prototype.__INTERNAL__beforeDispose=function(){var t;null===(t=this.beforeDispose)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterDispose=function(){var t;try{null===(t=this.afterDispose)||void 0===t||t.call(this)}finally{this._session.__INTERNAL_dispose()}},t.prototype.createSession=function(){return new i.a},Object(n.c)([Object(o.b)({getter:function(){return this._session}})],t.prototype,"session",void 0),t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return a}));var n=r(257),o=r(12),i=o.createContext({get rootState(){throw new Error}}),a=Object(n.getConnector)(i).connect},function(t,e,r){"use strict";var n=r(11),o=function(){function t(e){var r=this;this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0,this.onMerged=e.onMerged,this.stutterFrameDurationBoundary=void 0!==e.stutterFrameDurationBoundary?e.stutterFrameDurationBoundary:t.DefaultStutterFrameDurationBoundary;var o=void 0!==e.maxMergeTimeDuration?e.maxMergeTimeDuration:t.DefaultMaxMergeTimeDuration;this.asyncFlush=Object(n.throttle)((function(){return r.flush()}),o,{leading:!1})}return t.prototype.onFrame=function(t){var e=t.duration;t.activeFrame&&this.addFrameDuration(e)},t.prototype.add=function(t){this.addFrameDuration(t)},t.prototype.addFrameDuration=function(t){this.frameDurationSum+=t,this.frameCount++,t>this.stutterFrameDurationBoundary&&this.stutterFrameCount++,this.asyncFlush()},t.prototype.flushImmediately=function(){this.asyncFlush.flush()},t.prototype.flush=function(){if(this.frameCount>0)try{this.onMerged({sum:this.frameDurationSum,count:this.frameCount,stutterCount:this.stutterFrameCount})}finally{this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0}},t.DefaultMaxMergeTimeDuration=1e3*(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING?30:180),t.DefaultStutterFrameDurationBoundary=100,t}();e.a=o},,,,,,,,,function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(257),o=r(509);function i(t){return Object(n.combine)(t,o.a)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(0),o=r(147),i=r(12),a=r(698),s=r(513),u=function(){function t(){this.toolsMap=new Map}return t.prototype.registerTool=function(t){this.toolsMap.set(t.toolKey,t),this.activeToolKey===t.toolKey&&t.onEnter()},t.prototype.unregisterTool=function(t){this.toolsMap.delete(t.toolKey),this.activeToolKey===t.toolKey&&t.onLeave()},t.prototype.toggleActiveToolKey=function(t){var e=this;if(this.activeToolKey!==t){var r=this.activeToolKey&&this.toolsMap.get(this.activeToolKey),n=t&&this.toolsMap.get(t);Object(s.b)([function(){return r&&r.onLeave()},function(){return n&&n.onEnter()},function(){return e.activeToolKey=t}]),Object(o.b)({behavior:o.a.switchTool,toolKey:t,prevToolKey:this.activeToolKey})}},t}(),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.systemInternal=new u,e.contextValue={system:e.systemInternal},e}return Object(n.d)(e,t),e.prototype.componentDidMount=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.componentDidUpdate=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.render=function(){return i.createElement(a.a.Provider,{value:this.contextValue},this.props.children)},e}(i.Component)},function(t,e,r){"use strict";var n=r(0),o=r(196),i=r(446),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.d)(e,t),e.prototype.setGlobalUnit=function(t){switch(t){case i.a.mm:this.setGlobalLengthUnit(o.c.mm),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.m:this.setGlobalLengthUnit(o.c.m),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.ft:this.setGlobalLengthUnit(o.c.ft),this.setGlobalAreaUnit(o.a.sqFt);break;default:if(String(t).match(/^1\d{2}$/))this.setGlobalLengthUnit(Number(String(t)[1])),this.setGlobalAreaUnit(Number(String(t)[2]));else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}},e}(o.f);e.a=a},function(t,e,r){"use strict";var n=r(11),o=r(701),i=function(){function t(t){this.props=t}return t.prototype.create=function(t){var e=this;return this.meshBuilder=new o.a((function(){return e.props}),this.props.__unstable__onMeshCreated||n.noop,t),this.meshBuilder.createMesh()},t.prototype.update=function(t){this.meshBuilder.updateMesh(t)},t.prototype.dispose=function(t){this.meshBuilder.disposeMesh()},t.prototype.__unstable__getSerializable=function(){return this.meshBuilder.serializable},t}();e.a=i},function(t,e,r){"use strict";var n,o,i=r(0),a=r(104),s=r(512),u=r(11),c=r(12),A=r(370),l=r(202),f=r(265),h=r(154),p=r(93);function d(t){return(d="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 g(t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){if(t.context===A.a){var e=a.default.getParent(t);Object(p.b)(t,"mount-view","[mountView] 未使用 mountView 挂载视图,进而导致渲染顺序不正确. 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor))+". ",e,Object(s.a)("002"))}var r=t.props.mountPointId,n=Object(u.first)(Object(f.c)(l.a.__INTERNAL__getKey(r)));if(n){var o=function(t){for(var e=t,r=a.default.getParent(e);r;)e=r,r=a.default.getParent(e);return e},c=o(t);if(c===o(n)){var h=c;if(String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(t,h)))>=String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(n,h)))){e=a.default.getParent(t);Object(p.b)(t,l.a.__INTERNAL__getKey(r),'[ViewMounter] ViewMounter 渲染顺序出现在相应的 MountPoint ("'+r.toString()+'") 之后,渲染顺序不正确:',t,". 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor)),e,".",Object(s.a)("001"))}}}}}function y(t){return t.exclusive?void 0:t.sourceKey}var v=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.viewKey=String(e.viewKey++),r}return Object(i.d)(e,t),e.prototype.componentDidMount=function(){var t=this.props;Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,this.context,y(t))},e.prototype.componentWillUpdate=function(t,e,r){this.props.mountPointId!==t.mountPointId?(Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey),Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,r,y(t))):Object(f.g)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.renderOrder,r,y(t))},e.prototype.componentWillUnmount=function(){Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey)},e.prototype.render=function(){return null},e.prototype.getChildren=function(t){var e=this;if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var r=t.children;return"function"==typeof r?function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=r.apply(void 0,Object(i.i)(t));return I(e,o),o}:(I(this,r),r)}return t.children},e.viewKey=0,e.contextType=A.b,e}(c.Component);if(e.a=v,Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var m=function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.apply(void 0,Object(i.i)([this],r)),t.apply(this,r)}};v.prototype.componentDidMount=m(null!==(n=v.prototype.componentDidMount)&&void 0!==n?n:u.noop,(function(t){g(t)})),v.prototype.componentDidUpdate=m(null!==(o=v.prototype.componentDidUpdate)&&void 0!==o?o:u.noop,(function(t){g(t)}))}function I(t,e){Array.isArray(e)?e.forEach((function(e){E(t,e)})):E(t,e)}function E(t,e){if(function(t){return"object"===d(t)&&null!==t}(e)&&null===e.key){var r=function(t){var e=null==t?void 0:t.type;return"string"==typeof e?e:e&&(e.__reactstandin__key||a.default.getDisplayName(e))},n=e._owner,o=t._reactInternalFiber.return;Object(p.b)(n||o,"viewMounter::contentKey",'[ViewMounter] Each child of ViewMounter must have a key, check "'+r(e)+'" in the render function of "'+r(n)+'" for mount point "'+Object(h.a)(l.a.__INTERNAL__getKey(t.props.mountPointId))+'". Details:',{viewMounterContentNode:e,viewmounterInstance:t,viewMounterParent:o,nodeOwner:n,getOwnerList:function(){var e=function(t){for(var e=[];t;)e.push(t),t=t._debugOwner;return e.map((function(t){return{name:r(t),node:t}}))};return{viewMounterOwnerList:e(t._reactInternalFiber._debugOwner),viewMounterContentOwnerList:e(n)}}},Object(s.a)("003"))}}},function(t,e,r){"use strict";r.d(e,"b",(function(){return h})),r.d(e,"a",(function(){return g}));var n=r(0),o=r(72),i=r(84),a=r(105),s=r(92),u=r(87);var c=r(559),A=r(692),l=r(325),f=r(694),h=function(){function t(){p.push(this)}return t.prototype.__INTERNAL__fpsMerged=function(t){this.onMergedFps&&this.onMergedFps(t)},t.prototype.__INTERNAL__getAppId=function(){return this.appId},t.prototype.__INTERNAL__emitEvent=function(t){this.onInteraction&&this.onInteraction(t)},t.prototype.__INTERNAL__initWithAppId=function(t){I(),this.appId=t},t.prototype.__INTERNAL__dispose=function(){var t=p.indexOf(this);p.splice(t,1)},t.prototype.config=function(t){this.onInteraction=t.onInteraction,this.onMergedFps=t.onMergedFps},Object(n.c)([f.a],t.prototype,"config",null),t}(),p=[],d=function(t,e){o.b.getInstance().emit(g,e),p.forEach((function(r){r.__INTERNAL__getAppId()===t&&r.__INTERNAL__emitEvent(e)}))},g=new i.a(a.a.INTERACTION),y=function(t){var e;return Object(n.b)(void 0,void 0,void 0,(function(){var r,o,i=t.appId,s=t.failed,A=Object(n.h)(t,["appId","failed"]);return Object(n.e)(this,(function(t){switch(t.label){case 0:return[4,Object(c.d)()];case 1:return t.sent(),r=(null===(e=navigator.connection)||void 0===e?void 0:e.rtt)||0,o=Object(u.c)(),d(i,{eventType:a.d.PAGE_READY,metricData:Object(n.a)(Object(n.a)(Object(n.a)({},"memory"in performance?{totalJSHeapSize:performance.memory.totalJSHeapSize,usedJSHeapSize:performance.memory.usedJSHeapSize}:{}),A),{pageFinshedTotal:Object(u.e)()}),perfData:Object(n.a)(Object(n.a)({},o),{rtt:r}),labels:{failed:s.toString()}}),[2]}}))}))},v=function(){function t(){}return t.prototype.onInstantInteraction=function(t,e){d(t.appId,{eventType:a.d.INSTANT_INTERACTION,metricData:e,labels:{interaction:t.name}})},t.prototype.onInteraction=function(t,e){t.merged&&!e.__INTERNAL__merged||(t.durationOnly||t.trackingMerged&&(e=Object(n.a)(Object(n.a)({},e),{eventType:a.d.INTERACTION,labels:Object(n.a)(Object(n.a)({},e.labels),{interaction:t.name})})),d(t.appId,e))},t}(),m=!1,I=function(){if(!m){if(c.a.on(a.a.PAGE_READY,y),l.a.addPlugin(new v),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING){var t=r(1215).default;l.a.addPlugin(new t)}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING){var e=r(1383).default;l.a.addPlugin(new e)}var n;l.a.init(),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(n=s.b.prototype.componentWillMount,s.b.prototype.componentWillMount=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.apply(this,t);var r=Object(u.b)(this);r&&Object(u.f)(this.mesh,r)},Object(A.a)()),m=!0}}}])}));
|
|
209
|
+
***************************************************************************** */var zv,Yv=function(t,e){return(Yv=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 Hv(t,e){function r(){this.constructor=t}Yv(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Vv(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":Uv(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}function qv(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 Wv(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(qv(arguments[e]));return t}!function(t){t.CABINET="CABINET",t.WARDROBE="WARDROBE",t.DOOR_WINDOW="DW",t.CABINET_COPY="CABINET_COPY",t.WARDROBE_COPY="WARDROBE_COPY",t.DOOR_WINDOW_COPY="DW_COPY"}(zv||(zv={}));var Kv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hv(e,t),e.prototype.getParamModelDataByIds=function(t,e){return Object(Ud.API_UNSUPPORT)()},e.prototype.getTopParamModels=function(t){return Object(Ud.API_UNSUPPORT)()},Vv([Ud.anno.decl.api()],e.prototype,"getParamModelDataByIds",null),Vv([Ud.anno.decl.api()],e.prototype,"getTopParamModels",null),e=Vv([Ud.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:Iy.INNER})],e)}(Ud.ServService);var Jv,Xv,Zv,$v=function(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.PopBufferMtl=void 0,e.toPopBufferMtl=function(t){var e=t.parameters,r=new a;r.setObjName(t.objName),t.brandGoodId&&r.setBrandGoodId(t.brandGoodId);if(e)for(var o=0,i=e.length;o<i;o++){var s=e[o];switch(s.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(s.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(s.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(s.value));break;case"transparentType":r.setTransparentType(Number(s.value))}}return r};var r,n=(r=Se.default)&&r.__esModule?r:{default:r};function o(t){return(o="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 i(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,(i=n.key,a=void 0,a=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===o(a)?a:String(a)),n)}var i,a}var a=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,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(t){return this.objName=t,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(t){return this.brandGoodId=t,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(t){return this.diffuseTexture=t,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(t){return this.diffuseColor=t,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(t){return this.refractColor=t,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(t){return this.transparentType=t,this}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.PopBufferMtl=a})),tm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hv(e,t),e.prototype.toJSON=function(){return{paramPackages:Wv(this.paramPackages.values()),hardwares:Wv(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(t){var e=qv(t,2);e[0];var r=e[1],n=new Ev.a;return Object(Qr.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Wv(this.displayInfos.values()),wireFrames:Object(Qr.fromPairs)(Wv(this.wireGeometrysMap.entries()).map((function(t){return[t[0],t[1].vertices]})))}},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.unSerialize=function(t){var e=this,r="string"==typeof t?JSON.parse(t):t,n=Object(Qr.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(t){var e=new Ev.a;if(Object(Qr.extend)(e,t),e.meshModels=e.meshModels.map((function(t){var e=t.displayMaterial,r=new yv.a,n=new Io.a;return Object(Qr.extend)(n,t.geometry),r.texture=t.texture,r.displayMaterial=e?$v.toPopBufferMtl(e):void 0,r.geometry=n,r})),e.furnitureModel){var r=new dv.FurnitureModel;Object(Qr.extend)(r,e.furnitureModel),r.size=new Se.default(r.size),r.position=new Se.default(r.position),r.rotate=new Se.default(r.rotate),r.scale=new Se.default(r.scale),e.furnitureModel=r}return e}))),r.wireFrames&&Object(Qr.each)(r.wireFrames,(function(t,r){e.addWireGeometrysMap(r,t)})),this.addCustomResources(n)},e}(mv.a);!function(t){t[t.willExit=0]="willExit"}(Jv||(Jv={})),function(t){t[t.exit=0]="exit"}(Xv||(Xv={})),function(t){t[t.personalLibrary=1]="personalLibrary",t[t.enterpriseLibrary=2]="enterpriseLibrary"}(Zv||(Zv={}));var em=r(219),rm=r(262),nm=function(){function t(t){var e=this;this.keyValue={},this.keyEnum={},this.keyExist={},t.values().forEach((function(t){var r=t.name();e.keyEnum[r]=t,e.keyExist[r]=!1})),this.keyType=t}return t.prototype.clear=function(){var t=this;Object.keys(this.keyExist).forEach((function(e){t.keyExist[e]=!1})),this.keyValue={}},t.prototype.delete=function(t){var e=t.name(),r=this.keyExist[e];return r&&(this.keyExist[e]=!1,delete this.keyValue[e]),r},t.prototype.forEach=function(t,e){var r=this;Object.keys(this.keyValue).forEach((function(n){t.call(e,r.keyValue[n],r.keyEnum[n],r)}))},t.prototype.get=function(t){return this.keyValue[t.name()]},t.prototype.has=function(t){return this.keyExist[t.name()]},t.prototype.set=function(t,e){var r=t.name();return this.keyExist[r]=!0,this.keyValue[r]=e,this},t.prototype.keys=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyEnum[e]}))},t.prototype.values=function(){var t=this;return Object.keys(this.keyValue).map((function(e){return t.keyValue[e]}))},t.prototype.entries=function(){var t=this,e=[];return Object.keys(this.keyValue).forEach((function(r){e.push([t.keyEnum[r],t.keyValue[r]])})),e},t.prototype.clone=function(){var e=new t(this.keyType);return this.forEach((function(t,r){return e.set(r,t)})),e},t}(),om=r(369),im=r(699),am=function(t,e){this.points=t,this.transform=e,this.polygon=new as.default(t.map((function(t){return new Cn.default(e.worldToLocal(t))})))},sm=function(t,e,r){this.point=t,this.normal=e,this.position=r},um=r(210),cm=r(100),Am=r(303),lm=function(t,e){this.point=t,this.offset=e},fm=function(){function t(t,e,r,n){this.points=[t,e],this.isStart=r,this.isEnd=n,this.lineSegment=new cm.default(t.point,e.point),this.lengthRange=new um.default(t.position,e.position)}return t.prototype.intersect=function(t,e){var r=this.lineSegment,n=t.lineSegment,o=cm.default.estimateLineAndLine(r,n,!1);if(o.status===Am.a.JOINT){var i=!0;e?(this.isStart||void 0===o.parameterA||(i=o.parameterA>0),this.isEnd||void 0===o.parameterA||(i=i&&o.parameterA<1),t.isStart||void 0===o.parameterB||(i=i&&o.parameterB>0),t.isEnd||void 0===o.parameterB||(i=i&&o.parameterB<1)):i=o.areSegmentsIntersected(!1);var a=new Cn.default;return a.x=this.lengthRange.interpolate(o.parameterA),a.y=t.lengthRange.interpolate(o.parameterB),i?new lm(o.point,a):void 0}},t}(),hm=r(538),pm=function(){function t(t){this.lengths=t,this.intersections=[]}return t.prototype.addIntersection=function(t){this.intersections.push(t)},t.prototype.getPoints=function(){return this.intersections.map((function(t){return t.point}))},t.prototype.getPointsInside=function(t){var e,r,n=[];try{for(var o=Object(cs.k)(this.intersections),i=o.next();!i.done;i=o.next()){var a=i.value;a.offset.x>-t&&a.offset.x<this.lengths.x+t&&a.offset.y>-t&&a.offset.y<this.lengths.y+t&&n.push(a.point)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t}();function dm(t,e){void 0===e&&(e=1);var r,n=[];return t.forEach((function(t){void 0!==r&&Cn.default.isEqual(t,r,e)||(r=t,n.push(t))})),n[n.length-1]=t[t.length-1],n}var gm=function(){function t(t){if(this.pointCount=0,t.length<2)throw new Error("Polyline must has more than one valid Point.");this.buildPolyline(dm(t))}return t.prototype.getPoint=function(t){if(0===t)return this.getStart().clone();if(1===t)return this.getEnd().clone();for(var e=t*this.length(),r=this.pointCount-1,n=0;n<this.pointCount;n++)if(this.getPositionAt(n)>=e){r=n;break}if(0===r)return this.getStart().clone();var o=this.getLengthRangeAt(r-1).getParameter(e);return this.getLineSegmentAt(r-1).interpolate(o)},t.prototype.getTangent=function(t){return this.getRightNormal(t).leftDirect()},t.prototype.getRightNormal=function(t){return this.getRightNormalByPosition(t*this.length())},t.prototype.getRightNormalByPosition=function(t){for(var e=1;e<this.pointCount;e++)if(!(this.getPositionAt(e)<=t)){var r=(t-this.getPositionAt(e-1))/(this.getPositionAt(e)-this.getPositionAt(e-1));return Cn.default.lerp(this.getNormalAt(e-1),this.getNormalAt(e),r)}return this.getNormalAt(this.pointCount-1).clone()},t.prototype.getNearestPointParameter=function(t){if(this.pointCount<2)return 0;for(var e=Number.MAX_VALUE,r=0,n=0;n<this.pointCount-1;n++){var o=this.getLineSegmentAt(n),i=this.getLengthRangeAt(n),a=o.getNearestPointParameter(t,!0),s=o.interpolate(a),u=t.distanceSquared(s),c=i.interpolate(a);u<e&&(e=u,r=c)}return r/this.length()},t.prototype.getPoints=function(){return this.polylinePoints.map((function(t){return t.point}))},t.prototype.getPointParameters=function(){var t=this.length();return this.getPositions().map((function(e){return e/t}))},t.prototype.getSegmentPoints=function(t){if(!this.length())return this.getPoints();for(var e=um.default.mul(t,this.length()),r=[this.getPoint(t.min)],n=0;n<this.pointCount&&!(this.getPositionAt(n)>e.max);n++)this.getPositionAt(n)>e.min&&r.push(this.getPointAt(n));return r.push(this.getPoint(t.max)),dm(r)},t.prototype.getPolylineIntersection=function(t,e){var r=new pm(new Cn.default(this.length(),t.length()));if(!e&&!this.boundingBox.intersects(t.boundingBox,!0))return r;var n=this.polylineSegments,o=t.polylineSegments;return n.forEach((function(t){return o.forEach((function(n){var o=t.intersect(n,e);o&&r.addIntersection(o)}))})),r},t.prototype.extend=function(e,r){var n=this.getSegmentPoints((new um.default).setFromPoints([e,r]));if(0!==n.length)return new t(e>r?n.reverse():n)},t.prototype.intersect=function(t,e){return void 0===e&&(e=1),this.boundingBox.intersects(t.boundingBox,!0,2*e)?this.getPolylineIntersection(t,!0).getPointsInside(e):[]},t.prototype.getStart=function(){return this.getPointAt(0)},t.prototype.getEnd=function(){return this.getPointAt(this.pointCount-1)},t.prototype.getEndpoints=function(){return[this.getStart(),this.getEnd()]},t.prototype.length=function(){return 0===this.pointCount?0:this.getPositionAt(this.pointCount-1)},t.prototype.toString=function(){return"Polyline2 {points: "+this.getPoints().map((function(t){return t.toParenString()})).join(",")+", length: "+this.length()},t.prototype.buildPolyline=function(t){this.pointCount=t.length,this.boundingBox=(new gs.default).includePoints(t),this.polylinePoints=[],this.polylineSegments=[];var e=this.pointCount;if(1===e)return this.polylinePoints.push(new sm(t[0],new Cn.default(0,0),0)),void console.warn("Polyline must has more than one valid Point.");for(var r=new Cn.default,n=new Cn.default,o=0,i=0;i<e;i++){var a=t[i],s=0!==i?t[i-1]:void 0,u=i<e-1?t[i+1]:void 0;s&&(o+=s.distance(a));var c=void 0;!s&&u?c=Cn.default.sub(u,a).rightDirect().normalize():!u&&s?c=Cn.default.sub(a,s).rightDirect().normalize():s&&u&&(c=Cn.default.bisectorCounterClockwise(r.subVectors(s,a),n.subVectors(u,a))),this.polylinePoints.push(new sm(a,c,o)),s&&this.polylineSegments.push(new fm(this.polylinePoints[i-1],this.polylinePoints[i],1===i,i===e-1))}},t.prototype.getPositions=function(){return this.polylinePoints.map((function(t){return t.position}))},t.prototype.getPointAt=function(t){return this.polylinePoints[t].point},t.prototype.getNormalAt=function(t){return this.polylinePoints[t].normal},t.prototype.getPositionAt=function(t){return this.polylinePoints[t].position},t.prototype.getLineSegmentAt=function(t){return this.polylineSegments[t].lineSegment},t.prototype.getLengthRangeAt=function(t){return this.polylineSegments[t].lengthRange},t}(),ym=r(697),vm=r(703),mm=r(315),Im=r(285),Em=function(t,e){this.start=t,this.end=e},Cm=function(){function t(t,e){this.points=t,this.lines=e}return t.fromPolyline=function(e,r){void 0===r&&(r=!0);for(var n=[],o=e.length,i=0;i<o;i++)n.push(new Em(i,(i+1)%o));return!1===r&&n.splice(o-1,1),new t(e,n)},t.fromShapeSize=function(e){var r=[new Cn.default(0,0),new Cn.default(e.x,0),new Cn.default(e.x,e.y),new Cn.default(0,e.y)];return t.fromPolyline(r,!0)},t}(),bm=r(688),Bm=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[gs.default,os.default,om.default,be.default,im.a,Be.default,am,um.default,cm.default,Ai.a,hm.default,we.default,is.a,as.default,ss.a,gm,ym.a,vm.a,Pe.default,mm.a,Im.default,Cm,Em,us.a,bm.a,ps,Cn.default,Se.default,ArrayBuffer,nr.Vector3,rm.default,nm,nh.ParamStore,sm,fm,yv.a,Io.a,dv.FurnitureModel,Map,nr.SkyBackground]:[];Object(em.b)({isKnownImmutableInstance:function(t){return Bm.some((function(e){return t instanceof e}))}});em.a;var wm=r(345);function Pm(t){return(Pm="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 Sm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _m(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,Qm(n.key),n)}}function Qm(t){var e=function(t,e){if("object"!=Pm(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Pm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Pm(e)?e:String(e)}function Om(t,e){return(Om=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Dm(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=Mm(t);if(e){var o=Mm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return xm(this,r)}}function xm(t,e){if(e&&("object"===Pm(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 Mm(t){return(Mm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Rm,Tm=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&&Om(t,e)}(i,t);var e,r,n,o=Dm(i);function i(){var t;return Sm(this,i),(t=o.apply(this,arguments)).rootState=new fp,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new md(this,this.rootState);t.init(),t.run()}}])&&_m(e.prototype,r),n&&_m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(wm.a);Tm.dependencies=[zs.a];var Lm,jm,km,Nm,Fm,Gm,Um,zm=function(t){if(!Rm)throw new Error("please new Application before call method");return Rm.getCustomMiniAppService(t)},Ym=r(1399),Hm={maxAge:6e5,max:20},Vm=Symbol("fitting-data"),qm=Symbol("groove-fitting-entity"),Wm=Symbol("intersect-data"),Km=Symbol("param-model-hint-entity"),Jm=Symbol("fitting-hint-entity"),Xm=Symbol("plank-outline-hint-entity"),Zm=Symbol("hole-entity"),$m=Symbol("square-groove-entity"),tI=Symbol("round-corner-groove-entity"),eI=Symbol("special-shaped-groove-entity"),rI=Symbol("path-groove-entity"),nI=Symbol("plank-area-face-hint-entity");!function(t){t.FAIL="fail",t.SUCCESS="success",t.LOADING="loading"}(Lm||(Lm={})),function(t){t[t.READY=0]="READY",t[t.LOADING=1]="LOADING",t[t.FAILED=2]="FAILED",t[t.INVALID=3]="INVALID",t[t.SUCCESS=4]="SUCCESS"}(jm||(jm={})),function(t){t[t.READY=0]="READY",t[t.RUNNING=1]="RUNNING",t[t.FAILED=2]="FAILED",t[t.SUCCESS=3]="SUCCESS"}(km||(km={})),function(t){t.SCENE_ID="cp"}(Nm||(Nm={})),function(t){t[t.theme=1735419]="theme",t[t.sceneBG=15461612]="sceneBG",t[t.outline=0]="outline"}(Fm||(Fm={})),function(t){t.selectBlank="sb",t.renderModeChange="r",t.doorVisibilityChange="d"}(Gm||(Gm={})),function(t){t.SHADING="0",t.OUTLINE_WITH_SHADING="1",t.TRANSLUCENT="2",t.OUTLINE_AND_TRANSLUCENT="3",t.FULLY_TRANSPARENT="4"}(Um||(Um={}));Um.SHADING,Um.OUTLINE_WITH_SHADING,Um.TRANSLUCENT,Um.OUTLINE_AND_TRANSLUCENT,Um.FULLY_TRANSPARENT;var oI,iI,aI,sI=[_e.ParamModelType.PARAM_ENTITY,_e.ParamModelType.PARAM_FURNITURE,_e.ParamModelType.PARAM_PRIMITIVE],uI={scene3D:Symbol("scene3D")},cI=r(321),AI=r(251),lI=r(557);function fI(t){aI=t}function hI(t){return(hI="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 pI=["paramModelData"];function dI(t){return function(t){if(Array.isArray(t))return gI(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 gI(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 gI(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 gI(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 yI(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function vI(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */vI=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"==hI(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(hI(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 mI(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 II(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){mI(i,n,o,a,s,"next",t)}function s(t){mI(i,n,o,a,s,"throw",t)}a(void 0)}))}}function EI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CI(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,bI(n.key),n)}}function bI(t){var e=function(t,e){if("object"!=hI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hI(e)?e:String(e)}function BI(t,e){return(BI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wI(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=SI(t);if(e){var o=SI(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return PI(this,r)}}function PI(t,e){if(e&&("object"===hI(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 SI(t){return(SI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _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&&BI(t,e)}(i,t);var e,r,n,o=wI(i);function i(){var t;return EI(this,i),(t=o.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0},t.lastCurrentCustomDataArgs=[],t.getCurrentBaseDesignInfo=II(vI().mark((function e(){var r,n;return vI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.state.designInfo)){e.next=3;break}return e.abrupt("return",r);case 3:return n=zm(cI.MiniAppDesignBaseInfoService),e.next=6,n.getDesignBaseInfo();case 6:return r=e.sent,t.state.designInfo=r,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)}))),t.getCurrentCustomData=function(){var e=II(vI().mark((function e(r){var n,o;return vI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.state.currentCustomData,r){e.next=3;break}return e.abrupt("return",n);case 3:if(o=Object(Qr.castArray)(r),!Object(Qr.difference)(o,t.lastCurrentCustomDataArgs).length&&n){e.next=11;break}return e.next=8,LL(r);case 8:n=e.sent,e.next=12;break;case 11:return e.abrupt("return",n);case 12:return t.lastCurrentCustomDataArgs=o,t.state.currentCustomData=n,e.abrupt("return",n);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.loadFittingHardwareToSense=function(){var e=II(vI().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p,d,g=arguments;return vI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=g.length>1&&void 0!==g[1]?g[1]:ge.V1,(o=Object(Qr.uniq)(Object(Qr.flatten)(Object(Qr.map)(r.hardware,(function(t){return t.map((function(t){return t.brandGoodId}))}))))).length){e.next=4;break}return e.abrupt("return");case 4:return i=t.getStateManager().core,a=i.design,s=i.pad,e.next=8,Promise.allSettled(Object(Qr.map)(o,function(){var t=II(vI().mark((function t(e){var r;return vI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$L(e);case 2:return r=t.sent,t.abrupt("return",[e,r]);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 8:return u=e.sent,e.next=11,tj(o);case 11:c=e.sent,A=Object(Qr.mapValues)(Object(Qr.keyBy)(Object(Qr.filter)(u,(function(t){return"fulfilled"===t.status})).map((function(t){return t.value})),(function(t){return t[0]})),(function(t){return t[1]})),l=a.getCustom(),f=[],h={},p=vI().mark((function t(){var e,o,i,a,u,l,p;return vI().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.hardware[d],(o=s.findModelOrAssemblyModelById(d))?(i=o.getConcatenatedMatrix(),a=o.getSize(),u=(new we.default).makeTranslation(new Se.default(-a.x/2,a.y/2,-a.z/2)),l=n===ge.V2?i.clone():i.clone().multiply(u),p=Object(Qr.map)(e,(function(t){var e=A[t.brandGoodId],r=c[t.brandGoodId]||{x:0,y:0,z:0};if(e){var i=e.paramModelData,a=yI(e,pI),s=t.rotate,u=(new dr).parse(i);Object(AI.attach)(u,Object(AI.toAttachedMap)(a)),u.setIsAppendHardware(!0),u.setLinkedIds(t.linkedIds),u.setHardwareData(t),u.setHardwareVersion(n),u.linkParamModelId=o.id;var f=l.clone().multiply((new we.default).compose(new Se.default(t.position),new Be.default(s.x,s.y,s.z),new Se.default(t.scale)).multiply((new we.default).setPosition(new Se.default(r)))),p=ns.a.decompose(f),d=p.rotation,g=p.position,y=p.scale,v=new Se.default(g);return u.setPosition({x:v.x,y:v.y,z:v.z}),u.setRotation({x:d.x,y:d.y,z:d.z}),u.setScale(y),u.assignUniqueId(),h[t.id]=u.id,u}})).filter((function(t){return!!t})),f.push.apply(f,dI(p))):Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!");case 3:case"end":return t.stop()}}),t)})),e.t0=vI().keys(r.hardware);case 18:if((e.t1=e.t0()).done){e.next=23;break}return d=e.t1.value,e.delegateYield(p(),"t2",21);case 21:e.next=18;break;case 23:if(!f.length){e.next=27;break}return e.next=26,oI.updateAttacheds(f);case 26:l.addParamModels.apply(l,f);case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=i,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&CI(e.prototype,r),n&&CI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR),QI=r(127),OI=r(80);function DI(t){return(DI="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 xI(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=jI(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 MI(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 RI(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?MI(Object(r),!0).forEach((function(e){TI(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):MI(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function TI(t,e,r){return(e=FI(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function LI(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)||jI(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 jI(t,e){if(t){if("string"==typeof t)return kI(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)?kI(t,e):void 0}}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 NI(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,FI(n.key),n)}}function FI(t){var e=function(t,e){if("object"!=DI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=DI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DI(e)?e:String(e)}var GI=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._isRealPath=!1,this._changeMap={},this.faceHint={},this.id=Object(Jr.default)(),this.modelID=e,this.paths=r,r.forEach((function(t){t.plankArea=o})),this.pathMap=n}var e,r,n;return e=t,(r=[{key:"getRealPaths",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var r=e.force,n=void 0!==r&&r,o=e.resetCenter,i=void 0===o||o;if(!n&&i&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!n&&!i&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new t(this.modelID,[],new Map);var a=this.getFace2ds();if(this.paths.length>1){var s=[];c.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),c.FacesBoolean.FaceBooleanType.subtract,s),a=s}if(i&&a.length){var u,A={loops:(u=[]).concat.apply(u,LI(a.map((function(t){return t.loops}))))};Object(OI.b)(A);var l=A.box.center,f=c.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(t){t.loops.forEach((function(t){t.forEach((function(t){t.transform(f)}))}))}))}var h=[],p=[],d=new Map;a.forEach((function(t){var e=t.loops[0],r=t.loops.slice(1),n=zI(ye.OUTER,e),o=r.map((function(t){return zI(ye.INNER,t,!0)}));h.push(n),p.push.apply(p,LI(o)),d.set(n,o)}));var g=new t(this.modelID,[].concat(h,p),d);return i?this._realPathsResetCenterCache=g:this._realPathsCache=g,g._isRealPath=!0,g}},{key:"getCenterPoint",value:function(){var t,e,r=this.paths.filter((function(t){return t.type===ye.OUTER}));if(r.length)return(t=r.map(UI),e=new c.BBox2d,t.forEach((function(t){if(t.bcGroups){var r,n=xI(t.bcGroups);try{for(n.s();!(r=n.n()).done;){var o=r.value;o.box=new c.BBox2d;var i,a=xI(o.boundedCurves);try{for(a.s();!(i=a.n()).done;){var s=i.value;o.box.merge(s.getBounding())}}catch(t){a.e(t)}finally{a.f()}e.merge(o.box)}}catch(t){n.e(t)}finally{n.f()}}else{var u,A=xI(t.loops);try{for(A.s();!(u=A.n()).done;){var l,f=xI(u.value);try{for(f.s();!(l=f.n()).done;){var h=l.value;e.merge(h.getBounding())}}catch(t){f.e(t)}finally{f.f()}}}catch(t){A.e(t)}finally{A.f()}}})),e).center}},{key:"getFace2ds",value:function(){return this.paths.map(UI)}},{key:"_trackUpdateField",value:function(t,e,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,o=t.field;e===r||n.some((function(e){return e.field===o&&e.context.id===t.context.id}))||n.push(t)}},{key:"changeMap",get:function(){return this._changeMap},set:function(t){this._changeMap=t}},{key:"getFaceHint",value:function(){return this.faceHint}},{key:"setFaceHint",value:function(t){this.faceHint[t.id]=t}},{key:"removeFaceHint",value:function(t){this.faceHint[t]=void 0}}])&&NI(e.prototype,r),n&&NI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function UI(t){var e=[];if(t.lines.forEach((function(t){var r=t.start;r.getType()!==At.NONE&&e.push(r.getCurveLineAndPoints().curveLine),e.push(t.getRealLine())})),t.offset){var r=(0,c.LoopCCW.isPolygonCCW2D)(e.map((function(t){return t.startPoint})))?t.offset:-t.offset;return{loops:c.Path2dOffset.offsetPath2d(e,r).resultPaths}}return{loops:[e]}}function zI(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.map((function(t){return new Rn({type:At.NONE,position:t.startPoint})})),o=e.map((function(t){var e;return e=t instanceof c.LineSeg2d?{type:lt.SEGMENT}:t instanceof c.Arc2d?YI(t):HI(t),new _n(e)})),i=c.LoopCCW.isPolygonCCW2D(n.map((function(t){return t.getPosition()})));r!==i&&(n=n.reverse(),o=(o=o.reverse().map((function(t){return"boolean"==typeof t.clockwise&&(t.clockwise=!t.clockwise),t}))).slice(1).concat(o[0]));var a=WI(n.map((function(t){return t.getPosition()})));return n=n.slice(a).concat(n.slice(0,a)),o=o.slice(a).concat(o.slice(0,a)),new Yn({type:t,points:n,lines:o,forceCCW:!1})}function YI(t){var e={};e.type=lt.CIRCLE_ARC,e.radius=t.radius,e.clockwise=!t.isCCW;var r=t.center,n=t.startPoint,o=t.endPoint,i=new c.LineSeg2d(n,o),a=i.length/2,s=new c.Vector2d(i.getPoint(a)),u=new c.Vector2d(r).subtracted(s).normalized();return e.clockwise?e.minorArc=u.isSameDirection(i.rightNormal):e.minorArc=u.isSameDirection(i.leftNormal),e}function HI(t){var e={};return e.type=lt.ELLIPSE_ARC,e.majorRadius=t.majorRadius,e.minorRadius=t.minorRadius,e.clockwise=!t.isCCW,e.ellipseCenter=t.ccs.origin,e}var VI=void 0;function qI(t){VI=t;var e=t.changeMap.update;if(e&&e.length>0){var r=t._isRealPath?t.getCenterPoint():null,n=r?c.Matrix3.makeTranslation(-r.x,-r.y):void 0;e.forEach((function(t){var e=t.field,r=t.context;"hint"===e&&((r=r).getHint()?Sd(r,n):function(t,e){var r=Id().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),o=n.findIndex((function(r){return r.linkModel.id===t&&r.id===e}));if(o>-1){var i=Cd(n);i.splice(o,1),r.setPlankOutlineHintModels(i)}}(r.path.plankArea.modelID,r.id))})),t.changeMap=RI(RI({},t.changeMap),{},{update:[]})}!function(t){var e=t.getFaceHint();e[se.TOP]?_d(e[se.TOP],t):Qd(se.TOP,t.id);e[se.BOT]?_d(e[se.BOT],t):Qd(se.BOT,t.id)}(t)}function WI(t){if(!t.length)return 0;var e=t[0].y,r=t[0].x;t.slice(1).forEach((function(t){e<t.y&&(e=t.y),r>t.x&&(r=t.x)}));var n,o,i=-r,a=-e;return t.forEach((function(e,r){var s=e.x,u=e.y,c=Math.pow(s+i,2)+Math.pow(u+a,2);void 0===n||c<n?(n=c,o=r):n===c&&t[o].x>e.x&&(o=r)})),o}function KI(t){return(KI="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 JI(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XI(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,ZI(n.key),n)}}function ZI(t){var e=function(t,e){if("object"!=KI(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KI(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KI(e)?e:String(e)}function $I(t,e){return($I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tE(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=rE(t);if(e){var o=rE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eE(this,r)}}function eE(t,e){if(e&&("object"===KI(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 rE(t){return(rE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nE=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&&$I(t,e)}(i,t);var e,r,n,o=tE(i);function i(){var t;return JI(this,i),(t=o.apply(this,arguments)).paramModelConstructor=dr,t}return e=i,(r=[{key:"parseParamModelAssemblies",value:function(t){var e=this;return t.forEach((function(t){var r=(new wr).parse(t,e,{isRootWorldMatrix:!0});e.addParamModelAssembly(r)})),this}}])&&XI(e.prototype,r),n&&XI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(tm);function oE(t){return(oE="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 iE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aE(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,sE(n.key),n)}}function sE(t){var e=function(t,e){if("object"!=oE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oE(e)?e:String(e)}function uE(){return(uE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=cE(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 cE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=hE(t)););return t}function AE(t,e){return(AE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lE(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=hE(t);if(e){var o=hE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fE(this,r)}}function fE(t,e){if(e&&("object"===oE(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 hE(t){return(hE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pE=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&&AE(t,e)}(i,t);var e,r,n,o=lE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return iE(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return nE}},{key:"generate",value:function(t){return t=uE(hE(i.prototype),"generate",this).call(this,t)}}])&&aE(e.prototype,r),n&&aE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_e.CoreParamModelAssemblyBackup);function dE(t){return(dE="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 gE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yE(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,vE(n.key),n)}}function vE(t){var e=function(t,e){if("object"!=dE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dE(e)?e:String(e)}function mE(){return(mE="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=IE(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 IE(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=BE(t)););return t}function EE(t,e){return(EE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CE(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=BE(t);if(e){var o=BE(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bE(this,r)}}function bE(t,e){if(e&&("object"===dE(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 BE(t){return(BE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wE=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&&EE(t,e)}(i,t);var e,r,n,o=CE(i);function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return gE(this,i),o.call(this,t,{isRef:e})}return e=i,(r=[{key:"contextConstructor",get:function(){return nE}},{key:"generate",value:function(t){return t=mE(BE(i.prototype),"generate",this).call(this,t)}}])&&yE(e.prototype,r),n&&yE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(_e.CoreParamModelBackup),PE=r(332);function SE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nE;e.parseParamModels(t.paramModels).parseParamModelGroups(t.paramModelGroups).parseParamModelAssemblies(t.paramModelCombinations);var r=e.getParamModelAssemblies(),n=e.getParamModels().filter((function(t){return!t.isAccessory()}));return Object(Qr.uniqBy)(PE.ParamModelUtils.collectAccessories(n),"id").forEach((function(t){t.toLocalMatrix()})),{paramModels:n,paramModelAssemblies:r}}var _E=Math.sqrt(2),QE=Math.PI/6,OE=Math.PI/3+Math.PI;function DE(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:OE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:QE,n=t.getPosition(),o=t.getSize(),i=n.clone(),a=o.length()*_E,s=new Se.default(Math.cos(r)*Math.cos(e),Math.cos(r)*Math.sin(e),Math.sin(r)).mul(a).applyMatrix4(t.getMatrix());return{lookAt:i,position:s}}var xE,ME=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,e=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,t,e)}))};function RE(t){var e,r,n,o=function(t){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t.call.apply(t,[this].concat(r))}};return{promise:new Promise((function(i,a){e=o(i),r=o(a),"number"==typeof t&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(t,"ms")))}),t))})),resolve:e,reject:r}}function TE(t){return(TE="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 LE(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 jE(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?LE(Object(r),!0).forEach((function(e){kE(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LE(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kE(t,e,r){var n;return n=function(t,e){if("object"!=TE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=TE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==TE(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function NE(t){return t["@type"]===X.THROUGH_SHELL}function FE(t){var e=t.elements;return(new nr.Matrix4).set(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])}function GE(t,e){return Se.default.sub(t,e.clone().mul(Se.default.dot2(t,e)/Se.default.dot2(e,e)))}function UE(t){return(UE="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 zE(t,e,r){var n;return n=function(t,e){if("object"!=UE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=UE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==UE(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function YE(t,e){var r=t.getSize(),n=(new we.default).getInverse(t.getConcatenatedMatrix()),o=e.clone().applyMatrix4(FE(n)),i=o.x,a=o.y,s=o.z,u=zE(zE(zE(zE(zE(zE({},xE.TOP,Math.abs(s-r.z/2)),xE.LEFT,Math.abs(i+r.x/2)),xE.BACK,Math.abs(a+r.y/2)),xE.RIGHT,Math.abs(i-r.x/2)),xE.FRONT,Math.abs(a-r.y/2)),xE.BOT,Math.abs(s+r.z/2)),c=Object.entries(u).reduce((function(t,e){return e[1]<t[1]?e:t}));return c[1]<.01?+c[0]:xE.UNKNOWN}function HE(t){if(t instanceof wr)return t;var e=t.getRoot(),r=e.getAssembly();return r||e}function VE(t){return(VE="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 qE(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 WE(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qE(Object(r),!0).forEach((function(e){KE(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qE(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function KE(t,e,r){var n;return n=function(t,e){if("object"!=VE(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=VE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==VE(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.UNKNOWN=-1]="UNKNOWN",t[t.TOP=0]="TOP",t[t.LEFT=1]="LEFT",t[t.BACK=2]="BACK",t[t.RIGHT=3]="RIGHT",t[t.FRONT=4]="FRONT",t[t.BOT=5]="BOT"}(xE||(xE={}));var JE={getJsonConfig:{defaultTemplateId:void 0,ignoreResetPosition:!1}};function XE(t){return JE[t]}function ZE(t){return t<1?{transparent:!0,opacity:t,depthWrite:!1}:{transparent:!1,opacity:t,depthWrite:!0}}function $E(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e&&(t.outlineMode=nr.OutlineMode.Disabled),r&&nr.TypeAssert.isMesh(t)&&(t.useOriginMaterialInTransparentMode=!0),n&&(t.castPlanarShadow=!1,t.castShadow=!1)}var tC=[];function eC(t){return(eC="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 rC,nC=["paramModelData"],oC=["paramModelData"];function iC(t){return function(t){if(Array.isArray(t))return aC(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 aC(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 aC(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 aC(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 sC(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 uC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){sC(i,n,o,a,s,"next",t)}function s(t){sC(i,n,o,a,s,"throw",t)}a(void 0)}))}}function cC(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */cC=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"==eC(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(eC(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 AC(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function lC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fC(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,hC(n.key),n)}}function hC(t){var e=function(t,e){if("object"!=eC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=eC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eC(e)?e:String(e)}function pC(t,e){return(pC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dC(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 gC(this,r)}}function gC(t,e){if(e&&("object"===eC(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)}!function(t){t.design="design",t.series="series"}(rC||(rC={}));var vC=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&&pC(t,e)}(i,t);var e,r,n,o=dC(i);function i(){var t;return lC(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({main:jm.READY,design:jm.READY,series:jm.READY}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionLoad=t.unitCreator.async((function(e){e.started.latest(cC().mark((function t(e,r){var n,o,i,a;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,iI.getParamModelDataByBrandGoodId(e);case 2:return n=t.sent,o=n.paramModelData,i=AC(n,nC),a=(new dr).parse(o),Object(AI.attach)(a,Object(AI.toAttachedMap)(i)),t.next=9,oI.updateAttacheds([a]);case 9:return r.core.design.getCustom().addParamModels(a),r.core.fittingDesign.setFittings(tC),t.next=13,Object(QI.put)(this.$actionLoad.done.message({params:e,result:jm.SUCCESS}));case 13:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddModelToSense=t.unitCreator.async((function(e){e.started.latest((function(t,e){var r=this,n=t.custom,o=t.needAttach;return cC().mark((function t(){var i,a,s,u;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n.getParamModels(),a=n.getParamModelAssemblies(),!o){t.next=5;break}return t.next=5,Promise.all(i.map(function(){var t=uC(cC().mark((function t(e){var r;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,iI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(AI.attach)(e,Object(AI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:if(e.core.design.setCustom(n),s=i.filter((function(t){return!t.getAssembly()})),!o){t.next=11;break}return u=[].concat(iC(s),iC(a)),t.next=11,oI.updateAttacheds(u);case 11:return t.next=13,Object(QI.put)(r.$actionAddModelToSense.done.message({params:{custom:n,needAttach:o},result:jm.SUCCESS}));case 13:case"end":return t.stop()}}),t)}))()})),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAutoRefreshModel=t.unitCreator.sync((function(t){})),t.$actionAddParamModelToSense=t.unitCreator.async((function(e){e.started.latest(cC().mark((function t(e,r){var n,o;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.map((function(t){var e=t.paramModelData,r=AC(t,oC),n=(new dr).parse(e,new nE);return Object(AI.attach)(n,Object(AI.toAttachedMap)(r)),n})),t.next=3,oI.updateAttacheds(o);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,iC(o)),t.next=6,Object(QI.put)(this.$actionAddParamModelToSense.done.message({params:e,result:jm.SUCCESS}));case 6:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t.$actionAddParamModelAssemblyToSense=t.unitCreator.async((function(e){e.started.latest(cC().mark((function t(e,r){var n,o,i,a;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.core.design.getCustom(),o=new nE,i=e.map((function(t){return(new wr).parse(t,o)})),a=o.getParamModels(),t.next=6,Promise.all(a.map(function(){var t=uC(cC().mark((function t(e){var r;return cC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,iI.getParamModelDataByBrandGoodId(e.getBrandGoodId());case 2:r=t.sent,Object(AI.attach)(e,Object(AI.toAttachedMap)(r));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 6:return t.next=8,oI.updateAttacheds(iC(i));case 8:return n.addParamModelAssemblies.apply(n,iC(i)),n.addParamModels.apply(n,iC(a)),t.next=12,Object(QI.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:e,result:jm.SUCCESS}));case 12:case"end":return t.stop()}}),t,this)}))),e.done.produce(t.$reducerState,(function(t,e){t.main=e.result}))})),t}return e=i,(r=[{key:"module",value:function(){return"entry"}}])&&fC(e.prototype,r),n&&fC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);function mC(t){return(mC="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 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"!=mC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mC(e)?e:String(e)}function bC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BC(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&&wC(t,e)}function wC(t,e){return(wC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function PC(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=_C(t);if(e){var o=_C(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return SC(this,r)}}function SC(t,e){if(e&&("object"===mC(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 _C(t){return(_C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Us.AXR;var QC=function(t){BC(r,t);var e=PC(r);function r(){return bC(this,r),e.apply(this,arguments)}return EC(r)}(Us.AXRPartial),OC=(Us.AXRManager,r(155));function DC(t){return(DC="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 xC(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xC=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"==DC(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(DC(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 MC(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 RC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){MC(i,n,o,a,s,"next",t)}function s(t){MC(i,n,o,a,s,"throw",t)}a(void 0)}))}}var TC=function(){var t=RC(xC().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f;return xC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p_(),n=r.baseDesignInfo,t.next=3,n.getCurrentBaseDesignInfo();case 3:return o=t.sent,i=o.designId,a=o.levelid,s={modelid:null!=e?e:"",designid:i,levelid:a,toolType:0},u=n.getStateManager().core.design.getCustom(),e||((c=u.getParamModelAssemblies()).length?s.modelid=c[0].id:(A=u.getParamModels().filter((function(t){return!t.isAppendHardware}))).length&&(s.modelid=A[0].id)),t.next=11,n.getCurrentCustomData(null!=e?e:s.modelid);case 11:return l=t.sent,f=l.toolType,s.toolType=f,t.abrupt("return",s);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),LC=function(t){var e=Id().getStateManager().pad,r=p_().viewParamModel.state.state.currModelId,n=e.findModelOrAssemblyModelById(t);if(n){var o=n.getIdPath(),i=n.getRoot();if(i instanceof dr){var a=i.getAssembly();a&&o.unshift(a.id)}return o.includes(r)?n:void 0}},jC=function(t){var e,r;if(t instanceof wr)return t.getInvisible();for(;t;){if(t.getInvisible())return!0;r=t,t=t.getParent()}return(null===(e=null==r?void 0:r.getAssembly())||void 0===e?void 0:e.getInvisible())||!1},kC=function(){var t=RC(xC().mark((function t(e){var r,n,o,i,a;return xC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p_(),n=r.scene,o=n.getStateManager(),i=o.scene3D,a=RE(5e3),i.once(OC.h.CameraUpdate.symbol,(function(){return a.resolve()})),i.updateCameraAttributes(e),t.abrupt("return",a);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function NC(t){return(NC="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 FC(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 GC(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?FC(Object(r),!0).forEach((function(e){UC(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):FC(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function UC(t,e,r){return(e=WC(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zC(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 YC(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){zC(i,n,o,a,s,"next",t)}function s(t){zC(i,n,o,a,s,"throw",t)}a(void 0)}))}}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"==NC(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(NC(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 VC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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,WC(n.key),n)}}function WC(t){var e=function(t,e){if("object"!=NC(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=NC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==NC(e)?e:String(e)}function KC(){return(KC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=JC(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 JC(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=tb(t)););return t}function XC(t,e){return(XC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ZC(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=tb(t);if(e){var o=tb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $C(this,r)}}function $C(t,e){if(e&&("object"===NC(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 tb(t){return(tb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function eb(t){return function(t){if(Array.isArray(t))return rb(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 rb(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 rb(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 rb(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 nb={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}};function ob(t){return Object(Qr.values)(t).some((function(t){return Object(Qr.isEmpty)(t)}))}function ib(t,e){var r=t.getParamModelAssemblies().find((function(t){return t.id===e}));if(r||(r=t.getParamModels().find((function(t){return t.id===e}))),!r)return[];for(var n=[],o=[r];o.length;){var i=o.shift();n.push(i.id),o.push.apply(o,eb(i.getChildNodes()))}return n}function ab(t){return Object(Qr.uniq)(["holes","grooves","hardwares","hardwareGrooves"].map((function(e){return Object(Qr.keys)(t[e]).sort()})).flat())}function sb(t,e){var r=new Set(e);return t.filter((function(t){return!r.has(t)}))}var ub=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&&XC(t,e)}(i,t);var e,r,n,o=ZC(i);function i(){var t;return VC(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({autoSave:!0,designLoading:Lm.FAIL,design:Object(Qr.cloneDeep)(nb)}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(HC().mark((function t(e,r){var n,o,i,a,s,u,c,A;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(vC);case 1:return o=n.$actionAddModelToSense.done.messageType(),i=this.$actionRestoreFittingDesign.messageType(),a=n.$actionAutoRefreshModel.messageType(),t.next=7,Object(QI.take)([o,i,a]);case 7:s=r.core,u=s.fittingDesign,c=s.design,u.setFittings([]),u.setGrooveFittings([]),c.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V1&&t.dispose()})),A=this.state.state.design,this.fittingAddDataToFittingDesignSense(A),this.getAxr(_I).loadFittingHardwareToSense({hardware:A.hardwares}),t.next=1;break;case 17:case"end":return t.stop()}}),t,this)})))})),t.$actionEnableAutoSave=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.autoSave=e}))})),t.initFittingDesign=function(){t.$actionRestoreFittingDesign.dispatch(Object(Qr.cloneDeep)(nb))},t.getConnectedFittingDesign=function(){var e=YC(HC().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h=arguments;return HC().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],o=t.state.state.design,r){e.next=4;break}return e.abrupt("return",Object(Qr.cloneDeep)(o));case 4:if(i={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){e.next=26;break}a=o.hardwares||{},e.t0=HC().keys(a);case 8:if((e.t1=e.t0()).done){e.next=18;break}if(c=e.t1.value,!a.hasOwnProperty(c)){e.next=16;break}if(!(A=Object(Qr.find)(a[c]||[],(function(t){return t.id===r})))){e.next=16;break}return u=c,s=A,e.abrupt("break",18);case 16:e.next=8;break;case 18:if(s&&u){e.next=20;break}throw new Error("当前五金不存在!");case 20:l=s.linkedIds,f=function(t){return l.includes(t.id)},i.holes[u]=Object(Qr.filter)(o.holes[u],f),i.grooves[u]=Object(Qr.filter)(o.grooves[u],f),e.next=27;break;case 26:Object(Qr.keys)(i).forEach((function(t){o[t]&&o[t][r]&&(i[t][r]=Object(Qr.cloneDeep)(o[t][r]))}));case 27:return e.abrupt("return",i);case 28:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.fittingAddDataToFittingDesignSense=function(){var e=YC(HC().mark((function e(r){var n,o,i,a,s,u,c,A,l,f,h,p;return HC().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ME(1);case 2:n=t.stateManager.core,o=n.fittingDesign,i=n.pad,a=p_().fittingDesign.senseSetting.getSenseSettings(),s=Object(Qr.pick)(a,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,A=r.grooves,l=void 0===A?{}:A,f=r.hardwareGrooves,h=void 0===f?{}:f,p={findRelativeModel:i.findModelOrAssemblyModelById,transformModel:ts},o.setFittings([].concat(eb(Pd(c,GC(GC({},p),{},{type:J.HOLE,defaultConfig:s}))),eb(Pd(l,GC(GC({},p),{},{type:J.GROOVE,defaultConfig:s}))))),o.setGrooveFittings(Pd(h,GC(GC({},p),{},{type:J.HARDWARE_GROOVE,transformModel:Gs,defaultConfig:s})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.appendFittingDataToFittingDesign=function(){var e=YC(HC().mark((function e(r,n){var o,i,a,s,u,c,A,l,f,h,p;return HC().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.state.state,a=i.design,s=i.autoSave,u=!r.id||r.id===a.id,c=nb,A=n.timeout,l=n.save,f=void 0===l?s:l,h={id:null!==(o=r.id)&&void 0!==o?o:a.id,holes:GC(GC({},u?a.holes:c.holes),r.holes||{}),grooves:GC(GC({},u?a.grooves:c.grooves),r.grooves||{}),hardwares:GC(GC({},u?a.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:GC(GC({},u?a.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(Qr.pull)(Object(Qr.keys)(h),"id").forEach((function(t){var e=h[t];Object(Qr.keys)(e).forEach((function(t){0===e[t].length&&delete e[t]}))})),!f){e.next=12;break}return p=RE(A),t.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),e.abrupt("return",p.promise);case 12:t.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),t.$actionRestoreFittingDesign=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.design=e}))})),t.$actionLoadFittingDesign=t.unitCreator.async((function(t){t.started.every(HC().mark((function t(e,r){var n,o,i,a,s=this;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.$actionLoadFittingDesign,o=e.params,t.next=4,TC(o.modelid);case 4:return i=t.sent,t.prev=5,t.next=8,PL(GC(GC({},o),i));case 8:a=t.sent,Us.Util.safeExec((function(){var t=r.core.design.getCustom(),n=s.getAxr(bw).state.state.currModelId;if(n===e.params.modelid&&a){var o=ib(t,n),i=ab(a),u=sb(i,o);zm(Tv).log({logKey:"miniAppFittingDesignRead",modelId:n,fittingConnectedIds:i.join(","),notExistsIds:u.join(","),notExistsIdsCount:!!u.length})}})),n.done.dispatch({params:e,result:{designData:a,modelId:i.modelid}}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(5),n.failed.dispatch({params:e});case 16:case"end":return t.stop()}}),t,this,[[5,13]])}))),t.done.every((function(t,e){var r=this.$actionRestoreFittingDesign,n=t.result.designData?t.result.designData:Object(Qr.cloneDeep)(nb),o=this.getAxr(bw).state.state.currModelId;t.result.modelId===o&&r.dispatch(n);var i=t.params.defer;i&&i.resolve(t.result.designData)})),t.failed.every((function(t,e){var r,n=this.getAxr(bw).state.state.currModelId;(null===(r=t.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var o=t.params.defer;o&&o.reject(new Error("load fitting design error"))}))})),t.$actionClearFittingDesign=t.unitCreator.async((function(t){t.started.every(HC().mark((function t(e,r){var n,o,i,a,s;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getAxr(bw).state.state.currModelId,o=e.modelId,i=void 0===o?n:o,t.next=4,TC(i);case 4:return a=t.sent,s=this.$actionClearFittingDesign,t.prev=6,t.next=9,DL(a);case 9:s.done.dispatch({params:e,result:void 0}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(6),s.failed.dispatch({params:e});case 15:case"end":return t.stop()}}),t,this,[[6,12]])}))),t.done.every(HC().mark((function t(e,r){var n,o,i;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=this.getAxr(bw).state.state.currModelId,(null!==(n=e.params.modelId)&&void 0!==n?n:o)===o&&this.initFittingDesign(),(i=e.params.defer)&&i.resolve();case 5:case"end":return t.stop()}}),t,this)}))),t.failed.every(HC().mark((function t(e,r){var n;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return t.stop()}}),t)})))})),t.$actionSaveFittingDesign=t.unitCreator.async((function(t){t.started.every(HC().mark((function t(e,r){var n,o,i,a,s,u=this;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.state.state.design,o=e.design,i=void 0===o?n:o,t.next=4,TC(i.id);case 4:return a=t.sent,s=this.$actionSaveFittingDesign,Us.Util.safeExec((function(){var t=zm(Tv),e=u.getAxr(bw).state.state.currModelId,o=r.core.design.getCustom();if(i&&(!i.id||e===a.modelid)){var s=ib(o,e),c=ab(i),A=sb(c,s);ob(Object(Qr.omit)(n,["id"]))?t.log({logKey:"FittingDesignCreate",modelId:a.modelid,allModelIds:s.join(","),fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length}):t.log({logKey:"FittingDesignUpdate",modelId:a.modelid,fittingConnectedIds:c.join(","),notExistsIds:A.join(","),notExistsIdsCount:!!A.length})}})),t.prev=7,t.next=10,OL(GC(GC({},i),{},{id:a.modelid}),a);case 10:s.done.dispatch({params:e,result:void 0}),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(7),s.failed.dispatch({params:e,result:t.t0});case 16:case"end":return t.stop()}}),t,this,[[7,13]])}))),t.failed.every(HC().mark((function t(e,r){var n,o;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=e.params.defer)&&(o=e.result||new Error("保存失败"),n.reject(o));case 2:case"end":return t.stop()}}),t)}))),t.done.every(HC().mark((function t(e,r){var n,o,i;return HC().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.params.design,o=this.getAxr(bw).state.state.currModelId,!n||n.id&&n.id!==o||this.$actionRestoreFittingDesign.dispatch(n),(i=e.params.defer)&&setTimeout((function(){i.resolve()}));case 5:case"end":return t.stop()}}),t,this)})))})),t}return e=i,(r=[{key:"init",value:function(){KC(tb(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&qC(e.prototype,r),n&&qC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function cb(t){return(cb="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 Ab(t){return function(t){if(Array.isArray(t))return lb(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 lb(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 lb(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 lb(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 fb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */fb=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"==cb(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(cb(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 hb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pb(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,db(n.key),n)}}function db(t){var e=function(t,e){if("object"!=cb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=cb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==cb(e)?e:String(e)}function gb(){return(gb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=yb(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 yb(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eb(t)););return t}function vb(t,e){return(vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mb(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=Eb(t);if(e){var o=Eb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ib(this,r)}}function Ib(t,e){if(e&&("object"===cb(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 Eb(t){return(Eb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Cb=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&&vb(t,e)}(i,t);var e,r,n,o=mb(i);function i(){var t;return hb(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshFittingHint=t.unitCreator.sync((function(t){t.latest(fb().mark((function t(){var e,r;return fb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateFittingHintConf=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){gb(Eb(i.prototype),"init",this).call(this),this.$actionRefreshFittingHint.dispatch()}},{key:"setFittingHint",value:function(t){this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"clearFittingHint",value:function(t){var e=t?Object(Qr.omit)(this.state.state.option,t):{};this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"setFittingHardwareHint",value:function(t){var e=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),r=Object(Qr.fromPairs)(e.map((function(t){return t.hardwareData?[t.hardwareData.id,t.id]:[]})).filter((function(t){return 2===t.length})));p_().scene.$actionModelHint.dispatch(Object(Qr.mapKeys)(t,(function(t,e){return r[e]||""})))}},{key:"clearFittingHardwareHint",value:function(t){t||p_().scene.$actionModelHint.dispatch({});var e=Object(Qr.castArray)(t),r=this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),n=Object(Qr.fromPairs)(r.map((function(t){return t.hardwareData?[t.id,t.hardwareData.id]:[]})).filter((function(t){return 2===t.length}))),o=p_().scene.state.state.overrideMaterialOption;p_().scene.$actionModelHint.dispatch(Object(Qr.omitBy)(o,(function(t,r){var o=n[r];return!!o&&e.includes(o)})))}},{key:"rerenderToSense",value:function(){var t=this.state.state.option,e=this.stateManager.core,r=e.design,n=e.fittingDesign,o=r.getCustom().getParamModels().filter((function(t){return t.isAppendHardware})),i=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getRoundCornerGrooveModels(),A=n.getSpecialShapedGrooveModels(),l=n.getPathGrooveModels(),f=Object(Qr.map)(t,(function(t,e){var r=[].concat(Ab(o),Ab(i),Ab(a),Ab(s),Ab(u),Ab(c),Ab(A),Ab(l)).find((function(t){return t.id===e}));if(r)return new sn({linkModel:r,hintOutline:t.outline})})).filter((function(t){return!!t}));n.setFittingHintModels(f)}}])&&pb(e.prototype,r),n&&pb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function bb(t){return(bb="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 Bb(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,wb(n.key),n)}}function wb(t){var e=function(t,e){if("object"!=bb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bb(e)?e:String(e)}var Pb=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.__changeMap={}}var e,r,n;return e=t,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({field:"isHidden"},this.isHidden,t),this.isHidden=t}},{key:"__trackUpdateField",value:function(t,e,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,o=t.field;e===r||n.some((function(t){return t.field===o}))||n.push({field:o})}}])&&Bb(e.prototype,r),n&&Bb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Sb(t){var e,r=new Pb;if(r.id=t.id,t instanceof dr){if(!t.isAppendHardware)return;e=J.HARDWARE,r.isHidden=t.getInvisible(),r.originalData=t.hardwareData}else t instanceof En||t instanceof vo?(r.isHidden=!t.visible,e=t.type,r.originalData=t.fittingData):(r.isHidden=!t.visible,e=t.type,r.originalData=t.data);return r.linkParamModelId=t.linkParamModelId,r.modelType=e,r}function _b(t){return(_b="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 Qb(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Db(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 Ob(t){return function(t){if(Array.isArray(t))return xb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Db(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 Db(t,e){if(t){if("string"==typeof t)return xb(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)?xb(t,e):void 0}}function xb(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 Mb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rb(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,Tb(n.key),n)}}function Tb(t){var e=function(t,e){if("object"!=_b(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_b(e)?e:String(e)}function Lb(t,e){return(Lb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jb(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=Nb(t);if(e){var o=Nb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kb(this,r)}}function kb(t,e){if(e&&("object"===_b(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 Nb(t){return(Nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fb=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&&Lb(t,e)}(i,t);var e,r,n,o=jb(i);function i(){return Mb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getAllFittingModels",value:function(t){var e=new Set;if(t){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(t);if(!r)return[];for(var n=[r];n.length;){var o=n.shift();e.add(o.id),n.push.apply(n,Ob((null==o?void 0:o.getChildNodes())||[]))}}var i=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),a=this.stateManager.core.fittingDesign.getFittings(),s=this.stateManager.core.fittingDesign.getGrooveFittings(),u=this.stateManager.core.fittingDesign.getHoleModels(),c=this.stateManager.core.fittingDesign.getSquareGrooveModels(),A=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),l=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),f=this.stateManager.core.fittingDesign.getPathGrooveModels(),h=[].concat(Ob(i),Ob(a),Ob(s),Ob(u),Ob(c),Ob(A),Ob(l),Ob(f));return e.size>0&&(h=h.filter((function(t){return e.has(t.linkParamModelId)}))),h.map((function(t){return Sb(t)}))}},{key:"findHardwareParamModels",value:function(t){var e,r=[],n=Qb(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.isAppendHardware&&r.push(o),r.push.apply(r,Ob(this.findHardwareParamModels(o.getChildNodes())))}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"save",value:function(t){var e,r=[],n=[],o=Qb(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;i.modelType===J.HARDWARE?r.push(i):n.push(i)}}catch(t){o.e(t)}finally{o.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(t){var e=this.stateManager.core.pad;t.forEach((function(t){var r=e.findModelOrAssemblyModelById(t.id);if(r){var n=t.__changeMap.update;(void 0===n?[]:n).forEach((function(e){"isHidden"===e.field&&r.setInvisible(t.getHidden())})),t.__changeMap.update=[]}})),fL().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(t){var e=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getHoleModels(),o=this.stateManager.core.fittingDesign.getSquareGrooveModels(),i=this.stateManager.core.fittingDesign.getRoundCornerGrooveModels(),a=this.stateManager.core.fittingDesign.getSpecialShapedGrooveModels(),s=this.stateManager.core.fittingDesign.getPathGrooveModels(),u=this.stateManager.core.fittingDesign.getFittingHintModels();t.forEach((function(t){var c;t.modelType===J.HARDWARE_GROOVE?c=r.find((function(e){return e.id===t.id})):t.modelType===J.HOLE||t.modelType===J.GROOVE?c=e.find((function(e){return e.id===t.id})):t.modelType===J.HOLE_V2?c=n.find((function(e){return e.id===t.id})):t.modelType===J.SQUARE_GROOVE?c=o.find((function(e){return e.id===t.id})):t.modelType===J.ROUND_CORNER_GROOVE?c=i.find((function(e){return e.id===t.id})):t.modelType===J.SPECIAL_SHAPED_GROOVE?c=a.find((function(e){return e.id===t.id})):t.modelType===J.PATH_GROOVE&&(c=s.find((function(e){return e.id===t.id})));var A=u.find((function(e){return e.linkModel.id===t.id}));if(c){var l=t.__changeMap.update;(void 0===l?[]:l).forEach((function(e){"isHidden"===e.field&&(null==c||c.setVisible(!t.getHidden()),null==A||A.setVisible(!t.getHidden()))})),t.__changeMap.update=[]}}))}}])&&Rb(e.prototype,r),n&&Rb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function Gb(t){return(Gb="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 Ub(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 zb(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ub(i,n,o,a,s,"next",t)}function s(t){Ub(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Yb(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 Hb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yb(Object(r),!0).forEach((function(e){Vb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vb(t,e,r){return(e=Zb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qb(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */qb=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"==Gb(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(Gb(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 Wb(t){return function(t){if(Array.isArray(t))return Kb(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 Kb(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 Kb(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 Kb(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 Jb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xb(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,Zb(n.key),n)}}function Zb(t){var e=function(t,e){if("object"!=Gb(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Gb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gb(e)?e:String(e)}function $b(){return($b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=tB(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 tB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oB(t)););return t}function eB(t,e){return(eB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rB(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=oB(t);if(e){var o=oB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nB(this,r)}}function nB(t,e){if(e&&("object"===Gb(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 oB(t){return(oB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iB=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&&eB(t,e)}(a,t);var e,r,n,o,i=rB(a);function a(){var t;return Jb(this,a),(t=i.apply(this,arguments)).state=t.stateCreator.create({fittings:[],hardwares:[]}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionAddFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.fittings=[].concat(Wb(t.fittings),[e])}))})),t.$actionClearFitting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.fittings=[]}))})),t.$actionAddHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.hardwares=[].concat(Wb(t.hardwares),[e])}))})),t.$actionClearHardware=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t){t.hardwares=[]}))})),t.$actionViewerInit=t.unitCreator.sync((function(t){t.latest(qb().mark((function t(e,r){var n,o;return qb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(vC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(QI.take)([o]);case 5:this.clearHardware(),this.clearFitting(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshFittingViewer=t.unitCreator.sync((function(t){t.latest(qb().mark((function t(){var e,r,n,o,i=this;return qb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:n=this.state.state.hardwares,o=this.state.state.fittings,this.clearHardware(),this.clearFitting(),o.forEach((function(t){return i.addFitting(t)})),n.forEach((function(t){return i.addHardware(t)})),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.addFitting=function(e){var r,n,o=Object(Qr.cloneDeep)(e);return null===(r=o.holes)||void 0===r||r.forEach((function(t){Object(Qr.isNil)(t.holeId)&&(t.holeId=Object(Jr.default)())})),null===(n=o.grooves)||void 0===n||n.forEach((function(t){Object(Qr.isNil)(t.grooveId)&&(t.grooveId=Object(Jr.default)())})),t.addDataToFittingViewer(o),t.$actionAddFitting.dispatch(o),o},t.clearFitting=function(){var e=t.stateManager.core.fittingDesign;e.setHoleModels([]),e.setSquareGrooveModels([]),e.setRoundCornerGrooveModels([]),e.setSpecialShapedGrooveModels([]),e.setPathGrooveModels([]),t.$actionClearFitting.dispatch()},t.getFitting=function(e){var r=t.state.state.fittings,n=Object(Qr.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.getHardware=function(e){var r=t.state.state.hardwares,n=Object(Qr.cloneDeep)(r);if(!e)return n;var o=e.modelId;return n.filter((function(t){return t.modelId===o}))},t.addDataToFittingViewer=function(e){var r,n,o,i,a,s,u,c,A,l=t.stateManager.core.fittingDesign,h=p_().fittingDesign.senseSetting.getSenseSettings(),p=Object(Qr.pick)(h,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),d={findRelativeModel:LC},g=e.modelId,y=e.finishedProfile,v=e.holes,m=e.grooves,I=e.referencePlane;if(v&&(a=v.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Od}),{color:p.holeColor,opacity:p.holeOpacity})}))),m){var E=Object(Qr.groupBy)(m,"geometryType");s=null===(r=E[f.SQUARE])||void 0===r?void 0:r.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Dd}),{color:p.grooveColor,opacity:p.grooveOpacity})})),u=null===(n=E[f.ROUND_CORNER])||void 0===n?void 0:n.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:xd}),{color:p.grooveColor,opacity:p.grooveOpacity})})),c=null===(o=E[f.SPECIAL_SHAPED])||void 0===o?void 0:o.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Md}),{color:p.grooveColor,opacity:p.grooveOpacity})})),A=null===(i=E[f.PATH])||void 0===i?void 0:i.map((function(t){return Gd(Hb({modelId:g,finishedProfile:y,referencePlane:I},t),Hb(Hb({},d),{},{transformModel:Rd}),{color:p.grooveColor,opacity:p.grooveOpacity})}))}a&&a.length>0&&l.addHoleModels(a),s&&s.length>0&&l.addSquareGrooveModels(s),u&&u.length>0&&l.addRoundCornerGrooveModels(u),c&&c.length>0&&l.addSpecialShapedGrooveModels(c),A&&A.length>0&&l.addPathGrooveModels(A)},t.addHardwareToViewer=function(){var e=zb(qb().mark((function e(r){var n,o,i,a;return qb().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.modelId,o=r.hardwares,i=LC(n)){e.next=4;break}throw new Error("".concat(n," 关联的模型不存在"));case 4:return a=Nd(i),e.next=7,t.getAxr(_I).loadFittingHardwareToSense({hardware:Vb({},a.id,o)},ge.V2);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t}return e=a,(r=[{key:"init",value:function(){$b(oB(a.prototype),"init",this).call(this),this.$actionViewerInit.dispatch(),this.$actionRefreshFittingViewer.dispatch()}},{key:"initFittingViewer",value:function(){this.clearHardware(),this.clearFitting()}},{key:"addHardware",value:(o=zb(qb().mark((function t(e){var r,n;return qb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(Qr.cloneDeep)(e),null===(r=n.hardwares)||void 0===r||r.forEach((function(t){Object(Qr.isNil)(t.id)&&(t.id=Object(Jr.default)())})),t.next=4,this.addHardwareToViewer(n);case 4:return this.$actionAddHardware.dispatch(n),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"clearHardware",value:function(){this.stateManager.core.design.getCustom().getParamModels().forEach((function(t){t.isAppendHardware&&t.hardwareVersion===ge.V2&&t.dispose()})),this.$actionClearHardware.dispatch()}}])&&Xb(e.prototype,r),n&&Xb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(QC);function aB(t){return(aB="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 sB=["modelId","defer"],uB=["timeout","modelId"];function cB(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 AB(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 lB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?AB(Object(r),!0).forEach((function(e){fB(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fB(t,e,r){return(e=yB(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hB(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function pB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */pB=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"==aB(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(aB(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 dB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gB(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,yB(n.key),n)}}function yB(t){var e=function(t,e){if("object"!=aB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aB(e)?e:String(e)}function vB(){return(vB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=mB(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 mB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=bB(t)););return t}function IB(t,e){return(IB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function EB(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=bB(t);if(e){var o=bB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return CB(this,r)}}function CB(t,e){if(e&&("object"===aB(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 bB(t){return(bB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var BB=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&&IB(t,e)}(s,t);var e,r,n,o,i,a=EB(s);function s(){var t;return dB(this,s),(t=a.apply(this,arguments)).state=t.stateCreator.create({intersectedLoading:Lm.FAIL,intersectedResult:void 0,intersectedVisible:!1}),t.$reducerState=t.reducerCreator.create(t.state),t._getParamModelIntersectedCallback=[],t.$actionRefreshIntersect=t.unitCreator.sync((function(t){t.latest(pB().mark((function t(){var e,r,n;return pB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:(n=this.state.state.intersectedResult)&&this.$actionAddIntersectedDataToSense.dispatch(n),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionLoadParamModelIntersectedData=t.unitCreator.async((function(e){e.started.every(pB().mark((function t(e,r){var n,o,i,a,s,u,c,A,l;return pB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,TC(e.modelId);case 2:return n=t.sent,o=zm(Ov),i=e.modelId,a=void 0===i?n.modelid:i,s=e.defer,u=hB(e,sB),c=p_().viewParamModel.state.state.currModelId===a,A=this.$actionLoadParamModelIntersectedData,t.prev=7,t.next=10,o.getIntersectedById(lB({modelId:a},u));case 10:if(l=t.sent,!c){t.next=14;break}return t.next=14,A.done.dispatch({params:e,result:{result:l,modelId:a}});case 14:s&&s.resolve(l),t.next=21;break;case 17:t.prev=17,t.t0=t.catch(7),this._getParamModelIntersectedCallback.forEach((function(e){e.reject(t.t0)}));case 21:case"end":return t.stop()}}),t,this,[[7,17]])}))),e.done.every((function(e,r){var n=e.params.defer,o=p_().viewParamModel.state.state.currModelId;n&&n.resolve(e.result.result),e.result.modelId===o&&t.$actionAddIntersectedDataToSense.dispatch(e.result.result)})),e.started.produce(t.$reducerState,(function(t,e){t.intersectedLoading=Lm.LOADING})),e.done.produce(t.$reducerState,(function(t,e){t.intersectedLoading=Lm.SUCCESS,t.intersectedResult=e.result.result})),e.failed.produce(t.$reducerState,(function(t,e){t.intersectedLoading=Lm.FAIL}))})),t.$actionAddIntersectedDataToSense=t.unitCreator.sync((function(e){e.every((function(e,r){var n=r.core,o=n.fittingDesign,i=n.pad,a=t.state.state.intersectedVisible,s=t.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),u=s.intersectedColor,c=s.intersectedBodyColor,A=s.intersectedThroughColor,l=s.grooveIntersectedColor,f=s.grooveIntersectedBodyColor;o.setIntersects([]);var h=e.option,p=void 0===h?{}:h,d=e.intersectedGroups,g=Object(Qr.map)(d,(function(t){var e=!0===p.references?1:0,r=t.intersecteds[e],n=r["@type"],o=t.intersectType;if(void 0!==p.plankFaceIds){var a=NE(r)||Object(Qr.isNil)(r.plankFaceId)?null:r.plankFaceId;if(!p.plankFaceIds.includes(a))return!1}var s=i.findModelOrAssemblyModelById(r.linkedModelId);if(s){var h=bs(t,r,s),d=new Map([[$.BOTH_PLANK,new Map([[X.FACE,u],[X.SHELL,c],[X.THROUGH_SHELL,A]])],[$.PLANK_FURNITURE,new Map([[X.FACE,l],[X.SHELL,f]])]]).get(o).get(n);return h.setViewColor(d),h}})).filter((function(t){return!!t}));o.setIntersects(g),a||r.kaf.invisibleManager.hide("scene3d",Wm,g.map((function(t){return t.id})))}))})),t.$actionToggleShowIntersected=t.unitCreator.sync((function(e){e.latest((function(t,e){var r=e.core.fittingDesign;t?e.kaf.invisibleManager.display("scene3d",Wm,r.getIntersects().map((function(t){return t.id}))):e.kaf.invisibleManager.hide("scene3d",Wm,r.getIntersects().map((function(t){return t.id})))})),e.produce(t.$reducerState,(function(t,e){t.intersectedVisible=e}))})),t.toggleShowIntersectGroupData=function(e){var r=t.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");t.$actionAddIntersectedDataToSense.dispatch(lB(lB({},r),{},{option:e}))},t}return e=s,(r=[{key:"init",value:function(){vB(bB(s.prototype),"init",this).call(this),this.$actionRefreshIntersect.dispatch()}},{key:"getParamModelIntersectedData",value:(o=pB().mark((function t(e){var r,n,o,i,a,s,u,c,A,l=this;return pB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p_().viewParamModel.state.state.currModelId,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r:a,u=hB(n,uB),c=RE(i),this.$actionLoadParamModelIntersectedData.started.dispatch(lB(lB({modelId:s},u),{},{defer:c,timeout:i})),this._getParamModelIntersectedCallback.push(c),A=function(){var t=l._getParamModelIntersectedCallback.indexOf(c);l._getParamModelIntersectedCallback.splice(t,1)},t.abrupt("return",c.promise.then((function(t){return A(),t})).catch((function(t){return A(),Promise.reject(t)})));case 7:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,n){var i=o.apply(t,e);function a(t){cB(i,r,n,a,s,"next",t)}function s(t){cB(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&gB(e.prototype,r),n&&gB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(QC);function wB(t){return(wB="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 PB(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 SB(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?PB(Object(r),!0).forEach((function(e){_B(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):PB(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _B(t,e,r){var n;return n=function(t,e){if("object"!=wB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=wB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==wB(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QB(t,e){var r=e.x,n=e.y,o=e.z;[0,5].includes(t)&&(r-=.1,n-=.1),[1,3].includes(t)&&(o-=.1,r-=.1),[2,4].includes(t)&&(o-=.1,n-=.1);var i=r/2,a=n/2,s=o/2,u=[{x:-i,y:-a,z:s},{x:i,y:-a,z:s},{x:i,y:a,z:s},{x:-i,y:a,z:s}],c=u.map((function(t){return SB(SB({},t),{},{z:-t.z})}));switch(t){case 0:return u;case 1:return[u[0],c[0],c[3],u[3]];case 2:return[u[0],c[0],c[1],u[1]];case 3:return[u[1],c[1],c[2],u[2]];case 4:return[u[2],c[2],c[3],u[3]];case 5:return c}return[]}function OB(t){return(OB="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 DB(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */DB=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"==OB(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(OB(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 xB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MB(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,RB(n.key),n)}}function RB(t){var e=function(t,e){if("object"!=OB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OB(e)?e:String(e)}function TB(){return(TB="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=LB(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 LB(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=FB(t)););return t}function jB(t,e){return(jB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kB(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=FB(t);if(e){var o=FB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return NB(this,r)}}function NB(t,e){if(e&&("object"===OB(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 FB(t){return(FB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var GB={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},UB=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&&jB(t,e)}(i,t);var e,r,n,o=kB(i);function i(){var t;return xB(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({option:{},defaultConfig:GB}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionRefreshPlankFaceHint=t.unitCreator.sync((function(t){t.latest(DB().mark((function t(){var e,r;return DB().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:this.rerenderToSense(),t.next=1;break;case 8:case"end":return t.stop()}}),t,this)})))})),t.$actionUpdateDefaultOption=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.defaultConfig=Object(Qr.extend)({},t.defaultConfig,e)}))})),t.$actionUpdateHintOption=t.unitCreator.sync((function(e){e.latest((function(){t.rerenderToSense()})),e.produce(t.$reducerState,(function(t,e){t.option=e}))})),t}return e=i,(r=[{key:"init",value:function(){TB(FB(i.prototype),"init",this).call(this),this.$actionRefreshPlankFaceHint.dispatch()}},{key:"setDefaultHintConfig",value:function(t){this.$actionUpdateDefaultOption.dispatch(t)}},{key:"setModelHint",value:function(t){var e=this,r=Object(Qr.mapValues)(t,(function(t){return function(t,e){var r={};return Object(Qr.isObject)(t.hintOutline)?r.hintOutline=t.hintOutline:!0===t.hintOutline&&(r.hintOutline=e.outline),t.hintPlankFace&&t.hintPlankFace.length&&(r.hintPlankFace=t.hintPlankFace.map((function(t){var r="color"in t?t:e.plankFace,n=r.color,o=r.opacity;return Object(Qr.isArray)(t.plankFaceId)?t.plankFaceId.map((function(t){return{color:n,opacity:o,plankFaceId:t}})):{plankFaceId:t.plankFaceId,color:n,opacity:o}})).flat()),r}(t,e.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(t){var e=t?Object(Qr.omit)(this.state.state.option,t):{};this.setModelHint(e)}},{key:"rerenderToSense",value:function(){var t=this.stateManager.core,e=t.fittingDesign,r=t.pad,n=this.state.state.option,o=Object(Qr.map)(n,(function(t,e){var n=r.findModelOrAssemblyModelById(e);if(n)return function(t,e){var r={linkModel:e};if(t.hintPlankFace&&t.hintPlankFace.length){var n=e.getSize();r.plankFaces=t.hintPlankFace.map((function(t){var e=qa(t.plankFaceId,Se.default).mul(.1),r=QB(t.plankFaceId,n).map((function(t){var r=new Se.default(t).add(e);return{x:r.x,y:r.y,z:r.z}}));return SB(SB({},t),{},{points:r})}))}if(t.hintOutline&&(r.hintOutline=t.hintOutline),r.plankFaces||r.hintOutline)return new $o(r)}(t,n)})).filter((function(t){return!!t}));e.setPlankFaceHintModels(o)}}])&&MB(e.prototype,r),n&&MB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function zB(t){return(zB="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 YB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HB(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,VB(n.key),n)}}function VB(t){var e=function(t,e){if("object"!=zB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zB(e)?e:String(e)}function qB(t,e){return(qB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function WB(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=JB(t);if(e){var o=JB(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return KB(this,r)}}function KB(t,e){if(e&&("object"===zB(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 JB(t){return(JB=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var XB=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&&qB(t,e)}(i,t);var e,r,n,o=WB(i);function i(){var t;return YB(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:he,holeOpacity:1,grooveOpacity:1,attachOrderRender:!0}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionSenseSetting=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){e.renderIgnoreCategory&&(e.renderIgnoreCategory=Object(Qr.castArray)(e.renderIgnoreCategory)),Object(Qr.extend)(t,e)}))})),t}return e=i,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&HB(e.prototype,r),n&&HB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function ZB(t){return(ZB="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 $B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tw(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,ew(n.key),n)}}function ew(t){var e=function(t,e){if("object"!=ZB(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZB(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ZB(e)?e:String(e)}function rw(t,e){return(rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nw(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=iw(t);if(e){var o=iw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ow(this,r)}}function ow(t,e){if(e&&("object"===ZB(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 iw(t){return(iw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var aw=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&&rw(t,e)}(i,t);var e,r,n,o=nw(i);function i(){var t;return $B(this,i),(t=o.apply(this,arguments)).fittingDesignSense=t.partialCreator.create(ub),t.intersected=t.partialCreator.create(BB),t.senseSetting=t.partialCreator.create(XB),t.fittingModel=t.partialCreator.create(Fb),t.plankFaceHint=t.partialCreator.create(UB),t.fittingHint=t.partialCreator.create(Cb),t.fittingViewer=t.partialCreator.create(iB),t}return e=i,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&tw(e.prototype,r),n&&tw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);function sw(t){return(sw="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 uw(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 cw(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){uw(i,n,o,a,s,"next",t)}function s(t){uw(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Aw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Aw=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"==sw(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(sw(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 lw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fw(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,hw(n.key),n)}}function hw(t){var e=function(t,e){if("object"!=sw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=sw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==sw(e)?e:String(e)}function pw(){return(pw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=dw(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 dw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mw(t)););return t}function gw(t,e){return(gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yw(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=mw(t);if(e){var o=mw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vw(this,r)}}function vw(t,e){if(e&&("object"===sw(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 mw(t){return(mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Iw(t){return function(t){if(Array.isArray(t))return Ew(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 Ew(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 Ew(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 Ew(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 Cw(t){var e=t.map((function(t){return t.subModels&&t.subModels.length?Cw(t.subModels):[]})).flat();return e.push.apply(e,Iw(t)),e}var bw=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&&gw(t,e)}(f,t);var e,r,n,o,i,a,s,u,c,A,l=yw(f);function f(){var t;return lw(this,f),(t=l.apply(this,arguments)).state=t.stateCreator.create({loading:Lm.FAIL,allSubModels:[],result:void 0,currModelId:""}),t.$reducerState=t.reducerCreator.create(t.state),t._startAutoSyncModelView=Object(Qr.once)((function(){zL(!0);var e=Object(Qr.debounce)((function(e){t._refreshCustomModel(e)}),500),r=function(r){var n=t.state.state.currModelId;r.some((function(t){return t.id===n}))&&e(n)};FL().on(r),GL().on(r),UL().on(r)})),t.$actionSetModelId=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.currModelId!==e&&(t.result=void 0,t.allSubModels=[]),t.currModelId=e}))})),t.$actionLoadParamModelJsonData=t.unitCreator.async((function(e){e.started.every(Aw().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 Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.defer,o=e.hasFitting,i=void 0!==o&&o,a=e.force,s=void 0!==a&&a,u=e.templateId,c=void 0===u?XE("getJsonConfig").defaultTemplateId:u,A=e.timeout,l=e.ignoreResetPosition,f=void 0===l?XE("getJsonConfig").ignoreResetPosition:l,h=this.state.state,p=h.currModelId,d=h.result,g=h.currTemplateId,r){t.next=4;break}throw new Error("not selected model!");case 4:if(y=r===p,v=g===c,m=this.$actionLoadParamModelJsonData,t.prev=7,I=y&&!s&&v?d:void 0,!i||I){t.next=13;break}return t.next=12,jL(r,c);case 12:I=t.sent;case 13:if(I){t.next=18;break}return BL.delete(r),t.next=17,kL(r,c,f,A);case 17:I=t.sent;case 18:if(I){t.next=20;break}throw new Error("输入json数据出现异常");case 20:return E=y&&!c?Cw(I.paramModel):this.state.state.allSubModels,y&&p_().scene.$actionToggleSelectModel.dispatch(!0),t.next=24,m.done.dispatch({params:e,result:{ossContent:I,allSubModels:E}});case 24:t.next=31;break;case 26:return t.prev=26,t.t0=t.catch(7),t.next=30,m.failed.dispatch({params:e});case 30:n&&n.reject(t.t0);case 31:case"end":return t.stop()}}),t,this,[[7,26]])}))),e.done.every((function(t){var e=t.params.defer;e&&e.resolve(t.result.ossContent)})),e.started.produce(t.$reducerState,(function(t,e){t.loading=Lm.LOADING})),e.done.produce(t.$reducerState,(function(t,e){var r=e.result,n=r.ossContent,o=r.allSubModels,i=e.params,a=i.templateId,s=i.modelId===t.currModelId;t.loading=Lm.SUCCESS,t.result=s?n:t.result,t.allSubModels=s?o:t.allSubModels,t.currTemplateId=a})),e.failed.produce(t.$reducerState,(function(t,e){t.loading=Lm.FAIL}))})),t}return e=f,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"init",value:function(){pw(mw(f.prototype),"init",this).call(this)}},{key:"_refreshCustomModel",value:(A=cw(Aw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p=this;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.state.state.currModelId===e){t.next=2;break}return t.abrupt("return");case 2:return r=this.getStateManager().core.design.getCustom(),n=r.getParamModels().filter((function(t){return!t.isAppendHardware})),o=r.getParamModelAssemblies(),t.next=7,LL(e);case 7:i=t.sent,a=new nE,i.context&&a.unSerialize(i.context),s=SE(i,a),u=s.paramModels,c=s.paramModelAssemblies;try{A=Object(Qr.keyBy)(u,(function(t){return t.id})),(l=xA(n,u,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModels(t)})),l.delete.forEach((function(t){return r.removeParamModel(t)})),l.update.forEach((function(t){return new wE(A[t.id]).generate(t)})),f=Object(Qr.keyBy)(c,(function(t){return t.id})),(h=xA(o,c,(function(t){return t.id}))).add.forEach((function(t){return r.addParamModelAssemblies(t)})),h.delete.forEach((function(t){return r.removeParamModelAssembly(t)})),h.update.forEach((function(t){return new pE(f[t.id]).generate(t)})),this.getAxr(vC).$actionAutoRefreshModel.dispatch()}catch(t){console.error("partial sync model view fail",t),r.setParamModels(u),r.setParamModelAssemblies(c)}this.getStateManager().core.pad.once($h.EVENT_PARAM_MODELS_CHANGED,(function(){p.getAxr(vC).$actionAutoRefreshModel.dispatch(),VI&&qI(VI)}));case 14:case"end":return t.stop()}}),t,this)}))),function(t){return A.apply(this,arguments)})},{key:"viewParamModelById",value:(c=cw(Aw().mark((function t(e){var r,n,o,i,a,s,u,c,A;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Qr.isArray)(e)?e[0]:e,this.$actionSetModelId.dispatchResolve(r),(n=p_().scene).cameraController.$actionInit.dispatch(),this.resetView(),(o=this.getAxr(aw).fittingDesignSense).initFittingDesign(),this.getAxr(aw).fittingViewer.initFittingViewer(),function(){var t=cw(Aw().mark((function t(){var e;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=RE(),o.$actionLoadFittingDesign.started.dispatch({defer:e,params:{modelid:r}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),t.next=14,this.getAxr(_I).getCurrentCustomData(r);case 14:return i=t.sent,a=new nE,i.context&&a.unSerialize(i.context),s=SE(i,a),(u=new je).addParamModels.apply(u,Iw(s.paramModels)),u.addParamModelAssemblies.apply(u,Iw(s.paramModelAssemblies)),t.next=23,this.getAxr(vC).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!i.context});case 23:if(t.prev=23,!p_().fittingDesign.senseSetting.getSenseSettings().attachOrderRender){t.next=30;break}return t.next=28,NL(r);case 28:(c=t.sent).length&&(A=c.reduce((function(t,e){return t[e.id]={opacity:.15,color:"#000000"},t}),{}),p_().scene.$actionSetCustomModelMaterial.dispatch(A));case 30:t.next=35;break;case 32:t.prev=32,t.t0=t.catch(23),console.error("组件提审模型获取失败",t.t0);case 35:case"end":return t.stop()}}),t,this,[[23,32]])}))),function(t){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=cw(Aw().mark((function t(){var e,r,n,o,i,a,s,u,c,A;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getStateManager().core.design.getCustom(),r=e.getParamModels().filter((function(t){return!t.isAppendHardware})),n=e.getParamModelAssemblies(),o=this.state.state.currModelId,(0!==r.length||0!==n.length)&&o){t.next=6;break}throw new Error("No custom model in the scene!");case 6:return e.clearAllParamModels(),t.next=9,LL(this.state.state.currModelId);case 9:return i=t.sent,a=new nE,i.context&&a.unSerialize(i.context),s=SE(i,a),e.addParamModels.apply(e,Iw(s.paramModels)),e.addParamModelAssemblies.apply(e,Iw(s.paramModelAssemblies)),u=this.getAxr(aw).fittingViewer,t.next=18,u.getFitting();case 18:return c=t.sent,t.next=21,u.getHardware();case 21:return A=t.sent,this.stateManager.core.pad.once($h.EVENT_PARAM_MODELS_CHANGED,(function(){c.map((function(t){return u.addFitting(t)})),A.map((function(t){return u.addHardware(t)}))})),t.next=26,this.getAxr(vC).$actionAddModelToSense.started.dispatchResolve({custom:e,needAttach:!i.context});case 26:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(s=cw(Aw().mark((function t(){var e,r;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=zm(cI.MiniAppSelectModelService),t.next=3,null==e?void 0:e.getSelected();case 3:if(!(null==(r=t.sent)?void 0:r.length)){t.next=9;break}return t.next=7,this.viewParamModelById(Object(Qr.map)(r,"id").filter((function(t){return!!t})));case 7:t.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"getParamModelJsonData",value:(a=cw(Aw().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.state.state,o=(n=e||{}).timeout,i=void 0===o?5e4:o,a=n.modelId,s=void 0===a?r.currModelId:a,u=n.force,c=void 0!==u&&u,A=n.templateId,l=n.ignoreResetPosition,c){t.next=14;break}return h=RE(),this.getAxr(aw).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:h,params:{modelid:s}}),t.prev=5,t.next=8,h.promise;case 8:f=t.sent,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(5),console.log(t.t0);case 14:return p=RE(i),this.$actionLoadParamModelJsonData.started.dispatch({defer:p,modelId:s,hasFitting:!!f,force:c,templateId:A,timeout:"number"==typeof i?i/1e3:void 0,ignoreResetPosition:l}),t.abrupt("return",p.promise);case 17:case"end":return t.stop()}}),t,this,[[5,11]])}))),function(t){return a.apply(this,arguments)})},{key:"validateModelStable",value:function(t){var e=this.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(e){for(var r=[e],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var o=r.shift();o.getType()===es.ParamModelType.PARAM_PRIMITIVE&&o.getLegal()?(n.total++,o.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(o.id))):r.push.apply(r,Iw(o.getChildNodes()))}return n}}},{key:"getTopModelList",value:(i=cw(Aw().mark((function t(e){var r;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=zm(Kv),t.next=3,r.getTopParamModels(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(o=cw(Aw().mark((function t(e){var r,n,o,i;return Aw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=Object(Qr.castArray)(e),n=zm(cI.MiniAppParamModelDataInfoService),o=[],i=r.length-1;case 4:if(!(i>=0)){t.next=10;break}return t.next=7,n.getParamModelPhotoById(r[i]).then((function(t){o.push(t)}));case 7:--i,t.next=4;break;case 10:return t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"resetView",value:function(){var t=this.getStateManager().core,e=t.design.getCustom();e.clearAllParamModels();var r=e.getParamModelAssemblies();r.length&&r.map((function(t){return e.removeParamModelAssembly(t)})),t.fittingDesign.setIntersects([]),t.fittingDesign.setPlankFaceHintModels([]),t.fittingDesign.setFittingHintModels([]),t.fittingDesign.setPlankOutlineHintModels([]),t.fittingDesign.setPlankAreaFaceHints([]),VI=void 0}}])&&fw(e.prototype,r),n&&fw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(Us.AXR);function Bw(t){return(Bw="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 ww(t){return function(t){if(Array.isArray(t))return Pw(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 Pw(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 Pw(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 Pw(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 Sw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Sw=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"==Bw(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(Bw(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 _w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qw(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,Ow(n.key),n)}}function Ow(t){var e=function(t,e){if("object"!=Bw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Bw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Bw(e)?e:String(e)}function Dw(){return(Dw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=xw(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 xw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lw(t)););return t}function Mw(t,e){return(Mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rw(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=Lw(t);if(e){var o=Lw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tw(this,r)}}function Tw(t,e){if(e&&("object"===Bw(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 Lw(t){return(Lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jw=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&&Mw(t,e)}(i,t);var e,r,n,o=Rw(i);function i(){var t;return _w(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({show:!1,message:"模型数据更新提示",description:"设计方案中的模型数据已更新,建议完成模型数据更新后继续操作",defaultPosition:{x:(window.innerWidth-360-12)/window.innerWidth,y:12/window.innerHeight}}),t.$reducerState=t.reducerCreator.create(t.state),t._detectionResultMap=new Map,t._prevDetectResult=void 0,t.$actionInit=t.unitCreator.sync((function(t){t.latest(Sw().mark((function t(e,r){var n,o,i,a;return Sw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(bw);case 1:return o=n.$actionSetModelId.messageType(),t.next=5,Object(QI.take)([o]);case 5:i=t.sent,a=i.payload,this._detectionResultMap.clear(),this._prevDetectResult=void 0,this.$actionMergeState.dispatch({show:!1}),HL(a),t.next=1;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.debEmitDetectResult=Object(Qr.debounce)((function(t){return Sr.emit(Br.DETECT_RESULT_CHANGE,t)}),100),t.getDetectResult=function(t){return ww(t.values()).every((function(t){return t}))},t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.enableDetectionOnce=Object(Qr.once)((function(){t.toggleDetection(!0)})),t.setDetectionUIOnce=Object(Qr.once)((function(e){var r=Object(Qr.cloneDeep)(e),n=r.defaultPosition;n&&(r.defaultPosition={x:n.x/window.innerWidth,y:n.y/window.innerHeight}),t.$actionMergeState.dispatch(r)})),t}return e=i,(r=[{key:"module",value:function(){return"Detection"}},{key:"init",value:function(){Dw(Lw(i.prototype),"init",this).call(this),this.$actionInit.dispatch(),this.initialization()}},{key:"initialization",value:function(){var t=this;YL().on((function(e){var r=e.productId,n=e.detectRuleItem,o=e.result;if(t.getAxr(bw).state.state.currModelId===r){t._detectionResultMap.set(n,o);var i=t.getDetectResult(t._detectionResultMap);i!==t._prevDetectResult&&(t.debEmitDetectResult({productId:r,result:i}),t._prevDetectResult=i),i?t.$actionMergeState.dispatch({show:!1}):t.$actionMergeState.dispatch({show:!0})}}))}},{key:"toggleDetection",value:function(t){VL(t)}}])&&Qw(e.prototype,r),n&&Qw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);function kw(t,e){for(var r=t.toFixed(e).split("."),n=r[1];"0"===n.charAt(n.length-1);)n=n.slice(0,n.length-1);return n?r[0]+"."+n:r[0]}function Nw(t){var e=new c.BBox3d;return t.forEach((function(t){e.addPoint(t.clone())})),new be.default(new Se.default({x:e.width,y:e.height,z:e.depth}),new Se.default(e.center),new Se.default({x:0,y:0,z:0}))}function Fw(t){return(Fw="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 Gw(t,e,r){var n;return n=function(t,e){if("object"!=Fw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==Fw(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uw(t){return(Uw="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 zw(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,Hw(n.key),n)}}function Yw(t,e,r){return e&&zw(t.prototype,e),r&&zw(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hw(t){var e=function(t,e){if("object"!=Uw(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uw(e)?e:String(e)}var Vw=Yw((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.start=e,this.end=r,this.getMainLine=function(){var t=n.start.point,e=n.end.point;return new Ai.a(t.clone(),e.clone())},this.getCapLines=function(t){var e=n.start,r=e.point,o=e.face,i=e.element,a=n.end.point,s=n.getLineDirection,u=o.getNormal().clone(),c=r.clone(),A=a.clone(),l=s(),f=new Se.default,h=HE(i).getConcatenatedMatrix(),p=ns.a.decompose(h).euler,d=(new Pe.default).setFromEuler(p).invert();if(l===ve.Z)f=GE(new Se.default(0,t,0).applyQuaternion(d),u);else if(l===ve.Y){f=GE(new Se.default(t,0,0).applyQuaternion(d),u)}else{f=GE(new Se.default(0,0,t).applyQuaternion(d),u)}var g=f.clone().normalize().mul(t),y=f.clone().negate().normalize().mul(t);return[new Ai.a(new Se.default(c.x,c.y,c.z).add(g),new Se.default(c.x,c.y,c.z).add(y)),new Ai.a(new Se.default(A.x,A.y,A.z).add(g),new Se.default(A.x,A.y,A.z).add(y))]},this.getLineDirection=function(){var t=n.start,e=t.point,r=t.element,o=n.end.point,i=e.clone(),a=o.clone().clone().sub(i.clone()),s=HE(r).getConcatenatedMatrix(),u=ns.a.decompose(s).euler,c=(new Pe.default).setFromEuler(u);a.applyQuaternion(c);var A,l=(A=a,new Se.default(Math.abs(A.x),Math.abs(A.y),Math.abs(A.z))).normalize(),f=l.x,h=l.y,p=l.z,d=Math.max(f,h,p);return d===f?ve.X:d===h?ve.Y:ve.Z}}));function qw(t){return function(t){if(Array.isArray(t))return Jw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Kw(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 Ww(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)||Kw(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 Kw(t,e){if(t){if("string"==typeof t)return Jw(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)?Jw(t,e):void 0}}function Jw(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 Xw=new Map([[ve.X,{indexArray:[7,6],offsetNormal:new Se.default(0,0,1),lineColor:"#FF5533",lineOpacity:1,textStyle:{color:"#FF5533",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[ve.Y,{indexArray:[7,4],offsetNormal:new Se.default(-1,0,0),lineColor:"#16D9A8",lineOpacity:1,textStyle:{color:"#16D9A8",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}],[ve.Z,{indexArray:[0,4],offsetNormal:new Se.default(0,-1,0),lineColor:"#338BFF",lineOpacity:1,textStyle:{color:"#338BFF",fontWeight:"700",fontSize:"14px",textShadow:"#fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px"}}]]),Zw=new Map([[ve.X,.5],[ve.Y,.7],[ve.Z,.3]]);function $w(t,e){var r=Xw.get(e);if(!r)throw new Error("unknown direction");var n=function(t){if(0!==t.length){var e=t[0].getMatrix(),r=(new we.default).getInverse(e),n=new os.default,o=ns.a.decompose(e).rotation;return t.forEach((function(t){n.includePoints(t.getPoints().map((function(t){return t.clone().applyMatrix4(r)})))})),new be.default(n.getSize().clone(),n.getCenter().clone().applyMatrix4(e),o)}}(t.map((function(t){return t.getConcatenatedBox3()})));if(!n)throw new Error("mergedBox not exist");var o=n.getPoints(),i=n.getRotation(),a=Ww(r.indexArray,2),s=a[0],u=a[1],c=r.offsetNormal,A=r.lineColor,l=r.lineOpacity,f=r.textStyle,h=c.clone().applyQuaternion((new Pe.default).setFromEuler(new Be.default(i.x,i.y,i.z))).normalize(),p=h.clone().mul(30),d=o[s].add(p),g=o[u].add(p),y=new Ai.a(d,g),v=h.clone().mul(20),m=v.clone().negate();return{mainLine:y,capLines:[new Ai.a(d.clone().add(v),d.clone().add(m)),new Ai.a(g.clone().add(v),g.clone().add(m))],lineStyle:{color:A,opacity:l},textStyle:f}}function tP(t){var e=new Map(t.map((function(t){return[t.getConcatenatedBox3(),t]}))),r=new Map(qw(e.keys()).map((function(t){return Object.values(function(t){var e=t.getPoints();function r(t,r,n){var o=e[t].clone(),i=Se.default.sub(e[r],o),a=Se.default.sub(e[n],o);return new Im.default(o,i,a)}return{faces:Gw(Gw(Gw(Gw(Gw(Gw({},Ie.Bottom,r(3,2,0)),Ie.Front,r(0,1,4)),Ie.Left,r(3,0,7)),Ie.Right,r(1,2,5)),Ie.Back,r(2,3,6)),Ie.Top,r(4,5,7))}}(t).faces).map((function(e){return[e,t]}))})).flat(1)),n=qw(r.keys()).reduce((function(t,e){var r=e.getNormal().clone(),n=qw(t.keys()).find((function(t){return Se.default.isParallel(t,r,.01)}));return n?t.get(n).push(e):t.set(r,[e]),t}),new Map);n.forEach((function(t,e){var n=t.map((function(t){return{face:t,faceOrder:Se.default.dot2(t.getCenter(),e),boxOrder:Se.default.dot2(r.get(t).getPosition(),e)}}));n.sort((function(t,e){return t.faceOrder-e.faceOrder}));var o=[];n.forEach((function(t){var e=o[o.length-1]||[],r=e[0];if(r&&c.Num.isEqual(r.faceOrder,t.faceOrder,.01))return void e.push(t);o.push([t])})),o.forEach((function(t){t.length>1&&t.sort((function(t,e){return t.boxOrder-e.boxOrder}))}));var i=new Map(o.flat(1).map((function(t,e){return[t.face,e]})));t.sort((function(t,e){return i.get(t)-i.get(e)}))}));var o=new Map;n.forEach((function(t,e){t.forEach((function(t,r,n){for(var i=t.getNormal().clone(),a=t.getCenter().clone(),s=new mm.a(a,i),u=Se.default.dot2(i,e)>0;;){u?r++:r--;var c=n[r];if(!c)break;var A=c.intersectRay(s,!1);if(A){if(Se.default.dot2(i,c.getNormal())>0)break;var l={facePair:[t,c],line:new Ai.a(a,A)};o.has(e)?o.get(e).push(l):o.set(e,[l]);break}}}))}));var i=qw(o.values()).map((function(t){return e=t,r=Object(Qr.groupBy)(e,(function(t){return t.facePair.map((function(t){return t.toString()})).slice().sort().join("-")})),Object.entries(r).map((function(t){var e=Ww(t,2),r=(e[0],e[1]);return r.sort((function(t,e){return Se.default.cross2(t.facePair[0].directionU.clone(),t.facePair[0].directionV.clone()).length()-Se.default.cross2(e.facePair[0].directionU.clone(),e.facePair[0].directionV.clone()).length()})),r[0]}));var e,r})).flat(1).filter((function(t){return t.line.length()>.4})).map((function(t){return new Vw({point:t.line.start,face:t.facePair[0],box:r.get(t.facePair[0]),element:e.get(r.get(t.facePair[0]))},{point:t.line.end,face:t.facePair[1],box:r.get(t.facePair[1]),element:e.get(r.get(t.facePair[1]))})})),a=Object(Qr.groupBy)(i,(function(t){return t.getLineDirection()})),s=new Map;return Object.entries(a).forEach((function(t){var e=Ww(t,2),r=e[0],n=e[1],o=Xw.get(r);s.set(r,{lineStyle:{color:o.lineColor,opacity:o.lineOpacity},textStyle:o.textStyle,lines:n.map((function(t){return{mainLine:t.getMainLine(),capLines:t.getCapLines(20)}}))})})),s}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 rP(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)||oP(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 nP(t){return function(t){if(Array.isArray(t))return iP(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||oP(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 oP(t,e){if(t){if("string"==typeof t)return iP(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)?iP(t,e):void 0}}function iP(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 aP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */aP=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 sP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uP(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,cP(n.key),n)}}function cP(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)}function AP(t,e){return(AP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lP(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=hP(t);if(e){var o=hP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fP(this,r)}}function fP(t,e){if(e&&("object"===eP(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 hP(t){return(hP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pP=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=lP(i);function i(){var t;return sP(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create({dimensionRulers:new Map,spacingDistanceRulers:new Map}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionInit=t.unitCreator.sync((function(t){t.latest(aP().mark((function t(e,r){var n,o;return aP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.getAxr(vC);case 1:return o=n.$actionAddModelToSense.started.messageType(),t.next=5,Object(QI.take)([o]);case 5:this.$actionSetDimensionRulers.dispatch(new Map),this.$actionSetSpacingDistanceRulers.dispatch(new Map),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionRefreshRulerLines=t.unitCreator.sync((function(t){t.latest(aP().mark((function t(){var e,r;return aP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.getAxr(vC);case 1:return r=e.$actionAutoRefreshModel.messageType(),t.next=5,Object(QI.take)([r]);case 5:this.refreshDimensionRulers(),this.refreshSpacingDistanceRulers(),t.next=1;break;case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionSetDimensionRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.dimensionRulers=e}))})),t.$actionSetSpacingDistanceRulers=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){t.spacingDistanceRulers=e}))})),t.refreshDimensionRulers=function(){var e=t.state.state.dimensionRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeDimensionRulerConfig(i,a);r.set(n,{originData:o,rulerConfig:s})})),t.$actionSetDimensionRulers.dispatch(r)},t}return e=i,(r=[{key:"module",value:function(){return"RulerLine"}},{key:"init",value:function(){this.$actionInit.dispatch(),this.$actionRefreshRulerLines.dispatch()}},{key:"refreshSpacingDistanceRulers",value:function(){var t=this,e=this.state.state.spacingDistanceRulers,r=new Map;e.forEach((function(e,n){var o=e.originData,i=o.param,a=o.option,s=t._computeSpacingDistanceRulers(i,a);r.set(n,{originData:o,rulerConfigs:s})})),this.$actionSetSpacingDistanceRulers.dispatch(r)}},{key:"_computeDimensionRulerConfig",value:function(t,e){var r,n,o,i,a,s=this,u=t.modelIds,c=t.direction;if(0===u.length)throw new Error("modelIds parameter array length must be greater than 0");var A=u.map((function(t){return s.stateManager.core.pad.findModelOrAssemblyModelById(t)})),l=A.filter((function(t){return!t}));if(l.length>0)throw new Error("model: ".concat(l.join(",")," not exist"));var f=$w(A,c),h=f.mainLine,p=f.capLines,d=f.lineStyle,g=f.textStyle;return{mainLine:h,capLines:p,text:kw(h.length(),1),textPosition:h.getCenter(),lineStyle:{color:null!==(n=null===(r=null==e?void 0:e.lineStyle)||void 0===r?void 0:r.color)&&void 0!==n?n:d.color,opacity:null!==(i=null===(o=null==e?void 0:e.lineStyle)||void 0===o?void 0:o.opacity)&&void 0!==i?i:d.opacity},textStyle:null!==(a=null==e?void 0:e.textStyle)&&void 0!==a?a:g}}},{key:"_computeSpacingDistanceRulers",value:function(t,e){var r=t.modelFilter,n=this.stateManager.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),a=PE.ParamModelUtils.flattenModels(o,{getAccessories:function(t){return t.getChildNodes().filter((function(t){return t.getLegal()}))}}),s=[].concat(nP(a),nP(i));return nP(tP(s.filter((function(t){return r({id:(e=t).id,prodCatId:e.getCategory().categoryId});var e}))).entries()).map((function(t){var e=rP(t,2),r=e[0],n=e[1],o=n.lineStyle,i=n.lines,a=n.textStyle;return i.map((function(t){var e=t.mainLine;return{mainLine:e,capLines:t.capLines,lineStyle:o,textStyle:a,text:kw(e.length(),1),textPosition:new Se.default(new c.LineSeg3d(c.Point3d.fromObject(e.start),c.Point3d.fromObject(e.end)).getPoint(e.length()*Zw.get(r)))}}))})).flat()}},{key:"addDimensionRuler",value:function(t,e){var r=this._computeDimensionRulerConfig(t),n=Object(Jr.default)(),o=new Map(this.state.state.dimensionRulers).set(n,{originData:{param:t,option:e},rulerConfig:r});return this.$actionSetDimensionRulers.dispatch(o),n}},{key:"removeDimensionRuler",value:function(t){if(t){var e=new Map(this.state.state.dimensionRulers);e.delete(t),this.$actionSetDimensionRulers.dispatch(e)}else this.$actionSetDimensionRulers.dispatch(new Map)}},{key:"addSpacingDistanceRuler",value:function(t,e){var r=this._computeSpacingDistanceRulers(t,e),n=Object(Jr.default)(),o=new Map(this.state.state.spacingDistanceRulers).set(n,{originData:{param:t,option:e},rulerConfigs:r});return this.$actionSetSpacingDistanceRulers.dispatch(o),n}},{key:"removeSpacingDistanceRuler",value:function(t){if(t){var e=new Map(this.state.state.spacingDistanceRulers);e.delete(t),this.$actionSetSpacingDistanceRulers.dispatch(e)}else this.$actionSetSpacingDistanceRulers.dispatch(new Map)}}])&&uP(e.prototype,r),n&&uP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR),dP=r(761),gP=r.n(dP);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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mP(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,IP(n.key),n)}}function IP(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)}function EP(t,e){return(EP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function CP(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=BP(t);if(e){var o=BP(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bP(this,r)}}function bP(t,e){if(e&&("object"===yP(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 BP(t){return(BP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var wP=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&&EP(t,e)}(i,t);var e,r,n,o=CP(i);function i(){var t;return vP(this,i),(t=o.apply(this,arguments)).bzProperties=new Map,t}return e=i,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(t){this.__trackUpdateField({type:Y.ATTRIBUTE,attr:"isHidden"},this.isHidden,t),this.isHidden=t}}])&&mP(e.prototype,r),n&&mP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Tt);function PP(t){return(PP="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 SP(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 _P(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?SP(Object(r),!0).forEach((function(e){QP(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function QP(t,e,r){var n;return n=function(t,e){if("object"!=PP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=PP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==PP(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var OP={x:0,y:0,z:0},DP={x:0,y:0,z:0};function xP(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,o=e.category,i=e.origin,a=new wP,s=!(t instanceof dr)||t.isRoot(),u=n||s?t:t.getRoot(),c=u instanceof dr;a.id=u.id,a.isRoot=!c||u.isRoot(),a.isHidden=!!u.getInvisible(),a.name=u.getName();var A=W.ASSEMBLY;if(c?A=W.COMMON:t.isTemplateAssembly()&&(A=W.TEMPLATE_ASSEMBLY),a.modelType=A,a.position=a.isRoot?OP:u.getPosition(),a.rotation=a.isRoot?DP:u.getRotation(),a.size="function"==typeof u.getScaledSize?u.getScaledSize():u.getSize(),a.params=RP(u),a.category=o||u.getCategory().categoryId,c){var l=u.getModel();a.productId=null==l?void 0:l.obsBrandGoodId}return n&&(a.root=n),a.isRoot&&(a._origin=i),a.children=(c?u.getChildren():u.getParamModels()).map((function(t){return xP(t,e,r,n||a)})),a.accessories=(c?u.getAccessories():[]).map((function(t){return xP(t,e,r,n||a)})),r.set(a.id,a),u!==t&&r.has(t.id)?r.get(t.id):a}function MP(t,e){var r=t.isRoot?t:t.root;if(!r)return{};var n=r._changeMap,o=e.getUnSafeParamModelFromParamModelLite(r);if(!o)return{};var i=o.getCustom(),a=n.cloned;return a&&(o=o.clone(!1)),o=function t(e,r,n,o){var i=e._changeMap;if(i.cloned&&i.deleted)return;if(i.deleted)return n.dispose(),n;var a=i.update,s=void 0===a?[]:a,u=i.addNodes,c=void 0===u?[]:u,A=o?_P({},o):{parentModelLite:e,parentModel:n,rootModelLite:e,rootModel:n};s.forEach((function(t){if(t.type===Y.ATTRIBUTE)switch(t.attr){case"position":n.setPosition(e.getPosition());break;case"rotate":n.setRotation(e.getRotation());break;case"isHidden":n.setInvisible(e.getHidden()),function(t){var e=t.getInvisible();p_().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===t.id&&r.setVisible(!e)}))}(n)}if(t.type===Y.STORE){var o=n.getParamStore().getParam(t.attr),i=e.getParam(t.attr);if(o&&i){var a=i.getValue();[es.ParamType.MATERIAL,es.ParamType.SHAPE].includes(o.getType())&&(a=r.getUnSafeObsBrandGoodToBrandGoodId(a)),a&&o.setValue(a),i.getPrimitiveOverride()!==o.getPrimitiveOverride()&&o.setPrimitiveOverride(i.getPrimitiveOverride())}}})),c.forEach((function(o){var i=o.type,a=o.linkId,s=(i===q.CHILD?e.getChild():e.getAccessory()).find((function(t){return t.id===a}));if(s){var u=r.getUnSafeParamModelFromParamModelLite(s);u&&((s._changeMap.cloned||s._origin!==G.SENSE)&&(u=u.clone(!1)),i===q.CHILD?(u.setIsAppend(!0),u.setAppendType(gP.a.CENTER),n.addChild(u)):n.addAccessory(u),t(s,r,u,_P(_P({},A),{},{parentModel:n,parentModelLite:e})),(s._changeMap.cloned||s._origin!==G.SENSE)&&u.assignUniqueId())}}));var l=function(o){return function(i){if(!c.some((function(t){return t.type===o&&t.linkId===i.id}))){var a=n instanceof _e.CoreParamModelAssembly?n.getParamModels():o===q.ACCESSORY?n.getAccessories():n.getChildren(),s=i._changeMap.originId||i.id,u=a.find((function(t){return t.id===s}));u&&t(i,r,u,_P(_P({},A),{},{parentModel:n,parentModelLite:e}))}}};return e.getChild().forEach(l(q.CHILD)),e.getAccessory().forEach(l(q.ACCESSORY)),n}(r,e,o),a&&o&&o.assignUniqueId(),{create:a,custom:i,model:o}}function RP(t){var e=new Map;return t.getParamStore().forEach((function(t,r){e.set(r,function(t){var e=new Ot;if(e.data={type:t.getType(),displayName:t.getDisplayName(),name:t.getName(),value:t.getValue(),max:t.getMax(),min:t.getMin(),editable:t.getEditable()||t.getOverridable(),optionValues:t.getOptionValues().map((function(t){return{name:t.name,value:t.value}})),recommendValues:t.getRecommendValues().map((function(t){return{name:t.name,value:t.value}})),primitiveOverride:t.getPrimitiveOverride(),step:t.getStep()},[k.MATERIAL,k.SHAPE].includes(e.getType())){var r=t.getProduct();e.data.value=r?r.obsBrandGoodId:""}return e}(t))})),e}var TP=r(272),LP=r.n(TP);function jP(t){return(jP="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 kP(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 NP(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?kP(Object(r),!0).forEach((function(e){FP(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kP(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function FP(t,e,r){var n;return n=function(t,e){if("object"!=jP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==jP(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */GP=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"==jP(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(jP(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 UP(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 zP(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){UP(i,n,o,a,s,"next",t)}function s(t){UP(i,n,o,a,s,"throw",t)}a(void 0)}))}}LP()(function(){var t=zP(GP().mark((function t(e){var r,n;return GP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=rd(),t.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:e});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),NP({promise:!0},Hm));function YP(){return(YP=zP(GP().mark((function t(e){var r,n,o,i,a;return GP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,rd().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function HP(){return(HP=zP(GP().mark((function t(e){var r,n,o,i,a;return GP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,rd().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:e});case 2:if(r=t.sent,n=r.data,o=n.c,i=n.m,a=n.d,"0"!==o){t.next=11;break}return t.abrupt("return",a);case 11:throw new Error(o+i);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var VP=LP()((function(t){return YP.apply(this,arguments)}),NP(NP({},Hm),{},{promise:!0})),qP=LP()((function(t){return HP.apply(this,arguments)}),NP(NP({},Hm),{},{promise:!0}));function WP(t){return(WP="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 KP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */KP=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"==WP(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(WP(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 JP(t){return function(t){if(Array.isArray(t))return XP(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 XP(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 XP(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 XP(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 ZP(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 $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,tS(n.key),n)}}function tS(t){var e=function(t,e){if("object"!=WP(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WP(e)?e:String(e)}var eS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cached=new Map}var e,r,n,o,i;return e=t,(r=[{key:"setProduct",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(e);r||(r=new Map,this.cached.set(e,r)),r.set(t.brandGoodId,t.obsBrandGoodId),r.set(t.obsBrandGoodId,t.brandGoodId)}},{key:"getToggledBrandGood",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(e=this.cached.get(r))||void 0===e?void 0:e.get(t)}},{key:"removeCachedModel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(t)}},{key:"safeGetToggleBrandGood",value:(o=KP().mark((function t(e){var r,n,o,i,a,s,u=this,c=arguments;return KP().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(Qr.castArray)(e),o=[],i=[],a=new Map,n.forEach((function(t){var e=u.getToggledBrandGood(t,r);e?a.set(t,e):/^[0-9]$/.test(t.toString())?i.push(t):o.push(t)})),s=function(t){return[].concat(JP(t.hardwares||[]),JP(t.textures||[]),JP(t.virtualModels||[]),JP(t.paramModelProducts||[]),JP(t.moldings||[]))},!o.length){t.next=12;break}return t.next=10,VP(o).then(s);case 10:t.sent.forEach((function(t){u.setProduct(t,r)}));case 12:if(!i.length){t.next=17;break}return t.next=15,qP(i).then(s);case 15:t.sent.forEach((function(t){u.setProduct(t,r)}));case 17:return[].concat(o,i).forEach((function(t){var e=u.getToggledBrandGood(t,r);e&&a.set(t,e)})),t.abrupt("return",a);case 19: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){ZP(i,r,n,a,s,"next",t)}function s(t){ZP(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&$P(e.prototype,r),n&&$P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function rS(t){return(rS="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 nS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */nS=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"==rS(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(rS(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 oS(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 iS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){oS(i,n,o,a,s,"next",t)}function s(t){oS(i,n,o,a,s,"throw",t)}a(void 0)}))}}function aS(t){return function(t){if(Array.isArray(t))return sS(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 sS(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 sS(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 sS(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 uS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cS(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,AS(n.key),n)}}function AS(t){var e=function(t,e){if("object"!=rS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rS(e)?e:String(e)}var lS,fS=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new eS;uS(this,t),this.callback=e,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var e,r,n,o;return e=t,(r=[{key:"getParamModelFromId",value:function(t){if(this.cached.has(t))return this.cached.get(t);var e=this.callback(t);return e?(this.cached.set(t,e),e):void 0}},{key:"getUnSafeParamModel",value:function(t){return this.cached.get(t)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(t){return this.brandGoodsTranslate.getToggledBrandGood(t)}},{key:"addParamModelLite",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];(t=this.models).push.apply(t,aS(r.map((function(t){return t.root||t}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(t){var e,r=t.root||t;switch(t._origin||r._origin){case G.BRANDGOOD:case G.CATEGORY:break;case G.SENSE:var n=r._changeMap.originId||r.id;e=this.getUnSafeParamModel(n)}if(!e||r===t)return e;for(var o,i=t._changeMap.originId||t.id,a=[e];o=a.pop();){if(o.id===i)return o;a.push.apply(a,aS(o.getChildNodes()))}}},{key:"attach",value:(o=iS(nS().mark((function t(){var e,r,n,o,i,a,s,u,c=this;return nS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(o=e.pop())){t.next=18;break}a=(i=o)._changeMap,s=i._origin,t.t0=s,t.next=t.t0===G.SENSE?8:t.t0===G.CATEGORY||t.t0===G.BRANDGOOD||t.t0===G.TEMPLATE_ID?11:12;break;case 8:return u=a.originId||o.id,r.modelIds.push(u),t.abrupt("break",12);case 11:return t.abrupt("break",12);case 12:if(!a.deleted){t.next=14;break}return t.abrupt("continue",3);case 14:a.update&&a.update.forEach((function(t){if(o&&t.type===Y.STORE&&o.hasParam(t.attr)){var e=o.getParam(t.attr);e&&[k.MATERIAL,k.SHAPE].includes(e.getType())&&e.getValue()&&n.push(e.getValue())}})),e.push.apply(e,aS(o.getChild()).concat(aS(o.getAccessory()))),t.next=3;break;case 18:return t.next=20,Promise.allSettled(aS(Object(Qr.uniq)(r.modelIds).map(function(){var t=iS(nS().mark((function t(e){return nS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",c.getParamModelFromId(e));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 20:return t.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}])&&cS(e.prototype,r),n&&cS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function hS(t){lS=t}var pS=r(768);function dS(t){return(dS="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 gS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */gS=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"==dS(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(dS(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 yS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vS(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,mS(n.key),n)}}function mS(t){var e=function(t,e){if("object"!=dS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dS(e)?e:String(e)}function IS(){return(IS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=ES(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 ES(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wS(t)););return t}function CS(t,e){return(CS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bS(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=wS(t);if(e){var o=wS(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return BS(this,r)}}function BS(t,e){if(e&&("object"===dS(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 wS(t){return(wS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var PS=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&&CS(t,e)}(i,t);var e,r,n,o=bS(i);function i(){var t;return yS(this,i),(t=o.apply(this,arguments)).$actionInit=t.unitCreator.sync((function(t){t.latest(gS().mark((function t(e,r){var n;return gS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getAxr(vC),t.next=3,Object(QI.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==jm.SUCCESS){t.next=13;break}return t.next=6,Object(QI.put)(this.$actionSetCamera.message(!0));case 6:return t.next=9,Object(QI.take)(this.$actionSyncCamera.messageType());case 9:return t.next=11,Object(QI.put)(this.$actionSetCamera.message(!1));case 11:t.next=6;break;case 13:case"end":return t.stop()}}),t,this)})))})),t.$actionSyncCamera=t.unitCreator.sync((function(t){})),t.$actionSetCamera=t.unitCreator.sync((function(t){t.latest(gS().mark((function t(e,r){var n,o,i,a,s,u;return gS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.core.design.getCustom(),o=n.getParamModels(),i=n.getParamModelAssemblies(),(a=r.scene3D).updateEnableCameraAnimation(!1),s=o.length?Object(pS.computeAssemblyBox)(o.map((function(t){return t.getBox3()})),o[0].getMatrix4()):Object(pS.computeAssemblyBox)(i.map((function(t){return t.getBox3()})),i[0].getMatrix4()),u=DE(s),a.updateInitCameraAttributes(u),a.updateScaleFactorRange(.5,4),e?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 10:case"end":return t.stop()}}),t)})))})),t}return e=i,(r=[{key:"init",value:function(){IS(wS(i.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&vS(e.prototype,r),n&&vS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(QC);function SS(t){return(SS="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 _S(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=OS(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 QS(t){return function(t){if(Array.isArray(t))return DS(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||OS(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 OS(t,e){if(t){if("string"==typeof t)return DS(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)?DS(t,e):void 0}}function DS(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 xS(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 MS(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){xS(i,n,o,a,s,"next",t)}function s(t){xS(i,n,o,a,s,"throw",t)}a(void 0)}))}}function RS(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 TS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?RS(Object(r),!0).forEach((function(e){HS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):RS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function LS(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */LS=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"==SS(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(SS(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 jS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kS(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,VS(n.key),n)}}function NS(){return(NS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=FS(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 FS(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=YS(t)););return t}function GS(t,e){return(GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function US(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=YS(t);if(e){var o=YS(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"===SS(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 YS(t){return(YS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function HS(t,e,r){return(e=VS(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VS(t){var e=function(t,e){if("object"!=SS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=SS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==SS(e)?e:String(e)}var qS=HS(HS(HS(HS(HS(HS(HS(HS(HS(HS({},me.HOLE,4),me.GROOVE,1),me.HARDWARE_GROOVE,2),me.HARDWARE,3),me.PARAM_MODEL,0),me.HOLE_V2,5),me.SQUARE_GROOVE,5),me.ROUND_CORNER_GROOVE,5),me.SPECIAL_SHAPED_GROOVE,5),me.PATH_GROOVE,5),WS=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&&GS(t,e)}(l,t);var e,r,n,o,i,a,s,u,A=US(l);function l(){var t;return jS(this,l),(t=A.apply(this,arguments)).cameraController=t.partialCreator.create(PS),t.state=t.stateCreator.create({renderMode:nr.RenderMode.SHADING,selectable:!0,overrideMaterialOption:{},interactionPriority:qS,customModelMaterial:{}}),t.$reducerState=t.reducerCreator.create(t.state),t.$actionMergeState=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){Object.assign(t,e)}))})),t.$actionToggleRenderMode=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e,r){var n,o,i;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=nr.RenderMode.SHADING,o=nA.Unset,t.t0=e.mode,t.next=t.t0===Um.SHADING?5:t.t0===Um.OUTLINE_WITH_SHADING?7:t.t0===Um.TRANSLUCENT?9:t.t0===Um.OUTLINE_AND_TRANSLUCENT?11:t.t0===Um.FULLY_TRANSPARENT?14:17;break;case 5:return n=nr.RenderMode.SHADING,t.abrupt("break",17);case 7:return n=nr.RenderMode.OUTLINE_WITH_SHADING,t.abrupt("break",17);case 9:return o=nA.Translucent,t.abrupt("break",17);case 11:return n=nr.RenderMode.OUTLINE_WITH_SHADING,o=nA.Translucent,t.abrupt("break",17);case 14:return n=nr.RenderMode.OUTLINE_WITH_SHADING,o=nA.Transparent,t.abrupt("break",17);case 17:return t.next=19,Object(QI.put)(this.$actionMergeState.message({renderMode:n}));case 19:i=[nr.RenderMode.OUTLINE_WITH_SHADING,nr.RenderMode.TRANSPARENT_LINE].includes(n),fL().viewer.toggleShowModelOutline(i),fL().viewer.togglePlankOutline(!1),i&&this.enableHardwaresOutline(),fL().viewer.updateTransparentMode(o),r.scene3D.updateRenderMode(n),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 27:case"end":return t.stop()}}),t,this)})))})),t.$whiteMode=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e,r){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.scene3D.updateRenderMode(e?nr.RenderMode.OUTLINE_ONLY:nr.RenderMode.SHADING),fL().viewer.togglePlankOutline(e),e?this.disableHardwaresOutline():this.enableHardwaresOutline(),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 5:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderBorder=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e,r){var n;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e&&this.enableHardwaresOutline(),n=e?nr.RenderMode.OUTLINE_WITH_SHADING:nr.RenderMode.SHADING,t.next=4,Object(QI.put)(this.$actionMergeState.message({renderMode:n}));case 4:fL().viewer.toggleShowModelOutline(n===nr.RenderMode.OUTLINE_WITH_SHADING),fL().viewer.togglePlankOutline(!1),r.scene3D.updateRenderMode(n),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 9:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleRenderTranslucent=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:fL().viewer.updateTransparentMode(e?nA.Translucent:nA.Unset),fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 3:case"end":return t.stop()}}),t,this)})))})),t.$actionModelHint=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(QI.put)(this.$actionMergeState.message({overrideMaterialOption:e}));case 2:fL().viewer.triggerReducer(),this.emit(Gm.renderModeChange);case 4:case"end":return t.stop()}}),t,this)})))})),t.$actionToggleSelectModel=t.unitCreator.sync((function(t){t.every(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(QI.put)(this.$actionMergeState.message({selectable:e}));case 2:case"end":return t.stop()}}),t,this)})))})),t.setInteractionPriority=t.unitCreator.sync((function(e){e.produce(t.$reducerState,(function(t,e){var r=Object.assign(t,{interactionPriority:TS(TS({},t.interactionPriority),e)});fL().viewer.setInteractionPriorityConfig(r.interactionPriority.hardware,r.interactionPriority.paramModel)}))})),t.$actionSetCustomModelMaterial=t.unitCreator.sync((function(t){t.latest(LS().mark((function t(e){return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(QI.put)(this.$actionMergeState.message({customModelMaterial:e}));case 2:fL().viewer.triggerReducer();case 3:case"end":return t.stop()}}),t,this)})))})),t}return e=l,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var t=this;NS(YS(l.prototype),"init",this).call(this),fL().viewer.registerReducer((function(e,r,n){var o=t.state.state.customModelMaterial[e.id]||{},i=o.opacity,a=o.color;n.opacity=e.isAppendHardware?1:i,n.outlineMode=e.outlineMode,n.color=a})),fL().viewer.registerReducer((function(e,r,n){var o=e.getAssembly(),i=!0;o&&(i=!o.getInvisible()),i&&(i=!e.getInvisible()),e.isAppendHardware&&(n.overrideMaterial=t.state.state.overrideMaterialOption[e.id]),n.visible=i}))}},{key:"getAllHardwares",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return t.isAppendHardware}))}},{key:"disableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=nr.OutlineMode.Disabled}))}},{key:"enableHardwaresOutline",value:function(){this.getAllHardwares().forEach((function(t){t.outlineMode=nr.OutlineMode.Outlined}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(t){return!t.isAppendHardware}))}},{key:"getAllCustomModels",value:(u=MS(LS().mark((function t(){var e;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getAllParamModels(),t.abrupt("return",e.map((function(t){return xP(t,{origin:G.SENSE})})));case 2:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"getCustomModelById",value:(s=MS(LS().mark((function t(e){var r;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(e))){t.next=3;break}return t.abrupt("return",xP(r,{origin:G.SENSE}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"save",value:(a=MS(LS().mark((function t(e){var r,n,o,i,a,s,u,c,A;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e,n=this.getStateManager().core.pad,(o=new fS(n.findModelOrAssemblyModelById)).addParamModelLite.apply(o,QS(r)),t.next=6,o.attach();case 6:return t.next=8,Promise.all(r.map((function(t){return MP(t,o)})));case 8:i=t.sent,a=[],s=[],u=_S(i);try{for(u.s();!(c=u.n()).done;)(A=c.value).create&&A.custom&&A.model&&a.push(A),!A.create&&A.model&&s.push(A.model)}catch(t){u.e(t)}finally{u.f()}(a.length||s.length)&&a.length&&a.forEach((function(t){var e;null===(e=t.custom)||void 0===e||e.addParamModels(t.model)})),fL().viewer.triggerReducer();case 15:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"focusFace",value:function(t){var e=p_().viewParamModel.state.state.currModelId;if(e){var r,n=this.getStateManager(),o=n.core,i=n.scene3D,a=o.design.getCustom().getParamModels().find((function(t){return t.$id===e})),s=o.design.getCustom().getParamModelAssemblies().find((function(t){return t.id===e})),u=(a||s).getBox3(),c=u.getPosition(),A=u.getSize().length()*_E,l=u.getMatrix();switch(t){case Ie.Right:r=new Se.default(A,0,0).applyMatrix4(l);break;case Ie.Left:r=new Se.default(-A,0,0).applyMatrix4(l);break;case Ie.Front:r=new Se.default(0,-A,0).applyMatrix4(l);break;case Ie.Back:r=new Se.default(0,A,0).applyMatrix4(l);break;case Ie.Top:this.focusFace(Ie.Front),r=new Se.default(0,0,A).applyMatrix4(l);break;case Ie.Bottom:this.focusFace(Ie.Front),r=new Se.default(0,0,-A).applyMatrix4(l)}i.updateCameraAttributes({lookAt:c,position:r})}}},{key:"updateCameraType",value:function(t){this.getStateManager().scene3D.updateCameraType(t===pe.Orthographic?OC.a.Orthographic:OC.a.Perspective,!0)}},{key:"lookAt",value:(i=MS(LS().mark((function t(e){var r,n,o,i,a,s,u,c,A,l,f,h,p;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,n=e.keepView,o=void 0===n||n,i=this.getStateManager(),a=i.scene3D,s=LC(r)){t.next=5;break}throw new Error("".concat(r,"模型不存在"));case 5:if(!jC(s)){t.next=8;break}throw new Error("".concat(r,"模型不可见"));case 8:if(u=s.getConcatenatedBox3(),c=u.getPosition(),!o){t.next=18;break}return A=a.state.cameraAttributes,l=A.lookAt,f=A.position,h=f.clone().sub(l.clone()).normalize(),p=f.distance(l),t.next=16,kC({lookAt:c,position:c.clone().add(h.clone().mul(p))});case 16:t.next=20;break;case 18:return t.next=20,kC({lookAt:c});case 20:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"adaptViewer",value:(o=MS(LS().mark((function t(e){var r,n,o,i,a,s,u,A,l,f,h,p,d,g,y,v,m,I,E,C,b,B,w,P,S,_,Q,O,D,x,M,R,T,L,j,k,N,F,G,U;return LS().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.modelId,!((n=e.scale)<=0)){t.next=4;break}throw new Error("不支持小于等于".concat(0," 的比例"));case 4:if(o=this.getStateManager(),i=o.scene3D,a=LC(r)){t.next=8;break}throw new Error("".concat(r,"模型不存在"));case 8:if(!jC(a)){t.next=11;break}throw new Error("".concat(r,"模型不可见"));case 11:if(s=a.getConcatenatedBox3(),u=s.getPoints().map((function(t){return new c.Point3d(t)})),l=(A=lS).getCamera(),f=u.map((function(t){return new nr.Vector3(t.x,t.y,t.z).applyMatrix4(l.matrixWorldInverse)})),h=new c.BBox3d,f.forEach((function(t){h.addPoint(t)})),p=i.state.perspectiveCameraFov,d=i.state.cameraAttributes,g=d.lookAt,y=d.position,v=d.frustumSize,m=d.near,I=d.far,E=A.getSize(),C=E.width/E.height,b=h.width,B=h.height,w=h.depth,P=new c.Vector3d(g),S=w/2,_=n/100,!(l instanceof nr.PerspectiveCamera)){t.next=39;break}return Q=l.zoom,O=p/2,D=B/2/_*Q/Math.tan(O*(Math.PI/180)),x=180*Math.atan(Math.tan(O*Math.PI/180)*C)/Math.PI,M=b/2/_*Q/Math.tan(x*(Math.PI/180)),R=Math.max(M,D),T=Object(nl.a)(R+S,m+S,I-S),L=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(T)),t.next=37,kC({position:new Se.default(L.x,L.y,L.z)});case 37:t.next=47;break;case 39:return j=B/_/v,k=b/_/(v*C),N=Math.max(j,k),F=(m+I)/2,G=Object(nl.a)(F,m+S,I-S),U=P.clone().added(new c.Vector3d(y).subtracted(P.clone()).normalized().multiplied(G)),t.next=47,kC({frustumSize:N*v,position:new Se.default(U.x,U.y,U.z)});case 47:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&kS(e.prototype,r),n&&kS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(Us.AXR);function KS(t){return(KS="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 JS(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 XS(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?JS(Object(r),!0).forEach((function(e){ZS(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JS(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ZS(t,e,r){return(e=n_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $S(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 t_(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 t_(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 t_(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 e_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r_(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,n_(n.key),n)}}function n_(t){var e=function(t,e){if("object"!=KS(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=KS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==KS(e)?e:String(e)}function o_(){return(o_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=i_(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 i_(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c_(t)););return t}function a_(t,e){return(a_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s_(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=c_(t);if(e){var o=c_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u_(this,r)}}function u_(t,e){if(e&&("object"===KS(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 c_(t){return(c_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var A_={rawSelected:[],selectedData:[],selectedDataV2:[]},l_=function(t,e){var r=t.entityId+"%%"+t.entityType.toString(),n=e.entityId+"%%"+e.entityType.toString();return r>n?1:r===n?0:-1},f_=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&&a_(t,e)}(i,t);var e,r,n,o=s_(i);function i(){var t;return e_(this,i),(t=o.apply(this,arguments)).state=t.stateCreator.create(A_).mutable(),t.onModelsChange=function(){var e=t.selected.map((function(e){return t.stateManager.core.pad.findModel(e.entityId)})).filter((function(t){return!!t})),r=t.state.state.selectedData;e.length===r.length&&Object(Qr.unzip)([e,r]).every((function(t){var e=$S(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return XS(XS({},t),{},{selectedData:e})})),t.emit(i.EVENT_SELECT_CHANGED))},t.onModelChangeV2=function(){setTimeout((function(){t.onModelsChange()}),0);var e=t.stateManager.core,r=e.pad,n=e.fittingDesign,o=n.getFittings(),a=n.getGrooveFittings(),s=n.getHoleModels(),u=n.getSquareGrooveModels(),c=n.getRoundCornerGrooveModels(),A=n.getSpecialShapedGrooveModels(),l=n.getPathGrooveModels(),f=t.rawSelected.map((function(t){switch(t.entityType){case iA:return r.findModelEx(t.entityId,Zh);case oA:return r.findParamModelAssembly(t.entityId);case Vm:return o.find((function(e){return e.id===t.entityId}));case qm:return a.find((function(e){return e.id===t.entityId}));case Zm:return s.find((function(e){return e.id===t.entityId}));case $m:return u.find((function(e){return e.id===t.entityId}));case tI:return c.find((function(e){return e.id===t.entityId}));case eI:return A.find((function(e){return e.id===t.entityId}));case rI:return l.find((function(e){return e.id===t.entityId}));default:return}})).filter((function(t){return!!t})),h=t.state.state.selectedDataV2;h.length===f.length&&Object(Qr.unzip)([h,f]).every((function(t){var e=$S(t,2);return e[0]===e[1]}))||(t.state.reduce((function(t){return XS(XS({},t),{},{selectedDataV2:f})})),t.emit(i.EVENT_SELECT_CHANGED_V2))},t._onSelectionChange=function(){t.onStateChange()},t}return e=i,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(t){this.selectionStateManager.select(t)}},{key:"unSelect",value:function(t){this.selectionStateManager.unSelect(t)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){o_(c_(i.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),o_(c_(i.prototype),"release",this).call(this)}},{key:"onEnable",value:function(t){o_(c_(i.prototype),"onEnable",this).call(this,t),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(Cf.a,this._onSelectionChange),this.stateManager.core.pad.on($h.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Sr.on(Br.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(t){this.stateManager.core.pad.off($h.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),Sr.off(Br.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return A_})),this.selectionStateManager.off(Cf.a,this._onSelectionChange),this.rawSelected=[],this.selected=[],o_(c_(i.prototype),"onDisable",this).call(this,t)}},{key:"onStateChange",value:function(){var t=this.selectionStateManager.state.value;if(t.sort(l_),this.rawSelected!==t){this.rawSelected=t;var e=this.resolveSelected(t)||[];this.selectedIsChanged(this.selected,e)&&(this.selected=e),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(t){return t.filter((function(t){return t.entityType===iA}))}},{key:"selectedIsChanged",value:function(t,e){if(t.length!==e.length)return!0;if(0===t.length&&0===e.length)return!1;for(var r=t.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),n=e.map((function(t){return t.entityId+"%%"+t.entityType.toString()})),o=0,i=n.length;o<i;++o)if(r[o]!==n[o])return!0;return!1}}])&&r_(e.prototype,r),n&&r_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.AXR);f_.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",f_.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var h_={entry:vC,scene:WS,select:f_,fittingDesign:aw,baseDesignInfo:_I,viewParamModel:bw,rulerLine:pP,detection:jw};function p_(){return fL().axr.axrs}var d_=Object($c.getConnector)(),g_=d_.connect,y_=d_.setRootState;function v_(t,e,r){return g_((function(){return t(p_(),fL().getStateManager())}),e,r)}var m_=r(504),I_=r.n(m_),E_=r(910),C_=r.n(E_);function b_(t){return(b_="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 B_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w_(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,P_(n.key),n)}}function P_(t){var e=function(t,e){if("object"!=b_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=b_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==b_(e)?e:String(e)}function S_(t,e){return(S_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function __(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=O_(t);if(e){var o=O_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Q_(this,r)}}function Q_(t,e){if(e&&("object"===b_(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 O_(t){return(O_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var D_,x_=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&&S_(t,e)}(i,t);var e,r,n,o=__(i);function i(){return B_(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.tip,r=t.noImg,n=t.imgSrc,o=t.className;return Hs.a.createElement("div",{className:I_()(C_.a.empty,o)},!r&&Hs.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),e&&Hs.a.createElement("p",null,e))}}])&&w_(e.prototype,r),n&&w_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent);function M_(t){return(M_="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 R_=["prefixCls","className","disabled","onDragStartT","onDragMoveT","onDragEndT","onDragCancelT"];function T_(){return(T_=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function L_(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function j_(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return k_(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 k_(t,e)}(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 k_(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 N_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F_(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,U_(n.key),n)}}function G_(t,e,r){return e&&F_(t.prototype,e),r&&F_(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function U_(t){var e=function(t,e){if("object"!=M_(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=M_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==M_(e)?e:String(e)}function z_(t,e){return(z_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Y_(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=V_(t);if(e){var o=V_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return H_(this,r)}}function H_(t,e){if(e&&("object"===M_(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 V_(t){return(V_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var q_="tui-draggable",W_={prefixCls:q_},K_="".concat(q_,"-ignore"),J_=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&&z_(t,e)}(r,t);var e=Y_(r);function r(){var t;return N_(this,r),(t=e.apply(this,arguments)).elementRef=Ys.createRef(),t.listening=!1,t.waitingMove=!1,t.handleMouseDown=function(e){var r=e.nativeEvent.target;r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLElement&&r.classList.contains(K_)||function(){var t,r=j_(e.nativeEvent.composedPath());try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n instanceof HTMLElement&&n.classList.contains(K_))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}()||(t.handleCancel(),0===e.button&&t.startDrag(e))},t.handleMouseMove=function(e){var r=t.props,n=r.onDragMoveT,o=r.onDragStartT,i=new X_(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});if(t.waitingMove){if(!i.moved)return;t.waitingMove=!1;var a=o&&o(e,i);a&&a.start||t.clearDragging()}else n&&n(e,i);e.preventDefault()},t.handleMouseUp=function(e){var r=t.props.onDragEndT;if(!t.waitingMove){var n=new X_(e,{startPageX:t.startPageX,startPageY:t.startPageY,startPositionX:t.startPositionX,startPositionY:t.startPositionY});r&&r(e,n)}t.clearDragging()},t}return G_(r,[{key:"componentDidUpdate",value:function(t){!t.disabled&&this.props.disabled&&this.handleCancel()}},{key:"componentWillUnmount",value:function(){this.handleCancel()}},{key:"render",value:function(){var t,e,r,n=this.props,o=n.prefixCls,i=n.className,a=n.disabled,s=(n.onDragStartT,n.onDragMoveT,n.onDragEndT,n.onDragCancelT,L_(n,R_)),u=I_()(o,i,(t={},e="".concat(o,"-disabled"),r=a,(e=U_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t));return Ys.createElement("div",T_({ref:this.elementRef,className:u,onMouseDown:a?void 0:this.handleMouseDown},s),this.props.children)}},{key:"startDrag",value:function(t){if((e=t.nativeEvent)!==D_&&(D_=e,1)){var e;if(this.startPageX=t.pageX,this.startPageY=t.pageY,this.elementRef.current){var r=this.elementRef.current.getBoundingClientRect();this.startPositionX=r.left,this.startPositionY=r.top}this.addDragListeners(),t.preventDefault()}}},{key:"addDragListeners",value:function(){document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp),this.listening=!0,this.waitingMove=!0}},{key:"removeDragListeners",value:function(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.listening=!1,this.waitingMove=!1}},{key:"handleCancel",value:function(){if(this.listening){var t=this.props.onDragCancelT;t&&t()}this.clearDragging()}},{key:"clearDragging",value:function(){this.removeDragListeners()}}]),r}(Ys.Component);J_.defaultProps=W_;var X_=function(){function t(e,r){N_(this,t),this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.dx=this.pageX-r.startPageX,this.dy=this.pageY-r.startPageY,this.offsetX=r.startPageX-r.startPositionX,this.offsetY=r.startPageY-r.startPositionY}return G_(t,[{key:"moved",get:function(){return Math.abs(this.dx)>=1||Math.abs(this.dy)>=1}}]),t}(),Z_=J_,$_=r(895);function tQ(t){return(tQ="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 eQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rQ(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,nQ(n.key),n)}}function nQ(t){var e=function(t,e){if("object"!=tQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tQ(e)?e:String(e)}function oQ(t,e){return(oQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iQ(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=sQ(t);if(e){var o=sQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return aQ(this,r)}}function aQ(t,e){if(e&&("object"===tQ(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 sQ(t){return(sQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uQ=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&&oQ(t,e)}(i,t);var e,r,n,o=iQ(i);function i(){return eQ(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props;return Hs.a.createElement($_.b,t)}}])&&rQ(e.prototype,r),n&&rQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Ys.PureComponent),cQ=r(911),AQ=r.n(cQ);function lQ(t){return(lQ="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 fQ(){return(fQ=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function hQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pQ(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,dQ(n.key),n)}}function dQ(t){var e=function(t,e){if("object"!=lQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=lQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lQ(e)?e:String(e)}function gQ(t,e){return(gQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yQ(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=mQ(t);if(e){var o=mQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vQ(this,r)}}function vQ(t,e){if(e&&("object"===lQ(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 mQ(t){return(mQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Ys.PureComponent;var IQ,EQ=r(516),CQ=r.n(EQ);function bQ(t){return(bQ="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 BQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wQ(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,OQ(n.key),n)}}function PQ(t,e){return(PQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SQ(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=QQ(t);if(e){var o=QQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _Q(this,r)}}function _Q(t,e){if(e&&("object"===bQ(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 QQ(t){return(QQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OQ(t){var e=function(t,e){if("object"!=bQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=bQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==bQ(e)?e:String(e)}function DQ(){return Hs.a.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"14px",height:"14px",fill:"#FFAB00","aria-hidden":"true"},Hs.a.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}))}!function(t){t.Warning="warning"}(IQ||(IQ={}));var xQ,MQ,RQ,TQ=(xQ={},MQ=IQ.Warning,RQ=Hs.a.createElement(DQ,null),(MQ=OQ(MQ))in xQ?Object.defineProperty(xQ,MQ,{value:RQ,enumerable:!0,configurable:!0,writable:!0}):xQ[MQ]=RQ,xQ),LQ={x:0,y:0},jQ=v_((function(t){return{detection:t.detection.state}}),(function(t){return{message:t.detection.message,description:t.detection.description,defaultPosition:t.detection.defaultPosition,show:t.detection.show}}),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&&PQ(t,e)}(i,t);var e,r,n,o=SQ(i);function i(){var t;return BQ(this,i),(t=o.apply(this,arguments)).state={position:LQ},t.elementRef=Hs.a.createRef(),t.dragStartPosition=LQ,t.prevTranslate=LQ,t.getAbsolutePosition=function(t){var e=t.x,r=t.y,n=window;return{x:e*n.innerWidth,y:r*n.innerHeight}},t.handleResize=function(){var e=t.getAbsolutePosition(t.prevTranslate),r=e.x,n=e.y,o=t.props.defaultPosition,i=t.getAbsolutePosition(o),a=window.innerWidth-i.x-t.elementRef.current.clientWidth,s=window.innerHeight-i.y-t.elementRef.current.clientHeight;t.setState({position:{x:Math.min(r,a),y:Math.min(n,s)}})},t.handleDragStart=function(){return t.dragStartPosition=t.state.position,{start:!0}},t.handleDragMove=function(e,r){var n=t.props.defaultPosition,o=t.getAbsolutePosition(n),i=window.innerWidth-o.x-t.elementRef.current.clientWidth,a=window.innerHeight-o.y-t.elementRef.current.clientHeight,s={x:Object(nl.a)(t.dragStartPosition.x+r.dx,0-o.x,i),y:Object(nl.a)(t.dragStartPosition.y+r.dy,0-o.y,a)};t.setState({position:s}),t.prevTranslate={x:s.x/window.innerWidth,y:s.y/window.innerHeight}},t.handleDragEnd=function(){t.dragStartPosition=LQ},t.handleDragCancel=function(){t.dragStartPosition=LQ},t}return e=i,(r=[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize)}},{key:"render",value:function(){var t=this.props,e=t.message,r=t.description,n=t.defaultPosition,o=t.show,i=this.state.position,a="translate("+i.x+"px, "+i.y+"px)";return o?Hs.a.createElement(Z_,{style:{transform:a,left:"".concat(100*n.x,"%"),top:"".concat(100*n.y,"%")},className:CQ.a.noticeDraggable,onDragStartT:this.handleDragStart,onDragMoveT:this.handleDragMove,onDragEndT:this.handleDragEnd,onDragCancelT:this.handleDragCancel},Hs.a.createElement("div",{className:CQ.a.noticeContent,ref:this.elementRef},Hs.a.createElement("span",{className:CQ.a.noticeIcon},TQ[IQ.Warning]),Hs.a.createElement("div",{className:CQ.a.noticeMessage},e),Hs.a.createElement("div",{className:CQ.a.noticeDescription},r))):null}}])&&wQ(e.prototype,r),n&&wQ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent)),kQ=r(912),NQ=r.n(kQ),FQ=r(556);function GQ(t){return(GQ="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 UQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zQ(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,HQ(n.key),n)}}function YQ(t,e,r){return e&&zQ(t.prototype,e),r&&zQ(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function HQ(t){var e=function(t,e){if("object"!=GQ(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=GQ(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==GQ(e)?e:String(e)}function VQ(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&&qQ(t,e)}function qQ(t,e){return(qQ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function WQ(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=JQ(t);if(e){var o=JQ(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return KQ(this,r)}}function KQ(t,e){if(e&&("object"===GQ(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 JQ(t){return(JQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var XQ=Symbol("layout"),ZQ=v_((function(t){return{status:t.entry.state}}),(function(t){return{status:t.status.main}}),function(t){VQ(r,t);var e=WQ(r);function r(){return UQ(this,r),e.apply(this,arguments)}return YQ(r,[{key:"render",value:function(){return this.state.views.map((function(t){return t.content}))}}]),r}(FQ.a)),$Q=function(t){VQ(r,t);var e=WQ(r);function r(){return UQ(this,r),e.apply(this,arguments)}return YQ(r,[{key:"render",value:function(){return Hs.a.createElement(ZQ,{mountPointId:XQ})}}]),r}(Hs.a.PureComponent),tO=r(165);function eO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rO(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,nO(n.key),n)}}function nO(t){var e=function(t,e){if("object"!=AO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AO(e)?e:String(e)}function oO(){return(oO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=iO(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 iO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=cO(t)););return t}function aO(t,e){return(aO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sO(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=cO(t);if(e){var o=cO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uO(this,r)}}function uO(t,e){if(e&&("object"===AO(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 cO(t){return(cO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function AO(t){return(AO="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 lO=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":AO(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};function fO(t,e){return t===e||t&&e&&t.equals(e)}var 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&&aO(t,e)}(i,t);var e,r,n,o=sO(i);function i(){var t;return eO(this,i),(t=o.apply(this,arguments)).basicMaterial=new nr.default.LineBasicMaterial({transparent:!0}),t.dashedMaterial=new nr.default.LineDashedMaterial({transparent:!0,gapSize:20,dashSize:20}),t}return e=i,(r=[{key:"buildMesh",value:function(){var t=new nr.default.Line(void 0,void 0);return t.outlineMode=nr.default.OutlineMode.Disabled,t}},{key:"componentDidMount",value:function(){oO(cO(i.prototype),"componentDidMount",this).call(this),this.update({})}},{key:"componentDidUpdate",value:function(t,e){oO(cO(i.prototype),"componentDidUpdate",this).call(this,t,e),this.update(t)}},{key:"update",value:function(t){var e=this.props,r=e.start,n=e.end,o=e.dashed,i=e.interactive,a=void 0===i||i,s=e.color,u=e.alwaysTop,c=void 0===u||u,A=e.visible,l=void 0===A||A,f=e.opacity;if(!fO(t.start,r)||!fO(t.end,n)){var h=[];h.push(r.x,r.y,r.z),h.push(n.x,n.y,n.z);var p=new nr.default.BufferGeometry;p.addAttribute("position",new nr.default.BufferAttribute(new Float32Array(h),3)),nr.geomOperator.computeLineDistances(p),this.mesh.geometry=p}this.mesh.setMaterials(o?this.dashedMaterial:this.basicMaterial),this.mesh.expectOnlyMaterial().setValues({color:s,depthTest:!c,opacity:f}),this.mesh.visible=l,this.mesh.renderOrder=c?999:0,this.mesh.interactionLayers=new nr.default.Layers,this.mesh.interactionLayers.set(a?0:1)}}])&&rO(e.prototype,r),n&&rO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(92).b),pO=hO=lO([tO.a],hO),dO=r(393);function gO(t){return(gO="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 yO(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 vO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yO(Object(r),!0).forEach((function(e){mO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mO(t,e,r){return(e=CO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function IO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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"!=gO(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gO(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"===gO(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)}var SO=v_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{cameraPosition:t.scene3D.cameraAttributes.position,cameraLookAt:t.scene3D.cameraAttributes.lookAt,frustumSize:t.scene3D.cameraAttributes.frustumSize}}),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(){return IO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.position,r=t.text,n=t.style;return Hs.a.createElement(dO.b,null,(function(t){var o=t.sceneToCanvas(e),i={position:"absolute",top:0,left:0,transform:"translate(-50%, -50%) translate(".concat(o.x,"px, ").concat(o.y,"px)")};return Hs.a.createElement("div",{style:vO(vO({},n),i)},r)}))}}])&&EO(e.prototype,r),n&&EO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent));function _O(t){return(_O="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){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)||DO(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 OO(t){return function(t){if(Array.isArray(t))return xO(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||DO(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 DO(t,e){if(t){if("string"==typeof t)return xO(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)?xO(t,e):void 0}}function xO(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 MO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RO(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,TO(n.key),n)}}function TO(t){var e=function(t,e){if("object"!=_O(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_O(e)?e:String(e)}function LO(t,e){return(LO=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=NO(t);if(e){var o=NO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kO(this,r)}}function kO(t,e){if(e&&("object"===_O(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 NO(t){return(NO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var FO=v_((function(t){return{rulerLine:t.rulerLine.state}}),(function(t){return{dimensionRulers:new Map(OO(t.rulerLine.dimensionRulers.entries()).map((function(t){var e=QO(t,2);return[e[0],e[1].rulerConfig]}))),spacingDistanceRulers:new Map(OO(t.rulerLine.spacingDistanceRulers.entries()).map((function(t){var e=QO(t,2);return[e[0],e[1].rulerConfigs]})))}}),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&&LO(t,e)}(i,t);var e,r,n,o=jO(i);function i(){return MO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.dimensionRulers,r=t.spacingDistanceRulers;return Hs.a.createElement(Hs.a.Fragment,null,OO(e.entries()).map((function(t){var e=QO(t,2),r=e[0],n=e[1],o=n.mainLine,i=n.capLines,a=n.lineStyle,s=a.color,u=a.opacity,c=n.textStyle,A=n.text,l=n.textPosition;return Hs.a.createElement(Ys.Fragment,{key:r},[o].concat(OO(i)).map((function(t,e){return Hs.a.createElement(pO,{opacity:u,color:s,key:e,start:t.start,end:t.end})})),Hs.a.createElement(SO,{position:l,text:A,style:c}))})),OO(r.entries()).map((function(t){var e=QO(t,2),r=e[0];return e[1].map((function(t,e){var n=t.mainLine,o=t.capLines,i=t.lineStyle,a=i.color,s=i.opacity,u=t.textStyle,c=t.text,A=t.textPosition;return Hs.a.createElement(Ys.Fragment,{key:"".concat(r,"-").concat(e)},[n].concat(OO(o)).map((function(t,e){return Hs.a.createElement(pO,{opacity:s,color:a,key:e,start:t.start,end:t.end})})),Hs.a.createElement(SO,{position:A,text:c,style:u}))}))})))}}])&&RO(e.prototype,r),n&&RO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent)),GO=r(213);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)}function zO(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,HO(n.key),n)}}function YO(t,e,r){return e&&zO(t.prototype,e),r&&zO(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function HO(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 VO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qO(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&&WO(t,e)}function WO(t,e){return(WO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function KO(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=XO(t);if(e){var o=XO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return JO(this,r)}}function JO(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 XO(t){return(XO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ZO=v_((function(t,e){return{scene3D:e.scene3D}}),(function(t){var e=t.scene3D;return{cameraType:e.cameraType,cameraAttributes:e.cameraAttributes,initCameraAttributes:e.initCameraAttributes,perspectiveCameraMode:e.perspectiveCameraMode,perspectiveCameraFov:e.perspectiveCameraFov,groundGridConfig:e.groundGridConfig,enableCameraAnimation:e.enableCameraAnimation,renderMode:e.renderMode,cameraControlMode:e.cameraControlMode}}),function(t){qO(r,t);var e=KO(r);function r(){return VO(this,r),e.apply(this,arguments)}return YO(r)}(Xu.ob.DeprecatedFullScene3D)),$O=function(t){qO(r,t);var e=KO(r);function r(){return VO(this,r),e.apply(this,arguments)}return YO(r,[{key:"render",value:function(){return this.state.views.map((function(t){t.key;return t.content}))}}]),r}(FQ.a),tD=v_((function(){return{}}),(function(){return{}}),function(t){qO(r,t);var e=KO(r);function r(){var t;return VO(this,r),(t=e.apply(this,arguments)).onInit=function(t){var e=t.viewer.config;hS(t.viewer),e.autoInstance.enabled.set(!0),e.popMeshMerge.enabled.set(!0),e.background.active.set(nr.BackgroundMode.SolidColorBackground),e.background.solid.color.set(new nr.Color(Fm.sceneBG)),e.ground.enabled.set(!1),e.effects.planarShadow.enabled.set(!1),e.effects.taa.enabled.set(!1),e.staticFrameCache.enabled.set(!1),e.isExtraCopyBeforeScreenEnabled.set(!1),e.effects.ao.enabled.set(!1),fL().viewer.onScene3DInit(t)},t.onGrabStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateGrabing(!0)},t.onGrabEnd=function(){t.props.rootState.scene3D.updateGrabing(!1)},t.onZoomStart=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1),t.props.rootState.scene3D.updateZooming(!0)},t.onZoomEnd=function(){t.props.rootState.scene3D.updateZooming(!1)},t.onCameraAnimationEnd=function(){t.props.rootState.scene3D.updateEnableCameraAnimation(!1)},t}return YO(r,[{key:"render",value:function(){var t=this.props,e=t.rootState.scene3D,r=t.containerId,n=t.size;return Hs.a.createElement(ZO,{enableAO:!1,onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:e.updateScale,onCameraAttributesChange:e.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd,orthCameraDirectionChangeable:!0,cameraControlMode:GO.a.defaultMode},Hs.a.createElement($O,{mountPointId:uI.scene3D}))}}]),r}(Hs.a.PureComponent));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 rD(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nD(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,oD(n.key),n)}}function oD(t){var e=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)}(t,"string");return"symbol"==eD(e)?e:String(e)}function iD(t,e){return(iD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function aD(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=uD(t);if(e){var o=uD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sD(this,r)}}function sD(t,e){if(e&&("object"===eD(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 uD(t){return(uD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cD=v_((function(t,e){return{scene3D:e.scene3D}}),(function(t){return{size:t.scene3D.size}}),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&&iD(t,e)}(i,t);var e,r,n,o=aD(i);function i(){var t;return rD(this,i),(t=o.apply(this,arguments)).rootRef=Hs.a.createRef(),t.updateLayout=Object(Qr.throttle)((function(){var e=t.rootRef.current;if(e){var r=e.getBoundingClientRect();t.props.rootState.scene3D.updateSize(new Cn.default(r.width,r.height))}}),200),t}return e=i,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var t=this.props,e=t.size,r=t.className;return Hs.a.createElement("div",{ref:this.rootRef,id:Nm.SCENE_ID,className:r},Hs.a.createElement(tD,{containerId:Nm.SCENE_ID,size:new c.Vector2d(e.x,e.y)}))}}])&&nD(e.prototype,r),n&&nD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent));r(1380);function AD(t){return(AD="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fD(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,hD(n.key),n)}}function hD(t){var e=function(t,e){if("object"!=AD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AD(e)?e:String(e)}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"===AD(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=v_((function(){return{}}),(function(){return{}}),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(){return lD(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return Hs.a.createElement(Hs.a.Fragment,null,Hs.a.createElement(Ym.a,{mountPointId:XQ},Hs.a.createElement(cD,{key:"s3",className:NQ.a.scene3D}),Hs.a.createElement(jQ,null)),Hs.a.createElement(Ym.a,{mountPointId:uI.scene3D},Hs.a.createElement(FO,null)))}}])&&fD(e.prototype,r),n&&fD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hs.a.PureComponent));function mD(t,e){if(t.length!==e.length)return[];for(var r=t.length,n=[],o=0;o<r-1;o++)n.push(t[o].x,t[o].y,t[o].z),n.push(t[o+1].x,t[o+1].y,t[o+1].z),n.push(e[o].x,e[o].y,e[o].z),n.push(e[o].x,e[o].y,e[o].z),n.push(e[o+1].x,e[o+1].y,e[o+1].z),n.push(t[o+1].x,t[o+1].y,t[o+1].z);return n}function ID(t){return(ID="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 ED(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 CD(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ED(Object(r),!0).forEach((function(e){bD(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ED(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bD(t,e,r){var n;return n=function(t,e){if("object"!=ID(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ID(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==ID(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function BD(t){var e=t.color,r=t.side,n=t.opacity,o=t.points,i=t.matrix,a=t.depth,s=new nr.Shape,u=new nr.MeshBasicMaterial(CD({color:e,side:r},ZE(n)));s.setFromPoints(o.map((function(t){return new nr.Vector2(t.x,t.y)})));var c=nr.shapeBuilder.shape({shapes:s}),A=new nr.Mesh(c,u);return A.position.set(0,0,a),A.applyMatrix(i),$E(A),A}function wD(t){var e=t.matrix,r=t.side,n=t.color,o=t.opacity,i=new nr.MeshBasicMaterial(CD({side:r,color:n},ZE(o))),a=new nr.BufferGeometry,s=mD(t.topPoints,t.bottomPoints);a.addAttribute("position",new nr.BufferAttribute(new Float32Array(s),3));var u=new nr.Mesh(a,i);return u.applyMatrix(e),$E(u),u}function PD(t){var e=nr.geomOperator.createEdge(t,25),r=new nr.LineBasicMaterial({color:Fm.outline,depthTest:!0,depthWrite:!0}),n=new nr.LineSegments(e,r);return $E(n),n}function SD(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 _D(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?SD(Object(r),!0).forEach((function(e){QD(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SD(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function QD(t,e,r){return(e=DD(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OD(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,DD(n.key),n)}}function DD(t){var e=function(t,e){if("object"!=LD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LD(e)?e:String(e)}function xD(t,e){return(xD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function MD(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=TD(t);if(e){var o=TD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return RD(this,r)}}function RD(t,e){if(e&&("object"===LD(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 TD(t){return(TD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LD(t){return(LD="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 jD,kD,ND=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":LD(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},FD=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":LD(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},GD=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&&xD(t,e)}(i,t);var e,r,n,o=MD(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)).$model=t,r.entityMap=e,r.entityType=Vm,r.wireFrames=[],r.renderCubeMesh=function(){var t=r.$model,e=t.position,n=t.size,o=t.rotate,i=t.visible,a=t.viewColor,s=t.opacity,u=nr.shapeBuilder.box({width:n.x,height:n.y,depth:n.z}),c=new nr.MeshBasicMaterial(_D({color:a,visible:i},ZE(s))),A=new nr.Mesh(u,c);A.position.set(e.x,e.y,e.z),A.rotation.set(o.x,o.y,o.z),A.visible=i,$E(A);var l=[A].map((function(t){var e=PD(t.geometry);return t.add(e),e}));return r.wireFrames=l,r.updateWireFrameVisibility(),A},r.renderCylinderMesh=function(){var t=r.$model,e=t.position,n=t.visible,o=t.rotate,i=t.height,a=t.viewColor,s=t.opacity,u=t.fittingData.diameter/2,c=nr.shapeBuilder.cylinder({radiusTop:u,radiusBottom:u,height:i}),A=new nr.MeshBasicMaterial(_D({color:a,visible:n},ZE(s))),l=new nr.Mesh(c,A);l.position.set(e.x,e.y,e.z),l.rotation.set(o.x,o.y,o.z),$E(l);var f=[l].map((function(t){var e=PD(t.geometry);return t.add(e),e}));return r.wireFrames=f,r.updateWireFrameVisibility(),l},r.entityId=t.id,r}return e=i,(r=[{key:"createRenderMesh",value:function(){var t=this.$model.type;return t===J.GROOVE?this.renderCubeMesh():t===J.HOLE?this.renderCylinderMesh():void 0}},{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&OD(e.prototype,r),n&&OD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function UD(t){return function(t){if(Array.isArray(t))return zD(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 zD(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 zD(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 zD(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 YD(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 HD(t,e,r){return(e=qD(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function VD(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,qD(n.key),n)}}function qD(t){var e=function(t,e){if("object"!=ZD(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ZD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ZD(e)?e:String(e)}function WD(t,e){return(WD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function KD(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=XD(t);if(e){var o=XD(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return JD(this,r)}}function JD(t,e){if(e&&("object"===ZD(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 XD(t){return(XD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}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)}GD=ND([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this,e=this.$model.type;return{create:function(){var e=t.createRenderMesh();return t.entityMap.set(e,{entityId:t.$model.id,entityType:Vm}),e},update:function(e){var r=t.$model,n=r.position,o=r.visible;e.position.set(n.x,n.y,n.z),e.visible=o,e.material&&(e.material.visible=o),t.updateWireFrameVisibility()},get interactionPriority(){return e===J.HOLE?p_().scene.state.state.interactionPriority.hole:p_().scene.state.state.interactionPriority.groove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),FD("design:paramtypes",["function"==typeof(jD=void 0!==En&&En)?jD:Object,"function"==typeof(kD="undefined"!=typeof Map&&Map)?kD:Object])],GD);var $D,tx=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":ZD(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},ex=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ZD(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},rx=Xu.ib.Highlighters.generateWireGeometryForHighlighterGeometry,nx=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&&WD(t,e)}(i,t);var e,r,n,o=KD(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.entityType=Jm,e.entityId=t.id,e}return e=i,(r=[{key:"createOutlineMesh",value:function(){var t=this.$model.hintOutline,e=t.color,r=t.opacity,n=this.$model.visible,o=function(t){var e=new nr.BufferGeometry,r=t.getVertices(),n=[];t.getIndices().forEach((function(t){n.push(r[t.x],r[t.y])})),e.setAttribute("position",Xu.ib.createBufferAttribute(n)),e.computeBoundingBox();var o=e.getBoundingBox().getCenter(new nr.Vector3);return e.setAttribute("position",Xu.ib.createBufferAttribute(n.map((function(t){return function(t,e){var r=new nr.Vector3(e.x,e.y,e.z).sub(t);return t.clone().add(r)}(o,t)})))),e}(this.getGeometry()),i=new nr.LineBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?YD(Object(r),!0).forEach((function(e){HD(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):YD(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:e},ZE(r))),a=new nr.LineSegments(o,i);return nr.geomOperator.computeLineDistances(o),a.renderOrder=999,a.outlineMode=nr.OutlineMode.Disabled,a.castPlanarShadow=!1,a.castShadow=!1,a.visible=n,i.visible=n,a}},{key:"getGeometry",value:function(){var t,e=this.$model.linkModel;return t=e instanceof _e.CoreParamModel?e.getConcatenatedBox3():e instanceof En||e instanceof _i?e.boundingBox:Nw([].concat(UD(e.getTopRenderPoints()),UD(e.getBottomRenderPoints()))),rx(t)}}])&&VD(e.prototype,r),n&&VD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a),ox=nx=tx([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createOutlineMesh()},update:function(e){var r=t.$model.visible;e.visible=r,e.getMaterials().forEach((function(t){t.visible=r}))}}}))]),ex("design:paramtypes",["function"==typeof($D=void 0!==sn&&sn)?$D:Object])],nx);function ix(t){return function(t){if(Array.isArray(t))return ax(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 ax(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 ax(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 ax(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 sx(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,ux(n.key),n)}}function ux(t){var e=function(t,e){if("object"!=hx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==hx(e)?e:String(e)}function cx(t,e){return(cx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ax(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=fx(t);if(e){var o=fx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lx(this,r)}}function lx(t,e){if(e&&("object"===hx(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 fx(t){return(fx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hx(t){return(hx="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 px,dx,gx=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":hx(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},yx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":hx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vx=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&&cx(t,e)}(i,t);var e,r,n,o=Ax(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)).$model=t,r.entityMap=e,r.entityType=qm,r.wireFrames=[],r.entityId=t.id,r}return e=i,(r=[{key:"createGrooveFittingRender",value:function(){var t=this.$model,e=new nr.Group,r=t.pointToGlobalMatrix(),n=t.depth,o=t.viewColor,i=t.opacity,a=t.visible,s=void 0!==a&&a,u=t.path.getAllPolygonPoints(),A=new we.default;A.fromString(r.toArray().join(","));var l=FE(A),f=BD({matrix:l,depth:0,points:u,color:o,side:nr.Side.FrontSide,opacity:i}),h=BD({matrix:l,depth:-n,points:u,color:o,side:nr.Side.BackSide,opacity:i}),p=[].concat(ix(u),[u[0]]),d=wD({matrix:l,topPoints:p.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:p.map((function(t){return new c.Point3d(t.x,t.y,-n)})),color:o,side:nr.Side.DoubleSide,opacity:i});[f,h,d,e].forEach((function(t){t.visible=s}));var g=[f,h,d],y=g.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return this.wireFrames=y,this.updateWireFrameVisibility(),e.add(g),e}},{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&sx(e.prototype,r),n&&sx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function mx(t){var e=new c.BBox3d;return[].concat(ix(t.getTopRenderPoints()),ix(t.getBottomRenderPoints())).forEach((function(t){e.addPoint(new c.Point3d(t))})),new be.default(new Se.default({x:e.width,y:e.height,z:e.depth}),new Se.default(e.center),new Se.default({x:0,y:0,z:0}))}function Ix(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 Ex(t,e,r){return(e=bx(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cx(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,bx(n.key),n)}}function bx(t){var e=function(t,e){if("object"!=_x(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=_x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_x(e)?e:String(e)}function Bx(t,e){return(Bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wx(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=Sx(t);if(e){var o=Sx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Px(this,r)}}function Px(t,e){if(e&&("object"===_x(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 Sx(t){return(Sx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _x(t){return(_x="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)}vx=gx([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){var e=t.createGrooveFittingRender();return t.entityMap.set(e,{entityId:t.$model.id,entityType:qm}),e},update:function(e){var r=t.$model.visible;e.traverse((function(t){t.visible=r,t instanceof nr.Mesh&&t.getMaterials().forEach((function(t){t.visible=r}))})),e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.hardwareGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:mx(this.$model)}}))]),yx("design:paramtypes",["function"==typeof(px=void 0!==vo&&vo)?px:Object,"function"==typeof(dx="undefined"!=typeof Map&&Map)?dx:Object])],vx);var Qx,Ox=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":_x(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},Dx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":_x(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},xx=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&&Bx(t,e)}(i,t);var e,r,n,o=wx(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.entityType=Zm,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.height,n=t.color,o=t.opacity,i=t.position,a=t.rotate,s=t.radius,u=new nr.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ix(Object(r),!0).forEach((function(e){Ex(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ix(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({color:n},ZE(o))),c=nr.shapeBuilder.cylinder({radiusTop:s,radiusBottom:s,height:r}),A=new nr.Mesh(c,u);A.position.set(i.x,i.y,i.z),A.rotation.set(a.x,a.y,a.z),$E(A);var l=[A].map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=l,e.updateWireFrameVisibility(),A},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&Cx(e.prototype,r),n&&Cx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function Mx(t){var e=new nr.BufferGeometry;if(e.index=new nr.BufferAttribute(new Uint16Array(t.indices),1),e.addAttribute("position",new nr.BufferAttribute(new Float32Array(t.vertices),3)),e.addAttribute("uv",new nr.BufferAttribute(new Float32Array(t.textures),2)),t.normals){var r=new Float32Array(t.normals);e.addAttribute("normal",new nr.BufferAttribute(r,3))}else nr.geomOperator.computeNormalsByPosition(e);return e}function Rx(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,Tx(n.key),n)}}function Tx(t){var e=function(t,e){if("object"!=Fx(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Fx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Fx(e)?e:String(e)}function Lx(t,e){return(Lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jx(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=Nx(t);if(e){var o=Nx(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kx(this,r)}}function kx(t,e){if(e&&("object"===Fx(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 Nx(t){return(Nx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fx(t){return(Fx="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)}xx=Ox([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,e.material&&(e.material.visible=r),t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.holeV2}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),Dx("design:paramtypes",["function"==typeof(Qx=void 0!==_i&&_i)?Qx:Object])],xx);var Gx,Ux=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":Fx(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},zx=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":Fx(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},Yx=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&&Lx(t,e)}(i,t);var e,r,n,o=jx(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.entityType=Wm,e.entityId=t.id,e}return e=i,r&&Rx(e.prototype,r),n&&Rx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a),Hx=Yx=Ux([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.geometryModel,n=e.viewColor,o=e.originPoints,i=new nr.Group,a=Mx(r),s=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:nr.Side.DoubleSide}),u=new nr.Mesh(a,s);u.renderOrder=998,i.add(u),$E(u),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&i.add(o.map((function(t){var e=new nr.Mesh(Vx,qx);return e.position.set(t.x,t.y,t.z),e.renderOrder=999,e})));return i}(t)},update:function(){}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.$model.bbox}}))]),zx("design:paramtypes",["function"==typeof(Gx=void 0!==To&&To)?Gx:Object])],Yx),Vx=new nr.shapeBuilder.SphereBufferGeometry(3),qx=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function Wx(t){return function(t){if(Array.isArray(t))return Kx(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 Kx(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 Kx(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 Kx(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 Jx(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,Xx(n.key),n)}}function Xx(t){var e=function(t,e){if("object"!=rM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=rM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==rM(e)?e:String(e)}function Zx(t,e){return(Zx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $x(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=eM(t);if(e){var o=eM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return tM(this,r)}}function tM(t,e){if(e&&("object"===rM(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 eM(t){return(eM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function rM(t){return(rM="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 nM,oM=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":rM(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},iM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":rM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},aM=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&&Zx(t,e)}(i,t);var e,r,n,o=$x(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.entityType=rI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new nr.Group,n=t.pointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.connectivePath.map((function(t){return t.getAllPolygonPoints()})).flat(),u=new we.default;u.fromString(n.toArray().join(","));var A=FE(u),l=BD({matrix:A,depth:0,points:s,color:i,side:nr.Side.FrontSide,opacity:a}),f=BD({matrix:A,depth:-o,points:s,color:i,side:nr.Side.BackSide,opacity:a}),h=[].concat(Wx(s),[s[0]]),p=[l,f,wD({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:nr.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&Jx(e.prototype,r),n&&Jx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function sM(t){return Nw([].concat(Wx(t.getTopRenderPoints()),Wx(t.getBottomRenderPoints())))}function uM(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,cM(n.key),n)}}function cM(t){var e=function(t,e){if("object"!=pM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=pM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pM(e)?e:String(e)}function AM(t,e){return(AM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lM(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=hM(t);if(e){var o=hM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fM(this,r)}}function fM(t,e){if(e&&("object"===pM(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 hM(t){return(hM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pM(t){return(pM="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)}aM=oM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.pathGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:sM(this.$model)}}))]),iM("design:paramtypes",["function"==typeof(nM=void 0!==ia&&ia)?nM:Object])],aM);var dM,gM=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":pM(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},yM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":pM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},vM=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&&AM(t,e)}(i,t);var e,r,n,o=lM(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.entityType=nI,e.entityId=t.id,e}return e=i,r&&uM(e.prototype,r),n&&uM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a);function mM(t){var e=t.linkModel,r=t.faceId,n=e.getConcatenatedMatrix(),o=function(t){var e,r=null===(e=t.getParam("thickness"))||void 0===e?void 0:e.getData().value;return r?+r:0}(e),i=r===se.TOP?o/2:-o/2;return{position:new Se.default(0,0,i).applyMatrix4(n),rotation:(new nr.Euler).setFromRotationMatrix(FE(n))}}function IM(t){var e=t.outer,r=t.inners,n=EM(e),o=r.map(EM);return n.holes=o,n}function EM(t){var e=t[0],r=new nr.Shape;return r.moveTo(e.x,e.y),t.forEach((function(t){r.lineTo(t.x,t.y)})),r.lineTo(e.x,e.y),r}function CM(t){return function(t){if(Array.isArray(t))return bM(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 bM(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 bM(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 bM(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 BM(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,wM(n.key),n)}}function wM(t){var e=function(t,e){if("object"!=OM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OM(e)?e:String(e)}function PM(t,e){return(PM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SM(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=QM(t);if(e){var o=QM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _M(this,r)}}function _M(t,e){if(e&&("object"===OM(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 QM(t){return(QM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OM(t){return(OM="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)}vM=gM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.color,r=t.opacity,n=t.faces,o=t.visible,i=t.faceId===se.TOP?nr.Side.FrontSide:nr.Side.BackSide,a=new nr.MeshBasicMaterial({transparent:!0,opacity:r,color:e,side:i}),s=n.map(IM),u=nr.shapeBuilder.shape({shapes:s}),c=new nr.Mesh(u,a),A=mM(t),l=A.position,f=A.rotation;return c.position.set(l.x,l.y,l.z),c.rotation.set(f.x,f.y,f.z),c.visible=o,a.visible=o,$E(c),c}(t.$model)},update:function(e){var r=t.$model,n=r.visible,o=r.color,i=r.opacity;e.visible=n,e.expectOnlyMaterial().setValues({opacity:i,color:o,visible:n});var a=mM(t.$model),s=a.position,u=a.rotation;e.position.set(s.x,s.y,s.z),e.rotation.set(u.x,u.y,u.z)}}}))]),yM("design:paramtypes",["function"==typeof(dM=void 0!==Ho&&Ho)?dM:Object])],vM);var DM,xM=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":OM(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},MM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":OM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},RM=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&&PM(t,e)}(i,t);var e,r,n,o=SM(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.entityType=Km,e.entityId=t.id,e}return e=i,r&&BM(e.prototype,r),n&&BM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(eA.a),TM=RM=xM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return function(t){var e=t.$model,r=e.plankFaces,n=e.linkModel,o=e.hintOutline,i=n.getConcatenatedMatrix(),a=new nr.Group;r&&r.forEach((function(t){var e=Mx(_s(t,i)),r=new nr.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:t.color,opacity:t.opacity,transparent:!0,side:nr.Side.DoubleSide}),n=new nr.Mesh(e,r);n.renderOrder=998,$E(n),a.add(n)}));if(o){var s=n.getSize(),u=n.getWireFrames();if(!u){var c=QB(0,s),A=QB(5,s);u=[].concat(CM(Object(Qr.zip)(c,[].concat(CM(c.slice(1)),[c[0]]))),CM(Object(Qr.zip)(A,[].concat(CM(A.slice(1)),[A[0]]))),CM(Object(Qr.zip)(c,A))).flat().map((function(t){return[t.x,t.y,t.z]})).flat()}var l=Object(Qr.chunk)(u,3).map((function(t){return new Se.default(t[0],t[1],t[2]).applyMatrix4(i)})).map((function(t){return[t.x,t.y,t.z]})).flat(),f=new el({points:l,visible:!0,color:parseInt(o.color.replace(/^#/,""),16)});a.add(f)}return a}(t)},update:function(){}}}))]),MM("design:paramtypes",["function"==typeof(DM=void 0!==$o&&$o)?DM:Object])],RM);function LM(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 jM(t,e,r){return(e=NM(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kM(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,NM(n.key),n)}}function NM(t){var e=function(t,e){if("object"!=YM(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=YM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==YM(e)?e:String(e)}function FM(t,e){return(FM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GM(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=zM(t);if(e){var o=zM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UM(this,r)}}function UM(t,e){if(e&&("object"===YM(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 zM(t){return(zM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function YM(t){return(YM="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 HM,VM=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":YM(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},qM=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":YM(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},WM=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&&FM(t,e)}(i,t);var e,r,n,o=GM(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.entityType=Xm,e.entityId=t.id,e}return e=i,(r=[{key:"createMesh",value:function(){var t=this.$model,e=t.viewColor,r=t.opacity,n=t.visible;if(t.linkModel){var o=new nr.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?LM(Object(r),!0).forEach((function(e){jM(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LM(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},ZE(r))),i=new nr.Mesh(new nr.BufferGeometry,o);return o.setValues({side:nr.Side.DoubleSide,color:e}),i.useOriginMaterialInTransparentMode=!0,i.outlineMode=nr.OutlineMode.Disabled,i.castShadow=!1,i.castPlanarShadow=!1,i.visible=n,o.visible=n,this.updateMesh(i),i}}},{key:"updateMesh",value:function(t){var e=this.$model,r=e.points,n=e.linkModel,o=e.height,i=r.map((function(t){return new c.Point3d(t.x,t.y,o/2)})),a=r.map((function(t){return new c.Point3d(t.x,t.y,-o/2)}));if(t.geometry instanceof nr.BufferGeometry){var s=mD(i,a);t.geometry.addAttribute("position",new nr.BufferAttribute(new Float32Array(s),3)),t.geometry.destroy()}var u=n.getConcatenatedMatrix(),A=new Se.default(0,0,0).applyMatrix4(u);return t.position.set(A.x,A.y,A.z),t.rotation.setFromRotationMatrix(FE(u)),t}}])&&kM(e.prototype,r),n&&kM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a),KM=WM=VM([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createMesh()},update:function(e){var r=t.$model,n=r.visible,o=r.viewColor,i=r.opacity;e.visible=n,e.getMaterials().forEach((function(t){t.setValues({opacity:i,color:o,visible:n})})),t.updateMesh(e)}}}))]),qM("design:paramtypes",["function"==typeof(HM=void 0!==ci&&ci)?HM:Object])],WM);function JM(t){return function(t){if(Array.isArray(t))return XM(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 XM(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 XM(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 XM(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 ZM(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,$M(n.key),n)}}function $M(t){var e=function(t,e){if("object"!=oR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oR(e)?e:String(e)}function tR(t,e){return(tR=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=nR(t);if(e){var o=nR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rR(this,r)}}function rR(t,e){if(e&&("object"===oR(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 nR(t){return(nR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function oR(t){return(oR="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 iR,aR=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":oR(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},sR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":oR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},uR=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&&tR(t,e)}(i,t);var e,r,n,o=eR(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.entityType=tI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new nr.Group,n=t.pointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.data,u=t.path.getAllPolygonPoints(),A=FE(n),l=BD({matrix:A,depth:o,points:u,color:i,side:nr.Side.FrontSide,opacity:a}),f=BD({matrix:A,depth:0,points:u,color:i,side:nr.Side.BackSide,opacity:a}),h=[].concat(JM(u),[u[0]]),p=[l,f,wD({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,o)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),color:i,side:nr.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&r.add([s.start,s.end].map((function(e,r){var n=new nr.Mesh(AR,0===r?lR:fR);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=FE(t.originPointToGlobalMatrix());return n.applyMatrix(o),n}))),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&ZM(e.prototype,r),n&&ZM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function cR(t){return Nw([].concat(JM(t.getTopRenderPoints()),JM(t.getBottomRenderPoints())))}uR=aR([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.roundCornerGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:cR(this.$model)}}))]),sR("design:paramtypes",["function"==typeof(iR=void 0!==va&&va)?iR:Object])],uR);var AR=new nr.shapeBuilder.SphereBufferGeometry(3),lR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),fR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function hR(t){return function(t){if(Array.isArray(t))return pR(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 pR(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 pR(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 pR(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 dR(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,gR(n.key),n)}}function gR(t){var e=function(t,e){if("object"!=ER(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ER(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ER(e)?e:String(e)}function yR(t,e){return(yR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vR(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=IR(t);if(e){var o=IR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mR(this,r)}}function mR(t,e){if(e&&("object"===ER(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 IR(t){return(IR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ER(t){return(ER="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 CR,bR=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":ER(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},BR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":ER(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},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&&yR(t,e)}(i,t);var e,r,n,o=vR(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.entityType=eI,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=new nr.Group,n=t.pointToGlobalMatrix(),o=t.depth,i=t.color,a=t.opacity,s=t.path.getAllPolygonPoints(),u=new we.default;u.fromString(n.toArray().join(","));var A=FE(u),l=BD({matrix:A,depth:0,points:s,color:i,side:nr.Side.FrontSide,opacity:a}),f=BD({matrix:A,depth:-o,points:s,color:i,side:nr.Side.BackSide,opacity:a}),h=[].concat(hR(s),[s[0]]),p=[l,f,wD({matrix:A,topPoints:h.map((function(t){return new c.Point3d(t.x,t.y,0)})),bottomPoints:h.map((function(t){return new c.Point3d(t.x,t.y,-o)})),color:i,side:nr.Side.DoubleSide,opacity:a})],d=p.map((function(t){var e=PD(t.geometry);return t.add(e),e}));return e.wireFrames=d,e.updateWireFrameVisibility(),r.add(p),r},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&dR(e.prototype,r),n&&dR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function PR(t){return Nw([].concat(hR(t.getTopRenderPoints()),hR(t.getBottomRenderPoints())))}function SR(t){return function(t){if(Array.isArray(t))return _R(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 _R(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 _R(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 _R(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 QR(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 OR(t,e,r){return(e=xR(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function DR(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,xR(n.key),n)}}function xR(t){var e=function(t,e){if("object"!=jR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=jR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jR(e)?e:String(e)}function MR(t,e){return(MR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RR(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=LR(t);if(e){var o=LR(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TR(this,r)}}function TR(t,e){if(e&&("object"===jR(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 LR(t){return(LR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jR(t){return(jR="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)}wR=bR([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.specialShapedGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:PR(this.$model)}}))]),BR("design:paramtypes",["function"==typeof(CR=void 0!==Da&&Da)?CR:Object])],wR);var kR,NR=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":jR(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},FR=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":jR(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},GR=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&&MR(t,e)}(i,t);var e,r,n,o=RR(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.entityType=$m,e.wireFrames=[],e.createEntity=function(){var t=e.$model,r=t.color,n=t.opacity,o=t.depth,i=t.shapePointsInGroove,a=t.data,s=new nr.MeshBasicMaterial(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?QR(Object(r),!0).forEach((function(e){OR(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QR(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({side:nr.Side.DoubleSide,color:r},ZE(n))),u=i,c=u[0],A=new nr.Shape;A.moveTo(c.x,c.y),u.forEach((function(t){A.lineTo(t.x,t.y)})),A.lineTo(c.x,c.y);var l=nr.shapeBuilder.extrude(A,{bevelEnabled:!1,depth:o}),f=new nr.Mesh(l,s),h=FE(t.pointToGlobalMatrix());f.applyMatrix(h),$E(f);var p=[f].map((function(t){var e=PD(t.geometry);return t.add(e),e}));e.wireFrames=p,e.updateWireFrameVisibility();var d=new nr.Group;return d.add(f),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&d.add([a.start,a.end].map((function(e,r){var n=new nr.Mesh(zR,0===r?YR:HR);n.renderOrder=999,n.position.set(e.x,e.y,e.z);var o=FE(t.originPointToGlobalMatrix());return n.applyMatrix(o),n}))),d},e.entityId=t.id,e}return e=i,(r=[{key:"updateWireFrameVisibility",value:function(){var t=fL().viewer.store.showOutline;this.wireFrames.forEach((function(e){return e.visible=t}))}}])&&DR(e.prototype,r),n&&DR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a);function UR(t){return Nw([].concat(SR(t.getTopRenderPoints()),SR(t.getBottomRenderPoints())))}GR=NR([Object(rA.b)([new Xu.o.DrawableAPI3D((function(){var t=this;return{create:function(){return t.createEntity()},update:function(e){var r=t.$model.visible;e.visible=r,t.updateWireFrameVisibility()},get interactionPriority(){return p_().scene.state.state.interactionPriority.squareGroove}}})),new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:UR(this.$model)}}))]),FR("design:paramtypes",["function"==typeof(kR=void 0!==Ya&&Ya)?kR:Object])],GR);var zR=new nr.shapeBuilder.SphereBufferGeometry(3),YR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"white"}),HR=new nr.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function VR(t){return(VR="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 qR(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,KR(n.key),n)}}function WR(t,e,r){return e&&qR(t.prototype,e),r&&qR(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function KR(t){var e=function(t,e){if("object"!=VR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=VR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==VR(e)?e:String(e)}var JR=WR((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.getDesignDoc=e,this.objectEntityMap=new Map,this.createFittingEntities=Xu.ob.flatEntitiesCreator((function(t){return new GD(t,r.objectEntityMap)})),this.createIntersectEntities=Xu.ob.flatEntitiesCreator((function(t){return new Hx(t)})),this.createGrooveFittingEntities=Xu.ob.flatEntitiesCreator((function(t){return new vx(t,r.objectEntityMap)})),this.createPlankFaceHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new TM(t)})),this.careateFittingHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new ox(t)})),this.careatePlankOutlineHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new KM(t)})),this.createHoleEntities=Xu.ob.flatEntitiesCreator((function(t){return new xx(t)})),this.createSquareGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new GR(t)})),this.createRoundCornerGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new uR(t)})),this.createSpecialShapedGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new wR(t)})),this.createPathGrooveEntities=Xu.ob.flatEntitiesCreator((function(t){return new aM(t)})),this.createPlankAreaFaceHintEntities=Xu.ob.flatEntitiesCreator((function(t){return new vM(t)})),this.getFittingEntities=function(){var t=r.getDesignDoc();return t?r.createFittingEntities(t.getFittings()):[]},this.getGrooveFittingEntities=function(){var t=r.getDesignDoc();return t?r.createGrooveFittingEntities(t.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var t=r.getDesignDoc();return t?r.createIntersectEntities(t.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankFaceHintEntities(t.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var t=r.getDesignDoc();return t?r.careateFittingHintEntities(t.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var t=r.getDesignDoc();return t?r.careatePlankOutlineHintEntities(t.getPlankOutlineHintModels()):[]},this.getHoleEntities=function(){var t=r.getDesignDoc();return t?r.createHoleEntities(t.getHoleModels()):[]},this.getSquareGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSquareGrooveEntities(t.getSquareGrooveModels()):[]},this.getRoundCornerGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createRoundCornerGrooveEntities(t.getRoundCornerGrooveModels()):[]},this.getSpecialShapedGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createSpecialShapedGrooveEntities(t.getSpecialShapedGrooveModels()):[]},this.getPathGrooveEntities=function(){var t=r.getDesignDoc();return t?r.createPathGrooveEntities(t.getPathGrooveModels()):[]},this.getPlankAreaFaceHintEntities=function(){var t=r.getDesignDoc();return t?r.createPlankAreaFaceHintEntities(t.getPlankAreaFaceHints()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities,this.getHoleEntities,this.getSquareGrooveEntities,this.getRoundCornerGrooveEntities,this.getSpecialShapedGrooveEntities,this.getPathGrooveEntities,this.getPlankAreaFaceHintEntities]}));function XR(t){return(XR="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 ZR(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return $R(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 $R(t,e)}(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 $R(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 tT(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,eT(n.key),n)}}function eT(t){var e=function(t,e){if("object"!=XR(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=XR(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==XR(e)?e:String(e)}var rT=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.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){e.pressMap.forEach((function(t,r){e.pressMap.set(r,!1)}))},this.onKeyDown=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)||e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!0)},this.onKeyUp=function(t){var r=e.getKeyBoardKey(t);e.pressMap.get(r)&&(e.isPrevent(t)||e.pressMap.has(r)&&e.pressMap.set(r,!1))},this.active()}var e,r,n;return e=t,(r=[{key:"addKeyboardKeyListener",value:function(t){var e=this,r=Object(Qr.castArray)(t);if(r.some((function(t){return!e.isValidKeyboardKey(t)})))throw new Error("keyboard-key is invalid");var n,o=ZR(r);try{for(o.s();!(n=o.n()).done;){var i=n.value;this.pressMap.set(i,!1)}}catch(t){o.e(t)}finally{o.f()}}},{key:"removeKeyboardKeyListener",value:function(t){var e,r=ZR(Object(Qr.castArray)(t));try{for(r.s();!(e=r.n()).done;){var n=e.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(t){r.e(t)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(t){var e=this;return Object(Qr.castArray)(t).every((function(t){return e.pressMap.get(t)}))}},{key:"getKeyBoardKey",value:function(t){return t.key.toLowerCase()}},{key:"isPrevent",value:function(t){if(this.disabled)return!0;var e=t.target;if(!e)return!1;if("INPUT"===e.tagName){var r=e.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===e.tagName||"TEXTAREA"===e.tagName}},{key:"isValidKeyboardKey",value:function(t){return Ce.includes(t)}}])&&tT(e.prototype,r),n&&tT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),nT=new Map([[es.ParamModelCategory.FRAME,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SPECIAL_FRAME,es.ParamModelCategory.EMBED_FRAME_W,es.ParamModelCategory.POLE_W,es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,es.ParamModelCategory.BOARD,es.ParamModelCategory.DRAWER,es.ParamModelCategory.SPACE_GROUP,es.ParamModelCategory.SINGLE_SLIDING_DOOR,es.ParamModelCategory.FRAME,es.ParamModelCategory.SLIDING_DOOR_BOARD,es.ParamModelCategory.PARAM_FURNITURE_PART,es.ParamModelCategory.SANITARY_COMPONENT,es.ParamModelCategory.DOOR_LEAF,es.ParamModelCategory.DECORATIVE_MOLDING_C,es.ParamModelCategory.DECORATIVE_MOLDING_W,es.ParamModelCategory.HANDS_FREE,es.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[es.ParamModelCategory.SHOWER_ROOM,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SPECIAL_FRAME,es.ParamModelCategory.EMBED_FRAME_W,es.ParamModelCategory.POLE_W,es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,es.ParamModelCategory.BOARD,es.ParamModelCategory.DRAWER,es.ParamModelCategory.SPACE_GROUP,es.ParamModelCategory.SINGLE_SLIDING_DOOR,es.ParamModelCategory.FRAME,es.ParamModelCategory.PARAM_FURNITURE_PART,es.ParamModelCategory.SANITARY_COMPONENT,es.ParamModelCategory.DOOR_LEAF,es.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SPECIAL_FRAME,es.ParamModelCategory.EMBED_FRAME_W,es.ParamModelCategory.BOARD,es.ParamModelCategory.SPACE_GROUP,es.ParamModelCategory.POLE_W,es.ParamModelCategory.SINGLE_SLIDING_DOOR,es.ParamModelCategory.SLIDING_DOOR_BOARD,es.ParamModelCategory.DRAWER,es.ParamModelCategory.RAIL,es.ParamModelCategory.DOOR_LEAF]],[es.ParamModelCategory.SLIDING_DOOR_C,[es.ParamModelCategory.RAIL,es.ParamModelCategory.SINGLE_SLIDING_DOOR]],[es.ParamModelCategory.SPACE_GROUP,[es.ParamModelCategory.DRAWER,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.PARAM_FURNITURE,es.ParamModelCategory.FASCIA_BOARD,es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,es.ParamModelCategory.BOARD,es.ParamModelCategory.SPECIAL_BOARD,es.ParamModelCategory.SPACE_GROUP]],[es.ParamModelCategory.SINGLE_SLIDING_DOOR,[es.ParamModelCategory.SLIDING_DOOR_CORE,es.ParamModelCategory.DOOR_WAIST_LINE]],[es.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[es.ParamModelCategory.SWING_DOOR]],[es.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[es.ParamModelCategory.BOARD]],[es.ParamModelCategory.SWING_DOOR,[es.ParamModelCategory.DOOR_CORE,es.ParamModelCategory.DOOR_WAIST_LINE,es.ParamModelCategory.DECORATIVE_MOLDING,es.ParamModelCategory.BOARD]],[es.ParamModelCategory.DRAWER,[es.ParamModelCategory.DRAWER_PANEL,es.ParamModelCategory.SWING_DOOR,es.ParamModelCategory.BOARD]],[es.ParamModelCategory.PARAM_FURNITURE,[es.ParamModelCategory.FURNITURE_LEG]],[es.ParamModelCategory.KADA,[es.ParamModelCategory.BYOBU,es.ParamModelCategory.BYOBU_FRAME,es.ParamModelCategory.BYOBU_PANEL]]]);function oT(t){return(oT="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 iT(t){return function(t){if(Array.isArray(t))return aT(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 aT(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 aT(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 aT(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 sT(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,uT(n.key),n)}}function uT(t){var e=function(t,e){if("object"!=oT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=oT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oT(e)?e:String(e)}var cT=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.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=ue.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new rT,this.memoGetHintModelLite=LP()((function(t){return e.isFittingLikeModel(t)?Sb(t):e.getParamModelLite(t)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var e,r,n;return e=t,(r=[{key:"isAccessory",value:function(t){var e;if(this.isAccessoryCache.has(t.id))return this.isAccessoryCache.get(t.id);var r=null===(e=null==t?void 0:t.getParent)||void 0===e?void 0:e.call(t),n=(nT.get(r?r.getCategory().getRoot():void 0)||[]).some((function(e){return t.getCategory().belongsTo(e)}));return this.isAccessoryCache.set(t.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(t,e){for(var r,n,o=this,i=[],a=e;a&&a!==t;)i.unshift(a),a=(null===(r=a.getParent)||void 0===r?void 0:r.call(a))||(null===(n=a.getAssembly)||void 0===n?void 0:n.call(a));return i.find((function(t){return o.isAccessory(t)}))||e}},{key:"getParamModelLite",value:function(t){var e=(t.isRoot()?t:t.getRoot()).getAssembly();return e?xP(t,{origin:G.SENSE},void 0,xP(e,{origin:G.SENSE})):xP(t,{origin:G.SENSE})}},{key:"topModelModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o,i,a,s=t.isRoot()?t:t.getRoot(),u=s.getAssembly(),c=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=!1;if(c&&(i=vL(c))&&!this.isFittingLikeModel(i)&&(c.entityType===iA?a=(a=i.isRoot()?i:i.getRoot()).getAssembly()||a:(A=!0,a=i),o=a===s||a===u),o){for(var l=!1,f=!1,h=i instanceof _e.CoreParamModel?i.getParent():void 0,p=t;p;){if(p===i){l=!0;break}if(p===h){f=!0;break}p=(null===(r=p.getParent)||void 0===r?void 0:r.call(p))||(null===(n=p.getAssembly)||void 0===n?void 0:n.call(p))}if(e===ce.CLICK)return l?i:f?this.getAccessoryAtFirstLevel(h,t):a instanceof _e.CoreParamModelAssembly?(i.isRoot()?i:i.getRoot())===s?this.getAccessoryAtFirstLevel(s,t):s:this.getAccessoryAtFirstLevel(s,t);if(e===ce.DB_CLICK)return l?A?s:this.getAccessoryAtFirstLevel(i,t):this.getAccessoryAtFirstLevel(s,t)}else{if(e===ce.CLICK)return u||s;if(e===ce.DB_CLICK)return u?s:this.getAccessoryAtFirstLevel(s,t)}}},{key:"accessoryModeGetSelectModel",value:function(t,e){var r,n;if(this.isFittingLikeModel(t))return t;var o=t.isRoot()?t:t.getRoot(),i=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,a=i&&vL(i),s=!1;if(a&&!this.isFittingLikeModel(a)&&(s=(a.isRoot()?a:a.getRoot())===o),s){for(var u=!1,c=!1,A=null==a?void 0:a.getParent(),l=t;l;){if(l===a){u=!0;break}if(l===A){c=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(e===ce.CLICK)return u?a:this.getAccessoryAtFirstLevel(c?A:o,t);if(e===ce.DB_CLICK){if(u)return this.getAccessoryAtFirstLevel(a,t);var f=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(f,t)}}else{if(e===ce.CLICK)return this.getAccessoryAtFirstLevel(o,t);if(e===ce.DB_CLICK){var h=this.getAccessoryAtFirstLevel(o,t);return this.getAccessoryAtFirstLevel(h,t)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(t){var e,r;if(this.isFittingLikeModel(t))return t;var n,o,i=t.isRoot()?t:t.getRoot(),a=i.getAssembly(),s=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,u=!1;if(s&&(n=vL(s))&&!this.isFittingLikeModel(n)&&(u=(o=s.entityType===iA?(o=n.isRoot()?n:n.getRoot()).getAssembly()||o:n)===i||o===a),n&&u){for(var c=!1,A=!1,l=n instanceof _e.CoreParamModel?n.getParent():void 0,f=t;f;){if(f===n){c=!0;break}if(f===l){A=!0;break}f=(null===(e=f.getParent)||void 0===e?void 0:e.call(f))||(null===(r=f.getAssembly)||void 0===r?void 0:r.call(f))}return c?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof _e.CoreParamModelAssembly?i:this.getAccessoryAtFirstLevel(n,t):A?this.getAccessoryAtFirstLevel(l,t):this.designMode===ue.TOP_MODEL&&i!==n&&i!==n.getRoot()?i:this.getAccessoryAtFirstLevel(i,t)}return this.designMode===ue.TOP_MODEL?i.getAssembly()||i:this.getAccessoryAtFirstLevel(i,t)}},{key:"setCurSelectEntity",value:function(t){this.curSelectEntity=t}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(t){this.curHintEntity=t}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(t,e){this.designMode=t,t===ue.CUSTOM?(this.customModeFindSelectModel=null==e?void 0:e.findSelectModel,this.customModeFindHintModel=null==e?void 0:e.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(Qr.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(t){var e=mL[t.type];return{entityId:t.id,entityType:e}}},{key:"customModeSelectModel",value:function(t,e){var r,n;n=this.isFittingLikeModel(t)?Sb(t):this.getParamModelLite(t);var o=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,e);return Object(Qr.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(t){var e,r=this,n=this.memoGetHintModelLite(t),o=null===(e=this.customModeFindHintModel)||void 0===e?void 0:e.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(Qr.castArray)(o).filter((function(t){return t})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(t){return t instanceof _i||t instanceof Ya||t instanceof va||t instanceof Da||t instanceof ia||t instanceof vo||t instanceof En||t instanceof dr&&Boolean(t.isAppendHardware)}},{key:"getSelectEntity",value:function(t,e){var r;if(this.isMultiSelect&&this.designMode!==ue.CUSTOM){switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t}if(!r)return;var n=yL(r),o=Object(Qr.castArray)(this.curSelectEntity).filter((function(t){return t}));this.prevModeSelectEntity.length&&o.push.apply(o,iT(this.prevModeSelectEntity));var i=o[0]&&vL(o[0]);if(i&&this.isFittingLikeModel(i)!==this.isFittingLikeModel(r))return n;var a=o.filter((function(t){return t.entityId!==n.entityId}));return a.length!==o.length?a:[].concat(iT(a),[n])}switch(this.designMode){case ue.TOP_MODEL:r=this.topModelModeGetSelectModel(t,e);break;case ue.ACCESSORY:r=this.accessoryModeGetSelectModel(t,e);break;case ue.PRODUCT:r=t;break;case ue.CUSTOM:return this.customModeSelectModel(t,e)}return yL(r||t)}},{key:"getHintEntity",value:function(t){var e;switch(this.designMode){case ue.TOP_MODEL:case ue.ACCESSORY:e=this.topModelModeAndAccessoryModeHint(t);break;case ue.PRODUCT:e=t;break;case ue.CUSTOM:return this.customModeHintModel(t)}var r=this.curSelectEntity&&Object(Qr.castArray)(this.curSelectEntity)||[];if(!([].concat(iT(r),iT(this.prevModeSelectEntity)).findIndex((function(t){return t.entityId===e.id}))>-1))return yL(e)}},{key:"registerMultiSelectShortcut",value:function(t){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=t,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&sT(e.prototype,r),n&&sT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function AT(t){return(AT="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 lT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fT(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,hT(n.key),n)}}function hT(t){var e=function(t,e){if("object"!=AT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=AT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==AT(e)?e:String(e)}function pT(t,e){return(pT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function dT(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=yT(t);if(e){var o=yT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gT(this,r)}}function gT(t,e){if(e&&("object"===AT(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 yT(t){return(yT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vT=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&&pT(t,e)}(i,t);var e,r,n,o=dT(i);function i(){return lT(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"pickRayTarget",value:function(t){return t&&vL(t)}},{key:"selection",get:function(){return fL().getStateManager().kaf.selection}},{key:"hint",get:function(){return fL().getStateManager().kaf.hint}},{key:"designModeCtx",get:function(){return fL().designModeContext}}])&&fT(e.prototype,r),n&&fT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(r(593).a.Feature);function mT(t){return(mT="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 IT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ET(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,CT(n.key),n)}}function CT(t){var e=function(t,e){if("object"!=mT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=mT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mT(e)?e:String(e)}function bT(t,e){return(bT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function BT(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=PT(t);if(e){var o=PT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wT(this,r)}}function wT(t,e){if(e&&("object"===mT(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 PT(t){return(PT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ST=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&&bT(t,e)}(i,t);var e,r,n,o=BT(i);function i(){var t;return IT(this,i),(t=o.apply(this,arguments)).isMouseDown=!1,t}return e=i,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(t){if(!this.isMouseDown){var e=this.context.pick(t.sceneId,t.event),r=this.pickRayTarget(null==e?void 0:e.entity);if(Sr.eventNames().includes(Br.PLANK_FACE_HOVER)&&r instanceof _e.CoreParamModel){var n=e.entity,o=n.point,i={modelId:n.entityId,id:YE(r,o)};Sr.emit(Br.PLANK_FACE_HOVER,i)}if(r){var a=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),ue.CUSTOM,this.hint.hint(a)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&ET(e.prototype,r),n&&ET(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(vT);function _T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return QT(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 QT(t,e)}(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 QT(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 OT(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,DT(n.key),n)}}function DT(t){var e=function(t,e){if("object"!=LT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=LT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==LT(e)?e:String(e)}function xT(t,e){return(xT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function MT(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=TT(t);if(e){var o=TT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return RT(this,r)}}function RT(t,e){if(e&&("object"===LT(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 TT(t){return(TT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function LT(t){return(LT="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 jT=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":LT(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},kT=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":LT(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},NT=Xu.ib.Highlighters.WireGeometry,FT=Xu.ib.Highlighters.generateWireGeometryForHighlighterGeometry,GT=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&&xT(t,e)}(i,t);var e,r,n,o=MT(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)).models=t,r.createFittingModelBox=e,r}return e=i,(r=[{key:"getGeometry",value:function(){var t,e=new NT,r=_T(this.models);try{for(r.s();!(t=r.n()).done;){var n=t.value,o=void 0;o=n instanceof _e.CoreParamModel||n instanceof _e.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var i=FT(o);e.append(i)}}catch(t){r.e(t)}finally{r.f()}return e}}])&&OT(e.prototype,r),n&&OT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(eA.a),UT=GT=jT([Object(rA.b)([new Xu.o.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),kT("design:paramtypes",[Array,Function])],GT);function zT(t){return(zT="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 YT(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,HT(n.key),n)}}function HT(t){var e=function(t,e){if("object"!=zT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=zT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zT(e)?e:String(e)}function VT(t,e){return(VT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qT(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=KT(t);if(e){var o=KT(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return WT(this,r)}}function WT(t,e){if(e&&("object"===zT(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 KT(t){return(KT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var JT=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&&VT(t,e)}(i,t);var e,r,n,o=qT(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))._init(),t}return e=i,(r=[{key:"_init",value:function(){var t=this,e={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(e){var r=e.map((function(t){return vL(t)}));return new UT(r.filter((function(t){return t})),t.createFittingModelBox)}};this.selection.addMultiSelectionConfig(e)}},{key:"createFittingModelBox",value:function(t){var e;if(t instanceof En)e=t.boundingBox;else if(t instanceof vo)e=mx(t);else if(t instanceof _i)e=t.boundingBox;else if(t instanceof Ya)e=UR(t);else if(t instanceof va)e=cR(t);else if(t instanceof Da)e=PR(t);else{if(!(t instanceof ia))throw new Error("不支持的多选类型");e=sM(t)}return e}},{key:"onClick",value:function(t){this.triggerClick(t,ce.CLICK)}},{key:"onDblClick",value:function(t){this.designModeCtx.isMultiSelect||this.triggerClick(t,ce.DB_CLICK)}},{key:"triggerClick",value:function(t,e){var r=this.context.pick(t.sceneId,t.event),n=this.pickRayTarget(null==r?void 0:r.entity);if(Sr.eventNames().includes(Br.PLANK_FACE_CLICK)&&n instanceof _e.CoreParamModel){var o=r.entity,i=o.point,a={modelId:o.entityId,id:YE(n,i)};Sr.emit(Br.PLANK_FACE_CLICK,a)}if(n){var s=this.designModeCtx.getSelectEntity(n,e);this.designModeCtx.getDesignMode()===ue.CUSTOM?s&&this.selection.select(s):(this.selection.select(s),this.designModeCtx.setCurSelectEntity(s))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&YT(e.prototype,r),n&&YT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(vT);function XT(t){return(XT="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 ZT(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 $T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ZT(Object(r),!0).forEach((function(e){tL(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZT(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function tL(t,e,r){return(e=rL(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eL(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,rL(n.key),n)}}function rL(t){var e=function(t,e){if("object"!=XT(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=XT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==XT(e)?e:String(e)}function nL(){return(nL="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=oL(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 oL(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=uL(t)););return t}function iL(t,e){return(iL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function aL(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=uL(t);if(e){var o=uL(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return sL(this,r)}}function sL(t,e){if(e&&("object"===XT(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 uL(t){return(uL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cL,AL=new Us.SingletonRef,lL=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&&iL(t,e)}(i,t);var e,r,n,o=aL(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.pad",name:"cFrameApp",Component:vD,axrs:h_,singleton:AL},t)).stateManager=e,r.viewer=new Nf,r.designModeContext=new cT,r}return e=i,(r=[{key:"init",value:function(){nL(uL(i.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var t=this.stateManager;t.initState(),y_(t);var e=this.getDependentPlugin(zs.a),r=this.getDependentPlugin(Tm);t.kaf=e.stateManager,t.core=r.stateManager}},{key:"initNet",value:function(){nL(uL(i.prototype),"initNet",this).call(this),this.net.setSendPolicy(new ud),this.client=new Ip(this.net)}},{key:"initApp",value:function(){var t=this,e=this.stateManager,r=e.core,n=r.design,o=r.pad,i=this.getDependentPlugin(zs.a);this.viewer.config(i,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return t.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(t,e){for(var r=e.point,n=o.findModelOrAssemblyModelById(t.entityId);n&&!sI.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:iA,point:r}:$T($T({},t),{},{point:r})},paramModelSymbol:iA,filterParamModel:function(e){return!t.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(e.getCategory().categoryId)}}),i.registerEntityDocument(new JR((function(){return e.core.fittingDesign}))),e.kaf.toolbox.addIdleToolFeature((function(){return new JT})),e.kaf.toolbox.addIdleToolFeature((function(){return new ST})),i.setLayout($Q)}}])&&eL(e.prototype,r),n&&eL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Us.PluginApplication),fL=AL.instance;function hL(t){return(hL="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 pL(t,e,r){var n;return n=function(t,e){if("object"!=hL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=hL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==hL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dL(t,e){var r=new Map;return function(){var n,o=e.apply(void 0,arguments);if(r.has(o))n=r.get(o);else if(n=t.apply(void 0,arguments),Object(Qr.isObject)(n)&&Object(Qr.isFunction)(n.then)&&Object(Qr.isFunction)(n.catch)){var i=Promise.resolve(n);r.set(o,i),i.finally((function(){r.delete(o)}))}return n}}function gL(t){return t instanceof dr?iA:t instanceof wr?oA:t instanceof En?Vm:t instanceof vo?qm:t instanceof _i?Zm:t instanceof Ya?$m:t instanceof va?tI:t instanceof Da?eI:t instanceof ia?rI:void 0}function yL(t){return{entityId:t.id,entityType:gL(t)}}function vL(t){var e=t.entityId,r=t.entityType,n=fL().getStateManager().core,o=n.fittingDesign,i=n.pad;switch(r){case iA:return i.findModelOrAssemblyModelById(e);case oA:return i.findParamModelAssembly(e);case qm:return o.getGrooveFittings().find((function(t){return t.id===e}));case Vm:return o.getFittings().find((function(t){return t.id===e}));case Zm:return o.getHoleModels().find((function(t){return t.id===e}));case $m:return o.getSquareGrooveModels().find((function(t){return t.id===e}));case tI:return o.getRoundCornerGrooveModels().find((function(t){return t.id===e}));case eI:return o.getSpecialShapedGrooveModels().find((function(t){return t.id===e}));case rI:return o.getPathGrooveModels().find((function(t){return t.id===e}));default:return}}var mL=(pL(pL(pL(pL(pL(pL(pL(pL(pL(pL(cL={},me.PARAM_MODEL,iA),me.PARAM_MODEL_ASSEMBLY,oA),me.HOLE,Vm),me.GROOVE,Vm),me.HARDWARE_GROOVE,qm),me.HARDWARE,iA),me.HOLE_V2,Zm),me.SQUARE_GROOVE,$m),me.ROUND_CORNER_GROOVE,tI),me.SPECIAL_SHAPED_GROOVE,eI),pL(cL,me.PATH_GROOVE,rI));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)}))}}var BL=new Map;function wL(t){return["designid","levelid","modelid","toolType"].map((function(e){return t[e]||""})).join(":")}var PL=dL(function(){var t=bL(EL().mark((function t(e){var r,n,o;return EL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=rd(),n=wL(e),!BL.has(n)){t.next=4;break}return t.abrupt("return",BL.get(n));case 4:return t.next=6,r.get("/cos/api/fitting-design",{params:e});case 6:return o=t.sent,BL.set(n,o.data.d),t.abrupt("return",o.data.d);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),wL);function SL(t,e){var r=zm(Qv);"function"==typeof r.fittingDesignHasChanged&&r.fittingDesignHasChanged({modelId:t,isLock:e}).catch((function(){}))}var _L,QL,OL=function(){var t=bL(EL().mark((function t(e,r){var n,o;return EL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=rd(),o=wL(r),t.prev=2,t.next=5,n.post("/cos/api/fitting-design",e,{params:r});case 5:BL.set(o,e),SL(r.modelid,!0),t.next=14;break;case 9:if(t.prev=9,t.t0=t.catch(2),null===(i=t.t0)||!Object(Qr.isObject)(i)||"0"===i.c||!i.m){t.next=13;break}throw new Error("错误码:".concat(t.t0.c,";错误信息:").concat(t.t0.m));case 13:throw t.t0;case 14:case"end":return t.stop()}var i}),t,null,[[2,9]])})));return function(e,r){return t.apply(this,arguments)}}(),DL=function(){var t=bL(EL().mark((function t(e){var r,n;return EL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=rd(),n=wL(e),t.prev=2,t.next=5,r.delete("/cos/api/fitting-design",{params:e});case 5:BL.has(n)&&BL.delete(n),SL(e.modelid,!1),t.next=12;break;case 9:throw t.prev=9,t.t0=t.catch(2),t.t0;case 12:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e){return t.apply(this,arguments)}}();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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ML=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"==xL(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(xL(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 RL(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 TL(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){RL(i,n,o,a,s,"next",t)}function s(t){RL(i,n,o,a,s,"throw",t)}a(void 0)}))}}!function(t){t.UNKNOWN="UNKNOWN",t.PENDING="PENDING",t.RUNNING="RUNNING",t.SAVING="SAVING",t.SUCCESS="SUCCESS",t.FAIL="FAIL",t.CANCEL="CANCEL",t.TIMEOUT="TIMEOUT"}(_L||(_L={})),function(t){t[t.CABINET=0]="CABINET",t[t.WARDROBE=1]="WARDROBE",t[t.DOOR_WINDOW=2]="DOOR_WINDOW"}(QL||(QL={}));var LL=function(){var t=TL(ML().mark((function t(e){var r,n;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(Qr.castArray)(e),n=zm(Kv),t.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),jL=dL(function(){var t=TL(ML().mark((function t(e,r){var n;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=zm(cI.MiniAppParamModelJsonDataService),t.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:e,templateId:r}));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),kL=dL(function(){var t=TL(ML().mark((function t(e,r,n,o){var i;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=zm(cI.MiniAppParamModelJsonDataService),t.abrupt("return",i.getModelJsonDataByModelId({modelIds:e,templateId:r,ignoreResetPosition:n,timeout:o},{timeout:-1}));case 2:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}(),(function(t,e){return t+(e||"")})),NL=function(){var t=TL(ML().mark((function t(e){var r;return ML().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=zm(Gv),t.abrupt("return",r.findUnProductiveModels(e));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),FL=function(){return zm(Dv).modelAdd},GL=function(){return zm(Dv).modelUpdate},UL=function(){return zm(Dv).modelDelete},zL=function(t){return zm(Dv).toggleMonitor(t)},YL=function(){return zm(Fv).afterDetect},HL=function(t){return zm(Fv).setDetectionProduct(t)},VL=function(t){return zm(Fv).toggleDetection(t)};function qL(t){return(qL="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 WL(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){var n;return n=function(t,e){if("object"!=qL(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=qL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==qL(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JL(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */JL=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"==qL(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(qL(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 XL(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 ZL(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){XL(i,n,o,a,s,"next",t)}function s(t){XL(i,n,o,a,s,"throw",t)}a(void 0)}))}}var $L=LP()(function(){var t=ZL(JL().mark((function t(e){var r,n;return JL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=rd(),t.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:e,cache:!0}});case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?WL(Object(r),!0).forEach((function(e){KL(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):WL(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({promise:!0},Hm)),tj=LP()(function(){var t=ZL(JL().mark((function t(e){var r,n,o;return JL().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=rd(),t.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:e});case 3:return o=t.sent,t.abrupt("return",(null===(r=o.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(Qr.mapValues)(o.data.d.modelCenterMap,(function(t){return JSON.parse(t)})):{});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());function ej(t){return(ej="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 rj(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,oj(n.key),n)}}function nj(t,e,r){return e&&rj(t.prototype,e),r&&rj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function oj(t){var e=function(t,e){if("object"!=ej(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ej(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ej(e)?e:String(e)}var ij=nj((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));function aj(t){return(aj="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 sj(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sj=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"==aj(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(aj(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 uj(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 cj(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?uj(Object(r),!0).forEach((function(e){Aj(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uj(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Aj(t,e,r){return(e=dj(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lj(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 fj(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){lj(i,n,o,a,s,"next",t)}function s(t){lj(i,n,o,a,s,"throw",t)}a(void 0)}))}}function hj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pj(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,dj(n.key),n)}}function dj(t){var e=function(t,e){if("object"!=aj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=aj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==aj(e)?e:String(e)}function gj(t,e){return(gj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yj(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=mj(t);if(e){var o=mj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vj(this,r)}}function vj(t,e){if(e&&("object"===aj(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 mj(t){return(mj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ij=function(){return p_().fittingDesign.fittingDesignSense},Ej=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&&gj(t,e)}(c,t);var e,r,n,o,i,a,s,u=yj(c);function c(){return hj(this,c),u.apply(this,arguments)}return e=c,(r=[{key:"toggleAutoSave",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Ij().$actionEnableAutoSave.dispatch(t)}},{key:"isAutoSave",value:function(){return Ij().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(s=fj(sj().mark((function t(e){var r;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e&&(p_().viewParamModel.state.state.currModelId!==e||Ij().state.state.design.id!==e)){t.next=3;break}return t.abrupt("return",this.getConnectedFittingDesign());case 3:return t.next=5,TC(e);case 5:return r=t.sent,t.abrupt("return",PL(cj(cj({},r),{},{modelid:e})));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Ij().getConnectedFittingDesign(t,e)}},{key:"validateFittingDesign",value:function(t,e){var r=p_().entry.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(!r)return{validated:!1};var n=p_().fittingDesign.senseSetting.getSenseSettings();return{validated:function(t){if(!t.isClosedPath())return!1;for(var e=t.points,r=t.lines,n=e.length,o=0;o<n;o++){var i={type:Bs.POINT,val:e[o]},a={type:Bs.LINE,val:r[o]};if(!js(i.val))return!1;if(!ks(a.val))return!1;if(!Fs(i,a))return!1;for(var s=o+1;s<n;s++){var u={type:Bs.POINT,val:e[s]},c={type:Bs.LINE,val:r[s]};if(!Fs(i,u))return!1;if(!Fs(i,c))return!1;if(!Fs(a,u))return!1;if(!Fs(a,c))return!1}}return!0}(Gs(t,r,Object(Qr.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(a=fj(sj().mark((function t(e){var r,n=arguments;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},t.abrupt("return",Ij().appendFittingDataToFittingDesign(e,r));case 2:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"saveDesign",value:(i=fj(sj().mark((function t(e){var r,n,o,i=arguments;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},n=r.timeout,o=RE(n),Ij().$actionSaveFittingDesign.started.dispatch({defer:o,design:e}),t.abrupt("return",o.promise);case 5:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"clearDesign",value:(o=fj(sj().mark((function t(e){var r,n,o,i,a;return sj().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e||{}).timeout,o=void 0===n?5e4:n,i=r.modelId,a=RE(o),Ij().$actionClearFittingDesign.started.dispatch({defer:a,modelId:i}),t.abrupt("return",a.promise);case 4:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&pj(e.prototype,r),n&&pj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(ij);function Cj(t){return(Cj="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 bj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bj(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,wj(n.key),n)}}function wj(t){var e=function(t,e){if("object"!=Cj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Cj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Cj(e)?e:String(e)}function Pj(t,e){return(Pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sj(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=Qj(t);if(e){var o=Qj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _j(this,r)}}function _j(t,e){if(e&&("object"===Cj(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 Qj(t){return(Qj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Oj=(new os.default).setFromCenterAndSize(new Se.default(0,0,0),new Se.default(200,200,100)),Dj=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&&Pj(t,e)}(i,t);var e,r,n,o=Sj(i);function i(){return bj(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"resetDistanceAndLookAt",value:function(){var t=this.state,e=t.initCameraAttributes,r=e.position,n=e.lookAt,o=t.cameraAttributes.position,i=n.clone().sub(r).length(),a=n.clone().add(o.clone().sub(n).normalize().mul(i));this.updateCameraAttributes({position:a,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return Oj}}])&&Bj(e.prototype,r),n&&Bj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(OC.i);function xj(t){return(xj="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 Mj(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,Rj(n.key),n)}}function Rj(t){var e=function(t,e){if("object"!=xj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=xj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xj(e)?e:String(e)}function Tj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lj(t,e){return(Lj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function jj(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=Nj(t);if(e){var o=Nj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return kj(this,r)}}function kj(t,e){if(e&&("object"===xj(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 Nj(t){return(Nj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Fj=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&&Lj(t,e)}(i,t);var e,r,n,o=jj(i);function i(){return Tj(this,i),o.apply(this,arguments)}return e=i,r&&Mj(e.prototype,r),n&&Mj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Xu.Jb.combine({scene3D:Dj})),Gj=window.document.createElement("script");Gj.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(Gj);function Uj(t){return(Uj="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 zj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yj(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,Hj(n.key),n)}}function Hj(t){var e=function(t,e){if("object"!=Uj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uj(e)?e:String(e)}function Vj(t,e){return(Vj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qj(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=Kj(t);if(e){var o=Kj(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wj(this,r)}}function Wj(t,e){if(e&&("object"===Uj(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 Kj(t){return(Kj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jj=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&&Vj(t,e)}(i,t);var e,r,n,o=qj(i);function i(){var t;return zj(this,i),(t=o.apply(this,arguments)).rootState=new Fj,t}return e=i,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var t=new lL(this,this.rootState);t.init(),t.run()}}])&&Yj(e.prototype,r),n&&Yj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(wm.a);function Xj(t){return(Xj="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 Zj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $j(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,tk(n.key),n)}}function tk(t){var e=function(t,e){if("object"!=Xj(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xj(e)?e:String(e)}function ek(t,e){return(ek=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rk(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=ok(t);if(e){var o=ok(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nk(this,r)}}function nk(t,e){if(e&&("object"===Xj(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 ok(t){return(ok=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Jj.dependencies=[zs.a,Tm];var ik=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&&ek(t,e)}(i,t);var e,r,n,o=rk(i);function i(){return Zj(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleModelViewIntersected",value:function(t){p_().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(t)}},{key:"toggleModelViewedIntersected",value:function(t){p_().fittingDesign.intersected.toggleShowIntersectGroupData(t)}}])&&$j(e.prototype,r),n&&$j(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function ak(t){return(ak="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 sk(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sk=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"==ak(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(ak(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 uk(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 ck(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){uk(i,n,o,a,s,"next",t)}function s(t){uk(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Ak(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lk(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,fk(n.key),n)}}function fk(t){var e=function(t,e){if("object"!=ak(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ak(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ak(e)?e:String(e)}function hk(t,e){return(hk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pk(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=gk(t);if(e){var o=gk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dk(this,r)}}function dk(t,e){if(e&&("object"===ak(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 gk(t){return(gk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yk=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&&hk(t,e)}(u,t);var e,r,n,o,i,a,s=pk(u);function u(){return Ak(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"getAllCustomModels",value:(a=ck(sk().mark((function t(){return sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().scene.getAllCustomModels());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"getCustomModelById",value:(i=ck(sk().mark((function t(e){return sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().scene.getCustomModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=ck(sk().mark((function t(e){return sk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().scene.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&lk(e.prototype,r),n&&lk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(ij);function vk(t){return(vk="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 mk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ik(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,Ek(n.key),n)}}function Ek(t){var e=function(t,e){if("object"!=vk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=vk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vk(e)?e:String(e)}function Ck(t,e){return(Ck=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bk(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=wk(t);if(e){var o=wk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Bk(this,r)}}function Bk(t,e){if(e&&("object"===vk(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 wk(t){return(wk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pk=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&&Ck(t,e)}(i,t);var e,r,n,o=bk(i);function i(){return mk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setFittingHint",value:function(t){p_().fittingDesign.fittingHint.setFittingHint(t)}},{key:"clearFittingHint",value:function(t){p_().fittingDesign.fittingHint.clearFittingHint(t)}},{key:"setFittingHardwareHint",value:function(t){p_().fittingDesign.fittingHint.setFittingHardwareHint(t)}},{key:"clearFittingHardwareHint",value:function(t){p_().fittingDesign.fittingHint.clearFittingHardwareHint(t)}}])&&Ik(e.prototype,r),n&&Ik(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function Sk(t){return(Sk="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 _k(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_k=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"==Sk(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(Sk(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 Qk(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 Ok(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Qk(i,n,o,a,s,"next",t)}function s(t){Qk(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Dk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xk(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,Mk(n.key),n)}}function Mk(t){var e=function(t,e){if("object"!=Sk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Sk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Sk(e)?e:String(e)}function Rk(t,e){return(Rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tk(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=jk(t);if(e){var o=jk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lk(this,r)}}function Lk(t,e){if(e&&("object"===Sk(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 jk(t){return(jk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var kk,Nk,Fk=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&&Rk(t,e)}(s,t);var e,r,n,o,i,a=Tk(s);function s(){return Dk(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getAllFittingModels",value:(i=Ok(_k().mark((function t(e){return _k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().fittingDesign.fittingModel.getAllFittingModels(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"save",value:(o=Ok(_k().mark((function t(e){return _k().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().fittingDesign.fittingModel.save(e.models));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&xk(e.prototype,r),n&&xk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(ij),Gk=r(128);function Uk(t){return(Uk="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 zk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yk(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,Hk(n.key),n)}}function Hk(t){var e=function(t,e){if("object"!=Uk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Uk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Uk(e)?e:String(e)}function Vk(t,e){return(Vk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qk(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=Kk(t);if(e){var o=Kk(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wk(this,r)}}function Wk(t,e){if(e&&("object"===Uk(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 Kk(t){return(Kk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}!function(t){t.View3D="view3d",t.Roamer="roamer"}(kk||(kk={})),function(t){t.UP="UP",t.DOWN="DOWN",t.LEFT="LEFT",t.RIGHT="RIGHT",t.FRONT="FRONT",t.BACK="BACK"}(Nk||(Nk={}));var Jk=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&&Vk(t,e)}(i,t);var e,r,n,o=qk(i);function i(){return zk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"toggleCameraMode",value:function(t){var e;switch(t){case kk.View3D:e=GO.c.View3D;break;case kk.Roamer:e=GO.c.Roamer}fL().getStateManager().scene3D.updatePerspectiveCameraMode(e)}},{key:"moveCamera",value:function(t){var e,r=fL().getStateManager().scene3D;switch(t){case Nk.UP:case Nk.FRONT:e=Gk.a.UP;break;case Nk.DOWN:case Nk.BACK:e=Gk.a.DOWN;break;case Nk.LEFT:e=Gk.a.LEFT;break;case Nk.RIGHT:e=Gk.a.RIGHT}if(e){if(t===Nk.UP||t===Nk.DOWN)return void r.onQEPress(e);r.onWASDPress(e)}}},{key:"focusFace",value:function(t){return p_().scene.focusFace(t)}},{key:"updateCameraType",value:function(t){return p_().scene.updateCameraType(t)}},{key:"lookAt",value:function(t){return p_().scene.lookAt(t)}},{key:"unstable__adaptViewer",value:function(t){return p_().scene.adaptViewer(t)}},{key:"toggleCameraTranslateMode",value:function(t){var e=t===de.Default?GO.a.defaultMode:GO.a.classicalMode;fL().getStateManager().scene3D.setCameraControlMode(e)}}])&&Yk(e.prototype,r),n&&Yk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function Xk(t){return(Xk="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 Zk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $k(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,tN(n.key),n)}}function tN(t){var e=function(t,e){if("object"!=Xk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xk(e)?e:String(e)}function eN(t,e){return(eN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rN(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=oN(t);if(e){var o=oN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nN(this,r)}}function nN(t,e){if(e&&("object"===Xk(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 oN(t){return(oN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iN=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&&eN(t,e)}(i,t);var e,r,n,o=rN(i);function i(){return Zk(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDefaultHint",value:function(t){p_().fittingDesign.plankFaceHint.setDefaultHintConfig(t)}},{key:"setModelHint",value:function(t){p_().fittingDesign.plankFaceHint.setModelHint(t)}},{key:"clearModelHint",value:function(t){p_().fittingDesign.plankFaceHint.clearModelHint(t)}}])&&$k(e.prototype,r),n&&$k(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function aN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */aN=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"==gN(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(gN(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 sN(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 uN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){sN(i,n,o,a,s,"next",t)}function s(t){sN(i,n,o,a,s,"throw",t)}a(void 0)}))}}function cN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AN(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,lN(n.key),n)}}function lN(t){var e=function(t,e){if("object"!=gN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=gN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gN(e)?e:String(e)}function fN(t,e){return(fN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function hN(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=dN(t);if(e){var o=dN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pN(this,r)}}function pN(t,e){if(e&&("object"===gN(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 dN(t){return(dN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function gN(t){return(gN="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 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":gN(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":gN(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&&fN(t,e)}(s,t);var e,r,n,o,i,a=hN(s);function s(){return cN(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"getParamData",value:(i=uN(aN().mark((function t(e){return aN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.getParamModelJsonData(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"getParamIntersected",value:(o=uN(aN().mark((function t(e){var r;return aN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p_().fittingDesign.intersected.getParamModelIntersectedData(e);case 2:return r=t.sent,t.abrupt("return",(n=r,{intersectedGroups:Object(Qr.map)(n.intersectedGroups,(function(t){return jE(jE({},t),{},{intersecteds:Object(Qr.map)(t.intersecteds,(function(t){return Object(Qr.omit)(t,["shell"])}))})}))}));case 4:case"end":return t.stop()}var n}),t)}))),function(t){return o.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.ignoreCategory||(t.ignoreCategory=he),p_().viewParamModel.getTopModelList(t)}},{key:"getParamModelPhotoById",value:function(t){return p_().viewParamModel.getParamModelPhotoData(t)}}])&&AN(e.prototype,r),n&&AN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(ij);function CN(t){return(CN="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BN(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"!=CN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=CN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==CN(e)?e:String(e)}function PN(t,e){return(PN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SN(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=QN(t);if(e){var o=QN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _N(this,r)}}function _N(t,e){if(e&&("object"===CN(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 QN(t){return(QN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}mN([ae.observeAsyncApiDeco({serviceName:"ModelService"}),IN("design:type",Function),IN("design:paramtypes",["function"!=typeof!1&&Object]),IN("design:returntype","function"==typeof(yN="undefined"!=typeof Promise&&Promise)?yN:Object)],EN.prototype,"getParamData",null),mN([ae.observeAsyncApiDeco({serviceName:"ModelService"}),IN("design:type",Function),IN("design:paramtypes",["function"!=typeof!1&&Object]),IN("design:returntype","function"==typeof(vN="undefined"!=typeof Promise&&Promise)?vN:Object)],EN.prototype,"getParamIntersected",null);var ON=function(){return p_().select},DN=function(){return fL().designModeContext},xN=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&&PN(t,e)}(i,t);var e,r,n,o=SN(i);function i(){var t;return bN(this,i),(t=o.apply(this,arguments)).hasWatchSelectionChange=!1,t.plankFaceClickEvent={on:function(t){Sr.on(Br.PLANK_FACE_CLICK,t)},once:function(t){Sr.once(Br.PLANK_FACE_CLICK,t)},off:function(t){Sr.off(Br.PLANK_FACE_CLICK,t)}},t.plankFaceHoverEvent={on:function(t){Sr.on(Br.PLANK_FACE_HOVER,t)},once:function(t){Sr.once(Br.PLANK_FACE_HOVER,t)},off:function(t){Sr.off(Br.PLANK_FACE_HOVER,t)}},t.onSelectedChanged=function(){Sr.emit(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t.getSelected())},t}return e=i,(r=[{key:"getSelected",value:function(){return ON().state.state.selectedDataV2.map(this._genElement).filter((function(t){return!!t}))}},{key:"select",value:function(t){var e=Object(Qr.castArray)(t).map(this._genEntityFromElement);ON().select(e),DN().setCurSelectEntity(e)}},{key:"unSelect",value:function(t){if(t){var e=Object(Qr.castArray)(t).map(this._genEntityFromElement);ON().unSelect(e);var r=DN().getCurSelectEntity();r&&(Array.isArray(r)?DN().setCurSelectEntity(Object(Qr.difference)(r,e)):e.includes(r)&&DN().setCurSelectEntity(void 0))}else ON().select(),DN().setCurSelectEntity(void 0)}},{key:"on",value:function(t){this.startWatchSelectedChangedEvent(),Sr.on(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"off",value:function(t){Sr.off(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"once",value:function(t){this.startWatchSelectedChangedEvent(),Sr.once(Br.SELECTION_SERVICE_V2_MODEL_CHANGE,t)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,ON().on(f_.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(t){var e={entityId:t.id,entityType:mL[t.type]};return"__intersected_model"===t.type&&(e.entityType=Wm),e}},{key:"_genElement",value:function(t){var e,r=t.id;if(t instanceof dr?t.isAppendHardware?(e=me.HARDWARE,r=t.hardwareData.id):e=me.PARAM_MODEL:t instanceof wr?e=me.PARAM_MODEL_ASSEMBLY:t instanceof vo?e=me.HARDWARE_GROOVE:t instanceof En?e=t.type===J.HOLE?me.HOLE:me.GROOVE:t instanceof _i?e=me.HOLE_V2:t instanceof Ya?e=me.SQUARE_GROOVE:t instanceof va?e=me.ROUND_CORNER_GROOVE:t instanceof Da?e=me.SPECIAL_SHAPED_GROOVE:t instanceof ia&&(e=me.PATH_GROOVE),e)return{id:r,type:e}}},{key:"__onDestroy",value:function(){ON().off(f_.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&BN(e.prototype,r),n&&BN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function MN(t){return(MN="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 RN(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */RN=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"==MN(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(MN(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 TN(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 LN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){TN(i,n,o,a,s,"next",t)}function s(t){TN(i,n,o,a,s,"throw",t)}a(void 0)}))}}function jN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kN(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,NN(n.key),n)}}function NN(t){var e=function(t,e){if("object"!=MN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=MN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==MN(e)?e:String(e)}function FN(t,e){return(FN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GN(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=zN(t);if(e){var o=zN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return UN(this,r)}}function UN(t,e){if(e&&("object"===MN(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 zN(t){return(zN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var YN=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&&FN(t,e)}(u,t);var e,r,n,o,i,a,s=GN(u);function u(){return jN(this,u),s.apply(this,arguments)}return e=u,(r=[{key:"viewSelected",value:(a=LN(RN().mark((function t(){return RN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.viewSelectedParamModel());case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"viewModelById",value:(i=LN(RN().mark((function t(e){return RN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.viewParamModelById(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"resetPerspective",value:function(){var t=fL().getStateManager().scene3D;t.updateEnableCameraAnimation(!0),t.reset()}},{key:"toggleModelBorder",value:function(t){p_().scene.$actionToggleRenderBorder.dispatch(t)}},{key:"toggleModelTransparent",value:function(t){p_().scene.$actionToggleRenderTranslucent.dispatch(t)}},{key:"toggleModelFullTransparent",value:function(t){p_().scene.$actionToggleRenderMode.dispatch({mode:t?Um.FULLY_TRANSPARENT:Um.SHADING})}},{key:"toggleWhiteMode",value:function(t){p_().scene.$whiteMode.dispatch(t)}},{key:"setting",value:function(t){p_().fittingDesign.senseSetting.$actionSenseSetting.dispatch(t)}},{key:"refreshModel",value:(o=LN(RN().mark((function t(){return RN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.refreshCustomModelData());case 1:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"setInteractionPriority",value:function(t){if(Object.values(t).some((function(t){return"number"!=typeof t})))throw new Error("Interaction priority must be a number.");p_().scene.setInteractionPriority.dispatch(t)}},{key:"getInteractionPriority",value:function(){return Object(Qr.cloneDeep)(p_().scene.state.state.interactionPriority)}}])&&kN(e.prototype,r),n&&kN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(ij);function HN(t){return(HN="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 VN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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"!=HN(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=HN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==HN(e)?e:String(e)}function KN(t,e){return(KN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function JN(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=ZN(t);if(e){var o=ZN(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return XN(this,r)}}function XN(t,e){if(e&&("object"===HN(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 ZN(t){return(ZN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $N=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&&KN(t,e)}(i,t);var e,r,n,o=JN(i);function i(){return VN(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"parseModelPlankPath",value:function(t){return e=t.modelID,r=t.data,n=[],o=r.path?Hn(ye.OUTER,r.path):void 0,i=r.holes.map((function(t){return Hn(ye.INNER,t)})),a=new Map,o&&(n.push(o),a.set(o,i)),n.push.apply(n,LI(i)),new GI(e,n,a);var e,r,n,o,i,a}},{key:"syncModelPlankPath",value:function(t){qI(t)}}])&&qN(e.prototype,r),n&&qN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function tF(t){return(tF="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 eF(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */eF=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"==tF(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(tF(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 rF(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 nF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oF(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"!=tF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=tF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tF(e)?e:String(e)}function aF(t,e){return(aF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sF(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=cF(t);if(e){var o=cF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return uF(this,r)}}function uF(t,e){if(e&&("object"===tF(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 cF(t){return(cF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var AF=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&&aF(t,e)}(s,t);var e,r,n,o,i,a=sF(s);function s(){return nF(this,s),a.apply(this,arguments)}return e=s,(r=[{key:"stable",value:(o=eF().mark((function t(e){return eF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p_().viewParamModel.validateModelStable(e.modelId));case 1: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){rF(i,r,n,a,s,"next",t)}function s(t){rF(i,r,n,a,s,"throw",t)}a(void 0)}))},function(t){return i.apply(this,arguments)})}])&&oF(e.prototype,r),n&&oF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(ij);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)}function fF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hF(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,pF(n.key),n)}}function pF(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 dF(t,e){return(dF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gF(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=vF(t);if(e){var o=vF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return yF(this,r)}}function yF(t,e){if(e&&("object"===lF(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 vF(t){return(vF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var mF=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&&dF(t,e)}(i,t);var e,r,n,o=gF(i);function i(){var t;return fF(this,i),(t=o.apply(this,arguments)).drawDimensionLine=function(t,e){return p_().rulerLine.addDimensionRuler(t,e)},t}return e=i,(r=[{key:"removeDimensionLine",value:function(t){return p_().rulerLine.removeDimensionRuler(t)}},{key:"clearDimensionLine",value:function(){return p_().rulerLine.removeDimensionRuler()}},{key:"drawSpacingDistanceLine",value:function(t,e){return p_().rulerLine.addSpacingDistanceRuler(t,e)}},{key:"removeSpacingDistanceLine",value:function(t){return p_().rulerLine.removeSpacingDistanceRuler(t)}},{key:"clearSpacingDistanceLine",value:function(){return p_().rulerLine.removeSpacingDistanceRuler()}}])&&hF(e.prototype,r),n&&hF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function IF(t){return(IF="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 EF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CF(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,bF(n.key),n)}}function bF(t){var e=function(t,e){if("object"!=IF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=IF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==IF(e)?e:String(e)}function BF(t,e){return(BF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wF(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=SF(t);if(e){var o=SF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return PF(this,r)}}function PF(t,e){if(e&&("object"===IF(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 SF(t){return(SF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _F=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&&BF(t,e)}(i,t);var e,r,n,o=wF(i);function i(){return EF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setDesignMode",value:function(t){var e=t.mode,r=t.customModeCb;fL().designModeContext.setDesignMode(e,r)}},{key:"registerMultiSelectShortcut",value:function(t){fL().designModeContext.registerMultiSelectShortcut(t)}}])&&CF(e.prototype,r),n&&CF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function QF(t){return(QF="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 OF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function DF(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,xF(n.key),n)}}function xF(t){var e=function(t,e){if("object"!=QF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=QF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==QF(e)?e:String(e)}function MF(t,e){return(MF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function RF(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=LF(t);if(e){var o=LF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return TF(this,r)}}function TF(t,e){if(e&&("object"===QF(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 LF(t){return(LF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jF=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&&MF(t,e)}(i,t);var e,r,n,o=RF(i);function i(){return OF(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"setGetJsonConfig",value:function(t){if(!t||"object"!==QF(t))throw new Error("option 必须是一个对象");!function(t,e){JE[t]=WE(WE({},JE[t]),e)}("getJsonConfig",t)}}])&&DF(e.prototype,r),n&&DF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij);function kF(t){return(kF="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 NF(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */NF=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"==kF(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(kF(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 FF(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 GF(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){FF(i,n,o,a,s,"next",t)}function s(t){FF(i,n,o,a,s,"throw",t)}a(void 0)}))}}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,YF(n.key),n)}}function YF(t){var e=function(t,e){if("object"!=kF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=kF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==kF(e)?e:String(e)}function HF(t,e){return(HF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function VF(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=WF(t);if(e){var o=WF(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qF(this,r)}}function qF(t,e){if(e&&("object"===kF(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 WF(t){return(WF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var KF=function(){return p_().fittingDesign.fittingViewer},JF=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&&HF(t,e)}(l,t);var e,r,n,o,i,a,s,u,c,A=VF(l);function l(){return UF(this,l),A.apply(this,arguments)}return e=l,(r=[{key:"addFitting",value:(c=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().addFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return c.apply(this,arguments)})},{key:"clearFitting",value:(u=GF(NF().mark((function t(){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:KF().clearFitting();case 1:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"getFitting",value:(s=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().getFitting(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"addHardware",value:(a=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().addHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"clearHardware",value:(i=GF(NF().mark((function t(){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:KF().clearHardware();case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getHardware",value:(o=GF(NF().mark((function t(e){return NF().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",KF().getHardware(e));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})}])&&zF(e.prototype,r),n&&zF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(ij);function XF(t){return(XF="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 ZF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $F(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,tG(n.key),n)}}function tG(t){var e=function(t,e){if("object"!=XF(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=XF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==XF(e)?e:String(e)}function eG(t,e){return(eG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rG(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=oG(t);if(e){var o=oG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return nG(this,r)}}function nG(t,e){if(e&&("object"===XF(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 oG(t){return(oG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var iG=function(){return p_().detection},aG=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&&eG(t,e)}(i,t);var e,r,n,o=rG(i);function i(){var t;return ZF(this,i),(t=o.apply(this,arguments)).onAfterDetect=function(t){Sr.on(Br.DETECT_RESULT_CHANGE,t)},t.offAfterDetect=function(t){Sr.off(Br.DETECT_RESULT_CHANGE,t)},t}return e=i,(r=[{key:"enableDetection",value:function(){iG().enableDetectionOnce()}},{key:"setDetectionUI",value:function(t){iG().setDetectionUIOnce(t)}}])&&$F(e.prototype,r),n&&$F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(ij),sG=r(317),uG=r.n(sG),cG=new Us.I18NManager,AG="custom_order_split",lG={"custom.pad.resetPerspective":"重置视角","custom.pad.confirm":"确定","custom.pad.cannotAdd":"无法适配该模型","custom.pad.chooseBasicModule":"请选择基础模块","custom.pad.loadSeriesFailed":"加载系列失败","custom.pad.invalidSeries":"系列信息无效","custom.pad.invalidURL":"页面走丢了","custom.pad.loadDesignFailed":"产品加载失败","custom.pad.invalidDesign":"产品信息无效","custom.pad.loadFailed":"数据加载失败","custom.pad.invalidData":"数据无效","custom.pad.saveFailed":"产品保存失败","custom.pad.previewFailed":"生成预览图失败","custom.pad.save":"保存","custom.pad.saveAs":"另存为","custom.pad.saveTitle":"产品保存","custom.pad.saveAsTitle":"产品另存为","custom.pad.saveName":"产品名称","custom.pad.saveNameHolder":"请输入产品名称","custom.pad.saveRequired":"该项为必填项","custom.pad.savePos":"存储位置","custom.pad.savePersonal":"个人库","custom.pad.saveEnterprise":"企业库","custom.pad.cancel":"取消","custom.pad.askSave":"是否保存?","custom.pad.askSaveDesc":"是否要保存当前产品方案?","custom.pad.notSave":"不保存","custom.pad.getAuthFailed":"获取用户账号类型失败","custom.pad.uploadCoverFailed":"上传图片封面失败","custom.pad.hideDoor":"隐藏柜门","custom.pad.showDoor":"显示柜门","custom.pad.showDoorTip":"柜门已隐藏, 点击此处可显示柜门","custom.pad.shadingMode":"材质","custom.pad.outlineShadingMode":"材质 + 线框","custom.pad.frameStyle":"柜体样式","custom.pad.replaceFail":"修改样式失败","custom.pad.productNameExist":"产品名称已存在","custom.pad.saveSuccess":"产品保存成功","custom.pad.defaultSaveName":"未命名","custom.pad.showRuler":"显示尺寸","custom.pad.hideRuler":"隐藏尺寸"};function fG(t){return(fG="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 hG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */hG=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"==fG(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(fG(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 pG(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 dG(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){pG(i,n,o,a,s,"next",t)}function s(t){pG(i,n,o,a,s,"throw",t)}a(void 0)}))}}var gG=Object(Qr.once)((function(){return!!Object(Ud.parseServQueryParams)()}));function yG(){return vG.apply(this,arguments)}function vG(){return(vG=dG(hG().mark((function t(){var e,r,n=arguments;return hG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=Ud.servkit.createTerminal({id:e.clientId||"custom-order-split",type:Ud.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:Ud.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.parent,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */mG=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"==OG(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(OG(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 IG(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 EG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CG(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,BG(n.key),n)}}function bG(t,e,r){return e&&CG(t.prototype,e),r&&CG(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function BG(t){var e=function(t,e){if("object"!=OG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=OG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==OG(e)?e:String(e)}function wG(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&&PG(t,e)}function PG(t,e){return(PG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SG(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=QG(t);if(e){var o=QG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _G(this,r)}}function _G(t,e){if(e&&("object"===OG(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 QG(t){return(QG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function OG(t){return(OG="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 DG,xG,MG=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":OG(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},RG=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":OG(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},TG=function(t){wG(r,t);var e=SG(r);function r(){return EG(this,r),e.apply(this,arguments)}return bG(r,[{key:"postMessageToHost",value:function(t,e){return Object(Ud.API_UNSUPPORT)()}}]),r}(Ud.ServService);MG([Ud.anno.decl.event(),RG("design:type","function"==typeof(DG=void 0!==Ud.ServEventer&&Ud.ServEventer)?DG:Object)],TG.prototype,"watcher",void 0),MG([Ud.anno.decl.api(),RG("design:type",Function),RG("design:paramtypes",[Object,String]),RG("design:returntype","function"==typeof(xG=void 0!==Ud.ServAPIRetn&&Ud.ServAPIRetn)?xG:Object)],TG.prototype,"postMessageToHost",null);var LG=function(t){wG(o,t);var e,r,n=SG(o);function o(){return EG(this,o),n.apply(this,arguments)}return bG(o,[{key:"postMessageToHost",value:(e=mG().mark((function t(e,r){return mG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.parent.postMessage(e,null!=r?r:"*");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){IG(i,n,o,a,s,"next",t)}function s(t){IG(i,n,o,a,s,"throw",t)}a(void 0)}))},function(t,e){return r.apply(this,arguments)})}]),o}(TG=MG([Ud.anno.decl({id:"com.custom.miniapp.model.viewer.booter.message.service",version:"1.0.0"})],TG));function jG(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */jG=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"==WG(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(WG(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 kG(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 NG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FG(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,UG(n.key),n)}}function GG(t,e,r){return e&&FG(t.prototype,e),r&&FG(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function UG(t){var e=function(t,e){if("object"!=WG(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=WG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WG(e)?e:String(e)}function zG(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&&YG(t,e)}function YG(t,e){return(YG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function HG(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=qG(t);if(e){var o=qG(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return VG(this,r)}}function VG(t,e){if(e&&("object"===WG(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 qG(t){return(qG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function WG(t){return(WG="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)}LG=MG([Ud.anno.impl()],LG);var KG,JG=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":WG(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},XG=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":WG(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},ZG=function(t){zG(r,t);var e=HG(r);function r(){return NG(this,r),e.apply(this,arguments)}return GG(r,[{key:"heart",value:function(){return Object(Ud.API_UNSUPPORT)()}}]),r}(Ud.ServService);JG([Ud.anno.decl.api(),XG("design:type",Function),XG("design:paramtypes",[]),XG("design:returntype","function"==typeof(KG=void 0!==Ud.ServAPIRetn&&Ud.ServAPIRetn)?KG:Object)],ZG.prototype,"heart",null);var $G=function(t){zG(o,t);var e,r,n=HG(o);function o(){return NG(this,o),n.apply(this,arguments)}return GG(o,[{key:"heart",value:(e=jG().mark((function t(){return jG().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return");case 1:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){kG(i,n,o,a,s,"next",t)}function s(t){kG(i,n,o,a,s,"throw",t)}a(void 0)}))},function(){return r.apply(this,arguments)})}]),o}(ZG=JG([Ud.anno.decl({id:"com.custom.miniapp.model.viewer.booter.session.service",version:"1.0.0"})],ZG));function tU(t){return(tU="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 eU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */eU=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"==tU(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(tU(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 rU(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 nU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){rU(i,n,o,a,s,"next",t)}function s(t){rU(i,n,o,a,s,"throw",t)}a(void 0)}))}}function oU(t){return iU.apply(this,arguments)}function iU(){return(iU=nU(eU().mark((function t(e){var r,n,o;return eU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.onlineChecker,n=e.interval,o=e.onBreak,t.next=3,ME(n);case 3:return t.next=5,r();case 5:t.sent?oU(e):o&&"function"==typeof o&&o();case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function aU(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,uU(n.key),n)}}function sU(t,e,r){return e&&aU(t.prototype,e),r&&aU(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uU(t){var e=function(t,e){if("object"!=dU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=dU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dU(e)?e:String(e)}function cU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AU(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&&lU(t,e)}function lU(t,e){return(lU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fU(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=pU(t);if(e){var o=pU(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return hU(this,r)}}function hU(t,e){if(e&&("object"===dU(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 pU(t){return(pU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dU(t){return(dU="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)}$G=JG([Ud.anno.impl()],$G);var gU,yU=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":dU(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},vU=function(t,e){if("object"===("undefined"==typeof Reflect?"undefined":dU(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},mU=function(t){AU(r,t);var e=fU(r);function r(){return cU(this,r),e.apply(this,arguments)}return sU(r)}(Ud.ServService);yU([Ud.anno.decl.event(),vU("design:type","function"==typeof(gU=void 0!==Ud.ServEventer&&Ud.ServEventer)?gU:Object)],mU.prototype,"offlineWatcher",void 0);var IU=function(t){AU(r,t);var e=fU(r);function r(){return cU(this,r),e.apply(this,arguments)}return sU(r)}(mU=yU([Ud.anno.decl({id:"com.custom.miniapp.model.viewer.independent.state.service",version:"1.0.0"})],mU));IU=yU([Ud.anno.impl()],IU);var EU=[{decl:mU,impl:IU}];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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bU=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"==CU(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(CU(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 BU(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 wU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){BU(i,n,o,a,s,"next",t)}function s(t){BU(i,n,o,a,s,"throw",t)}a(void 0)}))}}var PU="custom-order-split-transfer";function SU(t){return _U.apply(this,arguments)}function _U(){return(_U=wU(bU().mark((function t(e){var r,n,o=arguments;return bU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=Ud.servkit.createTerminal({id:r.clientId||PU,type:Ud.EServTerminal.MASTER,server:{serviceRefer:/.*/,service:{services:[]}},session:{channel:{type:Ud.EServChannel.WINDOW,config:{master:{createWindow:function(t){return{target:e,origin:"*"}},destroyWindow:function(){e.close()}}}}}}),t.next=4,n.openSession({timeout:r.timeout||3e4});case 4:return t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function QU(){return OU.apply(this,arguments)}function OU(){return(OU=wU(bU().mark((function t(){var e,r,n=arguments;return bU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},r=Ud.servkit.createTerminal({id:e.clientId||PU,type:Ud.EServTerminal.SLAVE,server:{serviceRefer:/.*/,service:{services:EU}},session:{channel:{type:Ud.EServChannel.WINDOW,config:{slave:{getWindow:function(t){return{target:window.opener,window:window}}}}}}}),t.next=4,r.openSession({timeout:e.timeout||3e4});case 4:return t.abrupt("return",r);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var DU=r(836),xU=r(150);function MU(t){return(MU="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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */RU=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"==MU(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(MU(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 TU(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 LU(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 LU(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 LU(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 jU(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)}window.React=Hs.a;var kU=document.getElementById("root");function NU(){return Promise.resolve([DU.a,Jj]).then(function(){var t,e=(t=RU().mark((function t(e){var r,n,o,i;return RU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=TU(e,2),n=r[0],o=r[1],i=new n,t.next=4,i.registerPlugin(o).start({fpsDetectorEnabled:!0});case 4:return t.next=6,FU(i.getAppNodeId());case 6:document.body.removeChild(kU);case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){jU(i,n,o,a,s,"next",t)}function s(t){jU(i,n,o,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()).catch((function(t){Object(xU.unmountComponentAtNode)(kU),Object(xU.render)(Hs.a.createElement(x_,null),kU),console.error("micros/pad",t)}))}function FU(t){var e=RE(5e3);return function r(){requestAnimationFrame((function(){document.querySelector("#".concat(t))?e.resolve():r()}))}(),e.promise}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 UU(t,e,r){return(e=qU(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zU(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zU=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"==GU(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(GU(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 YU(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 HU(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){YU(i,n,o,a,s,"next",t)}function s(t){YU(i,n,o,a,s,"throw",t)}a(void 0)}))}}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"!=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)}(t,"string");return"symbol"==GU(e)?e:String(e)}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.serviceMap=new Map,this.getHost=function(){return t.isIndependentMiniApp()?{booter:window.opener,postMessage:function(t,r){return e.sappSDK.client.getService(TG).postMessageToHost(t,r)},onMessageReceive:function(t){return e.sappSDK.client.getService(TG).watcher.on(t)}}:{postMessage:function(t,e){return window.parent.postMessage(t,null!=e?e:"*")},onMessageReceive:function(t){return window.addEventListener("message",t)}}},this.initLange(ie.ZH_CN,{zh_CN:lG}),function(t){Rm=t}(this)}var e,r,n,o,i;return e=t,r=[{key:"startOnApiCalledEvent",value:function(){var t=this,e={on:function(t){return Sr.on(Br.API_CALLED,t),function(){return Sr.off(Br.API_CALLED,t)}},once:function(t){return Sr.once(Br.API_CALLED,t),function(){return Sr.off(Br.API_CALLED,t)}},emit:function(t){Sr.emit(Br.API_CALLED,t)}};ae.setEvent(e),e.on((function(e){var r=e.args,n=e.errMsg,o=e.status,i=e.apiName,a=e.duration,s=e.serviceName,u=t.getCustomMiniAppService(Tv);if(u){var c="".concat(s,".").concat(i);if(u.logApiCalledInfo({status:o,apiType:"CUSTOM_SPLIT_API",apiName:c,duration:a}),!o){var A;A=n instanceof Error?[n.name,n.message,n.stack].filter((function(t){return!!t})).join("\n"):null==n?"unknown":"errorCodeData"in n?JSON.stringify(n.errorCodeData):JSON.stringify(n);var l="\n called ".concat(c," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(A,"\n ");u.logApiError({messagePrefix:"miniAppApiCalledError",name:"Error",message:l,stack:""})}}}))}},{key:"isInCustomMiniAppMode",value:function(){return gG()}},{key:"createDebugUtils",value:function(){var t=this.serviceMap,e={enableDebug:function(){window.__customsdk__.services=t}};window.__customsdk__=e}},{key:"start",value:(i=HU(zU().mark((function e(r){var n,o=this;return zU().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!t.isIndependentMiniApp()){e.next=11;break}return e.next=4,QU(r);case 4:return this.sappSDK=e.sent,e.next=7,ME(30);case 7:oU({onlineChecker:function(){var t=HU(zU().mark((function t(){return zU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.race([o.sappSDK.client.getService(ZG).heart().then((function(){return!0})),ME(2e3).then((function(){return Promise.resolve(!1)}))]);case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",!1);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),interval:5e3,onBreak:function(){return window.close()}}),window.addEventListener("beforeunload",(function(){o.sappSDK.server.getService(mU).offlineWatcher.emit()})),e.next=23;break;case 11:if(!this.isInCustomMiniAppMode()){e.next=18;break}if(Ud.sappSDK.isStarted){e.next=15;break}return e.next=15,Ud.sappSDK.setConfig({useTerminalId:null==r?void 0:r.clientId,onClose:function(){var t=HU(zU().mark((function t(e){return zU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.stop();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}).start();case 15:this.sappSDK=Ud.sappSDK,e.next=23;break;case 18:return e.next=20,ME(30);case 20:return e.next=22,yG(r);case 22:this.sappSDK=e.sent;case 23:return this.startOnApiCalledEvent(),e.next=26,NU();case 26:(n=this.getCustomMiniAppService(Sv))?(rd().setMiniAppHttpProxyClientService(n),fI(rd())):fI(ed()),(oI=new lI.AttachedService).config.setRequestClient(aI),iI=new lI.ParamModelDataService({paramModelConstructor:dr,requestClient:aI}),new lI.ParamModelAssemblyDataService({paramModelAssemblyConstructor:wr,requestClient:aI});case 29:case"end":return e.stop()}}),e,this)}))),function(t){return i.apply(this,arguments)})},{key:"initLange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie.ZH_CN,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(Qr.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),uG.a.init({lang:t,debug:!1,initImmediate:!0,translatorType:sG.ENUM.TranslatorType.I18next,packages:[AG],resource:UU({},AG,e)}),cG.init({namespace:AG,resources:AG})}},{key:"stop",value:(o=HU(zU().mark((function t(){var e;return zU().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.getCustomMiniAppService(Qv))){t.next=4;break}return t.next=4,e.lockModelBySplit();case 4:this.serviceMap.forEach((function(t){Object(Qr.isFunction)(t.__onDestroy)&&t.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getService",value:function(t){if(ij.isPrototypeOf(t)){var e=this.serviceMap,r=e.get(t);return r||(r=new t,e.set(t,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof Ud.SappSDK?e.getService(t):e.client.getService(t)}},{key:"getCustomMiniAppServiceUnSafe",value:function(t){return this.getCustomMiniAppService(t)}}],n=[{key:"isIndependentMiniApp",value:function(){return!!window.opener}}],r&&VU(e.prototype,r),n&&VU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),KU=[{decl:ZG,impl:$G},{decl:TG,impl:LG}];function JU(t){return(JU="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 XU(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZU(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,tz(n.key),n)}}function $U(t,e,r){return e&&ZU(t.prototype,e),r&&ZU(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function tz(t){var e=function(t,e){if("object"!=JU(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=JU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==JU(e)?e:String(e)}function ez(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&&rz(t,e)}function rz(t,e){return(rz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nz(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=iz(t);if(e){var o=iz(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return oz(this,r)}}function oz(t,e){if(e&&("object"===JU(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 iz(t){return(iz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function az(t){return function(t){if(Array.isArray(t))return sz(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 sz(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 sz(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 sz(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 uz=[cI.MiniAppDesignBaseInfoService,cI.MiniAppParamModelJsonDataService,Tv,Ov,Sv,Qv,Kv,Fv,Dv,Gv];function cz(){for(var t=new Map,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){var r=e.meta(),n=(null==r?void 0:r.id)||"";t.has(n)||t.set(n,e)})),az(t.values())}var Az=function(t){return function(e){ez(n,e);var r=nz(n);function n(){return XU(this,n),r.apply(this,arguments)}return $U(n,[{key:"meta",value:function(){return t}}],[{key:"meta",value:function(){return t}}]),n}(Ud.ServService)};function lz(t,e,r){return t.map((function(t){var n=t.meta()||{},o=n.apis,i=n.evts,a=function(t){ez(r,t);var e=nz(r);function r(){return XU(this,r),e.apply(this,arguments)}return $U(r)}(t);return null==o||o.forEach((function(r){var n=r.name;a.prototype[n]=e(t)[n]})),null==i||i.forEach((function(n){var o=n.name;e(t)[o].on((function(e){r(t)[o].emit(e)}))})),{decl:t,impl:a}}))}function fz(t){return(fz="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 hz(t){return function(t){if(Array.isArray(t))return pz(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 pz(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 pz(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 pz(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 dz(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */dz=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"==fz(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(fz(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 gz(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 yz(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gz(i,n,o,a,s,"next",t)}function s(t){gz(i,n,o,a,s,"throw",t)}a(void 0)}))}}function vz(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,mz(n.key),n)}}function mz(t){var e=function(t,e){if("object"!=fz(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=fz(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fz(e)?e:String(e)}var Iz=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.proxyTerminals=new Set,this.initializeServer=function(){var t=yz(dz().mark((function t(e){var n;return dz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!gG()){t.next=7;break}if(Ud.sappSDK.isStarted){t.next=4;break}return t.next=4,Ud.sappSDK.setConfig({useTerminalId:null==e?void 0:e.clientId}).start();case 4:r.sappSDK=Ud.sappSDK,t.next=12;break;case 7:return t.next=9,ME(30);case 9:return t.next=11,yG(e);case 11:r.sappSDK=t.sent;case 12:return t.next=14,r.getCustomMiniAppService(_v).getAllAvailableService();case 14:return n=t.sent,window.addEventListener("message",(function(t){t.source===window.parent&&r.proxyTerminals.forEach((function(e){e.server.getService(TG).watcher.emit({data:t.data,origin:t.origin})}))})),t.abrupt("return",n);case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.serverDefer=this.initializeServer(e)}var e,r,n,o;return e=t,(r=[{key:"getCustomMiniAppService",value:function(t){var e=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return e instanceof Ud.SappSDK?e.getService(t):e.client.getService(t)}},{key:"bootstrap",value:(o=yz(dz().mark((function t(e){var r,n,o,i,a,s,u,c,A=this;return dz().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.proxyTerminals.size>0)){t.next=2;break}throw new Error("当前仅支持打开一个独立小程序");case 2:return t.next=4,this.serverDefer;case 4:if(r=t.sent,n=e.url,o=window.open(n)){t.next=9;break}throw new Error("打开小程序失败!请检查url或者主动解除弹窗限制");case 9:return i=function(){a.closeSession(),A.proxyTerminals.delete(a)},t.next=12,SU(o);case 12:return a=t.sent,s=r.map(Az),u=cz.apply(void 0,hz(s).concat(hz(uz))),c=lz(u,(function(t){return A.getCustomMiniAppService(t)}),(function(t){return a.server.getService(t)})),a.server.addServices([].concat(hz(c),hz(KU))),a.client.getService(mU).offlineWatcher.on(i),this.proxyTerminals.add(a),t.abrupt("return",o);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})}])&&vz(e.prototype,r),n&&vz(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},function(t,e,r){"use strict";r.r(e),r.d(e,"changeLanguage",(function(){return X})),r.d(e,"cloneInstance",(function(){return Z})),r.d(e,"createInstance",(function(){return $})),r.d(e,"dir",(function(){return tt})),r.d(e,"exists",(function(){return et})),r.d(e,"getFixedT",(function(){return rt})),r.d(e,"init",(function(){return nt})),r.d(e,"loadLanguages",(function(){return ot})),r.d(e,"loadNamespaces",(function(){return it})),r.d(e,"loadResources",(function(){return at})),r.d(e,"off",(function(){return st})),r.d(e,"on",(function(){return ut})),r.d(e,"setDefaultNamespace",(function(){return ct})),r.d(e,"t",(function(){return At})),r.d(e,"use",(function(){return lt}));var n=r(286),o=r.n(n),i=r(197),a=r.n(i),s=r(208),u=r.n(s),c=r(209),A=r.n(c),l=r(372),f=r.n(l),h=r(398),p=r.n(h),d=r(399),g=r.n(d),y=r(223),v=r.n(y),m=r(906),I=r.n(m),E={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){var r;console&&console[t]&&(r=console)[t].apply(r,I()(e))}},C=new(function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.init(e,r)}return A()(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||E,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,r,n){return n&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(r).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,a()({},{prefix:"".concat(this.prefix,":").concat(e,":")},this.options))}}]),t}()),b=function(){function t(){u()(this,t),this.observers={}}return A()(t,[{key:"on",value:function(t,e){var r=this;return t.split(" ").forEach((function(t){r.observers[t]=r.observers[t]||[],r.observers[t].push(e)})),this}},{key:"off",value:function(t,e){var r=this;this.observers[t]&&this.observers[t].forEach((function(){if(e){var n=r.observers[t].indexOf(e);n>-1&&r.observers[t].splice(n,1)}else delete r.observers[t]}))}},{key:"emit",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach((function(t){t.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(e){e.apply(e,[t].concat(r))}))}}}]),t}();function B(){var t,e,r=new Promise((function(r,n){t=r,e=n}));return r.resolve=t,r.reject=e,r}function w(t){return null==t?"":""+t}function P(t,e,r){t.forEach((function(t){e[t]&&(r[t]=e[t])}))}function S(t,e,r){function n(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function o(){return!t||"string"==typeof t}for(var i="string"!=typeof e?[].concat(e):e.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!t[a]&&r&&(t[a]=new r),t=t[a]}return o()?{}:{obj:t,k:n(i.shift())}}function _(t,e,r){var n=S(t,e,Object);n.obj[n.k]=r}function Q(t,e){var r=S(t,e),n=r.obj,o=r.k;if(n)return n[o]}function O(t,e,r){for(var n in e)n in t?"string"==typeof t[n]||t[n]instanceof String||"string"==typeof e[n]||e[n]instanceof String?r&&(t[n]=e[n]):O(t[n],e[n],r):t[n]=e[n];return t}function D(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,(function(t){return x[t]})):t}var R=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),r.data=t||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return g()(e,t),A()(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[t,e];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(i=t.split(".")),Q(this.data,i)}},{key:"addResource",value:function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[t,e];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(n=e,e=(a=t.split("."))[1]),this.addNamespaces(e),_(this.data,a,n),o.silent||this.emit("added",t,e,r,n)}},{key:"addResources",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,e,o,r[o],{silent:!0});n.silent||this.emit("added",t,e,r)}},{key:"addResourceBundle",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(n=r,r=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var u=Q(this.data,s)||{};n?O(u,r,o):u=a()({},u,r),_(this.data,s,u),i.silent||this.emit("added",t,e,r)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?a()({},{},this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(b),T={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,r,n,o){var i=this;return t.forEach((function(t){i.processors[t]&&(e=i.processors[t].process(e,r,n,o))})),e}},L=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u()(this,e),r=f()(this,p()(e).call(this)),b.call(v()(v()(r))),P(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],t,v()(v()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=C.create("translator"),r}return g()(e,t),A()(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,e);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(t,e){var r=e.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,o=e.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var i=t.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(n)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function(t,e){var r=this;if("object"!==o()(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var n=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=this.extractFromKey(t[t.length-1],e),s=i.key,u=i.namespaces,c=u[u.length-1],A=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(A&&"cimode"===A.toLowerCase()){if(l){var f=e.nsSeparator||this.options.nsSeparator;return c+f+s}return s}var h=this.resolve(t,e),p=h&&h.res,d=h&&h.usedKey||s,g=h&&h.exactUsedKey||s,y=Object.prototype.toString.apply(p),v=["[object Number]","[object Function]","[object RegExp]"],m=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p;if(I&&p&&E&&v.indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,p,e):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(n){var C="[object Array]"===y,b=C?[]:{},B=C?g:d;for(var w in p)if(Object.prototype.hasOwnProperty.call(p,w)){var P="".concat(B).concat(n).concat(w);b[w]=this.translate(P,a()({},e,{joinArrays:!1,ns:u})),b[w]===P&&(b[w]=p[w])}p=b}}else if(I&&"string"==typeof m&&"[object Array]"===y)(p=p.join(m))&&(p=this.extendTranslation(p,t,e));else{var S=!1,_=!1;if(!this.isValidLookup(p)&&void 0!==e.defaultValue){if(S=!0,void 0!==e.count){var Q=this.pluralResolver.getSuffix(A,e.count);p=e["defaultValue".concat(Q)]}p||(p=e.defaultValue)}this.isValidLookup(p)||(_=!0,p=s);var O=e.defaultValue&&e.defaultValue!==p&&this.options.updateMissing;if(_||S||O){this.logger.log(O?"updateKey":"missingKey",A,c,s,O?e.defaultValue:p);var D=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var M=0;M<x.length;M++)D.push(x[M]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(e.lng||this.language):D.push(e.lng||this.language);var R=function(t,n){r.options.missingKeyHandler?r.options.missingKeyHandler(t,c,n,O?e.defaultValue:p,O,e):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(t,c,n,O?e.defaultValue:p,O,e),r.emit("missingKey",t,c,n,p)};if(this.options.saveMissing){var T=void 0!==e.count&&"string"!=typeof e.count;this.options.saveMissingPlurals&&T?D.forEach((function(t){r.pluralResolver.getPluralFormsOfKey(t,s).forEach((function(e){return R([t],e)}))})):R(D,s)}}p=this.extendTranslation(p,t,e,h),_&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(c,":").concat(s)),_&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(t,e,r,n){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(a()({},r,{interpolation:a()({},this.options.interpolation,r.interpolation)}));var i=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(i=a()({},this.options.interpolation.defaultVariables,i)),t=this.interpolator.interpolate(t,i,r.lng||this.language,r),!1!==r.nest&&(t=this.interpolator.nest(t,(function(){return o.translate.apply(o,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var s=r.postProcess||this.options.postProcess,u="string"==typeof s?[s]:s;return null!=t&&u&&u.length&&!1!==r.applyPostProcessor&&(t=T.handle(u,t,e,r,this)),t}},{key:"resolve",value:function(t){var e,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((function(t){if(!a.isValidLookup(e)){var u=a.extractFromKey(t,s),c=u.key;r=c;var A=u.namespaces;a.options.fallbackNS&&(A=A.concat(a.options.fallbackNS));var l=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);A.forEach((function(t){a.isValidLookup(e)||(i=t,h.forEach((function(r){if(!a.isValidLookup(e)){o=r;var i,u,A=c,h=[A];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(h,c,r,t,s);else l&&(i=a.pluralResolver.getSuffix(r,s.count)),l&&f&&h.push(A+i),f&&h.push(A+="".concat(a.options.contextSeparator).concat(s.context)),l&&h.push(A+=i);for(;u=h.pop();)a.isValidLookup(e)||(n=u,e=a.getResource(r,t,u,s))}})))}))}})),{res:e,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,r,n):this.resourceStore.getResource(t,e,r,n)}}]),e}(b);function j(t){return t.charAt(0).toUpperCase()+t.slice(1)}var k=function(){function t(e){u()(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=C.create("languageUtils")}return A()(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(t){return t.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=j(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),e.indexOf(r[1].toLowerCase())>-1&&(r[1]=j(r[1].toLowerCase())),e.indexOf(r[2].toLowerCase())>-1&&(r[2]=j(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(t=this.getLanguagePartFromCode(t)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(t)>-1}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,e){var r=this,n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),o=[],i=function(t){t&&(r.isWhitelisted(t)?o.push(t):r.logger.warn("rejecting non-whitelisted language code: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(t))):"string"==typeof t&&i(this.formatLanguageCode(t)),n.forEach((function(t){o.indexOf(t)<0&&i(r.formatLanguageCode(t))})),o}}]),t}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],F={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0===t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0===t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1===t?0:2===t?1:(t<0||t>10)&&t%10==0?2:3)}};function G(){var t={};return N.forEach((function(e){e.lngs.forEach((function(r){t[r]={numbers:e.nr,plurals:F[e.fc]}}))})),t}var U=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,t),this.languageUtils=e,this.options=r,this.logger=C.create("pluralResolver"),this.rules=G()}return A()(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=this.getRule(t);return e&&e.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var r=this,n=[],o=this.getRule(t);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(t,o);n.push("".concat(e).concat(i))})),n):n}},{key:"getSuffix",value:function(t,e){var r=this,n=this.getRule(t);if(n){var o=n.noAbs?n.plurals(e):n.plurals(Math.abs(e)),i=n.numbers[o];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),t}(),z=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,t),this.logger=C.create("interpolator"),this.init(e,!0)}return A()(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;e&&(this.options=t,this.format=t.interpolation&&t.interpolation.format||function(t){return t}),t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=void 0!==r.escape?r.escape:M,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?D(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?D(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?D(r.nestingPrefix):r.nestingPrefixEscaped||D("$t("),this.nestingSuffix=r.nestingSuffix?D(r.nestingSuffix):r.nestingSuffixEscaped||D(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,e,r,n){var o,i,a,s=this;function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(t.indexOf(s.formatSeparator)<0)return Q(e,t);var n=t.split(s.formatSeparator),o=n.shift().trim(),i=n.join(s.formatSeparator).trim();return s.format(Q(e,o),i,r)};this.resetRegExp();var A=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(a=0;(o=this.regexpUnescape.exec(t))&&(i=c(o[1].trim()),t=t.replace(o[0],i),this.regexpUnescape.lastIndex=0,!(++a>=this.maxReplaces)););for(a=0;o=this.regexp.exec(t);){if(void 0===(i=c(o[1].trim())))if("function"==typeof A){var l=A(t,o,n);i="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),i="";else"string"==typeof i||this.useRawValueToEscape||(i=w(i));if(i=this.escapeValue?u(this.escape(i)):u(i),t=t.replace(o[0],i),this.regexp.lastIndex=0,++a>=this.maxReplaces)break}return t}},{key:"nest",value:function(t,e){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a()({},o);function s(t,e){if(t.indexOf(",")<0)return t;var r=t.split(",");t=r.shift();var n=r.join(",");n=(n=this.interpolate(n,i)).replace(/'/g,'"');try{i=JSON.parse(n),e&&(i=a()({},e,i))}catch(e){this.logger.error("failed parsing options string in nesting for key ".concat(t),e)}return t}for(i.applyPostProcessor=!1;r=this.nestingRegexp.exec(t);){if((n=e(s.call(this,r[1].trim(),i),i))&&r[0]===t&&"string"!=typeof n)return n;"string"!=typeof n&&(n=w(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(t)),n=""),t=t.replace(r[0],n),this.regexp.lastIndex=0}return t}}]),t}(),Y=r(766),H=r.n(Y);var V=function(t){function e(t,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u()(this,e),o=f()(this,p()(e).call(this)),b.call(v()(v()(o))),o.backend=t,o.store=r,o.languageUtils=n.languageUtils,o.options=i,o.logger=C.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return g()(e,t),A()(e,[{key:"queueLoad",value:function(t,e,r,n){var o=this,i=[],a=[],s=[],u=[];return t.forEach((function(t){var n=!0;e.forEach((function(e){var s="".concat(t,"|").concat(e);!r.reload&&o.store.hasResourceBundle(t,e)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(e)<0&&u.push(e)))})),n||s.push(t)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(t,e,r){var n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];e&&this.emit("failedLoading",i,a,e),r&&this.store.addResourceBundle(i,a,r),this.state[t]=e?-1:2;var s={};this.queue.forEach((function(r){var n,o,u,c,A,l;n=r.loaded,o=a,c=S(n,[i],Object),A=c.obj,l=c.k,A[l]=A[l]||[],u&&(A[l]=A[l].concat(o)),u||A[l].push(o),function(t,e){for(var r=t.indexOf(e);-1!==r;)t.splice(r,1),r=t.indexOf(e)}(r.pending,t),e&&r.errors.push(e),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){s[t]||(s[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(e){s[t].indexOf(e)<0&&s[t].push(e)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,e,(function(s,u){s&&u&&o<5?setTimeout((function(){n.read.call(n,t,e,r,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var i=this.queueLoad(t,e,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(t){r.loadOne(t)}))}},{key:"load",value:function(t,e,r){this.prepareLoading(t,e,{},r)}},{key:"reload",value:function(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}},{key:"loadOne",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.split("|"),o=H()(n,2),i=o[0],a=o[1];this.read(i,a,"read",null,null,(function(n,o){n&&e.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(i," failed"),n),!n&&o&&e.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(i),o),e.loaded(t,n,o)}))}},{key:"saveMissing",value:function(t,e,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(t,e,r,n,null,a()({},i,{isUpdate:o})),t&&t[0]&&this.store.addResource(t[0],e,r,n)}}]),e}(b);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===o()(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===o()(t[2])||"object"===o()(t[3])){var r=t[3]||t[2];Object.keys(r).forEach((function(t){e[t]=r[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function W(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function K(){}var J=new(function(t){function e(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(u()(this,e),t=f()(this,p()(e).call(this)),b.call(v()(v()(t))),t.options=W(r),t.services={},t.logger=C,t.modules={external:[]},n&&!t.isInitialized&&!r.isClone){if(!t.options.initImmediate)return t.init(r,n),f()(t,v()(v()(t)));setTimeout((function(){t.init(r,n)}),0)}return t}return g()(e,t),A()(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(t){return t?"function"==typeof t?new t:t:null}if("function"==typeof e&&(r=e,e={}),this.options=a()({},q(),this.options,W(e)),this.format=this.options.interpolation.format,r||(r=K),!this.options.isClone){this.modules.logger?C.init(n(this.modules.logger),this.options):C.init(null,this.options);var o=new k(this.options);this.store=new R(this.options.resources,this.options);var i=this.services;i.logger=C,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new U(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new z(this.options),i.backendConnector=new V(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].concat(n))})),this.modules.languageDetector&&(i.languageDetector=n(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=n(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new L(this.services,this.options),this.translator.on("*",(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e].concat(n))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}var s=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(e){t[e]=function(){var r;return(r=t.store)[e].apply(r,arguments)}}));var u=B(),c=function(){t.changeLanguage(t.options.lng,(function(e,n){t.isInitialized=!0,t.logger.log("initialized",t.options),t.emit("initialized",t.options),u.resolve(n),r(e,n)}))};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return e();var r=[],n=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(t){r.indexOf(t)<0&&r.push(t)}))};if(this.language)n(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach((function(t){return n(t)}))}this.options.preload&&this.options.preload.forEach((function(t){return n(t)})),this.services.backendConnector.load(r,this.options.ns,e)}else e(null)}},{key:"reloadResources",value:function(t,e,r){var n=B();return t||(t=this.languages),e||(e=this.options.ns),r||(r=K),this.services.backendConnector.reload(t,e,(function(t){n.resolve(),r(t)})),n}},{key:"use",value:function(t){return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&T.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,e){var r=this,n=B();this.emit("languageChanging",t);var o=function(t){t&&(r.language=t,r.languages=r.services.languageUtils.toResolveHierarchy(t),r.translator.language||r.translator.changeLanguage(t),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(t)),r.loadResources((function(o){!function(t,o){r.translator.changeLanguage(o),o&&(r.emit("languageChanged",o),r.logger.log("languageChanged",o)),n.resolve((function(){return r.t.apply(r,arguments)})),e&&e(t,(function(){return r.t.apply(r,arguments)}))}(o,t)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(t):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(t,e){var r=this,n=function t(e,n){var i=a()({},n);if("object"!==o()(n)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];i=r.options.overloadTranslationOptionHandler([e,n].concat(u))}return i.lng=i.lng||t.lng,i.lngs=i.lngs||t.lngs,i.ns=i.ns||t.ns,r.t(e,i)};return"string"==typeof t?n.lng=t:n.lngs=t,n.ns=e,n}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"loadNamespaces",value:function(t,e){var r=this,n=B();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(t){r.options.ns.indexOf(t)<0&&r.options.ns.push(t)})),this.loadResources((function(t){n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var r=B();"string"==typeof t&&(t=[t]);var n=this.options.preload||[],o=t.filter((function(t){return n.indexOf(t)<0}));return o.length?(this.options.preload=n.concat(o),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new e(t,r)}},{key:"cloneInstance",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,o=a()({},this.options,r,{isClone:!0}),i=new e(o),s=["store","services","language"];return s.forEach((function(e){i[e]=t[e]})),i.translator=new L(i.services,i.options),i.translator.on("*",(function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];i.emit.apply(i,[t].concat(r))})),i.init(o,n),i.translator.options=i.options,i}}]),e}(b)),X=(e.default=J,J.changeLanguage.bind(J)),Z=J.cloneInstance.bind(J),$=J.createInstance.bind(J),tt=J.dir.bind(J),et=J.exists.bind(J),rt=J.getFixedT.bind(J),nt=J.init.bind(J),ot=J.loadLanguages.bind(J),it=J.loadNamespaces.bind(J),at=J.loadResources.bind(J),st=J.off.bind(J),ut=J.on.bind(J),ct=J.setDefaultNamespace.bind(J),At=J.t.bind(J),lt=J.use.bind(J)},function(t,e,r){"use strict";r.r(e);var n=new(function(){function t(){var t=this;this.profiling={frames:[],interactions:[]},this.profilingStarted=!1,this.indexRecordMap=new Map,this.interactionMapToPayload=new Map,this.startProfiling=function(){t.profilingStarted=!0,t.profiling={frames:[],interactions:[]},t.indexRecordMap.clear(),t.interactionMapToPayload.clear()},this.stopProfiling=function(){t.profilingStarted=!1},this.getProfiling=function(){return t.profiling},this.getPayloadFromInteraction=function(e){return t.interactionMapToPayload.get(e)},this.getIndexRecordByName=function(e){var r=t.indexRecordMap.get(e);return r&&0!==r.length?r:null},this.onFrame=function(e){t.profilingStarted&&t.profiling.frames.push(e)}}return Object.defineProperty(t.prototype,"isProfiling",{get:function(){return this.profilingStarted},enumerable:!0,configurable:!0}),t.prototype.onInteraction=function(t,e){var r=this.indexRecordMap.get(t.name);if(r&&0!==r.length){var n=r[r.length-1],o=this.profiling.frames.length-1;n.endIndex=o,this.profiling.interactions.push(t),this.interactionMapToPayload.set(t,e)}},t.prototype.onInteractionStart=function(t){var e=t.name,r=this.indexRecordMap.get(e)||[];r.push({startIndex:this.profiling.frames.length,endIndex:0}),this.indexRecordMap.set(e,r)},t}()),o=r(105),i=r(87),a=function(){function t(){this.onFrame=n.onFrame}return t.prototype.onInteraction=function(t,e){var r=t.name;r===o.a.IDLE||e.__INTERNAL__merged||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.a)(r),n.isProfiling&&n.onInteraction(t,e))},t.prototype.onInteractionStart=function(t){var e=t.name;e===o.a.IDLE||t.durationOnly||(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&Object(i.g)(e),n.isProfiling&&n.onInteractionStart(t))},t}();e.default=a},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(0),o=r(154),i=r(764),a=function(){function t(){}return t.prototype.__INTERNAL__beforeInit=function(){var t;this._session=this.createSession(),null===(t=this.beforeInit)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterInit=function(){var t;try{null===(t=this.afterInit)||void 0===t||t.call(this)}finally{this._session.__INTERNAL__afterInit()}},t.prototype.__INTERNAL__beforeDispose=function(){var t;null===(t=this.beforeDispose)||void 0===t||t.call(this)},t.prototype.__INTERNAL__afterDispose=function(){var t;try{null===(t=this.afterDispose)||void 0===t||t.call(this)}finally{this._session.__INTERNAL_dispose()}},t.prototype.createSession=function(){return new i.a},Object(n.c)([Object(o.b)({getter:function(){return this._session}})],t.prototype,"session",void 0),t}()},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return a}));var n=r(257),o=r(12),i=o.createContext({get rootState(){throw new Error}}),a=Object(n.getConnector)(i).connect},function(t,e,r){"use strict";var n=r(11),o=function(){function t(e){var r=this;this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0,this.onMerged=e.onMerged,this.stutterFrameDurationBoundary=void 0!==e.stutterFrameDurationBoundary?e.stutterFrameDurationBoundary:t.DefaultStutterFrameDurationBoundary;var o=void 0!==e.maxMergeTimeDuration?e.maxMergeTimeDuration:t.DefaultMaxMergeTimeDuration;this.asyncFlush=Object(n.throttle)((function(){return r.flush()}),o,{leading:!1})}return t.prototype.onFrame=function(t){var e=t.duration;t.activeFrame&&this.addFrameDuration(e)},t.prototype.add=function(t){this.addFrameDuration(t)},t.prototype.addFrameDuration=function(t){this.frameDurationSum+=t,this.frameCount++,t>this.stutterFrameDurationBoundary&&this.stutterFrameCount++,this.asyncFlush()},t.prototype.flushImmediately=function(){this.asyncFlush.flush()},t.prototype.flush=function(){if(this.frameCount>0)try{this.onMerged({sum:this.frameDurationSum,count:this.frameCount,stutterCount:this.stutterFrameCount})}finally{this.frameDurationSum=0,this.frameCount=0,this.stutterFrameCount=0}},t.DefaultMaxMergeTimeDuration=1e3*(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING?30:180),t.DefaultStutterFrameDurationBoundary=100,t}();e.a=o},,,,,,,,,function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(257),o=r(509);function i(t){return Object(n.combine)(t,o.a)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(0),o=r(147),i=r(12),a=r(698),s=r(513),u=function(){function t(){this.toolsMap=new Map}return t.prototype.registerTool=function(t){this.toolsMap.set(t.toolKey,t),this.activeToolKey===t.toolKey&&t.onEnter()},t.prototype.unregisterTool=function(t){this.toolsMap.delete(t.toolKey),this.activeToolKey===t.toolKey&&t.onLeave()},t.prototype.toggleActiveToolKey=function(t){var e=this;if(this.activeToolKey!==t){var r=this.activeToolKey&&this.toolsMap.get(this.activeToolKey),n=t&&this.toolsMap.get(t);Object(s.b)([function(){return r&&r.onLeave()},function(){return n&&n.onEnter()},function(){return e.activeToolKey=t}]),Object(o.b)({behavior:o.a.switchTool,toolKey:t,prevToolKey:this.activeToolKey})}},t}(),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.systemInternal=new u,e.contextValue={system:e.systemInternal},e}return Object(n.d)(e,t),e.prototype.componentDidMount=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.componentDidUpdate=function(){this.systemInternal.toggleActiveToolKey(this.props.activeToolKey)},e.prototype.render=function(){return i.createElement(a.a.Provider,{value:this.contextValue},this.props.children)},e}(i.Component)},function(t,e,r){"use strict";var n=r(0),o=r(196),i=r(446),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.d)(e,t),e.prototype.setGlobalUnit=function(t){switch(t){case i.a.mm:this.setGlobalLengthUnit(o.c.mm),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.m:this.setGlobalLengthUnit(o.c.m),this.setGlobalAreaUnit(o.a.sqM);break;case i.a.ft:this.setGlobalLengthUnit(o.c.ft),this.setGlobalAreaUnit(o.a.sqFt);break;default:if(String(t).match(/^1\d{2}$/))this.setGlobalLengthUnit(Number(String(t)[1])),this.setGlobalAreaUnit(Number(String(t)[2]));else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}},e}(o.f);e.a=a},function(t,e,r){"use strict";var n=r(11),o=r(701),i=function(){function t(t){this.props=t}return t.prototype.create=function(t){var e=this;return this.meshBuilder=new o.a((function(){return e.props}),this.props.__unstable__onMeshCreated||n.noop,t),this.meshBuilder.createMesh()},t.prototype.update=function(t){this.meshBuilder.updateMesh(t)},t.prototype.dispose=function(t){this.meshBuilder.disposeMesh()},t.prototype.__unstable__getSerializable=function(){return this.meshBuilder.serializable},t}();e.a=i},function(t,e,r){"use strict";var n,o,i=r(0),a=r(104),s=r(512),u=r(11),c=r(12),A=r(370),l=r(202),f=r(265),h=r(154),p=r(93);function d(t){return(d="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 g(t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){if(t.context===A.a){var e=a.default.getParent(t);Object(p.b)(t,"mount-view","[mountView] 未使用 mountView 挂载视图,进而导致渲染顺序不正确. 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor))+". ",e,Object(s.a)("002"))}var r=t.props.mountPointId,n=Object(u.first)(Object(f.c)(l.a.__INTERNAL__getKey(r)));if(n){var o=function(t){for(var e=t,r=a.default.getParent(e);r;)e=r,r=a.default.getParent(e);return e},c=o(t);if(c===o(n)){var h=c;if(String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(t,h)))>=String.fromCharCode.apply(String,Object(i.i)(a.default.getViewOrderInAncestor(n,h)))){e=a.default.getParent(t);Object(p.b)(t,l.a.__INTERNAL__getKey(r),'[ViewMounter] ViewMounter 渲染顺序出现在相应的 MountPoint ("'+r.toString()+'") 之后,渲染顺序不正确:',t,". 当前 ViewMounter 父组件:"+(e&&a.default.getDisplayName(e.constructor)),e,".",Object(s.a)("001"))}}}}}function y(t){return t.exclusive?void 0:t.sourceKey}var v=function(t){function e(){var r=null!==t&&t.apply(this,arguments)||this;return r.viewKey=String(e.viewKey++),r}return Object(i.d)(e,t),e.prototype.componentDidMount=function(){var t=this.props;Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,this.context,y(t))},e.prototype.componentWillUpdate=function(t,e,r){this.props.mountPointId!==t.mountPointId?(Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey),Object(f.b)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.exclusive,t.renderOrder,r,y(t))):Object(f.g)(l.a.__INTERNAL__getKey(t.mountPointId),this.viewKey,this.getChildren(t),t.renderOrder,r,y(t))},e.prototype.componentWillUnmount=function(){Object(f.f)(l.a.__INTERNAL__getKey(this.props.mountPointId),this.viewKey)},e.prototype.render=function(){return null},e.prototype.getChildren=function(t){var e=this;if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var r=t.children;return"function"==typeof r?function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=r.apply(void 0,Object(i.i)(t));return I(e,o),o}:(I(this,r),r)}return t.children},e.viewKey=0,e.contextType=A.b,e}(c.Component);if(e.a=v,Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV){var m=function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e.apply(void 0,Object(i.i)([this],r)),t.apply(this,r)}};v.prototype.componentDidMount=m(null!==(n=v.prototype.componentDidMount)&&void 0!==n?n:u.noop,(function(t){g(t)})),v.prototype.componentDidUpdate=m(null!==(o=v.prototype.componentDidUpdate)&&void 0!==o?o:u.noop,(function(t){g(t)}))}function I(t,e){Array.isArray(e)?e.forEach((function(e){E(t,e)})):E(t,e)}function E(t,e){if(function(t){return"object"===d(t)&&null!==t}(e)&&null===e.key){var r=function(t){var e=null==t?void 0:t.type;return"string"==typeof e?e:e&&(e.__reactstandin__key||a.default.getDisplayName(e))},n=e._owner,o=t._reactInternalFiber.return;Object(p.b)(n||o,"viewMounter::contentKey",'[ViewMounter] Each child of ViewMounter must have a key, check "'+r(e)+'" in the render function of "'+r(n)+'" for mount point "'+Object(h.a)(l.a.__INTERNAL__getKey(t.props.mountPointId))+'". Details:',{viewMounterContentNode:e,viewmounterInstance:t,viewMounterParent:o,nodeOwner:n,getOwnerList:function(){var e=function(t){for(var e=[];t;)e.push(t),t=t._debugOwner;return e.map((function(t){return{name:r(t),node:t}}))};return{viewMounterOwnerList:e(t._reactInternalFiber._debugOwner),viewMounterContentOwnerList:e(n)}}},Object(s.a)("003"))}}},function(t,e,r){"use strict";r.d(e,"b",(function(){return h})),r.d(e,"a",(function(){return g}));var n=r(0),o=r(72),i=r(84),a=r(105),s=r(92),u=r(87);var c=r(559),A=r(692),l=r(325),f=r(694),h=function(){function t(){p.push(this)}return t.prototype.__INTERNAL__fpsMerged=function(t){this.onMergedFps&&this.onMergedFps(t)},t.prototype.__INTERNAL__getAppId=function(){return this.appId},t.prototype.__INTERNAL__emitEvent=function(t){this.onInteraction&&this.onInteraction(t)},t.prototype.__INTERNAL__initWithAppId=function(t){I(),this.appId=t},t.prototype.__INTERNAL__dispose=function(){var t=p.indexOf(this);p.splice(t,1)},t.prototype.config=function(t){this.onInteraction=t.onInteraction,this.onMergedFps=t.onMergedFps},Object(n.c)([f.a],t.prototype,"config",null),t}(),p=[],d=function(t,e){o.b.getInstance().emit(g,e),p.forEach((function(r){r.__INTERNAL__getAppId()===t&&r.__INTERNAL__emitEvent(e)}))},g=new i.a(a.a.INTERACTION),y=function(t){var e;return Object(n.b)(void 0,void 0,void 0,(function(){var r,o,i=t.appId,s=t.failed,A=Object(n.h)(t,["appId","failed"]);return Object(n.e)(this,(function(t){switch(t.label){case 0:return[4,Object(c.d)()];case 1:return t.sent(),r=(null===(e=navigator.connection)||void 0===e?void 0:e.rtt)||0,o=Object(u.c)(),d(i,{eventType:a.d.PAGE_READY,metricData:Object(n.a)(Object(n.a)(Object(n.a)({},"memory"in performance?{totalJSHeapSize:performance.memory.totalJSHeapSize,usedJSHeapSize:performance.memory.usedJSHeapSize}:{}),A),{pageFinshedTotal:Object(u.e)()}),perfData:Object(n.a)(Object(n.a)({},o),{rtt:r}),labels:{failed:s.toString()}}),[2]}}))}))},v=function(){function t(){}return t.prototype.onInstantInteraction=function(t,e){d(t.appId,{eventType:a.d.INSTANT_INTERACTION,metricData:e,labels:{interaction:t.name}})},t.prototype.onInteraction=function(t,e){t.merged&&!e.__INTERNAL__merged||(t.durationOnly||t.trackingMerged&&(e=Object(n.a)(Object(n.a)({},e),{eventType:a.d.INTERACTION,labels:Object(n.a)(Object(n.a)({},e.labels),{interaction:t.name})})),d(t.appId,e))},t}(),m=!1,I=function(){if(!m){if(c.a.on(a.a.PAGE_READY,y),l.a.addPlugin(new v),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_TESTING){var t=r(1215).default;l.a.addPlugin(new t)}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING){var e=r(1383).default;l.a.addPlugin(new e)}var n;l.a.init(),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(n=s.b.prototype.componentWillMount,s.b.prototype.componentWillMount=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.apply(this,t);var r=Object(u.b)(this);r&&Object(u.f)(this.mesh,r)},Object(A.a)()),m=!0}}}])}));
|