gridjs-spreadsheet
Version:
this is the client side script for GridJs which is a lightweight, scalable, and customizable toolkit that provides cross-platform web applications, enables convenient development for editing or viewing Excel/Spreadsheet files, offers simple deployment, an
3 lines • 2.29 MB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["gridjs-spreadsheet"]=e():t["gridjs-spreadsheet"]=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=47)}([function(t,e,n){"use strict";n.d(e,"p",(function(){return g})),n.d(e,"G",(function(){return v})),n.d(e,"d",(function(){return m})),n.d(e,"I",(function(){return y})),n.d(e,"J",(function(){return b})),n.d(e,"m",(function(){return x})),n.d(e,"i",(function(){return w})),n.d(e,"r",(function(){return _})),n.d(e,"s",(function(){return k})),n.d(e,"K",(function(){return S})),n.d(e,"u",(function(){return C})),n.d(e,"k",(function(){return T})),n.d(e,"H",(function(){return q})),n.d(e,"N",(function(){return O})),n.d(e,"n",(function(){return M})),n.d(e,"o",(function(){return I})),n.d(e,"F",(function(){return A})),n.d(e,"c",(function(){return D})),n.d(e,"h",(function(){return E})),n.d(e,"t",(function(){return L})),n.d(e,"w",(function(){return R})),n.d(e,"C",(function(){return P})),n.d(e,"D",(function(){return j})),n.d(e,"z",(function(){return B})),n.d(e,"A",(function(){return z})),n.d(e,"E",(function(){return N})),n.d(e,"v",(function(){return V})),n.d(e,"x",(function(){return H})),n.d(e,"y",(function(){return W})),n.d(e,"B",(function(){return G})),n.d(e,"l",(function(){return U})),n.d(e,"O",(function(){return X})),n.d(e,"P",(function(){return Y})),n.d(e,"Q",(function(){return Z})),n.d(e,"S",(function(){return K})),n.d(e,"M",(function(){return $})),n.d(e,"b",(function(){return J})),n.d(e,"T",(function(){return Q})),n.d(e,"R",(function(){return tt})),n.d(e,"f",(function(){return at})),n.d(e,"e",(function(){return ot})),n.d(e,"g",(function(){return st})),n.d(e,"j",(function(){return lt})),n.d(e,"q",(function(){return ct})),n.d(e,"L",(function(){return ht})),n.d(e,"a",(function(){return ut}));var i=n(16),r=O(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),a=O(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),o=Object.prototype.toString,s=Array.prototype,l=s.forEach,c=s.filter,h=s.slice,u=s.map,d=function(){}.constructor,f=d?d.prototype:null,p=2311;function g(){return p++}function v(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function m(t){if(null==t||"object"!=typeof t)return t;var e=t,n=o.call(t);if("[object Array]"===n){if(!et(t)){e=[];for(var i=0,s=t.length;i<s;i++)e[i]=m(t[i])}}else if(a[n]){if(!et(t)){var l=t.constructor;if(l.from)e=l.from(t);else{e=new l(t.length);for(i=0,s=t.length;i<s;i++)e[i]=t[i]}}}else if(!r[n]&&!et(t)&&!V(t))for(var c in e={},t)t.hasOwnProperty(c)&&"__proto__"!==c&&(e[c]=m(t[c]));return e}function y(t,e,n){if(!z(e)||!z(t))return n?m(e):t;for(var i in e)if(e.hasOwnProperty(i)&&"__proto__"!==i){var r=t[i],a=e[i];!z(a)||!z(r)||L(a)||L(r)||V(a)||V(r)||F(a)||F(r)||et(a)||et(r)?!n&&i in t||(t[i]=m(e[i])):y(r,a,n)}return t}function b(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=y(n,t[i],e);return n}function x(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&"__proto__"!==n&&(t[n]=e[n]);return t}function w(t,e,n){for(var i=A(e),r=0;r<i.length;r++){var a=i[r];(n?null!=e[a]:null==t[a])&&(t[a]=e[a])}return t}i.d.createCanvas;function _(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function k(t,e){var n=t.prototype;function i(){}for(var r in i.prototype=e.prototype,t.prototype=new i,n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function S(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var a=i[r];"constructor"!==a&&(n?null!=e[a]:null==t[a])&&(t[a]=e[a])}else w(t,e,n)}function C(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function T(t,e,n){if(t&&e)if(t.forEach&&t.forEach===l)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function q(t,e,n){if(!t)return[];if(!e)return K(t);if(t.map&&t.map===u)return t.map(e,n);for(var i=[],r=0,a=t.length;r<a;r++)i.push(e.call(n,t[r],r,t));return i}function O(t,e,n,i){if(t&&e){for(var r=0,a=t.length;r<a;r++)n=e.call(i,n,t[r],r,t);return n}}function M(t,e,n){if(!t)return[];if(!e)return K(t);if(t.filter&&t.filter===c)return t.filter(e,n);for(var i=[],r=0,a=t.length;r<a;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function I(t,e,n){if(t&&e)for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]}function A(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}var D=f&&R(f.bind)?f.call.bind(f.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(h.call(arguments)))}};function E(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(h.call(arguments)))}}function L(t){return Array.isArray?Array.isArray(t):"[object Array]"===o.call(t)}function R(t){return"function"==typeof t}function P(t){return"string"==typeof t}function j(t){return"[object String]"===o.call(t)}function B(t){return"number"==typeof t}function z(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function F(t){return!!r[o.call(t)]}function N(t){return!!a[o.call(t)]}function V(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function H(t){return null!=t.colorStops}function W(t){return null!=t.image}function G(t){return"[object RegExp]"===o.call(t)}function U(t){return t!=t}function X(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function Y(t,e){return null!=t?t:e}function Z(t,e,n){return null!=t?t:null!=e?e:n}function K(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return h.apply(t,e)}function $(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function J(t,e){if(!t)throw new Error(e)}function Q(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function tt(t){t.__ec_primitive__=!0}function et(t){return t.__ec_primitive__}var nt=function(){function t(){this.data={}}return t.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,e){return this.data[t]=e,this},t.prototype.keys=function(){return A(this.data)},t.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},t}(),it="function"==typeof Map;var rt=function(){function t(e){var n=L(e);this.data=it?new Map:new nt;var i=this;function r(t,e){n?i.set(t,e):i.set(e,t)}e instanceof t?e.each(r):e&&T(e,r)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,e){return this.data.set(t,e),e},t.prototype.each=function(t,e){this.data.forEach((function(n,i){t.call(e,n,i)}))},t.prototype.keys=function(){var t=this.data.keys();return it?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function at(t){return new rt(t)}function ot(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n}function st(t,e){var n;if(Object.create)n=Object.create(t);else{var i=function(){};i.prototype=t,n=new i}return e&&x(n,e),n}function lt(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function ct(t,e){return t.hasOwnProperty(e)}function ht(){}var ut=180/Math.PI},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(24);function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(38);t.exports=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&&i(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(17).default,r=n(36);t.exports=function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(21),r=n(31),a=n(20),o=n(23);t.exports=function(t,e){return i(t)||r(t,e)||a(t,e)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(24);t.exports=function(t,e,n){return(e=i(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(34),r=n(25),a=n(20),o=n(35);t.exports=function(t){return i(t)||r(t)||a(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){"use strict";var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(".")[0]>18);o&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r),e.a=r},function(t,e,n){var i=n(33)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){"use strict";n.d(e,"h",(function(){return m})),n.d(e,"c",(function(){return b})),n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return w})),n.d(e,"g",(function(){return _})),n.d(e,"f",(function(){return k})),n.d(e,"i",(function(){return S})),n.d(e,"e",(function(){return C})),n.d(e,"d",(function(){return q}));var i=n(18),r=n(0),a={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function o(t){return(t=Math.round(t))<0?0:t>255?255:t}function s(t){return t<0?0:t>1?1:t}function l(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100*255):o(parseInt(e,10))}function c(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?s(parseFloat(e)/100):s(parseFloat(e))}function h(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function u(t,e,n){return t+(e-t)*n}function d(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function f(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var p=new i.a(20),g=null;function v(t,e){g&&f(g,e),g=p.put(t,g||e.slice())}function m(t,e){if(t){e=e||[];var n=p.get(t);if(n)return f(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in a)return f(e,a[i]),v(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(d(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),v(t,e),e):void d(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(d(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),v(t,e),e):void d(e,0,0,0,1):void 0;var s=i.indexOf("("),h=i.indexOf(")");if(-1!==s&&h+1===o){var u=i.substr(0,s),g=i.substr(s+1,h-(s+1)).split(","),m=1;switch(u){case"rgba":if(4!==g.length)return 3===g.length?d(e,+g[0],+g[1],+g[2],1):d(e,0,0,0,1);m=c(g.pop());case"rgb":return g.length>=3?(d(e,l(g[0]),l(g[1]),l(g[2]),3===g.length?m:c(g[3])),v(t,e),e):void d(e,0,0,0,1);case"hsla":return 4!==g.length?void d(e,0,0,0,1):(g[3]=c(g[3]),y(g,e),v(t,e),e);case"hsl":return 3!==g.length?void d(e,0,0,0,1):(y(g,e),v(t,e),e);default:return}}d(e,0,0,0,1)}}function y(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=c(t[1]),r=c(t[2]),a=r<=.5?r*(i+1):r+i-r*i,s=2*r-a;return d(e=e||[],o(255*h(s,a,n+1/3)),o(255*h(s,a,n)),o(255*h(s,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function b(t,e){var n=m(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return S(n,4===n.length?"rgba":"rgb")}}function x(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),l=e[r],c=e[a],h=i-r;return n[0]=o(u(l[0],c[0],h)),n[1]=o(u(l[1],c[1],h)),n[2]=o(u(l[2],c[2],h)),n[3]=s(u(l[3],c[3],h)),n}}function w(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),a=Math.ceil(i),l=m(e[r]),c=m(e[a]),h=i-r,d=S([o(u(l[0],c[0],h)),o(u(l[1],c[1],h)),o(u(l[2],c[2],h)),s(u(l[3],c[3],h))],"rgba");return n?{color:d,leftIndex:r,rightIndex:a,value:i}:d}}function _(t,e,n,i){var r,a=m(t);if(t)return a=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,c=(s+o)/2;if(0===l)e=0,n=0;else{n=c<.5?l/(s+o):l/(2-s-o);var h=((s-i)/6+l/2)/l,u=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?e=d-u:r===s?e=1/3+h-d:a===s&&(e=2/3+u-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,c];return null!=t[3]&&f.push(t[3]),f}}(a),null!=e&&(a[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(a[1]=c(n)),null!=i&&(a[2]=c(i)),S(y(a),"rgba")}function k(t,e){var n=m(t);if(n&&null!=e)return n[3]=s(e),S(n,"rgba")}function S(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function C(t,e){var n=m(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var T=new i.a(100);function q(t){if(Object(r.C)(t)){var e=T.get(t);return e||(e=b(t,-.1),T.put(t,e)),e}if(Object(r.x)(t)){var n=Object(r.m)({},t);return n.colorStops=Object(r.H)(t.colorStops,(function(t){return{offset:t.offset,color:b(t.color,-.1)}})),n}return t}},function(t,e,n){"use strict";(function(t){n.d(e,"p",(function(){return s})),n.d(e,"j",(function(){return l})),n.d(e,"q",(function(){return h})),n.d(e,"e",(function(){return u})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return f})),n.d(e,"i",(function(){return p})),n.d(e,"h",(function(){return g})),n.d(e,"l",(function(){return v})),n.d(e,"n",(function(){return m})),n.d(e,"m",(function(){return y})),n.d(e,"o",(function(){return b})),n.d(e,"k",(function(){return x})),n.d(e,"d",(function(){return w})),n.d(e,"f",(function(){return _})),n.d(e,"g",(function(){return k})),n.d(e,"c",(function(){return S}));var i=n(0),r=n(11),a=n(9),o=Math.round;function s(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=Object(r.h)(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}function l(t){return t<1e-4&&t>-1e-4}function c(t){return o(1e3*t)/1e3}function h(t){return o(1e4*t)/1e4}function u(t){return"matrix("+c(t[0])+","+c(t[1])+","+c(t[2])+","+c(t[3])+","+h(t[4])+","+h(t[5])+")"}var d={left:"start",right:"end",center:"middle",middle:"middle"};function f(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}function p(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function g(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function v(t){return t&&!!t.image}function m(t){return v(t)||function(t){return t&&!!t.svgElement}(t)}function y(t){return"linear"===t.type}function b(t){return"radial"===t.type}function x(t){return t&&("linear"===t.type||"radial"===t.type)}function w(t){return"url(#"+t+")"}function _(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function k(t){var e=t.x||0,n=t.y||0,r=(t.rotation||0)*i.a,a=Object(i.P)(t.scaleX,1),s=Object(i.P)(t.scaleY,1),l=t.skewX||0,c=t.skewY||0,h=[];return(e||n)&&h.push("translate("+e+"px,"+n+"px)"),r&&h.push("rotate("+r+")"),1===a&&1===s||h.push("scale("+a+","+s+")"),(l||c)&&h.push("skew("+o(l*i.a)+"deg, "+o(c*i.a)+"deg)"),h.join(" ")}var S=a.a.hasGlobalWindow&&Object(i.w)(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:void 0!==t?function(e){return t.from(e).toString("base64")}:function(t){return null}}).call(this,n(27).Buffer)},function(t,e,n){(function(t){
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var i,r,a,o,s,l,c,h,u,d,f,p,g,v,m,y,b,x,w,_,k,S,C=C||{version:"4.6.0"};if(e.fabric=C,"undefined"!=typeof document&&"undefined"!=typeof window)document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?C.document=document:C.document=document.implementation.createHTMLDocument(""),C.window=window;else{var T=new(n(43).JSDOM)(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;C.document=T.document,C.jsdomImplForWrapper=n(44).implForWrapper,C.nodeCanvas=n(45).Canvas,C.window=T,DOMParser=C.window.DOMParser}function q(t,e){var n=t.canvas,i=e.targetCanvas,r=i.getContext("2d");r.translate(0,i.height),r.scale(1,-1);var a=n.height-i.height;r.drawImage(n,0,a,i.width,i.height,0,0,i.width,i.height)}function O(t,e){var n=e.targetCanvas.getContext("2d"),i=e.destinationWidth,r=e.destinationHeight,a=i*r*4,o=new Uint8Array(this.imageBuffer,0,a),s=new Uint8ClampedArray(this.imageBuffer,0,a);t.readPixels(0,0,i,r,t.RGBA,t.UNSIGNED_BYTE,o);var l=new ImageData(s,i,r);n.putImageData(l,0,0)}C.isTouchSupported="ontouchstart"in C.window||"ontouchstart"in C.document||C.window&&C.window.navigator&&C.window.navigator.maxTouchPoints>0,C.isLikelyNode=void 0!==t&&"undefined"==typeof window,C.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],C.DPI=96,C.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",C.commaWsp="(?:\\s+,?\\s*|,\\s*)",C.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,C.reNonWord=/[ \n\.,;!\?\-]/,C.fontPaths={},C.iMatrix=[1,0,0,1,0,0],C.svgNS="http://www.w3.org/2000/svg",C.perfLimitSizeTotal=2097152,C.maxCacheSideLimit=4096,C.minCacheSideLimit=256,C.charWidthsCache={},C.textureSize=2048,C.disableStyleCopyPaste=!1,C.enableGLFiltering=!0,C.devicePixelRatio=C.window.devicePixelRatio||C.window.webkitDevicePixelRatio||C.window.mozDevicePixelRatio||1,C.browserShadowBlurConstant=1,C.arcToSegmentsCache={},C.boundsOfCurveCache={},C.cachesBoundsOfCurve=!0,C.forceGLPutImageData=!1,C.initFilterBackend=function(){return C.enableGLFiltering&&C.isWebglSupported&&C.isWebglSupported(C.textureSize)?(console.log("max texture size: "+C.maxTextureSize),new C.WebglFilterBackend({tileSize:C.textureSize})):C.Canvas2dFilterBackend?new C.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=C),function(){function t(t,e){if(this.__eventListeners[t]){var n=this.__eventListeners[t];e?n[n.indexOf(e)]=!1:C.util.array.fill(n,!1)}}function e(t,e){var n=function(){e.apply(this,arguments),this.off(t,n)}.bind(this);this.on(t,n)}C.Observable={fire:function(t,e){if(!this.__eventListeners)return this;var n=this.__eventListeners[t];if(!n)return this;for(var i=0,r=n.length;i<r;i++)n[i]&&n[i].call(this,e||{});return this.__eventListeners[t]=n.filter((function(t){return!1!==t})),this},on:function(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var n in t)this.on(n,t[n]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this},once:function(t,n){if(1===arguments.length)for(var i in t)e.call(this,i,t[i]);else e.call(this,t,n);return this},off:function(e,n){if(!this.__eventListeners)return this;if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof arguments[0])for(var i in e)t.call(this,i,e[i]);else t.call(this,e,n);return this}}}(),C.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var t=0,e=arguments.length;t<e;t++)this._onObjectAdded(arguments[t]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(t,e,n){var i=this._objects;return n?i[e]=t:i.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var t,e=this._objects,n=!1,i=0,r=arguments.length;i<r;i++)-1!==(t=e.indexOf(arguments[i]))&&(n=!0,e.splice(t,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[i]));return this.renderOnAddRemove&&n&&this.requestRenderAll(),this},forEachObject:function(t,e){for(var n=this.getObjects(),i=0,r=n.length;i<r;i++)t.call(e,n[i],i,n);return this},getObjects:function(t){return void 0===t?this._objects.concat():this._objects.filter((function(e){return e.type===t}))},item:function(t){return this._objects[t]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(t,e){return this._objects.indexOf(t)>-1||!!e&&this._objects.some((function(e){return"function"==typeof e.contains&&e.contains(t,!0)}))},complexity:function(){return this._objects.reduce((function(t,e){return t+=e.complexity?e.complexity():0}),0)}},C.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof C.Gradient||this.set(e,new C.Gradient(t))},_initPattern:function(t,e,n){!t||!t.source||t instanceof C.Pattern?n&&n():this.set(e,new C.Pattern(t,n))},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(t):this._set(t,e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return"boolean"==typeof e&&this.set(t,!e),this},get:function(t){return this[t]}},i=e,r=Math.sqrt,a=Math.atan2,o=Math.pow,s=Math.PI/180,l=Math.PI/2,C.util={cos:function(t){if(0===t)return 1;switch(t<0&&(t=-t),t/l){case 1:case 3:return 0;case 2:return-1}return Math.cos(t)},sin:function(t){if(0===t)return 0;var e=1;switch(t<0&&(e=-1),t/l){case 1:return e;case 2:return 0;case 3:return-e}return Math.sin(t)},removeFromArray:function(t,e){var n=t.indexOf(e);return-1!==n&&t.splice(n,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*s},radiansToDegrees:function(t){return t/s},rotatePoint:function(t,e,n){var i=new C.Point(t.x-e.x,t.y-e.y),r=C.util.rotateVector(i,n);return new C.Point(r.x,r.y).addEquals(e)},rotateVector:function(t,e){var n=C.util.sin(e),i=C.util.cos(e);return{x:t.x*i-t.y*n,y:t.x*n+t.y*i}},transformPoint:function(t,e,n){return n?new C.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new C.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t,e){if(e)for(var n=0;n<t.length;n++)t[n]=C.util.transformPoint(t[n],e);var i=[t[0].x,t[1].x,t[2].x,t[3].x],r=C.util.array.min(i),a=C.util.array.max(i)-r,o=[t[0].y,t[1].y,t[2].y,t[3].y],s=C.util.array.min(o);return{left:r,top:s,width:a,height:C.util.array.max(o)-s}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),n=[e*t[3],-e*t[1],-e*t[2],e*t[0]],i=C.util.transformPoint({x:t[4],y:t[5]},n,!0);return n[4]=-i.x,n[5]=-i.y,n},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var n=/\D{0,2}$/.exec(t),i=parseFloat(t);switch(e||(e=C.Text.DEFAULT_SVG_FONT_SIZE),n[0]){case"mm":return i*C.DPI/25.4;case"cm":return i*C.DPI/2.54;case"in":return i*C.DPI;case"pt":return i*C.DPI/72;case"pc":return i*C.DPI/72*12;case"em":return i*e;default:return i}},falseFunction:function(){return!1},getKlass:function(t,e){return t=C.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),C.util.resolveNamespace(e)[t]},getSvgAttributes:function(t){var e=["instantiated_by_use","style","id","class"];switch(t){case"linearGradient":e=e.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":e=e.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":e=e.concat(["offset","stop-color","stop-opacity"])}return e},resolveNamespace:function(t){if(!t)return C;var e,n=t.split("."),r=n.length,a=i||C.window;for(e=0;e<r;++e)a=a[n[e]];return a},loadImage:function(t,e,n,i){if(t){var r=C.util.createImage(),a=function(){e&&e.call(n,r,!1),r=r.onload=r.onerror=null};r.onload=a,r.onerror=function(){C.log("Error loading "+r.src),e&&e.call(n,null,!0),r=r.onload=r.onerror=null},0!==t.indexOf("data")&&null!=i&&(r.crossOrigin=i),"data:image/svg"===t.substring(0,14)&&(r.onload=null,C.util.loadImageInDom(r,a)),r.src=t}else e&&e.call(n,t)},loadImageInDom:function(t,e){var n=C.document.createElement("div");n.style.width=n.style.height="1px",n.style.left=n.style.top="-100%",n.style.position="absolute",n.appendChild(t),C.document.querySelector("body").appendChild(n),t.onload=function(){e(),n.parentNode.removeChild(n),n=null}},enlivenObjects:function(t,e,n,i){var r=[],a=0,o=(t=t||[]).length;function s(){++a===o&&e&&e(r.filter((function(t){return t})))}o?t.forEach((function(t,e){t&&t.type?C.util.getKlass(t.type,n).fromObject(t,(function(n,a){a||(r[e]=n),i&&i(t,n,a),s()})):s()})):e&&e(r)},enlivenPatterns:function(t,e){function n(){++r===a&&e&&e(i)}var i=[],r=0,a=(t=t||[]).length;a?t.forEach((function(t,e){t&&t.source?new C.Pattern(t,(function(t){i[e]=t,n()})):(i[e]=t,n())})):e&&e(i)},groupSVGElements:function(t,e,n){var i;return t&&1===t.length?t[0]:(e&&(e.width&&e.height?e.centerPoint={x:e.width/2,y:e.height/2}:(delete e.width,delete e.height)),i=new C.Group(t,e),void 0!==n&&(i.sourcePath=n),i)},populateWithProperties:function(t,e,n){if(n&&"[object Array]"===Object.prototype.toString.call(n))for(var i=0,r=n.length;i<r;i++)n[i]in t&&(e[n[i]]=t[n[i]])},drawDashedLine:function(t,e,n,i,o,s){var l=i-e,c=o-n,h=r(l*l+c*c),u=a(c,l),d=s.length,f=0,p=!0;for(t.save(),t.translate(e,n),t.moveTo(0,0),t.rotate(u),e=0;h>e;)(e+=s[f++%d])>h&&(e=h),t[p?"lineTo":"moveTo"](e,0),p=!p;t.restore()},createCanvasElement:function(){return C.document.createElement("canvas")},copyCanvasElement:function(t){var e=C.util.createCanvasElement();return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e},toDataURL:function(t,e,n){return t.toDataURL("image/"+e,n)},createImage:function(){return C.document.createElement("img")},multiplyTransformMatrices:function(t,e,n){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],n?0:t[0]*e[4]+t[2]*e[5]+t[4],n?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var e=a(t[1],t[0]),n=o(t[0],2)+o(t[1],2),i=r(n),l=(t[0]*t[3]-t[2]*t[1])/i,c=a(t[0]*t[2]+t[1]*t[3],n);return{angle:e/s,scaleX:i,scaleY:l,skewX:c/s,skewY:0,translateX:t[4],translateY:t[5]}},calcRotateMatrix:function(t){if(!t.angle)return C.iMatrix.concat();var e=C.util.degreesToRadians(t.angle),n=C.util.cos(e),i=C.util.sin(e);return[n,i,-i,n,0,0]},calcDimensionsMatrix:function(t){var e=void 0===t.scaleX?1:t.scaleX,n=void 0===t.scaleY?1:t.scaleY,i=[t.flipX?-e:e,0,0,t.flipY?-n:n,0,0],r=C.util.multiplyTransformMatrices,a=C.util.degreesToRadians;return t.skewX&&(i=r(i,[1,0,Math.tan(a(t.skewX)),1],!0)),t.skewY&&(i=r(i,[1,Math.tan(a(t.skewY)),0,1],!0)),i},composeMatrix:function(t){var e=[1,0,0,1,t.translateX||0,t.translateY||0],n=C.util.multiplyTransformMatrices;return t.angle&&(e=n(e,C.util.calcRotateMatrix(t))),(1!==t.scaleX||1!==t.scaleY||t.skewX||t.skewY||t.flipX||t.flipY)&&(e=n(e,C.util.calcDimensionsMatrix(t))),e},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.rotate(0)},saveObjectTransform:function(t){return{scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,angle:t.angle,left:t.left,flipX:t.flipX,flipY:t.flipY,top:t.top}},isTransparent:function(t,e,n,i){i>0&&(e>i?e-=i:e=0,n>i?n-=i:n=0);var r,a=!0,o=t.getImageData(e,n,2*i||1,2*i||1),s=o.data.length;for(r=3;r<s&&!1!=(a=o.data[r]<=0);r+=4);return o=null,a},parsePreserveAspectRatioAttribute:function(t){var e,n="meet",i=t.split(" ");return i&&i.length&&("meet"!==(n=i.pop())&&"slice"!==n?(e=n,n="meet"):i.length&&(e=i.pop())),{meetOrSlice:n,alignX:"none"!==e?e.slice(1,4):"none",alignY:"none"!==e?e.slice(5,8):"none"}},clearFabricFontCache:function(t){(t=(t||"").toLowerCase())?C.charWidthsCache[t]&&delete C.charWidthsCache[t]:C.charWidthsCache={}},limitDimsByArea:function(t,e){var n=Math.sqrt(e*t),i=Math.floor(e/n);return{x:Math.floor(n),y:i}},capValue:function(t,e,n){return Math.max(t,Math.min(e,n))},findScaleToFit:function(t,e){return Math.min(e.width/t.width,e.height/t.height)},findScaleToCover:function(t,e){return Math.max(e.width/t.width,e.height/t.height)},matrixToSVG:function(t){return"matrix("+t.map((function(t){return C.util.toFixed(t,C.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"},removeTransformFromObject:function(t,e){var n=C.util.invertTransform(e),i=C.util.multiplyTransformMatrices(n,t.calcOwnMatrix());C.util.applyTransformToObject(t,i)},addTransformToObject:function(t,e){C.util.applyTransformToObject(t,C.util.multiplyTransformMatrices(e,t.calcOwnMatrix()))},applyTransformToObject:function(t,e){var n=C.util.qrDecompose(e),i=new C.Point(n.translateX,n.translateY);t.flipX=!1,t.flipY=!1,t.set("scaleX",n.scaleX),t.set("scaleY",n.scaleY),t.skewX=n.skewX,t.skewY=n.skewY,t.angle=n.angle,t.setPositionByOrigin(i,"center","center")},sizeAfterTransform:function(t,e,n){var i=t/2,r=e/2,a=[{x:-i,y:-r},{x:i,y:-r},{x:-i,y:r},{x:i,y:r}],o=C.util.calcDimensionsMatrix(n),s=C.util.makeBoundingBoxFromPoints(a,o);return{x:s.width,y:s.height}}},function(){var t=Array.prototype.join,e={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},n={m:"l",M:"L"};function i(t,e,n,i,r,a,o,s,l,c,h){var u=C.util.cos(t),d=C.util.sin(t),f=C.util.cos(e),p=C.util.sin(e),g=n*r*f-i*a*p+o,v=i*r*f+n*a*p+s;return["C",c+l*(-n*r*d-i*a*u),h+l*(-i*r*d+n*a*u),g+l*(n*r*p+i*a*f),v+l*(i*r*p-n*a*f),g,v]}function r(t,e,n,r,o,s,l){var c=Math.PI,h=l*c/180,u=C.util.sin(h),d=C.util.cos(h),f=0,p=0,g=-d*t*.5-u*e*.5,v=-d*e*.5+u*t*.5,m=(n=Math.abs(n))*n,y=(r=Math.abs(r))*r,b=v*v,x=g*g,w=m*y-m*b-y*x,_=0;if(w<0){var k=Math.sqrt(1-w/(m*y));n*=k,r*=k}else _=(o===s?-1:1)*Math.sqrt(w/(m*b+y*x));var S=_*n*v/r,T=-_*r*g/n,q=d*S-u*T+.5*t,O=u*S+d*T+.5*e,M=a(1,0,(g-S)/n,(v-T)/r),I=a((g-S)/n,(v-T)/r,(-g-S)/n,(-v-T)/r);0===s&&I>0?I-=2*c:1===s&&I<0&&(I+=2*c);for(var A=Math.ceil(Math.abs(I/c*2)),D=[],E=I/A,L=8/3*Math.sin(E/4)*Math.sin(E/4)/Math.sin(E/2),R=M+E,P=0;P<A;P++)D[P]=i(M,R,d,u,n,r,q,O,L,f,p),f=D[P][5],p=D[P][6],M=R,R+=E;return D}function a(t,e,n,i){var r=Math.atan2(e,t),a=Math.atan2(i,n);return a>=r?a-r:2*Math.PI-(r-a)}function o(e,n,i,r,a,o,s,l){var c;if(C.cachesBoundsOfCurve&&(c=t.call(arguments),C.boundsOfCurveCache[c]))return C.boundsOfCurveCache[c];var h,u,d,f,p,g,v,m,y=Math.sqrt,b=Math.min,x=Math.max,w=Math.abs,_=[],k=[[],[]];u=6*e-12*i+6*a,h=-3*e+9*i-9*a+3*s,d=3*i-3*e;for(var S=0;S<2;++S)if(S>0&&(u=6*n-12*r+6*o,h=-3*n+9*r-9*o+3*l,d=3*r-3*n),w(h)<1e-12){if(w(u)<1e-12)continue;0<(f=-d/u)&&f<1&&_.push(f)}else(v=u*u-4*d*h)<0||(0<(p=(-u+(m=y(v)))/(2*h))&&p<1&&_.push(p),0<(g=(-u-m)/(2*h))&&g<1&&_.push(g));for(var T,q,O,M=_.length,I=M;M--;)T=(O=1-(f=_[M]))*O*O*e+3*O*O*f*i+3*O*f*f*a+f*f*f*s,k[0][M]=T,q=O*O*O*n+3*O*O*f*r+3*O*f*f*o+f*f*f*l,k[1][M]=q;k[0][I]=e,k[1][I]=n,k[0][I+1]=s,k[1][I+1]=l;var A=[{x:b.apply(null,k[0]),y:b.apply(null,k[1])},{x:x.apply(null,k[0]),y:x.apply(null,k[1])}];return C.cachesBoundsOfCurve&&(C.boundsOfCurveCache[c]=A),A}function s(t,e,n){for(var i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=r(n[6]-t,n[7]-e,i,a,s,l,o),h=0,u=c.length;h<u;h++)c[h][1]+=t,c[h][2]+=e,c[h][3]+=t,c[h][4]+=e,c[h][5]+=t,c[h][6]+=e;return c}function l(t,e,n,i){return Math.sqrt((n-t)*(n-t)+(i-e)*(i-e))}function c(t,e,n,i,r,a,o,s){return function(l){var c,h=(c=l)*c*c,u=function(t){return 3*t*t*(1-t)}(l),d=function(t){return 3*t*(1-t)*(1-t)}(l),f=function(t){return(1-t)*(1-t)*(1-t)}(l);return{x:o*h+r*u+n*d+t*f,y:s*h+a*u+i*d+e*f}}}function h(t,e,n,i,r,a,o,s){return function(l){var c=1-l,h=3*c*c*(n-t)+6*c*l*(r-n)+3*l*l*(o-r),u=3*c*c*(i-e)+6*c*l*(a-i)+3*l*l*(s-a);return Math.atan2(u,h)}}function u(t,e,n,i,r,a){return function(o){var s,l=(s=o)*s,c=function(t){return 2*t*(1-t)}(o),h=function(t){return(1-t)*(1-t)}(o);return{x:r*l+n*c+t*h,y:a*l+i*c+e*h}}}function d(t,e,n,i,r,a){return function(o){var s=1-o,l=2*s*(n-t)+2*o*(r-n),c=2*s*(i-e)+2*o*(a-i);return Math.atan2(c,l)}}function f(t,e,n){var i,r,a={x:e,y:n},o=0;for(r=1;r<=100;r+=1)i=t(r/100),o+=l(a.x,a.y,i.x,i.y),a=i;return o}function p(t,e){for(var n,i,r,a=0,o=0,s=t.iterator,c={x:t.x,y:t.y},h=.01,u=t.angleFinder;o<e&&a<=1&&h>1e-4;)n=s(a),r=a,(i=l(c.x,c.y,n.x,n.y))+o>e?a-=h/=2:(c=n,a+=h,o+=i);return n.angle=u(r),n}function g(t){for(var e,n,i,r,a=0,o=t.length,s=0,p=0,g=0,v=0,m=[],y=0;y<o;y++){switch(i={x:s,y:p,command:(e=t[y])[0]},e[0]){case"M":i.length=0,g=s=e[1],v=p=e[2];break;case"L":i.length=l(s,p,e[1],e[2]),s=e[1],p=e[2];break;case"C":n=c(s,p,e[1],e[2],e[3],e[4],e[5],e[6]),r=h(s,p,e[1],e[2],e[3],e[4],e[5],e[6]),i.iterator=n,i.angleFinder=r,i.length=f(n,s,p),s=e[5],p=e[6];break;case"Q":n=u(s,p,e[1],e[2],e[3],e[4]),r=d(s,p,e[1],e[2],e[3],e[4]),i.iterator=n,i.angleFinder=r,i.length=f(n,s,p),s=e[3],p=e[4];break;case"Z":case"z":i.destX=g,i.destY=v,i.length=l(s,p,g,v),s=g,p=v}a+=i.length,m.push(i)}return m.push({length:a,x:s,y:p}),m}C.util.joinPath=function(t){return t.map((function(t){return t.join(" ")})).join(" ")},C.util.parsePath=function(t){var i,r,a,o,s,l=[],c=[],h=C.rePathCommand,u="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",d="("+u+")"+C.commaWsp,f="([01])"+C.commaWsp+"?",p=new RegExp(d+"?"+d+"?"+d+f+f+d+"?("+u+")","g");if(!t||!t.match)return l;for(var g,v=0,m=(s=t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi)).length;v<m;v++){o=(i=s[v]).slice(1).trim(),c.length=0;var y=i.charAt(0);if(g=[y],"a"===y.toLowerCase())for(var b;b=p.exec(o);)for(var x=1;x<b.length;x++)c.push(b[x]);else for(;a=h.exec(o);)c.push(a[0]);x=0;for(var w=c.length;x<w;x++)r=parseFloat(c[x]),isNaN(r)||g.push(r);var _=e[y.toLowerCase()],k=n[y]||y;if(g.length-1>_)for(var S=1,T=g.length;S<T;S+=_)l.push([y].concat(g.slice(S,S+_))),y=k;else l.push(g)}return l},C.util.makePathSimpler=function(t){var e,n,i,r,a,o,l=0,c=0,h=t.length,u=0,d=0,f=[];for(n=0;n<h;++n){switch(i=!1,(e=t[n].slice(0))[0]){case"l":e[0]="L",e[1]+=l,e[2]+=c;case"L":l=e[1],c=e[2];break;case"h":e[1]+=l;case"H":e[0]="L",e[2]=c,l=e[1];break;case"v":e[1]+=c;case"V":e[0]="L",c=e[1],e[1]=l,e[2]=c;break;case"m":e[0]="M",e[1]+=l,e[2]+=c;case"M":l=e[1],c=e[2],u=e[1],d=e[2];break;case"c":e[0]="C",e[1]+=l,e[2]+=c,e[3]+=l,e[4]+=c,e[5]+=l,e[6]+=c;case"C":a=e[3],o=e[4],l=e[5],c=e[6];break;case"s":e[0]="S",e[1]+=l,e[2]+=c,e[3]+=l,e[4]+=c;case"S":"C"===r?(a=2*l-a,o=2*c-o):(a=l,o=c),l=e[3],c=e[4],e[0]="C",e[5]=e[3],e[6]=e[4],e[3]=e[1],e[4]=e[2],e[1]=a,e[2]=o,a=e[3],o=e[4];break;case"q":e[0]="Q",e[1]+=l,e[2]+=c,e[3]+=l,e[4]+=c;case"Q":a=e[1],o=e[2],l=e[3],c=e[4];break;case"t":e[0]="T",e[1]+=l,e[2]+=c;case"T":"Q"===r?(a=2*l-a,o=2*c-o):(a=l,o=c),e[0]="Q",l=e[1],c=e[2],e[1]=a,e[2]=o,e[3]=l,e[4]=c;break;case"a":e[0]="A",e[6]+=l,e[7]+=c;case"A":i=!0,f=f.concat(s(l,c,e)),l=e[6],c=e[7];break;case"z":case"Z":l=u,c=d}i||f.push(e),r=e[0]}return f},C.util.getSmoothPathFromPoints=function(t,e){var n,i=[],r=new C.Point(t[0].x,t[0].y),a=new C.Point(t[1].x,t[1].y),o=t.length,s=1,l=0,c=o>2;for(e=e||0,c&&(s=t[2].x<a.x?-1:t[2].x===a.x?0:1,l=t[2].y<a.y?-1:t[2].y===a.y?0:1),i.push(["M",r.x-s*e,r.y-l*e]),n=1;n<o;n++){if(!r.eq(a)){var h=r.midPointFrom(a);i.push(["Q",r.x,r.y,h.x,h.y])}r=t[n],n+1<t.length&&(a=t[n+1])}return c&&(s=r.x>t[n-2].x?1:r.x===t[n-2].x?0:-1,l=r.y>t[n-2].y?1:r.y===t[n-2].y?0:-1),i.push(["L",r.x+s*e,r.y+l*e]),i},C.util.getPathSegmentsInfo=g,C.util.getBoundsOfCurve=o,C.util.getPointOnPath=function(t,e,n){n||(n=g(t));for(var i=0;e-n[i].length>0&&i<n.length-2;)e-=n[i].length,i++;var r,a=n[i],o=e/a.length,s=a.command,l=t[i];switch(s){case"M":return{x:a.x,y:a.y,angle:0};case"Z":case"z":return(r=new C.Point(a.x,a.y).lerp(new C.Point(a.destX,a.destY),o)).angle=Math.atan2(a.destY-a.y,a.destX-a.x),r;case"L":return(r=new C.Point(a.x,a.y).lerp(new C.Point(l[1],l[2]),o)).angle=Math.atan2(l[2]-a.y,l[1]-a.x),r;case"C":case"Q":return p(a,e)}},C.util.transformPath=function(t,e,n){return n&&(e=C.util.multiplyTransformMatrices(e,[1,0,0,1,-n.x,-n.y])),t.map((function(t){for(var n=t.slice(0),i={},r=1;r<t.length-1;r+=2)i.x=t[r],i.y=t[r+1],i=C.util.transformPoint(i,e),n[r]=i.x,n[r+1]=i.y;return n}))},C.util.fromArcToBeizers=s,C.util.getBoundsOfArc=function(t,e,n,i,a,s,l,c,h){for(var u,d=0,f=0,p=[],g=r(c-t,h-e,n,i,s,l,a),v=0,m=g.length;v<m;v++)u=o(d,f,g[v][1],g[v][2],g[v][3],g[v][4],g[v][5],g[v][6]),p.push({x:u[0].x+t,y:u[0].y+e}),p.push({x:u[1].x+t,y:u[1].y+e}),d=g[v][5],f=g[v][6];return p},C.util.drawArc=function(t,e,n,i){s(e,n,i=i.slice(0).unshift("X")).forEach((function(e){t.bezierCurveTo.apply(t,e.slice(1))}))}}(),function(){var t=Array.prototype.slice;function e(t,e,n){if(t&&0!==t.length){var i=t.length-1,r=e?t[i][e]:t[i];if(e)for(;i--;)n(t[i][e],r)&&(r=t[i][e]);else for(;i--;)n(t[i],r)&&(r=t[i]);return r}}C.util.array={fill:function(t,e){for(var n=t.length;n--;)t[n]=e;return t},invoke:function(e,n){for(var i=t.call(arguments,2),r=[],a=0,o=e.length;a<o;a++)r[a]=i.length?e[a][n].apply(e[a],i):e[a][n].call(e[a]);return r},min:function(t,n){return e(t,n,(function(t,e){return t<e}))},max:function(t,n){return e(t,n,(function(t,e){return t>=e}))}}}(),function(){function t(e,n,i){if(i)if(!C.isLikelyNode&&n instanceof Element)e=n;else if(n instanceof Array){e=[];for(var r=0,a=n.length;r<a;r++)e[r]=t({},n[r],i)}else if(n&&"object"==typeof n)for(var o in n)"canvas"===o||"group"===o?e[o]=null:n.hasOwnProperty(o)&&(e[o]=t({},n[o],i));else e=n;else for(var o in n)e[o]=n[o];return e}C.util.object={extend:t,clone:function(e,n){return t({},e,n)}},C.util.object.extend(C.util,C.Observable)}(),function(){function t(t,e){var n=t.charCodeAt(e);if(isNaN(n))return"";if(n<55296||n>57343)return t.charAt(e);if(55296<=n&&n<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var i=t.charCodeAt(e+1);if(56320>i||i>57343)throw"High surrogate without following low surrogate";return t.charAt(e)+t.charAt(e+1)}if(0===e)throw"Low surrogate without preceding high surrogate";var r=t.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}C.util.string={camelize:function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},capitalize:function(t,e){return t.charAt(0).toUpperCase()+(e?t.slice(1):t.slice(1).toLowerCase())},escapeXml:function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},graphemeSplit:function(e){var n,i=0,r=[];for(i=0;i<e.length;i++)!1!==(n=t(e,i))&&r.push(n);return r}}}(),function(){var t=Array.prototype.slice,e=function(){},n=function(){for(var t in{toString:1})if("toString"===t)return!1;return!0}(),i=function(t,e,i){for(var r in e)r in t.prototype&&"function"==typeof t.prototype[r]&&(e[r]+"").indexOf("callSuper")>-1?t.prototype[r]=function(t){return function(){var n=this.constructor.superclass;this.constructor.superclass=i;var r=e[t].apply(this,arguments);if(this.constructor.superclass=n,"initialize"!==t)return r}}(r):t.prototype[r]=e[r],n&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};function r(){}function a(e){for(var n=null,i=this;i.constructor.superclass;){var r=i.constructor.superclass.prototype[e];if(i[e]!==r){n=r;break}i=i.constructor.superclass.prototype}return n?arguments.length>1?n.apply(this,t.call(arguments,1)):n.call(this):console.log("tried to callSuper "+e+", method not found in prototype chain",this)}C.util.createClass=function(){var n=null,o=t.call(arguments,0);function s(){this.initialize.apply(this,arguments)}"function"==typeof o[0]&&(n=o.shift()),s.superclass=n,s.subclasses=[],n&&(r.prototype=n.prototype,s.prototype=new r,n.subclasses.push(s));for(var l=0,c=o.length;l<c;l++)i(s,o[l],n);return s.prototype.initialize||(s.prototype.initialize=e),s.prototype.constructor=s,s.prototype.callSuper=a,s}}(),c=!!C.document.createElement("div").attachEvent,h=["touchstart","touchmove","touchend"],C.util.addListener=function(t,e,n,i){t&&t.addEventListener(e,n,!c&&i)},C.util.removeListener=function(t,e,n,i){t&&t.removeEventListener(e,n,!c&&i)},C.util.getPointer=function(t){var e=t.target,n=C.util.getScrollLeftTop(e),i=function(t){var e=t.changedTouches;return e&&e[0]?e[0]:t}(t);return{x:i.clientX+n.left,y:i.clientY+n.top}},C.util.isTouchEvent=function(t){return h.indexOf(t.type)>-1||"touch"===t.pointerType},u=C.document.createElement("div"),d="string"==typeof u.style.opacity,f="string"==typeof u.style.filter,p=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,g=function(t){return t},d?g=function(t,e){return t.style.opacity=e,t}:f&&(g=function(t,e){var n=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(n.zoom=1),p.test(n.filter)?(e=e>=.9999?"":"alpha(opacity="+100*e+")",n.filter=n.filter.replace(p,e)):n.filter+=" alpha(opacity="+100*e+")",t}),C.util.setStyle=function(t,e){var n=t.style;if(!n)return t;if("string"==typeof e)return t.style.cssText+=";"+e,e.indexOf("opacity")>-1?g(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var i in e)"opacity"===i?g(t,e[i]):n["float"===i||"cssFloat"===i?void 0===n.styleFloat?"cssFloat":"styleFloat":i]=e[i];return t},function(){var t=Array.prototype.slice;var e,n,i,r,a=function(e){return t.call(e,0)};try{e=a(C.document.childNodes)instanceof Array}catch(t){}function o(t,e){var n=C.document.createElement(t);for(var i in e)"class"===i?n.className=e[i]:"for"===i?n.htmlFor=e[i]:n.setAttribute(i,e[i]);return n}function s(t){for(var e=0,n=0,i=C.document.documentElement,r=C.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&((t=t.parentNode||t.host)===C.document?(e=r.scrollLeft||i.scrollLeft||0,n=r.scrollTop||i.scrollTop||0):(e+=t.scrollLeft||0,n+=t.scrollTop||0),1!==t.nodeType||"fixed"!==t.style.position););return{left:e,top:n}}e||(a=function(t){for(var e=new Array(t.length),n=t.length;n--;)e[n]=t[n];return e}),n=C.document.defaultView&&C.document.defaultView.getComputedStyle?function(t,e){var n=C.document.defaultView.getComputedStyle(t,null);return n?n[e]:void 0}:function(t,e){var n=t.style[e];return!n&&t.currentStyle&&(n=t.currentStyle[e]),n},i=C.document.documentElement.style,r="userSelect"in i?"userSelect":"MozUserSelect"in i?"MozUserSelect":"WebkitUserSelect"in i?"WebkitUserSelect":"KhtmlUserSelect"in i?"KhtmlUserSelect":"",C.util.makeElementUnselectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=C.util.falseFunction),r?t.style[r]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t},C.util.makeElementSelectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=null),r?t.style[r]="":"string"==typeof t.unselectable&&(t.unselectable=""),t},C.util.setImageSmoothing=function(t,e){t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=e},C.util.getById=function(t){return"string"==typeof t?C.document.getElementById(t):t},C.util.toArray=a,C.util.addClass=function(t,e){t&&-1===(" "+t.className+"