12 lines
50 KiB
JavaScript
12 lines
50 KiB
JavaScript
|
System.register([],(function(t,e){"use strict";return{execute:function(){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var check=function(t){return t&&t.Math==Math&&t},n=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r&&r)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},o=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),i={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,a={f:c&&!i.call({1:2},1)?function propertyIsEnumerable(t){var e=c(this,t);return!!e&&e.enumerable}:i},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},u={}.toString,classofRaw=function(t){return u.call(t).slice(8,-1)},f="".split,s=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?f.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return s(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,e){if(!isObject(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!isObject(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},l={}.hasOwnProperty,has=function(t,e){return l.call(t,e)},p=n.document,h=isObject(p)&&isObject(p.createElement),documentCreateElement=function(t){return h?p.createElement(t):{}},v=!o&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),y=Object.getOwnPropertyDescriptor,d={f:o?y:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),v)try{return y(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!a.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},g=Object.defineProperty,m={f:o?g:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),v)try{return g(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},b=o?function(t,e,r){return m.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,e){try{b(n,t,e)}catch(r){n[t]=e}return e},w="__core-js_shared__",S=n[w]||setGlobal(w,{}),x=Function.toString;"function"!=typeof S.inspectSource&&(S.inspectSource=function(t){return x.call(t)});var E,O,j,P=S.inspectSource,T=n.WeakMap,A="function"==typeof T&&/native code/.test(P(T)),I=createCommonjsModule((function(t){(t.exports=function(t,e){return S[t]||(S[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),_=0,L=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++_+L).toString(36)},k=I("keys"),sharedKey=function(t){return k[t]||(k[t]=uid(t))},R={},C=n.WeakMap;if(A){var M=new C,G=M.get,N=M.has,D=M.set;E=function(t,e){return D.call(M,t,e),e},O=function(t){return G.call(M,t)||{}},j=function(t){return N.call(M,t)}}else{var U=sharedKey("state");R[U]=!0,E=function(t,e){return b(t,U,e),e},O=function(t){return has(t,U)?t[U]:{}},j=function(t){return has(t,U)}}var $,W={set:E,get:O,has:j,enforce:function(t){return j(t)?O(t):E(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=O(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},q=
|
||
|
/**
|
||
|
* Localizing script for SVG-edit UI.
|
||
|
* @module locale
|
||
|
* @license MIT
|
||
|
*
|
||
|
* @copyright 2010 Narendra Sisodya
|
||
|
* @copyright 2010 Alexis Deveria
|
||
|
*
|
||
|
*/
|
||
|
jQuery;var ui=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee2(t,r){var n;return regeneratorRuntime.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,e.import("./extensions/ext-".concat(t,"/locale/").concat(r,".js"));case 3:n=o.sent,o.next=12;break;case 6:return o.prev=6,o.t0=o.catch(0),console.error("Missing translation (".concat(r,") for extension ").concat(t," - using 'en'")),o.next=11,e.import("./extensions/ext-".concat(t,"/locale/en.js"));case 11:n=o.sent;case 12:return o.abrupt("return",n.default);case 13:case"end":return o.stop()}}),_callee2,null,[[0,6]])})));return function loadExtensionTranslation(e,r){return t.apply(this,arguments)}}();t("default",{name:"webappfind",init:function init(t){var e=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee(){var r,n,o,i,c,a,u;return regeneratorRuntime.wrap((function _callee$(f){for(;;)switch(f.prev=f.next){case 0:return r=t.$,n=e,f.next=4,ui("webappfind",n.curPrefs.lang);case 4:return o=f.sent,"read",c=["read",i="save"],e.canvas.bind("message",(function(t,e){var o,i,u=e.data,f=e.origin;try{var s=u.webappfind;if(o=s.type,a=s.pathID,i=s.content,f!==location.origin||c.includes(o))return}catch(t){return}switch(o){case"view":n.loadFromString(i);break;case"save-end":r.alert("save complete for pathID ".concat(a,"!"));break;default:throw new Error("Unexpected WebAppFind event type")}})),u=[{id:"webappfind_save",icon:"webappfind.png",type:"app_menu",position:4,events:{click:function click(){a&&window.postMessage({webappfind:{type:i,pathID:a,content:n.canvas.getSvgString()}},"null"===window.location.origin?"*":window.location.origin)}}}],f.abrupt("return",{name:o.name,svgicons:"webappfind-icon.svg",buttons:o.buttons.map((function(t,e){return Object.assign(u[e],t)}))});case 9:case"end":return f.stop()}}),_callee)})))()}})}}}));
|