관리-도구
편집 파일: 875-d636511a3d1416563e14.js
"use strict";(self.webpackChunkfont_awesome_admin=self.webpackChunkfont_awesome_admin||[]).push([[875],{2875:(i,t,e)=>{e.r(t),e.d(t,{fa_icon:()=>o});var s=e(858),n=e(9327);let o=class{constructor(i){(0,s.r)(this,i),this.pro=!1,this.loading=!1}componentWillLoad(){if(this.iconUpload)return void(this.iconDefinition={prefix:this.stylePrefix,iconName:this.iconUpload.name,icon:[parseInt(`${this.iconUpload.width}`),parseInt(`${this.iconUpload.height}`),[],this.iconUpload.unicode.toString(16),this.iconUpload.pathData]});if(this.icon)return void(this.iconDefinition=this.icon);if(!this.svgApi)return void console.error(`${n.C}: fa-icon: svgApi prop is needed but is missing`,this);if(!this.stylePrefix||!this.name)return void console.error(`${n.C}: fa-icon: the 'stylePrefix' and 'name' props are needed to render this icon but not provided.`,this);if(!this.familyStylePathSegment)return void console.error(`${n.C}: fa-icon: the 'familyStylePathSegment' prop is required to render this icon but not provided.`,this);const{findIconDefinition:i}=this.svgApi,t=i&&i({prefix:this.stylePrefix,iconName:this.name});if(t)return void(this.iconDefinition=t);if(!this.pro)return void console.error(`${n.C}: fa-icon: 'pro' prop is false but no free icon is available`,this);if(!this.svgFetchBaseUrl)return void console.error(`${n.C}: fa-icon: 'svgFetchBaseUrl' prop is absent but is necessary for fetching icon`,this);if(!this.kitToken)return void console.error(`${n.C}: fa-icon: 'kitToken' prop is absent but is necessary for accessing icon`,this);this.loading=!0;const e=`${this.svgFetchBaseUrl}/${this.familyStylePathSegment}/${this.name}.svg?token=${this.kitToken}`,s=n.l.get(this,"svgApi.library");"function"==typeof this.getUrlText?this.getUrlText(e).then((i=>{const t={iconName:this.name,prefix:this.stylePrefix,icon:(0,n.p)(i)};s&&s.add(t),this.iconDefinition=Object.assign({},t)})).catch((i=>{console.error(`${n.C}: fa-icon: failed when using 'getUrlText' to fetch icon`,i,this)})).finally((()=>{this.loading=!1})):console.error(`${n.C}: fa-icon: 'getUrlText' prop is absent but is necessary for fetching icon`,this)}buildSvg(i,t){if(!i)return;const[e,o,,,r]=n.l.get(i,"icon",[]),h=["svg-inline--fa"];this.class&&h.push(this.class),t&&h.push(t),this.size&&h.push(`fa-${this.size}`);const a=h.join(" ");return Array.isArray(r)?(0,s.h)("svg",{class:a,xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${e} ${o}`},(0,s.h)("path",{fill:"currentColor",class:"fa-primary",d:r[1]}),(0,s.h)("path",{fill:"currentColor",class:"fa-secondary",d:r[0]})):(0,s.h)("svg",{class:a,xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${e} ${o}`},(0,s.h)("path",{fill:"currentColor",d:r}))}render(){return this.iconDefinition?this.buildSvg(this.iconDefinition):(0,s.h)(s.f,null)}};o.style=""}}]);