boxicons/static/dist/1.bundle.js
2018-06-30 01:30:13 +05:30

2 lines
No EOL
18 KiB
JavaScript

webpackJsonp([1],{452:function(e,n,t){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function r(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function l(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}function o(e){return(0,f.bindActionCreators)({changeSideIcon:m.changeSideIcon,setSelectedIcon:m.setSelectedIcon},e)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(n,t,a){return t&&e(n.prototype,t),a&&e(n,a),n}}(),c=t(5),u=a(c),d=t(54),f=t(47),m=t(77),h=t(455),g=a(h),p=t(456),b=a(p),v=t(78),E=a(v),N=t(36);g.default.registerLanguage("xml",b.default);var C=function(e){function n(e){i(this,n);var t=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state={color:"black",copied:!1,code:"<i class='bx bx-"+t.props.icon.name+"'></i>",colorChoiceDisplay:!1,animateChoiceDisplay:!1,rotate:0,animation:"none"},t.handleBoxClose=t.handleBoxClose.bind(t),t.handleColor=t.handleColor.bind(t),t.handleRotate=t.handleRotate.bind(t),t.copyCode=t.copyCode.bind(t),t.handleCurrentColor=t.handleCurrentColor.bind(t),t.handleAnimate=t.handleAnimate.bind(t),t.handleCurrentAnimation=t.handleCurrentAnimation.bind(t),t}return l(n,e),s(n,[{key:"componentDidMount",value:function(){document.querySelectorAll("code").forEach(function(e){g.default.highlightBlock(e)})}},{key:"componentDidUpdate",value:function(){document.querySelectorAll("code").forEach(function(e){g.default.highlightBlock(e)})}},{key:"componentWillReceiveProps",value:function(e){if(this.props.icon.name!==e.icon.name){var n="bx bx-"+e.icon.name;"none"!==this.state.animation&&(n+=" bx-"+this.state.animation),this.state.rotate>0&&(n+=" bx-rotate-"+this.state.rotate),this.setState({code:"<i class='"+n+"'></i>"})}}},{key:"handleRotate",value:function(){var e="bx bx-"+this.props.icon.name;"none"!==this.state.animation&&(e+=" bx-"+this.state.animation),this.state.rotate+90!==360?(this.setState({rotate:this.state.rotate+90}),e+=" bx-rotate-"+(this.state.rotate+90)):this.setState({rotate:0}),this.setState({code:"<i class='"+e+"'></i>"})}},{key:"handleAnimate",value:function(e){this.setState({animation:e}),this.setState({animateChoiceDisplay:!1});var n="bx bx-"+this.props.icon.name;"none"!==e&&(n+=" bx-"+e),this.state.rotate>0&&(n+=" bx-rotate-"+this.state.rotate),this.setState({code:"<i class='"+n+"'></i>"})}},{key:"handleColor",value:function(e){this.setState({color:e}),this.setState({colorChoiceDisplay:!1})}},{key:"handleCurrentColor",value:function(){this.setState({colorChoiceDisplay:!this.state.colorChoiceDisplay}),this.setState({animateChoiceDisplay:!1})}},{key:"handleCurrentAnimation",value:function(){this.setState({animateChoiceDisplay:!this.state.animateChoiceDisplay}),this.setState({colorChoiceDisplay:!1})}},{key:"copyCode",value:function(){document.querySelector("#code").select(),document.execCommand("copy"),this.setState({copied:!0}),setTimeout(function(){this.setState({copied:!1})}.bind(this),1e3)}},{key:"handleBoxClose",value:function(){this.props.changeSideIcon(!1),this.props.setSelectedIcon(null,null)}},{key:"render",value:function(){var e=this,n=(0,E.default)({active:this.state.copied,copied:!0}),t="/static/img/svg/"+this.props.icon.slug+".svg",a=this.props.icon;return u.default.createElement("div",{className:" "},u.default.createElement("div",{className:"icon "},u.default.createElement("div",{className:"box-bg "+this.state.color},u.default.createElement("i",{className:"bx bx-"+this.props.icon.slug+" bx-rotate-"+this.state.rotate+" bx-"+this.state.animation}),"white"===this.state.color&&u.default.createElement("div",{className:"blox-bg-overlay"})),u.default.createElement("div",{className:" icon-head"},u.default.createElement("div",{className:" icon-head-name"},a.name," ",u.default.createElement(N.Link,{to:"cheatsheet"},"Cheatsheet")),u.default.createElement("div",{className:" icon-footer"},u.default.createElement("div",{className:" icon-color"},this.state.colorChoiceDisplay&&u.default.createElement("div",{className:" color-choices"},u.default.createElement("div",{className:"color black",onClick:function(){return e.handleColor("black")}}),u.default.createElement("div",{className:"color orange",onClick:function(){return e.handleColor("orange")}}),u.default.createElement("div",{className:"color yellow",onClick:function(){return e.handleColor("yellow")}}),u.default.createElement("div",{className:"color green",onClick:function(){return e.handleColor("green")}}),u.default.createElement("div",{className:"color blue",onClick:function(){return e.handleColor("blue")}}),u.default.createElement("div",{className:"color purple",onClick:function(){return e.handleColor("purple")}}),u.default.createElement("div",{className:"color red",onClick:function(){return e.handleColor("red")}}),u.default.createElement("div",{className:"color white",onClick:function(){return e.handleColor("white")}})),u.default.createElement("div",{className:" current-color",onClick:this.handleCurrentColor},u.default.createElement("div",{className:"color "+this.state.color}))),u.default.createElement("div",{className:"icon-rotate",onClick:this.handleRotate},u.default.createElement("i",{className:"bx bx-rotate"})),u.default.createElement("div",{className:"animate-box"},u.default.createElement("div",{className:"icon-animate",onClick:this.handleCurrentAnimation},u.default.createElement("i",{className:"bx bx-play"})),this.state.animateChoiceDisplay&&u.default.createElement("div",{className:"animate-choices"},u.default.createElement("div",{className:"animate tada",onClick:function(){return e.handleAnimate("tada")}},"tada"),u.default.createElement("div",{className:"animate flashing",onClick:function(){return e.handleAnimate("flashing")}},"flashing"),u.default.createElement("div",{className:"animate burst",onClick:function(){return e.handleAnimate("burst")}},"burst"),u.default.createElement("div",{className:"animate spin",onClick:function(){return e.handleAnimate("spin")}},"spin"),u.default.createElement("div",{className:"animate fade-left",onClick:function(){return e.handleAnimate("fade-left")}},"fade-left"),u.default.createElement("div",{className:"animate fade-right",onClick:function(){return e.handleAnimate("fade-right")}},"fade-right"),u.default.createElement("div",{className:"animate none",onClick:function(){return e.handleAnimate("none")}},"none"))),u.default.createElement("div",{className:"icon-code",onClick:this.copyCode},u.default.createElement("pre",null," ",u.default.createElement("code",{className:"html"},this.state.code)),u.default.createElement("input",{className:"hidden",type:"text",onChange:function(){},value:this.state.code,id:"code"}),u.default.createElement("div",{className:n},"Copied ",u.default.createElement("i",{className:"bx bx-check"}))))),u.default.createElement("div",{className:"icon-buttons "},u.default.createElement("a",{href:t,download:"boxicon-"+a.name,className:"button icon-download "},u.default.createElement("i",{className:"bx bx-download"}),u.default.createElement("div",{className:"button-name"},"SVG"))),u.default.createElement("div",{className:"icon-close",onClick:this.handleBoxClose},u.default.createElement("i",{className:"bx bx-x"}))))}}]),n}(c.Component);n.default=(0,d.connect)(null,o)(C)},455:function(e,n,t){!function(e){"object"==typeof window&&window||"object"==typeof self&&self;e(n)}(function(e){function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function a(e,n){var t=e&&e.exec(n);return t&&0===t.index}function i(e){return w.test(e)}function r(e){var n,t,a,r,l=e.className+" ";if(l+=e.parentNode?e.parentNode.className:"",t=k.exec(l))return C(t[1])?t[1]:"no-highlight";for(l=l.split(/\s+/),n=0,a=l.length;n<a;n++)if(r=l[n],i(r)||C(r))return r}function l(e){var n,t={},a=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return a.forEach(function(e){for(n in e)t[n]=e[n]}),t}function o(e){var n=[];return function e(a,i){for(var r=a.firstChild;r;r=r.nextSibling)3===r.nodeType?i+=r.nodeValue.length:1===r.nodeType&&(n.push({event:"start",offset:i,node:r}),i=e(r,i),t(r).match(/br|hr|img|input/)||n.push({event:"stop",offset:i,node:r}));return i}(e,0),n}function s(e,a,i){function r(){return e.length&&a.length?e[0].offset!==a[0].offset?e[0].offset<a[0].offset?e:a:"start"===a[0].event?e:a:e.length?e:a}function l(e){function a(e){return" "+e.nodeName+'="'+n(e.value).replace('"',"&quot;")+'"'}u+="<"+t(e)+y.map.call(e.attributes,a).join("")+">"}function o(e){u+="</"+t(e)+">"}function s(e){("start"===e.event?l:o)(e.node)}for(var c=0,u="",d=[];e.length||a.length;){var f=r();if(u+=n(i.substring(c,f[0].offset)),c=f[0].offset,f===e){d.reverse().forEach(o);do{s(f.splice(0,1)[0]),f=r()}while(f===e&&f.length&&f[0].offset===c);d.reverse().forEach(l)}else"start"===f[0].event?d.push(f[0].node):d.pop(),s(f.splice(0,1)[0])}return u+n(i.substr(c))}function c(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map(function(n){return l(e,{variants:null},n)})),e.cached_variants||e.endsWithParent&&[l(e)]||[e]}function u(e){function n(e){return e&&e.source||e}function t(t,a){return new RegExp(n(t),"m"+(e.case_insensitive?"i":"")+(a?"g":""))}function a(i,r){if(!i.compiled){if(i.compiled=!0,i.keywords=i.keywords||i.beginKeywords,i.keywords){var l={},o=function(n,t){e.case_insensitive&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");l[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof i.keywords?o("keyword",i.keywords):x(i.keywords).forEach(function(e){o(e,i.keywords[e])}),i.keywords=l}i.lexemesRe=t(i.lexemes||/\w+/,!0),r&&(i.beginKeywords&&(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")\\b"),i.begin||(i.begin=/\B|\b/),i.beginRe=t(i.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(i.endRe=t(i.end)),i.terminator_end=n(i.end)||"",i.endsWithParent&&r.terminator_end&&(i.terminator_end+=(i.end?"|":"")+r.terminator_end)),i.illegal&&(i.illegalRe=t(i.illegal)),null==i.relevance&&(i.relevance=1),i.contains||(i.contains=[]),i.contains=Array.prototype.concat.apply([],i.contains.map(function(e){return c("self"===e?i:e)})),i.contains.forEach(function(e){a(e,i)}),i.starts&&a(i.starts,r);var s=i.contains.map(function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin}).concat([i.terminator_end,i.illegal]).map(n).filter(Boolean);i.terminators=s.length?t(s.join("|"),!0):{exec:function(){return null}}}}a(e)}function d(e,t,i,r){function l(e,n){var t,i;for(t=0,i=n.contains.length;t<i;t++)if(a(n.contains[t].beginRe,e))return n.contains[t]}function o(e,n){if(a(e.endRe,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}if(e.endsWithParent)return o(e.parent,n)}function s(e,n){return!i&&a(n.illegalRe,e)}function c(e,n){var t=E.case_insensitive?n[0].toLowerCase():n[0];return e.keywords.hasOwnProperty(t)&&e.keywords[t]}function m(e,n,t,a){var i=a?"":M.classPrefix,r='<span class="'+i,l=t?"":A;return(r+=e+'">')+n+l}function h(){var e,t,a,i;if(!y.keywords)return n(w);for(i="",t=0,y.lexemesRe.lastIndex=0,a=y.lexemesRe.exec(w);a;)i+=n(w.substring(t,a.index)),e=c(y,a),e?(k+=e[1],i+=m(e[0],n(a[0]))):i+=n(a[0]),t=y.lexemesRe.lastIndex,a=y.lexemesRe.exec(w);return i+n(w.substr(t))}function g(){var e="string"==typeof y.subLanguage;if(e&&!_[y.subLanguage])return n(w);var t=e?d(y.subLanguage,w,!0,x[y.subLanguage]):f(w,y.subLanguage.length?y.subLanguage:void 0);return y.relevance>0&&(k+=t.relevance),e&&(x[y.subLanguage]=t.top),m(t.language,t.value,!1,!0)}function p(){R+=null!=y.subLanguage?g():h(),w=""}function b(e){R+=e.className?m(e.className,"",!0):"",y=Object.create(e,{parent:{value:y}})}function v(e,n){if(w+=e,null==n)return p(),0;var t=l(n,y);if(t)return t.skip?w+=n:(t.excludeBegin&&(w+=n),p(),t.returnBegin||t.excludeBegin||(w=n)),b(t,n),t.returnBegin?0:n.length;var a=o(y,n);if(a){var i=y;i.skip?w+=n:(i.returnEnd||i.excludeEnd||(w+=n),p(),i.excludeEnd&&(w=n));do{y.className&&(R+=A),y.skip||(k+=y.relevance),y=y.parent}while(y!==a.parent);return a.starts&&b(a.starts,""),i.returnEnd?0:n.length}if(s(n,y))throw new Error('Illegal lexeme "'+n+'" for mode "'+(y.className||"<unnamed>")+'"');return w+=n,n.length||1}var E=C(e);if(!E)throw new Error('Unknown language: "'+e+'"');u(E);var N,y=r||E,x={},R="";for(N=y;N!==E;N=N.parent)N.className&&(R=m(N.className,"",!0)+R);var w="",k=0;try{for(var S,O,D=0;;){if(y.terminators.lastIndex=D,!(S=y.terminators.exec(t)))break;O=v(t.substring(D,S.index),S[0]),D=S.index+O}for(v(t.substr(D)),N=y;N.parent;N=N.parent)N.className&&(R+=A);return{relevance:k,value:R,language:e,top:y}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{relevance:0,value:n(t)};throw e}}function f(e,t){t=t||M.languages||x(_);var a={relevance:0,value:n(e)},i=a;return t.filter(C).forEach(function(n){var t=d(n,e,!1);t.language=n,t.relevance>i.relevance&&(i=t),t.relevance>a.relevance&&(i=a,a=t)}),i.language&&(a.second_best=i),a}function m(e){return M.tabReplace||M.useBR?e.replace(S,function(e,n){return M.useBR&&"\n"===e?"<br>":M.tabReplace?n.replace(/\t/g,M.tabReplace):""}):e}function h(e,n,t){var a=n?R[n]:t,i=[e.trim()];return e.match(/\bhljs\b/)||i.push("hljs"),-1===e.indexOf(a)&&i.push(a),i.join(" ").trim()}function g(e){var n,t,a,l,c,u=r(e);i(u)||(M.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,c=n.textContent,a=u?d(u,c,!0):f(c),t=o(n),t.length&&(l=document.createElementNS("http://www.w3.org/1999/xhtml","div"),l.innerHTML=a.value,a.value=s(t,o(l),c)),a.value=m(a.value),e.innerHTML=a.value,e.className=h(e.className,u,a.language),e.result={language:a.language,re:a.relevance},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.relevance}))}function p(e){M=l(M,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");y.forEach.call(e,g)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function E(n,t){var a=_[n]=t(e);a.aliases&&a.aliases.forEach(function(e){R[e]=n})}function N(){return x(_)}function C(e){return e=(e||"").toLowerCase(),_[e]||_[R[e]]}var y=[],x=Object.keys,_={},R={},w=/^(no-?highlight|plain|text)$/i,k=/\blang(?:uage)?-([\w-]+)\b/i,S=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,A="</span>",M={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=d,e.highlightAuto=f,e.fixMarkup=m,e.highlightBlock=g,e.configure=p,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=E,e.listLanguages=N,e.getLanguage=C,e.inherit=l,e.IDENT_RE="[a-zA-Z]\\w*",e.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",e.NUMBER_RE="\\b\\d+(\\.\\d+)?",e.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BINARY_NUMBER_RE="\\b(0b[01]+)",e.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},e.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.COMMENT=function(n,t,a){var i=e.inherit({className:"comment",begin:n,end:t,contains:[]},a||{});return i.contains.push(e.PHRASAL_WORDS_MODE),i.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),i},e.C_LINE_COMMENT_MODE=e.COMMENT("//","$"),e.C_BLOCK_COMMENT_MODE=e.COMMENT("/\\*","\\*/"),e.HASH_COMMENT_MODE=e.COMMENT("#","$"),e.NUMBER_MODE={className:"number",begin:e.NUMBER_RE,relevance:0},e.C_NUMBER_MODE={className:"number",begin:e.C_NUMBER_RE,relevance:0},e.BINARY_NUMBER_MODE={className:"number",begin:e.BINARY_NUMBER_RE,relevance:0},e.CSS_NUMBER_MODE={className:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},e.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}]},e.TITLE_MODE={className:"title",begin:e.IDENT_RE,relevance:0},e.UNDERSCORE_TITLE_MODE={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},e.METHOD_GUARD={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,relevance:0},e})},456:function(e,n){e.exports=function(e){var n={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],case_insensitive:!0,contains:[{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0}]},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{name:"style"},contains:[n],starts:{end:"</style>",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{name:"script"},contains:[n],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"meta",variants:[{begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?\w+/,end:/\?>/}]},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},n]}]}}}});
//# sourceMappingURL=1.bundle.js.map