@antv/g-svg 1.1.2 → 1.1.3-alpha.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/{es → dist}/ContextRegisterPlugin.d.ts +8 -7
- package/dist/ContextRegisterPlugin.d.ts.map +1 -0
- package/{lib → dist}/SVGContextService.d.ts +16 -15
- package/dist/SVGContextService.d.ts.map +1 -0
- package/{lib → dist}/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +156 -0
- package/dist/index.js +181 -0
- package/dist/index.umd.js +3909 -0
- package/dist/index.umd.min.js +7 -16
- package/package.json +26 -32
- package/es/ContextRegisterPlugin.js +0 -28
- package/es/SVGContextService.d.ts +0 -15
- package/es/SVGContextService.js +0 -80
- package/es/index.d.ts +0 -9
- package/es/index.js +0 -31
- package/lib/ContextRegisterPlugin.d.ts +0 -7
- package/lib/ContextRegisterPlugin.js +0 -37
- package/lib/SVGContextService.js +0 -89
- package/lib/index.js +0 -54
package/dist/index.umd.min.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@antv/g"),require("mana-syringe")):"function"==typeof define&&define.amd?define(["@antv/g","mana-syringe"],e):"object"==typeof exports?exports.SVG=e(require("@antv/g"),require("mana-syringe")):(t.G=t.G||{},t.G.SVG=e(t.G,t.G.ManaSyringe))}(window,(function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return d}));var r=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},o=function(t,e,n){this.name=t,this.version=e,this.os=n,this.type="browser"},i=function(e){this.version=e,this.type="node",this.name="node",this.os=t.platform},a=function(t,e,n,r){this.name=t,this.version=e,this.os=n,this.bot=r,this.type="bot-device"},u=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},c=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},s=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],f=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function d(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new c:"undefined"!=typeof navigator?p(navigator.userAgent):void 0!==t&&t.version?new i(t.version.slice(1)):null}function h(t){return""!==t&&l.reduce((function(e,n){var r=n[0],o=n[1];if(e)return e;var i=o.exec(t);return!!i&&[r,i]}),!1)}function p(t){var e=h(t);if(!e)return null;var n=e[0],i=e[1];if("searchbot"===n)return new u;var c=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);c?c.length<3&&(c=r(r([],c,!0),function(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}(3-c.length),!0)):c=[];var l=c.join("."),d=function(t){for(var e=0,n=f.length;e<n;e++){var r=f[e],o=r[0];if(r[1].exec(t))return o}return null}(t),p=s.exec(t);return p&&p[1]?new a(n,l,d,p[1]):new o(n,l,d)}}).call(this,n(7))},,,,,function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,s=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&h())}function h(){if(!l){var t=u(d);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new p(t,e)),1!==s.length||l||u(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";n.r(e),n.d(e,"DomInteraction",(function(){return r})),n.d(e,"SVGRenderer",(function(){return u})),n.d(e,"SVGPicker",(function(){return c})),n.d(e,"Renderer",(function(){return Yn}));var r={};n.r(r),n.d(r,"Plugin",(function(){return S}));var o={};n.r(o),n.d(o,"create",(function(){return V})),n.d(o,"clone",(function(){return D})),n.d(o,"copy",(function(){return I})),n.d(o,"fromValues",(function(){return _})),n.d(o,"set",(function(){return q})),n.d(o,"identity",(function(){return B})),n.d(o,"transpose",(function(){return F})),n.d(o,"invert",(function(){return H})),n.d(o,"adjoint",(function(){return U})),n.d(o,"determinant",(function(){return X})),n.d(o,"multiply",(function(){return Y})),n.d(o,"translate",(function(){return z})),n.d(o,"scale",(function(){return Q})),n.d(o,"rotate",(function(){return Z})),n.d(o,"rotateX",(function(){return K})),n.d(o,"rotateY",(function(){return J})),n.d(o,"rotateZ",(function(){return tt})),n.d(o,"fromTranslation",(function(){return et})),n.d(o,"fromScaling",(function(){return nt})),n.d(o,"fromRotation",(function(){return rt})),n.d(o,"fromXRotation",(function(){return ot})),n.d(o,"fromYRotation",(function(){return it})),n.d(o,"fromZRotation",(function(){return at})),n.d(o,"fromRotationTranslation",(function(){return ut})),n.d(o,"fromQuat2",(function(){return ct})),n.d(o,"getTranslation",(function(){return st})),n.d(o,"getScaling",(function(){return lt})),n.d(o,"getRotation",(function(){return ft})),n.d(o,"fromRotationTranslationScale",(function(){return dt})),n.d(o,"fromRotationTranslationScaleOrigin",(function(){return ht})),n.d(o,"fromQuat",(function(){return pt})),n.d(o,"frustum",(function(){return vt})),n.d(o,"perspectiveNO",(function(){return mt})),n.d(o,"perspective",(function(){return bt})),n.d(o,"perspectiveZO",(function(){return yt})),n.d(o,"perspectiveFromFieldOfView",(function(){return gt})),n.d(o,"orthoNO",(function(){return Mt})),n.d(o,"ortho",(function(){return St})),n.d(o,"orthoZO",(function(){return At})),n.d(o,"lookAt",(function(){return wt})),n.d(o,"targetTo",(function(){return xt})),n.d(o,"str",(function(){return Et})),n.d(o,"frob",(function(){return Ot})),n.d(o,"add",(function(){return Tt})),n.d(o,"subtract",(function(){return Ct})),n.d(o,"multiplyScalar",(function(){return Pt})),n.d(o,"multiplyScalarAndAdd",(function(){return Lt})),n.d(o,"exactEquals",(function(){return jt})),n.d(o,"equals",(function(){return kt})),n.d(o,"mul",(function(){return Gt})),n.d(o,"sub",(function(){return $t}));var i={};n.r(i),n.d(i,"create",(function(){return Rt})),n.d(i,"clone",(function(){return Nt})),n.d(i,"length",(function(){return Wt})),n.d(i,"fromValues",(function(){return Vt})),n.d(i,"copy",(function(){return Dt})),n.d(i,"set",(function(){return It})),n.d(i,"add",(function(){return _t})),n.d(i,"subtract",(function(){return qt})),n.d(i,"multiply",(function(){return Bt})),n.d(i,"divide",(function(){return Ft})),n.d(i,"ceil",(function(){return Ht})),n.d(i,"floor",(function(){return Ut})),n.d(i,"min",(function(){return Xt})),n.d(i,"max",(function(){return Yt})),n.d(i,"round",(function(){return zt})),n.d(i,"scale",(function(){return Qt})),n.d(i,"scaleAndAdd",(function(){return Zt})),n.d(i,"distance",(function(){return Kt})),n.d(i,"squaredDistance",(function(){return Jt})),n.d(i,"squaredLength",(function(){return te})),n.d(i,"negate",(function(){return ee})),n.d(i,"inverse",(function(){return ne})),n.d(i,"normalize",(function(){return re})),n.d(i,"dot",(function(){return oe})),n.d(i,"cross",(function(){return ie})),n.d(i,"lerp",(function(){return ae})),n.d(i,"hermite",(function(){return ue})),n.d(i,"bezier",(function(){return ce})),n.d(i,"random",(function(){return se})),n.d(i,"transformMat4",(function(){return le})),n.d(i,"transformMat3",(function(){return fe})),n.d(i,"transformQuat",(function(){return de})),n.d(i,"rotateX",(function(){return he})),n.d(i,"rotateY",(function(){return pe})),n.d(i,"rotateZ",(function(){return ve})),n.d(i,"angle",(function(){return me})),n.d(i,"zero",(function(){return be})),n.d(i,"str",(function(){return ye})),n.d(i,"exactEquals",(function(){return ge})),n.d(i,"equals",(function(){return Me})),n.d(i,"sub",(function(){return Ae})),n.d(i,"mul",(function(){return we})),n.d(i,"div",(function(){return xe})),n.d(i,"dist",(function(){return Ee})),n.d(i,"sqrDist",(function(){return Oe})),n.d(i,"len",(function(){return Te})),n.d(i,"sqrLen",(function(){return Ce})),n.d(i,"forEach",(function(){return Pe}));var a={};n.r(a),n.d(a,"create",(function(){return ke})),n.d(a,"identity",(function(){return Ge})),n.d(a,"setAxisAngle",(function(){return $e})),n.d(a,"getAxisAngle",(function(){return Re})),n.d(a,"getAngle",(function(){return Ne})),n.d(a,"multiply",(function(){return We})),n.d(a,"rotateX",(function(){return Ve})),n.d(a,"rotateY",(function(){return De})),n.d(a,"rotateZ",(function(){return Ie})),n.d(a,"calculateW",(function(){return _e})),n.d(a,"exp",(function(){return qe})),n.d(a,"ln",(function(){return Be})),n.d(a,"pow",(function(){return Fe})),n.d(a,"slerp",(function(){return He})),n.d(a,"random",(function(){return Ue})),n.d(a,"invert",(function(){return Xe})),n.d(a,"conjugate",(function(){return Ye})),n.d(a,"fromMat3",(function(){return ze})),n.d(a,"fromEuler",(function(){return Qe})),n.d(a,"str",(function(){return Ze})),n.d(a,"clone",(function(){return an})),n.d(a,"fromValues",(function(){return un})),n.d(a,"copy",(function(){return cn})),n.d(a,"set",(function(){return sn})),n.d(a,"add",(function(){return ln})),n.d(a,"mul",(function(){return fn})),n.d(a,"scale",(function(){return dn})),n.d(a,"dot",(function(){return hn})),n.d(a,"lerp",(function(){return pn})),n.d(a,"length",(function(){return vn})),n.d(a,"len",(function(){return mn})),n.d(a,"squaredLength",(function(){return bn})),n.d(a,"sqrLen",(function(){return yn})),n.d(a,"normalize",(function(){return gn})),n.d(a,"exactEquals",(function(){return Mn})),n.d(a,"equals",(function(){return Sn})),n.d(a,"rotationTo",(function(){return An})),n.d(a,"sqlerp",(function(){return wn})),n.d(a,"setAxes",(function(){return xn}));var u={};n.r(u),n.d(u,"ElementSVG",(function(){return A})),n.d(u,"SHAPE2TAGS",(function(){return $n})),n.d(u,"SVG_ATTR_MAP",(function(){return Rn})),n.d(u,"DEFAULT_VALUE_MAP",(function(){return Wn})),n.d(u,"G_SVG_PREFIX",(function(){return Vn})),n.d(u,"SVGRendererPlugin",(function(){return Dn})),n.d(u,"createSVGElement",(function(){return En})),n.d(u,"containerModule",(function(){return In})),n.d(u,"Plugin",(function(){return _n}));var c={};n.r(c),n.d(c,"Plugin",(function(){return Fn}));
|
|
2
|
-
/*!
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
var s=function(t,e){return(s=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])})(t,e)};function l(t,e,n,r){var o,i=arguments.length,a=i<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 u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function f(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function d(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}c((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}Object.create;function p(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;var m=n(0),b=n(1),y=/mobile|tablet|ip(ad|hone|od)|android/i,g=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this,r=this.renderingContext.root.ownerDocument.defaultView,o=r.supportTouchEvent&&y.test(navigator.userAgent),i=function(e){t.hooks.pointerMove.call(e)},a=function(e){t.hooks.pointerUp.call(e)},u=function(e){t.hooks.pointerDown.call(e)},c=function(e){t.hooks.pointerOver.call(e)},s=function(e){t.hooks.pointerOut.call(e)},l=function(e){t.hooks.pointerCancel.call(e)},f=function(e){t.hooks.pointerWheel.call(e)},p=function(t){t.addEventListener("touchstart",u,!0),t.addEventListener("touchend",a,!0),t.addEventListener("touchmove",i,!0),t.addEventListener("touchcancel",l,!0)},v=function(t){globalThis.document.addEventListener("mousemove",i,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("mouseout",s,!0),t.addEventListener("mouseover",c,!0),globalThis.addEventListener("mouseup",a,!0)},m=function(t){t.removeEventListener("touchstart",u,!0),t.removeEventListener("touchend",a,!0),t.removeEventListener("touchmove",i,!0)},b=function(t){globalThis.document.removeEventListener("mousemove",i,!0),t.removeEventListener("mousedown",u,!0),t.removeEventListener("mouseout",s,!0),t.removeEventListener("mouseover",c,!0),globalThis.removeEventListener("mouseup",a,!0)};t.hooks.init.tapPromise(e.tag,(function(){return d(n,void 0,void 0,(function(){var t;return h(this,(function(e){return t=this.contextService.getDomElement(),r.supportPointerEvent&&function(t){globalThis.document.addEventListener("pointermove",i,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("pointerleave",s,!0),t.addEventListener("pointerover",c,!0),globalThis.addEventListener("pointerup",a,!0)}(t),o?p(t):r.supportTouchEvent?(p(t),r.supportPointerEvent||v(t)):r.supportPointerEvent||v(t),t.addEventListener("wheel",f,{passive:!0,capture:!0}),[2]}))}))})),t.hooks.destroy.tap(e.tag,(function(){var t=n.contextService.getDomElement();r.supportPointerEvent&&function(t){globalThis.document.removeEventListener("pointermove",i,!0),t.removeEventListener("pointerdown",u,!0),t.removeEventListener("pointerleave",s,!0),t.removeEventListener("pointerover",c,!0),globalThis.removeEventListener("pointerup",a,!0)}(t),o?m(t):r.supportTouchEvent?(m(t),r.supportPointerEvent||b(t)):r.supportPointerEvent||b(t),t.removeEventListener("wheel",f,!0)}))},t.tag="DOMInteraction",l([Object(b.inject)(m.ContextService),f("design:type",Object)],t.prototype,"contextService",void 0),l([Object(b.inject)(m.RenderingContext),f("design:type",Object)],t.prototype,"renderingContext",void 0),t=e=l([Object(b.singleton)({contrib:m.RenderingPluginContribution})],t)}(),M=Object(b.Module)((function(t){t(g)})),S=function(){function t(){this.name="dom-interaction"}return t.prototype.init=function(t){t.load(M,!0)},t.prototype.destroy=function(t){t.unload(M)},t}(),A=function(){function t(){}return t.tag="c-svg-element",t}(),w=function(){function t(){this.dependencies=["radius","width","height"]}return t.prototype.apply=function(t,e){var n=e.radius,r=e.width,o=e.height,i="";if(n&&n.some((function(t){return 0!==t.value}))){var a=v(n.map((function(t){return t.value})),4),u=a[0],c=a[1],s=a[2],l=a[3];i=[["M ".concat(u,",0")],["l ".concat(r.value-u-c,",0")],["a ".concat(c,",").concat(c,",0,0,1,").concat(c,",").concat(c)],["l 0,".concat(o.value-c-s)],["a ".concat(s,",").concat(s,",0,0,1,").concat(-s,",").concat(s)],["l ".concat(s+l-r.value,",0")],["a ".concat(l,",").concat(l,",0,0,1,").concat(-l,",").concat(-l)],["l 0,".concat(l+u-o.value)],["a ".concat(u,",").concat(u,",0,0,1,").concat(u,",").concat(-u)],["z"]].join(" ")}else i="M 0,0 l ".concat(r.value,",0 l 0,").concat(o.value," l").concat(-r.value," 0 z");t.setAttribute("d",i)},t=l([Object(b.singleton)()],t)}(),x=function(){function t(){this.dependencies=["img","width","height"]}return t.prototype.apply=function(t,e){var n=e.img,r=void 0===n?"":n,o=e.width,i=e.height;if(t.setAttribute("x","0"),t.setAttribute("y","0"),Object(m.isString)(r))t.setAttribute("href",r);else if(r instanceof Image)o||t.setAttribute("width","".concat(r.width)),i||t.setAttribute("height","".concat(r.height)),t.setAttribute("href",r.src);else if(r instanceof HTMLElement&&Object(m.isString)(r.nodeName)&&"CANVAS"===r.nodeName.toUpperCase())t.setAttribute("href",r.toDataURL());else if(r instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width","".concat(r.width)),a.setAttribute("height","".concat(r.height));var u=a.getContext("2d");u&&(u.putImageData(r,0,0),o||t.setAttribute("width","".concat(r.width)),i||t.setAttribute("height","".concat(r.height)),t.setAttribute("href",a.toDataURL()))}},t=l([Object(b.singleton)()],t)}(),E=function(){function t(){this.dependencies=["x1","y1","x2","y2"]}return t.prototype.apply=function(t,e){var n=e.x1,r=e.y1,o=e.x2,i=e.y2,a=e.defX,u=void 0===a?0:a,c=e.defY,s=void 0===c?0:c,l=e.stroke;t.setAttribute("x1","".concat(n.value-u)),t.setAttribute("y1","".concat(r.value-s)),t.setAttribute("x2","".concat(o.value-u)),r.value!==i.value||!l||l instanceof m.CSSRGB?t.setAttribute("y2","".concat(i.value-s)):t.setAttribute("y2","".concat(i.value-s+1e-5))},t=l([Object(b.singleton)()],t)}(),O=function(){function t(){this.dependencies=["points"]}return t.prototype.apply=function(t,e){var n=e.points,r=e.defX,o=void 0===r?0:r,i=e.defY,a=void 0===i?0:i;n&&n.points&&n.points.length>=2&&t.setAttribute("points",n.points.map((function(t){return"".concat(t[0]-o,",").concat(t[1]-a)})).join(" "))},t=l([Object(b.singleton)()],t)}(),T=n(2);function C(t){return t.toFixed(6).replace(".000000","")}function P(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&":"<"===t?"<":">"===t?">":'"'===t?""":"'"}))}var L={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},j={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},k=function(){function t(){this.dependencies=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","textTransform","whiteSpace","dx","dy"]}return t.prototype.apply=function(t,e){var n=e.textBaseline,r=e.lineWidth,o=e.metrics,i=e.dx,a=e.dy,u=Object(T.a)();u&&"firefox"===u.name?t.setAttribute("dominant-baseline",j[n.value]||"alphabetic"):(t.setAttribute("dominant-baseline",j[n.value]),t.setAttribute("alignment-baseline",L[n.value])),t.setAttribute("paint-order","stroke");var c=o.lines,s=o.lineHeight,l=o.height,f=c.length;t.setAttribute("style","transform:translate(".concat(i.toString(),", ").concat(a.toString(),");")),1===f?(t.innerHTML=P(c[0]),t.setAttribute("dx","".concat(r.value/2))):t.innerHTML=c.map((function(t,e){var o=r.value/2,i=0;return 0===e?"middle"===n.value?i=s/2-l/2:"top"===n.value||"hanging"===n.value?i=0:"bottom"!==n.value&&"alphabetic"!==n.value&&"ideographic"!==n.value||(i=-s*(f-1)):i=s,'<tspan x="0" dx="'.concat(o,'" dy="').concat(i,'">').concat(P(t),"</tspan>")})).join("")},t=l([Object(b.singleton)()],t)}(),G=function(){function t(){this.dependencies=["path"]}return t.prototype.apply=function(t,e){var n=e.path,r=e.defX,o=void 0===r?0:r,i=e.defY,a=void 0===i?0:i;t.setAttribute("d",this.formatPath(n.absolutePath,o,a))},t.prototype.formatPath=function(t,e,n){var r=t.map((function(t){switch(t[0]){case"M":return"M ".concat(t[1]-e,",").concat(t[2]-n);case"L":return"L ".concat(t[1]-e,",").concat(t[2]-n);case"Q":return"Q ".concat(t[1]-e," ").concat(t[2]-n,",").concat(t[3]-e," ").concat(t[4]-n);case"C":return"C ".concat(t[1]-e," ").concat(t[2]-n,",").concat(t[3]-e," ").concat(t[4]-n,",").concat(t[5]-e," ").concat(t[6]-n);case"A":return"A ".concat(t[1]," ").concat(t[2]," ").concat(t[3]," ").concat(t[4]," ").concat(t[5]," ").concat(t[6]-e," ").concat(t[7]-n);case"Z":return"Z"}})).join(" ");return~r.indexOf("NaN")?"":r},t=l([Object(b.singleton)()],t)}(),$=b.Syringe.defineToken("ElementRendererFactory"),R=(b.Syringe.defineToken("ElementRenderer"),1e-6),N="undefined"!=typeof Float32Array?Float32Array:Array,W=Math.random;Math.PI;function V(){var t=new N(16);return N!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function D(t){var e=new N(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function I(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function _(t,e,n,r,o,i,a,u,c,s,l,f,d,h,p,v){var m=new N(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=o,m[5]=i,m[6]=a,m[7]=u,m[8]=c,m[9]=s,m[10]=l,m[11]=f,m[12]=d,m[13]=h,m[14]=p,m[15]=v,m}function q(t,e,n,r,o,i,a,u,c,s,l,f,d,h,p,v,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=i,t[5]=a,t[6]=u,t[7]=c,t[8]=s,t[9]=l,t[10]=f,t[11]=d,t[12]=h,t[13]=p,t[14]=v,t[15]=m,t}function B(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function F(t,e){if(t===e){var n=e[1],r=e[2],o=e[3],i=e[6],a=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=i,t[11]=e[14],t[12]=o,t[13]=a,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function H(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=e[4],u=e[5],c=e[6],s=e[7],l=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],m=e[14],b=e[15],y=n*u-r*a,g=n*c-o*a,M=n*s-i*a,S=r*c-o*u,A=r*s-i*u,w=o*s-i*c,x=l*v-f*p,E=l*m-d*p,O=l*b-h*p,T=f*m-d*v,C=f*b-h*v,P=d*b-h*m,L=y*P-g*C+M*T+S*O-A*E+w*x;return L?(L=1/L,t[0]=(u*P-c*C+s*T)*L,t[1]=(o*C-r*P-i*T)*L,t[2]=(v*w-m*A+b*S)*L,t[3]=(d*A-f*w-h*S)*L,t[4]=(c*O-a*P-s*E)*L,t[5]=(n*P-o*O+i*E)*L,t[6]=(m*M-p*w-b*g)*L,t[7]=(l*w-d*M+h*g)*L,t[8]=(a*C-u*O+s*x)*L,t[9]=(r*O-n*C-i*x)*L,t[10]=(p*A-v*M+b*y)*L,t[11]=(f*M-l*A-h*y)*L,t[12]=(u*E-a*T-c*x)*L,t[13]=(n*T-r*E+o*x)*L,t[14]=(v*g-p*S-m*y)*L,t[15]=(l*S-f*g+d*y)*L,t):null}function U(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=e[4],u=e[5],c=e[6],s=e[7],l=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],m=e[14],b=e[15];return t[0]=u*(d*b-h*m)-f*(c*b-s*m)+v*(c*h-s*d),t[1]=-(r*(d*b-h*m)-f*(o*b-i*m)+v*(o*h-i*d)),t[2]=r*(c*b-s*m)-u*(o*b-i*m)+v*(o*s-i*c),t[3]=-(r*(c*h-s*d)-u*(o*h-i*d)+f*(o*s-i*c)),t[4]=-(a*(d*b-h*m)-l*(c*b-s*m)+p*(c*h-s*d)),t[5]=n*(d*b-h*m)-l*(o*b-i*m)+p*(o*h-i*d),t[6]=-(n*(c*b-s*m)-a*(o*b-i*m)+p*(o*s-i*c)),t[7]=n*(c*h-s*d)-a*(o*h-i*d)+l*(o*s-i*c),t[8]=a*(f*b-h*v)-l*(u*b-s*v)+p*(u*h-s*f),t[9]=-(n*(f*b-h*v)-l*(r*b-i*v)+p*(r*h-i*f)),t[10]=n*(u*b-s*v)-a*(r*b-i*v)+p*(r*s-i*u),t[11]=-(n*(u*h-s*f)-a*(r*h-i*f)+l*(r*s-i*u)),t[12]=-(a*(f*m-d*v)-l*(u*m-c*v)+p*(u*d-c*f)),t[13]=n*(f*m-d*v)-l*(r*m-o*v)+p*(r*d-o*f),t[14]=-(n*(u*m-c*v)-a*(r*m-o*v)+p*(r*c-o*u)),t[15]=n*(u*d-c*f)-a*(r*d-o*f)+l*(r*c-o*u),t}function X(t){var e=t[0],n=t[1],r=t[2],o=t[3],i=t[4],a=t[5],u=t[6],c=t[7],s=t[8],l=t[9],f=t[10],d=t[11],h=t[12],p=t[13],v=t[14],m=t[15];return(e*a-n*i)*(f*m-d*v)-(e*u-r*i)*(l*m-d*p)+(e*c-o*i)*(l*v-f*p)+(n*u-r*a)*(s*m-d*h)-(n*c-o*a)*(s*v-f*h)+(r*c-o*u)*(s*p-l*h)}function Y(t,e,n){var r=e[0],o=e[1],i=e[2],a=e[3],u=e[4],c=e[5],s=e[6],l=e[7],f=e[8],d=e[9],h=e[10],p=e[11],v=e[12],m=e[13],b=e[14],y=e[15],g=n[0],M=n[1],S=n[2],A=n[3];return t[0]=g*r+M*u+S*f+A*v,t[1]=g*o+M*c+S*d+A*m,t[2]=g*i+M*s+S*h+A*b,t[3]=g*a+M*l+S*p+A*y,g=n[4],M=n[5],S=n[6],A=n[7],t[4]=g*r+M*u+S*f+A*v,t[5]=g*o+M*c+S*d+A*m,t[6]=g*i+M*s+S*h+A*b,t[7]=g*a+M*l+S*p+A*y,g=n[8],M=n[9],S=n[10],A=n[11],t[8]=g*r+M*u+S*f+A*v,t[9]=g*o+M*c+S*d+A*m,t[10]=g*i+M*s+S*h+A*b,t[11]=g*a+M*l+S*p+A*y,g=n[12],M=n[13],S=n[14],A=n[15],t[12]=g*r+M*u+S*f+A*v,t[13]=g*o+M*c+S*d+A*m,t[14]=g*i+M*s+S*h+A*b,t[15]=g*a+M*l+S*p+A*y,t}function z(t,e,n){var r,o,i,a,u,c,s,l,f,d,h,p,v=n[0],m=n[1],b=n[2];return e===t?(t[12]=e[0]*v+e[4]*m+e[8]*b+e[12],t[13]=e[1]*v+e[5]*m+e[9]*b+e[13],t[14]=e[2]*v+e[6]*m+e[10]*b+e[14],t[15]=e[3]*v+e[7]*m+e[11]*b+e[15]):(r=e[0],o=e[1],i=e[2],a=e[3],u=e[4],c=e[5],s=e[6],l=e[7],f=e[8],d=e[9],h=e[10],p=e[11],t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=u,t[5]=c,t[6]=s,t[7]=l,t[8]=f,t[9]=d,t[10]=h,t[11]=p,t[12]=r*v+u*m+f*b+e[12],t[13]=o*v+c*m+d*b+e[13],t[14]=i*v+s*m+h*b+e[14],t[15]=a*v+l*m+p*b+e[15]),t}function Q(t,e,n){var r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Z(t,e,n,r){var o,i,a,u,c,s,l,f,d,h,p,v,m,b,y,g,M,S,A,w,x,E,O,T,C=r[0],P=r[1],L=r[2],j=Math.hypot(C,P,L);return j<R?null:(C*=j=1/j,P*=j,L*=j,o=Math.sin(n),a=1-(i=Math.cos(n)),u=e[0],c=e[1],s=e[2],l=e[3],f=e[4],d=e[5],h=e[6],p=e[7],v=e[8],m=e[9],b=e[10],y=e[11],g=C*C*a+i,M=P*C*a+L*o,S=L*C*a-P*o,A=C*P*a-L*o,w=P*P*a+i,x=L*P*a+C*o,E=C*L*a+P*o,O=P*L*a-C*o,T=L*L*a+i,t[0]=u*g+f*M+v*S,t[1]=c*g+d*M+m*S,t[2]=s*g+h*M+b*S,t[3]=l*g+p*M+y*S,t[4]=u*A+f*w+v*x,t[5]=c*A+d*w+m*x,t[6]=s*A+h*w+b*x,t[7]=l*A+p*w+y*x,t[8]=u*E+f*O+v*T,t[9]=c*E+d*O+m*T,t[10]=s*E+h*O+b*T,t[11]=l*E+p*O+y*T,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function K(t,e,n){var r=Math.sin(n),o=Math.cos(n),i=e[4],a=e[5],u=e[6],c=e[7],s=e[8],l=e[9],f=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*o+s*r,t[5]=a*o+l*r,t[6]=u*o+f*r,t[7]=c*o+d*r,t[8]=s*o-i*r,t[9]=l*o-a*r,t[10]=f*o-u*r,t[11]=d*o-c*r,t}function J(t,e,n){var r=Math.sin(n),o=Math.cos(n),i=e[0],a=e[1],u=e[2],c=e[3],s=e[8],l=e[9],f=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o-s*r,t[1]=a*o-l*r,t[2]=u*o-f*r,t[3]=c*o-d*r,t[8]=i*r+s*o,t[9]=a*r+l*o,t[10]=u*r+f*o,t[11]=c*r+d*o,t}function tt(t,e,n){var r=Math.sin(n),o=Math.cos(n),i=e[0],a=e[1],u=e[2],c=e[3],s=e[4],l=e[5],f=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*o+s*r,t[1]=a*o+l*r,t[2]=u*o+f*r,t[3]=c*o+d*r,t[4]=s*o-i*r,t[5]=l*o-a*r,t[6]=f*o-u*r,t[7]=d*o-c*r,t}function et(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function nt(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function rt(t,e,n){var r,o,i,a=n[0],u=n[1],c=n[2],s=Math.hypot(a,u,c);return s<R?null:(a*=s=1/s,u*=s,c*=s,r=Math.sin(e),i=1-(o=Math.cos(e)),t[0]=a*a*i+o,t[1]=u*a*i+c*r,t[2]=c*a*i-u*r,t[3]=0,t[4]=a*u*i-c*r,t[5]=u*u*i+o,t[6]=c*u*i+a*r,t[7]=0,t[8]=a*c*i+u*r,t[9]=u*c*i-a*r,t[10]=c*c*i+o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function ot(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function it(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function at(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ut(t,e,n){var r=e[0],o=e[1],i=e[2],a=e[3],u=r+r,c=o+o,s=i+i,l=r*u,f=r*c,d=r*s,h=o*c,p=o*s,v=i*s,m=a*u,b=a*c,y=a*s;return t[0]=1-(h+v),t[1]=f+y,t[2]=d-b,t[3]=0,t[4]=f-y,t[5]=1-(l+v),t[6]=p+m,t[7]=0,t[8]=d+b,t[9]=p-m,t[10]=1-(l+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ct(t,e){var n=new N(3),r=-e[0],o=-e[1],i=-e[2],a=e[3],u=e[4],c=e[5],s=e[6],l=e[7],f=r*r+o*o+i*i+a*a;return f>0?(n[0]=2*(u*a+l*r+c*i-s*o)/f,n[1]=2*(c*a+l*o+s*r-u*i)/f,n[2]=2*(s*a+l*i+u*o-c*r)/f):(n[0]=2*(u*a+l*r+c*i-s*o),n[1]=2*(c*a+l*o+s*r-u*i),n[2]=2*(s*a+l*i+u*o-c*r)),ut(t,e,n),t}function st(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function lt(t,e){var n=e[0],r=e[1],o=e[2],i=e[4],a=e[5],u=e[6],c=e[8],s=e[9],l=e[10];return t[0]=Math.hypot(n,r,o),t[1]=Math.hypot(i,a,u),t[2]=Math.hypot(c,s,l),t}function ft(t,e){var n=new N(3);lt(n,e);var r=1/n[0],o=1/n[1],i=1/n[2],a=e[0]*r,u=e[1]*o,c=e[2]*i,s=e[4]*r,l=e[5]*o,f=e[6]*i,d=e[8]*r,h=e[9]*o,p=e[10]*i,v=a+l+p,m=0;return v>0?(m=2*Math.sqrt(v+1),t[3]=.25*m,t[0]=(f-h)/m,t[1]=(d-c)/m,t[2]=(u-s)/m):a>l&&a>p?(m=2*Math.sqrt(1+a-l-p),t[3]=(f-h)/m,t[0]=.25*m,t[1]=(u+s)/m,t[2]=(d+c)/m):l>p?(m=2*Math.sqrt(1+l-a-p),t[3]=(d-c)/m,t[0]=(u+s)/m,t[1]=.25*m,t[2]=(f+h)/m):(m=2*Math.sqrt(1+p-a-l),t[3]=(u-s)/m,t[0]=(d+c)/m,t[1]=(f+h)/m,t[2]=.25*m),t}function dt(t,e,n,r){var o=e[0],i=e[1],a=e[2],u=e[3],c=o+o,s=i+i,l=a+a,f=o*c,d=o*s,h=o*l,p=i*s,v=i*l,m=a*l,b=u*c,y=u*s,g=u*l,M=r[0],S=r[1],A=r[2];return t[0]=(1-(p+m))*M,t[1]=(d+g)*M,t[2]=(h-y)*M,t[3]=0,t[4]=(d-g)*S,t[5]=(1-(f+m))*S,t[6]=(v+b)*S,t[7]=0,t[8]=(h+y)*A,t[9]=(v-b)*A,t[10]=(1-(f+p))*A,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ht(t,e,n,r,o){var i=e[0],a=e[1],u=e[2],c=e[3],s=i+i,l=a+a,f=u+u,d=i*s,h=i*l,p=i*f,v=a*l,m=a*f,b=u*f,y=c*s,g=c*l,M=c*f,S=r[0],A=r[1],w=r[2],x=o[0],E=o[1],O=o[2],T=(1-(v+b))*S,C=(h+M)*S,P=(p-g)*S,L=(h-M)*A,j=(1-(d+b))*A,k=(m+y)*A,G=(p+g)*w,$=(m-y)*w,R=(1-(d+v))*w;return t[0]=T,t[1]=C,t[2]=P,t[3]=0,t[4]=L,t[5]=j,t[6]=k,t[7]=0,t[8]=G,t[9]=$,t[10]=R,t[11]=0,t[12]=n[0]+x-(T*x+L*E+G*O),t[13]=n[1]+E-(C*x+j*E+$*O),t[14]=n[2]+O-(P*x+k*E+R*O),t[15]=1,t}function pt(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=n+n,u=r+r,c=o+o,s=n*a,l=r*a,f=r*u,d=o*a,h=o*u,p=o*c,v=i*a,m=i*u,b=i*c;return t[0]=1-f-p,t[1]=l+b,t[2]=d-m,t[3]=0,t[4]=l-b,t[5]=1-s-p,t[6]=h+v,t[7]=0,t[8]=d+m,t[9]=h-v,t[10]=1-s-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function vt(t,e,n,r,o,i,a){var u=1/(n-e),c=1/(o-r),s=1/(i-a);return t[0]=2*i*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*c,t[6]=0,t[7]=0,t[8]=(n+e)*u,t[9]=(o+r)*c,t[10]=(a+i)*s,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*i*2*s,t[15]=0,t}function mt(t,e,n,r,o){var i,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(r-o),t[10]=(o+r)*i,t[14]=2*o*r*i):(t[10]=-1,t[14]=-2*r),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var bt=mt;function yt(t,e,n,r,o){var i,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(r-o),t[10]=o*i,t[14]=o*r*i):(t[10]=-1,t[14]=-r),t}function gt(t,e,n,r){var o=Math.tan(e.upDegrees*Math.PI/180),i=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),c=2/(a+u),s=2/(o+i);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=-(a-u)*c*.5,t[9]=(o-i)*s*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Mt(t,e,n,r,o,i,a){var u=1/(e-n),c=1/(r-o),s=1/(i-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*s,t[11]=0,t[12]=(e+n)*u,t[13]=(o+r)*c,t[14]=(a+i)*s,t[15]=1,t}var St=Mt;function At(t,e,n,r,o,i,a){var u=1/(e-n),c=1/(r-o),s=1/(i-a);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=s,t[11]=0,t[12]=(e+n)*u,t[13]=(o+r)*c,t[14]=i*s,t[15]=1,t}function wt(t,e,n,r){var o,i,a,u,c,s,l,f,d,h,p=e[0],v=e[1],m=e[2],b=r[0],y=r[1],g=r[2],M=n[0],S=n[1],A=n[2];return Math.abs(p-M)<R&&Math.abs(v-S)<R&&Math.abs(m-A)<R?B(t):(l=p-M,f=v-S,d=m-A,o=y*(d*=h=1/Math.hypot(l,f,d))-g*(f*=h),i=g*(l*=h)-b*d,a=b*f-y*l,(h=Math.hypot(o,i,a))?(o*=h=1/h,i*=h,a*=h):(o=0,i=0,a=0),u=f*a-d*i,c=d*o-l*a,s=l*i-f*o,(h=Math.hypot(u,c,s))?(u*=h=1/h,c*=h,s*=h):(u=0,c=0,s=0),t[0]=o,t[1]=u,t[2]=l,t[3]=0,t[4]=i,t[5]=c,t[6]=f,t[7]=0,t[8]=a,t[9]=s,t[10]=d,t[11]=0,t[12]=-(o*p+i*v+a*m),t[13]=-(u*p+c*v+s*m),t[14]=-(l*p+f*v+d*m),t[15]=1,t)}function xt(t,e,n,r){var o=e[0],i=e[1],a=e[2],u=r[0],c=r[1],s=r[2],l=o-n[0],f=i-n[1],d=a-n[2],h=l*l+f*f+d*d;h>0&&(l*=h=1/Math.sqrt(h),f*=h,d*=h);var p=c*d-s*f,v=s*l-u*d,m=u*f-c*l;return(h=p*p+v*v+m*m)>0&&(p*=h=1/Math.sqrt(h),v*=h,m*=h),t[0]=p,t[1]=v,t[2]=m,t[3]=0,t[4]=f*m-d*v,t[5]=d*p-l*m,t[6]=l*v-f*p,t[7]=0,t[8]=l,t[9]=f,t[10]=d,t[11]=0,t[12]=o,t[13]=i,t[14]=a,t[15]=1,t}function Et(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function Ot(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function Tt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function Ct(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function Pt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function Lt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function jt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function kt(t,e){var n=t[0],r=t[1],o=t[2],i=t[3],a=t[4],u=t[5],c=t[6],s=t[7],l=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],m=t[14],b=t[15],y=e[0],g=e[1],M=e[2],S=e[3],A=e[4],w=e[5],x=e[6],E=e[7],O=e[8],T=e[9],C=e[10],P=e[11],L=e[12],j=e[13],k=e[14],G=e[15];return Math.abs(n-y)<=R*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-g)<=R*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(o-M)<=R*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(i-S)<=R*Math.max(1,Math.abs(i),Math.abs(S))&&Math.abs(a-A)<=R*Math.max(1,Math.abs(a),Math.abs(A))&&Math.abs(u-w)<=R*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(c-x)<=R*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(s-E)<=R*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(l-O)<=R*Math.max(1,Math.abs(l),Math.abs(O))&&Math.abs(f-T)<=R*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(d-C)<=R*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(h-P)<=R*Math.max(1,Math.abs(h),Math.abs(P))&&Math.abs(p-L)<=R*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(v-j)<=R*Math.max(1,Math.abs(v),Math.abs(j))&&Math.abs(m-k)<=R*Math.max(1,Math.abs(m),Math.abs(k))&&Math.abs(b-G)<=R*Math.max(1,Math.abs(b),Math.abs(G))}var Gt=Y,$t=Ct;function Rt(){var t=new N(3);return N!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Nt(t){var e=new N(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Wt(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Vt(t,e,n){var r=new N(3);return r[0]=t,r[1]=e,r[2]=n,r}function Dt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function It(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function _t(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function qt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Bt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Ft(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Ht(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function Ut(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Xt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function Yt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function zt(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function Qt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Zt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function Kt(t,e){var n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return Math.hypot(n,r,o)}function Jt(t,e){var n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return n*n+r*r+o*o}function te(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function ee(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function ne(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function re(t,e){var n=e[0],r=e[1],o=e[2],i=n*n+r*r+o*o;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function oe(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ie(t,e,n){var r=e[0],o=e[1],i=e[2],a=n[0],u=n[1],c=n[2];return t[0]=o*c-i*u,t[1]=i*a-r*c,t[2]=r*u-o*a,t}function ae(t,e,n,r){var o=e[0],i=e[1],a=e[2];return t[0]=o+r*(n[0]-o),t[1]=i+r*(n[1]-i),t[2]=a+r*(n[2]-a),t}function ue(t,e,n,r,o,i){var a=i*i,u=a*(2*i-3)+1,c=a*(i-2)+i,s=a*(i-1),l=a*(3-2*i);return t[0]=e[0]*u+n[0]*c+r[0]*s+o[0]*l,t[1]=e[1]*u+n[1]*c+r[1]*s+o[1]*l,t[2]=e[2]*u+n[2]*c+r[2]*s+o[2]*l,t}function ce(t,e,n,r,o,i){var a=1-i,u=a*a,c=i*i,s=u*a,l=3*i*u,f=3*c*a,d=c*i;return t[0]=e[0]*s+n[0]*l+r[0]*f+o[0]*d,t[1]=e[1]*s+n[1]*l+r[1]*f+o[1]*d,t[2]=e[2]*s+n[2]*l+r[2]*f+o[2]*d,t}function se(t,e){e=e||1;var n=2*W()*Math.PI,r=2*W()-1,o=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=r*e,t}function le(t,e,n){var r=e[0],o=e[1],i=e[2],a=n[3]*r+n[7]*o+n[11]*i+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*o+n[8]*i+n[12])/a,t[1]=(n[1]*r+n[5]*o+n[9]*i+n[13])/a,t[2]=(n[2]*r+n[6]*o+n[10]*i+n[14])/a,t}function fe(t,e,n){var r=e[0],o=e[1],i=e[2];return t[0]=r*n[0]+o*n[3]+i*n[6],t[1]=r*n[1]+o*n[4]+i*n[7],t[2]=r*n[2]+o*n[5]+i*n[8],t}function de(t,e,n){var r=n[0],o=n[1],i=n[2],a=n[3],u=e[0],c=e[1],s=e[2],l=o*s-i*c,f=i*u-r*s,d=r*c-o*u,h=o*d-i*f,p=i*l-r*d,v=r*f-o*l,m=2*a;return l*=m,f*=m,d*=m,h*=2,p*=2,v*=2,t[0]=u+l+h,t[1]=c+f+p,t[2]=s+d+v,t}function he(t,e,n,r){var o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t}function pe(t,e,n,r){var o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t}function ve(t,e,n,r){var o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t}function me(t,e){var n=t[0],r=t[1],o=t[2],i=e[0],a=e[1],u=e[2],c=Math.sqrt(n*n+r*r+o*o)*Math.sqrt(i*i+a*a+u*u),s=c&&oe(t,e)/c;return Math.acos(Math.min(Math.max(s,-1),1))}function be(t){return t[0]=0,t[1]=0,t[2]=0,t}function ye(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function ge(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Me(t,e){var n=t[0],r=t[1],o=t[2],i=e[0],a=e[1],u=e[2];return Math.abs(n-i)<=R*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=R*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(o-u)<=R*Math.max(1,Math.abs(o),Math.abs(u))}var Se,Ae=qt,we=Bt,xe=Ft,Ee=Kt,Oe=Jt,Te=Wt,Ce=te,Pe=(Se=Rt(),function(t,e,n,r,o,i){var a,u;for(e||(e=3),n||(n=0),u=r?Math.min(r*e+n,t.length):t.length,a=n;a<u;a+=e)Se[0]=t[a],Se[1]=t[a+1],Se[2]=t[a+2],o(Se,Se,i),t[a]=Se[0],t[a+1]=Se[1],t[a+2]=Se[2];return t});function Le(t){var e=t[0],n=t[1],r=t[2],o=t[3];return Math.hypot(e,n,r,o)}function je(t){var e=t[0],n=t[1],r=t[2],o=t[3];return e*e+n*n+r*r+o*o}!function(){var t,e=(t=new N(4),N!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function ke(){var t=new N(4);return N!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Ge(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function $e(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Re(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>R?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function Ne(t,e){var n=hn(t,e);return Math.acos(2*n*n-1)}function We(t,e,n){var r=e[0],o=e[1],i=e[2],a=e[3],u=n[0],c=n[1],s=n[2],l=n[3];return t[0]=r*l+a*u+o*s-i*c,t[1]=o*l+a*c+i*u-r*s,t[2]=i*l+a*s+r*c-o*u,t[3]=a*l-r*u-o*c-i*s,t}function Ve(t,e,n){n*=.5;var r=e[0],o=e[1],i=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+a*u,t[1]=o*c+i*u,t[2]=i*c-o*u,t[3]=a*c-r*u,t}function De(t,e,n){n*=.5;var r=e[0],o=e[1],i=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c-i*u,t[1]=o*c+a*u,t[2]=i*c+r*u,t[3]=a*c-o*u,t}function Ie(t,e,n){n*=.5;var r=e[0],o=e[1],i=e[2],a=e[3],u=Math.sin(n),c=Math.cos(n);return t[0]=r*c+o*u,t[1]=o*c-r*u,t[2]=i*c+a*u,t[3]=a*c-i*u,t}function _e(t,e){var n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t}function qe(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=Math.sqrt(n*n+r*r+o*o),u=Math.exp(i),c=a>0?u*Math.sin(a)/a:0;return t[0]=n*c,t[1]=r*c,t[2]=o*c,t[3]=u*Math.cos(a),t}function Be(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=Math.sqrt(n*n+r*r+o*o),u=a>0?Math.atan2(a,i)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=o*u,t[3]=.5*Math.log(n*n+r*r+o*o+i*i),t}function Fe(t,e,n){return Be(t,e),dn(t,t,n),qe(t,t),t}function He(t,e,n,r){var o,i,a,u,c,s=e[0],l=e[1],f=e[2],d=e[3],h=n[0],p=n[1],v=n[2],m=n[3];return(i=s*h+l*p+f*v+d*m)<0&&(i=-i,h=-h,p=-p,v=-v,m=-m),1-i>R?(o=Math.acos(i),a=Math.sin(o),u=Math.sin((1-r)*o)/a,c=Math.sin(r*o)/a):(u=1-r,c=r),t[0]=u*s+c*h,t[1]=u*l+c*p,t[2]=u*f+c*v,t[3]=u*d+c*m,t}function Ue(t){var e=W(),n=W(),r=W(),o=Math.sqrt(1-e),i=Math.sqrt(e);return t[0]=o*Math.sin(2*Math.PI*n),t[1]=o*Math.cos(2*Math.PI*n),t[2]=i*Math.sin(2*Math.PI*r),t[3]=i*Math.cos(2*Math.PI*r),t}function Xe(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=n*n+r*r+o*o+i*i,u=a?1/a:0;return t[0]=-n*u,t[1]=-r*u,t[2]=-o*u,t[3]=i*u,t}function Ye(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function ze(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var o=0;e[4]>e[0]&&(o=1),e[8]>e[3*o+o]&&(o=2);var i=(o+1)%3,a=(o+2)%3;n=Math.sqrt(e[3*o+o]-e[3*i+i]-e[3*a+a]+1),t[o]=.5*n,n=.5/n,t[3]=(e[3*i+a]-e[3*a+i])*n,t[i]=(e[3*i+o]+e[3*o+i])*n,t[a]=(e[3*a+o]+e[3*o+a])*n}return t}function Qe(t,e,n,r){var o=.5*Math.PI/180;e*=o,n*=o,r*=o;var i=Math.sin(e),a=Math.cos(e),u=Math.sin(n),c=Math.cos(n),s=Math.sin(r),l=Math.cos(r);return t[0]=i*c*l-a*u*s,t[1]=a*u*l+i*c*s,t[2]=a*c*s-i*u*l,t[3]=a*c*l+i*u*s,t}function Ze(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var Ke,Je,tn,en,nn,rn,on,an=function(t){var e=new N(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},un=function(t,e,n,r){var o=new N(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o},cn=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},sn=function(t,e,n,r,o){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t},ln=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},fn=We,dn=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},hn=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},pn=function(t,e,n,r){var o=e[0],i=e[1],a=e[2],u=e[3];return t[0]=o+r*(n[0]-o),t[1]=i+r*(n[1]-i),t[2]=a+r*(n[2]-a),t[3]=u+r*(n[3]-u),t},vn=Le,mn=vn,bn=je,yn=bn,gn=function(t,e){var n=e[0],r=e[1],o=e[2],i=e[3],a=n*n+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=o*a,t[3]=i*a,t},Mn=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},Sn=function(t,e){var n=t[0],r=t[1],o=t[2],i=t[3],a=e[0],u=e[1],c=e[2],s=e[3];return Math.abs(n-a)<=R*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=R*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-c)<=R*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-s)<=R*Math.max(1,Math.abs(i),Math.abs(s))},An=(Ke=Rt(),Je=Vt(1,0,0),tn=Vt(0,1,0),function(t,e,n){var r=oe(e,n);return r<-.999999?(ie(Ke,Je,e),Te(Ke)<1e-6&&ie(Ke,tn,e),re(Ke,Ke),$e(t,Ke,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(ie(Ke,e,n),t[0]=Ke[0],t[1]=Ke[1],t[2]=Ke[2],t[3]=1+r,gn(t,t))}),wn=(en=ke(),nn=ke(),function(t,e,n,r,o,i){return He(en,e,o,i),He(nn,n,r,i),He(t,en,nn,2*i*(1-i)),t}),xn=(rn=new N(9),N!=Float32Array&&(rn[1]=0,rn[2]=0,rn[3]=0,rn[5]=0,rn[6]=0,rn[7]=0),rn[0]=1,rn[4]=1,rn[8]=1,on=rn,function(t,e,n,r){return on[0]=n[0],on[3]=n[1],on[6]=n[2],on[1]=r[0],on[4]=r[1],on[7]=r[2],on[2]=-e[0],on[5]=-e[1],on[8]=-e[2],gn(t,ze(t,on))});function En(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function On(t,e,n,r){var o="g-filter-"+e.entity,i=t.querySelectorAll("[name=".concat(o,"]"));if(i.length&&i.forEach((function(e){t.removeChild(e)})),0===r.length)null==n||n.removeAttribute("filter");else{var a=r.map((function(e,n){var r=e.name,i=e.params,a=En("filter");return"blur"===r?function(t,e){var n=En("feGaussianBlur");n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation","".concat(e[0].value)),t.appendChild(n)}(a,i):"brightness"===r?function(t,e){var n=Tn(e[0]);Cn(t,{type:"linear",slope:n,intercept:0})}(a,i):"drop-shadow"===r?function(t,e){var n=e[0].value,r=e[1].value,o=e[2].value,i=e[3].formatted,a=En("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("stdDeviation","".concat(o)),t.appendChild(a);var u=En("feOffset");u.setAttribute("dx","".concat(n)),u.setAttribute("dy","".concat(r)),u.setAttribute("result","offsetblur"),t.appendChild(u);var c=En("feFlood");c.setAttribute("flood-color",i),t.appendChild(c);var s=En("feComposite");s.setAttribute("in2","offsetblur"),s.setAttribute("operator","in"),t.appendChild(s);var l=En("feMerge");t.appendChild(l);var f=En("feMergeNode"),d=En("feMergeNode");d.setAttribute("in","SourceGraphic"),l.appendChild(f),l.appendChild(d)}(a,i):"contrast"===r?function(t,e){var n=Tn(e[0]);Cn(t,{type:"linear",slope:n,intercept:-.5*n+.5})}(a,i):"grayscale"===r?function(t,e){var n=Tn(e[0]);Pn(t,[.2126+.7874*(1-n),.7152-.7152*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152+.2848*(1-n),.0722-.0722*(1-n),0,0,.2126-.2126*(1-n),.7152-.7152*(1-n),.0722+.9278*(1-n),0,0,0,0,0,1,0])}(a,i):"sepia"===r?function(t,e){var n=Tn(e[0]);Pn(t,[.393+.607*(1-n),.769-.769*(1-n),.189-.189*(1-n),0,0,.349-.349*(1-n),.686+.314*(1-n),.168-.168*(1-n),0,0,.272-.272*(1-n),.534-.534*(1-n),.131+.869*(1-n),0,0,0,0,0,1,0])}(a,i):"saturate"===r?function(t,e){var n=Tn(e[0]),r=En("feColorMatrix");r.setAttribute("type","saturate"),r.setAttribute("values","".concat(n)),t.appendChild(r)}(a,i):"hue-rotate"===r?function(t,e){var n=En("feColorMatrix");n.setAttribute("type","hueRotate"),n.setAttribute("values","".concat(e[0].to(m.UnitType.kDegrees).value)),t.appendChild(n)}(a,i):"invert"===r&&function(t,e){var n=Tn(e[0]);Cn(t,{type:"table",tableValues:"".concat(n," ").concat(1-n)})}(a,i),a.id="".concat(o,"-").concat(n),a.setAttribute("name",o),t.appendChild(a),a.id}));null==n||n.setAttribute("filter",a.map((function(t){return"url(#".concat(t,")")})).join(" "))}}function Tn(t){return t.unit===m.UnitType.kPercentage?t.value/100:t.value}function Cn(t,e){var n=e.type,r=e.slope,o=e.intercept,i=e.tableValues,a=En("feComponentTransfer");[En("feFuncR"),En("feFuncG"),En("feFuncB")].forEach((function(t){t.setAttribute("type",n),"table"===n?t.setAttribute("tableValues","".concat(i)):(t.setAttribute("slope","".concat(r)),t.setAttribute("intercept","".concat(o))),a.appendChild(t)})),t.appendChild(a)}function Pn(t,e){var n=En("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values",e.join(" ")),t.appendChild(n)}var Ln={},jn=0;function kn(t,e,n,r,o){if(r){var i=function(t){var e="";if(t instanceof m.CSSGradientValue){var n=t.type;if(n===m.GradientPatternType.Pattern){var r=t.value.src;e=r}else if(n===m.GradientPatternType.LinearGradient||n===m.GradientPatternType.RadialGradient){var o=t.value,i=o.x0,a=o.y0,u=o.x1,c=o.y1,s=o.r1,l=o.steps;e="".concat(n).concat(i).concat(a).concat(u).concat(c).concat(s||0).concat(l.map((function(t){return t.join("")})).join(""))}e&&(Ln[e]||(Ln[e]="_pattern_".concat(n,"_").concat(jn++)))}return Ln[e]}(r),a=t.querySelector("#".concat(i));r instanceof m.CSSRGB?"currentColor"===e.style[o]?null==n||n.setAttribute(o,"currentColor"):null==n||n.setAttribute(o,r.isNone?"none":r.toString()):r.type===m.GradientPatternType.Pattern?(a||function(t,e,n){var r=e.value.src,o=En("pattern");o.setAttribute("patternUnits","userSpaceOnUse");var i=En("image");o.appendChild(i),o.id=n,t.appendChild(o),i.setAttribute("href",r);var a=new window.Image;r.match(/^data:/i)||(a.crossOrigin="Anonymous");function u(){o.setAttribute("width","".concat(a.width)),o.setAttribute("height","".concat(a.height))}a.src=r,a.complete?u():(a.onload=u,a.src=a.src)}(t,r,i),null==n||n.setAttribute(o,"url(#".concat(i,")"))):(a||function(t,e,n){var r=En(e.type===m.GradientPatternType.LinearGradient?"linearGradient":"radialGradient");if(e.type===m.GradientPatternType.LinearGradient){var o=e.value,i=o.x0,a=o.y0,u=o.x1,c=o.y1;r.setAttribute("x1","".concat(i)),r.setAttribute("y1","".concat(a)),r.setAttribute("x2","".concat(u)),r.setAttribute("y2","".concat(c))}else{var s=e.value,l=(i=s.x0,a=s.y0,s.r1);r.setAttribute("cx","".concat(i)),r.setAttribute("cy","".concat(a)),r.setAttribute("r","".concat(l/2))}var f="";e.value.steps.forEach((function(t){var e=v(t,2),n=e[0],r=e[1];f+='<stop offset="'.concat(n,'" stop-color="').concat(r,'"></stop>')})),r.innerHTML=f,r.id=n,t.appendChild(r)}(t,r,i),null==n||n.setAttribute(o,"url(#".concat(i,")")))}}var Gn;var $n=((Gn={})[m.Shape.RECT]="path",Gn[m.Shape.CIRCLE]="circle",Gn[m.Shape.ELLIPSE]="ellipse",Gn[m.Shape.IMAGE]="image",Gn[m.Shape.GROUP]="g",Gn[m.Shape.LINE]="line",Gn[m.Shape.POLYLINE]="polyline",Gn[m.Shape.POLYGON]="polygon",Gn[m.Shape.TEXT]="text",Gn[m.Shape.PATH]="path",Gn[m.Shape.HTML]="foreignObject",Gn),Rn={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",anchor:"anchor",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor"},Nn={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},Wn={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit"},Vn="g_svg",Dn=function(){function t(){this.renderQueue=[]}var e;return e=t,t.prototype.apply=function(t){var n=this,r=function(t){var e=t.target;n.createSVGDom(e,n.$camera)},o=function(t){var e=t.target;n.removeSVGDom(e)},i=function(t){var e,r,o=t.target;if(o.elementSVG){var i=t.attrName;if("zIndex"===i){var a=o.parentNode,u=null===(r=null===(e=o.parentNode)||void 0===e?void 0:e.elementSVG)||void 0===r?void 0:r.$groupEl,c=((null==a?void 0:a.children)||[]).slice();u&&n.reorderChildren(u,c)}else if("increasedLineWidthForHitTesting"===i){var s=o.elementSVG;n.createOrUpdateHitArea(o,s.$el,s.$groupEl)}n.updateAttribute(o,[i])}};t.hooks.init.tapPromise(e.tag,(function(){return d(n,void 0,void 0,(function(){var t,e;return h(this,(function(n){return this.$def=En("defs"),t=this.contextService.getContext(),(e=this.canvasConfig.background)&&(t.style.background=e),t.appendChild(this.$def),t.setAttribute("color-interpolation-filters","sRGB"),this.$camera=En("g"),this.$camera.id="".concat(Vn,"_camera"),this.applyTransform(this.$camera,this.camera.getOrthoMatrix()),t.appendChild(this.$camera),this.renderingContext.root.addEventListener(m.ElementEvent.MOUNTED,r),this.renderingContext.root.addEventListener(m.ElementEvent.UNMOUNTED,o),this.renderingContext.root.addEventListener(m.ElementEvent.ATTR_MODIFIED,i),[2]}))}))})),t.hooks.destroy.tap(e.tag,(function(){n.renderingContext.root.removeEventListener(m.ElementEvent.MOUNTED,r),n.renderingContext.root.removeEventListener(m.ElementEvent.UNMOUNTED,o),n.renderingContext.root.removeEventListener(m.ElementEvent.ATTR_MODIFIED,i)})),t.hooks.render.tap(e.tag,(function(t){n.renderQueue.push(t)})),t.hooks.endFrame.tap(e.tag,(function(){n.renderingContext.renderReasons.has(m.RenderReason.CAMERA_CHANGED)&&n.applyTransform(n.$camera,n.camera.getOrthoMatrix()),n.renderQueue.forEach((function(t){var e,r,o=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,i=null===(r=t.elementSVG)||void 0===r?void 0:r.$groupEl;if(o&&i){n.applyTransform(i,t.getLocalTransform());var a=((null==t?void 0:t.children)||[]).slice();n.reorderChildren(i,a||[]),t.renderable.dirty=!1}})),n.renderQueue=[]}))},t.prototype.reorderChildren=function(t,e){if(e.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})),e.length){var n=document.createDocumentFragment();e.forEach((function(t){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)})),t.appendChild(n)}},t.prototype.applyTransform=function(t,e){var n=o.getTranslation(i.create(),e),r=o.getScaling(i.create(),e),u=o.getRotation(a.create(),e),c=v(n,2),s=c[0],l=c[1],f=v(r,2),d=f[0],h=f[1],p=v(Object(m.getEuler)(i.create(),u),3),b=p[0],y=(p[1],p[2]),g=Object(m.fromRotationTranslationScale)(b||y,s,l,d,h);t.setAttribute("transform","matrix(".concat(C(g[0]),",").concat(C(g[1]),",").concat(C(g[3]),",").concat(C(g[4]),",").concat(C(g[6]),",").concat(C(g[7]),")"))},t.prototype.applyAttributes=function(t){var e=t.elementSVG,n=null==e?void 0:e.$el,r=null==e?void 0:e.$groupEl;if(n&&r){var o=t.nodeName,i=t.attributes;n.setAttribute("fill","none"),o===m.Shape.IMAGE&&n.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(i))}},t.prototype.updateAttribute=function(t,e){var n=this,r=!1,o=t.elementSVG,i=o.$el,a=o.$groupEl,u=o.$hitTestingEl,c=t.parsedStyle,s=t.computedStyle,l=this.elementRendererFactory(t.nodeName);e.forEach((function(e){var o,f=Rn[e],d=s[e],h=c[e];if(!r&&l&&l.dependencies.indexOf(e)>-1&&(r=!0),t.nodeName===m.Shape.HTML&&("fill"===e?i.style.background=h.toString():"stroke"===e?(i.style["border-color"]=h.toString(),i.style["border-style"]="solid"):"lineWidth"===e?i.style["border-width"]="".concat(h.value||0,"px"):"lineDash"===e&&(i.style["border-style"]="dashed")),"fill"===e||"stroke"===e)kn(n.$def,t,i,h,f);else if("visibility"===e)null==a||a.setAttribute(f,"".concat(d.value));else if("clipPath"===e)n.createOrUpdateClipPath(h,a);else if("shadowColor"===e||"shadowBlur"===e||"shadowOffsetX"===e||"shadowOffsetY"===e)!function(t,e,n,r){var o="filter-dropshadow-"+e.entity,i=t.querySelector("#".concat(o));if(!i){i=En("filter");var a=En("feDropShadow");a.setAttribute("dx","0"),a.setAttribute("dy","0"),i.appendChild(a),i.id=o,t.appendChild(i)}var u=i.children[0];if("shadowColor"===r){var c=e.parsedStyle[r];u.setAttribute("flood-color",c.toString())}else if("shadowBlur"===r){var s=e.parsedStyle[r];u.setAttribute("stdDeviation","".concat((s&&s.value||0)/2))}else if("shadowOffsetX"===r){var l=e.parsedStyle[r];u.setAttribute("dx","".concat((l&&l.value||0)/2))}else if("shadowOffsetY"===r){var f=e.parsedStyle[r];u.setAttribute("dy","".concat((f&&f.value||0)/2))}null==n||n.setAttribute("filter","url(#".concat(o,")"))}(n.$def,t,i,e);else if("filter"===e)On(n.$def,t,i,h);else if("innerHTML"===e)n.createOrUpdateInnerHTML(i,h);else if(t.nodeName!==m.Shape.TEXT&&["width","height","r","rx","ry","anchor"].indexOf(e)>-1&&n.updateAnchorWithTransform(t),"anchor"!==e&&d){var p=d.toString();if("unset"!==p&&p!==Wn[e]){var v=(null===(o=Nn[e])||void 0===o?void 0:o[p])||p;[i,u].forEach((function(t){t&&f&&t.setAttribute(f,v)}))}}})),r&&i&&[i,u].forEach((function(e){e&&l.apply(e,t.parsedStyle)}))},t.prototype.createSVGDom=function(t,e,n){var r;void 0===n&&(n=!1),t.elementSVG=new A;var o=t.elementSVG,i=$n[t.nodeName]||"g";if(i){var a=void 0,u=En(i);t.nodeName===m.Shape.HTML&&(t.parsedStyle.$el=u),u.id="".concat(Vn,"_").concat(t.nodeName,"_").concat(t.entity),"g"===i||n?a=u:(a=En("g")).appendChild(u),o.$el=u,o.$groupEl=a;var c=t.parentNode&&(null===(r=t.parentNode.elementSVG)||void 0===r?void 0:r.$groupEl)||e;c&&c.appendChild(a),this.applyAttributes(t),this.createOrUpdateHitArea(t,u,a)}},t.prototype.removeSVGDom=function(t){var e,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;n&&n.parentNode&&n.parentNode.removeChild(n)},t.prototype.createOrUpdateHitArea=function(t,e,n){var r,o,i=t.elementSVG,a=i.$hitTestingEl,u=null===(r=t.parsedStyle.increasedLineWidthForHitTesting)||void 0===r?void 0:r.value;if(u){if(!a){(a=e.cloneNode()).id="".concat(Vn,"_").concat(t.nodeName,"_hittesting_").concat(t.entity),["filter"].forEach((function(t){a.removeAttribute(t)}));var c="none"!==e.getAttribute("fill");a.setAttribute("fill",c?"transparent":"none"),a.setAttribute("stroke","transparent"),n.appendChild(a),i.$hitTestingEl=a}a.setAttribute("stroke-width","".concat(u+(null===(o=t.parsedStyle.lineWidth)||void 0===o?void 0:o.value)))}else a&&(n.removeChild(a),i.$hitTestingEl=null)},t.prototype.createOrUpdateInnerHTML=function(t,e){var n=document.createElement("div");"string"==typeof e?n.innerHTML=e:n.appendChild(e),t.innerHTML="",t.appendChild(n)},t.prototype.createOrUpdateClipPath=function(t,e){var n;if(t){var r="clip-path-"+t.entity;if(!this.$def.querySelector("#".concat(r))){var o=En("clipPath");o.id=r,this.$def.appendChild(o),this.createSVGDom(t,o,!0),t.elementSVG.$groupEl=o}var i=null===(n=t.elementSVG)||void 0===n?void 0:n.$groupEl;i&&this.applyTransform(i,t.getLocalTransform()),this.applyAttributes(t),e.setAttribute("clip-path","url(#".concat(r,")"))}else e.removeAttribute("clip-path")},t.prototype.updateAnchorWithTransform=function(t){var e,n,r=t.getGeometryBounds(),o=r&&2*r.halfExtents[0]||0,i=r&&2*r.halfExtents[1]||0,a=(t.parsedStyle||{}).anchor;[null===(e=t.elementSVG)||void 0===e?void 0:e.$el,null===(n=t.elementSVG)||void 0===n?void 0:n.$hitTestingEl].forEach((function(e){e&&(e.setAttribute("transform","translate(-".concat(a[0].value*o,",-").concat(a[1].value*i,")")),t.nodeName!==m.Shape.CIRCLE&&t.nodeName!==m.Shape.ELLIPSE||(e.setAttribute("cx","".concat(o/2)),e.setAttribute("cy","".concat(i/2))))}))},t.tag="SVGRenderer",l([Object(b.inject)(m.CanvasConfig),f("design:type",Object)],t.prototype,"canvasConfig",void 0),l([Object(b.inject)(m.DefaultCamera),f("design:type",m.Camera)],t.prototype,"camera",void 0),l([Object(b.inject)(m.ContextService),f("design:type",Object)],t.prototype,"contextService",void 0),l([Object(b.inject)(m.RenderingContext),f("design:type",Object)],t.prototype,"renderingContext",void 0),l([Object(b.inject)($),f("design:type",Function)],t.prototype,"elementRendererFactory",void 0),t=e=l([Object(b.singleton)({contrib:m.RenderingPluginContribution})],t)}(),In=Object(b.Module)((function(t){t(w),t(x),t(E),t(O),t(k),t(G),t({token:$,useFactory:function(t){return function(e){return e===m.Shape.RECT?t.container.get(w):e===m.Shape.IMAGE?t.container.get(x):e===m.Shape.LINE?t.container.get(E):e===m.Shape.POLYLINE||e===m.Shape.POLYGON?t.container.get(O):e===m.Shape.TEXT?t.container.get(k):e===m.Shape.PATH?t.container.get(G):null}}}),t(Dn)})),_n=function(){function t(){this.name="svg-renderer"}return t.prototype.init=function(t){t.load(In,!0)},t.prototype.destroy=function(t){t.unload(In)},t}(),qn=function(){function t(){}var e;return e=t,t.prototype.apply=function(t){var n=this;t.hooks.pick.tapPromise(e.tag,(function(t){return d(n,void 0,void 0,(function(){var e,n,r,o,i,a,u,c,s,l,f,d,v;return h(this,(function(h){e=t.topmost,n=t.position,r=n.clientX,o=n.clientY;try{i=[];try{for(a=p(document.elementsFromPoint(r,o)),u=a.next();!u.done;u=a.next())if(c=u.value,(s=c&&c.getAttribute("id"))&&s.startsWith(Vn)&&(l=s.lastIndexOf("_"),(f=this.displayObjectPool.getByEntity(Number(s.substring(l+1))))&&f.isInteractive()&&(i.push(f),e)))return t.picked=i,[2,t]}catch(t){d={error:t}}finally{try{u&&!u.done&&(v=a.return)&&v.call(a)}finally{if(d)throw d.error}}t.picked=i}catch(e){t.picked=[]}return[2,t]}))}))}))},t.tag="SVGPicker",l([Object(b.inject)(m.SceneGraphService),f("design:type",Object)],t.prototype,"sceneGraphService",void 0),l([Object(b.inject)(m.DisplayObjectPool),f("design:type",m.DisplayObjectPool)],t.prototype,"displayObjectPool",void 0),t=e=l([Object(b.singleton)({contrib:m.RenderingPluginContribution})],t)}(),Bn=Object(b.Module)((function(t){t(qn)})),Fn=function(){function t(){this.name="svg-picker"}return t.prototype.init=function(t){t.load(Bn,!0)},t.prototype.destroy=function(t){t.unload(Bn)},t}(),Hn=function(){function t(){}return t.prototype.init=function(){var t=this.canvasConfig.container;if(this.$container=Object(m.isString)(t)?document.getElementById(t):t,this.$container){this.$container.style.position||(this.$container.style.position="relative");var e=En("svg");e.setAttribute("width","".concat(this.canvasConfig.width)),e.setAttribute("height","".concat(this.canvasConfig.height)),this.$container.appendChild(e),this.$namespace=e}var n=window.devicePixelRatio||1;n=n>=1?Math.ceil(n):1,this.dpr=n},t.prototype.getDomElement=function(){return this.$namespace},t.prototype.getContext=function(){return this.$namespace},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)},t.prototype.resize=function(t,e){this.$namespace&&(this.$namespace.setAttribute("width","".concat(t)),this.$namespace.setAttribute("height","".concat(e)))},t.prototype.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},l([Object(b.inject)(m.CanvasConfig),f("design:type",Object)],t.prototype,"canvasConfig",void 0),t=l([Object(b.singleton)({token:m.ContextService})],t)}(),Un=Object(b.Module)((function(t){t(Hn)})),Xn=function(){function t(){this.name="svg-context-register"}return t.prototype.init=function(t){t.load(Un,!0)},t.prototype.destroy=function(t){t.unload(Un)},t}(),Yn=function(t){function e(e){var n=t.call(this,e)||this;return n.registerPlugin(new Xn),n.registerPlugin(new _n),n.registerPlugin(new S),n.registerPlugin(new Fn),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(m.AbstractRenderer)}])}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("mana-syringe")):"function"==typeof define&&define.amd?define(["exports","@antv/g","mana-syringe"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.SVG={}),t.window.G,t.window.G.ManaSyringe)}(this,(function(t,e,r){"use strict";function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}function i(t,e,r,n){var i,o=arguments.length,a=3>o?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(a=(3>o?i(a):o>3?i(e,r,a):i(e,r))||a);return o>3&&a&&Object.defineProperty(e,r,a),a}function o(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function a(){
|
|
2
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
3
|
+
a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",u=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new A(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=E(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function h(){}function d(){}function p(){}var v={};s(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(L([])));g&&g!==e&&r.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(i,o,a,u){var s=l(t[i],t,o);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=p,s(m,"constructor",p),s(p,"constructor",d),d.displayName=s(p,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),s(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),s(m,u,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=L,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function u(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}var c,l,f=/mobile|tablet|ip(ad|hone|od)|android/i,h=(c=function(){function t(){this.contextService=void 0,this.renderingContext=void 0}return t.prototype.apply=function(t){var e=this,r=this.renderingContext.root.ownerDocument.defaultView,n=r.supportTouchEvent&&f.test(navigator.userAgent),i=function(e){t.hooks.pointerMove.call(e)},o=function(e){t.hooks.pointerUp.call(e)},u=function(e){t.hooks.pointerDown.call(e)},c=function(e){t.hooks.pointerOver.call(e)},h=function(e){t.hooks.pointerOut.call(e)},d=function(e){t.hooks.pointerCancel.call(e)},p=function(e){t.hooks.pointerWheel.call(e)},v=function(t){globalThis.document.addEventListener("pointermove",i,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("pointerleave",h,!0),t.addEventListener("pointerover",c,!0),globalThis.addEventListener("pointerup",o,!0)},y=function(t){t.addEventListener("touchstart",u,!0),t.addEventListener("touchend",o,!0),t.addEventListener("touchmove",i,!0),t.addEventListener("touchcancel",d,!0)},g=function(t){globalThis.document.addEventListener("mousemove",i,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("mouseout",h,!0),t.addEventListener("mouseover",c,!0),globalThis.addEventListener("mouseup",o,!0)},m=function(t){t.removeEventListener("touchstart",u,!0),t.removeEventListener("touchend",o,!0),t.removeEventListener("touchmove",i,!0)},b=function(t){globalThis.document.removeEventListener("mousemove",i,!0),t.removeEventListener("mousedown",u,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",c,!0),globalThis.removeEventListener("mouseup",o,!0)};t.hooks.init.tapPromise(l.tag,s(a().mark((function t(){var i;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=e.contextService.getDomElement(),r.supportPointerEvent&&v(i),n?y(i):r.supportTouchEvent?(y(i),r.supportPointerEvent||g(i)):r.supportPointerEvent||g(i),i.addEventListener("wheel",p,{passive:!0,capture:!0});case 4:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(l.tag,(function(){var t=e.contextService.getDomElement();r.supportPointerEvent&&function(t){globalThis.document.removeEventListener("pointermove",i,!0),t.removeEventListener("pointerdown",u,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",c,!0),globalThis.removeEventListener("pointerup",o,!0)}(t),n?m(t):r.supportTouchEvent?(m(t),r.supportPointerEvent||b(t)):r.supportPointerEvent||b(t),t.removeEventListener("wheel",p,!0)}))},t}(),c.tag="DOMInteraction",l=c);i([r.inject(e.ContextService),o("design:type",Object)],h.prototype,"contextService",void 0),i([r.inject(e.RenderingContext),o("design:type",Object)],h.prototype,"renderingContext",void 0),h=l=i([r.singleton({contrib:e.RenderingPluginContribution})],h);var d=r.Module((function(t){t(h)})),p=function(){function t(){this.name="dom-interaction"}var e=t.prototype;return e.init=function(t){t.load(d,!0)},e.destroy=function(t){t.unload(d)},t}(),v=Object.freeze({__proto__:null,Plugin:p}),y=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;o>i;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},g=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},m=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},b=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},w=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},E=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},x=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,S=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],A=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function L(t){return t?O(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new E:"undefined"!=typeof navigator?O(navigator.userAgent):"undefined"!=typeof process&&process.version?new m(process.version.slice(1)):null}function O(t){var e=function(t){return""!==t&&S.reduce((function(e,r){var n=r[0];if(e)return e;var i=r[1].exec(t);return!!i&&[n,i]}),!1)}(t);if(!e)return null;var r=e[0],n=e[1];if("searchbot"===r)return new w;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?3>i.length&&(i=y(y([],i,!0),function(t){for(var e=[],r=0;t>r;r++)e.push("0");return e}(3-i.length),!0)):i=[];var o=i.join("."),a=function(t){for(var e=0,r=A.length;r>e;e++){var n=A[e],i=n[0];if(n[1].exec(t))return i}return null}(t),u=x.exec(t);return u&&u[1]?new b(r,o,a,u[1]):new g(r,o,a)}var C=function(){this.$el=void 0,this.$groupEl=void 0,this.$hitTestingEl=void 0};C.tag="c-svg-element";var T=function(){function t(){this.dependencies=["radius","width","height"]}return t.prototype.apply=function(t,e){var r=e.radius,n=e.width,i=e.height,o="";if(r&&r.some((function(t){return 0!==t.value}))){var a=r.map((function(t){return t.value})),u=a[0],s=a[1],c=a[2],l=a[3];o=[["M "+u+",0"],["l "+(n.value-u-s)+",0"],["a "+s+","+s+",0,0,1,"+s+","+s],["l 0,"+(i.value-s-c)],["a "+c+","+c+",0,0,1,"+-c+","+c],["l "+(c+l-n.value)+",0"],["a "+l+","+l+",0,0,1,"+-l+","+-l],["l 0,"+(l+u-i.value)],["a "+u+","+u+",0,0,1,"+u+","+-u],["z"]].join(" ")}else o="M 0,0 l "+n.value+",0 l 0,"+i.value+" l"+-n.value+" 0 z";t.setAttribute("d",o)},t}();T=i([r.singleton()],T);var k=function(){function t(){this.dependencies=["img","width","height"]}return t.prototype.apply=function(t,r){var n=r.img,i=void 0===n?"":n,o=r.width,a=r.height;if(t.setAttribute("x","0"),t.setAttribute("y","0"),e.isString(i))t.setAttribute("href",i);else if(i instanceof Image)o||t.setAttribute("width",""+i.width),a||t.setAttribute("height",""+i.height),t.setAttribute("href",i.src);else if(i instanceof HTMLElement&&e.isString(i.nodeName)&&"CANVAS"===i.nodeName.toUpperCase())t.setAttribute("href",i.toDataURL());else if(i instanceof ImageData){var u=document.createElement("canvas");u.setAttribute("width",""+i.width),u.setAttribute("height",""+i.height);var s=u.getContext("2d");s&&(s.putImageData(i,0,0),o||t.setAttribute("width",""+i.width),a||t.setAttribute("height",""+i.height),t.setAttribute("href",u.toDataURL()))}},t}();k=i([r.singleton()],k);var P=function(){function t(){this.dependencies=["x1","y1","x2","y2"]}return t.prototype.apply=function(t,r){var n=r.y1,i=r.x2,o=r.y2,a=r.defX,u=void 0===a?0:a,s=r.defY,c=void 0===s?0:s,l=r.stroke;t.setAttribute("x1",""+(r.x1.value-u)),t.setAttribute("y1",""+(n.value-c)),t.setAttribute("x2",""+(i.value-u)),t.setAttribute("y2",n.value!==o.value||!l||l instanceof e.CSSRGB?""+(o.value-c):""+(o.value-c+1e-5))},t}();P=i([r.singleton()],P);var G=function(){function t(){this.dependencies=["points"]}return t.prototype.apply=function(t,e){var r=e.points,n=e.defX,i=void 0===n?0:n,o=e.defY,a=void 0===o?0:o;r&&r.points&&r.points.length>=2&&t.setAttribute("points",r.points.map((function(t){return t[0]-i+","+(t[1]-a)})).join(" "))},t}();function _(t){return t.toFixed(6).replace(".000000","")}function M(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&":"<"===t?"<":">"===t?">":'"'===t?""":"'"}))}G=i([r.singleton()],G);var j={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},N={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},$=function(){function t(){this.dependencies=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","textTransform","whiteSpace","dx","dy"]}return t.prototype.apply=function(t,e){var r=e.textBaseline,n=e.lineWidth,i=e.metrics,o=e.dx,a=e.dy,u=L();u&&"firefox"===u.name?t.setAttribute("dominant-baseline",N[r.value]||"alphabetic"):(t.setAttribute("dominant-baseline",N[r.value]),t.setAttribute("alignment-baseline",j[r.value])),t.setAttribute("paint-order","stroke");var s=i.lines,c=i.lineHeight,l=i.height,f=s.length;t.setAttribute("style","transform:translate("+o+", "+a+");"),1===f?(t.innerHTML=M(s[0]),t.setAttribute("dx",""+n.value/2)):t.innerHTML=s.map((function(t,e){var i=0;return 0===e?"middle"===r.value?i=c/2-l/2:"top"===r.value||"hanging"===r.value?i=0:"bottom"!==r.value&&"alphabetic"!==r.value&&"ideographic"!==r.value||(i=-c*(f-1)):i=c,'<tspan x="0" dx="'+n.value/2+'" dy="'+i+'">'+M(t)+"</tspan>"})).join("")},t}();$=i([r.singleton()],$);var R=function(){function t(){this.dependencies=["path"]}var e=t.prototype;return e.apply=function(t,e){var r=e.defX,n=e.defY;t.setAttribute("d",this.formatPath(e.path.absolutePath,void 0===r?0:r,void 0===n?0:n))},e.formatPath=function(t,e,r){var n=t.map((function(t){switch(t[0]){case"M":return"M "+(t[1]-e)+","+(t[2]-r);case"L":return"L "+(t[1]-e)+","+(t[2]-r);case"Q":return"Q "+(t[1]-e)+" "+(t[2]-r)+","+(t[3]-e)+" "+(t[4]-r);case"C":return"C "+(t[1]-e)+" "+(t[2]-r)+","+(t[3]-e)+" "+(t[4]-r)+","+(t[5]-e)+" "+(t[6]-r);case"A":return"A "+t[1]+" "+t[2]+" "+t[3]+" "+t[4]+" "+t[5]+" "+(t[6]-e)+" "+(t[7]-r);case"Z":return"Z"}})).join(" ");return~n.indexOf("NaN")?"":n},t}();R=i([r.singleton()],R);var W=r.Syringe.defineToken("ElementRendererFactory");r.Syringe.defineToken("ElementRenderer");function F(){
|
|
4
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
5
|
+
F=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};u(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(A([])));y&&y!==e&&r.call(y,i)&&(p=y);var g=d.prototype=f.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,u(g,"constructor",d),u(d,"constructor",h),h.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(s(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function I(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function V(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){I(o,n,i,a,u,"next",t)}function u(t){I(o,n,i,a,u,"throw",t)}a(void 0)}))}}var D="undefined"!=typeof Float32Array?Float32Array:Array;function B(t,e){var r=e[4],n=e[5],i=e[6],o=e[8],a=e[9],u=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(r,n,i),t[2]=Math.hypot(o,a,u),t}function H(){var t=new D(3);return D!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function U(t,e,r){var n=new D(3);return n[0]=t,n[1]=e,n[2]=r,n}function Y(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[0],u=r[1],s=r[2];return t[0]=i*s-o*u,t[1]=o*a-n*s,t[2]=n*u-i*a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var X,z=function(t){return Math.hypot(t[0],t[1],t[2])};X=H();!function(){var t,e=(t=new D(4),D!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function q(){var t=new D(4);return D!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Q(t,e,r,n){var i,o,a,u,s,c=e[0],l=e[1],f=e[2],h=e[3],d=r[0],p=r[1],v=r[2],y=r[3];return 0>(o=c*d+l*p+f*v+h*y)&&(o=-o,d=-d,p=-p,v=-v,y=-y),1-o>1e-6?(a=Math.sin(i=Math.acos(o)),u=Math.sin((1-n)*i)/a,s=Math.sin(n*i)/a):(u=1-n,s=n),t[0]=u*c+s*d,t[1]=u*l+s*p,t[2]=u*f+s*v,t[3]=u*h+s*y,t}var K,J,Z,tt,et,rt,nt,it=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],a=r*r+n*n+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=r*a,t[1]=n*a,t[2]=i*a,t[3]=o*a,t};K=H(),J=U(1,0,0),Z=U(0,1,0),tt=q(),et=q(),rt=new D(9),D!=Float32Array&&(rt[1]=0,rt[2]=0,rt[3]=0,rt[5]=0,rt[6]=0,rt[7]=0),rt[0]=1,rt[4]=1,rt[8]=1,nt=rt;function ot(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function at(t,r,n,i){var o="g-filter-"+r.entity,a=t.querySelectorAll("[name="+o+"]");if(a.length&&a.forEach((function(e){t.removeChild(e)})),0===i.length)null==n||n.removeAttribute("filter");else{var u=i.map((function(r,n){var i=r.name,a=r.params,u=ot("filter");return"blur"===i?function(t,e){var r=ot("feGaussianBlur");r.setAttribute("in","SourceGraphic"),r.setAttribute("stdDeviation",""+e[0].value),t.appendChild(r)}(u,a):"brightness"===i?function(t,e){var r=ut(e[0]);st(t,{type:"linear",slope:r,intercept:0})}(u,a):"drop-shadow"===i?function(t,e){var r=e[0].value,n=e[1].value,i=e[2].value,o=e[3].formatted,a=ot("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("stdDeviation",""+i),t.appendChild(a);var u=ot("feOffset");u.setAttribute("dx",""+r),u.setAttribute("dy",""+n),u.setAttribute("result","offsetblur"),t.appendChild(u);var s=ot("feFlood");s.setAttribute("flood-color",o),t.appendChild(s);var c=ot("feComposite");c.setAttribute("in2","offsetblur"),c.setAttribute("operator","in"),t.appendChild(c);var l=ot("feMerge");t.appendChild(l);var f=ot("feMergeNode"),h=ot("feMergeNode");h.setAttribute("in","SourceGraphic"),l.appendChild(f),l.appendChild(h)}(u,a):"contrast"===i?function(t,e){var r=ut(e[0]);st(t,{type:"linear",slope:r,intercept:-.5*r+.5})}(u,a):"grayscale"===i?function(t,e){var r=ut(e[0]);ct(t,[.2126+.7874*(1-r),.7152-.7152*(1-r),.0722-.0722*(1-r),0,0,.2126-.2126*(1-r),.7152+.2848*(1-r),.0722-.0722*(1-r),0,0,.2126-.2126*(1-r),.7152-.7152*(1-r),.0722+.9278*(1-r),0,0,0,0,0,1,0])}(u,a):"sepia"===i?function(t,e){var r=ut(e[0]);ct(t,[.393+.607*(1-r),.769-.769*(1-r),.189-.189*(1-r),0,0,.349-.349*(1-r),.686+.314*(1-r),.168-.168*(1-r),0,0,.272-.272*(1-r),.534-.534*(1-r),.131+.869*(1-r),0,0,0,0,0,1,0])}(u,a):"saturate"===i?function(t,e){var r=ut(e[0]),n=ot("feColorMatrix");n.setAttribute("type","saturate"),n.setAttribute("values",""+r),t.appendChild(n)}(u,a):"hue-rotate"===i?function(t,r){var n=ot("feColorMatrix");n.setAttribute("type","hueRotate"),n.setAttribute("values",""+r[0].to(e.UnitType.kDegrees).value),t.appendChild(n)}(u,a):"invert"===i&&function(t,e){var r=ut(e[0]);st(t,{type:"table",tableValues:r+" "+(1-r)})}(u,a),u.id=o+"-"+n,u.setAttribute("name",o),t.appendChild(u),u.id}));null==n||n.setAttribute("filter",u.map((function(t){return"url(#"+t+")"})).join(" "))}}function ut(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function st(t,e){var r=e.type,n=e.slope,i=e.intercept,o=e.tableValues,a=ot("feComponentTransfer");[ot("feFuncR"),ot("feFuncG"),ot("feFuncB")].forEach((function(t){t.setAttribute("type",r),"table"===r?t.setAttribute("tableValues",""+o):(t.setAttribute("slope",""+n),t.setAttribute("intercept",""+i)),a.appendChild(t)})),t.appendChild(a)}function ct(t,e){var r=ot("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values",e.join(" ")),t.appendChild(r)}var lt={},ft=0;function ht(t,r,n,i,o){if(i){var a=function(t){var r="";if(t instanceof e.CSSGradientValue){var n=t.type;if(n===e.GradientPatternType.Pattern)r=t.value.src;else if(n===e.GradientPatternType.LinearGradient||n===e.GradientPatternType.RadialGradient){var i=t.value;r=""+n+i.x0+i.y0+i.x1+i.y1+(i.r1||0)+i.steps.map((function(t){return t.join("")})).join("")}r&&(lt[r]||(lt[r]="_pattern_"+n+"_"+ft++))}return lt[r]}(i),u=t.querySelector("#"+a);i instanceof e.CSSRGB?"currentColor"===r.style[o]?null==n||n.setAttribute(o,"currentColor"):null==n||n.setAttribute(o,i.isNone?"none":""+i):i.type===e.GradientPatternType.Pattern?(u||function(t,e,r){var n=e.value.src,i=ot("pattern");i.setAttribute("patternUnits","userSpaceOnUse");var o=ot("image");i.appendChild(o),i.id=r,t.appendChild(i),o.setAttribute("href",n);var a=new window.Image;n.match(/^data:/i)||(a.crossOrigin="Anonymous");function u(){i.setAttribute("width",""+a.width),i.setAttribute("height",""+a.height)}a.src=n,a.complete?u():(a.onload=u,a.src=a.src)}(t,i,a),null==n||n.setAttribute(o,"url(#"+a+")")):(u||function(t,r,n){var i=ot(r.type===e.GradientPatternType.LinearGradient?"linearGradient":"radialGradient");if(r.type===e.GradientPatternType.LinearGradient){var o=r.value,a=o.y0,u=o.x1,s=o.y1;i.setAttribute("x1",""+o.x0),i.setAttribute("y1",""+a),i.setAttribute("x2",""+u),i.setAttribute("y2",""+s)}else{var c=r.value,l=c.y0,f=c.r1;i.setAttribute("cx",""+c.x0),i.setAttribute("cy",""+l),i.setAttribute("r",""+f/2)}var h="";r.value.steps.forEach((function(t){h+='<stop offset="'+t[0]+'" stop-color="'+t[1]+'"></stop>'})),i.innerHTML=h,i.id=n,t.appendChild(i)}(t,i,a),null==n||n.setAttribute(o,"url(#"+a+")"))}}var dt,pt,vt;var yt=((dt={})[e.Shape.RECT]="path",dt[e.Shape.CIRCLE]="circle",dt[e.Shape.ELLIPSE]="ellipse",dt[e.Shape.IMAGE]="image",dt[e.Shape.GROUP]="g",dt[e.Shape.LINE]="line",dt[e.Shape.POLYLINE]="polyline",dt[e.Shape.POLYGON]="polygon",dt[e.Shape.TEXT]="text",dt[e.Shape.PATH]="path",dt[e.Shape.HTML]="foreignObject",dt),gt={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",clipPath:"clip-path",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",letterSpacing:"letter-spacing",startArrow:"marker-start",endArrow:"marker-end",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio",visibility:"visibility",anchor:"anchor",shadowColor:"flood-color",shadowBlur:"stdDeviation",shadowOffsetX:"dx",shadowOffsetY:"dy",filter:"filter",innerHTML:"innerHTML",textAlign:"text-anchor"},mt={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},bt={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit"},wt="g_svg",Et=(pt=function(){function t(){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.elementRendererFactory=void 0,this.$def=void 0,this.$camera=void 0,this.renderQueue=[]}var r=t.prototype;return r.apply=function(t){var r=this,n=function(t){r.createSVGDom(t.target,r.$camera)},i=function(t){r.removeSVGDom(t.target)},o=function(t){var e=t.target;if(e.elementSVG){var n=t.attrName;if("zIndex"===n){var i,o,a=e.parentNode,u=null===(i=e.parentNode)||void 0===i||null===(o=i.elementSVG)||void 0===o?void 0:o.$groupEl,s=((null==a?void 0:a.children)||[]).slice();u&&r.reorderChildren(u,s)}else if("increasedLineWidthForHitTesting"===n){var c=e.elementSVG;r.createOrUpdateHitArea(e,c.$el,c.$groupEl)}r.updateAttribute(e,[n])}};t.hooks.init.tapPromise(vt.tag,V(F().mark((function t(){var a,u;return F().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.$def=ot("defs"),a=r.contextService.getContext(),(u=r.canvasConfig.background)&&(a.style.background=u),a.appendChild(r.$def),a.setAttribute("color-interpolation-filters","sRGB"),r.$camera=ot("g"),r.$camera.id="g_svg_camera",r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),a.appendChild(r.$camera),r.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,n),r.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,i),r.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,o);case 13:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(vt.tag,(function(){r.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,n),r.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,i),r.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,o)})),t.hooks.render.tap(vt.tag,(function(t){r.renderQueue.push(t)})),t.hooks.endFrame.tap(vt.tag,(function(){r.renderingContext.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&r.applyTransform(r.$camera,r.camera.getOrthoMatrix()),r.renderQueue.forEach((function(t){var e,n,i=null===(e=t.elementSVG)||void 0===e?void 0:e.$el,o=null===(n=t.elementSVG)||void 0===n?void 0:n.$groupEl;if(i&&o){r.applyTransform(o,t.getLocalTransform());var a=((null==t?void 0:t.children)||[]).slice();r.reorderChildren(o,a||[]),t.renderable.dirty=!1}})),r.renderQueue=[]}))},r.reorderChildren=function(t,e){if(e.sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})),e.length){var r=document.createDocumentFragment();e.forEach((function(t){var e=t.elementSVG.$groupEl;e&&r.appendChild(e)})),t.appendChild(r)}},r.applyTransform=function(t,r){var n=function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}(H(),r),i=B(H(),r),o=function(t,e){var r=new D(3);B(r,e);var n=1/r[0],i=1/r[1],o=1/r[2],a=e[0]*n,u=e[1]*i,s=e[2]*o,c=e[4]*n,l=e[5]*i,f=e[6]*o,h=e[8]*n,d=e[9]*i,p=e[10]*o,v=a+l+p,y=0;return v>0?(t[3]=.25*(y=2*Math.sqrt(v+1)),t[0]=(f-d)/y,t[1]=(h-s)/y,t[2]=(u-c)/y):a>l&&a>p?(t[3]=(f-d)/(y=2*Math.sqrt(1+a-l-p)),t[0]=.25*y,t[1]=(u+c)/y,t[2]=(h+s)/y):l>p?(t[3]=(h-s)/(y=2*Math.sqrt(1+l-a-p)),t[0]=(u+c)/y,t[1]=.25*y,t[2]=(f+d)/y):(t[3]=(u-c)/(y=2*Math.sqrt(1+p-a-l)),t[0]=(h+s)/y,t[1]=(f+d)/y,t[2]=.25*y),t}(q(),r),a=n[0],u=n[1],s=i[0],c=i[1],l=e.getEuler(H(),o),f=e.fromRotationTranslationScale(l[0]||l[2],a,u,s,c);t.setAttribute("transform","matrix("+_(f[0])+","+_(f[1])+","+_(f[3])+","+_(f[4])+","+_(f[6])+","+_(f[7])+")")},r.applyAttributes=function(t){var r=t.elementSVG,n=null==r?void 0:r.$el;if(n&&(null==r?void 0:r.$groupEl)){var i=t.nodeName,o=t.attributes;n.setAttribute("fill","none"),i===e.Shape.IMAGE&&n.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(o))}},r.updateAttribute=function(t,r){var n=this,i=!1,o=t.elementSVG,a=o.$el,u=o.$groupEl,s=o.$hitTestingEl,c=t.parsedStyle,l=t.computedStyle,f=this.elementRendererFactory(t.nodeName);r.forEach((function(r){var o=gt[r],h=l[r],d=c[r];if(!i&&f&&f.dependencies.indexOf(r)>-1&&(i=!0),t.nodeName===e.Shape.HTML&&("fill"===r?a.style.background=""+d:"stroke"===r?(a.style["border-color"]=""+d,a.style["border-style"]="solid"):"lineWidth"===r?a.style["border-width"]=(d.value||0)+"px":"lineDash"===r&&(a.style["border-style"]="dashed")),"fill"===r||"stroke"===r)ht(n.$def,t,a,d,o);else if("visibility"===r)null==u||u.setAttribute(o,""+h.value);else if("clipPath"===r)n.createOrUpdateClipPath(d,u);else if("shadowColor"===r||"shadowBlur"===r||"shadowOffsetX"===r||"shadowOffsetY"===r)!function(t,e,r,n){var i="filter-dropshadow-"+e.entity,o=t.querySelector("#"+i);if(!o){o=ot("filter");var a=ot("feDropShadow");a.setAttribute("dx","0"),a.setAttribute("dy","0"),o.appendChild(a),o.id=i,t.appendChild(o)}var u=o.children[0];if("shadowColor"===n)u.setAttribute("flood-color",""+e.parsedStyle[n]);else if("shadowBlur"===n){var s=e.parsedStyle[n];u.setAttribute("stdDeviation",""+(s&&s.value||0)/2)}else if("shadowOffsetX"===n){var c=e.parsedStyle[n];u.setAttribute("dx",""+(c&&c.value||0)/2)}else if("shadowOffsetY"===n){var l=e.parsedStyle[n];u.setAttribute("dy",""+(l&&l.value||0)/2)}null==r||r.setAttribute("filter","url(#"+i+")")}(n.$def,t,a,r);else if("filter"===r)at(n.$def,t,a,d);else if("innerHTML"===r)n.createOrUpdateInnerHTML(a,d);else if(t.nodeName!==e.Shape.TEXT&&["width","height","r","rx","ry","anchor"].indexOf(r)>-1&&n.updateAnchorWithTransform(t),"anchor"!==r&&h){var p=""+h;if("unset"!==p&&p!==bt[r]){var v,y=(null===(v=mt[r])||void 0===v?void 0:v[p])||p;[a,s].forEach((function(t){t&&o&&t.setAttribute(o,y)}))}}})),i&&a&&[a,s].forEach((function(e){e&&f.apply(e,t.parsedStyle)}))},r.createSVGDom=function(t,r,n){void 0===n&&(n=!1),t.elementSVG=new C;var i=t.elementSVG,o=yt[t.nodeName]||"g";if(o){var a,u,s=ot(o);t.nodeName===e.Shape.HTML&&(t.parsedStyle.$el=s),s.id="g_svg_"+t.nodeName+"_"+t.entity,"g"===o||n?u=s:(u=ot("g")).appendChild(s),i.$el=s,i.$groupEl=u;var c=t.parentNode&&(null===(a=t.parentNode.elementSVG)||void 0===a?void 0:a.$groupEl)||r;c&&c.appendChild(u),this.applyAttributes(t),this.createOrUpdateHitArea(t,s,u)}},r.removeSVGDom=function(t){var e,r=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;r&&r.parentNode&&r.parentNode.removeChild(r)},r.createOrUpdateHitArea=function(t,e,r){var n,i=t.elementSVG,o=i.$hitTestingEl,a=null===(n=t.parsedStyle.increasedLineWidthForHitTesting)||void 0===n?void 0:n.value;if(a){var u;if(!o){(o=e.cloneNode()).id="g_svg_"+t.nodeName+"_hittesting_"+t.entity,["filter"].forEach((function(t){o.removeAttribute(t)}));var s="none"!==e.getAttribute("fill");o.setAttribute("fill",s?"transparent":"none"),o.setAttribute("stroke","transparent"),r.appendChild(o),i.$hitTestingEl=o}o.setAttribute("stroke-width",""+(a+(null===(u=t.parsedStyle.lineWidth)||void 0===u?void 0:u.value)))}else o&&(r.removeChild(o),i.$hitTestingEl=null)},r.createOrUpdateInnerHTML=function(t,e){var r=document.createElement("div");"string"==typeof e?r.innerHTML=e:r.appendChild(e),t.innerHTML="",t.appendChild(r)},r.createOrUpdateClipPath=function(t,e){if(t){var r,n="clip-path-"+t.entity;if(!this.$def.querySelector("#"+n)){var i=ot("clipPath");i.id=n,this.$def.appendChild(i),this.createSVGDom(t,i,!0),t.elementSVG.$groupEl=i}var o=null===(r=t.elementSVG)||void 0===r?void 0:r.$groupEl;o&&this.applyTransform(o,t.getLocalTransform()),this.applyAttributes(t),e.setAttribute("clip-path","url(#"+n+")")}else e.removeAttribute("clip-path")},r.updateAnchorWithTransform=function(t){var r,n,i=t.getGeometryBounds(),o=i&&2*i.halfExtents[0]||0,a=i&&2*i.halfExtents[1]||0,u=(t.parsedStyle||{}).anchor;[null===(r=t.elementSVG)||void 0===r?void 0:r.$el,null===(n=t.elementSVG)||void 0===n?void 0:n.$hitTestingEl].forEach((function(r){r&&(r.setAttribute("transform","translate(-"+u[0].value*o+",-"+u[1].value*a+")"),t.nodeName!==e.Shape.CIRCLE&&t.nodeName!==e.Shape.ELLIPSE||(r.setAttribute("cx",""+o/2),r.setAttribute("cy",""+a/2)))}))},t}(),pt.tag="SVGRenderer",vt=pt);i([r.inject(e.CanvasConfig),o("design:type",Object)],Et.prototype,"canvasConfig",void 0),i([r.inject(e.DefaultCamera),o("design:type",e.Camera)],Et.prototype,"camera",void 0),i([r.inject(e.ContextService),o("design:type",Object)],Et.prototype,"contextService",void 0),i([r.inject(e.RenderingContext),o("design:type",Object)],Et.prototype,"renderingContext",void 0),i([r.inject(W),o("design:type",Function)],Et.prototype,"elementRendererFactory",void 0),Et=vt=i([r.singleton({contrib:e.RenderingPluginContribution})],Et);var xt,St,At=r.Module((function(t){t(T),t(k),t(P),t(G),t($),t(R),t({token:W,useFactory:function(t){return function(r){return r===e.Shape.RECT?t.container.get(T):r===e.Shape.IMAGE?t.container.get(k):r===e.Shape.LINE?t.container.get(P):r===e.Shape.POLYLINE||r===e.Shape.POLYGON?t.container.get(G):r===e.Shape.TEXT?t.container.get($):r===e.Shape.PATH?t.container.get(R):null}}}),t(Et)})),Lt=function(){function t(){this.name="svg-renderer"}var e=t.prototype;return e.init=function(t){t.load(At,!0)},e.destroy=function(t){t.unload(At)},t}(),Ot=Object.freeze({__proto__:null,DEFAULT_VALUE_MAP:bt,ElementSVG:C,G_SVG_PREFIX:wt,Plugin:Lt,SHAPE2TAGS:yt,get SVGRendererPlugin(){return Et},SVG_ATTR_MAP:gt,containerModule:At,createSVGElement:ot});function Ct(){
|
|
6
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
7
|
+
Ct=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};u(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(A([])));y&&y!==e&&r.call(y,i)&&(p=y);var g=d.prototype=f.prototype=Object.create(p);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,u(g,"constructor",d),u(d,"constructor",h),h.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(s(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),u(g,i,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=A,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(u){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Tt(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);e>r;r++)n[r]=t[r];return n}function Pt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return kt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}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 Gt=(xt=function(){function t(){this.sceneGraphService=void 0,this.displayObjectPool=void 0}return t.prototype.apply=function(t){var e=this;t.hooks.pick.tapPromise(St.tag,function(){var t,r=(t=Ct().mark((function t(r){var n,i,o,a,u,s,c,l,f,h,d;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.topmost,o=(i=r.position).clientX,a=i.clientY,t.prev=1,u=[],s=Pt(document.elementsFromPoint(o,a));case 4:if((c=s()).done){t.next=17;break}if(!(f=(l=c.value)&&l.getAttribute("id"))||!f.startsWith(wt)){t.next=15;break}if(h=f.lastIndexOf("_"),!(d=e.displayObjectPool.getByEntity(Number(f.substring(h+1))))||!d.isInteractive()){t.next=15;break}if(u.push(d),!n){t.next=15;break}return r.picked=u,t.abrupt("return",r);case 15:t.next=4;break;case 17:r.picked=u,t.next=23;break;case 20:t.prev=20,t.t0=t.catch(1),r.picked=[];case 23:return t.abrupt("return",r);case 24:case"end":return t.stop()}}),t,null,[[1,20]])})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Tt(o,n,i,a,u,"next",t)}function u(t){Tt(o,n,i,a,u,"throw",t)}a(void 0)}))});return function(t){return r.apply(this,arguments)}}())},t}(),xt.tag="SVGPicker",St=xt);i([r.inject(e.SceneGraphService),o("design:type",Object)],Gt.prototype,"sceneGraphService",void 0),i([r.inject(e.DisplayObjectPool),o("design:type",e.DisplayObjectPool)],Gt.prototype,"displayObjectPool",void 0),Gt=St=i([r.singleton({contrib:e.RenderingPluginContribution})],Gt);var _t=r.Module((function(t){t(Gt)})),Mt=function(){function t(){this.name="svg-picker"}var e=t.prototype;return e.init=function(t){t.load(_t,!0)},e.destroy=function(t){t.unload(_t)},t}(),jt=Object.freeze({__proto__:null,Plugin:Mt}),Nt=function(){function t(){this.$container=void 0,this.$namespace=void 0,this.dpr=void 0,this.canvasConfig=void 0}var r=t.prototype;return r.init=function(){var t=this.canvasConfig.container;if(this.$container=e.isString(t)?document.getElementById(t):t,this.$container){this.$container.style.position||(this.$container.style.position="relative");var r=ot("svg");r.setAttribute("width",""+this.canvasConfig.width),r.setAttribute("height",""+this.canvasConfig.height),this.$container.appendChild(r),this.$namespace=r}var n=window.devicePixelRatio||1;this.dpr=n=1>n?1:Math.ceil(n)},r.getDomElement=function(){return this.$namespace},r.getContext=function(){return this.$namespace},r.getDPR=function(){return this.dpr},r.getBoundingClientRect=function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()},r.destroy=function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)},r.resize=function(t,e){this.$namespace&&(this.$namespace.setAttribute("width",""+t),this.$namespace.setAttribute("height",""+e))},r.applyCursorStyle=function(t){this.$container&&(this.$container.style.cursor=t)},t}();i([r.inject(e.CanvasConfig),o("design:type",Object)],Nt.prototype,"canvasConfig",void 0),Nt=i([r.singleton({token:e.ContextService})],Nt);var $t=r.Module((function(t){t(Nt)})),Rt=function(){function t(){this.name="svg-context-register"}var e=t.prototype;return e.init=function(t){t.load($t,!0)},e.destroy=function(t){t.unload($t)},t}(),Wt=function(t){var e,r;function i(e){var r;return(r=t.call(this,e)||this).registerPlugin(new Rt),r.registerPlugin(new Lt),r.registerPlugin(new p),r.registerPlugin(new Mt),r}return(e=i).prototype=Object.create((r=t).prototype),e.prototype.constructor=e,n(e,r),i}(e.AbstractRenderer);t.DomInteraction=v,t.Renderer=Wt,t.SVGPicker=jt,t.SVGRenderer=Ot,Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,53 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g-svg",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3-alpha.0",
|
|
4
4
|
"description": "A renderer implemented by SVG",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
"keywords": [
|
|
6
|
+
"antv",
|
|
7
|
+
"g"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/antvis/g#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/antvis/g/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/antvis/g.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "https://github.com/orgs/antvis/people",
|
|
19
|
+
"main": "dist/index.js",
|
|
8
20
|
"unpkg": "dist/index.umd.min.js",
|
|
21
|
+
"module": "dist/index.esm.js",
|
|
22
|
+
"types": "dist/index.d.ts",
|
|
9
23
|
"files": [
|
|
10
24
|
"package.json",
|
|
11
25
|
"dist",
|
|
12
|
-
"es",
|
|
13
|
-
"lib",
|
|
14
26
|
"LICENSE",
|
|
15
27
|
"README.md"
|
|
16
28
|
],
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"util",
|
|
23
|
-
"antv",
|
|
24
|
-
"g"
|
|
25
|
-
],
|
|
26
|
-
"publishConfig": {
|
|
27
|
-
"access": "public"
|
|
28
|
-
},
|
|
29
|
-
"author": "https://github.com/orgs/antvis/people",
|
|
30
|
-
"license": "MIT",
|
|
31
|
-
"bugs": {
|
|
32
|
-
"url": "https://github.com/antvis/g/issues"
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@antv/g-plugin-dom-interaction": "^1.1.3-alpha.0",
|
|
31
|
+
"@antv/g-plugin-svg-picker": "^1.1.3-alpha.0",
|
|
32
|
+
"@antv/g-plugin-svg-renderer": "^1.1.3-alpha.0",
|
|
33
|
+
"tslib": "^2.3.1"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@types/gl-matrix": "^2.4.5",
|
|
36
37
|
"@types/jest": "^25.0.0"
|
|
37
38
|
},
|
|
38
|
-
"homepage": "https://github.com/antvis/g#readme",
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"@antv/g-plugin-dom-interaction": "^1.1.2",
|
|
41
|
-
"@antv/g-plugin-svg-picker": "^1.1.2",
|
|
42
|
-
"@antv/g-plugin-svg-renderer": "^1.1.2",
|
|
43
|
-
"tslib": "^2.3.1"
|
|
44
|
-
},
|
|
45
39
|
"peerDependencies": {
|
|
46
40
|
"@antv/g": "^5.0.1",
|
|
47
41
|
"mana-syringe": "^0.3.0"
|
|
48
42
|
},
|
|
49
|
-
"
|
|
50
|
-
"
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
51
45
|
},
|
|
52
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d8b58d9c45bd5e41e47696a006aad8027c416409"
|
|
53
47
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Module } from 'mana-syringe';
|
|
2
|
-
import { SVGContextService } from './SVGContextService';
|
|
3
|
-
var containerModule = Module(function (register) {
|
|
4
|
-
/**
|
|
5
|
-
* implements ContextService
|
|
6
|
-
*/
|
|
7
|
-
register(SVGContextService);
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
var ContextRegisterPlugin =
|
|
11
|
-
/** @class */
|
|
12
|
-
function () {
|
|
13
|
-
function ContextRegisterPlugin() {
|
|
14
|
-
this.name = 'svg-context-register';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
ContextRegisterPlugin.prototype.init = function (container) {
|
|
18
|
-
container.load(containerModule, true);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
ContextRegisterPlugin.prototype.destroy = function (container) {
|
|
22
|
-
container.unload(containerModule);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return ContextRegisterPlugin;
|
|
26
|
-
}();
|
|
27
|
-
|
|
28
|
-
export { ContextRegisterPlugin };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ContextService } from '@antv/g';
|
|
2
|
-
export declare class SVGContextService implements ContextService<SVGElement> {
|
|
3
|
-
private $container;
|
|
4
|
-
private $namespace;
|
|
5
|
-
private dpr;
|
|
6
|
-
private canvasConfig;
|
|
7
|
-
init(): void;
|
|
8
|
-
getDomElement(): SVGElement;
|
|
9
|
-
getContext(): SVGElement;
|
|
10
|
-
getDPR(): number;
|
|
11
|
-
getBoundingClientRect(): DOMRect;
|
|
12
|
-
destroy(): void;
|
|
13
|
-
resize(width: number, height: number): void;
|
|
14
|
-
applyCursorStyle(cursor: string): void;
|
|
15
|
-
}
|
package/es/SVGContextService.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { CanvasConfig, ContextService, isString } from '@antv/g';
|
|
3
|
-
import { inject, singleton } from 'mana-syringe';
|
|
4
|
-
import { createSVGElement } from '@antv/g-plugin-svg-renderer';
|
|
5
|
-
|
|
6
|
-
var SVGContextService =
|
|
7
|
-
/** @class */
|
|
8
|
-
function () {
|
|
9
|
-
function SVGContextService() {}
|
|
10
|
-
|
|
11
|
-
SVGContextService.prototype.init = function () {
|
|
12
|
-
var container = this.canvasConfig.container; // create container
|
|
13
|
-
|
|
14
|
-
this.$container = isString(container) ? document.getElementById(container) : container;
|
|
15
|
-
|
|
16
|
-
if (this.$container) {
|
|
17
|
-
if (!this.$container.style.position) {
|
|
18
|
-
this.$container.style.position = 'relative';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var $namespace = createSVGElement('svg');
|
|
22
|
-
$namespace.setAttribute('width', "".concat(this.canvasConfig.width));
|
|
23
|
-
$namespace.setAttribute('height', "".concat(this.canvasConfig.height));
|
|
24
|
-
this.$container.appendChild($namespace);
|
|
25
|
-
this.$namespace = $namespace;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var dpr = window.devicePixelRatio || 1;
|
|
29
|
-
dpr = dpr >= 1 ? Math.ceil(dpr) : 1;
|
|
30
|
-
this.dpr = dpr;
|
|
31
|
-
}; // @ts-ignore
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
SVGContextService.prototype.getDomElement = function () {
|
|
35
|
-
return this.$namespace;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
SVGContextService.prototype.getContext = function () {
|
|
39
|
-
return this.$namespace;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
SVGContextService.prototype.getDPR = function () {
|
|
43
|
-
return this.dpr;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
SVGContextService.prototype.getBoundingClientRect = function () {
|
|
47
|
-
var _a;
|
|
48
|
-
|
|
49
|
-
return (_a = this.$namespace) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
SVGContextService.prototype.destroy = function () {
|
|
53
|
-
// destroy context
|
|
54
|
-
if (this.$container && this.$namespace && this.$namespace.parentNode) {
|
|
55
|
-
this.$container.removeChild(this.$namespace);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
SVGContextService.prototype.resize = function (width, height) {
|
|
60
|
-
if (this.$namespace) {
|
|
61
|
-
this.$namespace.setAttribute('width', "".concat(width));
|
|
62
|
-
this.$namespace.setAttribute('height', "".concat(height));
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
SVGContextService.prototype.applyCursorStyle = function (cursor) {
|
|
67
|
-
if (this.$container) {
|
|
68
|
-
this.$container.style.cursor = cursor;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
__decorate([inject(CanvasConfig), __metadata("design:type", Object)], SVGContextService.prototype, "canvasConfig", void 0);
|
|
73
|
-
|
|
74
|
-
SVGContextService = __decorate([singleton({
|
|
75
|
-
token: ContextService
|
|
76
|
-
})], SVGContextService);
|
|
77
|
-
return SVGContextService;
|
|
78
|
-
}();
|
|
79
|
-
|
|
80
|
-
export { SVGContextService };
|
package/es/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RendererConfig } from '@antv/g';
|
|
2
|
-
import { AbstractRenderer } from '@antv/g';
|
|
3
|
-
import * as DomInteraction from '@antv/g-plugin-dom-interaction';
|
|
4
|
-
import * as SVGRenderer from '@antv/g-plugin-svg-renderer';
|
|
5
|
-
import * as SVGPicker from '@antv/g-plugin-svg-picker';
|
|
6
|
-
export { DomInteraction, SVGRenderer, SVGPicker };
|
|
7
|
-
export declare class Renderer extends AbstractRenderer {
|
|
8
|
-
constructor(config?: Partial<RendererConfig>);
|
|
9
|
-
}
|
package/es/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
|
-
import { AbstractRenderer } from '@antv/g';
|
|
3
|
-
import * as DomInteraction from '@antv/g-plugin-dom-interaction';
|
|
4
|
-
import * as SVGRenderer from '@antv/g-plugin-svg-renderer';
|
|
5
|
-
import * as SVGPicker from '@antv/g-plugin-svg-picker';
|
|
6
|
-
import { ContextRegisterPlugin } from './ContextRegisterPlugin';
|
|
7
|
-
export { DomInteraction, SVGRenderer, SVGPicker };
|
|
8
|
-
|
|
9
|
-
var Renderer =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
12
|
-
__extends(Renderer, _super);
|
|
13
|
-
|
|
14
|
-
function Renderer(config) {
|
|
15
|
-
var _this = _super.call(this, config) || this;
|
|
16
|
-
|
|
17
|
-
_this.registerPlugin(new ContextRegisterPlugin());
|
|
18
|
-
|
|
19
|
-
_this.registerPlugin(new SVGRenderer.Plugin());
|
|
20
|
-
|
|
21
|
-
_this.registerPlugin(new DomInteraction.Plugin());
|
|
22
|
-
|
|
23
|
-
_this.registerPlugin(new SVGPicker.Plugin());
|
|
24
|
-
|
|
25
|
-
return _this;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return Renderer;
|
|
29
|
-
}(AbstractRenderer);
|
|
30
|
-
|
|
31
|
-
export { Renderer };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Syringe } from 'mana-syringe';
|
|
2
|
-
import type { RendererPlugin } from '@antv/g';
|
|
3
|
-
export declare class ContextRegisterPlugin implements RendererPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
init(container: Syringe.Container): void;
|
|
6
|
-
destroy(container: Syringe.Container): void;
|
|
7
|
-
}
|