@antv/g-svg 1.1.5 → 1.1.6
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/dist/index.esm.js +179 -68
- package/dist/index.js +179 -68
- package/dist/index.umd.js +1409 -1016
- package/dist/index.umd.min.js +4 -4
- package/package.json +5 -5
package/dist/index.umd.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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,
|
|
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,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function s(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function f(t,e,n,r){var o,i=arguments.length,a=3>i?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 c=t.length-1;c>=0;c--)(o=t[c])&&(a=(3>i?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function h(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function d(){
|
|
2
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 new 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 new 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 new 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=(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=function(e){t.hooks.pointerMove.call(e)},i=function(e){t.hooks.pointerUp.call(e)},o=function(e){t.hooks.pointerDown.call(e)},u=function(e){t.hooks.pointerOver.call(e)},c=function(e){t.hooks.pointerOut.call(e)},f=function(e){t.hooks.pointerCancel.call(e)},h=function(e){t.hooks.pointerWheel.call(e)},d=function(t){globalThis.document.addEventListener("pointermove",n,!0),t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerleave",c,!0),t.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",i,!0)},p=function(t){t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",i,!0),t.addEventListener("touchmove",n,!0),t.addEventListener("touchcancel",f,!0)},v=function(t){globalThis.document.addEventListener("mousemove",n,!0),t.addEventListener("mousedown",o,!0),t.addEventListener("mouseout",c,!0),t.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",i,!0)};t.hooks.init.tapPromise(l.tag,s(a().mark((function t(){var n;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="none",n.style.msTouchAction="none"):r.supportsPointerEvents&&(n.style.touchAction="none"),r.supportsPointerEvents?d(n):v(n),r.supportsTouchEvents&&p(n),n.addEventListener("wheel",h,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(l.tag,(function(){var t=e.contextService.getDomElement();r.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",n,!0),t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerleave",c,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",i,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",n,!0),t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseout",c,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",i,!0)}(t),r.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",i,!0),t.removeEventListener("touchmove",n,!0)}(t),t.removeEventListener("wheel",h,!0)}))},t}(),c.tag="DOMInteraction",l=c);i([r.inject(e.ContextService),o("design:type",Object)],f.prototype,"contextService",void 0),i([r.inject(e.RenderingContext),o("design:type",Object)],f.prototype,"renderingContext",void 0),f=l=i([r.singleton({contrib:e.RenderingPluginContribution})],f);var h=r.Module((function(t){t(f)})),d=function(){function t(){this.name="dom-interaction"}var e=t.prototype;return e.init=function(t){t.load(h,!0)},e.destroy=function(t){t.unload(h)},t}(),p=Object.freeze({__proto__:null,Plugin:d}),v=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))},y=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},g=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},m=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},b=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},w=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},E=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,x=[["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/]],S=[["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 A(t){return t?L(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new w:"undefined"!=typeof navigator?L(navigator.userAgent):"undefined"!=typeof process&&process.version?new g(process.version.slice(1)):null}function L(t){var e=function(t){return""!==t&&x.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 b;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?3>i.length&&(i=v(v([],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=S.length;r>e;e++){var n=S[e],i=n[0];if(n[1].exec(t))return i}return null}(t),u=E.exec(t);return u&&u[1]?new m(r,o,a,u[1]):new y(r,o,a)}var O=function(){this.$el=void 0,this.$groupEl=void 0,this.$hitTestingEl=void 0};O.tag="c-svg-element";var C=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}();C=i([r.singleton()],C);var T=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}();T=i([r.singleton()],T);var k=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}();k=i([r.singleton()],k);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 P(t){return t.toFixed(6).replace(".000000","")}function _(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&":"<"===t?"<":">"===t?">":'"'===t?""":"'"}))}G=i([r.singleton()],G);var M={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"},N=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=A();u&&"firefox"===u.name?t.setAttribute("dominant-baseline",j[r.value]||"alphabetic"):(t.setAttribute("dominant-baseline",j[r.value]),t.setAttribute("alignment-baseline",M[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.toString()+", "+a.toString()+");"),1===f?(t.innerHTML=_(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+'">'+_(t)+"</tspan>"})).join("")},t}();N=i([r.singleton()],N);var $=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}();$=i([r.singleton()],$);var R=r.Syringe.defineToken("ElementRendererFactory");r.Syringe.defineToken("ElementRenderer");function W(){
|
|
3
|
+
d=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=Object.create((e&&e.prototype instanceof h?e:h).prototype),i=new L(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=x(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function p(){}function v(){}var y={};u(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(O([])));m&&m!==e&&n.call(m,i)&&(y=m);var b=v.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(i,a,c,u){var s=l(t[i],t,a);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==r(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){f.value=t,c(f)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(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 r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=v,u(b,"constructor",v),u(v,"constructor",p),p.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),u(b,c,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,L.prototype={constructor:L,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(A),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function p(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function v(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){p(i,r,o,a,c,"next",t)}function c(t){p(i,r,o,a,c,"throw",t)}a(void 0)}))}}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e,n){return e&&g(t.prototype,e),n&&g(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var b,w,E=(b=function(){function t(){y(this,t),this.contextService=void 0,this.renderingContext=void 0}return m(t,[{key:"apply",value:function(t){var e=this,n=this.renderingContext.root.ownerDocument.defaultView,r=function(e){t.hooks.pointerMove.call(e)},o=function(e){t.hooks.pointerUp.call(e)},i=function(e){t.hooks.pointerDown.call(e)},a=function(e){t.hooks.pointerOver.call(e)},c=function(e){t.hooks.pointerOut.call(e)},u=function(e){t.hooks.pointerCancel.call(e)},s=function(e){t.hooks.pointerWheel.call(e)},l=function(t){globalThis.document.addEventListener("pointermove",r,!0),t.addEventListener("pointerdown",i,!0),t.addEventListener("pointerleave",c,!0),t.addEventListener("pointerover",a,!0),globalThis.addEventListener("pointerup",o,!0)},f=function(t){t.addEventListener("touchstart",i,!0),t.addEventListener("touchend",o,!0),t.addEventListener("touchmove",r,!0),t.addEventListener("touchcancel",u,!0)},h=function(t){globalThis.document.addEventListener("mousemove",r,!0),t.addEventListener("mousedown",i,!0),t.addEventListener("mouseout",c,!0),t.addEventListener("mouseover",a,!0),globalThis.addEventListener("mouseup",o,!0)};t.hooks.init.tapPromise(w.tag,v(d().mark((function t(){var r;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):n.supportsPointerEvents&&(r.style.touchAction="none"),n.supportsPointerEvents?l(r):h(r),n.supportsTouchEvents&&f(r),r.addEventListener("wheel",s,{passive:!0,capture:!0});case 5:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(w.tag,(function(){var t=e.contextService.getDomElement();n.supportsPointerEvents?function(t){globalThis.document.removeEventListener("pointermove",r,!0),t.removeEventListener("pointerdown",i,!0),t.removeEventListener("pointerleave",c,!0),t.removeEventListener("pointerover",a,!0),globalThis.removeEventListener("pointerup",o,!0)}(t):function(t){globalThis.document.removeEventListener("mousemove",r,!0),t.removeEventListener("mousedown",i,!0),t.removeEventListener("mouseout",c,!0),t.removeEventListener("mouseover",a,!0),globalThis.removeEventListener("mouseup",o,!0)}(t),n.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",i,!0),t.removeEventListener("touchend",o,!0),t.removeEventListener("touchmove",r,!0)}(t),t.removeEventListener("wheel",s,!0)}))}}]),t}(),b.tag="DOMInteraction",w=b);f([n.inject(e.ContextService),h("design:type",Object)],E.prototype,"contextService",void 0),f([n.inject(e.RenderingContext),h("design:type",Object)],E.prototype,"renderingContext",void 0),E=w=f([n.singleton({contrib:e.RenderingPluginContribution})],E);var x=n.Module((function(t){t(E)})),S=function(){function t(){y(this,t),this.name="dom-interaction"}return m(t,[{key:"init",value:function(t){t.load(x,!0)}},{key:"destroy",value:function(t){t.unload(x)}}]),t}(),A=Object.freeze({__proto__:null,Plugin:S}),L=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;i>o;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"},k=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},C=function(t,e,n,r){this.name=t,this.version=e,this.os=n,this.bot=r,this.type="bot-device"},T=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},P=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},j=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,_=[["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/]],G=[["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 M(t){return t?N(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new P:"undefined"!=typeof navigator?N(navigator.userAgent):"undefined"!=typeof process&&process.version?new k(process.version.slice(1)):null}function N(t){var e=function(t){return""!==t&&_.reduce((function(e,n){var r=n[0];if(e)return e;var o=n[1].exec(t);return!!o&&[r,o]}),!1)}(t);if(!e)return null;var n=e[0],r=e[1];if("searchbot"===n)return new T;var o=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);o?3>o.length&&(o=L(L([],o,!0),function(t){for(var e=[],n=0;t>n;n++)e.push("0");return e}(3-o.length),!0)):o=[];var i=o.join("."),a=function(t){for(var e=0,n=G.length;n>e;e++){var r=G[e],o=r[0];if(r[1].exec(t))return o}return null}(t),c=j.exec(t);return c&&c[1]?new C(n,i,a,c[1]):new O(n,i,a)}function $(){
|
|
4
4
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
5
|
-
W=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 new 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 new 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 new 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 F(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 I(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){F(o,n,i,a,u,"next",t)}function u(t){F(o,n,i,a,u,"throw",t)}a(void 0)}))}}var V="undefined"!=typeof Float32Array?Float32Array:Array;function D(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 B(){var t=new V(3);return V!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function H(t,e,r){var n=new V(3);return n[0]=t,n[1]=e,n[2]=r,n}function U(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 Y,X=function(t){return Math.hypot(t[0],t[1],t[2])};Y=B();!function(){var t,e=(t=new V(4),V!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function z(){var t=new V(4);return V!=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?(i=Math.acos(o),a=Math.sin(i),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 Q,K,J,Z,tt,et,rt,nt=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};Q=B(),K=H(1,0,0),J=H(0,1,0),Z=z(),tt=z(),et=new V(9),V!=Float32Array&&(et[1]=0,et[2]=0,et[3]=0,et[5]=0,et[6]=0,et[7]=0),et[0]=1,et[4]=1,et[8]=1,rt=et;function it(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ot(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=it("filter");return"blur"===i?function(t,e){var r=it("feGaussianBlur");r.setAttribute("in","SourceGraphic"),r.setAttribute("stdDeviation",""+e[0].value),t.appendChild(r)}(u,a):"brightness"===i?function(t,e){var r=at(e[0]);ut(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=it("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("stdDeviation",""+i),t.appendChild(a);var u=it("feOffset");u.setAttribute("dx",""+r),u.setAttribute("dy",""+n),u.setAttribute("result","offsetblur"),t.appendChild(u);var s=it("feFlood");s.setAttribute("flood-color",o),t.appendChild(s);var c=it("feComposite");c.setAttribute("in2","offsetblur"),c.setAttribute("operator","in"),t.appendChild(c);var l=it("feMerge");t.appendChild(l);var f=it("feMergeNode"),h=it("feMergeNode");h.setAttribute("in","SourceGraphic"),l.appendChild(f),l.appendChild(h)}(u,a):"contrast"===i?function(t,e){var r=at(e[0]);ut(t,{type:"linear",slope:r,intercept:-.5*r+.5})}(u,a):"grayscale"===i?function(t,e){var r=at(e[0]);st(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=at(e[0]);st(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=at(e[0]),n=it("feColorMatrix");n.setAttribute("type","saturate"),n.setAttribute("values",""+r),t.appendChild(n)}(u,a):"hue-rotate"===i?function(t,r){var n=it("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=at(e[0]);ut(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 at(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function ut(t,e){var r=e.type,n=e.slope,i=e.intercept,o=e.tableValues,a=it("feComponentTransfer");[it("feFuncR"),it("feFuncG"),it("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 st(t,e){var r=it("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("values",e.join(" ")),t.appendChild(r)}var ct={},lt=0;function ft(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&&(ct[r]||(ct[r]="_pattern_"+n+"_"+lt++))}return ct[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.toString()):i.type===e.GradientPatternType.Pattern?(u||function(t,e,r){var n=e.value.src,i=it("pattern");i.setAttribute("patternUnits","userSpaceOnUse");var o=it("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=it(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 ht,dt,pt,vt=r.Syringe.defineToken("CreateElementContribution",{multiple:!1}),yt=function(){function t(){}return t.prototype.createElement=function(t){return it(t.nodeName)},t}();yt=i([r.singleton({token:vt})],yt);var gt=((ht={})[e.Shape.RECT]="path",ht[e.Shape.CIRCLE]="circle",ht[e.Shape.ELLIPSE]="ellipse",ht[e.Shape.IMAGE]="image",ht[e.Shape.GROUP]="g",ht[e.Shape.LINE]="line",ht[e.Shape.POLYLINE]="polyline",ht[e.Shape.POLYGON]="polygon",ht[e.Shape.TEXT]="text",ht[e.Shape.PATH]="path",ht[e.Shape.HTML]="foreignObject",ht),mt={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"},bt={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},wt={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit"},Et="g_svg",xt=(dt=function(){function t(){this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.createElementContribution=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(pt.tag,I(W().mark((function t(){var a,u;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.$def=it("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=it("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(pt.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(pt.tag,(function(t){r.renderQueue.push(t)})),t.hooks.endFrame.tap(pt.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;i&&o&&(r.applyTransform(o,t.getLocalTransform()),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){if(t.isConnected){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}(B(),r),i=D(B(),r),o=function(t,e){var r=new V(3);D(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?(y=2*Math.sqrt(v+1),t[3]=.25*y,t[0]=(f-d)/y,t[1]=(h-s)/y,t[2]=(u-c)/y):a>l&&a>p?(y=2*Math.sqrt(1+a-l-p),t[3]=(f-d)/y,t[0]=.25*y,t[1]=(u+c)/y,t[2]=(h+s)/y):l>p?(y=2*Math.sqrt(1+l-a-p),t[3]=(h-s)/y,t[0]=(u+c)/y,t[1]=.25*y,t[2]=(f+d)/y):(y=2*Math.sqrt(1+p-a-l),t[3]=(u-c)/y,t[0]=(h+s)/y,t[1]=(f+d)/y,t[2]=.25*y),t}(z(),r),a=n[0],u=n[1],s=i[0],c=i[1],l=e.getEuler(B(),o),f=e.fromRotationTranslationScale(l[0]||l[2],a,u,s,c);t.setAttribute("transform","matrix("+P(f[0])+","+P(f[1])+","+P(f[3])+","+P(f[4])+","+P(f[6])+","+P(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=mt[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.toString():"stroke"===r?(a.style["border-color"]=d.toString(),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)ft(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=it("filter");var a=it("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].toString());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)ot(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.toString();[a,s].forEach((function(t){if(t&&o)if("unset"!==p&&p!==wt[r]){var e,n=(null===(e=bt[r])||void 0===e?void 0:e[p])||p;t.setAttribute(o,n)}else t.removeAttribute(o)}))}})),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 O;var i=t.elementSVG,o=gt[t.nodeName]||"g";if(o){var a,u,s=it(o);t.nodeName===e.Shape.HTML&&(t.parsedStyle.$el=s),s.id="g_svg_"+t.nodeName+"_"+t.entity,"g"===o||n?u=s:(u=it("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;if(c){var l;c.appendChild(u);var f=((null===(l=t.parentNode)||void 0===l?void 0:l.children)||[]).slice();this.reorderChildren(c,f||[])}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=it("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}(),dt.tag="SVGRenderer",pt=dt);i([r.inject(e.CanvasConfig),o("design:type",Object)],xt.prototype,"canvasConfig",void 0),i([r.inject(e.DefaultCamera),o("design:type",e.Camera)],xt.prototype,"camera",void 0),i([r.inject(e.ContextService),o("design:type",Object)],xt.prototype,"contextService",void 0),i([r.inject(e.RenderingContext),o("design:type",Object)],xt.prototype,"renderingContext",void 0),i([r.inject(vt),o("design:type",Object)],xt.prototype,"createElementContribution",void 0),i([r.inject(R),o("design:type",Function)],xt.prototype,"elementRendererFactory",void 0),xt=pt=i([r.singleton({contrib:e.RenderingPluginContribution})],xt);var St,At,Lt=r.Module((function(t){t(C),t(T),t(k),t(G),t(N),t($),t({token:R,useFactory:function(t){return function(r){return r===e.Shape.RECT?t.container.get(C):r===e.Shape.IMAGE?t.container.get(T):r===e.Shape.LINE?t.container.get(k):r===e.Shape.POLYLINE||r===e.Shape.POLYGON?t.container.get(G):r===e.Shape.TEXT?t.container.get(N):r===e.Shape.PATH?t.container.get($):null}}}),t(yt),t(xt)})),Ot=function(){function t(){this.name="svg-renderer"}var e=t.prototype;return e.init=function(t){t.load(Lt,!0)},e.destroy=function(t){t.unload(Lt)},t}(),Ct=Object.freeze({__proto__:null,DEFAULT_VALUE_MAP:wt,ElementSVG:O,G_SVG_PREFIX:Et,Plugin:Ot,SHAPE2TAGS:gt,get SVGRendererPlugin(){return xt},SVG_ATTR_MAP:mt,containerModule:Lt,createSVGElement:it});function Tt(){
|
|
5
|
+
$=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=Object.create((e&&e.prototype instanceof h?e:h).prototype),i=new A(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};u(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(L([])));g&&g!==e&&n.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(i,a,c,u){var s=l(t[i],t,a);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==r(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){f.value=t,c(f)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){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 r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],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,u(m,"constructor",p),u(p,"constructor",d),d.displayName=u(p,c,"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,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},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)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function R(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function W(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){R(i,r,o,a,c,"next",t)}function c(t){R(i,r,o,a,c,"throw",t)}a(void 0)}))}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function V(t,e,n){return e&&F(t.prototype,e),n&&F(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function D(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);e>n;n++)r[n]=t[n];return r}var H=V((function t(){I(this,t),this.$el=void 0,this.$groupEl=void 0,this.$hitTestingEl=void 0}));H.tag="c-svg-element";var Y=function(){function t(){I(this,t),this.dependencies=["radius","width","height"]}return V(t,[{key:"apply",value: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=B(n.map((function(t){return t.value})),4),c=a[0],u=a[1],s=a[2],l=a[3];i=[["M ".concat(c,",0")],["l ".concat(r.value-c-u,",0")],["a ".concat(u,",").concat(u,",0,0,1,").concat(u,",").concat(u)],["l 0,".concat(o.value-u-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+c-o.value)],["a ".concat(c,",").concat(c,",0,0,1,").concat(c,",").concat(-c)],["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}();Y=f([n.singleton()],Y);var X=function(){function t(){I(this,t),this.dependencies=["img","width","height"]}return V(t,[{key:"apply",value:function(t,n){var r=n.img,o=void 0===r?"":r,i=n.width,a=n.height;if(t.setAttribute("x","0"),t.setAttribute("y","0"),e.isString(o))t.setAttribute("href",o);else if(o instanceof Image)i||t.setAttribute("width","".concat(o.width)),a||t.setAttribute("height","".concat(o.height)),t.setAttribute("href",o.src);else if(o instanceof HTMLElement&&e.isString(o.nodeName)&&"CANVAS"===o.nodeName.toUpperCase())t.setAttribute("href",o.toDataURL());else if(o instanceof ImageData){var c=document.createElement("canvas");c.setAttribute("width","".concat(o.width)),c.setAttribute("height","".concat(o.height));var u=c.getContext("2d");u&&(u.putImageData(o,0,0),i||t.setAttribute("width","".concat(o.width)),a||t.setAttribute("height","".concat(o.height)),t.setAttribute("href",c.toDataURL()))}}}]),t}();X=f([n.singleton()],X);var z=function(){function t(){I(this,t),this.dependencies=["x1","y1","x2","y2"]}return V(t,[{key:"apply",value:function(t,n){var r=n.y1,o=n.x2,i=n.y2,a=n.defX,c=void 0===a?0:a,u=n.defY,s=void 0===u?0:u,l=n.stroke;t.setAttribute("x1","".concat(n.x1.value-c)),t.setAttribute("y1","".concat(r.value-s)),t.setAttribute("x2","".concat(o.value-c)),t.setAttribute("y2","".concat(r.value!==i.value||!l||l instanceof e.CSSRGB?i.value-s:i.value-s+1e-5))}}]),t}();z=f([n.singleton()],z);var q=function(){function t(){I(this,t),this.dependencies=["points"]}return V(t,[{key:"apply",value: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}();function Q(t){return t.toFixed(6).replace(".000000","")}function K(t){return t.replace(/[&|<|>|"|']/g,(function(t){return"&"===t?"&":"<"===t?"<":">"===t?">":'"'===t?""":"'"}))}q=f([n.singleton()],q);var J={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},Z={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",ideographic:"ideographic",hanging:"hanging"},tt=function(){function t(){I(this,t),this.dependencies=["text","font","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","lineHeight","letterSpacing","wordWrap","wordWrapWidth","leading","textBaseline","textAlign","textTransform","whiteSpace","dx","dy"]}return V(t,[{key:"apply",value:function(t,e){var n=e.textBaseline,r=e.lineWidth,o=e.metrics,i=e.dx,a=e.dy,c=M();c&&"firefox"===c.name?t.setAttribute("dominant-baseline",Z[n.value]||"alphabetic"):(t.setAttribute("dominant-baseline",Z[n.value]),t.setAttribute("alignment-baseline",J[n.value])),t.setAttribute("paint-order","stroke");var u=o.lines,s=o.lineHeight,l=o.height,f=u.length;t.setAttribute("style","transform:translate(".concat(""+i,", ").concat(""+a,");")),1===f?(t.innerHTML=K(u[0]),t.setAttribute("dx","".concat(r.value/2))):t.innerHTML=u.map((function(t,e){var o=0;return 0===e?"middle"===n.value?o=s/2-l/2:"top"===n.value||"hanging"===n.value?o=0:"bottom"!==n.value&&"alphabetic"!==n.value&&"ideographic"!==n.value||(o=-s*(f-1)):o=s,'<tspan x="0" dx="'.concat(r.value/2,'" dy="').concat(o,'">').concat(K(t),"</tspan>")})).join("")}}]),t}();tt=f([n.singleton()],tt);var et=function(){function t(){I(this,t),this.dependencies=["path"]}return V(t,[{key:"apply",value:function(t,e){var n=e.defX,r=e.defY;t.setAttribute("d",this.formatPath(e.path.absolutePath,void 0===n?0:n,void 0===r?0:r))}},{key:"formatPath",value: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}();et=f([n.singleton()],et);var nt=n.Syringe.defineToken("ElementRendererFactory"),rt=(n.Syringe.defineToken("ElementRenderer"),"undefined"!=typeof Float32Array?Float32Array:Array);function ot(t,e){var n=e[4],r=e[5],o=e[6],i=e[8],a=e[9],c=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(n,r,o),t[2]=Math.hypot(i,a,c),t}function it(){var t=new rt(3);return rt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function at(t,e,n){var r=new rt(3);return r[0]=t,r[1]=e,r[2]=n,r}function ct(t,e,n){var r=e[0],o=e[1],i=e[2],a=n[0],c=n[1],u=n[2];return t[0]=o*u-i*c,t[1]=i*a-r*u,t[2]=r*c-o*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 ut,st=function(t){return Math.hypot(t[0],t[1],t[2])};ut=it();!function(){var t,e=(t=new rt(4),rt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t)}();function lt(){var t=new rt(4);return rt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function ft(t,e,n,r){var o,i,a,c,u,s=e[0],l=e[1],f=e[2],h=e[3],d=n[0],p=n[1],v=n[2],y=n[3];return 0>(i=s*d+l*p+f*v+h*y)&&(i=-i,d=-d,p=-p,v=-v,y=-y),1-i>1e-6?(a=Math.sin(o=Math.acos(i)),c=Math.sin((1-r)*o)/a,u=Math.sin(r*o)/a):(c=1-r,u=r),t[0]=c*s+u*d,t[1]=c*l+u*p,t[2]=c*f+u*v,t[3]=c*h+u*y,t}var ht,dt,pt,vt,yt,gt,mt,bt=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};ht=it(),dt=at(1,0,0),pt=at(0,1,0),vt=lt(),yt=lt(),gt=new rt(9),rt!=Float32Array&&(gt[1]=0,gt[2]=0,gt[3]=0,gt[5]=0,gt[6]=0,gt[7]=0),gt[0]=1,gt[4]=1,gt[8]=1,mt=gt;function wt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Et(t,n,r,o){var i="g-filter-"+n.entity,a=t.querySelectorAll("[name=".concat(i,"]"));if(a.length&&a.forEach((function(e){t.removeChild(e)})),0===o.length)null==r||r.removeAttribute("filter");else{var c=o.map((function(n,r){var o=n.name,a=n.params,c=wt("filter");return"blur"===o?function(t,e){var n=wt("feGaussianBlur");n.setAttribute("in","SourceGraphic"),n.setAttribute("stdDeviation","".concat(e[0].value)),t.appendChild(n)}(c,a):"brightness"===o?function(t,e){var n=xt(e[0]);St(t,{type:"linear",slope:n,intercept:0})}(c,a):"drop-shadow"===o?function(t,e){var n=e[0].value,r=e[1].value,o=e[2].value,i=e[3].formatted,a=wt("feGaussianBlur");a.setAttribute("in","SourceAlpha"),a.setAttribute("stdDeviation","".concat(o)),t.appendChild(a);var c=wt("feOffset");c.setAttribute("dx","".concat(n)),c.setAttribute("dy","".concat(r)),c.setAttribute("result","offsetblur"),t.appendChild(c);var u=wt("feFlood");u.setAttribute("flood-color",i),t.appendChild(u);var s=wt("feComposite");s.setAttribute("in2","offsetblur"),s.setAttribute("operator","in"),t.appendChild(s);var l=wt("feMerge");t.appendChild(l);var f=wt("feMergeNode"),h=wt("feMergeNode");h.setAttribute("in","SourceGraphic"),l.appendChild(f),l.appendChild(h)}(c,a):"contrast"===o?function(t,e){var n=xt(e[0]);St(t,{type:"linear",slope:n,intercept:-.5*n+.5})}(c,a):"grayscale"===o?function(t,e){var n=xt(e[0]);At(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])}(c,a):"sepia"===o?function(t,e){var n=xt(e[0]);At(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])}(c,a):"saturate"===o?function(t,e){var n=xt(e[0]),r=wt("feColorMatrix");r.setAttribute("type","saturate"),r.setAttribute("values","".concat(n)),t.appendChild(r)}(c,a):"hue-rotate"===o?function(t,n){var r=wt("feColorMatrix");r.setAttribute("type","hueRotate"),r.setAttribute("values","".concat(n[0].to(e.UnitType.kDegrees).value)),t.appendChild(r)}(c,a):"invert"===o&&function(t,e){var n=xt(e[0]);St(t,{type:"table",tableValues:"".concat(n," ").concat(1-n)})}(c,a),c.id="".concat(i,"-").concat(r),c.setAttribute("name",i),t.appendChild(c),c.id}));null==r||r.setAttribute("filter",c.map((function(t){return"url(#".concat(t,")")})).join(" "))}}function xt(t){return t.unit===e.UnitType.kPercentage?t.value/100:t.value}function St(t,e){var n=e.type,r=e.slope,o=e.intercept,i=e.tableValues,a=wt("feComponentTransfer");[wt("feFuncR"),wt("feFuncG"),wt("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 At(t,e){var n=wt("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("values",e.join(" ")),t.appendChild(n)}var Lt={},Ot=0;function kt(t,n,r,o,i){if(o){var a=function(t){var n="";if(t instanceof e.CSSGradientValue){var r=t.type;if(r===e.GradientPatternType.Pattern)n=t.value.src;else if(r===e.GradientPatternType.LinearGradient||r===e.GradientPatternType.RadialGradient){var o=t.value,i=o.x0,a=o.y0,c=o.x1,u=o.y1,s=o.r1,l=o.steps;n="".concat(r).concat(i).concat(a).concat(c).concat(u).concat(s||0).concat(l.map((function(t){return t.join("")})).join(""))}n&&(Lt[n]||(Lt[n]="_pattern_".concat(r,"_").concat(Ot++)))}return Lt[n]}(o),c=t.querySelector("#".concat(a));o instanceof e.CSSRGB?"currentColor"===n.style[i]?null==r||r.setAttribute(i,"currentColor"):null==r||r.setAttribute(i,o.isNone?"none":""+o):o.type===e.GradientPatternType.Pattern?(c||function(t,e,n){var r=e.value.src,o=wt("pattern");o.setAttribute("patternUnits","userSpaceOnUse");var i=wt("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 c(){o.setAttribute("width","".concat(a.width)),o.setAttribute("height","".concat(a.height))}a.src=r,a.complete?c():(a.onload=c,a.src=a.src)}(t,o,a),null==r||r.setAttribute(i,"url(#".concat(a,")"))):(c||function(t,n,r){var o=wt(n.type===e.GradientPatternType.LinearGradient?"linearGradient":"radialGradient");if(n.type===e.GradientPatternType.LinearGradient){var i=n.value,a=i.y0,c=i.x1,u=i.y1;o.setAttribute("x1","".concat(i.x0)),o.setAttribute("y1","".concat(a)),o.setAttribute("x2","".concat(c)),o.setAttribute("y2","".concat(u))}else{var s=n.value,l=s.y0,f=s.r1;o.setAttribute("cx","".concat(s.x0)),o.setAttribute("cy","".concat(l)),o.setAttribute("r","".concat(f/2))}var h="";n.value.steps.forEach((function(t){var e=B(t,2),n=e[1];h+='<stop offset="'.concat(e[0],'" stop-color="').concat(n,'"></stop>')})),o.innerHTML=h,o.id=r,t.appendChild(o)}(t,o,a),null==r||r.setAttribute(i,"url(#".concat(a,")")))}}var Ct,Tt,Pt,jt=n.Syringe.defineToken("CreateElementContribution",{multiple:!1}),_t=function(){function t(){I(this,t)}return V(t,[{key:"createElement",value:function(t){return wt(t.nodeName)}}]),t}();_t=f([n.singleton({token:jt})],_t);var Gt=(D(Ct={},e.Shape.RECT,"path"),D(Ct,e.Shape.CIRCLE,"circle"),D(Ct,e.Shape.ELLIPSE,"ellipse"),D(Ct,e.Shape.IMAGE,"image"),D(Ct,e.Shape.GROUP,"g"),D(Ct,e.Shape.LINE,"line"),D(Ct,e.Shape.POLYLINE,"polyline"),D(Ct,e.Shape.POLYGON,"polygon"),D(Ct,e.Shape.TEXT,"text"),D(Ct,e.Shape.PATH,"path"),D(Ct,e.Shape.HTML,"foreignObject"),Ct),Mt={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"},Nt={textAlign:{inherit:"inherit",left:"left",start:"left",center:"middle",right:"end",end:"end"}},$t={textAlign:"inherit",lineCap:"butt",lineJoin:"miter",lineWidth:"1px",opacity:"1",fillOpacity:"1",strokeOpacity:"1",strokeWidth:"0",strokeMiterLimit:"4",letterSpacing:"0",fontSize:"inherit",fontFamily:"inherit"},Rt="g_svg",Wt=(Tt=function(){function t(){I(this,t),this.canvasConfig=void 0,this.camera=void 0,this.contextService=void 0,this.renderingContext=void 0,this.createElementContribution=void 0,this.elementRendererFactory=void 0,this.$def=void 0,this.$camera=void 0,this.renderQueue=[]}return V(t,[{key:"apply",value:function(t){var n=this,r=function(t){n.createSVGDom(t.target,n.$camera)},o=function(t){n.removeSVGDom(t.target)},i=function(t){var e=t.target;if(e.elementSVG){var r=t.attrName;if("zIndex"===r){var o,i,a=e.parentNode,c=null===(o=e.parentNode)||void 0===o||null===(i=o.elementSVG)||void 0===i?void 0:i.$groupEl,u=((null==a?void 0:a.children)||[]).slice();c&&n.reorderChildren(c,u)}else if("increasedLineWidthForHitTesting"===r){var s=e.elementSVG;n.createOrUpdateHitArea(e,s.$el,s.$groupEl)}n.updateAttribute(e,[r])}};t.hooks.init.tapPromise(Pt.tag,W($().mark((function t(){var a,c;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n.$def=wt("defs"),a=n.contextService.getContext(),(c=n.canvasConfig.background)&&(a.style.background=c),a.appendChild(n.$def),a.setAttribute("color-interpolation-filters","sRGB"),n.$camera=wt("g"),n.$camera.id="".concat(Rt,"_camera"),n.applyTransform(n.$camera,n.camera.getOrthoMatrix()),a.appendChild(n.$camera),n.renderingContext.root.addEventListener(e.ElementEvent.MOUNTED,r),n.renderingContext.root.addEventListener(e.ElementEvent.UNMOUNTED,o),n.renderingContext.root.addEventListener(e.ElementEvent.ATTR_MODIFIED,i);case 13:case"end":return t.stop()}}),t)})))),t.hooks.destroy.tap(Pt.tag,(function(){n.renderingContext.root.removeEventListener(e.ElementEvent.MOUNTED,r),n.renderingContext.root.removeEventListener(e.ElementEvent.UNMOUNTED,o),n.renderingContext.root.removeEventListener(e.ElementEvent.ATTR_MODIFIED,i)})),t.hooks.render.tap(Pt.tag,(function(t){n.renderQueue.push(t)})),t.hooks.endFrame.tap(Pt.tag,(function(){n.renderingContext.renderReasons.has(e.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;o&&i&&(n.applyTransform(i,t.getLocalTransform()),t.renderable.dirty=!1)})),n.renderQueue=[]}))}},{key:"reorderChildren",value: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){if(t.isConnected){var e=t.elementSVG.$groupEl;e&&n.appendChild(e)}})),t.appendChild(n)}}},{key:"applyTransform",value:function(t,n){var r=function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}(it(),n),o=ot(it(),n),i=function(t,e){var n=new rt(3);ot(n,e);var r=1/n[0],o=1/n[1],i=1/n[2],a=e[0]*r,c=e[1]*o,u=e[2]*i,s=e[4]*r,l=e[5]*o,f=e[6]*i,h=e[8]*r,d=e[9]*o,p=e[10]*i,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-u)/y,t[2]=(c-s)/y):a>l&&a>p?(t[3]=(f-d)/(y=2*Math.sqrt(1+a-l-p)),t[0]=.25*y,t[1]=(c+s)/y,t[2]=(h+u)/y):l>p?(t[3]=(h-u)/(y=2*Math.sqrt(1+l-a-p)),t[0]=(c+s)/y,t[1]=.25*y,t[2]=(f+d)/y):(t[3]=(c-s)/(y=2*Math.sqrt(1+p-a-l)),t[0]=(h+u)/y,t[1]=(f+d)/y,t[2]=.25*y),t}(lt(),n),a=B(r,2),c=a[0],u=a[1],s=B(o,2),l=s[0],f=s[1],h=B(e.getEuler(it(),i),3),d=e.fromRotationTranslationScale(h[0]||h[2],c,u,l,f);t.setAttribute("transform","matrix(".concat(Q(d[0]),",").concat(Q(d[1]),",").concat(Q(d[3]),",").concat(Q(d[4]),",").concat(Q(d[6]),",").concat(Q(d[7]),")"))}},{key:"applyAttributes",value:function(t){var n=t.elementSVG,r=null==n?void 0:n.$el;if(r&&(null==n?void 0:n.$groupEl)){var o=t.nodeName,i=t.attributes;r.setAttribute("fill","none"),o===e.Shape.IMAGE&&r.setAttribute("preserveAspectRatio","none"),this.updateAttribute(t,Object.keys(i))}}},{key:"updateAttribute",value:function(t,n){var r=this,o=!1,i=t.elementSVG,a=i.$el,c=i.$groupEl,u=i.$hitTestingEl,s=t.parsedStyle,l=t.computedStyle,f=this.elementRendererFactory(t.nodeName);n.forEach((function(n){var i=Mt[n],h=l[n],d=s[n];if(!o&&f&&f.dependencies.indexOf(n)>-1&&(o=!0),t.nodeName===e.Shape.HTML&&("fill"===n?a.style.background=""+d:"stroke"===n?(a.style["border-color"]=""+d,a.style["border-style"]="solid"):"lineWidth"===n?a.style["border-width"]="".concat(d.value||0,"px"):"lineDash"===n&&(a.style["border-style"]="dashed")),"fill"===n||"stroke"===n)kt(r.$def,t,a,d,i);else if("visibility"===n&&"unset"!==h.value)null==c||c.setAttribute(i,"".concat(h.value));else if("clipPath"===n)r.createOrUpdateClipPath(d,c);else if("shadowColor"===n||"shadowBlur"===n||"shadowOffsetX"===n||"shadowOffsetY"===n)!function(t,e,n,r){var o="filter-dropshadow-"+e.entity,i=t.querySelector("#".concat(o));if(!i){i=wt("filter");var a=wt("feDropShadow");a.setAttribute("dx","0"),a.setAttribute("dy","0"),i.appendChild(a),i.id=o,t.appendChild(i)}var c=i.children[0];if("shadowColor"===r)c.setAttribute("flood-color",""+e.parsedStyle[r]);else if("shadowBlur"===r){var u=e.parsedStyle[r];c.setAttribute("stdDeviation","".concat((u&&u.value||0)/2))}else if("shadowOffsetX"===r){var s=e.parsedStyle[r];c.setAttribute("dx","".concat((s&&s.value||0)/2))}else if("shadowOffsetY"===r){var l=e.parsedStyle[r];c.setAttribute("dy","".concat((l&&l.value||0)/2))}e.parsedStyle.shadowBlur&&e.parsedStyle.shadowBlur.value>0?null==n||n.setAttribute("filter","url(#".concat(o,")")):null==n||n.removeAttribute("filter")}(r.$def,t,a,n);else if("filter"===n)Et(r.$def,t,a,d);else if("innerHTML"===n)r.createOrUpdateInnerHTML(a,d);else if(t.nodeName!==e.Shape.TEXT&&["width","height","r","rx","ry","anchor"].indexOf(n)>-1&&r.updateAnchorWithTransform(t),"anchor"!==n&&h){var p=""+h;[a,u].forEach((function(t){if(t&&i)if("unset"!==p&&p!==$t[n]){var e,r=(null===(e=Nt[n])||void 0===e?void 0:e[p])||p;t.setAttribute(i,r)}else t.removeAttribute(i)}))}})),o&&a&&[a,u].forEach((function(e){e&&f.apply(e,t.parsedStyle)}))}},{key:"createSVGDom",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.elementSVG=new H;var o=t.elementSVG,i=Gt[t.nodeName]||"g";if(i){var a,c,u=wt(i);t.nodeName===e.Shape.HTML&&(t.parsedStyle.$el=u),u.id="".concat(Rt,"_").concat(t.nodeName,"_").concat(t.entity),"g"===i||r?c=u:(c=wt("g")).appendChild(u),o.$el=u,o.$groupEl=c;var s=t.parentNode&&(null===(a=t.parentNode.elementSVG)||void 0===a?void 0:a.$groupEl)||n;if(s){var l;s.appendChild(c);var f=((null===(l=t.parentNode)||void 0===l?void 0:l.children)||[]).slice();this.reorderChildren(s,f||[])}this.applyAttributes(t),this.createOrUpdateHitArea(t,u,c)}}},{key:"removeSVGDom",value:function(t){var e,n=null===(e=t.elementSVG)||void 0===e?void 0:e.$groupEl;n&&n.parentNode&&n.parentNode.removeChild(n)}},{key:"createOrUpdateHitArea",value:function(t,e,n){var r,o=t.elementSVG,i=o.$hitTestingEl,a=null===(r=t.parsedStyle.increasedLineWidthForHitTesting)||void 0===r?void 0:r.value;if(a){var c;if(!i){(i=e.cloneNode()).id="".concat(Rt,"_").concat(t.nodeName,"_hittesting_").concat(t.entity),["filter"].forEach((function(t){i.removeAttribute(t)}));var u="none"!==e.getAttribute("fill");i.setAttribute("fill",u?"transparent":"none"),i.setAttribute("stroke","transparent"),n.appendChild(i),o.$hitTestingEl=i}i.setAttribute("stroke-width","".concat(a+(null===(c=t.parsedStyle.lineWidth)||void 0===c?void 0:c.value)))}else i&&(n.removeChild(i),o.$hitTestingEl=null)}},{key:"createOrUpdateInnerHTML",value:function(t,e){var n=document.createElement("div");"string"==typeof e?n.innerHTML=e:n.appendChild(e),t.innerHTML="",t.appendChild(n)}},{key:"createOrUpdateClipPath",value:function(t,e){if(t){var n,r="clip-path-"+t.entity;if(!this.$def.querySelector("#".concat(r))){var o=wt("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")}},{key:"updateAnchorWithTransform",value:function(t){var n,r,o=t.getGeometryBounds(),i=o&&2*o.halfExtents[0]||0,a=o&&2*o.halfExtents[1]||0,c=(t.parsedStyle||{}).anchor;[null===(n=t.elementSVG)||void 0===n?void 0:n.$el,null===(r=t.elementSVG)||void 0===r?void 0:r.$hitTestingEl].forEach((function(n){n&&(n.setAttribute("transform","translate(-".concat(c[0].value*i,",-").concat(c[1].value*a,")")),t.nodeName!==e.Shape.CIRCLE&&t.nodeName!==e.Shape.ELLIPSE||(n.setAttribute("cx","".concat(i/2)),n.setAttribute("cy","".concat(a/2))))}))}}]),t}(),Tt.tag="SVGRenderer",Pt=Tt);f([n.inject(e.CanvasConfig),h("design:type",Object)],Wt.prototype,"canvasConfig",void 0),f([n.inject(e.DefaultCamera),h("design:type",e.Camera)],Wt.prototype,"camera",void 0),f([n.inject(e.ContextService),h("design:type",Object)],Wt.prototype,"contextService",void 0),f([n.inject(e.RenderingContext),h("design:type",Object)],Wt.prototype,"renderingContext",void 0),f([n.inject(jt),h("design:type",Object)],Wt.prototype,"createElementContribution",void 0),f([n.inject(nt),h("design:type",Function)],Wt.prototype,"elementRendererFactory",void 0),Wt=Pt=f([n.singleton({contrib:e.RenderingPluginContribution})],Wt);var It,Ft,Vt=n.Module((function(t){t(Y),t(X),t(z),t(q),t(tt),t(et),t({token:nt,useFactory:function(t){return function(n){return n===e.Shape.RECT?t.container.get(Y):n===e.Shape.IMAGE?t.container.get(X):n===e.Shape.LINE?t.container.get(z):n===e.Shape.POLYLINE||n===e.Shape.POLYGON?t.container.get(q):n===e.Shape.TEXT?t.container.get(tt):n===e.Shape.PATH?t.container.get(et):null}}}),t(_t),t(Wt)})),Dt=function(){function t(){I(this,t),this.name="svg-renderer"}return V(t,[{key:"init",value:function(t){t.load(Vt,!0)}},{key:"destroy",value:function(t){t.unload(Vt)}}]),t}(),Bt=Object.freeze({__proto__:null,DEFAULT_VALUE_MAP:$t,ElementSVG:H,G_SVG_PREFIX:Rt,Plugin:Dt,SHAPE2TAGS:Gt,get SVGRendererPlugin(){return Wt},SVG_ATTR_MAP:Mt,containerModule:Vt,createSVGElement:wt});function Ut(){
|
|
6
6
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
7
|
-
Tt=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 new 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 new 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 new 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 kt(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 Gt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new 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 Gt(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)?Gt(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 _t=(St=function(){function t(){this.sceneGraphService=void 0,this.displayObjectPool=void 0}return t.prototype.apply=function(t){var e=this;t.hooks.pick.tapPromise(At.tag,function(){var t,r=(t=Tt().mark((function t(r){var n,i,o,a,u,s,c,l,f,h,d;return Tt().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(Et)){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){kt(o,n,i,a,u,"next",t)}function u(t){kt(o,n,i,a,u,"throw",t)}a(void 0)}))});return function(t){return r.apply(this,arguments)}}())},t}(),St.tag="SVGPicker",At=St);i([r.inject(e.SceneGraphService),o("design:type",Object)],_t.prototype,"sceneGraphService",void 0),i([r.inject(e.DisplayObjectPool),o("design:type",e.DisplayObjectPool)],_t.prototype,"displayObjectPool",void 0),_t=At=i([r.singleton({contrib:e.RenderingPluginContribution})],_t);var Mt=r.Module((function(t){t(_t)})),jt=function(){function t(){this.name="svg-picker"}var e=t.prototype;return e.init=function(t){t.load(Mt,!0)},e.destroy=function(t){t.unload(Mt)},t}(),Nt=Object.freeze({__proto__:null,Plugin:jt}),$t=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=it("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;n=1>n?1:Math.ceil(n),this.dpr=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)],$t.prototype,"canvasConfig",void 0),$t=i([r.singleton({token:e.ContextService})],$t);var Rt=r.Module((function(t){t($t)})),Wt=function(){function t(){this.name="svg-context-register"}var e=t.prototype;return e.init=function(t){t.load(Rt,!0)},e.destroy=function(t){t.unload(Rt)},t}(),Ft=function(t){var e,r;function i(e){var r;return(r=t.call(this,e)||this).registerPlugin(new Wt),r.registerPlugin(new Ot),r.registerPlugin(new d),r.registerPlugin(new jt),r}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,n(e,r),i}(e.AbstractRenderer);t.DomInteraction=p,t.Renderer=Ft,t.SVGPicker=Nt,t.SVGRenderer=Ct,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
7
|
+
Ut=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=Object.create((e&&e.prototype instanceof h?e:h).prototype),i=new A(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,i),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function h(){}function d(){}function p(){}var v={};u(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(L([])));g&&g!==e&&n.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(i,a,c,u){var s=l(t[i],t,a);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==r(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){f.value=t,c(f)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){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 r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],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,u(m,"constructor",p),u(p,"constructor",d),d.displayName=u(p,c,"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,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},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)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Ht(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function Yt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xt(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zt(t,e,n){return e&&Xt(t.prototype,e),n&&Xt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);e>n;n++)r[n]=t[n];return r}function Qt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return t.length>r?{done:!1,value:t[r++]}:{done:!0}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}var Kt=(It=function(){function t(){Yt(this,t),this.sceneGraphService=void 0,this.displayObjectPool=void 0}return zt(t,[{key:"apply",value:function(t){var e=this;t.hooks.pick.tapPromise(Ft.tag,function(){var t,n=(t=Ut().mark((function t(n){var r,o,i,a,c,u,s,l,f,h,d;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=n.topmost,i=(o=n.position).clientX,a=o.clientY,t.prev=1,c=[],u=Qt(document.elementsFromPoint(i,a)),t.prev=4,u.s();case 6:if((s=u.n()).done){t.next=19;break}if(!(f=(l=s.value)&&l.getAttribute("id"))||!f.startsWith(Rt)){t.next=17;break}if(h=f.lastIndexOf("_"),!(d=e.displayObjectPool.getByEntity(Number(f.substring(h+1))))||!d.isInteractive()){t.next=17;break}if(c.push(d),!r){t.next=17;break}return n.picked=c,t.abrupt("return",n);case 17:t.next=6;break;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(4),u.e(t.t0);case 24:return t.prev=24,u.f(),t.finish(24);case 27:n.picked=c,t.next=33;break;case 30:t.prev=30,t.t1=t.catch(1),n.picked=[];case 33:return t.abrupt("return",n);case 34:case"end":return t.stop()}}),t,null,[[1,30],[4,21,24,27]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Ht(i,r,o,a,c,"next",t)}function c(t){Ht(i,r,o,a,c,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}())}}]),t}(),It.tag="SVGPicker",Ft=It);f([n.inject(e.SceneGraphService),h("design:type",Object)],Kt.prototype,"sceneGraphService",void 0),f([n.inject(e.DisplayObjectPool),h("design:type",e.DisplayObjectPool)],Kt.prototype,"displayObjectPool",void 0),Kt=Ft=f([n.singleton({contrib:e.RenderingPluginContribution})],Kt);var Jt=n.Module((function(t){t(Kt)})),Zt=function(){function t(){Yt(this,t),this.name="svg-picker"}return zt(t,[{key:"init",value:function(t){t.load(Jt,!0)}},{key:"destroy",value:function(t){t.unload(Jt)}}]),t}(),te=Object.freeze({__proto__:null,Plugin:Zt}),ee=function(){function t(){o(this,t),this.$container=void 0,this.$namespace=void 0,this.dpr=void 0,this.canvasConfig=void 0}return a(t,[{key:"init",value: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 n=wt("svg");n.setAttribute("width","".concat(this.canvasConfig.width)),n.setAttribute("height","".concat(this.canvasConfig.height)),this.$container.appendChild(n),this.$namespace=n}var r=window.devicePixelRatio||1;this.dpr=r=1>r?1:Math.ceil(r)}},{key:"getDomElement",value:function(){return this.$namespace}},{key:"getContext",value:function(){return this.$namespace}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){var t;return null===(t=this.$namespace)||void 0===t?void 0:t.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$namespace&&this.$namespace.parentNode&&this.$container.removeChild(this.$namespace)}},{key:"resize",value:function(t,e){this.$namespace&&(this.$namespace.setAttribute("width","".concat(t)),this.$namespace.setAttribute("height","".concat(e)))}},{key:"applyCursorStyle",value:function(t){this.$container&&(this.$container.style.cursor=t)}}]),t}();f([n.inject(e.CanvasConfig),h("design:type",Object)],ee.prototype,"canvasConfig",void 0),ee=f([n.singleton({token:e.ContextService})],ee);var ne=n.Module((function(t){t(ee)})),re=function(){function t(){o(this,t),this.name="svg-context-register"}return a(t,[{key:"init",value:function(t){t.load(ne,!0)}},{key:"destroy",value:function(t){t.unload(ne)}}]),t}(),oe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(n,t);var e=l(n);function n(t){var r;return o(this,n),(r=e.call(this,t)).registerPlugin(new re),r.registerPlugin(new Dt),r.registerPlugin(new S),r.registerPlugin(new Zt),r}return a(n)}(e.AbstractRenderer);t.DomInteraction=A,t.Renderer=oe,t.SVGPicker=te,t.SVGRenderer=Bt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g-svg",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "A renderer implemented by SVG",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antv",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"README.md"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@antv/g-plugin-dom-interaction": "^1.1.
|
|
31
|
-
"@antv/g-plugin-svg-picker": "^1.1.
|
|
32
|
-
"@antv/g-plugin-svg-renderer": "^1.1.
|
|
30
|
+
"@antv/g-plugin-dom-interaction": "^1.1.6",
|
|
31
|
+
"@antv/g-plugin-svg-picker": "^1.1.6",
|
|
32
|
+
"@antv/g-plugin-svg-renderer": "^1.1.6",
|
|
33
33
|
"tslib": "^2.3.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ee946c7c12c90946c37926b34ee5165bf0c35f25"
|
|
47
47
|
}
|