Files
tysweld.com/wp-content/plugins/font-awesome/admin/build/587-a5d6a5ee5ff2984ad16a.js
2025-02-24 22:33:42 +01:00

3 lines
27 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use strict";(self.webpackChunkfont_awesome_admin=self.webpackChunkfont_awesome_admin||[]).push([[587,27],{3119:(e,t,n)=>{n.d(t,{A:()=>p});var o=n(6677),s=n(5556),r=n.n(s);const a={alert:"lX8h3LbX6kaLN7_hLhlw","alert-icon":"nx2ZqeD9AnYnPnKHAqKJ","alert-title":"ovRzytWn5jGccLKV78T9","alert-message":"M_C6Dj_EqhO8IuY52iA6","alert-action":"liWjpcvKZkKaYPsJjQPA","alert-warning":"MLwfZfK5uVZOtIHI1cdt"};var i=n(6942),c=n.n(i),l=n(6784),u=n(6188);function d(e={}){return(0,o.createElement)("div",{className:c()(a.alert,a[`alert-${e.type}`]),role:"alert"},(0,o.createElement)("div",{className:a["alert-icon"]},function(e={}){switch(e.type){case"info":return(0,o.createElement)(l.g,{icon:u.iW_,title:"info",fixedWidth:!0});case"warning":default:return(0,o.createElement)(l.g,{icon:u.zpE,title:"warning",fixedWidth:!0});case"pending":return(0,o.createElement)(l.g,{icon:u.z1G,title:"pending",spin:!0,fixedWidth:!0});case"success":return(0,o.createElement)(l.g,{icon:u.Wcv,title:"success",fixedWidth:!0})}}(e)),(0,o.createElement)("div",{className:a["alert-message"]},(0,o.createElement)("h2",{className:a["alert-title"]},e.title),(0,o.createElement)("div",{className:a["alert-copy"]},e.children)))}d.propTypes={title:r().string.isRequired,type:r().oneOf(["info","warning","success","pending"]),children:r().oneOfType([r().object,r().string,r().arrayOf(r().element)]).isRequired};const p=d},192:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(6677),s=n(5556),r=n.n(s),a=n(2896),i=n(6312),c=n(2037),l=n.n(c),u=n(962),d=n.n(u),p=n(2806);const m=86400,f=3600,_=60;function E(e){const t=Math.floor(e/m),n=Math.floor((e-t*m)/f),o=Math.floor((e-(t*m+n*f))/_),s=e-(t*m+n*f+o*_);return d()([t,n,o,s].reduce(((e,t,n)=>(0===n&&0!==t?e.push(t.toString()):e.push(l()(t.toString(),2,"0")),e)),[]),(e=>e.match(/^[0]+$/))).join(":")}function g(e){const t=e-Math.floor(new Date/1e3);return t<0?0:t}function h({addDescription:e,children:t}){const n=(0,a.d4)((e=>e.detectConflictsUntil)),[s,r]=(0,o.useState)(g(n)),c=(0,a.wA)();return(0,o.useEffect)((()=>{let e=null;return g(n)>0?e=setTimeout((()=>r(g(n))),1e3):(r(E(0)),c({type:"CONFLICT_DETECTION_TIMER_EXPIRED"})),()=>e&&clearTimeout(e)}),[n,s,c]),s<=0?null:(0,o.createElement)("span",{className:i.A["conflict-detection-timer"]},E(s),!!e&&(s>60
/* translators: 1: space */?(0,p.sprintf)((0,p.__)("%1$sminutes left to browse your site for trouble","font-awesome")," ")
/* translators: 1: space */:(0,p.sprintf)((0,p.__)("%1$sseconds left to browse your site for trouble","font-awesome")," ")),t)}h.propTypes={addDescription:r().bool}},3002:(e,t,n)=>{n.d(t,{A:()=>d});var o=n(6677),s=n.n(o);var r=n(3119),a=n(2806);const i=(0,o.createElement)(r.A,{title:(0,a.__)("Whoops, this is embarrassing","font-awesome"),type:"warning"},(0,o.createElement)("p",null,(0,a.__)("Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome"))),c=function(){return(0,o.createElement)("div",{className:"iVV55iNB320NJJLspy7m"},i)};var l=n(9458);class u extends s().Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,t){console.group(l.V2),console.log(e),console.log(t),console.groupEnd(),this.setState({error:e,errorInfo:t})}render(){return this.state.error?(0,o.createElement)(c,null):this.props.children}}const d=u},8587:(e,t,n)=>{n.r(t),n.d(t,{CONFLICT_DETECTION_SHADOW_HOST_ID:()=>O,isConflictDetectionReporterMounted:()=>R,mountConflictDetectionReporter:()=>b});var o=n(6677),s=n(6175),r=n.n(s),a=n(2896),i=n(5027),c=n(6784),l=n(6188),u=n(3442),d=n(192),p=n(7091),m=n.n(p),f=n(1448),_=n.n(f),E=n(2806),g=n(3002);const h={running:{code:"Running",display:(0,E.__)("Running","font-awesome")},done:{code:"Done",display:(0,E.__)("Done","font-awesome")},submitting:{code:"Submitting",display:(0,E.__)("Submitting","font-awesome")},none:{code:"None",display:(0,E.__)("None","font-awesome")},error:{code:"Error",display:(0,E.__)("Error","font-awesome")},expired:{code:"Expired",display:(0,E.__)("Expired","font-awesome")},ready:{code:"Ready",display:(0,E.__)("Ready","font-awesome")},stopped:{code:"Stopped",display:(0,E.__)("Stopped","font-awesome")},stopping:{code:"Stopping",display:(0,E.__)("Stopping","font-awesome")},restarting:{code:"Restarting",display:(0,E.__)("Restarting","font-awesome")}},T={container:{position:"fixed",fontFamily:'"Helvetica Neue",Helvetica,Arial,sans-serif',right:"10px",bottom:"10px",width:"450px",height:"auto",maxHeight:"60%",border:"1px solid #CDD4DB",borderRadius:"3px",boxShadow:"1px 1px 5px 0 rgba(132,142,151,.3)",background:"#008DED",zIndex:"99",overflowY:"scroll",fontSize:"14px",lineHeight:"1.4em",color:"#fff"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"5px 20px",color:"#CAECFF"},content:{width:"100%",padding:"0 20px 10px 20px",boxSizing:"border-box"},adminEyesOnly:{margin:"0",fontSize:"12px"},h1:{margin:".3em 0",fontSize:"14px"},h2:{margin:".3em 0",fontSize:"18px"},p:{margin:".5em 0"},link:{color:"#fff"},tally:{display:"flex",alignItems:"center",margin:".5em 0",textAlign:"center"},count:{flexBasis:"1em",marginRight:"5px",fontWeight:"600",fontSize:"20px"},timerRow:{display:"flex",alignItems:"center",backgroundColor:"#0064B1",padding:"10px 20px",color:"#fff",fontWeight:"600"},button:{margin:"0 0 0 10px",border:"0",padding:"5px",backgroundColor:"transparent",color:"#fff",opacity:".7",cursor:"pointer"},badness:{padding:"20px 25px",backgroundColor:"#FFC100",color:"#202529"}},y=(N=function(){const e=(0,a.wA)(),t=(0,a.d4)((e=>e.settingsPageUrl)),n=`${t}&tab=ts`,s=(0,a.d4)((e=>e.activeAdminTab)),r=window.location.href.startsWith(t)&&s===u.HM,p=(0,a.d4)((e=>e.userAttemptedToStopScanner)),f=(0,a.d4)((e=>e.unregisteredClients)),g=(0,a.d4)((e=>e.unregisteredClientDetectionStatus.unregisteredClientsBeforeDetection)),y=(0,a.d4)((e=>e.unregisteredClientDetectionStatus.recentConflictsDetected)),N=(0,a.d4)((e=>!e.showConflictDetectionReporter)),S=(0,a.d4)((e=>N&&e.conflictDetectionScannerStatus.isSubmitting)),w=(0,a.d4)((e=>e.conflictDetectionScannerStatus.hasSubmitted&&e.conflictDetectionScannerStatus.success)),C=(0,a.d4)((e=>p&&!e.conflictDetectionScannerStatus.hasSubmitted)),I=(0,a.d4)((e=>p&&!C&&e.conflictDetectionScannerStatus.success)),D=(0,a.d4)((e=>{const{isSubmitting:t,hasSubmitted:n,success:o}=e.unregisteredClientDetectionStatus;return p?C?h.stopping:I?h.stopped:h.error:S?h.restarting:N?h.expired:w?h.ready:o&&0===m()(f)?h.none:o?h.done:t?h.submitting:n?h.error:h.running})),O=(0,a.d4)((e=>e.unregisteredClientDetectionStatus.message)),b=(0,o.createElement)("div",null,(0,o.createElement)("h2",{style:T.tally},(0,o.createElement)("span",null,m()(f))," ",(0,o.createElement)("span",null," ",(0,E.__)("Results to Review","font-awesome"))),(0,o.createElement)("p",{style:T.p},r?(0,E.__)("Manage results or restart the scanner here on the Troubleshoot tab.","font-awesome"):(0,o.createElement)(o.Fragment,null,(0,E.__)("Manage results or restart the scanner on the Troubleshoot tab.","font-awesome")," ",(0,o.createElement)("a",{href:n,style:T.link},(0,E.__)("Go","font-awesome"))))),R=(0,o.createElement)("div",null,(0,o.createElement)("div",{style:T.status},(0,o.createElement)("h2",{style:T.h2},(0,o.createElement)(c.g,{icon:l.dB,size:"sm",spin:!0})," ",(0,o.createElement)("span",null,D.display))));return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{style:T.header},(0,o.createElement)("h1",{style:T.h1},(0,E.__)("Font Awesome Conflict Scanner","font-awesome")),(0,o.createElement)("p",{style:T.adminEyesOnly},(0,E.__)("only admins can see this box","font-awesome"))),(0,o.createElement)("div",{style:T.content},{None:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:T.status},(0,o.createElement)("h2",{style:T.h2},(0,o.createElement)(c.g,{icon:l.y3I,size:"sm"})," ",(0,o.createElement)("span",null,(0,E.__)("All clear!","font-awesome"))),(0,o.createElement)("p",{style:T.p},(0,E.__)("No new conflicts found on this page.","font-awesome")))),Running:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:T.status},(0,o.createElement)("h2",{style:T.h2},(0,o.createElement)(c.g,{icon:l.dB,size:"sm",spin:!0})," ",(0,o.createElement)("span",null,(0,E.__)("Scanning","font-awesome"),"...")))),Restarting:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:T.status},(0,o.createElement)("h2",{style:T.h2},(0,o.createElement)(c.g,{icon:l.dB,size:"sm",spin:!0})," ",(0,o.createElement)("span",null,(0,E.__)("Restarting","font-awesome"),"...")))),Ready:(0,o.createElement)("div",null,(0,o.createElement)("div",null,(0,o.createElement)("h2",{style:T.h2},(0,o.createElement)(c.g,{icon:l.Wcv,size:"sm"})," ",(0,E.__)("Proton pack charged!","font-awesome")),(0,o.createElement)("p",{style:T.p},(0,E.__)("Wander through the pages of your web site and this scanner will track progress.","font-awesome")))),Submitting:R,Stopping:R,Done:(0,o.createElement)("div",null,(0,o.createElement)("div",{style:T.status},(0,o.createElement)("h2",{style:T.h2},(0,o.createElement)(c.g,{icon:l.SGM,size:"sm"})," ",(0,o.createElement)("span",null,(0,E.__)("Page scan complete","font-awesome")))),(0,o.createElement)("p",{style:T.tally},(0,o.createElement)("span",{style:T.count},m()(Object.keys(y).filter((e=>!_()(g,e)))))," ",(0,o.createElement)("span",null,(0,E.__)("new conflicts found on this page","font-awesome"))),(0,o.createElement)("p",{style:T.tally},(0,o.createElement)("span",{style:T.count},m()(f))," ",(0,o.createElement)("span",null,"total found"),r?(0,o.createElement)("span",null," (",(0,E.__)("manage conflicts here on the Troubleshoot tab","font-awesome"),")"):(0,o.createElement)("span",null," (",(0,o.createElement)("a",{href:n,style:T.link},(0,E.__)("manage","font-awesome")),")"))),Expired:b,Stopped:b,Error:(0,o.createElement)("div",null,(0,o.createElement)("h2",{style:T.h2},(0,o.createElement)(c.g,{icon:l.B0L})," ",(0,o.createElement)("span",null,(0,E.__)("Don't cross the streams! It would be bad.","font-awesome"))),(0,o.createElement)("p",{style:T.p},O))}[D.code]),(0,o.createElement)("div",{style:T.timerRow},(0,o.createElement)("span",null,(0,o.createElement)(d.A,{addDescription:!0},(0,o.createElement)("button",{style:T.button,title:(0,E.__)("Stop timer","font-awesome"),onClick:()=>(e((0,i.userAttemptToStopScanner)()),void e((0,i.setConflictDetectionScanner)({enable:!1})))},(0,o.createElement)(c.g,{icon:l.s0Q,size:"lg"})))),{Expired:(0,E.__)("Timer expired","font-awesome"),Stopped:(0,E.__)("Timer stopped","font-awesome"),Restarting:null}[D.code]))},class extends g.A{render(){return(0,o.createElement)("div",{style:T.container},this.state.error?(0,o.createElement)("div",{style:T.badness},(0,o.createElement)(c.g,{icon:l.zpE}),(0,E.__)(" Whoops, this is embarrassing! Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome")):(0,o.createElement)(N,null))}});var N,S=n(7107),w=n(4081),C=n.n(w),I=n(1073),D=n.n(I);const O="font-awesome-plugin-conflict-detection-shadow-host";function b(e){D()((()=>{const t=document.createElement("DIV");t.setAttribute("id",O),document.body.appendChild(t);const n=t.attachShadow({mode:"open"});C()(n);const s=document.createElement("STYLE"),i=S.tT.css(),c=document.createTextNode(i);s.appendChild(c);const l=document.createElement("DIV");n.appendChild(s),n.appendChild(l),r().render((0,o.createElement)(a.Kq,{store:e},(0,o.createElement)(y,null)),l)}))}function R(){const e=document.getElementById(O);return!!e&&!!e.shadowRoot}},5027:(e,t,n)=>{n.r(t),n.d(t,{CONFLICT_DETECTION_SCANNER_DURATION_MIN:()=>T,addPendingOption:()=>A,checkPreferenceConflicts:()=>F,chooseAwayFromKitConfig:()=>L,chooseIntoKitConfig:()=>B,preprocessResponse:()=>b,queryKits:()=>q,reportDetectedConflicts:()=>Y,resetOptionsFormState:()=>v,resetPendingBlocklistSubmissionStatus:()=>M,resetPendingOptions:()=>R,resetUnregisteredClientsDeletionStatus:()=>x,setActiveAdminTab:()=>H,setConflictDetectionScanner:()=>V,snoozeV3DeprecationWarning:()=>$,submitPendingBlocklist:()=>W,submitPendingOptions:()=>K,submitPendingUnregisteredClientDeletions:()=>k,updateApiToken:()=>G,updatePendingBlocklist:()=>U,updatePendingUnregisteredClientsForDeletion:()=>P,userAttemptToStopScanner:()=>z});var o=n(1083),s=n(8938),r=n.n(s),a=n(7091),i=n.n(a),c=n(8156),l=n.n(c),u=n(7309),d=n.n(u),p=n(9458),m=n(2806),f=n(1448),_=n.n(f);function E(e,t=0){let n=null,o=null;if("string"!=typeof e)return null;if(t>=e.length)return null;try{return n=JSON.parse(e.slice(t)),{start:t,parsed:n}}catch(n){const s=e.indexOf("[",t+1),r=e.indexOf("{",t+1);if(-1===s&&-1===r)return null;o=-1!==s&&-1!==r?s<r?s:r:-1!==r?r:s}return null===o?null:E(e,o)}const g=function(e){if(!e||""===e)return null;const t=E(e);if(null===t)return null;{const{start:n,parsed:o}=t;return{start:n,json:e.slice(n),trimmed:e.slice(0,n),parsed:o}}},h=o.A.create(),T=10,y=1,N=(0,m.__)("Couldn't save those changes","font-awesome"),S=(0,m.__)("Changes not saved because your WordPress server does not allow this kind of request. Look for details in the browser console.","font-awesome"),w=(0,m.__)("Couldn't check preferences","font-awesome"),C=(0,m.__)("A request to your WordPress server never received a response","font-awesome"),I=(0,m.__)("A request to your WordPress server failed","font-awesome"),D=(0,m.__)("Couldn't start the scanner","font-awesome"),O=(0,m.__)("Couldn't snooze","font-awesome");function b(e){const t=_()(e,"headers.fontawesome-confirmation");if(204===e.status&&""!==e.data)return(0,p.Ay)({error:null,confirmed:t,trimmed:e.data,expectEmpty:!0}),e.data={},e;const n=l()(e,"data",null),o="string"==typeof n&&i()(n)>0,s=o?g(n):{};o&&s&&(e.data=l()(s,"parsed"));const r=l()(s,"trimmed",""),a=l()(e,"data.errors",null);if(e.status>=400){if(a)e.uiMessage=(0,p.Ay)({error:e.data,confirmed:t,trimmed:r});else{const n=l()(e,"config.method","").toUpperCase(),o=l()(e,"config.url"),s=e.status,r=l()(e,"statusText"),a=(0,p.b3)(e),i=(0,p.cA)(l()(e,"headers",{})),c=(0,p.cA)(l()(e,"config.headers",{})),u=l()(e,"data");e.uiMessage=(0,p.Ay)({confirmed:t,requestData:a,requestMethod:n,requestUrl:o,responseHeaders:i,requestHeaders:c,responseStatus:s,responseStatusText:r,responseData:u}),405===s&&(e.uiMessage=S)}return e}if(e.status<400&&e.status>=300)return t&&""===r||(e.uiMessage=(0,p.Ay)({error:null,confirmed:t,trimmed:r})),e;if(a){const n=!0;return e.falsePositive=!0,e.uiMessage=(0,p.Ay)({error:e.data,confirmed:t,falsePositive:n,trimmed:r}),e}{const n=l()(e,"data.error",null);return n?(e.uiMessage=(0,p.Ay)({error:n,ok:!0,confirmed:t,trimmed:r}),e):(t||(e.uiMessage=(0,p.Ay)({error:null,ok:!0,confirmed:t,trimmed:r})),e)}}function R(){return{type:"RESET_PENDING_OPTIONS"}}function v(){return{type:"OPTIONS_FORM_STATE_RESET"}}function A(e){return function(t,n){const{options:o}=n();for(const[n,s]of r()(e))t(o[n]===s?{type:"RESET_PENDING_OPTION",change:{[n]:s}}:{type:"ADD_PENDING_OPTION",change:{[n]:s}})}}function P(e=[]){return{type:"UPDATE_PENDING_UNREGISTERED_CLIENTS_FOR_DELETION",data:e}}function x(){return{type:"DELETE_UNREGISTERED_CLIENTS_RESET"}}function M(){return{type:"BLOCKLIST_UPDATE_RESET"}}function k(){return function(e,t){const{apiNonce:n,apiUrl:o,unregisteredClientsDeletionStatus:s}=t(),r=l()(s,"pending",null);if(!r||0===i()(r))return;e({type:"DELETE_UNREGISTERED_CLIENTS_START"});const a=({uiMessage:t})=>{e({type:"DELETE_UNREGISTERED_CLIENTS_END",success:!1,message:t||N})};return h.delete(`${o}/conflict-detection/conflicts`,{data:r,headers:{"X-WP-Nonce":n}}).then((t=>{const{status:n,data:o,falsePositive:s}=t;s?a(t):e({type:"DELETE_UNREGISTERED_CLIENTS_END",success:!0,data:204===n?null:o,message:""})})).catch(a)}}function U(e=[]){return{type:"UPDATE_PENDING_BLOCKLIST",data:e}}function W(){return function(e,t){const{apiNonce:n,apiUrl:o,blocklistUpdateStatus:s}=t(),r=l()(s,"pending",null);if(!r)return;e({type:"BLOCKLIST_UPDATE_START"});const a=({uiMessage:t})=>{e({type:"BLOCKLIST_UPDATE_END",success:!1,message:t||N})};return h.post(`${o}/conflict-detection/conflicts/blocklist`,r,{headers:{"X-WP-Nonce":n}}).then((t=>{const{status:n,data:o,falsePositive:s}=t;s?a(t):e({type:"BLOCKLIST_UPDATE_END",success:!0,data:204===n?null:o,message:""})})).catch(a)}}function F(){return function(e,t){e({type:"PREFERENCE_CHECK_START"});const{apiNonce:n,apiUrl:o,options:s,pendingOptions:r}=t(),a=({uiMessage:t})=>{e({type:"PREFERENCE_CHECK_END",success:!1,message:t||w})};return h.post(`${o}/preference-check`,{...s,...r},{headers:{"X-WP-Nonce":n}}).then((t=>{const{data:n,falsePositive:o}=t;o?a(t):e({type:"PREFERENCE_CHECK_END",success:!0,message:"",detectedConflicts:n})})).catch(a)}}function L({activeKitToken:e}){return function(t,n){const{releases:o}=n();t({type:"CHOOSE_AWAY_FROM_KIT_CONFIG",activeKitToken:e,concreteVersion:l()(o,"latest_version_6")})}}function B(){return{type:"CHOOSE_INTO_KIT_CONFIG"}}function q(){return function(e,t){const{apiNonce:n,apiUrl:o,options:s}=t(),r=l()(s,"kitToken",null);e({type:"KITS_QUERY_START"});const a=({uiMessage:t})=>{e({type:"KITS_QUERY_END",success:!1,message:t||(0,m.__)("Failed to fetch kits","font-awesome")})},i=({uiMessage:t})=>{e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:t||(0,m.__)("Couldn't update latest kit settings","font-awesome")})};return h.post(`${o}/api`,"query { me { kits { name version technologySelected licenseSelected minified token shimEnabled autoAccessibilityEnabled status }}}",{headers:{"X-WP-Nonce":n}}).then((t=>{if(t.falsePositive)return a(t);const c=l()(t,"data.data");if(!l()(c,"me"))return e({type:"KITS_QUERY_END",success:!1,message:(0,m.__)("Failed to fetch kits. Regenerate your API Token and try again.","font-awesome")});if(e({type:"KITS_QUERY_END",data:c,success:!0}),!r)return;const u=l()(c,"me.kits",[]),p=d()(u,{token:r});if(!p)return;const f={};return s.usePro&&"pro"!==p.licenseSelected?f.usePro=!1:s.usePro||"pro"!==p.licenseSelected||(f.usePro=!0),"svg"===s.technology&&"svg"!==p.technologySelected?(f.technology="webfont",f.pseudoElements=!0):"svg"!==s.technology&&"svg"===p.technologySelected&&(f.technology="svg",f.pseudoElements=!1),s.version!==p.version&&(f.version=p.version),s.compat&&!p.shimEnabled?f.compat=!1:!s.compat&&p.shimEnabled&&(f.compat=!0),e({type:"OPTIONS_FORM_SUBMIT_START"}),h.post(`${o}/config`,{options:{...s,...f}},{headers:{"X-WP-Nonce":n}}).then((t=>{const{data:n,falsePositive:o}=t;if(o)return i(t);e({type:"OPTIONS_FORM_SUBMIT_END",data:n,success:!0,message:(0,m.__)("Kit changes saved","font-awesome")})})).catch(i)})).catch(a)}}function K(){return function(e,t){const{apiNonce:n,apiUrl:o,options:s,pendingOptions:r}=t();e({type:"OPTIONS_FORM_SUBMIT_START"});const a=({uiMessage:t})=>{e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:t||N})};return h.post(`${o}/config`,{options:{...s,...r}},{headers:{"X-WP-Nonce":n}}).then((t=>{const{data:n,falsePositive:o}=t;o?a(t):e({type:"OPTIONS_FORM_SUBMIT_END",data:n,success:!0,message:(0,m.__)("Changes saved","font-awesome")})})).catch(a)}}function G({apiToken:e=!1,runQueryKits:t=!1}){return function(n,o){const{apiNonce:s,apiUrl:r,options:a}=o();n({type:"OPTIONS_FORM_SUBMIT_START"});const i=({uiMessage:e})=>{n({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:e||N})};return h.post(`${r}/config`,{options:{...a,apiToken:e}},{headers:{"X-WP-Nonce":s}}).then((e=>{const{data:o,falsePositive:s}=e;if(s)i(e);else if(n({type:"OPTIONS_FORM_SUBMIT_END",data:o,success:!0,message:(0,m.__)("API Token saved","font-awesome")}),t)return n(q())})).catch(i)}}function z(){return{type:"USER_STOP_SCANNER"}}function Y({nodesTested:e={}}){return(t,n)=>{const{apiNonce:o,apiUrl:s,unregisteredClients:r,showConflictDetectionReporter:a}=n();if(a){if(i()(e.conflict)>0){const n=Object.keys(e.conflict).reduce((function(t,n){return t[n]=e.conflict[n],t}),{});t({type:"CONFLICT_DETECTION_SUBMIT_START",unregisteredClientsBeforeDetection:r,recentConflictsDetected:e.conflict});const a=({uiMessage:e})=>{t({type:"CONFLICT_DETECTION_SUBMIT_END",success:!1,message:e||N})};return h.post(`${s}/conflict-detection/conflicts`,n,{headers:{"X-WP-Nonce":o}}).then((e=>{const{status:n,data:o,falsePositive:s}=e;s?a(e):t({type:"CONFLICT_DETECTION_SUBMIT_END",success:!0,data:204===n||0===i()(o)?null:o})})).catch(a)}t({type:"CONFLICT_DETECTION_NONE_FOUND"})}}}function $(){return(e,t)=>{const{apiNonce:n,apiUrl:o}=t();e({type:"SNOOZE_V3DEPRECATION_WARNING_START"});const s=({uiMessage:t})=>{e({type:"SNOOZE_V3DEPRECATION_WARNING_END",success:!1,message:t||O})};return h.post(`${o}/v3deprecation`,{snooze:!0},{headers:{"X-WP-Nonce":n}}).then((t=>{const{falsePositive:n}=t;n?s(t):e({type:"SNOOZE_V3DEPRECATION_WARNING_END",success:!0,snooze:!0,message:""})})).catch(s)}}function H(e){return{type:"SET_ACTIVE_ADMIN_TAB",tab:e}}function V({enable:e=!0}){return function(t,n){const{apiNonce:o,apiUrl:s}=n(),r=e?"ENABLE_CONFLICT_DETECTION_SCANNER_END":"DISABLE_CONFLICT_DETECTION_SCANNER_END";t({type:e?"ENABLE_CONFLICT_DETECTION_SCANNER_START":"DISABLE_CONFLICT_DETECTION_SCANNER_START"});const a=({uiMessage:e})=>{t({type:r,success:!1,message:e||D})};return h.post(`${s}/conflict-detection/until`,e?Math.floor(new Date((new Date).valueOf()+1e3*T*60)/1e3):Math.floor(new Date/1e3)-y,{headers:{"X-WP-Nonce":o}}).then((e=>{const{status:n,data:o,falsePositive:s}=e;s?a(e):t({type:r,data:204===n?null:o,success:!0})})).catch(a)}}h.interceptors.response.use((e=>b(e)),(e=>{if(e.response)e.response=b(e.response),e.uiMessage=l()(e,"response.uiMessage");else if(e.request){const t="fontawesome_request_noresponse",n={errors:{[t]:[C]},error_data:{[t]:{request:e.request}}};e.uiMessage=(0,p.Ay)({error:n})}else{const t="fontawesome_request_failed",n={errors:{[t]:[I]},error_data:{[t]:{failedRequestMessage:e.message}}};e.uiMessage=(0,p.Ay)({error:n})}return Promise.reject(e)}))},9458:(e,t,n)=>{n.d(t,{Ay:()=>D,V2:()=>u,b3:()=>C,cA:()=>I});var o=n(8156),s=n.n(o),r=n(3560),a=n.n(r),i=n(7091),c=n.n(i),l=n(2806);const u=(0,l.__)("Font Awesome WordPress Plugin Error Report","font-awesome"),d=(0,l.__)("D'oh! That failed big time.","font-awesome"),p=(0,l.__)("There was an error attempting to report the error.","font-awesome"),m=(0,l.__)("Oh no! Your web browser could not reach your WordPress server.","font-awesome"),f=(0,l.__)("It looks like your web browser session expired. Try logging out and log back in to WordPress admin.","font-awesome"),_=(0,l.__)("The last request was successful, but it also returned the following error(s), which might be helpful for troubleshooting.","font-awesome"),E=(0,l.__)("Error","font-awesome"),g=(0,l.__)("WARNING: The last request contained errors, though your WordPress server reported it as a success. This usually means there's a problem with your theme or one of your other plugins emitting output that is causing problems.","font-awesome"),h=(0,l.__)("WARNING: The last response from your WordPress server did not include the confirmation header that should be in all valid Font Awesome responses. This is a clue that some code from another theme or plugin is acting badly and causing the wrong headers to be sent.","font-awesome"),T=(0,l.__)("CONFIRMED: The last response from your WordPress server included the confirmation header that is expected for all valid responses from the Font Awesome plugin's code running on your WordPress server.","font-awesome"),y=(0,l.__)("WARNING: Invalid Data Trimmed from Server Response","font-awesome"),N=(0,l.__)("WARNING: We expected the last response from the server to contain no data, but it contained something unexpected.","font-awesome"),S=(0,l.__)("Your WordPress server returned an error for that last request, but there was no information about the error.","font-awesome"),w=["requestMethod","responseStatus","responseStatusText","requestUrl","requestData","responseHeaders","responseData","requestHeaders"];function C(e={}){const t=s()(e,"config.headers.Content-Type","").toLowerCase(),n=s()(e,"config.data","");let o="";if("application/json"===t){try{const e=JSON.parse(n);"boolean"!=typeof s()(e,"options.apiToken")&&a()(e,"options.apiToken","REDACTED"),o=JSON.stringify(e)}catch(e){o=`ERROR while redacting request data: ${e.toString()}`}return o}return n}function I(e={}){const t={...e};for(const e in t)"x-wp-nonce"===e.toLowerCase()&&(t[e]="REDACTED");return t}const D=function(e){const{error:t=null,ok:n=!1,falsePositive:o=!1,confirmed:r=!1,expectEmpty:a=!1,trimmed:i=""}=e;console.group(u),n&&console.info(_),o&&console.info(g),r?console.info(T):console.info(h);const l=[];for(const t of w){const n=s()(e,t);if(void 0!==n){const e=typeof n;if("string"===e||"number"===e)l.push(`${t}: ${n}`);else if("object"===e){l.push(`${t}:`);for(const e in n)l.push(`\t${e}: ${n[e].toString()}`)}else console.info(`Unexpected report content type '${e}' for ${t}:`,n)}}c()(l)>0&&console.info(`Extra Info:\n${l.join("\n")}`),""!==i&&(console.group(y),a&&console.info(N),console.info(i),console.groupEnd());const C=null!==t?function(e={}){const t=Object.keys(e.errors||[]).map((t=>({code:t,message:s()(e,`errors.${t}.0`),data:s()(e,`error_data.${t}`)})));return 0===c()(t)&&t.push({code:"fontawesome_unknown_error",message:p}),t.reduce(((e,t)=>{console.group(E);const n=function(e){if(!s()(e,"code"))return console.info(p),d;let t=null,n="";const o=s()(e,"message");o&&(n=n.concat(`message: ${o}\n`),t=o);const r=s()(e,"code");if(r)switch(n=n.concat(`code: ${r}\n`),r){case"rest_no_route":t=m;break;case"rest_cookie_invalid_nonce":t=f;break;case"fontawesome_unknown_error":t=d}const a=s()(e,"data");if("string"==typeof a)n=n.concat(`data: ${a}\n`);else{const t=s()(e,"data.status");t&&(n=n.concat(`status: ${t}\n`));const o=s()(e,"data.trace");o&&(n=n.concat(`trace:\n${o}\n`))}n&&""!==n?console.info(n):console.info(e);const i=s()(e,"data.request");i&&console.info(i);const c=s()(e,"data.failedRequestMessage");return c&&console.info(c),t}(t);return console.groupEnd(),e||"previous_exception"===t.code?e:n}),null)}(t):null;return t&&""===i&&r&&console.info(S),console.groupEnd(),C}},6312:(e,t,n)=>{n.d(t,{A:()=>o});const o={"wrapper-div":"xAYNgmh_FT28wOZEe4og","submit-wrapper":"W3wz4Liah2EvWxtTBXN8","submit-status":"OpLLWfmNs6BXGmnmuinK",fail:"q0fCXPnTi1vRhNmP0IEt","fail-icon-container":"A2dLn8oZtVzuXngZMDRp",explanation:"xFoMk9Jc8Ir4n5Olcce1",success:"fQeEY3YNz4yh6R7vdi7J",icon:"JPBgwk6PxfiitLxJLE54","section-title":"VklefjWwawC59yrOPe3e","section-divider":"e8Vu3y2YBkuW8N9IhY2m","table-header":"gNYVG50hxMZs8Gqbj_T0","more-less":"dpYyb_l0GWlAiVkOmmYt","scanner-actions":"WJl_9YHKGkhUvtVwgVco","scanner-runstatus":"HBCEbIhIET1XISEYneSA",faPrimary:"ZXe2iyFqFThwx_UF4CBf","conflict-detection-timer":"HgLyUkphZYd8YsLSMJAZ",warning:"Gu2u4ZSZT25Yqm8zSogj","sr-only":"WOV9bdVrpJVdQWzhBnHZ",flex:"QN_KH8sqi5QFBDqaH1rI","flex-row":"bBMVcUUJf1GW7veG1Zic","flex-column":"pIa2BGO1ABMtYZY185Bf",relative:"h0koIl1zvME7toM3jUk9",status:"kWqY7l_wn27HmdUNz7ZY",good:"q3No9l7YMUEH1xvYTNfI","success-icon":"Y7M4JHzDp7jtCt6MonbK","conflict-icon":"a6qTuZmDiKS_FHgMZawo",conflict:"PwCQsIQEdGz9b0cOj3iA","warning-icon":"rw5FUVRrrdM17WyxcRZ9","space-left":"QEoklKhbCbwOUBs0cspa","input-checkbox-custom":"oWHnpotXuoOIlJoqkkgw","checked-icon":"NzRaF0U8aKPVtS6JIaK8","input-radio-custom":"gIUwcNcpOHhTKG4sTlfg","unchecked-icon":"iemYJRvB4tzF1xnuGiAw","option-label-explanation":"BFR5diS8tiViycbuTDVS"}}}]);