babylonjs-serializers 9.14.0 → 9.16.0
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/babylon.glTF2Serializer.js +1 -1
- package/babylon.glTF2Serializer.js.map +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylon.objSerializer.js +1 -1
- package/babylon.objSerializer.js.map +1 -1
- package/babylon.objSerializer.min.js +1 -1
- package/babylon.objSerializer.min.js.map +1 -1
- package/babylon.stlSerializer.js +1 -1
- package/babylon.stlSerializer.js.map +1 -1
- package/babylon.stlSerializer.min.js +1 -1
- package/babylon.stlSerializer.min.js.map +1 -1
- package/babylon.threemfSerializer.js +1 -1
- package/babylon.threemfSerializer.js.map +1 -1
- package/babylon.threemfSerializer.min.js +1 -1
- package/babylon.threemfSerializer.min.js.map +1 -1
- package/babylon.usdzSerializer.js +1 -1
- package/babylon.usdzSerializer.js.map +1 -1
- package/babylon.usdzSerializer.min.js +1 -1
- package/babylon.usdzSerializer.min.js.map +1 -1
- package/babylonjs.serializers.d.ts +52 -11
- package/babylonjs.serializers.js +1 -1
- package/babylonjs.serializers.js.map +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +104 -22
- package/package.json +3 -3
- package/tsconfig.build.json +1 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("babylonjs")):"function"==typeof define&&define.amd?define(["exports","babylonjs"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).BABYLON=t.BABYLON||{},t.BABYLON)}(this,function(t,e){"use strict";var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)};function o(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function a(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}u((r=r.apply(t,e||[])).next())})}function s(t,e){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function u(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function l(t){return"string"==typeof(null==t?void 0:t.name)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var c=Symbol("__xml:meta$__"),p=Symbol("__xml:name$__");function h(t,e){var n,r=t.constructor;(null!==(n=r[c])&&void 0!==n?n:r[c]=[]).push(e)}function f(t){return function(e){e[p]=t}}function m(){return function(t,e){return h(t,{kind:"none",prop:e,ignore:!0})}}function d(t){return function(e,n){return h(e,i({kind:"attr",prop:n},t))}}function v(t){return function(e,n){return h(e,i({kind:"elem",prop:n},t))}}function _(t){var e,n;return null!==(n=null===(e=null==t?void 0:t.constructor)||void 0===e?void 0:e[c])&&void 0!==n?n:[]}function y(t){var e;return(null===(e=null==t?void 0:t.constructor)||void 0===e?void 0:e[p])||void 0}function g(t){return/^[A-Za-z_][A-Za-z0-9._-]*$/.test(t)}function T(t){if(l(t))return t;var e=(null!=t?t:"").trim();if(!e)return{name:""};var n=e.indexOf(":");if(-1===n)return{name:e};if(-1!==e.indexOf(":",n+1))return{name:e};var r=e.slice(0,n),i=e.slice(n+1);return g(r)&&g(i)?{ns:r,name:i}:{name:e}}function w(t,e){return e?"".concat(e,":").concat(t):t}var b=Object.freeze({eps:1e-6,maxDecimalsCap:15,trimTrailingZeros:!0,allowScientific:!1,snapNearZero:!0}),M=Object.freeze({number:b});function x(t){var e,n,r,i,o,a,s=null!==(e=null==t?void 0:t.eps)&&void 0!==e?e:b.eps;return{eps:s,maxDecimalsCap:null!==(n=null==t?void 0:t.maxDecimalsCap)&&void 0!==n?n:b.maxDecimalsCap,trimTrailingZeros:null!==(r=null==t?void 0:t.trimTrailingZeros)&&void 0!==r?r:b.trimTrailingZeros,fixedDecimals:null==t?void 0:t.fixedDecimals,allowScientific:null!==(i=null==t?void 0:t.allowScientific)&&void 0!==i?i:b.allowScientific,snapNearZero:null!==(o=null==t?void 0:t.snapNearZero)&&void 0!==o?o:b.snapNearZero,zeroThreshold:null!==(a=null==t?void 0:t.zeroThreshold)&&void 0!==a?a:s,perAttributeEps:null==t?void 0:t.perAttributeEps}}function S(t){return{number:x(null==t?void 0:t.number)}}var C=function(){function t(t){if(this.o=t,this._o=t.number,!Number.isFinite(this._o.eps)||this._o.eps<=0)throw new Error("opts.eps must be a finite, positive number")}return t.prototype.toString=function(t){var e,n,r,i;if(!Number.isFinite(t))throw new Error("Cannot format non-finite number: ".concat(t));var o,a=this._o,s=this._clampInt(null!==(e=a.maxDecimalsCap)&&void 0!==e?e:15,0,20),u=null===(n=a.trimTrailingZeros)||void 0===n||n,l=null===(r=a.snapNearZero)||void 0===r||r,c=null!==(i=a.zeroThreshold)&&void 0!==i?i:a.eps,p=1/a.eps,h=Math.round(t*p)/p;if(Object.is(h,-0)&&(h=0),l&&Math.abs(h)<=c&&(h=0),o=void 0!==a.fixedDecimals?this._clampInt(a.fixedDecimals,0,s):this._clampInt(Math.ceil(-Math.log10(a.eps)),0,s),a.allowScientific,0===o)return String(Math.trunc(h));var f=h.toFixed(o);if(u&&void 0===a.fixedDecimals&&(f=f.replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"").replace(/\.$/,"")),/[eE]/.test(f))throw new Error("Scientific notation not allowed in XML output: ".concat(f));return f},t.prototype._clampInt=function(t,e,n){return Number.isFinite(t)?(t=Math.trunc(t),Math.max(e,Math.min(n,t))):e},t}();function j(t){return t instanceof Date}function N(t){return"string"==typeof t}function O(t){return"number"==typeof t}function k(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||j(t)}function D(t){return"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||j(t)}var A,X=function(){function t(t,e){this._ns=new Map,this._prefixCount=0,this._builder=t,this._format=S(e),this._nFmt=new C(this._format)}return t.prototype.withNamespace=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,r=t;n<r.length;n++){var i=r[n];this._assignNamespace(i)}return this},t.prototype.serialize=function(t,e){if(!(e=null!=e?e:y(t)))throw new Error("can not find name for given object");var n=T(e);n.ns&&this._assignNamespace(n.ns,"xmlns"),this._gatherNamespaces(t,new WeakSet);for(var r=this._builder.ele(null,n.name),i=0,o=Array.from(this._ns.entries());i<o.length;i++){var a=o[i],s=a[0],u=a[1];r.att("xmlns",u,s)}this._writeObjectContent(r,t,(new WeakSet).add(t)),this._builder.end()},t.prototype._writeObject=function(t,e,n){if(!n.has(e))if(n.add(e),Array.isArray(e))for(var r=0,i=e;r<i.length;r++){var o=i[r];D(o)||(N(o)?this._builder.text(o):this._writeObject(t,o,n))}else{var a=y(e);if(a){var s=T(a),u=this._getPrefix(s),l=w(s.name,u);t.ele(null,l),this._writeObjectContent(t,e,n),this._builder.end()}}},t.prototype._getPrefix=function(t){if(t.ns){var e=this._ns.get(t.ns.toLowerCase());if("xmlns"!==e)return e}},t.prototype._writeObjectContent=function(t,e,n){for(var r,i,o,a=null!==(r=_(e))&&void 0!==r?r:[],s=new Map,u=0,l=a;u<l.length;u++){var c=l[u],p=null!==(i=s.get(c.prop))&&void 0!==i?i:[];p.push(c),s.set(c.prop,p)}for(var h=Object.keys(e).sort(function(t,e){var n,r,i=(null!==(n=s.get(t))&&void 0!==n?n:[]).some(function(t){return"attr"===t.kind}),o=(null!==(r=s.get(e))&&void 0!==r?r:[]).some(function(t){return"attr"===t.kind});return i===o?0:i?-1:1}),f=0,m=h;f<m.length;f++){var d=m[f],v=e[d];if(null!=v){var y=s.get(d);if(y){var g=y.some(function(t){return!0===t.ignore||"none"===t.kind});if(g)continue;for(var b=0,M=y;b<M.length;b++){var x=null!==(o=(c=M[b]).name)&&void 0!==o?o:c.prop.toLowerCase();if(x&&"attr"===c.kind){var S=null;if(O(v)&&this._nFmt&&(S=this._nFmt.toString(v)),c.formatter&&(S=new c.formatter(this._format).toString(v)),S=null!=S?S:v.toString()){var C=T(x),j=this._getPrefix(C),k=w(C.name,j);t.att(null,k,S)}}}}else D(v)||(N(v)?this._builder.text(v):this._writeObject(t,v,n))}}},t.prototype._gatherNamespaces=function(t,e){var n,r;if(!e.has(t))if(e.add(t),Array.isArray(t))for(var i=0,o=t;i<o.length;i++){var a=o[i];k(a)||this._gatherNamespaces(a,e)}else{var s=y(t);s&&this._assignNamespace(s);for(var u=null!==(n=_(t))&&void 0!==n?n:[],l=new Map,c=0,p=u;c<p.length;c++){var h=p[c],f=null!==(r=l.get(h.prop))&&void 0!==r?r:[];f.push(h),l.set(h.prop,f)}for(var m=[],d=0,v=Object.keys(t);d<v.length;d++){var g=v[d],T=t[g];if(null!=T){var w=l.get(g);if(w){var b=w.some(function(t){return!0===t.ignore||"none"===t.kind});if(b)continue;for(var M=0,x=w;M<x.length;M++)(h=x[M]).name&&this._assignNamespace(h.name)}m.push(T)}}for(var S=0,C=m;S<C.length;S++){var j=C[S];k(j)||this._gatherNamespaces(j,e)}}},t.prototype._assignNamespace=function(t,e){var n=T(t);if(null==n?void 0:n.ns){var r=n.ns.toLowerCase();this._ns.get(r)||this._ns.set(r,null!=e?e:this._buildNsPrefix(r))}else"xmlns"===e&&(r=n.name.toLowerCase(),this._ns.get(r)||this._ns.set(r,null!=e?e:this._buildNsPrefix(r)))},t.prototype._buildNsPrefix=function(t){var e,n=!1;do{e="ns".concat(this._prefixCount++);for(var r=0,i=Array.from(this._ns.values());r<i.length;r++)if(i[r]===e){n=!0;break}}while(n);return e},t}(),R=function(){function t(){}return t.OpenTag="<",t.CloseTag=">",t.Slash="/",t.Question="?",t.Quote='"',t.Equal="=",t.Space=" ",t.Semicolon=":",t.Dec="<?xml",t.Xml="xml",t.Xmlns="xmlns",t.Xsi="xsi",t.VersionKeyword="version",t.EncodingKeyword="encoding",t.StandaloneKeyword="standalone",t}();t.TokenType=void 0,(A=t.TokenType||(t.TokenType={}))[A.Declaration=0]="Declaration",A[A.Tag=1]="Tag",A[A.Attribute=2]="Attribute",A[A.Text=3]="Text";var B,P,I=function(){function e(t){this._ctxStack=[],this._d=0,this._w=t}return e.prototype.dec=function(t,e,n){return this._w.write(R.Dec),this._writeAttStr(R.VersionKeyword,t),e&&this._writeAttStr(R.EncodingKeyword,e),void 0!==n&&this._writeAttStr(R.StandaloneKeyword,n?"yes":"no"),this._w.write(R.Question,R.CloseTag),this},e.prototype.att=function(e,n,r){var i=this._peekContext();if(!i)throw new Error("att() without open element");if(i.closed)throw new Error("att() after start tag closed for <".concat(i.name,">"));if(this._isXmlnsDecl(e,n)){if(n===R.Xmlns)i.defaultNs=r,this._registerNamespace(i,"",r),this._writeAttStr(R.Xmlns,r);else if(e)this._registerNamespace(i,n,r),this._writeAttStr("".concat(e,":").concat(n),r);else{var o=n.slice(6);this._registerNamespace(i,o,r),this._writeAttStr(n,r)}return i.lastToken=t.TokenType.Attribute,this}var a=n;if(e){var s=this._ensurePrefixDeclared(i,e);a="".concat(s,":").concat(n)}return i.lastToken=t.TokenType.Attribute,this._writeAttStr(a,r),this},e.prototype.ele=function(t,e){var n,r=this._peekContext();r&&this._closeOpenTagIfNeeded(r);var i=e;if(t){var o=null!==(n=this._lookupPrefix(t))&&void 0!==n?n:t;i="".concat(o,":").concat(e)}return this._pushContext(i,++this._d),this._w.write(R.OpenTag,i),this},e.prototype.text=function(e){var n=this._peekContext();if(!n)throw new Error("text() without open element");return this._closeOpenTagIfNeeded(n),n.lastToken=t.TokenType.Text,this._w.write(this._escText(e)),this},e.prototype.end=function(){var t=this._popContext();return t&&(this._d--,t.closed?this._w.write(R.OpenTag,R.Slash,t.name,R.CloseTag):this._w.write(R.Slash,R.CloseTag)),this},e.prototype._pushContext=function(t,n){var r=new e.Context(t,n);return this._ctxStack.push(r),r},e.prototype._popContext=function(){return this._ctxStack.pop()},e.prototype._peekContext=function(){return this._ctxStack[this._ctxStack.length-1]},Object.defineProperty(e.prototype,"_contextDepth",{get:function(){return this._ctxStack.length},enumerable:!1,configurable:!0}),e.prototype._writeAttStr=function(t,e){this._w.write(R.Space,t,R.Equal,R.Quote,this._escAttr(e),R.Quote)},e.prototype._lookupPrefix=function(t){var e,n=this._ctxStack.length-1;if(n>=0)do{var r=null===(e=this._ctxStack[n--].ns2prefix)||void 0===e?void 0:e.get(t);if(r)return r}while(n>=0)},e.prototype._escText=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},e.prototype._escAttr=function(t){return this._escText(t).replace(/"/g,""").replace(/'/g,"'")},e.prototype._isXmlnsDecl=function(t,e){if(t)return t===R.Xmlns;var n=e.length,r=R.Xmlns.length;return n>=r&&e.startsWith(R.Xmlns)&&(e.length==r||e[r]==R.Semicolon)},e.prototype._registerNamespace=function(t,e,n){if(e===R.Xml||e===R.Xmlns)throw new Error("reserved prefix '".concat(e,"'"));var r=t.prefix2ns.get(e);if(r&&r!==n)throw new Error("prefix '".concat(e,"' already bound to a different namespace"));t.ns2prefix.get(n)||t.ns2prefix.set(n,e),t.prefix2ns.set(e,n)},e.prototype._allocPrefix=function(t){for(var e=1;;){var n="ns".concat(e++);if(!t.prefix2ns.has(n))return n}},e.prototype._ensurePrefixDeclared=function(t,e){var n=this._lookupPrefix(e);if(n)return n;if(t.closed)throw new Error("can not declare namespace after start tag closed for <".concat(t.name,">"));var r=this._allocPrefix(t);return this._writeAttStr("".concat(R.Xmlns,":").concat(r),e),this._registerNamespace(t,r,e),r},e.prototype._closeOpenTagIfNeeded=function(t){t.closed||(this._w.write(R.CloseTag),t.closed=!0)},e.Context=function(t,e){this.name="",this.closed=!1,this.lastToken=null,this.ns2prefix=new Map,this.prefix2ns=new Map,this.defaultNs=null,this.name=t,this.depth=e},e}(),E=function(){function t(){this.count=0,this._chunks=[]}return t.prototype.write=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return this;var n=t.join("");return this._chunks.push(n),this.count+=n.length,this},t.prototype.toString=function(){return this._chunks.join("")},t.prototype.clear=function(){this._chunks=[],this.count=0},t}(),F=function(){function t(t,e){void 0===e&&(e={}),this._sink=t,this._opts=e,this.count=0,this._encoder=new TextEncoder,this._pending="",this._pendingChars=0}return t.prototype.write=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)return this;var r=e.join("");if(0===r.length)return this;this._pending+=r,this._pendingChars+=r.length;var i=null!==(t=this._opts.flushChars)&&void 0!==t?t:65536;return this._pendingChars>=i&&this.flush(),this},t.prototype.flush=function(){if(0===this._pendingChars)return this;var t=this._encoder.encode(this._pending);return this._sink.push(t),this.count+=t.length,this._pending="",this._pendingChars=0,this},t.prototype.finish=function(){this.flush(),this._sink.push(new Uint8Array(0),!0)},t.prototype.clear=function(){this._pending="",this._pendingChars=0,this.count=0},t}(),z="http://schemas.microsoft.com/3dmanufacturing/core/2015/02",U="http://schemas.microsoft.com/3dmanufacturing/trianglesets/2021/07";t.ST_Unit=void 0,(B=t.ST_Unit||(t.ST_Unit={})).micron="micron",B.millimeter="millimeter",B.centimeter="centimeter",B.inch="inch",B.foot="foot",B.meter="meter",t.ST_ObjectType=void 0,(P=t.ST_ObjectType||(t.ST_ObjectType={})).model="model",P.solidsupport="solidsupport",P.support="support",P.surface="surface",P.other="other";var K,Z="http://schemas.openxmlformats.org/package/2006/content-types",L="http://schemas.openxmlformats.org/package/2006/relationships";t.KnownI3mfContentType=void 0,(K=t.KnownI3mfContentType||(t.KnownI3mfContentType={})).Relationships="application/vnd.openxmlformats-package.relationships+xml",K.Model="application/vnd.ms-package.3dmanufacturing-3dmodel+xml",K.Materials="application/vnd.ms-package.3dmanufacturing-material+xml",K.Colors="application/vnd.ms-package.3dmanufacturing-colors+xml",K.Texture="application/vnd.ms-package.3dmanufacturing-texture+xml",K.Texture2D="application/vnd.ms-package.3dmanufacturing-texture2d+xml",K.Production="application/vnd.ms-package.3dmanufacturing-production+xml",K.Slice="application/vnd.ms-package.3dmanufacturing-slice+xml",K.BeamLattice="application/vnd.ms-package.3dmanufacturing-beamlattice+xml",K.SecureContent="application/vnd.ms-package.3dmanufacturing-securecontent+xml",K.Png="image/png",K.Jpeg="image/jpeg",K.Tiff="image/tiff",K.Xml="application/xml";var G="_rels/",Q="3D/",V="3dmodel.model",W=".rels",$="[Content_Types].xml",q=function(){function t(){}return t.IsKnown=function(e){return t.Known.has(e)},t.IsThreeDimModel=function(e){return e===t.ThreeDimModel},t.ThreeDimModel="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel",t.Thumbnail="http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail",t.PrintTicket="http://schemas.microsoft.com/3dmanufacturing/2013/01/printticket",t.MustPreserve="http://schemas.openxmlformats.org/package/2006/relationships/mustpreserve",t.Known=new Set([t.ThreeDimModel,t.Thumbnail,t.PrintTicket,t.MustPreserve]),t}(),H=function(){function t(){this.items=[]}return o([f({ns:Z,name:"Types"})],t)}(),Y=function(){function t(t,e){this.ext=t,this.ct=e}return o([d({name:{ns:Z,name:"Extension"}})],t.prototype,"ext",void 0),o([d({name:{ns:Z,name:"ContentType"}})],t.prototype,"ct",void 0),o([f({ns:Z,name:"Default"})],t)}(),J=function(){function t(){this.items=[]}return o([f({ns:L,name:"Relationships"})],t)}(),tt=function(){function t(t,e,n){this.id=t,this.type=e,this.target=n}return o([d({name:"Id"})],t.prototype,"id",void 0),o([d({name:"Type"})],t.prototype,"type",void 0),o([d({name:"Target"})],t.prototype,"target",void 0),o([f({ns:L,name:"Relationship"})],t)}(),et=function(t,e,n){this.contentTypes=t,this.relationships=e,this.model=n},nt=function(){function t(t){this.values=t}return t.Zero=function(){return new t([0,0,0,0,0,0,0,0,0,0,0,0])},t.prototype.toString=function(){return this.values.join(" ")},t}(),rt=function(){function t(t){this.o=t,this._f=new C(t)}return t.prototype.toString=function(t){var e=this;return t.values.map(function(t){return e._f.toString(t)}).join(" ")},t}(),it=function(){function e(){this.unit=t.ST_Unit.millimeter}return e.KnownMeta=["Title","Designer","Description","Copyright","LicenseTerms","Rating","CreationDate","ModificationDate","Application"],o([d({name:"unit"})],e.prototype,"unit",void 0),o([d({name:"requiredextensions"})],e.prototype,"requiredextensions",void 0),o([d({name:"recommendedextensions"})],e.prototype,"recommendedextensions",void 0),o([f({ns:z,name:"model"})],e)}(),ot=function(){function t(t,e,n,r){this.name=t,this.value=e,this.preserve=n,this.type=r}return o([d({name:"name"})],t.prototype,"name",void 0),o([d({name:"preserve"})],t.prototype,"preserve",void 0),o([d({name:"type"})],t.prototype,"type",void 0),o([f({ns:z,name:"meta"})],t)}(),at=function(){function t(){this.metadata=[]}return o([f({ns:z,name:"metadatagroup"})],t)}(),st=function(){function t(){this.object=[]}return o([f({ns:z,name:"resources"})],t)}(),ut=function(){function e(e,n){void 0===n&&(n=t.ST_ObjectType.model),this.id=e,this.type=n}return o([d({name:"id"})],e.prototype,"id",void 0),o([d({name:"type"})],e.prototype,"type",void 0),o([d({name:"thumbnail"})],e.prototype,"thumbnail",void 0),o([d({name:"partnumber"})],e.prototype,"partnumber",void 0),o([d({name:"name"})],e.prototype,"name",void 0),o([d({name:"pid"})],e.prototype,"pid",void 0),o([d({name:"pindex"})],e.prototype,"pindex",void 0),o([f({ns:z,name:"object"})],e)}(),lt=function(){function t(t,e){this.vertices=null!=t?t:new ct,this.triangles=null!=e?e:new ht}return o([f({ns:z,name:"mesh"})],t)}(),ct=function(){function t(){this.vertex=[]}return o([f({ns:z,name:"vertices"})],t)}(),pt=function(){function t(t,e,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=n}return o([d({name:"x"})],t.prototype,"x",void 0),o([d({name:"y"})],t.prototype,"y",void 0),o([d({name:"z"})],t.prototype,"z",void 0),o([f({ns:z,name:"vertex"})],t)}(),ht=function(){function t(){this.triangle=[]}return o([f({ns:z,name:"triangles"})],t)}(),ft=function(){function t(t,e,n){this.v1=t,this.v2=e,this.v3=n}return o([d({name:"v1"})],t.prototype,"v1",void 0),o([d({name:"v2"})],t.prototype,"v2",void 0),o([d({name:"v3"})],t.prototype,"v3",void 0),o([d({name:"p1"})],t.prototype,"p1",void 0),o([d({name:"p2"})],t.prototype,"p2",void 0),o([d({name:"p3"})],t.prototype,"p3",void 0),o([d({name:"pid"})],t.prototype,"pid",void 0),o([f({ns:z,name:"triangle"})],t)}(),mt=function(){function t(){this.component=[]}return o([f({ns:z,name:"components"})],t)}(),dt=function(){function t(t,e){this.objectid=t,this.transform=e}return o([d({name:"objectid"})],t.prototype,"objectid",void 0),o([d({name:"transform",formatter:rt})],t.prototype,"transform",void 0),o([f({ns:z,name:"component"})],t)}(),vt=function(){function t(t){this.base=[],this.id=t}return o([d({name:"id"})],t.prototype,"id",void 0),o([f({ns:z,name:"basematerials"})],t)}(),_t=function(){function t(t,e){this.name=t,this.displaycolor=e}return o([d({name:"name"})],t.prototype,"name",void 0),o([d({name:"displaycolor"})],t.prototype,"displaycolor",void 0),o([f({ns:z,name:"base"})],t)}(),yt=function(){function t(){this.item=[]}return o([f({ns:z,name:"build"})],t)}(),gt=function(){function t(t,e,n){this.objectid=t,this.transform=e,this.partnumber=n}return o([d({name:"objectid"})],t.prototype,"objectid",void 0),o([d({name:"transform",formatter:rt})],t.prototype,"transform",void 0),o([d({name:"partnumber"})],t.prototype,"partnumber",void 0),o([f({ns:z,name:"item"})],t)}(),Tt=function(){function t(t,e){this._object=new ut(t,e)}return t.prototype.withName=function(t){return this._object.name=t,this},t.prototype.withThumbnail=function(t){return this._object.thumbnail=t,this},t.prototype.withProperty=function(t,e){return void 0===e&&(e=0),this._object.pid=t,this._object.id=e,this},t.prototype.build=function(){return this._object},t.prototype.reset=function(t,e){this._object=new ut(t,e)},t}(),wt=function(e){function n(n,r){void 0===r&&(r=t.ST_ObjectType.model);var i=e.call(this,n,r)||this;return i._object.content=new mt,i}return r(n,e),n.prototype.withComponent=function(t,e){return this._object.content.component.push(new dt(t,e)),this},n}(Tt),bt=function(e){function n(n){return e.call(this,n,t.ST_ObjectType.model)||this}return r(n,e),n.prototype.withPostProcessHandlers=function(t,e){return this._vh=t,this._th=e,this},n.prototype.withData=function(t){return this._object.content=this._buildMesh(t),this},n.prototype.withMaterial=function(t,e){return this._object.pid=t,this._object.pindex=e,this},n.prototype._buildMesh=function(t){var e=this._buildVertices(t.positions),n=this._buildTriangle(t.indices);return new lt(e,n)},n.prototype._buildVertices=function(t){var e=new ct;if(t)for(var n=0;n<t.length;){var r=t[n++],i=t[n++],o=t[n++],a=new pt(r,i,o);this._vh&&(a=this._vh(a)),e.vertex.push(a)}return e},n.prototype._buildTriangle=function(t){var e=new ht;if(t)for(var n=0;n<t.length;){var r=t[n++],i=t[n++],o=t[n++],a=new ft(r,i,o);this._th&&(a=this._th(a)),e.triangle.push(a)}return e},n}(Tt),Mt=function(){function t(t){this._m=new vt(t)}return t.prototype.withColor=function(t,e){var n;this._m.base=null!==(n=this._m.base)&&void 0!==n?n:[];var r=this._m.base.find(function(e){return e.name.toLowerCase()===t.toLowerCase()});return r?(r.displaycolor=this._rgbaToHex(e),this):(r=new _t(t,this._rgbaToHex(e)),this._m.base.push(r),this)},t.prototype.build=function(){return this._m},t.prototype._rgbaToHex=function(t){var e=function(t){return Math.round(Math.min(255,Math.max(0,255*Math.pow(t,1/2.2))))},n=e(t.r).toString(16).padStart(2,"0").toUpperCase(),r=e(t.g).toString(16).padStart(2,"0").toUpperCase(),i=e(t.b).toString(16).padStart(2,"0").toUpperCase();if("number"==typeof t.a){var o=Math.round(Math.min(255,Math.max(0,255*t.a))).toString(16).padStart(2,"0").toUpperCase();return"#".concat(n).concat(r).concat(i).concat(o)}return"#".concat(n).concat(r).concat(i)},t}(),xt=function(){function t(){this._model=new it,this._objects=new Map}return t.prototype.withMetaData=function(t,e,n,r){return this._model.metadata||(this._model.metadata=new Array),this._model.metadata.push(new ot(t,e,n,r)),this},t.prototype.withMaterial=function(t){var e,n;return t instanceof Mt&&(t=t.build()),t&&(this._model.resources=null!==(e=this._model.resources)&&void 0!==e?e:new st,this._model.resources.basematerials=null!==(n=this._model.resources.basematerials)&&void 0!==n?n:[],this._model.resources.basematerials.push(t)),this},t.prototype.withMesh=function(t){var e;return t instanceof bt&&(t=t.build()),this._model.resources=null!==(e=this._model.resources)&&void 0!==e?e:new st,this._model.resources.object.push(t),this},t.prototype.withComponents=function(t){var e;return t instanceof wt&&(t=t.build()),this._model.resources=null!==(e=this._model.resources)&&void 0!==e?e:new st,this._model.resources.object.push(t),this},t.prototype.withBuild=function(t,e,n){var r,i;return this._model.build=null!==(r=this._model.build)&&void 0!==r?r:new yt,null===(i=this._model.build.item)||void 0===i||i.push(new gt(t,e,n)),this},t.prototype.withUnit=function(t){return this._model.unit=t,this},t.prototype.reset=function(){return this._model=new it,this._objects=new Map,this},t.prototype.build=function(){var t,e,n,r;if(!(null===(e=null===(t=this._model.resources)||void 0===t?void 0:t.object)||void 0===e?void 0:e.length))throw new Error("Invalid state: resources MUST be defined ");if(!(null===(r=null===(n=this._model.build)||void 0===n?void 0:n.item)||void 0===r?void 0:r.length))throw new Error("Invalid state: Build MUST be defined ");return this._model},t.KnownMetaSet=new Set(it.KnownMeta.map(function(t){return t.toLowerCase()})),t}(),St=function(){function e(){}return e.prototype.withContentType=function(t){this._cts||(this._cts=new H);var e=this._cts.items;return e.some(function(e){return e.ext===t.ext&&e.ct===t.ct})||e.push(t),this},e.prototype.withRelationship=function(e){this._rs||(this._rs=new J);var n=this._rs.items;return n.some(function(t){return t.id===e.id})||n.push(e),this.withContentType(new Y("rels",t.KnownI3mfContentType.Relationships)),this},e.prototype.withModel=function(e){return e instanceof xt&&(e=e.build()),this._m=e,this.withContentType(new Y("model",t.KnownI3mfContentType.Model)),this},e.prototype.build=function(){if(!this._m)throw new Error("Invalid state: you Must provide at least a model.");var t="".concat(Q).concat(V);if(!this._rs){var e="/".concat(t);this.withRelationship(new tt("rel".concat(0),q.ThreeDimModel,e))}return new et(this._cts,this._rs,this._m)},e}(),Ct=function(){function e(t){this._o=t}return Object.defineProperty(e.prototype,"options",{get:function(){return this._o},enumerable:!1,configurable:!0}),e.prototype.serializeAsync=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return a(this,void 0,void 0,function(){var n,r,i,o,a,u,l;return s(this,function(s){switch(s.label){case 0:return[4,this.ensureZipLibReadyAsync()];case 1:if(!(n=s.sent()))return[2];if(r=n.Zip,i=n.ZipDeflate,!r||!i)throw new Error("fflate Zip / ZipDeflate not available");return o=function(t){return{push:function(e,n){return t.push(e,n)}}},a=function(t,e,n){var r=new i(e,{level:6});t.add(r);var a=o(r),s=new F(a),u=new I(s).dec("1.0","UTF-8");new X(u).serialize(n),s.finish()},(u=this.toDocument.apply(this,e))?(l=new r(t),a(l,$,u.contentTypes),a(l,"".concat(G).concat(W),u.relationships),a(l,"".concat(Q).concat(V),u.model),l.end(),[2]):[2]}})})},e.prototype.toDocument=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=(new xt).withUnit(null!==(n=null===(e=this._o)||void 0===e?void 0:e.unit)&&void 0!==n?n:t.ST_Unit.millimeter);if(this.options.metadata)for(var a in this.options.metadata)o.withMetaData(a,this.options.metadata[a]);return(new St).withModel(this.toModel.apply(this,u([o],r,!1))).build()},e}(),jt=function(){function t(){}return t.SerializeToMemoryAsync=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return a(this,void 0,void 0,function(){var n,r,i,o,a,l,c,p;return s(this,function(s){switch(s.label){case 0:return n=new Array,r=0,i=function(t,e,i){n.push(e),r+=e.length},[4,t.serializeAsync.apply(t,u([i],e,!1))];case 1:if(s.sent(),!r)return[2,void 0];for(o=new Uint8Array(r),a=0,l=0,c=n;l<c.length;l++)p=c[l],o.set(p,a),a+=p.length;return[2,o]}})})},t}(),Nt=function(){function t(){}return t.FFLATEUrl="https://unpkg.com/fflate@0.8.2",t}(),Ot=function(){function t(t,e,n){void 0===t&&(t=0),void 0===e&&(e=Number.MIN_SAFE_INTEGER),void 0===n&&(n=1),this._from=t,this._to=e,this._step=n,this._i=t}return t.prototype.next=function(){if(this._i<this._to)throw new Error("ST_ResourceID out of bound");var t=this._i;return this._i+=this._step,t},t.prototype.reset=function(){return this._i=this._from,this},t}(),kt=function(n){function o(t){return void 0===t&&(t={}),n.call(this,i(i({},o.DefaultOptions),t))||this}return r(o,n),o.prototype.toModel=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];n=n.filter(function(t){return t instanceof e.Mesh||t instanceof e.InstancedMesh});for(var i=new Ot,o=t,a=new Map,s=this.options.exportInstances?[]:null,u=0;u<n.length;u++){var l=n[u];if(l instanceof e.InstancedMesh)null==s||s.push(l);else{var c=l.name||"mesh".concat(u),p=l.getWorldMatrix(),h=this._handleBabylonTo3mfMatrixTransformToRef(p,nt.Zero());if(void 0!==(S=l.subMeshes))for(var f=1==S.length,m=0;m<S.length;m++){var d=S[m],v=this._extractSubMesh(l,d);if(v){var _=f?"".concat(c):"".concat(c,"_").concat(m),y=new bt(i.next()).withData(v).withName(_).build();o.withMesh(y),o.withBuild(y.id,h),a.set(d,y)}}}}if(s&&s.length)for(var g=this._groupBy(s,function(t){return t.sourceMesh}),T=0,w=Array.from(g.entries());T<w.length;T++){var b=w[T],M=b[0],x=b[1];if(x&&x.length)for(u=0;u<x.length;u++){p=x[u].getWorldMatrix();var S=M.subMeshes;for(m=0;m<S.length;m++){d=S[m];var C=a.get(d);C&&o.withBuild(C.id,this._handleBabylonTo3mfMatrixTransformToRef(p,nt.Zero()))}}}return o.build()},o.prototype.ensureZipLibReadyAsync=function(){return a(this,void 0,void 0,function(){var t=this;return s(this,function(n){switch(n.label){case 0:return this._fflateReadyPromise?[4,this._fflateReadyPromise]:[3,2];case 1:case 3:return[2,n.sent()];case 2:return this._fflateReadyPromise=a(t,void 0,void 0,function(){var t;return s(this,function(n){switch(n.label){case 0:return(t=globalThis).fflate?[3,2]:[4,e.Tools.LoadScriptAsync(Nt.FFLATEUrl)];case 1:n.sent(),n.label=2;case 2:return[2,t.fflate]}})}),[4,this._fflateReadyPromise]}})})},o.prototype._extractSubMesh=function(t,e){var n=t.getIndices();if(n){var r=t.getVerticesData(o._PositionKind);if(r){if(0==e.indexStart&&e.indexCount==n.length)return{positions:r,indices:n};for(var i=e.indexStart,a=new Map,s=[],u=new Uint32Array(e.indexCount),l=0;l<e.indexCount;l++){var c=n[i+l],p=a.get(c);if(void 0===p){p=a.size,a.set(c,p);var h=3*c;s.push(r[h],r[h+1],r[h+2])}u[l]=p}return{positions:new Float32Array(s),indices:u}}}},o.prototype._groupBy=function(t,e){for(var n=new Map,r=0,i=t;r<i.length;r++){var o=i[r],a=e(o),s=n.get(a);s?s.push(o):n.set(a,[o])}return n},o.prototype._handleBabylonTo3mfMatrixTransformToRef=function(t,n){var r=t.multiplyToRef(o._R_BJS_TO_3MF,e.Matrix.Zero()).m;return n.values=[r[0],r[1],r[2],r[4],r[5],r[6],r[8],r[9],r[10],r[12],r[13],r[14]],n},o.DefaultOptions={unit:t.ST_Unit.meter,exportInstances:!1},o._PositionKind="position",o._R_BJS_TO_3MF=e.Matrix.RotationX(Math.PI/2).multiply(e.Matrix.Scaling(1,-1,1)),o}(Ct),Dt={__proto__:null,AbstractThreeMfSerializer:Ct,ContentTypeFileName:$,DefaultXmlSerializerFormatOptions:M,DefaultXmlSerializerNumberOptions:b,GetXmlFieldMeta:_,GetXmlName:y,IsQualifiedName:l,Known3mfRelationshipTypes:q,get KnownI3mfContentType(){return t.KnownI3mfContentType},Matrix3d:nt,MatrixFormatter:rt,ModelFileName:V,NumberFormatter:C,Object3dDirName:Q,OpenXmlContentTypesNamespace:Z,OpenXmlRelationshipsNamespace:L,RelationshipDirName:G,RelationshipFileName:W,ResolveFormatOptions:S,ResolveNumberOptions:x,get ST_ObjectType(){return t.ST_ObjectType},get ST_Unit(){return t.ST_Unit},StringXmlWriter:E,ThreeDimModelNamespace:z,ThreeMf:jt,ThreeMfBase:_t,ThreeMfBaseMaterials:vt,ThreeMfBuild:yt,ThreeMfComponent:dt,ThreeMfComponents:mt,ThreeMfComponentsBuilder:wt,ThreeMfContentType:Y,ThreeMfContentTypes:H,ThreeMfDocument:et,ThreeMfDocumentBuilder:St,ThreeMfItem:gt,ThreeMfMaterialBuilder:Mt,ThreeMfMesh:lt,ThreeMfMeshBuilder:bt,ThreeMfMeta:ot,ThreeMfMetadataGroup:at,ThreeMfModel:it,ThreeMfModelBuilder:xt,ThreeMfObject:ut,ThreeMfObjectBuilder:Tt,ThreeMfRelationship:tt,ThreeMfRelationships:J,ThreeMfResources:st,ThreeMfSerializer:kt,ThreeMfSerializerGlobalConfiguration:Nt,ThreeMfTriangle:ft,ThreeMfTriangles:ht,ThreeMfVertex:pt,ThreeMfVertices:ct,ToQualifiedString:w,get TokenType(){return t.TokenType},TriangleSetsNamespace:U,Utf8XmlWriterToBytes:F,XmlAttr:d,XmlBuilder:I,XmlElem:v,XmlIgnore:m,XmlName:f,XmlNameToParts:T,XmlSerializer:X},At="undefined"!=typeof global?global:"undefined"!=typeof window?window:void 0;if(void 0!==At){var Xt=[];for(var Rt in Dt)Xt.indexOf(Rt)>-1||(At.BABYLON[Rt]=Dt[Rt],Xt.push(Rt))}t.AbstractThreeMfSerializer=Ct,t.ContentTypeFileName=$,t.DefaultXmlSerializerFormatOptions=M,t.DefaultXmlSerializerNumberOptions=b,t.GetXmlFieldMeta=_,t.GetXmlName=y,t.IsQualifiedName=l,t.Known3mfRelationshipTypes=q,t.Matrix3d=nt,t.MatrixFormatter=rt,t.ModelFileName=V,t.NumberFormatter=C,t.Object3dDirName=Q,t.OpenXmlContentTypesNamespace=Z,t.OpenXmlRelationshipsNamespace=L,t.RelationshipDirName=G,t.RelationshipFileName=W,t.ResolveFormatOptions=S,t.ResolveNumberOptions=x,t.StringXmlWriter=E,t.ThreeDimModelNamespace=z,t.ThreeMf=jt,t.ThreeMfBase=_t,t.ThreeMfBaseMaterials=vt,t.ThreeMfBuild=yt,t.ThreeMfComponent=dt,t.ThreeMfComponents=mt,t.ThreeMfComponentsBuilder=wt,t.ThreeMfContentType=Y,t.ThreeMfContentTypes=H,t.ThreeMfDocument=et,t.ThreeMfDocumentBuilder=St,t.ThreeMfItem=gt,t.ThreeMfMaterialBuilder=Mt,t.ThreeMfMesh=lt,t.ThreeMfMeshBuilder=bt,t.ThreeMfMeta=ot,t.ThreeMfMetadataGroup=at,t.ThreeMfModel=it,t.ThreeMfModelBuilder=xt,t.ThreeMfObject=ut,t.ThreeMfObjectBuilder=Tt,t.ThreeMfRelationship=tt,t.ThreeMfRelationships=J,t.ThreeMfResources=st,t.ThreeMfSerializer=kt,t.ThreeMfSerializerGlobalConfiguration=Nt,t.ThreeMfTriangle=ft,t.ThreeMfTriangles=ht,t.ThreeMfVertex=pt,t.ThreeMfVertices=ct,t.ToQualifiedString=w,t.TriangleSetsNamespace=U,t.Utf8XmlWriterToBytes=F,t.XmlAttr=d,t.XmlBuilder=I,t.XmlElem=v,t.XmlIgnore=m,t.XmlName=f,t.XmlNameToParts=T,t.XmlSerializer=X});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("babylonjs")):"function"==typeof define&&define.amd?define(["exports","babylonjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BABYLON=e.BABYLON||{},e.BABYLON)}(this,function(e,t){"use strict";function n(e){return"string"==typeof(null==e?void 0:e.name)}const i=Symbol("__xml:meta$__"),a=Symbol("__xml:name$__");function s(e,t){Object.prototype.hasOwnProperty.call(e.metadata,i)||(e.metadata[i]=[]),e.metadata[i].push(t)}function r(e){return(t,n)=>{t[a]=e}}function o(){return(e,t)=>s(t,{kind:"none",prop:String(t.name),ignore:!0})}function l(e){return(t,n)=>s(n,Object.assign({kind:"attr",prop:String(n.name)},e))}function c(e){return(t,n)=>s(n,Object.assign({kind:"elem",prop:String(n.name)},e))}function u(e){const t="function"==typeof e?e:null==e?void 0:e.constructor,n=null==t?void 0:t[Symbol.metadata];if(!n)return[];const a=[];let s=n;for(;s;)Object.prototype.hasOwnProperty.call(s,i)&&a.push(...s[i]),s=Object.getPrototypeOf(s);return a}function m(e){var t;return(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t[a])||void 0}function h(e){return/^[A-Za-z_][A-Za-z0-9._-]*$/.test(e)}function d(e){if(n(e))return e;const t=(null!=e?e:"").trim();if(!t)return{name:""};const i=t.indexOf(":");if(-1===i)return{name:t};if(-1!==t.indexOf(":",i+1))return{name:t};const a=t.slice(0,i),s=t.slice(i+1);return h(a)&&h(s)?{ns:a,name:s}:{name:t}}function p(e,t){return t?`${t}:${e}`:e}const f=Object.freeze({eps:1e-6,maxDecimalsCap:15,trimTrailingZeros:!0,allowScientific:!1,snapNearZero:!0}),b=Object.freeze({number:f});function v(e){var t,n,i,a,s,r;const o=null!==(t=null==e?void 0:e.eps)&&void 0!==t?t:f.eps;return{eps:o,maxDecimalsCap:null!==(n=null==e?void 0:e.maxDecimalsCap)&&void 0!==n?n:f.maxDecimalsCap,trimTrailingZeros:null!==(i=null==e?void 0:e.trimTrailingZeros)&&void 0!==i?i:f.trimTrailingZeros,fixedDecimals:null==e?void 0:e.fixedDecimals,allowScientific:null!==(a=null==e?void 0:e.allowScientific)&&void 0!==a?a:f.allowScientific,snapNearZero:null!==(s=null==e?void 0:e.snapNearZero)&&void 0!==s?s:f.snapNearZero,zeroThreshold:null!==(r=null==e?void 0:e.zeroThreshold)&&void 0!==r?r:o,perAttributeEps:null==e?void 0:e.perAttributeEps}}function g(e){return{number:v(null==e?void 0:e.number)}}class _{constructor(e){if(this.o=e,this._o=e.number,!Number.isFinite(this._o.eps)||this._o.eps<=0)throw new Error("opts.eps must be a finite, positive number")}toString(e){var t,n,i,a;if(!Number.isFinite(e))throw new Error(`Cannot format non-finite number: ${e}`);const s=this._o,r=this._clampInt(null!==(t=s.maxDecimalsCap)&&void 0!==t?t:15,0,20),o=null===(n=s.trimTrailingZeros)||void 0===n||n,l=null===(i=s.snapNearZero)||void 0===i||i,c=null!==(a=s.zeroThreshold)&&void 0!==a?a:s.eps,u=1/s.eps;let m,h=Math.round(e*u)/u;if(Object.is(h,-0)&&(h=0),l&&Math.abs(h)<=c&&(h=0),m=void 0!==s.fixedDecimals?this._clampInt(s.fixedDecimals,0,r):this._clampInt(Math.ceil(-Math.log10(s.eps)),0,r),s.allowScientific,0===m)return String(Math.trunc(h));let d=h.toFixed(m);if(o&&void 0===s.fixedDecimals&&(d=d.replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,"").replace(/\.$/,"")),/[eE]/.test(d))throw new Error(`Scientific notation not allowed in XML output: ${d}`);return d}_clampInt(e,t,n){return Number.isFinite(e)?(e=Math.trunc(e),Math.max(t,Math.min(n,e))):t}}function y(e){return e instanceof Date}function T(e){return"string"==typeof e}function w(e){return"number"==typeof e}function M(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"bigint"==typeof e||y(e)}function x(e){return"number"==typeof e||"boolean"==typeof e||"bigint"==typeof e||y(e)}class S{constructor(e,t){this._ns=new Map,this._prefixCount=0,this._builder=e,this._format=g(t),this._nFmt=new _(this._format)}withNamespace(...e){for(const t of e)this._assignNamespace(t);return this}serialize(e,t){if(!(t=null!=t?t:m(e)))throw new Error("can not find name for given object");const n=d(t);n.ns&&this._assignNamespace(n.ns,"xmlns"),this._gatherNamespaces(e,new WeakSet);const i=this._builder.ele(null,n.name);for(const[e,t]of Array.from(this._ns.entries()))i.att("xmlns",t,e);this._writeObjectContent(i,e,(new WeakSet).add(e)),this._builder.end()}_writeObject(e,t,n){if(n.has(t))return;if(n.add(t),Array.isArray(t)){for(const i of t)x(i)||(T(i)?this._builder.text(i):this._writeObject(e,i,n));return}const i=m(t);if(!i)return;const a=d(i),s=this._getPrefix(a),r=p(a.name,s);e.ele(null,r),this._writeObjectContent(e,t,n),this._builder.end()}_getPrefix(e){if(e.ns){const t=this._ns.get(e.ns.toLowerCase());if("xmlns"!==t)return t}}_writeObjectContent(e,t,n){var i,a,s;const r=null!==(i=u(t))&&void 0!==i?i:[],o=new Map;for(const e of r){const t=null!==(a=o.get(e.prop))&&void 0!==a?a:[];t.push(e),o.set(e.prop,t)}const l=Object.keys(t).sort((e,t)=>{var n,i;const a=(null!==(n=o.get(e))&&void 0!==n?n:[]).some(e=>"attr"===e.kind);return a===(null!==(i=o.get(t))&&void 0!==i?i:[]).some(e=>"attr"===e.kind)?0:a?-1:1});for(const i of l){const a=t[i];if(null==a)continue;const r=o.get(i);if(r){if(r.some(e=>!0===e.ignore||"none"===e.kind))continue;for(const t of r){const n=null!==(s=t.name)&&void 0!==s?s:t.prop.toLowerCase();if(n)switch(t.kind){case"attr":{let i=null;if(w(a)&&this._nFmt&&(i=this._nFmt.toString(a)),t.formatter&&(i=new t.formatter(this._format).toString(a)),i=null!=i?i:a.toString(),i){const t=d(n),a=this._getPrefix(t),s=p(t.name,a);e.att(null,s,i)}break}}}}else x(a)||(T(a)?this._builder.text(a):this._writeObject(e,a,n))}}_gatherNamespaces(e,t){var n,i;if(t.has(e))return;if(t.add(e),Array.isArray(e)){for(const n of e)M(n)||this._gatherNamespaces(n,t);return}const a=m(e);a&&this._assignNamespace(a);const s=null!==(n=u(e))&&void 0!==n?n:[],r=new Map;for(const e of s){const t=null!==(i=r.get(e.prop))&&void 0!==i?i:[];t.push(e),r.set(e.prop,t)}const o=[];for(const t of Object.keys(e)){const n=e[t];if(null==n)continue;const i=r.get(t);if(i){if(i.some(e=>!0===e.ignore||"none"===e.kind))continue;for(const e of i)e.name&&this._assignNamespace(e.name)}o.push(n)}for(const e of o)M(e)||this._gatherNamespaces(e,t)}_assignNamespace(e,t){const n=d(e);if(null==n?void 0:n.ns){const e=n.ns.toLowerCase();return void(this._ns.get(e)||this._ns.set(e,null!=t?t:this._buildNsPrefix(e)))}if("xmlns"===t){const e=n.name.toLowerCase();this._ns.get(e)||this._ns.set(e,null!=t?t:this._buildNsPrefix(e))}}_buildNsPrefix(e){let t,n=!1;do{t="ns"+this._prefixCount++;for(const e of Array.from(this._ns.values()))if(e===t){n=!0;break}}while(n);return t}}class j{}var k;j.OpenTag="<",j.CloseTag=">",j.Slash="/",j.Question="?",j.Quote='"',j.Equal="=",j.Space=" ",j.Semicolon=":",j.Dec="<?xml",j.Xml="xml",j.Xmlns="xmlns",j.Xsi="xsi",j.VersionKeyword="version",j.EncodingKeyword="encoding",j.StandaloneKeyword="standalone",e.TokenType=void 0,(k=e.TokenType||(e.TokenType={}))[k.Declaration=0]="Declaration",k[k.Tag=1]="Tag",k[k.Attribute=2]="Attribute",k[k.Text=3]="Text";class O{constructor(e){this._ctxStack=[],this._d=0,this._w=e}dec(e,t,n){return this._w.write(j.Dec),this._writeAttStr(j.VersionKeyword,e),t&&this._writeAttStr(j.EncodingKeyword,t),void 0!==n&&this._writeAttStr(j.StandaloneKeyword,n?"yes":"no"),this._w.write(j.Question,j.CloseTag),this}att(t,n,i){const a=this._peekContext();if(!a)throw new Error("att() without open element");if(a.closed)throw new Error(`att() after start tag closed for <${a.name}>`);if(this._isXmlnsDecl(t,n)){if(n===j.Xmlns)a.defaultNs=i,this._registerNamespace(a,"",i),this._writeAttStr(j.Xmlns,i);else if(t)this._registerNamespace(a,n,i),this._writeAttStr(`${t}:${n}`,i);else{const e=n.slice(6);this._registerNamespace(a,e,i),this._writeAttStr(n,i)}return a.lastToken=e.TokenType.Attribute,this}let s=n;return t&&(s=`${this._ensurePrefixDeclared(a,t)}:${n}`),a.lastToken=e.TokenType.Attribute,this._writeAttStr(s,i),this}ele(e,t){var n;const i=this._peekContext();i&&this._closeOpenTagIfNeeded(i);let a=t;return e&&(a=`${null!==(n=this._lookupPrefix(e))&&void 0!==n?n:e}:${t}`),this._pushContext(a,++this._d),this._w.write(j.OpenTag,a),this}text(t){const n=this._peekContext();if(!n)throw new Error("text() without open element");return this._closeOpenTagIfNeeded(n),n.lastToken=e.TokenType.Text,this._w.write(this._escText(t)),this}end(){const e=this._popContext();return e&&(this._d--,e.closed?this._w.write(j.OpenTag,j.Slash,e.name,j.CloseTag):this._w.write(j.Slash,j.CloseTag)),this}_pushContext(e,t){const n=new O.Context(e,t);return this._ctxStack.push(n),n}_popContext(){return this._ctxStack.pop()}_peekContext(){return this._ctxStack[this._ctxStack.length-1]}get _contextDepth(){return this._ctxStack.length}_writeAttStr(e,t){this._w.write(j.Space,e,j.Equal,j.Quote,this._escAttr(t),j.Quote)}_lookupPrefix(e){var t;let n=this._ctxStack.length-1;if(n>=0)do{const i=null===(t=this._ctxStack[n--].ns2prefix)||void 0===t?void 0:t.get(e);if(i)return i}while(n>=0)}_escText(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}_escAttr(e){return this._escText(e).replace(/"/g,""").replace(/'/g,"'")}_isXmlnsDecl(e,t){if(e)return e===j.Xmlns;const n=t.length,i=j.Xmlns.length;return n>=i&&t.startsWith(j.Xmlns)&&(t.length==i||t[i]==j.Semicolon)}_registerNamespace(e,t,n){if(t===j.Xml||t===j.Xmlns)throw new Error(`reserved prefix '${t}'`);const i=e.prefix2ns.get(t);if(i&&i!==n)throw new Error(`prefix '${t}' already bound to a different namespace`);e.ns2prefix.get(n)||e.ns2prefix.set(n,t),e.prefix2ns.set(t,n)}_allocPrefix(e){let t=1;for(;;){const n="ns"+t++;if(!e.prefix2ns.has(n))return n}}_ensurePrefixDeclared(e,t){const n=this._lookupPrefix(t);if(n)return n;if(e.closed)throw new Error(`can not declare namespace after start tag closed for <${e.name}>`);const i=this._allocPrefix(e);return this._writeAttStr(`${j.Xmlns}:${i}`,t),this._registerNamespace(e,i,t),i}_closeOpenTagIfNeeded(e){e.closed||(this._w.write(j.CloseTag),e.closed=!0)}}O.Context=class{constructor(e,t){this.name="",this.closed=!1,this.lastToken=null,this.ns2prefix=new Map,this.prefix2ns=new Map,this.defaultNs=null,this.name=e,this.depth=t}};class C{constructor(){this.count=0,this._chunks=[]}write(...e){if(0===e.length)return this;const t=e.join("");return this._chunks.push(t),this.count+=t.length,this}toString(){return this._chunks.join("")}clear(){this._chunks=[],this.count=0}}class N{constructor(e,t={}){this._sink=e,this._opts=t,this.count=0,this._encoder=new TextEncoder,this._pending="",this._pendingChars=0}write(...e){var t;if(0===e.length)return this;const n=e.join("");if(0===n.length)return this;this._pending+=n,this._pendingChars+=n.length;const i=null!==(t=this._opts.flushChars)&&void 0!==t?t:65536;return this._pendingChars>=i&&this.flush(),this}flush(){if(0===this._pendingChars)return this;const e=this._encoder.encode(this._pending);return this._sink.push(e),this.count+=e.length,this._pending="",this._pendingChars=0,this}finish(){this.flush(),this._sink.push(new Uint8Array(0),!0)}clear(){this._pending="",this._pendingChars=0,this.count=0}}const D="http://schemas.microsoft.com/3dmanufacturing/core/2015/02",P="http://schemas.microsoft.com/3dmanufacturing/trianglesets/2021/07";var A,X;e.ST_Unit=void 0,(A=e.ST_Unit||(e.ST_Unit={})).micron="micron",A.millimeter="millimeter",A.centimeter="centimeter",A.inch="inch",A.foot="foot",A.meter="meter",e.ST_ObjectType=void 0,(X=e.ST_ObjectType||(e.ST_ObjectType={})).model="model",X.solidsupport="solidsupport",X.support="support",X.surface="surface",X.other="other";const B="http://schemas.openxmlformats.org/package/2006/content-types",R="http://schemas.openxmlformats.org/package/2006/relationships";var $;e.KnownI3mfContentType=void 0,($=e.KnownI3mfContentType||(e.KnownI3mfContentType={})).Relationships="application/vnd.openxmlformats-package.relationships+xml",$.Model="application/vnd.ms-package.3dmanufacturing-3dmodel+xml",$.Materials="application/vnd.ms-package.3dmanufacturing-material+xml",$.Colors="application/vnd.ms-package.3dmanufacturing-colors+xml",$.Texture="application/vnd.ms-package.3dmanufacturing-texture+xml",$.Texture2D="application/vnd.ms-package.3dmanufacturing-texture2d+xml",$.Production="application/vnd.ms-package.3dmanufacturing-production+xml",$.Slice="application/vnd.ms-package.3dmanufacturing-slice+xml",$.BeamLattice="application/vnd.ms-package.3dmanufacturing-beamlattice+xml",$.SecureContent="application/vnd.ms-package.3dmanufacturing-securecontent+xml",$.Png="image/png",$.Jpeg="image/jpeg",$.Tiff="image/tiff",$.Xml="application/xml";const I="_rels/",E="3D/",z="3dmodel.model",F=".rels",U="[Content_Types].xml";class K{static IsKnown(e){return K.Known.has(e)}static IsThreeDimModel(e){return e===K.ThreeDimModel}}function Z(e,t,n,i,a,s){function r(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var o,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?i.static?e:e.prototype:null,m=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),h=!1,d=n.length-1;d>=0;d--){var p={};for(var f in i)p[f]="access"===f?{}:i[f];for(var f in i.access)p.access[f]=i.access[f];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");s.push(r(e||null))};var b=(0,n[d])("accessor"===l?{get:m.get,set:m.set}:m[c],p);if("accessor"===l){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(o=r(b.get))&&(m.get=o),(o=r(b.set))&&(m.set=o),(o=r(b.init))&&a.unshift(o)}else(o=r(b))&&("field"===l?a.unshift(o):m[c]=o)}u&&Object.defineProperty(u,i.name,m),h=!0}function L(e,t,n){for(var i=arguments.length>2,a=0;a<t.length;a++)n=i?t[a].call(e,n):t[a].call(e);return i?n:void 0}function V(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function q(e,t,n,i){return new(n||(n=Promise))(function(a,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(r,o)}l((i=i.apply(e,t||[])).next())})}K.ThreeDimModel="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel",K.Thumbnail="http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail",K.PrintTicket="http://schemas.microsoft.com/3dmanufacturing/2013/01/printticket",K.MustPreserve="http://schemas.openxmlformats.org/package/2006/relationships/mustpreserve",K.Known=new Set([K.ThreeDimModel,K.Thumbnail,K.PrintTicket,K.MustPreserve]),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;let G=(()=>{let e,t,n=[r({ns:B,name:"Types"})],i=[];return t=class{constructor(){this.items=[]}},V(t,"ThreeMfContentTypes"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),Q=(()=>{let e,t,n,i,a=[r({ns:B,name:"Default"})],s=[],o=[],c=[],u=[],m=[];return t=class{constructor(e,t){this.ext=L(this,o,void 0),this.ct=(L(this,c),L(this,u,void 0)),L(this,m),this.ext=e,this.ct=t}},V(t,"ThreeMfContentType"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:{ns:B,name:"Extension"}})],i=[l({name:{ns:B,name:"ContentType"}})],Z(null,null,n,{kind:"field",name:"ext",static:!1,private:!1,access:{has:e=>"ext"in e,get:e=>e.ext,set:(e,t)=>{e.ext=t}},metadata:r},o,c),Z(null,null,i,{kind:"field",name:"ct",static:!1,private:!1,access:{has:e=>"ct"in e,get:e=>e.ct,set:(e,t)=>{e.ct=t}},metadata:r},u,m),Z(null,e={value:t},a,{kind:"class",name:t.name,metadata:r},null,s),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,s)})(),t})(),W=(()=>{let e,t,n=[r({ns:R,name:"Relationships"})],i=[];return t=class{constructor(){this.items=[]}},V(t,"ThreeMfRelationships"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),H=(()=>{let e,t,n,i,a,s=[r({ns:R,name:"Relationship"})],o=[],c=[],u=[],m=[],h=[],d=[],p=[];return t=class{constructor(e,t,n){this.id=L(this,c,void 0),this.type=(L(this,u),L(this,m,void 0)),this.target=(L(this,h),L(this,d,void 0)),L(this,p),this.id=e,this.type=t,this.target=n}},V(t,"ThreeMfRelationship"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"Id"})],i=[l({name:"Type"})],a=[l({name:"Target"})],Z(null,null,n,{kind:"field",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:r},c,u),Z(null,null,i,{kind:"field",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:r},m,h),Z(null,null,a,{kind:"field",name:"target",static:!1,private:!1,access:{has:e=>"target"in e,get:e=>e.target,set:(e,t)=>{e.target=t}},metadata:r},d,p),Z(null,e={value:t},s,{kind:"class",name:t.name,metadata:r},null,o),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,o)})(),t})();class Y{constructor(e,t,n){this.contentTypes=e,this.relationships=t,this.model=n}}class J{static Zero(){return new J([0,0,0,0,0,0,0,0,0,0,0,0])}constructor(e){this.values=e}toString(){return this.values.join(" ")}}class ee{constructor(e){this.o=e,this._f=new _(e)}toString(e){return e.values.map(e=>this._f.toString(e)).join(" ")}}let te=(()=>{let t,n,i,a,s,o=[r({ns:D,name:"model"})],c=[],u=[],m=[],h=[],d=[],p=[],f=[];return n=class{constructor(){this.unit=L(this,u,e.ST_Unit.millimeter),this.requiredextensions=(L(this,m),L(this,h,void 0)),this.recommendedextensions=(L(this,d),L(this,p,void 0)),this.metadata=L(this,f)}},V(n,"ThreeMfModel"),(()=>{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i=[l({name:"unit"})],a=[l({name:"requiredextensions"})],s=[l({name:"recommendedextensions"})],Z(null,null,i,{kind:"field",name:"unit",static:!1,private:!1,access:{has:e=>"unit"in e,get:e=>e.unit,set:(e,t)=>{e.unit=t}},metadata:e},u,m),Z(null,null,a,{kind:"field",name:"requiredextensions",static:!1,private:!1,access:{has:e=>"requiredextensions"in e,get:e=>e.requiredextensions,set:(e,t)=>{e.requiredextensions=t}},metadata:e},h,d),Z(null,null,s,{kind:"field",name:"recommendedextensions",static:!1,private:!1,access:{has:e=>"recommendedextensions"in e,get:e=>e.recommendedextensions,set:(e,t)=>{e.recommendedextensions=t}},metadata:e},p,f),Z(null,t={value:n},o,{kind:"class",name:n.name,metadata:e},null,c),n=t.value,e&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})(),n.KnownMeta=["Title","Designer","Description","Copyright","LicenseTerms","Rating","CreationDate","ModificationDate","Application"],L(n,c),n})(),ne=(()=>{let e,t,n,i,a,s=[r({ns:D,name:"meta"})],o=[],c=[],u=[],m=[],h=[],d=[],p=[];return t=class{constructor(e,t,n,i){this.name=L(this,c,void 0),this.preserve=(L(this,u),L(this,m,void 0)),this.type=(L(this,h),L(this,d,void 0)),this.value=L(this,p),this.name=e,this.value=t,this.preserve=n,this.type=i}},V(t,"ThreeMfMeta"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"name"})],i=[l({name:"preserve"})],a=[l({name:"type"})],Z(null,null,n,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:r},c,u),Z(null,null,i,{kind:"field",name:"preserve",static:!1,private:!1,access:{has:e=>"preserve"in e,get:e=>e.preserve,set:(e,t)=>{e.preserve=t}},metadata:r},m,h),Z(null,null,a,{kind:"field",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:r},d,p),Z(null,e={value:t},s,{kind:"class",name:t.name,metadata:r},null,o),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,o)})(),t})(),ie=(()=>{let e,t,n=[r({ns:D,name:"metadatagroup"})],i=[];return t=class{constructor(){this.metadata=[]}},V(t,"ThreeMfMetadataGroup"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),ae=(()=>{let e,t,n=[r({ns:D,name:"resources"})],i=[];return t=class{constructor(){this.object=[]}},V(t,"ThreeMfResources"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),se=(()=>{let t,n,i,a,s,o,c,u,m,h=[r({ns:D,name:"object"})],d=[],p=[],f=[],b=[],v=[],g=[],_=[],y=[],T=[],w=[],M=[],x=[],S=[],j=[],k=[];return n=class{constructor(t,n=e.ST_ObjectType.model){this.id=L(this,p,void 0),this.type=(L(this,f),L(this,b,void 0)),this.thumbnail=(L(this,v),L(this,g,void 0)),this.partnumber=(L(this,_),L(this,y,void 0)),this.name=(L(this,T),L(this,w,void 0)),this.pid=(L(this,M),L(this,x,void 0)),this.pindex=(L(this,S),L(this,j,void 0)),this.metadatagroup=L(this,k),this.id=t,this.type=n}},V(n,"ThreeMfObject"),(()=>{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;i=[l({name:"id"})],a=[l({name:"type"})],s=[l({name:"thumbnail"})],o=[l({name:"partnumber"})],c=[l({name:"name"})],u=[l({name:"pid"})],m=[l({name:"pindex"})],Z(null,null,i,{kind:"field",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:e},p,f),Z(null,null,a,{kind:"field",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:e},b,v),Z(null,null,s,{kind:"field",name:"thumbnail",static:!1,private:!1,access:{has:e=>"thumbnail"in e,get:e=>e.thumbnail,set:(e,t)=>{e.thumbnail=t}},metadata:e},g,_),Z(null,null,o,{kind:"field",name:"partnumber",static:!1,private:!1,access:{has:e=>"partnumber"in e,get:e=>e.partnumber,set:(e,t)=>{e.partnumber=t}},metadata:e},y,T),Z(null,null,c,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:e},w,M),Z(null,null,u,{kind:"field",name:"pid",static:!1,private:!1,access:{has:e=>"pid"in e,get:e=>e.pid,set:(e,t)=>{e.pid=t}},metadata:e},x,S),Z(null,null,m,{kind:"field",name:"pindex",static:!1,private:!1,access:{has:e=>"pindex"in e,get:e=>e.pindex,set:(e,t)=>{e.pindex=t}},metadata:e},j,k),Z(null,t={value:n},h,{kind:"class",name:n.name,metadata:e},null,d),n=t.value,e&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),L(n,d)})(),n})(),re=(()=>{let e,t,n=[r({ns:D,name:"mesh"})],i=[];return t=class{constructor(e,t){this.vertices=null!=e?e:new oe,this.triangles=null!=t?t:new ce}},V(t,"ThreeMfMesh"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),oe=(()=>{let e,t,n=[r({ns:D,name:"vertices"})],i=[];return t=class{constructor(){this.vertex=[]}},V(t,"ThreeMfVertices"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),le=(()=>{let e,t,n,i,a,s=[r({ns:D,name:"vertex"})],o=[],c=[],u=[],m=[],h=[],d=[],p=[];return t=class{constructor(e=0,t=0,n=0){this.x=L(this,c,void 0),this.y=(L(this,u),L(this,m,void 0)),this.z=(L(this,h),L(this,d,void 0)),L(this,p),this.x=e,this.y=t,this.z=n}},V(t,"ThreeMfVertex"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"x"})],i=[l({name:"y"})],a=[l({name:"z"})],Z(null,null,n,{kind:"field",name:"x",static:!1,private:!1,access:{has:e=>"x"in e,get:e=>e.x,set:(e,t)=>{e.x=t}},metadata:r},c,u),Z(null,null,i,{kind:"field",name:"y",static:!1,private:!1,access:{has:e=>"y"in e,get:e=>e.y,set:(e,t)=>{e.y=t}},metadata:r},m,h),Z(null,null,a,{kind:"field",name:"z",static:!1,private:!1,access:{has:e=>"z"in e,get:e=>e.z,set:(e,t)=>{e.z=t}},metadata:r},d,p),Z(null,e={value:t},s,{kind:"class",name:t.name,metadata:r},null,o),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,o)})(),t})(),ce=(()=>{let e,t,n=[r({ns:D,name:"triangles"})],i=[];return t=class{constructor(){this.triangle=[]}},V(t,"ThreeMfTriangles"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),ue=(()=>{let e,t,n,i,a,s,o,c,u,m=[r({ns:D,name:"triangle"})],h=[],d=[],p=[],f=[],b=[],v=[],g=[],_=[],y=[],T=[],w=[],M=[],x=[],S=[],j=[];return t=class{constructor(e,t,n){this.v1=L(this,d,void 0),this.v2=(L(this,p),L(this,f,void 0)),this.v3=(L(this,b),L(this,v,void 0)),this.p1=(L(this,g),L(this,_,void 0)),this.p2=(L(this,y),L(this,T,void 0)),this.p3=(L(this,w),L(this,M,void 0)),this.pid=(L(this,x),L(this,S,void 0)),L(this,j),this.v1=e,this.v2=t,this.v3=n}},V(t,"ThreeMfTriangle"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"v1"})],i=[l({name:"v2"})],a=[l({name:"v3"})],s=[l({name:"p1"})],o=[l({name:"p2"})],c=[l({name:"p3"})],u=[l({name:"pid"})],Z(null,null,n,{kind:"field",name:"v1",static:!1,private:!1,access:{has:e=>"v1"in e,get:e=>e.v1,set:(e,t)=>{e.v1=t}},metadata:r},d,p),Z(null,null,i,{kind:"field",name:"v2",static:!1,private:!1,access:{has:e=>"v2"in e,get:e=>e.v2,set:(e,t)=>{e.v2=t}},metadata:r},f,b),Z(null,null,a,{kind:"field",name:"v3",static:!1,private:!1,access:{has:e=>"v3"in e,get:e=>e.v3,set:(e,t)=>{e.v3=t}},metadata:r},v,g),Z(null,null,s,{kind:"field",name:"p1",static:!1,private:!1,access:{has:e=>"p1"in e,get:e=>e.p1,set:(e,t)=>{e.p1=t}},metadata:r},_,y),Z(null,null,o,{kind:"field",name:"p2",static:!1,private:!1,access:{has:e=>"p2"in e,get:e=>e.p2,set:(e,t)=>{e.p2=t}},metadata:r},T,w),Z(null,null,c,{kind:"field",name:"p3",static:!1,private:!1,access:{has:e=>"p3"in e,get:e=>e.p3,set:(e,t)=>{e.p3=t}},metadata:r},M,x),Z(null,null,u,{kind:"field",name:"pid",static:!1,private:!1,access:{has:e=>"pid"in e,get:e=>e.pid,set:(e,t)=>{e.pid=t}},metadata:r},S,j),Z(null,e={value:t},m,{kind:"class",name:t.name,metadata:r},null,h),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,h)})(),t})(),me=(()=>{let e,t,n=[r({ns:D,name:"components"})],i=[];return t=class{constructor(){this.component=[]}},V(t,"ThreeMfComponents"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),he=(()=>{let e,t,n,i,a=[r({ns:D,name:"component"})],s=[],o=[],c=[],u=[],m=[];return t=class{constructor(e,t){this.objectid=L(this,o,void 0),this.transform=(L(this,c),L(this,u,void 0)),L(this,m),this.objectid=e,this.transform=t}},V(t,"ThreeMfComponent"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"objectid"})],i=[l({name:"transform",formatter:ee})],Z(null,null,n,{kind:"field",name:"objectid",static:!1,private:!1,access:{has:e=>"objectid"in e,get:e=>e.objectid,set:(e,t)=>{e.objectid=t}},metadata:r},o,c),Z(null,null,i,{kind:"field",name:"transform",static:!1,private:!1,access:{has:e=>"transform"in e,get:e=>e.transform,set:(e,t)=>{e.transform=t}},metadata:r},u,m),Z(null,e={value:t},a,{kind:"class",name:t.name,metadata:r},null,s),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,s)})(),t})(),de=(()=>{let e,t,n,i=[r({ns:D,name:"basematerials"})],a=[],s=[],o=[];return t=class{constructor(e){this.id=L(this,s,void 0),this.base=(L(this,o),[]),this.id=e}},V(t,"ThreeMfBaseMaterials"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"id"})],Z(null,null,n,{kind:"field",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:r},s,o),Z(null,e={value:t},i,{kind:"class",name:t.name,metadata:r},null,a),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,a)})(),t})(),pe=(()=>{let e,t,n,i,a=[r({ns:D,name:"base"})],s=[],o=[],c=[],u=[],m=[];return t=class{constructor(e,t){this.name=L(this,o,void 0),this.displaycolor=(L(this,c),L(this,u,void 0)),L(this,m),this.name=e,this.displaycolor=t}},V(t,"ThreeMfBase"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"name"})],i=[l({name:"displaycolor"})],Z(null,null,n,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:r},o,c),Z(null,null,i,{kind:"field",name:"displaycolor",static:!1,private:!1,access:{has:e=>"displaycolor"in e,get:e=>e.displaycolor,set:(e,t)=>{e.displaycolor=t}},metadata:r},u,m),Z(null,e={value:t},a,{kind:"class",name:t.name,metadata:r},null,s),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,s)})(),t})(),fe=(()=>{let e,t,n=[r({ns:D,name:"build"})],i=[];return t=class{constructor(){this.item=[]}},V(t,"ThreeMfBuild"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;Z(null,e={value:t},n,{kind:"class",name:t.name,metadata:a},null,i),t=e.value,a&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),L(t,i)})(),t})(),be=(()=>{let e,t,n,i,a,s=[r({ns:D,name:"item"})],o=[],c=[],u=[],m=[],h=[],d=[],p=[];return t=class{constructor(e,t,n){this.objectid=L(this,c,void 0),this.transform=(L(this,u),L(this,m,void 0)),this.partnumber=(L(this,h),L(this,d,void 0)),this.metadatagroup=L(this,p),this.objectid=e,this.transform=t,this.partnumber=n}},V(t,"ThreeMfItem"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;n=[l({name:"objectid"})],i=[l({name:"transform",formatter:ee})],a=[l({name:"partnumber"})],Z(null,null,n,{kind:"field",name:"objectid",static:!1,private:!1,access:{has:e=>"objectid"in e,get:e=>e.objectid,set:(e,t)=>{e.objectid=t}},metadata:r},c,u),Z(null,null,i,{kind:"field",name:"transform",static:!1,private:!1,access:{has:e=>"transform"in e,get:e=>e.transform,set:(e,t)=>{e.transform=t}},metadata:r},m,h),Z(null,null,a,{kind:"field",name:"partnumber",static:!1,private:!1,access:{has:e=>"partnumber"in e,get:e=>e.partnumber,set:(e,t)=>{e.partnumber=t}},metadata:r},d,p),Z(null,e={value:t},s,{kind:"class",name:t.name,metadata:r},null,o),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),L(t,o)})(),t})();class ve{constructor(e,t){this._object=new se(e,t)}withName(e){return this._object.name=e,this}withThumbnail(e){return this._object.thumbnail=e,this}withProperty(e,t=0){return this._object.pid=e,this._object.id=t,this}build(){return this._object}reset(e,t){this._object=new se(e,t)}}class ge extends ve{constructor(t,n=e.ST_ObjectType.model){super(t,n),this._object.content=new me}withComponent(e,t){return this._object.content.component.push(new he(e,t)),this}}class _e extends ve{constructor(t){super(t,e.ST_ObjectType.model)}withPostProcessHandlers(e,t){return this._vh=e,this._th=t,this}withData(e){return this._object.content=this._buildMesh(e),this}withMaterial(e,t){return this._object.pid=e,this._object.pindex=t,this}_buildMesh(e){const t=this._buildVertices(e.positions),n=this._buildTriangle(e.indices);return new re(t,n)}_buildVertices(e){const t=new oe;if(e)for(let n=0;n<e.length;){const i=e[n++],a=e[n++],s=e[n++];let r=new le(i,a,s);this._vh&&(r=this._vh(r)),t.vertex.push(r)}return t}_buildTriangle(e){const t=new ce;if(e)for(let n=0;n<e.length;){const i=e[n++],a=e[n++],s=e[n++];let r=new ue(i,a,s);this._th&&(r=this._th(r)),t.triangle.push(r)}return t}}class ye{constructor(e){this._m=new de(e)}withColor(e,t){var n;this._m.base=null!==(n=this._m.base)&&void 0!==n?n:[];let i=this._m.base.find(t=>t.name.toLowerCase()===e.toLowerCase());return i?(i.displaycolor=this._rgbaToHex(t),this):(i=new pe(e,this._rgbaToHex(t)),this._m.base.push(i),this)}build(){return this._m}_rgbaToHex(e){const t=e=>Math.round(Math.min(255,Math.max(0,255*Math.pow(e,1/2.2)))),n=t(e.r).toString(16).padStart(2,"0").toUpperCase(),i=t(e.g).toString(16).padStart(2,"0").toUpperCase(),a=t(e.b).toString(16).padStart(2,"0").toUpperCase();return"number"==typeof e.a?`#${n}${i}${a}${Math.round(Math.min(255,Math.max(0,255*e.a))).toString(16).padStart(2,"0").toUpperCase()}`:`#${n}${i}${a}`}}class Te{constructor(){this._model=new te,this._objects=new Map}withMetaData(e,t,n,i){return this._model.metadata||(this._model.metadata=new Array),this._model.metadata.push(new ne(e,t,n,i)),this}withMaterial(e){var t,n;return e instanceof ye&&(e=e.build()),e&&(this._model.resources=null!==(t=this._model.resources)&&void 0!==t?t:new ae,this._model.resources.basematerials=null!==(n=this._model.resources.basematerials)&&void 0!==n?n:[],this._model.resources.basematerials.push(e)),this}withMesh(e){var t;return e instanceof _e&&(e=e.build()),this._model.resources=null!==(t=this._model.resources)&&void 0!==t?t:new ae,this._model.resources.object.push(e),this}withComponents(e){var t;return e instanceof ge&&(e=e.build()),this._model.resources=null!==(t=this._model.resources)&&void 0!==t?t:new ae,this._model.resources.object.push(e),this}withBuild(e,t,n){var i,a;return this._model.build=null!==(i=this._model.build)&&void 0!==i?i:new fe,null===(a=this._model.build.item)||void 0===a||a.push(new be(e,t,n)),this}withUnit(e){return this._model.unit=e,this}reset(){return this._model=new te,this._objects=new Map,this}build(){var e,t,n,i;if(!(null===(t=null===(e=this._model.resources)||void 0===e?void 0:e.object)||void 0===t?void 0:t.length))throw new Error("Invalid state: resources MUST be defined ");if(!(null===(i=null===(n=this._model.build)||void 0===n?void 0:n.item)||void 0===i?void 0:i.length))throw new Error("Invalid state: Build MUST be defined ");return this._model}}Te.KnownMetaSet=new Set(te.KnownMeta.map(e=>e.toLowerCase()));class we{withContentType(e){this._cts||(this._cts=new G);const t=this._cts.items;return t.some(t=>t.ext===e.ext&&t.ct===e.ct)||t.push(e),this}withRelationship(t){this._rs||(this._rs=new W);const n=this._rs.items;return n.some(e=>e.id===t.id)||n.push(t),this.withContentType(new Q("rels",e.KnownI3mfContentType.Relationships)),this}withModel(t){return t instanceof Te&&(t=t.build()),this._m=t,this.withContentType(new Q("model",e.KnownI3mfContentType.Model)),this}build(){if(!this._m)throw new Error("Invalid state: you Must provide at least a model.");const e=`${E}${z}`;if(!this._rs){const t=`/${e}`;this.withRelationship(new H("rel0",K.ThreeDimModel,t))}return new Y(this._cts,this._rs,this._m)}}class Me{constructor(e){this._o=e}get options(){return this._o}serializeAsync(e,...t){return q(this,void 0,void 0,function*(){const n=yield this.ensureZipLibReadyAsync();if(!n)return;const i=n.Zip,a=n.ZipDeflate;if(!i||!a)throw new Error("fflate Zip / ZipDeflate not available");const s=function(e,t,n){const i=new a(t,{level:6});e.add(i);const s=function(e){return{push:(t,n)=>e.push(t,n)}}(i),r=new N(s),o=new O(r).dec("1.0","UTF-8");new S(o).serialize(n),r.finish()},r=this.toDocument(...t);if(!r)return;const o=new i(e);s(o,U,r.contentTypes),s(o,`${I}${F}`,r.relationships),s(o,`${E}${z}`,r.model),o.end()})}toDocument(...t){var n,i;const a=(new Te).withUnit(null!==(i=null===(n=this._o)||void 0===n?void 0:n.unit)&&void 0!==i?i:e.ST_Unit.millimeter);if(this.options.metadata)for(const e in this.options.metadata)a.withMetaData(e,this.options.metadata[e]);return(new we).withModel(this.toModel(a,...t)).build()}}class xe{static SerializeToMemoryAsync(e,...t){return q(this,void 0,void 0,function*(){const n=new Array;let i=0;if(yield e.serializeAsync(function(e,t,a){n.push(t),i+=t.length},...t),!i)return;const a=new Uint8Array(i);let s=0;for(const e of n)a.set(e,s),s+=e.length;return a})}}class Se{}Se.FFLATEUrl="https://unpkg.com/fflate@0.8.2";class je{constructor(e=0,t=Number.MIN_SAFE_INTEGER,n=1){this._from=e,this._to=t,this._step=n,this._i=e}next(){if(this._i<this._to)throw new Error("ST_ResourceID out of bound");const e=this._i;return this._i+=this._step,e}reset(){return this._i=this._from,this}}class ke extends Me{constructor(e={}){super(Object.assign(Object.assign({},ke.DefaultOptions),e))}toModel(e,...n){n=n.filter(e=>e instanceof t.Mesh||e instanceof t.InstancedMesh);const i=new je,a=e,s=new Map,r=this.options.exportInstances?[]:null;for(let e=0;e<n.length;e++){const o=n[e];if(o instanceof t.InstancedMesh){null==r||r.push(o);continue}const l=o.name||`mesh${e}`,c=o.getWorldMatrix(),u=this._handleBabylonTo3mfMatrixTransformToRef(c,J.Zero()),m=o.subMeshes;if(void 0===m)continue;const h=1==m.length;for(let e=0;e<m.length;e++){const t=m[e],n=this._extractSubMesh(o,t);if(n){const r=h?`${l}`:`${l}_${e}`,o=new _e(i.next()).withData(n).withName(r).build();a.withMesh(o),a.withBuild(o.id,u),s.set(t,o)}}}if(r&&r.length){const e=this._groupBy(r,e=>e.sourceMesh);for(const[t,n]of Array.from(e.entries()))if(n&&n.length)for(let e=0;e<n.length;e++){const i=n[e].getWorldMatrix(),r=t.subMeshes;for(let e=0;e<r.length;e++){const t=r[e],n=s.get(t);n&&a.withBuild(n.id,this._handleBabylonTo3mfMatrixTransformToRef(i,J.Zero()))}}}return a.build()}ensureZipLibReadyAsync(){return q(this,void 0,void 0,function*(){return this._fflateReadyPromise||(this._fflateReadyPromise=(()=>q(this,void 0,void 0,function*(){const e=globalThis;return e.fflate||(yield t.Tools.LoadScriptAsync(Se.FFLATEUrl)),e.fflate}))()),yield this._fflateReadyPromise})}_extractSubMesh(e,t){const n=e.getIndices();if(!n)return;const i=e.getVerticesData(ke._PositionKind);if(!i)return;if(0==t.indexStart&&t.indexCount==n.length)return{positions:i,indices:n};const a=t.indexStart,s=new Map,r=[],o=new Uint32Array(t.indexCount);for(let e=0;e<t.indexCount;e++){const t=n[a+e];let l=s.get(t);if(void 0===l){l=s.size,s.set(t,l);const e=3*t;r.push(i[e],i[e+1],i[e+2])}o[e]=l}return{positions:new Float32Array(r),indices:o}}_groupBy(e,t){const n=new Map;for(const i of e){const e=t(i),a=n.get(e);a?a.push(i):n.set(e,[i])}return n}_handleBabylonTo3mfMatrixTransformToRef(e,n){const i=e.multiplyToRef(ke._R_BJS_TO_3MF,t.Matrix.Zero()).m;return n.values=[i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10],i[12],i[13],i[14]],n}}ke.DefaultOptions={unit:e.ST_Unit.meter,exportInstances:!1},ke._PositionKind="position",ke._R_BJS_TO_3MF=t.Matrix.RotationX(Math.PI/2).multiply(t.Matrix.Scaling(1,-1,1));var Oe={__proto__:null,AbstractThreeMfSerializer:Me,ContentTypeFileName:U,DefaultXmlSerializerFormatOptions:b,DefaultXmlSerializerNumberOptions:f,GetXmlFieldMeta:u,GetXmlName:m,IsQualifiedName:n,Known3mfRelationshipTypes:K,get KnownI3mfContentType(){return e.KnownI3mfContentType},Matrix3d:J,MatrixFormatter:ee,ModelFileName:z,NumberFormatter:_,Object3dDirName:E,OpenXmlContentTypesNamespace:B,OpenXmlRelationshipsNamespace:R,RelationshipDirName:I,RelationshipFileName:F,ResolveFormatOptions:g,ResolveNumberOptions:v,get ST_ObjectType(){return e.ST_ObjectType},get ST_Unit(){return e.ST_Unit},StringXmlWriter:C,ThreeDimModelNamespace:D,ThreeMf:xe,ThreeMfBase:pe,ThreeMfBaseMaterials:de,ThreeMfBuild:fe,ThreeMfComponent:he,ThreeMfComponents:me,ThreeMfComponentsBuilder:ge,ThreeMfContentType:Q,ThreeMfContentTypes:G,ThreeMfDocument:Y,ThreeMfDocumentBuilder:we,ThreeMfItem:be,ThreeMfMaterialBuilder:ye,ThreeMfMesh:re,ThreeMfMeshBuilder:_e,ThreeMfMeta:ne,ThreeMfMetadataGroup:ie,ThreeMfModel:te,ThreeMfModelBuilder:Te,ThreeMfObject:se,ThreeMfObjectBuilder:ve,ThreeMfRelationship:H,ThreeMfRelationships:W,ThreeMfResources:ae,ThreeMfSerializer:ke,ThreeMfSerializerGlobalConfiguration:Se,ThreeMfTriangle:ue,ThreeMfTriangles:ce,ThreeMfVertex:le,ThreeMfVertices:oe,ToQualifiedString:p,get TokenType(){return e.TokenType},TriangleSetsNamespace:P,Utf8XmlWriterToBytes:N,XmlAttr:l,XmlBuilder:O,XmlElem:c,XmlIgnore:o,XmlName:r,XmlNameToParts:d,XmlSerializer:S};const Ce="undefined"!=typeof global?global:"undefined"!=typeof window?window:void 0;if(void 0!==Ce){const e=[];for(const t in Oe)e.indexOf(t)>-1||(Ce.BABYLON[t]=Oe[t],e.push(t))}e.AbstractThreeMfSerializer=Me,e.ContentTypeFileName=U,e.DefaultXmlSerializerFormatOptions=b,e.DefaultXmlSerializerNumberOptions=f,e.GetXmlFieldMeta=u,e.GetXmlName=m,e.IsQualifiedName=n,e.Known3mfRelationshipTypes=K,e.Matrix3d=J,e.MatrixFormatter=ee,e.ModelFileName=z,e.NumberFormatter=_,e.Object3dDirName=E,e.OpenXmlContentTypesNamespace=B,e.OpenXmlRelationshipsNamespace=R,e.RelationshipDirName=I,e.RelationshipFileName=F,e.ResolveFormatOptions=g,e.ResolveNumberOptions=v,e.StringXmlWriter=C,e.ThreeDimModelNamespace=D,e.ThreeMf=xe,e.ThreeMfBase=pe,e.ThreeMfBaseMaterials=de,e.ThreeMfBuild=fe,e.ThreeMfComponent=he,e.ThreeMfComponents=me,e.ThreeMfComponentsBuilder=ge,e.ThreeMfContentType=Q,e.ThreeMfContentTypes=G,e.ThreeMfDocument=Y,e.ThreeMfDocumentBuilder=we,e.ThreeMfItem=be,e.ThreeMfMaterialBuilder=ye,e.ThreeMfMesh=re,e.ThreeMfMeshBuilder=_e,e.ThreeMfMeta=ne,e.ThreeMfMetadataGroup=ie,e.ThreeMfModel=te,e.ThreeMfModelBuilder=Te,e.ThreeMfObject=se,e.ThreeMfObjectBuilder=ve,e.ThreeMfRelationship=H,e.ThreeMfRelationships=W,e.ThreeMfResources=ae,e.ThreeMfSerializer=ke,e.ThreeMfSerializerGlobalConfiguration=Se,e.ThreeMfTriangle=ue,e.ThreeMfTriangles=ce,e.ThreeMfVertex=le,e.ThreeMfVertices=oe,e.ToQualifiedString=p,e.TriangleSetsNamespace=P,e.Utf8XmlWriterToBytes=N,e.XmlAttr=l,e.XmlBuilder=O,e.XmlElem=c,e.XmlIgnore=o,e.XmlName=r,e.XmlNameToParts=d,e.XmlSerializer=S});
|
|
2
2
|
//# sourceMappingURL=babylon.threemfSerializer.min.js.map
|