/
font-service-specifics.js
1 lines (1 loc) · 12.5 KB
/
font-service-specifics.js
1
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.fontServiceSpecifics=t()}}(function(){var t;return function e(t,o,n){function r(h,a){if(!o[h]){if(!t[h]){var i="function"==typeof require&&require;if(!a&&i)return i(h,!0);if(s)return s(h,!0);var u=new Error("Cannot find module '"+h+"'");throw u.code="MODULE_NOT_FOUND",u}var f=o[h]={exports:{}};t[h][0].call(f.exports,function(e){var o=t[h][1][e];return r(o?o:e)},f,f.exports,e,t,o,n)}return o[h].exports}for(var s="function"==typeof require&&require,h=0;h<n.length;h++)r(n[h]);return r}({1:[function(e,o,n){(function(e){!function(r){function s(t){throw RangeError(T[t])}function h(t,e){for(var o=t.length;o--;)t[o]=e(t[o]);return t}function a(t,e){return h(t.split(S),e).join(".")}function i(t){for(var e,o,n=[],r=0,s=t.length;s>r;)e=t.charCodeAt(r++),e>=55296&&56319>=e&&s>r?(o=t.charCodeAt(r++),56320==(64512&o)?n.push(((1023&e)<<10)+(1023&o)+65536):(n.push(e),r--)):n.push(e);return n}function u(t){return h(t,function(t){var e="";return t>65535&&(t-=65536,e+=L(t>>>10&1023|55296),t=56320|1023&t),e+=L(t)}).join("")}function f(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:O}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function p(t,e,o){var n=0;for(t=o?z(t/I):t>>1,t+=z(t/e);t>_*C>>1;n+=O)t=z(t/_);return z(n+(_+1)*t/(t+A))}function l(t){var e,o,n,r,h,a,i,c,l,m,d=[],v=t.length,y=0,g=R,b=U;for(o=t.lastIndexOf(E),0>o&&(o=0),n=0;o>n;++n)t.charCodeAt(n)>=128&&s("not-basic"),d.push(t.charCodeAt(n));for(r=o>0?o+1:0;v>r;){for(h=y,a=1,i=O;r>=v&&s("invalid-input"),c=f(t.charCodeAt(r++)),(c>=O||c>z((x-y)/a))&&s("overflow"),y+=c*a,l=b>=i?q:i>=b+C?C:i-b,!(l>c);i+=O)m=O-l,a>z(x/m)&&s("overflow"),a*=m;e=d.length+1,b=p(y-h,e,0==h),z(y/e)>x-g&&s("overflow"),g+=z(y/e),y%=e,d.splice(y++,0,g)}return u(d)}function m(t){var e,o,n,r,h,a,u,f,l,m,d,v,y,g,b,j=[];for(t=i(t),v=t.length,e=R,o=0,h=U,a=0;v>a;++a)d=t[a],128>d&&j.push(L(d));for(n=r=j.length,r&&j.push(E);v>n;){for(u=x,a=0;v>a;++a)d=t[a],d>=e&&u>d&&(u=d);for(y=n+1,u-e>z((x-o)/y)&&s("overflow"),o+=(u-e)*y,e=u,a=0;v>a;++a)if(d=t[a],e>d&&++o>x&&s("overflow"),d==e){for(f=o,l=O;m=h>=l?q:l>=h+C?C:l-h,!(m>f);l+=O)b=f-m,g=O-m,j.push(L(c(m+b%g,0))),f=z(b/g);j.push(L(c(f,0))),h=p(o,y,n==r),o=0,++n}++o,++e}return j.join("")}function d(t){return a(t,function(t){return F.test(t)?l(t.slice(4).toLowerCase()):t})}function v(t){return a(t,function(t){return k.test(t)?"xn--"+m(t):t})}var y="object"==typeof n&&n,g="object"==typeof o&&o&&o.exports==y&&o,b="object"==typeof e&&e;(b.global===b||b.window===b)&&(r=b);var j,w,x=2147483647,O=36,q=1,C=26,A=38,I=700,U=72,R=128,E="-",F=/^xn--/,k=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=O-q,z=Math.floor,L=String.fromCharCode;if(j={version:"1.2.4",ucs2:{decode:i,encode:u},decode:l,encode:m,toASCII:v,toUnicode:d},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return j});else if(y&&!y.nodeType)if(g)g.exports=j;else for(w in j)j.hasOwnProperty(w)&&(y[w]=j[w]);else r.punycode=j}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e){"use strict";function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,s){e=e||"&",r=r||"=";var h={};if("string"!=typeof t||0===t.length)return h;var a=/\+/g;t=t.split(e);var i=1e3;s&&"number"==typeof s.maxKeys&&(i=s.maxKeys);var u=t.length;i>0&&u>i&&(u=i);for(var f=0;u>f;++f){var c,p,l,m,d=t[f].replace(a,"%20"),v=d.indexOf(r);v>=0?(c=d.substr(0,v),p=d.substr(v+1)):(c=d,p=""),l=decodeURIComponent(c),m=decodeURIComponent(p),o(h,l)?n(h[l])?h[l].push(m):h[l]=[h[l],m]:h[l]=m}return h};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],3:[function(t,e){"use strict";function o(t,e){if(t.map)return t.map(e);for(var o=[],n=0;n<t.length;n++)o.push(e(t[n],n));return o}var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,h,a){return e=e||"&",h=h||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),function(s){var a=encodeURIComponent(n(s))+h;return r(t[s])?o(t[s],function(t){return a+encodeURIComponent(n(t))}).join(e):a+encodeURIComponent(n(t[s]))}).join(e):a?encodeURIComponent(n(a))+h+encodeURIComponent(n(t)):""};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.push(o);return e}},{}],4:[function(t,e,o){"use strict";o.decode=o.parse=t("./decode"),o.encode=o.stringify=t("./encode")},{"./decode":2,"./encode":3}],5:[function(t,e,o){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function r(t,e,o){if(t&&u(t)&&t instanceof n)return t;var r=new n;return r.parse(t,e,o),r}function s(t){return i(t)&&(t=r(t)),t instanceof n?t.format():n.prototype.format.call(t)}function h(t,e){return r(t,!1,!0).resolve(e)}function a(t,e){return t?r(t,!1,!0).resolveObject(e):e}function i(t){return"string"==typeof t}function u(t){return"object"==typeof t&&null!==t}function f(t){return null===t}function c(t){return null==t}var p=t("punycode");o.parse=r,o.resolve=h,o.resolveObject=a,o.format=s,o.Url=n;var l=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,d=["<",">",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(d),y=["'"].concat(v),g=["%","/","?",";","#"].concat(y),b=["/","?","#"],j=255,w=/^[a-z0-9A-Z_-]{0,63}$/,x=/^([a-z0-9A-Z_-]{0,63})(.*)$/,O={javascript:!0,"javascript:":!0},q={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=t("querystring");n.prototype.parse=function(t,e,o){if(!i(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t;n=n.trim();var r=l.exec(n);if(r){r=r[0];var s=r.toLowerCase();this.protocol=s,n=n.substr(r.length)}if(o||r||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var h="//"===n.substr(0,2);!h||r&&q[r]||(n=n.substr(2),this.slashes=!0)}if(!q[r]&&(h||r&&!C[r])){for(var a=-1,u=0;u<b.length;u++){var f=n.indexOf(b[u]);-1!==f&&(-1===a||a>f)&&(a=f)}var c,m;m=-1===a?n.lastIndexOf("@"):n.lastIndexOf("@",a),-1!==m&&(c=n.slice(0,m),n=n.slice(m+1),this.auth=decodeURIComponent(c)),a=-1;for(var u=0;u<g.length;u++){var f=n.indexOf(g[u]);-1!==f&&(-1===a||a>f)&&(a=f)}-1===a&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d)for(var v=this.hostname.split(/\./),u=0,I=v.length;I>u;u++){var U=v[u];if(U&&!U.match(w)){for(var R="",E=0,F=U.length;F>E;E++)R+=U.charCodeAt(E)>127?"x":U[E];if(!R.match(w)){var k=v.slice(0,u),S=v.slice(u+1),T=U.match(x);T&&(k.push(T[1]),S.unshift(T[2])),S.length&&(n="/"+S.join(".")+n),this.hostname=k.join(".");break}}}if(this.hostname=this.hostname.length>j?"":this.hostname.toLowerCase(),!d){for(var _=this.hostname.split("."),z=[],u=0;u<_.length;++u){var L=_[u];z.push(L.match(/[^A-Za-z0-9_-]/)?"xn--"+p.encode(L):L)}this.hostname=z.join(".")}var P=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+P,this.href+=this.host,d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!O[s])for(var u=0,I=y.length;I>u;u++){var Z=y[u],$=encodeURIComponent(Z);$===Z&&($=escape(Z)),n=n.split(Z).join($)}var D=n.indexOf("#");-1!==D&&(this.hash=n.substr(D),n=n.slice(0,D));var G=n.indexOf("?");if(-1!==G?(this.search=n.substr(G),this.query=n.substr(G+1),e&&(this.query=A.parse(this.query)),n=n.slice(0,G)):e&&(this.search="",this.query={}),n&&(this.pathname=n),C[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var P=this.pathname||"",L=this.search||"";this.path=P+L}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",o=this.pathname||"",n=this.hash||"",r=!1,s="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(s=A.stringify(this.query));var h=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||C[e])&&r!==!1?(r="//"+(r||""),o&&"/"!==o.charAt(0)&&(o="/"+o)):r||(r=""),n&&"#"!==n.charAt(0)&&(n="#"+n),h&&"?"!==h.charAt(0)&&(h="?"+h),o=o.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),h=h.replace("#","%23"),e+r+o+h+n},n.prototype.resolve=function(t){return this.resolveObject(r(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(i(t)){var e=new n;e.parse(t,!1,!0),t=e}var o=new n;if(Object.keys(this).forEach(function(t){o[t]=this[t]},this),o.hash=t.hash,""===t.href)return o.href=o.format(),o;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(o[e]=t[e])}),C[o.protocol]&&o.hostname&&!o.pathname&&(o.path=o.pathname="/"),o.href=o.format(),o;if(t.protocol&&t.protocol!==o.protocol){if(!C[t.protocol])return Object.keys(t).forEach(function(e){o[e]=t[e]}),o.href=o.format(),o;if(o.protocol=t.protocol,t.host||q[t.protocol])o.pathname=t.pathname;else{for(var r=(t.pathname||"").split("/");r.length&&!(t.host=r.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==r[0]&&r.unshift(""),r.length<2&&r.unshift(""),o.pathname=r.join("/")}if(o.search=t.search,o.query=t.query,o.host=t.host||"",o.auth=t.auth,o.hostname=t.hostname||t.host,o.port=t.port,o.pathname||o.search){var s=o.pathname||"",h=o.search||"";o.path=s+h}return o.slashes=o.slashes||t.slashes,o.href=o.format(),o}var a=o.pathname&&"/"===o.pathname.charAt(0),u=t.host||t.pathname&&"/"===t.pathname.charAt(0),p=u||a||o.host&&t.pathname,l=p,m=o.pathname&&o.pathname.split("/")||[],r=t.pathname&&t.pathname.split("/")||[],d=o.protocol&&!C[o.protocol];if(d&&(o.hostname="",o.port=null,o.host&&(""===m[0]?m[0]=o.host:m.unshift(o.host)),o.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===r[0]?r[0]=t.host:r.unshift(t.host)),t.host=null),p=p&&(""===r[0]||""===m[0])),u)o.host=t.host||""===t.host?t.host:o.host,o.hostname=t.hostname||""===t.hostname?t.hostname:o.hostname,o.search=t.search,o.query=t.query,m=r;else if(r.length)m||(m=[]),m.pop(),m=m.concat(r),o.search=t.search,o.query=t.query;else if(!c(t.search)){if(d){o.hostname=o.host=m.shift();var v=o.host&&o.host.indexOf("@")>0?o.host.split("@"):!1;v&&(o.auth=v.shift(),o.host=o.hostname=v.shift())}return o.search=t.search,o.query=t.query,f(o.pathname)&&f(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o}if(!m.length)return o.pathname=null,o.path=o.search?"/"+o.search:null,o.href=o.format(),o;for(var y=m.slice(-1)[0],g=(o.host||t.host)&&("."===y||".."===y)||""===y,b=0,j=m.length;j>=0;j--)y=m[j],"."==y?m.splice(j,1):".."===y?(m.splice(j,1),b++):b&&(m.splice(j,1),b--);if(!p&&!l)for(;b--;b)m.unshift("..");!p||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),g&&"/"!==m.join("/").substr(-1)&&m.push("");var w=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(d){o.hostname=o.host=w?"":m.length?m.shift():"";var v=o.host&&o.host.indexOf("@")>0?o.host.split("@"):!1;v&&(o.auth=v.shift(),o.host=o.hostname=v.shift())}return p=p||o.host&&m.length,p&&!w&&m.unshift(""),m.length?o.pathname=m.join("/"):(o.pathname=null,o.path=null),f(o.pathname)&&f(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=t.auth||o.auth,o.slashes=o.slashes||t.slashes,o.href=o.format(),o},n.prototype.parseHost=function(){var t=this.host,e=m.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:1,querystring:4}],6:[function(t,e){if("undefined"==typeof document)var o=t("url");else var o={parse:function(t){var e=document.createElement("a");return e.href=t,e}};var n={"themes.googleusercontent.com":"Google Fonts","fonts.googleapis.com":"Google Fonts","cloud.typography.com":"Cloud.typography","fast.fonts.net":"Fonts.com","easy.myfonts.net":"MyFonts","use.typekit.net":"Typekit","fonts.typotheque.com":"Typotheque"};e.exports=function(t){var e=Object.keys(n),r=e.indexOf(o.parse(t).hostname);return n[e[r]]||void 0}},{url:5}]},{},[6])(6)});