13 lines
50 KiB
JavaScript
13 lines
50 KiB
JavaScript
|
var t="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},e=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof t&&t)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},r=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i={f:o&&!n.call({1:2},1)?function propertyIsEnumerable(t){var e=o(this,t);return!!e&&e.enumerable}:n},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c={}.toString,classofRaw=function(t){return c.call(t).slice(8,-1)},a="".split,u=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?a.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 u(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")},f={}.hasOwnProperty,has=function(t,e){return f.call(t,e)},s=e.document,l=isObject(s)&&isObject(s.createElement),documentCreateElement=function(t){return l?s.createElement(t):{}},p=!r&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),h=Object.getOwnPropertyDescriptor,v={f:r?h:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),p)try{return h(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!i.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},y=Object.defineProperty,d={f:r?y:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),p)try{return y(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}},g=r?function(t,e,r){return d.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,r){try{g(e,t,r)}catch(n){e[t]=r}return r},m=e["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),b=Function.toString;"function"!=typeof m.inspectSource&&(m.inspectSource=function(t){return b.call(t)});var w,x,S,E=m.inspectSource,O=e.WeakMap,j="function"==typeof O&&/native code/.test(E(O)),P=createCommonjsModule((function(t){(t.exports=function(t,e){return m[t]||(m[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),T=0,A=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++T+A).toString(36)},_=P("keys"),sharedKey=function(t){return _[t]||(_[t]=uid(t))},I={},L=e.WeakMap;if(j){var k=new L,R=k.get,C=k.has,M=k.set;w=function(t,e){return M.call(k,t,e),e},x=function(t){return R.call(k,t)||{}},S=function(t){return C.call(k,t)}}else{var G=sharedKey("state");I[G]=!0,w=function(t,e){return g(t,G,e),e},x=function(t){return has(t,G)?t[G]:{}},S=function(t){return has(t,G)}}var N,D,U={set:w,get:x,has:S,enforce:function(t){return S(t)?x(t):w(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=x(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},$=createCommonjsModule((function(t){var r=U.get,n=U.enforc
|
||
|
/**
|
||
|
* Localizing script for SVG-edit UI.
|
||
|
* @module locale
|
||
|
* @license MIT
|
||
|
*
|
||
|
* @copyright 2010 Narendra Sisodya
|
||
|
* @copyright 2010 Alexis Deveria
|
||
|
*
|
||
|
*/
|
||
|
jQuery;var Uo=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee2(t,e){var r;return regeneratorRuntime.wrap((function _callee2$(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,import("./extensions/ext-".concat(t,"/locale/").concat(e,".js"));case 3:r=n.sent,n.next=12;break;case 6:return n.prev=6,n.t0=n.catch(0),console.error("Missing translation (".concat(e,") for extension ").concat(t," - using 'en'")),n.next=11,import("./extensions/ext-".concat(t,"/locale/en.js"));case 11:r=n.sent;case 12:return n.abrupt("return",r.default);case 13:case"end":return n.stop()}}),_callee2,null,[[0,6]])})));return function loadExtensionTranslation(e,r){return t.apply(this,arguments)}}(),$o={name:"panning",init:function init(t){var e=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee(){var r,n,o,i;return regeneratorRuntime.wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:return t.importLocale,r=e,c.next=4,Uo("panning",r.curPrefs.lang);case 4:return n=c.sent,o=r.canvas,i=[{id:"ext-panning",icon:"panning.png",type:"mode",events:{click:function click(){o.setMode("ext-panning")}}}],c.abrupt("return",{name:n.name,svgicons:"ext-panning.xml",buttons:n.buttons.map((function(t,e){return Object.assign(i[e],t)})),mouseDown:function mouseDown(){if("ext-panning"===o.getMode())return r.setPanning(!0),{started:!0}},mouseUp:function mouseUp(){if("ext-panning"===o.getMode())return r.setPanning(!1),{keep:!1,element:null}}});case 8:case"end":return c.stop()}}),_callee)})))()}};export default $o;
|
||
|
//# sourceMappingURL=ext-panning.js.map
|