관리-도구
편집 파일: 11-f4e0d4ea802034051616.js
(window.webpackJsonp_font_awesome_admin=window.webpackJsonp_font_awesome_admin||[]).push([[11],{168:function(e,t,o){"use strict";var n=o(152);const a=n.createInterpolateElement||n.__experimentalCreateInterpolateElement;t.a=a},280:function(e,t,o){var n={"./fa-icon-chooser.entry.js":[282,3,15],"./fa-icon.entry.js":[283,3,16]};function a(e){if(!o.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],a=t[0];return Promise.all(t.slice(1).map(o.e)).then((function(){return o(a)}))}a.keys=function(){return Object.keys(n)},a.id=280,e.exports=a},294:function(e,t,o){"use strict";o.r(t),o.d(t,"setupIconChooser",(function(){return E}));var n=o(0),a=o.n(n),r=o(149),s=o.n(r),i=o(154),c=o(293),l=o(150),m=o(168),d=e=>{const{onSubmit:t,kitToken:o,version:n,pro:a,handleQuery:d,modalOpenEvent:u,getUrlText:h,settingsPageUrl:f}=e,[w,p]=Object(r.useState)(!1);document.addEventListener(u.type,()=>p(!0));const g=()=>p(!1),_=!!a&&!o;return s.a.createElement(s.a.Fragment,null,w&&s.a.createElement(i.Modal,{title:"Add a Font Awesome Icon",onRequestClose:g},_&&s.a.createElement("div",{style:{margin:"1em",backgroundColor:"#FFD200",padding:"1em",borderRadius:".5em",fontSize:"15px"}},Object(l.__)("Looking for Pro icons and styles? You’ll need to use a kit. ","font-awesome"),s.a.createElement("a",{href:f},Object(l.__)("Go to Font Awesome Plugin Settings","font-awesome"))),s.a.createElement(c.a,{version:n,kitToken:o,handleQuery:d,getUrlText:h,onFinish:e=>(e=>{"function"==typeof t&&t(e),g()})(e),searchInputPlaceholder:Object(l.__)("Find icons by name, category, or keyword","font-awesome")},s.a.createElement("span",{slot:"fatal-error-heading"},Object(l.__)("Well, this is awkward...","font-awesome")),s.a.createElement("span",{slot:"fatal-error-detail"},Object(l.__)("Something has gone horribly wrong. Check the console for additional error information.","font-awesome")),s.a.createElement("span",{slot:"start-view-heading"},Object(l.__)("Font Awesome is the web's most popular icon set, with tons of icons in a variety of styles.","font-awesome")),s.a.createElement("span",{slot:"start-view-detail"},Object(m.a)(Object(l.__)("Not sure where to start? Here are some favorites, or try a search for <strong>spinners</strong>, <strong>shopping</strong>, <strong>food</strong>, or <strong>whatever you're looking for</strong>.","font-awesome"),{strong:s.a.createElement("strong",null)})),s.a.createElement("span",{slot:"search-field-label-free"},Object(l.__)("Search Font Awesome Free Icons in Version","font-awesome")),s.a.createElement("span",{slot:"search-field-label-pro"},Object(l.__)("Search Font Awesome Pro Icons in Version","font-awesome")),s.a.createElement("span",{slot:"searching-free"},Object(l.__)("You're searching Font Awesome Free icons in version","font-awesome")),s.a.createElement("span",{slot:"searching-pro"},Object(l.__)("You're searching Font Awesome Pro icons in version","font-awesome")),s.a.createElement("span",{slot:"light-requires-pro"},Object(l.__)("You need to use a Pro kit to get Light icons.","font-awesome")),s.a.createElement("span",{slot:"thin-requires-pro"},Object(l.__)("You need to use a Pro kit with Version 6 to get Thin icons.","font-awesome")),s.a.createElement("span",{slot:"duotone-requires-pro"},Object(l.__)("You need to use a Pro kit with Version 5.10 or later to get Duotone icons.","font-awesome")),s.a.createElement("span",{slot:"uploaded-requires-pro"},Object(l.__)("You need to use a Pro kit to get Uploaded icons.","font-awesome")),s.a.createElement("span",{slot:"kit-has-no-uploaded-icons"},Object(l.__)("This kit contains no uploaded icons.","font-awesome")),s.a.createElement("span",{slot:"no-search-results-heading"},Object(l.__)("Sorry, we couldn't find anything for that.","font-awesome")),s.a.createElement("span",{slot:"no-search-results-detail"},Object(l.__)("You might try a different search...","font-awesome")),s.a.createElement("span",{slot:"suggest-icon-upload"},Object(m.a)(Object(l.__)("Or <a>upload your own icon</a> to a Pro kit!","font-awesome"),{a:s.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://fontawesome.com/v5.15/how-to-use/on-the-web/using-kits/uploading-icons"})})),s.a.createElement("span",{slot:"get-fontawesome-pro"},Object(m.a)(Object(l.__)("Or <a>use Font Awesome Pro</a> for more icons and styles!","font-awesome"),{a:s.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://fontawesome.com/"})})),s.a.createElement("span",{slot:"initial-loading-view-heading"},Object(l.__)("Fetching icons","font-awesome")),s.a.createElement("span",{slot:"initial-loading-view-detail"},Object(l.__)("When this thing gets up to 88 mph...","font-awesome")))))};function u(e){const t=[];if(!e.iconName)return void console.error("Font Awesome Icon Chooser: missing required iconName attribute for shortcode");t.push(`name="${e.iconName}"`);const o=["prefix","style","class","aria-hidden","aria-label","aria-labelledby","title","role"];for(const n of o){const o=a()(e,n);o&&t.push(`${n}="${o}"`)}return`[icon ${t.join(" ")}]`}var h=o(152),f=o(155),w=o(156),p=o(151),g=o.n(p);function _(e){const t=a()(window,"wp.media.editor.insert");t&&t(u(e.detail))}let b=!1;function E(e){const t={...e,modalOpenEvent:new Event("fontAwesomeIconChooserOpen",{bubbles:!0,cancelable:!1})};return window.__FontAwesomeOfficialPlugin__openIconChooserModal=()=>{document.dispatchEvent(t.modalOpenEvent)},a()(e,"isGutenbergPage")&&function(e){const t="font-awesome/icon",o=Object(l.__)("Font Awesome Icon"),{modalOpenEvent:n,kitToken:a,version:r,pro:s,handleQuery:c,getUrlText:m,settingsPageUrl:p}=e;Object(f.registerFormatType)(t,{name:t,title:Object(l.__)("Font Awesome Icon"),keywords:[Object(l.__)("icon"),Object(l.__)("font awesome")],tagName:"i",className:null,object:!1,edit:class extends h.Component{constructor(e){super(...arguments),this.handleFormatButtonClick=this.handleFormatButtonClick.bind(this),this.handleSelect=this.handleSelect.bind(this)}handleFormatButtonClick(){document.dispatchEvent(n)}handleSelect(e){const{value:t,onChange:o}=this.props;if(!e.detail)return;const n=u(e.detail);o(Object(f.insert)(t,n))}render(){return React.createElement(h.Fragment,null,React.createElement(w.RichTextToolbarButton,{icon:React.createElement(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:"svg-inline--fa fa-font-awesome fa-w-14"},React.createElement(i.Path,{fill:"currentColor",d:"M397.8 32H50.2C22.7 32 0 54.7 0 82.2v347.6C0 457.3 22.7 480 50.2 480h347.6c27.5 0 50.2-22.7 50.2-50.2V82.2c0-27.5-22.7-50.2-50.2-50.2zm-45.4 284.3c0 4.2-3.6 6-7.8 7.8-16.7 7.2-34.6 13.7-53.8 13.7-26.9 0-39.4-16.7-71.7-16.7-23.3 0-47.8 8.4-67.5 17.3-1.2.6-2.4.6-3.6 1.2V385c0 1.8 0 3.6-.6 4.8v1.2c-2.4 8.4-10.2 14.3-19.1 14.3-11.3 0-20.3-9-20.3-20.3V166.4c-7.8-6-13.1-15.5-13.1-26.3 0-18.5 14.9-33.5 33.5-33.5 18.5 0 33.5 14.9 33.5 33.5 0 10.8-4.8 20.3-13.1 26.3v18.5c1.8-.6 3.6-1.2 5.4-2.4 18.5-7.8 40.6-14.3 61.5-14.3 22.7 0 40.6 6 60.9 13.7 4.2 1.8 8.4 2.4 13.1 2.4 22.7 0 47.8-16.1 53.8-16.1 4.8 0 9 3.6 9 7.8v140.3z"})),title:o,onClick:this.handleFormatButtonClick}),React.createElement(d,{modalOpenEvent:n,kitToken:a,version:r,pro:s,settingsPageUrl:p,handleQuery:c,onSubmit:this.handleSelect,getUrlText:m}))}}})}(t),{setupClassicEditorIconChooser:()=>function(e){b||window.tinymce&&(!function(e){const{iconChooserContainerId:t,modalOpenEvent:n,kitToken:a,version:r,pro:i,handleQuery:c,getUrlText:l,settingsPageUrl:m}=e,u=document.querySelector("#"+t);if(!u)return;if(!window.tinymce)return;let h=!1;h||(h=!0,o.e(13).then(o.bind(null,291)).then(()=>{}).catch(e=>console.error("Font Awesome Plugin failed to load styles for the Icon Chooser in the Classic Editor",e))),g.a.render(s.a.createElement(d,{kitToken:a,version:r,pro:i,modalOpenEvent:n,handleQuery:c,settingsPageUrl:m,onSubmit:_,getUrlText:l}),u)}({...e,iconChooserContainerId:"font-awesome-icon-chooser-container",iconChooserMediaButtonClass:"font-awesome-icon-chooser-media-button"}),b=!0)}(t)}}}}]);