(window.webpackJsonp__wix_thunderbolt_app=window.webpackJsonp__wix_thunderbolt_app||[]).push([[81],{289:function(e,t,n){"use strict";n.r(t),n.d(t,"site",(function(){return P})),n.d(t,"page",(function(){return M}));var r,a=n(0),i=n(27),o=n(355),u=n(214);!function(e){e.SM="SM",e.Pass="PASS",e.NONE="NONE"}(r||(r={}));var c=Object(i.h)([Object(i.f)(o.c,u.a),Object(i.f)(o.e,u.a),Object(i.f)(o.b,u.a)],(function(e,t,n){return{handle:function(i){return Object(a.b)(this,void 0,void 0,(function(){var o,u,c,s,d;return Object(a.d)(this,(function(b){return i.pageJsonFileName?[2,i]:(o=i.pageId,u=n.get(),c=u.pagesMap,s=u.loginAndNavigate,c[o]?[2,Object(a.a)(Object(a.a)({},i),{pageJsonFileName:c[o]})]:((d=function(n){var a=e.pagesSecurity[n];return a&&a.requireLogin?r.SM:t.passwordProtected[n]||a&&a.passwordDigest?r.Pass:r.NONE}(o))===r.NONE&&function(e,t){throw new Error("we do not have authentication info for protected page "+e+" page security: "+t)}(o,e.pagesSecurity[o]),s(i,d),[2,null]))}))}))}}})),s=n(4),d=n(54),b=n(186),p=n(215),g=n(365),f=n(118),h=n(354),O=Object(i.h)([Object(i.f)(o.b,u.a),Object(i.f)(o.c,u.a),s.f,g.a,Object(i.g)(b.b),Object(i.g)(p.b),f.g,h.a],(function(e,t,n,i,o,u,c,s){var b=t.customNoPermissionsPageUrl,p=function(e){return Object(a.b)(void 0,void 0,void 0,(function(){var t;return Object(a.d)(this,(function(n){switch(n.label){case 0:return u?(t={},[4,u.promptPasswordDialog(e)]):[3,2];case 1:return[2,(t.authorizedPagesMap=n.sent(),t)];case 2:return[2,{authorizedPagesMap:{}}]}}))}))},g=function(e,t){return Object(a.b)(void 0,void 0,Promise,(function(){return Object(a.d)(this,(function(n){return[2,e===r.SM?Object(a.b)(void 0,void 0,void 0,(function(){var e,t;return Object(a.d)(this,(function(n){switch(n.label){case 0:return o?s["specs.thunderbolt.newAuthorizedPagesFlow"]?[4,o.requestAuthorizedPages()]:[3,2]:[3,5];case 1:return(e=n.sent()).success?[2,{authorizedPagesMap:e.pages}]:[3,5];case 2:return[4,o.requestAuthentication({})];case 3:return(e=n.sent()).success?(t={},[4,o.authorizeMemberPagesByToken(e.token)]):[3,5];case 4:return[2,(t.authorizedPagesMap=n.sent(),t)];case 5:return[2,{authorizedPagesMap:{},authenticationResult:e}]}}))})):p(t)]}))}))},f=function(e,t){return Object(a.b)(void 0,void 0,Promise,(function(){var r;return Object(a.d)(this,(function(a){return b?[2,n.navigate(b+'?appSectionParams={"restrictedPageId":"'+e+'"}')]:o&&"SM"===t?(r=function(){i.getCurrentRouteInfo()||n.navigate("./")},o.showNoPermissionsToPageDialog(r),[2,!1]):[2,!i.getCurrentRouteInfo()&&n.navigate("./")]}))}))},h=function(t,r){return Object(a.b)(void 0,void 0,void 0,(function(){var o,u,s,b,p;return Object(a.d)(this,(function(h){switch(h.label){case 0:o=t.pageId,h.label=1;case 1:return h.trys.push([1,3,,4]),[4,g(r,o)];case 2:return u=h.sent(),s=u.authorizedPagesMap,b=u.authenticationResult,e.update((function(e){return Object(a.a)(Object(a.a)({},e),{pagesMap:Object.assign(e.pagesMap,s)})})),(null==b?void 0:b.reason)===d.a.CANCELED?[2,!i.getCurrentRouteInfo()&&n.navigate("./")]:s[o]?[2,n.navigate(t.parsedUrl.href)]:[2,f(o,r)];case 3:return p=h.sent(),c.captureError(p,{tags:{feature:"protectedPage"}}),[2,f(o,r)];case 4:return[2]}}))}))};return e.update((function(){return{loginAndNavigate:h,pagesMap:{}}})),{appWillMount:function(){return Object(a.b)(void 0,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return[2]}))}))}}})),v=n(363),j=n(376),l=Object(i.h)([Object(i.f)(o.b,u.a),b.b],(function(e,t){return{getTpaHandlers:function(){var n=this;return{authorizeMemberPages:function(){return Object(a.b)(n,void 0,Promise,(function(){var n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,t.authorizeMemberPagesByCookie()];case 1:return n=r.sent(),e.update((function(e){return Object(a.a)(Object(a.a)({},e),{pagesMap:Object(a.a)(Object(a.a)({},e.pagesMap),n)})})),[2]}}))}))}}}}})),P=function(e){e(s.h.Protected).to(c),e(v.a.AppWillMountHandler).to(O)},M=function(e){e(j.a).to(l)}}}]);
//# sourceMappingURL=https://static.parastorage.com/services/wix-thunderbolt/dist/protectedPages.54b44863.chunk.min.js.map