38 lines
47 KiB
JavaScript
38 lines
47 KiB
JavaScript
|
/**
|
||
|
* Modules in this bundle
|
||
|
* @license
|
||
|
*
|
||
|
* svg2pdf.js:
|
||
|
* license: MIT (http://opensource.org/licenses/MIT)
|
||
|
* author: yFiles for HTML Support Team <yfileshtml@yworks.com>
|
||
|
* homepage: https://github.com/yWorks/svg2pdf.js#readme
|
||
|
* version: 1.3.1
|
||
|
*
|
||
|
* cssesc:
|
||
|
* license: MIT (http://opensource.org/licenses/MIT)
|
||
|
* author: Mathias Bynens
|
||
|
* homepage: https://mths.be/cssesc
|
||
|
* version: 2.0.0
|
||
|
*
|
||
|
* font-family:
|
||
|
* license: MIT (http://opensource.org/licenses/MIT)
|
||
|
* author: Taro Hanamura <m@hanamurataro.com>
|
||
|
* homepage: https://github.com/hanamura/font-family
|
||
|
* version: 0.2.0
|
||
|
*
|
||
|
* svgpath:
|
||
|
* license: MIT (http://opensource.org/licenses/MIT)
|
||
|
* homepage: https://github.com/fontello/svgpath#readme
|
||
|
* version: 2.2.1
|
||
|
*
|
||
|
* This header is generated by licensify (https://github.com/twada/licensify)
|
||
|
*/
|
||
|
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).svg2pdf=t()}}(function(){return function n(s,o,h){function c(e,t){if(!o[e]){if(!s[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(u)return u(e,!0);var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}var i=o[e]={exports:{}};s[e][0].call(i.exports,function(t){return c(s[e][1][t]||t)},i,i.exports,n,s,o,h)}return o[e].exports}for(var u="function"==typeof require&&require,t=0;t<h.length;t++)c(h[t]);return c}({1:[function(t,e,r){"use strict";e.exports=t("./lib/svgpath")},{"./lib/svgpath":6}],2:[function(t,e,r){"use strict";var C=2*Math.PI;function I(t,e,r,a){var i=t*a-e*r<0?-1:1,n=(t*r+e*a)/(Math.sqrt(t*t+e*e)*Math.sqrt(t*t+e*e));return 1<n&&(n=1),n<-1&&(n=-1),i*Math.acos(n)}e.exports=function(t,e,r,a,i,n,s,o,h){var c=Math.sin(h*C/360),u=Math.cos(h*C/360),l=u*(t-r)/2+c*(e-a)/2,f=-c*(t-r)/2+u*(e-a)/2;if(0===l&&0===f)return[];if(0===s||0===o)return[];s=Math.abs(s),o=Math.abs(o);var d=l*l/(s*s)+f*f/(o*o);1<d&&(s*=Math.sqrt(d),o*=Math.sqrt(d));var p,g,x,b,m,v,y,k=function(t,e,r,a,i,n,s,o,h,c){var u=c*(t-r)/2+h*(e-a)/2,l=-h*(t-r)/2+c*(e-a)/2,f=s*s,d=o*o,p=u*u,g=l*l,x=f*d-f*g-d*p;x<0&&(x=0),x/=f*g+d*p;var b=(x=Math.sqrt(x)*(i===n?-1:1))*s/o*l,m=x*-o/s*u,v=c*b-h*m+(t+r)/2,y=h*b+c*m+(e+a)/2,k=(u-b)/s,w=(l-m)/o,M=(-u-b)/s,A=(-l-m)/o,S=I(1,0,k,w),F=I(k,w,M,A);return 0===n&&0<F&&(F-=C),1===n&&F<0&&(F+=C),[v,y,S,F]}(t,e,r,a,i,n,s,o,c,u),w=[],M=k[2],A=k[3],S=Math.max(Math.ceil(Math.abs(A)/(C/4)),1);A/=S;for(var F=0;F<S;F++)w.push((p=M,g=A,void 0,x=4/3*Math.tan(g/4),b=Math.cos(p),m=Math.sin(p),v=Math.cos(p+g),y=Math.sin(p+g),[b,m,b-m*x,m+b*x,v+y*x,y-v*x,v,y])),M+=A;return w.map(function(t){for(var e=0;e<t.length;e+=2){var r=t[e+0],a=t[e+1],i=u*(r*=s)-c*(a*=o),n=c*r+u*a;t[e+0]=i+k[0],t[e+1]=n+k[1]}return t})}},{}],3:[function(t,e,r){"use strict";var l=1e-10,f=Math.PI/180;function a(t,e,r){if(!(this instanceof a))return new a(t,e,r);this.rx=t,this.ry=e,this.ax=r}a.prototype.transform=function(t){var e=Math.cos(this.ax*f),r=Math.sin(this.ax*f),a=[this.rx*(t[0]*e+t[2]*r),this.rx*(t[1]*e+t[3]*r),this.ry*(-t[0]*r+t[2]*e),this.ry*(-t[1]*r+t[3]*e)],i=a[0]*a[0]+a[2]*a[2],n=a[1]*a[1]+a[3]*a[3],s=((a[0]-a[3])*(a[0]-a[3])+(a[2]+a[1])*(a[2]+a[1]))*((a[0]+a[3])*(a[0]+a[3])+(a[2]-a[1])*(a[2]-a[1])),o=(i+n)/2;if(s<l*o)return this.rx=this.ry=Math.sqrt(o),this.ax=0,this;var h=a[0]*a[1]+a[2]*a[3],c=o+(s=Math.sqrt(s))/2,u=o-s/2;return this.ax=Math.abs(h)<l&&Math.abs(c-n)<l?90:180*Math.atan(Math.abs(h)>Math.abs(c-n)?(c-i)/h:h/(c-n))/Math.PI,0<=this.ax?(this.rx=Math.sqrt(c),this.ry=Math.sqrt(u)):(this.ax+=90,this.rx=Math.sqrt(u),this.ry=Math.sqrt(c)),this},a.prototype.isDegenerate=function(){return this.rx<l*this.ry||this.ry<l*this.rx},e.exports=a},{}],4:[function(t,e,r){"use strict";function a(){if(!(this instanceof a))return new a;this.queue=[],this.cache=null}a.prototype.matrix=function(t){return 1===t[0]&&0===t[1]&&0===t[2]&&1===t[3]&&0===t[4]&&0===t[5]||(this.cache=null,this.queue.push(t)),this},a.prototype.translate=function(t,e){return 0===t&&0===e||(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},a.prototype.scale=function(t,e){return 1===t&&1===e||(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},a.prototype.rotate=function(t,e,r){var a,i,n;return 0!==t&&(this.translate(e,r),a=t*Math.PI/180,i=Math.cos(a),n=Math.sin(a),this.queue.push([i,n,-n,i,0,0]),this.cache=null,this.translate(-e,-r)),this},a.prototype.skewX=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},a.prototype.skewY=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},a.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],1===this.queue.length)return this.cache;for(var t=1;t<
|
||
|
/**
|
||
|
* A class to parse color values
|
||
|
* @author Stoyan Stefanov <sstoo@gmail.com>
|
||
|
* @link http://www.phpied.com/rgb-color-parser-in-javascript/
|
||
|
* @license Use it if you like it
|
||
|
*/
|
||
|
!function(t){function f(t){this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var u={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var e in u)t==e&&(t=u[e]);for(var l=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],r=0;r<l.length;r++){var a=l[r].re,i=l[r].process,n=a.exec(t);if(n){var s=i(n);this.r=s[0],this.g=s[1],this.b=s[2],this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:255<this.r?255:this.r,this.g=this.g<0||isNaN(this.g)?0:255<this.g?255:this.g,this.b=this.b<0||isNaN(this.b)?0:255<this.b?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,e=0;e<l.length;e++)for(var r=l[e].example,a=0;a<r.length;a++)t[t.length]=r[a];for(var i in u)t[t.length]=i;var n=document.createElement("ul");n.setAttribute("id","rgbco
|
||
|
//# sourceMappingURL=svg2pdf.min.js.map
|