Build 584177stable
Module 271866
1,080 characters · in 52f7c364ce575dce.jsDependencies
Source Raw
function(e,t,n){n.d(t,{SH:()=>d,cL:()=>T,q1:()=>A});var i=n(228366),l=n(795816),r=n(627363),s=n(587895),a=n(20015),E=n(793943),o=n(395671),c=n(998218),_=n(110782),u=n(652215);async function A(e,t){i.h.dispatch({applicationId:e,type:"DEVELOPER_TEST_MODE_AUTHORIZATION_START"});try{if(!await (0,l.Ir)(e))throw Error("Do not have access!");let n=s.A.getApplication(e);null==n&&(n=o.Ay.createFromServer(await r.Ay.fetchApplication(e)));let E=(0,a.n)(n,u.gfo.EMBEDDED);if(E&&(null==t||!c.A.URL_REGEX.test(t)))throw Error("Invalid Origin URL for embedded application");return E||_.Cd(n),i.h.dispatch({type:"DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS",applicationId:e,originURL:E?t:null}),n}catch(t){return i.h.dispatch({type:"DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL",applicationId:e,error:t.message}),null}}function T(){E.fy.getState().activePanel===E.HP.APPLICATION_TEST_MODE_DEBUG&&(0,E.Jp)(),i.h.dispatch({type:"DEVELOPER_TEST_MODE_RESET"})}function d(){E.fy.getState().activePanel===E.HP.APPLICATION_TEST_MODE_DEBUG&&(0,E.Jp)(),i.h.dispatch({type:"DEVELOPER_TEST_MODE_RESET_ERROR"})}}