"use strict";(self.webpackChunk_postman_app_scratchpad=self.webpackChunk_postman_app_scratchpad||[]).push([[30],{7528:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var a=n(1),o=n(4),i=n(4509),r=n(8),l=n(7529),u=n(7291),c=n(2495),d=n(3377),s=n(3347),f=n(7531),m=n(7292);window.BroadcastChannel=window.BroadcastChannel||r.default,window.onpageshow=function(e){e.persisted&&window.location.reload()};let p=!1;window.requestIdleCallback=window.requestIdleCallback||function(e){return setTimeout((function(){var t=Date.now();e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)};const w=document.getElementById("app-root");function g(e){!function(){let e=document.getElementsByClassName("pm-loader")[0];e&&e.classList.add("is-hidden")}(),e?(0,o.render)(a.createElement(d.default,{showError:!0}),w):(0,o.render)(a.createElement(d.default,null,a.createElement(s.Theme,null,a.createElement(i.ToastProvider,null,a.createElement(m.default,null)))),w,(()=>{let e=(0,u.getWindowLoadTime)();c.default.addEvent("app_performance_metric","requester_window_loaded",null,null,{load_time:e})}))}function h(e){p||f.default.init((()=>{l.default.init((()=>{p=!0,g(),e&&e()}))}))}},7529:function(e,t,n){n.r(t);var a=n(14),o=n.n(a),i=n(962),r=n(6850),l=n(6993),u=n(7e3),c=n(7001),d=n(7064),s=n(7065),f=n(7073),m=n(7082),p=n(1263),w=n.n(p),g=n(2441),h=n(7085),k=n(6807),_=n(7530),E=n(7103),C=n(7104),v=n(7148),b=n(7149),S=n(7163),R=n(12);const y={process:"requester",ui:!0};window.pm=window.pm||{},window.process={},t.default={init:e=>{R.assign(window.pm,{windowConfig:y});const t=[C.default,h.initializeNavigationForDomains,u.bootWindowConfig,l.default,i.default,S.default,v.cleanupCookies,v.initializeCommunicationForCookies,r.default,s.default,f.default,E.default,c.default,b.default];o()(t,(t=>{(0,d.default)(t);let n=w().Url.parse(location.href).query;if(R.find(n,{key:"access_token"})){console.log("Found access token in URL, logging user in...",n);let e=R.mapValues(R.keyBy(n,"key"),"value"),t={email:e.email,id:e.user_id,name:e.name,username:e.username,auth:{access_token:e.access_token}};pm.eventBus.channel("auth-handler-events").publish((0,g.createEvent)("authenticated","authentication",{userData:t,hasAccounts:!1}))}return t&&pm.logger.error("Error in requester boot sequence",t),(0,m.default)(),k.default.deleteOfflineWorkspace().catch((e=>{pm.logger.warn("Requester~init: Error while deleting default offline workspace",e)})).then((()=>{(0,_.setupSocketStatusReaction)(),e&&e(t)}))}))}}},7531:function(e,t,n){n.r(t);var a=n(14),o=n.n(a),i=(n(60),n(311),n(6851),n(6855),n(6862),n(7064)),r=(n(7074),n(7157),n(4500),n(7159),n(2495)),l=n(7082),u=n(7131);n(4968),n(7146),n(7160),n(7532);window.pm=window.pm||{},pm.init=e=>{u.default.markPoint("app_exec:start");const t=[];o()(t,(t=>{(0,i.default)(t),t&&(pm.bulkAnalytics&&r.default.addEventV2AndPublish({category:"app_boot_failure",action:t.name,label:t.message},{noActiveWorkspace:!0}),pm.logger.error("Error in the app boot sequence",t)),(0,l.default)(),e&&e(t)}))},t.default=pm},7532:function(e,t,n){n.r(t),t.default=function(e){"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then((function(e){for(let t of e)t.unregister()})),e&&"function"==typeof e&&e()}},7530:function(e,t,n){n.r(t),n.d(t,{setupSocketStatusReaction:function(){return s}});var a=n(1019),o=n(2617),i=n(6825),r=n(4590),l=n(12);const u="userOffline",c="You seem to be offline. Data in this workspace might not be up to date.",d=1e3;function s(){(0,a.reaction)((()=>(0,o.getStore)("SyncStatusStore").isSocketConnected),l.debounce((function(e){e?i.default.dismiss(u):i.default.trigger({id:u,message:c,meta:{targets:[r.WORKSPACE_PRIVATE,r.WORKSPACE_PERSONAL,r.WORKSPACE_TEAM,r.WORKSPACE_PUBLIC]}})}),d,{leading:!1,trailing:!0}))}}}]);