관리-도구
편집 파일: 10-f94737680bdac4816391.js
(window.webpackJsonp_font_awesome_admin=window.webpackJsonp_font_awesome_admin||[]).push([[10,14],{163:function(e,t,n){"use strict";t.a={"wrapper-div":"Ihb3kyONjVgEWV0zB0vfxQ==","submit-wrapper":"ToMOGjAmxSPs6D+glWGx9A==","submit-status":"_3edKMOIt9iftk0Zz-7ia9w==",fail:"NbqVQtCU5W3ihwasrYexfA==","fail-icon-container":"gEl1fl+2lk74ueiQz5cPxQ==",explanation:"vumGDcuTrv0Ekcc+McKiXw==",success:"_7IGgJmOfwN1O+c0smUgA9Q==",icon:"b1NRGX9AXkY1BfJ1MCfPTw==","section-title":"_3hBTOhCdvQjibQScAbzMIQ==","section-divider":"_0XZF4B-SzNg4vm8Dl0F7TA==","table-header":"YGhcFGkqFAeqpY9iNYq9Sw==","more-less":"mQ+dGgo7ePYMdFVM7UJy3Q==","scanner-actions":"LZqubosol4XlcTmVPXrgwA==","scanner-runstatus":"_92G6m9T1MVtvbrtbN0ztew==",faPrimary:"vKD-ffoQma2PtYJ6syJLXA==","conflict-detection-timer":"jRDHFr0fk9vh0tmPg3yyNA==",warning:"BHff-dIr+7jxh1slKud1UA==","sr-only":"_8sv48aq5xq1UY1HM-IXXWw==",flex:"XWyrhxEjrFCimjviedIRKg==","flex-row":"KIG-iO8JlK18PTTkxmFFfQ==","flex-column":"wbV6cqcB6HeXauGMWUOUJw==",relative:"PWf16KXgVsL5DasX-69r+w==",status:"BFnd+XqC+F5AvKCZ6eMOOA==",good:"x86R9+0TG6mMWrDQqDWMxQ==","success-icon":"_8fwuockVscy-LVkmd5sRrg==",conflict:"_4ywMQ6iToIUtlBzG0klUZQ==","conflict-icon":"n2ieOzL8DYqXeYvR4dnlBQ==","warning-icon":"Kc0JjWetOt7bzIP5T5F-3g==","space-left":"cdItXesO30xESmpowZCWVA==","input-radio-custom":"XrgwDjPx-AobEiR9810sug==","checked-icon":"wfGA8rTfLXMNYeed+7P0mg==","input-checkbox-custom":"YGOg+3jg-Q6uUjZrsKJJBw==","unchecked-icon":"dxKTDsQBZGG-O07iRE7TNg==","option-label-explanation":"AX07i+p1n9K+g4HYk3mvOg=="}},164:function(e,t,n){"use strict";n.r(t),n.d(t,"CONFLICT_DETECTION_SCANNER_DURATION_MIN",(function(){return h})),n.d(t,"preprocessResponse",(function(){return C})),n.d(t,"resetPendingOptions",(function(){return D})),n.d(t,"resetOptionsFormState",(function(){return I})),n.d(t,"addPendingOption",(function(){return j})),n.d(t,"updatePendingUnregisteredClientsForDeletion",(function(){return v})),n.d(t,"resetUnregisteredClientsDeletionStatus",(function(){return R})),n.d(t,"resetPendingBlocklistSubmissionStatus",(function(){return P})),n.d(t,"submitPendingUnregisteredClientDeletions",(function(){return A})),n.d(t,"updatePendingBlocklist",(function(){return x})),n.d(t,"submitPendingBlocklist",(function(){return M})),n.d(t,"checkPreferenceConflicts",(function(){return k})),n.d(t,"chooseAwayFromKitConfig",(function(){return U})),n.d(t,"chooseIntoKitConfig",(function(){return F})),n.d(t,"queryKits",(function(){return W})),n.d(t,"submitPendingOptions",(function(){return L})),n.d(t,"updateApiToken",(function(){return B})),n.d(t,"userAttemptToStopScanner",(function(){return q})),n.d(t,"reportDetectedConflicts",(function(){return G})),n.d(t,"snoozeV3DeprecationWarning",(function(){return K})),n.d(t,"setActiveAdminTab",(function(){return X})),n.d(t,"setConflictDetectionScanner",(function(){return z}));var o=n(171),s=n.n(o),r=n(180),a=n.n(r),c=n(29),i=n.n(c),l=n(0),u=n.n(l),d=n(174),f=n.n(d),p=n(167),m=n(150),_=n(166),E=n.n(_);const g=s.a.create(),h=10,b=Object(m.__)("Couldn't save those changes","font-awesome"),O=Object(m.__)("Changes not saved because your WordPress server does not allow this kind of request. Look for details in the browser console.","font-awesome"),T=Object(m.__)("Couldn't check preferences","font-awesome"),y=Object(m.__)("A request to your WordPress server never received a response","font-awesome"),N=Object(m.__)("A request to your WordPress server failed","font-awesome"),w=Object(m.__)("Couldn't start the scanner","font-awesome"),S=Object(m.__)("Couldn't snooze","font-awesome");function C(e){const t=E()(e,"headers.fontawesome-confirmation");if(204===e.status&&""!==e.data)return Object(p.b)({error:null,confirmed:t,trimmed:e.data,expectEmpty:!0}),e.data={},e;const n=u()(e,"data",null),o="string"==typeof n&&i()(n)>0,s=o?function(e){if(!e||""===e)return null;const t=function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=null,s=null;if("string"!=typeof t)return null;if(n>=t.length)return null;try{return o=JSON.parse(t.slice(n)),{start:n,parsed:o}}catch(e){const o=t.indexOf("[",n+1),r=t.indexOf("{",n+1);if(-1===o&&-1===r)return null;s=-1!==o&&-1!==r?o<r?o:r:-1!==r?r:o}return null===s?null:e(t,s)}(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}}}(n):{};o&&s&&(e.data=u()(s,"parsed"));const r=u()(s,"trimmed",""),a=u()(e,"data.errors",null);if(e.status>=400){if(a)e.uiMessage=Object(p.b)({error:e.data,confirmed:t,trimmed:r});else{const n=u()(e,"config.method","").toUpperCase(),o=u()(e,"config.url"),s=e.status,r=u()(e,"statusText"),a=Object(p.d)(e),c=Object(p.c)(u()(e,"headers",{})),i=Object(p.c)(u()(e,"config.headers",{})),l=u()(e,"data");e.uiMessage=Object(p.b)({confirmed:t,requestData:a,requestMethod:n,requestUrl:o,responseHeaders:c,requestHeaders:i,responseStatus:s,responseStatusText:r,responseData:l}),405===s&&(e.uiMessage=O)}return e}if(e.status<400&&e.status>=300)return t&&""===r||(e.uiMessage=Object(p.b)({error:null,confirmed:t,trimmed:r})),e;if(a){const n=!0;return e.falsePositive=!0,e.uiMessage=Object(p.b)({error:e.data,confirmed:t,falsePositive:n,trimmed:r}),e}{const n=u()(e,"data.error",null);return n?(e.uiMessage=Object(p.b)({error:n,ok:!0,confirmed:t,trimmed:r}),e):(t||(e.uiMessage=Object(p.b)({error:null,ok:!0,confirmed:t,trimmed:r})),e)}}function D(){return{type:"RESET_PENDING_OPTIONS"}}function I(){return{type:"OPTIONS_FORM_STATE_RESET"}}function j(e){return function(t,n){const{options:o}=n();for(const[n,s]of a()(e))t(o[n]===s?{type:"RESET_PENDING_OPTION",change:{[n]:s}}:{type:"ADD_PENDING_OPTION",change:{[n]:s}})}}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"UPDATE_PENDING_UNREGISTERED_CLIENTS_FOR_DELETION",data:e}}function R(){return{type:"DELETE_UNREGISTERED_CLIENTS_RESET"}}function P(){return{type:"BLOCKLIST_UPDATE_RESET"}}function A(){return function(e,t){const{apiNonce:n,apiUrl:o,unregisteredClientsDeletionStatus:s}=t(),r=u()(s,"pending",null);if(!r||0===i()(r))return;e({type:"DELETE_UNREGISTERED_CLIENTS_START"});const a=t=>{let{uiMessage:n}=t;e({type:"DELETE_UNREGISTERED_CLIENTS_END",success:!1,message:n||b})};return g.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 x(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"UPDATE_PENDING_BLOCKLIST",data:e}}function M(){return function(e,t){const{apiNonce:n,apiUrl:o,blocklistUpdateStatus:s}=t(),r=u()(s,"pending",null);if(!r)return;e({type:"BLOCKLIST_UPDATE_START"});const a=t=>{let{uiMessage:n}=t;e({type:"BLOCKLIST_UPDATE_END",success:!1,message:n||b})};return g.put(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 k(){return function(e,t){e({type:"PREFERENCE_CHECK_START"});const{apiNonce:n,apiUrl:o,options:s,pendingOptions:r}=t(),a=t=>{let{uiMessage:n}=t;e({type:"PREFERENCE_CHECK_END",success:!1,message:n||T})};return g.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 U(e){let{activeKitToken:t}=e;return function(e,n){const{releases:o}=n();e({type:"CHOOSE_AWAY_FROM_KIT_CONFIG",activeKitToken:t,concreteVersion:u()(o,"latest_version_6")})}}function F(){return{type:"CHOOSE_INTO_KIT_CONFIG"}}function W(){return function(e,t){const{apiNonce:n,apiUrl:o,options:s}=t(),r=u()(s,"kitToken",null);e({type:"KITS_QUERY_START"});const a=t=>{let{uiMessage:n}=t;e({type:"KITS_QUERY_END",success:!1,message:n||Object(m.__)("Failed to fetch kits","font-awesome")})},c=t=>{let{uiMessage:n}=t;e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:n||Object(m.__)("Couldn't update latest kit settings","font-awesome")})};return g.post(o+"/api","query {\n me {\n kits {\n name\n version\n technologySelected\n licenseSelected\n minified\n token\n shimEnabled\n autoAccessibilityEnabled\n status\n }\n }\n }",{headers:{"X-WP-Nonce":n}}).then(t=>{if(t.falsePositive)return a(t);const i=u()(t,"data.data");if(!u()(i,"me"))return e({type:"KITS_QUERY_END",success:!1,message:Object(m.__)("Failed to fetch kits. Regenerate your API Token and try again.","font-awesome")});if(e({type:"KITS_QUERY_END",data:i,success:!0}),!r)return;const l=u()(i,"me.kits",[]),d=f()(l,{token:r});if(!d)return;const p={};return s.usePro&&"pro"!==d.licenseSelected?p.usePro=!1:s.usePro||"pro"!==d.licenseSelected||(p.usePro=!0),"svg"===s.technology&&"svg"!==d.technologySelected?(p.technology="webfont",p.pseudoElements=!0):"svg"!==s.technology&&"svg"===d.technologySelected&&(p.technology="svg",p.pseudoElements=!1),s.version!==d.version&&(p.version=d.version),s.compat&&!d.shimEnabled?p.compat=!1:!s.compat&&d.shimEnabled&&(p.compat=!0),e({type:"OPTIONS_FORM_SUBMIT_START"}),g.put(o+"/config",{options:{...s,...p}},{headers:{"X-WP-Nonce":n}}).then(t=>{const{data:n,falsePositive:o}=t;if(o)return c(t);e({type:"OPTIONS_FORM_SUBMIT_END",data:n,success:!0,message:Object(m.__)("Kit changes saved","font-awesome")})}).catch(c)}).catch(a)}}function L(){return function(e,t){const{apiNonce:n,apiUrl:o,options:s,pendingOptions:r}=t();e({type:"OPTIONS_FORM_SUBMIT_START"});const a=t=>{let{uiMessage:n}=t;e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:n||b})};return g.put(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:Object(m.__)("Changes saved","font-awesome")})}).catch(a)}}function B(e){let{apiToken:t=!1,runQueryKits:n=!1}=e;return function(e,o){const{apiNonce:s,apiUrl:r,options:a}=o();e({type:"OPTIONS_FORM_SUBMIT_START"});const c=t=>{let{uiMessage:n}=t;e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:n||b})};return g.put(r+"/config",{options:{...a,apiToken:t}},{headers:{"X-WP-Nonce":s}}).then(t=>{const{data:o,falsePositive:s}=t;if(s)c(t);else if(e({type:"OPTIONS_FORM_SUBMIT_END",data:o,success:!0,message:Object(m.__)("API Token saved","font-awesome")}),n)return e(W())}).catch(c)}}function q(){return{type:"USER_STOP_SCANNER"}}function G(e){let{nodesTested:t={}}=e;return(e,n)=>{const{apiNonce:o,apiUrl:s,unregisteredClients:r,showConflictDetectionReporter:a}=n();if(a){if(i()(t.conflict)>0){const n=Object.keys(t.conflict).reduce((function(e,n){return e[n]=t.conflict[n],e}),{});e({type:"CONFLICT_DETECTION_SUBMIT_START",unregisteredClientsBeforeDetection:r,recentConflictsDetected:t.conflict});const a=t=>{let{uiMessage:n}=t;e({type:"CONFLICT_DETECTION_SUBMIT_END",success:!1,message:n||b})};return g.post(s+"/conflict-detection/conflicts",n,{headers:{"X-WP-Nonce":o}}).then(t=>{const{status:n,data:o,falsePositive:s}=t;s?a(t):e({type:"CONFLICT_DETECTION_SUBMIT_END",success:!0,data:204===n||0===i()(o)?null:o})}).catch(a)}e({type:"CONFLICT_DETECTION_NONE_FOUND"})}}}function K(){return(e,t)=>{const{apiNonce:n,apiUrl:o}=t();e({type:"SNOOZE_V3DEPRECATION_WARNING_START"});const s=t=>{let{uiMessage:n}=t;e({type:"SNOOZE_V3DEPRECATION_WARNING_END",success:!1,message:n||S})};return g.put(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 X(e){return{type:"SET_ACTIVE_ADMIN_TAB",tab:e}}function z(e){let{enable:t=!0}=e;return function(e,n){const{apiNonce:o,apiUrl:s}=n(),r=t?"ENABLE_CONFLICT_DETECTION_SCANNER_END":"DISABLE_CONFLICT_DETECTION_SCANNER_END";e({type:t?"ENABLE_CONFLICT_DETECTION_SCANNER_START":"DISABLE_CONFLICT_DETECTION_SCANNER_START"});const a=t=>{let{uiMessage:n}=t;e({type:r,success:!1,message:n||w})};return g.put(s+"/conflict-detection/until",t?Math.floor(new Date((new Date).valueOf()+1e3*h*60)/1e3):Math.floor(new Date/1e3)-1,{headers:{"X-WP-Nonce":o}}).then(t=>{const{status:n,data:o,falsePositive:s}=t;s?a(t):e({type:r,data:204===n?null:o,success:!0})}).catch(a)}}g.interceptors.response.use(e=>C(e),e=>{if(e.response)e.response=C(e.response),e.uiMessage=u()(e,"response.uiMessage");else if(e.request){const t="fontawesome_request_noresponse",n={errors:{[t]:[y]},error_data:{[t]:{request:e.request}}};e.uiMessage=Object(p.b)({error:n})}else{const t="fontawesome_request_failed",n={errors:{[t]:[N]},error_data:{[t]:{failedRequestMessage:e.message}}};e.uiMessage=Object(p.b)({error:n})}return Promise.reject(e)})},167:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return S})),n.d(t,"c",(function(){return C}));var o=n(0),s=n.n(o),r=n(179),a=n.n(r),c=n(29),i=n.n(c),l=n(150);const u=Object(l.__)("Font Awesome WordPress Plugin Error Report","font-awesome"),d=Object(l.__)("D'oh! That failed big time.","font-awesome"),f=Object(l.__)("There was an error attempting to report the error.","font-awesome"),p=Object(l.__)("Oh no! Your web browser could not reach your WordPress server.","font-awesome"),m=Object(l.__)("It looks like your web browser session expired. Try logging out and log back in to WordPress admin.","font-awesome"),_=Object(l.__)("The last request was successful, but it also returned the following error(s), which might be helpful for troubleshooting.","font-awesome"),E=Object(l.__)("Error","font-awesome"),g=Object(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=Object(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"),b=Object(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"),O=Object(l.__)("WARNING: Invalid Data Trimmed from Server Response","font-awesome"),T=Object(l.__)("WARNING: We expected the last response from the server to contain no data, but it contained something unexpected.","font-awesome"),y=Object(l.__)("Your WordPress server returned an error for that last request, but there was no information about the error.","font-awesome"),N=["requestMethod","responseStatus","responseStatusText","requestUrl","requestData","responseHeaders","responseData","requestHeaders"];function w(e){if(!s()(e,"code"))return console.info(f),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=p;break;case"rest_cookie_invalid_nonce":t=m;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 c=s()(e,"data.request");c&&console.info(c);const i=s()(e,"data.failedRequestMessage");return i&&console.info(i),t}function S(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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 C(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={...e};for(const e in t)"x-wp-nonce"===e.toLowerCase()&&(t[e]="REDACTED");return t}t.b=function(e){const{error:t=null,ok:n=!1,falsePositive:o=!1,confirmed:r=!1,expectEmpty:a=!1,trimmed:c=""}=e;console.group(u),n&&console.info(_),o&&console.info(g),r?console.info(b):console.info(h);const l=[];for(const t of N){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)}}i()(l)>0&&console.info("Extra Info:\n"+l.join("\n")),""!==c&&(console.group(O),a&&console.info(T),console.info(c),console.groupEnd());const d=null!==t?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object.keys(e.errors||[]).map(t=>({code:t,message:s()(e,`errors.${t}.0`),data:s()(e,"error_data."+t)}));0===i()(t)&&t.push({code:"fontawesome_unknown_error",message:f});const n=t.reduce((e,t)=>{console.group(E);const n=w(t);return console.groupEnd(),e||"previous_exception"===t.code?e:n},null);return n}(t):null;return t&&""===c&&r&&console.info(y),console.groupEnd(),d}},169:function(e,t,n){"use strict";var o=n(149),s=n.n(o),r=n(165),a=n.n(r),c={alert:"v2APGCcZUAaU68TnPHhvxw==","alert-icon":"syPwBWS1kp-zUKz4hcgcXg==","alert-title":"ptjLX6BwJtUff-P6OkZBiA==","alert-message":"VAB708TLB4qhUVdnQGAxJA==","alert-action":"CIIJrcA+PLxU-W4xIVozXw==","alert-warning":"iAbTOYj3VuCpNr1NEwmL4g=="},i=n(162),l=n.n(i),u=n(160),d=n(161);function f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(e.type){case"info":return s.a.createElement(u.a,{icon:d.j,title:"info",fixedWidth:!0});case"warning":return s.a.createElement(u.a,{icon:d.g,title:"warning",fixedWidth:!0});case"pending":return s.a.createElement(u.a,{icon:d.m,title:"pending",spin:!0,fixedWidth:!0});case"success":return s.a.createElement(u.a,{icon:d.o,title:"success",fixedWidth:!0});default:return s.a.createElement(u.a,{icon:d.g,title:"warning",fixedWidth:!0})}}function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s.a.createElement("div",{className:l()(c.alert,c["alert-"+e.type]),role:"alert"},s.a.createElement("div",{className:c["alert-icon"]},f(e)),s.a.createElement("div",{className:c["alert-message"]},s.a.createElement("h2",{className:c["alert-title"]},e.title),s.a.createElement("div",{className:c["alert-copy"]},e.children)))}p.propTypes={title:a.a.string.isRequired,type:a.a.oneOf(["info","warning","success","pending"]),children:a.a.oneOfType([a.a.object,a.a.string,a.a.arrayOf(a.a.element)]).isRequired},t.a=p},176:function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var o=n(149),s=n.n(o),r=n(165),a=n.n(r),c=n(158),i=n(163),l=n(203),u=n.n(l),d=n(204),f=n.n(d),p=n(150);function m(e){const t=Math.floor(e/86400),n=Math.floor((e-86400*t)/3600),o=Math.floor((e-(86400*t+3600*n))/60),s=e-(86400*t+3600*n+60*o);return f()([t,n,o,s].reduce((e,t,n)=>(0===n&&0!==t?e.push(t.toString()):e.push(u()(t.toString(),2,"0")),e),[]),e=>e.match(/^[0]+$/)).join(":")}function _(e){const t=e-Math.floor(new Date/1e3);return t<0?0:t}function E(e){let{addDescription:t,children:n}=e;const r=Object(c.c)(e=>e.detectConflictsUntil),[a,l]=Object(o.useState)(_(r)),u=Object(c.b)();return Object(o.useEffect)(()=>{let e=null;return _(r)>0?e=setTimeout(()=>l(_(r)),1e3):(l(m(0)),u({type:"CONFLICT_DETECTION_TIMER_EXPIRED"})),()=>e&&clearTimeout(e)},[r,a,u]),a<=0?null:s.a.createElement("span",{className:i.a["conflict-detection-timer"]},m(a),!!t&&(a>60 /* translators: 1: space */?Object(p.sprintf)(Object(p.__)("%1$sminutes left to browse your site for trouble","font-awesome")," ") /* translators: 1: space */:Object(p.sprintf)(Object(p.__)("%1$sseconds left to browse your site for trouble","font-awesome")," ")),n)}E.propTypes={addDescription:a.a.bool}},177:function(e,t,n){"use strict";var o=n(149),s=n.n(o),r=n(169),a=n(150);const c=s.a.createElement(r.a,{title:Object(a.__)("Whoops, this is embarrassing","font-awesome"),type:"warning"},s.a.createElement("p",null,Object(a.__)("Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome")));var i=function(){return s.a.createElement("div",{className:"d7wuKQTkcJufIbd+gVhKnw=="},c)},l=n(167);class u extends s.a.Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,t){console.group(l.a),console.log(e),console.log(t),console.groupEnd(),this.setState({error:e,errorInfo:t})}render(){return this.state.error?s.a.createElement(i,null):this.props.children}}t.a=u},207:function(e,t,n){"use strict";n.r(t),n.d(t,"CONFLICT_DETECTION_SHADOW_HOST_ID",(function(){return I})),n.d(t,"mountConflictDetectionReporter",(function(){return j})),n.d(t,"isConflictDetectionReporterMounted",(function(){return v}));var o=n(149),s=n.n(o),r=n(151),a=n.n(r),c=n(158),i=n(164),l=n(160),u=n(161),d=n(31),f=n(176),p=n(29),m=n.n(p),_=n(166),E=n.n(_),g=n(150),h=n(177);const b={running:{code:"Running",display:Object(g.__)("Running","font-awesome")},done:{code:"Done",display:Object(g.__)("Done","font-awesome")},submitting:{code:"Submitting",display:Object(g.__)("Submitting","font-awesome")},none:{code:"None",display:Object(g.__)("None","font-awesome")},error:{code:"Error",display:Object(g.__)("Error","font-awesome")},expired:{code:"Expired",display:Object(g.__)("Expired","font-awesome")},ready:{code:"Ready",display:Object(g.__)("Ready","font-awesome")},stopped:{code:"Stopped",display:Object(g.__)("Stopped","font-awesome")},stopping:{code:"Stopping",display:Object(g.__)("Stopping","font-awesome")},restarting:{code:"Restarting",display:Object(g.__)("Restarting","font-awesome")}},O={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"}};var T,y=(T=function(){const e=Object(c.b)(),t=Object(c.c)(e=>e.settingsPageUrl),n=t+"&tab=ts",o=Object(c.c)(e=>e.activeAdminTab),r=window.location.href.startsWith(t)&&o===d.b,a=Object(c.c)(e=>e.userAttemptedToStopScanner),p=Object(c.c)(e=>e.unregisteredClients),_=Object(c.c)(e=>e.unregisteredClientDetectionStatus.unregisteredClientsBeforeDetection),h=Object(c.c)(e=>e.unregisteredClientDetectionStatus.recentConflictsDetected),T=Object(c.c)(e=>!e.showConflictDetectionReporter),y=Object(c.c)(e=>T&&e.conflictDetectionScannerStatus.isSubmitting),N=Object(c.c)(e=>e.conflictDetectionScannerStatus.hasSubmitted&&e.conflictDetectionScannerStatus.success),w=Object(c.c)(e=>a&&!e.conflictDetectionScannerStatus.hasSubmitted),S=Object(c.c)(e=>a&&!w&&e.conflictDetectionScannerStatus.success),C=Object(c.c)(e=>{const{isSubmitting:t,hasSubmitted:n,success:o}=e.unregisteredClientDetectionStatus;return a?w?b.stopping:S?b.stopped:b.error:y?b.restarting:T?b.expired:N?b.ready:o&&0===m()(p)?b.none:o?b.done:t?b.submitting:n?b.error:b.running}),D=Object(c.c)(e=>e.unregisteredClientDetectionStatus.message),I=s.a.createElement("div",null,s.a.createElement("h2",{style:O.tally},s.a.createElement("span",null,m()(p))," ",s.a.createElement("span",null," ",Object(g.__)("Results to Review","font-awesome"))),s.a.createElement("p",{style:O.p},r?Object(g.__)("Manage results or restart the scanner here on the Troubleshoot tab.","font-awesome"):s.a.createElement(s.a.Fragment,null,Object(g.__)("Manage results or restart the scanner on the Troubleshoot tab.","font-awesome")," ",s.a.createElement("a",{href:n,style:O.link},Object(g.__)("Go","font-awesome"))))),j=s.a.createElement("div",null,s.a.createElement("div",{style:O.status},s.a.createElement("h2",{style:O.h2},s.a.createElement(l.a,{icon:u.e,size:"sm",spin:!0})," ",s.a.createElement("span",null,C.display))));return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{style:O.header},s.a.createElement("h1",{style:O.h1},Object(g.__)("Font Awesome Conflict Scanner","font-awesome")),s.a.createElement("p",{style:O.adminEyesOnly},Object(g.__)("only admins can see this box","font-awesome"))),s.a.createElement("div",{style:O.content},{None:s.a.createElement("div",null,s.a.createElement("div",{style:O.status},s.a.createElement("h2",{style:O.h2},s.a.createElement(l.a,{icon:u.i,size:"sm"})," ",s.a.createElement("span",null,Object(g.__)("All clear!","font-awesome"))),s.a.createElement("p",{style:O.p},Object(g.__)("No new conflicts found on this page.","font-awesome")))),Running:s.a.createElement("div",null,s.a.createElement("div",{style:O.status},s.a.createElement("h2",{style:O.h2},s.a.createElement(l.a,{icon:u.e,size:"sm",spin:!0})," ",s.a.createElement("span",null,Object(g.__)("Scanning","font-awesome"),"...")))),Restarting:s.a.createElement("div",null,s.a.createElement("div",{style:O.status},s.a.createElement("h2",{style:O.h2},s.a.createElement(l.a,{icon:u.e,size:"sm",spin:!0})," ",s.a.createElement("span",null,Object(g.__)("Restarting","font-awesome"),"...")))),Ready:s.a.createElement("div",null,s.a.createElement("div",null,s.a.createElement("h2",{style:O.h2},s.a.createElement(l.a,{icon:u.o,size:"sm"})," ",Object(g.__)("Proton pack charged!","font-awesome")),s.a.createElement("p",{style:O.p},Object(g.__)("Wander through the pages of your web site and this scanner will track progress.","font-awesome")))),Submitting:j,Stopping:j,Done:s.a.createElement("div",null,s.a.createElement("div",{style:O.status},s.a.createElement("h2",{style:O.h2},s.a.createElement(l.a,{icon:u.b,size:"sm"})," ",s.a.createElement("span",null,Object(g.__)("Page scan complete","font-awesome")))),s.a.createElement("p",{style:O.tally},s.a.createElement("span",{style:O.count},m()(Object.keys(h).filter(e=>!E()(_,e))))," ",s.a.createElement("span",null,Object(g.__)("new conflicts found on this page","font-awesome"))),s.a.createElement("p",{style:O.tally},s.a.createElement("span",{style:O.count},m()(p))," ",s.a.createElement("span",null,"total found"),r?s.a.createElement("span",null," (",Object(g.__)("manage conflicts here on the Troubleshoot tab","font-awesome"),")"):s.a.createElement("span",null," (",s.a.createElement("a",{href:n,style:O.link},Object(g.__)("manage","font-awesome")),")"))),Expired:I,Stopped:I,Error:s.a.createElement("div",null,s.a.createElement("h2",{style:O.h2},s.a.createElement(l.a,{icon:u.l})," ",s.a.createElement("span",null,Object(g.__)("Don't cross the streams! It would be bad.","font-awesome"))),s.a.createElement("p",{style:O.p},D))}[C.code]),s.a.createElement("div",{style:O.timerRow},s.a.createElement("span",null,s.a.createElement(f.a,{addDescription:!0},s.a.createElement("button",{style:O.button,title:Object(g.__)("Stop timer","font-awesome"),onClick:()=>(e(Object(i.userAttemptToStopScanner)()),void e(Object(i.setConflictDetectionScanner)({enable:!1})))},s.a.createElement(l.a,{icon:u.p,size:"lg"})))),{Expired:Object(g.__)("Timer expired","font-awesome"),Stopped:Object(g.__)("Timer stopped","font-awesome"),Restarting:null}[C.code]))},class extends h.a{render(){return s.a.createElement("div",{style:O.container},this.state.error?s.a.createElement("div",{style:O.badness},s.a.createElement(l.a,{icon:u.g}),Object(g.__)(" Whoops, this is embarrassing! Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome")):s.a.createElement(T,null))}}),N=n(178),w=n(205),S=n.n(w),C=n(153),D=n.n(C);const I="font-awesome-plugin-conflict-detection-shadow-host";function j(e){D()(()=>{const t=document.createElement("DIV");t.setAttribute("id",I),document.body.appendChild(t);const n=t.attachShadow({mode:"open"});S()(n);const o=document.createElement("STYLE"),r=N.a.css(),i=document.createTextNode(r);o.appendChild(i);const l=document.createElement("DIV");n.appendChild(o),n.appendChild(l),a.a.render(s.a.createElement(c.a,{store:e},s.a.createElement(y,null)),l)})}function v(){const e=document.getElementById(I);return!!e&&!!e.shadowRoot}}}]);