UNPKG

react-svg-textures

Version:

Textures.js ported to React. Fully isomorphic.

6 lines 27.1 kB
/*! * react-svg-textures v1.4.7 * MIT Licensed */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactSvgTextures=e(require("react")):t.ReactSvgTextures=e(t.React)}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=5)}([function(e,r){e.exports=t},function(t,e,r){"use strict";var n=function(){return(Math.random().toString(36)+"00000000000000000").replace(/[^a-z]+/g,"").slice(0,5)},o={circles:function(){var t=20,e="",r=2,o=!1,i="#343434",a="#343434",u=0,c=n(),f=function(n){var f=n.append("defs").append("pattern").attr("id",c).attr("patternUnits","userSpaceOnUse").attr("width",t).attr("height",t);e&&f.append("rect").attr("width",t).attr("height",t).attr("fill",e),f.append("circle").attr("cx",t/2).attr("cy",t/2).attr("r",r).attr("fill",i).attr("stroke",a).attr("stroke-width",u),o&&[[0,0],[0,t],[t,0],[t,t]].forEach(function(t){f.append("circle").attr("cx",t[0]).attr("cy",t[1]).attr("r",r).attr("fill",i).attr("stroke",a).attr("stroke-width",u)})};return f.heavier=function(t){return 0===arguments.length?r*=2:r*=2*t,f},f.lighter=function(t){return 0===arguments.length?r/=2:r/=2*t,f},f.thinner=function(e){return 0===arguments.length?t*=2:t*=2*e,f},f.thicker=function(e){return 0===arguments.length?t/=2:t/=2*e,f},f.background=function(t){return e=t,f},f.size=function(e){return t=e,f},f.complement=function(t){return o=0===arguments.length||t,f},f.radius=function(t){return r=t,f},f.fill=function(t){return i=t,f},f.stroke=function(t){return a=t,f},f.strokeWidth=function(t){return u=t,f},f.id=function(t){return 0===arguments.length?c:(c=t,f)},f.url=function(){return"url(#"+c+")"},f},lines:function(){var t=20,e="#343434",r=2,o="",i=n(),a=["diagonal"],u="auto",c=function(n){var c=n.append("defs").append("pattern").attr("id",i).attr("patternUnits","userSpaceOnUse").attr("width",t).attr("height",t);o&&c.append("rect").attr("width",t).attr("height",t).attr("fill",o),a.forEach(function(n){c.append("path").attr("d",function(e){var r=t;switch(e){case"0/8":case"vertical":return"M "+r/2+", 0 l 0, "+r;case"1/8":return"M "+r/4+",0 l "+r/2+","+r+" M "+-r/4+",0 l "+r/2+","+r+" M "+3*r/4+",0 l "+r/2+","+r;case"2/8":case"diagonal":return"M 0,"+r+" l "+r+","+-r+" M "+-r/4+","+r/4+" l "+r/2+","+-r/2+" M "+.75*r+","+5/4*r+" l "+r/2+","+-r/2;case"3/8":return"M 0,"+.75*r+" l "+r+","+-r/2+" M 0,"+r/4+" l "+r+","+-r/2+" M 0,"+5*r/4+" l "+r+","+-r/2;case"4/8":case"horizontal":return"M 0,"+r/2+" l "+r+",0";case"5/8":return"M 0,"+-r/4+" l "+r+","+r/2+"M 0,"+r/4+" l "+r+","+r/2+" M 0,"+3*r/4+" l "+r+","+r/2;case"6/8":return"M 0,0 l "+r+","+r+" M "+-r/4+","+.75*r+" l "+r/2+","+r/2+" M "+3*r/4+","+-r/4+" l "+r/2+","+r/2;case"7/8":return"M "+-r/4+",0 l "+r/2+","+r+" M "+r/4+",0 l "+r/2+","+r+" M "+3*r/4+",0 l "+r/2+","+r;default:return"M "+r/2+", 0 l 0, "+r}}(n)).attr("stroke-width",r).attr("shape-rendering",u).attr("stroke",e).attr("stroke-linecap","square")})};return c.heavier=function(t){return 0===arguments.length?r*=2:r*=2*t,c},c.lighter=function(t){return 0===arguments.length?r/=2:r/=2*t,c},c.thinner=function(e){return 0===arguments.length?t*=2:t*=2*e,c},c.thicker=function(e){return 0===arguments.length?t/=2:t/=2*e,c},c.background=function(t){return o=t,c},c.size=function(e){return t=e,c},c.orientation=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return 0===arguments.length?c:(a=e,c)},c.shapeRendering=function(t){return u=t,c},c.stroke=function(t){return e=t,c},c.strokeWidth=function(t){return r=t,c},c.id=function(t){return 0===arguments.length?i:(i=t,c)},c.url=function(){return"url(#"+i+")"},c},paths:function(){var t=1,e=1,r=20,o="#343434",i=2,a="",u=function(t){return"M "+t/4+","+3*t/4+"l"+t/4+","+-t/2+"l"+t/4+","+t/2},c=n(),f="transparent",s="auto",l=function(n){var l=function(n){var o=r;switch(n){case"squares":return"M "+o/4+" "+o/4+" l "+o/2+" 0 l 0 "+o/2+" l "+-o/2+" 0 Z";case"nylon":return"M 0 "+o/4+" l "+o/4+" 0 l 0 "+-o/4+" M "+3*o/4+" "+o+" l 0 "+-o/4+" l "+o/4+" 0 M "+o/4+" "+o/2+" l 0 "+o/4+" l "+o/4+" 0 M "+o/2+" "+o/4+" l "+o/4+" 0 l 0 "+o/4;case"waves":return"M 0 "+o/2+" c "+o/8+" "+-o/4+" , "+3*o/8+" "+-o/4+" , "+o/2+" 0 c "+o/8+" "+o/4+" , "+3*o/8+" "+o/4+" , "+o/2+" 0 M "+-o/2+" "+o/2+" c "+o/8+" "+o/4+" , "+3*o/8+" "+o/4+" , "+o/2+" 0 M "+o+" "+o/2+" c "+o/8+" "+-o/4+" , "+3*o/8+" "+-o/4+" , "+o/2+" 0";case"woven":return"M "+o/4+","+o/4+"l"+o/2+","+o/2+"M"+3*o/4+","+o/4+"l"+o/2+","+-o/2+" M"+o/4+","+3*o/4+"l"+-o/2+","+o/2+"M"+3*o/4+","+5*o/4+"l"+o/2+","+-o/2+" M"+-o/4+","+o/4+"l"+o/2+","+-o/2;case"crosses":return"M "+o/4+","+o/4+"l"+o/2+","+o/2+"M"+o/4+","+3*o/4+"l"+o/2+","+-o/2;case"caps":return"M "+o/4+","+3*o/4+"l"+o/4+","+-o/2+"l"+o/4+","+o/2;case"hexagons":return t=3,e=Math.sqrt(3),"M "+o+",0 l "+o+",0 l "+o/2+","+o*Math.sqrt(3)/2+" l "+-o/2+","+o*Math.sqrt(3)/2+" l "+-o+",0 l "+-o/2+","+-o*Math.sqrt(3)/2+" Z M 0,"+o*Math.sqrt(3)/2+" l "+o/2+",0 M "+3*o+","+o*Math.sqrt(3)/2+" l "+-o/2+",0";default:return n(o)}}(u),p=n.append("defs").append("pattern").attr("id",c).attr("patternUnits","userSpaceOnUse").attr("width",r*t).attr("height",r*e);a&&p.append("rect").attr("width",r*t).attr("height",r*e).attr("fill",a),p.append("path").attr("d",l).attr("fill",f).attr("stroke",o).attr("stroke-width",i).attr("stroke-linecap","square").attr("shape-rendering",s)};return l.heavier=function(t){return 0===arguments.length?i*=2:i*=2*t,l},l.lighter=function(t){return 0===arguments.length?i/=2:i/=2*t,l},l.thinner=function(t){return 0===arguments.length?r*=2:r*=2*t,l},l.thicker=function(t){return 0===arguments.length?r/=2:r/=2*t,l},l.background=function(t){return a=t,l},l.shapeRendering=function(t){return s=t,l},l.size=function(t){return r=t,l},l.d=function(t){return u=t,l},l.fill=function(t){return f=t,l},l.stroke=function(t){return o=t,l},l.strokeWidth=function(t){return i=t,l},l.id=function(t){return 0===arguments.length?c:(c=t,l)},l.url=function(){return"url(#"+c+")"},l}};e.a=o},function(t,e,r){(function(t,r){var n=200,o="__lodash_hash_undefined__",i=1,a=2,u=9007199254740991,c="[object Arguments]",f="[object Array]",s="[object AsyncFunction]",l="[object Boolean]",p="[object Date]",h="[object Error]",d="[object Function]",y="[object GeneratorFunction]",v="[object Map]",b="[object Number]",g="[object Null]",_="[object Object]",j="[object Proxy]",w="[object RegExp]",x="[object Set]",m="[object String]",O="[object Symbol]",M="[object Undefined]",k="[object ArrayBuffer]",A="[object DataView]",z=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[c]=S[f]=S[k]=S[l]=S[A]=S[p]=S[h]=S[d]=S[v]=S[b]=S[_]=S[w]=S[x]=S[m]=S["[object WeakMap]"]=!1;var R="object"==typeof t&&t&&t.Object===Object&&t,P="object"==typeof self&&self&&self.Object===Object&&self,U=R||P||Function("return this")(),T="object"==typeof e&&e&&!e.nodeType&&e,C=T&&"object"==typeof r&&r&&!r.nodeType&&r,L=C&&C.exports===T,I=L&&R.process,W=function(){try{return I&&I.binding&&I.binding("util")}catch(t){}}(),N=W&&W.isTypedArray;function Z(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function q(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function D(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var F,$,B,G=Array.prototype,V=Function.prototype,Y=Object.prototype,H=U["__core-js_shared__"],J=V.toString,K=Y.hasOwnProperty,Q=(F=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"",X=Y.toString,tt=RegExp("^"+J.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=L?U.Buffer:void 0,rt=U.Symbol,nt=U.Uint8Array,ot=Y.propertyIsEnumerable,it=G.splice,at=rt?rt.toStringTag:void 0,ut=Object.getOwnPropertySymbols,ct=et?et.isBuffer:void 0,ft=($=Object.keys,B=Object,function(t){return $(B(t))}),st=Wt(U,"DataView"),lt=Wt(U,"Map"),pt=Wt(U,"Promise"),ht=Wt(U,"Set"),dt=Wt(U,"WeakMap"),yt=Wt(Object,"create"),vt=Dt(st),bt=Dt(lt),gt=Dt(pt),_t=Dt(ht),jt=Dt(dt),wt=rt?rt.prototype:void 0,xt=wt?wt.valueOf:void 0;function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ot(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function kt(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Mt;++e<r;)this.add(t[e])}function At(t){var e=this.__data__=new Ot(t);this.size=e.size}function zt(t,e){var r=Bt(t),n=!r&&$t(t),o=!r&&!n&&Gt(t),i=!r&&!n&&!o&&Kt(t),a=r||n||o||i,u=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=u.length;for(var f in t)!e&&!K.call(t,f)||a&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||qt(f,c))||u.push(f);return u}function Et(t,e){for(var r=t.length;r--;)if(Ft(t[r][0],e))return r;return-1}function St(t){return null==t?void 0===t?M:g:at&&at in Object(t)?function(t){var e=K.call(t,at),r=t[at];try{t[at]=void 0;var n=!0}catch(t){}var o=X.call(t);n&&(e?t[at]=r:delete t[at]);return o}(t):function(t){return X.call(t)}(t)}function Rt(t){return Jt(t)&&St(t)==c}function Pt(t,e,r,n,o){return t===e||(null==t||null==e||!Jt(t)&&!Jt(e)?t!=t&&e!=e:function(t,e,r,n,o,u){var s=Bt(t),d=Bt(e),y=s?f:Zt(t),g=d?f:Zt(e),j=(y=y==c?_:y)==_,M=(g=g==c?_:g)==_,z=y==g;if(z&&Gt(t)){if(!Gt(e))return!1;s=!0,j=!1}if(z&&!j)return u||(u=new At),s||Kt(t)?Ct(t,e,r,n,o,u):function(t,e,r,n,o,u,c){switch(r){case A:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case k:return!(t.byteLength!=e.byteLength||!u(new nt(t),new nt(e)));case l:case p:case b:return Ft(+t,+e);case h:return t.name==e.name&&t.message==e.message;case w:case m:return t==e+"";case v:var f=q;case x:var s=n&i;if(f||(f=D),t.size!=e.size&&!s)return!1;var d=c.get(t);if(d)return d==e;n|=a,c.set(t,e);var y=Ct(f(t),f(e),n,o,u,c);return c.delete(t),y;case O:if(xt)return xt.call(t)==xt.call(e)}return!1}(t,e,y,r,n,o,u);if(!(r&i)){var E=j&&K.call(t,"__wrapped__"),S=M&&K.call(e,"__wrapped__");if(E||S){var R=E?t.value():t,P=S?e.value():e;return u||(u=new At),o(R,P,r,n,u)}}if(!z)return!1;return u||(u=new At),function(t,e,r,n,o,a){var u=r&i,c=Lt(t),f=c.length,s=Lt(e).length;if(f!=s&&!u)return!1;for(var l=f;l--;){var p=c[l];if(!(u?p in e:K.call(e,p)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var d=!0;a.set(t,e),a.set(e,t);for(var y=u;++l<f;){p=c[l];var v=t[p],b=e[p];if(n)var g=u?n(b,v,p,e,t,a):n(v,b,p,t,e,a);if(!(void 0===g?v===b||o(v,b,r,n,a):g)){d=!1;break}y||(y="constructor"==p)}if(d&&!y){var _=t.constructor,j=e.constructor;_!=j&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof j&&j instanceof j)&&(d=!1)}return a.delete(t),a.delete(e),d}(t,e,r,n,o,u)}(t,e,r,n,Pt,o))}function Ut(t){return!(!Ht(t)||Q&&Q in t)&&(Vt(t)?tt:z).test(Dt(t))}function Tt(t){if(r=(e=t)&&e.constructor,n="function"==typeof r&&r.prototype||Y,e!==n)return ft(t);var e,r,n,o=[];for(var i in Object(t))K.call(t,i)&&"constructor"!=i&&o.push(i);return o}function Ct(t,e,r,n,o,u){var c=r&i,f=t.length,s=e.length;if(f!=s&&!(c&&s>f))return!1;var l=u.get(t);if(l&&u.get(e))return l==e;var p=-1,h=!0,d=r&a?new kt:void 0;for(u.set(t,e),u.set(e,t);++p<f;){var y=t[p],v=e[p];if(n)var b=c?n(v,y,p,e,t,u):n(y,v,p,t,e,u);if(void 0!==b){if(b)continue;h=!1;break}if(d){if(!Z(e,function(t,e){if(i=e,!d.has(i)&&(y===t||o(y,t,r,n,u)))return d.push(e);var i})){h=!1;break}}else if(y!==v&&!o(y,v,r,n,u)){h=!1;break}}return u.delete(t),u.delete(e),h}function Lt(t){return function(t,e,r){var n=e(t);return Bt(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,Qt,Nt)}function It(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Wt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Ut(r)?r:void 0}mt.prototype.clear=function(){this.__data__=yt?yt(null):{},this.size=0},mt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},mt.prototype.get=function(t){var e=this.__data__;if(yt){var r=e[t];return r===o?void 0:r}return K.call(e,t)?e[t]:void 0},mt.prototype.has=function(t){var e=this.__data__;return yt?void 0!==e[t]:K.call(e,t)},mt.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=yt&&void 0===e?o:e,this},Ot.prototype.clear=function(){this.__data__=[],this.size=0},Ot.prototype.delete=function(t){var e=this.__data__,r=Et(e,t);return!(r<0||(r==e.length-1?e.pop():it.call(e,r,1),--this.size,0))},Ot.prototype.get=function(t){var e=this.__data__,r=Et(e,t);return r<0?void 0:e[r][1]},Ot.prototype.has=function(t){return Et(this.__data__,t)>-1},Ot.prototype.set=function(t,e){var r=this.__data__,n=Et(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Mt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(lt||Ot),string:new mt}},Mt.prototype.delete=function(t){var e=It(this,t).delete(t);return this.size-=e?1:0,e},Mt.prototype.get=function(t){return It(this,t).get(t)},Mt.prototype.has=function(t){return It(this,t).has(t)},Mt.prototype.set=function(t,e){var r=It(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},kt.prototype.add=kt.prototype.push=function(t){return this.__data__.set(t,o),this},kt.prototype.has=function(t){return this.__data__.has(t)},At.prototype.clear=function(){this.__data__=new Ot,this.size=0},At.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},At.prototype.get=function(t){return this.__data__.get(t)},At.prototype.has=function(t){return this.__data__.has(t)},At.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Ot){var o=r.__data__;if(!lt||o.length<n-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new Mt(o)}return r.set(t,e),this.size=r.size,this};var Nt=ut?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}(ut(t),function(e){return ot.call(t,e)}))}:function(){return[]},Zt=St;function qt(t,e){return!!(e=null==e?u:e)&&("number"==typeof t||E.test(t))&&t>-1&&t%1==0&&t<e}function Dt(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ft(t,e){return t===e||t!=t&&e!=e}(st&&Zt(new st(new ArrayBuffer(1)))!=A||lt&&Zt(new lt)!=v||pt&&"[object Promise]"!=Zt(pt.resolve())||ht&&Zt(new ht)!=x||dt&&"[object WeakMap]"!=Zt(new dt))&&(Zt=function(t){var e=St(t),r=e==_?t.constructor:void 0,n=r?Dt(r):"";if(n)switch(n){case vt:return A;case bt:return v;case gt:return"[object Promise]";case _t:return x;case jt:return"[object WeakMap]"}return e});var $t=Rt(function(){return arguments}())?Rt:function(t){return Jt(t)&&K.call(t,"callee")&&!ot.call(t,"callee")},Bt=Array.isArray;var Gt=ct||function(){return!1};function Vt(t){if(!Ht(t))return!1;var e=St(t);return e==d||e==y||e==s||e==j}function Yt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=u}function Ht(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Jt(t){return null!=t&&"object"==typeof t}var Kt=N?function(t){return function(e){return t(e)}}(N):function(t){return Jt(t)&&Yt(t.length)&&!!S[St(t)]};function Qt(t){return null!=(e=t)&&Yt(e.length)&&!Vt(e)?zt(t):Tt(t);var e}r.exports=function(t,e){return Pt(t,e)}}).call(e,r(4),r(8)(t))},function(t,e,r){"use strict";r.d(e,"a",function(){return c});var n=r(0),o=r.n(n),i=r(9),a=r.n(i),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};var c=function(){function t(e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.children=[],this.attrs={},this.tagName=e,this}return t.prototype.append=function(e){var r=new t(e);return this.children.push(r),r},t.prototype.attr=function(t,e){return this.attrs[a()(t)]=e,this},t.prototype.toReact=function(t){var e=this.children.map(function(e){return e.toReact(t)}),r={component:t[this.tagName]};return this.tagName?o.a.createElement(r.component,u({},this.attrs,{key:this.attrs.id||(Math.random().toString(36)+"00000000000000000").replace(/[^a-z]+/g,"").slice(0,5)}),e):e[0]},t}()},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){t.exports=r(6)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(7),o=r(10),i=r(11);e.default={Circles:n.a,Lines:o.a,Paths:i.a}},function(t,e,r){"use strict";r.d(e,"a",function(){return l});var n,o,i=r(0),a=(r.n(i),r(1)),u=r(2),c=r.n(u),f=r(3);function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=(o=n=function(t){function e(){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=s(this,t.call.apply(t,[this].concat(i))),n.state={pattern:null},s(n,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){this.generate()},e.prototype.componentDidUpdate=function(t){c()(t,this.props)||this.generate()},e.prototype.generate=function(){var t=this,e=a.a.circles();["size","strokeWidth","stroke","fill","background","id","complement","radius"].forEach(function(r){t.props[r]&&e[r](t.props[r])});var r=new f.a;e(r),this.setState({pattern:r.toReact(this.props.components)})},e.prototype.render=function(){return this.state.pattern},e}(i.Component),n.displayName="Circles",n.defaultProps={components:{defs:"defs",g:"g",circle:"circle",rect:"rect",pattern:"pattern",path:"path"}},o)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){(function(e){var r=1/0,n="[object Symbol]",o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",u="[\\ud800-\\udfff]",c="["+a+"]",f="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",s="\\d+",l="[\\u2700-\\u27bf]",p="[a-z\\xdf-\\xf6\\xf8-\\xff]",h="[^\\ud800-\\udfff"+a+s+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",d="\\ud83c[\\udffb-\\udfff]",y="[^\\ud800-\\udfff]",v="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",g="[A-Z\\xc0-\\xd6\\xd8-\\xde]",_="(?:"+p+"|"+h+")",j="(?:"+g+"|"+h+")",w="(?:"+f+"|"+d+")"+"?",x="[\\ufe0e\\ufe0f]?"+w+("(?:\\u200d(?:"+[y,v,b].join("|")+")[\\ufe0e\\ufe0f]?"+w+")*"),m="(?:"+[l,v,b].join("|")+")"+x,O="(?:"+[y+f+"?",f,v,b,u].join("|")+")",M=RegExp("['’]","g"),k=RegExp(f,"g"),A=RegExp(d+"(?="+d+")|"+O+x,"g"),z=RegExp([g+"?"+p+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[c,g,"$"].join("|")+")",j+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[c,g+_,"$"].join("|")+")",g+"?"+_+"+(?:['’](?:d|ll|m|re|s|t|ve))?",g+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",s,m].join("|"),"g"),E=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),S=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,R="object"==typeof e&&e&&e.Object===Object&&e,P="object"==typeof self&&self&&self.Object===Object&&self,U=R||P||Function("return this")();var T,C=(T={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==T?void 0:T[t]});function L(t){return E.test(t)}function I(t){return L(t)?function(t){return t.match(A)||[]}(t):function(t){return t.split("")}(t)}var W=Object.prototype.toString,N=U.Symbol,Z=N?N.prototype:void 0,q=Z?Z.toString:void 0;function D(t){if("string"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&W.call(t)==n}(t))return q?q.call(t):"";var e=t+"";return"0"==e&&1/t==-r?"-0":e}function F(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:function(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}(t,e,r)}function $(t){return null==t?"":D(t)}var B,G=(B=function(t,e,r){return e=e.toLowerCase(),t+(r?Y($(e).toLowerCase()):e)},function(t){return function(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}(function(t,e,r){return t=$(t),void 0===(e=r?void 0:e)?function(t){return S.test(t)}(t)?function(t){return t.match(z)||[]}(t):function(t){return t.match(o)||[]}(t):t.match(e)||[]}(function(t){return(t=$(t))&&t.replace(i,C).replace(k,"")}(t).replace(M,"")),B,"")});var V,Y=(V="toUpperCase",function(t){var e=L(t=$(t))?I(t):void 0,r=e?e[0]:t.charAt(0),n=e?F(e,1).join(""):t.slice(1);return r[V]()+n});t.exports=G}).call(e,r(4))},function(t,e,r){"use strict";r.d(e,"a",function(){return l});var n,o,i=r(0),a=(r.n(i),r(1)),u=r(2),c=r.n(u),f=r(3);function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=(o=n=function(t){function e(){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=s(this,t.call.apply(t,[this].concat(i))),n.state={pattern:null},s(n,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){this.generate()},e.prototype.componentDidUpdate=function(t){c()(t,this.props)||this.generate()},e.prototype.generate=function(){var t=this,e=a.a.lines();["size","strokeWidth","orientation","shapeRendering","stroke","background","id"].forEach(function(r){t.props[r]&&e[r](t.props[r])});var r=new f.a;e(r),this.setState({pattern:r.toReact(this.props.components)})},e.prototype.render=function(){return this.state.pattern},e}(i.Component),n.displayName="Lines",n.defaultProps={components:{defs:"defs",g:"g",circle:"circle",rect:"rect",pattern:"pattern",path:"path"}},o)},function(t,e,r){"use strict";r.d(e,"a",function(){return l});var n,o,i=r(0),a=(r.n(i),r(1)),u=r(2),c=r.n(u),f=r(3);function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=(o=n=function(t){function e(){var r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=s(this,t.call.apply(t,[this].concat(i))),n.state={pattern:null},s(n,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){this.generate()},e.prototype.componentDidUpdate=function(t){c()(t,this.props)||this.generate()},e.prototype.generate=function(){var t=this,e=a.a.paths();["size","strokeWidth","shapeRendering","stroke","background","id","d"].forEach(function(r){t.props[r]&&e[r](t.props[r])});var r=new f.a;e(r),this.setState({pattern:r.toReact(this.props.components)})},e.prototype.render=function(){return this.state.pattern},e}(i.Component),n.displayName="Paths",n.defaultProps={components:{defs:"defs",g:"g",circle:"circle",rect:"rect",pattern:"pattern",path:"path"}},o)}]).default}); //# sourceMappingURL=react-svg-textures.min.js.map