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.4 MB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["gridjs-spreadsheet"]=t():e["gridjs-spreadsheet"]=t()}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}([function(e,t,n){"use strict";n.d(t,"p",(function(){return g})),n.d(t,"G",(function(){return v})),n.d(t,"d",(function(){return m})),n.d(t,"I",(function(){return y})),n.d(t,"J",(function(){return b})),n.d(t,"m",(function(){return x})),n.d(t,"i",(function(){return w})),n.d(t,"r",(function(){return _})),n.d(t,"s",(function(){return k})),n.d(t,"K",(function(){return S})),n.d(t,"u",(function(){return C})),n.d(t,"k",(function(){return T})),n.d(t,"H",(function(){return q})),n.d(t,"N",(function(){return O})),n.d(t,"n",(function(){return M})),n.d(t,"o",(function(){return I})),n.d(t,"F",(function(){return A})),n.d(t,"c",(function(){return D})),n.d(t,"h",(function(){return R})),n.d(t,"t",(function(){return E})),n.d(t,"w",(function(){return L})),n.d(t,"C",(function(){return P})),n.d(t,"D",(function(){return j})),n.d(t,"z",(function(){return z})),n.d(t,"A",(function(){return B})),n.d(t,"E",(function(){return N})),n.d(t,"v",(function(){return V})),n.d(t,"x",(function(){return H})),n.d(t,"y",(function(){return W})),n.d(t,"B",(function(){return G})),n.d(t,"l",(function(){return U})),n.d(t,"O",(function(){return X})),n.d(t,"P",(function(){return Y})),n.d(t,"Q",(function(){return Z})),n.d(t,"S",(function(){return K})),n.d(t,"M",(function(){return $})),n.d(t,"b",(function(){return J})),n.d(t,"T",(function(){return Q})),n.d(t,"R",(function(){return ee})),n.d(t,"f",(function(){return ae})),n.d(t,"e",(function(){return oe})),n.d(t,"g",(function(){return se})),n.d(t,"j",(function(){return le})),n.d(t,"q",(function(){return ce})),n.d(t,"L",(function(){return ue})),n.d(t,"a",(function(){return he}));var i=n(17),r=O(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),a=O(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),o=Object.prototype.toString,s=Array.prototype,l=s.forEach,c=s.filter,u=s.slice,h=s.map,d=function(){}.constructor,f=d?d.prototype:null,p=2311;function g(){return p++}function v(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function m(e){if(null==e||"object"!=typeof e)return e;var t=e,n=o.call(e);if("[object Array]"===n){if(!te(e)){t=[];for(var i=0,s=e.length;i<s;i++)t[i]=m(e[i])}}else if(a[n]){if(!te(e)){var l=e.constructor;if(l.from)t=l.from(e);else{t=new l(e.length);for(i=0,s=e.length;i<s;i++)t[i]=e[i]}}}else if(!r[n]&&!te(e)&&!V(e))for(var c in t={},e)e.hasOwnProperty(c)&&"__proto__"!==c&&(t[c]=m(e[c]));return t}function y(e,t,n){if(!B(t)||!B(e))return n?m(t):e;for(var i in t)if(t.hasOwnProperty(i)&&"__proto__"!==i){var r=e[i],a=t[i];!B(a)||!B(r)||E(a)||E(r)||V(a)||V(r)||F(a)||F(r)||te(a)||te(r)?!n&&i in e||(e[i]=m(t[i])):y(r,a,n)}return e}function b(e,t){for(var n=e[0],i=1,r=e.length;i<r;i++)n=y(n,e[i],t);return n}function x(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=t[n]);return e}function w(e,t,n){for(var i=A(t),r=0;r<i.length;r++){var a=i[r];(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}return e}i.d.createCanvas;function _(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1}function k(e,t){var n=e.prototype;function i(){}for(var r in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(r)&&(e.prototype[r]=n[r]);e.prototype.constructor=e,e.superClass=t}function S(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),r=0;r<i.length;r++){var a=i[r];"constructor"!==a&&(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}else w(e,t,n)}function C(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function T(e,t,n){if(e&&t)if(e.forEach&&e.forEach===l)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function q(e,t,n){if(!e)return[];if(!t)return K(e);if(e.map&&e.map===h)return e.map(t,n);for(var i=[],r=0,a=e.length;r<a;r++)i.push(t.call(n,e[r],r,e));return i}function O(e,t,n,i){if(e&&t){for(var r=0,a=e.length;r<a;r++)n=t.call(i,n,e[r],r,e);return n}}function M(e,t,n){if(!e)return[];if(!t)return K(e);if(e.filter&&e.filter===c)return e.filter(t,n);for(var i=[],r=0,a=e.length;r<a;r++)t.call(n,e[r],r,e)&&i.push(e[r]);return i}function I(e,t,n){if(e&&t)for(var i=0,r=e.length;i<r;i++)if(t.call(n,e[i],i,e))return e[i]}function A(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var D=f&&L(f.bind)?f.call.bind(f.bind):function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return e.apply(t,n.concat(u.call(arguments)))}};function R(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(u.call(arguments)))}}function E(e){return Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)}function L(e){return"function"==typeof e}function P(e){return"string"==typeof e}function j(e){return"[object String]"===o.call(e)}function z(e){return"number"==typeof e}function B(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function F(e){return!!r[o.call(e)]}function N(e){return!!a[o.call(e)]}function V(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function H(e){return null!=e.colorStops}function W(e){return null!=e.image}function G(e){return"[object RegExp]"===o.call(e)}function U(e){return e!=e}function X(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e.length;n<i;n++)if(null!=e[n])return e[n]}function Y(e,t){return null!=e?e:t}function Z(e,t,n){return null!=e?e:null!=t?t:n}function K(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u.apply(e,t)}function $(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function J(e,t){if(!e)throw new Error(t)}function Q(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function ee(e){e.__ec_primitive__=!0}function te(e){return e.__ec_primitive__}var ne=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return A(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),ie="function"==typeof Map;var re=function(){function e(t){var n=E(t);this.data=ie?new Map:new ne;var i=this;function r(e,t){n?i.set(e,t):i.set(t,e)}t instanceof e?t.each(r):t&&T(t,r)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach((function(n,i){e.call(t,n,i)}))},e.prototype.keys=function(){var e=this.data.keys();return ie?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function ae(e){return new re(e)}function oe(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var r=e.length;for(i=0;i<t.length;i++)n[i+r]=t[i];return n}function se(e,t){var n;if(Object.create)n=Object.create(e);else{var i=function(){};i.prototype=e,n=new i}return t&&x(n,t),n}function le(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function ce(e,t){return e.hasOwnProperty(t)}function ue(){}var he=180/Math.PI},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var i=n(28);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var i=n(18).default,r=n(11);e.exports=function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var i=n(23),r=n(32),a=n(22),o=n(25);e.exports=function(e,t){return i(e)||r(e,t)||a(e,t)||o()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var i=n(34),r=n(26),a=n(22),o=n(35);e.exports=function(e){return i(e)||r(e)||a(e)||o()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(33)},function(e,t,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?(r.node=!0,r.svgSupported=!0):function(e,t){var n=t.browser,i=e.match(/Firefox\/([\d.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);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);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r),t.a=r},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"g",(function(){return v})),n.d(t,"c",(function(){return y})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return x})),n.d(t,"f",(function(){return w})),n.d(t,"e",(function(){return _})),n.d(t,"h",(function(){return k})),n.d(t,"d",(function(){return S}));var i=n(19),r={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 a(e){return(e=Math.round(e))<0?0:e>255?255:e}function o(e){return e<0?0:e>1?1:e}function s(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?a(parseFloat(t)/100*255):a(parseInt(t,10))}function l(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?o(parseFloat(t)/100):o(parseFloat(t))}function c(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function u(e,t,n){return e+(t-e)*n}function h(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var f=new i.a(20),p=null;function g(e,t){p&&d(p,t),p=f.put(e,p||t.slice())}function v(e,t){if(e){t=t||[];var n=f.get(e);if(n)return d(t,n);var i=(e+="").replace(/ /g,"").toLowerCase();if(i in r)return d(t,r[i]),g(e,t),t;var a,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(a=parseInt(i.slice(1,4),16))>=0&&a<=4095?(h(t,(3840&a)>>4|(3840&a)>>8,240&a|(240&a)>>4,15&a|(15&a)<<4,5===o?parseInt(i.slice(4),16)/15:1),g(e,t),t):void h(t,0,0,0,1):7===o||9===o?(a=parseInt(i.slice(1,7),16))>=0&&a<=16777215?(h(t,(16711680&a)>>16,(65280&a)>>8,255&a,9===o?parseInt(i.slice(7),16)/255:1),g(e,t),t):void h(t,0,0,0,1):void 0;var c=i.indexOf("("),u=i.indexOf(")");if(-1!==c&&u+1===o){var p=i.substr(0,c),v=i.substr(c+1,u-(c+1)).split(","),y=1;switch(p){case"rgba":if(4!==v.length)return 3===v.length?h(t,+v[0],+v[1],+v[2],1):h(t,0,0,0,1);y=l(v.pop());case"rgb":return v.length>=3?(h(t,s(v[0]),s(v[1]),s(v[2]),3===v.length?y:l(v[3])),g(e,t),t):void h(t,0,0,0,1);case"hsla":return 4!==v.length?void h(t,0,0,0,1):(v[3]=l(v[3]),m(v,t),g(e,t),t);case"hsl":return 3!==v.length?void h(t,0,0,0,1):(m(v,t),g(e,t),t);default:return}}h(t,0,0,0,1)}}function m(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=l(e[1]),r=l(e[2]),o=r<=.5?r*(i+1):r+i-r*i,s=2*r-o;return h(t=t||[],a(255*c(s,o,n+1/3)),a(255*c(s,o,n)),a(255*c(s,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function y(e,t){var n=v(e);if(n){for(var i=0;i<3;i++)n[i]=t<0?n[i]*(1-t)|0:(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return k(n,4===n.length?"rgba":"rgb")}}function b(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i=e*(t.length-1),r=Math.floor(i),s=Math.ceil(i),l=t[r],c=t[s],h=i-r;return n[0]=a(u(l[0],c[0],h)),n[1]=a(u(l[1],c[1],h)),n[2]=a(u(l[2],c[2],h)),n[3]=o(u(l[3],c[3],h)),n}}function x(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),r=Math.floor(i),s=Math.ceil(i),l=v(t[r]),c=v(t[s]),h=i-r,d=k([a(u(l[0],c[0],h)),a(u(l[1],c[1],h)),a(u(l[2],c[2],h)),o(u(l[3],c[3],h))],"rgba");return n?{color:d,leftIndex:r,rightIndex:s,value:i}:d}}function w(e,t,n,i){var r,a=v(e);if(e)return a=function(e){if(e){var t,n,i=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,c=(s+o)/2;if(0===l)t=0,n=0;else{n=c<.5?l/(s+o):l/(2-s-o);var u=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?t=d-h:r===s?t=1/3+u-d:a===s&&(t=2/3+h-u),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,c];return null!=e[3]&&f.push(e[3]),f}}(a),null!=t&&(a[0]=(r=t,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(a[1]=l(n)),null!=i&&(a[2]=l(i)),k(m(a),"rgba")}function _(e,t){var n=v(e);if(n&&null!=t)return n[3]=o(t),k(n,"rgba")}function k(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function S(e,t){var n=v(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}},function(e,t,n){"use strict";(function(e){n.d(t,"p",(function(){return s})),n.d(t,"j",(function(){return l})),n.d(t,"q",(function(){return u})),n.d(t,"e",(function(){return h})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"i",(function(){return p})),n.d(t,"h",(function(){return g})),n.d(t,"l",(function(){return v})),n.d(t,"n",(function(){return m})),n.d(t,"m",(function(){return y})),n.d(t,"o",(function(){return b})),n.d(t,"k",(function(){return x})),n.d(t,"d",(function(){return w})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return k})),n.d(t,"c",(function(){return S}));var i=n(0),r=n(12),a=n(10),o=Math.round;function s(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=Object(r.g)(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}function l(e){return e<1e-4&&e>-1e-4}function c(e){return o(1e3*e)/1e3}function u(e){return o(1e4*e)/1e4}function h(e){return"matrix("+c(e[0])+","+c(e[1])+","+c(e[2])+","+c(e[3])+","+u(e[4])+","+u(e[5])+")"}var d={left:"start",right:"end",center:"middle",middle:"middle"};function f(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}function p(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function g(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}function v(e){return e&&!!e.image}function m(e){return v(e)||function(e){return e&&!!e.svgElement}(e)}function y(e){return"linear"===e.type}function b(e){return"radial"===e.type}function x(e){return e&&("linear"===e.type||"radial"===e.type)}function w(e){return"url(#"+e+")"}function _(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function k(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*i.a,a=Object(i.P)(e.scaleX,1),s=Object(i.P)(e.scaleY,1),l=e.skewX||0,c=e.skewY||0,u=[];return(t||n)&&u.push("translate("+t+"px,"+n+"px)"),r&&u.push("rotate("+r+")"),1===a&&1===s||u.push("scale("+a+","+s+")"),(l||c)&&u.push("skew("+o(l*i.a)+"deg, "+o(c*i.a)+"deg)"),u.join(" ")}var S=a.a.hasGlobalWindow&&Object(i.w)(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:void 0!==e?function(t){return e.from(t).toString("base64")}:function(e){return null}}).call(this,n(29).Buffer)},function(e,t,n){(function(e){
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var i,r,a,o,s,l,c,u,h,d,f,p,g,v,m,y,b,x,w,_,k,S,C=C||{version:"4.6.0"};if(t.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(42).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(43).implForWrapper,C.nodeCanvas=n(44).Canvas,C.window=T,DOMParser=C.window.DOMParser}function q(e,t){var n=e.canvas,i=t.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(e,t){var n=t.targetCanvas.getContext("2d"),i=t.destinationWidth,r=t.destinationHeight,a=i*r*4,o=new Uint8Array(this.imageBuffer,0,a),s=new Uint8ClampedArray(this.imageBuffer,0,a);e.readPixels(0,0,i,r,e.RGBA,e.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!==e&&"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 e(e,t){if(this.__eventListeners[e]){var n=this.__eventListeners[e];t?n[n.indexOf(t)]=!1:C.util.array.fill(n,!1)}}function t(e,t){var n=function(){t.apply(this,arguments),this.off(e,n)}.bind(this);this.on(e,n)}C.Observable={fire:function(e,t){if(!this.__eventListeners)return this;var n=this.__eventListeners[e];if(!n)return this;for(var i=0,r=n.length;i<r;i++)n[i]&&n[i].call(this,t||{});return this.__eventListeners[e]=n.filter((function(e){return!1!==e})),this},on:function(e,t){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var n in e)this.on(n,e[n]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(t);return this},once:function(e,n){if(1===arguments.length)for(var i in e)t.call(this,i,e[i]);else t.call(this,e,n);return this},off:function(t,n){if(!this.__eventListeners)return this;if(0===arguments.length)for(t in this.__eventListeners)e.call(this,t);else if(1===arguments.length&&"object"==typeof arguments[0])for(var i in t)e.call(this,i,t[i]);else e.call(this,t,n);return this}}}(),C.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var e=0,t=arguments.length;e<t;e++)this._onObjectAdded(arguments[e]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(e,t,n){var i=this._objects;return n?i[t]=e:i.splice(t,0,e),this._onObjectAdded&&this._onObjectAdded(e),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var e,t=this._objects,n=!1,i=0,r=arguments.length;i<r;i++)-1!==(e=t.indexOf(arguments[i]))&&(n=!0,t.splice(e,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[i]));return this.renderOnAddRemove&&n&&this.requestRenderAll(),this},forEachObject:function(e,t){for(var n=this.getObjects(),i=0,r=n.length;i<r;i++)e.call(t,n[i],i,n);return this},getObjects:function(e){return void 0===e?this._objects.concat():this._objects.filter((function(t){return t.type===e}))},item:function(e){return this._objects[e]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(e,t){return this._objects.indexOf(e)>-1||!!t&&this._objects.some((function(t){return"function"==typeof t.contains&&t.contains(e,!0)}))},complexity:function(){return this._objects.reduce((function(e,t){return e+=t.complexity?t.complexity():0}),0)}},C.CommonMethods={_setOptions:function(e){for(var t in e)this.set(t,e[t])},_initGradient:function(e,t){!e||!e.colorStops||e instanceof C.Gradient||this.set(t,new C.Gradient(e))},_initPattern:function(e,t,n){!e||!e.source||e instanceof C.Pattern?n&&n():this.set(t,new C.Pattern(e,n))},_setObject:function(e){for(var t in e)this._set(t,e[t])},set:function(e,t){return"object"==typeof e?this._setObject(e):this._set(e,t),this},_set:function(e,t){this[e]=t},toggle:function(e){var t=this.get(e);return"boolean"==typeof t&&this.set(e,!t),this},get:function(e){return this[e]}},i=t,r=Math.sqrt,a=Math.atan2,o=Math.pow,s=Math.PI/180,l=Math.PI/2,C.util={cos:function(e){if(0===e)return 1;switch(e<0&&(e=-e),e/l){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(0===e)return 0;var t=1;switch(e<0&&(t=-1),e/l){case 1:return t;case 2:return 0;case 3:return-t}return Math.sin(e)},removeFromArray:function(e,t){var n=e.indexOf(t);return-1!==n&&e.splice(n,1),e},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},degreesToRadians:function(e){return e*s},radiansToDegrees:function(e){return e/s},rotatePoint:function(e,t,n){var i=new C.Point(e.x-t.x,e.y-t.y),r=C.util.rotateVector(i,n);return new C.Point(r.x,r.y).addEquals(t)},rotateVector:function(e,t){var n=C.util.sin(t),i=C.util.cos(t);return{x:e.x*i-e.y*n,y:e.x*n+e.y*i}},transformPoint:function(e,t,n){return n?new C.Point(t[0]*e.x+t[2]*e.y,t[1]*e.x+t[3]*e.y):new C.Point(t[0]*e.x+t[2]*e.y+t[4],t[1]*e.x+t[3]*e.y+t[5])},makeBoundingBoxFromPoints:function(e,t){if(t)for(var n=0;n<e.length;n++)e[n]=C.util.transformPoint(e[n],t);var i=[e[0].x,e[1].x,e[2].x,e[3].x],r=C.util.array.min(i),a=C.util.array.max(i)-r,o=[e[0].y,e[1].y,e[2].y,e[3].y],s=C.util.array.min(o);return{left:r,top:s,width:a,height:C.util.array.max(o)-s}},invertTransform:function(e){var t=1/(e[0]*e[3]-e[1]*e[2]),n=[t*e[3],-t*e[1],-t*e[2],t*e[0]],i=C.util.transformPoint({x:e[4],y:e[5]},n,!0);return n[4]=-i.x,n[5]=-i.y,n},toFixed:function(e,t){return parseFloat(Number(e).toFixed(t))},parseUnit:function(e,t){var n=/\D{0,2}$/.exec(e),i=parseFloat(e);switch(t||(t=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*t;default:return i}},falseFunction:function(){return!1},getKlass:function(e,t){return e=C.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),C.util.resolveNamespace(t)[e]},getSvgAttributes:function(e){var t=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":t=t.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":t=t.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":t=t.concat(["offset","stop-color","stop-opacity"])}return t},resolveNamespace:function(e){if(!e)return C;var t,n=e.split("."),r=n.length,a=i||C.window;for(t=0;t<r;++t)a=a[n[t]];return a},loadImage:function(e,t,n,i){if(e){var r=C.util.createImage(),a=function(){t&&t.call(n,r,!1),r=r.onload=r.onerror=null};r.onload=a,r.onerror=function(){C.log("Error loading "+r.src),t&&t.call(n,null,!0),r=r.onload=r.onerror=null},0!==e.indexOf("data")&&null!=i&&(r.crossOrigin=i),"data:image/svg"===e.substring(0,14)&&(r.onload=null,C.util.loadImageInDom(r,a)),r.src=e}else t&&t.call(n,e)},loadImageInDom:function(e,t){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(e),C.document.querySelector("body").appendChild(n),e.onload=function(){t(),n.parentNode.removeChild(n),n=null}},enlivenObjects:function(e,t,n,i){var r=[],a=0,o=(e=e||[]).length;function s(){++a===o&&t&&t(r.filter((function(e){return e})))}o?e.forEach((function(e,t){e&&e.type?C.util.getKlass(e.type,n).fromObject(e,(function(n,a){a||(r[t]=n),i&&i(e,n,a),s()})):s()})):t&&t(r)},enlivenPatterns:function(e,t){function n(){++r===a&&t&&t(i)}var i=[],r=0,a=(e=e||[]).length;a?e.forEach((function(e,t){e&&e.source?new C.Pattern(e,(function(e){i[t]=e,n()})):(i[t]=e,n())})):t&&t(i)},groupSVGElements:function(e,t,n){var i;return e&&1===e.length?e[0]:(t&&(t.width&&t.height?t.centerPoint={x:t.width/2,y:t.height/2}:(delete t.width,delete t.height)),i=new C.Group(e,t),void 0!==n&&(i.sourcePath=n),i)},populateWithProperties:function(e,t,n){if(n&&"[object Array]"===Object.prototype.toString.call(n))for(var i=0,r=n.length;i<r;i++)n[i]in e&&(t[n[i]]=e[n[i]])},drawDashedLine:function(e,t,n,i,o,s){var l=i-t,c=o-n,u=r(l*l+c*c),h=a(c,l),d=s.length,f=0,p=!0;for(e.save(),e.translate(t,n),e.moveTo(0,0),e.rotate(h),t=0;u>t;)(t+=s[f++%d])>u&&(t=u),e[p?"lineTo":"moveTo"](t,0),p=!p;e.restore()},createCanvasElement:function(){return C.document.createElement("canvas")},copyCanvasElement:function(e){var t=C.util.createCanvasElement();return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t},toDataURL:function(e,t,n){return e.toDataURL("image/"+t,n)},createImage:function(){return C.document.createElement("img")},multiplyTransformMatrices:function(e,t,n){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],n?0:e[0]*t[4]+e[2]*t[5]+e[4],n?0:e[1]*t[4]+e[3]*t[5]+e[5]]},qrDecompose:function(e){var t=a(e[1],e[0]),n=o(e[0],2)+o(e[1],2),i=r(n),l=(e[0]*e[3]-e[2]*e[1])/i,c=a(e[0]*e[2]+e[1]*e[3],n);return{angle:t/s,scaleX:i,scaleY:l,skewX:c/s,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return C.iMatrix.concat();var t=C.util.degreesToRadians(e.angle),n=C.util.cos(t),i=C.util.sin(t);return[n,i,-i,n,0,0]},calcDimensionsMatrix:function(e){var t=void 0===e.scaleX?1:e.scaleX,n=void 0===e.scaleY?1:e.scaleY,i=[e.flipX?-t:t,0,0,e.flipY?-n:n,0,0],r=C.util.multiplyTransformMatrices,a=C.util.degreesToRadians;return e.skewX&&(i=r(i,[1,0,Math.tan(a(e.skewX)),1],!0)),e.skewY&&(i=r(i,[1,Math.tan(a(e.skewY)),0,1],!0)),i},composeMatrix:function(e){var t=[1,0,0,1,e.translateX||0,e.translateY||0],n=C.util.multiplyTransformMatrices;return e.angle&&(t=n(t,C.util.calcRotateMatrix(e))),(1!==e.scaleX||1!==e.scaleY||e.skewX||e.skewY||e.flipX||e.flipY)&&(t=n(t,C.util.calcDimensionsMatrix(e))),t},resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},isTransparent:function(e,t,n,i){i>0&&(t>i?t-=i:t=0,n>i?n-=i:n=0);var r,a=!0,o=e.getImageData(t,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(e){var t,n="meet",i=e.split(" ");return i&&i.length&&("meet"!==(n=i.pop())&&"slice"!==n?(t=n,n="meet"):i.length&&(t=i.pop())),{meetOrSlice:n,alignX:"none"!==t?t.slice(1,4):"none",alignY:"none"!==t?t.slice(5,8):"none"}},clearFabricFontCache:function(e){(e=(e||"").toLowerCase())?C.charWidthsCache[e]&&delete C.charWidthsCache[e]:C.charWidthsCache={}},limitDimsByArea:function(e,t){var n=Math.sqrt(t*e),i=Math.floor(t/n);return{x:Math.floor(n),y:i}},capValue:function(e,t,n){return Math.max(e,Math.min(t,n))},findScaleToFit:function(e,t){return Math.min(t.width/e.width,t.height/e.height)},findScaleToCover:function(e,t){return Math.max(t.width/e.width,t.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map((function(e){return C.util.toFixed(e,C.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"},removeTransformFromObject:function(e,t){var n=C.util.invertTransform(t),i=C.util.multiplyTransformMatrices(n,e.calcOwnMatrix());C.util.applyTransformToObject(e,i)},addTransformToObject:function(e,t){C.util.applyTransformToObject(e,C.util.multiplyTransformMatrices(t,e.calcOwnMatrix()))},applyTransformToObject:function(e,t){var n=C.util.qrDecompose(t),i=new C.Point(n.translateX,n.translateY);e.flipX=!1,e.flipY=!1,e.set("scaleX",n.scaleX),e.set("scaleY",n.scaleY),e.skewX=n.skewX,e.skewY=n.skewY,e.angle=n.angle,e.setPositionByOrigin(i,"center","center")},sizeAfterTransform:function(e,t,n){var i=e/2,r=t/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 e=Array.prototype.join,t={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(e,t,n,i,r,a,o,s,l,c,u){var h=C.util.cos(e),d=C.util.sin(e),f=C.util.cos(t),p=C.util.sin(t),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*h),u+l*(-i*r*d+n*a*h),g+l*(n*r*p+i*a*f),v+l*(i*r*p-n*a*f),g,v]}function r(e,t,n,r,o,s,l){var c=Math.PI,u=l*c/180,h=C.util.sin(u),d=C.util.cos(u),f=0,p=0,g=-d*e*.5-h*t*.5,v=-d*t*.5+h*e*.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-h*T+.5*e,O=h*S+d*T+.5*t,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=[],R=I/A,E=8/3*Math.sin(R/4)*Math.sin(R/4)/Math.sin(R/2),L=M+R,P=0;P<A;P++)D[P]=i(M,L,d,h,n,r,q,O,E,f,p),f=D[P][5],p=D[P][6],M=L,L+=R;return D}function a(e,t,n,i){var r=Math.atan2(t,e),a=Math.atan2(i,n);return a>=r?a-r:2*Math.PI-(r-a)}function o(t,n,i,r,a,o,s,l){var c;if(C.cachesBoundsOfCurve&&(c=e.call(arguments),C.boundsOfCurveCache[c]))return C.boundsOfCurveCache[c];var u,h,d,f,p,g,v,m,y=Math.sqrt,b=Math.min,x=Math.max,w=Math.abs,_=[],k=[[],[]];h=6*t-12*i+6*a,u=-3*t+9*i-9*a+3*s,d=3*i-3*t;for(var S=0;S<2;++S)if(S>0&&(h=6*n-12*r+6*o,u=-3*n+9*r-9*o+3*l,d=3*r-3*n),w(u)<1e-12){if(w(h)<1e-12)continue;0<(f=-d/h)&&f<1&&_.push(f)}else(v=h*h-4*d*u)<0||(0<(p=(-h+(m=y(v)))/(2*u))&&p<1&&_.push(p),0<(g=(-h-m)/(2*u))&&g<1&&_.push(g));for(var T,q,O,M=_.length,I=M;M--;)T=(O=1-(f=_[M]))*O*O*t+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]=t,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(e,t,n){for(var i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=r(n[6]-e,n[7]-t,i,a,s,l,o),u=0,h=c.length;u<h;u++)c[u][1]+=e,c[u][2]+=t,c[u][3]+=e,c[u][4]+=t,c[u][5]+=e,c[u][6]+=t;return c}function l(e,t,n,i){return Math.sqrt((n-e)*(n-e)+(i-t)*(i-t))}function c(e,t,n,i,r,a,o,s){return function(l){var c,u=(c=l)*c*c,h=function(e){return 3*e*e*(1-e)}(l),d=function(e){return 3*e*(1-e)*(1-e)}(l),f=function(e){return(1-e)*(1-e)*(1-e)}(l);return{x:o*u+r*h+n*d+e*f,y:s*u+a*h+i*d+t*f}}}function u(e,t,n,i,r,a,o,s){return function(l){var c=1-l,u=3*c*c*(n-e)+6*c*l*(r-n)+3*l*l*(o-r),h=3*c*c*(i-t)+6*c*l*(a-i)+3*l*l*(s-a);return Math.atan2(h,u)}}function h(e,t,n,i,r,a){return function(o){var s,l=(s=o)*s,c=function(e){return 2*e*(1-e)}(o),u=function(e){return(1-e)*(1-e)}(o);return{x:r*l+n*c+e*u,y:a*l+i*c+t*u}}}function d(e,t,n,i,r,a){return function(o){var s=1-o,l=2*s*(n-e)+2*o*(r-n),c=2*s*(i-t)+2*o*(a-i);return Math.atan2(c,l)}}function f(e,t,n){var i,r,a={x:t,y:n},o=0;for(r=1;r<=100;r+=1)i=e(r/100),o+=l(a.x,a.y,i.x,i.y),a=i;return o}function p(e,t){for(var n,i,r,a=0,o=0,s=e.iterator,c={x:e.x,y:e.y},u=.01,h=e.angleFinder;o<t&&a<=1&&u>1e-4;)n=s(a),r=a,(i=l(c.x,c.y,n.x,n.y))+o>t?a-=u/=2:(c=n,a+=u,o+=i);return n.angle=h(r),n}function g(e){for(var t,n,i,r,a=0,o=e.length,s=0,p=0,g=0,v=0,m=[],y=0;y<o;y++){switch(i={x:s,y:p,command:(t=e[y])[0]},t[0]){case"M":i.length=0,g=s=t[1],v=p=t[2];break;case"L":i.length=l(s,p,t[1],t[2]),s=t[1],p=t[2];break;case"C":n=c(s,p,t[1],t[2],t[3],t[4],t[5],t[6]),r=u(s,p,t[1],t[2],t[3],t[4],t[5],t[6]),i.iterator=n,i.angleFinder=r,i.length=f(n,s,p),s=t[5],p=t[6];break;case"Q":n=h(s,p,t[1],t[2],t[3],t[4]),r=d(s,p,t[1],t[2],t[3],t[4]),i.iterator=n,i.angleFinder=r,i.length=f(n,s,p),s=t[3],p=t[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(e){return e.map((function(e){return e.join(" ")})).join(" ")},C.util.parsePath=function(e){var i,r,a,o,s,l=[],c=[],u=C.rePathCommand,h="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",d="("+h+")"+C.commaWsp,f="([01])"+C.commaWsp+"?",p=new RegExp(d+"?"+d+"?"+d+f+f+d+"?("+h+")","g");if(!e||!e.match)return l;for(var g,v=0,m=(s=e.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=u.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 _=t[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(e){var t,n,i,r,a,o,l=0,c=0,u=e.length,h=0,d=0,f=[];for(n=0;n<u;++n){switch(i=!1,(t=e[n].slice(0))[0]){case"l":t[0]="L",t[1]+=l,t[2]+=c;case"L":l=t[1],c=t[2];break;case"h":t[1]+=l;case"H":t[0]="L",t[2]=c,l=t[1];break;case"v":t[1]+=c;case"V":t[0]="L",c=t[1],t[1]=l,t[2]=c;break;case"m":t[0]="M",t[1]+=l,t[2]+=c;case"M":l=t[1],c=t[2],h=t[1],d=t[2];break;case"c":t[0]="C",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c,t[5]+=l,t[6]+=c;case"C":a=t[3],o=t[4],l=t[5],c=t[6];break;case"s":t[0]="S",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"S":"C"===r?(a=2*l-a,o=2*c-o):(a=l,o=c),l=t[3],c=t[4],t[0]="C",t[5]=t[3],t[6]=t[4],t[3]=t[1],t[4]=t[2],t[1]=a,t[2]=o,a=t[3],o=t[4];break;case"q":t[0]="Q",t[1]+=l,t[2]+=c,t[3]+=l,t[4]+=c;case"Q":a=t[1],o=t[2],l=t[3],c=t[4];break;case"t":t[0]="T",t[1]+=l,t[2]+=c;case"T":"Q"===r?(a=2*l-a,o=2*c-o):(a=l,o=c),t[0]="Q",l=t[1],c=t[2],t[1]=a,t[2]=o,t[3]=l,t[4]=c;break;case"a":t[0]="A",t[6]+=l,t[7]+=c;case"A":i=!0,f=f.concat(s(l,c,t)),l=t[6],c=t[7];break;case"z":case"Z":l=h,c=d}i||f.push(t),r=t[0]}return f},C.util.getSmoothPathFromPoints=function(e,t){var n,i=[],r=new C.Point(e[0].x,e[0].y),a=new C.Point(e[1].x,e[1].y),o=e.length,s=1,l=0,c=o>2;for(t=t||0,c&&(s=e[2].x<a.x?-1:e[2].x===a.x?0:1,l=e[2].y<a.y?-1:e[2].y===a.y?0:1),i.push(["M",r.x-s*t,r.y-l*t]),n=1;n<o;n++){if(!r.eq(a)){var u=r.midPointFrom(a);i.push(["Q",r.x,r.y,u.x,u.y])}r=e[n],n+1<e.length&&(a=e[n+1])}return c&&(s=r.x>e[n-2].x?1:r.x===e[n-2].x?0:-1,l=r.y>e[n-2].y?1:r.y===e[n-2].y?0:-1),i.push(["L",r.x+s*t,r.y+l*t]),i},C.util.getPathSegmentsInfo=g,C.util.getBoundsOfCurve=o,C.util.getPointOnPath=function(e,t,n){n||(n=g(e));for(var i=0;t-n[i].length>0&&i<n.length-2;)t-=n[i].length,i++;var r,a=n[i],o=t/a.length,s=a.command,l=e[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,t)}},C.util.transformPath=function(e,t,n){return n&&(t=C.util.multiplyTransformMatrices(t,[1,0,0,1,-n.x,-n.y])),e.map((function(e){for(var n=e.slice(0),i={},r=1;r<e.length-1;r+=2)i.x=e[r],i.y=e[r+1],i=C.util.transformPoint(i,t),n[r]=i.x,n[r+1]=i.y;return n}))},C.util.fromArcToBeizers=s,C.util.getBoundsOfArc=function(e,t,n,i,a,s,l,c,u){for(var h,d=0,f=0,p=[],g=r(c-e,u-t,n,i,s,l,a),v=0,m=g.length;v<m;v++)h=o(d,f,g[v][1],g[v][2],g[v][3],g[v][4],g[v][5],g[v][6]),p.push({x:h[0].x+e,y:h[0].y+t}),p.push({x:h[1].x+e,y:h[1].y+t}),d=g[v][5],f=g[v][6];return p},C.util.drawArc=function(e,t,n,i){s(t,n,i=i.slice(0).unshift("X")).forEach((function(t){e.bezierCurveTo.apply(e,t.slice(1))}))}}(),function(){var e=Array.prototype.slice;function t(e,t,n){if(e&&0!==e.length){var i=e.length-1,r=t?e[i][t]:e[i];if(t)for(;i--;)n(e[i][t],r)&&(r=e[i][t]);else for(;i--;)n(e[i],r)&&(r=e[i]);return r}}C.util.array={fill:function(e,t){for(var n=e.length;n--;)e[n]=t;return e},invoke:function(t,n){for(var i=e.call(arguments,2),r=[],a=0,o=t.length;a<o;a++)r[a]=i.length?t[a][n].apply(t[a],i):t[a][n].call(t[a]);return r},min:function(e,n){return t(e,n,(function(e,t){return e<t}))},max:function(e,n){return t(e,n,(function(e,t){return e>=t}))}}}(),function(){function e(t,n,i){if(i)if(!C.isLikelyNode&&n instanceof Element)t=n;else if(n instanceof Array){t=[];for(var r=0,a=n.length;r<a;r++)t[r]=e({},n[r],i)}else if(n&&"object"==typeof n)for(var o in n)"canvas"===o||"group"===o?t[o]=null:n.hasOwnProperty(o)&&(t[o]=e({},n[o],i));else t=n;else for(var o in n)t[o]=n[o];return t}C.util.object={extend:e,clone:function(t,n){return e({},t,n)}},C.util.object.extend(C.util,C.Observable)}(),function(){function e(e,t){var n=e.charCodeAt(t);if(isNaN(n))return"";if(n<55296||n>57343)return e.charAt(t);if(55296<=n&&n<=56319){if(e.length<=t+1)throw"High surrogate without following low surrogate";var i=e.charCodeAt(t+1);if(56320>i||i>57343)throw"High surrogate without following low surrogate";return e.charAt(t)+e.charAt(t+1)}if(0===t)throw"Low surrogate without preceding high surrogate";var r=e.charCodeAt(t-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}C.util.string={camelize:function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},escapeXml:function(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},graphemeSplit:function(t){var n,i=0,r=[];for(i=0;i<t.length;i++)!1!==(n=e(t,i))&&r.push(n);return r}}}(),function(){var e=Array.prototype.slice,t=function(){},n=function(){for(var e in{toString:1})if("toString"===e)return!1;return!0}(),i=function(e,t,i){for(var r in t)r in e.prototype&&"function"==typeof e.prototype[r]&&(t[r]+"").indexOf("callSuper")>-1?e.prototype[r]=function(e){return function(){var n=this.constructor.superclass;this.constructor.superclass=i;var r=t[e].apply(this,arguments);if(this.constructor.superclass=n,"initialize"!==e)return r}}(r):e.prototype[r]=t[r],n&&(t.toString!==Object.prototype.toString&&(e.prototype.toString=t.toString),t.valueOf!==Object.prototype.valueOf&&(e.prototype.valueOf=t.valueOf))};function r(){}function a(t){for(var n=null,i=this;i.constructor.superclass;){var r=i.constructor.superclass.prototype[t];if(i[t]!==r){n=r;break}i=i.constructor.superclass.prototype}return n?arguments.length>1?n.apply(this,e.call(arguments,1)):n.call(this):console.log("tried to callSuper "+t+", method not found in prototype chain",this)}C.util.createClass=function(){var n=null,o=e.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=t),s.prototype.constructor=s,s.prototype.callSuper=a,s}}(),c=!!C.document.createElement("div").attachEvent,u=["touchstart","touchmove","touchend"],C.util.addListener=function(e,t,n,i){e&&e.addEventListener(t,n,!c&&i)},C.util.removeListener=function(e,t,n,i){e&&e.removeEventListener(t,n,!c&&i)},C.util.getPointer=function(e){var t=e.target,n=C.util.getScrollLeftTop(t),i=function(e){var t=e.changedTouches;return t&&t[0]?t[0]:e}(e);return{x:i.clientX+n.left,y:i.clientY+n.top}},C.util.isTouchEvent=function(e){return u.indexOf(e.type)>-1||"touch"===e.pointerType},h=C.document.createElement("div"),d="string"==typeof h.style.opacity,f="string"==typeof h.style.filter,p=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,g=function(e){return e},d?g=function(e,t){return e.style.opacity=t,e}:f&&(g=function(e,t){var n=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(n.zoom=1),p.test(n.filter)?(t=t>=.9999?"":"alpha(opacity="+100*t+")",n.filter=n.filter.replace(p,t)):n.filter+=" alpha(opacity="+100*t+")",e}),C.util.setStyle=function(e,t){var n=e.style;if(!n)return e;if("string"==typeof t)return e.style.cssText+=";"+t,t.indexOf("opacity")>-1?g(e,t.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var i in t)"opacity"===i?g(e,t[i]):n["float"===i||"cssFloat"===i?void 0===n.styleFloat?"cssFloat":"styleFloat":i]=t[i];return e},function(){var e=Array.prototype.slice;var t,n,i,r,a=function(t){return e.call(t,0)};try{t=a(C.document.childNodes)instanceof Array}catch(e){}function o(e,t){var n=C.document.createElement(e);for(var i in t)"class"===i?n.className=t[i]:"for"===i?n.htmlFor=t[i]:n.setAttribute(i,t[i]);return n}function s(e){for(var t=0,n=0,i=C.document.documentElement,r=C.document.body||{scrollLeft:0,scrollTop:0};e&&(e.parentNode||e.host)&&((e=e.parentNode||e.host)===C.document?(t=r.scrollLeft||i.scrollLeft||0,n=r.scrollTop||i.scrollTop||0):(t+=e.scrollLeft||0,n+=e.scrollTop||0),1!==e.nodeType||"fixed"!==e.style.position););return{left:t,top:n}}t||(a=function(e){for(var t=new Array(e.length),n=e.length;n--;)t[n]=e[n];return t}),n=C.document.defaultView&&C.document.defaultView.getComputedStyle?function(e,t){var n=C.document.defaultView.getComputedStyle(e,null);return n?n[t]:void 0}:function(e,t){var n=e.style[t];return!n&&e.currentStyle&&(n=e.currentStyle[t]),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(e){return void 0!==e.onselectstart&&(e.onselectstart=C.util.falseFunction),r?e.style[r]="none":"string"==typeof e.unselectable&&(e.unselectable="on"),e},C.util.makeElementSelectable=function(e){return void 0!==e.onselectstart&&(e.onselectstart=null),r?e.style[r]="":"string"==typeof e.unselectable&&(e.unselectable=""),e},C.util.setImageSmoothing=function(e,t){e.imageSmoothingEnabled=e.imageSmoothingEnabled||e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled||e.oImageSmoothingEnabled,e.imageSmoothingEnabled=t},C.util.getById=function(e){return"string"==typeof e?C.document.getElementById(e):e},C.util.toArray=a,C.util.addClass=function(e,t){e&&-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=(e.className?" ":"")+t)},C.util.makeElement=o,C.util.wrapElement=function(e,t,n){return"string"==typeof t&&(t=o(t,n)),e.parentNode&&e.parentNode.replaceChild(t,e),t.appendChild(e),t},C.util.getScrollLeftTop=s,C.util.getElementOffset=function(e){var t,i,r=e&&e.ownerDocument,a={left:0,top:0},o={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)retu