@manycore/custom-sdk 1.13.10 → 1.13.11-alpha.1
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.d.ts +31 -0
- package/index.js +4 -4
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
window.__customSdkVersion = '1.13.10';!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(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"],t):"object"==typeof exports?exports.CustomSdk=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):e.CustomSdk=t(e.servkit,e._,e.React,e.ReactDOM,e["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__249__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2095)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1347)},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolTranslators=t.TranslatorWithContext=t.Translator=t.CompositeCurve2dData=t.SurfaceOfLinearExtrusionData=t.PolylineCurve3dData=t.PolylineCurve2dData=t.GeneralTrimmedSurfaceData=t.RectTrimmedSurfaceData=t.TrimmedSurfaceData=t.NurbsSurfaceData=t.NurbsCurve3dData=t.SurfaceDataConverter=t.CurveDataConverter=t.DataConverter=t.SurfaceToData=t.CurveToData=t.ToroidalSurfaceData=t.SurfaceData=t.Ray3dData=t.PlaneData=t.LineSeg3dData=t.Line3dData=t.Ellipse3dData=t.EllipticalArc3dData=t.EllipticalArc2dData=t.Ellipse2dData=t.RevolveSurfaceData=t.CylindricalSurfaceData=t.Curve3dData=t.ConicalSurfaceData=t.CompositeCurve3dData=t.Circle3dData=t.BoundedCurve3dData=t.Arc3dData=t.GeomLoop2dData=t.GeomFace2dData=t.Ray2dData=t.LineSeg2dData=t.Line2dData=t.Curve3dOnSurfacesData=t.CurveOnSurfaceData=t.Curve2dData=t.Circle2dData=t.BoundedCurve2dData=t.BezierCurve2dData=t.Arc2dData=t.Vector3dData=t.Vector2dData=t.Point3dData=t.Point2dData=t.MVector3dData=t.MVector2dData=t.MPoint3dData=t.MPoint2dData=t.IntervalData=t.CCS3dData=t.CCS2dData=t.TriangledMeshData=t.Transform3dData=t.Transform2dData=t.QuaternionData=t.EulerData=t.Matrix4Data=t.Matrix3Data=t.BezierCurve3dData=t.BBox3dData=t.BBox2dData=t.triangulateOnNurbs=t.triangulateOnDevelopable=t.triangulateOnRevSurface=t.Triangulate=t.simplifyPolygons=t.clipping=t.addRect=t.simplifyPolygonsByHorizontal=t.TriangulatePolygon=t.TriangulateRevSurface=void 0,t.TriangulateNurbs=t.TriangulateDevelopable=t.TriangulatePlane=t.SurfaceUVUtils=t.LoopCentroid=t.ClipperOffset=t.Path3dOffset=t.Path2dOffset=t.PathRectify=t.LineArcDistance=t.CurveDistance=t.FacesBoolean=t.DetectLoop=t.LoopSimplify=t.LoopNormal=t.LoopInLoop=t.LoopCCW=t.LoopArea=t.Curve2dOverlap=t.CurveOverlap=t.LoopUtils=t.PtInLoop=t.SurfaceIntersect=t.CurveSurfaceIntersect=t.Curve2dIntersect=t.CurveIntersect=t.SurfaceOfLinearExtrusion=t.ToroidalSurface=t.GeneralTrimmedSurface=t.RevolveSurface=t.RectTrimmedSurface=t.TrimmedSurface=t.BoundedSurface=t.NurbsSurface=t.ConicalSurface=t.CylindricalSurface=t.Plane=t.ElementarySurface=t.Surface=t.EllipticalArc3d=t.Arc3d=t.Curve3dOnSurfaces=t.CurveOnSurface=t.Ellipse3d=t.Circle3d=t.ConicCurve3d=t.NurbsCurve3d=t.PolylineCurve3d=t.LineSeg3d=t.Ray3d=t.Line3d=t.CompositeCurve3d=t.CompositeCurve2d=t.BoundedCurve3d=t.BezierCurve3d=t.Curve3d=t.GeomLoop2d=t.GeomFace2d=t.EllipticalArc2d=t.Ellipse2d=t.BezierCurve2d=t.Arc2d=t.Circle2d=t.Ray2d=t.PolylineCurve2d=t.NurbsCurve2d=t.LineSeg2d=t.Line2d=t.BoundedCurve2d=t.Curve2d=t.RectMeshNode=t.SurfacePoint=t.TriangledMesh=t.Transform3d=t.Transform2d=t.CCS3d=t.CCS2d=t.BBox3d=t.BBox2d=t.UV=t.Matrix4=t.Matrix3=t.Quaternion=t.Interval=t.EulerOrder=t.Euler=t.MVector3d=t.MVector2d=t.Vector3d=t.Vector2d=t.MPoint3d=t.MPoint2d=t.Point3d=t.Point2d=t.Num=t.rpSolve=t.legendreGaussIntegration=t.Tolerance=t.Axis3d=t.Axis2d=void 0;var n=r(1348),i=mr(n),o=r(562),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(372),h=r(41),p=mr(h),d=r(373),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(774),Q=mr(m),b=mr(r(563)),_=mr(r(775)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(296),M=r(374),x=vr(r(13)),P=mr(r(564)),T=mr(r(776)),F=r(194),O=r(76),L=mr(r(40)),N=mr(r(43)),k=r(777),G=r(778),U=r(445),j=r(297),V=r(779),H=r(446),Y=r(565),K=r(566),q=r(1351),J=r(1352),W=r(1353),z=r(1354),X=r(130),Z=r(151),$=r(780),ee=r(1355),te=r(1356),re=r(1357),ne=r(375),ie=r(298),oe=vr(r(299)),Ae=vr(r(317)),ae=vr(r(788)),se=vr(r(1371)),ue=vr(r(1373)),ce=r(304),le=r(381),ge=r(170),fe=r(306),he=r(790),pe=r(305),de=r(382),Ie=r(383),ye=r(791),Ce=r(580),Ee=r(384),Be=r(307),ve=r(308),me=r(385),Qe=r(309),be=r(311),_e=r(154),Se=r(310),we=r(794),De=r(390),Re=r(389),Me=r(386),xe=r(453),Pe=r(392),Te=r(387),Fe=r(312),Oe=r(454),Le=r(313),Ne=r(314),ke=r(315),Ge=r(393),Ue=r(394),je=r(316),Ve=r(388),He=r(456),Ye=r(395),Ke=r(263),qe=r(396),Je=r(398),We=r(578),ze=r(94),Xe=r(196),Ze=r(195),$e=r(119),et=r(172),tt=r(301),rt=r(95),nt=r(110),it=r(579),ot=r(581),At=r(57),at=r(45),st=r(105),ut=r(121),ct=r(261),lt=r(61),gt=r(131),ft=r(120),ht=r(391),pt=r(77),dt=r(458),It=r(567),yt=r(171),Ct=r(262),Et=r(376),Bt=r(198),vt=r(132),mt=r(379),Qt=r(168),bt=r(169),_t=r(455),St=r(58),wt=r(62),Dt=r(106),Rt=r(318),Mt=r(49),xt=r(197),Pt=r(152),Tt=r(457),Ft=r(319),Ot=r(572),Lt=r(397),Nt=r(199),kt=r(576),Gt=r(1375),Ut=r(26),jt=r(1385),Vt=vr(r(822)),Ht=vr(r(1389)),Yt=vr(r(823)),Kt=vr(r(300)),qt=vr(r(1390)),Jt=vr(r(88)),Wt=vr(r(1393)),zt=vr(r(461)),Xt=vr(r(303)),Zt=vr(r(153)),$t=vr(r(792)),er=vr(r(793)),tr=vr(r(378)),rr=vr(r(1395)),nr=vr(r(219)),ir=vr(r(1396)),or=vr(r(1397)),Ar=vr(r(827)),ar=vr(r(1404)),sr=vr(r(577)),ur=vr(r(321)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1405),fr=vr(gr),hr=r(1406),pr=vr(hr),dr=vr(r(1407)),Ir=vr(r(1409)),yr=r(1410),Cr=vr(yr),Er=r(380),Br=r(399);function vr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function mr(e){return e&&e.__esModule?e:{default:e}}var Qr=Object.assign({},Ae,ae),br=Object.assign({},Qr,se);t.Axis2d=i.default,t.Axis3d=A.default,t.Tolerance=x,t.legendreGaussIntegration=d.legendreGaussIntegration,t.rpSolve=M.rpSolve,t.Num=S.default,t.Point2d=w.default,t.Point3d=D.default,t.MPoint2d=v.default,t.MPoint3d=Q.default,t.Vector2d=L.default,t.Vector3d=N.default,t.MVector2d=b.default,t.MVector3d=_.default,t.Euler=f.Euler,t.EulerOrder=f.EulerOrder,t.Interval=p.default,t.Quaternion=R.Quaternion,t.Matrix3=y.default,t.Matrix4=E.default,t.UV=O.UV,t.BBox2d=s.default,t.BBox3d=c.default,t.CCS2d=l.CCS2d,t.CCS3d=g.CCS3d,t.Transform2d=P.default,t.Transform3d=T.default,t.TriangledMesh=F.TriangledMesh,t.SurfacePoint=Er.SurfacePoint,t.RectMeshNode=Er.RectMeshNode,t.Curve2d=tt.Curve2d,t.BoundedCurve2d=Ze.BoundedCurve2d,t.Line2d=At.Line2d,t.LineSeg2d=at.LineSeg2d,t.NurbsCurve2d=st.NurbsCurve2d,t.PolylineCurve2d=ut.PolylineCurve2d,t.Ray2d=ct.Ray2d,t.Circle2d=$e.Circle2d,t.Arc2d=ze.Arc2d,t.BezierCurve2d=Xe.BezierCurve2d,t.Ellipse2d=rt.Ellipse2d,t.EllipticalArc2d=nt.EllipticalArc2d,t.GeomFace2d=it.GeomFace2d,t.GeomLoop2d=ot.GeomLoop2d,t.Curve3d=Et.Curve3d,t.BezierCurve3d=gt.BezierCurve3d,t.BoundedCurve3d=ft.BoundedCurve3d,t.CompositeCurve2d=et.CompositeCurve2d,t.CompositeCurve3d=dt.CompositeCurve3d,t.Line3d=St.Line3d,t.Ray3d=Pt.Ray3d,t.LineSeg3d=wt.LineSeg3d,t.PolylineCurve3d=xt.PolylineCurve3d,t.NurbsCurve3d=Dt.NurbsCurve3d,t.ConicCurve3d=It.ConicCurve3d,t.Circle3d=pt.Circle3d,t.Ellipse3d=Qt.Ellipse3d,t.CurveOnSurface=Ct.CurveOnSurface,t.Curve3dOnSurfaces=Bt.Curve3dOnSurfaces,t.Arc3d=lt.Arc3d,t.EllipticalArc3d=bt.EllipticalArc3d,t.Surface=Ot.Surface,t.ElementarySurface=mt.ElementarySurface,t.Plane=Mt.Plane,t.CylindricalSurface=vt.CylindricalSurface,t.ConicalSurface=yt.ConicalSurface,t.NurbsSurface=Rt.NurbsSurface,t.BoundedSurface=ht.BoundedSurface,t.TrimmedSurface=kt.TrimmedSurface,t.RectTrimmedSurface=Tt.RectTrimmedSurface,t.RevolveSurface=Ft.RevolveSurface,t.GeneralTrimmedSurface=_t.GeneralTrimmedSurface,t.ToroidalSurface=Nt.ToroidalSurface,t.SurfaceOfLinearExtrusion=Lt.SurfaceOfLinearExtrusion,t.CurveIntersect=Kt,t.Curve2dIntersect=Jt,t.CurveSurfaceIntersect=qt,t.SurfaceIntersect=Wt,t.PtInLoop=nr,t.LoopUtils=ir,t.CurveOverlap=sr,t.Curve2dOverlap=ur,t.LoopArea=Xt,t.LoopCCW=Zt,t.LoopInLoop=er,t.LoopNormal=tr,t.LoopSimplify=rr,t.DetectLoop=zt,t.FacesBoolean=Vt,t.CurveDistance=Ht,t.LineArcDistance=Yt,t.PathRectify=cr,t.Path2dOffset=Ar,t.Path3dOffset=ar,t.ClipperOffset=or,t.LoopCentroid=$t,t.SurfaceUVUtils=lr,t.TriangulatePlane=dr,t.TriangulateDevelopable=fr,t.TriangulateNurbs=pr,t.TriangulateRevSurface=Cr,t.TriangulatePolygon=Ir,t.simplifyPolygonsByHorizontal=Br.simplifyPolygonsByHorizontal,t.addRect=Br.addRect,t.clipping=Br.clipping,t.simplifyPolygons=Br.simplifyPolygons,t.Triangulate=Ir,t.triangulateOnRevSurface=yr.triangulateOnRevSurface,t.triangulateOnDevelopable=gr.triangulateOnDevelopable,t.triangulateOnNurbs=hr.triangulateOnNurbs,t.BBox2dData=k.BBox2dData,t.BBox3dData=G.BBox3dData,t.BezierCurve3dData=be.BezierCurve3dData,t.Matrix3Data=Y.Matrix3Data,t.Matrix4Data=K.Matrix4Data,t.EulerData=V.EulerData,t.QuaternionData=$.QuaternionData,t.Transform2dData=ee.Transform2dData,t.Transform3dData=te.Transform3dData,t.TriangledMeshData=re.TriangledMeshData,t.CCS2dData=U.CCS2dData,t.CCS3dData=j.CCS3dData,t.IntervalData=H.IntervalData,t.MPoint2dData=q.MPoint2dData,t.MPoint3dData=J.MPoint3dData,t.MVector2dData=W.MVector2dData,t.MVector3dData=z.MVector3dData,t.Point2dData=X.Point2dData,t.Point3dData=Z.Point3dData,t.Vector2dData=ne.Vector2dData,t.Vector3dData=ie.Vector3dData,t.Arc2dData=ce.Arc2dData,t.BezierCurve2dData=le.BezierCurve2dData,t.BoundedCurve2dData=ge.BoundedCurve2dData,t.Circle2dData=fe.Circle2dData,t.Curve2dData=pe.Curve2dData,t.CurveOnSurfaceData=Re.CurveOnSurfaceData,t.Curve3dOnSurfacesData=xe.Curve3dOnSurfacesData,t.Line2dData=Ee.Line2dData,t.LineSeg2dData=Be.LineSeg2dData,t.Ray2dData=me.Ray2dData,t.GeomFace2dData=ye.GeomFace2dData,t.GeomLoop2dData=Ce.GeomLoop2dData,t.Arc3dData=Qe.Arc3dData,t.BoundedCurve3dData=_e.BoundedCurve3dData,t.Circle3dData=Se.Circle3dData,t.CompositeCurve3dData=we.CompositeCurve3dData,t.ConicalSurfaceData=De.ConicalSurfaceData,t.Curve3dData=Me.Curve3dData,t.CylindricalSurfaceData=Pe.CylindricalSurfaceData,t.RevolveSurfaceData=Ye.RevolveSurfaceData,t.Ellipse2dData=de.Ellipse2dData,t.EllipticalArc2dData=Ie.EllipticalArc2dData,t.EllipticalArc3dData=Fe.EllipticalArc3dData,t.Ellipse3dData=Te.Ellipse3dData,t.Line3dData=Le.Line3dData,t.LineSeg3dData=Ne.LineSeg3dData,t.PlaneData=Ue.PlaneData,t.Ray3dData=Ve.Ray3dData,t.SurfaceData=Ke.SurfaceData,t.ToroidalSurfaceData=Je.ToroidalSurfaceData,t.CurveToData=oe,t.SurfaceToData=ue,t.DataConverter=br,t.CurveDataConverter=Qr,t.SurfaceDataConverter=se,t.NurbsCurve3dData=ke.NurbsCurve3dData,t.NurbsSurfaceData=Ge.NurbsSurfaceData,t.TrimmedSurfaceData=We.TrimmedSurfaceData,t.RectTrimmedSurfaceData=He.RectTrimmedSurfaceData,t.GeneralTrimmedSurfaceData=Oe.GeneralTrimmedSurfaceData,t.PolylineCurve2dData=ve.PolylineCurve2dData,t.PolylineCurve3dData=je.PolylineCurve3dData,t.SurfaceOfLinearExtrusionData=qe.SurfaceOfLinearExtrusionData,t.CompositeCurve2dData=he.CompositeCurve2dData,t.Translator=Ut.Translator,t.TranslatorWithContext=jt.TranslatorWithContext,t.ProtocolTranslators=Gt.ProtocolTranslators},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
1
|
+
window.__customSdkVersion = '1.13.11-alpha.1';!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(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"],t):"object"==typeof exports?exports.CustomSdk=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):e.CustomSdk=t(e.servkit,e._,e.React,e.ReactDOM,e["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__249__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2095)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1347)},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolTranslators=t.TranslatorWithContext=t.Translator=t.CompositeCurve2dData=t.SurfaceOfLinearExtrusionData=t.PolylineCurve3dData=t.PolylineCurve2dData=t.GeneralTrimmedSurfaceData=t.RectTrimmedSurfaceData=t.TrimmedSurfaceData=t.NurbsSurfaceData=t.NurbsCurve3dData=t.SurfaceDataConverter=t.CurveDataConverter=t.DataConverter=t.SurfaceToData=t.CurveToData=t.ToroidalSurfaceData=t.SurfaceData=t.Ray3dData=t.PlaneData=t.LineSeg3dData=t.Line3dData=t.Ellipse3dData=t.EllipticalArc3dData=t.EllipticalArc2dData=t.Ellipse2dData=t.RevolveSurfaceData=t.CylindricalSurfaceData=t.Curve3dData=t.ConicalSurfaceData=t.CompositeCurve3dData=t.Circle3dData=t.BoundedCurve3dData=t.Arc3dData=t.GeomLoop2dData=t.GeomFace2dData=t.Ray2dData=t.LineSeg2dData=t.Line2dData=t.Curve3dOnSurfacesData=t.CurveOnSurfaceData=t.Curve2dData=t.Circle2dData=t.BoundedCurve2dData=t.BezierCurve2dData=t.Arc2dData=t.Vector3dData=t.Vector2dData=t.Point3dData=t.Point2dData=t.MVector3dData=t.MVector2dData=t.MPoint3dData=t.MPoint2dData=t.IntervalData=t.CCS3dData=t.CCS2dData=t.TriangledMeshData=t.Transform3dData=t.Transform2dData=t.QuaternionData=t.EulerData=t.Matrix4Data=t.Matrix3Data=t.BezierCurve3dData=t.BBox3dData=t.BBox2dData=t.triangulateOnNurbs=t.triangulateOnDevelopable=t.triangulateOnRevSurface=t.Triangulate=t.simplifyPolygons=t.clipping=t.addRect=t.simplifyPolygonsByHorizontal=t.TriangulatePolygon=t.TriangulateRevSurface=void 0,t.TriangulateNurbs=t.TriangulateDevelopable=t.TriangulatePlane=t.SurfaceUVUtils=t.LoopCentroid=t.ClipperOffset=t.Path3dOffset=t.Path2dOffset=t.PathRectify=t.LineArcDistance=t.CurveDistance=t.FacesBoolean=t.DetectLoop=t.LoopSimplify=t.LoopNormal=t.LoopInLoop=t.LoopCCW=t.LoopArea=t.Curve2dOverlap=t.CurveOverlap=t.LoopUtils=t.PtInLoop=t.SurfaceIntersect=t.CurveSurfaceIntersect=t.Curve2dIntersect=t.CurveIntersect=t.SurfaceOfLinearExtrusion=t.ToroidalSurface=t.GeneralTrimmedSurface=t.RevolveSurface=t.RectTrimmedSurface=t.TrimmedSurface=t.BoundedSurface=t.NurbsSurface=t.ConicalSurface=t.CylindricalSurface=t.Plane=t.ElementarySurface=t.Surface=t.EllipticalArc3d=t.Arc3d=t.Curve3dOnSurfaces=t.CurveOnSurface=t.Ellipse3d=t.Circle3d=t.ConicCurve3d=t.NurbsCurve3d=t.PolylineCurve3d=t.LineSeg3d=t.Ray3d=t.Line3d=t.CompositeCurve3d=t.CompositeCurve2d=t.BoundedCurve3d=t.BezierCurve3d=t.Curve3d=t.GeomLoop2d=t.GeomFace2d=t.EllipticalArc2d=t.Ellipse2d=t.BezierCurve2d=t.Arc2d=t.Circle2d=t.Ray2d=t.PolylineCurve2d=t.NurbsCurve2d=t.LineSeg2d=t.Line2d=t.BoundedCurve2d=t.Curve2d=t.RectMeshNode=t.SurfacePoint=t.TriangledMesh=t.Transform3d=t.Transform2d=t.CCS3d=t.CCS2d=t.BBox3d=t.BBox2d=t.UV=t.Matrix4=t.Matrix3=t.Quaternion=t.Interval=t.EulerOrder=t.Euler=t.MVector3d=t.MVector2d=t.Vector3d=t.Vector2d=t.MPoint3d=t.MPoint2d=t.Point3d=t.Point2d=t.Num=t.rpSolve=t.legendreGaussIntegration=t.Tolerance=t.Axis3d=t.Axis2d=void 0;var n=r(1348),i=mr(n),o=r(562),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(372),h=r(41),p=mr(h),d=r(373),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(774),Q=mr(m),b=mr(r(563)),_=mr(r(775)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(296),M=r(374),x=vr(r(13)),P=mr(r(564)),T=mr(r(776)),F=r(194),O=r(76),L=mr(r(40)),N=mr(r(43)),k=r(777),G=r(778),U=r(445),j=r(297),V=r(779),H=r(446),Y=r(565),K=r(566),q=r(1351),J=r(1352),W=r(1353),z=r(1354),X=r(130),Z=r(151),$=r(780),ee=r(1355),te=r(1356),re=r(1357),ne=r(375),ie=r(298),oe=vr(r(299)),Ae=vr(r(317)),ae=vr(r(788)),se=vr(r(1371)),ue=vr(r(1373)),ce=r(304),le=r(381),ge=r(170),fe=r(306),he=r(790),pe=r(305),de=r(382),Ie=r(383),ye=r(791),Ce=r(580),Ee=r(384),Be=r(307),ve=r(308),me=r(385),Qe=r(309),be=r(311),_e=r(154),Se=r(310),we=r(794),De=r(390),Re=r(389),Me=r(386),xe=r(453),Pe=r(392),Te=r(387),Fe=r(312),Oe=r(454),Le=r(313),Ne=r(314),ke=r(315),Ge=r(393),Ue=r(394),je=r(316),Ve=r(388),He=r(456),Ye=r(395),Ke=r(263),qe=r(396),Je=r(398),We=r(578),ze=r(94),Xe=r(196),Ze=r(195),$e=r(119),et=r(172),tt=r(301),rt=r(95),nt=r(110),it=r(579),ot=r(581),At=r(57),at=r(45),st=r(105),ut=r(121),ct=r(261),lt=r(61),gt=r(131),ft=r(120),ht=r(391),pt=r(77),dt=r(458),It=r(567),yt=r(171),Ct=r(262),Et=r(376),Bt=r(198),vt=r(132),mt=r(379),Qt=r(168),bt=r(169),_t=r(455),St=r(58),wt=r(62),Dt=r(106),Rt=r(318),Mt=r(49),xt=r(197),Pt=r(152),Tt=r(457),Ft=r(319),Ot=r(572),Lt=r(397),Nt=r(199),kt=r(576),Gt=r(1375),Ut=r(26),jt=r(1385),Vt=vr(r(822)),Ht=vr(r(1389)),Yt=vr(r(823)),Kt=vr(r(300)),qt=vr(r(1390)),Jt=vr(r(88)),Wt=vr(r(1393)),zt=vr(r(461)),Xt=vr(r(303)),Zt=vr(r(153)),$t=vr(r(792)),er=vr(r(793)),tr=vr(r(378)),rr=vr(r(1395)),nr=vr(r(219)),ir=vr(r(1396)),or=vr(r(1397)),Ar=vr(r(827)),ar=vr(r(1404)),sr=vr(r(577)),ur=vr(r(321)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1405),fr=vr(gr),hr=r(1406),pr=vr(hr),dr=vr(r(1407)),Ir=vr(r(1409)),yr=r(1410),Cr=vr(yr),Er=r(380),Br=r(399);function vr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function mr(e){return e&&e.__esModule?e:{default:e}}var Qr=Object.assign({},Ae,ae),br=Object.assign({},Qr,se);t.Axis2d=i.default,t.Axis3d=A.default,t.Tolerance=x,t.legendreGaussIntegration=d.legendreGaussIntegration,t.rpSolve=M.rpSolve,t.Num=S.default,t.Point2d=w.default,t.Point3d=D.default,t.MPoint2d=v.default,t.MPoint3d=Q.default,t.Vector2d=L.default,t.Vector3d=N.default,t.MVector2d=b.default,t.MVector3d=_.default,t.Euler=f.Euler,t.EulerOrder=f.EulerOrder,t.Interval=p.default,t.Quaternion=R.Quaternion,t.Matrix3=y.default,t.Matrix4=E.default,t.UV=O.UV,t.BBox2d=s.default,t.BBox3d=c.default,t.CCS2d=l.CCS2d,t.CCS3d=g.CCS3d,t.Transform2d=P.default,t.Transform3d=T.default,t.TriangledMesh=F.TriangledMesh,t.SurfacePoint=Er.SurfacePoint,t.RectMeshNode=Er.RectMeshNode,t.Curve2d=tt.Curve2d,t.BoundedCurve2d=Ze.BoundedCurve2d,t.Line2d=At.Line2d,t.LineSeg2d=at.LineSeg2d,t.NurbsCurve2d=st.NurbsCurve2d,t.PolylineCurve2d=ut.PolylineCurve2d,t.Ray2d=ct.Ray2d,t.Circle2d=$e.Circle2d,t.Arc2d=ze.Arc2d,t.BezierCurve2d=Xe.BezierCurve2d,t.Ellipse2d=rt.Ellipse2d,t.EllipticalArc2d=nt.EllipticalArc2d,t.GeomFace2d=it.GeomFace2d,t.GeomLoop2d=ot.GeomLoop2d,t.Curve3d=Et.Curve3d,t.BezierCurve3d=gt.BezierCurve3d,t.BoundedCurve3d=ft.BoundedCurve3d,t.CompositeCurve2d=et.CompositeCurve2d,t.CompositeCurve3d=dt.CompositeCurve3d,t.Line3d=St.Line3d,t.Ray3d=Pt.Ray3d,t.LineSeg3d=wt.LineSeg3d,t.PolylineCurve3d=xt.PolylineCurve3d,t.NurbsCurve3d=Dt.NurbsCurve3d,t.ConicCurve3d=It.ConicCurve3d,t.Circle3d=pt.Circle3d,t.Ellipse3d=Qt.Ellipse3d,t.CurveOnSurface=Ct.CurveOnSurface,t.Curve3dOnSurfaces=Bt.Curve3dOnSurfaces,t.Arc3d=lt.Arc3d,t.EllipticalArc3d=bt.EllipticalArc3d,t.Surface=Ot.Surface,t.ElementarySurface=mt.ElementarySurface,t.Plane=Mt.Plane,t.CylindricalSurface=vt.CylindricalSurface,t.ConicalSurface=yt.ConicalSurface,t.NurbsSurface=Rt.NurbsSurface,t.BoundedSurface=ht.BoundedSurface,t.TrimmedSurface=kt.TrimmedSurface,t.RectTrimmedSurface=Tt.RectTrimmedSurface,t.RevolveSurface=Ft.RevolveSurface,t.GeneralTrimmedSurface=_t.GeneralTrimmedSurface,t.ToroidalSurface=Nt.ToroidalSurface,t.SurfaceOfLinearExtrusion=Lt.SurfaceOfLinearExtrusion,t.CurveIntersect=Kt,t.Curve2dIntersect=Jt,t.CurveSurfaceIntersect=qt,t.SurfaceIntersect=Wt,t.PtInLoop=nr,t.LoopUtils=ir,t.CurveOverlap=sr,t.Curve2dOverlap=ur,t.LoopArea=Xt,t.LoopCCW=Zt,t.LoopInLoop=er,t.LoopNormal=tr,t.LoopSimplify=rr,t.DetectLoop=zt,t.FacesBoolean=Vt,t.CurveDistance=Ht,t.LineArcDistance=Yt,t.PathRectify=cr,t.Path2dOffset=Ar,t.Path3dOffset=ar,t.ClipperOffset=or,t.LoopCentroid=$t,t.SurfaceUVUtils=lr,t.TriangulatePlane=dr,t.TriangulateDevelopable=fr,t.TriangulateNurbs=pr,t.TriangulateRevSurface=Cr,t.TriangulatePolygon=Ir,t.simplifyPolygonsByHorizontal=Br.simplifyPolygonsByHorizontal,t.addRect=Br.addRect,t.clipping=Br.clipping,t.simplifyPolygons=Br.simplifyPolygons,t.Triangulate=Ir,t.triangulateOnRevSurface=yr.triangulateOnRevSurface,t.triangulateOnDevelopable=gr.triangulateOnDevelopable,t.triangulateOnNurbs=hr.triangulateOnNurbs,t.BBox2dData=k.BBox2dData,t.BBox3dData=G.BBox3dData,t.BezierCurve3dData=be.BezierCurve3dData,t.Matrix3Data=Y.Matrix3Data,t.Matrix4Data=K.Matrix4Data,t.EulerData=V.EulerData,t.QuaternionData=$.QuaternionData,t.Transform2dData=ee.Transform2dData,t.Transform3dData=te.Transform3dData,t.TriangledMeshData=re.TriangledMeshData,t.CCS2dData=U.CCS2dData,t.CCS3dData=j.CCS3dData,t.IntervalData=H.IntervalData,t.MPoint2dData=q.MPoint2dData,t.MPoint3dData=J.MPoint3dData,t.MVector2dData=W.MVector2dData,t.MVector3dData=z.MVector3dData,t.Point2dData=X.Point2dData,t.Point3dData=Z.Point3dData,t.Vector2dData=ne.Vector2dData,t.Vector3dData=ie.Vector3dData,t.Arc2dData=ce.Arc2dData,t.BezierCurve2dData=le.BezierCurve2dData,t.BoundedCurve2dData=ge.BoundedCurve2dData,t.Circle2dData=fe.Circle2dData,t.Curve2dData=pe.Curve2dData,t.CurveOnSurfaceData=Re.CurveOnSurfaceData,t.Curve3dOnSurfacesData=xe.Curve3dOnSurfacesData,t.Line2dData=Ee.Line2dData,t.LineSeg2dData=Be.LineSeg2dData,t.Ray2dData=me.Ray2dData,t.GeomFace2dData=ye.GeomFace2dData,t.GeomLoop2dData=Ce.GeomLoop2dData,t.Arc3dData=Qe.Arc3dData,t.BoundedCurve3dData=_e.BoundedCurve3dData,t.Circle3dData=Se.Circle3dData,t.CompositeCurve3dData=we.CompositeCurve3dData,t.ConicalSurfaceData=De.ConicalSurfaceData,t.Curve3dData=Me.Curve3dData,t.CylindricalSurfaceData=Pe.CylindricalSurfaceData,t.RevolveSurfaceData=Ye.RevolveSurfaceData,t.Ellipse2dData=de.Ellipse2dData,t.EllipticalArc2dData=Ie.EllipticalArc2dData,t.EllipticalArc3dData=Fe.EllipticalArc3dData,t.Ellipse3dData=Te.Ellipse3dData,t.Line3dData=Le.Line3dData,t.LineSeg3dData=Ne.LineSeg3dData,t.PlaneData=Ue.PlaneData,t.Ray3dData=Ve.Ray3dData,t.SurfaceData=Ke.SurfaceData,t.ToroidalSurfaceData=Je.ToroidalSurfaceData,t.CurveToData=oe,t.SurfaceToData=ue,t.DataConverter=br,t.CurveDataConverter=Qr,t.SurfaceDataConverter=se,t.NurbsCurve3dData=ke.NurbsCurve3dData,t.NurbsSurfaceData=Ge.NurbsSurfaceData,t.TrimmedSurfaceData=We.TrimmedSurfaceData,t.RectTrimmedSurfaceData=He.RectTrimmedSurfaceData,t.GeneralTrimmedSurfaceData=Oe.GeneralTrimmedSurfaceData,t.PolylineCurve2dData=ve.PolylineCurve2dData,t.PolylineCurve3dData=je.PolylineCurve3dData,t.SurfaceOfLinearExtrusionData=qe.SurfaceOfLinearExtrusionData,t.CompositeCurve2dData=he.CompositeCurve2dData,t.Translator=Ut.Translator,t.TranslatorWithContext=jt.TranslatorWithContext,t.ProtocolTranslators=Gt.ProtocolTranslators},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -63,7 +63,7 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.
|
|
|
63
63
|
Version 1.9.0
|
|
64
64
|
https://localforage.github.io/localForage
|
|
65
65
|
(c) 2013-2017 Mozilla, Apache License 2.0
|
|
66
|
-
*/A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function O(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):O(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function N(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(N.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function k(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){O(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return N.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(k(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},H=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},Y=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(Y(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!H(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;Y(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(933)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(291),o=r(1863),A=r(658),a=r(2),s=r(1002);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1864),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1035),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(990)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1036)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(229)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1871)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1011)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(1873)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(229),i=r(415),o=r(183),A=r(204)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(412),i=r(669),o=r(971)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1037)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(512),o=r(1882),A=r(691),a=r(692),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(1880)),o=r(513),A=n(r(1881)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1038),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(513),a=r(1038),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(512),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(1884),i=r(415),o=r(1888),A=r(499)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(1885)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1886),i=r(1887),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(232)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1039),a=r(1043),s=r(232),u=r(492),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(510),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1041),A=r(689),a=r(671),s=r(676),u=r(274),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(344),i=r(4),o=r(228),A=r(1037),a=r(682),s=r(11),u=r(232),c=r(1044),l=r(1045);r(1895);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(1897),i=r(1904)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1046),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1899);t.toPopBufferComponent=n.toPopBufferComponent,t.PopBufferComponent=n.PopBufferComponent;var i=r(1047);t.toPopBufferMtl=i.toPopBufferMtl,t.PopBufferMtl=i.PopBufferMtl},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44),i=r(1047),o=function(){function e(){this.doubleSided=!1}return e.prototype.getId=function(){return this.id},e.prototype.setId=function(e){return this.id=e,this},e.prototype.getMesh=function(){return this.mesh},e.prototype.setMesh=function(e){return this.mesh=e,this},e.prototype.getTransform=function(){return this.transform},e.prototype.setTransform=function(e){return this.transform=e,this},e.prototype.getMtl=function(){return this.mtl},e.prototype.setMtl=function(e){return this.mtl=e,this},e.prototype.getDoubleSided=function(){return this.doubleSided},e.prototype.setDoubleSided=function(e){return void 0===e&&(e=!1),this.doubleSided=e,this},e}();t.PopBufferComponent=o,t.toPopBufferComponent=function(e){var t=new o;return t.setId(e.id).setMesh(e.mesh).setDoubleSided(e.doubleSided),e.transform&&t.setTransform((new n.default).fromString(e.transform)),t.setMtl(e.mtl.filter((function(e){return!!e})).map(i.toPopBufferMtl)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(6),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1902),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(227),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1046),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1058);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1908);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1909);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1058),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(323);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1911);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1053);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(694);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1054);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1055);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(693);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1056);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1057);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(323),o=r(694);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1913);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1914);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1059);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1060);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1915);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1060),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1061);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1917);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1062);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1063);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1918);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(832),_Collector=__webpack_require__(419),_IdleWorker=__webpack_require__(1061),_PerfLog=__webpack_require__(1062),_TimeLog=__webpack_require__(1063),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=function(){function e(){var e;this.min=0,this.max=4294967295,this.existedIdMap=((e={})[this.min]=!0,e[this.max]=!0,e)}return e.prototype.onIdOccupied=function(e){this.existedIdMap[e]=!0;var t=this.min,r=this.max;e>=t&&e<=r&&(e-t>r-e?this.max=e:this.min=e)},e.prototype.findNewIdRange=function(){for(var e=Object.keys(this.existedIdMap).map((function(e){return Number(e)})).filter((function(e){return e>=0&&e<=4294967295})).sort((function(e,t){return e-t})),t=0,r=0,n=0,i=1;i<e.length;i++){var o=e[i-1],A=e[i];A-o>t&&(t=A-o,r=o,n=A)}if(r+1>=n)throw"No available id for ObjectIndex";this.min=r,this.max=n},e.prototype.getId=function(){var e=this.min+1;return e>=this.max&&(this.findNewIdRange(),e=this.min+1),this.onIdOccupied(e),e.toString()},e.prototype.markId=function(e){var t=Number(e);n.isInteger(t)&&this.onIdOccupied(t)},e}();t.UniqueIndexGenerator=i,t.uniqueIndexGenerator=new i;var o=function(){function e(){}return Object.defineProperty(e.prototype,"id",{get:function(){return this.getId()},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return void 0===this._id&&(this._id=t.uniqueIndexGenerator.getId()),this._id},e.prototype.setId=function(e){return this._id=e,t.uniqueIndexGenerator.markId(e),this},e}();t.default=o},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=s(t);if(r){var i=s(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return a(this,e)});function u(){var e;return i(this,u),(e=n.apply(this,arguments)).$version=0,e}return function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);Object.defineProperty(e,"prototype",{writable:!1})}(u,[{key:"compareVersion",value:function(e){return this.$version===e.getVersion(this.getId())}},{key:"exportVersion",value:function(e){e.setVersion(this.getId(),this.revisionId,this.$version,this.getVersionType())}},{key:"hasVersion",value:function(e){return e.has(this.getId())}},{key:"getVersionType",value:function(){return this.constructor}},{key:"getVersion",value:function(){return this.$version}}]),u}(e)}},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Axis3=t.Axis2=t.ALL_AXIS3=t.ALL_AXIS2=void 0,t.Axis2=n,function(e){e[e.X=0]="X",e[e.Y=1]="Y"}(n||(t.Axis2=n={})),t.Axis3=i,function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(t.Axis3=i={}));var o=[i.X,i.Y,i.Z];t.ALL_AXIS3=o;var A=[n.X,n.Y];t.ALL_AXIS2=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e.PROFILE_ID="vProfileId",e.OFFSET="offset",e.HANDLE_POSITION="handlePosition",e.HANDLE_ROTATION="handleRotate",e.OPEN_DIRECTION="openDirection",e.COVER_TYPE="coverType",e.LEFT_COVER="lCover",e.RIGHT_COVER="rCover",e.UP_COVER="uCover",e.DOWN_COVER="dCover",e.LEFT_COVER_TYPE="lCoverType",e.RIGHT_COVER_TYPE="rCoverType",e.UP_COVER_TYPE="uCoverType",e.DOWN_COVER_TYPE="dCoverType",e.FRONT_EXTENSION="QY",e.BACK_EXTENSION="HY",e.LEFT_SLOT_DEPTH="leftSlotDepth",e.RIGHT_SLOT_DEPTH="rightSlotDepth",e.TOP_SLOT_DEPTH="topSlotDepth",e.BOTTOM_SLOT_DEPTH="bottomSlotDepth",e.HAS_LEFT_SLOT="hasLeftSlot",e.HAS_RIGHT_SLOT="hasRightSlot",e.HAS_TOP_SLOT="hasTopSlot",e.HAS_BOTTOM_SLOT="hasBottomSlot",e.INDENT="indent",e.CRACK="crack",e.LEFT_CRACK="lCrack",e.RIGHT_CRACK="rCrack",e.UP_CRACK="uCrack",e.DOWN_CRACK="dCrack",e.LOCATION="location",e.DOOR_TYPE="doorType",e.JUNCTION="junction",e.HAS_SLOT="hasSlot",e.SLOT_DEPTH="slotDepth",e.FAN_NUMBER="num",e.DOOR_WIDTH="doorWidth",e.CROSS_TYPE="crossTypeId",e.FIRST_DOOR_TYPE="firstDoorTypeId",e.ANGLE_DEGREE="angleDegree",e.TEXTURE_ANGLE_DEGREE="textureAngleDegree",e.TEXTURE_PAVING_STYLE="texturePavingStyle",e.SECTION_TEXTURE_ANGLE_DEGREE="sectionTextureAngleDegree",e.SPLIT_DOOR_POSITIONS="positions",e.MATERIAL_ID="materialId",e.WINDOW_BGID="windowBgId",e.TOP_RAIL_BGID="topRailBgId",e.BOTTOM_RAIL_BGID="bottomRailBgId",e.LEFT_RAIL_BGID="leftRailBgId",e.RIGHT_RAIL_BGID="rightRailBgId",e.FIRST_WINDOW_POSITION="firstWindowPosition",e.SINGLE_WINDOW_PLACE="singleWindowPlace",e.SLIDING_WINDOW_TYPE="slidingWindowType",e.CELL_POSITION="cellPosition",e.GAUZE_BGID="gauzeBgId",e.UNITED_MATERIAL="unitedMaterialBrandGoodId",e.SLIDING_DOOR_SERIES="slidingDoorSeries",e.FIT="fit",e.PLACE_TYPE="placeType",e.MOLDING_PANEL_SIZE="size",e.MOLDING_TZ="TZ",e.MOLDING_TZT="TZT",e.FAUCET_CONNECTOR_PATH="faucetConnectorPath",e.FAUCET_CONNECTOR_OTHER_PATH="faucetConnectorOtherPath",e.MOLDING_LX="LX",e.MOLDING_LY="LY",e.MOLDING_LZ="LZ",e.COUNTERTOP_HOLES="countertopHoles",e.MOLDING_TYPE="moldingType",e.MOLDING_FRONT_PROFILE_ID="frontprofiledataid",e.MOLDING_BACK_PROFILE_ID="backprofiledataid",e.MOLDING_WRAP_EDGE="wrapEdge",e.MOLDING_PROFILE_ID="profiledataid",e.MOLDING_HOLE_PROFILE_ID="holeprofiledataid",e.MOLDING_HOLE_PATH_PROFILE_ID="profiledataid",e.MOLDING_EXTRUSION_HEIGHT="extrusionHeight",e.MOLDING_UNDERBOARDING_HEIGHT="underboardingHeight",e.MOLDING_FRONT_PROFILE_HEIGHT="frontProfileScaleHeight",e.MOLDING_BACK_PROFILE_HEIGHT="backProfileScaleHeight",e.MOLDING_PROFILE_HEIGHT="profileScaleHeight",e.PROCESS_RULE_ID="processRuleId",e.HEAD_INDENT="headIndent",e.TAIL_INDENT="tailIndent",e.HEAD_INSTALL_ANGLE="headInstallAngle",e.TAIL_INSTALL_ANGLE="tailInstallAngle",e.SPEC_FRONT_WATER_RETAINER="specFrontWaterRetainer",e.SKETCH_BACK_WATER_RETAINER="sketchBWRPaths",e.MOLDING_PROFILE_FRONT_OFFSET="profileFrontOffset",e.MOLDING_PROFILE_BACK_OFFSET="profileBackOffset",e.MOLDING_PROFILE_LEFT_OFFSET="profileLeftOffset",e.MOLDING_PROFILE_RIGHT_OFFSET="profileRightOffset",e.SIZE_CONTAIN_WATER_RETAINER="sizeContainWaterRetainer",e.HEIGHT_OFFSET="heightOffset",e.INSTALL_MODE="installMode",e.VERTICAL_INSTALL_MODE="verticalMoldingInstallMode",e.SIDE_SKIRT_INPUTS="sideSkirtInputs",e.MOLDING_HEIGHT="moldingHeight",e.MOLDING_HEIGHT_ZERO="moldingHeightZero",e.MOLDING_BASE_TYPE="moldingBaseType",e.MODE="mode",e.ALIGN_MODE="alignMode",e.MOLDING_MODE="mode",e.SKETCH_PATH="paramCornerPath",e.PATH="path",e.COUNT="count",e.ORIGINAL_MOLDING_AREA="originalMoldingArea",e.ORIGINAL_BOTTOM_MOLDING_AREAS="originalBottomMoldingAreas",e.MOLDING_AREA="moldingArea",e.MOLDING_PATH="moldingPath",e.HOLE_RELATIONS="holeRelations",e.CUT_POINTS="cutPoints",e.CORNER_CUT_POINTS="cornerCutPoints",e.CUT_MOLDING_PATH="cutMoldingPath",e.MOLDING_VERSION="moldingVersion",e.DIRECTION_X="directionx",e.NORMAL="normal",e.START="start",e.LEFT_INDENTATION_LENGTH="leftIndentationLength",e.RIGHT_INDENTATION_LENGTH="rightIndentationLength",e.CONNECTION_LINES="connectionLines",e.CONNECT_MODELS="connectedParamModels",e.OVER_SIDE_LEFT="overSideLeft",e.OVER_SIDE_RIGHT="overSideRight",e.OVER_SIDE_BOTTOM="overSideBottom",e.OVER_SIDE_TOP="overSideTop",e.OVER_SIDE_INSET="overSideInset",e.TRIM_LEFT="trimLeft",e.TRIM_RIGHT="trimRight",e.TRIM_BOTTOM="trimBottom",e.TRIM_TOP="trimTop",e.WIDTH="W",e.DEPTH="D",e.HEIGHT="H",e.OFF_GROUND="offGround",e.MATERIAL_BRAND_GOOD_ID="materialBrandGoodId",e.MATERIAL_BRAND_GOOD_ID_B="materialBrandGoodIdB",e.MATERIAL_BRAND_GOOD_ID_GLASS="materialBrandGoodIdGlass",e.MATERIAL_BRAND_GOOD_ID_BOTTOM_GLASS="materialBrandGoodIdBottomGlass",e.MATERIAL_BRAND_GOOD_ID_GAUZE="materialBrandGoodIdGauze",e.MATERIAL_BRAND_GOOD_ID_ALBAR="materialBrandGoodIdAlBar",e.MATERIAL_BRAND_GOOD_ID_LINE="materialBrandGoodIdLine",e.LV_LOCK_MATERIAL="SJCZ",e.LV_HANDEL_MATERIAL="CZ",e.FIXED_GLASS_CRAFTS="crafts",e.DW_PRODUCE="produce",e.DW_FITTING="dwFitting",e.SIMPLE_CONNECTORS="simpleConnectors",e.ROTATE_Z="rotateZ",e.FAUCET_POSITION="position",e.FAUCET_ROTATE="rotate",e.TEXTURE_SIZE="textureSize",e.TEXTURE_OFFSET="textureOffset",e.WIDTH_1="W1",e.WIDTH_2="W2",e.WIDTH_3="W3",e.WALL_THICKNESS_1="wallThickness1",e.WALL_THICKNESS_2="wallThickness2",e.WALL_THICKNESS_3="wallThickness3",e.OUTSIDE_1="outside1",e.OUTSIDE_2="outside2",e.OUTSIDE_3="outside3",e.WINDOW_OPEN_DIRECTION="windowOpenDirection",e.DOOR_OPEN_DIRECTION="doorOpenDirection",e.PUSH_OR_PULL="pushOrPull",e.INSTALL_POSITION="installPosition",e.INSTALL_POSITION_OFFSET="installPositionOffset",e.INSTALL_SURFACE="installSurface",e.INSTALL_ROTATE="installRotate",e.INSTALL_DEPTH="depthOffset",e.MARGIN="margin",e.RELATIVE_POSITION="relativePosition",e.OUT_POLYGONS="outpolygons",e.PLANK_PATH="plankPath",e.BRUSH_MATERIAL_BGID="brushMaterialBgId",e.BOTTOM_BRUSH_MATERIAL_BGID="bottomBrushMaterialBgId",e.MOLDING_EXPORT="export",e.JOINT_TYPE="jointtype",e.START_ROTATE="startRotate",e.START_ROTATE_AXIS="startRotateAxis",e.END_ROTATE="endRotate",e.END_ROTATE_AXIS="endRotateAxis",e.BORDER_ALIGNMENT="borderAlignment",e.SERIES="series",e.HOLE="hole",e.LINKED_HOLE="linkedHole",e.REGION3D="region3d",e.SEGMENTATION_DATA="segmentationData",e.BKX1="BKX1",e.BKX2="BKX2",e.BKX3="BKX3",e.BKY1="BKY1",e.BKY2="BKY2",e.BKY3="BKY3",e.BKY4="BKY4",e.BKNZHX="BKNZHX",e.BKNZHY="BKNZHY",e.BKWZHX="BKWZHX",e.BKWZHY="BKWZHY",e.BKBSX="BKBSX",e.BKBSY="BKBSY",e.BKSSX="BKSSX",e.BKSSY="BKSSY",e.HTX1="HTX1",e.HTX2="HTX2",e.STX1="STX1",e.STX2="STX2",e.BSX1="BSX1",e.BSX2="BSX2",e.BSY1="BSY1",e.BSY2="BSY2",e.SSX1="SSX1",e.SSX2="SSX2",e.SSY1="SSY1",e.SSY2="SSY2",e.ZHX1="ZHX1",e.ZHX2="ZHX2",e.ZHY1="ZHY1",e.ZHY2="ZHY2",e.ZHY3="ZHY3",e.ZHBSX="ZHBSX",e.ZHBSY="ZHBSY",e.ZHSSX="ZHSSX",e.ZHSSY="ZHSSY",e.ZHFHX="ZHFHX",e.ZHFHY="ZHFHY",e.YTX1="YTX1",e.YTX2="YTX2",e.YTY1="ZHY1",e.PZHX="PZHX",e.PZHY="PZHY",e.BLADES_POSITION="bladesPosition",e.BSNWKQ="BSNWKQ",e.BSKCFX="BSKCFX",e.SSNWKQ="SSNWKQ",e.SSKCFX="SSKCFX",e.DSGX="DSGX",e.DSGY="DSGY",e.ESGX1="ESGX1",e.ESGX2="ESGX2",e.ESGY1="ESGY1",e.ESGY2="ESGY2",e.SSGX1="SSGX1",e.SSGX2="SSGX2",e.SSGX3="SSGX3",e.SSGY1="SSGY1",e.SSGY2="SSGY2",e.SSGY3="SSGY3",e.DXGX="DXGX",e.EXGX1="EXGX1",e.EXGX2="EXGX2",e.SXGX1="SXGX1",e.SXGX2="SXGX2",e.SXGX3="SXGX3",e.GG="GG",e.TXX="TXX",e.TXY="TXY",e.TXY2="TXY2",e.SWDJ="SWDJ",e.DJGD="DJGD",e.ZL_TCK_X="ZL_TCK_X",e.ZL_TCK_Y="ZL_TCK_Y",e.FL_TCK_X="FL_TCK_X",e.TCK_TCBSK_X="TCK_TCBSK_X",e.TCK_TCBSK_Y="TCK_TCBSK_Y",e.TCBSK_BL_X="TCBSK_BL_X",e.TCBSK_BL_Y="TCBSK_BL_Y",e.HEIGHT_1="H1",e.HEIGHT_2="H2",e.CTCS_QD="CTCS_QD",e.CTCS_MBTS="CTCS_MBTS",e.DESIGN="design",e.WINDOW_RATIO="windowRatio",e.CRACK_WIDTH="crackWidth",e.WINDOW_FRAME_RAIL_BGID="windowFrameRailBgId",e.GAUZE_FRAME_RAIL_BGID="gauzeFrameRailBgId",e.TOP_PROFILE_BGID="topProfileBgId",e.BOTTOM_PROFILE_BGID="bottomProfileBgId",e.LEFT_PROFILE_BGID="leftProfileBgId",e.RIGHT_PROFILE_BGID="rightProfileBgId",e.WINDOW_PUSH_OR_PULL="windowPushOrPull",e.GAUZE_PUSH_OR_PULL="gauzePushOrPull",e.BEND_PROPERTIES="bendProperties",e.MOVABLE_FAN_WIDTH="movableFanWidth",e.IMPORT_BRAND_GOOD_ID="importBrandGoodId",e.PLATE_SPECIFIC="plateSpecific",e.LINE_PARAMS="lineParams",e.WALLPAVING_DIRECTION="wallPavingDirection",e.WALL_ID="wallId",e.QZJX="QZJX",e.QYJX="QYJX",e.QTJX="QTJX",e.QDJX="QDJX",e.HZJX="HZJX",e.HYJX="HYJX",e.HTJX="HTJX",e.HDJX="HDJX",e.HOLE_RELATION="holeRelation",e.QS="QS",e.HS="HS",e.LEFT_WIDTH="leftWidth",e.RIGHT_WIDTH="rightWidth",e.QBH="QBH",e.QBK="QBK",e.QCZJ="QCZJ",e.YCZJ="YCZJ",e.HCZJ="HCZJ",e.ZCZJ="ZCZJ",e.QGTCS="QGTCS",e.CLIENT_INFO="clientInfo",e.CUTTING_TYPE="cuttingType",e.CUTTING_INFO="cuttingInfo",e.BJHD="BJHD",e.NSYW="NSYW",e.EMBED="embed",e.QJJ="wallCornerAngle",e.WRAPPER_TYPE="wrapperType",e.AZ="installationMethod",e.COVER="cover",e.LIGHT_TYPE="lightType",e.LIGHT_POSITION="lightPosition",e.LIGHT_WIDTH="lightWidth",e.NON_HORIZONAL_COUNTERTOP_NEW_DOUBLE_SIDE_BLOCK_TYPE="verticalCountertopBlockType",e.NON_HORIZONAL_COUNTERTOP_DOUBLE_SIDE_WIDTH="bothSidesVisibleWidth",e.NON_HORIZONAL_COUNTERTOP_TYPE="verticalCountertopType",e.IS_STRETCH="isStretch",e.MATERIAL_PART="paramMeshInstance",e.COUNTERTOP_BUCKLE="buckleBlockInput",e.FASTENER_INPUT="fastenerInput"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AssemblyType=void 0,t.AssemblyType=n,function(e){e[e.Cabinet=0]="Cabinet",e[e.Wardrobe=1]="Wardrobe"}(n||(t.AssemblyType=n={}))},function(e,t,r){"use strict";var n;function i(e,t){var r=n;delete r[r[e]],r[e]=t,r[t]=e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.setParamAssemblyType=function(e){i("PARAM_ASSEMBLY",e)},t.setParamEntityType=function(e){i("PARAM_ENTITY",e)},t.setParamFurnitureType=function(e){i("PARAM_FURNITURE",e)},t.setParamVirtualType=function(e){i("PARAM_VIRTUAL",e)},function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY"}(n||(n={}));var o=n;t.default=o},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=-1]="DEFAULT",e[e.VALUE=0]="VALUE",e[e.FORMULA=1]="FORMULA"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DOOR_HOLE=0]="DOOR_HOLE",e[e.FACE_PARAMMODEL=1]="FACE_PARAMMODEL",e[e.DIVISION_PARAMMODEL=2]="DIVISION_PARAMMODEL",e[e.NEW_DOOR_HOLE=3]="NEW_DOOR_HOLE",e[e.DRAWING_HOLE=5]="DRAWING_HOLE"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.FRONT_END=0]="FRONT_END",e[e.EDITOR=1]="EDITOR"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.UNDEFIND=-1]="UNDEFIND",e[e.SPACE=0]="SPACE",e[e.CENTER=1]="CENTER",e[e.LEFT_FRONT_DOWN=2]="LEFT_FRONT_DOWN",e[e.LEFT_BACK_DOWN=3]="LEFT_BACK_DOWN"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LENGTH=1]="LENGTH",e[e.AREA=2]="AREA",e[e.NUMBER=3]="NUMBER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Face=t.ALL_AROUND_FACE3=t.ALL_AROUND_FACE2=void 0,t.Face=n,function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(n||(t.Face=n={}));var i=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM,n.FRONT,n.BACK];t.ALL_AROUND_FACE3=i;var o=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM];t.ALL_AROUND_FACE2=o},function(e,t,r){"use strict";var n,i,o,A,a,s,u,c,l,g,f,h,p;Object.defineProperty(t,"__esModule",{value:!0}),t.SwingOpenDirection=t.PushDirecton=t.PlaceType=t.OpenDirection=t.LocationType=t.InstallType=t.InstallSurfaceType=t.HandrailInstallType=t.GridOpenDirection=t.DoorType=t.DoorOpenDirection=t.CoverType=t.BorderAlignment=void 0,t.getEnumIndex=function(e){return Object.keys(e).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}))},t.getEnumNames=function(e){return Object.keys(e).filter((function(e){return isNaN(parseInt(e,10))}))},t.InstallSurfaceType=n,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(n||(t.InstallSurfaceType=n={})),t.DoorOpenDirection=i,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(i||(t.DoorOpenDirection=i={})),t.CoverType=o,function(e){e[e.INSIDE=0]="INSIDE",e[e.HALF_COVER=1]="HALF_COVER",e[e.FULL_COVER=2]="FULL_COVER"}(o||(t.CoverType=o={})),t.SwingOpenDirection=A,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.INCLOSEIN=4]="INCLOSEIN",e[e.NONE=5]="NONE",e[e.LEFT_TOP=6]="LEFT_TOP",e[e.LEFT_BOTTOM=7]="LEFT_BOTTOM",e[e.RIGHT_TOP=8]="RIGHT_TOP",e[e.RIGHT_BOTTOM=9]="RIGHT_BOTTOM"}(A||(t.SwingOpenDirection=A={})),t.GridOpenDirection=a,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.NONE=2]="NONE"}(a||(t.GridOpenDirection=a={})),t.PushDirecton=s,function(e){e[e.PUSH=0]="PUSH",e[e.PULL=1]="PULL"}(s||(t.PushDirecton=s={})),t.DoorType=u,function(e){e[e.DOOR=0]="DOOR",e[e.DRAWER_PANEL=1]="DRAWER_PANEL"}(u||(t.DoorType=u={})),t.OpenDirection=c,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(c||(t.OpenDirection=c={})),t.LocationType=l,function(e){e[e.ABOVE_BOARD=0]="ABOVE_BOARD",e[e.BELOW_BOARD=1]="BELOW_BOARD",e[e.HANGING=2]="HANGING",e[e.UPON_FLOOR=3]="UPON_FLOOR",e[e.UPON_MODEL=4]="UPON_MODEL"}(l||(t.LocationType=l={})),t.PlaceType=g,function(e){e[e.LOCATION=0]="LOCATION",e[e.FIT=1]="FIT"}(g||(t.PlaceType=g={})),t.BorderAlignment=f,function(e){e[e.OUTER=1]="OUTER",e[e.CENTER=2]="CENTER",e[e.INNER=3]="INNER",e[e.OUTERHANG=4]="OUTERHANG",e[e.INNERHANG=5]="INNERHANG"}(f||(t.BorderAlignment=f={})),t.InstallType=h,function(e){e[e.OUTER_HANG=0]="OUTER_HANG",e[e.INNER_HANG=1]="INNER_HANG"}(h||(t.InstallType=h={})),t.HandrailInstallType=p,function(e){e[e.INNER_FRAME=0]="INNER_FRAME",e[e.OUTER_FRAME=1]="OUTER_FRAME"}(p||(t.HandrailInstallType=p={}))},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IntersectType=t.IntersectArea=void 0,t.IntersectArea=n,function(e){e.BOX="box",e.MESH="mesh"}(n||(t.IntersectArea=n={})),t.IntersectType=i,function(e){e.STATIC="static",e.DYNAMIC="dynamic"}(i||(t.IntersectType=i={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EVersionType=void 0,t.EVersionType=n,function(e){e.Root="Root",e.Child="Child",e.Accessory="Accessory",e.Template="Template",e.Ref="Ref",e.Custom="Custom",e.Design="Design"}(n||(t.EVersionType=n={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOLERANCE=t.SIZE_TOLERANCE=t.SIN_THETA_ZERO_TOLERANCE=t.RADIANS_TOLERANCE=t.NUMBER_TOLERANCE=t.DISTANCE_TOLERANCE=t.DEGREES_TOLERANCE=void 0;var n=r(3);t.NUMBER_TOLERANCE=1e-6;t.SIZE_TOLERANCE=.1;t.DISTANCE_TOLERANCE=1;t.DEGREES_TOLERANCE=1;var i=Math.PI/180;t.RADIANS_TOLERANCE=i;var o=Math.sin(i);t.SIN_THETA_ZERO_TOLERANCE=o;var A=new n.Tolerance.Tolerance(Math.cos(i),1,1e-6);t.TOLERANCE=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalModel=void 0;var n=r(3),i=r(322),o=v(r(188)),A=v(r(141)),a=v(r(361)),s=v(r(68)),u=v(r(98)),c=v(r(207)),l=v(r(530)),g=v(r(44)),f=v(r(113)),h=v(r(16)),p=v(r(5)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var r=B(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(n,o,A):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(99)),I=r(349),y=r(698),C=r(1071),E=r(1939);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(B=function(e){return e?r:t})(e)}function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==w(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===w(o)?o:String(o)),n)}var i,o}function Q(e,t){return(Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=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(e){return!1}}();return function(){var r,n=S(e);if(t){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var D,R,M,x,P,T,F,O,L,N,k,G=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},U=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q(e,t)}(A,e);var t,r,i,o=b(A);function A(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(e=o.call(this)).position=new p.default(0,0,0),e.rotation=new p.default(0,0,0),e.scale=new p.default(1,1,1),e.size=new p.default(1,1,1),e.translation=new p.default,e.center=new p.default,e}return t=A,(r=[{key:"getBoundingBox2",value:function(){return this.getBox2().getBoundingBox()}},{key:"getBoundingBox3",value:function(){return this.getBox3().getBoundingBox()}},{key:"getPolygon",value:function(){return this.getBox2().getPolygon()}},{key:"getBox2",value:function(){return this.box2||(this.box2=new a.default(new h.default(this.getScaledSize()),new h.default(this.getPosition()),this.getRotation().z)),this.box2}},{key:"getBox3",value:function(){return this.box3||(this.box3=new s.default(this.getScaledSize(),this.getPosition(),this.getRotation())),this.box3}},{key:"getMatrix4",value:function(){return this.matrix4||(this.matrix4=(new g.default).compose(this.getPosition(),(new u.default).setFromVector3(this.getRotation()),this.getScale())),this.matrix4}},{key:"setMatrix4",value:function(e){var t=new p.default,r=new u.default(0,0,0),n=new p.default;e.decompose(t,r,n),this.position=t,this.rotation=(new p.default).setXYZ(r),this.scale=n}},{key:"getConcatenatedMatrix",value:function(){return this.getMatrix4()}},{key:"getConcatenatedBox3",value:function(){return this.getBox3()}},{key:"getMatrix3",value:function(){return this.matrix3||(this.matrix3=(new l.default).compose(new h.default(this.getPosition()),this.getRotation().z,new h.default(this.getScale()))),this.matrix3}},{key:"getTop",value:function(){return this.position.z+this.getScaledSize().z/2}},{key:"getBottom",value:function(){return this.position.z-this.getScaledSize().z/2}},{key:"getHeightRange",value:function(){return new c.default(this.getBottom(),this.getTop())}},{key:"getScaledSize",value:function(){return p.default.mul(this.getSize(),this.getScale())}},{key:"getScale",value:function(){return this.scale}},{key:"setScale",value:function(e){if((0,C.equalsNumber3)(this.scale,e))return this;var t=Object.assign(Object.assign({},this.scale),e),r=(0,C.checkNotZero)(t.x),n=(0,C.checkNotZero)(t.y),i=(0,C.checkNotZero)(t.z),o=(0,C.hackScaleValue)(r),A=(0,C.hackScaleValue)(n),a=(0,C.hackScaleValue)(i);return this.scale=new p.default(o,A,a),o===r&&A===n&&a===i||I.LOGGER.logError(new Error("illegal setScale ".concat(this.getId(),",error val is x:").concat(r,",y:").concat(n,",z:").concat(i))),this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){if((0,C.equalsNumber3)(this.size,e))return this;var t=Object.assign(Object.assign({},this.size),e),r=t.x,n=t.y,i=t.z;return this.size=new p.default((0,C.hackSizeValue)(r),(0,C.hackSizeValue)(n),(0,C.hackSizeValue)(i)),this}},{key:"getRotation",value:function(){return this.rotation}},{key:"setRotation",value:function(e){return(0,C.equalsNumber3)(this.rotation,e)||(this.rotation=new p.default(Object.assign(Object.assign({},this.rotation),e))),this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){if((0,C.equalsNumber3)(this.position,e))return this;var t=e.x,r=e.y,n=e.z;return void 0!==t&&(0,y.checkNumberAndLog)(t,"setPositionX"),void 0!==r&&(0,y.checkNumberAndLog)(r,"setPositionY"),void 0!==n&&(0,y.checkNumberAndLog)(n,"setPositionZ"),this.position=new p.default(Object.assign(Object.assign({},this.position),e)),this}},{key:"getTranslation",value:function(){return this.translation}},{key:"setTranslation",value:function(e){return this.translation=e,this}},{key:"getCenter",value:function(){return this.center}},{key:"setCenter",value:function(e){return this.center=e,this}},{key:"isSizeNaN",value:function(){return isNaN(this.size.x)||isNaN(this.size.y)||isNaN(this.size.z)}},{key:"isScaled",value:function(){return!this.scale.nearEquals(p.default.ONE)}},{key:"localToGlobal",value:function(e){var t=this.getConcatenatedMatrix(),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal",value:function(e){var t=(new g.default).getInverse(this.getConcatenatedMatrix()),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.globalToLocal(r);return new n.Point2d(i.x,i.y)}},{key:"localToGlobal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.localToGlobal(r);return new n.Point2d(i.x,i.y)}},{key:"afterSet",value:function(e,t,r){t===E.ModelPropertyType.Physical&&(this.matrix3=void 0,this.matrix4=void 0,this.box3=void 0,this.box2=void 0)}}])&&m(t.prototype,r),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),A}(d.default);t.PhysicalModel=j,G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(D=void 0!==p.default&&p.default)?D:Object)],j.prototype,"position",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(R=void 0!==p.default&&p.default)?R:Object)],j.prototype,"rotation",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(M=void 0!==p.default&&p.default)?M:Object)],j.prototype,"scale",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(x=void 0!==p.default&&p.default)?x:Object)],j.prototype,"size",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(P=void 0!==p.default&&p.default)?P:Object)],j.prototype,"translation",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(T=void 0!==p.default&&p.default)?T:Object)],j.prototype,"center",void 0),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(F=void 0!==o.default&&o.default)?F:Object)],j.prototype,"getBoundingBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(O=void 0!==A.default&&A.default)?O:Object)],j.prototype,"getBoundingBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(L=void 0!==f.default&&f.default)?L:Object)],j.prototype,"getPolygon",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(N=void 0!==p.default&&p.default)?N:Object)],j.prototype,"getScale",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getSize",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(k=void 0!==p.default&&p.default)?k:Object)],j.prototype,"getRotation",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getPosition",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getTranslation",null)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkNumberAndLog=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(void 0===e)return void n.LOGGER.logError(new Error("".concat(t," undefined number: ").concat(e)));if(!Number.isFinite(e))return void n.LOGGER.logError(new Error("".concat(t," Infinity number: ").concat(e)));if("string"==typeof e)return void n.LOGGER.logError(new Error("".concat(t," string number: ").concat(e)));if(isNaN(e))return void n.LOGGER.logError(new Error("".concat(t," NaN number: ").concat(e)))};var n=r(349)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkParam=c,t.checkParamAndLog=function(e,t,r){c(e,t)&&s(e,t,r)},t.checkParsedValue=l,t.checkParsedValueAndLog=function(e,t,r){l(e,t)&&s(e,t,r)},t.setOnCheckParamErrorCallBack=function(e){u=e};var n,i=r(2),o=r(10),A=r(349),a=(n=r(1069))&&n.__esModule?n:{default:n};function s(e,t,r){var n=r.action,i=r.oldValue,o=r.paramName;A.LOGGER.logError(new Error("action: ".concat(n," invalid ").concat(e," type value, paramName: ").concat(o,", value: ").concat(JSON.stringify(t),", ").concat(t,", oldValue: ").concat(i))),u(o,e,t,n)}var u=i.noop;function c(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:var n=(0,a.default)(e,t);("number"!=typeof n||isNaN(n))&&(r=!0);break;case o.ParamType.INT:var A=(0,a.default)(e,t);("number"!=typeof A||isNaN(A))&&(r=!0),(0,i.isInteger)(A)&&!t.includes(".")||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:var s=Number(t);(0,i.isInteger)(s)||(r=!0);break;case o.ParamType.BOOLEAN:"true"!==t&&"false"!==t&&(r=!0);break;case o.ParamType.STYLE:var u=(0,a.default)(e,t);"bgId"in u&&"versionId"in u||(r=!0),"number"==typeof u.bgId&&"number"==typeof u.versionId||(r=!0)}}catch(e){r=!0}return r}function l(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:("number"!=typeof t||isNaN(t))&&(r=!0);break;case o.ParamType.INT:("number"!=typeof t||isNaN(t))&&(r=!0),(0,i.isInteger)(t)||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:(0,i.isInteger)(Number(t))||(r=!0);break;case o.ParamType.BOOLEAN:"boolean"!=typeof t&&(r=!0);break;case o.ParamType.STYLE:"bgId"in t&&"versionId"in t||(r=!0),"number"==typeof t.bgId&&"number"==typeof t.versionId||(r=!0);break;case o.ParamType.STRING:"string"!=typeof t&&(r=!0)}}catch(e){r=!0}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelPropertyType=void 0;var n={Physical:Symbol("Physical"),Hole:Symbol("Hole"),NEED_CHANGED_EVENT:Symbol("NEED_CHANGED_EVENT")};t.ModelPropertyType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizProperty=void 0;var n=r(1941);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.paramKey=t.key,this.namespace=t.namespace,this.name=t.name,this.value=t.value,this.valueType=t.valueType}var t,r,i;return t=e,(r=[{key:"getParsedValue",value:function(){switch(this.valueType){case n.ParamBizValueType.boolean:case n.ParamBizValueType.int:case n.ParamBizValueType.float:return JSON.parse(this.value);default:return this.value}}},{key:"getName",value:function(){return this.name}},{key:"getValue",value:function(){return this.value}},{key:"getParamKey",value:function(){return this.paramKey}},{key:"getData",value:function(){return this.data}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParamBizProperty=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizValueType=void 0,t.ParamBizValueType=n,function(e){e.boolean="boolean",e.float="float",e.int="int"}(n||(t.ParamBizValueType=n={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RevitArc3Data=void 0,t.parseShape3=function(e){var t=new u.default,r=[],n=!0;if(e.curves.forEach((function(e){if("RevitLine3D"===e.type){var t=e;r.push(new s.default(p(t.start),p(t.end)))}else if("RevitArc3D"===e.type){var o=e,A=new i.default(p(o.position),p(o.xDirection),p(o.yDirection));r.push(new a.default(A,h(o.center),o.radius,o.startAngle,o.arcAngle)),Number.isFinite(o.startAngle)||(n=!1)}})),!n)return t;return t.setRevitCurves(r)},t.parseVector2=h,t.parseVector3=p;var i=c(r(242)),o=c(r(16)),A=c(r(5)),a=c(r(700)),s=c(r(517)),u=c(r(1077));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function g(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=g((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=""}));function h(e){return e?new o.default(e):void 0}function p(e){return e?new A.default(e):void 0}t.RevitArc3Data=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(723),i=r(78),o=r(112),A=r(340),a=r(102),s=r(16),u=function(){function e(e,t,r,n){this.center=e,this.radius=t,this.startAngle=r,this.arcAngle=n}return e.prototype.getAngleAtT=function(e){return this.startAngle+e*this.arcAngle},e.prototype.getPointAtT=function(e){return this.getPointByAngle(this.getAngleAtT(e))},e.prototype.getLengthAtT=function(e){var t=this.arcAngle;return this.radius*(Math.abs(t)*e)},e.prototype.getTByLength=function(e){var t=this.arcAngle;return e/this.radius/Math.abs(t)},e.prototype.getAngleByPoint=function(e){var t=this.getCircle().getAngle(e),r=this.getTByAngle(t);return this.getAngleAtT(r)},e.prototype.getTByAngle=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=!this.isClockwise(),s=i>o;if(s&&a||!s&&!a){var u=A.default.normalize(n-i);return u>Math.abs(r)&&(u=A.TWO_PI-u),u/Math.abs(r)}return(n-i)/r},e.prototype.getPointByAngle=function(e){var t=this.center,r=this.radius;return s.default.add(t,new s.default(r*Math.cos(e),r*Math.sin(e)))},e.prototype.isAngleInArc=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=Math.min(i,o),s=Math.max(i,o),u=r>0,c=i<o;return u&&c||!u&&!c?n>=a&&n<=s:n<=a||n>=s},e.prototype.getApproximatePoints=function(e){void 0===e&&(e=.3);var t=[],r=[new s.default(0,1)];if(0===this.radius||0===this.arcAngle)return t;for(;0!==r.length;){var n=r.pop(),i=.5*(n.x+n.y),A=new o.default(this.getPointAtT(n.x),this.getPointAtT(n.y)).signedDistanceFromPoint(this.getPointAtT(i));Math.abs(A)<e?t.push(this.getPointAtT(n.x)):r.push(new s.default(i,n.y),new s.default(n.x,i))}return t.push(this.getPointAtT(1)),t},e.prototype.getPointsByIncrement=function(e){if(e<=0)throw new Error("Increment must be greater than zero: "+e);var t,r=[];for(t=0;t<=1;t+=e)r.push(this.getPointAtT(t));return a.default.isEqual(t,1,.5*e)||r.push(this.getPointAtT(1)),r},e.prototype.getNearestPoint=function(e){var t=this.center,r=s.default.sub(e,t).angle();if(!this.isAngleInArc(r)){var n=this.getPointAtT(0),i=this.getPointAtT(1);return e.distance(n)<e.distance(i)?n:i}return this.getPointByAngle(r)},e.prototype.getPointSide=function(e){var t=this.center,r=this.radius,n=this.arcAngle,i=e.distance(t),o=-1;return a.default.isEqual(i,r)?o=0:i<r&&(o=1),0===(o*=Math.sign(n))?"ON_CURVE":o>0?"ON_LEFT":"ON_RIGHT"},e.prototype.getDistance=function(e,t){return void 0===t&&(t=!0),Math.abs(this.getSignedDistance(e,t))},e.prototype.getSignedDistance=function(e,t){var r;if(void 0===t&&(t=!0),t)r=this.getNearestPoint(e);else{var n=this.getAngleByPoint(e);r=this.getCircle().getPoint(n)}var i=e.distance(r);return"ON_LEFT"===this.getPointSide(e)?-i:i},e.prototype.isPointOnArcCurveInclusive=function(e,t){if(void 0===t&&(t=i.NUMBER_TOLERANCE),!this.getCircle().isPointOnCircle(e,t))return!1;var r=s.default.sub(e,this.center).angle();return this.isAngleInArc(r)},e.prototype.isPointOnArcCurveExclusive=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.isPointOnArcCurveInclusive(e,t)&&!this.isPointOnArcEnds(e,t)},e.prototype.isPointOnArcEnds=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.getPointAtT(0).nearEquals(e,t)||this.getPointAtT(1).nearEquals(e,t)},e.prototype.isClockwise=function(){return this.arcAngle<0},e.prototype.getBulge=function(){return Math.tan(this.arcAngle/4)},e.prototype.getCircle=function(){return new n.default(this.center,this.radius)},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this.startAngle,this.arcAngle)},e.fromChordAndBulge=function(t,r){var n=t.start,i=t.length(),o=t.getCenter(),a=Math.sign(r),u=a*r,c=4*Math.atan(u),l=i/2/Math.tan(c/2),g=t.getVector().rotate(a*A.HALF_PI).normalize(),f=s.default.add(o,g.mul(l)),h=s.default.sub(n,f);return new e(f,h.length(),h.angle(),a*c)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShape3=function(e){return{curves:e.getRevitCurves().map((function(e){if(e instanceof o.default)return{start:a(e.getStartPoint()),end:a(e.getEndPoint()),type:"RevitLine3D"};if(e instanceof i.default){var t=e.getRectFace();return{center:(r=e.getCenter(),(0,n.pick)(r,"x","y")),radius:e.getRadius(),startAngle:e.getStartAngle(),arcAngle:e.getArcAngle(),position:a(t.origin),xDirection:a(t.directionU),yDirection:a(t.directionV),type:"RevitArc3D"}}var r}))}};var n=r(2),i=A(r(700)),o=A(r(517));function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.pick)(e,"x","y","z")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FRACTION_DIGITS=void 0,t.formatParamValue=function(e,t){switch(e){case i.default.FLOAT:return function(e){return e+""}(t);case i.default.FLOAT2:return function(e){return e.x+","+e.y}(t);case i.default.FLOAT3:return A(t);case i.default.FLOAT3_BUFFER:return function(e){var t=e.length,r=t?A(e[--t]):"";for(;t;)r=A(e[--t])+";"+r;return r}(t);case i.default.INT:return function(e){return e.toFixed()}(t);case i.default.BOOLEAN:return function(e){return e+""}(t);case i.default.FIT:case i.default.STYLE:return function(e){return JSON.stringify(e)}(t);case i.default.BOOLEAN_LIST:return function(e){return parseInt((0,o.reverseStr)(e),2).toString()}(t);default:return t}};var n,i=(n=r(514))&&n.__esModule?n:{default:n},o=r(1070);function A(e){return e.x+","+e.y+","+e.z}t.FRACTION_DIGITS=1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(21),o=r(2),A=(n=r(514))&&n.__esModule?n:{default:n},a=r(350);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var g=new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.logParamsStore={},this.saveLog=(0,o.debounce)((function(){i.Util.safeExec((function(){var e=Object.values(t.logParamsStore);if(e.length){var r=function(e){var t="",r=[];return e.forEach((function(e){r.push(e.modelId+(e.rootModelId?">"+e.rootModelId:"")),t+="".concat(e.modelName," ").concat(e.rootModelName?">"+e.rootModelName:""," 参数变化 {"),Object.entries(e.paramStore).forEach((function(e){var r=u(e,2),n=r[0],i=r[1],o=i.preVal,A=i.nextVal;t+="".concat(n,": ").concat(o," to ").concat(A,"; ")})),t+="}"})),{logContent:t,modelIds:r}}(e),n=r.modelIds,o=r.logContent;(0,i.getLocalLogger)().add({module:"params",logLevel:i.LocalLogLevel.Info,entityIds:n,type:i.LogType.Data,content:o})}t.logParamsStore={}}),!1)}),200)}var t,r,n;return t=e,(r=[{key:"isEqual",value:function(e,t,r){return e.type!==A.default.FLOAT&&e.type!==A.default.INT||t.type!==A.default.FLOAT&&t.type!==A.default.INT||isNaN(Number(e.value))||isNaN(Number(t.value))?(0,a.compareParamData)(e,t):Math.abs(Number(e.value)-Number(t.value))<r}},{key:"collectParams",value:function(e,t,r){var n=this;i.Util.safeExec((function(){if(r&&!n.isEqual(e,t,.1)){var i=r.getId(),o=r.getRoot(),A=t.name;n.logParamsStore[i]||(n.logParamsStore[i]={modelId:i,modelName:r.getName(),rootModelId:o!==r?o.getId():void 0,rootModelName:o!==r?o.getName():void 0,paramStore:{}}),n.logParamsStore[i].paramStore[A]||(n.logParamsStore[i].paramStore[A]={preVal:e.value,nextVal:t.value}),n.logParamsStore[i].paramStore[A]&&(n.logParamsStore[i].paramStore[A].nextVal=t.value)}}),!1)}}])&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMON_OVERRIDE_ATTR_KEY=void 0,t.delCommonOverrideData=function(e,t,r){var o=u(e)||{},a=o[t];if(!a)return;return(0,n.remove)(a,(function(e){return Object.entries(r).every((function(t){var r=A(t,2),n=r[0];return r[1]===e[n]}))})),0===Object.keys(o).length||Object.values(o).every((function(e){return 0===e.length}))?(0,i.del)(e,"commonOverrideAttr"):(0,i.set)(e,"commonOverrideAttr",JSON.stringify(o))},t.getCommonOverrideData=u,t.setCommonOverrideData=function(e,t){var r=u(e);if(!r)return(0,i.set)(e,"commonOverrideAttr",JSON.stringify(t));var a=Object.assign({},r);function s(e,t){var r=o(e);return r.reverse(),(0,n.uniqBy)(r,(function(e){return JSON.stringify(t.map((function(t){return e[t]})))})).reverse()}return Object.entries(t).forEach((function(e){var t,r=A(e,2),n=r[0],i=r[1];a[n]?(t=a[n]).push.apply(t,o(i)):a[n]=i})),Object.entries(a).forEach((function(e){var t=A(e,2),r=t[0],n=t[1];"modelAttr"===r?a[r]=s(n,["attrName","setBizType"]):"modelParamAttr"===r&&(a[r]=s(n,["attrName","attrName","setBizType"]))})),(0,i.set)(e,"commonOverrideAttr",JSON.stringify(a))};var n=r(2),i=r(1948);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||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 A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=(0,i.get)(e,"commonOverrideAttr");if(r)try{var n=JSON.parse(r);return t?Object.entries(n).reduce((function(e,r){var n=A(r,2),i=n[0],o=n[1];return e[i]=o.filter((function(e){return e.setBizType===t})),e}),{}):n}catch(e){}}t.COMMON_OVERRIDE_ATTR_KEY="commonOverrideAttr"},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.del=function(e,t){var r=o(s(e,t),3),n=r[0],A=r[1],u=r[2];if(n)return A.splice(u,1),e.mergeBizProperties(i({},a,JSON.stringify(A))),!0},t.get=function(e,t){var r=o(s(e,t),1)[0];return r&&r.data},t.set=function(e,t,r){var n=o(s(e,t),2),A=n[0],u=n[1];A?A.data=r:u&&u.push({bizType:t,data:r});e.mergeBizProperties(i({},a,JSON.stringify(u||[{bizType:t,data:r}])))};var a="com.neican.extpoint.build.afterbuildbypmd";function s(e,t){var r=e.getBizProperties();if(r){var n;try{n=JSON.parse(r[a])}catch(e){}if(Array.isArray(n)){for(var i,o=n.length;o;)if((i=n[--o])&&i.bizType===t)return[i,n,o];return[void 0,n]}return[void 0,void 0]}return[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeWireGeometry=function(e,t){for(var r,n,o=e?e.coordinates:[],A=e?e.coordinatesIndex:[],a=t||new i.default,s=0;s<A.length-1;s+=2)r=3*A[s],n=3*A[s+1],a.vertices.push(o[r],o[r+1],o[r+2],o[n],o[n+1],o[n+2]);return a};var n,i=(n=r(1086))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZoneDivisionType=void 0,t.parseZoneDivisionData=function(e){return function e(t){var r=Object.assign(Object.assign({},t),{size:new o.default(t.size.x,t.size.y,t.size.z),position:new o.default(t.position.x,t.position.y,t.position.z)});return t.zoneDivisions&&t.zoneDivisions.length&&(r.zoneDivisions=t.zoneDivisions.map((function(t){return e(t)}))),r}(e)};var n,i,o=(n=r(5))&&n.__esModule?n:{default:n};t.ZoneDivisionType=i,function(e){e.X="X",e.Y="Y",e.Z="Z"}(i||(t.ZoneDivisionType=i={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceObjectType=t.ParameterAssignment=void 0,t.SourceObjectType=o,function(e){e[e.MODEL=0]="MODEL",e[e.DRAIN_HOLE=1]="DRAIN_HOLE",e[e.FAUCET_HOLE=2]="FAUCET_HOLE",e[e.AUX_HOLE=3]="AUX_HOLE"}(o||(t.SourceObjectType=o={}));var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(e){return this.model=e,this}},{key:"getName",value:function(){return this.name}},{key:"setName",value:function(e){return this.name=e,this}},{key:"getCategory",value:function(){return this.category}},{key:"setCategory",value:function(e){return this.category=e,this}},{key:"getSourceObjectType",value:function(){return this.sourceObjectType}},{key:"setSourceObjectType",value:function(e){return this.sourceObjectType=e,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){return this.size=e,this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){return this.position=e,this}},{key:"getRotate",value:function(){return this.rotate}},{key:"setRotate",value:function(e){return this.rotate=e,this}}])&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParameterAssignment=A},function(e,t,r){"use strict";function n(e,t,r){if(e===t)return!0;if(e&&t&&e.length===t.length){for(var n=0,i=e.length;n<i;n++)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={equalsArray:n,equalsArrayBuffer:function(e,t){return e===t||!(!e||!t)&&n(new Float64Array(e),new Float64Array(t))},equalsBox3:function(e,t){return e===t||!(!e||!t)&&(e.getPosition().equals(t.getPosition())&&e.getSize().equals(t.getSize())&&e.getRotation().equals(t.getRotation()))},diffArray:function(e,t,r){t=t||[];var n=void 0,i=void 0,o=void 0,A=void 0;if(0===(e=e||[]).length)n=[],i=[],o=[],A=t.slice();else if(0===t.length)n=e.slice(),i=[],o=[],A=[];else{n=[],i=[],o=[],A=[];for(var a=void 0,s=void 0,u=void 0,c=0,l=Math.min(e.length,t.length);c<l;++c)if((s=e[c])!==(a=t[c])){if(r?r(s)!==r(a):s.id!==a.id){0!==c&&(e=e.slice(c),t=t.slice(c));break}i.push(s),o.push(a)}if(c===l){if(c<e.length)for(;c<e.length;)n.push(e[c]),++c;else if(c<t.length)for(;c<t.length;)A.push(t[c]),++c}else{for(var g={},f={},h=0,p=e.length;h<p;++h)s=e[h],g[u=r?r(s):s.id]=e[h];for(var d=0,I=t.length;d<I;++d)a=t[d],s=g[u=r?r(a):a.id],f[u]=a,s?s!==a&&(i.push(s),o.push(a)):A.push(a);for(var y=0,C=e.length;y<C;++y)s=e[y],(a=f[u=r?r(s):s.id])||n.push(s)}}return{removed:n,updatedOld:i,updatedNew:o,added:A}}};t.default=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={CoreCustomContext:!0,CoreParamModelAssemblyBackup:!0,CoreParamModelBackup:!0};Object.defineProperty(t,"CoreCustomContext",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"CoreParamModelAssemblyBackup",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"CoreParamModelBackup",{enumerable:!0,get:function(){return u.default}});var o=r(1954);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(208));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1959);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=c(r(704)),u=c(r(705));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={DoorHoleData:!0,InnerFrameData:!0,MeshData:!0,ParamData:!0,ParamModelData:!0,ParamModelGroupData:!0,BaseParamModelData:!0};Object.defineProperty(t,"BaseParamModelData",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"DoorHoleData",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"InnerFrameData",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MeshData",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ParamData",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ParamModelData",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelGroupData",{enumerable:!0,get:function(){return I.default}});var o=r(1955);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=r(1073);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=m(r(1075));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(1078);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=m(r(1079));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1956);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(1957);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=m(r(1081));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=m(r(350));Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1088);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=r(1089);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var d=m(r(703));Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var I=m(r(702));Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var y=r(1958);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var C=r(1082);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var E,B=(E=r(1072))&&E.__esModule?E:{default:E};function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function m(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.RuleLimitData=void 0;var A=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.RuleLimitData=A},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={InnerFrame:!0,DoorHole:!0,FitRule:!0,IntersectBox:!0,ParamPackage:!0,AutoGenerateConfig:!0,NamedValue:!0,ParamModelAttached:!0,IParamModelAttachedPartialPb:!0};Object.defineProperty(t,"AutoGenerateConfig",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"DoorHole",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"FitRule",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"IParamModelAttachedPartialPb",{enumerable:!0,get:function(){return I.IParamModelAttachedPartialPb}}),Object.defineProperty(t,"InnerFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"IntersectBox",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"NamedValue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelAttached",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"ParamPackage",{enumerable:!0,get:function(){return g.default}});var o=r(1961);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=E(r(1080));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1074);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=E(r(699));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=E(r(516));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1962);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=E(r(1085));Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=E(r(518));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=r(519);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1083);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=y(r(1084)),d=y(r(1963)),I=E(r(428));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(C=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=C(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RevitArc3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"RevitCurve3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RevitLine3",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"RevitShape3",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"deltaTransformPoint",{enumerable:!0,get:function(){return o.deltaTransformPoint}});var i=u(r(700)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(1076)),A=u(r(517)),a=u(r(1077));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeoReferenceType=t.GeoReferencePointData=t.GeoReferenceFaceData=t.GeoReferenceExtrusionData=t.GeoReferenceCurveData=t.GRPSurfaceData=t.GRPExtrusionData=t.GRPCurveData=t.BaseGeoReferenceData=void 0,t.parseGeoReferenceData=function(e){var t,r=Object.assign(Object.assign({},e),{value:JSON.parse(e.value)});switch(r.type){case C.CCS3D:t=(0,n.deserialize)(_,r);break;case C.CURVES:t=(0,n.deserialize)(S,r);break;case C.FACE:t=(0,n.deserialize)(w,r);break;case C.EXTRUSION:t=(0,n.deserialize)(D,r);break;default:t=(0,n.deserialize)(b,r)}return t},t.transformLocalGRPToWorldGRP=function(e,t){e instanceof _?e.value=function(e,t){var r=e.toCCS();return r.transform(t),new i.CCS3dData(r)}(e.value,t):e instanceof S?e.value=R(e.value,t):e instanceof w?e.value=function(e,t){var r,n=e.surface.toSurface();n.transform(t),r=n instanceof i.Plane?new i.PlaneData(n):n instanceof i.CylindricalSurface?new i.CylindricalSurfaceData(n):n instanceof i.SurfaceOfLinearExtrusion?new i.SurfaceOfLinearExtrusionData(n):new i.SurfaceData(n);return e.surface=r,e.outLoop=R(e.outLoop,t),e.innerLoops=e.innerLoops.map((function(e){return R(e,t)})),e}(e.value,t):e instanceof D&&(e.value=function(e,t){var r=e.matrix.toMatrix();return r.premultiply(t),e.matrix=new i.Matrix4Data(r),e}(e.value,t));return e};var n=r(17),i=r(3);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=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(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===f(o)?o:String(o)),n)}var i,o}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var h,p,d,I,y,C,E=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},B=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t.GeoReferenceType=C,function(e){e.CCS3D="CCS3D",e.CURVES="CURVES",e.FACE="FACE",e.EXTRUSION="EXTRUSION"}(C||(t.GeoReferenceType=C={}));var v=l((function e(){g(this,e)}));t.GRPCurveData=v,E([(0,n.JsonProperty)({class:i.BoundedCurve3dData,converter:i.DataConverter.BoundedCurve3dDatasConverter}),B("design:type",Array)],v.prototype,"curves",void 0);var m=l((function e(){g(this,e)}));t.GRPSurfaceData=m,E([(0,n.JsonProperty)({converter:i.DataConverter.SurfaceDataConverter}),B("design:type","function"==typeof(h=void 0!==i.SurfaceData&&i.SurfaceData)?h:Object)],m.prototype,"surface",void 0),E([(0,n.JsonProperty)(),B("design:type",v)],m.prototype,"outLoop",void 0),E([(0,n.JsonProperty)({class:v,default:[]}),B("design:type",Array)],m.prototype,"innerLoops",void 0);var Q=l((function e(){g(this,e)}));t.GRPExtrusionData=Q,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(p=void 0!==i.Matrix4Data&&i.Matrix4Data)?p:Object)],Q.prototype,"matrix",void 0),E([(0,n.JsonProperty)(),B("design:type",Number)],Q.prototype,"distance",void 0),E([(0,n.JsonProperty)(),B("design:type","function"==typeof(d=void 0!==i.GeomFace2dData&&i.GeomFace2dData)?d:Object)],Q.prototype,"face",void 0);var b=l((function e(){g(this,e)}));t.BaseGeoReferenceData=b,E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"id",void 0),E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"name",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"type",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"businessType",void 0),E([(0,n.JsonProperty)({default:new Map}),B("design:type","function"==typeof(I="undefined"!=typeof Map&&Map)?I:Object)],b.prototype,"data",void 0);var _=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferencePointData=_,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(y=void 0!==i.CCS3dData&&i.CCS3dData)?y:Object)],_.prototype,"value",void 0);var S=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceCurveData=S,E([(0,n.JsonProperty)({class:v}),B("design:type",v)],S.prototype,"value",void 0);var w=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceFaceData=w,E([(0,n.JsonProperty)(),B("design:type",m)],w.prototype,"value",void 0);var D=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);function R(e,t){return e.curves=e.curves.map((function(e){var r=e.toCurve();return r.transform(t),r instanceof i.Arc3d?new i.Arc3dData(r):r instanceof i.LineSeg3d?new i.LineSeg3dData(r):new i.BoundedCurve3dData(r)})),e}t.GeoReferenceExtrusionData=D,E([(0,n.JsonProperty)(),B("design:type",Q)],D.prototype,"value",void 0)},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCoreParamModel=function(e){return e instanceof n.default},t.isCoreParamModelAssembly=function(e){return e instanceof i.default};var n=o(r(107)),i=o(r(421));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(1967),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},function(e,t,r){"use strict";e.exports=r(1968)()?Math.sign:r(1969)},function(e,t,r){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,r){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=r(1972),a=r(1091);e.exports=function e(t){var r,s,u;if(n(t),(r=Object(arguments[1])).async&&r.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(s=a(r.length,t.length,r.async&&o.async),u=A(t,s,r),i(o,(function(e,t){r[t]&&e(r[t],u,r)})),e.__profiler__&&e.__profiler__(u),u.updateEnv(),u.memoized)}},function(e,t,r){"use strict";var n=r(234),i=r(351),o=Function.prototype.bind,A=Function.prototype.call,a=Object.keys,s=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,l=arguments[2],g=arguments[3];return r=Object(i(r)),n(u),c=a(r),g&&c.sort("function"==typeof g?o.call(g,r):void 0),"function"!=typeof e&&(e=c[e]),A.call(e,c,(function(e,n){return s.call(r,e)?A.call(u,l,r[e],e,r,n):t}))}}},function(e,t,r){"use strict";var n=r(1973),i=r(1093),o=r(280),A=r(1987).methods,a=r(1988),s=r(2004),u=Function.prototype.apply,c=Function.prototype.call,l=Object.create,g=Object.defineProperties,f=A.on,h=A.emit;e.exports=function(e,t,r){var A,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D=l(null);return p=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(m=s(r.normalizer),d=m.get,I=m.set,y=m.delete,C=m.clear),null!=r.resolvers&&(w=a(r.resolvers)),S=d?i((function(t){var r,i,o=arguments;if(w&&(o=w(o)),null!==(r=d(o))&&hasOwnProperty.call(D,r))return Q&&A.emit("get",r,o,this),D[r];if(i=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),null===r){if(null!==(r=d(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=I(o)}else if(hasOwnProperty.call(D,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[r]=i,b&&A.emit("set",r,null,i),i}),p):0===t?function(){var t;if(hasOwnProperty.call(D,"data"))return Q&&A.emit("get","data",arguments,this),D.data;if(t=arguments.length?u.call(e,this,arguments):c.call(e,this),hasOwnProperty.call(D,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return D.data=t,b&&A.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(w&&(o=w(arguments)),i=String(o[0]),hasOwnProperty.call(D,i))return Q&&A.emit("get",i,o,this),D[i];if(r=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),hasOwnProperty.call(D,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[i]=r,b&&A.emit("set",i,null,r),r},A={original:e,memoized:S,profileName:r.profileName,get:function(e){return w&&(e=w(e)),d?d(e):String(e[0])},has:function(e){return hasOwnProperty.call(D,e)},delete:function(e){var t;hasOwnProperty.call(D,e)&&(y&&y(e),t=D[e],delete D[e],_&&A.emit("delete",e,t))},clear:function(){var e=D;C&&C(),D=l(null),A.emit("clear",e)},on:function(e,t){return"get"===e?Q=!0:"set"===e?b=!0:"delete"===e&&(_=!0),f.call(this,e,t)},emit:h,updateEnv:function(){e=A.original}},E=d?i((function(e){var t,r=arguments;w&&(r=w(r)),null!==(t=d(r))&&A.delete(t)}),p):0===t?function(){return A.delete("data")}:function(e){return w&&(e=w(arguments)[0]),A.delete(e)},B=i((function(){var e,r=arguments;return 0===t?D.data:(w&&(r=w(r)),e=d?d(r):String(r[0]),D[e])})),v=i((function(){var e,r=arguments;return 0===t?A.has("data"):(w&&(r=w(r)),null!==(e=d?d(r):String(r[0]))&&A.has(e))})),g(S,{__memoized__:o(!0),delete:o(E),clear:o(A.clear),_get:o(B),_has:o(v)}),A}},function(e,t,r){"use strict";var n=r(1092),i=r(1979),o=r(277),A=Error.captureStackTrace;e.exports=function(t){var r=new Error(t),a=arguments[1],s=arguments[2];return o(s)||i(a)&&(s=a,a=null),o(s)&&n(r,s),o(a)&&(r.code=a),A&&A(r,e.exports),r}},function(e,t,r){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){"use strict";var n=r(1976),i=r(351),o=Math.max;e.exports=function(e,t){var r,A,a,s=o(arguments.length,2);for(e=Object(i(e)),a=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},A=1;A<s;++A)n(t=arguments[A]).forEach(a);if(void 0!==r)throw r;return e}},function(e,t,r){"use strict";e.exports=r(1977)()?Object.keys:r(1978)},function(e,t,r){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(277),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(277),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[n(e)]||!1}},function(e,t,r){"use strict";var n=r(1981),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!i.test(o.call(e))}},function(e,t,r){"use strict";var n=r(1982);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},function(e,t,r){"use strict";var n=r(1983);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1095),o={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(o,n(e))}},function(e,t,r){"use strict";e.exports=r(1985)()?String.prototype.contains:r(1986)},function(e,t,r){"use strict";var n="razdwatrzy";e.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(e,t,r){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a,s,u,c,l=r(280),g=r(234),f=Function.prototype.apply,h=Function.prototype.call,p=Object.create,d=Object.defineProperty,I=Object.defineProperties,y=Object.prototype.hasOwnProperty,C={configurable:!0,enumerable:!1,writable:!0};o=function(e,t){var r,n;return g(t),n=this,i.call(this,e,r=function(){A.call(n,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},s={on:i=function(e,t){var r;return g(t),y.call(this,"__ee__")?r=this.__ee__:(r=C.value=p(null),d(this,"__ee__",C),C.value=null),r[e]?"object"===n(r[e])?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:o,off:A=function(e,t){var r,i,o,A;if(g(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"===n(i=r[e]))for(A=0;o=i[A];++A)o!==t&&o.__eeOnceListener__!==t||(2===i.length?r[e]=i[A?0:1]:i.splice(A,1));else i!==t&&i.__eeOnceListener__!==t||delete r[e];return this},emit:a=function(e){var t,r,i,o,A;if(y.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"===n(o)){for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];for(o=o.slice(),t=0;i=o[t];++t)f.call(i,this,A)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];f.call(o,this,A)}}},u={on:l(i),once:l(o),off:l(A),emit:l(a)},c=I({},u),e.exports=t=function(e){return null==e?p(c):I(Object(e),u)},t.methods=s},function(e,t,r){"use strict";var n,i=r(1989),o=r(277),A=r(234),a=Array.prototype.slice;n=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(a.call(e,this.length))},e.exports=function(e){return(e=i(e)).forEach((function(e){o(e)&&A(e)})),n.bind(e)}},function(e,t,r){"use strict";var n=r(706),i=Array.isArray;e.exports=function(e){return i(e)?e:n(e)}},function(e,t,r){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(1992).iterator,i=r(2001),o=r(2002),A=r(278),a=r(234),s=r(351),u=r(277),c=r(2003),l=Array.isArray,g=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,r,p,d,I,y,C,E,B,v,m=arguments[1],Q=arguments[2];if(e=Object(s(e)),u(m)&&a(m),this&&this!==Array&&o(this))t=this;else{if(!m){if(i(e))return 1!==(I=e.length)?Array.apply(null,e):((d=new Array(1))[0]=e[0],d);if(l(e)){for(d=new Array(I=e.length),r=0;r<I;++r)d[r]=e[r];return d}}d=[]}if(!l(e))if(void 0!==(B=e[n])){for(C=a(B).call(e),t&&(d=new t),E=C.next(),r=0;!E.done;)v=m?g.call(m,Q,E.value,r):E.value,t?(f.value=v,h(d,r,f)):d[r]=v,E=C.next(),++r;I=r}else if(c(e)){for(I=e.length,t&&(d=new t),r=0,p=0;r<I;++r)v=e[r],r+1<I&&(y=v.charCodeAt(0))>=55296&&y<=56319&&(v+=e[++r]),v=m?g.call(m,Q,v,p):v,t?(f.value=v,h(d,p,f)):d[p]=v,++p;I=p}if(void 0===I)for(I=A(e.length),t&&(d=new t(I)),r=0;r<I;++r)v=m?g.call(m,Q,e[r],r):e[r],t?(f.value=v,h(d,r,f)):d[r]=v;return t&&(f.value=null,d.length=I),d}},function(e,t,r){"use strict";e.exports=r(1993)()?r(521).Symbol:r(1996)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(521),o={object:!0,symbol:!0};e.exports=function(){var e,t=i.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!o[n(t.iterator)]&&(!!o[n(t.toPrimitive)]&&!!o[n(t.toStringTag)])}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&(!!globalThis&&globalThis.Array===Array)}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=function(){if("object"===("undefined"==typeof self?"undefined":r(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":r(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a=r(280),s=r(1096),u=r(521).Symbol,c=r(1998),l=r(1999),g=r(2e3),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"==typeof u)try{String(u()),A=!0}catch(e){}else u=null;o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},e.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return A?u(t):(r=f(o.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},l(i),g(i),h(o.prototype,{constructor:a(i),toString:a("",(function(){return this.__name__}))}),h(i.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(i.prototype,i.toPrimitive,a("",(function(){var e=s(this);return"symbol"===n(e)?e:e.toString()}))),p(i.prototype,i.toStringTag,a("c","Symbol")),p(o.prototype,i.toStringTag,a("c",i.prototype[i.toStringTag])),p(o.prototype,i.toPrimitive,a("c",i.prototype[i.toPrimitive]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return!!e&&("symbol"===n(e)||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,r){"use strict";var n=r(280),i=Object.create,o=Object.defineProperty,A=Object.prototype,a=i(null);e.exports=function(e){for(var t,r,i=0;a[e+(i||"")];)++i;return a[e+=i||""]=!0,o(A,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},function(e,t,r){"use strict";var n=r(280),i=r(521).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},function(e,t,r){"use strict";var n=r(280),i=r(1096),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(e){return n.call(e)===i}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&i(n.call(e))}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString,o=i.call("");e.exports=function(e){return"string"==typeof e||e&&"object"===n(e)&&(e instanceof String||i.call(e)===o)||!1}},function(e,t,r){"use strict";var n=r(234);e.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},function(e,t,r){"use strict";e.exports=function(e){var t,r,n=e.length;if(!n)return"";for(t=String(e[r=0]);--n;)t+=""+e[++r];return t}},function(e,t,r){"use strict";e.exports=function(e){return e?function(t){for(var r=String(t[0]),n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(){var e=0,t=[],r=i(null);return{get:function(e){var r,i=0,o=t,A=e.length;if(0===A)return o[A]||null;if(o=o[A]){for(;i<A-1;){if(-1===(r=n.call(o[0],e[i])))return null;o=o[1][r],++i}return-1===(r=n.call(o[0],e[i]))?null:o[1][r]||null}return null},set:function(i){var o,A=0,a=t,s=i.length;if(0===s)a[s]=++e;else{for(a[s]||(a[s]=[[],[]]),a=a[s];A<s-1;)-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1,a[1].push([[],[]])),a=a[1][o],++A;-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1),a[1][o]=++e}return r[e]=i,e},delete:function(e){var i,o=0,A=t,a=r[e],s=a.length,u=[];if(0===s)delete A[s];else if(A=A[s]){for(;o<s-1;){if(-1===(i=n.call(A[0],a[o])))return;u.push(A,i),A=A[1][i],++o}if(-1===(i=n.call(A[0],a[o])))return;for(e=A[1][i],A[0].splice(i,1),A[1].splice(i,1);!A[0].length&&u.length;)i=u.pop(),(A=u.pop())[0].splice(i,1),A[1].splice(i,1)}delete r[e]},clear:function(){t=[],r=i(null)}}}},function(e,t,r){"use strict";e.exports=r(2009)()?Number.isNaN:r(2010)},function(e,t,r){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t,r){"use strict";e.exports=function(e){return e!=e}},function(e,t,r){"use strict";var n=r(707);e.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return-1===i?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);-1!==i&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,A=r;o<e-1;){if(-1===(i=n.call(A[0],t[o])))return null;A=A[1][i],++o}return-1===(i=n.call(A[0],t[o]))?null:A[1][i]||null},set:function(i){for(var A,a=0,s=r;a<e-1;)-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1,s[1].push([[],[]])),s=s[1][A],++a;return-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1),s[1][A]=++t,o[t]=i,t},delete:function(t){for(var i,A=0,a=r,s=[],u=o[t];A<e-1;){if(-1===(i=n.call(a[0],u[A])))return;s.push(a,i),a=a[1][i],++A}if(-1!==(i=n.call(a[0],u[A]))){for(t=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&s.length;)i=s.pop(),(a=s.pop())[0].splice(i,1),a[1].splice(i,1);delete o[t]}},clear:function(){r=[[],[]],o=i(null)}}}},function(e,t,r){"use strict";var n=r(706),i=r(1097),o=r(1094),A=r(1093),a=r(708),s=Array.prototype.slice,u=Function.prototype.apply,c=Object.create;r(279).async=function(e,t){var r,l,g,f=c(null),h=c(null),p=t.memoized,d=t.original;t.memoized=A((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=s.call(t,0,-1)),p.apply(l=this,g=t)}),p);try{o(t.memoized,p)}catch(e){}t.on("get",(function(e){var n,i,o;if(r){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],r]:f[e].push(r),void(r=null);n=r,i=l,o=g,r=l=g=null,a((function(){var A;hasOwnProperty.call(h,e)?(A=h[e],t.emit("getasync",e,o,i),u.call(n,A.context,A.args)):(r=n,l=i,g=o,p.apply(i,o))}))}})),t.original=function(){var e,i,o,A;return r?(e=n(arguments),i=function e(r){var i,o,s=e.id;if(null!=s){if(delete e.id,i=f[s],delete f[s],i)return o=n(arguments),t.has(s)&&(r?t.delete(s):(h[s]={context:this,args:o},t.emit("setasync",s,"function"==typeof i?1:i.length))),"function"==typeof i?A=u.call(i,this,o):i.forEach((function(e){A=u.call(e,this,o)}),this),A}else a(u.bind(e,this,arguments))},o=r,r=l=g=null,e.push(i),A=u.call(d,this,e),i.cb=o,r=i,A):u.call(d,this,arguments)},t.on("set",(function(e){r?(f[e]?"function"==typeof f[e]?f[e]=[f[e],r.cb]:f[e].push(r.cb):f[e]=r.cb,delete r.cb,r.id=e,r=null):t.delete(e)})),t.on("delete",(function(e){var r;hasOwnProperty.call(f,e)||h[e]&&(r=h[e],delete h[e],t.emit("deleteasync",e,s.call(r.args,1)))})),t.on("clear",(function(){var e=h;h=c(null),t.emit("clearasync",i(e,(function(e){return s.call(e.args,1)})))}))}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(772),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(144))},function(e,t,r){"use strict";var n=r(1097),i=r(2016),o=r(2017),A=r(2019),a=r(1099),s=r(708),u=Object.create,c=i("then","then:finally","done","done:finally");r(279).promise=function(e,t){var r=u(null),i=u(null),l=u(null);if(!0===e)e=null;else if(e=o(e),!c[e])throw new TypeError("'"+A(e)+"' is not valid promise mode");t.on("set",(function(n,o,A){var u=!1;if(!a(A))return i[n]=A,void t.emit("setasync",n,1);r[n]=1,l[n]=A;var c=function(e){var o=r[n];if(u)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},g=function(){u=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},f=e;if(f||(f="then"),"then"===f){var h=function(){s(g)};"function"==typeof(A=A.then((function(e){s(c.bind(this,e))}),h)).finally&&A.finally(h)}else if("done"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");A.done(c,g)}else if("done:finally"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof A.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");A.done(c),A.finally(g)}})),t.on("get",(function(e,n,i){var o;if(r[e])++r[e];else{o=l[e];var A=function(){t.emit("getasync",e,n,i)};a(o)?"function"==typeof o.done?o.done(A):o.then((function(){s(A)})):A()}})),t.on("delete",(function(e){if(delete l[e],r[e])delete r[e];else if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}})),t.on("clear",(function(){var e=i;i=u(null),r=u(null),l=u(null),t.emit("clearasync",n(e,(function(e){return[e]})))}))}},function(e,t,r){"use strict";var n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){t[e]=!0})),t}},function(e,t,r){"use strict";var n=r(351),i=r(2018);e.exports=function(e){return i(n(e))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}},function(e,t,r){"use strict";var n=r(2020),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){return JSON.stringify(e).slice(1,-1)}))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){return"<Non-coercible to string value>"}}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=Function.prototype.apply;o.dispose=function(e,t,r){var a;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",a=function(t,r){A.call(e,null,r)}),void t.on("clearasync",(function(e){i(e,(function(e,t){a(t,e)}))}));t.on("delete",a=function(t,r){e(r)}),t.on("clear",(function(e){i(e,(function(e,t){a(t,e)}))}))}},function(e,t,r){"use strict";var n=r(706),i=r(520),o=r(708),A=r(1099),a=r(2023),s=r(279),u=Function.prototype,c=Math.max,l=Math.min,g=Object.create;s.maxAge=function(e,t,r){var f,h,p,d;(e=a(e))&&(f=g(null),h=r.async&&s.async||r.promise&&s.promise?"async":"",t.on("set"+h,(function(r){f[r]=setTimeout((function(){t.delete(r)}),e),"function"==typeof f[r].unref&&f[r].unref(),d&&(d[r]&&"nextTick"!==d[r]&&clearTimeout(d[r]),d[r]=setTimeout((function(){delete d[r]}),p),"function"==typeof d[r].unref&&d[r].unref())})),t.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],d&&("nextTick"!==d[e]&&clearTimeout(d[e]),delete d[e])})),r.preFetch&&(p=!0===r.preFetch||isNaN(r.preFetch)?.333:c(l(Number(r.preFetch),1),0))&&(d={},p=(1-p)*e,t.on("get"+h,(function(e,i,a){d[e]||(d[e]="nextTick",o((function(){var o;"nextTick"===d[e]&&(delete d[e],t.delete(e),r.async&&(i=n(i)).push(u),o=t.memoized.apply(a,i),r.promise&&A(o)&&("function"==typeof o.done?o.done(u,u):o.then(u,u)))})))}))),t.on("clear"+h,(function(){i(f,(function(e){clearTimeout(e)})),f={},d&&(i(d,(function(e){"nextTick"!==e&&clearTimeout(e)})),d={})})))}},function(e,t,r){"use strict";var n=r(278),i=r(2024);e.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,r){"use strict";e.exports=2147483647},function(e,t,r){"use strict";var n=r(278),i=r(2026),o=r(279);o.max=function(e,t,r){var A,a,s;(e=n(e))&&(a=i(e),A=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+A,s=function(e){void 0!==(e=a.hit(e))&&t.delete(e)}),t.on("get"+A,s),t.on("delete"+A,a.delete),t.on("clear"+A,a.clear))}},function(e,t,r){"use strict";var n=r(278),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=0,A=1,a=i(null),s=i(null),u=0;return e=n(e),{hit:function(n){var i=s[n],c=++u;if(a[c]=n,s[n]=c,!i){if(++r<=e)return;return n=a[A],t(n),n}if(delete a[i],A===i)for(;!o.call(a,++A););},delete:t=function(e){var t=s[e];if(t&&(delete a[t],delete s[e],--r,A===t)){if(!r)return u=0,void(A=1);for(;!o.call(a,++A););}},clear:function(){r=0,A=1,a=i(null),s=i(null),u=0}}}},function(e,t,r){"use strict";var n=r(280),i=r(279),o=Object.create,A=Object.defineProperties;i.refCounter=function(e,t,r){var a,s;a=o(null),s=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+s,(function(e,t){a[e]=t||1})),t.on("get"+s,(function(e){++a[e]})),t.on("delete"+s,(function(e){delete a[e]})),t.on("clear"+s,(function(){a={}})),A(t.memoized,{deleteRef:n((function(){var e=t.get(arguments);return null===e?null:a[e]?!--a[e]&&(t.delete(e),!0):null})),getRefCount:n((function(){var e=t.get(arguments);return null===e?0:a[e]?a[e]:0}))})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionContext=t.START_ID=void 0;var n=r(349),i=r(288),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var r=A(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(2029));function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(A=function(e){return e?r:t})(e)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===a(o)?o:String(o)),n)}var i,o}t.START_ID="-1";var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxBackupStep=25,this.getCurrentId=function(){return t.undoStack.length>0?t.undoStack[t.undoStack.length-1].getId():"-1"},this.invalidUseCounter=0,this.undoStack=[],this.redoStack=[],this.status=o.TransactionStatus.None,this.cachedRecorder=new o.default,this.createRecorder()}var t,r,A;return t=e,(r=[{key:"setMaxBackupStep",value:function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)}},{key:"createRecorder",value:function(){return this.activeRecorder=new o.default,this.activeRecorder}},{key:"record",value:function(e,t,r){this.status!==o.TransactionStatus.Rollback&&this.activeRecorder.record(e,t,r)}},{key:"getStatus",value:function(){return this.status}},{key:"openRecorder",value:function(){this.clearRedoStack(),this.status=o.TransactionStatus.Open,this.createRecorder()}},{key:"getMergedRecorder",value:function(){var e=new o.default;return this.useCachedRecorder&&this.cachedRecorder.mergeTo(e),this.undoStack.forEach((function(t){return t.mergeTo(e)})),e}},{key:"mergeRecorder",value:function(){!this.activeRecorder.isEmpty()&&this.undoStack.length>0&&this.activeRecorder.mergeTo(this.undoStack[this.undoStack.length-1]),this.createRecorder(),this.console("mergeTransaction")}},{key:"commitRecorder",value:function(e){var t=this;if(this.undoStack.length>=this.maxBackupStep){var r=this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep+1);this.useCachedRecorder&&r.forEach((function(e){return e.mergeTo(t.cachedRecorder)}))}e&&e.mergeTo(this.activeRecorder),this.activeRecorder.isEmpty()||this.undoStack.push(this.activeRecorder),this.openRecorder(),this.console("commitTransaction")}},{key:"isActiveRecorderEmpty",value:function(){return this.activeRecorder.isEmpty()}},{key:"revert",value:function(){this.status=o.TransactionStatus.Rollback,this.activeRecorder.recover(),this.status=o.TransactionStatus.None,this.createRecorder(),this.console("revert")}},{key:"undo",value:function(){if(0===this.undoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Undo;var e=this.undoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.redoStack.push(this.activeRecorder),this.createRecorder(),this.console("undo"),!0}},{key:"redo",value:function(){if(0===this.redoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Redo;var e=this.redoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.undoStack.push(this.activeRecorder),this.createRecorder(),this.console("redo"),!0}},{key:"console",value:function(e){(0,i.devLog)({type:e,undoStack:this.undoStack,redo:this.redoStack})}},{key:"clearRedoStack",value:function(){this.redoStack.length=0}},{key:"clear",value:function(){this.redoStack.length=0,this.undoStack.length=0,this.createRecorder()}},{key:"empty",value:function(){return 0===this.redoStack.length&&0===this.undoStack.length}},{key:"undoToRecorder",value:function(e){var t=0;if("-1"===e)t=this.undoStack.length;else{var r=this.undoStack.findIndex((function(t){return t.getId()===e}));r>-1&&(t=this.undoStack.length-r-1)}if(0===t)return!1;for(var i=0;i<t;i++)if(!this.undo())return n.LOGGER.logError(new Error("Transaction undoToRecorder error")),!1;return!0}},{key:"redoToRecorder",value:function(e){var t=0,r=this.redoStack.findIndex((function(t){return t.getId()===e}));if(r>-1&&(t=this.redoStack.length-r),0===t)return!1;for(var i=0;i<t;i++)if(!this.redo())return n.LOGGER.logError(new Error("Transaction redoToRecorder error ".concat(e))),!1;return!0}},{key:"getActiveRecorderId",value:function(){return this.activeRecorder.getId()}},{key:"setActiveRecorder",value:function(e){var t=this;this.invalidUseCounter>0&&n.LOGGER.logError(new Error("invalid use setActiveRecorder"));var r=this.undoStack.find((function(t){return t.getId()===e})),i=this.activeRecorder;return r&&(this.activeRecorder=r),this.invalidUseCounter++,function(){t.invalidUseCounter--,t.activeRecorder=i}}}])&&s(t.prototype,r),A&&s(t,A),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.TransactionContext=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TransactionStatus=void 0;var n,i=(n=r(532))&&n.__esModule?n:{default:n},o=r(2030);function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=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(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===c(o)?o:String(o)),n)}var i,o}function f(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var h,p=function(){function e(){l(this,e),this.records=new Map,this.updater={update:function(e,t,r){e[t]=r}}}return f(e,[{key:"record",value:function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)}},{key:"recover",value:function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){var i=t.update||e.updater.update;r.applyRecover&&!r.applyRecover()||i(r,n,t.preValue)}))}))}},{key:"isEmpty",value:function(){return 0===this.records.size}},{key:"mergeTo",value:function(e){this.records.forEach((function(t,r){t.forEach((function(t,n){e.record(r,n,t)}))}))}}]),e}();t.TransactionStatus=h,function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Undo=2]="Undo",e[e.Redo=3]="Redo",e[e.Rollback=4]="Rollback"}(h||(t.TransactionStatus=h={}));var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(r,e);var t=a(r);function r(){return l(this,r),t.apply(this,arguments)}return f(r)}((0,i.default)(p,(0,o.numericId)()));t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numericId=function(){var e=1;return function(){return(e++).toString()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1101),i=r(1102),o=r(1103),A=r(2032),a=r(1104),s=r(1105),u=r(1106),c=r(1107),l=r(1108);t.BrepDataTranslators={EDGE_DATA:new n.EdgeDataTranslator,EDGE2_DATA:new i.Edge2DataTranslator,FACE_DATA:new o.FaceDataTranslator,HALF_EDGE_DATA:new a.HalfEdgeDataTranslator,LOOP_DATA:new s.LoopDataTranslator,META_DATA:new u.MetaDataTranslator,SHELL_DATA:new c.ShellDataTranslator,VERTEX_DATA:new l.VertexDataTranslator,GENERAL_DATA:new A.GeneralDataTranslator,GENERAL_DATA_LIST:new A.GeneralDataListTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(67),c=r(711),l=r(422),g=r(353),f=r(284),h=r(354),p=r(239),d=r(522),I=r(423),y=r(1101),C=r(1102),E=r(1103),B=r(1104),v=r(1105),m=r(1106),Q=r(1107),b=r(1108),_=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralData;if(e instanceof I.VertexData)t.vertexData=(new b.VertexDataTranslator).to(e);else if(e instanceof f.HalfEdgeData)t.halfEdgeData=(new B.HalfEdgeDataTranslator).to(e);else if(e instanceof l.Edge2Data)t.edge2Data=(new C.Edge2DataTranslator).to(e);else if(e instanceof h.LoopData)t.loopData=(new v.LoopDataTranslator).to(e);else if(e instanceof c.EdgeData)t.edgeData=(new y.EdgeDataTranslator).to(e);else if(e instanceof g.FaceData)t.faceData=(new E.FaceDataTranslator).to(e);else if(e instanceof d.ShellData)t.shellData=(new Q.ShellDataTranslator).to(e);else{if(!(e instanceof p.MetaData))throw"not supported";t.metaData=(new m.MetaDataTranslator).to(e)}return t}},{key:"realFrom",value:function(e){if(e.vertexData)return(new b.VertexDataTranslator).from(e.vertexData);if(e.halfEdgeData)return(new B.HalfEdgeDataTranslator).from(e.halfEdgeData);if(e.edge2Data)return(new C.Edge2DataTranslator).from(e.edge2Data);if(e.loopData)return(new v.LoopDataTranslator).from(e.loopData);if(e.edgeData)return(new y.EdgeDataTranslator).from(e.edgeData);if(e.faceData)return(new E.FaceDataTranslator).from(e.faceData);if(e.shellData)return(new Q.ShellDataTranslator).from(e.shellData);if(e.metaData)return(new m.MetaDataTranslator).from(e.metaData);throw"not supported"}}]),t}(s.Translator);t.GeneralDataTranslator=_;var S=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralDataList;return t.generalDatas=(new _).toList(e),t}},{key:"realFrom",value:function(e){return(new _).fromList(e.generalDatas)}}]),t}(s.Translator);t.GeneralDataListTranslator=S},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(711),o=r(422),A=r(353),a=r(284),s=r(354),u=r(239),c=r(522),l=r(423),g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"readMetaData",value:function(e){var t=new u.MetaData(void 0,void 0);return Object.assign(t,e),t}},{key:"readShellData",value:function(e){var t=new c.ShellData(void 0);return Object.assign(t,e),t}},{key:"readFaceData",value:function(e){var t=new A.FaceData(void 0);return Object.assign(t,e),t}},{key:"readLoopData",value:function(e){var t=new s.LoopData(void 0);return Object.assign(t,e),t}},{key:"readEdgeData",value:function(e){var t=new i.EdgeData(void 0);return Object.assign(t,e),t}},{key:"readEdge2Data",value:function(e){var t=new o.Edge2Data(void 0);return Object.assign(t,e),t}},{key:"readHalfEdgeData",value:function(e){var t=new a.HalfEdgeData(void 0);return Object.assign(t,e),t}},{key:"readVertexData",value:function(e){var t=new l.VertexData(void 0);return Object.assign(t,e),t}}]),e}();t.Json=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(239);function i(e){var t=e.metaData;return t?t.version:void 0}function o(e){var t=e.metaData;return t?t.toolVersion:void 0}function A(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.set(i.refId,i)}return t}t.migrateBrepData=function(e){return function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.9.0")>=0)return e;for(var r=A(e.hedgeData),a=e.edge2Data,s=0,u=a.length;s<u;s++){var c=a[s],l=c.halfEdgeIds;if(!(l.length<=0)){for(var g=void 0,f=0,h=l.length;f<h&&!(g=r.get(l[f]));f++);if(g){c.vertexAId=g.vertexAId,c.vertexBId=g.vertexBId;for(var p=0,d=l.length;p<d;p++){var I=l[p];if(I!==g.refId){var y=r.get(I);y&&(y.vertexAId!==c.vertexAId?y.reversed=!0:y.reversed=!1)}}}}}for(var C=e.edgeData,E=0,B=C.length;E<B;E++){var v=C[E],m=v.halfEdge1Id,Q=v.halfEdge2Id,b=void 0;if(null!=m&&(b=r.get(m)),b||null==Q||(b=r.get(Q)),b&&(v.vertexAId=b.vertexAId,v.vertexBId=b.vertexBId,b.reversed=!1,null!=Q&&Q!==b.refId)){var _=r.get(Q);_.vertexAId!==v.vertexAId?_.reversed=!0:_.reversed=!1}}var S=o(e);return e.metaData=new n.MetaData("1.9.0",S),e}(function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.8.9")>=0)return e;for(var r=A(e.faceData),a=A(e.loopData),s=A(e.hedgeData),u=e.originMetaData,c=o(e),l=new n.MetaData("1.8.9",c),g=e.shellData,f=e.vertexData,h=[],p=[],d=[],I=[],y=[],C=0,E=g.length;C<E;C++)for(var B=g[C].faceIds,v=0,m=B.length;v<m;v++){var Q=B[v],b=r.get(Q);b&&h.push(b)}for(var _=0,S=h.length;_<S;_++){var w=h[_],D=w.outerLoopId,R=a.get(D);if(R){p.push(R);var M=w.innerLoopIds;if(M)for(var x=0,P=M.length;x<P;x++){var T=M[x],F=a.get(T);F&&p.push(F)}}}for(var O=0,L=p.length;O<L;O++)for(var N=p[O].halfEdgeIds,k=0,G=N.length;k<G;k++){var U=N[k],j=s.get(U);j&&d.push(j)}for(var V=new Set,H=0,Y=d.length;H<Y;H++){var K=d[H];V.add(K.refId)}for(var q=new Map,J=0,W=e.edgeData.length;J<W;J++){var z=e.edgeData[J],X=z.halfEdge1Id;if(V.has(X)){var Z=q.get(X);Z&&Z!==z?z.halfEdge1Id=void 0:q.set(X,z)}else z.halfEdge1Id=void 0;var $=z.halfEdge2Id;if(V.has($)){var ee=q.get($);ee&&ee!==z?z.halfEdge2Id=void 0:q.set($,z)}else z.halfEdge2Id=void 0;(z.halfEdge1Id||z.halfEdge2Id)&&I.push(z)}for(var te=0,re=e.edge2Data.length;te<re;te++){for(var ne=e.edge2Data[te],ie=[],oe=ne.halfEdgeIds,Ae=0,ae=oe.length;Ae<ae;Ae++){var se=oe[Ae];if(V.has(se)){var ue=q.get(se);ue&&ue!==ne||(q.set(se,ne),ie.push(se))}}ie.length>0&&(ne.halfEdgeIds=ie,y.push(ne))}return{originMetaData:u,metaData:l,shellData:g,faceData:h,loopData:p,edgeData:I,edge2Data:y,hedgeData:d,vertexData:f}}(function(e){for(var t=e,r=void 0,n=void 0,i=[],o=[],A=[],a=[],s=[],u=[],c=[],l=0,g=t.length;l<g;l++){var f=t[l];switch(f.tp){case"M":r=f,n=f;break;case"S":i.push(f);break;case"F":o.push(f);break;case"L":A.push(f);break;case"E":a.push(f);break;case"E2":s.push(f);break;case"H":u.push(f);break;case"V":c.push(f)}}return{metaData:r,originMetaData:n,shellData:i,faceData:o,loopData:A,edgeData:a,edge2Data:s,hedgeData:u,vertexData:c}}(e)))},t.getMetaVersion=i,t.getMetaToolVersion=o,t.getOriginMetaVersion=function(e){var t=e.originMetaData;return t?t.version:void 0}},function(e,t,r){"use strict";var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(239),A=r(1109);function a(e){var t=e.getEdges(),r=!0,n=!1,o=void 0;try{for(var A,a=t[Symbol.iterator]();!(r=(A=a.next()).done);r=!0){var s=A.value;if(s.curve instanceof i.Circle3d){var u=s.curve,c=s.vertexA,l=s.vertexB,g=u.getParam(c.point),f=u.getParam(l.point);i.Num.isBigger(g,f)&&s.swapVertices()}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}function s(e){!function(e){for(var t=function(e){var t=e.getVertices(),r=new Map,i=[],o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=!1,g=!0,f=!1,h=void 0;try{for(var p,d=r[Symbol.iterator]();!(g=(p=d.next()).done);g=!0){var I=n(p.value,2),y=I[0],C=I[1];if(c.point.isEqual(y.point)){C.push(c),l=!0;break}}}catch(e){f=!0,h=e}finally{try{!g&&d.return&&d.return()}finally{if(f)throw h}}l||r.set(c,[c])}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}var E=!0,B=!1,v=void 0;try{for(var m,Q=r[Symbol.iterator]();!(E=(m=Q.next()).done);E=!0){var b=n(m.value,2);(C=b[1]).length>1&&i.push(C)}}catch(e){B=!0,v=e}finally{try{!E&&Q.return&&Q.return()}finally{if(B)throw v}}return i}(e),r=new Map,i=0,o=t.length;i<o;i++)for(var A=t[i],a=A[0],s=1,u=A.length;s<u;s++)r.set(A[s],a);if(r.size<=0)return;var c=e.getEdges(),l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value,I=d.vertexA,y=d.vertexB;r.has(I)&&(d.vertexA=r.get(I)),r.has(y)&&(d.vertexB=r.get(y))}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}}(e);for(var t=function(e){for(var t=[],r=e.faces,n=0,i=r.length;n<i;n++)for(var o=r[n].getLoops(),A=0,a=o.length;A<a;A++)for(var s=o[A].halfEdges,u=0,c=s.length;u<c;u++){var l=s[u];l.vertexA===l.vertexB&&t.push(l)}return t}(e),r=0,i=t.length;r<i;r++){u(t[r])}}function u(e){var t=e.loop;t.removeHalfEdge(e),t.halfEdges.length<=0&&A.quickPurgeLoop(t);var r=e.edge;r.removeHalfEdge(e),r.halfEdges.length<=0&&r.dispose()}t.postMigrateShells=function(e,t){!function(e,t){if(t&&o.MetaData.versionCompare(t,"1.9.0")>=0)return;(function(e){for(var t=0,r=e.length;t<r;t++){a(e[t])}})(e),function(e){for(var t=0,r=e.length;t<r;t++){s(e[t])}}(e)}(e,t),function(e,t){if(t&&o.MetaData.versionCompare(t,"1.10.0")>=0)return;!function(e){for(var t=0,r=e.length;t<r;t++)for(var n=e[t].faces,o=0,A=n.length;o<A;o++){var a=n[o],s=a.surface,u=!0;s&&s instanceof i.CylindricalSurface&&a.outerLoop&&(u=a.outerLoop.isCCW(s)),a.setOuterLoop(a.outerLoop,u)}}(e)}(e,t)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.x=e,i.y=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r(241).MIxBaseGeom);t.MIxVector2d=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(67),i=r(2038),o=r(523),A=r(160),a=r(285),s=r(715),u=r(1117);function c(e){for(var t=[],r=[],n=0,i=e.length;n<i;n++){var o=e[n];if(o instanceof A.Shell){if(o.faces.length<=0)continue;r.push(a.MIxShell.create(o))}t.push(u.topoObjToMIxEntity(o))}return s.BrepValidatorManager.validateShellsTopo(r,!0),t}t.toPBBrep=function(e){var t=e.map((function(e){return e.rawObject()})),r=o.extractIndependentTopoObjs(t);return s.BrepValidatorManager.validateShellsTopo(r.shells.map((function(e){return a.MIxShell.create(e)})),!0),i.ProtoSerializer.toPBBrep(t)},t.toBytes=function(e){var t=this.toPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.shellsToPBBrep=function(e){return s.BrepValidatorManager.validateShellsTopo(e,!0),i.ProtoSerializer.shellsToPBBrep(e.map((function(e){return e.rawObject()})))},t.shellsToBytes=function(e){var t=this.shellsToPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.fromPBBrep=function(e){return c(i.ProtoSerializer.fromPBBrep(e))},t.fromBytes=function(e){return c(i.ProtoSerializer.fromBytes(e))},t.shellsFromPBBrep=function(e){var t=i.ProtoSerializer.shellsFromPBBrep(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t},t.shellsFromBytes=function(e){var t=i.ProtoSerializer.shellsFromBytes(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(67),a=r(239),s=r(2039),u=r(2047),c=r(2048),l=r(160),g=r(2049),f=r(709),h=r(523),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"toPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByTopoObjs(e);return this._toPBBrepImpl(r,t)}},{key:"toBytes",value:function(e,t){var r=this.toPBBrep(e,t);return A.brep.PBBrep.encode(r).finish()}},{key:"shellsToPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByShells(e);return this._toPBBrepImpl(r,t)}},{key:"shellsToBytes",value:function(e,t){var r=this.shellsToPBBrep(e);return A.brep.PBBrep.encode(r).finish()}},{key:"fromPBBrep",value:function(e){var t=new u.DeserializeContext,r=this.getMetaData(e),n=g.ProtoMigrate.migratePBBrep(e);t.curves=o.ProtocolTranslators.CURVE3D.fromList(n.curves),t.surfaces=o.ProtocolTranslators.SURFACE.fromList(n.surfaces),t.vertices=s.BrepTranslators.VERTEX.fromList(n.vertices,t),t.edges=s.BrepTranslators.EDGE.fromList(n.edges,t),t.faces=s.BrepTranslators.FACE.fromList(n.faces,t),t.shells=s.BrepTranslators.SHELL.fromList(n.shells,t);var A={shells:t.shells,faces:t.faces,edges:t.edges,vertices:t.vertices,loops:[],halfEdges:[]},a=h.extractIndependentTopoObjs2(A);f.postProcessTopoObjects(a,r?r.version:void 0);var c=[];return c.push.apply(c,i(a.shells)),c.push.apply(c,i(a.faces)),c.push.apply(c,i(a.loops)),c.push.apply(c,i(a.halfEdges)),c.push.apply(c,i(a.edges)),c.push.apply(c,i(a.vertices)),c}},{key:"fromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.fromPBBrep(t)}catch(e){return[]}}},{key:"shellsFromPBBrep",value:function(e){for(var t=this.fromPBBrep(e),r=[],n=0,i=t.length;n<i;n++){var o=t[n];o instanceof l.Shell&&r.push(o)}return r}},{key:"shellsFromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.shellsFromPBBrep(t)}catch(e){return[]}}},{key:"getMetaData",value:function(e){var t=e.metaData;if(t)return s.BrepTranslators.META.from(t)}},{key:"_toPBBrepImpl",value:function(e,t){var r=new A.brep.PBBrep;return r.metaData=s.BrepTranslators.META.to(t),r.curves=o.ProtocolTranslators.CURVE3D.toList(e.curves),r.surfaces=o.ProtocolTranslators.SURFACE.toList(e.surfaces),r.vertices=s.BrepTranslators.VERTEX.toList(e.vertices,e),r.edges=s.BrepTranslators.EDGE.toList(e.edges,e),r.faces=s.BrepTranslators.FACE.toList(e.faces,e),r.shells=s.BrepTranslators.SHELL.toList(e.shells,e),r}}]),e}();t.ProtoSerializer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2040),i=r(2041),o=r(2042),A=r(2043),a=r(2046);t.BrepTranslators={META:new n.MetaTranslator,VERTEX:new i.VertexTranslator,EDGE:new o.EdgeTranslator,FACE:new A.FaceTranslator,SHELL:new a.ShellTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(239),u=r(67),c=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBMeta;return e.version&&e.version.length>0&&(t.version=e.version),t.toolVersion=e.toolVersion,t}},{key:"realFrom",value:function(e){var t=new s.MetaData;return e.version&&e.version.length>0&&(t.version=e.version),e.toolVersion&&e.toolVersion.length>0&&(t.toolVersion=e.toolVersion),t}}]),t}(a.Translator);t.MetaTranslator=c},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(67),s=r(282),u=r(358),c=r(3),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new a.brep.PBVertex;return t.base=u.toPBTopoObjBase(e),t.position=c.ProtocolTranslators.POINT3D.to(e.point),t}},{key:"realFrom",value:function(e){var t=new s.Vertex(null);return e.base&&u.fromPBTopoObjBase(e.base,t),e.position&&(t.point=c.ProtocolTranslators.POINT3D.from(e.position)),t}}]),t}(c.TranslatorWithContext);t.VertexTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(235),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBEdge;r.base=c.toPBTopoObjBase(e),r.crvIndex=t.getEdgeCurveIndex(e);var n=e.vertexA;n&&(r.vAIndex=t.getVertexIndex(n));var i=e.vertexB;return i&&(r.vBIndex=t.getVertexIndex(i)),r}},{key:"realFrom",value:function(e,t){var r=new u.Edge(null,null,null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.vAIndex){var n=t.getVertex(e.vAIndex);n&&(r.vertexA=n)}if(e.vBIndex){var i=t.getVertex(e.vBIndex);i&&(r.vertexB=i)}var o=t.getCurve3d(e.crvIndex||0);return o?r.curve=o:r.vertexA&&r.vertexB&&(r.curve=a.Line3d.fromSegment(r.vertexA.point,r.vertexB.point)),r}}]),t}(a.TranslatorWithContext);t.EdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(237),c=r(2044),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBFace;n.base=l.toPBTopoObjBase(e),n.srfIndex=r.getFaceSurfaceIndex(e),n.sameDir=e.sameDir,e.outerLoop&&(n.outerLoop=t._loopTranslator.to(e.outerLoop,r));var i=e.innerLoops;return i&&i.length>0&&(n.innerLoops=t._loopTranslator.toList(i,r)),n}},{key:"realFrom",value:function(e,r){var n=new u.Face(null);if(e.base&&l.fromPBTopoObjBase(e.base,n),e.srfIndex){var i=r.getSurface(e.srfIndex);i&&(n.surface=i)}var o=e.sameDir||!1;if(e.outerLoop){var A=t._loopTranslator.from(e.outerLoop,r);n.setOuterLoop(A,o)}if(e.innerLoops)for(var a=t._loopTranslator.fromList(e.innerLoops,r),s=0,c=a.length;s<c;s++)n.addInnerLoop(a[s]);return n}}]),t}(a.TranslatorWithContext);g._loopTranslator=new c.LoopTranslator,t.FaceTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(283),c=r(2045),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBLoop;return n.base=l.toPBTopoObjBase(e),n.halfEdges=t._heTranslator.toList(e.halfEdges,r),n}},{key:"realFrom",value:function(e,r){var n=new u.Loop;if(e.base&&l.fromPBTopoObjBase(e.base,n),e.halfEdges){var i=t._heTranslator.fromList(e.halfEdges,r);n.buildLoop(i)}return n}}]),t}(a.TranslatorWithContext);g._heTranslator=new c.HalfEdgeTranslator,t.LoopTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(238),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBHalfEdge;r.base=c.toPBTopoObjBase(e);var n=e.edge;return n&&(r.edgeIndex=t.getEdgeIndex(n)),r.reversed=e.reversed,r}},{key:"realFrom",value:function(e,t){var r=new u.HalfEdge(null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.edgeIndex){var n=t.getEdge(e.edgeIndex);n&&n.addHalfEdge(r)}return e.reversed&&(r.reversed=e.reversed),r}}]),t}(a.TranslatorWithContext);t.HalfEdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(160),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBShell;r.base=c.toPBTopoObjBase(e);for(var n=e.faces,i=new Array(n.length),o=0,A=n.length;o<A;o++)i[o]=t.getFaceIndex(n[o]);return r.faceIndices=i,r}},{key:"realFrom",value:function(e,t){var r=new u.Shell;e.base&&c.fromPBTopoObjBase(e.base,r);var n=e.faceIndices;if(n)for(var i=0,o=n.length;i<o;i++){var A=t.getFace(n[i]);A&&r.addFace(A)}return r}}]),t}(a.TranslatorWithContext);t.ShellTranslator=l},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getCurve3d",value:function(e){if(!(e<=0))return this._curves.length>=e?this._curves[e-1]:void 0}},{key:"getSurface",value:function(e){if(!(e<=0))return this._surfaces.length>=e?this._surfaces[e-1]:void 0}},{key:"getVertex",value:function(e){if(!(e<=0))return this._vertices.length>=e?this._vertices[e-1]:void 0}},{key:"getEdge",value:function(e){if(!(e<=0))return this._edges.length>=e?this._edges[e-1]:void 0}},{key:"getFace",value:function(e){if(!(e<=0))return this._faces.length>=e?this._faces[e-1]:void 0}},{key:"getShell",value:function(e){if(!(e<=0))return this._shells.length>=e?this._shells[e-1]:void 0}},{key:"curves",get:function(){return this._curves},set:function(e){this._curves=e}},{key:"surfaces",get:function(){return this._surfaces},set:function(e){this._surfaces=e}},{key:"vertices",get:function(){return this._vertices},set:function(e){this._vertices=e}},{key:"edges",get:function(){return this._edges},set:function(e){this._edges=e}},{key:"faces",get:function(){return this._faces},set:function(e){this._faces=e}},{key:"shells",get:function(){return this._shells},set:function(e){this._shells=e}}]),e}();t.DeserializeContext=i},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(282),A=r(235),a=r(237),s=r(160),u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getEdgeCurveIndex",value:function(t){return e.getCurveIndex(t)}},{key:"getFaceSurfaceIndex",value:function(t){return e.getSurfaceIndex(t)}},{key:"getVertexIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getEdgeIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getFaceIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getShellIndex",value:function(t){return e.getSelfIndex(t)}},{key:"addVertex",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SELF_IDX]||(this._vertices.push(t),r[e.SELF_IDX]=this._vertices.length)}},{key:"addEdgeAndCurve",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._edges.push(t),r[e.SELF_IDX]=this._edges.length;var n=t.curve;!n||n instanceof i.Line3d||(this._curves.push(n),r[e.CRV_IDX]=this._curves.length)}}},{key:"addFaceAndSurface",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._faces.push(t),r[e.SELF_IDX]=this._faces.length;var n=t.surface;n&&(this._surfaces.push(n),r[e.SURF_IDX]=this._surfaces.length)}}},{key:"addShell",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SURF_IDX]||(this._shells.push(t),r[e.SURF_IDX]=this._shells.length)}},{key:"curves",get:function(){return this._curves}},{key:"surfaces",get:function(){return this._surfaces}},{key:"vertices",get:function(){return this._vertices}},{key:"edges",get:function(){return this._edges}},{key:"faces",get:function(){return this._faces}},{key:"shells",get:function(){return this._shells}}],[{key:"buildContextByShells",value:function(t){for(var r=new e,n=0,i=t.length;n<i;n++){var o=t[n];this.clearTempMap(o);var A=o.faces;this.clearTempMaps(A);var a=o.getEdgesAndVertices(),s=a.edges;this.clearTempMaps(s);var u=a.vertices;this.clearTempMaps(u),r.addShell(o);for(var c=0,l=A.length;c<l;c++)r.addFaceAndSurface(A[c]);for(var g=0,f=s.length;g<f;g++)r.addEdgeAndCurve(s[g]);for(var h=0,p=u.length;h<p;h++)r.addVertex(u[h])}return r}},{key:"buildContextByTopoObjs",value:function(t){for(var r=[],n=[],i=[],u=[],c=0,l=t.length;c<l;c++){var g=t[c];if(g instanceof a.Face){n.push(g);var f=g.getEdges(),h=!0,p=!1,d=void 0;try{for(var I,y=f[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value;i.push(C)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}var E=g.getVertices(),B=!0,v=!1,m=void 0;try{for(var Q,b=E[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;u.push(_)}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}else if(g instanceof A.Edge)i.push(g),g.vertexA&&u.push(g.vertexA),g.vertexB&&u.push(g.vertexB);else if(g instanceof o.Vertex)u.push(g);else if(g instanceof s.Shell){r.push(g);for(var S=g.faces,w=0,D=S.length;w<D;w++)n.push(S[w]);for(var R=g.getEdgesAndVertices(),M=R.edges,x=R.vertices,P=0,T=M.length;P<T;P++)i.push(M[P]);for(var F=0,O=x.length;F<O;F++)u.push(x[F])}}this.clearTempMaps(r),this.clearTempMaps(n),this.clearTempMaps(i),this.clearTempMaps(u);for(var L=new e,N=0,k=r.length;N<k;N++)L.addShell(r[N]);for(var G=0,U=n.length;G<U;G++)L.addFaceAndSurface(n[G]);for(var j=0,V=i.length;j<V;j++)L.addEdgeAndCurve(i[j]);for(var H=0,Y=u.length;H<Y;H++)L.addVertex(u[H]);return L}},{key:"getOrCreateTempMap",value:function(e){var t=e.temp;return t||(t=new Object,e.temp=t),t}},{key:"clearTempMaps",value:function(e){for(var t=0,r=e.length;t<r;t++)this.clearTempMap(e[t])}},{key:"clearTempMap",value:function(e){var t=e.temp;t&&(delete t[this.SELF_IDX],delete t[this.CRV_IDX],delete t[this.SURF_IDX])}},{key:"getSelfIndex",value:function(e){var t=e.temp;return t&&t[this.SELF_IDX]||0}},{key:"getCurveIndex",value:function(e){var t=e.temp;return t&&t[this.CRV_IDX]||0}},{key:"getSurfaceIndex",value:function(e){var t=e.temp;return t&&t[this.SURF_IDX]||0}}]),e}();u.SELF_IDX="$PB_SELF_IDX",u.CRV_IDX="$PB_CRV_IDX",u.SURF_IDX="$PB_SURF_IDX",t.SerializeContext=u},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"migratePBBrep",value:function(e){return e}}]),e}();t.ProtoMigrate=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(353),c=r(284),l=r(354),g=r(710),f=r(238),h=r(283),p=r(424),d=r(1109),I=function(){function e(){a(this,e),this.errors=[]}return i(e,[{key:"hasError",value:function(){return this.errors.length>0}},{key:"errorMessage",value:function(){for(var e="",t=0,r=this.errors.length;t<r;t++){var n=this.errors[t];e+="Error:{desc:"+n.message()+"; context:"+n.context()+"}\n"}return e}},{key:"tryToFix",value:function(){for(var e=0,t=this.errors.length;e<t;e++){var r=this.errors[e];r.isAmendable?r.amend():r.operation()}}},{key:"validateShell",value:function(e){for(var t=e.faces,r=0,n=t.length;r<n;r++){var i=t[r];i.shell!==e&&this.addError(new C(i,e)),this.validateFace(i)}var o=e.getVertices(),A=!0,a=!1,s=void 0;try{for(var u,c=o[Symbol.iterator]();!(A=(u=c.next()).done);A=!0)for(var l=u.value.getLeadOutHalfEdges(),g=0,f=l.length;g<f;g++){var h=l[g];h.isAdopted()||this.addError(new M(h))}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}}},{key:"validateFace",value:function(e){e!==e.outerLoop.face&&this.addError(new v(e.outerLoop,e)),this.validateLoop(e.outerLoop);for(var t=e.innerLoops,r=0,n=t.length;r<n;r++){var i=t[r];e!==i.face&&this.addError(new v(i,e))}this.validateInnerLoops(t,e)}},{key:"validateLoop",value:function(e){var t=e.halfEdges,r=t.length;if(0!==r)for(var n=0;n<r;n++){var i=(n+1)%r,o=t[n],A=t[i];if(o.loop!==e&&this.addError(new m(e,o)),!s.Num.isEqual(o.getBoundedCurve().length,0)||o.edge&&o.edge.degenerated||this.addError(new x(o)),o.vertexB!==A.vertexA&&this.addError(new E(e,o,A)),o.next!==A&&this.addError(new Q(o,A)),A.prev!==o&&this.addError(new b(A,o)),o.edge&&-1!==o.edge.halfEdges.indexOf(o))for(var a=o.siblings(),u=0,c=a.length;u<c;u++){var l=a[u];null!==l&&(o.edge!==l.edge&&this.addError(new D(o,l)),l.vertexB!==o.vertexA&&l.vertexB!==o.vertexB&&this.addError(new S(o,l)),l.vertexA!==o.vertexA&&l.vertexA!==o.vertexB&&this.addError(new _(o,l)))}else this.addError(new w(o))}else this.addError(new B(e))}},{key:"validateInnerLoops",value:function(e,t){for(var r=0,n=e.length;r<n;r++){var i=e[r];this.validateLoop(i)}if(t.surface instanceof s.Plane)for(var o=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))})),a=t.surface.faceToUV({contour:o,holes:A}),u=new s.GeomLoop2d(a.contour),c=0;c<a.holes.length;c++){var l=new s.GeomLoop2d(a.holes[c]);u.containsLoop(l,!0)||this.addError(new R(e[c],t))}}},{key:"addError",value:function(e){this.errors.push(e)}}],[{key:"validateToConsole",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new e;if(n.validateShell(t),0===n.errors.length)return p.consoleLogInDev("BREP is Valid."),!0;for(var i=n.errors,o=0,A=i.length;o<A;o++){var a=i[o];p.consoleLogInDev(a.message())}return r&&n.tryToFix(),!1}}]),e}();t.BREPValidator=I;var y=function(){function e(){a(this,e),this.isAmendable=!1}return i(e,[{key:"message",value:function(){throw"not implemented"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){throw"not implemented"}},{key:"context",value:function(){throw"not implemented"}}]),e}(),C=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.face=e,n.shell=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"face refers to a shell it doesn't belong to"}},{key:"amend",value:function(){this.face.shell=this.shell}},{key:"operation",value:function(){d.quickPurgeFace(this.face)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),E=function(e){function t(e,r,n){a(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.isAmendable=!1,i.loop=e,i.halfEdge1=r,i.halfEdge2=n,i}return A(t,e),i(t,[{key:"message",value:function(){return"starting point of the following half edge should identically the same as ending of a half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),B=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.loop=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"loop has no half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),v=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"loop refers to different face it belongs to"}},{key:"amend",value:function(){var e=this.face.outerLoop===this.loop,t=this.loop.face,r=!!t&&t.outerLoop===this.loop,n=!!t&&t.innerLoops.indexOf(this.loop)>=0;if(r||n){var i=this.loop.halfEdges.map((function(e){return new f.HalfEdge(e.edge,e.reversed)})),o=new h.Loop(i);e?this.face.setOuterLoop(o):(this.face.removeInnerLoop(this.loop),this.face.addInnerLoop(o));for(var A=0,a=i.length;A<a;A++)g.IdAssigner.assignToHalfEdge(i[A]);this.loop.face=t}else this.loop.face=this.face}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face),this.loop.face?u.FaceData.extractTopo(e,this.loop.face):l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),m=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.halfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge refers to different loop it belongs to"}},{key:"amend",value:function(){this.halfEdge.loop=this.loop}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop),c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),Q=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.nextHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's next pointer doesn't refer to real next half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.nextHalfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),b=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.prevHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's prev pointer doesn't refer to prior half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.prevHalfEdge),c.HalfEdgeData.extractTopo(e,this.halfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),_=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect start vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),S=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect end vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),w=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't correctly refer to an edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),D=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"edge of sibling doesn't match to the half edge's edge"}},{key:"amend",value:function(){this.sibling.edge=this.halfEdge.edge}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),R=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.innerLoop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"inner loop is outside of face's outer loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.innerLoop)}},{key:"context",value:function(){try{var e=new Map;this.innerLoop.face&&u.FaceData.extractTopo(e,this.innerLoop.face),l.LoopData.extractTopo(e,this.innerLoop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),M=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't refer to any loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),x=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge with zero length"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y)},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"changeErrorHandler",value:function(t){e.errorHandler=t}},{key:"changeModelDataHandler",value:function(t){e.dataHandler=t}},{key:"onErrorOccurred",value:function(t,r){if(e.errorHandler){var n="geom-modeling-kernel:";r&&r.trim().length>0&&(n=n+"("+r.trim()+")"),e.errorHandler(t,n)}}},{key:"uploadErrorModelData",value:function(t,r){e.dataHandler&&e.dataHandler(t,r)}}]),e}();t.ErrorManager=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2053),i=r(357),o=r(285),A=r(1116);t.polygonizeShell=function(e,t,r){var a=n.Polygonize.polygonizeShell(e.rawObject(),t,r),s=o.MIxShell.create(a.shell),u=new Map;a.faceMap.forEach((function(e,t){var r=i.MIxFace.create(t),n=[];e.forEach((function(e){n.push(i.MIxFace.create(e))})),u.set(r,n)}));var c=new Map;return a.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),c.set(r,n)})),{shell:s,faceMap:u,edgeMap:c}},t.polygonizeFace=function(e,t,r){var o=n.Polygonize.polygonizeFace(e.rawObject(),t,r),a=[];o.faces.forEach((function(e){a.push(i.MIxFace.create(e))}));var s=new Map;return o.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),s.set(r,n)})),{faces:a,edgeMap:s}}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(235),A=r(237),a=r(238),s=r(283),u=r(160),c=r(282),l=r(710),g=r(716),f=r(2054),h=r(2056),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"polygonizeShell",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=[],s=[],c=!0,g=!1,f=void 0;try{for(var h,p=t.faces[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=h.value;a.push(d);var I=e.polygonMeshOnFace(d,!1,o,A);if(I.isEmpty())return{shell:new u.Shell,faceMap:new Map,edgeMap:new Map};s.push(I)}}catch(e){g=!0,f=e}finally{try{!c&&p.return&&p.return()}finally{if(g)throw f}}var y=e.getResultMapByShell(t,s);e.mergeCoplanarFaceOnFaceList(y,A),e.mergeCollinearEdgeOnFace(y,A);var C=e.getEdgesFromShell(t),E=e.reversedMapInfo({faces:a,edges:C},y),B=new u.Shell;return E.faceList.forEach((function(e){B.addFace(e)})),l.IdAssigner.assignToShell(B),{shell:B,faceMap:E.faceMap,edgeMap:E.edgeMap}}},{key:"polygonizeFace",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=e.polygonMeshOnFace(t,!0,o,A);if(a.isEmpty())return{faces:[],edgeMap:new Map};var s=e.getResultMapByFace(t,a);e.mergeCoplanarFaceOnFaceList(s,A),e.mergeCollinearEdgeOnFace(s,A);var u=e.getEdgesFromFace(t),c=e.reversedMapInfo({faces:[t],edges:u},s);return{faces:c.faceList,edgeMap:c.edgeMap}}},{key:"polygonMeshOnFace",value:function(t,r,n,o){o=o||i.Tolerance.Tolerance.global;var A=n;i.Num.isInRange(n,0,1,!0,!0,o.numTol)||(A=e.defaultNormTol);var a=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),s=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));if(null===t.surface)return new g.PolygonMesh;var u=[];return u.push(t.outerLoop.halfEdges.map((function(e){return e.edge.degenerated}))),u.push.apply(u,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.edge.degenerated}))})))),r?f.PolygonMeshOnSurface.polygonMeshOnSingleSurface3d(a,s,u,t.surface,t.sameDir,A,o):f.PolygonMeshOnSurface.polygonMeshOnSurface3d(a,s,u,t.surface,t.sameDir,A,o)}},{key:"getResultMapByFace",value:function(t,r){if(t.surface instanceof i.Plane)return e.makeFaceByPolygonMeshWithPlane(r);var n=new u.Shell;return n.addFace(t),this.getResultMapByShell(n,[r])}},{key:"getResultMapByShell",value:function(t,r){var n=e.buildVertexIndex(t),i=new Array,o=[],A=e.buildEdgeIndex(t,i,o),a=h.PolygonMeshUtil.mergePolygonMesh(r,i,n,A,o);return a.pgm.isEmpty()?{faceIndexMap:new Map,edgeIndexMap:new Map}:e.makeFacesByPolygonMesh(a)}},{key:"buildVertexIndex",value:function(e){var t=[],r=e.getVertices(),n=0,i=new Map,o=!0,A=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;i.set(c,n++)}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return e.faces.forEach((function(e){var r=e.getHalfEdges(),n=[];r.forEach((function(e){n.push(i.get(e.vertexA))})),t.push(n)})),t}},{key:"buildEdgeIndex",value:function(e,t,r){for(var n=Array.from(e.getEdges()),i=new Map,o=0,A=n.length;o<A;++o)i.set(n[o],o),t.push(n[o].getBoundedCurve());var a=e.faces,s=[];return a.forEach((function(e){var t=e.getHalfEdges(),n=[],o=[];t.forEach((function(e){var t=i.get(e.edge);n.push({index:t,isReversed:e.reversed}),o.push(e.reversed)})),s.push(n),r.push(o)})),s}},{key:"makeFaceByPolygonMeshWithPlane",value:function(t){if(!t.onPlane)return{faceIndexMap:new Map,edgeIndexMap:new Map};if(0===t.coords.length||1!==t.mSurfaces.length||1!==t.isSameDir.length||t.boundedIndices.length<1||t.boundedIndices.length!==t.boundedEdgePos.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var r=[];t.coords.forEach((function(e){r.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.boundedIndices,r);var n=new A.Face(t.mSurfaces[0]),i=t.coordIndices,o=e.makeLoopByVertexAndIndex(r,i[0]);n.setOuterLoop(o,t.isSameDir[0]);for(var a=1,s=i.length;a<s;++a){var u=e.makeLoopByVertexAndIndex(r,i[a]);if(null===u)return{faceIndexMap:new Map,edgeIndexMap:new Map};n.addInnerLoop(u)}var l=new Map;return l.set(n,0),{faceIndexMap:l,edgeIndexMap:e.setSoftTagWithEdge(t.boundedIndices,r)}}},{key:"makeFacesByPolygonMesh",value:function(t){var r=t.pgm.coords.length,n=t.pgm.coordIndices.length;if(0===r||0===n||t.pgm.markLoop.length!==n||t.pgm.isSameDir.length!==t.pgm.mSurfaces.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var i=[];t.pgm.coords.forEach((function(e){i.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.pgm.boundedIndices,i);for(var o=new Set,a=t.pgm.mSurfaces,s=t.pgm.coordIndices,u=new Map,l=0,g=0,f=0,h=s.length;f<h;f++){var p=t.pgm.markLoop[f];if(f>t.range[g]&&g++,-1!==p){var d=new A.Face(a[l]),I=e.makeLoopByVertexAndIndex(i,s[f]);for(d.setOuterLoop(I),f++;f<h&&1===t.pgm.markLoop[f];){var y=e.makeLoopByVertexAndIndex(i,s[f]);if(null===y)return{faceIndexMap:new Map,edgeIndexMap:new Map};d.addInnerLoop(y),f++}o.add(d),u.set(d,g),f--}else{var C=e.makeLoopByVertexAndIndex(i,s[f]);if(null!==C&&null!==a[l]){var E=new A.Face(a[l]);E.setOuterLoop(C),o.add(E),u.set(E,g)}}l++}return{faceIndexMap:u,edgeIndexMap:e.setSoftTagWithEdge(t.pgm.boundedIndices,i)}}},{key:"setSoftTagWithVertex",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var o,A=e[Symbol.iterator]();!(r=(o=A.next()).done);r=!0)for(var a=o.value,s=1,u=a.length;s<u;++s)0!==s&&s!==u-1&&(t[a[s]].isSoft=!0)}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}}},{key:"setSoftTagWithEdge",value:function(t,r){var n=new Map,i=r.length,o=0,A=!0,a=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){for(var l=u.value,g=1,f=l.length;g<f;++g){var h=l[g],p=l[g-1];if(h<i&&h>=0&&p<i&&p>=0){var d=e.setSoftOnEdgeByVertex(r[l[g]],r[l[g-1]]);d&&n.set(d,{bcIndex:o,posIndex:g})}}o++}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"setSoftOnEdgeByVertex",value:function(e,t){var r=e.edges,n=!0,i=!1,o=void 0;try{for(var A,a=r[Symbol.iterator]();!(n=(A=a.next()).done);n=!0){var s=A.value;if(s.vertexA===e&&s.vertexB===t||s.vertexB===e&&s.vertexA===t)return s.isSoft=!1,s}}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}},{key:"makeLoopByVertexAndIndex",value:function(t,r){var n=r.length;if(n<1)return null;for(var i=[],o=r[n-1],A=t[o],u=0,c=n;u<c;++u){var l=r[u],g=t[l],f=e.makeEdgeByVertex(A,g);A.point.isEqual(g.point)&&(f.degenerated=!0),i.push(new a.HalfEdge(f,f.vertexA!==A)),A=g,o=l}return new s.Loop(i)}},{key:"makeUniqueEdgeByVertex",value:function(e,t){var r=new o.Edge(i.Line3d.fromSegment(e.point,t.point),e,t);return r.isSoft=!0,r}},{key:"makeEdgeByVertex",value:function(t,r){var n=t.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;if(u.vertexA===t&&u.vertexB===r||u.vertexB===t&&u.vertexA===r)return u}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}var c=r.edges,l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value;if(d.vertexA===t&&d.vertexB===r||d.vertexB===t&&d.vertexA===r)return d}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}return e.makeUniqueEdgeByVertex(t,r)}},{key:"mergeCoplanarFaceOnFaceList",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getEdges().forEach((function(e){n.add(e)}))}));var i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value,c=u.halfEdges;if(u.isSoft&&2===c.length){var l=e.mergeFaceWithHalfEdge(c[0],c[1],r);if(null!==l){var g=c[0].loop.face,f=c[1].loop.face,h=t.faceIndexMap.get(g),p=t.faceIndexMap.get(f);void 0!==h&&void 0!==p&&(t.faceIndexMap.delete(g),t.faceIndexMap.delete(f),t.faceIndexMap.set(l,h),t.edgeIndexMap.delete(u))}}}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}}},{key:"mergeFaceWithHalfEdge",value:function(t,r,n){if(null===t.loop||null===t.loop.face||null===r.loop||null===r.loop.face)return null;var o=t.loop.face,a=r.loop.face;if(null===o||null===a)return null;var u=o.surface,c=a.surface;if(!(u instanceof i.Plane&&c instanceof i.Plane&&t.reversed!==r.reversed))return null;if(u.normal.isSameDirection(c.normal,n)){var l=o.outerLoop,g=a.outerLoop,f=e.findHalfEdgePosInLoop(l,t),h=e.findHalfEdgePosInLoop(g,r);if(-1===f||-1===h)return null;for(var p=l.halfEdges,d=g.halfEdges,I=p.length,y=d.length,C=[],E=f+1,B=f+I;E<B;++E)C.push(p[E%I]);for(var v=h+1,m=h+y;v<m;++v)C.push(d[v%y]);var Q=new A.Face(u);Q.setOuterLoop(new s.Loop(C),o.sameDir);var b=t.edge;return t.vertexA.removeEdge(b),r.vertexA.removeEdge(b),Q}return null}},{key:"findHalfEdgePosInLoop",value:function(e,t){for(var r=e.halfEdges,n=-1,i=0,o=r.length;i<o;++i)if(r[i]===t){n=i;break}return n}},{key:"mergeCollinearEdgeOnFace",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getVertices().forEach((function(e){n.add(e)}))})),n.forEach((function(n){e.judgeValidityForVertexByEdges(n,r)&&e.removeVertex(t,n)}))}},{key:"judgeValidityForVertexByEdges",value:function(e,t){var r=e.edges;if(2===r.length){var n=r[0],o=r[1],A=!0,a=!1,s=void 0;try{for(var u,c=n.halfEdges[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){if(0!==u.value.loop.face.innerLoops.length)return!1}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var l=!0,g=!1,f=void 0;try{for(var h,p=o.halfEdges[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){if(0!==h.value.loop.face.innerLoops.length)return!1}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}if(n.isSoft===o.isSoft&&n.curve instanceof i.Line3d&&o.curve instanceof i.Line3d){var d=n.curve,I=o.curve;if(d.direction.isParallel(I.direction,t))return!0}}return!1}},{key:"removeVertex",value:function(t,r){var n=r.getLeadInHalfEdges(),i=r.getLeadOutHalfEdges();if(2===n.length||2===i.length){var o=i[0],A=i[1],s=n[0],u=n[1],c=o.edge,l=A.edge,g=o.vertexB,f=A.vertexB,h=e.makeEdgeByVertex(g,f);h.isSoft=c.isSoft;var p=new a.HalfEdge(h,!0);e.updateFaceWithHF(t.faceIndexMap,p,o,s,u),p=new a.HalfEdge(h,!1),e.updateFaceWithHF(t.faceIndexMap,p,A,s,u),r.removeEdge(c),r.removeEdge(l),g.removeEdge(c),f.removeEdge(l);var d=t.edgeIndexMap.get(c),I=t.edgeIndexMap.get(l);d&&I&&d.bcIndex===I.bcIndex&&(t.edgeIndexMap.delete(c),t.edgeIndexMap.delete(l),d.posIndex>I.posIndex?t.edgeIndexMap.set(h,I):t.edgeIndexMap.set(h,d))}}},{key:"updateFaceWithHF",value:function(e,t,r,n,i){var o=new Array;o.push(t);for(var a=r.next;null!==a&&a!==n&&a!==i;)o.push(a),a=a.next;var u=new s.Loop(o),c=r.loop.face,l=new A.Face(c.surface);l.setOuterLoop(u,c.sameDir);var g=e.get(c);void 0!==g&&(e.delete(c),e.set(l,g))}},{key:"getEdgesFromShell",value:function(e){return Array.from(e.getEdges())}},{key:"getEdgesFromFace",value:function(e){var t=[];return e.outerLoop.halfEdges.map((function(e){return t.push(e.edge)})),e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return t.push(e.edge)}))})),t}},{key:"reversedMapInfo",value:function(e,t){var r=new Map,n=e.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;r.set(u,[])}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}t.edgeIndexMap.forEach((function(e,t){var i=n[e.bcIndex],o=r.get(i);o&&o.push({edge:t,order:e.posIndex})}));var c=new Map;r.forEach((function(e,t){e.sort((function(e,t){return e.order-t.order}));var r=[];e.forEach((function(e){r.push(e.edge)})),c.set(t,r)}));var l=[],g=new Map,f=e.faces;return f.forEach((function(e){g.set(e,new Array)})),t.faceIndexMap.forEach((function(e,t){var r=f[e],n=g.get(r);n&&n.push(t),l.push(t)})),{faceList:l,faceMap:g,edgeMap:c}}}]),e}();p.defaultNormTol=1-Math.cos(Math.PI/9),t.Polygonize=p},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function A(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(716),u=r(2055),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"polygonMeshOnSingleSurface3d",value:function(t,r,n,i,o,A,s){var u=e.polygonMeshOnSurface3d(t,r,n,i,o,A,s);return null===u||i instanceof a.Plane||u.planarMesh(),u}},{key:"polygonMeshOnSurface3d",value:function(t,r,n,i,o,A,s){return i instanceof a.Plane?e.polygonMeshOnPlane(t,r,i,o,A):e.polygonMeshOnNonPlane(t,r,n,i,o,A,s)}},{key:"polygonMeshOnPlane",value:function(e,t,r,n,i){var o=[],A=[];return e.forEach((function(e){var t=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);o.push(t)})),t.forEach((function(e){var t=[];e.forEach((function(e){var r=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);t.push(r)})),A.push(t)})),s.PolygonMesh.makePolygonMeshByLoops(o,A,r,n)}},{key:"polygonMeshOnNonPlane",value:function(t,r,n,i,o,A,c){var l=e.getOrderUVBoundedCurve(i,t,r,c),g=void 0;g=i instanceof a.NurbsSurface?e.calculateUVOffset(i,l.uvContour,c):[0,0];var f=u.PolygonOnUVFace.tessUVDomain(i,l.uvContour,g[0],g[1],A),h=u.PolygonOnUVFace.getUVPolygons(l.uvContour,l.uvHole,g,f,c);if(0===h.length||0===h[0].length)return new s.PolygonMesh;var p=u.PolygonOnUVFace.getRectMesh(i,f),d=e.getEndpointOfUVBoundedCurve(l.uvContour,l.uvHole,g),I=e.getPointsByDegenerateEdge(n,t,r),y=[],C=[],E=e.getPolygonByRectMesh(h,p,i,o,d,C,y,I,c);return 0===E.length?new s.PolygonMesh:s.PolygonMesh.makePolygonMeshByPolygon(E,C,y,o)}},{key:"getOrderUVBoundedCurve",value:function(e,t,r,n){var i={contour:t,holes:r},o=e.faceToUV(i,n).mapping,A=[],a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;A.push(o.get(g))}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}var f=[],h=!0,p=!1,d=void 0;try{for(var I,y=r[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value,E=[],B=!0,v=!1,m=void 0;try{for(var Q,b=C[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;E.push(o.get(_))}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}f.push(E)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}return{uvContour:A,uvHole:f}}},{key:"getEndpointOfUVBoundedCurve",value:function(e,t,r){var n=[],i=[];i.push(e),null!==t&&i.push.apply(i,A(t));var o=!0,a=!1,s=void 0;try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value,g=[],f=!0,h=!1,p=void 0;try{for(var d,I=l[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value.startPoint;g.push({x:y.x+r[0],y:y.y+r[1]})}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}n.push(g)}}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"getPointsByDegenerateEdge",value:function(e,t,r){for(var n=[],i=0,o=e.length;i<o;++i)for(var A=e[i],a=0,s=A.length;a<s;++a)A[a]&&(0==i?n.push(t[a].startPoint):n.push(r[i-1][a].startPoint));return n}},{key:"calculateUVOffset",value:function(t,r,n){n=n||a.Tolerance.Tolerance.global;var i=t.isUPeriodic(n),o=t.isVPeriodic(n);if(!i&&!o||0===r.length)return[0,0];var A=0,s=0,u=!0,c=!1,l=void 0;try{for(var g,f=r[Symbol.iterator]();!(u=(g=f.next()).done);u=!0){var h=g.value;A+=h.startPoint.x,s+=h.startPoint.y}}catch(e){c=!0,l=e}finally{try{!u&&f.return&&f.return()}finally{if(c)throw l}}A/=r.length,s/=r.length;var p=t.domainU,d=t.domainV,I=p.end-p.start,y=d.end-d.start;return[e.calculateOffset(p.start,p.end,I,A)*I,e.calculateOffset(d.start,d.end,y,s)*y]}},{key:"calculateOffset",value:function(e,t,r,n){for(var i=0;n>t;)n-=r,i--;for(;n<e;)n+=r,i++;return i}},{key:"getPolygonByRectMesh",value:function(t,r,n,i,o,s,u,c,l){for(var g=[],f=[],h=new Map,p=new Map,d=a.simplifyPolygonsByHorizontal(t,!0),I=a.simplifyPolygonsByHorizontal(d,!1),y=0,C=r.length;y<C;++y){var E=r[y];a.addRect(I,E,g,f,h,p)}var B=[],v=e.dealWithInnerPolygons(g,B),m=e.dealWithIntersectPolygons(f,B,t),Q=[],b=new Map;e.mergeInnerPolygons(Q,s,v,b,n,i,B);var _=new Map,S=[];o.forEach((function(e){return S.push.apply(S,A(e))}));var w=Q.length,D=!0,R=!1,M=void 0;try{for(var x,P=m[Symbol.iterator]();!(D=(x=P.next()).done);D=!0){var T=x.value;e.mergeIntersectPolygons(Q,s,T,b,n,i,B[w],S,_,c,l),w++}}catch(e){R=!0,M=e}finally{try{!D&&P.return&&P.return()}finally{if(R)throw M}}if(_.size!==S.length)return[];var F=e.getBoundedEndpointOnPolygon(o,_);return 0===F.length?[]:(u.push.apply(u,A(F)),Q)}},{key:"getBoundedEndpointOnPolygon",value:function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,s=e[Symbol.iterator]();!(n=(A=s.next()).done);n=!0){var u=A.value;if(0===u.length)break;var c=u[0],l=t.get(c);if(!l)break;for(var g=1,f=u.length;g<f;++g){var h=u[g],p=t.get(h);if(!p)return[];a.Num.isEqual(c.x,h.x)&&a.Num.isEqual(c.y,h.y)||(r.push(l),r.push(p)),l=p,c=h}var d=u[0],I=t.get(d);if(!I)return[];a.Num.isEqual(c.x,d.x)&&a.Num.isEqual(c.y,d.y)||(r.push(l),r.push(I))}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}},{key:"dealWithInnerPolygons",value:function(t,r){var n=new Map,o=[],A=!0,a=!1,s=void 0;try{for(var u,c=function(){var t=u.value,i=e.makePlaneByRectMeshNode(t);if(null===i)return{v:[]};r.push(i);var A=[];t.corners.forEach((function(t){var r=e.getPolyPtBySurfPtMapPolyPt(n,t);A.push(r)})),o.push(A)},l=t[Symbol.iterator]();!(A=(u=l.next()).done);A=!0){var g=c();if("object"===(void 0===g?"undefined":i(g)))return g.v}}catch(e){a=!0,s=e}finally{try{!A&&l.return&&l.return()}finally{if(a)throw s}}return o}},{key:"dealWithIntersectPolygons",value:function(t,r,n){for(var o=[],A=function(i,A){var s=t[i],u=e.makePlaneByRectMeshNode(s);if(null===u)return{v:[]};r.push(u);var c=[];s.corners.forEach((function(e){c.push({x:e.uv[0],y:e.uv[1]})}));for(var l=a.simplifyPolygons(a.clipping(n,c)),g=0,f=l.length;g<f;++g){var h=l[g].length;if(h>0){var p=l[g][0],d=l[g][h-1];a.Num.isEqual(p.x,d.x)&&a.Num.isEqual(p.y,d.y)&&l[g].pop()}}for(var I=[],y=0;y<4;++y){var C=s.getAllCorners(y),E=!0,B=!1,v=void 0;try{for(var m,Q=function(){var e=m.value;s.corners.some((function(t){return t===e}))||I.push({x:e.uv[0],y:e.uv[1],id:e.id})},b=C[Symbol.iterator]();!(E=(m=b.next()).done);E=!0)Q()}catch(e){B=!0,v=e}finally{try{!E&&b.return&&b.return()}finally{if(B)throw v}}}var _=a.Tolerance.Tolerance.global;if(I.length){var S=!0,w=!1,D=void 0;try{for(var R,M=I[Symbol.iterator]();!(S=(R=M.next()).done);S=!0){var x=R.value,P=new a.Point2d(x.x,x.y),T=!0,F=!1,O=void 0;try{for(var L,N=l[Symbol.iterator]();!(T=(L=N.next()).done);T=!0)for(var k=L.value,G=0,U=k.length;G<U;++G){var j=new a.LineSeg2d(new a.Point2d(k[G].x,k[G].y),new a.Point2d(k[(G+1)%U].x,k[(G+1)%U].y));if((j.direction.isParallel(new a.Vector2d(1,0),_)||j.direction.isParallel(new a.Vector2d(0,1),_))&&j.isPointOnCurve(P,_)){k.splice(G+1,0,x);break}}}catch(e){F=!0,O=e}finally{try{!T&&N.return&&N.return()}finally{if(F)throw O}}}}catch(e){w=!0,D=e}finally{try{!S&&M.return&&M.return()}finally{if(w)throw D}}}o.push(l)},s=0,u=t.length;s<u;++s){var c=A(s);if("object"===(void 0===c?"undefined":i(c)))return c.v}return o}},{key:"mergeInnerPolygons",value:function(e,t,r,n,i,o,A){var s=0,u=!0,c=!1,l=void 0;try{for(var g,f=function(){var r=g.value,u=A[s++],c=[];r.forEach((function(e){var t=n.get(e);if(!t){var r=new a.UV(e.x,e.y);t=i.getPoint(r),n.set(e,t)}c.push(t)})),0!==c.length&&(o||c.reverse(),e.push(c),t.push(u))},h=r[Symbol.iterator]();!(u=(g=h.next()).done);u=!0)f()}catch(e){c=!0,l=e}finally{try{!u&&h.return&&h.return()}finally{if(c)throw l}}}},{key:"mergeIntersectPolygons",value:function(t,r,n,i,o,A,s,u,c,l,g){var f=!0,h=!1,p=void 0;try{for(var d,I=function(){var n=d.value,f=new Set;if(n.forEach((function(t){var r=e.findPointInMap(i,t);if(null===r){var n=new a.UV(t.x,t.y);r=o.getPoint(n),i.set(t,r)}var A=!0,s=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(A=(p=d.next()).done);A=!0){var I=p.value;I.isEqual(r,g.distTol)&&(r=I)}}catch(e){s=!0,h=e}finally{try{!A&&d.return&&d.return()}finally{if(s)throw h}}f.add(r),e.matchBoundedEndpoint(u,c,t,r)})),0!==f.size){var h=Array.from(f);A||h.reverse(),t.push(h),r.push(s)}},y=n[Symbol.iterator]();!(f=(d=y.next()).done);f=!0)I()}catch(e){h=!0,p=e}finally{try{!f&&y.return&&y.return()}finally{if(h)throw p}}}},{key:"matchBoundedEndpoint",value:function(e,t,r,n){var i=!0,o=!1,A=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(c.x,r.x)&&a.Num.isEqual(c.y,r.y)){t.set(c,n);break}}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}}},{key:"findPointInMap",value:function(e,t){var r=t.x,n=t.y,i=!0,o=!1,A=void 0;try{for(var s,u=e.entries()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(r,c[0].x)&&a.Num.isEqual(n,c[0].y))return c[1]}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}return null}},{key:"makePlaneByRectMeshNode",value:function(e){if(e.corners.length<4)return null;var t=new a.Point3d(e.corners[0].point),r=new a.Point3d(e.corners[1].point),n=new a.Point3d(e.corners[2].point),i=void 0;return t.isEqual(r)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,n,i)):t.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(r,n,i)):r.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,r,i)):a.Plane.makePlaneByTreePoints(t,r,n)}},{key:"getPolyPtBySurfPtMapPolyPt",value:function(e,t){var r=e.get(t);return r||(r={x:t.uv[0],y:t.uv[1]},e.set(t,r)),r}}]),e}();t.PolygonMeshOnSurface=c},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"getUVPolygons",value:function(e,t,r,n,A){var a=this,s=this.makeCrosswordLine(n);if(0===s.length)return[];var u=[];u.push(e),null!==t&&u.push.apply(u,i(t));for(var c=[],l=function(e,t){var n=[];u[e].forEach((function(e){var t=a.boundedCurveIntersectIsoLine(e,s,A);t.splice(t.length-1,1),n.push.apply(n,i(t))})),o.LoopCCW.isPolygonCCW2D(n)!==(0===e)&&n.reverse();var l=new Array;n.forEach((function(e){l.push({x:e.x+r[0],y:e.y+r[1]})})),c.push(l)},g=0,f=u.length;g<f;g++)l(g);return c}},{key:"makeCrosswordLine",value:function(e){if(2!==e.length)return[];for(var t=e[0],r=e[1],n=[],i=1,A=t.length;i<A-1;i++)n.push(new o.Line2d(new o.Point2d(t[i],0),o.Vector2d.yAxis));for(var a=[],s=1,u=r.length;s<u-1;s++)a.push(new o.Line2d(new o.Point2d(0,r[s]),o.Vector2d.xAxis));return[n,a]}},{key:"boundedCurveIntersectIsoLine",value:function(e,t,r){var n=new Array,A=e.getBounding(),a=A.min,s=A.max;t[0].forEach((function(t){var A=t.p0.x;if(o.Num.isInRange(A,a.x,s.x,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),t[1].forEach((function(t){var A=t.p0.y;if(o.Num.isInRange(A,a.y,s.y,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),n.push({point:e.startPoint,param1:e.domain.start,param2:0,isOverlap:!1}),n.push({point:e.endPoint,param1:e.domain.end,param2:0,isOverlap:!1}),n.sort((function(e,t){return e.param1<t.param1?-1:e.param1>t.param1?1:0})),this.filterRepeatData(n,r);var u=[];return n.forEach((function(e){u.push(e.point)})),u}},{key:"tessUVDomain",value:function(e,t,r,n,i){var A=i,a=this.getUVBox(t,r,n),s=void 0;if(e instanceof o.ConicalSurface||e instanceof o.CylindricalSurface)s=this.adaptiveDomainOfCylinderCone(e,a[0],a[1],A);else if(e instanceof o.SurfaceOfLinearExtrusion)s=this.adaptiveDomainOfLinearExtrusion(e,a[1],A);else if(e instanceof o.RevolveSurface)s=this.adaptiveDomainOfRevolve(e,a[0],a[1],A);else if(e instanceof o.ToroidalSurface)s=this.adaptiveDomainOfToroidal(a[0],a[1],A);else{if(!(e instanceof o.NurbsSurface))throw"not implement";s=this.adaptiveDomainOfNurbs(e,a[0],a[1],A)}return s}},{key:"adaptiveDomainOfCylinderCone",value:function(t,r,n,i){var A=void 0;if(A=(o.ConicalSurface,t.radius),o.Num.isEqual(A,0))return[];var a=new o.Arc3d(new o.Circle3d(t.ccs,A),r.start,r.end).tessCurveAdaptiveByNormalTol(r.start,r.end,i),s=a.length,u=new Array,c=!0,l=!1,g=void 0;try{for(var f,h=a[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;u.push(p.t)}}catch(e){l=!0,g=e}finally{try{!c&&h.return&&h.return()}finally{if(l)throw g}}var d=r.length*A,I=n.length,y=Math.floor(I/d*s);return y=Math.min(y>0?y:1,e.maxDiscreteSeg),[u,this.splitDomain(n,n.length/y)]}},{key:"adaptiveDomainOfLinearExtrusion",value:function(t,r,n){for(var i=t.baseCurve,o=i.getApproximatePtInfosByNormalTol(n),A=o.length,a=new Array,s=0;s<A;++s)a.push(o[s].t);var u=i.length,c=t.height,l=Math.floor(c/u*A);return l=l>0?l:1,l=Math.min(l>0?l:1,e.maxDiscreteSeg),[a,this.splitDomain(r,r.length/l)]}},{key:"adaptiveDomainOfRevolve",value:function(t,r,n,i){var A=t.baseCurve,a=A.domain.middle,s=new o.LineSeg2d(new o.Point2d(r.start,a),new o.Point2d(r.end,a)),u=t.uvCurveTo3d(s),c=u.tessCurveAdaptiveByNormalTol(r.start,r.end,i).length,l=this.splitDomain(r,r.length/c),g=A.tessCurveAdaptiveByNormalTol(n.start,n.end,i),f=[],h=g.length,p=Math.floor(A.length/u.length*c)+1;if(p=Math.min(p,e.maxDiscreteSeg),h<c/2&&h<p)f=this.splitDomain(n,n.length/p);else for(var d=0;d<h;++d)f.push(g[d].t);return[l,f]}},{key:"adaptiveDomainOfToroidal",value:function(e,t,r){var n=new o.Circle3d(new o.CCS3d,1),i=new o.Arc3d(n,e.start,e.end).tessCurveAdaptiveByNormalTol(e.start,e.end,r).length,A=this.splitDomain(e,e.length/i),a=new o.Arc3d(n,t.start,t.end).tessCurveAdaptiveByNormalTol(t.start,t.end,r).length;return[A,this.splitDomain(t,t.length/a)]}},{key:"splitDomain",value:function(e,t){for(var r=e.start,n=e.end,i=e.length,o=Math.ceil(i/t),A=i/o,a=new Array,s=0;s<o;++s)a.push(r+s*A);return a.push(n),a}},{key:"adaptiveDomainOfNurbs",value:function(e,t,r,n){var i=t.end,o=t.start,A=r.end,a=r.start,s=[];e.degreeU>1&&e.isoCurve((A+a)/2,!0).tessCurveAdaptiveByNormalTol(o,i,n).forEach((function(e){s.push(e.t)}));var u=e.controlPoints.length*e.degreeU;if(s.length<u){s.splice(0,s.length);for(var c=(i-o)/(u-1),l=0;l<u;l++)s.push(o+c*l)}var g=[];e.degreeV>1&&e.isoCurve((i+o)/2,!1).tessCurveAdaptiveByNormalTol(a,A,n).forEach((function(e){g.push(e.t)}));var f=e.controlPoints[0].length*e.degreeV;if(g.length<f){g.splice(0,g.length);for(var h=(A-a)/(f-1),p=0;p<f;p++)g.push(a+h*p)}return[s,g]}},{key:"getRectMesh",value:function(e,t){for(var r=t[0].length-1,n=t[1].length-1,i=new Array(r*n),A=[],a=0;a<n+1;a++){for(var s=new Array,u=0;u<r+1;u++){var c=t[0][u],l=t[1][a],g=new o.UV(c,l),f=e.tangentUWithLen(g),h=e.tangentVWithLen(g),p=e.getPoint(g),d=f.cross(h).normalized();s.push(new o.SurfacePoint([p.x,p.y,p.z],[d.x,d.y,d.z],[g.u,g.v],-1,o.Num.isZero(d.length)))}A.push(s)}for(var I=0;I<n;I++)for(var y=0;y<r;y++){var C=[A[n-I-1][y],A[n-I-1][y+1],A[n-I][y+1],A[n-I][y]];i[I*r+y]=new o.RectMeshNode(e,C)}return i}},{key:"getUVBox",value:function(e,t,r){var n=new o.BBox2d,i=!0,A=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.merge(c.getBounding())}}catch(e){A=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(A)throw a}}var l=n.min,g=n.max,f=l.x+t,h=l.y+r,p=g.x+t,d=g.y+r;return[new o.Interval(f,p),new o.Interval(h,d)]}},{key:"filterRepeatData",value:function(e,t){if(!(e.length<2))for(var r=e[0].param1,n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i].param1,r,t.distTol)?(e.splice(i,1),n++,i--):r=e[i].param1}},{key:"tessBoundedCurve3d",value:function(e,t){var r=e.domain,n=e.tessCurveAdaptiveByNormalTol(r.start,r.end,t);if(n.length<2)return[e.startPoint,e.endPoint];var i=[];return n.forEach((function(e){i.push(e.point)})),i}}]),e}();A.maxDiscreteSeg=100,t.PolygonOnUVFace=A},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(716),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"mergePolygonMesh",value:function(t,r,n,i,o){if(!e.validPolygonMeshList(t,n,i))return{pgm:new A.PolygonMesh,range:[]};e.buildCommonPtPosLst(n).forEach((function(r){e.mergeCommonPointForPolygonMeshes(t,r)}));for(var a=e.buildCommonEdgePosList(i),s=0,u=a.length;s<u;s++)a[s].length<2||e.mergeCommonEdgeByPolygonMesh(t,a[s],r[s],o);return e.mergePolygonMeshWithComInfo(t,a)}},{key:"mergeCommonPointForPolygonMeshes",value:function(t,r){if(!(r.length<2)){var n=[];r.forEach((function(e){var r=e[0],i=e[1];if(!(r<0||r>=t.length)){var o=t[r];if(!(null===o||i<0||i>=o.boundedEdgePos.length)){var A=o.boundedEdgePos[i];if(null!==A&&0!==A.length){var a=A[0].x;if(!(a<0||a>=o.mSurfaces.length))if(null!==o.mSurfaces[a]){var s=o.boundedIndices[i][0];n.push([r,s])}}}}})),e.updateCommonPtPos(t,n)}}},{key:"updateCommonPtPos",value:function(e,t){for(var r=t[0],n=e[r[0]].coords[r[1]],i=1,o=t.length;i<o;i++){var A=t[i];e[A[0]].coords.splice(A[1],1,n)}}},{key:"buildCommonPtPosLst",value:function(e){for(var t=e.length,r=new Map,n=0;n<t;++n)for(var o=e[n],A=0,a=o.length;A<a;++A){var s=o[A],u=r.get(s),c=[n,A];if(u){var l=[];l.push.apply(l,i(u)),l.push(c),r.set(s,l)}else r.set(s,[c])}var g=[];return r.forEach((function(e,t){g.push(e)})),g}},{key:"buildCommonEdgePosList",value:function(e){for(var t=new Map,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,A=i.length;o<A;++o){var a=i[o],s=t.get(a.index);if(s)s.push({faceI:r,edgeI:o,isReversed:i[o].isReversed});else{var u=[];u.push({faceI:r,edgeI:o,isReversed:i[o].isReversed}),t.set(a.index,u)}}var c=[];return t.forEach((function(e,t){c.push(e)})),c}},{key:"mergeCommonEdgeByPolygonMesh",value:function(t,r,n,o){var A=r.length;if(e.validCommonEdgeData(t,r,o)){for(var a=[],s=[],u=0;u<A;++u){var c=r[u],l=t[c.faceI],g=[].concat(i(l.boundedIndices[c.edgeI])),f=[].concat(i(l.boundedEdgePos[c.edgeI]));o[c.faceI][c.edgeI]&&(g.reverse(),f.reverse());for(var h=g.length,p=[],d=1;d<h-1;d++){var I=l.coords[g[d]],y=n.getParam(I);p.push(y),s.push(y)}a.push(p)}s=s.sort((function(e,t){return e-t}));e.uniqueDataForList(s,.001);var C=[];s.forEach((function(e){C.push({p:e,pt:n.getPoint(e)})}));var E=0,B=!0,v=!1,m=void 0;try{for(var Q,b=a[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value,S=e.splitParamPtListByParams(C,_,.001),w=r[E];t[w.faceI].insertPtsByPtsList(w.edgeI,S,o[w.faceI][w.edgeI]),E++}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}}},{key:"splitParamPtListByParams",value:function(e,t,r){var n=[],i=e.length,A=0,a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(var g=c.value,f=[],h=A;h<i;++h)if(f.push(e[h].pt),o.Num.isBiggerOrEqual(e[h].p,g,r)){n.push(f),A=h+1;break}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}for(var p=[],d=A;d<i;++d)p.push(e[d].pt);return n.push(p),n}},{key:"uniqueDataForList",value:function(e,t){if(!(e.length<2))for(var r=e[0],n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i],r,t)?(e.splice(i,1),n++,i--):r=e[i]}},{key:"validCommonEdgeData",value:function(e,t,r){if(t.length<2)return!1;var n=null,i=null,o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=c.faceI,g=c.edgeI;if(l<0||l>=e.length)return!1;if(g<0||g>=e[l].boundedIndices.length)return!1;var f=e[c.faceI],h=f.boundedIndices[g],p=f.boundedEdgePos[g],d=h.length;if(d<2||d!==p.length+1)return!1;var I=f.coords[h[0]],y=f.coords[h[d-1]];if(null===n)r[l][g]?(n=y,i=I):(n=I,i=y);else if(r[l][g]){if(n!==y||i!==I)return!1}else if(n!==I||i!==y)return!1}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return!0}},{key:"validPolygonMeshList",value:function(e,t,r){if(t.length!==e.length)return!1;for(var n=0,i=e.length;n<i;++n){var o=e[n];if(r[n].length!==o.boundedIndices.length)return!1}return!0}},{key:"mergePolygonMeshWithComInfo",value:function(e,t){for(var r=new A.PolygonMesh,n=[],o=new Map,a=new Map,s=0,u=t.length;s<u;++s)for(var c=1,l=t[s].length;c<l;++c){var g=a.get(t[s][c].faceI);if(g)g.add(t[s][c].edgeI);else{var f=new Set;f.add(t[s][c].edgeI),a.set(t[s][c].faceI,f)}}var h=0,p=0,d=!0,I=!1,y=void 0;try{for(var C,E=e[Symbol.iterator]();!(d=(C=E.next()).done);d=!0){var B,v,m,Q=C.value;Q.postTreatment();var b=new Map,_=Q.coords,S=0,w=!0,D=!1,R=void 0;try{for(var M,x=_[Symbol.iterator]();!(w=(M=x.next()).done);w=!0){var P=M.value,T=o.get(P);if(void 0===T)b.set(S++,h),void 0===o.get(P)&&o.set(P,h++),r.coords.push(P);else b.set(S++,T)}}catch(e){D=!0,R=e}finally{try{!w&&x.return&&x.return()}finally{if(D)throw R}}var F=Q.coordIndices,O=!0,L=!1,N=void 0;try{for(var k,G=F[Symbol.iterator]();!(O=(k=G.next()).done);O=!0){var U=k.value,j=[],V=!0,H=!1,Y=void 0;try{for(var K,q=U[Symbol.iterator]();!(V=(K=q.next()).done);V=!0){var J=K.value;j.push(b.get(J))}}catch(e){H=!0,Y=e}finally{try{!V&&q.return&&q.return()}finally{if(H)throw Y}}r.coordIndices.push(j)}}catch(e){L=!0,N=e}finally{try{!O&&G.return&&G.return()}finally{if(L)throw N}}(B=r.mSurfaces).push.apply(B,i(Q.mSurfaces)),(v=r.isSameDir).push.apply(v,i(Q.isSameDir)),(m=r.markLoop).push.apply(m,i(Q.markLoop)),n.push(r.coordIndices.length-1);for(var W=a.get(p),z=0,X=Q.boundedIndices.length;z<X;++z)if(!W||!W.has(z)){var Z=[],$=!0,ee=!1,te=void 0;try{for(var re,ne=Q.boundedIndices[z][Symbol.iterator]();!($=(re=ne.next()).done);$=!0){var ie=re.value;Z.push(b.get(ie))}}catch(e){ee=!0,te=e}finally{try{!$&&ne.return&&ne.return()}finally{if(ee)throw te}}r.boundedIndices.push(Z)}p++}}catch(e){I=!0,y=e}finally{try{!d&&E.return&&E.return()}finally{if(I)throw y}}return{pgm:r,range:n}}}]),e}();t.PolygonMeshUtil=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(2058),o=r(2059),A=r(2060),a=r(2063);t.triangulate=function(e,t){if(e.surface instanceof n.Plane)return A.triangulateOnPlane(e,e.surface,t);if(e.surface instanceof n.CylindricalSurface||e.surface instanceof n.ConicalSurface||e.surface instanceof n.SurfaceOfLinearExtrusion)return i.triangulateOnCylinderCone(e,e.surface,t);if(e.surface instanceof n.NurbsSurface)return o.triangulateOnNurbsSurface(e,e.surface,t);if(e.surface instanceof n.ToroidalSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);if(e.surface instanceof n.RevolveSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);throw"unsupported"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnCylinderCone=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateDevelopable.triangulateOnDevelopable3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnNurbsSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateNurbs.triangulateOnNurbsSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(2061),A=r(528),a=r(2062);function s(e,t,r){var o=e.getApproximatePoints(t);if(!e.edge.isSoft||!r)return{points:o};var A=c(e.edge);if(!A)return{points:o};for(var a=l(e.vertexA),s=l(e.vertexB),g=new Map,f=[].concat(n(A),n(a),n(s)),h=0,p=f.length;h<p;h++){var d=f[h];if(!g.has(d)){var I=d.surface;if(I instanceof i.Plane){var y=d.sameDir?I.ccs.dz:I.ccs.dz.reversed();g.set(d,y)}}}for(var C=new Array(o.length),E=0,B=o.length;E<B;E++){var v=o[E];0===E&&a.length>0?C[E]=u(a,v,g):E===B-1&&s.length>0?C[E]=u(s,v,g):C[E]=u(A,v,g)}return{points:o,normals:C}}function u(e,t,r){for(var n=void 0,i=0,o=e.length;i<o;i++){var A=e[i],a=r.get(A);a||(a=A.sameDir?A.surface.getNormalOfPoint(t):A.surface.getNormalOfPoint(t).reversed()),n=n?n.added(a):a}return n?n.normalized():void 0}function c(e){for(var t=[],r=e.halfEdges,n=0,i=r.length;n<i;n++){var o=r[n],A=o.loop?o.loop.face:void 0;A&&t.push(A)}if(2===t.length)return t}function l(e){for(var t=new Set,r=e.edges,n=0,i=r.length;n<i;n++){var o=r[n];if(!o.isSoft)return[];var A=c(o);if(!A)return[];for(var a=0,s=A.length;a<s;a++)t.add(A[a])}return Array.from(t)}t.triangulateOnPlane=function(e,t,r){var n=new A.Mesh,i=[],u=0;r=r||{};for(var l=e.sameDir?t.normal:t.normal.reversed(),g=e.getLoops(),f=0,h=g.length;f<h;f++){var p=[],d=g[f].halfEdges,I=0,y=d[0].edge,C=d[d.length-1].edge;y.isSoft&&c(y)||!C.isSoft||!c(C)||(I=d.length-1);for(var E=!1,B=0,v=d.length;B<v;B++){for(var m=s(d[(B+I)%v],r.crvRatioTol,r.needNormal),Q=m.points,b=m.normals,_=E?1:0,S=b&&B!==v-1?Q.length:Q.length-1;_<S;_++){var w=Q[_];p.push(new o.LibtessVertex(w,u++)),o.addVertexNormalUVBy3d(w,n,t,e.sameDir,r.needUV,r.needNormal,void 0,b?b[_]:l)}E=!!b}i.push(p)}for(var D=a.gluTessTriangulate(i,o.toData(e.sameDir?t.normal.toPoint3d():t.normal.reversed().toPoint3d())),R=0;R<D.length;R+=3){var M=o.getOrCreateVertexIndexBy3d(D[R],n,t,e.sameDir,r.needUV,r.needNormal),x=o.getOrCreateVertexIndexBy3d(D[R+1],n,t,e.sameDir,r.needUV,r.needNormal),P=o.getOrCreateVertexIndexBy3d(D[R+2],n,t,e.sameDir,r.needUV,r.needNormal);n.addTriangle([M,x,P])}return r.needUV&&(n.uvIndices=n.triangleIndices),r.needNormal&&(n.normalIndices=n.triangleIndices),n}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.push(e.x),i.push(e.y),i.push(e.z?e.z:0),i.index=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Array),t}();function A(e){return[e.x,e.y,e.z]}t.LibtessVertex=o,t.toData=A,t.getOrCreateVertexIndex=function(e,t,r,n,o,a){if(e.hasOwnProperty("index"))return e.index;var s=new i.UV(e[0],e[1]),u=A(r.getPoint(s));if(t.addVertex(u),o&&t.addUv([s.u,s.v]),a){var c=n?r.getNormal(s):r.getNormal(s).reversed();t.addNormal([c.x,c.y,c.z])}return t.vertices.length-1},t.getOrCreateVertexIndexBy3d=function(e,t,r,n,o,A){if(e.hasOwnProperty("index"))return e.index;t.addVertex(e);var a=void 0;if(o&&(a=r.getParam(new i.Point3d(e[0],e[1],e[2])),t.addUv([a.u,a.v])),A){a||(a=r.getParam(new i.Point3d(e[0],e[1],e[2])));var s=n?r.getNormal(a):r.getNormal(a).reversed();t.addNormal([s.x,s.y,s.z])}return t.vertices.length-1},t.addVertexNormalUV=function(e,t,r,n,i,o,a,s){var u=a||r.getPoint(e);if(t.addVertex(A(u)),i&&t.addUv([e.u,e.v]),o){var c=s;c||(c=n?r.getNormal(e):r.getNormal(e).reversed()),t.addNormal([c.x,c.y,c.z])}},t.addVertexNormalUVBy3d=function(e,t,r,n,i,o,a,s){t.addVertex(A(e));var u=a;if(i&&(u=u||r.getParam(e),t.addUv([u.u,u.v])),o){var c=s;if(!c){var l=r.getNormal(u||r.getParam(e));c=n?l:l.reversed()}t.addNormal([c.x,c.y,c.z])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(424),i=r(589);function o(e){e!==i.primitiveType.GL_TRIANGLES&&n.consoleLogInDev("expected TRIANGLES but got type: "+e)}function A(e){n.consoleLogInDev("error callback"),n.consoleLogInDev("error number: "+e)}t.gluTessTriangulate=function(e,t){var r=function(){var e=new i.GluTesselator;return e.gluTessCallback(i.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t.push(e)})),e.gluTessCallback(i.gluEnum.GLU_TESS_BEGIN,o),e.gluTessCallback(i.gluEnum.GLU_TESS_ERROR,A),e.gluTessCallback(i.gluEnum.GLU_TESS_COMBINE,(function(e,t,r){return[e[0],e[1],e[2]]})),e.gluTessCallback(i.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e}();r.gluTessNormal(t[0],t[1],t[2]);var n=[];r.gluTessBeginPolygon(n);var a=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;r.gluTessBeginContour();var f=!0,h=!1,p=void 0;try{for(var d,I=g[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value;r.gluTessVertex(y,y)}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}r.gluTessEndContour()}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}return r.gluTessEndPolygon(),n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnRevolveSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateRevSurface.triangulateOnRevolveSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2065);t.diffMIxShells=function(e,t){return n.diffShells(e.map((function(e){return e.rawObject()})),t.map((function(e){return e.rawObject()})))},t.diffMIxShell=function(e,t){return n.diffShell(e.rawObject(),t.rawObject())},t.diffMIxFace=function(e,t){return n.diffFace(e.rawObject(),t.rawObject())},t.diffMIxLoop=function(e,t){return n.diffLoop(e.rawObject(),t.rawObject())},t.diffMIxHalfEdge=function(e,t){return n.diffHalfEdge(e.rawObject(),t.rawObject())},t.diffMIxEdge=function(e,t){return n.diffEdge(e.rawObject(),t.rawObject())},t.diffMIxVertex=function(e,t){return n.diffVertex(e.rawObject(),t.rawObject())}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(3);function A(e,t){if(e.faces.length!==t.faces.length)return console.error("Different in faces num "+e.faces.length+" : "+t.faces.length),!1;var r=!0,n=!1,o=void 0;try{for(var A,s=function(){var e=A.value;return t.faces.some((function(t){return a(e,t)}))?"continue":(console.error("Different in face."),{v:!1})},u=e.faces[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=s();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return e.getEdges().size===t.getEdges().size||(console.error("Different in shell's edge number."),!1)}function a(e,t){if(e.getLoops().length!==t.getLoops().length)return!1;if(!s(e.outerLoop,t.outerLoop))return!1;if(e.innerLoops.length!==t.innerLoops.length)return!1;var r=!0,n=!1,o=void 0;try{for(var A,a=function(){var e=A.value;return t.innerLoops.some((function(t){return s(e,t)}))?"continue":{v:!1}},u=e.innerLoops[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=a();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return!0}function s(e,t){if(e.halfEdges.length!==t.halfEdges.length)return!1;var r=0,n=0,i=-1;for(r=0;r<e.halfEdges.length;r++){var A=e.halfEdges[r].getBoundedCurve();if(A){if(-1===i)for(n=0;n<t.halfEdges.length;n++){var a=t.halfEdges[n].getBoundedCurve();if(a&&(o.CurveOverlap.areCurvesTotallyOverlap(A,a)&&A.startPoint.isEqual(a.startPoint))){i=n;break}}if(-1===i)return!1;var s=t.halfEdges[(i+r)%t.halfEdges.length].getBoundedCurve();if(!A.isEqual(s)&&!o.CurveOverlap.areCurvesTotallyOverlap(A,s))return console.error("Different in loop."),!1}}return!0}t.diffShells=function(e,t){if(e.length!==t.length)return console.error("Shells num not equals "+e.length+" : "+t.length),!1;for(var r=new Set,n=0,i=e.length;n<i;n++){for(var o=e[n],a=!1,s=0,u=t.length;s<u;s++){if(!r.has(s))if(A(o,t[s])){r.add(s),a=!0;break}}if(!a)return!1}return!0},t.diffShell=A,t.diffFace=a,t.diffLoop=s,t.diffHalfEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!(!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||!r.startPoint.isEqual(n.startPoint))||(console.error("Different in half edge."),!1)},t.diffEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||(console.error("Different in edge."),!1)},t.diffVertex=function(e,t){var r=e.point,n=t.point;return!!r.isEqual(n)||(console.error("Different in vertex"),!1)}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2067),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"toKey",value:function(){return i.idToKey(this.id)}},{key:"equals",value:function(e){return this.id.equals(e.id)}}],[{key:"fromKey",value:function(t){var r=new e;return r.id=i.idFromKey(t),r}},{key:"extractShellKey",value:function(e){return i.extractShellKey(e)}}]),e}();t.MIxName=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(236);t.idToKey=function(e){if(e.type===n.TopoObjectType.kShell)return e.uuid;if(e.type===n.TopoObjectType.kFace){var t=e;return t.shellId.uuid+":"+t.index}if(e.type===n.TopoObjectType.kEdge){var r=e,i="",o="",A=!0,a=!1,s=void 0;try{for(var u,c=r.halfEdgeIds[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){var l=u.value;null!=l.faceId?(i=l.faceId.shellId.uuid+":",o=o+"("+l.faceId.index+":"+l.index+")"):o=o+"(-1:"+l.index+")"}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return i+o}if(e.type===n.TopoObjectType.kHalfEdge){var g=e;return g.faceId.shellId.uuid+":"+g.faceId.index+":"+g.index}return""},t.idFromKey=function(e){var t=void 0,r=e.split(":");if(e.endsWith(")")){var i=r[0],o=new n.ShellId(i),A=e.split("("),a=[],s=!0,u=!1,c=void 0;try{for(var l,g=A[Symbol.iterator]();!(s=(l=g.next()).done);s=!0){var f=l.value.replace(")","").split(":");if(""!==f[1]){var h=new n.FaceId(o,parseInt(f[0],void 0)),p=new n.HalfEdgeId(h,parseInt(f[1],void 0));a.push(p)}}}catch(e){u=!0,c=e}finally{try{!s&&g.return&&g.return()}finally{if(u)throw c}}t=new n.EdgeId(a)}else if(1===r.length)t=new n.ShellId(r[0]);else if(2===r.length){var d=parseInt(r[1],void 0);t=new n.FaceId(new n.ShellId(r[0]),d)}else{var I=parseInt(r[1],void 0),y=parseInt(r[2],void 0);t=new n.HalfEdgeId(new n.FaceId(new n.ShellId(r[0]),I),y)}return t},t.extractShellKey=function(e){var t=e.split(":");if(t.length>0)return t[0]}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2070))&&A.__esModule?A:{default:A},s=r(1119),u=r(1120),c=r(2071);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2073);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(660));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2072)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(359),a=r(2075),s=r(2076),u=r(2080),c=r(2082);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||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 g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(701)),o=h(r(208)),A=r(1121),a=r(951),s=r(2),u=h(r(125)),c=r(718),l=r(717),g=r(1122),f=r(359);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||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 y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2077)),o=r(359);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||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 s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2078),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2079)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(835)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(359),s=r(2081);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(359);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(359),o=r(2083);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2085);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2090);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1121),a=p(r(5)),s=p(r(125)),u=r(2086),c=r(1123),l=r(718),g=r(717),f=r(1122),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(420)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(1089),A=r(519),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1123),u=r(718),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return $m})),r.d(t,"IntersectedService",(function(){return xQ})),r.d(t,"CustomModelService",(function(){return jQ})),r.d(t,"FittingHintService",(function(){return zQ})),r.d(t,"FittingModelService",(function(){return sb})),r.d(t,"ECameraMode",(function(){return Ab})),r.d(t,"ECameraMoveDirection",(function(){return ab})),r.d(t,"ModelCameraService",(function(){return db})),r.d(t,"ModelHintService",(function(){return Qb})),r.d(t,"ModelService",(function(){return Nb})),r.d(t,"ESelectedType",(function(){return Kb})),r.d(t,"ESetSelectType",(function(){return qb})),r.d(t,"ModelViewerSelectionService",(function(){return zb})),r.d(t,"ModelViewerSelectionV2Service",(function(){return A_})),r.d(t,"ModelViewerService",(function(){return d_})),r.d(t,"PlankPathService",(function(){return N_})),r.d(t,"ModelValidateService",(function(){return q_})),r.d(t,"SceneService",(function(){return tS})),r.d(t,"Application",(function(){return zS})),r.d(t,"EIntersectedCreatedType",(function(){return h})),r.d(t,"EIntersectedType",(function(){return g})),r.d(t,"EFittingType",(function(){return l})),r.d(t,"EIntersectedInfoType",(function(){return f})),r.d(t,"ELanguage",(function(){return Ue})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Ke})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return qe})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return Je})),r.d(t,"EPointType",(function(){return E})),r.d(t,"ELineType",(function(){return B})),r.d(t,"EDesignMode",(function(){return Ve})),r.d(t,"ETriggerType",(function(){return He})),r.d(t,"EModelType",(function(){return Ye})),r.d(t,"KEYBOARD_KEY",(function(){return Xe})),r.d(t,"EIntersectModelType",(function(){return d})),r.d(t,"EProductDirection",(function(){return I})),r.d(t,"EPlankPathType",(function(){return We})),r.d(t,"EElementType",(function(){return ze})),r.d(t,"EToolType",(function(){return kf}));r(734),r(1346);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
66
|
+
*/A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function O(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):O(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function N(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(N.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function k(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){O(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return N.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(k(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},H=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},Y=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(Y(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!H(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;Y(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(933)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(291),o=r(1863),A=r(658),a=r(2),s=r(1002);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1864),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1035),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(990)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1036)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(229)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1871)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1011)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(1873)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(229),i=r(415),o=r(183),A=r(204)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(412),i=r(669),o=r(971)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1037)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(512),o=r(1882),A=r(691),a=r(692),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(1880)),o=r(513),A=n(r(1881)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1038),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(513),a=r(1038),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(512),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(1884),i=r(415),o=r(1888),A=r(499)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(1885)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1886),i=r(1887),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(232)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1039),a=r(1043),s=r(232),u=r(492),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(510),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1041),A=r(689),a=r(671),s=r(676),u=r(274),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(344),i=r(4),o=r(228),A=r(1037),a=r(682),s=r(11),u=r(232),c=r(1044),l=r(1045);r(1895);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(1897),i=r(1904)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1046),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1899);t.toPopBufferComponent=n.toPopBufferComponent,t.PopBufferComponent=n.PopBufferComponent;var i=r(1047);t.toPopBufferMtl=i.toPopBufferMtl,t.PopBufferMtl=i.PopBufferMtl},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44),i=r(1047),o=function(){function e(){this.doubleSided=!1}return e.prototype.getId=function(){return this.id},e.prototype.setId=function(e){return this.id=e,this},e.prototype.getMesh=function(){return this.mesh},e.prototype.setMesh=function(e){return this.mesh=e,this},e.prototype.getTransform=function(){return this.transform},e.prototype.setTransform=function(e){return this.transform=e,this},e.prototype.getMtl=function(){return this.mtl},e.prototype.setMtl=function(e){return this.mtl=e,this},e.prototype.getDoubleSided=function(){return this.doubleSided},e.prototype.setDoubleSided=function(e){return void 0===e&&(e=!1),this.doubleSided=e,this},e}();t.PopBufferComponent=o,t.toPopBufferComponent=function(e){var t=new o;return t.setId(e.id).setMesh(e.mesh).setDoubleSided(e.doubleSided),e.transform&&t.setTransform((new n.default).fromString(e.transform)),t.setMtl(e.mtl.filter((function(e){return!!e})).map(i.toPopBufferMtl)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(6),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1902),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(227),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1046),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1058);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1908);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1909);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1058),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(323);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1911);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1053);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(694);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1054);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1055);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(693);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1056);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1057);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(323),o=r(694);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1913);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1914);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1059);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1060);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1915);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1060),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1061);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1917);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1062);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1063);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1918);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(832),_Collector=__webpack_require__(419),_IdleWorker=__webpack_require__(1061),_PerfLog=__webpack_require__(1062),_TimeLog=__webpack_require__(1063),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=function(){function e(){var e;this.min=0,this.max=4294967295,this.existedIdMap=((e={})[this.min]=!0,e[this.max]=!0,e)}return e.prototype.onIdOccupied=function(e){this.existedIdMap[e]=!0;var t=this.min,r=this.max;e>=t&&e<=r&&(e-t>r-e?this.max=e:this.min=e)},e.prototype.findNewIdRange=function(){for(var e=Object.keys(this.existedIdMap).map((function(e){return Number(e)})).filter((function(e){return e>=0&&e<=4294967295})).sort((function(e,t){return e-t})),t=0,r=0,n=0,i=1;i<e.length;i++){var o=e[i-1],A=e[i];A-o>t&&(t=A-o,r=o,n=A)}if(r+1>=n)throw"No available id for ObjectIndex";this.min=r,this.max=n},e.prototype.getId=function(){var e=this.min+1;return e>=this.max&&(this.findNewIdRange(),e=this.min+1),this.onIdOccupied(e),e.toString()},e.prototype.markId=function(e){var t=Number(e);n.isInteger(t)&&this.onIdOccupied(t)},e}();t.UniqueIndexGenerator=i,t.uniqueIndexGenerator=new i;var o=function(){function e(){}return Object.defineProperty(e.prototype,"id",{get:function(){return this.getId()},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return void 0===this._id&&(this._id=t.uniqueIndexGenerator.getId()),this._id},e.prototype.setId=function(e){return this._id=e,t.uniqueIndexGenerator.markId(e),this},e}();t.default=o},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=s(t);if(r){var i=s(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return a(this,e)});function u(){var e;return i(this,u),(e=n.apply(this,arguments)).$version=0,e}return function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);Object.defineProperty(e,"prototype",{writable:!1})}(u,[{key:"compareVersion",value:function(e){return this.$version===e.getVersion(this.getId())}},{key:"exportVersion",value:function(e){e.setVersion(this.getId(),this.revisionId,this.$version,this.getVersionType())}},{key:"hasVersion",value:function(e){return e.has(this.getId())}},{key:"getVersionType",value:function(){return this.constructor}},{key:"getVersion",value:function(){return this.$version}}]),u}(e)}},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Axis3=t.Axis2=t.ALL_AXIS3=t.ALL_AXIS2=void 0,t.Axis2=n,function(e){e[e.X=0]="X",e[e.Y=1]="Y"}(n||(t.Axis2=n={})),t.Axis3=i,function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(t.Axis3=i={}));var o=[i.X,i.Y,i.Z];t.ALL_AXIS3=o;var A=[n.X,n.Y];t.ALL_AXIS2=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e.PROFILE_ID="vProfileId",e.OFFSET="offset",e.HANDLE_POSITION="handlePosition",e.HANDLE_ROTATION="handleRotate",e.OPEN_DIRECTION="openDirection",e.COVER_TYPE="coverType",e.LEFT_COVER="lCover",e.RIGHT_COVER="rCover",e.UP_COVER="uCover",e.DOWN_COVER="dCover",e.LEFT_COVER_TYPE="lCoverType",e.RIGHT_COVER_TYPE="rCoverType",e.UP_COVER_TYPE="uCoverType",e.DOWN_COVER_TYPE="dCoverType",e.FRONT_EXTENSION="QY",e.BACK_EXTENSION="HY",e.LEFT_SLOT_DEPTH="leftSlotDepth",e.RIGHT_SLOT_DEPTH="rightSlotDepth",e.TOP_SLOT_DEPTH="topSlotDepth",e.BOTTOM_SLOT_DEPTH="bottomSlotDepth",e.HAS_LEFT_SLOT="hasLeftSlot",e.HAS_RIGHT_SLOT="hasRightSlot",e.HAS_TOP_SLOT="hasTopSlot",e.HAS_BOTTOM_SLOT="hasBottomSlot",e.INDENT="indent",e.CRACK="crack",e.LEFT_CRACK="lCrack",e.RIGHT_CRACK="rCrack",e.UP_CRACK="uCrack",e.DOWN_CRACK="dCrack",e.LOCATION="location",e.DOOR_TYPE="doorType",e.JUNCTION="junction",e.HAS_SLOT="hasSlot",e.SLOT_DEPTH="slotDepth",e.FAN_NUMBER="num",e.DOOR_WIDTH="doorWidth",e.CROSS_TYPE="crossTypeId",e.FIRST_DOOR_TYPE="firstDoorTypeId",e.ANGLE_DEGREE="angleDegree",e.TEXTURE_ANGLE_DEGREE="textureAngleDegree",e.TEXTURE_PAVING_STYLE="texturePavingStyle",e.SECTION_TEXTURE_ANGLE_DEGREE="sectionTextureAngleDegree",e.SPLIT_DOOR_POSITIONS="positions",e.MATERIAL_ID="materialId",e.WINDOW_BGID="windowBgId",e.TOP_RAIL_BGID="topRailBgId",e.BOTTOM_RAIL_BGID="bottomRailBgId",e.LEFT_RAIL_BGID="leftRailBgId",e.RIGHT_RAIL_BGID="rightRailBgId",e.FIRST_WINDOW_POSITION="firstWindowPosition",e.SINGLE_WINDOW_PLACE="singleWindowPlace",e.SLIDING_WINDOW_TYPE="slidingWindowType",e.CELL_POSITION="cellPosition",e.GAUZE_BGID="gauzeBgId",e.UNITED_MATERIAL="unitedMaterialBrandGoodId",e.SLIDING_DOOR_SERIES="slidingDoorSeries",e.FIT="fit",e.PLACE_TYPE="placeType",e.MOLDING_PANEL_SIZE="size",e.MOLDING_TZ="TZ",e.MOLDING_TZT="TZT",e.FAUCET_CONNECTOR_PATH="faucetConnectorPath",e.FAUCET_CONNECTOR_OTHER_PATH="faucetConnectorOtherPath",e.MOLDING_LX="LX",e.MOLDING_LY="LY",e.MOLDING_LZ="LZ",e.COUNTERTOP_HOLES="countertopHoles",e.MOLDING_TYPE="moldingType",e.MOLDING_FRONT_PROFILE_ID="frontprofiledataid",e.MOLDING_BACK_PROFILE_ID="backprofiledataid",e.MOLDING_WRAP_EDGE="wrapEdge",e.MOLDING_PROFILE_ID="profiledataid",e.MOLDING_HOLE_PROFILE_ID="holeprofiledataid",e.MOLDING_HOLE_PATH_PROFILE_ID="profiledataid",e.MOLDING_EXTRUSION_HEIGHT="extrusionHeight",e.MOLDING_UNDERBOARDING_HEIGHT="underboardingHeight",e.MOLDING_FRONT_PROFILE_HEIGHT="frontProfileScaleHeight",e.MOLDING_BACK_PROFILE_HEIGHT="backProfileScaleHeight",e.MOLDING_PROFILE_HEIGHT="profileScaleHeight",e.PROCESS_RULE_ID="processRuleId",e.HEAD_INDENT="headIndent",e.TAIL_INDENT="tailIndent",e.HEAD_INSTALL_ANGLE="headInstallAngle",e.TAIL_INSTALL_ANGLE="tailInstallAngle",e.SPEC_FRONT_WATER_RETAINER="specFrontWaterRetainer",e.SKETCH_BACK_WATER_RETAINER="sketchBWRPaths",e.MOLDING_PROFILE_FRONT_OFFSET="profileFrontOffset",e.MOLDING_PROFILE_BACK_OFFSET="profileBackOffset",e.MOLDING_PROFILE_LEFT_OFFSET="profileLeftOffset",e.MOLDING_PROFILE_RIGHT_OFFSET="profileRightOffset",e.SIZE_CONTAIN_WATER_RETAINER="sizeContainWaterRetainer",e.HEIGHT_OFFSET="heightOffset",e.INSTALL_MODE="installMode",e.VERTICAL_INSTALL_MODE="verticalMoldingInstallMode",e.SIDE_SKIRT_INPUTS="sideSkirtInputs",e.MOLDING_HEIGHT="moldingHeight",e.MOLDING_HEIGHT_ZERO="moldingHeightZero",e.MOLDING_BASE_TYPE="moldingBaseType",e.MODE="mode",e.ALIGN_MODE="alignMode",e.MOLDING_MODE="mode",e.SKETCH_PATH="paramCornerPath",e.PATH="path",e.COUNT="count",e.ORIGINAL_MOLDING_AREA="originalMoldingArea",e.ORIGINAL_BOTTOM_MOLDING_AREAS="originalBottomMoldingAreas",e.MOLDING_AREA="moldingArea",e.MOLDING_PATH="moldingPath",e.HOLE_RELATIONS="holeRelations",e.CUT_POINTS="cutPoints",e.CORNER_CUT_POINTS="cornerCutPoints",e.CUT_MOLDING_PATH="cutMoldingPath",e.MOLDING_VERSION="moldingVersion",e.DIRECTION_X="directionx",e.NORMAL="normal",e.START="start",e.LEFT_INDENTATION_LENGTH="leftIndentationLength",e.RIGHT_INDENTATION_LENGTH="rightIndentationLength",e.CONNECTION_LINES="connectionLines",e.CONNECT_MODELS="connectedParamModels",e.OVER_SIDE_LEFT="overSideLeft",e.OVER_SIDE_RIGHT="overSideRight",e.OVER_SIDE_BOTTOM="overSideBottom",e.OVER_SIDE_TOP="overSideTop",e.OVER_SIDE_INSET="overSideInset",e.TRIM_LEFT="trimLeft",e.TRIM_RIGHT="trimRight",e.TRIM_BOTTOM="trimBottom",e.TRIM_TOP="trimTop",e.WIDTH="W",e.DEPTH="D",e.HEIGHT="H",e.OFF_GROUND="offGround",e.MATERIAL_BRAND_GOOD_ID="materialBrandGoodId",e.MATERIAL_BRAND_GOOD_ID_B="materialBrandGoodIdB",e.MATERIAL_BRAND_GOOD_ID_GLASS="materialBrandGoodIdGlass",e.MATERIAL_BRAND_GOOD_ID_BOTTOM_GLASS="materialBrandGoodIdBottomGlass",e.MATERIAL_BRAND_GOOD_ID_GAUZE="materialBrandGoodIdGauze",e.MATERIAL_BRAND_GOOD_ID_ALBAR="materialBrandGoodIdAlBar",e.MATERIAL_BRAND_GOOD_ID_LINE="materialBrandGoodIdLine",e.LV_LOCK_MATERIAL="SJCZ",e.LV_HANDEL_MATERIAL="CZ",e.FIXED_GLASS_CRAFTS="crafts",e.DW_PRODUCE="produce",e.DW_FITTING="dwFitting",e.SIMPLE_CONNECTORS="simpleConnectors",e.ROTATE_Z="rotateZ",e.FAUCET_POSITION="position",e.FAUCET_ROTATE="rotate",e.TEXTURE_SIZE="textureSize",e.TEXTURE_OFFSET="textureOffset",e.WIDTH_1="W1",e.WIDTH_2="W2",e.WIDTH_3="W3",e.WALL_THICKNESS_1="wallThickness1",e.WALL_THICKNESS_2="wallThickness2",e.WALL_THICKNESS_3="wallThickness3",e.OUTSIDE_1="outside1",e.OUTSIDE_2="outside2",e.OUTSIDE_3="outside3",e.WINDOW_OPEN_DIRECTION="windowOpenDirection",e.DOOR_OPEN_DIRECTION="doorOpenDirection",e.PUSH_OR_PULL="pushOrPull",e.INSTALL_POSITION="installPosition",e.INSTALL_POSITION_OFFSET="installPositionOffset",e.INSTALL_SURFACE="installSurface",e.INSTALL_ROTATE="installRotate",e.INSTALL_DEPTH="depthOffset",e.MARGIN="margin",e.RELATIVE_POSITION="relativePosition",e.OUT_POLYGONS="outpolygons",e.PLANK_PATH="plankPath",e.BRUSH_MATERIAL_BGID="brushMaterialBgId",e.BOTTOM_BRUSH_MATERIAL_BGID="bottomBrushMaterialBgId",e.MOLDING_EXPORT="export",e.JOINT_TYPE="jointtype",e.START_ROTATE="startRotate",e.START_ROTATE_AXIS="startRotateAxis",e.END_ROTATE="endRotate",e.END_ROTATE_AXIS="endRotateAxis",e.BORDER_ALIGNMENT="borderAlignment",e.SERIES="series",e.HOLE="hole",e.LINKED_HOLE="linkedHole",e.REGION3D="region3d",e.SEGMENTATION_DATA="segmentationData",e.BKX1="BKX1",e.BKX2="BKX2",e.BKX3="BKX3",e.BKY1="BKY1",e.BKY2="BKY2",e.BKY3="BKY3",e.BKY4="BKY4",e.BKNZHX="BKNZHX",e.BKNZHY="BKNZHY",e.BKWZHX="BKWZHX",e.BKWZHY="BKWZHY",e.BKBSX="BKBSX",e.BKBSY="BKBSY",e.BKSSX="BKSSX",e.BKSSY="BKSSY",e.HTX1="HTX1",e.HTX2="HTX2",e.STX1="STX1",e.STX2="STX2",e.BSX1="BSX1",e.BSX2="BSX2",e.BSY1="BSY1",e.BSY2="BSY2",e.SSX1="SSX1",e.SSX2="SSX2",e.SSY1="SSY1",e.SSY2="SSY2",e.ZHX1="ZHX1",e.ZHX2="ZHX2",e.ZHY1="ZHY1",e.ZHY2="ZHY2",e.ZHY3="ZHY3",e.ZHBSX="ZHBSX",e.ZHBSY="ZHBSY",e.ZHSSX="ZHSSX",e.ZHSSY="ZHSSY",e.ZHFHX="ZHFHX",e.ZHFHY="ZHFHY",e.YTX1="YTX1",e.YTX2="YTX2",e.YTY1="ZHY1",e.PZHX="PZHX",e.PZHY="PZHY",e.BLADES_POSITION="bladesPosition",e.BSNWKQ="BSNWKQ",e.BSKCFX="BSKCFX",e.SSNWKQ="SSNWKQ",e.SSKCFX="SSKCFX",e.DSGX="DSGX",e.DSGY="DSGY",e.ESGX1="ESGX1",e.ESGX2="ESGX2",e.ESGY1="ESGY1",e.ESGY2="ESGY2",e.SSGX1="SSGX1",e.SSGX2="SSGX2",e.SSGX3="SSGX3",e.SSGY1="SSGY1",e.SSGY2="SSGY2",e.SSGY3="SSGY3",e.DXGX="DXGX",e.EXGX1="EXGX1",e.EXGX2="EXGX2",e.SXGX1="SXGX1",e.SXGX2="SXGX2",e.SXGX3="SXGX3",e.GG="GG",e.TXX="TXX",e.TXY="TXY",e.TXY2="TXY2",e.SWDJ="SWDJ",e.DJGD="DJGD",e.ZL_TCK_X="ZL_TCK_X",e.ZL_TCK_Y="ZL_TCK_Y",e.FL_TCK_X="FL_TCK_X",e.TCK_TCBSK_X="TCK_TCBSK_X",e.TCK_TCBSK_Y="TCK_TCBSK_Y",e.TCBSK_BL_X="TCBSK_BL_X",e.TCBSK_BL_Y="TCBSK_BL_Y",e.HEIGHT_1="H1",e.HEIGHT_2="H2",e.CTCS_QD="CTCS_QD",e.CTCS_MBTS="CTCS_MBTS",e.DESIGN="design",e.WINDOW_RATIO="windowRatio",e.CRACK_WIDTH="crackWidth",e.WINDOW_FRAME_RAIL_BGID="windowFrameRailBgId",e.GAUZE_FRAME_RAIL_BGID="gauzeFrameRailBgId",e.TOP_PROFILE_BGID="topProfileBgId",e.BOTTOM_PROFILE_BGID="bottomProfileBgId",e.LEFT_PROFILE_BGID="leftProfileBgId",e.RIGHT_PROFILE_BGID="rightProfileBgId",e.WINDOW_PUSH_OR_PULL="windowPushOrPull",e.GAUZE_PUSH_OR_PULL="gauzePushOrPull",e.BEND_PROPERTIES="bendProperties",e.MOVABLE_FAN_WIDTH="movableFanWidth",e.IMPORT_BRAND_GOOD_ID="importBrandGoodId",e.PLATE_SPECIFIC="plateSpecific",e.LINE_PARAMS="lineParams",e.WALLPAVING_DIRECTION="wallPavingDirection",e.WALL_ID="wallId",e.QZJX="QZJX",e.QYJX="QYJX",e.QTJX="QTJX",e.QDJX="QDJX",e.HZJX="HZJX",e.HYJX="HYJX",e.HTJX="HTJX",e.HDJX="HDJX",e.HOLE_RELATION="holeRelation",e.QS="QS",e.HS="HS",e.LEFT_WIDTH="leftWidth",e.RIGHT_WIDTH="rightWidth",e.QBH="QBH",e.QBK="QBK",e.QCZJ="QCZJ",e.YCZJ="YCZJ",e.HCZJ="HCZJ",e.ZCZJ="ZCZJ",e.QGTCS="QGTCS",e.CLIENT_INFO="clientInfo",e.CUTTING_TYPE="cuttingType",e.CUTTING_INFO="cuttingInfo",e.BJHD="BJHD",e.NSYW="NSYW",e.EMBED="embed",e.QJJ="wallCornerAngle",e.WRAPPER_TYPE="wrapperType",e.AZ="installationMethod",e.COVER="cover",e.LIGHT_TYPE="lightType",e.LIGHT_POSITION="lightPosition",e.LIGHT_WIDTH="lightWidth",e.NON_HORIZONAL_COUNTERTOP_NEW_DOUBLE_SIDE_BLOCK_TYPE="verticalCountertopBlockType",e.NON_HORIZONAL_COUNTERTOP_DOUBLE_SIDE_WIDTH="bothSidesVisibleWidth",e.NON_HORIZONAL_COUNTERTOP_TYPE="verticalCountertopType",e.IS_STRETCH="isStretch",e.MATERIAL_PART="paramMeshInstance",e.COUNTERTOP_BUCKLE="buckleBlockInput",e.FASTENER_INPUT="fastenerInput"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AssemblyType=void 0,t.AssemblyType=n,function(e){e[e.Cabinet=0]="Cabinet",e[e.Wardrobe=1]="Wardrobe"}(n||(t.AssemblyType=n={}))},function(e,t,r){"use strict";var n;function i(e,t){var r=n;delete r[r[e]],r[e]=t,r[t]=e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.setParamAssemblyType=function(e){i("PARAM_ASSEMBLY",e)},t.setParamEntityType=function(e){i("PARAM_ENTITY",e)},t.setParamFurnitureType=function(e){i("PARAM_FURNITURE",e)},t.setParamVirtualType=function(e){i("PARAM_VIRTUAL",e)},function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY"}(n||(n={}));var o=n;t.default=o},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=-1]="DEFAULT",e[e.VALUE=0]="VALUE",e[e.FORMULA=1]="FORMULA"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DOOR_HOLE=0]="DOOR_HOLE",e[e.FACE_PARAMMODEL=1]="FACE_PARAMMODEL",e[e.DIVISION_PARAMMODEL=2]="DIVISION_PARAMMODEL",e[e.NEW_DOOR_HOLE=3]="NEW_DOOR_HOLE",e[e.DRAWING_HOLE=5]="DRAWING_HOLE"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.FRONT_END=0]="FRONT_END",e[e.EDITOR=1]="EDITOR"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.UNDEFIND=-1]="UNDEFIND",e[e.SPACE=0]="SPACE",e[e.CENTER=1]="CENTER",e[e.LEFT_FRONT_DOWN=2]="LEFT_FRONT_DOWN",e[e.LEFT_BACK_DOWN=3]="LEFT_BACK_DOWN"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LENGTH=1]="LENGTH",e[e.AREA=2]="AREA",e[e.NUMBER=3]="NUMBER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Face=t.ALL_AROUND_FACE3=t.ALL_AROUND_FACE2=void 0,t.Face=n,function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(n||(t.Face=n={}));var i=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM,n.FRONT,n.BACK];t.ALL_AROUND_FACE3=i;var o=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM];t.ALL_AROUND_FACE2=o},function(e,t,r){"use strict";var n,i,o,A,a,s,u,c,l,g,f,h,p;Object.defineProperty(t,"__esModule",{value:!0}),t.SwingOpenDirection=t.PushDirecton=t.PlaceType=t.OpenDirection=t.LocationType=t.InstallType=t.InstallSurfaceType=t.HandrailInstallType=t.GridOpenDirection=t.DoorType=t.DoorOpenDirection=t.CoverType=t.BorderAlignment=void 0,t.getEnumIndex=function(e){return Object.keys(e).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}))},t.getEnumNames=function(e){return Object.keys(e).filter((function(e){return isNaN(parseInt(e,10))}))},t.InstallSurfaceType=n,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(n||(t.InstallSurfaceType=n={})),t.DoorOpenDirection=i,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(i||(t.DoorOpenDirection=i={})),t.CoverType=o,function(e){e[e.INSIDE=0]="INSIDE",e[e.HALF_COVER=1]="HALF_COVER",e[e.FULL_COVER=2]="FULL_COVER"}(o||(t.CoverType=o={})),t.SwingOpenDirection=A,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.INCLOSEIN=4]="INCLOSEIN",e[e.NONE=5]="NONE",e[e.LEFT_TOP=6]="LEFT_TOP",e[e.LEFT_BOTTOM=7]="LEFT_BOTTOM",e[e.RIGHT_TOP=8]="RIGHT_TOP",e[e.RIGHT_BOTTOM=9]="RIGHT_BOTTOM"}(A||(t.SwingOpenDirection=A={})),t.GridOpenDirection=a,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.NONE=2]="NONE"}(a||(t.GridOpenDirection=a={})),t.PushDirecton=s,function(e){e[e.PUSH=0]="PUSH",e[e.PULL=1]="PULL"}(s||(t.PushDirecton=s={})),t.DoorType=u,function(e){e[e.DOOR=0]="DOOR",e[e.DRAWER_PANEL=1]="DRAWER_PANEL"}(u||(t.DoorType=u={})),t.OpenDirection=c,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(c||(t.OpenDirection=c={})),t.LocationType=l,function(e){e[e.ABOVE_BOARD=0]="ABOVE_BOARD",e[e.BELOW_BOARD=1]="BELOW_BOARD",e[e.HANGING=2]="HANGING",e[e.UPON_FLOOR=3]="UPON_FLOOR",e[e.UPON_MODEL=4]="UPON_MODEL"}(l||(t.LocationType=l={})),t.PlaceType=g,function(e){e[e.LOCATION=0]="LOCATION",e[e.FIT=1]="FIT"}(g||(t.PlaceType=g={})),t.BorderAlignment=f,function(e){e[e.OUTER=1]="OUTER",e[e.CENTER=2]="CENTER",e[e.INNER=3]="INNER",e[e.OUTERHANG=4]="OUTERHANG",e[e.INNERHANG=5]="INNERHANG"}(f||(t.BorderAlignment=f={})),t.InstallType=h,function(e){e[e.OUTER_HANG=0]="OUTER_HANG",e[e.INNER_HANG=1]="INNER_HANG"}(h||(t.InstallType=h={})),t.HandrailInstallType=p,function(e){e[e.INNER_FRAME=0]="INNER_FRAME",e[e.OUTER_FRAME=1]="OUTER_FRAME"}(p||(t.HandrailInstallType=p={}))},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IntersectType=t.IntersectArea=void 0,t.IntersectArea=n,function(e){e.BOX="box",e.MESH="mesh"}(n||(t.IntersectArea=n={})),t.IntersectType=i,function(e){e.STATIC="static",e.DYNAMIC="dynamic"}(i||(t.IntersectType=i={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EVersionType=void 0,t.EVersionType=n,function(e){e.Root="Root",e.Child="Child",e.Accessory="Accessory",e.Template="Template",e.Ref="Ref",e.Custom="Custom",e.Design="Design"}(n||(t.EVersionType=n={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOLERANCE=t.SIZE_TOLERANCE=t.SIN_THETA_ZERO_TOLERANCE=t.RADIANS_TOLERANCE=t.NUMBER_TOLERANCE=t.DISTANCE_TOLERANCE=t.DEGREES_TOLERANCE=void 0;var n=r(3);t.NUMBER_TOLERANCE=1e-6;t.SIZE_TOLERANCE=.1;t.DISTANCE_TOLERANCE=1;t.DEGREES_TOLERANCE=1;var i=Math.PI/180;t.RADIANS_TOLERANCE=i;var o=Math.sin(i);t.SIN_THETA_ZERO_TOLERANCE=o;var A=new n.Tolerance.Tolerance(Math.cos(i),1,1e-6);t.TOLERANCE=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalModel=void 0;var n=r(3),i=r(322),o=v(r(188)),A=v(r(141)),a=v(r(361)),s=v(r(68)),u=v(r(98)),c=v(r(207)),l=v(r(530)),g=v(r(44)),f=v(r(113)),h=v(r(16)),p=v(r(5)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var r=B(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(n,o,A):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(99)),I=r(349),y=r(698),C=r(1071),E=r(1939);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(B=function(e){return e?r:t})(e)}function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==w(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===w(o)?o:String(o)),n)}var i,o}function Q(e,t){return(Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=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(e){return!1}}();return function(){var r,n=S(e);if(t){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var D,R,M,x,P,T,F,O,L,N,k,G=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},U=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q(e,t)}(A,e);var t,r,i,o=b(A);function A(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(e=o.call(this)).position=new p.default(0,0,0),e.rotation=new p.default(0,0,0),e.scale=new p.default(1,1,1),e.size=new p.default(1,1,1),e.translation=new p.default,e.center=new p.default,e}return t=A,(r=[{key:"getBoundingBox2",value:function(){return this.getBox2().getBoundingBox()}},{key:"getBoundingBox3",value:function(){return this.getBox3().getBoundingBox()}},{key:"getPolygon",value:function(){return this.getBox2().getPolygon()}},{key:"getBox2",value:function(){return this.box2||(this.box2=new a.default(new h.default(this.getScaledSize()),new h.default(this.getPosition()),this.getRotation().z)),this.box2}},{key:"getBox3",value:function(){return this.box3||(this.box3=new s.default(this.getScaledSize(),this.getPosition(),this.getRotation())),this.box3}},{key:"getMatrix4",value:function(){return this.matrix4||(this.matrix4=(new g.default).compose(this.getPosition(),(new u.default).setFromVector3(this.getRotation()),this.getScale())),this.matrix4}},{key:"setMatrix4",value:function(e){var t=new p.default,r=new u.default(0,0,0),n=new p.default;e.decompose(t,r,n),this.position=t,this.rotation=(new p.default).setXYZ(r),this.scale=n}},{key:"getConcatenatedMatrix",value:function(){return this.getMatrix4()}},{key:"getConcatenatedBox3",value:function(){return this.getBox3()}},{key:"getMatrix3",value:function(){return this.matrix3||(this.matrix3=(new l.default).compose(new h.default(this.getPosition()),this.getRotation().z,new h.default(this.getScale()))),this.matrix3}},{key:"getTop",value:function(){return this.position.z+this.getScaledSize().z/2}},{key:"getBottom",value:function(){return this.position.z-this.getScaledSize().z/2}},{key:"getHeightRange",value:function(){return new c.default(this.getBottom(),this.getTop())}},{key:"getScaledSize",value:function(){return p.default.mul(this.getSize(),this.getScale())}},{key:"getScale",value:function(){return this.scale}},{key:"setScale",value:function(e){if((0,C.equalsNumber3)(this.scale,e))return this;var t=Object.assign(Object.assign({},this.scale),e),r=(0,C.checkNotZero)(t.x),n=(0,C.checkNotZero)(t.y),i=(0,C.checkNotZero)(t.z),o=(0,C.hackScaleValue)(r),A=(0,C.hackScaleValue)(n),a=(0,C.hackScaleValue)(i);return this.scale=new p.default(o,A,a),o===r&&A===n&&a===i||I.LOGGER.logError(new Error("illegal setScale ".concat(this.getId(),",error val is x:").concat(r,",y:").concat(n,",z:").concat(i))),this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){if((0,C.equalsNumber3)(this.size,e))return this;var t=Object.assign(Object.assign({},this.size),e),r=t.x,n=t.y,i=t.z;return this.size=new p.default((0,C.hackSizeValue)(r),(0,C.hackSizeValue)(n),(0,C.hackSizeValue)(i)),this}},{key:"getRotation",value:function(){return this.rotation}},{key:"setRotation",value:function(e){return(0,C.equalsNumber3)(this.rotation,e)||(this.rotation=new p.default(Object.assign(Object.assign({},this.rotation),e))),this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){if((0,C.equalsNumber3)(this.position,e))return this;var t=e.x,r=e.y,n=e.z;return void 0!==t&&(0,y.checkNumberAndLog)(t,"setPositionX"),void 0!==r&&(0,y.checkNumberAndLog)(r,"setPositionY"),void 0!==n&&(0,y.checkNumberAndLog)(n,"setPositionZ"),this.position=new p.default(Object.assign(Object.assign({},this.position),e)),this}},{key:"getTranslation",value:function(){return this.translation}},{key:"setTranslation",value:function(e){return this.translation=e,this}},{key:"getCenter",value:function(){return this.center}},{key:"setCenter",value:function(e){return this.center=e,this}},{key:"isSizeNaN",value:function(){return isNaN(this.size.x)||isNaN(this.size.y)||isNaN(this.size.z)}},{key:"isScaled",value:function(){return!this.scale.nearEquals(p.default.ONE)}},{key:"localToGlobal",value:function(e){var t=this.getConcatenatedMatrix(),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal",value:function(e){var t=(new g.default).getInverse(this.getConcatenatedMatrix()),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.globalToLocal(r);return new n.Point2d(i.x,i.y)}},{key:"localToGlobal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.localToGlobal(r);return new n.Point2d(i.x,i.y)}},{key:"afterSet",value:function(e,t,r){t===E.ModelPropertyType.Physical&&(this.matrix3=void 0,this.matrix4=void 0,this.box3=void 0,this.box2=void 0)}}])&&m(t.prototype,r),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),A}(d.default);t.PhysicalModel=j,G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(D=void 0!==p.default&&p.default)?D:Object)],j.prototype,"position",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(R=void 0!==p.default&&p.default)?R:Object)],j.prototype,"rotation",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(M=void 0!==p.default&&p.default)?M:Object)],j.prototype,"scale",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(x=void 0!==p.default&&p.default)?x:Object)],j.prototype,"size",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(P=void 0!==p.default&&p.default)?P:Object)],j.prototype,"translation",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(T=void 0!==p.default&&p.default)?T:Object)],j.prototype,"center",void 0),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(F=void 0!==o.default&&o.default)?F:Object)],j.prototype,"getBoundingBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(O=void 0!==A.default&&A.default)?O:Object)],j.prototype,"getBoundingBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(L=void 0!==f.default&&f.default)?L:Object)],j.prototype,"getPolygon",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(N=void 0!==p.default&&p.default)?N:Object)],j.prototype,"getScale",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getSize",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(k=void 0!==p.default&&p.default)?k:Object)],j.prototype,"getRotation",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getPosition",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getTranslation",null)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkNumberAndLog=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(void 0===e)return void n.LOGGER.logError(new Error("".concat(t," undefined number: ").concat(e)));if(!Number.isFinite(e))return void n.LOGGER.logError(new Error("".concat(t," Infinity number: ").concat(e)));if("string"==typeof e)return void n.LOGGER.logError(new Error("".concat(t," string number: ").concat(e)));if(isNaN(e))return void n.LOGGER.logError(new Error("".concat(t," NaN number: ").concat(e)))};var n=r(349)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkParam=c,t.checkParamAndLog=function(e,t,r){c(e,t)&&s(e,t,r)},t.checkParsedValue=l,t.checkParsedValueAndLog=function(e,t,r){l(e,t)&&s(e,t,r)},t.setOnCheckParamErrorCallBack=function(e){u=e};var n,i=r(2),o=r(10),A=r(349),a=(n=r(1069))&&n.__esModule?n:{default:n};function s(e,t,r){var n=r.action,i=r.oldValue,o=r.paramName;A.LOGGER.logError(new Error("action: ".concat(n," invalid ").concat(e," type value, paramName: ").concat(o,", value: ").concat(JSON.stringify(t),", ").concat(t,", oldValue: ").concat(i))),u(o,e,t,n)}var u=i.noop;function c(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:var n=(0,a.default)(e,t);("number"!=typeof n||isNaN(n))&&(r=!0);break;case o.ParamType.INT:var A=(0,a.default)(e,t);("number"!=typeof A||isNaN(A))&&(r=!0),(0,i.isInteger)(A)&&!t.includes(".")||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:var s=Number(t);(0,i.isInteger)(s)||(r=!0);break;case o.ParamType.BOOLEAN:"true"!==t&&"false"!==t&&(r=!0);break;case o.ParamType.STYLE:var u=(0,a.default)(e,t);"bgId"in u&&"versionId"in u||(r=!0),"number"==typeof u.bgId&&"number"==typeof u.versionId||(r=!0)}}catch(e){r=!0}return r}function l(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:("number"!=typeof t||isNaN(t))&&(r=!0);break;case o.ParamType.INT:("number"!=typeof t||isNaN(t))&&(r=!0),(0,i.isInteger)(t)||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:(0,i.isInteger)(Number(t))||(r=!0);break;case o.ParamType.BOOLEAN:"boolean"!=typeof t&&(r=!0);break;case o.ParamType.STYLE:"bgId"in t&&"versionId"in t||(r=!0),"number"==typeof t.bgId&&"number"==typeof t.versionId||(r=!0);break;case o.ParamType.STRING:"string"!=typeof t&&(r=!0)}}catch(e){r=!0}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelPropertyType=void 0;var n={Physical:Symbol("Physical"),Hole:Symbol("Hole"),NEED_CHANGED_EVENT:Symbol("NEED_CHANGED_EVENT")};t.ModelPropertyType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizProperty=void 0;var n=r(1941);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.paramKey=t.key,this.namespace=t.namespace,this.name=t.name,this.value=t.value,this.valueType=t.valueType}var t,r,i;return t=e,(r=[{key:"getParsedValue",value:function(){switch(this.valueType){case n.ParamBizValueType.boolean:case n.ParamBizValueType.int:case n.ParamBizValueType.float:return JSON.parse(this.value);default:return this.value}}},{key:"getName",value:function(){return this.name}},{key:"getValue",value:function(){return this.value}},{key:"getParamKey",value:function(){return this.paramKey}},{key:"getData",value:function(){return this.data}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParamBizProperty=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizValueType=void 0,t.ParamBizValueType=n,function(e){e.boolean="boolean",e.float="float",e.int="int"}(n||(t.ParamBizValueType=n={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RevitArc3Data=void 0,t.parseShape3=function(e){var t=new u.default,r=[],n=!0;if(e.curves.forEach((function(e){if("RevitLine3D"===e.type){var t=e;r.push(new s.default(p(t.start),p(t.end)))}else if("RevitArc3D"===e.type){var o=e,A=new i.default(p(o.position),p(o.xDirection),p(o.yDirection));r.push(new a.default(A,h(o.center),o.radius,o.startAngle,o.arcAngle)),Number.isFinite(o.startAngle)||(n=!1)}})),!n)return t;return t.setRevitCurves(r)},t.parseVector2=h,t.parseVector3=p;var i=c(r(242)),o=c(r(16)),A=c(r(5)),a=c(r(700)),s=c(r(517)),u=c(r(1077));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function g(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=g((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=""}));function h(e){return e?new o.default(e):void 0}function p(e){return e?new A.default(e):void 0}t.RevitArc3Data=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(723),i=r(78),o=r(112),A=r(340),a=r(102),s=r(16),u=function(){function e(e,t,r,n){this.center=e,this.radius=t,this.startAngle=r,this.arcAngle=n}return e.prototype.getAngleAtT=function(e){return this.startAngle+e*this.arcAngle},e.prototype.getPointAtT=function(e){return this.getPointByAngle(this.getAngleAtT(e))},e.prototype.getLengthAtT=function(e){var t=this.arcAngle;return this.radius*(Math.abs(t)*e)},e.prototype.getTByLength=function(e){var t=this.arcAngle;return e/this.radius/Math.abs(t)},e.prototype.getAngleByPoint=function(e){var t=this.getCircle().getAngle(e),r=this.getTByAngle(t);return this.getAngleAtT(r)},e.prototype.getTByAngle=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=!this.isClockwise(),s=i>o;if(s&&a||!s&&!a){var u=A.default.normalize(n-i);return u>Math.abs(r)&&(u=A.TWO_PI-u),u/Math.abs(r)}return(n-i)/r},e.prototype.getPointByAngle=function(e){var t=this.center,r=this.radius;return s.default.add(t,new s.default(r*Math.cos(e),r*Math.sin(e)))},e.prototype.isAngleInArc=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=Math.min(i,o),s=Math.max(i,o),u=r>0,c=i<o;return u&&c||!u&&!c?n>=a&&n<=s:n<=a||n>=s},e.prototype.getApproximatePoints=function(e){void 0===e&&(e=.3);var t=[],r=[new s.default(0,1)];if(0===this.radius||0===this.arcAngle)return t;for(;0!==r.length;){var n=r.pop(),i=.5*(n.x+n.y),A=new o.default(this.getPointAtT(n.x),this.getPointAtT(n.y)).signedDistanceFromPoint(this.getPointAtT(i));Math.abs(A)<e?t.push(this.getPointAtT(n.x)):r.push(new s.default(i,n.y),new s.default(n.x,i))}return t.push(this.getPointAtT(1)),t},e.prototype.getPointsByIncrement=function(e){if(e<=0)throw new Error("Increment must be greater than zero: "+e);var t,r=[];for(t=0;t<=1;t+=e)r.push(this.getPointAtT(t));return a.default.isEqual(t,1,.5*e)||r.push(this.getPointAtT(1)),r},e.prototype.getNearestPoint=function(e){var t=this.center,r=s.default.sub(e,t).angle();if(!this.isAngleInArc(r)){var n=this.getPointAtT(0),i=this.getPointAtT(1);return e.distance(n)<e.distance(i)?n:i}return this.getPointByAngle(r)},e.prototype.getPointSide=function(e){var t=this.center,r=this.radius,n=this.arcAngle,i=e.distance(t),o=-1;return a.default.isEqual(i,r)?o=0:i<r&&(o=1),0===(o*=Math.sign(n))?"ON_CURVE":o>0?"ON_LEFT":"ON_RIGHT"},e.prototype.getDistance=function(e,t){return void 0===t&&(t=!0),Math.abs(this.getSignedDistance(e,t))},e.prototype.getSignedDistance=function(e,t){var r;if(void 0===t&&(t=!0),t)r=this.getNearestPoint(e);else{var n=this.getAngleByPoint(e);r=this.getCircle().getPoint(n)}var i=e.distance(r);return"ON_LEFT"===this.getPointSide(e)?-i:i},e.prototype.isPointOnArcCurveInclusive=function(e,t){if(void 0===t&&(t=i.NUMBER_TOLERANCE),!this.getCircle().isPointOnCircle(e,t))return!1;var r=s.default.sub(e,this.center).angle();return this.isAngleInArc(r)},e.prototype.isPointOnArcCurveExclusive=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.isPointOnArcCurveInclusive(e,t)&&!this.isPointOnArcEnds(e,t)},e.prototype.isPointOnArcEnds=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.getPointAtT(0).nearEquals(e,t)||this.getPointAtT(1).nearEquals(e,t)},e.prototype.isClockwise=function(){return this.arcAngle<0},e.prototype.getBulge=function(){return Math.tan(this.arcAngle/4)},e.prototype.getCircle=function(){return new n.default(this.center,this.radius)},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this.startAngle,this.arcAngle)},e.fromChordAndBulge=function(t,r){var n=t.start,i=t.length(),o=t.getCenter(),a=Math.sign(r),u=a*r,c=4*Math.atan(u),l=i/2/Math.tan(c/2),g=t.getVector().rotate(a*A.HALF_PI).normalize(),f=s.default.add(o,g.mul(l)),h=s.default.sub(n,f);return new e(f,h.length(),h.angle(),a*c)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShape3=function(e){return{curves:e.getRevitCurves().map((function(e){if(e instanceof o.default)return{start:a(e.getStartPoint()),end:a(e.getEndPoint()),type:"RevitLine3D"};if(e instanceof i.default){var t=e.getRectFace();return{center:(r=e.getCenter(),(0,n.pick)(r,"x","y")),radius:e.getRadius(),startAngle:e.getStartAngle(),arcAngle:e.getArcAngle(),position:a(t.origin),xDirection:a(t.directionU),yDirection:a(t.directionV),type:"RevitArc3D"}}var r}))}};var n=r(2),i=A(r(700)),o=A(r(517));function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.pick)(e,"x","y","z")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FRACTION_DIGITS=void 0,t.formatParamValue=function(e,t){switch(e){case i.default.FLOAT:return function(e){return e+""}(t);case i.default.FLOAT2:return function(e){return e.x+","+e.y}(t);case i.default.FLOAT3:return A(t);case i.default.FLOAT3_BUFFER:return function(e){var t=e.length,r=t?A(e[--t]):"";for(;t;)r=A(e[--t])+";"+r;return r}(t);case i.default.INT:return function(e){return e.toFixed()}(t);case i.default.BOOLEAN:return function(e){return e+""}(t);case i.default.FIT:case i.default.STYLE:return function(e){return JSON.stringify(e)}(t);case i.default.BOOLEAN_LIST:return function(e){return parseInt((0,o.reverseStr)(e),2).toString()}(t);default:return t}};var n,i=(n=r(514))&&n.__esModule?n:{default:n},o=r(1070);function A(e){return e.x+","+e.y+","+e.z}t.FRACTION_DIGITS=1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(21),o=r(2),A=(n=r(514))&&n.__esModule?n:{default:n},a=r(350);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var g=new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.logParamsStore={},this.saveLog=(0,o.debounce)((function(){i.Util.safeExec((function(){var e=Object.values(t.logParamsStore);if(e.length){var r=function(e){var t="",r=[];return e.forEach((function(e){r.push(e.modelId+(e.rootModelId?">"+e.rootModelId:"")),t+="".concat(e.modelName," ").concat(e.rootModelName?">"+e.rootModelName:""," 参数变化 {"),Object.entries(e.paramStore).forEach((function(e){var r=u(e,2),n=r[0],i=r[1],o=i.preVal,A=i.nextVal;t+="".concat(n,": ").concat(o," to ").concat(A,"; ")})),t+="}"})),{logContent:t,modelIds:r}}(e),n=r.modelIds,o=r.logContent;(0,i.getLocalLogger)().add({module:"params",logLevel:i.LocalLogLevel.Info,entityIds:n,type:i.LogType.Data,content:o})}t.logParamsStore={}}),!1)}),200)}var t,r,n;return t=e,(r=[{key:"isEqual",value:function(e,t,r){return e.type!==A.default.FLOAT&&e.type!==A.default.INT||t.type!==A.default.FLOAT&&t.type!==A.default.INT||isNaN(Number(e.value))||isNaN(Number(t.value))?(0,a.compareParamData)(e,t):Math.abs(Number(e.value)-Number(t.value))<r}},{key:"collectParams",value:function(e,t,r){var n=this;i.Util.safeExec((function(){if(r&&!n.isEqual(e,t,.1)){var i=r.getId(),o=r.getRoot(),A=t.name;n.logParamsStore[i]||(n.logParamsStore[i]={modelId:i,modelName:r.getName(),rootModelId:o!==r?o.getId():void 0,rootModelName:o!==r?o.getName():void 0,paramStore:{}}),n.logParamsStore[i].paramStore[A]||(n.logParamsStore[i].paramStore[A]={preVal:e.value,nextVal:t.value}),n.logParamsStore[i].paramStore[A]&&(n.logParamsStore[i].paramStore[A].nextVal=t.value)}}),!1)}}])&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMON_OVERRIDE_ATTR_KEY=void 0,t.delCommonOverrideData=function(e,t,r){var o=u(e)||{},a=o[t];if(!a)return;return(0,n.remove)(a,(function(e){return Object.entries(r).every((function(t){var r=A(t,2),n=r[0];return r[1]===e[n]}))})),0===Object.keys(o).length||Object.values(o).every((function(e){return 0===e.length}))?(0,i.del)(e,"commonOverrideAttr"):(0,i.set)(e,"commonOverrideAttr",JSON.stringify(o))},t.getCommonOverrideData=u,t.setCommonOverrideData=function(e,t){var r=u(e);if(!r)return(0,i.set)(e,"commonOverrideAttr",JSON.stringify(t));var a=Object.assign({},r);function s(e,t){var r=o(e);return r.reverse(),(0,n.uniqBy)(r,(function(e){return JSON.stringify(t.map((function(t){return e[t]})))})).reverse()}return Object.entries(t).forEach((function(e){var t,r=A(e,2),n=r[0],i=r[1];a[n]?(t=a[n]).push.apply(t,o(i)):a[n]=i})),Object.entries(a).forEach((function(e){var t=A(e,2),r=t[0],n=t[1];"modelAttr"===r?a[r]=s(n,["attrName","setBizType"]):"modelParamAttr"===r&&(a[r]=s(n,["attrName","attrName","setBizType"]))})),(0,i.set)(e,"commonOverrideAttr",JSON.stringify(a))};var n=r(2),i=r(1948);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||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 A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=(0,i.get)(e,"commonOverrideAttr");if(r)try{var n=JSON.parse(r);return t?Object.entries(n).reduce((function(e,r){var n=A(r,2),i=n[0],o=n[1];return e[i]=o.filter((function(e){return e.setBizType===t})),e}),{}):n}catch(e){}}t.COMMON_OVERRIDE_ATTR_KEY="commonOverrideAttr"},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.del=function(e,t){var r=o(s(e,t),3),n=r[0],A=r[1],u=r[2];if(n)return A.splice(u,1),e.mergeBizProperties(i({},a,JSON.stringify(A))),!0},t.get=function(e,t){var r=o(s(e,t),1)[0];return r&&r.data},t.set=function(e,t,r){var n=o(s(e,t),2),A=n[0],u=n[1];A?A.data=r:u&&u.push({bizType:t,data:r});e.mergeBizProperties(i({},a,JSON.stringify(u||[{bizType:t,data:r}])))};var a="com.neican.extpoint.build.afterbuildbypmd";function s(e,t){var r=e.getBizProperties();if(r){var n;try{n=JSON.parse(r[a])}catch(e){}if(Array.isArray(n)){for(var i,o=n.length;o;)if((i=n[--o])&&i.bizType===t)return[i,n,o];return[void 0,n]}return[void 0,void 0]}return[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeWireGeometry=function(e,t){for(var r,n,o=e?e.coordinates:[],A=e?e.coordinatesIndex:[],a=t||new i.default,s=0;s<A.length-1;s+=2)r=3*A[s],n=3*A[s+1],a.vertices.push(o[r],o[r+1],o[r+2],o[n],o[n+1],o[n+2]);return a};var n,i=(n=r(1086))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZoneDivisionType=void 0,t.parseZoneDivisionData=function(e){return function e(t){var r=Object.assign(Object.assign({},t),{size:new o.default(t.size.x,t.size.y,t.size.z),position:new o.default(t.position.x,t.position.y,t.position.z)});return t.zoneDivisions&&t.zoneDivisions.length&&(r.zoneDivisions=t.zoneDivisions.map((function(t){return e(t)}))),r}(e)};var n,i,o=(n=r(5))&&n.__esModule?n:{default:n};t.ZoneDivisionType=i,function(e){e.X="X",e.Y="Y",e.Z="Z"}(i||(t.ZoneDivisionType=i={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceObjectType=t.ParameterAssignment=void 0,t.SourceObjectType=o,function(e){e[e.MODEL=0]="MODEL",e[e.DRAIN_HOLE=1]="DRAIN_HOLE",e[e.FAUCET_HOLE=2]="FAUCET_HOLE",e[e.AUX_HOLE=3]="AUX_HOLE"}(o||(t.SourceObjectType=o={}));var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(e){return this.model=e,this}},{key:"getName",value:function(){return this.name}},{key:"setName",value:function(e){return this.name=e,this}},{key:"getCategory",value:function(){return this.category}},{key:"setCategory",value:function(e){return this.category=e,this}},{key:"getSourceObjectType",value:function(){return this.sourceObjectType}},{key:"setSourceObjectType",value:function(e){return this.sourceObjectType=e,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){return this.size=e,this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){return this.position=e,this}},{key:"getRotate",value:function(){return this.rotate}},{key:"setRotate",value:function(e){return this.rotate=e,this}}])&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParameterAssignment=A},function(e,t,r){"use strict";function n(e,t,r){if(e===t)return!0;if(e&&t&&e.length===t.length){for(var n=0,i=e.length;n<i;n++)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={equalsArray:n,equalsArrayBuffer:function(e,t){return e===t||!(!e||!t)&&n(new Float64Array(e),new Float64Array(t))},equalsBox3:function(e,t){return e===t||!(!e||!t)&&(e.getPosition().equals(t.getPosition())&&e.getSize().equals(t.getSize())&&e.getRotation().equals(t.getRotation()))},diffArray:function(e,t,r){t=t||[];var n=void 0,i=void 0,o=void 0,A=void 0;if(0===(e=e||[]).length)n=[],i=[],o=[],A=t.slice();else if(0===t.length)n=e.slice(),i=[],o=[],A=[];else{n=[],i=[],o=[],A=[];for(var a=void 0,s=void 0,u=void 0,c=0,l=Math.min(e.length,t.length);c<l;++c)if((s=e[c])!==(a=t[c])){if(r?r(s)!==r(a):s.id!==a.id){0!==c&&(e=e.slice(c),t=t.slice(c));break}i.push(s),o.push(a)}if(c===l){if(c<e.length)for(;c<e.length;)n.push(e[c]),++c;else if(c<t.length)for(;c<t.length;)A.push(t[c]),++c}else{for(var g={},f={},h=0,p=e.length;h<p;++h)s=e[h],g[u=r?r(s):s.id]=e[h];for(var d=0,I=t.length;d<I;++d)a=t[d],s=g[u=r?r(a):a.id],f[u]=a,s?s!==a&&(i.push(s),o.push(a)):A.push(a);for(var y=0,C=e.length;y<C;++y)s=e[y],(a=f[u=r?r(s):s.id])||n.push(s)}}return{removed:n,updatedOld:i,updatedNew:o,added:A}}};t.default=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={CoreCustomContext:!0,CoreParamModelAssemblyBackup:!0,CoreParamModelBackup:!0};Object.defineProperty(t,"CoreCustomContext",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"CoreParamModelAssemblyBackup",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"CoreParamModelBackup",{enumerable:!0,get:function(){return u.default}});var o=r(1954);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(208));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1959);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=c(r(704)),u=c(r(705));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={DoorHoleData:!0,InnerFrameData:!0,MeshData:!0,ParamData:!0,ParamModelData:!0,ParamModelGroupData:!0,BaseParamModelData:!0};Object.defineProperty(t,"BaseParamModelData",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"DoorHoleData",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"InnerFrameData",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MeshData",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ParamData",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ParamModelData",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelGroupData",{enumerable:!0,get:function(){return I.default}});var o=r(1955);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=r(1073);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=m(r(1075));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(1078);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=m(r(1079));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1956);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(1957);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=m(r(1081));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=m(r(350));Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1088);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=r(1089);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var d=m(r(703));Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var I=m(r(702));Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var y=r(1958);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var C=r(1082);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var E,B=(E=r(1072))&&E.__esModule?E:{default:E};function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function m(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.RuleLimitData=void 0;var A=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.RuleLimitData=A},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={InnerFrame:!0,DoorHole:!0,FitRule:!0,IntersectBox:!0,ParamPackage:!0,AutoGenerateConfig:!0,NamedValue:!0,ParamModelAttached:!0,IParamModelAttachedPartialPb:!0};Object.defineProperty(t,"AutoGenerateConfig",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"DoorHole",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"FitRule",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"IParamModelAttachedPartialPb",{enumerable:!0,get:function(){return I.IParamModelAttachedPartialPb}}),Object.defineProperty(t,"InnerFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"IntersectBox",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"NamedValue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelAttached",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"ParamPackage",{enumerable:!0,get:function(){return g.default}});var o=r(1961);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=E(r(1080));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1074);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=E(r(699));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=E(r(516));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1962);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=E(r(1085));Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=E(r(518));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=r(519);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1083);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=y(r(1084)),d=y(r(1963)),I=E(r(428));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(C=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=C(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RevitArc3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"RevitCurve3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RevitLine3",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"RevitShape3",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"deltaTransformPoint",{enumerable:!0,get:function(){return o.deltaTransformPoint}});var i=u(r(700)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(1076)),A=u(r(517)),a=u(r(1077));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeoReferenceType=t.GeoReferencePointData=t.GeoReferenceFaceData=t.GeoReferenceExtrusionData=t.GeoReferenceCurveData=t.GRPSurfaceData=t.GRPExtrusionData=t.GRPCurveData=t.BaseGeoReferenceData=void 0,t.parseGeoReferenceData=function(e){var t,r=Object.assign(Object.assign({},e),{value:JSON.parse(e.value)});switch(r.type){case C.CCS3D:t=(0,n.deserialize)(_,r);break;case C.CURVES:t=(0,n.deserialize)(S,r);break;case C.FACE:t=(0,n.deserialize)(w,r);break;case C.EXTRUSION:t=(0,n.deserialize)(D,r);break;default:t=(0,n.deserialize)(b,r)}return t},t.transformLocalGRPToWorldGRP=function(e,t){e instanceof _?e.value=function(e,t){var r=e.toCCS();return r.transform(t),new i.CCS3dData(r)}(e.value,t):e instanceof S?e.value=R(e.value,t):e instanceof w?e.value=function(e,t){var r,n=e.surface.toSurface();n.transform(t),r=n instanceof i.Plane?new i.PlaneData(n):n instanceof i.CylindricalSurface?new i.CylindricalSurfaceData(n):n instanceof i.SurfaceOfLinearExtrusion?new i.SurfaceOfLinearExtrusionData(n):new i.SurfaceData(n);return e.surface=r,e.outLoop=R(e.outLoop,t),e.innerLoops=e.innerLoops.map((function(e){return R(e,t)})),e}(e.value,t):e instanceof D&&(e.value=function(e,t){var r=e.matrix.toMatrix();return r.premultiply(t),e.matrix=new i.Matrix4Data(r),e}(e.value,t));return e};var n=r(17),i=r(3);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=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(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===f(o)?o:String(o)),n)}var i,o}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var h,p,d,I,y,C,E=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},B=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t.GeoReferenceType=C,function(e){e.CCS3D="CCS3D",e.CURVES="CURVES",e.FACE="FACE",e.EXTRUSION="EXTRUSION"}(C||(t.GeoReferenceType=C={}));var v=l((function e(){g(this,e)}));t.GRPCurveData=v,E([(0,n.JsonProperty)({class:i.BoundedCurve3dData,converter:i.DataConverter.BoundedCurve3dDatasConverter}),B("design:type",Array)],v.prototype,"curves",void 0);var m=l((function e(){g(this,e)}));t.GRPSurfaceData=m,E([(0,n.JsonProperty)({converter:i.DataConverter.SurfaceDataConverter}),B("design:type","function"==typeof(h=void 0!==i.SurfaceData&&i.SurfaceData)?h:Object)],m.prototype,"surface",void 0),E([(0,n.JsonProperty)(),B("design:type",v)],m.prototype,"outLoop",void 0),E([(0,n.JsonProperty)({class:v,default:[]}),B("design:type",Array)],m.prototype,"innerLoops",void 0);var Q=l((function e(){g(this,e)}));t.GRPExtrusionData=Q,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(p=void 0!==i.Matrix4Data&&i.Matrix4Data)?p:Object)],Q.prototype,"matrix",void 0),E([(0,n.JsonProperty)(),B("design:type",Number)],Q.prototype,"distance",void 0),E([(0,n.JsonProperty)(),B("design:type","function"==typeof(d=void 0!==i.GeomFace2dData&&i.GeomFace2dData)?d:Object)],Q.prototype,"face",void 0);var b=l((function e(){g(this,e)}));t.BaseGeoReferenceData=b,E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"id",void 0),E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"name",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"type",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"businessType",void 0),E([(0,n.JsonProperty)({default:new Map}),B("design:type","function"==typeof(I="undefined"!=typeof Map&&Map)?I:Object)],b.prototype,"data",void 0);var _=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferencePointData=_,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(y=void 0!==i.CCS3dData&&i.CCS3dData)?y:Object)],_.prototype,"value",void 0);var S=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceCurveData=S,E([(0,n.JsonProperty)({class:v}),B("design:type",v)],S.prototype,"value",void 0);var w=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceFaceData=w,E([(0,n.JsonProperty)(),B("design:type",m)],w.prototype,"value",void 0);var D=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);function R(e,t){return e.curves=e.curves.map((function(e){var r=e.toCurve();return r.transform(t),r instanceof i.Arc3d?new i.Arc3dData(r):r instanceof i.LineSeg3d?new i.LineSeg3dData(r):new i.BoundedCurve3dData(r)})),e}t.GeoReferenceExtrusionData=D,E([(0,n.JsonProperty)(),B("design:type",Q)],D.prototype,"value",void 0)},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCoreParamModel=function(e){return e instanceof n.default},t.isCoreParamModelAssembly=function(e){return e instanceof i.default};var n=o(r(107)),i=o(r(421));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(1967),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},function(e,t,r){"use strict";e.exports=r(1968)()?Math.sign:r(1969)},function(e,t,r){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,r){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=r(1972),a=r(1091);e.exports=function e(t){var r,s,u;if(n(t),(r=Object(arguments[1])).async&&r.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(s=a(r.length,t.length,r.async&&o.async),u=A(t,s,r),i(o,(function(e,t){r[t]&&e(r[t],u,r)})),e.__profiler__&&e.__profiler__(u),u.updateEnv(),u.memoized)}},function(e,t,r){"use strict";var n=r(234),i=r(351),o=Function.prototype.bind,A=Function.prototype.call,a=Object.keys,s=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,l=arguments[2],g=arguments[3];return r=Object(i(r)),n(u),c=a(r),g&&c.sort("function"==typeof g?o.call(g,r):void 0),"function"!=typeof e&&(e=c[e]),A.call(e,c,(function(e,n){return s.call(r,e)?A.call(u,l,r[e],e,r,n):t}))}}},function(e,t,r){"use strict";var n=r(1973),i=r(1093),o=r(280),A=r(1987).methods,a=r(1988),s=r(2004),u=Function.prototype.apply,c=Function.prototype.call,l=Object.create,g=Object.defineProperties,f=A.on,h=A.emit;e.exports=function(e,t,r){var A,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D=l(null);return p=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(m=s(r.normalizer),d=m.get,I=m.set,y=m.delete,C=m.clear),null!=r.resolvers&&(w=a(r.resolvers)),S=d?i((function(t){var r,i,o=arguments;if(w&&(o=w(o)),null!==(r=d(o))&&hasOwnProperty.call(D,r))return Q&&A.emit("get",r,o,this),D[r];if(i=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),null===r){if(null!==(r=d(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=I(o)}else if(hasOwnProperty.call(D,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[r]=i,b&&A.emit("set",r,null,i),i}),p):0===t?function(){var t;if(hasOwnProperty.call(D,"data"))return Q&&A.emit("get","data",arguments,this),D.data;if(t=arguments.length?u.call(e,this,arguments):c.call(e,this),hasOwnProperty.call(D,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return D.data=t,b&&A.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(w&&(o=w(arguments)),i=String(o[0]),hasOwnProperty.call(D,i))return Q&&A.emit("get",i,o,this),D[i];if(r=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),hasOwnProperty.call(D,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[i]=r,b&&A.emit("set",i,null,r),r},A={original:e,memoized:S,profileName:r.profileName,get:function(e){return w&&(e=w(e)),d?d(e):String(e[0])},has:function(e){return hasOwnProperty.call(D,e)},delete:function(e){var t;hasOwnProperty.call(D,e)&&(y&&y(e),t=D[e],delete D[e],_&&A.emit("delete",e,t))},clear:function(){var e=D;C&&C(),D=l(null),A.emit("clear",e)},on:function(e,t){return"get"===e?Q=!0:"set"===e?b=!0:"delete"===e&&(_=!0),f.call(this,e,t)},emit:h,updateEnv:function(){e=A.original}},E=d?i((function(e){var t,r=arguments;w&&(r=w(r)),null!==(t=d(r))&&A.delete(t)}),p):0===t?function(){return A.delete("data")}:function(e){return w&&(e=w(arguments)[0]),A.delete(e)},B=i((function(){var e,r=arguments;return 0===t?D.data:(w&&(r=w(r)),e=d?d(r):String(r[0]),D[e])})),v=i((function(){var e,r=arguments;return 0===t?A.has("data"):(w&&(r=w(r)),null!==(e=d?d(r):String(r[0]))&&A.has(e))})),g(S,{__memoized__:o(!0),delete:o(E),clear:o(A.clear),_get:o(B),_has:o(v)}),A}},function(e,t,r){"use strict";var n=r(1092),i=r(1979),o=r(277),A=Error.captureStackTrace;e.exports=function(t){var r=new Error(t),a=arguments[1],s=arguments[2];return o(s)||i(a)&&(s=a,a=null),o(s)&&n(r,s),o(a)&&(r.code=a),A&&A(r,e.exports),r}},function(e,t,r){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){"use strict";var n=r(1976),i=r(351),o=Math.max;e.exports=function(e,t){var r,A,a,s=o(arguments.length,2);for(e=Object(i(e)),a=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},A=1;A<s;++A)n(t=arguments[A]).forEach(a);if(void 0!==r)throw r;return e}},function(e,t,r){"use strict";e.exports=r(1977)()?Object.keys:r(1978)},function(e,t,r){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(277),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(277),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[n(e)]||!1}},function(e,t,r){"use strict";var n=r(1981),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!i.test(o.call(e))}},function(e,t,r){"use strict";var n=r(1982);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},function(e,t,r){"use strict";var n=r(1983);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1095),o={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(o,n(e))}},function(e,t,r){"use strict";e.exports=r(1985)()?String.prototype.contains:r(1986)},function(e,t,r){"use strict";var n="razdwatrzy";e.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(e,t,r){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a,s,u,c,l=r(280),g=r(234),f=Function.prototype.apply,h=Function.prototype.call,p=Object.create,d=Object.defineProperty,I=Object.defineProperties,y=Object.prototype.hasOwnProperty,C={configurable:!0,enumerable:!1,writable:!0};o=function(e,t){var r,n;return g(t),n=this,i.call(this,e,r=function(){A.call(n,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},s={on:i=function(e,t){var r;return g(t),y.call(this,"__ee__")?r=this.__ee__:(r=C.value=p(null),d(this,"__ee__",C),C.value=null),r[e]?"object"===n(r[e])?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:o,off:A=function(e,t){var r,i,o,A;if(g(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"===n(i=r[e]))for(A=0;o=i[A];++A)o!==t&&o.__eeOnceListener__!==t||(2===i.length?r[e]=i[A?0:1]:i.splice(A,1));else i!==t&&i.__eeOnceListener__!==t||delete r[e];return this},emit:a=function(e){var t,r,i,o,A;if(y.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"===n(o)){for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];for(o=o.slice(),t=0;i=o[t];++t)f.call(i,this,A)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];f.call(o,this,A)}}},u={on:l(i),once:l(o),off:l(A),emit:l(a)},c=I({},u),e.exports=t=function(e){return null==e?p(c):I(Object(e),u)},t.methods=s},function(e,t,r){"use strict";var n,i=r(1989),o=r(277),A=r(234),a=Array.prototype.slice;n=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(a.call(e,this.length))},e.exports=function(e){return(e=i(e)).forEach((function(e){o(e)&&A(e)})),n.bind(e)}},function(e,t,r){"use strict";var n=r(706),i=Array.isArray;e.exports=function(e){return i(e)?e:n(e)}},function(e,t,r){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(1992).iterator,i=r(2001),o=r(2002),A=r(278),a=r(234),s=r(351),u=r(277),c=r(2003),l=Array.isArray,g=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,r,p,d,I,y,C,E,B,v,m=arguments[1],Q=arguments[2];if(e=Object(s(e)),u(m)&&a(m),this&&this!==Array&&o(this))t=this;else{if(!m){if(i(e))return 1!==(I=e.length)?Array.apply(null,e):((d=new Array(1))[0]=e[0],d);if(l(e)){for(d=new Array(I=e.length),r=0;r<I;++r)d[r]=e[r];return d}}d=[]}if(!l(e))if(void 0!==(B=e[n])){for(C=a(B).call(e),t&&(d=new t),E=C.next(),r=0;!E.done;)v=m?g.call(m,Q,E.value,r):E.value,t?(f.value=v,h(d,r,f)):d[r]=v,E=C.next(),++r;I=r}else if(c(e)){for(I=e.length,t&&(d=new t),r=0,p=0;r<I;++r)v=e[r],r+1<I&&(y=v.charCodeAt(0))>=55296&&y<=56319&&(v+=e[++r]),v=m?g.call(m,Q,v,p):v,t?(f.value=v,h(d,p,f)):d[p]=v,++p;I=p}if(void 0===I)for(I=A(e.length),t&&(d=new t(I)),r=0;r<I;++r)v=m?g.call(m,Q,e[r],r):e[r],t?(f.value=v,h(d,r,f)):d[r]=v;return t&&(f.value=null,d.length=I),d}},function(e,t,r){"use strict";e.exports=r(1993)()?r(521).Symbol:r(1996)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(521),o={object:!0,symbol:!0};e.exports=function(){var e,t=i.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!o[n(t.iterator)]&&(!!o[n(t.toPrimitive)]&&!!o[n(t.toStringTag)])}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&(!!globalThis&&globalThis.Array===Array)}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=function(){if("object"===("undefined"==typeof self?"undefined":r(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":r(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a=r(280),s=r(1096),u=r(521).Symbol,c=r(1998),l=r(1999),g=r(2e3),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"==typeof u)try{String(u()),A=!0}catch(e){}else u=null;o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},e.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return A?u(t):(r=f(o.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},l(i),g(i),h(o.prototype,{constructor:a(i),toString:a("",(function(){return this.__name__}))}),h(i.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(i.prototype,i.toPrimitive,a("",(function(){var e=s(this);return"symbol"===n(e)?e:e.toString()}))),p(i.prototype,i.toStringTag,a("c","Symbol")),p(o.prototype,i.toStringTag,a("c",i.prototype[i.toStringTag])),p(o.prototype,i.toPrimitive,a("c",i.prototype[i.toPrimitive]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return!!e&&("symbol"===n(e)||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,r){"use strict";var n=r(280),i=Object.create,o=Object.defineProperty,A=Object.prototype,a=i(null);e.exports=function(e){for(var t,r,i=0;a[e+(i||"")];)++i;return a[e+=i||""]=!0,o(A,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},function(e,t,r){"use strict";var n=r(280),i=r(521).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},function(e,t,r){"use strict";var n=r(280),i=r(1096),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(e){return n.call(e)===i}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&i(n.call(e))}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString,o=i.call("");e.exports=function(e){return"string"==typeof e||e&&"object"===n(e)&&(e instanceof String||i.call(e)===o)||!1}},function(e,t,r){"use strict";var n=r(234);e.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},function(e,t,r){"use strict";e.exports=function(e){var t,r,n=e.length;if(!n)return"";for(t=String(e[r=0]);--n;)t+=""+e[++r];return t}},function(e,t,r){"use strict";e.exports=function(e){return e?function(t){for(var r=String(t[0]),n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(){var e=0,t=[],r=i(null);return{get:function(e){var r,i=0,o=t,A=e.length;if(0===A)return o[A]||null;if(o=o[A]){for(;i<A-1;){if(-1===(r=n.call(o[0],e[i])))return null;o=o[1][r],++i}return-1===(r=n.call(o[0],e[i]))?null:o[1][r]||null}return null},set:function(i){var o,A=0,a=t,s=i.length;if(0===s)a[s]=++e;else{for(a[s]||(a[s]=[[],[]]),a=a[s];A<s-1;)-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1,a[1].push([[],[]])),a=a[1][o],++A;-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1),a[1][o]=++e}return r[e]=i,e},delete:function(e){var i,o=0,A=t,a=r[e],s=a.length,u=[];if(0===s)delete A[s];else if(A=A[s]){for(;o<s-1;){if(-1===(i=n.call(A[0],a[o])))return;u.push(A,i),A=A[1][i],++o}if(-1===(i=n.call(A[0],a[o])))return;for(e=A[1][i],A[0].splice(i,1),A[1].splice(i,1);!A[0].length&&u.length;)i=u.pop(),(A=u.pop())[0].splice(i,1),A[1].splice(i,1)}delete r[e]},clear:function(){t=[],r=i(null)}}}},function(e,t,r){"use strict";e.exports=r(2009)()?Number.isNaN:r(2010)},function(e,t,r){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t,r){"use strict";e.exports=function(e){return e!=e}},function(e,t,r){"use strict";var n=r(707);e.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return-1===i?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);-1!==i&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,A=r;o<e-1;){if(-1===(i=n.call(A[0],t[o])))return null;A=A[1][i],++o}return-1===(i=n.call(A[0],t[o]))?null:A[1][i]||null},set:function(i){for(var A,a=0,s=r;a<e-1;)-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1,s[1].push([[],[]])),s=s[1][A],++a;return-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1),s[1][A]=++t,o[t]=i,t},delete:function(t){for(var i,A=0,a=r,s=[],u=o[t];A<e-1;){if(-1===(i=n.call(a[0],u[A])))return;s.push(a,i),a=a[1][i],++A}if(-1!==(i=n.call(a[0],u[A]))){for(t=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&s.length;)i=s.pop(),(a=s.pop())[0].splice(i,1),a[1].splice(i,1);delete o[t]}},clear:function(){r=[[],[]],o=i(null)}}}},function(e,t,r){"use strict";var n=r(706),i=r(1097),o=r(1094),A=r(1093),a=r(708),s=Array.prototype.slice,u=Function.prototype.apply,c=Object.create;r(279).async=function(e,t){var r,l,g,f=c(null),h=c(null),p=t.memoized,d=t.original;t.memoized=A((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=s.call(t,0,-1)),p.apply(l=this,g=t)}),p);try{o(t.memoized,p)}catch(e){}t.on("get",(function(e){var n,i,o;if(r){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],r]:f[e].push(r),void(r=null);n=r,i=l,o=g,r=l=g=null,a((function(){var A;hasOwnProperty.call(h,e)?(A=h[e],t.emit("getasync",e,o,i),u.call(n,A.context,A.args)):(r=n,l=i,g=o,p.apply(i,o))}))}})),t.original=function(){var e,i,o,A;return r?(e=n(arguments),i=function e(r){var i,o,s=e.id;if(null!=s){if(delete e.id,i=f[s],delete f[s],i)return o=n(arguments),t.has(s)&&(r?t.delete(s):(h[s]={context:this,args:o},t.emit("setasync",s,"function"==typeof i?1:i.length))),"function"==typeof i?A=u.call(i,this,o):i.forEach((function(e){A=u.call(e,this,o)}),this),A}else a(u.bind(e,this,arguments))},o=r,r=l=g=null,e.push(i),A=u.call(d,this,e),i.cb=o,r=i,A):u.call(d,this,arguments)},t.on("set",(function(e){r?(f[e]?"function"==typeof f[e]?f[e]=[f[e],r.cb]:f[e].push(r.cb):f[e]=r.cb,delete r.cb,r.id=e,r=null):t.delete(e)})),t.on("delete",(function(e){var r;hasOwnProperty.call(f,e)||h[e]&&(r=h[e],delete h[e],t.emit("deleteasync",e,s.call(r.args,1)))})),t.on("clear",(function(){var e=h;h=c(null),t.emit("clearasync",i(e,(function(e){return s.call(e.args,1)})))}))}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(772),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(144))},function(e,t,r){"use strict";var n=r(1097),i=r(2016),o=r(2017),A=r(2019),a=r(1099),s=r(708),u=Object.create,c=i("then","then:finally","done","done:finally");r(279).promise=function(e,t){var r=u(null),i=u(null),l=u(null);if(!0===e)e=null;else if(e=o(e),!c[e])throw new TypeError("'"+A(e)+"' is not valid promise mode");t.on("set",(function(n,o,A){var u=!1;if(!a(A))return i[n]=A,void t.emit("setasync",n,1);r[n]=1,l[n]=A;var c=function(e){var o=r[n];if(u)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},g=function(){u=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},f=e;if(f||(f="then"),"then"===f){var h=function(){s(g)};"function"==typeof(A=A.then((function(e){s(c.bind(this,e))}),h)).finally&&A.finally(h)}else if("done"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");A.done(c,g)}else if("done:finally"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof A.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");A.done(c),A.finally(g)}})),t.on("get",(function(e,n,i){var o;if(r[e])++r[e];else{o=l[e];var A=function(){t.emit("getasync",e,n,i)};a(o)?"function"==typeof o.done?o.done(A):o.then((function(){s(A)})):A()}})),t.on("delete",(function(e){if(delete l[e],r[e])delete r[e];else if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}})),t.on("clear",(function(){var e=i;i=u(null),r=u(null),l=u(null),t.emit("clearasync",n(e,(function(e){return[e]})))}))}},function(e,t,r){"use strict";var n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){t[e]=!0})),t}},function(e,t,r){"use strict";var n=r(351),i=r(2018);e.exports=function(e){return i(n(e))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}},function(e,t,r){"use strict";var n=r(2020),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){return JSON.stringify(e).slice(1,-1)}))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){return"<Non-coercible to string value>"}}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=Function.prototype.apply;o.dispose=function(e,t,r){var a;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",a=function(t,r){A.call(e,null,r)}),void t.on("clearasync",(function(e){i(e,(function(e,t){a(t,e)}))}));t.on("delete",a=function(t,r){e(r)}),t.on("clear",(function(e){i(e,(function(e,t){a(t,e)}))}))}},function(e,t,r){"use strict";var n=r(706),i=r(520),o=r(708),A=r(1099),a=r(2023),s=r(279),u=Function.prototype,c=Math.max,l=Math.min,g=Object.create;s.maxAge=function(e,t,r){var f,h,p,d;(e=a(e))&&(f=g(null),h=r.async&&s.async||r.promise&&s.promise?"async":"",t.on("set"+h,(function(r){f[r]=setTimeout((function(){t.delete(r)}),e),"function"==typeof f[r].unref&&f[r].unref(),d&&(d[r]&&"nextTick"!==d[r]&&clearTimeout(d[r]),d[r]=setTimeout((function(){delete d[r]}),p),"function"==typeof d[r].unref&&d[r].unref())})),t.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],d&&("nextTick"!==d[e]&&clearTimeout(d[e]),delete d[e])})),r.preFetch&&(p=!0===r.preFetch||isNaN(r.preFetch)?.333:c(l(Number(r.preFetch),1),0))&&(d={},p=(1-p)*e,t.on("get"+h,(function(e,i,a){d[e]||(d[e]="nextTick",o((function(){var o;"nextTick"===d[e]&&(delete d[e],t.delete(e),r.async&&(i=n(i)).push(u),o=t.memoized.apply(a,i),r.promise&&A(o)&&("function"==typeof o.done?o.done(u,u):o.then(u,u)))})))}))),t.on("clear"+h,(function(){i(f,(function(e){clearTimeout(e)})),f={},d&&(i(d,(function(e){"nextTick"!==e&&clearTimeout(e)})),d={})})))}},function(e,t,r){"use strict";var n=r(278),i=r(2024);e.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,r){"use strict";e.exports=2147483647},function(e,t,r){"use strict";var n=r(278),i=r(2026),o=r(279);o.max=function(e,t,r){var A,a,s;(e=n(e))&&(a=i(e),A=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+A,s=function(e){void 0!==(e=a.hit(e))&&t.delete(e)}),t.on("get"+A,s),t.on("delete"+A,a.delete),t.on("clear"+A,a.clear))}},function(e,t,r){"use strict";var n=r(278),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=0,A=1,a=i(null),s=i(null),u=0;return e=n(e),{hit:function(n){var i=s[n],c=++u;if(a[c]=n,s[n]=c,!i){if(++r<=e)return;return n=a[A],t(n),n}if(delete a[i],A===i)for(;!o.call(a,++A););},delete:t=function(e){var t=s[e];if(t&&(delete a[t],delete s[e],--r,A===t)){if(!r)return u=0,void(A=1);for(;!o.call(a,++A););}},clear:function(){r=0,A=1,a=i(null),s=i(null),u=0}}}},function(e,t,r){"use strict";var n=r(280),i=r(279),o=Object.create,A=Object.defineProperties;i.refCounter=function(e,t,r){var a,s;a=o(null),s=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+s,(function(e,t){a[e]=t||1})),t.on("get"+s,(function(e){++a[e]})),t.on("delete"+s,(function(e){delete a[e]})),t.on("clear"+s,(function(){a={}})),A(t.memoized,{deleteRef:n((function(){var e=t.get(arguments);return null===e?null:a[e]?!--a[e]&&(t.delete(e),!0):null})),getRefCount:n((function(){var e=t.get(arguments);return null===e?0:a[e]?a[e]:0}))})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionContext=t.START_ID=void 0;var n=r(349),i=r(288),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var r=A(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(2029));function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(A=function(e){return e?r:t})(e)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===a(o)?o:String(o)),n)}var i,o}t.START_ID="-1";var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxBackupStep=25,this.getCurrentId=function(){return t.undoStack.length>0?t.undoStack[t.undoStack.length-1].getId():"-1"},this.invalidUseCounter=0,this.undoStack=[],this.redoStack=[],this.status=o.TransactionStatus.None,this.cachedRecorder=new o.default,this.createRecorder()}var t,r,A;return t=e,(r=[{key:"setMaxBackupStep",value:function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)}},{key:"createRecorder",value:function(){return this.activeRecorder=new o.default,this.activeRecorder}},{key:"record",value:function(e,t,r){this.status!==o.TransactionStatus.Rollback&&this.activeRecorder.record(e,t,r)}},{key:"getStatus",value:function(){return this.status}},{key:"openRecorder",value:function(){this.clearRedoStack(),this.status=o.TransactionStatus.Open,this.createRecorder()}},{key:"getMergedRecorder",value:function(){var e=new o.default;return this.useCachedRecorder&&this.cachedRecorder.mergeTo(e),this.undoStack.forEach((function(t){return t.mergeTo(e)})),e}},{key:"mergeRecorder",value:function(){!this.activeRecorder.isEmpty()&&this.undoStack.length>0&&this.activeRecorder.mergeTo(this.undoStack[this.undoStack.length-1]),this.createRecorder(),this.console("mergeTransaction")}},{key:"commitRecorder",value:function(e){var t=this;if(this.undoStack.length>=this.maxBackupStep){var r=this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep+1);this.useCachedRecorder&&r.forEach((function(e){return e.mergeTo(t.cachedRecorder)}))}e&&e.mergeTo(this.activeRecorder),this.activeRecorder.isEmpty()||this.undoStack.push(this.activeRecorder),this.openRecorder(),this.console("commitTransaction")}},{key:"isActiveRecorderEmpty",value:function(){return this.activeRecorder.isEmpty()}},{key:"revert",value:function(){this.status=o.TransactionStatus.Rollback,this.activeRecorder.recover(),this.status=o.TransactionStatus.None,this.createRecorder(),this.console("revert")}},{key:"undo",value:function(){if(0===this.undoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Undo;var e=this.undoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.redoStack.push(this.activeRecorder),this.createRecorder(),this.console("undo"),!0}},{key:"redo",value:function(){if(0===this.redoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Redo;var e=this.redoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.undoStack.push(this.activeRecorder),this.createRecorder(),this.console("redo"),!0}},{key:"console",value:function(e){(0,i.devLog)({type:e,undoStack:this.undoStack,redo:this.redoStack})}},{key:"clearRedoStack",value:function(){this.redoStack.length=0}},{key:"clear",value:function(){this.redoStack.length=0,this.undoStack.length=0,this.createRecorder()}},{key:"empty",value:function(){return 0===this.redoStack.length&&0===this.undoStack.length}},{key:"undoToRecorder",value:function(e){var t=0;if("-1"===e)t=this.undoStack.length;else{var r=this.undoStack.findIndex((function(t){return t.getId()===e}));r>-1&&(t=this.undoStack.length-r-1)}if(0===t)return!1;for(var i=0;i<t;i++)if(!this.undo())return n.LOGGER.logError(new Error("Transaction undoToRecorder error")),!1;return!0}},{key:"redoToRecorder",value:function(e){var t=0,r=this.redoStack.findIndex((function(t){return t.getId()===e}));if(r>-1&&(t=this.redoStack.length-r),0===t)return!1;for(var i=0;i<t;i++)if(!this.redo())return n.LOGGER.logError(new Error("Transaction redoToRecorder error ".concat(e))),!1;return!0}},{key:"getActiveRecorderId",value:function(){return this.activeRecorder.getId()}},{key:"setActiveRecorder",value:function(e){var t=this;this.invalidUseCounter>0&&n.LOGGER.logError(new Error("invalid use setActiveRecorder"));var r=this.undoStack.find((function(t){return t.getId()===e})),i=this.activeRecorder;return r&&(this.activeRecorder=r),this.invalidUseCounter++,function(){t.invalidUseCounter--,t.activeRecorder=i}}}])&&s(t.prototype,r),A&&s(t,A),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.TransactionContext=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TransactionStatus=void 0;var n,i=(n=r(532))&&n.__esModule?n:{default:n},o=r(2030);function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=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(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===c(o)?o:String(o)),n)}var i,o}function f(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var h,p=function(){function e(){l(this,e),this.records=new Map,this.updater={update:function(e,t,r){e[t]=r}}}return f(e,[{key:"record",value:function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)}},{key:"recover",value:function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){var i=t.update||e.updater.update;r.applyRecover&&!r.applyRecover()||i(r,n,t.preValue)}))}))}},{key:"isEmpty",value:function(){return 0===this.records.size}},{key:"mergeTo",value:function(e){this.records.forEach((function(t,r){t.forEach((function(t,n){e.record(r,n,t)}))}))}}]),e}();t.TransactionStatus=h,function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Undo=2]="Undo",e[e.Redo=3]="Redo",e[e.Rollback=4]="Rollback"}(h||(t.TransactionStatus=h={}));var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(r,e);var t=a(r);function r(){return l(this,r),t.apply(this,arguments)}return f(r)}((0,i.default)(p,(0,o.numericId)()));t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numericId=function(){var e=1;return function(){return(e++).toString()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1101),i=r(1102),o=r(1103),A=r(2032),a=r(1104),s=r(1105),u=r(1106),c=r(1107),l=r(1108);t.BrepDataTranslators={EDGE_DATA:new n.EdgeDataTranslator,EDGE2_DATA:new i.Edge2DataTranslator,FACE_DATA:new o.FaceDataTranslator,HALF_EDGE_DATA:new a.HalfEdgeDataTranslator,LOOP_DATA:new s.LoopDataTranslator,META_DATA:new u.MetaDataTranslator,SHELL_DATA:new c.ShellDataTranslator,VERTEX_DATA:new l.VertexDataTranslator,GENERAL_DATA:new A.GeneralDataTranslator,GENERAL_DATA_LIST:new A.GeneralDataListTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(67),c=r(711),l=r(422),g=r(353),f=r(284),h=r(354),p=r(239),d=r(522),I=r(423),y=r(1101),C=r(1102),E=r(1103),B=r(1104),v=r(1105),m=r(1106),Q=r(1107),b=r(1108),_=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralData;if(e instanceof I.VertexData)t.vertexData=(new b.VertexDataTranslator).to(e);else if(e instanceof f.HalfEdgeData)t.halfEdgeData=(new B.HalfEdgeDataTranslator).to(e);else if(e instanceof l.Edge2Data)t.edge2Data=(new C.Edge2DataTranslator).to(e);else if(e instanceof h.LoopData)t.loopData=(new v.LoopDataTranslator).to(e);else if(e instanceof c.EdgeData)t.edgeData=(new y.EdgeDataTranslator).to(e);else if(e instanceof g.FaceData)t.faceData=(new E.FaceDataTranslator).to(e);else if(e instanceof d.ShellData)t.shellData=(new Q.ShellDataTranslator).to(e);else{if(!(e instanceof p.MetaData))throw"not supported";t.metaData=(new m.MetaDataTranslator).to(e)}return t}},{key:"realFrom",value:function(e){if(e.vertexData)return(new b.VertexDataTranslator).from(e.vertexData);if(e.halfEdgeData)return(new B.HalfEdgeDataTranslator).from(e.halfEdgeData);if(e.edge2Data)return(new C.Edge2DataTranslator).from(e.edge2Data);if(e.loopData)return(new v.LoopDataTranslator).from(e.loopData);if(e.edgeData)return(new y.EdgeDataTranslator).from(e.edgeData);if(e.faceData)return(new E.FaceDataTranslator).from(e.faceData);if(e.shellData)return(new Q.ShellDataTranslator).from(e.shellData);if(e.metaData)return(new m.MetaDataTranslator).from(e.metaData);throw"not supported"}}]),t}(s.Translator);t.GeneralDataTranslator=_;var S=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralDataList;return t.generalDatas=(new _).toList(e),t}},{key:"realFrom",value:function(e){return(new _).fromList(e.generalDatas)}}]),t}(s.Translator);t.GeneralDataListTranslator=S},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(711),o=r(422),A=r(353),a=r(284),s=r(354),u=r(239),c=r(522),l=r(423),g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"readMetaData",value:function(e){var t=new u.MetaData(void 0,void 0);return Object.assign(t,e),t}},{key:"readShellData",value:function(e){var t=new c.ShellData(void 0);return Object.assign(t,e),t}},{key:"readFaceData",value:function(e){var t=new A.FaceData(void 0);return Object.assign(t,e),t}},{key:"readLoopData",value:function(e){var t=new s.LoopData(void 0);return Object.assign(t,e),t}},{key:"readEdgeData",value:function(e){var t=new i.EdgeData(void 0);return Object.assign(t,e),t}},{key:"readEdge2Data",value:function(e){var t=new o.Edge2Data(void 0);return Object.assign(t,e),t}},{key:"readHalfEdgeData",value:function(e){var t=new a.HalfEdgeData(void 0);return Object.assign(t,e),t}},{key:"readVertexData",value:function(e){var t=new l.VertexData(void 0);return Object.assign(t,e),t}}]),e}();t.Json=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(239);function i(e){var t=e.metaData;return t?t.version:void 0}function o(e){var t=e.metaData;return t?t.toolVersion:void 0}function A(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.set(i.refId,i)}return t}t.migrateBrepData=function(e){return function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.9.0")>=0)return e;for(var r=A(e.hedgeData),a=e.edge2Data,s=0,u=a.length;s<u;s++){var c=a[s],l=c.halfEdgeIds;if(!(l.length<=0)){for(var g=void 0,f=0,h=l.length;f<h&&!(g=r.get(l[f]));f++);if(g){c.vertexAId=g.vertexAId,c.vertexBId=g.vertexBId;for(var p=0,d=l.length;p<d;p++){var I=l[p];if(I!==g.refId){var y=r.get(I);y&&(y.vertexAId!==c.vertexAId?y.reversed=!0:y.reversed=!1)}}}}}for(var C=e.edgeData,E=0,B=C.length;E<B;E++){var v=C[E],m=v.halfEdge1Id,Q=v.halfEdge2Id,b=void 0;if(null!=m&&(b=r.get(m)),b||null==Q||(b=r.get(Q)),b&&(v.vertexAId=b.vertexAId,v.vertexBId=b.vertexBId,b.reversed=!1,null!=Q&&Q!==b.refId)){var _=r.get(Q);_.vertexAId!==v.vertexAId?_.reversed=!0:_.reversed=!1}}var S=o(e);return e.metaData=new n.MetaData("1.9.0",S),e}(function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.8.9")>=0)return e;for(var r=A(e.faceData),a=A(e.loopData),s=A(e.hedgeData),u=e.originMetaData,c=o(e),l=new n.MetaData("1.8.9",c),g=e.shellData,f=e.vertexData,h=[],p=[],d=[],I=[],y=[],C=0,E=g.length;C<E;C++)for(var B=g[C].faceIds,v=0,m=B.length;v<m;v++){var Q=B[v],b=r.get(Q);b&&h.push(b)}for(var _=0,S=h.length;_<S;_++){var w=h[_],D=w.outerLoopId,R=a.get(D);if(R){p.push(R);var M=w.innerLoopIds;if(M)for(var x=0,P=M.length;x<P;x++){var T=M[x],F=a.get(T);F&&p.push(F)}}}for(var O=0,L=p.length;O<L;O++)for(var N=p[O].halfEdgeIds,k=0,G=N.length;k<G;k++){var U=N[k],j=s.get(U);j&&d.push(j)}for(var V=new Set,H=0,Y=d.length;H<Y;H++){var K=d[H];V.add(K.refId)}for(var q=new Map,J=0,W=e.edgeData.length;J<W;J++){var z=e.edgeData[J],X=z.halfEdge1Id;if(V.has(X)){var Z=q.get(X);Z&&Z!==z?z.halfEdge1Id=void 0:q.set(X,z)}else z.halfEdge1Id=void 0;var $=z.halfEdge2Id;if(V.has($)){var ee=q.get($);ee&&ee!==z?z.halfEdge2Id=void 0:q.set($,z)}else z.halfEdge2Id=void 0;(z.halfEdge1Id||z.halfEdge2Id)&&I.push(z)}for(var te=0,re=e.edge2Data.length;te<re;te++){for(var ne=e.edge2Data[te],ie=[],oe=ne.halfEdgeIds,Ae=0,ae=oe.length;Ae<ae;Ae++){var se=oe[Ae];if(V.has(se)){var ue=q.get(se);ue&&ue!==ne||(q.set(se,ne),ie.push(se))}}ie.length>0&&(ne.halfEdgeIds=ie,y.push(ne))}return{originMetaData:u,metaData:l,shellData:g,faceData:h,loopData:p,edgeData:I,edge2Data:y,hedgeData:d,vertexData:f}}(function(e){for(var t=e,r=void 0,n=void 0,i=[],o=[],A=[],a=[],s=[],u=[],c=[],l=0,g=t.length;l<g;l++){var f=t[l];switch(f.tp){case"M":r=f,n=f;break;case"S":i.push(f);break;case"F":o.push(f);break;case"L":A.push(f);break;case"E":a.push(f);break;case"E2":s.push(f);break;case"H":u.push(f);break;case"V":c.push(f)}}return{metaData:r,originMetaData:n,shellData:i,faceData:o,loopData:A,edgeData:a,edge2Data:s,hedgeData:u,vertexData:c}}(e)))},t.getMetaVersion=i,t.getMetaToolVersion=o,t.getOriginMetaVersion=function(e){var t=e.originMetaData;return t?t.version:void 0}},function(e,t,r){"use strict";var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(239),A=r(1109);function a(e){var t=e.getEdges(),r=!0,n=!1,o=void 0;try{for(var A,a=t[Symbol.iterator]();!(r=(A=a.next()).done);r=!0){var s=A.value;if(s.curve instanceof i.Circle3d){var u=s.curve,c=s.vertexA,l=s.vertexB,g=u.getParam(c.point),f=u.getParam(l.point);i.Num.isBigger(g,f)&&s.swapVertices()}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}function s(e){!function(e){for(var t=function(e){var t=e.getVertices(),r=new Map,i=[],o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=!1,g=!0,f=!1,h=void 0;try{for(var p,d=r[Symbol.iterator]();!(g=(p=d.next()).done);g=!0){var I=n(p.value,2),y=I[0],C=I[1];if(c.point.isEqual(y.point)){C.push(c),l=!0;break}}}catch(e){f=!0,h=e}finally{try{!g&&d.return&&d.return()}finally{if(f)throw h}}l||r.set(c,[c])}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}var E=!0,B=!1,v=void 0;try{for(var m,Q=r[Symbol.iterator]();!(E=(m=Q.next()).done);E=!0){var b=n(m.value,2);(C=b[1]).length>1&&i.push(C)}}catch(e){B=!0,v=e}finally{try{!E&&Q.return&&Q.return()}finally{if(B)throw v}}return i}(e),r=new Map,i=0,o=t.length;i<o;i++)for(var A=t[i],a=A[0],s=1,u=A.length;s<u;s++)r.set(A[s],a);if(r.size<=0)return;var c=e.getEdges(),l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value,I=d.vertexA,y=d.vertexB;r.has(I)&&(d.vertexA=r.get(I)),r.has(y)&&(d.vertexB=r.get(y))}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}}(e);for(var t=function(e){for(var t=[],r=e.faces,n=0,i=r.length;n<i;n++)for(var o=r[n].getLoops(),A=0,a=o.length;A<a;A++)for(var s=o[A].halfEdges,u=0,c=s.length;u<c;u++){var l=s[u];l.vertexA===l.vertexB&&t.push(l)}return t}(e),r=0,i=t.length;r<i;r++){u(t[r])}}function u(e){var t=e.loop;t.removeHalfEdge(e),t.halfEdges.length<=0&&A.quickPurgeLoop(t);var r=e.edge;r.removeHalfEdge(e),r.halfEdges.length<=0&&r.dispose()}t.postMigrateShells=function(e,t){!function(e,t){if(t&&o.MetaData.versionCompare(t,"1.9.0")>=0)return;(function(e){for(var t=0,r=e.length;t<r;t++){a(e[t])}})(e),function(e){for(var t=0,r=e.length;t<r;t++){s(e[t])}}(e)}(e,t),function(e,t){if(t&&o.MetaData.versionCompare(t,"1.10.0")>=0)return;!function(e){for(var t=0,r=e.length;t<r;t++)for(var n=e[t].faces,o=0,A=n.length;o<A;o++){var a=n[o],s=a.surface,u=!0;s&&s instanceof i.CylindricalSurface&&a.outerLoop&&(u=a.outerLoop.isCCW(s)),a.setOuterLoop(a.outerLoop,u)}}(e)}(e,t)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.x=e,i.y=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r(241).MIxBaseGeom);t.MIxVector2d=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(67),i=r(2038),o=r(523),A=r(160),a=r(285),s=r(715),u=r(1117);function c(e){for(var t=[],r=[],n=0,i=e.length;n<i;n++){var o=e[n];if(o instanceof A.Shell){if(o.faces.length<=0)continue;r.push(a.MIxShell.create(o))}t.push(u.topoObjToMIxEntity(o))}return s.BrepValidatorManager.validateShellsTopo(r,!0),t}t.toPBBrep=function(e){var t=e.map((function(e){return e.rawObject()})),r=o.extractIndependentTopoObjs(t);return s.BrepValidatorManager.validateShellsTopo(r.shells.map((function(e){return a.MIxShell.create(e)})),!0),i.ProtoSerializer.toPBBrep(t)},t.toBytes=function(e){var t=this.toPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.shellsToPBBrep=function(e){return s.BrepValidatorManager.validateShellsTopo(e,!0),i.ProtoSerializer.shellsToPBBrep(e.map((function(e){return e.rawObject()})))},t.shellsToBytes=function(e){var t=this.shellsToPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.fromPBBrep=function(e){return c(i.ProtoSerializer.fromPBBrep(e))},t.fromBytes=function(e){return c(i.ProtoSerializer.fromBytes(e))},t.shellsFromPBBrep=function(e){var t=i.ProtoSerializer.shellsFromPBBrep(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t},t.shellsFromBytes=function(e){var t=i.ProtoSerializer.shellsFromBytes(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(67),a=r(239),s=r(2039),u=r(2047),c=r(2048),l=r(160),g=r(2049),f=r(709),h=r(523),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"toPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByTopoObjs(e);return this._toPBBrepImpl(r,t)}},{key:"toBytes",value:function(e,t){var r=this.toPBBrep(e,t);return A.brep.PBBrep.encode(r).finish()}},{key:"shellsToPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByShells(e);return this._toPBBrepImpl(r,t)}},{key:"shellsToBytes",value:function(e,t){var r=this.shellsToPBBrep(e);return A.brep.PBBrep.encode(r).finish()}},{key:"fromPBBrep",value:function(e){var t=new u.DeserializeContext,r=this.getMetaData(e),n=g.ProtoMigrate.migratePBBrep(e);t.curves=o.ProtocolTranslators.CURVE3D.fromList(n.curves),t.surfaces=o.ProtocolTranslators.SURFACE.fromList(n.surfaces),t.vertices=s.BrepTranslators.VERTEX.fromList(n.vertices,t),t.edges=s.BrepTranslators.EDGE.fromList(n.edges,t),t.faces=s.BrepTranslators.FACE.fromList(n.faces,t),t.shells=s.BrepTranslators.SHELL.fromList(n.shells,t);var A={shells:t.shells,faces:t.faces,edges:t.edges,vertices:t.vertices,loops:[],halfEdges:[]},a=h.extractIndependentTopoObjs2(A);f.postProcessTopoObjects(a,r?r.version:void 0);var c=[];return c.push.apply(c,i(a.shells)),c.push.apply(c,i(a.faces)),c.push.apply(c,i(a.loops)),c.push.apply(c,i(a.halfEdges)),c.push.apply(c,i(a.edges)),c.push.apply(c,i(a.vertices)),c}},{key:"fromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.fromPBBrep(t)}catch(e){return[]}}},{key:"shellsFromPBBrep",value:function(e){for(var t=this.fromPBBrep(e),r=[],n=0,i=t.length;n<i;n++){var o=t[n];o instanceof l.Shell&&r.push(o)}return r}},{key:"shellsFromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.shellsFromPBBrep(t)}catch(e){return[]}}},{key:"getMetaData",value:function(e){var t=e.metaData;if(t)return s.BrepTranslators.META.from(t)}},{key:"_toPBBrepImpl",value:function(e,t){var r=new A.brep.PBBrep;return r.metaData=s.BrepTranslators.META.to(t),r.curves=o.ProtocolTranslators.CURVE3D.toList(e.curves),r.surfaces=o.ProtocolTranslators.SURFACE.toList(e.surfaces),r.vertices=s.BrepTranslators.VERTEX.toList(e.vertices,e),r.edges=s.BrepTranslators.EDGE.toList(e.edges,e),r.faces=s.BrepTranslators.FACE.toList(e.faces,e),r.shells=s.BrepTranslators.SHELL.toList(e.shells,e),r}}]),e}();t.ProtoSerializer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2040),i=r(2041),o=r(2042),A=r(2043),a=r(2046);t.BrepTranslators={META:new n.MetaTranslator,VERTEX:new i.VertexTranslator,EDGE:new o.EdgeTranslator,FACE:new A.FaceTranslator,SHELL:new a.ShellTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(239),u=r(67),c=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBMeta;return e.version&&e.version.length>0&&(t.version=e.version),t.toolVersion=e.toolVersion,t}},{key:"realFrom",value:function(e){var t=new s.MetaData;return e.version&&e.version.length>0&&(t.version=e.version),e.toolVersion&&e.toolVersion.length>0&&(t.toolVersion=e.toolVersion),t}}]),t}(a.Translator);t.MetaTranslator=c},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(67),s=r(282),u=r(358),c=r(3),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new a.brep.PBVertex;return t.base=u.toPBTopoObjBase(e),t.position=c.ProtocolTranslators.POINT3D.to(e.point),t}},{key:"realFrom",value:function(e){var t=new s.Vertex(null);return e.base&&u.fromPBTopoObjBase(e.base,t),e.position&&(t.point=c.ProtocolTranslators.POINT3D.from(e.position)),t}}]),t}(c.TranslatorWithContext);t.VertexTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(235),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBEdge;r.base=c.toPBTopoObjBase(e),r.crvIndex=t.getEdgeCurveIndex(e);var n=e.vertexA;n&&(r.vAIndex=t.getVertexIndex(n));var i=e.vertexB;return i&&(r.vBIndex=t.getVertexIndex(i)),r}},{key:"realFrom",value:function(e,t){var r=new u.Edge(null,null,null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.vAIndex){var n=t.getVertex(e.vAIndex);n&&(r.vertexA=n)}if(e.vBIndex){var i=t.getVertex(e.vBIndex);i&&(r.vertexB=i)}var o=t.getCurve3d(e.crvIndex||0);return o?r.curve=o:r.vertexA&&r.vertexB&&(r.curve=a.Line3d.fromSegment(r.vertexA.point,r.vertexB.point)),r}}]),t}(a.TranslatorWithContext);t.EdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(237),c=r(2044),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBFace;n.base=l.toPBTopoObjBase(e),n.srfIndex=r.getFaceSurfaceIndex(e),n.sameDir=e.sameDir,e.outerLoop&&(n.outerLoop=t._loopTranslator.to(e.outerLoop,r));var i=e.innerLoops;return i&&i.length>0&&(n.innerLoops=t._loopTranslator.toList(i,r)),n}},{key:"realFrom",value:function(e,r){var n=new u.Face(null);if(e.base&&l.fromPBTopoObjBase(e.base,n),e.srfIndex){var i=r.getSurface(e.srfIndex);i&&(n.surface=i)}var o=e.sameDir||!1;if(e.outerLoop){var A=t._loopTranslator.from(e.outerLoop,r);n.setOuterLoop(A,o)}if(e.innerLoops)for(var a=t._loopTranslator.fromList(e.innerLoops,r),s=0,c=a.length;s<c;s++)n.addInnerLoop(a[s]);return n}}]),t}(a.TranslatorWithContext);g._loopTranslator=new c.LoopTranslator,t.FaceTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(283),c=r(2045),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBLoop;return n.base=l.toPBTopoObjBase(e),n.halfEdges=t._heTranslator.toList(e.halfEdges,r),n}},{key:"realFrom",value:function(e,r){var n=new u.Loop;if(e.base&&l.fromPBTopoObjBase(e.base,n),e.halfEdges){var i=t._heTranslator.fromList(e.halfEdges,r);n.buildLoop(i)}return n}}]),t}(a.TranslatorWithContext);g._heTranslator=new c.HalfEdgeTranslator,t.LoopTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(238),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBHalfEdge;r.base=c.toPBTopoObjBase(e);var n=e.edge;return n&&(r.edgeIndex=t.getEdgeIndex(n)),r.reversed=e.reversed,r}},{key:"realFrom",value:function(e,t){var r=new u.HalfEdge(null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.edgeIndex){var n=t.getEdge(e.edgeIndex);n&&n.addHalfEdge(r)}return e.reversed&&(r.reversed=e.reversed),r}}]),t}(a.TranslatorWithContext);t.HalfEdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(160),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBShell;r.base=c.toPBTopoObjBase(e);for(var n=e.faces,i=new Array(n.length),o=0,A=n.length;o<A;o++)i[o]=t.getFaceIndex(n[o]);return r.faceIndices=i,r}},{key:"realFrom",value:function(e,t){var r=new u.Shell;e.base&&c.fromPBTopoObjBase(e.base,r);var n=e.faceIndices;if(n)for(var i=0,o=n.length;i<o;i++){var A=t.getFace(n[i]);A&&r.addFace(A)}return r}}]),t}(a.TranslatorWithContext);t.ShellTranslator=l},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getCurve3d",value:function(e){if(!(e<=0))return this._curves.length>=e?this._curves[e-1]:void 0}},{key:"getSurface",value:function(e){if(!(e<=0))return this._surfaces.length>=e?this._surfaces[e-1]:void 0}},{key:"getVertex",value:function(e){if(!(e<=0))return this._vertices.length>=e?this._vertices[e-1]:void 0}},{key:"getEdge",value:function(e){if(!(e<=0))return this._edges.length>=e?this._edges[e-1]:void 0}},{key:"getFace",value:function(e){if(!(e<=0))return this._faces.length>=e?this._faces[e-1]:void 0}},{key:"getShell",value:function(e){if(!(e<=0))return this._shells.length>=e?this._shells[e-1]:void 0}},{key:"curves",get:function(){return this._curves},set:function(e){this._curves=e}},{key:"surfaces",get:function(){return this._surfaces},set:function(e){this._surfaces=e}},{key:"vertices",get:function(){return this._vertices},set:function(e){this._vertices=e}},{key:"edges",get:function(){return this._edges},set:function(e){this._edges=e}},{key:"faces",get:function(){return this._faces},set:function(e){this._faces=e}},{key:"shells",get:function(){return this._shells},set:function(e){this._shells=e}}]),e}();t.DeserializeContext=i},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(282),A=r(235),a=r(237),s=r(160),u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getEdgeCurveIndex",value:function(t){return e.getCurveIndex(t)}},{key:"getFaceSurfaceIndex",value:function(t){return e.getSurfaceIndex(t)}},{key:"getVertexIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getEdgeIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getFaceIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getShellIndex",value:function(t){return e.getSelfIndex(t)}},{key:"addVertex",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SELF_IDX]||(this._vertices.push(t),r[e.SELF_IDX]=this._vertices.length)}},{key:"addEdgeAndCurve",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._edges.push(t),r[e.SELF_IDX]=this._edges.length;var n=t.curve;!n||n instanceof i.Line3d||(this._curves.push(n),r[e.CRV_IDX]=this._curves.length)}}},{key:"addFaceAndSurface",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._faces.push(t),r[e.SELF_IDX]=this._faces.length;var n=t.surface;n&&(this._surfaces.push(n),r[e.SURF_IDX]=this._surfaces.length)}}},{key:"addShell",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SURF_IDX]||(this._shells.push(t),r[e.SURF_IDX]=this._shells.length)}},{key:"curves",get:function(){return this._curves}},{key:"surfaces",get:function(){return this._surfaces}},{key:"vertices",get:function(){return this._vertices}},{key:"edges",get:function(){return this._edges}},{key:"faces",get:function(){return this._faces}},{key:"shells",get:function(){return this._shells}}],[{key:"buildContextByShells",value:function(t){for(var r=new e,n=0,i=t.length;n<i;n++){var o=t[n];this.clearTempMap(o);var A=o.faces;this.clearTempMaps(A);var a=o.getEdgesAndVertices(),s=a.edges;this.clearTempMaps(s);var u=a.vertices;this.clearTempMaps(u),r.addShell(o);for(var c=0,l=A.length;c<l;c++)r.addFaceAndSurface(A[c]);for(var g=0,f=s.length;g<f;g++)r.addEdgeAndCurve(s[g]);for(var h=0,p=u.length;h<p;h++)r.addVertex(u[h])}return r}},{key:"buildContextByTopoObjs",value:function(t){for(var r=[],n=[],i=[],u=[],c=0,l=t.length;c<l;c++){var g=t[c];if(g instanceof a.Face){n.push(g);var f=g.getEdges(),h=!0,p=!1,d=void 0;try{for(var I,y=f[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value;i.push(C)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}var E=g.getVertices(),B=!0,v=!1,m=void 0;try{for(var Q,b=E[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;u.push(_)}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}else if(g instanceof A.Edge)i.push(g),g.vertexA&&u.push(g.vertexA),g.vertexB&&u.push(g.vertexB);else if(g instanceof o.Vertex)u.push(g);else if(g instanceof s.Shell){r.push(g);for(var S=g.faces,w=0,D=S.length;w<D;w++)n.push(S[w]);for(var R=g.getEdgesAndVertices(),M=R.edges,x=R.vertices,P=0,T=M.length;P<T;P++)i.push(M[P]);for(var F=0,O=x.length;F<O;F++)u.push(x[F])}}this.clearTempMaps(r),this.clearTempMaps(n),this.clearTempMaps(i),this.clearTempMaps(u);for(var L=new e,N=0,k=r.length;N<k;N++)L.addShell(r[N]);for(var G=0,U=n.length;G<U;G++)L.addFaceAndSurface(n[G]);for(var j=0,V=i.length;j<V;j++)L.addEdgeAndCurve(i[j]);for(var H=0,Y=u.length;H<Y;H++)L.addVertex(u[H]);return L}},{key:"getOrCreateTempMap",value:function(e){var t=e.temp;return t||(t=new Object,e.temp=t),t}},{key:"clearTempMaps",value:function(e){for(var t=0,r=e.length;t<r;t++)this.clearTempMap(e[t])}},{key:"clearTempMap",value:function(e){var t=e.temp;t&&(delete t[this.SELF_IDX],delete t[this.CRV_IDX],delete t[this.SURF_IDX])}},{key:"getSelfIndex",value:function(e){var t=e.temp;return t&&t[this.SELF_IDX]||0}},{key:"getCurveIndex",value:function(e){var t=e.temp;return t&&t[this.CRV_IDX]||0}},{key:"getSurfaceIndex",value:function(e){var t=e.temp;return t&&t[this.SURF_IDX]||0}}]),e}();u.SELF_IDX="$PB_SELF_IDX",u.CRV_IDX="$PB_CRV_IDX",u.SURF_IDX="$PB_SURF_IDX",t.SerializeContext=u},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"migratePBBrep",value:function(e){return e}}]),e}();t.ProtoMigrate=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(353),c=r(284),l=r(354),g=r(710),f=r(238),h=r(283),p=r(424),d=r(1109),I=function(){function e(){a(this,e),this.errors=[]}return i(e,[{key:"hasError",value:function(){return this.errors.length>0}},{key:"errorMessage",value:function(){for(var e="",t=0,r=this.errors.length;t<r;t++){var n=this.errors[t];e+="Error:{desc:"+n.message()+"; context:"+n.context()+"}\n"}return e}},{key:"tryToFix",value:function(){for(var e=0,t=this.errors.length;e<t;e++){var r=this.errors[e];r.isAmendable?r.amend():r.operation()}}},{key:"validateShell",value:function(e){for(var t=e.faces,r=0,n=t.length;r<n;r++){var i=t[r];i.shell!==e&&this.addError(new C(i,e)),this.validateFace(i)}var o=e.getVertices(),A=!0,a=!1,s=void 0;try{for(var u,c=o[Symbol.iterator]();!(A=(u=c.next()).done);A=!0)for(var l=u.value.getLeadOutHalfEdges(),g=0,f=l.length;g<f;g++){var h=l[g];h.isAdopted()||this.addError(new M(h))}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}}},{key:"validateFace",value:function(e){e!==e.outerLoop.face&&this.addError(new v(e.outerLoop,e)),this.validateLoop(e.outerLoop);for(var t=e.innerLoops,r=0,n=t.length;r<n;r++){var i=t[r];e!==i.face&&this.addError(new v(i,e))}this.validateInnerLoops(t,e)}},{key:"validateLoop",value:function(e){var t=e.halfEdges,r=t.length;if(0!==r)for(var n=0;n<r;n++){var i=(n+1)%r,o=t[n],A=t[i];if(o.loop!==e&&this.addError(new m(e,o)),!s.Num.isEqual(o.getBoundedCurve().length,0)||o.edge&&o.edge.degenerated||this.addError(new x(o)),o.vertexB!==A.vertexA&&this.addError(new E(e,o,A)),o.next!==A&&this.addError(new Q(o,A)),A.prev!==o&&this.addError(new b(A,o)),o.edge&&-1!==o.edge.halfEdges.indexOf(o))for(var a=o.siblings(),u=0,c=a.length;u<c;u++){var l=a[u];null!==l&&(o.edge!==l.edge&&this.addError(new D(o,l)),l.vertexB!==o.vertexA&&l.vertexB!==o.vertexB&&this.addError(new S(o,l)),l.vertexA!==o.vertexA&&l.vertexA!==o.vertexB&&this.addError(new _(o,l)))}else this.addError(new w(o))}else this.addError(new B(e))}},{key:"validateInnerLoops",value:function(e,t){for(var r=0,n=e.length;r<n;r++){var i=e[r];this.validateLoop(i)}if(t.surface instanceof s.Plane)for(var o=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))})),a=t.surface.faceToUV({contour:o,holes:A}),u=new s.GeomLoop2d(a.contour),c=0;c<a.holes.length;c++){var l=new s.GeomLoop2d(a.holes[c]);u.containsLoop(l,!0)||this.addError(new R(e[c],t))}}},{key:"addError",value:function(e){this.errors.push(e)}}],[{key:"validateToConsole",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new e;if(n.validateShell(t),0===n.errors.length)return p.consoleLogInDev("BREP is Valid."),!0;for(var i=n.errors,o=0,A=i.length;o<A;o++){var a=i[o];p.consoleLogInDev(a.message())}return r&&n.tryToFix(),!1}}]),e}();t.BREPValidator=I;var y=function(){function e(){a(this,e),this.isAmendable=!1}return i(e,[{key:"message",value:function(){throw"not implemented"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){throw"not implemented"}},{key:"context",value:function(){throw"not implemented"}}]),e}(),C=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.face=e,n.shell=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"face refers to a shell it doesn't belong to"}},{key:"amend",value:function(){this.face.shell=this.shell}},{key:"operation",value:function(){d.quickPurgeFace(this.face)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),E=function(e){function t(e,r,n){a(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.isAmendable=!1,i.loop=e,i.halfEdge1=r,i.halfEdge2=n,i}return A(t,e),i(t,[{key:"message",value:function(){return"starting point of the following half edge should identically the same as ending of a half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),B=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.loop=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"loop has no half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),v=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"loop refers to different face it belongs to"}},{key:"amend",value:function(){var e=this.face.outerLoop===this.loop,t=this.loop.face,r=!!t&&t.outerLoop===this.loop,n=!!t&&t.innerLoops.indexOf(this.loop)>=0;if(r||n){var i=this.loop.halfEdges.map((function(e){return new f.HalfEdge(e.edge,e.reversed)})),o=new h.Loop(i);e?this.face.setOuterLoop(o):(this.face.removeInnerLoop(this.loop),this.face.addInnerLoop(o));for(var A=0,a=i.length;A<a;A++)g.IdAssigner.assignToHalfEdge(i[A]);this.loop.face=t}else this.loop.face=this.face}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face),this.loop.face?u.FaceData.extractTopo(e,this.loop.face):l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),m=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.halfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge refers to different loop it belongs to"}},{key:"amend",value:function(){this.halfEdge.loop=this.loop}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop),c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),Q=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.nextHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's next pointer doesn't refer to real next half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.nextHalfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),b=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.prevHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's prev pointer doesn't refer to prior half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.prevHalfEdge),c.HalfEdgeData.extractTopo(e,this.halfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),_=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect start vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),S=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect end vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),w=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't correctly refer to an edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),D=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"edge of sibling doesn't match to the half edge's edge"}},{key:"amend",value:function(){this.sibling.edge=this.halfEdge.edge}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),R=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.innerLoop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"inner loop is outside of face's outer loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.innerLoop)}},{key:"context",value:function(){try{var e=new Map;this.innerLoop.face&&u.FaceData.extractTopo(e,this.innerLoop.face),l.LoopData.extractTopo(e,this.innerLoop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),M=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't refer to any loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),x=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge with zero length"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y)},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"changeErrorHandler",value:function(t){e.errorHandler=t}},{key:"changeModelDataHandler",value:function(t){e.dataHandler=t}},{key:"onErrorOccurred",value:function(t,r){if(e.errorHandler){var n="geom-modeling-kernel:";r&&r.trim().length>0&&(n=n+"("+r.trim()+")"),e.errorHandler(t,n)}}},{key:"uploadErrorModelData",value:function(t,r){e.dataHandler&&e.dataHandler(t,r)}}]),e}();t.ErrorManager=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2053),i=r(357),o=r(285),A=r(1116);t.polygonizeShell=function(e,t,r){var a=n.Polygonize.polygonizeShell(e.rawObject(),t,r),s=o.MIxShell.create(a.shell),u=new Map;a.faceMap.forEach((function(e,t){var r=i.MIxFace.create(t),n=[];e.forEach((function(e){n.push(i.MIxFace.create(e))})),u.set(r,n)}));var c=new Map;return a.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),c.set(r,n)})),{shell:s,faceMap:u,edgeMap:c}},t.polygonizeFace=function(e,t,r){var o=n.Polygonize.polygonizeFace(e.rawObject(),t,r),a=[];o.faces.forEach((function(e){a.push(i.MIxFace.create(e))}));var s=new Map;return o.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),s.set(r,n)})),{faces:a,edgeMap:s}}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(235),A=r(237),a=r(238),s=r(283),u=r(160),c=r(282),l=r(710),g=r(716),f=r(2054),h=r(2056),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"polygonizeShell",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=[],s=[],c=!0,g=!1,f=void 0;try{for(var h,p=t.faces[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=h.value;a.push(d);var I=e.polygonMeshOnFace(d,!1,o,A);if(I.isEmpty())return{shell:new u.Shell,faceMap:new Map,edgeMap:new Map};s.push(I)}}catch(e){g=!0,f=e}finally{try{!c&&p.return&&p.return()}finally{if(g)throw f}}var y=e.getResultMapByShell(t,s);e.mergeCoplanarFaceOnFaceList(y,A),e.mergeCollinearEdgeOnFace(y,A);var C=e.getEdgesFromShell(t),E=e.reversedMapInfo({faces:a,edges:C},y),B=new u.Shell;return E.faceList.forEach((function(e){B.addFace(e)})),l.IdAssigner.assignToShell(B),{shell:B,faceMap:E.faceMap,edgeMap:E.edgeMap}}},{key:"polygonizeFace",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=e.polygonMeshOnFace(t,!0,o,A);if(a.isEmpty())return{faces:[],edgeMap:new Map};var s=e.getResultMapByFace(t,a);e.mergeCoplanarFaceOnFaceList(s,A),e.mergeCollinearEdgeOnFace(s,A);var u=e.getEdgesFromFace(t),c=e.reversedMapInfo({faces:[t],edges:u},s);return{faces:c.faceList,edgeMap:c.edgeMap}}},{key:"polygonMeshOnFace",value:function(t,r,n,o){o=o||i.Tolerance.Tolerance.global;var A=n;i.Num.isInRange(n,0,1,!0,!0,o.numTol)||(A=e.defaultNormTol);var a=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),s=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));if(null===t.surface)return new g.PolygonMesh;var u=[];return u.push(t.outerLoop.halfEdges.map((function(e){return e.edge.degenerated}))),u.push.apply(u,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.edge.degenerated}))})))),r?f.PolygonMeshOnSurface.polygonMeshOnSingleSurface3d(a,s,u,t.surface,t.sameDir,A,o):f.PolygonMeshOnSurface.polygonMeshOnSurface3d(a,s,u,t.surface,t.sameDir,A,o)}},{key:"getResultMapByFace",value:function(t,r){if(t.surface instanceof i.Plane)return e.makeFaceByPolygonMeshWithPlane(r);var n=new u.Shell;return n.addFace(t),this.getResultMapByShell(n,[r])}},{key:"getResultMapByShell",value:function(t,r){var n=e.buildVertexIndex(t),i=new Array,o=[],A=e.buildEdgeIndex(t,i,o),a=h.PolygonMeshUtil.mergePolygonMesh(r,i,n,A,o);return a.pgm.isEmpty()?{faceIndexMap:new Map,edgeIndexMap:new Map}:e.makeFacesByPolygonMesh(a)}},{key:"buildVertexIndex",value:function(e){var t=[],r=e.getVertices(),n=0,i=new Map,o=!0,A=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;i.set(c,n++)}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return e.faces.forEach((function(e){var r=e.getHalfEdges(),n=[];r.forEach((function(e){n.push(i.get(e.vertexA))})),t.push(n)})),t}},{key:"buildEdgeIndex",value:function(e,t,r){for(var n=Array.from(e.getEdges()),i=new Map,o=0,A=n.length;o<A;++o)i.set(n[o],o),t.push(n[o].getBoundedCurve());var a=e.faces,s=[];return a.forEach((function(e){var t=e.getHalfEdges(),n=[],o=[];t.forEach((function(e){var t=i.get(e.edge);n.push({index:t,isReversed:e.reversed}),o.push(e.reversed)})),s.push(n),r.push(o)})),s}},{key:"makeFaceByPolygonMeshWithPlane",value:function(t){if(!t.onPlane)return{faceIndexMap:new Map,edgeIndexMap:new Map};if(0===t.coords.length||1!==t.mSurfaces.length||1!==t.isSameDir.length||t.boundedIndices.length<1||t.boundedIndices.length!==t.boundedEdgePos.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var r=[];t.coords.forEach((function(e){r.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.boundedIndices,r);var n=new A.Face(t.mSurfaces[0]),i=t.coordIndices,o=e.makeLoopByVertexAndIndex(r,i[0]);n.setOuterLoop(o,t.isSameDir[0]);for(var a=1,s=i.length;a<s;++a){var u=e.makeLoopByVertexAndIndex(r,i[a]);if(null===u)return{faceIndexMap:new Map,edgeIndexMap:new Map};n.addInnerLoop(u)}var l=new Map;return l.set(n,0),{faceIndexMap:l,edgeIndexMap:e.setSoftTagWithEdge(t.boundedIndices,r)}}},{key:"makeFacesByPolygonMesh",value:function(t){var r=t.pgm.coords.length,n=t.pgm.coordIndices.length;if(0===r||0===n||t.pgm.markLoop.length!==n||t.pgm.isSameDir.length!==t.pgm.mSurfaces.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var i=[];t.pgm.coords.forEach((function(e){i.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.pgm.boundedIndices,i);for(var o=new Set,a=t.pgm.mSurfaces,s=t.pgm.coordIndices,u=new Map,l=0,g=0,f=0,h=s.length;f<h;f++){var p=t.pgm.markLoop[f];if(f>t.range[g]&&g++,-1!==p){var d=new A.Face(a[l]),I=e.makeLoopByVertexAndIndex(i,s[f]);for(d.setOuterLoop(I),f++;f<h&&1===t.pgm.markLoop[f];){var y=e.makeLoopByVertexAndIndex(i,s[f]);if(null===y)return{faceIndexMap:new Map,edgeIndexMap:new Map};d.addInnerLoop(y),f++}o.add(d),u.set(d,g),f--}else{var C=e.makeLoopByVertexAndIndex(i,s[f]);if(null!==C&&null!==a[l]){var E=new A.Face(a[l]);E.setOuterLoop(C),o.add(E),u.set(E,g)}}l++}return{faceIndexMap:u,edgeIndexMap:e.setSoftTagWithEdge(t.pgm.boundedIndices,i)}}},{key:"setSoftTagWithVertex",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var o,A=e[Symbol.iterator]();!(r=(o=A.next()).done);r=!0)for(var a=o.value,s=1,u=a.length;s<u;++s)0!==s&&s!==u-1&&(t[a[s]].isSoft=!0)}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}}},{key:"setSoftTagWithEdge",value:function(t,r){var n=new Map,i=r.length,o=0,A=!0,a=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){for(var l=u.value,g=1,f=l.length;g<f;++g){var h=l[g],p=l[g-1];if(h<i&&h>=0&&p<i&&p>=0){var d=e.setSoftOnEdgeByVertex(r[l[g]],r[l[g-1]]);d&&n.set(d,{bcIndex:o,posIndex:g})}}o++}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"setSoftOnEdgeByVertex",value:function(e,t){var r=e.edges,n=!0,i=!1,o=void 0;try{for(var A,a=r[Symbol.iterator]();!(n=(A=a.next()).done);n=!0){var s=A.value;if(s.vertexA===e&&s.vertexB===t||s.vertexB===e&&s.vertexA===t)return s.isSoft=!1,s}}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}},{key:"makeLoopByVertexAndIndex",value:function(t,r){var n=r.length;if(n<1)return null;for(var i=[],o=r[n-1],A=t[o],u=0,c=n;u<c;++u){var l=r[u],g=t[l],f=e.makeEdgeByVertex(A,g);A.point.isEqual(g.point)&&(f.degenerated=!0),i.push(new a.HalfEdge(f,f.vertexA!==A)),A=g,o=l}return new s.Loop(i)}},{key:"makeUniqueEdgeByVertex",value:function(e,t){var r=new o.Edge(i.Line3d.fromSegment(e.point,t.point),e,t);return r.isSoft=!0,r}},{key:"makeEdgeByVertex",value:function(t,r){var n=t.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;if(u.vertexA===t&&u.vertexB===r||u.vertexB===t&&u.vertexA===r)return u}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}var c=r.edges,l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value;if(d.vertexA===t&&d.vertexB===r||d.vertexB===t&&d.vertexA===r)return d}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}return e.makeUniqueEdgeByVertex(t,r)}},{key:"mergeCoplanarFaceOnFaceList",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getEdges().forEach((function(e){n.add(e)}))}));var i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value,c=u.halfEdges;if(u.isSoft&&2===c.length){var l=e.mergeFaceWithHalfEdge(c[0],c[1],r);if(null!==l){var g=c[0].loop.face,f=c[1].loop.face,h=t.faceIndexMap.get(g),p=t.faceIndexMap.get(f);void 0!==h&&void 0!==p&&(t.faceIndexMap.delete(g),t.faceIndexMap.delete(f),t.faceIndexMap.set(l,h),t.edgeIndexMap.delete(u))}}}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}}},{key:"mergeFaceWithHalfEdge",value:function(t,r,n){if(null===t.loop||null===t.loop.face||null===r.loop||null===r.loop.face)return null;var o=t.loop.face,a=r.loop.face;if(null===o||null===a)return null;var u=o.surface,c=a.surface;if(!(u instanceof i.Plane&&c instanceof i.Plane&&t.reversed!==r.reversed))return null;if(u.normal.isSameDirection(c.normal,n)){var l=o.outerLoop,g=a.outerLoop,f=e.findHalfEdgePosInLoop(l,t),h=e.findHalfEdgePosInLoop(g,r);if(-1===f||-1===h)return null;for(var p=l.halfEdges,d=g.halfEdges,I=p.length,y=d.length,C=[],E=f+1,B=f+I;E<B;++E)C.push(p[E%I]);for(var v=h+1,m=h+y;v<m;++v)C.push(d[v%y]);var Q=new A.Face(u);Q.setOuterLoop(new s.Loop(C),o.sameDir);var b=t.edge;return t.vertexA.removeEdge(b),r.vertexA.removeEdge(b),Q}return null}},{key:"findHalfEdgePosInLoop",value:function(e,t){for(var r=e.halfEdges,n=-1,i=0,o=r.length;i<o;++i)if(r[i]===t){n=i;break}return n}},{key:"mergeCollinearEdgeOnFace",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getVertices().forEach((function(e){n.add(e)}))})),n.forEach((function(n){e.judgeValidityForVertexByEdges(n,r)&&e.removeVertex(t,n)}))}},{key:"judgeValidityForVertexByEdges",value:function(e,t){var r=e.edges;if(2===r.length){var n=r[0],o=r[1],A=!0,a=!1,s=void 0;try{for(var u,c=n.halfEdges[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){if(0!==u.value.loop.face.innerLoops.length)return!1}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var l=!0,g=!1,f=void 0;try{for(var h,p=o.halfEdges[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){if(0!==h.value.loop.face.innerLoops.length)return!1}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}if(n.isSoft===o.isSoft&&n.curve instanceof i.Line3d&&o.curve instanceof i.Line3d){var d=n.curve,I=o.curve;if(d.direction.isParallel(I.direction,t))return!0}}return!1}},{key:"removeVertex",value:function(t,r){var n=r.getLeadInHalfEdges(),i=r.getLeadOutHalfEdges();if(2===n.length||2===i.length){var o=i[0],A=i[1],s=n[0],u=n[1],c=o.edge,l=A.edge,g=o.vertexB,f=A.vertexB,h=e.makeEdgeByVertex(g,f);h.isSoft=c.isSoft;var p=new a.HalfEdge(h,!0);e.updateFaceWithHF(t.faceIndexMap,p,o,s,u),p=new a.HalfEdge(h,!1),e.updateFaceWithHF(t.faceIndexMap,p,A,s,u),r.removeEdge(c),r.removeEdge(l),g.removeEdge(c),f.removeEdge(l);var d=t.edgeIndexMap.get(c),I=t.edgeIndexMap.get(l);d&&I&&d.bcIndex===I.bcIndex&&(t.edgeIndexMap.delete(c),t.edgeIndexMap.delete(l),d.posIndex>I.posIndex?t.edgeIndexMap.set(h,I):t.edgeIndexMap.set(h,d))}}},{key:"updateFaceWithHF",value:function(e,t,r,n,i){var o=new Array;o.push(t);for(var a=r.next;null!==a&&a!==n&&a!==i;)o.push(a),a=a.next;var u=new s.Loop(o),c=r.loop.face,l=new A.Face(c.surface);l.setOuterLoop(u,c.sameDir);var g=e.get(c);void 0!==g&&(e.delete(c),e.set(l,g))}},{key:"getEdgesFromShell",value:function(e){return Array.from(e.getEdges())}},{key:"getEdgesFromFace",value:function(e){var t=[];return e.outerLoop.halfEdges.map((function(e){return t.push(e.edge)})),e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return t.push(e.edge)}))})),t}},{key:"reversedMapInfo",value:function(e,t){var r=new Map,n=e.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;r.set(u,[])}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}t.edgeIndexMap.forEach((function(e,t){var i=n[e.bcIndex],o=r.get(i);o&&o.push({edge:t,order:e.posIndex})}));var c=new Map;r.forEach((function(e,t){e.sort((function(e,t){return e.order-t.order}));var r=[];e.forEach((function(e){r.push(e.edge)})),c.set(t,r)}));var l=[],g=new Map,f=e.faces;return f.forEach((function(e){g.set(e,new Array)})),t.faceIndexMap.forEach((function(e,t){var r=f[e],n=g.get(r);n&&n.push(t),l.push(t)})),{faceList:l,faceMap:g,edgeMap:c}}}]),e}();p.defaultNormTol=1-Math.cos(Math.PI/9),t.Polygonize=p},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function A(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(716),u=r(2055),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"polygonMeshOnSingleSurface3d",value:function(t,r,n,i,o,A,s){var u=e.polygonMeshOnSurface3d(t,r,n,i,o,A,s);return null===u||i instanceof a.Plane||u.planarMesh(),u}},{key:"polygonMeshOnSurface3d",value:function(t,r,n,i,o,A,s){return i instanceof a.Plane?e.polygonMeshOnPlane(t,r,i,o,A):e.polygonMeshOnNonPlane(t,r,n,i,o,A,s)}},{key:"polygonMeshOnPlane",value:function(e,t,r,n,i){var o=[],A=[];return e.forEach((function(e){var t=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);o.push(t)})),t.forEach((function(e){var t=[];e.forEach((function(e){var r=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);t.push(r)})),A.push(t)})),s.PolygonMesh.makePolygonMeshByLoops(o,A,r,n)}},{key:"polygonMeshOnNonPlane",value:function(t,r,n,i,o,A,c){var l=e.getOrderUVBoundedCurve(i,t,r,c),g=void 0;g=i instanceof a.NurbsSurface?e.calculateUVOffset(i,l.uvContour,c):[0,0];var f=u.PolygonOnUVFace.tessUVDomain(i,l.uvContour,g[0],g[1],A),h=u.PolygonOnUVFace.getUVPolygons(l.uvContour,l.uvHole,g,f,c);if(0===h.length||0===h[0].length)return new s.PolygonMesh;var p=u.PolygonOnUVFace.getRectMesh(i,f),d=e.getEndpointOfUVBoundedCurve(l.uvContour,l.uvHole,g),I=e.getPointsByDegenerateEdge(n,t,r),y=[],C=[],E=e.getPolygonByRectMesh(h,p,i,o,d,C,y,I,c);return 0===E.length?new s.PolygonMesh:s.PolygonMesh.makePolygonMeshByPolygon(E,C,y,o)}},{key:"getOrderUVBoundedCurve",value:function(e,t,r,n){var i={contour:t,holes:r},o=e.faceToUV(i,n).mapping,A=[],a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;A.push(o.get(g))}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}var f=[],h=!0,p=!1,d=void 0;try{for(var I,y=r[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value,E=[],B=!0,v=!1,m=void 0;try{for(var Q,b=C[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;E.push(o.get(_))}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}f.push(E)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}return{uvContour:A,uvHole:f}}},{key:"getEndpointOfUVBoundedCurve",value:function(e,t,r){var n=[],i=[];i.push(e),null!==t&&i.push.apply(i,A(t));var o=!0,a=!1,s=void 0;try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value,g=[],f=!0,h=!1,p=void 0;try{for(var d,I=l[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value.startPoint;g.push({x:y.x+r[0],y:y.y+r[1]})}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}n.push(g)}}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"getPointsByDegenerateEdge",value:function(e,t,r){for(var n=[],i=0,o=e.length;i<o;++i)for(var A=e[i],a=0,s=A.length;a<s;++a)A[a]&&(0==i?n.push(t[a].startPoint):n.push(r[i-1][a].startPoint));return n}},{key:"calculateUVOffset",value:function(t,r,n){n=n||a.Tolerance.Tolerance.global;var i=t.isUPeriodic(n),o=t.isVPeriodic(n);if(!i&&!o||0===r.length)return[0,0];var A=0,s=0,u=!0,c=!1,l=void 0;try{for(var g,f=r[Symbol.iterator]();!(u=(g=f.next()).done);u=!0){var h=g.value;A+=h.startPoint.x,s+=h.startPoint.y}}catch(e){c=!0,l=e}finally{try{!u&&f.return&&f.return()}finally{if(c)throw l}}A/=r.length,s/=r.length;var p=t.domainU,d=t.domainV,I=p.end-p.start,y=d.end-d.start;return[e.calculateOffset(p.start,p.end,I,A)*I,e.calculateOffset(d.start,d.end,y,s)*y]}},{key:"calculateOffset",value:function(e,t,r,n){for(var i=0;n>t;)n-=r,i--;for(;n<e;)n+=r,i++;return i}},{key:"getPolygonByRectMesh",value:function(t,r,n,i,o,s,u,c,l){for(var g=[],f=[],h=new Map,p=new Map,d=a.simplifyPolygonsByHorizontal(t,!0),I=a.simplifyPolygonsByHorizontal(d,!1),y=0,C=r.length;y<C;++y){var E=r[y];a.addRect(I,E,g,f,h,p)}var B=[],v=e.dealWithInnerPolygons(g,B),m=e.dealWithIntersectPolygons(f,B,t),Q=[],b=new Map;e.mergeInnerPolygons(Q,s,v,b,n,i,B);var _=new Map,S=[];o.forEach((function(e){return S.push.apply(S,A(e))}));var w=Q.length,D=!0,R=!1,M=void 0;try{for(var x,P=m[Symbol.iterator]();!(D=(x=P.next()).done);D=!0){var T=x.value;e.mergeIntersectPolygons(Q,s,T,b,n,i,B[w],S,_,c,l),w++}}catch(e){R=!0,M=e}finally{try{!D&&P.return&&P.return()}finally{if(R)throw M}}if(_.size!==S.length)return[];var F=e.getBoundedEndpointOnPolygon(o,_);return 0===F.length?[]:(u.push.apply(u,A(F)),Q)}},{key:"getBoundedEndpointOnPolygon",value:function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,s=e[Symbol.iterator]();!(n=(A=s.next()).done);n=!0){var u=A.value;if(0===u.length)break;var c=u[0],l=t.get(c);if(!l)break;for(var g=1,f=u.length;g<f;++g){var h=u[g],p=t.get(h);if(!p)return[];a.Num.isEqual(c.x,h.x)&&a.Num.isEqual(c.y,h.y)||(r.push(l),r.push(p)),l=p,c=h}var d=u[0],I=t.get(d);if(!I)return[];a.Num.isEqual(c.x,d.x)&&a.Num.isEqual(c.y,d.y)||(r.push(l),r.push(I))}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}},{key:"dealWithInnerPolygons",value:function(t,r){var n=new Map,o=[],A=!0,a=!1,s=void 0;try{for(var u,c=function(){var t=u.value,i=e.makePlaneByRectMeshNode(t);if(null===i)return{v:[]};r.push(i);var A=[];t.corners.forEach((function(t){var r=e.getPolyPtBySurfPtMapPolyPt(n,t);A.push(r)})),o.push(A)},l=t[Symbol.iterator]();!(A=(u=l.next()).done);A=!0){var g=c();if("object"===(void 0===g?"undefined":i(g)))return g.v}}catch(e){a=!0,s=e}finally{try{!A&&l.return&&l.return()}finally{if(a)throw s}}return o}},{key:"dealWithIntersectPolygons",value:function(t,r,n){for(var o=[],A=function(i,A){var s=t[i],u=e.makePlaneByRectMeshNode(s);if(null===u)return{v:[]};r.push(u);var c=[];s.corners.forEach((function(e){c.push({x:e.uv[0],y:e.uv[1]})}));for(var l=a.simplifyPolygons(a.clipping(n,c)),g=0,f=l.length;g<f;++g){var h=l[g].length;if(h>0){var p=l[g][0],d=l[g][h-1];a.Num.isEqual(p.x,d.x)&&a.Num.isEqual(p.y,d.y)&&l[g].pop()}}for(var I=[],y=0;y<4;++y){var C=s.getAllCorners(y),E=!0,B=!1,v=void 0;try{for(var m,Q=function(){var e=m.value;s.corners.some((function(t){return t===e}))||I.push({x:e.uv[0],y:e.uv[1],id:e.id})},b=C[Symbol.iterator]();!(E=(m=b.next()).done);E=!0)Q()}catch(e){B=!0,v=e}finally{try{!E&&b.return&&b.return()}finally{if(B)throw v}}}var _=a.Tolerance.Tolerance.global;if(I.length){var S=!0,w=!1,D=void 0;try{for(var R,M=I[Symbol.iterator]();!(S=(R=M.next()).done);S=!0){var x=R.value,P=new a.Point2d(x.x,x.y),T=!0,F=!1,O=void 0;try{for(var L,N=l[Symbol.iterator]();!(T=(L=N.next()).done);T=!0)for(var k=L.value,G=0,U=k.length;G<U;++G){var j=new a.LineSeg2d(new a.Point2d(k[G].x,k[G].y),new a.Point2d(k[(G+1)%U].x,k[(G+1)%U].y));if((j.direction.isParallel(new a.Vector2d(1,0),_)||j.direction.isParallel(new a.Vector2d(0,1),_))&&j.isPointOnCurve(P,_)){k.splice(G+1,0,x);break}}}catch(e){F=!0,O=e}finally{try{!T&&N.return&&N.return()}finally{if(F)throw O}}}}catch(e){w=!0,D=e}finally{try{!S&&M.return&&M.return()}finally{if(w)throw D}}}o.push(l)},s=0,u=t.length;s<u;++s){var c=A(s);if("object"===(void 0===c?"undefined":i(c)))return c.v}return o}},{key:"mergeInnerPolygons",value:function(e,t,r,n,i,o,A){var s=0,u=!0,c=!1,l=void 0;try{for(var g,f=function(){var r=g.value,u=A[s++],c=[];r.forEach((function(e){var t=n.get(e);if(!t){var r=new a.UV(e.x,e.y);t=i.getPoint(r),n.set(e,t)}c.push(t)})),0!==c.length&&(o||c.reverse(),e.push(c),t.push(u))},h=r[Symbol.iterator]();!(u=(g=h.next()).done);u=!0)f()}catch(e){c=!0,l=e}finally{try{!u&&h.return&&h.return()}finally{if(c)throw l}}}},{key:"mergeIntersectPolygons",value:function(t,r,n,i,o,A,s,u,c,l,g){var f=!0,h=!1,p=void 0;try{for(var d,I=function(){var n=d.value,f=new Set;if(n.forEach((function(t){var r=e.findPointInMap(i,t);if(null===r){var n=new a.UV(t.x,t.y);r=o.getPoint(n),i.set(t,r)}var A=!0,s=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(A=(p=d.next()).done);A=!0){var I=p.value;I.isEqual(r,g.distTol)&&(r=I)}}catch(e){s=!0,h=e}finally{try{!A&&d.return&&d.return()}finally{if(s)throw h}}f.add(r),e.matchBoundedEndpoint(u,c,t,r)})),0!==f.size){var h=Array.from(f);A||h.reverse(),t.push(h),r.push(s)}},y=n[Symbol.iterator]();!(f=(d=y.next()).done);f=!0)I()}catch(e){h=!0,p=e}finally{try{!f&&y.return&&y.return()}finally{if(h)throw p}}}},{key:"matchBoundedEndpoint",value:function(e,t,r,n){var i=!0,o=!1,A=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(c.x,r.x)&&a.Num.isEqual(c.y,r.y)){t.set(c,n);break}}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}}},{key:"findPointInMap",value:function(e,t){var r=t.x,n=t.y,i=!0,o=!1,A=void 0;try{for(var s,u=e.entries()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(r,c[0].x)&&a.Num.isEqual(n,c[0].y))return c[1]}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}return null}},{key:"makePlaneByRectMeshNode",value:function(e){if(e.corners.length<4)return null;var t=new a.Point3d(e.corners[0].point),r=new a.Point3d(e.corners[1].point),n=new a.Point3d(e.corners[2].point),i=void 0;return t.isEqual(r)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,n,i)):t.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(r,n,i)):r.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,r,i)):a.Plane.makePlaneByTreePoints(t,r,n)}},{key:"getPolyPtBySurfPtMapPolyPt",value:function(e,t){var r=e.get(t);return r||(r={x:t.uv[0],y:t.uv[1]},e.set(t,r)),r}}]),e}();t.PolygonMeshOnSurface=c},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"getUVPolygons",value:function(e,t,r,n,A){var a=this,s=this.makeCrosswordLine(n);if(0===s.length)return[];var u=[];u.push(e),null!==t&&u.push.apply(u,i(t));for(var c=[],l=function(e,t){var n=[];u[e].forEach((function(e){var t=a.boundedCurveIntersectIsoLine(e,s,A);t.splice(t.length-1,1),n.push.apply(n,i(t))})),o.LoopCCW.isPolygonCCW2D(n)!==(0===e)&&n.reverse();var l=new Array;n.forEach((function(e){l.push({x:e.x+r[0],y:e.y+r[1]})})),c.push(l)},g=0,f=u.length;g<f;g++)l(g);return c}},{key:"makeCrosswordLine",value:function(e){if(2!==e.length)return[];for(var t=e[0],r=e[1],n=[],i=1,A=t.length;i<A-1;i++)n.push(new o.Line2d(new o.Point2d(t[i],0),o.Vector2d.yAxis));for(var a=[],s=1,u=r.length;s<u-1;s++)a.push(new o.Line2d(new o.Point2d(0,r[s]),o.Vector2d.xAxis));return[n,a]}},{key:"boundedCurveIntersectIsoLine",value:function(e,t,r){var n=new Array,A=e.getBounding(),a=A.min,s=A.max;t[0].forEach((function(t){var A=t.p0.x;if(o.Num.isInRange(A,a.x,s.x,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),t[1].forEach((function(t){var A=t.p0.y;if(o.Num.isInRange(A,a.y,s.y,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),n.push({point:e.startPoint,param1:e.domain.start,param2:0,isOverlap:!1}),n.push({point:e.endPoint,param1:e.domain.end,param2:0,isOverlap:!1}),n.sort((function(e,t){return e.param1<t.param1?-1:e.param1>t.param1?1:0})),this.filterRepeatData(n,r);var u=[];return n.forEach((function(e){u.push(e.point)})),u}},{key:"tessUVDomain",value:function(e,t,r,n,i){var A=i,a=this.getUVBox(t,r,n),s=void 0;if(e instanceof o.ConicalSurface||e instanceof o.CylindricalSurface)s=this.adaptiveDomainOfCylinderCone(e,a[0],a[1],A);else if(e instanceof o.SurfaceOfLinearExtrusion)s=this.adaptiveDomainOfLinearExtrusion(e,a[1],A);else if(e instanceof o.RevolveSurface)s=this.adaptiveDomainOfRevolve(e,a[0],a[1],A);else if(e instanceof o.ToroidalSurface)s=this.adaptiveDomainOfToroidal(a[0],a[1],A);else{if(!(e instanceof o.NurbsSurface))throw"not implement";s=this.adaptiveDomainOfNurbs(e,a[0],a[1],A)}return s}},{key:"adaptiveDomainOfCylinderCone",value:function(t,r,n,i){var A=void 0;if(A=(o.ConicalSurface,t.radius),o.Num.isEqual(A,0))return[];var a=new o.Arc3d(new o.Circle3d(t.ccs,A),r.start,r.end).tessCurveAdaptiveByNormalTol(r.start,r.end,i),s=a.length,u=new Array,c=!0,l=!1,g=void 0;try{for(var f,h=a[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;u.push(p.t)}}catch(e){l=!0,g=e}finally{try{!c&&h.return&&h.return()}finally{if(l)throw g}}var d=r.length*A,I=n.length,y=Math.floor(I/d*s);return y=Math.min(y>0?y:1,e.maxDiscreteSeg),[u,this.splitDomain(n,n.length/y)]}},{key:"adaptiveDomainOfLinearExtrusion",value:function(t,r,n){for(var i=t.baseCurve,o=i.getApproximatePtInfosByNormalTol(n),A=o.length,a=new Array,s=0;s<A;++s)a.push(o[s].t);var u=i.length,c=t.height,l=Math.floor(c/u*A);return l=l>0?l:1,l=Math.min(l>0?l:1,e.maxDiscreteSeg),[a,this.splitDomain(r,r.length/l)]}},{key:"adaptiveDomainOfRevolve",value:function(t,r,n,i){var A=t.baseCurve,a=A.domain.middle,s=new o.LineSeg2d(new o.Point2d(r.start,a),new o.Point2d(r.end,a)),u=t.uvCurveTo3d(s),c=u.tessCurveAdaptiveByNormalTol(r.start,r.end,i).length,l=this.splitDomain(r,r.length/c),g=A.tessCurveAdaptiveByNormalTol(n.start,n.end,i),f=[],h=g.length,p=Math.floor(A.length/u.length*c)+1;if(p=Math.min(p,e.maxDiscreteSeg),h<c/2&&h<p)f=this.splitDomain(n,n.length/p);else for(var d=0;d<h;++d)f.push(g[d].t);return[l,f]}},{key:"adaptiveDomainOfToroidal",value:function(e,t,r){var n=new o.Circle3d(new o.CCS3d,1),i=new o.Arc3d(n,e.start,e.end).tessCurveAdaptiveByNormalTol(e.start,e.end,r).length,A=this.splitDomain(e,e.length/i),a=new o.Arc3d(n,t.start,t.end).tessCurveAdaptiveByNormalTol(t.start,t.end,r).length;return[A,this.splitDomain(t,t.length/a)]}},{key:"splitDomain",value:function(e,t){for(var r=e.start,n=e.end,i=e.length,o=Math.ceil(i/t),A=i/o,a=new Array,s=0;s<o;++s)a.push(r+s*A);return a.push(n),a}},{key:"adaptiveDomainOfNurbs",value:function(e,t,r,n){var i=t.end,o=t.start,A=r.end,a=r.start,s=[];e.degreeU>1&&e.isoCurve((A+a)/2,!0).tessCurveAdaptiveByNormalTol(o,i,n).forEach((function(e){s.push(e.t)}));var u=e.controlPoints.length*e.degreeU;if(s.length<u){s.splice(0,s.length);for(var c=(i-o)/(u-1),l=0;l<u;l++)s.push(o+c*l)}var g=[];e.degreeV>1&&e.isoCurve((i+o)/2,!1).tessCurveAdaptiveByNormalTol(a,A,n).forEach((function(e){g.push(e.t)}));var f=e.controlPoints[0].length*e.degreeV;if(g.length<f){g.splice(0,g.length);for(var h=(A-a)/(f-1),p=0;p<f;p++)g.push(a+h*p)}return[s,g]}},{key:"getRectMesh",value:function(e,t){for(var r=t[0].length-1,n=t[1].length-1,i=new Array(r*n),A=[],a=0;a<n+1;a++){for(var s=new Array,u=0;u<r+1;u++){var c=t[0][u],l=t[1][a],g=new o.UV(c,l),f=e.tangentUWithLen(g),h=e.tangentVWithLen(g),p=e.getPoint(g),d=f.cross(h).normalized();s.push(new o.SurfacePoint([p.x,p.y,p.z],[d.x,d.y,d.z],[g.u,g.v],-1,o.Num.isZero(d.length)))}A.push(s)}for(var I=0;I<n;I++)for(var y=0;y<r;y++){var C=[A[n-I-1][y],A[n-I-1][y+1],A[n-I][y+1],A[n-I][y]];i[I*r+y]=new o.RectMeshNode(e,C)}return i}},{key:"getUVBox",value:function(e,t,r){var n=new o.BBox2d,i=!0,A=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.merge(c.getBounding())}}catch(e){A=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(A)throw a}}var l=n.min,g=n.max,f=l.x+t,h=l.y+r,p=g.x+t,d=g.y+r;return[new o.Interval(f,p),new o.Interval(h,d)]}},{key:"filterRepeatData",value:function(e,t){if(!(e.length<2))for(var r=e[0].param1,n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i].param1,r,t.distTol)?(e.splice(i,1),n++,i--):r=e[i].param1}},{key:"tessBoundedCurve3d",value:function(e,t){var r=e.domain,n=e.tessCurveAdaptiveByNormalTol(r.start,r.end,t);if(n.length<2)return[e.startPoint,e.endPoint];var i=[];return n.forEach((function(e){i.push(e.point)})),i}}]),e}();A.maxDiscreteSeg=100,t.PolygonOnUVFace=A},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(716),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"mergePolygonMesh",value:function(t,r,n,i,o){if(!e.validPolygonMeshList(t,n,i))return{pgm:new A.PolygonMesh,range:[]};e.buildCommonPtPosLst(n).forEach((function(r){e.mergeCommonPointForPolygonMeshes(t,r)}));for(var a=e.buildCommonEdgePosList(i),s=0,u=a.length;s<u;s++)a[s].length<2||e.mergeCommonEdgeByPolygonMesh(t,a[s],r[s],o);return e.mergePolygonMeshWithComInfo(t,a)}},{key:"mergeCommonPointForPolygonMeshes",value:function(t,r){if(!(r.length<2)){var n=[];r.forEach((function(e){var r=e[0],i=e[1];if(!(r<0||r>=t.length)){var o=t[r];if(!(null===o||i<0||i>=o.boundedEdgePos.length)){var A=o.boundedEdgePos[i];if(null!==A&&0!==A.length){var a=A[0].x;if(!(a<0||a>=o.mSurfaces.length))if(null!==o.mSurfaces[a]){var s=o.boundedIndices[i][0];n.push([r,s])}}}}})),e.updateCommonPtPos(t,n)}}},{key:"updateCommonPtPos",value:function(e,t){for(var r=t[0],n=e[r[0]].coords[r[1]],i=1,o=t.length;i<o;i++){var A=t[i];e[A[0]].coords.splice(A[1],1,n)}}},{key:"buildCommonPtPosLst",value:function(e){for(var t=e.length,r=new Map,n=0;n<t;++n)for(var o=e[n],A=0,a=o.length;A<a;++A){var s=o[A],u=r.get(s),c=[n,A];if(u){var l=[];l.push.apply(l,i(u)),l.push(c),r.set(s,l)}else r.set(s,[c])}var g=[];return r.forEach((function(e,t){g.push(e)})),g}},{key:"buildCommonEdgePosList",value:function(e){for(var t=new Map,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,A=i.length;o<A;++o){var a=i[o],s=t.get(a.index);if(s)s.push({faceI:r,edgeI:o,isReversed:i[o].isReversed});else{var u=[];u.push({faceI:r,edgeI:o,isReversed:i[o].isReversed}),t.set(a.index,u)}}var c=[];return t.forEach((function(e,t){c.push(e)})),c}},{key:"mergeCommonEdgeByPolygonMesh",value:function(t,r,n,o){var A=r.length;if(e.validCommonEdgeData(t,r,o)){for(var a=[],s=[],u=0;u<A;++u){var c=r[u],l=t[c.faceI],g=[].concat(i(l.boundedIndices[c.edgeI])),f=[].concat(i(l.boundedEdgePos[c.edgeI]));o[c.faceI][c.edgeI]&&(g.reverse(),f.reverse());for(var h=g.length,p=[],d=1;d<h-1;d++){var I=l.coords[g[d]],y=n.getParam(I);p.push(y),s.push(y)}a.push(p)}s=s.sort((function(e,t){return e-t}));e.uniqueDataForList(s,.001);var C=[];s.forEach((function(e){C.push({p:e,pt:n.getPoint(e)})}));var E=0,B=!0,v=!1,m=void 0;try{for(var Q,b=a[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value,S=e.splitParamPtListByParams(C,_,.001),w=r[E];t[w.faceI].insertPtsByPtsList(w.edgeI,S,o[w.faceI][w.edgeI]),E++}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}}},{key:"splitParamPtListByParams",value:function(e,t,r){var n=[],i=e.length,A=0,a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(var g=c.value,f=[],h=A;h<i;++h)if(f.push(e[h].pt),o.Num.isBiggerOrEqual(e[h].p,g,r)){n.push(f),A=h+1;break}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}for(var p=[],d=A;d<i;++d)p.push(e[d].pt);return n.push(p),n}},{key:"uniqueDataForList",value:function(e,t){if(!(e.length<2))for(var r=e[0],n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i],r,t)?(e.splice(i,1),n++,i--):r=e[i]}},{key:"validCommonEdgeData",value:function(e,t,r){if(t.length<2)return!1;var n=null,i=null,o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=c.faceI,g=c.edgeI;if(l<0||l>=e.length)return!1;if(g<0||g>=e[l].boundedIndices.length)return!1;var f=e[c.faceI],h=f.boundedIndices[g],p=f.boundedEdgePos[g],d=h.length;if(d<2||d!==p.length+1)return!1;var I=f.coords[h[0]],y=f.coords[h[d-1]];if(null===n)r[l][g]?(n=y,i=I):(n=I,i=y);else if(r[l][g]){if(n!==y||i!==I)return!1}else if(n!==I||i!==y)return!1}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return!0}},{key:"validPolygonMeshList",value:function(e,t,r){if(t.length!==e.length)return!1;for(var n=0,i=e.length;n<i;++n){var o=e[n];if(r[n].length!==o.boundedIndices.length)return!1}return!0}},{key:"mergePolygonMeshWithComInfo",value:function(e,t){for(var r=new A.PolygonMesh,n=[],o=new Map,a=new Map,s=0,u=t.length;s<u;++s)for(var c=1,l=t[s].length;c<l;++c){var g=a.get(t[s][c].faceI);if(g)g.add(t[s][c].edgeI);else{var f=new Set;f.add(t[s][c].edgeI),a.set(t[s][c].faceI,f)}}var h=0,p=0,d=!0,I=!1,y=void 0;try{for(var C,E=e[Symbol.iterator]();!(d=(C=E.next()).done);d=!0){var B,v,m,Q=C.value;Q.postTreatment();var b=new Map,_=Q.coords,S=0,w=!0,D=!1,R=void 0;try{for(var M,x=_[Symbol.iterator]();!(w=(M=x.next()).done);w=!0){var P=M.value,T=o.get(P);if(void 0===T)b.set(S++,h),void 0===o.get(P)&&o.set(P,h++),r.coords.push(P);else b.set(S++,T)}}catch(e){D=!0,R=e}finally{try{!w&&x.return&&x.return()}finally{if(D)throw R}}var F=Q.coordIndices,O=!0,L=!1,N=void 0;try{for(var k,G=F[Symbol.iterator]();!(O=(k=G.next()).done);O=!0){var U=k.value,j=[],V=!0,H=!1,Y=void 0;try{for(var K,q=U[Symbol.iterator]();!(V=(K=q.next()).done);V=!0){var J=K.value;j.push(b.get(J))}}catch(e){H=!0,Y=e}finally{try{!V&&q.return&&q.return()}finally{if(H)throw Y}}r.coordIndices.push(j)}}catch(e){L=!0,N=e}finally{try{!O&&G.return&&G.return()}finally{if(L)throw N}}(B=r.mSurfaces).push.apply(B,i(Q.mSurfaces)),(v=r.isSameDir).push.apply(v,i(Q.isSameDir)),(m=r.markLoop).push.apply(m,i(Q.markLoop)),n.push(r.coordIndices.length-1);for(var W=a.get(p),z=0,X=Q.boundedIndices.length;z<X;++z)if(!W||!W.has(z)){var Z=[],$=!0,ee=!1,te=void 0;try{for(var re,ne=Q.boundedIndices[z][Symbol.iterator]();!($=(re=ne.next()).done);$=!0){var ie=re.value;Z.push(b.get(ie))}}catch(e){ee=!0,te=e}finally{try{!$&&ne.return&&ne.return()}finally{if(ee)throw te}}r.boundedIndices.push(Z)}p++}}catch(e){I=!0,y=e}finally{try{!d&&E.return&&E.return()}finally{if(I)throw y}}return{pgm:r,range:n}}}]),e}();t.PolygonMeshUtil=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(2058),o=r(2059),A=r(2060),a=r(2063);t.triangulate=function(e,t){if(e.surface instanceof n.Plane)return A.triangulateOnPlane(e,e.surface,t);if(e.surface instanceof n.CylindricalSurface||e.surface instanceof n.ConicalSurface||e.surface instanceof n.SurfaceOfLinearExtrusion)return i.triangulateOnCylinderCone(e,e.surface,t);if(e.surface instanceof n.NurbsSurface)return o.triangulateOnNurbsSurface(e,e.surface,t);if(e.surface instanceof n.ToroidalSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);if(e.surface instanceof n.RevolveSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);throw"unsupported"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnCylinderCone=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateDevelopable.triangulateOnDevelopable3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnNurbsSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateNurbs.triangulateOnNurbsSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(2061),A=r(528),a=r(2062);function s(e,t,r){var o=e.getApproximatePoints(t);if(!e.edge.isSoft||!r)return{points:o};var A=c(e.edge);if(!A)return{points:o};for(var a=l(e.vertexA),s=l(e.vertexB),g=new Map,f=[].concat(n(A),n(a),n(s)),h=0,p=f.length;h<p;h++){var d=f[h];if(!g.has(d)){var I=d.surface;if(I instanceof i.Plane){var y=d.sameDir?I.ccs.dz:I.ccs.dz.reversed();g.set(d,y)}}}for(var C=new Array(o.length),E=0,B=o.length;E<B;E++){var v=o[E];0===E&&a.length>0?C[E]=u(a,v,g):E===B-1&&s.length>0?C[E]=u(s,v,g):C[E]=u(A,v,g)}return{points:o,normals:C}}function u(e,t,r){for(var n=void 0,i=0,o=e.length;i<o;i++){var A=e[i],a=r.get(A);a||(a=A.sameDir?A.surface.getNormalOfPoint(t):A.surface.getNormalOfPoint(t).reversed()),n=n?n.added(a):a}return n?n.normalized():void 0}function c(e){for(var t=[],r=e.halfEdges,n=0,i=r.length;n<i;n++){var o=r[n],A=o.loop?o.loop.face:void 0;A&&t.push(A)}if(2===t.length)return t}function l(e){for(var t=new Set,r=e.edges,n=0,i=r.length;n<i;n++){var o=r[n];if(!o.isSoft)return[];var A=c(o);if(!A)return[];for(var a=0,s=A.length;a<s;a++)t.add(A[a])}return Array.from(t)}t.triangulateOnPlane=function(e,t,r){var n=new A.Mesh,i=[],u=0;r=r||{};for(var l=e.sameDir?t.normal:t.normal.reversed(),g=e.getLoops(),f=0,h=g.length;f<h;f++){var p=[],d=g[f].halfEdges,I=0,y=d[0].edge,C=d[d.length-1].edge;y.isSoft&&c(y)||!C.isSoft||!c(C)||(I=d.length-1);for(var E=!1,B=0,v=d.length;B<v;B++){for(var m=s(d[(B+I)%v],r.crvRatioTol,r.needNormal),Q=m.points,b=m.normals,_=E?1:0,S=b&&B!==v-1?Q.length:Q.length-1;_<S;_++){var w=Q[_];p.push(new o.LibtessVertex(w,u++)),o.addVertexNormalUVBy3d(w,n,t,e.sameDir,r.needUV,r.needNormal,void 0,b?b[_]:l)}E=!!b}i.push(p)}for(var D=a.gluTessTriangulate(i,o.toData(e.sameDir?t.normal.toPoint3d():t.normal.reversed().toPoint3d())),R=0;R<D.length;R+=3){var M=o.getOrCreateVertexIndexBy3d(D[R],n,t,e.sameDir,r.needUV,r.needNormal),x=o.getOrCreateVertexIndexBy3d(D[R+1],n,t,e.sameDir,r.needUV,r.needNormal),P=o.getOrCreateVertexIndexBy3d(D[R+2],n,t,e.sameDir,r.needUV,r.needNormal);n.addTriangle([M,x,P])}return r.needUV&&(n.uvIndices=n.triangleIndices),r.needNormal&&(n.normalIndices=n.triangleIndices),n}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.push(e.x),i.push(e.y),i.push(e.z?e.z:0),i.index=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Array),t}();function A(e){return[e.x,e.y,e.z]}t.LibtessVertex=o,t.toData=A,t.getOrCreateVertexIndex=function(e,t,r,n,o,a){if(e.hasOwnProperty("index"))return e.index;var s=new i.UV(e[0],e[1]),u=A(r.getPoint(s));if(t.addVertex(u),o&&t.addUv([s.u,s.v]),a){var c=n?r.getNormal(s):r.getNormal(s).reversed();t.addNormal([c.x,c.y,c.z])}return t.vertices.length-1},t.getOrCreateVertexIndexBy3d=function(e,t,r,n,o,A){if(e.hasOwnProperty("index"))return e.index;t.addVertex(e);var a=void 0;if(o&&(a=r.getParam(new i.Point3d(e[0],e[1],e[2])),t.addUv([a.u,a.v])),A){a||(a=r.getParam(new i.Point3d(e[0],e[1],e[2])));var s=n?r.getNormal(a):r.getNormal(a).reversed();t.addNormal([s.x,s.y,s.z])}return t.vertices.length-1},t.addVertexNormalUV=function(e,t,r,n,i,o,a,s){var u=a||r.getPoint(e);if(t.addVertex(A(u)),i&&t.addUv([e.u,e.v]),o){var c=s;c||(c=n?r.getNormal(e):r.getNormal(e).reversed()),t.addNormal([c.x,c.y,c.z])}},t.addVertexNormalUVBy3d=function(e,t,r,n,i,o,a,s){t.addVertex(A(e));var u=a;if(i&&(u=u||r.getParam(e),t.addUv([u.u,u.v])),o){var c=s;if(!c){var l=r.getNormal(u||r.getParam(e));c=n?l:l.reversed()}t.addNormal([c.x,c.y,c.z])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(424),i=r(589);function o(e){e!==i.primitiveType.GL_TRIANGLES&&n.consoleLogInDev("expected TRIANGLES but got type: "+e)}function A(e){n.consoleLogInDev("error callback"),n.consoleLogInDev("error number: "+e)}t.gluTessTriangulate=function(e,t){var r=function(){var e=new i.GluTesselator;return e.gluTessCallback(i.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t.push(e)})),e.gluTessCallback(i.gluEnum.GLU_TESS_BEGIN,o),e.gluTessCallback(i.gluEnum.GLU_TESS_ERROR,A),e.gluTessCallback(i.gluEnum.GLU_TESS_COMBINE,(function(e,t,r){return[e[0],e[1],e[2]]})),e.gluTessCallback(i.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e}();r.gluTessNormal(t[0],t[1],t[2]);var n=[];r.gluTessBeginPolygon(n);var a=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;r.gluTessBeginContour();var f=!0,h=!1,p=void 0;try{for(var d,I=g[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value;r.gluTessVertex(y,y)}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}r.gluTessEndContour()}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}return r.gluTessEndPolygon(),n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnRevolveSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateRevSurface.triangulateOnRevolveSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2065);t.diffMIxShells=function(e,t){return n.diffShells(e.map((function(e){return e.rawObject()})),t.map((function(e){return e.rawObject()})))},t.diffMIxShell=function(e,t){return n.diffShell(e.rawObject(),t.rawObject())},t.diffMIxFace=function(e,t){return n.diffFace(e.rawObject(),t.rawObject())},t.diffMIxLoop=function(e,t){return n.diffLoop(e.rawObject(),t.rawObject())},t.diffMIxHalfEdge=function(e,t){return n.diffHalfEdge(e.rawObject(),t.rawObject())},t.diffMIxEdge=function(e,t){return n.diffEdge(e.rawObject(),t.rawObject())},t.diffMIxVertex=function(e,t){return n.diffVertex(e.rawObject(),t.rawObject())}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(3);function A(e,t){if(e.faces.length!==t.faces.length)return console.error("Different in faces num "+e.faces.length+" : "+t.faces.length),!1;var r=!0,n=!1,o=void 0;try{for(var A,s=function(){var e=A.value;return t.faces.some((function(t){return a(e,t)}))?"continue":(console.error("Different in face."),{v:!1})},u=e.faces[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=s();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return e.getEdges().size===t.getEdges().size||(console.error("Different in shell's edge number."),!1)}function a(e,t){if(e.getLoops().length!==t.getLoops().length)return!1;if(!s(e.outerLoop,t.outerLoop))return!1;if(e.innerLoops.length!==t.innerLoops.length)return!1;var r=!0,n=!1,o=void 0;try{for(var A,a=function(){var e=A.value;return t.innerLoops.some((function(t){return s(e,t)}))?"continue":{v:!1}},u=e.innerLoops[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=a();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return!0}function s(e,t){if(e.halfEdges.length!==t.halfEdges.length)return!1;var r=0,n=0,i=-1;for(r=0;r<e.halfEdges.length;r++){var A=e.halfEdges[r].getBoundedCurve();if(A){if(-1===i)for(n=0;n<t.halfEdges.length;n++){var a=t.halfEdges[n].getBoundedCurve();if(a&&(o.CurveOverlap.areCurvesTotallyOverlap(A,a)&&A.startPoint.isEqual(a.startPoint))){i=n;break}}if(-1===i)return!1;var s=t.halfEdges[(i+r)%t.halfEdges.length].getBoundedCurve();if(!A.isEqual(s)&&!o.CurveOverlap.areCurvesTotallyOverlap(A,s))return console.error("Different in loop."),!1}}return!0}t.diffShells=function(e,t){if(e.length!==t.length)return console.error("Shells num not equals "+e.length+" : "+t.length),!1;for(var r=new Set,n=0,i=e.length;n<i;n++){for(var o=e[n],a=!1,s=0,u=t.length;s<u;s++){if(!r.has(s))if(A(o,t[s])){r.add(s),a=!0;break}}if(!a)return!1}return!0},t.diffShell=A,t.diffFace=a,t.diffLoop=s,t.diffHalfEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!(!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||!r.startPoint.isEqual(n.startPoint))||(console.error("Different in half edge."),!1)},t.diffEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||(console.error("Different in edge."),!1)},t.diffVertex=function(e,t){var r=e.point,n=t.point;return!!r.isEqual(n)||(console.error("Different in vertex"),!1)}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2067),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"toKey",value:function(){return i.idToKey(this.id)}},{key:"equals",value:function(e){return this.id.equals(e.id)}}],[{key:"fromKey",value:function(t){var r=new e;return r.id=i.idFromKey(t),r}},{key:"extractShellKey",value:function(e){return i.extractShellKey(e)}}]),e}();t.MIxName=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(236);t.idToKey=function(e){if(e.type===n.TopoObjectType.kShell)return e.uuid;if(e.type===n.TopoObjectType.kFace){var t=e;return t.shellId.uuid+":"+t.index}if(e.type===n.TopoObjectType.kEdge){var r=e,i="",o="",A=!0,a=!1,s=void 0;try{for(var u,c=r.halfEdgeIds[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){var l=u.value;null!=l.faceId?(i=l.faceId.shellId.uuid+":",o=o+"("+l.faceId.index+":"+l.index+")"):o=o+"(-1:"+l.index+")"}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return i+o}if(e.type===n.TopoObjectType.kHalfEdge){var g=e;return g.faceId.shellId.uuid+":"+g.faceId.index+":"+g.index}return""},t.idFromKey=function(e){var t=void 0,r=e.split(":");if(e.endsWith(")")){var i=r[0],o=new n.ShellId(i),A=e.split("("),a=[],s=!0,u=!1,c=void 0;try{for(var l,g=A[Symbol.iterator]();!(s=(l=g.next()).done);s=!0){var f=l.value.replace(")","").split(":");if(""!==f[1]){var h=new n.FaceId(o,parseInt(f[0],void 0)),p=new n.HalfEdgeId(h,parseInt(f[1],void 0));a.push(p)}}}catch(e){u=!0,c=e}finally{try{!s&&g.return&&g.return()}finally{if(u)throw c}}t=new n.EdgeId(a)}else if(1===r.length)t=new n.ShellId(r[0]);else if(2===r.length){var d=parseInt(r[1],void 0);t=new n.FaceId(new n.ShellId(r[0]),d)}else{var I=parseInt(r[1],void 0),y=parseInt(r[2],void 0);t=new n.HalfEdgeId(new n.FaceId(new n.ShellId(r[0]),I),y)}return t},t.extractShellKey=function(e){var t=e.split(":");if(t.length>0)return t[0]}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2070))&&A.__esModule?A:{default:A},s=r(1119),u=r(1120),c=r(2071);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2073);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(660));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2072)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(359),a=r(2075),s=r(2076),u=r(2080),c=r(2082);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||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 g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(701)),o=h(r(208)),A=r(1121),a=r(951),s=r(2),u=h(r(125)),c=r(718),l=r(717),g=r(1122),f=r(359);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||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 y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2077)),o=r(359);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||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 s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2078),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2079)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(835)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(359),s=r(2081);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(359);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(359),o=r(2083);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2085);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2090);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1121),a=p(r(5)),s=p(r(125)),u=r(2086),c=r(1123),l=r(718),g=r(717),f=r(1122),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(420)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(1089),A=r(519),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1123),u=r(718),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return iQ})),r.d(t,"IntersectedService",(function(){return LQ})),r.d(t,"CustomModelService",(function(){return qQ})),r.d(t,"FittingHintService",(function(){return tb})),r.d(t,"FittingModelService",(function(){return fb})),r.d(t,"ECameraMode",(function(){return lb})),r.d(t,"ECameraMoveDirection",(function(){return gb})),r.d(t,"ModelCameraService",(function(){return Bb})),r.d(t,"ModelHintService",(function(){return Db})),r.d(t,"ModelService",(function(){return Vb})),r.d(t,"ESelectedType",(function(){return Xb})),r.d(t,"ESetSelectType",(function(){return Zb})),r.d(t,"ModelViewerSelectionService",(function(){return t_})),r.d(t,"ModelViewerSelectionV2Service",(function(){return l_})),r.d(t,"ModelViewerService",(function(){return B_})),r.d(t,"PlankPathService",(function(){return V_})),r.d(t,"ModelValidateService",(function(){return Z_})),r.d(t,"SceneService",(function(){return AS})),r.d(t,"AppConfigService",(function(){return hS})),r.d(t,"Application",(function(){return uw})),r.d(t,"EIntersectedCreatedType",(function(){return h})),r.d(t,"EIntersectedType",(function(){return g})),r.d(t,"EFittingType",(function(){return l})),r.d(t,"EIntersectedInfoType",(function(){return f})),r.d(t,"ELanguage",(function(){return Ue})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Ke})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return qe})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return Je})),r.d(t,"EPointType",(function(){return E})),r.d(t,"ELineType",(function(){return B})),r.d(t,"EDesignMode",(function(){return Ve})),r.d(t,"ETriggerType",(function(){return He})),r.d(t,"EModelType",(function(){return Ye})),r.d(t,"KEYBOARD_KEY",(function(){return Xe})),r.d(t,"EIntersectModelType",(function(){return d})),r.d(t,"EProductDirection",(function(){return I})),r.d(t,"EPlankPathType",(function(){return We})),r.d(t,"EElementType",(function(){return ze})),r.d(t,"EToolType",(function(){return kf}));r(734),r(1346);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
67
67
|
/*!
|
|
68
68
|
* @qunhe/custom-apass-api v0.52.73
|
|
69
69
|
* (c) 2023 yuanlin <yuanlin@qunhemail.com>
|
|
@@ -85,7 +85,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
85
85
|
***************************************************************************** */
|
|
86
86
|
var Ae,ae=function(){return(ae=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function se(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}function ue(e,t){var r,n,i,o,A={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;A;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return A.label++,{value:o[1],done:!1};case 5:A.label++,n=o[1],o=[0];continue;case 7:o=A.ops.pop(),A.trys.pop();continue;default:if(!(i=A.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){A=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){A.label=o[1];break}if(6===o[0]&&A.label<i[1]){A.label=i[1],i=o;break}if(i&&A.label<i[2]){A.label=i[2],A.ops.push(o);break}i[2]&&A.ops.pop(),A.trys.pop();continue}o=t.call(e,A)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function ce(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function le(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ce(arguments[t]));return e}function ge(e,t,r){void 0===r&&(r={functions:["abs","toRadians","toDegrees","sin","cos","tan","asin","acos","atan","ceil","floor","round","left","right","mid","strToNum","min","max","sqrt","isValue","statusSum","average","rad","boolAt","boolAll","deRound","stretchSize","stretchPosition","getProductCustomAttr"],variables:["W","D","H"]});var n=r.functions,i=r.variables,o=t.getParent();if(!(null==o?void 0:o.productId))throw new Error("model not support set formula");if(-1===o.getChild().findIndex((function(e){return e.id===t.id})))throw new Error("only child support set formula");for(var A=/#([a-zA-z$_][a-zA-Z$_\d]*)(?=\()/g,a=null;a=A.exec(e);)if(!n.includes(a[1]))throw new Error("function "+a[0]+" not available!");var s=/#([a-zA-z$_][a-zA-Z$_\d]*)\(?/g;for(a=null;a=s.exec(e);)if(!a[0].endsWith("(")&&!i.includes(a[1])&&!o.hasParam(a[1]))throw new Error("variable "+a[0]+" not available!");var u=e.replace(s,(function(e,t,r){return e.endsWith("(")?t+"(":t})).replace(/\s+AND\s+/g," && ").replace(/\s+OR\s+/g," || ");try{new Function("return "+u)}catch(e){throw new SyntaxError("formula not correct!")}}function fe(e,t){return e.some((function(e){var r=e.type;return t===r}))}function he(e,t){var r=e.paramPathLines,n=e.paramPoints;if(!function(e){var t=e.paramPathLines,r=e.paramPoints;return t.length===r.length}(e))throw new Error("unclose path");if(function(e){var t=e.paramPathLines,r=e.paramPoints;return fe(t,B.ELLIPSE_ARC)||fe(r,E.ELLIPSE)}(e))throw new Error("nonsupport ellipse");if(function(e){var t=e.paramPathLines,r=e.paramPoints;return fe(t,B.CIRCLE_CENTER)||fe(r,E.CIRCLE_CENTER)}(e)&&(1!==r.length||1!==n.length))throw new Error("not a valid circle");return le(n,r).reduce((function(e,t){var r=e.slice();return t.position&&r.push.apply(r,le(t.position.split(","))),t.radius&&r.push(t.radius),r}),[]).forEach((function(e){return function(e,t){return ge(e,t,{functions:[],variables:["W","D","H"]})}(e,t)})),!0}function pe(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];try{if("function"==typeof e)return e.apply(this,t)}catch(e){setTimeout((function(){throw e}))}}}function de(e){return e&&"object"===c(e)&&"function"==typeof e.then&&"function"==typeof e.catch}!function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(Ae||(Ae={}));var Ie=function(){function e(){this.namespace=""}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getValue=function(){return function(e,t){if(null!=e){if(t===j.boolean)return Boolean(parseFloat(e));if(t===j.number)return parseFloat(e)}return e}(this.value,this.type)},e.prototype.getNamespace=function(){return this.namespace},e.prototype.setValue=function(e){var t;if(!this.readonly&&this.ref){var r=null!==(t=(this.ref.getRoot().option||{}).bzValueMaxSize)&&void 0!==t?t:1024,n=function(e,t){if(t===j.boolean)return e?"1":"0";return e.toString()}(e,this.type);if(function(e){for(var t=e.length,r=e.length-1;r>=0;r--){var n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}(n)>r)throw new Error("The number of bytes exceeds the "+r+" limit");this.ref.__trackUpdateField({type:W.BZ_STORE,attr:S(this.name,this.namespace)},this.value,n),this.value=n,this.deleted=!1}},e.prototype.remove=function(){this.readonly||this.ref&&(this.ref.__trackUpdateField({type:W.BZ_STORE,attr:S(this.name,this.namespace)},this.deleted,!0),this.deleted=!0)},e.prototype.toJSON=function(){return{name:this.name,namespace:this.namespace,readonly:this.readonly,type:this.type,value:this.value,deleted:this.deleted}},e}();var ye=function(){function e(){this.data={name:"",displayName:"",simpleName:"",type:V.FIT,value:""}}return e.prototype.getName=function(){return this.data.name},e.prototype.getDescription=function(){return this.data.description},e.prototype.getSimpleName=function(){return this.data.simpleName},e.prototype.getDisplayName=function(){return this.data.displayName},e.prototype.getVisible=function(){return this.data.visible},e.prototype.isOverridden=function(){var e=this.ref;return e&&e.type===q.PARAM_PRIMITIVE&&"plankPath"===this.getName()?this.data.primitiveOverride:this.data.override},e.prototype.cancelOverride=function(){var e=this.ref;if(e&&"function"==typeof e.__trackUpdateField){var t=e&&e.type===q.PARAM_PRIMITIVE&&"plankPath"===this.getName()?"primitiveOverride":"override",r=this.data[t];e.__trackUpdateField({type:W.STORE,attr:this.data.name},r,!1),!1!==r&&(this.data[t]=!1)}},e.prototype.getUnitType=function(){return this.data.valueFormat},e.prototype.getParamForm=function(){return this.data.paramForm},e.prototype.isUsingMixFormula=function(){return 1===this.data.status},e.prototype.useMixFormula=function(){if(void 0!==this.getParamForm()&&[Y.COMPOUND_FORMULA,Y.COMPOUND_FORMULA_OPTION].includes(this.getParamForm())){var e=this.ref;e&&"function"==typeof e.__trackUpdateField&&(e.__trackUpdateField({type:W.STORE,attr:this.data.name},this.data.status,1),this.data.status=1,this.data.formula=void 0)}},e.prototype.getValue=function(){return this.data.value},e.prototype.setValue=function(e){var t,r=this.ref,n=null==r?void 0:r.getRoot(),i=(null==n?void 0:n.option)||{};if(this.getEditable()){if(i.ruleValidate){if(!this.getVisible()&&!0!==(null===(t=null==r?void 0:r.option)||void 0===t?void 0:t.postHiddenVariable))throw new Error("Hidden variables will not be saved!");if(this.getType()===V.BOOLEAN_LIST){if(parseFloat(e)!=e)throw new Error("Value must be a positive integer");var o=0,A=Math.pow(2,this.getValueDisplayNames().length)-1;if(e<o&&e>A)throw new Error("Characters cannot be less than 0 and greater than "+A)}if(this.getParamForm()===Y.STEP){A=this.getMax();if(e<(o=this.getMin())&&e>A)throw new Error("value cannot be less than "+o+" and greater than "+A);if((e-o)%this.getStep()!=0)throw new Error("value not validate with step!")}}r&&"function"==typeof r.__trackUpdateField&&r.__trackUpdateField({type:W.STORE,attr:this.data.name},this.getValue(),e),this.data.value=e,void 0!==this.getParamForm()&&[Y.COMPOUND_FORMULA,Y.COMPOUND_FORMULA_OPTION].includes(this.getParamForm())&&(this.data.status=0);var a=r&&r.type===q.PARAM_PRIMITIVE&&"plankPath"===this.getName()?"primitiveOverride":"override";this.data[a]=!0,this.data.formula=void 0}else if(i.ruleValidate)throw new Error("The current variable does not support edit!")},e.prototype.getFormula=function(){return this.data.formula},e.prototype.setFormula=function(e){var t=this.ref;this.getEditable()&&t&&"function"==typeof t.__trackUpdateField&&(ge(e,t),t.__trackUpdateField({type:W.STORE,attr:this.data.name},this.getFormula(),e),this.data.formula=e)},e.prototype.toJSON=function(){return this.data},e.prototype.getMin=function(){return this.data.min},e.prototype.getEditable=function(){return!0===this.data.editable},e.prototype.getMax=function(){return this.data.max},e.prototype.getOptionValues=function(){return this.data.optionValues||[]},e.prototype.getPrimitiveOverride=function(){return this.data.primitiveOverride},e.prototype.getRecommendValues=function(){return this.data.recommendValues||[]},e.prototype.getValueDisplayNames=function(){return this.data.valueDisplayNames||[]},e.prototype.setPrimitiveOverride=function(e){var t=this.ref,r=null==t?void 0:t.getRoot(),n=(null==r?void 0:r.option)||{};if(this.getEditable())t&&"function"==typeof t.__trackUpdateField&&t.__trackUpdateField({type:W.STORE,attr:this.data.name},this.data.primitiveOverride,e),this.data.primitiveOverride=e;else if(n.ruleValidate)throw new Error("The current variable does not support edit!")},e.prototype.getStep=function(){return this.data.step},e.prototype.getType=function(){return this.data.type},e.prototype.getParsedValue=function(){return this.getValue()},e.prototype.setParsedValue=function(e){return this.setValue(e)},e}();function Ce(e){var t=new ye;return t.data=e,t}var Ee=function(){function e(){}return e.prototype.getOriginOuterPath=function(){return this.data.originOuterPath},e.prototype.getOriginInnerHoles=function(){return this.data.originInnerHoles},e.prototype.setOuterPath=function(e){he(e,this.ref),this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:W.PLANK_PATH,attr:X.PATH},this.getOuterPath(),e),this.data.outerPath=e},e.prototype.setInnerHoles=function(e){var t=this;if(e.some((function(e){return!he(e,t.ref)})))throw new Error("invalid path");this.ref&&"function"==typeof this.ref.__trackUpdateField&&this.ref.__trackUpdateField({type:W.PLANK_PATH,attr:X.HOLES},this.getInnerHoles(),e),this.data.innerHoles=e},e.prototype.getOuterPath=function(){return this.data.outerPath},e.prototype.getInnerHoles=function(){return this.data.innerHoles},e.prototype.getResult=function(){throw new Error("not implemented")},e}();var Be,ve,me,Qe,be,_e,Se,we,De=function(){function e(e){this.option=e,this._changeMap={}}return Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotation},enumerable:!1,configurable:!0}),e.prototype.getRoot=function(e){var t=this.isRoot?this:this.root;if(e)for(var r;r=null==t?void 0:t.getParent();)t=r.getRoot()||t;return t},e.prototype.clone=function(){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&this.type===q.PARAM_PRIMITIVE)throw new Error("Primitive model do not support to clone!");var r=this.toJSON(),n=e.deserialize(JSON.stringify(r));return n._changeMap.cloned=!0,n._changeMap.forceUpdate=void 0,n._changeMap.originId||(n._changeMap.originId=n.id),n.id=function(){for(var e=0,t=0;t<36;t++)if(8===t||13===t||18===t||23===t)_[t]="-";else if(14===t)_[t]="4";else{e<=2&&(e=33554432+16777216*Math.random()|0);var r=15&e;e>>=4,_[t]=b[19===t?3&r|8:r]}return _.join("")}(),n},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.__trackUpdateField({type:W.ATTRIBUTE,attr:"name"},this.name,e),this.name=e},e.prototype.getRemark=function(){return this.remark},e.prototype.setRemark=function(e){this.__trackUpdateField({type:W.ATTRIBUTE,attr:z.REMARK},this.remark,e),this.remark=e},e.prototype.setRotate=function(e){this.setRotation(e)},e.prototype.getRotate=function(){return this.getRotation()},e.prototype.setRotation=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===q.PARAM_ASSEMBLY||i===q.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly do not support to set rotation!")}this.__trackUpdateField({type:W.ATTRIBUTE,attr:z.ROTATION,mutexAttr:z.ROTATION_FORMULA},this.rotation,e);var A=e.x,a=e.y,s=e.z;this.rotation={x:A,y:a,z:s}},e.prototype.getRotation=function(){return this.rotation},e.prototype.getRotationFormula=function(){return this.rotationFormula},e.prototype.setRotationFormula=function(e){var t=e.x,r=e.y,n=e.z;ge(t,this),ge(r,this),ge(n,this),this.__trackUpdateField({type:W.ATTRIBUTE,attr:z.ROTATION_FORMULA,mutexAttr:z.ROTATION},this.rotationFormula,e),this.rotationFormula={x:t,y:r,z:n}},e.prototype.setPosition=function(e){var t,r,n=this;if(null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate){var i=this.getRoot(!0).type,o=null===(r=this.getParent())||void 0===r?void 0:r.getAccessory().find((function(e){return e===n}));if((i===q.PARAM_ASSEMBLY||i===q.TEMPLATE_ASSEMBLY)&&o)throw new Error("Accessory under Assembly do not support to set position!")}this.__trackUpdateField({type:W.ATTRIBUTE,attr:z.POSITION,mutexAttr:z.POSITION_FORMULA},this.position,e);var A=e.x,a=e.y,s=e.z;this.position={x:A,y:a,z:s}},e.prototype.getPosition=function(){return this.position},e.prototype.getPositionFormula=function(){return this.positionFormula},e.prototype.setPositionFormula=function(e){var t=e.x,r=e.y,n=e.z;ge(t,this),ge(r,this),ge(n,this),this.__trackUpdateField({type:W.ATTRIBUTE,attr:z.POSITION_FORMULA,mutexAttr:z.POSITION},this.positionFormula,e),this.positionFormula={x:t,y:r,z:n}},e.prototype.getToolType=function(){return this.toolType},e.prototype.setToolType=function(e){var t=function(e){return re.get(e)}(e),r=(this.option||{}).allowToolTypes;if(this._origin===K.BRANDGOOD&&void 0!==t&&r){if(!r.includes(t))throw new Error("the custom model not support "+e+" tool");return this.__trackUpdateField({type:W.ATTRIBUTE,attr:z.TOOL_TYPE},this.toolType,e),void(this.toolType=e)}throw new Error("the custom model not support set tool type!")},e.prototype.dispose=function(){if(this.getRoot()._origin!==K.SENSE)throw new Error("the custom model is not in design, not support dispose!");this._changeMap.deleted=!0,this._changeMap.forceUpdate=void 0},e.prototype.getChild=function(){return this.children},e.prototype.getAccessory=function(){return this.accessories},e.prototype.appendChild=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&Re(this,e,!1),!this.children.some((function(t){return t.id===e.id}))){e.isRoot||(e.root=this.isRoot?this:this.root),e._parent=this,this.children.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:Z.CHILD,linkId:e.id})}},e.prototype.appendAccessory=function(e){var t;if((null===(t=this.getRoot().option)||void 0===t?void 0:t.ruleValidate)&&Re(this,e,!0),!this.accessories.some((function(t){return t.id===e.id}))){e.root=void 0,e._parent=this,this.accessories.push(e);var r=this._changeMap.addNodes;r||(r=[],this._changeMap.addNodes=r),r.push({type:Z.ACCESSORY,linkId:e.id})}},e.prototype.getParam=function(e){var t=this.params.get(e);return t&&!t.ref&&(t.ref=this),t},e.prototype.hasParam=function(e){return this.params.has(e)},e.prototype.getBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=S(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:""),o=this.bzProperties.get(i);return o&&!o.ref&&(o.ref=this),o},e.prototype.hasBzProperty=function(e,t){var r,n=this.getRoot().option||{},i=S(e,null!==(r=null!=t?t:n.defaultNamespace)&&void 0!==r?r:"");return this.bzProperties.has(i)},e.prototype.removeBzProperty=function(e,t){return!!this.hasBzProperty(e,t)&&(this.getBzProperty(e,t).remove(),!0)},e.prototype.toJSON=function(e,t){void 0===t&&(t=!0);var r=t&&this.getRoot(!0)||this,n={id:r.id,type:r.type,name:r.name,remark:r.remark,position:r.position,rotation:r.rotation,rotationFormula:r.rotationFormula,positionFormula:r.positionFormula,size:r.size,option:r.option,params:Array.from(r.params).map((function(e){var t=ce(e,2);return[t[0],t[1].toJSON()]})),bzProperties:Array.from(r.bzProperties).map((function(e){var t=ce(e,2);return[t[0],t[1].toJSON()]})),plankPath:r._plankPath?r._plankPath.data:void 0,productId:r.productId,category:r.category,isRoot:r.isRoot,modelType:r.modelType,isHidden:r.isHidden,toolType:r.toolType,children:r.children.map((function(e){return e.toJSON(void 0,!1)})),accessories:r.accessories.map((function(e){return e.toJSON(void 0,!1)})),_changeMap:r._changeMap,_origin:r._origin,legal:r.legal};return t&&r!==this&&(n._currentId=this.id),n},e.prototype.serialize=function(){return JSON.stringify(this.toJSON())},e.prototype.deserialize=function(t){var r=this,n=JSON.parse(t);return function e(t,r,n,i){void 0===r&&(r=new Map);void 0===i&&(i=function(e,t){return new De(e.option)});var o=i(t,n);o.id=t.id,o.type=t.type,o.name=t.name,o.remark=t.remark,o.position=t.position,o.rotation=t.rotation||t.rotate,o.size=t.size,o.params=new Map(t.params.map((function(e){return[e[0],Ce(e[1])]}))),o.bzProperties=new Map((t.bzProperties||[]).map((function(e){return[e[0],(t=e[1],r=new Ie,Object.assign(r,t),r)];var t,r}))),o._plankPath=t.plankPath?function(e){var t=new Ee;return t.data=e,t}(t.plankPath):void 0,o.positionFormula=t.positionFormula,o.rotationFormula=t.rotationFormula,o.productId=t.productId,o.category=t.category,o.isRoot=t.isRoot,o.modelType=t.modelType,o.isHidden=t.isHidden,o.toolType=t.toolType,o._origin=t._origin,o._changeMap=t._changeMap,o.legal=t.legal,!t.isRoot&&n&&(o.root=n);r.set(o.id,o);var A=o.isRoot?o:n;if(o.children=t.children.map((function(t){return e(t,r,A||o,i)})),o.accessories=t.accessories.map((function(t){return e(t,r,A||o,i)})),le(o.children,o.accessories).forEach((function(e){return e._parent=o})),!n&&t._currentId&&r.has(t._currentId))return r.get(t._currentId);return o}(n,void 0,void 0,(function(t,i){return void 0!==n._currentId||i?n._currentId===t.id?r:new e(t.option):(r.option=n.option,r)}))},e.serialize=function(e){return e.serialize()},e.deserialize=function(t){var r=new e;return r.deserialize(t),r},e.prototype.__trackUpdateField=function(e,t,r){var n=this._changeMap.update;n||(n=[]),n.some((function(t){return t.type===e.type&&t.attr===e.attr}))||t!==r&&(n.push(e),void 0!==e.mutexAttr&&(n=n.filter((function(t){return t.attr!=e.mutexAttr}))),this._changeMap.update=n)},e.prototype.getParent=function(){var e=this;if(this._parent)return this._parent;var t=function(t){return t.id===e.id};if(this.root)for(var r=[this.root],n=void 0;n=r.pop();){var i=n.getChild(),o=n.getAccessory();if(i.some(t)||o.some(t))return this._parent=n,n;r.push.apply(r,le(i)),r.push.apply(r,le(o))}},e.prototype.forceUpdate=function(e){if(void 0===e&&(e=!0),!this.productId)throw new Error("Can not force-update model without productId");if(this._origin!==K.SENSE||!this.isRoot)throw new Error("only the root param models in design support force update!");this._changeMap.forceUpdate=e},e.prototype.getElementId=function(){var e=this.id,t=this.toolType,r=this.modelType;return r===$.ASSEMBLY||r===$.TEMPLATE_ASSEMBLY?{id:e,type:v.CustomGroup}:t?{id:e,type:oe(t)}:void 0},e.prototype.getPlankPathAsync=function(){return se(this,void 0,void 0,(function(){return ue(this,(function(e){throw new Error("not implemented")}))}))},e}();function Re(e,t,r){var n=r?"accessory":"child";if([q.PARAM_ASSEMBLY,q.TEMPLATE_ASSEMBLY,q.PARAM_FURNITURE,q.PARAM_PRIMITIVE].includes(e.type))throw new Error("Assembly, TemplateAssembly, Furniture, Primitive model do not support to append "+n+"!");if(t.type===q.TEMPLATE_ASSEMBLY||t.type===q.PARAM_ASSEMBLY)throw new Error("Not support to append assembly as a "+n+"!");if(t._origin===K.SENSE||t._origin===K.TEMPLATE_ID)throw new Error("Not support to append a "+n+" created from scene or templatedId!");if(!t.isRoot)throw new Error("Only root model can be append as "+n+"!")}!function(e){e[e.emergencyLevel=6]="emergencyLevel",e[e.receiptType=7]="receiptType"}(Be||(Be={})),function(e){e.ORDER="order-mini-app",e.QUOTATION="report-miniapp"}(ve||(ve={})),function(e){e[e.CONFIRMED=0]="CONFIRMED",e[e.ORDERED=1]="ORDERED",e[e.CLAIMED=2]="CLAIMED",e[e.PAY_PENDING=3]="PAY_PENDING",e[e.PAYED=4]="PAYED",e[e.PRODUCTION_SCHEDULING=5]="PRODUCTION_SCHEDULING",e[e.REVIEWED=6]="REVIEWED",e[e.SPLIT_ORDER=7]="SPLIT_ORDER",e[e.RETURNED=8]="RETURNED",e[e.CANCELLED=9]="CANCELLED",e[e.BATCHED=10]="BATCHED",e[e.OPENED_MATERIAL=11]="OPENED_MATERIAL",e[e.EDGE_SEALED=12]="EDGE_SEALED",e[e.HOLES_ARRANGED=13]="HOLES_ARRANGED",e[e.PACKED=14]="PACKED",e[e.WAREHOUSED=15]="WAREHOUSED",e[e.SHIPPED=16]="SHIPPED",e[e.REVIEW_PENDING=17]="REVIEW_PENDING",e[e.CONFIRM_PENDING=18]="CONFIRM_PENDING",e[e.PAY_COLLECT_PENDING=19]="PAY_COLLECT_PENDING",e[e.PAY_COLLECTED=20]="PAY_COLLECTED",e[e.SPLIT_ORDER_PENDING=21]="SPLIT_ORDER_PENDING",e[e.COMPLETED=24]="COMPLETED"}(me||(me={})),function(e){e[e.OTHER=0]="OTHER",e[e.NATURAL=1]="NATURAL",e[e.MODEL_ROOM=2]="MODEL_ROOM",e[e.NEW_MEDIA=3]="NEW_MEDIA",e[e.LIVE=4]="LIVE",e[e.CROSS_COOP=5]="CROSS_COOP",e[e.TELEMARKETING=6]="TELEMARKETING",e[e.OLD_INTRODUCE=7]="OLD_INTRODUCE",e[e.REPURCHASE=8]="REPURCHASE"}(Qe||(Qe={})),function(e){e[e.FORWARD=0]="FORWARD",e[e.REVERSE=1]="REVERSE"}(be||(be={})),function(e){e[e.sys=0]="sys",e[e.custom=1]="custom"}(_e||(_e={})),function(e){e[e.DYNAMIC=0]="DYNAMIC",e[e.STATIC=1]="STATIC"}(Se||(Se={})),function(e){e.AUDIT_PASS="audit_pass",e.AUDIT_REJECT="audit_reject",e.RESUBMIT="resubmit"}(we||(we={}));var Me,xe,Pe,Te,Fe,Oe,Le;new Map([[we.AUDIT_PASS,"pass"],[we.AUDIT_REJECT,"reject"],[we.RESUBMIT,"resubmit"]]);!function(e){e[e.AUDIT=2]="AUDIT"}(Me||(Me={})),function(e){e[e.AUDIT=0]="AUDIT"}(xe||(xe={})),function(e){e.PASS="pass",e.REJECT="reject",e.RESUBMIT="resubmit",e.CREATE="create",e.ARRAIGNED="arraigned",e.CLAIM="claim",e.SEND_BACK="sendBack",e.CANCEL="cancel",e.PAY_REGISTER="payRegister",e.PAY_COLLECT_CONFIRM="payCollectConfirm",e.SPLIT_ORDER_CONFIRM="splitOrderConfirm",e.GEN_BATCH="genBatch",e.PREPARE_MATERIAL_CONFIRM="prepareMaterialConfirm",e.OPEN_MATERIAL_CONFIRM="openMaterialConfirm",e.EDGE_SEALED_CONFIRM="edgeSealedConfirm",e.HOLES_ARRANGED_CONFIRM="holesArrangedConfirm",e.PICK_CONFIRM="pickConfirm",e.PACKED_CONFIRM="packedConfirm",e.WAREHOUSED_CONFIRM="warehousedConfirm",e.SHIPPED_CONFIRM="shippedConfirm",e.COMPLETED_CONFIRM="COMPLETED_CONFIRM",e.REVOKE="revoke",e.DESIGN_SUBMIT="designSubmit",e.EDIT="orderEdit"}(Pe||(Pe={})),function(e){e[e.CUSTOMER_NAME=1]="CUSTOMER_NAME",e[e.CUSTOMER_PHONE=2]="CUSTOMER_PHONE",e[e.CUSTOMER_ADDR=3]="CUSTOMER_ADDR"}(Te||(Te={})),function(e){e[e.MYSELF=1]="MYSELF",e[e.ALL=2]="ALL"}(Fe||(Fe={})),function(e){e[e.STR=0]="STR",e[e.INT=1]="INT",e[e.FLOAT=2]="FLOAT",e[e.BOOL=3]="BOOL"}(Oe||(Oe={})),function(e){e.API_CALL="API_CALL"}(Le||(Le={}));var Ne,ke,Ge,Ue,je=function(){function e(){}return e.getEvent=function(){return e._event},e.setEvent=function(t){e._event=t},e.emitApiCalledEvent=function(t){var r=e.getEvent();r&&r.emit(t)},e.observeAsyncApiDeco=function(t){return function(r,n,i){return e.observeApiDeco(t)(r,n,i)}},e.observeSyncApiDeco=function(t){return function(r,n,i){return e.observeApiDeco(t)(r,n,i)}},e.observeApiDeco=function(t){return function(r,n,i){var o,A,a,s,u=i.value;return i.value=(o=u,a=pe((A={beforeCalled:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{apiName:u.name,status:!0,args:e,start:Date.now()}},afterCalled:function(r,i,o,A){e.emitApiCalledEvent(ae(ae({args:o,errMsg:r,status:!r,duration:Date.now()-i.start,return:A},{apiName:i.apiName||n}),t))}}).beforeCalled),s=pe(A.afterCalled),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.apply(void 0,le(e)),n=!1,i=function(){n=!0};try{var A=o.apply(this,e);if(de(A))return A.then((function(t){var o=s(void 0,r,e,t,{preventDefaultRet:i});return n?o:t})).catch((function(t){return s(t,r,e),Promise.reject(t)}));var u=s(void 0,r,e,A,{preventDefaultRet:i});return n?u:A}catch(t){throw s(t,r,e),t}}),i}},e}();!function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW",e[e.CABINET_COPY=4]="CABINET_COPY",e[e.WARDROBE_COPY=5]="WARDROBE_COPY",e[e.DOOR_WINDOW_COPY=6]="DOOR_WINDOW_COPY"}(Ne||(Ne={})),function(e){e[e.ADD=0]="ADD",e[e.UPDATE=1]="UPDATE",e[e.REMOVE=2]="REMOVE",e[e.NONE=3]="NONE"}(ke||(ke={})),function(e){e[e.CROWN=0]="CROWN",e[e.LIGHT=1]="LIGHT",e[e.SKIRT=2]="SKIRT",e[e.COUNTERTOP=3]="COUNTERTOP"}(Ge||(Ge={})),function(e){e.ZH_CN="zh_CN",e.EN_US="en_US",e.DE_DE="de_DE",e.FR_FR="fr_FR",e.JA_JP="ja_JP",e.ZH_TW="zh_TW",e.RU_RU="ru_RU",e.KO_KR="ko_KR",e.ES_ES="es_ES",e.AR_EG="ar_EG",e.EN_CN="en_CN",e.VI="vi"}(Ue||(Ue={}));var Ve,He,Ye,Ke="$$geometry_color",qe="$$geometry_opacity",Je=[596,2048,2049];!function(e){e.CUSTOM="custom",e.TOP_MODEL="top_model",e.ACCESSORY="accessory",e.PRODUCT="product"}(Ve||(Ve={})),function(e){e.CLICK="click",e.DB_CLICK="double_click"}(He||(He={})),function(e){e.PARAM_MODEL="param_model",e.PARAM_MODEL_ASSEMBLY="param_model_assembly",e.FITTING_MODEL="fitting_model"}(Ye||(Ye={}));var We,ze,Xe=["0","1","2","3","4","5","6","7","8","9","ctrl","alt","shift","up","right","down","left","tab","enter","capslock","esc","backspace","space","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","~","!","@","#","$","%","^","&","*","(",")","_","+",":",'"',"<",">","?",",","`","-","=","[","]","\\",";","'",",",".","/"];!function(e){e.INNER="inner",e.OUTER="outer"}(We||(We={})),function(e){e.PARAM_MODEL="paramModel",e.PARAM_MODEL_ASSEMBLY="paramModelAssembly",e.HOLE="hole",e.GROOVE="groove",e.HARDWARE="hardware",e.HARDWARE_GROOVE="hardwareGroove"}(ze||(ze={}));var Ze=r(68),$e=r.n(Ze),et=r(98),tt=r.n(et),rt=r(44),nt=r.n(rt),it=r(289),ot=r.n(it),At=r(5),at=r.n(At),st=r(47);function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lt(e,t){return(lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gt(e){var t=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(e){return!1}}();return function(){var r,n=ht(e);if(t){var i=ht(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ft(this,r)}}function ft(e,t){return!t||"object"!==ut(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ht(e){return(ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&<(e,t)}(r,e);var t=gt(r);function r(){return ct(this,r),t.apply(this,arguments)}return r}(st.CoreCustom),dt=r(365),It=r(99),yt=r.n(It),Ct=r(1127);function Et(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bt(e,t,r){return(Bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bt(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function vt(e,t){return(vt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mt(e){var t=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(e){return!1}}();return function(){var r,n=bt(e);if(t){var i=bt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qt(this,r)}}function Qt(e,t){return!t||"object"!==_t(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _t(e){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var St,wt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":_t(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Dt=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":_t(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Rt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vt(e,t)}(o,e);var t,r,n,i=mt(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).doc=new dt.CDoc,e.versionStore=new Ct.VersionStore,e.setCustom(new pt),e.setContextProvider(e.doc.getElementContext),e}return t=o,(r=[{key:"compareVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;return Bt(bt(o.prototype),"compareVersion",this).call(this,e)&&this.custom.compareVersion(e)}},{key:"exportVersion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.versionStore;e.clear(),Bt(bt(o.prototype),"exportVersion",this).call(this,e),this.custom.exportVersion(e)}},{key:"getDoc",value:function(){return this.doc}},{key:"getCustom",value:function(){return this.custom}},{key:"setCustom",value:function(e){return this.custom&&this.custom.setContextProvider(),this.custom=e.setContextProvider(this.provideContext()),this}}])&&Et(t.prototype,r),n&&Et(t,n),o}(yt.a);wt([Object(It.property)(),Dt("design:type","function"==typeof(St=void 0!==pt&&pt)?St:Object)],Rt.prototype,"custom",void 0);var Mt=r(107),xt=r.n(Mt);function Pt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ft(e,t){return(Ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ot(e){var t=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(e){return!1}}();return function(){var r,n=Nt(e);if(t){var i=Nt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Lt(this,r)}}function Lt(e,t){return!t||"object"!==kt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nt(e){return(Nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kt(e){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Gt=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":kt(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ut=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":kt(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},jt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ft(e,t)}(o,e);var t,r,n,i=Ot(o);function o(){var e;return Pt(this,o),(e=i.apply(this,arguments)).linkedIds=[],e}return t=o,(r=[{key:"getCustom",value:function(){return this.custom}},{key:"setIsAppendHardware",value:function(e){this.isAppendHardware=e}},{key:"setLinkedIds",value:function(e){this.linkedIds=e}},{key:"setHardwareData",value:function(e){this.hardwareData=e}}])&&Tt(t.prototype,r),n&&Tt(t,n),o}(xt.a);function Vt(e){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Kt(e,t){return(Kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qt(e){var t=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(e){return!1}}();return function(){var r,n=Wt(e);if(t){var i=Wt(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Jt(this,r)}}function Jt(e,t){return!t||"object"!==Vt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wt(e){return(Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gt([Object(It.property)(),Ut("design:type",Boolean)],jt.prototype,"isAppendHardware",void 0);var zt,Xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kt(e,t)}(o,e);var t,r,n,i=qt(o);function o(){return Ht(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"paramModelConstructor",get:function(){return jt}}])&&Yt(t.prototype,r),n&&Yt(t,n),o}(st.CoreParamModelAssembly),Zt=r(97),$t=new Zt.EventEmitter;!function(e){e.FITTING_MODEL_CHANGE="fittingModelChange",e.SELECTION_SERVICE_MODEL_CHANGE="selectionServiceModelChange",e.SELECTION_SERVICE_V2_MODEL_CHANGE="selectionServiceV2ModelChange",e.PLANK_FACE_CLICK="plankFaceClick",e.PLANK_FACE_HOVER="plankFaceHover",e.API_CALLED="apiCalled"}(zt||(zt={}));var er=r(34),tr=r(2),rr=r(531),nr=Object(rr.createKElementBaseClass)(),ir=er.advanced.reportObserved,or=er.advanced.reportChanged;function Ar(e){return function(e){if(Array.isArray(e))return ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ar(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ar(e,t)}(e)||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 ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ur(e,t){return(ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cr(e){var t=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(e){return!1}}();return function(){var r,n=gr(e);if(t){var i=gr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lr(this,r)}}function lr(e,t){return!t||"object"!==fr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gr(e){return(gr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fr(e){return(fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}nr.onGet=function(e){ir(e)},nr.addSetHook((function(e){or(e)}));var hr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":fr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},pr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":fr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function dr(e,t,r){var n=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=n.apply(this,t);return $t.emit(zt.FITTING_MODEL_CHANGE),i}}var Ir=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ur(e,t)}(o,e);var t,r,n,i=cr(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).setFittings([]),e.setIntersects([]),e.setGrooveFittings([]),e.setPlankFaceHintModels([]),e.setFittingHintModels([]),e.setPlankOutlineHintModels([]),e}return t=o,(r=[{key:"getFittings",value:function(e){if(e){if("ids"in e)return this.fittings.filter((function(t){return e.ids.includes(t.id)}));if("types"in e)return this.fittings.filter((function(t){return e.types.includes(t.type)}))}return this.fittings}},{key:"setFittings",value:function(e){this.fittings=e}},{key:"addFittings",value:function(e){this.fittings=[].concat(Ar(e),Ar(this.fittings))}},{key:"removeFittings",value:function(e){var t=Object(tr.difference)(this.fittings,this.getFittings(e));this.setFittings(t)}},{key:"setIntersects",value:function(e){this.intersects=e}},{key:"getIntersects",value:function(){return this.intersects}},{key:"setGrooveFittings",value:function(e){this.grooveFittings=e}},{key:"addGrooveFittings",value:function(e){this.grooveFittings=[].concat(Ar(this.grooveFittings),Ar(e))}},{key:"getGrooveFittings",value:function(){return this.grooveFittings}},{key:"setPlankFaceHintModels",value:function(e){this.plankFaceHintModels=e}},{key:"getPlankFaceHintModels",value:function(){return this.plankFaceHintModels}},{key:"setFittingHintModels",value:function(e){this.fittingHintModels=e}},{key:"getFittingHintModels",value:function(){return this.fittingHintModels}},{key:"setPlankOutlineHintModels",value:function(e){this.plankOutlineHintModels=e}},{key:"getPlankOutlineHintModels",value:function(){return this.plankOutlineHintModels}}])&&sr(t.prototype,r),n&&sr(t,n),o}(nr);hr([er.observable,pr("design:type",Array)],Ir.prototype,"fittings",void 0),hr([er.observable,pr("design:type",Array)],Ir.prototype,"intersects",void 0),hr([er.observable,pr("design:type",Array)],Ir.prototype,"grooveFittings",void 0),hr([er.observable,pr("design:type",Array)],Ir.prototype,"plankFaceHintModels",void 0),hr([er.observable,pr("design:type",Array)],Ir.prototype,"fittingHintModels",void 0),hr([er.observable,pr("design:type",Array)],Ir.prototype,"plankOutlineHintModels",void 0),hr([dr,pr("design:type",Function),pr("design:paramtypes",[Array]),pr("design:returntype",void 0)],Ir.prototype,"setFittings",null),hr([dr,pr("design:type",Function),pr("design:paramtypes",[Array]),pr("design:returntype",void 0)],Ir.prototype,"addFittings",null),hr([dr,pr("design:type",Function),pr("design:paramtypes",[Object]),pr("design:returntype",void 0)],Ir.prototype,"removeFittings",null),hr([dr,pr("design:type",Function),pr("design:paramtypes",[Array]),pr("design:returntype",void 0)],Ir.prototype,"setGrooveFittings",null),hr([dr,pr("design:type",Function),pr("design:paramtypes",[Array]),pr("design:returntype",void 0)],Ir.prototype,"addGrooveFittings",null);var yr=r(30),Cr=r.n(yr),Er=r(100),Br=r.n(Er);function vr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mr(e,t){return(mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qr(e){var t=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(e){return!1}}();return function(){var r,n=_r(e);if(t){var i=_r(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return br(this,r)}}function br(e,t){return!t||"object"!==Sr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _r(e){return(_r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sr(e){return(Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var wr=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Sr(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Dr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Sr(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Rr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mr(e,t)}(o,e);var t,r,n,i=Qr(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).id=Br()(),t.linkModel=e.linkModel,t.hintOutline=e.hintOutline,t.visible=e.linkModel instanceof xt.a?!e.linkModel.getInvisible():e.linkModel.visible,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}}])&&vr(t.prototype,r),n&&vr(t,n),o}(nr);function Mr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xr(e,t){return(xr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pr(e){var t=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(e){return!1}}();return function(){var r,n=Fr(e);if(t){var i=Fr(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Tr(this,r)}}function Tr(e,t){return!t||"object"!==Or(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fr(e){return(Fr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Or(e){return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}wr([Cr.a,Dr("design:type",String)],Rr.prototype,"id",void 0),wr([Cr.a,Dr("design:type",Object)],Rr.prototype,"linkModel",void 0),wr([Cr.a,Dr("design:type","function"!=typeof!1&&Object)],Rr.prototype,"hintOutline",void 0),wr([Cr.a,Dr("design:type",Boolean)],Rr.prototype,"visible",void 0);var Lr,Nr,kr,Gr,Ur=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Or(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},jr=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Or(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Vr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xr(e,t)}(o,e);var t,r,n,i=Pr(o);function o(e,t,r,n){var A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(A=i.call(this)).fittingData=n,A.visible=!1,A.viewColor=0,A.opacity=1;var a=r.position,s=r.size,u=r.rotate,c=r.height,g=r.boundingBox;return A.id=e||Br()(),A.position=a instanceof at.a?a:new at.a(a),A.size=s instanceof at.a?s:new at.a(s),A.rotate=u instanceof at.a?u:new at.a(s),A.height=c,A.type="fittingType"in n?n.fittingType:l.INTERSECTED,A.visible=A.type!==l.INTERSECTED,A.linkParamModelId=t,A.boundingBox=g,A}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&Mr(t.prototype,r),n&&Mr(t,n),o}(nr);Ur([Cr.a,jr("design:type",String)],Vr.prototype,"id",void 0),Ur([Cr.a,jr("design:type","function"==typeof(Lr=void 0!==at.a&&at.a)?Lr:Object)],Vr.prototype,"position",void 0),Ur([Cr.a,jr("design:type","function"==typeof(Nr=void 0!==at.a&&at.a)?Nr:Object)],Vr.prototype,"size",void 0),Ur([Cr.a,jr("design:type",Number)],Vr.prototype,"height",void 0),Ur([Cr.a,jr("design:type","function"==typeof(kr=void 0!==l&&l)?kr:Object)],Vr.prototype,"type",void 0),Ur([Cr.a,jr("design:type","function"==typeof(Gr=void 0!==at.a&&at.a)?Gr:Object)],Vr.prototype,"rotate",void 0),Ur([Cr.a,jr("design:type",Number)],Vr.prototype,"radius",void 0),Ur([Cr.a,jr("design:type",Object)],Vr.prototype,"visible",void 0),Ur([Cr.a,jr("design:type",Object)],Vr.prototype,"viewColor",void 0),Ur([Cr.a,jr("design:type",Object)],Vr.prototype,"opacity",void 0);var Hr=r(16),Yr=r.n(Hr);function Kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Wr=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.length=0,this.clockwise=t.clockwise,this.type=t.type,this.radius=t.radius,this.minorArc=t.minorArc,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.ellipseCenter=t.ellipseCenter,this.path=r,this.id=Br()()}var t,r,n;return t=e,(r=[{key:"getType",value:function(){return this.type}},{key:"getVector",value:function(){var e=this.start,t=this.end;return e&&t?function(e,t){return new u.Vector2d(t.x-e.x,t.y-e.y)}(e.getPosition(),t.getPosition()):new u.Vector2d}},{key:"getRealLine",value:function(){var e=Kr(this.start.getPointsForRender(),2)[1],t=Kr(this.end.getPointsForRender(),1)[0];return this.getType()===B.SEGMENT?new u.LineSeg2d(e,t):this.getType()===B.ELLIPSE_ARC?this.getEllipseLine():this.getCurveLine()}},{key:"getEllipseLine",value:function(){var e=new u.CCS2d(new u.Point2d(this.ellipseCenter.x,this.ellipseCenter.y),new u.Vector2d(1,0)),t=new u.Ellipse2d(e,this.majorRadius,this.minorRadius);return u.EllipticalArc2d.makeByStartEndPoints(t,this.start.getPosition(),this.end.getPosition(),!this.clockwise)}},{key:"getCurveLine",value:function(){var e=this.start,t=this.end;if(this.getType()!==B.CIRCLE_ARC)return new u.LineSeg2d(e.getPosition(),t.getPosition());var r,n,i,o,A,a,s,c,l,g,f,h=this.getVector().length/2;return this.radius<h&&(this.radius=h),r=this.radius,n=e.getPosition(),i=t.getPosition(),o=this.minorArc,A=this.clockwise,a=new u.LineSeg2d(n,i),s=a.length/2,c=a.getPoint(s),l=Math.sqrt(r*r-s*s),g=(A?o?a.rightNormal:a.leftNormal:o?a.leftNormal:a.rightNormal).multiplied(l/a.leftNormal.length),f=c.added(g),u.Arc2d.makeArcByStartEndPoints(f,n,i,!A)}},{key:"getLineLength",value:function(){var e=this.getRealLine();return e?new u.LineSeg2d(e.startPoint,e.endPoint).length:0}},{key:"getNormalLineLength",value:function(){return this.start&&this.end?this.start.getPosition().distanceTo(this.end.getPosition()):0}},{key:"getRenderPoints",value:function(){return[Kr(this.start.getPointsForRender(),2)[1],Kr(this.end.getPointsForRender(),1)[0]]}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Jr(t.prototype,r),n&&Jr(t,n),e}();function zr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Xr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Zr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var $r=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clockwise=!!t.clockwise,this.type=t.type,this.position=new u.Point2d(t.position),this.radius=t.radius,this.cornerCutDistance=t.cornerCutDistance,this.path=r,this.majorRadius=t.majorRadius,this.minorRadius=t.minorRadius,this.offset=new u.Vector2d(t.offset||{x:0,y:0}),this.id=Br()()}var t,r,n;return t=e,(r=[{key:"getPosition",value:function(){return this.position}},{key:"getType",value:function(){return this.type}},{key:"getLineLength",value:function(){if(this.getType()===E.NONE)return 0;var e=this.getCurveLineAndPoints().curveLine;return new u.LineSeg2d(e.startPoint,e.endPoint).length}},{key:"getCurveLineAndPoints",value:function(){var e=this.clockwise,t=this.prevLine,r=this.nextLine,n=this.offset,i=this.getType(),o=this.getPosition(),A=this.getPointsForRender(),a=zr(A,2),s=a[0],c=a[1];if(i===E.CIRCLE||i===E.CUT_CIRCLE){if(i===E.CIRCLE){var l=t.getVector().getPerpVector(),g=r.getVector().getPerpVector();if(l.isParallel(g))return{curveLine:u.Arc2d.makeArcByStartEndPoints(s,s,c,!0),renderPoints:A};var f=new u.Line2d(s,l),h=new u.Line2d(c,g),p=zr(f.intersectCurve(h),1)[0];if(!p)return{curveLine:new u.LineSeg2d(s,c),renderPoints:A};var d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!1);return this.radius=void 0===this.radius?d.radius:this.radius,Math.abs(d.arcAngle)>Math.PI&&(d=u.Arc2d.makeArcByStartEndPoints(p.point,s,c,!0)),{curveLine:d,renderPoints:A}}return{curveLine:u.Arc2d.makeArcByStartEndPoints(o.added(n),s,c,!e),renderPoints:A}}if(i===E.ELLIPSE){var I=o.added(n),y=new u.CCS2d(new u.Point2d(I.x,I.y),new u.Vector2d(1,0)),C=new u.Ellipse2d(y,this.majorRadius,this.minorRadius);return{curveLine:u.EllipticalArc2d.makeByStartEndPoints(C,s,c,!e),renderPoints:A}}return{curveLine:new u.LineSeg2d(s,c),renderPoints:A}}},{key:"getPointsForRender",value:function(){var e=this.radius,t=this.prevLine,r=this.nextLine,n=this.cornerCutDistance,i=void 0===n?[0,0]:n,o=this.offset,A=this.getType(),a=this.getPosition();if(A===E.NONE)return[a,a];if(!t||!r)return[a,a];var s=new u.Ray2d(t.end.getPosition(),t.getVector().reversed()),c=new u.Ray2d(r.start.getPosition(),r.getVector());if(A===E.LINE)return[s.getPoint(i[0]),c.getPoint(i[1])];if(A===E.CIRCLE){if(void 0!==e){var l=s.direction,g=c.direction,f=l.angleTo(g),h=Math.abs(e/Math.tan(f/2));return[s.getPoint(h),c.getPoint(h)]}if(i)return[s.getPoint(i[0]),c.getPoint(i[0])]}if(A===E.CUT_CIRCLE){var p=a.added(o),d=new u.Circle2d(p,e),I=d.intersectCurve(s),y=d.intersectCurve(c);if(I.length&&y.length)return[I[0].point,y[0].point]}if(A===E.ELLIPSE){var C=a.added(o),B=new u.CCS2d(new u.Point2d(C.x,C.y),new u.Vector2d(1,0)),v=new u.Ellipse2d(B,this.majorRadius,this.minorRadius),m=v.intersectCurve(s),Q=v.intersectCurve(c);if(m.length&&Q.length)return[m[0].point,Q[0].point]}return[a,a]}},{key:"getRenderPoints",value:function(){return this.getPointsForRender()}},{key:"getHint",value:function(){return this.hint}},{key:"setHint",value:function(e){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,e),this.hint=e}},{key:"clearHint",value:function(){this.path.plankArea._trackUpdateField({context:this,field:"hint"},this.hint,void 0),this.hint=void 0}}])&&Zr(t.prototype,r),n&&Zr(t,n),e}();function en(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rn(e){return function(e){if(Array.isArray(e))return An(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||on(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=on(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function on(e,t){if(e){if("string"==typeof e)return An(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?An(e,t):void 0}}function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function an(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var sn=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._points=[],this._lines=[],this.getAllPolygonPoints=function(){return r.getPoints().reduce((function(e,t,r){t.getType()===E.NONE&&(e=e.concat(t.getPosition())),t.getType()===E.LINE&&(e=e.concat(t.getPointsForRender())),t.getType()!==E.CIRCLE&&t.getType()!==E.CUT_CIRCLE||(e=e.concat(t.getCurveLineAndPoints().curveLine.getApproximatePoints()));var n=t.nextLine;if(!n)return e;if(n.getType()===B.CIRCLE_ARC){var i=n.getCurveLine().getApproximatePoints();e=e.concat(i.slice(1,i.length-1))}return e}),[])},this.getEdges=function(){var e,t=r.getPoints(),n=r.getLines(),i=[],o=nn(t);try{for(o.s();!(e=o.n()).done;){var A=e.value;A.getType()!==E.NONE&&i.push(A.getCurveLineAndPoints().curveLine)}}catch(e){o.e(e)}finally{o.f()}var a,s=nn(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.push(u.getRealLine())}}catch(e){s.e(e)}finally{s.f()}return i},this.getGlobalTopPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,0).appliedMatrix4(r.matrix4)}))},this.getGlobalBottomPolygonPoints=function(){return r.getAllPolygonPoints().map((function(e){return new u.Point3d(e.x,e.y,-r.depth).appliedMatrix4(r.matrix4)}))};var n=t.type,i=t.points,o=void 0===i?[]:i,A=t.lines,a=void 0===A?[]:A,s=t.forceCCW,c=void 0===s||s,l=t.depth,g=t.matrix4,f=t.offset;if(this.id=Br()(),this.type=n,this.depth=l,this.matrix4=g,this.offset=f,this.setPoints(o),this.setLines(a),this.linkPointsAndLines(),c){var h=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));h.isSelfIntersect()||h.isCCW()||this.turnover()}this.forceCCW=c,this.adjustClockwise()}var t,r,n;return t=e,(r=[{key:"points",get:function(){return this._points},set:function(e){this.setPoints(e)}},{key:"getPoints",value:function(){return this._points}},{key:"setPoints",value:function(e){var t=this;this._points=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"lines",get:function(){return this.getLines()},set:function(e){this.setLines(e)}},{key:"getLines",value:function(){return this._lines}},{key:"setLines",value:function(e){var t=this;this._lines=e,e.forEach((function(e){e.path=t})),this.adjustClockwise()}},{key:"turnover",value:function(){if(!this.forceCCW||!this.isClosedPath()){if(this.isClosedPath()){this.setPoints(this.getPoints().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e})));var e=this.getLines().slice().reverse().map((function(e){return e.clockwise=!e.clockwise,e}));this.setLines(e.slice(1).concat(e[0]))}else this.setPoints(this.getPoints().slice().reverse()),this.setLines(this.getLines().slice().reverse());this.linkPointsAndLines()}}},{key:"isClosedPath",value:function(){return this.getLines().length===this.getPoints().length}},{key:"linkPointsAndLines",value:function(){var e=this,t=this.getLines(),r=this.getPoints();r.forEach((function(e){e.prevLine=void 0,e.nextLine=void 0})),t.forEach((function(n,i){n.start=void 0,n.end=void 0;var o,A=r[i];o=i===t.length-1&&e.isClosedPath()?r[0]:r[i+1],n.path=e,A.path=e,o.path=e,A.nextLine=n,o.prevLine=n,n.start=A,n.end=o}))}},{key:"getAllRenderPoints",value:function(){var e=[];return this.getPoints().forEach((function(t){t.getType()!==E.NONE?e.push.apply(e,rn(t.getPointsForRender())):e.push(t.getPosition())})),e}},{key:"getAllRealPathCurves",value:function(){var e=[];return this.getLines().forEach((function(t){var r,n;if((null===(r=t.start)||void 0===r?void 0:r.getType())!==E.NONE){var i=null===(n=t.start)||void 0===n?void 0:n.getCurveLineAndPoints().curveLine;i&&e.push(i)}var o=t.getRealLine();e.push(o)})),e}},{key:"transformPathToFace2D",value:function(){var e={loops:[]};return e.loops.push(this.getAllRealPathCurves()),e}},{key:"transformPathToGeomLoop2d",value:function(){return new u.GeomLoop2d(this.getAllRealPathCurves())}},{key:"computeBoundingBox",value:function(){var e=new u.BBox2d;return this.getPoints().forEach((function(t){t.getType()!==E.NONE&&e.merge(t.getCurveLineAndPoints().curveLine.getBounding())})),this.getLines().forEach((function(t){e.merge(t.getRealLine().getBounding())})),e}},{key:"adjustClockwise",value:function(){if(this.forceCCW&&this.isClosedPath()){var e=u.GeomLoop2d.makeByPoints(this.getPoints().map((function(e){return e.getPosition()})));if(!e.isSelfIntersect()&&!e.isCCW()){this.setPoints(this.getPoints().slice().reverse());var t=this.getLines().slice().reverse();this.setLines(t.slice(1).concat(t[0]).map((function(e){return e.type===B.CIRCLE_ARC&&(e.clockwise=!e.clockwise),e}))),this.linkPointsAndLines()}}}},{key:"getAllCurves",value:function(){var e=this.getPoints(),t=this.getLines(),r=function(e){return{curve:e.getRealLine(),source:e}};return e.reduce((function(e,n,i){var o;n.getType()!==E.NONE&&(o={curve:n.getCurveLineAndPoints().curveLine,source:n});var A=o?[o]:[];return e.concat(t[i]?[].concat(A,[r(t[i])]):[].concat(A))}),[]).concat(t.slice(e.length).map(r))}},{key:"getRedundantPoints",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getPoints().length;if(n<=3)return[];var i=this.getPoints().indexOf(e);if(-1===i)return[];var o=[];return(r?[1]:[1,-1]).forEach((function(r){var A=(i+r+n)%n,a=t.getPoints()[A];e.getPosition().isEqual(a.getPosition(),1)&&(a.nextLine.getType()!==B.SEGMENT?o.push(e):o.push(a))})),o}},{key:"getRenderPoints",value:function(){var e=[];return this.points.forEach((function(t){t.getType()===E.NONE?e.push(t.getPosition()):e.push.apply(e,rn(t.getRenderPoints()))})),e}}])&&an(t.prototype,r),n&&an(t,n),e}();function un(e,t){var r=t.paramPoints.map((function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach((function(t){tn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);return 0==t.radius&&[E.CIRCLE,E.CUT_CIRCLE,E.ELLIPSE].includes(t.type)&&(t.type=E.NONE),new $r(t)})),n=t.paramPathLines.map((function(e){return new Wr(e)}));return new sn({type:e,offset:t.offset,points:r,lines:n,forceCCW:!1})}function cn(e){return function(e){if(Array.isArray(e))return ln(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ln(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ln(e,t)}(e)||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 ln(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fn(e,t){return(fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hn(e){var t=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(e){return!1}}();return function(){var r,n=dn(e);if(t){var i=dn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pn(this,r)}}function pn(e,t){return!t||"object"!==In(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function In(e){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var yn,Cn,En=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":In(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Bn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":In(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},vn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fn(e,t)}(o,e);var t,r,n,i=hn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).viewColor=0,t.visible=!1;var r=e.data,n=e.path,A=e.model;return t.id=r.id,t.type=l.HARDWARE_GROOVE,t.path=n,t.depth=r.depth,t.model=A,t.linkParamModelId=A.id,t.fittingData=r,t}return t=o,(r=[{key:"getTopRenderPoints",value:function(){var e=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(t){return new u.Point3d(t.x,t.y,0).appliedMatrix4(e)}))}},{key:"getBottomRenderPoints",value:function(){var e=this,t=this.pointToGlobalMatrix();return this.path.getAllPolygonPoints().map((function(r){return new u.Point3d(r.x,r.y,-e.depth).appliedMatrix4(t)}))}},{key:"pointToGlobalMatrix",value:function(){var e=new u.Matrix4,t=this.model.getSize();return e.fromArray(cn(this.model.getConcatenatedMatrix().multiply((new nt.a).makeTranslation(new at.a(-t.x/2,t.y/2,-t.z/2))).elements.values())),e.multiplied(this.path.matrix4)}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}},{key:"setVisible",value:function(e){this.visible=e}}])&&gn(t.prototype,r),n&&gn(t,n),o}(nr);En([Cr.a,Bn("design:type",String)],vn.prototype,"id",void 0),En([Cr.a,Bn("design:type",Object)],vn.prototype,"viewColor",void 0),En([Cr.a,Bn("design:type",Object)],vn.prototype,"visible",void 0),En([Cr.a,Bn("design:type","function"==typeof(yn=void 0!==l&&l)?yn:Object)],vn.prototype,"type",void 0),En([Cr.a,Bn("design:type","function"==typeof(Cn=void 0!==sn&&sn)?Cn:Object)],vn.prototype,"path",void 0),En([Cr.a,Bn("design:type",Number)],vn.prototype,"depth",void 0),En([Cr.a,Bn("design:type",Number)],vn.prototype,"opacity",void 0);var mn=r(142),Qn=r.n(mn);function bn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _n(e,t){return(_n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sn(e){var t=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(e){return!1}}();return function(){var r,n=Dn(e);if(t){var i=Dn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wn(this,r)}}function wn(e,t){return!t||"object"!==Rn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dn(e){return(Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Rn(e){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Mn,xn,Pn,Tn,Fn,On=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Rn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ln=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Rn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Nn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_n(e,t)}(o,e);var t,r,n,i=Sn(o);function o(e,t,r,n,A,a,s){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(u=i.call(this)).viewColor=0,u.id=e||Br()(),u.position=r instanceof at.a?r:new at.a(r),u.size=A instanceof at.a?A:new at.a(A),u.rotate=n instanceof at.a?n:new at.a(A),u.type=t,u.geometryModel=a,u.originPoints=s,u}return t=o,(r=[{key:"setViewColor",value:function(e){this.viewColor=e}}])&&bn(t.prototype,r),n&&bn(t,n),o}(nr);function kn(e,t){return(kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gn(e){var t=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(e){return!1}}();return function(){var r,n=jn(e);if(t){var i=jn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Un(this,r)}}function Un(e,t){return!t||"object"!==Vn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jn(e){return(jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vn(e){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}On([Cr.a,Ln("design:type",String)],Nn.prototype,"id",void 0),On([Cr.a,Ln("design:type","function"==typeof(Mn=void 0!==g&&g)?Mn:Object)],Nn.prototype,"type",void 0),On([Cr.a,Ln("design:type","function"==typeof(xn=void 0!==at.a&&at.a)?xn:Object)],Nn.prototype,"position",void 0),On([Cr.a,Ln("design:type","function"==typeof(Pn=void 0!==at.a&&at.a)?Pn:Object)],Nn.prototype,"size",void 0),On([Cr.a,Ln("design:type","function"==typeof(Tn=void 0!==at.a&&at.a)?Tn:Object)],Nn.prototype,"rotate",void 0),On([Cr.a,Ln("design:type","function"==typeof(Fn=void 0!==Qn.a&&Qn.a)?Fn:Object)],Nn.prototype,"geometryModel",void 0),On([Cr.a,Ln("design:type",Array)],Nn.prototype,"originPoints",void 0),On([Cr.a,Ln("design:type",Object)],Nn.prototype,"viewColor",void 0);var Hn=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Yn=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Kn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kn(e,t)}(r,e);var t=Gn(r);function r(e){var n,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).id=null!==(i=e.id)&&void 0!==i?i:Br()(),n.linkModel=e.linkModel,n.plankFaces=e.plankFaces,n.hintOutline=e.hintOutline,n}return r}(nr);function qn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jn(e,t){return(Jn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=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(e){return!1}}();return function(){var r,n=Xn(e);if(t){var i=Xn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zn(this,r)}}function zn(e,t){return!t||"object"!==Zn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xn(e){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zn(e){return(Zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Hn([Cr.a,Yn("design:type",String)],Kn.prototype,"id",void 0);var $n=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Zn(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ei=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Zn(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jn(e,t)}(o,e);var t,r,n,i=Wn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this);var r=e.points,n=e.linkModel,A=e.color,a=e.opacity,s=e.height,u=e.id;return t.id=u,t.visible=!0,t.viewColor=A,t.opacity=a,t.points=r,t.height=s,t.linkModel=n,t}return t=o,(r=[{key:"setVisible",value:function(e){this.visible=e}},{key:"setViewColor",value:function(e){this.viewColor=e}},{key:"setOpacity",value:function(e){this.opacity=e}}])&&qn(t.prototype,r),n&&qn(t,n),o}(nr);function ri(e,t){var r=[0,0,0];return 0===e?r[2]=1:1===e?r[0]=-1:2===e?r[1]=-1:3===e?r[0]=1:4===e?r[1]=1:5===e&&(r[2]=-1),t?new t({x:r[0],y:r[1],z:r[2]}):{x:r[0],y:r[1],z:r[2]}}$n([Cr.a,ei("design:type",String)],ti.prototype,"id",void 0),$n([Cr.a,ei("design:type",Object)],ti.prototype,"linkModel",void 0),$n([Cr.a,ei("design:type",Object)],ti.prototype,"viewColor",void 0),$n([Cr.a,ei("design:type",Number)],ti.prototype,"opacity",void 0),$n([Cr.a,ei("design:type",Boolean)],ti.prototype,"visible",void 0),$n([Cr.a,ei("design:type",Array)],ti.prototype,"points",void 0),$n([Cr.a,ei("design:type",Number)],ti.prototype,"height",void 0);var ni=[new u.Vector3d({x:1,y:0,z:0}),new u.Vector3d({x:0,y:1,z:0}),new u.Vector3d({x:0,y:0,z:1})];function ii(e){return!(!e||e.fittingType!==l.HOLE)}function oi(e){return!(!e||e.fittingType!==l.GROOVE)}function Ai(e,t,r){var n,i,o=r.holeColor,A=r.grooveColor,a=r.holeOpacity,s=r.grooveOpacity,c=function(e,t){var r,n,i=t.start,o=t.end,A=t.plankFaceId,a=e.getSize(),s=(new nt.a).makeTranslation(new at.a(-a.x/2,a.y/2,-a.z/2)),c=e.getConcatenatedMatrix().multiply(s),l=new u.Point3d(i),g=new u.Point3d(o),f=new u.LineSeg3d(l,g),h=f.getPoint(f.length/2),p=new at.a(h).applyMatrix4(c);if(ii(t)){var d=t.diameter;r=new at.a(d,f.length,d),n=at.a.Y_AXIS}if(oi(t)){var I=t.width,y=t.depth;[0,5].includes(A)?(r=new at.a(I,f.length,y),n=at.a.Y_AXIS):[2,4].includes(A)?(r=new at.a(I,y,f.length),n=at.a.Z_AXIS):[1,3].includes(A)&&(r=new at.a(y,I,f.length),n=at.a.Z_AXIS)}var C=new at.a(o).sub(new at.a(i)).normalize(),E=(new ot.a).setFromTwoVectors(n,C),B=c.clone().multiply((new nt.a).makeRotationFromQuaternion(E)),v=new at.a((new tt.a).setFromRotationMatrix(B)),m=new $e.a(r,p,v);return new Vr(t.id,e.id,{position:p,size:r,rotate:v,height:f.length,boundingBox:m},t)}(t,e);ii(e)?(n=o,i=a):oi(e)&&(n=A,i=s);var l=e.params||[],g=l.find((function(e){return e.key===Ke})),f=l.find((function(e){return e.key===qe}));return c.setVisible(!0),c.setViewColor(g?g.value:n),c.setOpacity(f?Number(f.value):i),c}var ai=r(725),si=r(726),ui=r(10),ci=r(114),li=r.n(ci),gi=r(141),fi=r.n(gi),hi=r(209),pi=r.n(hi),di=r(113),Ii=r.n(di),yi=r(210),Ci=r.n(yi),Ei=r(425),Bi=r.n(Ei),vi=r(72),mi=r.n(vi),Qi=r(188),bi=r.n(Qi);function _i(e){var t=[];e.shapes.forEach((function(e){var r=e.getTriangles();r&&0!==r.length&&mi.a.addElements(t,r)}));var r=function(e){var t=[];return e.forEach((function(e){return mi.a.addUniqueElements(t,e.points)})),t}(t),n=function(e,t){return e.map((function(e){var r=new at.a;return r.x=t.indexOf(e.points[0]),r.y=t.indexOf(e.points[1]),r.z=t.indexOf(e.points[2]),r}))}(t,r);return{vertices:r,textures:function(e,t){if(!t){var r=(new bi.a).includePoints(e);t=new Yr.a(r.min.x,r.max.y)}return e.map((function(e){return Yr.a.sub(e,t)}))}(r,e.pivot),indices:n}}var Si=new at.a(0,0,0);function wi(e){var t=e.planeTransform;return function(e){try{var t=_i(e),r=new Qn.a;return r.vertices=new Float32Array(at.a.toFloatArray(e.computeVertices(t.vertices))),r.normals=new Float32Array(at.a.toFloatArray(e.computeNormals(t.vertices))),r.textures=new Float32Array(Yr.a.toFloatArray(t.textures)),r.indices=new Uint16Array(at.a.toFloatArray(t.indices)),r}catch(e){return void console.error(e)}}({shapes:e.shapes,pivot:e.pivot,computeVertices:function(e){return e.map((function(e){return Si.set(e.x,e.y,0),t.localToWorld(Si)}))},computeNormals:function(e){var r=t.basicZ.clone().normalize();return e.map((function(){return r.clone()}))}})}function Di(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ri(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ri(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Mi,xi=new at.a(0,0,0);function Pi(e,t,r){for(var n,i=e.id,o=r.getConcatenatedMatrix(),A=r.getSize(),a=(new nt.a).makeTranslation(new at.a(-A.x/2,A.y/2,-A.z/2)),s=o.clone().multiply(a),u=t["@type"],c=(n=u===g.FACE?Ti(t,s):function(e,t){var r,n=e.shell,i=ai.fromJson(JSON.parse(n)).map((function(e){return e.getFaces()})).flat().map((function(e){return si.triangulate2(e)})),o=new Qn.a,A=0,a=[],s=[],u=[],c=[],l=Di(i);try{for(l.s();!(r=l.n()).done;){var g=r.value;a.push(g.vertices.map((function(e){return xi.fromArray(e).applyMatrix4(t).toArray()})).flat()),s.push(g.normals.flat()),u.push(g.uvs.flat()),c.push(g.triangleIndices.flat().map((function(e){return e+A}))),A+=g.vertices.length}}catch(e){l.e(e)}finally{l.f()}return o.vertices=new Float32Array(a.flat()),o.normals=new Float32Array(s.flat()),o.textures=new Float32Array(u.flat()),o.indices=new Float32Array(c.flat()),o}(t,s)).getBoundingBox3().getCenter(),l=li.a.decompose(s).rotation,f=li.a.compose(c,l,at.a.ONE),h=(new nt.a).getInverse(f),p=new Float32Array(n.vertices),d=new fi.a,I=0;I<p.length;I+=3)xi.set(p[I],p[I+1],p[I+2]).applyMatrix4(h),d.includePoint(xi);return new Nn(i,u,c,l,d.getSize(),n,t.points.map((function(e){return new at.a(e).applyMatrix4(s)})))}function Ti(e,t){var r=e.points.map((function(e){return new at.a(e).applyMatrix4(t)})),n=(new pi.a).setFromCoplanarPoints(r[0],r[1],r[2]).normal,i=r[1].clone().sub(r[0]).normalize(),o=n.clone().cross(i).normalize(),A=new Bi.a(i,o,n,r[0]),a=r.map((function(e){return new Yr.a(A.worldToLocal(e))})),s=new Ii.a(a);return wi({planeTransform:A,shapes:[new Ci.a(s)]})}function Fi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fi(Object(r),!0).forEach((function(t){Li(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ni(e,t){var r=t.clone().inversed(),n=new sn({id:e.id,type:We.OUTER,points:e.points.map((function(e){return Oi(Oi({},e),{},{position:(t=e.position,n=new u.Point3d(t).appliedMatrix4(r),new u.Point2d(n))});var t,n})).map(ki),lines:e.lines.map(Gi),depth:e.depth,matrix4:t});return n.linkPointsAndLines(),n}function ki(e){return new $r(e)}function Gi(e){return new Wr(e)}!function(e){e[e.POINT=0]="POINT",e[e.LINE=1]="LINE"}(Mi||(Mi={}));var Ui=new u.Tolerance.Tolerance(.01,.01,.01);function ji(e){if(e.getType()===E.NONE)return!0;var t=e.prevLine,r=e.nextLine;return t.type!==B.CIRCLE_ARC&&r.type!==B.CIRCLE_ARC&&(0!==e.radius&&(!e.cornerCutDistance||0!==e.cornerCutDistance[0]&&0!==e.cornerCutDistance[1]))}function Vi(e){return e.type===B.SEGMENT||(!(e.type!==B.CIRCLE_ARC||!u.Num.isEqual(e.getVector().length,2*e.radius))||(e.type!==B.CIRCLE_ARC||!u.Num.isBigger(e.getVector().length,2*e.radius)))}function Hi(e){return e.type===Mi.POINT?e.val.getCurveLineAndPoints().curveLine:e.type===Mi.LINE?e.val.getRealLine():void 0}function Yi(e,t){if(e.type===Mi.POINT&&e.val.getType()===E.NONE)return!0;if(t.type===Mi.POINT&&t.val.getType()===E.NONE)return!0;var r=Hi(e),n=Hi(t);if(!r||!n)return!1;var i=u.Curve2dIntersect.curve2dIntersectCurve2d(r,n,Ui);return!(1===i.length&&!i[0].point.isEqual(r.startPoint,.01)&&!i[0].point.isEqual(r.endPoint,.01))&&(!(i.length>1)||i.every((function(e){return e.point.isEqual(i[0].point,.01)})))}function Ki(e,t,r){var n=r.grooveColor,i=r.grooveOpacity,o=function(e,t){var r=ri(e,u.Vector3d),n=ni.find((function(e){return 0===e.dot(r)})),i=r.clone().cross(n).normalized(),o=u.Matrix4.makeBasis(n,i,r);return t&&o.setTranslation(new u.Vector3d(function(e,t){var r={x:0,y:0,z:0};0===e?r.z=t.z:3===e?r.x=t.x:2===e&&(r.y=-t.y);return r}(e,t))),o}(e.plankFaceId,t.getSize()),A=new vn({data:e,path:Ni(e,o),model:t});A.setVisible(!0);var a=(e.params||[]).find((function(e){return e.key===Ke})),s=(e.params||[]).find((function(e){return e.key===qe}));return A.setViewColor(a?a.value:n),A.setOpacity(s?Number(s.value):i),A}var qi=r(21),Ji=r(12),Wi=r(11),zi=r.n(Wi);function Xi(e){return(Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eo(e,t){return(eo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function to(e){var t=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(e){return!1}}();return function(){var r,n=no(e);if(t){var i=no(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ro(this,r)}}function ro(e,t){return!t||"object"!==Xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function no(e){return(no=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var io=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eo(e,t)}(o,e);var t,r,n,i=to(o);function o(){return Zi(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return null}}])&&$i(t.prototype,r),n&&$i(t,n),o}(zi.a.PureComponent);function oo(e){return(oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ao(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function so(e,t){return(so=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uo(e){var t=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(e){return!1}}();return function(){var r,n=lo(e);if(t){var i=lo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return co(this,r)}}function co(e,t){return!t||"object"!==oo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var go,fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&so(e,t)}(o,e);var t,r,n,i=uo(o);function o(){return Ao(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&ao(t.prototype,r),n&&ao(t,n),o}(qi.AXR);go||(go={});var ho,po=[];!function(e){e.SAVE_CUSTOM="saveCustom",e.UNDO_REDO="undoRedo",e.PARSE_DOCUMENT="parseDocument"}(ho||(ho={}));var Io,yo,Co={};function Eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Eo(Object(r),!0).forEach((function(t){vo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mo(e,t){!function(e){Io.log(Qo(e))}(e);var r={eventType:e.behavior+"_ktr",data:{},labels:{}};yo&&Object.assign(r.labels,yo()),t.dataKeys.forEach((function(t){return r.data[t]=e[t]})),t.labelKeys&&(Array.isArray(t.labelKeys)?t.labelKeys.forEach((function(t){return r.labels[t]=e[t]})):Object.assign(r.labels,t.labelKeys)),function(e){Io.logByKtracker(e)}(r)}function Qo(e){return Bo(Bo({},e),{},{pluginName:"customPad"})}function bo(e){return(bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function So(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wo(e,t,r){return(wo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xo(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Do(e,t){return(Do=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ro(e){var t=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(e){return!1}}();return function(){var r,n=xo(e);if(t){var i=xo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Mo(this,r)}}function Mo(e,t){return!t||"object"!==bo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xo(e){return(xo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Po={entry:fo,monitor:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Do(e,t)}(o,e);var t,r,n,i=Ro(o);function o(){return _o(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"init",value:function(){wo(xo(o.prototype),"init",this).call(this),this.addConfig({sendLog:mo,perfLogConfig:po,timeLogConfig:Co})}}])&&So(t.prototype,r),n&&So(t,n),o}(qi.Monitor)};var To,Fo,Oo=r(60),Lo=r(724),No=r(288);function ko(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Go(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ko(o,n,i,A,a,"next",e)}function a(e){ko(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Uo(e){return function(e){if(Array.isArray(e))return Ho(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Vo(e)||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 jo(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=Vo(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Vo(e,t){if(e){if("string"==typeof e)return Ho(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ho(e,t):void 0}}function Ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Yo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.autoBackup=1]="autoBackup",e[e.transaction=2]="transaction",e[e.version=4]="version",e[e.modelBinding=8]="modelBinding",e[e.autoSave=16]="autoSave"}(To||(To={})),function(e){e[e.requestBackup=0]="requestBackup",e[e.forceBackup=1]="forceBackup",e[e.mergeRecorder=2]="mergeRecorder",e[e.notifyModelChange=3]="notifyModelChange",e[e.autoSave=4]="autoSave",e[e.save=5]="save",e[e.revert=6]="revert"}(Fo||(Fo={}));var Ko=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.autoSaveInterruptSwitch=new Lo.InterruptSwitch((function(e){e?t.kafDocument.autoSave.stop():t.kafDocument.autoSave.start()})),this.keyCache=new Set,this.requestBackupTimes=0,this.maxRequestBackupTimes=1e3,this.throttleRequestBackup=Object(Oo.throttleInRaf)((function(){qi.Util.safeExec((function(){++t.requestBackupTimes>t.maxRequestBackupTimes?Object(No.devError)("requestBackup long time on backup"):t.kafDocument.autoBackupBlockKeys.size>0?t.requestBackup():t.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&t.kafDocument.requestBackup()}))}),1)}var t,r,n;return t=e,(r=[{key:"revert",value:function(){var e=this;qi.Util.safeExec((function(){var t,r=jo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().revert()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"requestBackup",value:function(){this.requestBackupTimes=0,this.throttleRequestBackup()}},{key:"forceBackup",value:function(){var e=this;qi.Util.safeExec((function(){e.docs.some((function(e){return!e.getDoc().getTransactionContext().isActiveRecorderEmpty()}))&&e.kafDocument.backup()}))}},{key:"mergeRecorder",value:function(){var e=this;qi.Util.safeExec((function(){var t,r=jo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().getTransactionContext().mergeRecorder()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"notifyModelChange",value:function(){var e=this;qi.Util.safeExec((function(){var t,r=jo(e.docs);try{for(r.s();!(t=r.n()).done;)t.value.getDoc().notifyModelChange()}catch(e){r.e(e)}finally{r.f()}}))}},{key:"save",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];qi.Util.safeExec((function(){e.kafDocument.saveDocument(t)}))}},{key:"interruptSingle",value:function(e,t){var r=this,n={};return t.includes(To.autoBackup)&&qi.Util.safeExec((function(){n[To.autoBackup]=(new Date).getTime().toString()+e.getId(),r.kafDocument.pauseAutoBackup(n[To.autoBackup])}),!1),t.includes(To.transaction)&&qi.Util.safeExec((function(){n[To.transaction]=e.getDoc().getTransactionSwitch().interrupt()})),t.includes(To.version)&&qi.Util.safeExec((function(){n[To.version]=e.getDoc().getVersionSwitch().interrupt()})),t.includes(To.modelBinding)&&qi.Util.safeExec((function(){n[To.modelBinding]=e.getDoc().getModelBindingSwitch().interrupt()})),t.includes(To.autoSave)&&qi.Util.safeExec((function(){n[To.autoSave]=r.autoSaveInterruptSwitch.interrupt()})),n}},{key:"interrupt",value:function(e,t){var r,n=this,i={},o=jo(this.docs);try{for(o.s();!(r=o.n()).done;){var A=r.value;i[A.getId()]=this.interruptSingle(A,e)}}catch(e){o.e(e)}finally{o.f()}return this.keyCache.add(i),t&&setTimeout((function(){return n.resume(i)}),t),i}},{key:"resumeSingle",value:function(e,t){var r=this;t[To.autoBackup]&&qi.Util.safeExec((function(){r.kafDocument.requestResumeAutoBackup(t[To.autoBackup])}),!1),t[To.transaction]&&qi.Util.safeExec((function(){e.getDoc().getTransactionSwitch().resume(t[To.transaction])})),t[To.version]&&qi.Util.safeExec((function(){e.getDoc().getVersionSwitch().resume(t[To.version])})),t[To.modelBinding]&&qi.Util.safeExec((function(){e.getDoc().getModelBindingSwitch().resume(t[To.modelBinding])})),t[To.autoSave]&&qi.Util.safeExec((function(){r.autoSaveInterruptSwitch.resume(t[To.autoSave])}))}},{key:"resume",value:function(e,t){var r,n=jo(this.docs);try{for(n.s();!(r=n.n()).done;){var i=r.value,o=e[i.getId()];o&&this.resumeSingle(i,o)}}catch(e){n.e(e)}finally{n.f()}this.keyCache.delete(e),t&&this.afterActions(t)}},{key:"forceResumeAll",value:function(){var e=this;Uo(this.keyCache.values()).forEach((function(t){return e.resume(t)}))}},{key:"interruptActions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[To.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Fo.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return function(){var o={};try{o=i.interrupt(t,n);for(var A=arguments.length,a=new Array(A),s=0;s<A;s++)a[s]=arguments[s];var u=e.apply(this,a);return u}finally{i.resume(o,r)}}}},{key:"interruptActionsAsync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[To.autoBackup],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Fo.requestBackup],n=arguments.length>3?arguments[3]:void 0,i=this;return Go(s.a.mark((function o(){var A,a,u,c,l,g=arguments;return s.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:for(A={},o.prev=1,A=i.interrupt(t,n),a=g.length,u=new Array(a),c=0;c<a;c++)u[c]=g[c];return o.next=6,e.apply(this,u);case 6:return l=o.sent,o.abrupt("return",l);case 8:return o.prev=8,i.resume(A,r),o.finish(8);case 11:case"end":return o.stop()}}),o,this,[[1,,8,11]])})))}},{key:"afterActions",value:function(e){e.includes(Fo.mergeRecorder)&&this.mergeRecorder(),e.includes(Fo.requestBackup)?this.requestBackup():e.includes(Fo.forceBackup)?this.forceBackup():e.includes(Fo.revert)&&this.revert(),e.includes(Fo.notifyModelChange)&&this.notifyModelChange(),e.includes(Fo.autoSave)?this.save(!0):e.includes(Fo.save)&&this.save()}}])&&Yo(t.prototype,r),n&&Yo(t,n),e}(),qo=r(532),Jo=r.n(qo),Wo=r(291);function zo(e){return(zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zo(e,t){return(Zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $o(e){var t=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(e){return!1}}();return function(){var r,n=tA(e);if(t){var i=tA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return eA(this,r)}}function eA(e,t){return!t||"object"!==zo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tA(e){return(tA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zo(e,t)}(o,e);var t,r,n,i=$o(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&Xo(t.prototype,r),n&&Xo(t,n),o}(Ji.BackupItem);var nA=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.key=r,this.BackupItemImpl=rA,this.getModel=function(){var e=n.doc.getTransactionContext();return e.commitRecorder(),{recorderId:e.getCurrentId()}},this.onUpdateModel=function(e,t){var r=n.doc.getTransactionContext();t===Wo.ModelUpdateType.redo?r.redoToRecorder(e.recorderId):t===Wo.ModelUpdateType.undo?r.undoToRecorder(e.recorderId):t===Wo.ModelUpdateType.revert&&r.revert()},this.updateListeners=function(e,t){var r=n.doc;e?(r.getTransactionSwitch().resumeAll(),r.requestCommit=t):r.requestCommit=void 0},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.open=function(){return Promise.resolve()}};function iA(e){return(iA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oA(e){return function(e){if(Array.isArray(e))return sA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||aA(e)||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 AA(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=aA(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function aA(e,t){if(e){if("string"==typeof e)return sA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sA(e,t):void 0}}function sA(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uA(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function cA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lA(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gA(e,t,r){return t&&lA(e.prototype,t),r&&lA(e,r),e}function fA(e,t){return(fA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hA(e){var t=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(e){return!1}}();return function(){var r,n=dA(e);if(t){var i=dA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pA(this,r)}}function pA(e,t){return!t||"object"!==iA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dA(e){return(dA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var IA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fA(e,t)}(r,e);var t=hA(r);function r(){var e;return cA(this,r),(e=t.apply(this,arguments)).doc=new dt.CDoc,e}return gA(r,[{key:"getDoc",value:function(){return this.doc}}]),r}(Jo()(Object)),yA=new(function(){function e(){cA(this,e),this.stacks=[{documentAction:new Ko}]}var t,r;return gA(e,[{key:"getTopDocumentAction",value:function(){return this.stacks[this.stacks.length-1].documentAction}},{key:"configTopDocumentAction",value:function(e,t){var r=this.getTopDocumentAction();return r.docs=e,r.kafDocument=t,r}},{key:"pushDocumentAction",value:(t=s.a.mark((function e(){var t,r,n,i,o,A,a,u,c,l,g,f,h,p,d,I=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=I.length>0&&void 0!==I[0]?I[0]:[],r=this.stacks[this.stacks.length-1],n=r.documentAction.interrupt([To.autoBackup]),i=new Ko,o=new IA,A=new Ji.DocumentStateManager,a=AA(this.stacks);try{for(a.s();!(u=a.n()).done;){c=u.value,l=AA(c.documentAction.docs);try{for(l.s();!(g=l.n()).done;)g.value.getDoc().addTransactionHook(o.getDoc().onTrackTransaction)}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}i.docs=[o].concat(oA(t)),i.kafDocument=A,f=new nA(o.getDoc(),"tempDocumentSource".concat(this.stacks.length)),A.addDocumentSource(f),h=AA(t);try{for(h.s();!(p=h.n()).done;)d=p.value,A.addDocumentSource(new nA(d.getDoc(),d.getId()))}catch(e){h.e(e)}finally{h.f()}return A.initState(),e.next=17,A.start();case 17:return this.stacks.push({documentAction:i,interruptKey:n,tempDoc:o,tempDocumentSource:f}),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e,this)})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function A(e){uA(o,n,i,A,a,"next",e)}function a(e){uA(o,n,i,A,a,"throw",e)}A(void 0)}))},function(){return r.apply(this,arguments)})},{key:"popDocumentAction",value:function(){if(this.stacks.length<=1)throw new Error("stasks has no extra document");var e,t=this.stacks.pop(),r=t.tempDoc,n=t.documentAction,i=t.interruptKey,o=AA(this.stacks);try{for(o.s();!(e=o.n()).done;){var A,a=AA(e.value.documentAction.docs);try{for(a.s();!(A=a.n()).done;){A.value.getDoc().removeTransactionHook(r.getDoc().onTrackTransaction)}}catch(e){a.e(e)}finally{a.f()}}}catch(e){o.e(e)}finally{o.f()}n.kafDocument.dispose(),this.getTopDocumentAction().resume(i,[Fo.requestBackup])}}]),e}());function CA(e){return(CA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EA(e,t){return(EA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function BA(e){var t=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(e){return!1}}();return function(){var r,n=mA(e);if(t){var i=mA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vA(this,r)}}function vA(e,t){return!t||"object"!==CA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mA(e){return(mA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&EA(e,t)}(r,e);var t=BA(r);function r(e,n){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e.getDoc(),n)).key=n,i}return r}(nA);function bA(e){return(bA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SA(e,t){return(SA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wA(e){var t=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(e){return!1}}();return function(){var r,n=RA(e);if(t){var i=RA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return DA(this,r)}}function DA(e,t){return!t||"object"!==bA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RA(e){return(RA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var MA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SA(e,t)}(o,e);var t,r,n,i=wA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).model=e,t}return t=o,(r=[{key:"toModel",value:function(){return this.model}}])&&_A(t.prototype,r),n&&_A(t,n),o}(Ji.BackupItem);var xA,PA,TA=function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.design=t,this.key=r,this.disposeListener=tr.noop,this.BackupItemImpl=MA,this.open=function(){return Promise.resolve()},this.getModel=function(){return n.design},this.onUpdateModel=function(e){n.design=e},this.saveDocument=function(){return Promise.resolve()},this.clearDocument=function(){return null},this.afterInit=function(e){nr.addSetHook(e)},this.beforeDispose=function(){}},FA=r(161);!function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(xA||(xA={})),function(e){e.SELECTED="SELECTED"}(PA||(PA={}));var OA=Symbol("paramModelAssembly"),LA=Symbol("paramModel");function NA(e,t){return(NA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kA(e){var t=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(e){return!1}}();return function(){var r,n=UA(e);if(t){var i=UA(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GA(this,r)}}function GA(e,t){return!t||"object"!==jA(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function UA(e){return(UA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jA(e){return(jA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var VA,HA=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},YA=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":jA(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},KA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NA(e,t)}(r,e);var t=kA(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=e,n._parent=void 0,n._children=[],n.entityType=OA,n.entityId=e.getId(),n}return r}(Ji.Entity),qA=KA=HA([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))]),YA("design:paramtypes",["function"==typeof(VA=void 0!==st.CoreParamModelAssembly&&st.CoreParamModelAssembly)?VA:Object])],KA);function JA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zA(e,t)}function zA(e,t){return(zA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XA(e){var t=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(e){return!1}}();return function(){var r,n=$A(e);if(t){var i=$A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ZA(this,r)}}function ZA(e,t){return!t||"object"!==ea(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $A(e){return($A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ea(e){return(ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ta=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ea(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ra=function(e){WA(r,e);var t=XA(r);function r(e,n){var i;return JA(this,r),(i=t.call(this)).model=e,i.context=n,i._parent=void 0,i._children=[],i.entityType=n.type,i.entityId=e.getId(),i}return r}(Ji.Entity),na=function(e){WA(r,e);var t=XA(r);function r(){return JA(this,r),t.apply(this,arguments)}return r}(ra);na=ta([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],na);var ia=r(6),oa=r.n(ia),Aa=r(190);function aa(e){return(aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var sa=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":aa(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ua=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":aa(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ca=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.interactionPriority=0,this.selectable=!0};function la(e){return function(t,r){var n=function(e,t){try{var r=e.materialReplacedInfos,n=e.materialUVEditInfos,i=e.texture,o=e.opacity;if(!(r&&r.length||n&&n.length||i))return t.getMesh()+(1!==o?String(o):"")+t.getMtl().reduce((function(e,t){var r=[];return r.push(e,t.getObjName(),t.getDiffuseTexture(),t.getReflectGlossiness(),t.getFresnel(),t.getU(),t.getV(),t.getW(),t.getH()),t.getDiffuseTextureScale()&&r.push(t.getDiffuseTextureScale().toString()),t.getDiffuseColor()&&r.push(t.getDiffuseColor().toString()),t.getReflectColor()&&r.push(t.getReflectColor().toString()),t.getRefractColor()&&r.push(t.getRefractColor().toString()),r.join("#")}),"")}catch(e){A=e,setTimeout((function(){throw A}))}var A;return null}(t,r);return e+n}}function ga(e){return(ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ha(e,t){return(ha=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pa(e){var t=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(e){return!1}}();return function(){var r,n=Ia(e);if(t){var i=Ia(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return da(this,r)}}function da(e,t){return!t||"object"!==ga(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ia(e){return(Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}sa([er.observable,ua("design:type",Number)],ca.prototype,"opacity",void 0),sa([er.observable,ua("design:type",Boolean)],ca.prototype,"visible",void 0);var ya=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ha(e,t)}(o,e);var t,r,n,i=pa(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).props=e,t.material=new ia.LineBasicMaterial({color:xA.outline}),t.setAttribute("outline",!1),t.setAttribute("shadowCaster",!1),t.update({}),t}return t=o,(r=[{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:function(e){var t,r,n=this.props.points;if(e.points!==n){var i=(t=n,(r=new ia.BufferGeometry).addAttribute("position",new ia.Float32BufferAttribute(t,3)),r);this.geometry=i,this.computeLineDistances()}var o=this.props,A=o.color,a=void 0===A?xA.outline:A,s=o.visible,u=void 0===s||s;this.material.setValues({color:a}),this.visible=u}}])&&fa(t.prototype,r),n&&fa(t,n),o}(ia.LineSegments),Ca=r(362),Ea=r(84);function Ba(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function va(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ma=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ba(Object(r),!0).forEach((function(t){va(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ba(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({side:ia.Side.FrontSide,specular:1118481,shininess:15},{polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:15});function Qa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ba(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qa(Object(r),!0).forEach((function(t){_a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sa(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function wa(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Sa(o,n,i,A,a,"next",e)}function a(e){Sa(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Da(e){return Ra.apply(this,arguments)}function Ra(){return(Ra=wa(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.material,n=t.materialInfo,i=t.opacity,o=void 0===i?1:i,A=t.textureUrl,a=t.textureSize,u=null==n?void 0:n.getRefractColor(),c=ba({},ma),u&&(l=Object(Ea.clamp)(Math.max(u.x,u.y,u.z),0,1),r.transparent=l>.01,c.opacity=Math.max(1-l,.1)),"number"==typeof o&&(o=o>1?1:o<0?0:o,c.transparent=o<1,c.opacity=o,c.depthWrite=!c.transparent),g=A||(null==n?void 0:n.getDiffuseTexture()),!Object(tr.isEmpty)(g)){e.next=12;break}(f=null==n?void 0:n.getDiffuseColor())&&(c.color=new ia.Color(f.x,f.y,f.z).getHex()),c.texture=null,e.next=25;break;case 12:if(r.diffuseTextureUrl=g,a){e.next=18;break}return e.next=16,Object(Ca.loadImage)(g);case 16:h=e.sent,a={x:h.naturalWidth,y:h.naturalHeight};case 18:return e.next=20,Object(Ca.loadTexture)(g,{wrapS:ia.WebGLTextureWrap.Repeat,wrapT:ia.WebGLTextureWrap.Repeat,cacheReject:!0});case 20:(p=e.sent).repeat=new ia.Vector2(1/a.x,1/a.y),p.updateMatrix(),c.uvTransform=p.matrix,c.texture=p;case 25:void 0!==(d=null==n?void 0:n.getTransparenType())&&(c.transparent=c.transparent||1===d),r.setValues(c);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ma(e){return(Ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xa(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Pa(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){xa(o,n,i,A,a,"next",e)}function a(e){xa(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Ta(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Fa(e,t){return(Fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oa(e){var t=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(e){return!1}}();return function(){var r,n=Na(e);if(t){var i=Na(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return La(this,r)}}function La(e,t){return!t||"object"!==Ma(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Na(e){return(Na=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ka=new ia.BufferGeometry;var Ga=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fa(e,t)}(a,e);var t,r,n,i,o,A=Oa(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=A.call(this)).props=e,t.categoryId=qi.EDCCountCategory.PHONG,t.material=new ia.MeshPhongMaterial({transparent:!0}),t.update({}),t}return t=a,(r=[{key:"getProps",value:function(){return this.props}},{key:"updateProps",value:function(e){var t=this.props;this.props=e,this.update(t)}},{key:"update",value:(o=Pa(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.visible,n=void 0===r||r,this.props.geometry!==t.geometry&&this.updateGeometry(),this.props.textureSize===t.textureSize&&this.props.tiledImgUrl===t.tiledImgUrl&&this.props.opacity===t.opacity&&this.props.popBufferMtl===t.popBufferMtl){e.next=5;break}return e.next=5,this.updateMaterial();case 5:this.visible=n;case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateGeometry",value:function(){var e,t,r,n,i,o,A=this.props.geometry;this.geometry&&this.geometry.dispose(),this.geometry=A?(e=A,t=new ia.BufferGeometry,r=new Uint32Array(e.indices),n=new Float32Array(e.vertices),i=new Float32Array(e.normals),o=new Float32Array(e.textures),t.index=new ia.BufferAttribute(r,1),t.addAttribute("position",new ia.BufferAttribute(n,3)),t.addAttribute("uv",new ia.BufferAttribute(o,2)),i&&i.length?t.addAttribute("normal",new ia.BufferAttribute(i,3)):t.computeVertexNormals(),t):ka}},{key:"updateMaterial",value:(i=Pa(s.a.mark((function e(){var t,r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,r=t.popBufferMtl,n=t.opacity,i=t.tiledImgUrl,o=t.textureSize,e.next=3,Da({material:this.material,materialInfo:r,opacity:n,textureUrl:i,textureSize:o});case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&Ta(t.prototype,r),n&&Ta(t,n),a}(ia.Mesh);function Ua(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ja(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ja(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function ja(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Va(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ha(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ya(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ka={meshModels:[],renderChildNodes:[],furnitureModels:[],legal:!1,legalMesh:!1};var qa=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=t,this.context=r,this.modelDepProps=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Va(Object(r),!0).forEach((function(t){Ha(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Va(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Ka),this.childNodeDrawables=[],this.displayInfoDrawables=[],this.meshes=[],this.childNodeMeshes=[],this.displayInfoMeshs=[],this.state=new ca,this.id=t.model.getId(),this.type=r.type;var n,i=Ua(r.stateReducers);try{for(i.s();!(n=i.n()).done;){(0,n.value)(t.model,!1,this.state)}}catch(e){i.e(e)}finally{i.f()}}var t,r,n;return t=e,(r=[{key:"interactionPriority",get:function(){return this.state.interactionPriority}},{key:"pickActualInteractiveEntity",value:function(e){var t=this,r=e.intersection.object,n=function(){for(;r;){var e=t.context.objectManager.getInfo(r);if(e)return{entityId:e.id,entityType:e.type};r=r.parent}return{entityId:t.id,entityType:t.context.type}}();return this.context.pickActualInteractiveEntity(n,{point:e.intersection.point})}},{key:"create",value:function(e){var t,r=this.props.model,n=new ia.Group;return n.uuid=this.id,n.visible=null===(t=this.state.visible)||void 0===t||t,this.context.filterParamModel(r)&&(this.renderMeshes(n,r,e),this.renderChildNodeMeshes(n,r,e),this.renderDisplayInfoMesh(n,r,e),this.renderDisplayInfoMeshes(n,r,e),this.applyTransform(n,r),this.context.objectManager.addObject(n,{drawable:this,type:this.type,id:this.id,drawableState:this.state,model:r})),n}},{key:"update",value:function(e,t){var r,n=this.props.model;e.visible=null===(r=this.state.visible)||void 0===r||r,this.renderMeshes(e,n,t),this.renderChildNodeMeshes(e,n,t),this.renderDisplayInfoMesh(e,n,t),this.renderDisplayInfoMeshes(e,n,t),this.renderLineSegments(e,n),this.applyTransform(e,n)}},{key:"dispose",value:function(e){this.disposeMeshes(e),this.disposeDisplayInfoMesh(e),this.disposeDisplayInfoMeshs(e),this.disposeChildNodeMeshes(e),this.disposeLineSegments(e),this.context.objectManager.removeObject(e)}},{key:"applyTransform",value:function(e,t){var r=t.getPosition(),n=t.getScale(),i=t.getRotation();e.position.set(r.x,r.y,r.z),e.rotation.set(i.x,i.y,i.z),e.scale.set(n.x,n.y,n.z)}},{key:"disposeMeshes",value:function(e){for(var t=0;t<this.meshes.length;t++)Object(Aa.dispose)(this.meshes[t]);e.removeObjects(this.meshes)}},{key:"disposeChildNodeMeshes",value:function(e){for(var t=0;t<this.childNodeDrawables.length;t++)this.childNodeDrawables[t].dispose(this.childNodeMeshes[t]),Object(Aa.dispose)(this.childNodeMeshes[t]);e.removeObjects(this.childNodeMeshes)}},{key:"disposeDisplayInfoMesh",value:function(e){this.displayInfoDrawable&&this.displayInfoMesh&&(this.displayInfoDrawable.dispose(this.displayInfoMesh),Object(Aa.dispose)(this.displayInfoMesh),e.remove(this.displayInfoMesh))}},{key:"disposeDisplayInfoMeshs",value:function(e){for(var t=0;t<this.displayInfoDrawables.length;t++)this.displayInfoDrawables[t].dispose(this.displayInfoMeshs[t]),Object(Aa.dispose)(this.displayInfoMeshs[t]);e.removeObjects(this.displayInfoMeshs)}},{key:"disposeLineSegments",value:function(e){this.lineSegments&&(Object(Aa.dispose)(this.lineSegments),e.remove(this.lineSegments))}},{key:"renderMeshes",value:function(e,t,r){var n,i,o,A=this.modelDepProps,a=null!==(n=this.state.opacity)&&void 0!==n?n:1,s=t.getMeshModels(),u=t.getLegal(),c=t.getLegalMesh();if(A.meshModels!==s||A.legal!==u||A.legalMesh!==c){A.meshModels=s,A.legal=u,A.legalMesh=c,this.disposeMeshes(e);var l=[];if(u&&c)for(var g,f=s.length;f--;)g=s[f],g=new Ga({geometry:g.geometry,tiledImgUrl:g.texture&&(g.texture.hdTiledImageUrl||g.texture.tiledImgUrl),textureSize:null===(i=g.texture)||void 0===i?void 0:i.size,opacity:a,popBufferMtl:g.displayMaterial}),l[f]=g,e.add(g);this.meshes=l}else for(var h,p=this.meshes,d=s.length;d--;)h=s[d],p[d].updateProps({geometry:h.geometry,tiledImgUrl:h.texture&&(h.texture.hdTiledImageUrl||h.texture.tiledImgUrl),textureSize:null===(o=h.texture)||void 0===o?void 0:o.size,opacity:a,popBufferMtl:h.displayMaterial})}},{key:"renderChildNodeMeshes",value:function(e,t,r){var n,i=(n=t,n.getChildren().filter((function(e){return e.getLegal()})).concat(n.getAccessories())).filter(this.context.filterParamModel);if(Object(tr.isEqual)(this.modelDepProps.renderChildNodes,i))for(var o=0;o<this.childNodeDrawables.length;o++){var A=this.childNodeDrawables[o],a=this.childNodeMeshes[o];A.update(a,r)}else if(this.modelDepProps.renderChildNodes=i,this.disposeChildNodeMeshes(e),this.childNodeDrawables=i.map(this.props.renderChild),this.childNodeMeshes=this.childNodeDrawables.map((function(e){return e.create(r)})),this.childNodeMeshes.length>0){var s,u=Ua(this.childNodeMeshes);try{for(u.s();!(s=u.n()).done;){var c=s.value;e.add(c)}}catch(e){u.e(e)}finally{u.f()}}}},{key:"renderDisplayInfoMesh",value:function(e,t,r){var n=t.getFurnitureModel();this.modelDepProps.furnitureModel!==n?(this.modelDepProps.furnitureModel=n,this.disposeDisplayInfoMesh(e),n&&(this.displayInfoDrawable=new Ji.DisplayInfoDrawable({displayInfo:n.displayInfo,position:n.furnitureTranslation||at.a.ZERO,size:n.size.clone().div(n.scale),scale:at.a.ONE,rotation:at.a.ZERO,generateComponentInstanceKey:la(t.getId()),getMaterialSideProperty:function(){return ia.Side.DoubleSide}}),this.displayInfoMesh=this.displayInfoDrawable.create(r),e.add(this.displayInfoMesh))):this.displayInfoDrawable&&this.displayInfoDrawable.update(this.displayInfoMesh)}},{key:"renderDisplayInfoMeshes",value:function(e,t,r){var n=t.getFurnitureModels();if(this.modelDepProps.furnitureModels!==n){if(this.modelDepProps.furnitureModels=n,this.disposeDisplayInfoMeshs(e),this.displayInfoDrawables=n.map((function(e){return new Ji.DisplayInfoDrawable({displayInfo:e.displayInfo,position:e.position,size:e.size,scale:e.scale,rotation:e.rotate,generateComponentInstanceKey:la(t.getId())})})),this.displayInfoMeshs=this.displayInfoDrawables.map((function(e){return e.create(r)})),this.displayInfoMeshs.length>0){var i,o=Ua(this.displayInfoMeshs);try{for(o.s();!(i=o.n()).done;){var A=i.value;e.add(A)}}catch(e){o.e(e)}finally{o.f()}}}else for(var a=0;a<this.displayInfoDrawables.length;a++){var s=this.displayInfoDrawables[a],u=this.displayInfoMeshs[a];s.update(u)}}},{key:"renderLineSegments",value:function(e,t){var r;if(t.getMeshModels()&&t.getMeshModels().length){var n=t.getWireFrames(),i=this.context.store.showOutline;this.modelDepProps.wireFrames!==n?(this.modelDepProps.wireFrames=n,this.disposeLineSegments(e),this.lineSegments=new ya({points:n||[],visible:i}),e.add(this.lineSegments)):null===(r=this.lineSegments)||void 0===r||r.updateProps({points:n||[],visible:i})}}}])&&Ya(t.prototype,r),n&&Ya(t,n),e}();function Ja(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wa(e,t){return(Wa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function za(e){var t=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(e){return!1}}();return function(){var r,n=Za(e);if(t){var i=Za(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xa(this,r)}}function Xa(e,t){return!t||"object"!==$a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Za(e){return(Za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $a(e){return($a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var es=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":$a(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ts=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wa(e,t)}(r,e);var t=za(r);function r(){var e;return Ja(this,r),(e=t.apply(this,arguments))._parent=void 0,e}return r}(ra);function rs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ns(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function is(e,t,r){return t&&ns(e.prototype,t),r&&ns(e,r),e}function os(e,t,r){var n=r.getEntity(e)||function(e,t){if(t.filterParamModel(e))return e.isRoot()?new ts(e,t):new na(e,t)}(e,t);if(n){r.registerEntity(e,n);var i=e.getParent();return i&&(n._parent=r.getEntity(i)),n._children=e.getChildNodes().map((function(e){return os(e,t,r)})).filter((function(e){return!!e})),n}}ts=es([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return new qa({model:this.model,renderChild:function t(r){return new qa({model:r,renderChild:t},e.context)}},this.context)})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.model.getConcatenatedBox3()}}))])],ts);var As=function(){function e(t){var r=this;rs(this,e),this.context=t,this.entityCaches=new WeakMap,this.entities=[],this.registerEntity=function(e,t){r.entityCaches.has(e)||r.entityCaches.set(e,t),r.entities.push(t)},this.getEntity=function(e){return r.entityCaches.get(e)}}return is(e,[{key:"createEntities",value:function(e){var t={registerEntity:this.registerEntity,getEntity:this.getEntity};this.entities=[];for(var r=0,n=e.length;r<n;r++)os(e[r],this.context,t);return this.entities}},{key:"createAssemblyEntities",value:function(e){return e.map((function(e){return new qA(e)}))}}]),e}(),as=function(){function e(t,r){rs(this,e),this.getCustom=t,this.getEntities=[this.getParamModelEntities,this.getParamModelAssemblyEntities],this.factory=new As(r)}return is(e,[{key:"getParamModelEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createEntities(e.getParamModels()):[]}},{key:"getParamModelAssemblyEntities",value:function(){var e=this.getCustom();return void 0!==e?this.factory.createAssemblyEntities(e.getParamModelAssemblies()):[]}}]),e}();function ss(e){return(ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var us=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":ss(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},cs=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":ss(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ls=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.showOutline=!1,this.selected=[]};function gs(e){return function(e){if(Array.isArray(e))return fs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return fs(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fs(e,t)}(e)||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 fs(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}us([er.observable,cs("design:type",Object)],ls.prototype,"showOutline",void 0),us([er.observable,cs("design:type",Array)],ls.prototype,"selected",void 0);var ps=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.infoMap=new Map,this.idMap=new Map}var t,r,n;return t=e,(r=[{key:"addObject",value:function(e,t){this.infoMap.set(e,t),this.idMap.set(t.id,t)}},{key:"removeObject",value:function(e){var t=this.infoMap.get(e);t&&(this.infoMap.delete(e),t===this.idMap.get(t.id)&&this.idMap.delete(t.id))}},{key:"getInfo",value:function(e){return e instanceof ia.Object3D?this.infoMap.get(e):this.idMap.get(e)}},{key:"getInfos",value:function(){return gs(this.idMap.entries())}}])&&hs(t.prototype,r),n&&hs(t,n),e}(),ds=r(189);function Is(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ys=function(){function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectionStateManager=t,this.entityTypes=r,this.onSelectChange=n,this._onStateChange=function(){i.onStateChange()},this.init()}var t,r,n;return t=e,(r=[{key:"isSelected",value:function(e){return!!this.selected.find((function(t){return t.entityId===e}))}},{key:"init",value:function(){this.enable()}},{key:"release",value:function(){this.disable()}},{key:"enable",value:function(){this.rawSelected=[],this.selected=[],this.selectionStateManager.on(ds.UPDATE,this._onStateChange),this.onStateChange()}},{key:"disable",value:function(){this.selectionStateManager.off(ds.UPDATE,this._onStateChange),this.rawSelected=[],this.selected=[]}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value,t=this.rawSelected,r=this.selected;if(this.rawSelected!==e){this.rawSelected=e;var n=this.resolveSelected(e)||[];this.resolveSelectedChanged(this.selected,n)&&(this.selected=n)}t!==e&&this.onSelectChange(this.selected,r)}},{key:"resolveSelected",value:function(e){var t=this;return e.filter((function(e){return t.entityTypes.includes(e.entityType)}))}},{key:"resolveSelectedChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=function(e,t){return e>t?1:e===t?0:-1},n=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),i=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})).sort(r),o=0,A=i.length;o<A;++o)if(n[o]!==i[o])return!0;return!1}}])&&Is(t.prototype,r),n&&Is(t,n),e}();function Cs(e){return(Cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Es(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||vs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bs(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=vs(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function vs(e,t){if(e){if("string"==typeof e)return ms(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ms(e,t):void 0}}function ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _s(e,t){return(_s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ss(e){var t=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(e){return!1}}();return function(){var r,n=Ds(e);if(t){var i=Ds(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ws(this,r)}}function ws(e,t){return!t||"object"!==Cs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ds(e){return(Ds=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ys.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED";var Rs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_s(e,t)}(o,e);var t,r,n,i=Ss(o);function o(){var e;return Qs(this,o),(e=i.apply(this,arguments)).store=new ls,e.objectManager=new ps,e.stateReducers=[],e.onScene3DInit=function(t){e.appService.stateManager.registerView(e._scene3dId).registerDefaultSystems3D(e._scene3dId,t).activeView(e._scene3dId)},e.toggleShowModelOutline=function(t){e.store.showOutline=t},e.updateModelState=function(t,r){var n=e.objectManager.getInfo(t),i=e.selectManager.isSelected(t);r(n.drawableState,i)},e.updateModelsState=function(t){var r,n=Bs(e.objectManager.getInfos());try{for(n.s();!(r=n.n()).done;){var i=Es(r.value,2),o=i[0],A=i[1],a=e.selectManager.isSelected(o);t(o,A.drawableState,a)}}catch(e){n.e(e)}finally{n.f()}},e}return t=o,(r=[{key:"config",value:function(e,t){var r=this;this._scene3dId=t.scene3dID||"scene3d",this.appService=e;var n=e.stateManager,i=t.paramModelSymbol,o=t.getDoc,A=t.getCustom,a=t.pickActualInteractiveEntity,s=void 0===a?function(e){return e}:a,u=t.filterParamModel;this.selectManager=new ys(n.selection,[i],(function(e,t){r.store.selected=e,r.emit(PA.SELECTED,{selected:e,oldSelected:t})})),e.registerEntityDocument(new as(A,{store:this.store,type:i,objectManager:this.objectManager,pickActualInteractiveEntity:s,stateReducers:this.stateReducers,filterParamModel:u}));var c=o().getElementContext();return c.getterEmitter.on((function(e){er.advanced.reportObserved(e.instance)})),c.setterEmitter.on((function(e){er.advanced.reportChanged(e.instance)})),this}},{key:"registerReducer",value:function(e){this.stateReducers.push(e)}},{key:"triggerReducer",value:function(e){var t,r=Bs(this.objectManager.getInfos());try{for(r.s();!(t=r.n()).done;){var n=Es(t.value,2),i=n[0],o=n[1];if(!e||e.includes(i)){var A,a=this.selectManager.isSelected(i),s=Bs(this.stateReducers);try{for(s.s();!(A=s.n()).done;)(0,A.value)(o.model,a,o.drawableState)}catch(e){s.e(e)}finally{s.f()}}}}catch(e){r.e(e)}finally{r.f()}}},{key:"scene3dId",get:function(){return this._scene3dId}}])&&bs(t.prototype,r),n&&bs(t,n),o}(Zt.EventEmitter),Ms=r(290),xs=r.n(Ms),Ps=r(731);function Ts(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Os(e,t,r){return t&&Fs(e.prototype,t),r&&Fs(e,r),e}function Ls(e){return(Ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ns,ks,Gs,Us,js=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ls(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Vs=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ls(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};function Hs(e){var t=this;if(t===Gs.GUARD)return function(e,t,r){var n=r.value;return(r=Object.assign({},r)).value=function(){var e,r=void 0,i=this.__TRANSFORM_CONTEXT_ADD_DEP;if(i)if(Us){if(i!==Us)throw Error("CUSTOM: Access model data by crossing stub");i=void 0}else;i&&(Us=i,yt.a.begGetDeps(i));try{e=n.apply(this,arguments)}catch(e){r=e}if(i&&(Us=void 0,yt.a.endGetDeps(i)),r)throw r.message="CUSTOM: ["+t+"] "+r.message,r;return e},r};var r=0===arguments.length;return function(n,i){if(r){var o="get"+i[0].toLocaleUpperCase()+i.slice(1);e=function(e){return e[o]()}}if(!n.hasOwnProperty("__lazyKeys")){var A=[],a=[],s=[];Object.defineProperty(n,"__lazyKeys",{configurable:!0,enumerable:!0,value:A}),Object.defineProperty(n,"__immeKeys",{configurable:!0,enumerable:!0,value:a}),Object.defineProperty(n,"__immeVals",{configurable:!0,enumerable:!0,value:s});var u=n.__accessLazyValues,c=n.__accessImmeValues;Object.defineProperty(n,"__accessImmeValues",{configurable:!0,enumerable:!0,value:function(){c&&c.call(this);for(var e=void 0,t=0,r=a.length;t<r;++t)e=s[t],this[a[t]]=Object(tr.isFunction)(e)?e(this.__DONT_USE_ME):e}}),Object.defineProperty(n,"__accessLazyValues",{configurable:!0,enumerable:!0,value:function(){u&&u.call(this);for(var e=0,t=A.length;e<t;++e)this[A[e]]}})}t===Gs.LAZY?(n.__lazyKeys.push(i),Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){var t=this.__LAZY_VALUES;if(t.__keys[i])return t[i];var r=e;if(Object(tr.isFunction)(e)){var n=void 0,o=this.__TRANSFORM_CONTEXT_ADD_DEP;if(o)if(Us){if(o!==Us)throw Error("CUSTOM: Access model data by crossing stub");o=void 0}else;o&&(Us=o,yt.a.begGetDeps(o));try{r=e(this.__DONT_USE_ME,this)}catch(e){n=e}if(o&&(Us=void 0,yt.a.endGetDeps(o)),n)throw n.message="CUSTOM: ["+i+"] "+n.message,n}return t[i]=r,t.__keys[i]=!0,r}})):(n.__immeKeys.push(i),n.__immeVals.push(e))}}!function(e){e.LAZY="__@access@lazy@__",e.IMMEDIATE="__@access@imme@__",e.GUARD="__@access@guard@__"}(Gs||(Gs={}));var Ys={lazy:Hs.bind(Gs.LAZY),imme:Hs.bind(Gs.IMMEDIATE),guard:Hs.bind(Gs.GUARD),castTo:void 0};Ys.castTo=function(){return Ys};var Ks=function(){function e(t){Ts(this,e),this.__DONT_USE_ME=t,Us&&(this.__TRANSFORM_CONTEXT_ADD_DEP=Us),Object.defineProperty(this,"__LAZY_VALUES",{enumerable:!1,value:{__keys:{}}}),this.__accessImmeValues&&this.__accessImmeValues()}return Os(e,[{key:"asStub",value:function(){var e=dt.CDoc.transformModelContext;if(e&&e.deps&&e.rms){var t=e.deps,r=e.rms,n=this.__DONT_USE_ME;t.add(n),r.listeningTypes.add(n.constructor),this.__TRANSFORM_CONTEXT_ADD_DEP=function(e){e!==n&&(t.add(e),r.listeningTypes.add(e.constructor))}}else this.__TRANSFORM_CONTEXT_ADD_DEP&&(this.__TRANSFORM_CONTEXT_ADD_DEP=void 0)}},{key:"toPlain",value:function(){this.__accessLazyValues&&this.__accessLazyValues();var e=function(e,t){for(var r,n=Object.getOwnPropertyNames(e),i=0,o=n.length;i<o;++i)(r=n[i]).startsWith("$")||r.startsWith("_")||(t[r]=e[r]);return t},t={};return e(this,t),e(this.__LAZY_VALUES,t),t}},{key:"guard",value:function(e){return e(this)}}]),e}();js([Ys.imme(),Vs("design:type",String)],Ks.prototype,"id",void 0),js([Ys.imme((function(e){return e.constructor})),Vs("design:type","function"==typeof(Ns=void 0!==Ps.ConstructorOf&&Ps.ConstructorOf)?Ns:Object)],Ks.prototype,"kType",void 0),js([Ys.lazy((function(e){return e})),Vs("design:type",Boolean)],Ks.prototype,"$model",void 0),js([Ys.guard(),Vs("design:type",Function),Vs("design:paramtypes",[Function]),Vs("design:returntype","function"==typeof(ks="undefined"!=typeof T&&T)?ks:Object)],Ks.prototype,"guard",null);var qs=function(){function e(){Ts(this,e)}return Os(e,null,[{key:"registeCreator",value:function(e,t){this.creators.set(e,t)}},{key:"get",value:function(e,t){if(t||!e.__modelDataFacade){var r=this.creators.get(e.constructor);if(!r)return;e.__modelDataFacade=r(e)}return e.__modelDataFacade}},{key:"put",value:function(e){e.__modelDataFacade&&(e.__modelDataFacade=void 0)}}]),e}();qs.creators=new Map;var Js=r(246);function Ws(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zs(e,t){return(zs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xs(e){var t=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(e){return!1}}();return function(){var r,n=$s(e);if(t){var i=$s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zs(this,r)}}function Zs(e,t){return!t||"object"!==eu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $s(e){return($s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eu(e){return(eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tu,ru,nu,iu,ou,Au=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":eu(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},au=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":eu(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},su=Symbol("baseParamModel"),uu=Ys.castTo(),cu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zs(e,t)}(r,e);var t=Xs(r);function r(){return Ws(this,r),t.apply(this,arguments)}return r}(Ks);function lu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gu(e,t){return(gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fu(e){var t=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(e){return!1}}();return function(){var r,n=pu(e);if(t){var i=pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hu(this,r)}}function hu(e,t){return!t||"object"!==du(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pu(e){return(pu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function du(e){return(du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Au([uu.lazy(),au("design:type",String)],cu.prototype,"modelInstanceId",void 0),Au([uu.imme(su),au("design:type",Symbol)],cu.prototype,"type",void 0),Au([uu.lazy((function(e){return e.getType()})),au("design:type","function"==typeof(tu=void 0!==ui.ParamModelType&&ui.ParamModelType)?tu:Object)],cu.prototype,"modelType",void 0),Au([uu.lazy(),au("design:type",String)],cu.prototype,"name",void 0),Au([uu.lazy(),au("design:type","function"==typeof(ru=void 0!==at.a&&at.a)?ru:Object)],cu.prototype,"size",void 0),Au([uu.lazy(),au("design:type","function"==typeof(nu=void 0!==$e.a&&$e.a)?nu:Object)],cu.prototype,"box3",void 0),Au([uu.lazy(),au("design:type","function"==typeof(iu=void 0!==Js.ParamStore&&Js.ParamStore)?iu:Object)],cu.prototype,"paramStore",void 0),Au([uu.lazy(),au("design:type","function"==typeof(ou=void 0!==ui.ParamModelCategory&&ui.ParamModelCategory)?ou:Object)],cu.prototype,"category",void 0),Au([uu.lazy(),au("design:type",Boolean)],cu.prototype,"legal",void 0),Au([uu.lazy((function(e){return e.getHasAttached()})),au("design:type",Boolean)],cu.prototype,"attached",void 0),Au([uu.lazy(),au("design:type",Boolean)],cu.prototype,"deletable",void 0),Au([uu.lazy(),au("design:type",Boolean)],cu.prototype,"replaceable",void 0),Au([uu.lazy(),au("design:type",Number)],cu.prototype,"attachedVersion",void 0),Au([uu.lazy(),au("design:type",Boolean)],cu.prototype,"paramOverride",void 0);var Iu,yu,Cu=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":du(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Eu=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":du(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Bu=Ys.castTo(),vu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gu(e,t)}(o,e);var t,r,n,i=fu(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e)).parent=t,r}return t=o,(r=[{key:"visit",value:function(e,t){this.$model.visit(e,t)}},{key:"upVisit",value:function(e,t){this.$model.upVisit(e,t)}}])&&lu(t.prototype,r),n&&lu(t,n),o}(cu);function mu(e){return(mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qu(Object(r),!0).forEach((function(t){_u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Su(e){return function(e){if(Array.isArray(e))return wu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return wu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wu(e,t)}(e)||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 wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Du(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ru(e,t,r){return(Ru="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Tu(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Mu(e,t){return(Mu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xu(e){var t=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(e){return!1}}();return function(){var r,n=Tu(e);if(t){var i=Tu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pu(this,r)}}function Pu(e,t){return!t||"object"!==mu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tu(e){return(Tu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Cu([Bu.lazy((function(e,t){for(var r=t;r.parent;)r=r.parent;return r})),Eu("design:type",vu)],vu.prototype,"root",void 0),Cu([Bu.imme(LA),Eu("design:type",Symbol)],vu.prototype,"type",void 0),Cu([Bu.lazy((function(e){return e.isRoot()})),Eu("design:type",Boolean)],vu.prototype,"isRoot",void 0),Cu([Bu.lazy((function(e){return e.isAccessory()})),Eu("design:type",Boolean)],vu.prototype,"isAccessory",void 0),Cu([Bu.lazy((function(e){return e.getAssembly()?e.getAssembly().getId():void 0})),Eu("design:type",String)],vu.prototype,"assemblyId",void 0),Cu([Bu.lazy((function(e,t){return e.getChildren().map((function(e){return qs.get(e)}))})),Eu("design:type",Array)],vu.prototype,"children",void 0),Cu([Bu.lazy((function(e,t){return e.getAccessories().map((function(e){return qs.get(e)}))})),Eu("design:type",Array)],vu.prototype,"accessories",void 0),Cu([Bu.lazy((function(e,t){return t.children.concat(t.accessories)})),Eu("design:type",Array)],vu.prototype,"childNodes",void 0),Cu([Bu.lazy((function(e,t){return!!e.getAssembly()&&e.getAssembly().isTemplateAssembly()})),Eu("design:type",Boolean)],vu.prototype,"belongsToTemplateAssembly",void 0),Cu([Bu.guard(),Eu("design:type",Function),Eu("design:paramtypes",["function"==typeof(Iu=void 0!==Mt.ParamModelVisitor&&Mt.ParamModelVisitor)?Iu:Object,Boolean]),Eu("design:returntype",void 0)],vu.prototype,"visit",null),Cu([Bu.guard(),Eu("design:type",Function),Eu("design:paramtypes",["function"==typeof(yu=void 0!==Mt.ParamModelVisitor&&Mt.ParamModelVisitor)?yu:Object,Boolean]),Eu("design:returntype",void 0)],vu.prototype,"upVisit",null),qs.registeCreator(jt,(function(e){return e.isRoot()?new vu(e):qs.get(e.getParent()).guard((function(t){return new vu(e,t)}))}));Symbol("paramModelMultiSelectionEntity");var Ou=function e(){Fu(this,e),this.paramModels=[],this.paramModelAssembies=[]},Lu=function(e,t){return t.paramsMap[e]||t.paramsChildrenMap[e]},Nu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mu(e,t)}(o,e);var t,r,n,i=xu(o);function o(e){var t;return Fu(this,o),(t=i.call(this,e)).findModelOrAssemblyModelById=function(e){var r=t.findModel(e);return r?r.$model:t.findParamModelAssembly(e)},t.modelsMap={paramsMap:{},paramsChildrenMap:{}},t.childrenMap={},t}return t=o,(r=[{key:"updateState",value:function(e){var t=this.state?this.state.paramModels:[],r=this.state?this.state.paramModelAssembies:[];Ru(Tu(o.prototype),"updateState",this).call(this,e);var n=this.state.paramModels,i=this.state.paramModelAssembies;this.updateParamModelsMap(t,n),t===n&&r===i||this.emit(o.EVENT_PARAM_MODELS_CHANGED,this)}},{key:"updateParamModelsMap",value:function(e,t){var r=qi.Util.diffArray(e,t),n=this.modelsMap.paramsMap,i=r.removed;i.push.apply(i,Su(r.updatedOld));var o,A,a=r.added;a.push.apply(a,Su(r.updatedNew));for(var s=this.childrenMap,u=this.modelsMap.paramsChildrenMap,c=0,l=i.length;c<l;++c){if(delete n[A=i[c].id],(o=s[A])&&o.length>0)for(var g=0,f=o.length;g<f;++g)delete u[o[g]];delete s[A]}for(var h=0,p=a.length;h<p;++h)n[A=a[h].id]=a[h].$model,o=[],a[h].visit((function(e){A=e.getId(),o.push(A),u[A]=e,qs.put(e)}),!0),s[A]=o}},{key:"initState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.updateState(bu(bu({},e),new Ou)),this.state}},{key:"initModelBindingState",value:function(e){}},{key:"bindDesign",value:function(e){var t=this.reactiveModelState;t||(t=new(xs.a.createBase({defaultArrayItemSyncPoint:function(e,t){return!0},shouldIgnoreBinderCheck:function(e){return e&&e.type===LA}}))(this.updateState.bind(this),this.isImmutable),this.reactiveModelState=t);var r=e.getDoc();t.initModelState({paramModels:Object(Ms.bindArray)(r.addDependency((function(){return e.getCustom().getParamModels()}),t)).map(r.addDependency((function(e){var t=qs.get(e,!0);return t.asStub(),t}),t)),paramModelAssembies:Object(Ms.bindArray)(r.addDependency((function(){return e.getCustom().getParamModelAssemblies()}),t)).map(r.addDependency((function(e){return e}),t))})}},{key:"findModelEx",value:function(e,t){return t(e,this.modelsMap)}},{key:"findModel",value:function(e){var t=this.findModelEx(e,Lu);return t?qs.get(t):void 0}},{key:"findParamModelAssembly",value:function(e){return this.state.paramModelAssembies.find((function(t){return t.id===e}))}}])&&Du(t.prototype,r),n&&Du(t,n),o}(Ji.KafBaseStateManager);function ku(e){return(ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ju(e,t,r){return(ju="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ku(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Vu(e,t){return(Vu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hu(e){var t=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(e){return!1}}();return function(){var r,n=Ku(e);if(t){var i=Ku(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yu(this,r)}}function Yu(e,t){return!t||"object"!==ku(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ku(e){return(Ku=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Nu.EVENT_PARAM_MODELS_CHANGED="EVENT_PARAM_MODELS_CHANGED";var qu,Ju=Object(FA.getConnector)().setRootState,Wu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vu(e,t)}(o,e);var t,r,n,i=Hu(o);function o(){var e;return Gu(this,o),(e=i.apply(this,arguments)).design=new Rt,e.fittingDesign=new Ir,e}return t=o,(r=[{key:"initState",value:function(){ju(Ku(o.prototype),"initState",this).call(this);var e=Vc().getDependentPlugin(Ji.AppServicePlugin);return this.kaf=e.stateManager,this.pad.bindDesign(this.design),this.state}}])&&Uu(t.prototype,r),n&&Uu(t,n),o}(Ji.types.combine({pad:Nu}));function zu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){e[e.NONE=0]="NONE",e[e.NORMAL=0]="NORMAL",e[e.ENCRYPTED=1]="ENCRYPTED",e[e.COMPRESSED=2]="COMPRESSED"}(qu||(qu={}));var Xu=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"toNetParams",value:function(e,t,r){var n={};return n.api=e,n.params=t?t.params:void 0,n.data=r,void 0===n.data&&(n.data=t?t.data:void 0),n.headers=t&&t.headers||{},n}},{key:"toAxiosConfig",value:function(e){e.method||(e.method=qi.ERequest.GET),e.method===qi.ERequest.GET&&e.data&&(e.params?Object.keys(e.data).forEach((function(t){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==e.params[t]&&console.warn("HTTP GET params ["+t+"] overwrited by data"),e.params[t]=e.data[t]})):e.params=e.data,delete e.data);var t={};if(t.url=e.url||e.api,t.params=e.params,t.data=e.data,t.headers=e.headers,t.method=e.method,e.extend){var r=t,n=e.extend;Object.keys(n).forEach((function(e){Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&void 0!==r[e]&&console.warn("[CUSTOM] Request config ["+e+"] overwrited by extend"),r[e]=n[e]}))}return t}}],(r=null)&&zu(t.prototype,r),n&&zu(t,n),e}();function Zu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var $u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.net=t}var t,r,n;return t=e,(r=[{key:"addClientInterceptors",value:function(e){}},{key:"encryptedGet",value:function(e,t){return this._get(qu.ENCRYPTED,e,t)}},{key:"encryptedDelete",value:function(e,t){return this._delete(qu.ENCRYPTED,e,t)}},{key:"encryptedPost",value:function(e,t,r){return this._post(qu.ENCRYPTED,e,t,r)}},{key:"encryptedPut",value:function(e,t,r){return this._put(qu.ENCRYPTED,e,t,r)}},{key:"gzipGet",value:function(e,t){return this._get(qu.COMPRESSED,e,t)}},{key:"gzipPost",value:function(e,t,r){return this._post(qu.COMPRESSED,e,t,r)}},{key:"request",value:function(e){var t=Xu.toNetParams(e.url,e);return this.net.get(t)}},{key:"get",value:function(e,t){return this._get(qu.NORMAL,e,t)}},{key:"delete",value:function(e,t){return this._delete(qu.NORMAL,e,t)}},{key:"post",value:function(e,t,r){return this._post(qu.NORMAL,e,t,r)}},{key:"put",value:function(e,t,r){return this._put(qu.NORMAL,e,t,r)}},{key:"_get",value:function(e,t,r){var n=Xu.toNetParams(t,r);return this.net.get(n,{mode:e})}},{key:"_delete",value:function(e,t,r){var n=Xu.toNetParams(t,r);return this.net.delete(n,{mode:e})}},{key:"_post",value:function(e,t,r,n){var i=Xu.toNetParams(t,n,r);return this.net.post(i,{mode:e})}},{key:"_put",value:function(e,t,r,n){var i=Xu.toNetParams(t,n,r);return i.method="PUT",this.net.request(i,{mode:e})}}])&&Zu(t.prototype,r),n&&Zu(t,n),e}();function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach((function(t){rc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nc(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ic(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){nc(o,n,i,A,a,"next",e)}function a(e){nc(o,n,i,A,a,"throw",e)}A(void 0)}))}}function oc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Ac=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e=ic(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.request(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.get=function(){var e=ic(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(tc(tc({},n),{},{url:r})),e.next=4,t.service.get(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.delete=function(){var e=ic(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(tc(tc({},n),{},{url:r})),e.next=4,t.service.delete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.post=function(){var e=ic(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(tc(tc({},i),{},{data:n,url:r})),e.next=4,t.service.post(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.put=function(){var e=ic(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(tc(tc({},i),{},{data:n,url:r})),e.next=4,t.service.put(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedRequest=function(){var e=ic(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.encryptedRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedGet=function(){var e=ic(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(tc(tc({},n),{},{url:r})),e.next=4,t.service.encryptedGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedDelete=function(){var e=ic(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(tc(tc({},n),{},{url:r})),e.next=4,t.service.encryptedDelete(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.encryptedPost=function(){var e=ic(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(tc(tc({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.encryptedPut=function(){var e=ic(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(tc(tc({},i),{},{data:n,url:r})),e.next=4,t.service.encryptedPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipRequest=function(){var e=ic(s.a.mark((function e(r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.convertRequest(r),e.next=3,t.service.gzipRequest(n);case 3:return i=e.sent,e.abrupt("return",t.wrapResponse(r,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipGet=function(){var e=ic(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(tc(tc({},n),{},{url:r})),e.next=4,t.service.gzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.gzipPost=function(){var e=ic(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(tc(tc({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.gzipPut=function(){var e=ic(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(tc(tc({},i),{},{data:n,url:r})),e.next=4,t.service.gzipPut(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),this.pbGzipGet=function(){var e=ic(s.a.mark((function e(r){var n,i,o,A=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.length>1&&void 0!==A[1]?A[1]:{},i=t.convertRequest(tc(tc({},n),{},{url:r})),e.next=4,t.service.pbGzipGet(i);case 4:return o=e.sent,e.abrupt("return",t.wrapResponse(n,o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pbGzipPost=function(){var e=ic(s.a.mark((function e(r,n){var i,o,A,a=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>2&&void 0!==a[2]?a[2]:{},o=t.convertRequest(tc(tc({},i),{},{data:n,url:r})),e.next=4,t.service.pbGzipPost(o);case 4:return A=e.sent,e.abrupt("return",t.wrapResponse(i,A));case 6:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}var t,r,n;return t=e,(r=[{key:"service",get:function(){if(!this._service)throw new Error("please call setRequestClient before getRequestClient.");return this._service}},{key:"setMiniAppHttpProxyClientService",value:function(e){return this._service=e,this}},{key:"convertRequest",value:function(e){var t,r;return{url:e.url,method:e.method,baseURL:e.baseURL,params:e.params,data:e.data,timeout:e.timeout,extra:{isRequestBodyJson:null===(r=null===(t=e)||void 0===t?void 0:t.extra)||void 0===r?void 0:r.isRequestBodyJson}}}},{key:"wrapResponse",value:function(e,t){return{data:t.data,status:200,statusText:"ok",headers:{},config:e,encryptedDataLength:0,dataLength:0}}}])&&oc(t.prototype,r),n&&oc(t,n),e}(),ac=r(1128),sc=r(31),uc=r(213),cc=r(162),lc=r(92);function gc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fc(e,t){return(fc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hc(e){var t=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(e){return!1}}();return function(){var r,n=dc(e);if(t){var i=dc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return pc(this,r)}}function pc(e,t){return!t||"object"!==Ic(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dc(e){return(dc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ic(e){return(Ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var yc,Cc,Ec,Bc,vc,mc,Qc,bc,_c=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Ic(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Sc=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Ic(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},wc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fc(e,t)}(r,e);var t=hc(r);function r(){var e;return gc(this,r),(e=t.apply(this,arguments)).client=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e.encryptedClient=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.encryptInterceptor,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e.gzippedEncryptClient=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.gzipEncryptBase64Interceptor,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e.pbEncryptedClient=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.encryptInterceptorWithArrayBuffer,sc.encryptInterceptor,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e.pbGzippedEncryptClient=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.gzipEncryptInterceptorWithArrayBuffer,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e.ossGzippedEncryptClient=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.gzipEncryptBase64Interceptor,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e.ossDegradedEncryptedClient=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.ossDegradedEncryptInterceptor,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e.ossDegradedGzippedEncryptClient=Object(cc.getClient)([sc.interceptor,uc.errorCodeInterceptor,sc.ossDegradedGzipEncryptBase64Interceptor,sc.parseCDNInterceptor,sc.parseJSONInterceptor]),e}return r}(ac.RequestClient);_c([sc.retryRequest,Sc("design:type","function"==typeof(yc=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?yc:Object)],wc.prototype,"client",void 0),_c([sc.retryRequest,Sc("design:type","function"==typeof(Cc=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?Cc:Object)],wc.prototype,"encryptedClient",void 0),_c([sc.retryRequest,Sc("design:type","function"==typeof(Ec=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?Ec:Object)],wc.prototype,"gzippedEncryptClient",void 0),_c([sc.retryRequest,Sc("design:type","function"==typeof(Bc=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?Bc:Object)],wc.prototype,"pbEncryptedClient",void 0),_c([sc.retryRequest,Sc("design:type","function"==typeof(vc=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?vc:Object)],wc.prototype,"pbGzippedEncryptClient",void 0),_c([Object(sc.retryRequest)(!0),Sc("design:type","function"==typeof(mc=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?mc:Object)],wc.prototype,"ossGzippedEncryptClient",void 0),_c([sc.retryRequest,Sc("design:type","function"==typeof(Qc=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?Qc:Object)],wc.prototype,"ossDegradedEncryptedClient",void 0),_c([sc.retryRequest,Sc("design:type","function"==typeof(bc=void 0!==lc.AxiosInstance&&lc.AxiosInstance)?bc:Object)],wc.prototype,"ossDegradedGzippedEncryptClient",void 0);var Dc=Object(tr.once)((function(){return new wc})),Rc=Object(tr.once)((function(){return new Ac}));function Mc(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function xc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Pc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n,i,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){return Dc().addClientInterceptors(e)}},{key:"send",value:(i=s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Dc(),i=Xu.toAxiosConfig(t),r.mode!==qu.COMPRESSED){e.next=6;break}return e.abrupt("return",n.gzipRequest(i));case 6:if(r.mode!==qu.ENCRYPTED){e.next=10;break}return e.abrupt("return",n.encryptedRequest(i));case 10:return e.abrupt("return",n.request(i));case 11:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){Mc(o,r,n,A,a,"next",e)}function a(e){Mc(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e,t){return o.apply(this,arguments)})}])&&xc(t.prototype,r),n&&xc(t,n),e}();function Tc(e){return(Tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fc(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Oc(e,t,r){return(Oc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gc(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Lc(e,t){return(Lc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nc(e){var t=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(e){return!1}}();return function(){var r,n=Gc(e);if(t){var i=Gc(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kc(this,r)}}function kc(e,t){return!t||"object"!==Tc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gc(e){return(Gc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Uc=new qi.SingletonRef,jc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lc(e,t)}(o,e);var t,r,n,i=Nc(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.core",name:"cCoreApp",Component:io,axrs:Po,singleton:Uc},e)).stateManager=t,r}return t=o,(r=[{key:"init",value:function(){Oc(Gc(o.prototype),"init",this).call(this),this.onInitialize()}},{key:"onInitialize",value:function(){var e=this.getDependentPlugin(Ji.AppServicePlugin);this.initLogger(e);var t=this.stateManager,r=t.design,n=t.fittingDesign;yA.configTopDocumentAction([r],e.stateManager.document),e.addDocumentSource(new QA(r,"custom-pad-document")),e.addDocumentSource(new TA(n,"fitting-document"));var i=r.getDoc().getElementContext();i.getterEmitter.on((function(e){er.advanced.reportObserved(e.instance)})),i.setterEmitter.on((function(e){er.advanced.reportChanged(e.instance)}))}},{key:"initLogger",value:function(e){var t;t=e.logger,Io=t}},{key:"initStateManager",value:function(){this.stateManager.initState(),Ju(this.stateManager)}},{key:"initNet",value:function(){Oc(Gc(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Pc),this.client=new $u(this.net)}}])&&Fc(t.prototype,r),n&&Fc(t,n),o}(qi.PluginApplication),Vc=Uc.instance;function Hc(e){return function(e){if(Array.isArray(e))return Yc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Yc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yc(e,t)}(e)||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 Yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jc(e,t){var r=t.findRelativeModel,n=t.transformModel,i=t.color,o=t.defaultConfig;return Object(tr.map)(e,(function(e,t){var A=r(t);return A?Object(tr.map)(e,(function(e){var t=n(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kc(Object(r),!0).forEach((function(t){qc(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),A,o);return i&&t.setViewColor(i),t})):(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前孔槽找不到对应模型!"),[])})).flat()}function Wc(e,t){if(!(e instanceof $r&&e.type===E.NONE)){var r=Vc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=e.path.plankArea.modelID,o=n.find((function(t){return t.id===e.id&&t.linkModel.id===i})),A=e.getHint();if(o)o.setViewColor(A.color),o.setOpacity(A.opacity);else{var a=function(e){var t=e instanceof Wr?e.getRealLine():e.getCurveLineAndPoints().curveLine;if(t instanceof u.Arc2d||t instanceof u.EllipticalArc2d){var r=e.path.getAllCurves().map((function(e){return e.curve}));if(t instanceof u.Arc2d){var n=t.circle.clone();n.radius+=1,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW),e.path.type===We.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(n.radius-=2,t=new u.Arc2d(n,t.startAngle,t.endAngle,t.isCCW))}if(t instanceof u.EllipticalArc2d){var i=t.ccs,o=t.majorRadius+1,A=t.minorRadius+1,a=t.startParam,s=t.endParam,c=t.clockSign;t=new u.EllipticalArc2d(i,o,A,a,s,c),e.path.type===We.OUTER!=(u.PtInLoop.pointInLoop2D(t.middlePoint,r).ptInLoopType===u.PtInLoop.PtInLoopType.Outside)&&(o=t.majorRadius-1,A=t.minorRadius-1,t=new u.EllipticalArc2d(i,o,A,a,s,c))}}return t}(e);t&&a.transform(t);var s=function(e){var t,r=e.linkModelId,n=e.hintModelId,i=e.curveLine,o=e.hint,A=Vc().getStateManager().pad.findModelOrAssemblyModelById(r);if(A){var a=null===(t=A.getParam("thickness"))||void 0===t?void 0:t.getData().value,s=i instanceof u.EllipticalArc2d?i.getApproximatePoints(.01):i.getApproximatePoints();return new ti({linkModel:A,points:s,color:o.color,opacity:o.opacity,height:a?+a:0,id:n})}}({hint:A,curveLine:a,hintModelId:e.id,linkModelId:i});s&&r.setPlankOutlineHintModels([].concat(Hc(n),[s]))}}}var zc=r(0);function Xc(e){return(Xc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
|
87
87
|
/*!
|
|
88
|
-
* @qunhe/custom-miniapp-outer-sdk v0.20.
|
|
88
|
+
* @qunhe/custom-miniapp-outer-sdk v0.20.10
|
|
89
89
|
* (c) 2023
|
|
90
90
|
* @license MIT
|
|
91
91
|
*/var Zc,$c,el,tl;
|
|
@@ -146,4 +146,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
146
146
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
147
147
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
148
148
|
PERFORMANCE OF THIS SOFTWARE.
|
|
149
|
-
***************************************************************************** */var kf,Gf=function(e,t){return(Gf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Uf(e,t){function r(){this.constructor=e}Gf(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function jf(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function Vf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Hf(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Vf(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(kf||(kf={}));var Yf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(zc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(zc.API_UNSUPPORT)()},jf([zc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),jf([zc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=jf([zc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);var Kf,qf,Jf,Wf=function(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PopBufferMtl=void 0,t.toPopBufferMtl=function(e){var t=e.parameters,r=new A;r.setObjName(e.objName),e.brandGoodId&&r.setBrandGoodId(e.brandGoodId);if(t)for(var i=0,o=t.length;i<o;i++){var a=t[i];switch(a.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(a.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(a.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(a.value));break;case"transparentType":r.setTransparentType(Number(a.value))}}return r};var r,n=(r=at.a)&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(e){return this.objName=e,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(e){return this.brandGoodId=e,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(e){return this.diffuseTexture=e,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(e){return this.diffuseColor=e,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(e){return this.refractColor=e,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(e){return this.transparentType=e,this}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.PopBufferMtl=A})),zf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.toJSON=function(){return{paramPackages:Hf(this.paramPackages.values()),hardwares:Hf(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=Vf(e,2);t[0];var r=t[1],n=new Sf.a;return Object(tr.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Hf(this.displayInfos.values()),wireFrames:Object(tr.fromPairs)(Hf(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(tr.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new Sf.a;if(Object(tr.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new mf.a,n=new Qn.a;return Object(tr.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Wf.toPopBufferMtl(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Bf.FurnitureModel;Object(tr.extend)(r,t.furnitureModel),r.size=new at.a(r.size),r.position=new at.a(r.position),r.rotate=new at.a(r.rotate),r.scale=new at.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(tr.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(bf.a);!function(e){e[e.willExit=0]="willExit"}(Kf||(Kf={})),function(e){e[e.exit=0]="exit"}(qf||(qf={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Jf||(Jf={}));var Xf=r(245),Zf=r.n(Xf),$f=r(287),eh=r.n($f),th=r(1129),rh=r.n(th),nh=r(361),ih=r.n(nh),oh=r(723),Ah=r.n(oh),ah=r(1130),sh=r.n(ah),uh=r(727),ch=r.n(uh),lh=r(728),gh=r.n(lh),fh=r(207),hh=r.n(fh),ph=r(112),dh=r.n(ph),Ih=r(187),yh=r.n(Ih),Ch=r(530),Eh=r.n(Ch),Bh=r(1131),vh=r.n(Bh),mh=r(721),Qh=r.n(mh),bh=r(720),_h=r.n(bh),Sh=r(360),wh=r.n(Sh),Dh=r(242),Rh=r.n(Dh),Mh=r(732),xh=r.n(Mh),Ph=r(719),Th=r.n(Ph),Fh=r(1132),Oh=r.n(Fh),Lh=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[bi.a,fi.a,ih.a,$e.a,Ah.a,tt.a,sh.a,hh.a,dh.a,yh.a,Eh.a,nt.a,pi.a,Ii.a,Ci.a,vh.a,Qh.a,_h.a,ot.a,wh.a,Rh.a,xh.a,Mh.LineIndex,Bi.a,Th.a,Oh.a,Yr.a,at.a,ArrayBuffer,ia.Vector3,eh.a,rh.a,Js.ParamStore,ch.a,gh.a,mf.a,Qn.a,Bf.FurnitureModel,Map,ia.SkyBackground]:[];Object(Xf.inject)({isKnownImmutableInstance:function(e){return Lh.some((function(t){return e instanceof t}))}});Zf.a;var Nh=r(211);function kh(e){return(kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jh(e,t){return(jh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vh(e){var t=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(e){return!1}}();return function(){var r,n=Yh(e);if(t){var i=Yh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hh(this,r)}}function Hh(e,t){return!t||"object"!==kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yh(e){return(Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kh,qh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jh(e,t)}(o,e);var t,r,n,i=Vh(o);function o(){var e;return Gh(this,o),(e=i.apply(this,arguments)).rootState=new Wu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new jc(this,this.rootState);e.init(),e.run()}}])&&Uh(t.prototype,r),n&&Uh(t,n),o}(Nh.BasePlugin);qh.dependencies=[Ji.AppServicePlugin];var Jh,Wh,zh,Xh=function(e){if(!Kh)throw new Error("please new Application before call method");return Kh.getCustomMiniAppService(e)},Zh=r(249),$h=r(108),ep=r(429);function tp(e){zh=e}function rp(e){return(rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function np(e){return function(e){if(Array.isArray(e))return ip(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ip(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ip(e,t)}(e)||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 ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function op(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ap(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ap(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ap(o,n,i,A,a,"next",e)}function a(e){Ap(o,n,i,A,a,"throw",e)}A(void 0)}))}}function sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function up(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cp(e,t){return(cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lp(e){var t=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(e){return!1}}();return function(){var r,n=fp(e);if(t){var i=fp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gp(this,r)}}function gp(e,t){return!t||"object"!==rp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fp(e){return(fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cp(e,t)}(o,e);var t,r,n,i=lp(o);function o(){var e;return sp(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=ap(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=Xh(Zh.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=ap(s.a.mark((function t(r){var n,i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(tr.castArray)(r),!Object(tr.difference)(i,e.lastCurrentCustomDataArgs).length&&n){t.next=11;break}return t.next=8,Rm(r);case 8:n=t.sent,t.next=12;break;case 11:return t.abrupt("return",n);case 12:return e.lastCurrentCustomDataArgs=i,e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=ap(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(tr.uniq)(Object(tr.flatten)(Object(tr.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(tr.map)(n,function(){var e=ap(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lm(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,Nm(n);case 11:for(p in u=t.sent,c=Object(tr.mapValues)(Object(tr.keyBy)(Object(tr.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new nt.a).makeTranslation(new at.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(tr.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=op(t,["paramModelData"]),A=e.rotate,a=(new jt).parse(i);Object($h.attach)(a,Object($h.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new nt.a).compose(new at.a(e.position),new tt.a(A.x,A.y,A.z),new at.a(e.scale)).multiply((new nt.a).setPosition(new at.a(r)))),g=li.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new at.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,np(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,Jh.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&up(t.prototype,r),n&&up(t,n),o}(qi.AXR);function pp(e){return(pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ip(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yp(e,t){return(yp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cp(e){var t=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(e){return!1}}();return function(){var r,n=Bp(e);if(t){var i=Bp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ep(this,r)}}function Ep(e,t){return!t||"object"!==pp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bp(e){return(Bp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vp,mp,Qp,bp,_p,Sp,wp,Dp,Rp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yp(e,t)}(o,e);var t,r,n,i=Cp(o);function o(){var e;return dp(this,o),(e=i.apply(this,arguments)).paramModelConstructor=jt,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new Xt).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Ip(t.prototype,r),n&&Ip(t,n),o}(zf),Mp=r(75),xp=Symbol("fitting-data"),Pp=Symbol("groove-fitting-entity"),Tp=Symbol("intersect-data"),Fp=Symbol("param-model-hint-entity"),Op=Symbol("fitting-hint-entity"),Lp=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(vp||(vp={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(mp||(mp={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(Qp||(Qp={})),function(e){e.SCENE_ID="cp"}(bp||(bp={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(_p||(_p={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(Sp||(Sp={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(wp||(wp={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(Dp||(Dp={}));var Np,kp=[];function Gp(e){return(Gp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Up(e){return function(e){if(Array.isArray(e))return jp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jp(e,t)}(e)||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 jp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Hp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Vp(o,n,i,A,a,"next",e)}function a(e){Vp(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Yp(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jp(e,t){return(Jp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wp(e){var t=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(e){return!1}}();return function(){var r,n=Xp(e);if(t){var i=Xp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zp(this,r)}}function zp(e,t){return!t||"object"!==Gp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xp(e){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(Np||(Np={}));var Zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jp(e,t)}(o,e);var t,r,n,i=Wp(o);function o(){var e;return Kp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:mp.READY,design:mp.READY,series:mp.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=Yp(n,["paramModelData"]),A=(new jt).parse(i),Object($h.attach)(A,Object($h.toAttachedMap)(o)),e.next=9,Jh.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(kp),e.next=13,Object(Mp.put)(this.$actionLoad.done.message({params:t,result:mp.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(Up(a),Up(A)),e.next=12,Jh.updateAttacheds(u);case 12:return e.next=14,Object(Mp.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:mp.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=Yp(e,["paramModelData"]),n=(new jt).parse(t,new Rp);return Object($h.attach)(n,Object($h.toAttachedMap)(r)),n})),e.next=3,Jh.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,Up(i)),e.next=6,Object(Mp.put)(this.$actionAddParamModelToSense.done.message({params:t,result:mp.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new Rp,o=t.map((function(e){return(new Xt).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Jh.updateAttacheds(Up(o));case 8:return n.addParamModelAssemblies.apply(n,Up(o)),n.addParamModels.apply(n,Up(A)),e.next=12,Object(Mp.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:mp.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&qp(t.prototype,r),n&&qp(t,n),o}(qi.AXR);function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ed(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function td(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rd(e,t)}function rd(e,t){return(rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nd(e){var t=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(e){return!1}}();return function(){var r,n=od(e);if(t){var i=od(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return id(this,r)}}function id(e,t){return!t||"object"!==$p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function od(e){return(od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}qi.AXR;var Ad=function(e){td(r,e);var t=nd(r);function r(){return ed(this,r),t.apply(this,arguments)}return r}(qi.AXRPartial),ad=(qi.AXRManager,Math.sqrt(2)),sd=Math.PI/6,ud=Math.PI/3+Math.PI;function cd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ud,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sd,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*ad,a=new at.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var ld,gd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function fd(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(r),!0).forEach((function(t){dd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function dd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e){return e["@type"]===g.THROUGH_SHELL}function yd(e){var t=e.elements;return(new oa.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function Cd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ed(e,t){var r,n=e.getSize(),i=(new nt.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(yd(i)),A=o.x,a=o.y,s=o.z,u=(Cd(r={},ld.TOP,Math.abs(s-n.z/2)),Cd(r,ld.LEFT,Math.abs(A+n.x/2)),Cd(r,ld.BACK,Math.abs(a+n.y/2)),Cd(r,ld.RIGHT,Math.abs(A-n.x/2)),Cd(r,ld.FRONT,Math.abs(a-n.y/2)),Cd(r,ld.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:ld.UNKNOWN}function Bd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(ld||(ld={}));var vd=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=WC(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Bd(o,n,i,A,a,"next",e)}function a(e){Bd(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),md=r(243);function Qd(e){return function(e){if(Array.isArray(e))return bd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bd(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _d(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Rp;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=Qd(r.getParamModels())).concat.apply(t,Qd(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(tr.uniqBy)(md.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function Sd(e){return(Sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Dd(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wd(o,n,i,A,a,"next",e)}function a(e){wd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Rd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Md(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xd(e,t){return(xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pd(e){var t=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(e){return!1}}();return function(){var r,n=Fd(e);if(t){var i=Fd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Td(this,r)}}function Td(e,t){return!t||"object"!==Sd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fd(e){return(Fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Od(e){return function(e){if(Array.isArray(e))return Ld(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ld(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ld(e,t)}(e)||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 Ld(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nd(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?Nd(e.subModels):[]})).flat();return t.push.apply(t,Od(e)),t}var kd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xd(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=Pd(g);function g(){var e;return Rd(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:vp.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y,C;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=t.timeout,l=this.state.state,g=l.currModelId,f=l.result,h=l.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(p=r===g,d=h===u,I=this.$actionLoadParamModelJsonData,e.prev=7,y=p&&!a&&d?f:void 0,!o||y){e.next=13;break}return e.next=12,Mm(r,u);case 12:y=e.sent;case 13:if(y){e.next=18;break}return Em.delete(r),e.next=17,xm(r,u,c);case 17:y=e.sent;case 18:if(y){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return C=p&&!u?Nd(y.paramModel):this.state.state.allSubModels,p&&WC().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,I.done.dispatch({params:t,result:{ossContent:y,allSubModels:C}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,I.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=vp.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=vp.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=Dd(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=WC().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(Iy).fittingDesignSense).initFittingDesign(),function(){var e=Dd(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=fd(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(hp).getCurrentCustomData(r);case 12:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=_d(o,A),(u=new pt).addParamModels.apply(u,Od(a.paramModels)),u.addParamModelAssemblies.apply(u,Od(a.paramModelAssemblies)),e.next=21,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=Dd(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,Rm(this.state.state.currModelId);case 9:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=_d(o,A),t.addParamModels.apply(t,Od(a.paramModels)),t.addParamModelAssemblies.apply(t,Od(a.paramModelAssemblies)),e.next=17,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=Dd(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Xh(Zh.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(tr.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=Dd(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=fd(),this.getAxr(Iy).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:a}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=fd(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:a,hasFitting:!!g,force:c,templateId:l,timeout:"number"==typeof o?o/1e3:void 0}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===ui.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,Od(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=Dd(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Xh(Yf),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=Dd(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(tr.castArray)(t),n=Xh(Zh.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&Md(t.prototype,r),n&&Md(t,n),g}(qi.AXR);function Gd(e){return(Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ud(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ud(Object(r),!0).forEach((function(t){Vd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ud(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Vd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Yd(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Hd(o,n,i,A,a,"next",e)}function a(e){Hd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Kd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jd(e,t,r){return(Jd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Zd(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Wd(e,t){return(Wd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zd(e){var t=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(e){return!1}}();return function(){var r,n=Zd(e);if(t){var i=Zd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xd(this,r)}}function Xd(e,t){return!t||"object"!==Gd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zd(e){return(Zd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $d(e){return function(e){if(Array.isArray(e))return eI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return eI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eI(e,t)}(e)||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 eI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var tI={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}};function rI(e){return Object(tr.values)(e).some((function(e){return Object(tr.isEmpty)(e)}))}function nI(e,t){var r=e.getParamModelAssemblies().find((function(e){return e.id===t}));if(r||(r=e.getParamModels().find((function(e){return e.id===t}))),!r)return[];for(var n=[],i=[r];i.length;){var o=i.shift();n.push(o.id),i.push.apply(i,$d(o.getChildNodes()))}return n}function iI(e){return Object(tr.uniq)(["holes","grooves","hardwares","hardwareGrooves"].map((function(t){return Object(tr.keys)(e[t]).sort()})).flat())}function oI(e,t){var r=new Set(t);return e.filter((function(e){return!r.has(e)}))}var AI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wd(e,t)}(o,e);var t,r,n,i=zd(o);function o(){var e;return Kd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:vp.FAIL,design:Object(tr.cloneDeep)(tI)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(Zp);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(Mp.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(hp).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(tr.cloneDeep)(tI))},e.getConnectedFittingDesign=function(){var t=Yd(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(tr.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(tr.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(tr.filter)(i.holes[u],f),o.grooves[u]=Object(tr.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(tr.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(tr.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=Yd(s.a.mark((function t(r){var n,i,o,A,a,u,c,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gd(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=WC().fittingDesign.senseSetting.getSenseSettings(),a=Object(tr.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Ai},i.setFittings([].concat($d(Jc(c,jd(jd({},d),{},{type:l.HOLE,defaultConfig:a}))),$d(Jc(f,jd(jd({},d),{},{type:l.GROOVE,defaultConfig:a}))))),i.setGrooveFittings(Jc(p,jd(jd({},d),{},{type:l.HARDWARE_GROOVE,transformModel:Ki,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=Yd(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=tI,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:jd(jd({},u?A.holes:c.holes),r.holes||{}),grooves:jd(jd({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:jd(jd({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:jd(jd({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(tr.pull)(Object(tr.keys)(h),"id").forEach((function(e){var t=h[e];Object(tr.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=fd(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,vd(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,vm(jd(jd({},i),o));case 8:A=e.sent,qi.Util.safeExec((function(){var e=r.core.design.getCustom(),n=a.getAxr(kd).state.state.currModelId;if(n===t.params.modelid&&A){var i=nI(e,n),o=iI(A),s=oI(o,i);Xh(Lf).log({logKey:"miniAppFittingDesignRead",modelId:n,fittingConnectedIds:o.join(","),notExistsIds:s.join(","),notExistsIdsCount:!!s.length})}})),n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),n.failed.dispatch({params:t});case 16:case"end":return e.stop()}}),e,this,[[5,13]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(tr.cloneDeep)(tI),i=this.getAxr(kd).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(kd).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(kd).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,vd(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,Sm(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(kd).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.state.state.design,i=t.design,o=void 0===i?n:i,e.next=4,vd(o.id);case 4:return A=e.sent,a=this.$actionSaveFittingDesign,qi.Util.safeExec((function(){var e=Xh(Lf),t=u.getAxr(kd).state.state.currModelId,i=r.core.design.getCustom();if(o&&(!o.id||t===A.modelid)){var a=nI(i,t),s=iI(o),c=oI(s,a);rI(Object(tr.omit)(n,["id"]))?e.log({logKey:"FittingDesignCreate",modelId:A.modelid,allModelIds:a.join(","),fittingConnectedIds:s.join(","),notExistsIds:c.join(","),notExistsIdsCount:!!c.length}):e.log({logKey:"FittingDesignUpdate",modelId:A.modelid,fittingConnectedIds:s.join(","),notExistsIds:c.join(","),notExistsIdsCount:!!c.length})}})),e.prev=7,e.next=10,_m(jd(jd({},o),{},{id:A.modelid}),A);case 10:a.done.dispatch({params:t,result:void 0}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),a.failed.dispatch({params:t,result:e.t0});case 16:case"end":return e.stop()}}),e,this,[[7,13]])}))),e.failed.every(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&(i=t.result||new Error("保存失败"),n.reject(i));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(kd).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){Jd(Zd(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&qd(t.prototype,r),n&&qd(t,n),o}(Ad);function aI(e){return(aI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cI(e,t){return(cI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lI(e){var t=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(e){return!1}}();return function(){var r,n=fI(e);if(t){var i=fI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gI(this,r)}}function gI(e,t){return!t||"object"!==aI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fI(e){return(fI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cI(e,t)}(o,e);var t,r,n,i=lI(o);function o(){var e;return sI(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(tr.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new Rr({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&uI(t.prototype,r),n&&uI(t,n),o}(Ad);function pI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var dI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&pI(t.prototype,r),n&&pI(t,n),e}();function II(e){var t,r=new dI;if(r.id=e.id,e instanceof jt){if(!e.isAppendHardware)return;t=l.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function yI(e){return(yI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=BI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function EI(e){return function(e){if(Array.isArray(e))return vI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||BI(e)||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 BI(e,t){if(e){if("string"==typeof e)return vI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vI(e,t):void 0}}function vI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bI(e,t){return(bI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _I(e){var t=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(e){return!1}}();return function(){var r,n=wI(e);if(t){var i=wI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return SI(this,r)}}function SI(e,t){return!t||"object"!==yI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wI(e){return(wI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var DI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bI(e,t)}(o,e);var t,r,n,i=_I(o);function o(){return mI(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,EI((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(EI(o),EI(A),EI(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return II(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=CI(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,EI(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=CI(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===l.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),lm().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===l.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==l.HOLE&&e.modelType!==l.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&QI(t.prototype,r),n&&QI(t,n),o}(Ad);function RI(e){return(RI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function xI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function PI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xI(Object(r),!0).forEach((function(t){TI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function TI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FI(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function OI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NI(e,t){return(NI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kI(e){var t=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(e){return!1}}();return function(){var r,n=UI(e);if(t){var i=UI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GI(this,r)}}function GI(e,t){return!t||"object"!==RI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function UI(e){return(UI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NI(e,t)}(a,e);var t,r,n,i,o,A=kI(a);function a(){var e;return OI(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:vp.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vd(t.modelId);case 2:return n=e.sent,i=Xh(Ff),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=FI(t,["modelId","defer"]),c=WC().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(PI({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=WC().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.intersectedThroughColor,l=a.grooveIntersectedColor,f=a.grooveIntersectedBodyColor;i.setIntersects([]);var p=t.option,d=void 0===p?{}:p,I=t.intersectedGroups,y=Object(tr.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==d.plankFaceIds){var A=Id(r)?null:r.plankFaceId;if(!d.plankFaceIds.includes(A))return!1}var a=o.findModelOrAssemblyModelById(r.linkedModelId);if(a){var p=Pi(e,r,a),I=new Map([[h.BOTH_PLANK,new Map([[g.FACE,s],[g.SHELL,u],[g.THROUGH_SHELL,c]])],[h.PLANK_FURNITURE,new Map([[g.FACE,l],[g.SHELL,f]])]]).get(i).get(n);return p.setViewColor(I),p}})).filter((function(e){return!!e}));i.setIntersects(y),A||r.kaf.invisibleManager.hide("scene3d",Tp,y.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",Tp,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",Tp,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(PI(PI({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=WC().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=FI(n,["timeout","modelId"]),c=fd(o),this.$actionLoadParamModelIntersectedData.started.dispatch(PI(PI({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){MI(o,r,n,A,a,"next",e)}function a(e){MI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&LI(t.prototype,r),n&&LI(t,n),a}(Ad);function VI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function HI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?VI(Object(r),!0).forEach((function(t){YI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function YI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KI(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return HI(HI({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function qI(e){return(qI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zI(e,t){return(zI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XI(e){var t=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(e){return!1}}();return function(){var r,n=$I(e);if(t){var i=$I(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ZI(this,r)}}function ZI(e,t){return!t||"object"!==qI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $I(e){return($I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ey={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},ty=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zI(e,t)}(o,e);var t,r,n,i=XI(o);function o(){var e;return JI(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:ey}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(tr.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(tr.mapValues)(e,(function(e){return function(e,t){var r={};return Object(tr.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(tr.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(tr.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=ri(e.plankFaceId,at.a).mul(.1),r=KI(e.plankFaceId,n).map((function(e){var r=new at.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return HI(HI({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Kn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&WI(t.prototype,r),n&&WI(t,n),o}(Ad);function ry(e){return(ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ny(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oy(e,t){return(oy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ay(e){var t=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(e){return!1}}();return function(){var r,n=sy(e);if(t){var i=sy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ay(this,r)}}function ay(e,t){return!t||"object"!==ry(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sy(e){return(sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var uy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oy(e,t)}(o,e);var t,r,n,i=Ay(o);function o(){var e;return ny(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:Je,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(tr.castArray)(t.renderIgnoreCategory)),Object(tr.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&iy(t.prototype,r),n&&iy(t,n),o}(Ad);function cy(e){return(cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ly(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fy(e,t){return(fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hy(e){var t=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(e){return!1}}();return function(){var r,n=dy(e);if(t){var i=dy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return py(this,r)}}function py(e,t){return!t||"object"!==cy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dy(e){return(dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Iy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fy(e,t)}(o,e);var t,r,n,i=hy(o);function o(){var e;return ly(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(AI),e.intersected=e.partialCreator.create(jI),e.senseSetting=e.partialCreator.create(uy),e.fittingModel=e.partialCreator.create(DI),e.plankFaceHint=e.partialCreator.create(ty),e.fittingHint=e.partialCreator.create(hI),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&gy(t.prototype,r),n&&gy(t,n),o}(qi.AXR),yy=r(722),Cy=r.n(yy);function Ey(e){return(Ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function my(e,t){return(my=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qy(e){var t=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(e){return!1}}();return function(){var r,n=_y(e);if(t){var i=_y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return by(this,r)}}function by(e,t){return!t||"object"!==Ey(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _y(e){return(_y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&my(e,t)}(o,e);var t,r,n,i=Qy(o);function o(){return By(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:W.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&vy(t.prototype,r),n&&vy(t,n),o}(De);function wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wy(Object(r),!0).forEach((function(t){Ry(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ry(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var My={x:0,y:0,z:0},xy={x:0,y:0,z:0};function Py(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new Sy,a=!(e instanceof jt)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof jt;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=$.ASSEMBLY;if(u?c=$.COMMON:e.isTemplateAssembly()&&(c=$.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?My:s.getPosition(),A.rotation=A.isRoot?xy:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=Fy(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return Py(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return Py(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function Ty(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?Dy({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===W.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();WC().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===W.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[ui.ParamType.MATERIAL,ui.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===Z.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==K.SENSE)&&(s=s.clone(!1)),o===Z.CHILD?(s.setIsAppend(!0),s.setAppendType(Cy.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,Dy(Dy({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==K.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===Z.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,Dy(Dy({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(Z.CHILD)),t.getAccessory().forEach(l(Z.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function Fy(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new ye;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[V.MATERIAL,V.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var Oy=r(125),Ly=r.n(Oy),Ny={maxAge:6e5,max:20},ky=(Dp.SHADING,Dp.OUTLINE_WITH_SHADING,Dp.TRANSLUCENT,Dp.OUTLINE_AND_TRANSLUCENT,[st.ParamModelType.PARAM_ENTITY,st.ParamModelType.PARAM_FURNITURE,st.ParamModelType.PARAM_PRIMITIVE]);function Gy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gy(Object(r),!0).forEach((function(t){jy(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vy(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Hy(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Vy(o,n,i,A,a,"next",e)}function a(e){Vy(o,n,i,A,a,"throw",e)}A(void 0)}))}}Ly()(function(){var e=Hy(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Uy({promise:!0},Ny));function Yy(){return(Yy=Hy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ky(){return(Ky=Hy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qy=Ly()((function(e){return Yy.apply(this,arguments)}),Uy(Uy({},Ny),{},{promise:!0})),Jy=Ly()((function(e){return Ky.apply(this,arguments)}),Uy(Uy({},Ny),{},{promise:!0}));function Wy(e){return function(e){if(Array.isArray(e))return zy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zy(e,t)}(e)||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 zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xy(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Zy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var $y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(tr.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(Wy(e.hardwares||[]),Wy(e.textures||[]),Wy(e.virtualModels||[]),Wy(e.paramModelProducts||[]),Wy(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,qy(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,Jy(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){Xy(o,r,n,A,a,"next",e)}function a(e){Xy(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&Zy(t.prototype,r),n&&Zy(t,n),e}();function eC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function tC(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){eC(o,n,i,A,a,"next",e)}function a(e){eC(o,n,i,A,a,"throw",e)}A(void 0)}))}}function rC(e){return function(e){if(Array.isArray(e))return nC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return nC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nC(e,t)}(e)||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 nC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var AC=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new $y;iC(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,rC(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case K.BRANDGOOD:case K.CATEGORY:break;case K.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,rC(i.getChildNodes()))}}},{key:"attach",value:(i=tC(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===K.SENSE?8:e.t0===K.CATEGORY||e.t0===K.BRANDGOOD||e.t0===K.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===W.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[V.MATERIAL,V.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,rC(i.getChild()).concat(rC(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(rC(Object(tr.uniq)(r.modelIds).map(function(){var e=tC(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&oC(t.prototype,r),n&&oC(t,n),e}(),aC=r(733);function sC(e){return(sC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lC(e,t,r){return(lC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=pC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function gC(e,t){return(gC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fC(e){var t=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(e){return!1}}();return function(){var r,n=pC(e);if(t){var i=pC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hC(this,r)}}function hC(e,t){return!t||"object"!==sC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pC(e){return(pC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gC(e,t)}(o,e);var t,r,n,i=fC(o);function o(){var e;return uC(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Zp),e.next=3,Object(Mp.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==mp.SUCCESS){e.next=13;break}return e.next=6,Object(Mp.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(Mp.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(Mp.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(aC.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(aC.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=cd(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){lC(pC(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&cC(t.prototype,r),n&&cC(t,n),o}(Ad);function IC(e){return(IC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yC(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=EC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function CC(e){return function(e){if(Array.isArray(e))return BC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||EC(e)||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 EC(e,t){if(e){if("string"==typeof e)return BC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?BC(e,t):void 0}}function BC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function mC(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){vC(o,n,i,A,a,"next",e)}function a(e){vC(o,n,i,A,a,"throw",e)}A(void 0)}))}}function QC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _C(e,t,r){return(_C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=RC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function SC(e,t){return(SC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wC(e){var t=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(e){return!1}}();return function(){var r,n=RC(e);if(t){var i=RC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return DC(this,r)}}function DC(e,t){return!t||"object"!==IC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RC(e){return(RC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var MC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SC(e,t)}(u,e);var t,r,n,i,o,A,a=wC(u);function u(){var e;return QC(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(dC),e.state=e.stateCreator.create({renderMode:ia.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ia.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===Dp.SHADING?5:e.t0===Dp.OUTLINE_WITH_SHADING?7:e.t0===Dp.TRANSLUCENT?9:e.t0===Dp.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=ia.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=ia.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=ia.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(Mp.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:lm().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),lm().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?ia.RenderMode.OUTLINE_WITH_SHADING:ia.RenderMode.SHADING,e.next=3,Object(Mp.put)(this.$actionMergeState.message({renderMode:n}));case 3:lm().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit(Sp.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({translucent:t}));case 2:lm().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;_C(RC(u.prototype),"init",this).call(this),lm().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?wp.translucentModel:wp.opaqueModel})),lm().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=mC(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return Py(e,{origin:K.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=mC(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",Py(r,{origin:K.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=mC(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new AC(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,CC(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return Ty(e,i)})));case 8:o=e.sent,A=[],a=[],u=yC(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),lm().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&bC(t.prototype,r),n&&bC(t,n),u}(qi.AXR);function xC(e){return(xC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function TC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?PC(Object(r),!0).forEach((function(t){FC(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PC(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function FC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return LC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LC(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function NC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GC(e,t,r){return(GC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=HC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function UC(e,t){return(UC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jC(e){var t=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(e){return!1}}();return function(){var r,n=HC(e);if(t){var i=HC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return VC(this,r)}}function VC(e,t){return!t||"object"!==xC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function HC(e){return(HC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var YC={rawSelected:[],selectedData:[],selectedDataV2:[]},KC=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},qC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&UC(e,t)}(o,e);var t,r,n,i=jC(o);function o(){var e;return NC(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(YC).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(tr.unzip)([t,r]).every((function(e){var t=OC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return TC(TC({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case LA:return r.findModelEx(e.entityId,Lu);case OA:return r.findParamModelAssembly(e.entityId);case xp:return i.find((function(t){return t.id===e.entityId}));case Pp:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(tr.unzip)([s,a]).every((function(e){var t=OC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return TC(TC({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){GC(HC(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),GC(HC(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){GC(HC(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(ds.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.on(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.off(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return YC})),this.selectionStateManager.off(ds.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],GC(HC(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(KC),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===LA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&kC(t.prototype,r),n&&kC(t,n),o}(qi.AXR);qC.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",qC.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var JC={entry:Zp,scene:MC,select:qC,fittingDesign:Iy,baseDesignInfo:hp,viewParamModel:kd};function WC(){return lm().axr.axrs}var zC=Object(FA.getConnector)(),XC=zC.connect,ZC=zC.setRootState;function $C(e,t,r){return XC((function(){return e(WC(),lm().getStateManager())}),t,r)}var eE=r(1133),tE=r.n(eE);function rE(e){return(rE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oE(e,t,r){return t&&iE(e.prototype,t),r&&iE(e,r),e}function AE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aE(e,t)}function aE(e,t){return(aE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sE(e){var t=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(e){return!1}}();return function(){var r,n=cE(e);if(t){var i=cE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uE(this,r)}}function uE(e,t){return!t||"object"!==rE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cE(e){return(cE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lE=Symbol("layout"),gE=$C((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){AE(r,e);var t=sE(r);function r(){return nE(this,r),t.apply(this,arguments)}return oE(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Ji.MountPoint)),fE=function(e){AE(r,e);var t=sE(r);function r(){return nE(this,r),t.apply(this,arguments)}return oE(r,[{key:"render",value:function(){return zi.a.createElement(gE,{mountPointId:lE})}}]),r}(zi.a.PureComponent);function hE(e){return(hE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yE(e,t)}function yE(e,t){return(yE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function CE(e){var t=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(e){return!1}}();return function(){var r,n=BE(e);if(t){var i=BE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return EE(this,r)}}function EE(e,t){return!t||"object"!==hE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function BE(e){return(BE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vE=$C((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){IE(r,e);var t=CE(r);function r(){return dE(this,r),t.apply(this,arguments)}return r}(Ji.Scene3D)),mE=$C((function(){return{}}),(function(){return{}}),function(e){IE(o,e);var t,r,n,i=CE(o);function o(){var e;return dE(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(ia.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new ia.Color(_p.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),lm().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return zi.a.createElement(vE,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&pE(t.prototype,r),n&&pE(t,n),o}(zi.a.PureComponent));function QE(e){return(QE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SE(e,t){return(SE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wE(e){var t=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(e){return!1}}();return function(){var r,n=RE(e);if(t){var i=RE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return DE(this,r)}}function DE(e,t){return!t||"object"!==QE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RE(e){return(RE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ME=$C((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SE(e,t)}(o,e);var t,r,n,i=wE(o);function o(){var e;return bE(this,o),(e=i.apply(this,arguments)).rootRef=zi.a.createRef(),e.updateLayout=Object(tr.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new Yr.a(r.width,r.height))}}),200),e}return t=o,(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 e=this.props,t=e.size,r=e.className;return zi.a.createElement("div",{ref:this.rootRef,id:bp.SCENE_ID,className:r},zi.a.createElement(mE,{containerId:bp.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&_E(t.prototype,r),n&&_E(t,n),o}(zi.a.PureComponent));r(2094);function xE(e){return(xE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function FE(e,t){return(FE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OE(e){var t=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(e){return!1}}();return function(){var r,n=NE(e);if(t){var i=NE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return LE(this,r)}}function LE(e,t){return!t||"object"!==xE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function NE(e){return(NE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kE=$C((function(){return{}}),(function(){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&FE(e,t)}(o,e);var t,r,n,i=OE(o);function o(){return PE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return zi.a.createElement(Ji.ViewMounter,{mountPointId:lE},zi.a.createElement(ME,{key:"s3",className:tE.a.scene3D}))}}])&&TE(t.prototype,r),n&&TE(t,n),o}(zi.a.PureComponent));function GE(e,t){return(GE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UE(e){var t=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(e){return!1}}();return function(){var r,n=VE(e);if(t){var i=VE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jE(this,r)}}function jE(e,t){return!t||"object"!==HE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VE(e){return(VE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function HE(e){return(HE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var YE,KE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":HE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},qE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":HE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},JE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GE(e,t)}(r,e);var t=UE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=xp,n.entityId=e.id,n}return r}(Ji.Entity);JE=KE([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===l.GROOVE)return WE(e);if(t===l.HOLE)return zE(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),qE("design:paramtypes",["function"==typeof(YE=void 0!==Vr&&Vr)?YE:Object])],JE);var WE=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new ia.BoxGeometry(n.x,n.y,n.z),u=new ia.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new ia.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},zE=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new ia.CylinderGeometry(s,s,o),c=new ia.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new ia.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function XE(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function ZE(e){return function(e){if(Array.isArray(e))return $E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $E(e,t)}(e)||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 $E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eB(e,t){return(eB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tB(e){var t=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(e){return!1}}();return function(){var r,n=nB(e);if(t){var i=nB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rB(this,r)}}function rB(e,t){return!t||"object"!==iB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nB(e){return(nB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iB(e){return(iB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var oB,AB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":iB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},aB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":iB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},sB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eB(e,t)}(r,e);var t=tB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Pp,n.entityId=e.id,n}return r}(Ji.Entity);function uB(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new ia.LineBasicMaterial,u=new ia.MeshBasicMaterial({transparent:!0,opacity:a}),c=new ia.Mesh(void 0,u),l=new ia.Line(void 0,s),g=new ia.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new ia.Shape,u=A?new ia.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new ia.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new ia.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new ia.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function cB(e){var t=new u.BBox3d;return[].concat(ZE(e.getTopRenderPoints()),ZE(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new $e.a(new at.a({x:t.width,y:t.height,z:t.depth}),new at.a(t.center),new at.a({x:0,y:0,z:0}))}function lB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gB(e,t){return(gB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fB(e){var t=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(e){return!1}}();return function(){var r,n=pB(e);if(t){var i=pB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hB(this,r)}}function hB(e,t){return!t||"object"!==dB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pB(e){return(pB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dB(e){return(dB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}sB=AB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new ia.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new nt.a;c.fromString(r.toArray().join(","));var l=yd(c),g=li.a.decompose(c).position,f=uB({matrix:l,depth:0,points:s,color:i,side:ia.Side.FrontSide,position:g,opacity:o}),h=uB({matrix:l,depth:-n,points:s,color:i,side:ia.Side.BackSide,position:g,opacity:o}),p=[].concat(ZE(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new ia.MeshBasicMaterial({opacity:o,transparent:!0}),a=new ia.Mesh(new ia.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof ia.BufferGeometry){var s=XE(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new ia.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:ia.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof ia.Mesh&&e.material&&Object(tr.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:cB(this.$model)}}))]),aB("design:paramtypes",["function"==typeof(oB=void 0!==vn&&vn)?oB:Object])],sB);var IB,yB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},CB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":dB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},EB=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,BB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gB(e,t)}(o,e);var t,r,n,i=fB(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Op,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new ia.Geometry,r=e.getVertices().map((function(e){var t=e;return new ia.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new ia.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new ia.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new ia.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof st.CoreParamModel?t.getConcatenatedBox3():t instanceof Vr?t.boundingBox:cB(t),EB(e)}}])&&lB(t.prototype,r),n&&lB(t,n),o}(Ji.Entity),vB=BB=yB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),CB("design:paramtypes",["function"==typeof(IB=void 0!==Rr&&Rr)?IB:Object])],BB);function mB(e){var t=new ia.BufferGeometry;if(t.index=new ia.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new ia.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new ia.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new ia.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function QB(e,t){return(QB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bB(e){var t=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(e){return!1}}();return function(){var r,n=SB(e);if(t){var i=SB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _B(this,r)}}function _B(e,t){return!t||"object"!==wB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function SB(e){return(SB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wB(e){return(wB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var DB,RB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":wB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},MB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":wB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},xB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&QB(e,t)}(r,e);var t=bB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Tp,n.entityId=e.id,n}return r}(Ji.Entity),PB=xB=RB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new ia.Group,A=mB(r),a=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:ia.Side.DoubleSide}),s=new ia.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new ia.Mesh(TB,FB);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),MB("design:paramtypes",["function"==typeof(DB=void 0!==Nn&&Nn)?DB:Object])],xB),TB=new ia.SphereBufferGeometry(3),FB=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function OB(e){return function(e){if(Array.isArray(e))return LB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return LB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LB(e,t)}(e)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function NB(e,t){return(NB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kB(e){var t=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(e){return!1}}();return function(){var r,n=UB(e);if(t){var i=UB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GB(this,r)}}function GB(e,t){return!t||"object"!==jB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function UB(e){return(UB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jB(e){return(jB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var VB,HB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},YB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":jB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},KB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NB(e,t)}(r,e);var t=kB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Fp,n.entityId=e.id,n}return r}(Ji.Entity),qB=KB=HB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new ia.Group;r&&r.forEach((function(e){var t=mB(Ti(e,o)),r=new ia.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:ia.Side.DoubleSide}),n=new ia.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=KI(0,a),c=KI(5,a);s=[].concat(OB(Object(tr.zip)(u,[].concat(OB(u.slice(1)),[u[0]]))),OB(Object(tr.zip)(c,[].concat(OB(c.slice(1)),[c[0]]))),OB(Object(tr.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(tr.chunk)(s,3).map((function(e){return new at.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new ya({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),YB("design:paramtypes",["function"==typeof(VB=void 0!==Kn&&Kn)?VB:Object])],KB);function JB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WB(e,t){return(WB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zB(e){var t=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(e){return!1}}();return function(){var r,n=ZB(e);if(t){var i=ZB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return XB(this,r)}}function XB(e,t){return!t||"object"!==$B(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ZB(e){return(ZB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $B(e){return($B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ev,tv=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":$B(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},rv=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":$B(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},nv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&WB(e,t)}(o,e);var t,r,n,i=zB(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Lp,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new ia.MeshBasicMaterial({opacity:n,transparent:!0}),l=new ia.Mesh(new ia.BufferGeometry,c);if(c.setValues({side:ia.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof ia.BufferGeometry){var g=XE(a,s);l.geometry.addAttribute("position",new ia.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new at.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(yd(f)),l}}}])&&JB(t.prototype,r),n&&JB(t,n),o}(Ji.Entity),iv=nv=tv([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),rv("design:paramtypes",["function"==typeof(ev=void 0!==ti&&ti)?ev:Object])],nv);var ov=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new JE(e)})),this.createIntersectEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new PB(e)})),this.createGrooveFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new sB(e)})),this.createPlankFaceHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new qB(e)})),this.careateFittingHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new vB(e)})),this.careatePlankOutlineHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new iv(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function Av(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return av(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return av(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function av(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var uv=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(tr.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=Av(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=Av(Object(tr.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}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(e){var t=this;return Object(tr.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return Xe.includes(e)}}])&&sv(t.prototype,r),n&&sv(t,n),e}(),cv=new Map([[ui.ParamModelCategory.FRAME,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.DECORATIVE_MOLDING_C,ui.ParamModelCategory.DECORATIVE_MOLDING_W,ui.ParamModelCategory.HANDS_FREE,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[ui.ParamModelCategory.SHOWER_ROOM,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.RAIL,ui.ParamModelCategory.DOOR_LEAF]],[ui.ParamModelCategory.SLIDING_DOOR_C,[ui.ParamModelCategory.RAIL,ui.ParamModelCategory.SINGLE_SLIDING_DOOR]],[ui.ParamModelCategory.SPACE_GROUP,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPECIAL_BOARD,ui.ParamModelCategory.SPACE_GROUP]],[ui.ParamModelCategory.SINGLE_SLIDING_DOOR,[ui.ParamModelCategory.SLIDING_DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE]],[ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[ui.ParamModelCategory.SWING_DOOR]],[ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.SWING_DOOR,[ui.ParamModelCategory.DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE,ui.ParamModelCategory.DECORATIVE_MOLDING,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.DRAWER,[ui.ParamModelCategory.DRAWER_PANEL,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.PARAM_FURNITURE,[ui.ParamModelCategory.FURNITURE_LEG]],[ui.ParamModelCategory.KADA,[ui.ParamModelCategory.BYOBU,ui.ParamModelCategory.BYOBU_FRAME,ui.ParamModelCategory.BYOBU_PANEL]]]);function lv(e){return function(e){if(Array.isArray(e))return gv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return gv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gv(e,t)}(e)||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 gv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var hv=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=Ve.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new uv,this.memoGetHintModelLite=Ly()((function(e){return t.isFittingLikeModel(e)?II(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(cv.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.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 o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?Py(e,{origin:K.SENSE},void 0,Py(t,{origin:K.SENSE})):Py(e,{origin:K.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=dm(u))&&!this.isFittingLikeModel(o)&&(u.entityType===LA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof st.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===He.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof st.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===He.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===He.CLICK)return s||a;if(t===He.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&dm(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!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(t===He.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===He.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===He.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===He.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=dm(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===LA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof st.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof st.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===Ve.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===Ve.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{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(e,t){this.designMode=e,e===Ve.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.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(tr.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=Im[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?II(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof vn||e instanceof Vr||e instanceof jt&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==Ve.CUSTOM){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e}if(!r)return;var n=pm(r),i=Object(tr.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,lv(this.prevModeSelectEntity));var o=i[0]&&dm(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(lv(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e;break;case Ve.CUSTOM:return this.customModeSelectModel(e,t)}return pm(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case Ve.TOP_MODEL:case Ve.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case Ve.PRODUCT:t=e;break;case Ve.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(tr.castArray)(this.curSelectEntity)||[];if(!([].concat(lv(r),lv(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return pm(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&fv(t.prototype,r),n&&fv(t,n),e}();function pv(e){return(pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yv(e,t){return(yv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cv(e){var t=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(e){return!1}}();return function(){var r,n=Bv(e);if(t){var i=Bv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ev(this,r)}}function Ev(e,t){return!t||"object"!==pv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bv(e){return(Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yv(e,t)}(o,e);var t,r,n,i=Cv(o);function o(){return dv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&dm(e)}},{key:"selection",get:function(){return lm().getStateManager().kaf.selection}},{key:"hint",get:function(){return lm().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return lm().designModeContext}}])&&Iv(t.prototype,r),n&&Iv(t,n),o}(Ji.ToolModule.Feature);function mv(e){return(mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _v(e,t){return(_v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sv(e){var t=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(e){return!1}}();return function(){var r,n=Dv(e);if(t){var i=Dv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wv(this,r)}}function wv(e,t){return!t||"object"!==mv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dv(e){return(Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_v(e,t)}(o,e);var t,r,n,i=Sv(o);function o(){var e;return Qv(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if($t.eventNames().includes(zt.PLANK_FACE_HOVER)&&r instanceof st.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Ed(r,i)};$t.emit(zt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),Ve.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&bv(t.prototype,r),n&&bv(t,n),o}(vv);function Mv(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return xv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xv(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function xv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Tv(e,t){return(Tv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fv(e){var t=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(e){return!1}}();return function(){var r,n=Lv(e);if(t){var i=Lv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ov(this,r)}}function Ov(e,t){return!t||"object"!==Nv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lv(e){return(Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nv(e){return(Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var kv=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nv(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Gv=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Nv(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Uv=Ji.__INTERNAL__.Highlighters.WireGeometry,jv=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,Vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tv(e,t)}(o,e);var t,r,n,i=Fv(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new Uv,r=Mv(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof st.CoreParamModel||n instanceof st.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=jv(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&Pv(t.prototype,r),n&&Pv(t,n),o}(Ji.Entity),Hv=Vv=kv([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),Gv("design:paramtypes",[Array,Function])],Vv);function Yv(e){return(Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qv(e,t){return(qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jv(e){var t=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(e){return!1}}();return function(){var r,n=zv(e);if(t){var i=zv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wv(this,r)}}function Wv(e,t){return!t||"object"!==Yv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zv(e){return(zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qv(e,t)}(o,e);var t,r,n,i=Jv(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return dm(e)}));return new Hv(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof Vr?e.boundingBox:cB(e)}},{key:"onClick",value:function(e){this.triggerClick(e,He.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,He.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if($t.eventNames().includes(zt.PLANK_FACE_CLICK)&&n instanceof st.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Ed(n,o)};$t.emit(zt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===Ve.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&Kv(t.prototype,r),n&&Kv(t,n),o}(vv);function Zv(e){return(Zv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function em(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$v(Object(r),!0).forEach((function(t){tm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nm(e,t,r){return(nm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=am(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function im(e,t){return(im=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function om(e){var t=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(e){return!1}}();return function(){var r,n=am(e);if(t){var i=am(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Am(this,r)}}function Am(e,t){return!t||"object"!==Zv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function am(e){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sm,um=new qi.SingletonRef,cm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&im(e,t)}(o,e);var t,r,n,i=om(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:kE,axrs:JC,singleton:um},e)).stateManager=t,r.viewer=new Rs,r.designModeContext=new hv,r}return t=o,(r=[{key:"init",value:function(){nm(am(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),ZC(e);var t=this.getDependentPlugin(Ji.AppServicePlugin),r=this.getDependentPlugin(qh);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){nm(am(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Pc),this.client=new $u(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Ji.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!ky.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:LA,point:r}:em(em({},e),{},{point:r})},paramModelSymbol:LA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new ov((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new Xv})),t.kaf.toolbox.addIdleToolFeature((function(){return new Rv})),o.setLayout(fE)}}])&&rm(t.prototype,r),n&&rm(t,n),o}(qi.PluginApplication),lm=um.instance;function gm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fm(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(tr.isObject)(n)&&Object(tr.isFunction)(n.then)&&Object(tr.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function hm(e){return e instanceof jt?LA:e instanceof Xt?OA:e instanceof Vr?xp:e instanceof vn?Pp:void 0}function pm(e){return{entityId:e.id,entityType:hm(e)}}function dm(e){var t=e.entityId,r=e.entityType,n=lm().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case LA:return o.findModelOrAssemblyModelById(t);case OA:return o.findParamModelAssembly(t);case Pp:return i.getGrooveFittings().find((function(e){return e.id===t}));case xp:return i.getFittings().find((function(e){return e.id===t}));default:return}}var Im=(gm(sm={},ze.PARAM_MODEL,LA),gm(sm,ze.PARAM_MODEL_ASSEMBLY,OA),gm(sm,ze.HOLE,xp),gm(sm,ze.GROOVE,xp),gm(sm,ze.HARDWARE_GROOVE,Pp),gm(sm,ze.HARDWARE,LA),sm);function ym(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Cm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ym(o,n,i,A,a,"next",e)}function a(e){ym(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Em=new Map;function Bm(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var vm=fm(function(){var e=Cm(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Rc(),n=Bm(t),!Em.has(n)){e.next=4;break}return e.abrupt("return",Em.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,Em.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Bm);function mm(){var e=Xh(Tf);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var Qm,bm,_m=function(){var e=Cm(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),i=Bm(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:Em.set(i,t),mm(),e.next=14;break;case 9:if(e.prev=9,e.t0=e.catch(2),o=e.t0,!Object(tr.isObject)(o)||"0"===o.c||!o.m){e.next=13;break}throw new Error("错误码:".concat(e.t0.c,";错误信息:").concat(e.t0.m));case 13:throw e.t0;case 14:case"end":return e.stop()}var o}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),Sm=function(){var e=Cm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),n=Bm(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:Em.has(n)&&Em.delete(n),mm(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function wm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Dm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wm(o,n,i,A,a,"next",e)}function a(e){wm(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(Qm||(Qm={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(bm||(bm={}));var Rm=function(){var e=Dm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.castArray)(t),n=Xh(Yf),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Mm=fm(function(){var e=Dm(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),xm=fm(function(){var e=Dm(s.a.mark((function e(t,r,n){var i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",i.getModelJsonDataByModelId({modelIds:t,templateId:r,timeout:n},{timeout:-1}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function Pm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Tm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Om(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Fm(o,n,i,A,a,"next",e)}function a(e){Fm(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Lm=Ly()(function(){var e=Om(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pm(Object(r),!0).forEach((function(t){Tm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},Ny)),Nm=Ly()(function(){var e=Om(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(tr.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var km=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function Gm(e){return(Gm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Um(Object(r),!0).forEach((function(t){Vm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Um(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Vm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ym(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Hm(o,n,i,A,a,"next",e)}function a(e){Hm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Km(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jm(e,t){return(Jm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wm(e){var t=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(e){return!1}}();return function(){var r,n=Xm(e);if(t){var i=Xm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zm(this,r)}}function zm(e,t){return!t||"object"!==Gm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xm(e){return(Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zm=function(){return WC().fittingDesign.fittingDesignSense},$m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jm(e,t)}(c,e);var t,r,n,i,o,A,a,u=Wm(c);function c(){return Km(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Zm().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return Zm().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=Ym(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(WC().viewParamModel.state.state.currModelId!==t||Zm().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,vd(t);case 5:return r=e.sent,e.abrupt("return",vm(jm(jm({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Zm().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=WC().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=WC().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:Mi.POINT,val:t[i]},A={type:Mi.LINE,val:r[i]};if(!ji(o.val))return!1;if(!Vi(A.val))return!1;if(!Yi(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:Mi.POINT,val:t[a]},u={type:Mi.LINE,val:r[a]};if(!Yi(o,s))return!1;if(!Yi(o,u))return!1;if(!Yi(A,s))return!1;if(!Yi(A,u))return!1}}return!0}(Ki(e,r,Object(tr.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=Ym(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",Zm().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=Ym(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=fd(n),Zm().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=Ym(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=fd(i),Zm().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&qm(t.prototype,r),n&&qm(t,n),c}(km);function eQ(e){return(eQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nQ(e,t){return(nQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iQ(e){var t=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(e){return!1}}();return function(){var r,n=AQ(e);if(t){var i=AQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oQ(this,r)}}function oQ(e,t){return!t||"object"!==eQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function AQ(e){return(AQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aQ=(new fi.a).setFromCenterAndSize(new at.a(0,0,0),new at.a(200,200,100)),sQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nQ(e,t)}(o,e);var t,r,n,i=iQ(o);function o(){return tQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return aQ}}])&&rQ(t.prototype,r),n&&rQ(t,n),o}(Ji.Scene3DStateManager);function uQ(e){return(uQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lQ(e,t){return(lQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gQ(e){var t=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(e){return!1}}();return function(){var r,n=hQ(e);if(t){var i=hQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fQ(this,r)}}function fQ(e,t){return!t||"object"!==uQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hQ(e){return(hQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lQ(e,t)}(r,e);var t=gQ(r);function r(){return cQ(this,r),t.apply(this,arguments)}return r}(Ji.types.combine({scene3D:sQ})),dQ=window.document.createElement("script");dQ.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(dQ);function IQ(e){return(IQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function EQ(e,t){return(EQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function BQ(e){var t=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(e){return!1}}();return function(){var r,n=mQ(e);if(t){var i=mQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vQ(this,r)}}function vQ(e,t){return!t||"object"!==IQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mQ(e){return(mQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&EQ(e,t)}(o,e);var t,r,n,i=BQ(o);function o(){var e;return yQ(this,o),(e=i.apply(this,arguments)).rootState=new pQ,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new cm(this,this.rootState);e.init(),e.run()}}])&&CQ(t.prototype,r),n&&CQ(t,n),o}(Nh.BasePlugin);function bQ(e){return(bQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wQ(e,t){return(wQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DQ(e){var t=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(e){return!1}}();return function(){var r,n=MQ(e);if(t){var i=MQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return RQ(this,r)}}function RQ(e,t){return!t||"object"!==bQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MQ(e){return(MQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}QQ.dependencies=[Ji.AppServicePlugin,qh];var xQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wQ(e,t)}(o,e);var t,r,n,i=DQ(o);function o(){return _Q(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){WC().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){WC().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&SQ(t.prototype,r),n&&SQ(t,n),o}(km);function PQ(e){return(PQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function TQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function FQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){TQ(o,n,i,A,a,"next",e)}function a(e){TQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function OQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NQ(e,t){return(NQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kQ(e){var t=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(e){return!1}}();return function(){var r,n=UQ(e);if(t){var i=UQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GQ(this,r)}}function GQ(e,t){return!t||"object"!==PQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function UQ(e){return(UQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NQ(e,t)}(u,e);var t,r,n,i,o,A,a=kQ(u);function u(){return OQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=FQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=FQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=FQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&LQ(t.prototype,r),n&&LQ(t,n),u}(km);function VQ(e){return(VQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function KQ(e,t){return(KQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qQ(e){var t=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(e){return!1}}();return function(){var r,n=WQ(e);if(t){var i=WQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return JQ(this,r)}}function JQ(e,t){return!t||"object"!==VQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function WQ(e){return(WQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KQ(e,t)}(o,e);var t,r,n,i=qQ(o);function o(){return HQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){WC().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){WC().fittingDesign.fittingHint.clearFittingHint(e)}}])&&YQ(t.prototype,r),n&&YQ(t,n),o}(km);function XQ(e){return(XQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function $Q(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ZQ(o,n,i,A,a,"next",e)}function a(e){ZQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function eb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rb(e,t){return(rb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nb(e){var t=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(e){return!1}}();return function(){var r,n=ob(e);if(t){var i=ob(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ib(this,r)}}function ib(e,t){return!t||"object"!==XQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ob(e){return(ob=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ab,ab,sb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rb(e,t)}(a,e);var t,r,n,i,o,A=nb(a);function a(){return eb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=$Q(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=$Q(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&tb(t.prototype,r),n&&tb(t,n),a}(km);function ub(e){return(ub="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gb(e,t){return(gb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fb(e){var t=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(e){return!1}}();return function(){var r,n=pb(e);if(t){var i=pb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hb(this,r)}}function hb(e,t){return!t||"object"!==ub(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pb(e){return(pb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(Ab||(Ab={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(ab||(ab={}));var db=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gb(e,t)}(o,e);var t,r,n,i=fb(o);function o(){return cb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case Ab.View3D:t=Ji.PerspectiveCameraMode.View3D;break;case Ab.Roamer:t=Ji.PerspectiveCameraMode.Roamer}lm().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=lm().getStateManager().scene3D;switch(e){case ab.UP:case ab.FRONT:t=Ji.ArrowType.UP;break;case ab.DOWN:case ab.BACK:t=Ji.ArrowType.DOWN;break;case ab.LEFT:t=Ji.ArrowType.LEFT;break;case ab.RIGHT:t=Ji.ArrowType.RIGHT}if(t){if(e===ab.UP||e===ab.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&lb(t.prototype,r),n&&lb(t,n),o}(km);function Ib(e){return(Ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Eb(e,t){return(Eb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bb(e){var t=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(e){return!1}}();return function(){var r,n=mb(e);if(t){var i=mb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vb(this,r)}}function vb(e,t){return!t||"object"!==Ib(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mb(e){return(mb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Eb(e,t)}(o,e);var t,r,n,i=Bb(o);function o(){return yb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){WC().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){WC().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){WC().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&Cb(t.prototype,r),n&&Cb(t,n),o}(km);function bb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function _b(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){bb(o,n,i,A,a,"next",e)}function a(e){bb(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Sb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Db(e,t){return(Db=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rb(e){var t=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(e){return!1}}();return function(){var r,n=xb(e);if(t){var i=xb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Mb(this,r)}}function Mb(e,t){return!t||"object"!==Pb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xb(e){return(xb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pb(e){return(Pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Tb,Fb,Ob=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Pb(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Lb=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Pb(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Nb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Db(e,t)}(a,e);var t,r,n,i,o,A=Rb(a);function a(){return Sb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=_b(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=_b(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,WC().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(tr.map)(n.intersectedGroups,(function(e){return pd(pd({},e),{},{intersecteds:Object(tr.map)(e.intersecteds,(function(e){return Object(tr.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=Je),WC().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return WC().viewParamModel.getParamModelPhotoData(e)}}])&&wb(t.prototype,r),n&&wb(t,n),a}(km);function kb(e){return(kb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ub(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jb(e,t){return(jb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vb(e){var t=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(e){return!1}}();return function(){var r,n=Yb(e);if(t){var i=Yb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hb(this,r)}}function Hb(e,t){return!t||"object"!==kb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yb(e){return(Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ob([je.observeAsyncApiDeco({serviceName:"ModelService"}),Lb("design:type",Function),Lb("design:paramtypes",["function"!=typeof!1&&Object]),Lb("design:returntype","function"==typeof(Tb="undefined"!=typeof Promise&&Promise)?Tb:Object)],Nb.prototype,"getParamData",null),Ob([je.observeAsyncApiDeco({serviceName:"ModelService"}),Lb("design:type",Function),Lb("design:paramtypes",["function"!=typeof!1&&Object]),Lb("design:returntype","function"==typeof(Fb="undefined"!=typeof Promise&&Promise)?Fb:Object)],Nb.prototype,"getParamIntersected",null);var Kb,qb,Jb=function(){return WC().select},Wb=function(){return WC().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(Kb||(Kb={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(qb||(qb={}));var zb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jb(e,t)}(o,e);var t,r,n,i=Vb(o);function o(){var e;return Gb(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(tr.castArray)(e).map((function(e){var t={__sceneId:bp.SCENE_ID,entityId:e.id,entityType:LA};return e.type===qb.CASBIN&&(t.entityId=Wb().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=Jb().state.state.selectedData,t=WC().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof jt&&r.isAppendHardware)return{data:[r.hardwareData],type:Kb.CASBIN};var n=Object(tr.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:Kb.MODEL}}return{data:[],type:Kb.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);Jb().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);Jb().unSelect(t)}else Jb().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,Jb().on(qC.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){Jb().off(qC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&Ub(t.prototype,r),n&&Ub(t,n),o}(km);function Xb(e){return(Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e_(e,t){return(e_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function t_(e){var t=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(e){return!1}}();return function(){var r,n=n_(e);if(t){var i=n_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return r_(this,r)}}function r_(e,t){return!t||"object"!==Xb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function n_(e){return(n_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var i_=function(){return WC().select},o_=function(){return lm().designModeContext},A_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&e_(e,t)}(o,e);var t,r,n,i=t_(o);function o(){var e;return Zb(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){$t.on(zt.PLANK_FACE_CLICK,e)},once:function(e){$t.once(zt.PLANK_FACE_CLICK,e)},off:function(e){$t.off(zt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){$t.on(zt.PLANK_FACE_HOVER,e)},once:function(e){$t.once(zt.PLANK_FACE_HOVER,e)},off:function(e){$t.off(zt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return i_().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);i_().select(t),o_().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);i_().unSelect(t);var r=o_().getCurSelectEntity();r&&(Array.isArray(r)?o_().setCurSelectEntity(Object(tr.difference)(r,t)):t.includes(r)&&o_().setCurSelectEntity(void 0))}else i_().select(),o_().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,i_().on(qC.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:Im[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof jt?t=e.isAppendHardware?ze.HARDWARE:ze.PARAM_MODEL:e instanceof Xt?t=ze.PARAM_MODEL_ASSEMBLY:e instanceof vn?t=ze.HARDWARE_GROOVE:e instanceof Vr&&(t=e.type===l.HOLE?ze.HOLE:ze.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){i_().off(qC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&$b(t.prototype,r),n&&$b(t,n),o}(km);function a_(e){return(a_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function u_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){s_(o,n,i,A,a,"next",e)}function a(e){s_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function c_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g_(e,t){return(g_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f_(e){var t=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(e){return!1}}();return function(){var r,n=p_(e);if(t){var i=p_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h_(this,r)}}function h_(e,t){return!t||"object"!==a_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p_(e){return(p_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g_(e,t)}(u,e);var t,r,n,i,o,A,a=f_(u);function u(){return c_(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=u_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=u_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=lm().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){WC().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){WC().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){WC().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=u_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&l_(t.prototype,r),n&&l_(t,n),u}(km),I_=r(244);function y_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y_(Object(r),!0).forEach((function(t){E_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B_(e){return function(e){if(Array.isArray(e))return v_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v_(e,t)}(e)||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 v_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Q_=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=Br()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,B_(a.map((function(e){return e.loops}))))};if(A){Object(I_.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return __(We.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,B_(t.loops.slice(1))),e}),[]).map((function(e){return __(We.INNER,e,!0)})),p=new e(this.modelID,[].concat(B_(f),B_(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=b_(this.paths.find((function(e){return e.type===We.OUTER})));Object(I_.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(b_)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&m_(t.prototype,r),n&&m_(t,n),e}();function b_(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==E.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function __(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new $r({type:E.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:B.SEGMENT}:e instanceof u.Arc2d?S_(e):w_(e),new Wr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=R_(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new sn({type:e,points:n,lines:i,forceCCW:!1})}function S_(e){var t={};t.type=B.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function w_(e){var t={};return t.type=B.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function D_(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?Wc(r,n):function(e,t){var r=Vc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=Hc(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=C_(C_({},e.changeMap),{},{update:[]}))}function R_(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function M_(e){return(M_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function T_(e,t){return(T_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F_(e){var t=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(e){return!1}}();return function(){var r,n=L_(e);if(t){var i=L_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return O_(this,r)}}function O_(e,t){return!t||"object"!==M_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L_(e){return(L_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var N_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T_(e,t)}(o,e);var t,r,n,i=F_(o);function o(){return x_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(un(We.OUTER,r.path)),n.push.apply(n,B_(r.holes.map((function(e){return un(We.INNER,e)})))),new Q_(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){D_(e)}}])&&P_(t.prototype,r),n&&P_(t,n),o}(km);function k_(e){return(k_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function U_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function V_(e,t){return(V_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H_(e){var t=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(e){return!1}}();return function(){var r,n=K_(e);if(t){var i=K_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Y_(this,r)}}function Y_(e,t){return!t||"object"!==k_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function K_(e){return(K_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var q_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V_(e,t)}(a,e);var t,r,n,i,o,A=H_(a);function a(){return U_(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){G_(o,r,n,A,a,"next",e)}function a(e){G_(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&j_(t.prototype,r),n&&j_(t,n),a}(km);function J_(e){return(J_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function W_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function X_(e,t){return(X_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z_(e){var t=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(e){return!1}}();return function(){var r,n=eS(e);if(t){var i=eS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $_(this,r)}}function $_(e,t){return!t||"object"!==J_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function eS(e){return(eS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X_(e,t)}(o,e);var t,r,n,i=Z_(o);function o(){return W_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;lm().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){lm().designModeContext.registerMultiSelectShortcut(e)}}])&&z_(t.prototype,r),n&&z_(t,n),o}(km),rS=r(426),nS=r.n(rS),iS=new qi.I18NManager,oS="custom_order_split",AS={"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 aS(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function sS(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){aS(o,n,i,A,a,"next",e)}function a(e){aS(o,n,i,A,a,"throw",e)}A(void 0)}))}}var uS=Object(tr.once)((function(){return!!Object(zc.parseServQueryParams)()}));function cS(){return lS.apply(this,arguments)}function lS(){return(lS=sS(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=zc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:zc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:zc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gS=r(533),fS=r.n(gS),hS=r(1134),pS=r.n(hS);function dS(e){return(dS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function CS(e,t){return(CS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ES(e){var t=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(e){return!1}}();return function(){var r,n=vS(e);if(t){var i=vS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return BS(this,r)}}function BS(e,t){return!t||"object"!==dS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vS(e){return(vS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&CS(e,t)}(o,e);var t,r,n,i=ES(o);function o(){return IS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return zi.a.createElement("div",{className:fS()(pS.a.empty,i)},!r&&zi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&zi.a.createElement("p",null,t))}}])&&yS(t.prototype,r),n&&yS(t,n),o}(zi.a.PureComponent);function QS(e){return(QS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SS(e,t){return(SS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wS(e){var t=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(e){return!1}}();return function(){var r,n=RS(e);if(t){var i=RS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return DS(this,r)}}function DS(e,t){return!t||"object"!==QS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RS(e){return(RS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var MS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SS(e,t)}(o,e);var t,r,n,i=wS(o);function o(){return bS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return zi.a.createElement(Ji.Scene3D,e)}}])&&_S(t.prototype,r),n&&_S(t,n),o}(Wi.PureComponent),xS=r(1135),PS=r.n(xS);function TS(e){return(TS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FS(){return(FS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function OS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NS(e,t){return(NS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kS(e){var t=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(e){return!1}}();return function(){var r,n=US(e);if(t){var i=US(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GS(this,r)}}function GS(e,t){return!t||"object"!==TS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function US(e){return(US=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Wi.PureComponent;var jS=r(91);function VS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return HS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=zi.a;var YS=document.getElementById("root");function KS(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qS(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function JS(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){qS(o,n,i,A,a,"next",e)}function a(e){qS(o,n,i,A,a,"throw",e)}A(void 0)}))}}function WS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var zS=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(Ue.ZH_CN,{zh_CN:AS}),function(e){Kh=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return $t.on(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},once:function(e){return $t.once(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},emit:function(e){$t.emit(zt.API_CALLED,e)}};je.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(Lf);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError({messagePrefix:"miniAppApiCalledError",name:"Error",message:l,stack:""})}}}))}},{key:"isInCustomMiniAppMode",value:function(){return uS()}},{key:"createDebugUtils",value:function(){var e=this.serviceMap,t={enableDebug:function(){window.__customsdk__.services=e}};window.__customsdk__=t}},{key:"start",value:(o=JS(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!this.isInCustomMiniAppMode()){e.next=8;break}if(zc.sappSDK.isStarted){e.next=5;break}return e.next=5,zc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=JS(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 5:this.sappSDK=zc.sappSDK,e.next=13;break;case 8:return e.next=10,gd(30);case 10:return e.next=12,cS(t);case 12:this.sappSDK=e.sent;case 13:return this.startOnApiCalledEvent(),e.next=16,Promise.resolve([Ji.App,QQ]).then((function(e){var t=VS(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(YS)})).catch((function(e){Object(jS.unmountComponentAtNode)(YS),Object(jS.render)(zi.a.createElement(mS,null),YS),console.error("micros/pad",e)}));case 16:return(r=this.getCustomMiniAppService(Pf))?(Rc().setMiniAppHttpProxyClientService(r),tp(Rc())):tp(Dc()),(Jh=new ep.AttachedService).config.setRequestClient(zh),Wh=new ep.ParamModelDataService({paramModelConstructor:jt,requestClient:zh}),new ep.ParamModelAssemblyDataService({paramModelAssemblyConstructor:Xt,requestClient:zh}),n=this.getService(d_),e.prev=20,e.next=23,n.viewSelected();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 28:case"end":return e.stop()}}),e,this,[[20,25]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(tr.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),nS.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:rS.ENUM.TranslatorType.I18next,packages:[oS],resource:KS({},oS,t)}),iS.init({namespace:oS,resources:oS})}},{key:"stop",value:(i=JS(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(Tf))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(tr.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(km.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof zc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&WS(t.prototype,r),n&&WS(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1126),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},O=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,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 o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(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()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),k=[{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}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return k.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(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?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),H=r(730),Y=r.n(H);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=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."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);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(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new N(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)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(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
|
|
149
|
+
***************************************************************************** */var kf,Gf=function(e,t){return(Gf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Uf(e,t){function r(){this.constructor=e}Gf(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function jf(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function Vf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Hf(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Vf(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(kf||(kf={}));var Yf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(zc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(zc.API_UNSUPPORT)()},jf([zc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),jf([zc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=jf([zc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);var Kf,qf,Jf,Wf=function(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PopBufferMtl=void 0,t.toPopBufferMtl=function(e){var t=e.parameters,r=new A;r.setObjName(e.objName),e.brandGoodId&&r.setBrandGoodId(e.brandGoodId);if(t)for(var i=0,o=t.length;i<o;i++){var a=t[i];switch(a.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(a.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(a.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(a.value));break;case"transparentType":r.setTransparentType(Number(a.value))}}return r};var r,n=(r=at.a)&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(e){return this.objName=e,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(e){return this.brandGoodId=e,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(e){return this.diffuseTexture=e,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(e){return this.diffuseColor=e,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(e){return this.refractColor=e,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(e){return this.transparentType=e,this}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.PopBufferMtl=A})),zf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.toJSON=function(){return{paramPackages:Hf(this.paramPackages.values()),hardwares:Hf(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=Vf(e,2);t[0];var r=t[1],n=new Sf.a;return Object(tr.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Hf(this.displayInfos.values()),wireFrames:Object(tr.fromPairs)(Hf(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(tr.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new Sf.a;if(Object(tr.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new mf.a,n=new Qn.a;return Object(tr.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Wf.toPopBufferMtl(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Bf.FurnitureModel;Object(tr.extend)(r,t.furnitureModel),r.size=new at.a(r.size),r.position=new at.a(r.position),r.rotate=new at.a(r.rotate),r.scale=new at.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(tr.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(bf.a);!function(e){e[e.willExit=0]="willExit"}(Kf||(Kf={})),function(e){e[e.exit=0]="exit"}(qf||(qf={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Jf||(Jf={}));var Xf=r(245),Zf=r.n(Xf),$f=r(287),eh=r.n($f),th=r(1129),rh=r.n(th),nh=r(361),ih=r.n(nh),oh=r(723),Ah=r.n(oh),ah=r(1130),sh=r.n(ah),uh=r(727),ch=r.n(uh),lh=r(728),gh=r.n(lh),fh=r(207),hh=r.n(fh),ph=r(112),dh=r.n(ph),Ih=r(187),yh=r.n(Ih),Ch=r(530),Eh=r.n(Ch),Bh=r(1131),vh=r.n(Bh),mh=r(721),Qh=r.n(mh),bh=r(720),_h=r.n(bh),Sh=r(360),wh=r.n(Sh),Dh=r(242),Rh=r.n(Dh),Mh=r(732),xh=r.n(Mh),Ph=r(719),Th=r.n(Ph),Fh=r(1132),Oh=r.n(Fh),Lh=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[bi.a,fi.a,ih.a,$e.a,Ah.a,tt.a,sh.a,hh.a,dh.a,yh.a,Eh.a,nt.a,pi.a,Ii.a,Ci.a,vh.a,Qh.a,_h.a,ot.a,wh.a,Rh.a,xh.a,Mh.LineIndex,Bi.a,Th.a,Oh.a,Yr.a,at.a,ArrayBuffer,ia.Vector3,eh.a,rh.a,Js.ParamStore,ch.a,gh.a,mf.a,Qn.a,Bf.FurnitureModel,Map,ia.SkyBackground]:[];Object(Xf.inject)({isKnownImmutableInstance:function(e){return Lh.some((function(t){return e instanceof t}))}});Zf.a;var Nh=r(211);function kh(e){return(kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jh(e,t){return(jh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vh(e){var t=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(e){return!1}}();return function(){var r,n=Yh(e);if(t){var i=Yh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hh(this,r)}}function Hh(e,t){return!t||"object"!==kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yh(e){return(Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kh,qh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jh(e,t)}(o,e);var t,r,n,i=Vh(o);function o(){var e;return Gh(this,o),(e=i.apply(this,arguments)).rootState=new Wu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new jc(this,this.rootState);e.init(),e.run()}}])&&Uh(t.prototype,r),n&&Uh(t,n),o}(Nh.BasePlugin);qh.dependencies=[Ji.AppServicePlugin];var Jh,Wh,zh,Xh=function(e){if(!Kh)throw new Error("please new Application before call method");return Kh.getCustomMiniAppService(e)},Zh=r(249),$h=r(108),ep=r(429);function tp(e){zh=e}function rp(e){return(rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function np(e){return function(e){if(Array.isArray(e))return ip(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ip(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ip(e,t)}(e)||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 ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function op(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ap(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ap(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ap(o,n,i,A,a,"next",e)}function a(e){Ap(o,n,i,A,a,"throw",e)}A(void 0)}))}}function sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function up(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cp(e,t){return(cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lp(e){var t=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(e){return!1}}();return function(){var r,n=fp(e);if(t){var i=fp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gp(this,r)}}function gp(e,t){return!t||"object"!==rp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fp(e){return(fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cp(e,t)}(o,e);var t,r,n,i=lp(o);function o(){var e;return sp(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=ap(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=Xh(Zh.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=ap(s.a.mark((function t(r){var n,i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(tr.castArray)(r),!Object(tr.difference)(i,e.lastCurrentCustomDataArgs).length&&n){t.next=11;break}return t.next=8,Fm(r);case 8:n=t.sent,t.next=12;break;case 11:return t.abrupt("return",n);case 12:return e.lastCurrentCustomDataArgs=i,e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=ap(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(tr.uniq)(Object(tr.flatten)(Object(tr.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(tr.map)(n,function(){var e=ap(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jm(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,Vm(n);case 11:for(p in u=t.sent,c=Object(tr.mapValues)(Object(tr.keyBy)(Object(tr.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new nt.a).makeTranslation(new at.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(tr.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=op(t,["paramModelData"]),A=e.rotate,a=(new jt).parse(i);Object($h.attach)(a,Object($h.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new nt.a).compose(new at.a(e.position),new tt.a(A.x,A.y,A.z),new at.a(e.scale)).multiply((new nt.a).setPosition(new at.a(r)))),g=li.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new at.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,np(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,Jh.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&up(t.prototype,r),n&&up(t,n),o}(qi.AXR);function pp(e){return(pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ip(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yp(e,t){return(yp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cp(e){var t=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(e){return!1}}();return function(){var r,n=Bp(e);if(t){var i=Bp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ep(this,r)}}function Ep(e,t){return!t||"object"!==pp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bp(e){return(Bp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vp,mp,Qp,bp,_p,Sp,wp,Dp,Rp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yp(e,t)}(o,e);var t,r,n,i=Cp(o);function o(){var e;return dp(this,o),(e=i.apply(this,arguments)).paramModelConstructor=jt,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new Xt).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Ip(t.prototype,r),n&&Ip(t,n),o}(zf),Mp=r(75),xp=Symbol("fitting-data"),Pp=Symbol("groove-fitting-entity"),Tp=Symbol("intersect-data"),Fp=Symbol("param-model-hint-entity"),Op=Symbol("fitting-hint-entity"),Lp=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(vp||(vp={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(mp||(mp={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(Qp||(Qp={})),function(e){e.SCENE_ID="cp"}(bp||(bp={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(_p||(_p={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(Sp||(Sp={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(wp||(wp={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(Dp||(Dp={}));var Np,kp=[];function Gp(e){return(Gp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Up(e){return function(e){if(Array.isArray(e))return jp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jp(e,t)}(e)||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 jp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Hp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Vp(o,n,i,A,a,"next",e)}function a(e){Vp(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Yp(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jp(e,t){return(Jp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wp(e){var t=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(e){return!1}}();return function(){var r,n=Xp(e);if(t){var i=Xp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zp(this,r)}}function zp(e,t){return!t||"object"!==Gp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xp(e){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(Np||(Np={}));var Zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jp(e,t)}(o,e);var t,r,n,i=Wp(o);function o(){var e;return Kp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:mp.READY,design:mp.READY,series:mp.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=Yp(n,["paramModelData"]),A=(new jt).parse(i),Object($h.attach)(A,Object($h.toAttachedMap)(o)),e.next=9,Jh.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(kp),e.next=13,Object(Mp.put)(this.$actionLoad.done.message({params:t,result:mp.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(Up(a),Up(A)),e.next=12,Jh.updateAttacheds(u);case 12:return e.next=14,Object(Mp.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:mp.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=Yp(e,["paramModelData"]),n=(new jt).parse(t,new Rp);return Object($h.attach)(n,Object($h.toAttachedMap)(r)),n})),e.next=3,Jh.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,Up(i)),e.next=6,Object(Mp.put)(this.$actionAddParamModelToSense.done.message({params:t,result:mp.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new Rp,o=t.map((function(e){return(new Xt).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Jh.updateAttacheds(Up(o));case 8:return n.addParamModelAssemblies.apply(n,Up(o)),n.addParamModels.apply(n,Up(A)),e.next=12,Object(Mp.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:mp.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&qp(t.prototype,r),n&&qp(t,n),o}(qi.AXR);function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ed(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function td(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rd(e,t)}function rd(e,t){return(rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nd(e){var t=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(e){return!1}}();return function(){var r,n=od(e);if(t){var i=od(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return id(this,r)}}function id(e,t){return!t||"object"!==$p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function od(e){return(od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}qi.AXR;var Ad=function(e){td(r,e);var t=nd(r);function r(){return ed(this,r),t.apply(this,arguments)}return r}(qi.AXRPartial),ad=(qi.AXRManager,Math.sqrt(2)),sd=Math.PI/6,ud=Math.PI/3+Math.PI;function cd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ud,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sd,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*ad,a=new at.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var ld,gd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function fd(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(r),!0).forEach((function(t){dd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function dd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e){return e["@type"]===g.THROUGH_SHELL}function yd(e){var t=e.elements;return(new oa.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function Cd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ed(e,t){var r,n=e.getSize(),i=(new nt.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(yd(i)),A=o.x,a=o.y,s=o.z,u=(Cd(r={},ld.TOP,Math.abs(s-n.z/2)),Cd(r,ld.LEFT,Math.abs(A+n.x/2)),Cd(r,ld.BACK,Math.abs(a+n.y/2)),Cd(r,ld.RIGHT,Math.abs(A-n.x/2)),Cd(r,ld.FRONT,Math.abs(a-n.y/2)),Cd(r,ld.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:ld.UNKNOWN}function Bd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(r),!0).forEach((function(t){md(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function md(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(ld||(ld={}));var Qd={getJsonConfig:{defaultTemplateId:void 0,ignoreResetPosition:!1}};function bd(e){return Qd[e]}function _d(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}var Sd=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=eE(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){_d(o,n,i,A,a,"next",e)}function a(e){_d(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),wd=r(243);function Dd(e){return function(e){if(Array.isArray(e))return Rd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rd(e,t)}(e)||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 Rd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Md(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Rp;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=Dd(r.getParamModels())).concat.apply(t,Dd(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(tr.uniqBy)(wd.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function xd(e){return(xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Td(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Pd(o,n,i,A,a,"next",e)}function a(e){Pd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Fd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Od(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ld(e,t){return(Ld=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nd(e){var t=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(e){return!1}}();return function(){var r,n=Gd(e);if(t){var i=Gd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kd(this,r)}}function kd(e,t){return!t||"object"!==xd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gd(e){return(Gd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ud(e){return function(e){if(Array.isArray(e))return jd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jd(e,t)}(e)||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 jd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vd(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?Vd(e.subModels):[]})).flat();return t.push.apply(t,Ud(e)),t}var Hd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ld(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=Nd(g);function g(){var e;return Fd(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:vp.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y,C,E,B,v;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=void 0===u?bd("getJsonConfig").defaultTemplateId:u,l=t.timeout,g=t.ignoreResetPosition,f=void 0===g?bd("getJsonConfig").ignoreResetPosition:g,h=this.state.state,p=h.currModelId,d=h.result,I=h.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(y=r===p,C=I===c,E=this.$actionLoadParamModelJsonData,e.prev=7,B=y&&!a&&C?d:void 0,!o||B){e.next=13;break}return e.next=12,Om(r,c);case 12:B=e.sent;case 13:if(B){e.next=18;break}return bm.delete(r),e.next=17,Lm(r,c,f,l);case 17:B=e.sent;case 18:if(B){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return v=y&&!c?Vd(B.paramModel):this.state.state.allSubModels,y&&eE().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,E.done.dispatch({params:t,result:{ossContent:B,allSubModels:v}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,E.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=vp.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=vp.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=Td(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=eE().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(vy).fittingDesignSense).initFittingDesign(),function(){var e=Td(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=fd(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(hp).getCurrentCustomData(r);case 12:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=Md(o,A),(u=new pt).addParamModels.apply(u,Ud(a.paramModels)),u.addParamModelAssemblies.apply(u,Ud(a.paramModelAssemblies)),e.next=21,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=Td(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,Fm(this.state.state.currModelId);case 9:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=Md(o,A),t.addParamModels.apply(t,Ud(a.paramModels)),t.addParamModelAssemblies.apply(t,Ud(a.paramModelAssemblies)),e.next=17,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=Td(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Xh(Zh.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(tr.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=Td(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,g=n.ignoreResetPosition,c){e.next=14;break}return h=fd(),this.getAxr(vy).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:h,params:{modelid:a}}),e.prev=5,e.next=8,h.promise;case 8:f=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return p=fd(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:p,modelId:a,hasFitting:!!f,force:c,templateId:l,timeout:"number"==typeof o?o/1e3:void 0,ignoreResetPosition:g}),e.abrupt("return",p.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===ui.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,Ud(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=Td(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Xh(Yf),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=Td(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(tr.castArray)(t),n=Xh(Zh.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&Od(t.prototype,r),n&&Od(t,n),g}(qi.AXR);function Yd(e){return(Yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kd(Object(r),!0).forEach((function(t){Jd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function zd(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Wd(o,n,i,A,a,"next",e)}function a(e){Wd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $d(e,t,r){return($d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function eI(e,t){return(eI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tI(e){var t=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(e){return!1}}();return function(){var r,n=nI(e);if(t){var i=nI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rI(this,r)}}function rI(e,t){return!t||"object"!==Yd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nI(e){return(nI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iI(e){return function(e){if(Array.isArray(e))return oI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return oI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oI(e,t)}(e)||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 oI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var AI={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}};function aI(e){return Object(tr.values)(e).some((function(e){return Object(tr.isEmpty)(e)}))}function sI(e,t){var r=e.getParamModelAssemblies().find((function(e){return e.id===t}));if(r||(r=e.getParamModels().find((function(e){return e.id===t}))),!r)return[];for(var n=[],i=[r];i.length;){var o=i.shift();n.push(o.id),i.push.apply(i,iI(o.getChildNodes()))}return n}function uI(e){return Object(tr.uniq)(["holes","grooves","hardwares","hardwareGrooves"].map((function(t){return Object(tr.keys)(e[t]).sort()})).flat())}function cI(e,t){var r=new Set(t);return e.filter((function(e){return!r.has(e)}))}var lI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eI(e,t)}(o,e);var t,r,n,i=tI(o);function o(){var e;return Xd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:vp.FAIL,design:Object(tr.cloneDeep)(AI)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(Zp);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(Mp.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(hp).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(tr.cloneDeep)(AI))},e.getConnectedFittingDesign=function(){var t=zd(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(tr.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(tr.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(tr.filter)(i.holes[u],f),o.grooves[u]=Object(tr.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(tr.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(tr.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=zd(s.a.mark((function t(r){var n,i,o,A,a,u,c,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gd(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=eE().fittingDesign.senseSetting.getSenseSettings(),a=Object(tr.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Ai},i.setFittings([].concat(iI(Jc(c,qd(qd({},d),{},{type:l.HOLE,defaultConfig:a}))),iI(Jc(f,qd(qd({},d),{},{type:l.GROOVE,defaultConfig:a}))))),i.setGrooveFittings(Jc(p,qd(qd({},d),{},{type:l.HARDWARE_GROOVE,transformModel:Ki,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=zd(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=AI,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:qd(qd({},u?A.holes:c.holes),r.holes||{}),grooves:qd(qd({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:qd(qd({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:qd(qd({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(tr.pull)(Object(tr.keys)(h),"id").forEach((function(e){var t=h[e];Object(tr.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=fd(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,Sd(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,Sm(qd(qd({},i),o));case 8:A=e.sent,qi.Util.safeExec((function(){var e=r.core.design.getCustom(),n=a.getAxr(Hd).state.state.currModelId;if(n===t.params.modelid&&A){var i=sI(e,n),o=uI(A),s=cI(o,i);Xh(Lf).log({logKey:"miniAppFittingDesignRead",modelId:n,fittingConnectedIds:o.join(","),notExistsIds:s.join(","),notExistsIdsCount:!!s.length})}})),n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),n.failed.dispatch({params:t});case 16:case"end":return e.stop()}}),e,this,[[5,13]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(tr.cloneDeep)(AI),i=this.getAxr(Hd).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(Hd).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Hd).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,Sd(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,xm(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(Hd).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.state.state.design,i=t.design,o=void 0===i?n:i,e.next=4,Sd(o.id);case 4:return A=e.sent,a=this.$actionSaveFittingDesign,qi.Util.safeExec((function(){var e=Xh(Lf),t=u.getAxr(Hd).state.state.currModelId,i=r.core.design.getCustom();if(o&&(!o.id||t===A.modelid)){var a=sI(i,t),s=uI(o),c=cI(s,a);aI(Object(tr.omit)(n,["id"]))?e.log({logKey:"FittingDesignCreate",modelId:A.modelid,allModelIds:a.join(","),fittingConnectedIds:s.join(","),notExistsIds:c.join(","),notExistsIdsCount:!!c.length}):e.log({logKey:"FittingDesignUpdate",modelId:A.modelid,fittingConnectedIds:s.join(","),notExistsIds:c.join(","),notExistsIdsCount:!!c.length})}})),e.prev=7,e.next=10,Mm(qd(qd({},o),{},{id:A.modelid}),A);case 10:a.done.dispatch({params:t,result:void 0}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),a.failed.dispatch({params:t,result:e.t0});case 16:case"end":return e.stop()}}),e,this,[[7,13]])}))),e.failed.every(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&(i=t.result||new Error("保存失败"),n.reject(i));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(Hd).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){$d(nI(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Zd(t.prototype,r),n&&Zd(t,n),o}(Ad);function gI(e){return(gI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pI(e,t){return(pI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dI(e){var t=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(e){return!1}}();return function(){var r,n=yI(e);if(t){var i=yI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return II(this,r)}}function II(e,t){return!t||"object"!==gI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yI(e){return(yI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var CI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pI(e,t)}(o,e);var t,r,n,i=dI(o);function o(){var e;return fI(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(tr.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new Rr({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&hI(t.prototype,r),n&&hI(t,n),o}(Ad);function EI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var BI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&EI(t.prototype,r),n&&EI(t,n),e}();function vI(e){var t,r=new BI;if(r.id=e.id,e instanceof jt){if(!e.isAppendHardware)return;t=l.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function mI(e){return(mI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=_I(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function bI(e){return function(e){if(Array.isArray(e))return SI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||_I(e)||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 _I(e,t){if(e){if("string"==typeof e)return SI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?SI(e,t):void 0}}function SI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function RI(e,t){return(RI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function MI(e){var t=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(e){return!1}}();return function(){var r,n=PI(e);if(t){var i=PI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xI(this,r)}}function xI(e,t){return!t||"object"!==mI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function PI(e){return(PI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var TI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&RI(e,t)}(o,e);var t,r,n,i=MI(o);function o(){return wI(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,bI((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(bI(o),bI(A),bI(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return vI(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=QI(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,bI(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=QI(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===l.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),dm().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===l.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==l.HOLE&&e.modelType!==l.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&DI(t.prototype,r),n&&DI(t,n),o}(Ad);function FI(e){return(FI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function LI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function NI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?LI(Object(r),!0).forEach((function(t){kI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function kI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GI(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function UI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function VI(e,t){return(VI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function HI(e){var t=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(e){return!1}}();return function(){var r,n=KI(e);if(t){var i=KI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return YI(this,r)}}function YI(e,t){return!t||"object"!==FI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function KI(e){return(KI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&VI(e,t)}(a,e);var t,r,n,i,o,A=HI(a);function a(){var e;return UI(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:vp.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sd(t.modelId);case 2:return n=e.sent,i=Xh(Ff),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=GI(t,["modelId","defer"]),c=eE().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(NI({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=eE().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.intersectedThroughColor,l=a.grooveIntersectedColor,f=a.grooveIntersectedBodyColor;i.setIntersects([]);var p=t.option,d=void 0===p?{}:p,I=t.intersectedGroups,y=Object(tr.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==d.plankFaceIds){var A=Id(r)?null:r.plankFaceId;if(!d.plankFaceIds.includes(A))return!1}var a=o.findModelOrAssemblyModelById(r.linkedModelId);if(a){var p=Pi(e,r,a),I=new Map([[h.BOTH_PLANK,new Map([[g.FACE,s],[g.SHELL,u],[g.THROUGH_SHELL,c]])],[h.PLANK_FURNITURE,new Map([[g.FACE,l],[g.SHELL,f]])]]).get(i).get(n);return p.setViewColor(I),p}})).filter((function(e){return!!e}));i.setIntersects(y),A||r.kaf.invisibleManager.hide("scene3d",Tp,y.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",Tp,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",Tp,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(NI(NI({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=eE().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=GI(n,["timeout","modelId"]),c=fd(o),this.$actionLoadParamModelIntersectedData.started.dispatch(NI(NI({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){OI(o,r,n,A,a,"next",e)}function a(e){OI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&jI(t.prototype,r),n&&jI(t,n),a}(Ad);function JI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function WI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?JI(Object(r),!0).forEach((function(t){zI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function zI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XI(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return WI(WI({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function ZI(e){return(ZI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ty(e,t){return(ty=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ry(e){var t=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(e){return!1}}();return function(){var r,n=iy(e);if(t){var i=iy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ny(this,r)}}function ny(e,t){return!t||"object"!==ZI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iy(e){return(iy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oy={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},Ay=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ty(e,t)}(o,e);var t,r,n,i=ry(o);function o(){var e;return $I(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:oy}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(tr.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(tr.mapValues)(e,(function(e){return function(e,t){var r={};return Object(tr.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(tr.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(tr.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=ri(e.plankFaceId,at.a).mul(.1),r=XI(e.plankFaceId,n).map((function(e){var r=new at.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return WI(WI({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Kn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&ey(t.prototype,r),n&&ey(t,n),o}(Ad);function ay(e){return(ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cy(e,t){return(cy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ly(e){var t=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(e){return!1}}();return function(){var r,n=fy(e);if(t){var i=fy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gy(this,r)}}function gy(e,t){return!t||"object"!==ay(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fy(e){return(fy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cy(e,t)}(o,e);var t,r,n,i=ly(o);function o(){var e;return sy(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:Je,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(tr.castArray)(t.renderIgnoreCategory)),Object(tr.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&uy(t.prototype,r),n&&uy(t,n),o}(Ad);function py(e){return(py="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yy(e,t){return(yy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cy(e){var t=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(e){return!1}}();return function(){var r,n=By(e);if(t){var i=By(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ey(this,r)}}function Ey(e,t){return!t||"object"!==py(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function By(e){return(By=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yy(e,t)}(o,e);var t,r,n,i=Cy(o);function o(){var e;return dy(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(lI),e.intersected=e.partialCreator.create(qI),e.senseSetting=e.partialCreator.create(hy),e.fittingModel=e.partialCreator.create(TI),e.plankFaceHint=e.partialCreator.create(Ay),e.fittingHint=e.partialCreator.create(CI),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&Iy(t.prototype,r),n&&Iy(t,n),o}(qi.AXR),my=r(722),Qy=r.n(my);function by(e){return(by="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wy(e,t){return(wy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dy(e){var t=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(e){return!1}}();return function(){var r,n=My(e);if(t){var i=My(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ry(this,r)}}function Ry(e,t){return!t||"object"!==by(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function My(e){return(My=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wy(e,t)}(o,e);var t,r,n,i=Dy(o);function o(){return _y(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:W.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&Sy(t.prototype,r),n&&Sy(t,n),o}(De);function Py(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ty(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Py(Object(r),!0).forEach((function(t){Fy(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Py(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Oy={x:0,y:0,z:0},Ly={x:0,y:0,z:0};function Ny(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new xy,a=!(e instanceof jt)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof jt;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=$.ASSEMBLY;if(u?c=$.COMMON:e.isTemplateAssembly()&&(c=$.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?Oy:s.getPosition(),A.rotation=A.isRoot?Ly:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=Gy(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return Ny(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return Ny(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function ky(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?Ty({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===W.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();eE().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===W.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[ui.ParamType.MATERIAL,ui.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===Z.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==K.SENSE)&&(s=s.clone(!1)),o===Z.CHILD?(s.setIsAppend(!0),s.setAppendType(Qy.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,Ty(Ty({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==K.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===Z.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,Ty(Ty({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(Z.CHILD)),t.getAccessory().forEach(l(Z.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function Gy(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new ye;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[V.MATERIAL,V.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var Uy=r(125),jy=r.n(Uy),Vy={maxAge:6e5,max:20},Hy=(Dp.SHADING,Dp.OUTLINE_WITH_SHADING,Dp.TRANSLUCENT,Dp.OUTLINE_AND_TRANSLUCENT,[st.ParamModelType.PARAM_ENTITY,st.ParamModelType.PARAM_FURNITURE,st.ParamModelType.PARAM_PRIMITIVE]);function Yy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ky(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yy(Object(r),!0).forEach((function(t){qy(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jy(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Wy(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Jy(o,n,i,A,a,"next",e)}function a(e){Jy(o,n,i,A,a,"throw",e)}A(void 0)}))}}jy()(function(){var e=Wy(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ky({promise:!0},Vy));function zy(){return(zy=Wy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xy(){return(Xy=Wy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Zy=jy()((function(e){return zy.apply(this,arguments)}),Ky(Ky({},Vy),{},{promise:!0})),$y=jy()((function(e){return Xy.apply(this,arguments)}),Ky(Ky({},Vy),{},{promise:!0}));function eC(e){return function(e){if(Array.isArray(e))return tC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tC(e,t)}(e)||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 tC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function nC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var iC=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(tr.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(eC(e.hardwares||[]),eC(e.textures||[]),eC(e.virtualModels||[]),eC(e.paramModelProducts||[]),eC(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,Zy(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,$y(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){rC(o,r,n,A,a,"next",e)}function a(e){rC(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&nC(t.prototype,r),n&&nC(t,n),e}();function oC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function AC(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){oC(o,n,i,A,a,"next",e)}function a(e){oC(o,n,i,A,a,"throw",e)}A(void 0)}))}}function aC(e){return function(e){if(Array.isArray(e))return sC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return sC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sC(e,t)}(e)||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 sC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var lC=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new iC;uC(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,aC(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case K.BRANDGOOD:case K.CATEGORY:break;case K.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,aC(i.getChildNodes()))}}},{key:"attach",value:(i=AC(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===K.SENSE?8:e.t0===K.CATEGORY||e.t0===K.BRANDGOOD||e.t0===K.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===W.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[V.MATERIAL,V.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,aC(i.getChild()).concat(aC(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(aC(Object(tr.uniq)(r.modelIds).map(function(){var e=AC(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&cC(t.prototype,r),n&&cC(t,n),e}(),gC=r(733);function fC(e){return(fC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dC(e,t,r){return(dC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=EC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function IC(e,t){return(IC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yC(e){var t=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(e){return!1}}();return function(){var r,n=EC(e);if(t){var i=EC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return CC(this,r)}}function CC(e,t){return!t||"object"!==fC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function EC(e){return(EC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var BC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&IC(e,t)}(o,e);var t,r,n,i=yC(o);function o(){var e;return hC(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Zp),e.next=3,Object(Mp.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==mp.SUCCESS){e.next=13;break}return e.next=6,Object(Mp.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(Mp.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(Mp.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(gC.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(gC.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=cd(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){dC(EC(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&pC(t.prototype,r),n&&pC(t,n),o}(Ad);function vC(e){return(vC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mC(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=bC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function QC(e){return function(e){if(Array.isArray(e))return _C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||bC(e)||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 bC(e,t){if(e){if("string"==typeof e)return _C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_C(e,t):void 0}}function _C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function wC(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){SC(o,n,i,A,a,"next",e)}function a(e){SC(o,n,i,A,a,"throw",e)}A(void 0)}))}}function DC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MC(e,t,r){return(MC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=FC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function xC(e,t){return(xC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PC(e){var t=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(e){return!1}}();return function(){var r,n=FC(e);if(t){var i=FC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return TC(this,r)}}function TC(e,t){return!t||"object"!==vC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function FC(e){return(FC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xC(e,t)}(u,e);var t,r,n,i,o,A,a=PC(u);function u(){var e;return DC(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(BC),e.state=e.stateCreator.create({renderMode:ia.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ia.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===Dp.SHADING?5:e.t0===Dp.OUTLINE_WITH_SHADING?7:e.t0===Dp.TRANSLUCENT?9:e.t0===Dp.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=ia.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=ia.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=ia.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(Mp.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:dm().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),dm().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?ia.RenderMode.OUTLINE_WITH_SHADING:ia.RenderMode.SHADING,e.next=3,Object(Mp.put)(this.$actionMergeState.message({renderMode:n}));case 3:dm().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit(Sp.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({translucent:t}));case 2:dm().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;MC(FC(u.prototype),"init",this).call(this),dm().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?wp.translucentModel:wp.opaqueModel})),dm().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=wC(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return Ny(e,{origin:K.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=wC(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",Ny(r,{origin:K.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=wC(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new lC(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,QC(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return ky(e,i)})));case 8:o=e.sent,A=[],a=[],u=mC(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),dm().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&RC(t.prototype,r),n&&RC(t,n),u}(qi.AXR);function LC(e){return(LC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?NC(Object(r),!0).forEach((function(t){GC(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NC(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function GC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jC(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function YC(e,t,r){return(YC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=WC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function KC(e,t){return(KC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qC(e){var t=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(e){return!1}}();return function(){var r,n=WC(e);if(t){var i=WC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return JC(this,r)}}function JC(e,t){return!t||"object"!==LC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function WC(e){return(WC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zC={rawSelected:[],selectedData:[],selectedDataV2:[]},XC=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},ZC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KC(e,t)}(o,e);var t,r,n,i=qC(o);function o(){var e;return VC(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(zC).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(tr.unzip)([t,r]).every((function(e){var t=UC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return kC(kC({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case LA:return r.findModelEx(e.entityId,Lu);case OA:return r.findParamModelAssembly(e.entityId);case xp:return i.find((function(t){return t.id===e.entityId}));case Pp:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(tr.unzip)([s,a]).every((function(e){var t=UC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return kC(kC({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){YC(WC(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),YC(WC(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){YC(WC(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(ds.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.on(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.off(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return zC})),this.selectionStateManager.off(ds.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],YC(WC(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(XC),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===LA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&HC(t.prototype,r),n&&HC(t,n),o}(qi.AXR);ZC.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",ZC.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var $C={entry:Zp,scene:OC,select:ZC,fittingDesign:vy,baseDesignInfo:hp,viewParamModel:Hd};function eE(){return dm().axr.axrs}var tE=Object(FA.getConnector)(),rE=tE.connect,nE=tE.setRootState;function iE(e,t,r){return rE((function(){return e(eE(),dm().getStateManager())}),t,r)}var oE=r(1133),AE=r.n(oE);function aE(e){return(aE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cE(e,t,r){return t&&uE(e.prototype,t),r&&uE(e,r),e}function lE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gE(e,t)}function gE(e,t){return(gE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fE(e){var t=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(e){return!1}}();return function(){var r,n=pE(e);if(t){var i=pE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hE(this,r)}}function hE(e,t){return!t||"object"!==aE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pE(e){return(pE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dE=Symbol("layout"),IE=iE((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){lE(r,e);var t=fE(r);function r(){return sE(this,r),t.apply(this,arguments)}return cE(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Ji.MountPoint)),yE=function(e){lE(r,e);var t=fE(r);function r(){return sE(this,r),t.apply(this,arguments)}return cE(r,[{key:"render",value:function(){return zi.a.createElement(IE,{mountPointId:dE})}}]),r}(zi.a.PureComponent);function CE(e){return(CE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mE(e,t)}function mE(e,t){return(mE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QE(e){var t=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(e){return!1}}();return function(){var r,n=_E(e);if(t){var i=_E(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bE(this,r)}}function bE(e,t){return!t||"object"!==CE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _E(e){return(_E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SE=iE((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){vE(r,e);var t=QE(r);function r(){return BE(this,r),t.apply(this,arguments)}return r}(Ji.Scene3D)),wE=iE((function(){return{}}),(function(){return{}}),function(e){vE(o,e);var t,r,n,i=QE(o);function o(){var e;return BE(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(ia.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new ia.Color(_p.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),dm().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return zi.a.createElement(SE,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&EE(t.prototype,r),n&&EE(t,n),o}(zi.a.PureComponent));function DE(e){return(DE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ME(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xE(e,t){return(xE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PE(e){var t=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(e){return!1}}();return function(){var r,n=FE(e);if(t){var i=FE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return TE(this,r)}}function TE(e,t){return!t||"object"!==DE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function FE(e){return(FE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OE=iE((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xE(e,t)}(o,e);var t,r,n,i=PE(o);function o(){var e;return RE(this,o),(e=i.apply(this,arguments)).rootRef=zi.a.createRef(),e.updateLayout=Object(tr.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new Yr.a(r.width,r.height))}}),200),e}return t=o,(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 e=this.props,t=e.size,r=e.className;return zi.a.createElement("div",{ref:this.rootRef,id:bp.SCENE_ID,className:r},zi.a.createElement(wE,{containerId:bp.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&ME(t.prototype,r),n&&ME(t,n),o}(zi.a.PureComponent));r(2094);function LE(e){return(LE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GE(e,t){return(GE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UE(e){var t=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(e){return!1}}();return function(){var r,n=VE(e);if(t){var i=VE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jE(this,r)}}function jE(e,t){return!t||"object"!==LE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VE(e){return(VE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var HE=iE((function(){return{}}),(function(){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GE(e,t)}(o,e);var t,r,n,i=UE(o);function o(){return NE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return zi.a.createElement(Ji.ViewMounter,{mountPointId:dE},zi.a.createElement(OE,{key:"s3",className:AE.a.scene3D}))}}])&&kE(t.prototype,r),n&&kE(t,n),o}(zi.a.PureComponent));function YE(e,t){return(YE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KE(e){var t=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(e){return!1}}();return function(){var r,n=JE(e);if(t){var i=JE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qE(this,r)}}function qE(e,t){return!t||"object"!==WE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function JE(e){return(JE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function WE(e){return(WE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var zE,XE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":WE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ZE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":WE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},$E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&YE(e,t)}(r,e);var t=KE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=xp,n.entityId=e.id,n}return r}(Ji.Entity);$E=XE([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===l.GROOVE)return eB(e);if(t===l.HOLE)return tB(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),ZE("design:paramtypes",["function"==typeof(zE=void 0!==Vr&&Vr)?zE:Object])],$E);var eB=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new ia.BoxGeometry(n.x,n.y,n.z),u=new ia.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new ia.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},tB=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new ia.CylinderGeometry(s,s,o),c=new ia.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new ia.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function rB(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function nB(e){return function(e){if(Array.isArray(e))return iB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return iB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iB(e,t)}(e)||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 iB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oB(e,t){return(oB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function AB(e){var t=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(e){return!1}}();return function(){var r,n=sB(e);if(t){var i=sB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return aB(this,r)}}function aB(e,t){return!t||"object"!==uB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sB(e){return(sB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uB(e){return(uB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var cB,lB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":uB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},gB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":uB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},fB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oB(e,t)}(r,e);var t=AB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Pp,n.entityId=e.id,n}return r}(Ji.Entity);function hB(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new ia.LineBasicMaterial,u=new ia.MeshBasicMaterial({transparent:!0,opacity:a}),c=new ia.Mesh(void 0,u),l=new ia.Line(void 0,s),g=new ia.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new ia.Shape,u=A?new ia.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new ia.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new ia.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new ia.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function pB(e){var t=new u.BBox3d;return[].concat(nB(e.getTopRenderPoints()),nB(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new $e.a(new at.a({x:t.width,y:t.height,z:t.depth}),new at.a(t.center),new at.a({x:0,y:0,z:0}))}function dB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function IB(e,t){return(IB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yB(e){var t=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(e){return!1}}();return function(){var r,n=EB(e);if(t){var i=EB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return CB(this,r)}}function CB(e,t){return!t||"object"!==BB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function EB(e){return(EB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function BB(e){return(BB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}fB=lB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new ia.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new nt.a;c.fromString(r.toArray().join(","));var l=yd(c),g=li.a.decompose(c).position,f=hB({matrix:l,depth:0,points:s,color:i,side:ia.Side.FrontSide,position:g,opacity:o}),h=hB({matrix:l,depth:-n,points:s,color:i,side:ia.Side.BackSide,position:g,opacity:o}),p=[].concat(nB(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new ia.MeshBasicMaterial({opacity:o,transparent:!0}),a=new ia.Mesh(new ia.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof ia.BufferGeometry){var s=rB(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new ia.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:ia.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof ia.Mesh&&e.material&&Object(tr.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:pB(this.$model)}}))]),gB("design:paramtypes",["function"==typeof(cB=void 0!==vn&&vn)?cB:Object])],fB);var vB,mB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":BB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},QB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":BB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},bB=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,_B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&IB(e,t)}(o,e);var t,r,n,i=yB(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Op,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new ia.Geometry,r=e.getVertices().map((function(e){var t=e;return new ia.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new ia.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new ia.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new ia.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof st.CoreParamModel?t.getConcatenatedBox3():t instanceof Vr?t.boundingBox:pB(t),bB(e)}}])&&dB(t.prototype,r),n&&dB(t,n),o}(Ji.Entity),SB=_B=mB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),QB("design:paramtypes",["function"==typeof(vB=void 0!==Rr&&Rr)?vB:Object])],_B);function wB(e){var t=new ia.BufferGeometry;if(t.index=new ia.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new ia.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new ia.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new ia.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function DB(e,t){return(DB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function RB(e){var t=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(e){return!1}}();return function(){var r,n=xB(e);if(t){var i=xB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return MB(this,r)}}function MB(e,t){return!t||"object"!==PB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xB(e){return(xB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function PB(e){return(PB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var TB,FB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":PB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},OB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":PB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},LB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&DB(e,t)}(r,e);var t=RB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Tp,n.entityId=e.id,n}return r}(Ji.Entity),NB=LB=FB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new ia.Group,A=wB(r),a=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:ia.Side.DoubleSide}),s=new ia.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new ia.Mesh(kB,GB);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),OB("design:paramtypes",["function"==typeof(TB=void 0!==Nn&&Nn)?TB:Object])],LB),kB=new ia.SphereBufferGeometry(3),GB=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function UB(e){return function(e){if(Array.isArray(e))return jB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jB(e,t)}(e)||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 jB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VB(e,t){return(VB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function HB(e){var t=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(e){return!1}}();return function(){var r,n=KB(e);if(t){var i=KB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return YB(this,r)}}function YB(e,t){return!t||"object"!==qB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function KB(e){return(KB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qB(e){return(qB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var JB,WB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":qB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},zB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":qB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},XB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&VB(e,t)}(r,e);var t=HB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Fp,n.entityId=e.id,n}return r}(Ji.Entity),ZB=XB=WB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new ia.Group;r&&r.forEach((function(e){var t=wB(Ti(e,o)),r=new ia.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:ia.Side.DoubleSide}),n=new ia.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=XI(0,a),c=XI(5,a);s=[].concat(UB(Object(tr.zip)(u,[].concat(UB(u.slice(1)),[u[0]]))),UB(Object(tr.zip)(c,[].concat(UB(c.slice(1)),[c[0]]))),UB(Object(tr.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(tr.chunk)(s,3).map((function(e){return new at.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new ya({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),zB("design:paramtypes",["function"==typeof(JB=void 0!==Kn&&Kn)?JB:Object])],XB);function $B(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ev(e,t){return(ev=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tv(e){var t=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(e){return!1}}();return function(){var r,n=nv(e);if(t){var i=nv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rv(this,r)}}function rv(e,t){return!t||"object"!==iv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nv(e){return(nv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iv(e){return(iv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ov,Av=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":iv(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},av=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":iv(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},sv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ev(e,t)}(o,e);var t,r,n,i=tv(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Lp,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new ia.MeshBasicMaterial({opacity:n,transparent:!0}),l=new ia.Mesh(new ia.BufferGeometry,c);if(c.setValues({side:ia.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof ia.BufferGeometry){var g=rB(a,s);l.geometry.addAttribute("position",new ia.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new at.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(yd(f)),l}}}])&&$B(t.prototype,r),n&&$B(t,n),o}(Ji.Entity),uv=sv=Av([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),av("design:paramtypes",["function"==typeof(ov=void 0!==ti&&ti)?ov:Object])],sv);var cv=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new $E(e)})),this.createIntersectEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new NB(e)})),this.createGrooveFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new fB(e)})),this.createPlankFaceHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new ZB(e)})),this.careateFittingHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new SB(e)})),this.careatePlankOutlineHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new uv(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function lv(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return gv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gv(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function gv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var hv=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(tr.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=lv(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=lv(Object(tr.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}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(e){var t=this;return Object(tr.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return Xe.includes(e)}}])&&fv(t.prototype,r),n&&fv(t,n),e}(),pv=new Map([[ui.ParamModelCategory.FRAME,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.DECORATIVE_MOLDING_C,ui.ParamModelCategory.DECORATIVE_MOLDING_W,ui.ParamModelCategory.HANDS_FREE,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[ui.ParamModelCategory.SHOWER_ROOM,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.RAIL,ui.ParamModelCategory.DOOR_LEAF]],[ui.ParamModelCategory.SLIDING_DOOR_C,[ui.ParamModelCategory.RAIL,ui.ParamModelCategory.SINGLE_SLIDING_DOOR]],[ui.ParamModelCategory.SPACE_GROUP,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPECIAL_BOARD,ui.ParamModelCategory.SPACE_GROUP]],[ui.ParamModelCategory.SINGLE_SLIDING_DOOR,[ui.ParamModelCategory.SLIDING_DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE]],[ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[ui.ParamModelCategory.SWING_DOOR]],[ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.SWING_DOOR,[ui.ParamModelCategory.DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE,ui.ParamModelCategory.DECORATIVE_MOLDING,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.DRAWER,[ui.ParamModelCategory.DRAWER_PANEL,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.PARAM_FURNITURE,[ui.ParamModelCategory.FURNITURE_LEG]],[ui.ParamModelCategory.KADA,[ui.ParamModelCategory.BYOBU,ui.ParamModelCategory.BYOBU_FRAME,ui.ParamModelCategory.BYOBU_PANEL]]]);function dv(e){return function(e){if(Array.isArray(e))return Iv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Iv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Iv(e,t)}(e)||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 Iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Cv=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=Ve.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new hv,this.memoGetHintModelLite=jy()((function(e){return t.isFittingLikeModel(e)?vI(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(pv.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.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 o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?Ny(e,{origin:K.SENSE},void 0,Ny(t,{origin:K.SENSE})):Ny(e,{origin:K.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=Bm(u))&&!this.isFittingLikeModel(o)&&(u.entityType===LA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof st.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===He.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof st.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===He.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===He.CLICK)return s||a;if(t===He.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&Bm(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!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(t===He.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===He.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===He.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===He.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=Bm(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===LA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof st.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof st.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===Ve.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===Ve.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{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(e,t){this.designMode=e,e===Ve.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.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(tr.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=vm[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?vI(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof vn||e instanceof Vr||e instanceof jt&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==Ve.CUSTOM){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e}if(!r)return;var n=Em(r),i=Object(tr.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,dv(this.prevModeSelectEntity));var o=i[0]&&Bm(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(dv(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e;break;case Ve.CUSTOM:return this.customModeSelectModel(e,t)}return Em(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case Ve.TOP_MODEL:case Ve.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case Ve.PRODUCT:t=e;break;case Ve.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(tr.castArray)(this.curSelectEntity)||[];if(!([].concat(dv(r),dv(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return Em(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&yv(t.prototype,r),n&&yv(t,n),e}();function Ev(e){return(Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mv(e,t){return(mv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qv(e){var t=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(e){return!1}}();return function(){var r,n=_v(e);if(t){var i=_v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bv(this,r)}}function bv(e,t){return!t||"object"!==Ev(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _v(e){return(_v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mv(e,t)}(o,e);var t,r,n,i=Qv(o);function o(){return Bv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&Bm(e)}},{key:"selection",get:function(){return dm().getStateManager().kaf.selection}},{key:"hint",get:function(){return dm().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return dm().designModeContext}}])&&vv(t.prototype,r),n&&vv(t,n),o}(Ji.ToolModule.Feature);function wv(e){return(wv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mv(e,t){return(Mv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xv(e){var t=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(e){return!1}}();return function(){var r,n=Tv(e);if(t){var i=Tv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Pv(this,r)}}function Pv(e,t){return!t||"object"!==wv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tv(e){return(Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mv(e,t)}(o,e);var t,r,n,i=xv(o);function o(){var e;return Dv(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if($t.eventNames().includes(zt.PLANK_FACE_HOVER)&&r instanceof st.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Ed(r,i)};$t.emit(zt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),Ve.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&Rv(t.prototype,r),n&&Rv(t,n),o}(Sv);function Ov(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Lv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lv(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}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 o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function Lv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kv(e,t){return(kv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gv(e){var t=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(e){return!1}}();return function(){var r,n=jv(e);if(t){var i=jv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Uv(this,r)}}function Uv(e,t){return!t||"object"!==Vv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jv(e){return(jv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vv(e){return(Vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Hv=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Vv(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Yv=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Vv(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Kv=Ji.__INTERNAL__.Highlighters.WireGeometry,qv=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,Jv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kv(e,t)}(o,e);var t,r,n,i=Gv(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new Kv,r=Ov(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof st.CoreParamModel||n instanceof st.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=qv(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&Nv(t.prototype,r),n&&Nv(t,n),o}(Ji.Entity),Wv=Jv=Hv([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),Yv("design:paramtypes",[Array,Function])],Jv);function zv(e){return(zv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zv(e,t){return(Zv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $v(e){var t=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(e){return!1}}();return function(){var r,n=tm(e);if(t){var i=tm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return em(this,r)}}function em(e,t){return!t||"object"!==zv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tm(e){return(tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zv(e,t)}(o,e);var t,r,n,i=$v(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return Bm(e)}));return new Wv(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof Vr?e.boundingBox:pB(e)}},{key:"onClick",value:function(e){this.triggerClick(e,He.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,He.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if($t.eventNames().includes(zt.PLANK_FACE_CLICK)&&n instanceof st.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Ed(n,o)};$t.emit(zt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===Ve.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&Xv(t.prototype,r),n&&Xv(t,n),o}(Sv);function nm(e){return(nm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function om(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?im(Object(r),!0).forEach((function(t){Am(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Am(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function am(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sm(e,t,r){return(sm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gm(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function um(e,t){return(um=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cm(e){var t=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(e){return!1}}();return function(){var r,n=gm(e);if(t){var i=gm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return lm(this,r)}}function lm(e,t){return!t||"object"!==nm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gm(e){return(gm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fm,hm=new qi.SingletonRef,pm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&um(e,t)}(o,e);var t,r,n,i=cm(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:HE,axrs:$C,singleton:hm},e)).stateManager=t,r.viewer=new Rs,r.designModeContext=new Cv,r}return t=o,(r=[{key:"init",value:function(){sm(gm(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),nE(e);var t=this.getDependentPlugin(Ji.AppServicePlugin),r=this.getDependentPlugin(qh);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){sm(gm(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Pc),this.client=new $u(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Ji.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!Hy.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:LA,point:r}:om(om({},e),{},{point:r})},paramModelSymbol:LA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new cv((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new rm})),t.kaf.toolbox.addIdleToolFeature((function(){return new Fv})),o.setLayout(yE)}}])&&am(t.prototype,r),n&&am(t,n),o}(qi.PluginApplication),dm=hm.instance;function Im(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ym(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(tr.isObject)(n)&&Object(tr.isFunction)(n.then)&&Object(tr.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function Cm(e){return e instanceof jt?LA:e instanceof Xt?OA:e instanceof Vr?xp:e instanceof vn?Pp:void 0}function Em(e){return{entityId:e.id,entityType:Cm(e)}}function Bm(e){var t=e.entityId,r=e.entityType,n=dm().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case LA:return o.findModelOrAssemblyModelById(t);case OA:return o.findParamModelAssembly(t);case Pp:return i.getGrooveFittings().find((function(e){return e.id===t}));case xp:return i.getFittings().find((function(e){return e.id===t}));default:return}}var vm=(Im(fm={},ze.PARAM_MODEL,LA),Im(fm,ze.PARAM_MODEL_ASSEMBLY,OA),Im(fm,ze.HOLE,xp),Im(fm,ze.GROOVE,xp),Im(fm,ze.HARDWARE_GROOVE,Pp),Im(fm,ze.HARDWARE,LA),fm);function mm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Qm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){mm(o,n,i,A,a,"next",e)}function a(e){mm(o,n,i,A,a,"throw",e)}A(void 0)}))}}var bm=new Map;function _m(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var Sm=ym(function(){var e=Qm(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Rc(),n=_m(t),!bm.has(n)){e.next=4;break}return e.abrupt("return",bm.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,bm.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_m);function wm(){var e=Xh(Tf);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var Dm,Rm,Mm=function(){var e=Qm(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),i=_m(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:bm.set(i,t),wm(),e.next=14;break;case 9:if(e.prev=9,e.t0=e.catch(2),o=e.t0,!Object(tr.isObject)(o)||"0"===o.c||!o.m){e.next=13;break}throw new Error("错误码:".concat(e.t0.c,";错误信息:").concat(e.t0.m));case 13:throw e.t0;case 14:case"end":return e.stop()}var o}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),xm=function(){var e=Qm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),n=_m(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:bm.has(n)&&bm.delete(n),wm(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function Pm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Tm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Pm(o,n,i,A,a,"next",e)}function a(e){Pm(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(Dm||(Dm={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(Rm||(Rm={}));var Fm=function(){var e=Tm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.castArray)(t),n=Xh(Yf),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Om=ym(function(){var e=Tm(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),Lm=ym(function(){var e=Tm(s.a.mark((function e(t,r,n,i){var o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",o.getModelJsonDataByModelId({modelIds:t,templateId:r,timeout:i},{timeout:-1}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function Nm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function km(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Um(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Gm(o,n,i,A,a,"next",e)}function a(e){Gm(o,n,i,A,a,"throw",e)}A(void 0)}))}}var jm=jy()(function(){var e=Um(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nm(Object(r),!0).forEach((function(t){km(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},Vy)),Vm=jy()(function(){var e=Um(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(tr.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var Hm=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function Ym(e){return(Ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Km(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Km(Object(r),!0).forEach((function(t){Jm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Km(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function zm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Wm(o,n,i,A,a,"next",e)}function a(e){Wm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Xm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $m(e,t){return($m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eQ(e){var t=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(e){return!1}}();return function(){var r,n=rQ(e);if(t){var i=rQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tQ(this,r)}}function tQ(e,t){return!t||"object"!==Ym(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rQ(e){return(rQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nQ=function(){return eE().fittingDesign.fittingDesignSense},iQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$m(e,t)}(c,e);var t,r,n,i,o,A,a,u=eQ(c);function c(){return Xm(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];nQ().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return nQ().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=zm(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(eE().viewParamModel.state.state.currModelId!==t||nQ().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,Sd(t);case 5:return r=e.sent,e.abrupt("return",Sm(qm(qm({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return nQ().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=eE().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=eE().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:Mi.POINT,val:t[i]},A={type:Mi.LINE,val:r[i]};if(!ji(o.val))return!1;if(!Vi(A.val))return!1;if(!Yi(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:Mi.POINT,val:t[a]},u={type:Mi.LINE,val:r[a]};if(!Yi(o,s))return!1;if(!Yi(o,u))return!1;if(!Yi(A,s))return!1;if(!Yi(A,u))return!1}}return!0}(Ki(e,r,Object(tr.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=zm(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",nQ().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=zm(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=fd(n),nQ().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=zm(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=fd(i),nQ().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&Zm(t.prototype,r),n&&Zm(t,n),c}(Hm);function oQ(e){return(oQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sQ(e,t){return(sQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uQ(e){var t=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(e){return!1}}();return function(){var r,n=lQ(e);if(t){var i=lQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cQ(this,r)}}function cQ(e,t){return!t||"object"!==oQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lQ(e){return(lQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gQ=(new fi.a).setFromCenterAndSize(new at.a(0,0,0),new at.a(200,200,100)),fQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sQ(e,t)}(o,e);var t,r,n,i=uQ(o);function o(){return AQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return gQ}}])&&aQ(t.prototype,r),n&&aQ(t,n),o}(Ji.Scene3DStateManager);function hQ(e){return(hQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dQ(e,t){return(dQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IQ(e){var t=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(e){return!1}}();return function(){var r,n=CQ(e);if(t){var i=CQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yQ(this,r)}}function yQ(e,t){return!t||"object"!==hQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CQ(e){return(CQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var EQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dQ(e,t)}(r,e);var t=IQ(r);function r(){return pQ(this,r),t.apply(this,arguments)}return r}(Ji.types.combine({scene3D:fQ})),BQ=window.document.createElement("script");BQ.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(BQ);function vQ(e){return(vQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bQ(e,t){return(bQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _Q(e){var t=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(e){return!1}}();return function(){var r,n=wQ(e);if(t){var i=wQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return SQ(this,r)}}function SQ(e,t){return!t||"object"!==vQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wQ(e){return(wQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var DQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bQ(e,t)}(o,e);var t,r,n,i=_Q(o);function o(){var e;return mQ(this,o),(e=i.apply(this,arguments)).rootState=new EQ,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new pm(this,this.rootState);e.init(),e.run()}}])&&QQ(t.prototype,r),n&&QQ(t,n),o}(Nh.BasePlugin);function RQ(e){return(RQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PQ(e,t){return(PQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TQ(e){var t=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(e){return!1}}();return function(){var r,n=OQ(e);if(t){var i=OQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FQ(this,r)}}function FQ(e,t){return!t||"object"!==RQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function OQ(e){return(OQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}DQ.dependencies=[Ji.AppServicePlugin,qh];var LQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&PQ(e,t)}(o,e);var t,r,n,i=TQ(o);function o(){return MQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){eE().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){eE().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&xQ(t.prototype,r),n&&xQ(t,n),o}(Hm);function NQ(e){return(NQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function GQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){kQ(o,n,i,A,a,"next",e)}function a(e){kQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function UQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function VQ(e,t){return(VQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function HQ(e){var t=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(e){return!1}}();return function(){var r,n=KQ(e);if(t){var i=KQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return YQ(this,r)}}function YQ(e,t){return!t||"object"!==NQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function KQ(e){return(KQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&VQ(e,t)}(u,e);var t,r,n,i,o,A,a=HQ(u);function u(){return UQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=GQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=GQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=GQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&jQ(t.prototype,r),n&&jQ(t,n),u}(Hm);function JQ(e){return(JQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function WQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function XQ(e,t){return(XQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ZQ(e){var t=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(e){return!1}}();return function(){var r,n=eb(e);if(t){var i=eb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $Q(this,r)}}function $Q(e,t){return!t||"object"!==JQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function eb(e){return(eb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&XQ(e,t)}(o,e);var t,r,n,i=ZQ(o);function o(){return WQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){eE().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){eE().fittingDesign.fittingHint.clearFittingHint(e)}}])&&zQ(t.prototype,r),n&&zQ(t,n),o}(Hm);function rb(e){return(rb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ib(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){nb(o,n,i,A,a,"next",e)}function a(e){nb(o,n,i,A,a,"throw",e)}A(void 0)}))}}function ob(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ab(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ab(e,t){return(ab=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sb(e){var t=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(e){return!1}}();return function(){var r,n=cb(e);if(t){var i=cb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ub(this,r)}}function ub(e,t){return!t||"object"!==rb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cb(e){return(cb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lb,gb,fb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ab(e,t)}(a,e);var t,r,n,i,o,A=sb(a);function a(){return ob(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=ib(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=ib(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&Ab(t.prototype,r),n&&Ab(t,n),a}(Hm);function hb(e){return(hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function db(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ib(e,t){return(Ib=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yb(e){var t=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(e){return!1}}();return function(){var r,n=Eb(e);if(t){var i=Eb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Cb(this,r)}}function Cb(e,t){return!t||"object"!==hb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Eb(e){return(Eb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(lb||(lb={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(gb||(gb={}));var Bb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ib(e,t)}(o,e);var t,r,n,i=yb(o);function o(){return pb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case lb.View3D:t=Ji.PerspectiveCameraMode.View3D;break;case lb.Roamer:t=Ji.PerspectiveCameraMode.Roamer}dm().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=dm().getStateManager().scene3D;switch(e){case gb.UP:case gb.FRONT:t=Ji.ArrowType.UP;break;case gb.DOWN:case gb.BACK:t=Ji.ArrowType.DOWN;break;case gb.LEFT:t=Ji.ArrowType.LEFT;break;case gb.RIGHT:t=Ji.ArrowType.RIGHT}if(t){if(e===gb.UP||e===gb.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&db(t.prototype,r),n&&db(t,n),o}(Hm);function vb(e){return(vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bb(e,t){return(bb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _b(e){var t=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(e){return!1}}();return function(){var r,n=wb(e);if(t){var i=wb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Sb(this,r)}}function Sb(e,t){return!t||"object"!==vb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wb(e){return(wb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Db=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bb(e,t)}(o,e);var t,r,n,i=_b(o);function o(){return mb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){eE().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){eE().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){eE().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&Qb(t.prototype,r),n&&Qb(t,n),o}(Hm);function Rb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Mb(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Rb(o,n,i,A,a,"next",e)}function a(e){Rb(o,n,i,A,a,"throw",e)}A(void 0)}))}}function xb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Tb(e,t){return(Tb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fb(e){var t=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(e){return!1}}();return function(){var r,n=Lb(e);if(t){var i=Lb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ob(this,r)}}function Ob(e,t){return!t||"object"!==Nb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lb(e){return(Lb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nb(e){return(Nb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var kb,Gb,Ub=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nb(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},jb=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Nb(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Vb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tb(e,t)}(a,e);var t,r,n,i,o,A=Fb(a);function a(){return xb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=Mb(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=Mb(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eE().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(tr.map)(n.intersectedGroups,(function(e){return pd(pd({},e),{},{intersecteds:Object(tr.map)(e.intersecteds,(function(e){return Object(tr.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=Je),eE().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return eE().viewParamModel.getParamModelPhotoData(e)}}])&&Pb(t.prototype,r),n&&Pb(t,n),a}(Hm);function Hb(e){return(Hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qb(e,t){return(qb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jb(e){var t=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(e){return!1}}();return function(){var r,n=zb(e);if(t){var i=zb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wb(this,r)}}function Wb(e,t){return!t||"object"!==Hb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zb(e){return(zb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ub([je.observeAsyncApiDeco({serviceName:"ModelService"}),jb("design:type",Function),jb("design:paramtypes",["function"!=typeof!1&&Object]),jb("design:returntype","function"==typeof(kb="undefined"!=typeof Promise&&Promise)?kb:Object)],Vb.prototype,"getParamData",null),Ub([je.observeAsyncApiDeco({serviceName:"ModelService"}),jb("design:type",Function),jb("design:paramtypes",["function"!=typeof!1&&Object]),jb("design:returntype","function"==typeof(Gb="undefined"!=typeof Promise&&Promise)?Gb:Object)],Vb.prototype,"getParamIntersected",null);var Xb,Zb,$b=function(){return eE().select},e_=function(){return eE().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(Xb||(Xb={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(Zb||(Zb={}));var t_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qb(e,t)}(o,e);var t,r,n,i=Jb(o);function o(){var e;return Yb(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(tr.castArray)(e).map((function(e){var t={__sceneId:bp.SCENE_ID,entityId:e.id,entityType:LA};return e.type===Zb.CASBIN&&(t.entityId=e_().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=$b().state.state.selectedData,t=eE().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof jt&&r.isAppendHardware)return{data:[r.hardwareData],type:Xb.CASBIN};var n=Object(tr.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:Xb.MODEL}}return{data:[],type:Xb.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);$b().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);$b().unSelect(t)}else $b().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,$b().on(ZC.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){$b().off(ZC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&Kb(t.prototype,r),n&&Kb(t,n),o}(Hm);function r_(e){return(r_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o_(e,t){return(o_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A_(e){var t=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(e){return!1}}();return function(){var r,n=s_(e);if(t){var i=s_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return a_(this,r)}}function a_(e,t){return!t||"object"!==r_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s_(e){return(s_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u_=function(){return eE().select},c_=function(){return dm().designModeContext},l_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o_(e,t)}(o,e);var t,r,n,i=A_(o);function o(){var e;return n_(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){$t.on(zt.PLANK_FACE_CLICK,e)},once:function(e){$t.once(zt.PLANK_FACE_CLICK,e)},off:function(e){$t.off(zt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){$t.on(zt.PLANK_FACE_HOVER,e)},once:function(e){$t.once(zt.PLANK_FACE_HOVER,e)},off:function(e){$t.off(zt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return u_().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);u_().select(t),c_().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);u_().unSelect(t);var r=c_().getCurSelectEntity();r&&(Array.isArray(r)?c_().setCurSelectEntity(Object(tr.difference)(r,t)):t.includes(r)&&c_().setCurSelectEntity(void 0))}else u_().select(),c_().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,u_().on(ZC.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:vm[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof jt?t=e.isAppendHardware?ze.HARDWARE:ze.PARAM_MODEL:e instanceof Xt?t=ze.PARAM_MODEL_ASSEMBLY:e instanceof vn?t=ze.HARDWARE_GROOVE:e instanceof Vr&&(t=e.type===l.HOLE?ze.HOLE:ze.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){u_().off(ZC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&i_(t.prototype,r),n&&i_(t,n),o}(Hm);function g_(e){return(g_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function h_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){f_(o,n,i,A,a,"next",e)}function a(e){f_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function p_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I_(e,t){return(I_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y_(e){var t=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(e){return!1}}();return function(){var r,n=E_(e);if(t){var i=E_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return C_(this,r)}}function C_(e,t){return!t||"object"!==g_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E_(e){return(E_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var B_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I_(e,t)}(u,e);var t,r,n,i,o,A,a=y_(u);function u(){return p_(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=h_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=h_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=dm().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){eE().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){eE().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){eE().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=h_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&d_(t.prototype,r),n&&d_(t,n),u}(Hm),v_=r(244);function m_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Q_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m_(Object(r),!0).forEach((function(t){b_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function __(e){return function(e){if(Array.isArray(e))return S_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return S_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S_(e,t)}(e)||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 S_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var D_=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=Br()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,__(a.map((function(e){return e.loops}))))};if(A){Object(v_.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return M_(We.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,__(t.loops.slice(1))),e}),[]).map((function(e){return M_(We.INNER,e,!0)})),p=new e(this.modelID,[].concat(__(f),__(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=R_(this.paths.find((function(e){return e.type===We.OUTER})));Object(v_.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(R_)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&w_(t.prototype,r),n&&w_(t,n),e}();function R_(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==E.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function M_(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new $r({type:E.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:B.SEGMENT}:e instanceof u.Arc2d?x_(e):P_(e),new Wr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=F_(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new sn({type:e,points:n,lines:i,forceCCW:!1})}function x_(e){var t={};t.type=B.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function P_(e){var t={};return t.type=B.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function T_(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?Wc(r,n):function(e,t){var r=Vc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=Hc(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=Q_(Q_({},e.changeMap),{},{update:[]}))}function F_(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function O_(e){return(O_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k_(e,t){return(k_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G_(e){var t=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(e){return!1}}();return function(){var r,n=j_(e);if(t){var i=j_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return U_(this,r)}}function U_(e,t){return!t||"object"!==O_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j_(e){return(j_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k_(e,t)}(o,e);var t,r,n,i=G_(o);function o(){return L_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(un(We.OUTER,r.path)),n.push.apply(n,__(r.holes.map((function(e){return un(We.INNER,e)})))),new D_(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){T_(e)}}])&&N_(t.prototype,r),n&&N_(t,n),o}(Hm);function H_(e){return(H_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function K_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function J_(e,t){return(J_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W_(e){var t=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(e){return!1}}();return function(){var r,n=X_(e);if(t){var i=X_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return z_(this,r)}}function z_(e,t){return!t||"object"!==H_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function X_(e){return(X_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J_(e,t)}(a,e);var t,r,n,i,o,A=W_(a);function a(){return K_(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",eE().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){Y_(o,r,n,A,a,"next",e)}function a(e){Y_(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&q_(t.prototype,r),n&&q_(t,n),a}(Hm);function $_(e){return($_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rS(e,t){return(rS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nS(e){var t=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(e){return!1}}();return function(){var r,n=oS(e);if(t){var i=oS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return iS(this,r)}}function iS(e,t){return!t||"object"!==$_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oS(e){return(oS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var AS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rS(e,t)}(o,e);var t,r,n,i=nS(o);function o(){return eS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;dm().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){dm().designModeContext.registerMultiSelectShortcut(e)}}])&&tS(t.prototype,r),n&&tS(t,n),o}(Hm);function aS(e){return(aS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cS(e,t){return(cS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lS(e){var t=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(e){return!1}}();return function(){var r,n=fS(e);if(t){var i=fS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gS(this,r)}}function gS(e,t){return!t||"object"!==aS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fS(e){return(fS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cS(e,t)}(o,e);var t,r,n,i=lS(o);function o(){return sS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setGetJsonConfig",value:function(e){if(!e||"object"!==aS(e))throw new Error("option 必须是一个对象");var t,r;r=e,Qd[t="getJsonConfig"]=vd(vd({},Qd[t]),r)}}])&&uS(t.prototype,r),n&&uS(t,n),o}(Hm),pS=r(426),dS=r.n(pS),IS=new qi.I18NManager,yS="custom_order_split",CS={"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 ES(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function BS(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ES(o,n,i,A,a,"next",e)}function a(e){ES(o,n,i,A,a,"throw",e)}A(void 0)}))}}var vS=Object(tr.once)((function(){return!!Object(zc.parseServQueryParams)()}));function mS(){return QS.apply(this,arguments)}function QS(){return(QS=BS(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=zc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:zc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:zc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var bS=r(533),_S=r.n(bS),SS=r(1134),wS=r.n(SS);function DS(e){return(DS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xS(e,t){return(xS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function PS(e){var t=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(e){return!1}}();return function(){var r,n=FS(e);if(t){var i=FS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return TS(this,r)}}function TS(e,t){return!t||"object"!==DS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function FS(e){return(FS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var OS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xS(e,t)}(o,e);var t,r,n,i=PS(o);function o(){return RS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return zi.a.createElement("div",{className:_S()(wS.a.empty,i)},!r&&zi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&zi.a.createElement("p",null,t))}}])&&MS(t.prototype,r),n&&MS(t,n),o}(zi.a.PureComponent);function LS(e){return(LS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GS(e,t){return(GS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function US(e){var t=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(e){return!1}}();return function(){var r,n=VS(e);if(t){var i=VS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jS(this,r)}}function jS(e,t){return!t||"object"!==LS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VS(e){return(VS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var HS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GS(e,t)}(o,e);var t,r,n,i=US(o);function o(){return NS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return zi.a.createElement(Ji.Scene3D,e)}}])&&kS(t.prototype,r),n&&kS(t,n),o}(Wi.PureComponent),YS=r(1135),KS=r.n(YS);function qS(e){return(qS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JS(){return(JS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function WS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function XS(e,t){return(XS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ZS(e){var t=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(e){return!1}}();return function(){var r,n=ew(e);if(t){var i=ew(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $S(this,r)}}function $S(e,t){return!t||"object"!==qS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ew(e){return(ew=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Wi.PureComponent;var tw=r(91);function rw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return nw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=zi.a;var iw=document.getElementById("root");function ow(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Aw(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function aw(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Aw(o,n,i,A,a,"next",e)}function a(e){Aw(o,n,i,A,a,"throw",e)}A(void 0)}))}}function sw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var uw=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(Ue.ZH_CN,{zh_CN:CS}),function(e){Kh=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return $t.on(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},once:function(e){return $t.once(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},emit:function(e){$t.emit(zt.API_CALLED,e)}};je.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(Lf);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError({messagePrefix:"miniAppApiCalledError",name:"Error",message:l,stack:""})}}}))}},{key:"isInCustomMiniAppMode",value:function(){return vS()}},{key:"createDebugUtils",value:function(){var e=this.serviceMap,t={enableDebug:function(){window.__customsdk__.services=e}};window.__customsdk__=t}},{key:"start",value:(o=aw(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!this.isInCustomMiniAppMode()){e.next=8;break}if(zc.sappSDK.isStarted){e.next=5;break}return e.next=5,zc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=aw(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 5:this.sappSDK=zc.sappSDK,e.next=13;break;case 8:return e.next=10,gd(30);case 10:return e.next=12,mS(t);case 12:this.sappSDK=e.sent;case 13:return this.startOnApiCalledEvent(),e.next=16,Promise.resolve([Ji.App,DQ]).then((function(e){var t=rw(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(iw)})).catch((function(e){Object(tw.unmountComponentAtNode)(iw),Object(tw.render)(zi.a.createElement(OS,null),iw),console.error("micros/pad",e)}));case 16:return(r=this.getCustomMiniAppService(Pf))?(Rc().setMiniAppHttpProxyClientService(r),tp(Rc())):tp(Dc()),(Jh=new ep.AttachedService).config.setRequestClient(zh),Wh=new ep.ParamModelDataService({paramModelConstructor:jt,requestClient:zh}),new ep.ParamModelAssemblyDataService({paramModelAssemblyConstructor:Xt,requestClient:zh}),n=this.getService(B_),e.prev=20,e.next=23,n.viewSelected();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 28:case"end":return e.stop()}}),e,this,[[20,25]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(tr.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),dS.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:pS.ENUM.TranslatorType.I18next,packages:[yS],resource:ow({},yS,t)}),IS.init({namespace:yS,resources:yS})}},{key:"stop",value:(i=aw(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(Tf))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(tr.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(Hm.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof zc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&sw(t.prototype,r),n&&sw(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1126),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},O=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,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 o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(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()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),k=[{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}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return k.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(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?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),H=r(730),Y=r.n(H);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=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."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);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(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new N(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)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(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
|