Liferay.Loader.define("frontend-js-spa-web@1.0.80/senna/src/screen/Screen",["exports","metal/src/metal","metal-dom/src/all/dom","../cacheable/Cacheable","metal-promise/src/promise/Promise"],function(n,p,q,g,h){function r(e,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);e.prototype=Object.create(c&&c.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(e,
c):e.__proto__=c)}Object.defineProperty(n,"__esModule",{value:!0});g=g&&g.__esModule?g:{default:g};var k=h&&h.__esModule?h:{default:h},s=function(){function e(c,b){for(var a=0;a<b.length;a++){var d=b[a];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(c,d.key,d)}}return function(c,b,a){b&&e(c.prototype,b);a&&e(c,a);return c}}(),t=function c(b,a,d){null===b&&(b=Function.prototype);var f=Object.getOwnPropertyDescriptor(b,a);if(void 0===f)return b=Object.getPrototypeOf(b),
null===b?void 0:c(b,a,d);if("value"in f)return f.value;a=f.get;return void 0===a?void 0:a.call(d)},m=function(c){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var a;a=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a.id=a.makeId_((0,p.getUid)());a.metas=null;a.title=null;return a}r(b,c);s(b,[{key:"activate",
value:function(){}},{key:"beforeActivate",value:function(){}},{key:"beforeDeactivate",value:function(){}},{key:"beforeUpdateHistoryPath",value:function(a){return a}},{key:"beforeUpdateHistoryState",value:function(a){return a}},{key:"deactivate",value:function(){}},{key:"disposeInternal",value:function(){t(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"disposeInternal",this).call(this)}},{key:"evaluateScripts",value:function(a){Object.keys(a).forEach(function(d){a[d].activeChild&&q.globalEval.runScriptsInElement(a[d].activeChild)});
return k.default.resolve()}},{key:"evaluateStyles",value:function(){return k.default.resolve()}},{key:"flip",value:function(a){var d=this,f=[];Object.keys(a).forEach(function(l){l=a[l].show(d.id);f.push(l)});return k.default.all(f)}},{key:"getId",value:function(){return this.id}},{key:"getMetas",value:function(){return this.metas}},{key:"getSurfaceContent",value:function(){}},{key:"getTitle",value:function(){return this.title}},{key:"load",value:function(){return k.default.resolve()}},{key:"makeId_",
value:function(a){return"screen_"+a}},{key:"setId",value:function(a){this.id=a}},{key:"setMetas",value:function(a){this.metas=a}},{key:"setTitle",value:function(a){this.title=a}},{key:"toString",value:function(){return this.id}}]);return b}(g.default);m.isImplementedBy=function(c){return c instanceof m};n.default=m});
Liferay.Loader.define("frontend-js-metal-web@1.0.26/metal-useragent/src/UA",["exports","metal/src/metal"],function(g,h){Object.defineProperty(g,"__esModule",{value:!0});var k=function(){function a(b,e){for(var d=0;d<e.length;d++){var c=e[d];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(b,c.key,c)}}return function(b,e,d){e&&a(b.prototype,e);d&&a(b,d);return b}}(),f=function(){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");
}k(a,null,[{key:"getNativeUserAgent",value:function(){var b=a.globals.window&&a.globals.window.navigator;return b&&(b=b.userAgent)?b:""}},{key:"getNativePlatform",value:function(){var b=a.globals.window&&a.globals.window.navigator;return b&&(b=b.platform)?b:""}},{key:"matchPlatform",value:function(b){return-1!==a.platform.indexOf(b)}},{key:"matchUserAgent",value:function(b){return-1!==a.userAgent.indexOf(b)}},{key:"testUserAgent",value:function(){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:
"";a.userAgent=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";a.platform=b;a.isMac=a.matchPlatform("Mac");a.isWin=a.matchPlatform("Win");a.isOpera=a.matchUserAgent("Opera")||a.matchUserAgent("OPR");a.isIe=a.matchUserAgent("Trident")||a.matchUserAgent("MSIE");a.isEdge=a.matchUserAgent("Edge");a.isIeOrEdge=a.isIe||a.isEdge;a.isChrome=(a.matchUserAgent("Chrome")||a.matchUserAgent("CriOS"))&&!a.isOpera&&!a.isEdge;a.isSafari=a.matchUserAgent("Safari")&&!(a.isChrome||a.isOpera||a.isEdge);a.isFirefox=
a.matchUserAgent("Firefox")}}]);return a}();Object.defineProperty(f,"globals",{writable:!0,value:{window:(0,h.isServerSide)()?null:window}});f.testUserAgent(f.getNativeUserAgent(),f.getNativePlatform());g.default=f});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/senna/src/screen/RequestScreen","exports metal/src/metal metal-ajax/src/Ajax metal-structs/src/all/structs metal-promise/src/promise/Promise ../errors/errors ../utils/utils ../globals/globals ./Screen metal-uri/src/Uri metal-useragent/src/UA".split(" "),function(r,u,n,v,w,x,y,z,A,k,B){function h(f){return f&&f.__esModule?f:{default:f}}function C(f,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+
typeof c);f.prototype=Object.create(c&&c.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(f,c):f.__proto__=c)}Object.defineProperty(r,"__esModule",{value:!0});var D=h(n),E=h(w),m=h(x),F=h(y),g=h(z);n=h(A);var s=h(k),l=h(B),G=function(){function f(c,a){for(var b=0;b<a.length;b++){var d=a[b];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(c,d.key,d)}}return function(c,a,b){a&&
f(c.prototype,a);b&&f(c,b);return c}}();k=function(f){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a;a=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a.cacheable=!0;a.httpHeaders={"X-PJAX":"true","X-Requested-With":"XMLHttpRequest"};a.httpMethod=c.GET;a.request=null;a.timeout=3E4;return a}C(c,
f);G(c,[{key:"assertValidResponseStatusCode",value:function(a){if(!this.isValidResponseStatusCode(a)){var b=Error(m.default.INVALID_STATUS);b.invalidStatus=!0;b.statusCode=a;throw b;}}},{key:"beforeUpdateHistoryPath",value:function(a){var b=this.getRequestPath();return b&&b!==a?b:a}},{key:"beforeUpdateHistoryState",value:function(a){return a.senna&&a.form&&a.redirectPath===a.path?null:a}},{key:"formatLoadPath",value:function(a){a=new s.default(a);a.setHostname(g.default.window.location.hostname);
a.setProtocol(g.default.window.location.protocol);g.default.window.location.port&&a.setPort(g.default.window.location.port);return l.default.isIeOrEdge&&this.httpMethod===c.GET?a.makeUnique().toString():a.toString()}},{key:"getHttpHeaders",value:function(){return this.httpHeaders}},{key:"getHttpMethod",value:function(){return this.httpMethod}},{key:"getRequestPath",value:function(){var a=this.getRequest();if(a){var b=a.requestPath;(a=this.maybeExtractResponseUrlFromRequest(a))&&(b=a);l.default.isIeOrEdge&&
this.httpMethod===c.GET&&(b=(new s.default(b)).removeUnique().toString());return F.default.getUrlPath(b)}return null}},{key:"getRequest",value:function(){return this.request}},{key:"getTimeout",value:function(){return this.timeout}},{key:"isValidResponseStatusCode",value:function(a){return 200<=a&&399>=a}},{key:"load",value:function(a){var b=this,d=this.getCache();if((0,u.isDefAndNotNull)(d))return E.default.resolve(d);var d=null,p=this.httpMethod,q=new v.MultiMap;Object.keys(this.httpHeaders).forEach(function(e){return q.add(e,
b.httpHeaders[e])});g.default.capturedFormElement&&(this.addSafariXHRPolyfill(),d=new FormData(g.default.capturedFormElement),this.maybeAppendSubmitButtonValue_(d),p=c.POST,l.default.isIeOrEdge&&q.add("If-None-Match",'"0"'));var t=this.formatLoadPath(a);return D.default.request(t,p,d,q,null,this.timeout).then(function(e){b.removeSafariXHRPolyfill();b.setRequest(e);b.assertValidResponseStatusCode(e.status);p===c.GET&&b.isCacheable()&&b.addCache(e.responseText);e.requestPath=t;return e.responseText}).catch(function(e){b.removeSafariXHRPolyfill();
switch(e.message){case m.default.REQUEST_TIMEOUT:e.timeout=!0;break;case m.default.REQUEST_ERROR:e.requestError=!0;break;case m.default.REQUEST_PREMATURE_TERMINATION:e.requestError=!0,e.requestPrematureTermination=!0}throw e;})}},{key:"maybeAppendSubmitButtonValue_",value:function(a){var b=g.default.capturedFormButtonElement;b&&b.name&&a.append(b.name,b.value)}},{key:"maybeExtractResponseUrlFromRequest",value:function(a){var b=a.responseURL;return b?b:a.getResponseHeader(c.X_REQUEST_URL_HEADER)}},
{key:"addSafariXHRPolyfill",value:function(){if(g.default.capturedFormElement&&l.default.isSafari)for(var a=g.default.capturedFormElement.querySelectorAll('input[type\x3d"file"]:not([disabled])'),b=0;b<a.length;b++){var d=a[b];if(0<d.files.length)break;d.setAttribute("data-safari-temp-disabled","true");d.setAttribute("disabled","")}}},{key:"removeSafariXHRPolyfill",value:function(){if(g.default.capturedFormElement&&l.default.isSafari)for(var a=g.default.capturedFormElement.querySelectorAll('input[type\x3d"file"][data-safari-temp-disabled]'),
b=0;b<a.length;b++){var d=a[b];d.removeAttribute("data-safari-temp-disabled");d.removeAttribute("disabled")}}},{key:"setHttpHeaders",value:function(a){this.httpHeaders=a}},{key:"setHttpMethod",value:function(a){this.httpMethod=a.toLowerCase()}},{key:"setRequest",value:function(a){this.request=a}},{key:"setTimeout",value:function(a){this.timeout=a}}]);return c}(n.default);k.GET="get";k.POST="post";k.X_REQUEST_URL_HEADER="X-Request-URL";r.default=k});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/senna/src/surface/Surface",["exports","../globals/globals","metal/src/metal","metal-dom/src/all/dom","metal-promise/src/promise/Promise"],function(l,f,m,g,h){function p(e,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);e.prototype=Object.create(c&&c.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(e,
c):e.__proto__=c)}Object.defineProperty(l,"__esModule",{value:!0});var k=f&&f.__esModule?f:{default:f},q=h&&h.__esModule?h:{default:h},r=function(){function e(c,b){for(var a=0;a<b.length;a++){var d=b[a];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(c,d.key,d)}}return function(c,b,a){b&&e(c.prototype,b);a&&e(c,a);return c}}();f=function(e){function c(b){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a;a=(c.__proto__||
Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;if(!b)throw Error("Surface element id not specified. A surface element requires a valid id.");a.activeChild=null;a.defaultChild=null;a.element=null;a.id=b;a.transitionFn=null;a.defaultChild=a.getChild(c.DEFAULT);a.maybeWrapContentAsDefault_();a.activeChild=a.defaultChild;return a}p(c,e);r(c,[{key:"addContent",value:function(b,
a){var d=this.defaultChild;(0,m.isDefAndNotNull)(a)&&((d=this.getChild(b))?(0,g.removeChildren)(d):(d=this.createChild(b),this.transition(d,null)),(0,g.append)(d,a));var n=this.getElement();n&&d&&(0,g.append)(n,d);return d}},{key:"createChild",value:function(b){var a=k.default.document.createElement("div");a.setAttribute("id",this.makeId_(b));return a}},{key:"getChild",value:function(b){return k.default.document.getElementById(this.makeId_(b))}},{key:"getElement",value:function(){return this.element?
this.element:this.element=k.default.document.getElementById(this.id)}},{key:"getId",value:function(){return this.id}},{key:"getTransitionFn",value:function(){return this.transitionFn}},{key:"makeId_",value:function(b){return this.id+"-"+b}},{key:"maybeWrapContentAsDefault_",value:function(){var b=this.getElement();if(b&&!this.defaultChild){for(var a=k.default.document.createDocumentFragment();b.firstChild;)a.appendChild(b.firstChild);this.defaultChild=this.addContent(c.DEFAULT,a);this.transition(null,
this.defaultChild)}}},{key:"setId",value:function(b){this.id=b}},{key:"setTransitionFn",value:function(b){this.transitionFn=b}},{key:"show",value:function(b){var a=this.activeChild,d=this.getChild(b);d||(d=this.defaultChild);this.activeChild=d;return this.transition(a,d).thenAlways(function(){a&&a!==d&&(0,g.exitDocument)(a)})}},{key:"remove",value:function(b){(b=this.getChild(b))&&(0,g.exitDocument)(b)}},{key:"toString",value:function(){return this.id}},{key:"transition",value:function(b,a){return q.default.resolve((this.transitionFn||
c.defaultTransition).call(this,b,a))}}]);return c}(m.Disposable);f.DEFAULT="default";f.defaultTransition=function(e,c){e&&(e.style.display="none",e.classList.remove("flipped"));c&&(c.style.display="block",c.classList.add("flipped"))};l.default=f});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/senna/src/screen/HtmlScreen","exports metal/src/metal metal-dom/src/all/dom metal-promise/src/promise/Promise ../globals/globals ./RequestScreen ../surface/Surface metal-useragent/src/UA metal-uri/src/Uri ../utils/utils".split(" "),function(v,y,n,r,z,A,p,B,C,D){function l(f){return f&&f.__esModule?f:{default:f}}function E(f,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);
f.prototype=Object.create(e&&e.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(f,e):f.__proto__=e)}Object.defineProperty(v,"__esModule",{value:!0});var s=l(r),g=l(z);r=l(A);var F=l(p),t=l(B),G=l(C),h=l(D),H=function(){function f(e,c){for(var a=0;a<c.length;a++){var b=c[a];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(e,b.key,b)}}return function(e,c,a){c&&f(e.prototype,
c);a&&f(e,a);return e}}(),m=function e(c,a,b){null===c&&(c=Function.prototype);var d=Object.getOwnPropertyDescriptor(c,a);if(void 0===d)return c=Object.getPrototypeOf(c),null===c?void 0:e(c,a,b);if("value"in d)return d.value;a=d.get;return void 0===a?void 0:a.call(b)};p=function(e){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a;a=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a.metaTagsSelector="meta";a.titleSelector="title";return a}E(c,e);H(c,[{key:"activate",value:function(){m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"activate",this).call(this);this.releaseVirtualDocument();this.pendingStyles=null}},{key:"allocateVirtualDocumentForContent",value:function(a){this.virtualDocument||(this.virtualDocument=g.default.document.createElement("html"));this.copyNodeAttributesFromContent_(a,this.virtualDocument);
this.virtualDocument.innerHTML=a}},{key:"appendStyleIntoDocument_",value:function(a){(0,n.match)(a,c.selectors.stylesTemporary)&&this.pendingStyles.push(a);if(a.id){var b=g.default.document.getElementById(a.id);if(b){b.parentNode.insertBefore(a,b.nextSibling);return}}g.default.document.head.appendChild(a)}},{key:"assertSameBodyIdInVirtualDocument",value:function(){var a=this.virtualDocument.querySelector("body");g.default.document.body.id||(g.default.document.body.id="senna_surface_"+(0,y.getUid)());
a&&(a.id=g.default.document.body.id)}},{key:"copyNodeAttributesFromContent_",value:function(a,b){a=a.replace(/[<]\s*html/ig,"\x3csenna");a=a.replace(/\/html\s*\>/ig,"/senna\x3e");var d=void 0;t.default.isIe?d=g.default.document.createRange().createContextualFragment(a).querySelector("senna"):(b.innerHTML=a,d=b.querySelector("senna"));d&&(h.default.clearNodeAttributes(b),h.default.copyNodeAttributes(d,b))}},{key:"disposeInternal",value:function(){this.disposePendingStyles();m(c.prototype.__proto__||
Object.getPrototypeOf(c.prototype),"disposeInternal",this).call(this)}},{key:"disposePendingStyles",value:function(){this.pendingStyles&&h.default.removeElementsFromDocument(this.pendingStyles)}},{key:"evaluateScripts",value:function(a){var b=this;return this.evaluateTrackedResources_(n.globalEval.runScriptsInElement,c.selectors.scripts,c.selectors.scriptsTemporary,c.selectors.scriptsPermanent).then(function(){return m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"evaluateScripts",b).call(b,
a)})}},{key:"evaluateStyles",value:function(a){var b=this;this.pendingStyles=[];return this.evaluateTrackedResources_(n.globalEvalStyles.runStylesInElement,c.selectors.styles,c.selectors.stylesTemporary,c.selectors.stylesPermanent,this.appendStyleIntoDocument_.bind(this)).then(function(){return m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"evaluateStyles",b).call(b,a)})}},{key:"evaluateFavicon_",value:function(){var a=this,b=this.virtualQuerySelectorAll_(c.selectors.favicon),d=this.querySelectorAll_(c.selectors.favicon);
return new s.default(function(q){h.default.removeElementsFromDocument(d);a.runFaviconInElement_(b).then(function(){return q()})})}},{key:"evaluateTrackedResources_",value:function(a,b,d,q,I){var w=this;b=this.virtualQuerySelectorAll_(b);var J=this.querySelectorAll_(d);this.querySelectorAll_(q).forEach(function(k){(k=w.getResourceKey_(k))&&(c.permanentResourcesInDoc[k]=!0)});var x=(0,n.buildFragment)();b.forEach(function(k){var u=w.getResourceKey_(k);c.permanentResourcesInDoc[u]||x.appendChild(k);
u&&(0,n.match)(k,q)&&(c.permanentResourcesInDoc[u]=!0)});return new s.default(function(k){a(x,function(){h.default.removeElementsFromDocument(J);k()},I)})}},{key:"flip",value:function(a){var b=this;return m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"flip",this).call(this,a).then(function(){h.default.clearNodeAttributes(g.default.document.documentElement);h.default.copyNodeAttributes(b.virtualDocument,g.default.document.documentElement);b.evaluateFavicon_();b.updateMetaTags_()})}},
{key:"updateMetaTags_",value:function(){var a=this.querySelectorAll_("meta"),b=this.metas;a&&(h.default.removeElementsFromDocument(a),b&&b.forEach(function(d){return g.default.document.head.appendChild(d)}))}},{key:"getResourceKey_",value:function(a){return a.id||a.href||a.src||""}},{key:"getSurfaceContent",value:function(a){var b=this.virtualDocument.querySelector("#"+a);if(b)return(a=b.querySelector("#"+a+"-"+F.default.DEFAULT))?a.innerHTML:b.innerHTML}},{key:"getTitleSelector",value:function(){return this.titleSelector}},
{key:"load",value:function(a){var b=this;return m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"load",this).call(this,a).then(function(d){b.allocateVirtualDocumentForContent(d);b.resolveTitleFromVirtualDocument();b.resolveMetaTagsFromVirtualDocument();b.assertSameBodyIdInVirtualDocument();t.default.isIe&&b.makeTemporaryStylesHrefsUnique_();return d})}},{key:"makeTemporaryStylesHrefsUnique_",value:function(){var a=this;this.virtualQuerySelectorAll_(c.selectors.stylesTemporary).forEach(function(b){return a.replaceStyleAndMakeUnique_(b)})}},
{key:"replaceStyleAndMakeUnique_",value:function(a){if(a.href){var b=g.default.document.createElement(a.tagName);a.href=(new G.default(a.href)).makeUnique().toString();h.default.copyNodeAttributes(a,b);a.parentNode.replaceChild(b,a);a.disabled=!0}}},{key:"runFaviconInElement_",value:function(a){return new s.default(function(b){a.forEach(function(d){return document.head.appendChild(t.default.isIe?d:h.default.setElementWithRandomHref(d))});b()})}},{key:"virtualQuerySelectorAll_",value:function(a){return Array.prototype.slice.call(this.virtualDocument.querySelectorAll(a))}},
{key:"querySelectorAll_",value:function(a){return Array.prototype.slice.call(g.default.document.querySelectorAll(a))}},{key:"releaseVirtualDocument",value:function(){this.virtualDocument=null}},{key:"resolveTitleFromVirtualDocument",value:function(){var a=this.virtualDocument.querySelector(this.titleSelector);a&&this.setTitle(a.textContent.trim())}},{key:"resolveMetaTagsFromVirtualDocument",value:function(){var a=this.virtualQuerySelectorAll_(this.metaTagsSelector);a&&this.setMetas(a)}},{key:"setTitleSelector",
value:function(a){this.titleSelector=a}}]);return c}(r.default);p.selectors={favicon:'link[rel\x3d"Shortcut Icon"],link[rel\x3d"shortcut icon"],link[rel\x3d"icon"],link[href$\x3d"favicon.icon"]',scripts:"script[data-senna-track]",scriptsPermanent:'script[data-senna-track\x3d"permanent"]',scriptsTemporary:'script[data-senna-track\x3d"temporary"]',styles:'style[data-senna-track],link[data-senna-track]:not([rel\x3d"Shortcut Icon"]):not([rel\x3d"shortcut icon"]):not([rel\x3d"icon"]):not([href$\x3d"favicon.icon"])',
stylesPermanent:'style[data-senna-track\x3d"permanent"],link[data-senna-track\x3d"permanent"]:not([rel\x3d"Shortcut Icon"]):not([rel\x3d"shortcut icon"]):not([rel\x3d"icon"]):not([href$\x3d"favicon.icon"])',stylesTemporary:'style[data-senna-track\x3d"temporary"],link[data-senna-track\x3d"temporary"]:not([rel\x3d"Shortcut Icon"]):not([rel\x3d"shortcut icon"]):not([rel\x3d"icon"]):not([href$\x3d"favicon.icon"])'};p.permanentResourcesInDoc={};v.default=p});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/liferay/util/Utils.es",["exports"],function(f){Object.defineProperty(f,"__esModule",{value:!0});var g=function(){function b(a,c){for(var d=0;d<c.length;d++){var e=c[d];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(a,e.key,e)}}return function(a,c,d){c&&b(a.prototype,c);d&&b(a,d);return a}}(),h=Math.pow(2,31)-1,k=function(){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");
}g(b,null,[{key:"getMaxTimeout",value:function(){return h}},{key:"getPortletBoundaryId",value:function(a){return"p_p_id_"+a+"_"}},{key:"getPortletBoundaryIds",value:function(a){return a.map(function(c){return b.getPortletBoundaryId(c)})}},{key:"resetAllPortlets",value:function(){b.getPortletBoundaryIds(Liferay.Portlet.list).forEach(function(a,c,d){if(a=document.querySelector("#"+a))Liferay.Portlet.destroy(a),a.portletProcessed=!1});Liferay.Portlet.readyCounter=0}}]);return b}();f.default=k});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/liferay/screen/EventScreen.es",["exports","senna/src/screen/HtmlScreen","senna/src/globals/globals","metal-promise/src/promise/Promise","../util/Utils.es"],function(m,k,p,n,q){function l(f){return f&&f.__esModule?f:{default:f}}function r(f,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,
configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}Object.defineProperty(m,"__esModule",{value:!0});var g=l(k),s=l(p),t=l(q),u=function(){function f(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&f(d.prototype,b);a&&f(d,a);return d}}(),h=function d(b,a,c){null===b&&(b=Function.prototype);var e=Object.getOwnPropertyDescriptor(b,a);
if(void 0===e)return b=Object.getPrototypeOf(b),null===b?void 0:d(b,a,c);if("value"in e)return e.value;a=e.get;return void 0===a?void 0:a.call(c)};k=function(d){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var a;a=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a.cacheable=!1;a.timeout=Liferay.SPA.app.timeout;
return a}r(b,d);u(b,[{key:"dispose",value:function(){h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"dispose",this).call(this);Liferay.fire("screenDispose",{app:Liferay.SPA.app,screen:this})}},{key:"activate",value:function(){h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"activate",this).call(this);Liferay.fire("screenActivate",{app:Liferay.SPA.app,screen:this})}},{key:"addCache",value:function(a){h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"addCache",this).call(this,
a);this.cacheLastModified=(new Date).getTime()}},{key:"checkRedirectPath",value:function(a){var c=Liferay.SPA.app;s.default.capturedFormElement||c.findRoute(a)||(window.location.href=a)}},{key:"deactivate",value:function(){h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"deactivate",this).call(this);Liferay.fire("screenDeactivate",{app:Liferay.SPA.app,screen:this})}},{key:"beforeScreenFlip",value:function(){Liferay.fire("beforeScreenFlip",{app:Liferay.SPA.app,screen:this})}},{key:"copyBodyAttributes",
value:function(){var a=this.virtualDocument.querySelector("body");document.body.className=a.className;document.body.onload=a.onload}},{key:"evaluateStyles",value:function(a){var c=document.querySelector("html").lang.replace("-","_"),e=this.virtualDocument.lang.replace("-","_");c!==e&&(this.stylesPermanentSelector_=g.default.selectors.stylesPermanent,this.stylesTemporarySelector_=g.default.selectors.stylesTemporary,this.makePermanentSelectorsTemporary_(c,e));return h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),
"evaluateStyles",this).call(this,a).then(this.restoreSelectors_.bind(this))}},{key:"flip",value:function(a){var c=this;this.copyBodyAttributes();return n.CancellablePromise.resolve(t.default.resetAllPortlets()).then(n.CancellablePromise.resolve(this.beforeScreenFlip())).then(h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"flip",this).call(this,a)).then(function(){c.runBodyOnLoad();Liferay.fire("screenFlip",{app:Liferay.SPA.app,screen:c})})}},{key:"getCache",value:function(){var a=Liferay.SPA.app;
return a.isCacheEnabled()&&!a.isScreenCacheExpired(this)?h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"getCache",this).call(this):null}},{key:"getCacheLastModified",value:function(){return this.cacheLastModified}},{key:"isValidResponseStatusCode",value:function(a){var c=Liferay.SPA.app.getValidStatusCodes();return 200<=a&&500>=a||-1<c.indexOf(a)}},{key:"load",value:function(a){var c=this;return h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"load",this).call(this,a).then(function(e){var v=
c.beforeUpdateHistoryPath(a);c.checkRedirectPath(v);Liferay.fire("screenLoad",{app:Liferay.SPA.app,content:e,screen:c});return e})}},{key:"makePermanentSelectorsTemporary_",value:function(a,c){g.default.selectors.stylesTemporary=g.default.selectors.stylesTemporary.split(",").concat(g.default.selectors.stylesPermanent.split(",").map(function(e){return e+'[href*\x3d"'+a+'"]'})).join();g.default.selectors.stylesPermanent=g.default.selectors.stylesPermanent.split(",").map(function(e){return e+'[href*\x3d"'+
c+'"]'}).join()}},{key:"restoreSelectors_",value:function(){g.default.selectors.stylesPermanent=this.stylesPermanentSelector_||g.default.selectors.stylesPermanent;g.default.selectors.stylesTemporary=this.stylesTemporarySelector_||g.default.selectors.stylesTemporary}},{key:"runBodyOnLoad",value:function(){var a=document.body.onload;a&&a()}},{key:"runFaviconInElement_",value:function(a){return h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"runFaviconInElement_",this).call(this,a).then(function(){a.forEach(function(c){c.type||
-1===c.href.indexOf(".ico")||(c.type="image/x-icon")})})}}]);return b}(g.default);m.default=k});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/liferay/screen/ActionURLScreen.es",["exports","./EventScreen.es","metal-uri/src/Uri","senna/src/utils/utils"],function(l,g,h,m){function k(d){return d&&d.__esModule?d:{default:d}}function n(d,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);d.prototype=Object.create(c&&c.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?
Object.setPrototypeOf(d,c):d.__proto__=c)}Object.defineProperty(l,"__esModule",{value:!0});g=k(g);var p=k(h),q=k(m),r=function(){function d(c,b){for(var a=0;a<b.length;a++){var e=b[a];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(c,e.key,e)}}return function(c,b,a){b&&d(c.prototype,b);a&&d(c,a);return c}}(),s=function c(b,a,e){null===b&&(b=Function.prototype);var f=Object.getOwnPropertyDescriptor(b,a);if(void 0===f)return b=Object.getPrototypeOf(b),
null===b?void 0:c(b,a,e);if("value"in f)return f.value;a=f.get;return void 0===a?void 0:a.call(e)};h=function(c){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var a;a=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a.httpMethod="POST";return a}n(b,c);r(b,[{key:"getRequestPath",value:function(){if(this.getRequest()){var a=
new p.default(s(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"getRequestPath",this).call(this));"1"===a.getParameterValue("p_p_lifecycle")&&a.setParameterValue("p_p_lifecycle","0");return q.default.getUrlPath(a.toString())}return null}}]);return b}(g.default);l.default=h});
Liferay.Loader.define("frontend-js-metal-web@1.0.26/metal-debounce/src/debounce",["exports"],function(a){function c(b,f){return function d(){var g=arguments;e(d);d.id=setTimeout(function(){b.apply(null,g)},f)}}function e(b){clearTimeout(b.id)}Object.defineProperty(a,"__esModule",{value:!0});a.default=c;a.cancelDebounce=e;a.debounce=c});
Liferay.Loader.define("frontend-js-metal-web@1.0.26/metal-path-parser/src/pathParser",["exports","metal/src/metal"],function(h,k){function p(a){for(var e="",c=0;c<a.length;c++)if(l.default.isString(a[c]))e+=q(a[c]);else{var b="(?:"+a[c].pattern+")";a[c].repeat&&(b+="(?:\\/"+b+")*");b=q(a[c].prefix)+("("+b+")");a[c].optional&&(a[c].partial||(b="(?:"+b+")"),b+="?");e+=b}a=RegExp;e=/\/$/.test(e)?e+"?":e+"\\/?";return new a("^"+e+"$")}function q(a){return a.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}
function n(a){if(!l.default.isString(a))return a;for(var e=0,c=[],b="",g=0,f=r.exec(a);f;){var d={match:f[0],prefix:f[1],name:f[2],paramPattern:f[3],unnamedPattern:f[4],modifier:f[5]},b=a.slice(g,f.index),g=f.index+d.match.length;c.push(b);c.push({name:d.name?d.name:""+e++,partial:a[g]&&a[g]!==d.prefix,prefix:d.prefix||"",pattern:d.paramPattern||d.unnamedPattern||"[^\\/]+",repeat:"*"===d.modifier||"+"===d.modifier,optional:"*"===d.modifier||"?"===d.modifier});f=r.exec(a)}g<a.length&&c.push(a.substr(g));
return c}Object.defineProperty(h,"__esModule",{value:!0});h.parse=n;h.toRegex=function(a){return p(n(a))};h.extractData=function(a,e){var c={},b=n(a),g=e.match(p(b));if(!g)return null;for(var f=1,d=0;d<b.length;d++)if(!l.default.isString(b[d])){var m=g[f++];l.default.isDef(m)&&(b[d].repeat&&(m=m.split("/")),c[b[d].name]=m)}return c};var l=k&&k.__esModule?k:{default:k},r=/([\/])?(?:(?:\:(\w+)(?:\(((?:\\.|[^\\()])*)\))?|\(((?:\\.|[^\\()])+)\))([+*?])?)/g});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/senna/src/route/Route",["exports","metal/src/metal","metal-path-parser/src/pathParser"],function(h,f,g){Object.defineProperty(h,"__esModule",{value:!0});var k=function(){function d(a,b){for(var e=0;e<b.length;e++){var c=b[e];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(a,c.key,c)}}return function(a,b,e){b&&d(a.prototype,b);e&&d(a,e);return a}}(),l=function(){function d(a,b){if(!(this instanceof
d))throw new TypeError("Cannot call a class as a function");if(!(0,f.isDefAndNotNull)(a))throw Error("Route path not specified.");if(!(0,f.isFunction)(b))throw Error("Route handler is not a function.");this.handler=b;this.path=a}k(d,[{key:"buildParsedData_",value:function(){if(!this.parsedData_){var a=(0,g.parse)(this.path);this.parsedData_={regex:(0,g.toRegex)(a),tokens:a}}return this.parsedData_}},{key:"extractParams",value:function(a){return(0,f.isString)(this.path)?(0,g.extractData)(this.buildParsedData_().tokens,
a):{}}},{key:"getHandler",value:function(){return this.handler}},{key:"getPath",value:function(){return this.path}},{key:"matchesPath",value:function(a){var b=this.path;if((0,f.isFunction)(b))return b(a);(0,f.isString)(b)&&(b=this.buildParsedData_().regex);return b instanceof RegExp?-1<a.search(b):!1}}]);return d}();h.default=l});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/senna/src/app/App","exports metal-dom/src/all/dom metal/src/metal metal-events/src/events metal-promise/src/promise/Promise metal-debounce/src/debounce ../globals/globals ../route/Route ../screen/Screen ../surface/Surface metal-uri/src/Uri ../utils/utils".split(" "),function(w,p,r,x,u,z,A,B,C,D,E,F){function q(l){return l&&l.__esModule?l:{default:l}}function G(l,k){if("function"!==typeof k&&null!==k)throw new TypeError("Super expression must either be null or a function, not "+
typeof k);l.prototype=Object.create(k&&k.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}});k&&(Object.setPrototypeOf?Object.setPrototypeOf(l,k):l.__proto__=k)}Object.defineProperty(w,"__esModule",{value:!0});var m=q(u),H=q(z),d=q(A),y=q(B),v=q(C),I=q(D),t=q(E),h=q(F),J=function(){function l(k,g){for(var a=0;a<g.length;a++){var b=g[a];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(k,b.key,b)}}return function(k,g,a){g&&l(k.prototype,
g);a&&l(k,a);return k}}(),K=function k(g,a,b){null===g&&(g=Function.prototype);var c=Object.getOwnPropertyDescriptor(g,a);if(void 0===c)return g=Object.getPrototypeOf(g),null===g?void 0:k(g,a,b);if("value"in c)return c.value;a=c.get;return void 0===a?void 0:a.call(b)},s={IMMEDIATE:"immediate",SCHEDULE_LAST:"scheduleLast"};u=function(k){function g(){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function");var a;a=(g.__proto__||Object.getPrototypeOf(g)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a.activeScreen=null;a.activePath=null;a.allowPreventNavigate=!0;a.basePath="";a.browserPathBeforeNavigate=h.default.getCurrentBrowserPathWithoutHash();a.captureScrollPositionFromScrollEvent=!0;a.defaultTitle=d.default.document.title;a.formSelector='form[enctype\x3d"multipart/form-data"]:not([data-senna-off])';a.ignoreQueryStringFromRoutePath=!1;a.linkSelector='a:not([data-senna-off]):not([target\x3d"_blank"])';a.loadingCssClass="senna-loading";
a.nativeScrollRestorationSupported="scrollRestoration"in d.default.window.history;a.navigationStrategy=s.IMMEDIATE;a.isNavigationPending=!1;a.pendingNavigate=null;a.popstateScrollLeft=0;a.popstateScrollTop=0;a.redirectPath=null;a.routes=[];a.scheduledNavigationQueue=[];a.screens={};a.skipLoadPopstate=!1;a.surfaces={};a.updateScrollPosition=!0;a.appEventHandlers_=new x.EventHandler;a.appEventHandlers_.add((0,p.on)(d.default.window,"scroll",(0,H.default)(a.onScroll_.bind(a),100)),(0,p.on)(d.default.window,
"load",a.onLoad_.bind(a)),(0,p.on)(d.default.window,"popstate",a.onPopstate_.bind(a)));a.on("startNavigate",a.onStartNavigate_);a.on("beforeNavigate",a.onBeforeNavigate_);a.on("beforeNavigate",a.onBeforeNavigateDefault_,!0);a.on("beforeUnload",a.onBeforeUnloadDefault_);a.setLinkSelector(a.linkSelector);a.setFormSelector(a.formSelector);a.maybeOverloadBeforeUnload_();return a}G(g,k);J(g,[{key:"addRoutes",value:function(a){var b=this;Array.isArray(a)||(a=[a]);a.forEach(function(c){c instanceof y.default||
(c=new y.default(c.path,c.handler));b.routes.push(c)});return this}},{key:"addSurfaces",value:function(a){var b=this;Array.isArray(a)||(a=[a]);a.forEach(function(c){(0,r.isString)(c)&&(c=new I.default(c));b.surfaces[c.getId()]=c});return this}},{key:"canNavigate",value:function(a){var b=h.default.isWebUri(a);if(!b)return!1;a=h.default.getUrlPath(a);return!this.isLinkSameOrigin_(b.getHost())||!this.isSameBasePath_(a)||b.getHash()&&h.default.isCurrentBrowserPath(a)||!this.findRoute(a)?!1:!0}},{key:"clearScreensCache",
value:function(){var a=this;Object.keys(this.screens).forEach(function(b){b===a.activePath?a.activeScreen.clearCache():a.isNavigationPending&&a.pendingNavigate.path===b||a.removeScreen(b)})}},{key:"createScreenInstance",value:function(a,b){if(!this.pendingNavigate&&a===this.activePath)return this.activeScreen;var c=this.screens[a];c||(c=b.getHandler(),c=c===v.default||v.default.isImplementedBy(c.prototype)?new c:c(b)||new v.default);return c}},{key:"disposeInternal",value:function(){this.activeScreen&&
this.removeScreen(this.activePath);this.clearScreensCache();this.formEventHandler_.removeListener();this.linkEventHandler_.removeListener();this.appEventHandlers_.removeAllListeners();K(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"disposeInternal",this).call(this)}},{key:"dispatch",value:function(){return this.navigate(h.default.getCurrentBrowserPath(),!0)}},{key:"doNavigate_",value:function(a,b){var c=this,e=this.findRoute(a);if(!e)return this.pendingNavigate=m.default.reject(new m.default.CancellationError("No route for "+
a));this.stopPendingNavigate_();this.isNavigationPending=!0;var f=this.createScreenInstance(a,e);return this.maybePreventDeactivate_().then(function(){return c.maybePreventActivate_(f)}).then(function(){return f.load(a)}).then(function(){c.navigationStrategy=s.SCHEDULE_LAST;c.activeScreen&&c.activeScreen.deactivate();c.prepareNavigateHistory_(a,f,b);c.prepareNavigateSurfaces_(f,c.surfaces,c.extractParams(e,a))}).then(function(){return f.evaluateStyles(c.surfaces)}).then(function(){return f.flip(c.surfaces)}).then(function(){return f.evaluateScripts(c.surfaces)}).then(function(){return c.maybeUpdateScrollPositionState_()}).then(function(){return c.syncScrollPositionSyncThenAsync_()}).then(function(){return c.finalizeNavigate_(a,
f)}).then(function(){return c.maybeOverloadBeforeUnload_()}).catch(function(n){c.isNavigationPending=!1;c.handleNavigateError_(a,f,n);throw n;}).thenAlways(function(){c.navigationStrategy=s.IMMEDIATE;if(c.scheduledNavigationQueue.length){var n=c.scheduledNavigationQueue.shift();c.maybeNavigate_(n.href,n)}})}},{key:"extractParams",value:function(a,b){return a.extractParams(this.getRoutePath(b))}},{key:"finalizeNavigate_",value:function(a,b){b.activate();this.activeScreen&&!this.activeScreen.isCacheable()&&
this.activeScreen!==b&&this.removeScreen(this.activePath);this.activePath=a;this.activeScreen=b;this.browserPathBeforeNavigate=h.default.getCurrentBrowserPathWithoutHash();this.screens[a]=b;this.isNavigationPending=!1;this.pendingNavigate=null;d.default.capturedFormElement=null;d.default.capturedFormButtonElement=null}},{key:"findRoute",value:function(a){a=this.getRoutePath(a);for(var b=0;b<this.routes.length;b++){var c=this.routes[b];if(c.matchesPath(a))return c}return null}},{key:"getAllowPreventNavigate",
value:function(){return this.allowPreventNavigate}},{key:"getBasePath",value:function(){return this.basePath}},{key:"getDefaultTitle",value:function(){return this.defaultTitle}},{key:"getFormSelector",value:function(){return this.formSelector}},{key:"getIgnoreQueryStringFromRoutePath",value:function(){return this.ignoreQueryStringFromRoutePath}},{key:"getLinkSelector",value:function(){return this.linkSelector}},{key:"getLoadingCssClass",value:function(){return this.loadingCssClass}},{key:"getRoutePath",
value:function(a){if(this.getIgnoreQueryStringFromRoutePath())return a=h.default.getUrlPathWithoutHashAndSearch(a),h.default.getUrlPathWithoutHashAndSearch(a.substr(this.basePath.length));a=h.default.getUrlPathWithoutHash(a);return h.default.getUrlPathWithoutHash(a.substr(this.basePath.length))}},{key:"getUpdateScrollPosition",value:function(){return this.updateScrollPosition}},{key:"handleNavigateError_",value:function(a,b,c){var e=this;this.emit("navigationError",{error:c,nextScreen:b,path:a});
h.default.isCurrentBrowserPath(a)||(this.isNavigationPending&&this.pendingNavigate?this.pendingNavigate.thenAlways(function(){return e.removeScreen(a)},this):this.removeScreen(a))}},{key:"hasRoutes",value:function(){return 0<this.routes.length}},{key:"isLinkSameOrigin_",value:function(a){a=new t.default(a);var b=new t.default(d.default.window.location.host);return a.getPort()===b.getPort()&&a.getHostname()===b.getHostname()}},{key:"isSameBasePath_",value:function(a){return 0===a.indexOf(this.basePath)}},
{key:"lockHistoryScrollPosition_",value:function(){var a=d.default.window.history.state;if(a){var b=!1,c=function f(){d.default.document.removeEventListener("scroll",f,!1);b||(d.default.window.scrollTo(a.scrollLeft,a.scrollTop),b=!0)};r.async.nextTick(c);d.default.document.addEventListener("scroll",c,!1)}}},{key:"maybeDisableNativeScrollRestoration",value:function(){this.nativeScrollRestorationSupported&&(this.nativeScrollRestoration_=d.default.window.history.scrollRestoration,d.default.window.history.scrollRestoration=
"manual")}},{key:"maybeScheduleNavigation_",value:function(a,b){return this.isNavigationPending&&this.navigationStrategy===s.SCHEDULE_LAST?(this.scheduledNavigationQueue=[r.object.mixin({href:a,isScheduledNavigation:!0},b)],!0):!1}},{key:"maybeNavigate_",value:function(a,b){if(this.canNavigate(a))if(this.maybeScheduleNavigation_(a,b))b.preventDefault();else{var c=!1;try{this.navigate(h.default.getUrlPath(a),!1,b)}catch(e){c=!0}c||b.isScheduledNavigation||b.preventDefault()}}},{key:"maybeOverloadBeforeUnload_",
value:function(){var a=this;"function"===typeof window.onbeforeunload&&(window._onbeforeunload=window.onbeforeunload,window.onbeforeunload=function(b){a.emit("beforeUnload",b);if(b&&b.defaultPrevented)return!0},window.onbeforeunload._overloaded=!0)}},{key:"maybePreventActivate_",value:function(a){var b=this;return m.default.resolve().then(function(){return a.beforeActivate()}).then(function(c){if(c)return b.pendingNavigate=m.default.reject(new m.default.CancellationError("Cancelled by next screen")),
b.pendingNavigate})}},{key:"maybePreventDeactivate_",value:function(){var a=this;return m.default.resolve().then(function(){if(a.activeScreen)return a.activeScreen.beforeDeactivate()}).then(function(b){if(b)return a.pendingNavigate=m.default.reject(new m.default.CancellationError("Cancelled by active screen")),a.pendingNavigate})}},{key:"maybeRepositionScrollToHashedAnchor",value:function(){var a=d.default.window.location.hash;a&&(a=d.default.document.getElementById(a.substring(1)))&&(a=h.default.getNodeOffset(a),
d.default.window.scrollTo(a.offsetLeft,a.offsetTop))}},{key:"maybeRestoreNativeScrollRestoration",value:function(){this.nativeScrollRestorationSupported&&this.nativeScrollRestoration_&&(d.default.window.history.scrollRestoration=this.nativeScrollRestoration_)}},{key:"maybeRestoreRedirectPathHash_",value:function(a,b,c){return b===h.default.getUrlPathWithoutHash(a)?b+c:b}},{key:"maybeUpdateScrollPositionState_",value:function(){var a=d.default.document.getElementById(d.default.window.location.hash.substring(1));
a&&(a=h.default.getNodeOffset(a),this.saveHistoryCurrentPageScrollPosition_(a.offsetTop,a.offsetLeft))}},{key:"navigate",value:function(a,b,c){if(!h.default.isHtml5HistorySupported())throw Error("HTML5 History is not supported. Senna will not intercept navigation.");c&&(d.default.capturedFormElement=c.capturedFormElement,d.default.capturedFormButtonElement=c.capturedFormButtonElement);a===this.activePath&&(b=!0);this.emit("beforeNavigate",{event:c,path:a,replaceHistory:!!b});return this.pendingNavigate}},
{key:"onBeforeNavigate_",value:function(a){d.default.capturedFormElement&&(a.form=d.default.capturedFormElement)}},{key:"onBeforeNavigateDefault_",value:function(a){if(!this.pendingNavigate||this.pendingNavigate.path!==a.path&&this.navigationStrategy!==s.SCHEDULE_LAST)this.emit("beforeUnload",a),this.emit("startNavigate",{form:a.form,path:a.path,replaceHistory:a.replaceHistory})}},{key:"onBeforeUnloadDefault_",value:function(a){var b=window._onbeforeunload;b&&!b._overloaded&&b()&&a.preventDefault()}},
{key:"onDocClickDelegate_",value:function(a){a.altKey||a.ctrlKey||a.metaKey||a.shiftKey||a.button||this.maybeNavigate_(a.delegateTarget.href,a)}},{key:"onDocSubmitDelegate_",value:function(a){var b=a.delegateTarget;"get"!==b.method&&(a.capturedFormElement=b,(0,p.match)(d.default.document.activeElement,"button:not([type]),button[type\x3dsubmit],input[type\x3dsubmit]")?a.capturedFormButtonElement=d.default.document.activeElement:a.capturedFormButtonElement=b.querySelector("button:not([type]),button[type\x3dsubmit],input[type\x3dsubmit]"),
this.maybeNavigate_(b.action,a))}},{key:"onLoad_",value:function(){var a=this;this.skipLoadPopstate=!0;setTimeout(function(){a.skipLoadPopstate=!1},0);this.maybeRepositionScrollToHashedAnchor()}},{key:"onPopstate_",value:function(a){if(!this.skipLoadPopstate)if(h.default.isCurrentBrowserPath(this.browserPathBeforeNavigate))this.maybeRepositionScrollToHashedAnchor();else{var b=a.state;b?b.senna&&(this.popstateScrollTop=b.scrollTop,this.popstateScrollLeft=b.scrollLeft,this.nativeScrollRestorationSupported||
this.lockHistoryScrollPosition_(),this.once("endNavigate",function(){b.referrer&&h.default.setReferrer(b.referrer)}),a=new t.default(b.path),a.setHostname(d.default.window.location.hostname),a.setPort(d.default.window.location.port),this.maybeScheduleNavigation_(a.toString(),{})||this.navigate(b.path,!0)):d.default.window.location.hash?(this.redirectPath&&!h.default.isCurrentBrowserPath(this.redirectPath)&&this.reloadPage(),this.maybeRepositionScrollToHashedAnchor()):this.reloadPage()}}},{key:"onScroll_",
value:function(){this.captureScrollPositionFromScrollEvent&&this.saveHistoryCurrentPageScrollPosition_(d.default.window.pageYOffset,d.default.window.pageXOffset)}},{key:"onStartNavigate_",value:function(a){var b=this;this.maybeDisableNativeScrollRestoration();this.captureScrollPositionFromScrollEvent=!1;(0,p.addClasses)(d.default.document.documentElement,this.loadingCssClass);var c={form:a.form,path:a.path};this.pendingNavigate=this.doNavigate_(a.path,a.replaceHistory).catch(function(e){c.error=e;
throw e;}).thenAlways(function(){b.pendingNavigate||b.scheduledNavigationQueue.length||((0,p.removeClasses)(d.default.document.documentElement,b.loadingCssClass),b.maybeRestoreNativeScrollRestoration(),b.captureScrollPositionFromScrollEvent=!0);b.emit("endNavigate",c)});this.pendingNavigate.path=a.path}},{key:"prefetch",value:function(a){var b=this,c=this.findRoute(a);if(!c)return m.default.reject(new m.default.CancellationError("No route for "+a));var e=this.createScreenInstance(a,c);return e.load(a).then(function(){return b.screens[a]=
e}).catch(function(f){b.handleNavigateError_(a,e,f);throw f;})}},{key:"prepareNavigateHistory_",value:function(a,b,c){var e=b.getTitle();(0,r.isString)(e)||(e=this.getDefaultTitle());var f=b.beforeUpdateHistoryPath(a),n={form:(0,r.isDefAndNotNull)(d.default.capturedFormElement),path:a,redirectPath:f,scrollLeft:0,scrollTop:0,senna:!0};c&&(n.scrollTop=this.popstateScrollTop,n.scrollLeft=this.popstateScrollLeft);var L=(new t.default(a)).getHash(),f=this.maybeRestoreRedirectPathHash_(a,f,L);this.updateHistory_(e,
f,b.beforeUpdateHistoryState(n),c);this.redirectPath=f}},{key:"prepareNavigateSurfaces_",value:function(a,b,c){Object.keys(b).forEach(function(e){var f=a.getSurfaceContent(e,c);b[e].addContent(a.getId(),f)})}},{key:"reloadPage",value:function(){d.default.window.location.reload()}},{key:"removeRoute",value:function(a){return r.array.remove(this.routes,a)}},{key:"removeScreen",value:function(a){var b=this,c=this.screens[a];c&&(Object.keys(this.surfaces).forEach(function(e){return b.surfaces[e].remove(c.getId())}),
c.dispose(),delete this.screens[a])}},{key:"saveHistoryCurrentPageScrollPosition_",value:function(a,b){var c=d.default.window.history.state;if(c&&c.senna){var e=[a,b];c.scrollTop=e[0];c.scrollLeft=e[1];d.default.window.history.replaceState(c,null,null)}}},{key:"setAllowPreventNavigate",value:function(a){this.allowPreventNavigate=a}},{key:"setBasePath",value:function(a){this.basePath=h.default.removePathTrailingSlash(a)}},{key:"setDefaultTitle",value:function(a){this.defaultTitle=a}},{key:"setFormSelector",
value:function(a){this.formSelector=a;this.formEventHandler_&&this.formEventHandler_.removeListener();this.formEventHandler_=(0,p.delegate)(document,"submit",this.formSelector,this.onDocSubmitDelegate_.bind(this),this.allowPreventNavigate)}},{key:"setIgnoreQueryStringFromRoutePath",value:function(a){this.ignoreQueryStringFromRoutePath=a}},{key:"setLinkSelector",value:function(a){this.linkSelector=a;this.linkEventHandler_&&this.linkEventHandler_.removeListener();this.linkEventHandler_=(0,p.delegate)(document,
"click",this.linkSelector,this.onDocClickDelegate_.bind(this),this.allowPreventNavigate)}},{key:"setLoadingCssClass",value:function(a){this.loadingCssClass=a}},{key:"setUpdateScrollPosition",value:function(a){this.updateScrollPosition=a}},{key:"stopPendingNavigate_",value:function(){this.pendingNavigate&&this.pendingNavigate.cancel("Cancel pending navigation");this.pendingNavigate=null}},{key:"syncScrollPositionSyncThenAsync_",value:function(){var a=this,b=d.default.window.history.state;if(b){var c=
b.scrollTop,e=b.scrollLeft,f=function(){a.updateScrollPosition&&d.default.window.scrollTo(e,c)};return new m.default(function(n){return f()&r.async.nextTick(function(){return f()&n()})})}}},{key:"updateHistory_",value:function(a,b,c,e){var f=d.default.window.location.href;c&&(c.referrer=f);e?d.default.window.history.replaceState(c,a,b):d.default.window.history.pushState(c,a,b);h.default.setReferrer(f);(b=d.default.document.querySelector("title"))?b.innerHTML=a:d.default.document.title=a}}]);return g}(x.EventEmitter);
w.default=u});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/liferay/surface/Surface.es",["exports","metal/src/core","metal-dom/src/dom","senna/src/surface/Surface"],function(k,f,l,m){function h(e){return e&&e.__esModule?e:{default:e}}function n(e,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);e.prototype=Object.create(c&&c.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(e,
c):e.__proto__=c)}Object.defineProperty(k,"__esModule",{value:!0});var p=h(f),q=h(l);f=h(m);var r=function(){function e(c,a){for(var b=0;b<a.length;b++){var d=a[b];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(c,d.key,d)}}return function(c,a,b){a&&e(c.prototype,a);b&&e(c,b);return c}}(),s=function c(a,b,d){null===a&&(a=Function.prototype);var g=Object.getOwnPropertyDescriptor(a,b);if(void 0===g)return a=Object.getPrototypeOf(a),null===a?void 0:
c(a,b,d);if("value"in g)return g.value;b=g.get;return void 0===b?void 0:b.call(d)};f=function(c){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var b=(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!==typeof b&&"function"!==typeof b?this:b}n(a,c);r(a,[{key:"addContent",value:function(b,d){p.default.isString(d)&&(d=q.default.buildFragment(d));
Liferay.DOMTaskRunner.runTasks(d);return s(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"addContent",this).call(this,b,d)}}]);return a}(f.default);k.default=f});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/liferay/app/App.es","exports senna/src/app/App metal/src/core metal-dom/src/dom ../surface/Surface.es ../util/Utils.es metal-promise/src/promise/Promise".split(" "),function(n,h,k,q,r,s,t){function g(e){return e&&e.__esModule?e:{default:e}}function u(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,
writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}Object.defineProperty(n,"__esModule",{value:!0});h=g(h);var v=g(k),p=g(q),w=g(r),l=g(s),x=Object.assign||function(e){for(var d=1;d<arguments.length;d++){var c=arguments[d],a;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a])}return e},y=function(){function e(d,c){for(var a=0;a<c.length;a++){var b=c[a];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(d,
b.key,b)}}return function(d,c,a){c&&e(d.prototype,c);a&&e(d,a);return d}}(),m=function d(c,a,b){null===c&&(c=Function.prototype);var f=Object.getOwnPropertyDescriptor(c,a);if(void 0===f)return c=Object.getPrototypeOf(c),null===c?void 0:d(c,a,b);if("value"in f)return f.value;a=f.get;return void 0===a?void 0:a.call(b)};k=function(d){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a;a=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
a=!a||"object"!==typeof a&&"function"!==typeof a?this:a;a.portletsBlacklist={};a.validStatusCodes=[];a.timeout=Math.max(Liferay.SPA.requestTimeout,0)||l.default.getMaxTimeout();a.timeoutAlert=null;a.setShouldUseFacade(!0);Liferay.SPA.navigationExceptionSelectors=':not([target\x3d"_blank"]):not([data-senna-off]):not([data-resource-href])';a.setFormSelector('form:not([target\x3d"_blank"]):not([data-senna-off]):not([data-resource-href])');a.setLinkSelector('a:not([target\x3d"_blank"]):not([data-senna-off]):not([data-resource-href])');
a.setLoadingCssClass("lfr-spa-loading");a.on("beforeNavigate",a.onBeforeNavigate);a.on("endNavigate",a.onEndNavigate);a.on("navigationError",a.onNavigationError);a.on("startNavigate",a.onStartNavigate);Liferay.on("beforeScreenFlip",l.default.resetAllPortlets);Liferay.on("io:complete",a.onLiferayIOComplete,a);var b=document.body;b.id||(b.id="senna_surface"+v.default.getUid());a.addSurfaces(new w.default(b.id));p.default.append(b,'\x3cdiv class\x3d"lfr-spa-loading-bar"\x3e\x3c/div\x3e');return a}u(c,
d);y(c,[{key:"getCacheExpirationTime",value:function(){return Liferay.SPA.cacheExpirationTime}},{key:"getValidStatusCodes",value:function(){return this.validStatusCodes}},{key:"isCacheEnabled",value:function(){return-1<this.getCacheExpirationTime()}},{key:"isInPortletBlacklist",value:function(a){return Object.keys(this.portletsBlacklist).some(function(b){b=l.default.getPortletBoundaryId(b);b=document.querySelectorAll('[id^\x3d"'+b+'"]');return Array.prototype.slice.call(b).some(function(f){return p.default.contains(f,
a)})})}},{key:"isScreenCacheExpired",value:function(a){return 0===this.getCacheExpirationTime()?!1:(new Date).getTime()-a.getCacheLastModified()>this.getCacheExpirationTime()}},{key:"onBeforeNavigate",value:function(a,b){(Liferay.SPA.clearScreensCache||a.form)&&this.clearScreensCache();this._clearLayoutData();Liferay.fire("beforeNavigate",{app:this,originalEvent:b,path:a.path})}},{key:"onDataLayoutConfigReady_",value:function(a){Liferay.Layout&&Liferay.Layout.init(Liferay.Data.layoutConfig)}},{key:"onDocClickDelegate_",
value:function(a){this.isInPortletBlacklist(a.delegateTarget)||m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"onDocClickDelegate_",this).call(this,a)}},{key:"onDocSubmitDelegate_",value:function(a){this.isInPortletBlacklist(a.delegateTarget)||m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"onDocSubmitDelegate_",this).call(this,a)}},{key:"onEndNavigate",value:function(a){Liferay.fire("endNavigate",{app:this,error:a.error,path:a.path});this.pendingNavigate||(this._clearRequestTimer(),
this._hideTimeoutAlert());a.error||(this.dataLayoutConfigReadyHandle_=Liferay.once("dataLayoutConfigReady",this.onDataLayoutConfigReady_));AUI().Get._insertCache={};Liferay.DOMTaskRunner.reset()}},{key:"onLiferayIOComplete",value:function(){this.clearScreensCache()}},{key:"onNavigationError",value:function(a){a.error.requestPrematureTermination?window.location.href=a.path:(a.error.invalidStatus||a.error.requestError||a.error.timeout)&&this._createNotification({message:"There was an unexpected error. Please refresh the current page.",
title:"Error",type:"danger"})}},{key:"onStartNavigate",value:function(a){Liferay.fire("startNavigate",{app:this,path:a.path});this._startRequestTimer(a.path)}},{key:"setPortletsBlacklist",value:function(a){this.portletsBlacklist=a}},{key:"setValidStatusCodes",value:function(a){this.validStatusCodes=a}},{key:"_clearLayoutData",value:function(){this.dataLayoutConfig_=Liferay.Data.layoutConfig;Liferay.Data.layoutConfig=null;this.dataLayoutConfigReadyHandle_&&(this.dataLayoutConfigReadyHandle_.detach(),
this.dataLayoutConfigReadyHandle_=null)}},{key:"_clearRequestTimer",value:function(){this.requestTimer&&clearTimeout(this.requestTimer)}},{key:"_createNotification",value:function(a){return new t.CancellablePromise(function(b){AUI().use("liferay-notification",function(){b((new Liferay.Notification(x({closeable:!0,delay:{hide:0,show:0},duration:500,type:"warning"},a))).render("body"))})})}},{key:"_hideTimeoutAlert",value:function(){this.timeoutAlert&&this.timeoutAlert.hide()}},{key:"_startRequestTimer",
value:function(a){var b=this;this._clearRequestTimer();0<Liferay.SPA.userNotification.timeout&&(this.requestTimer=setTimeout(function(){Liferay.fire("spaRequestTimeout",{path:a});b.timeoutAlert?b.timeoutAlert.show():b._createNotification({message:Liferay.SPA.userNotification.message,title:Liferay.SPA.userNotification.title,type:"warning"}).then(function(f){b.timeoutAlert=f})},Liferay.SPA.userNotification.timeout))}},{key:"updateHistory_",value:function(a,b,f,z){f&&f.redirectPath&&(f.path=f.redirectPath);
m(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"updateHistory_",this).call(this,a,b,f,z)}}]);return c}(h.default);n.default=k});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/liferay/screen/RenderURLScreen.es",["exports","./EventScreen.es"],function(e,d){function f(c,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);c.prototype=Object.create(a&&a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(c,a):c.__proto__=a)}Object.defineProperty(e,"__esModule",{value:!0});var g=
function(c){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var b;b=(a.__proto__||Object.getPrototypeOf(a)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");b=!b||"object"!==typeof b&&"function"!==typeof b?this:b;b.cacheable=!0;return b}f(a,c);return a}((d&&d.__esModule?d:{default:d}).default);e.default=g});
Liferay.Loader.define("frontend-js-spa-web@1.0.80/liferay/init.es","exports ./screen/ActionURLScreen.es ./app/App.es metal/src/async/async senna/src/globals/globals ./screen/RenderURLScreen.es metal-uri/src/Uri senna/src/utils/utils metal-dom/src/all/dom".split(" "),function(k,n,p,q,r,s,t,u,l){function e(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(k,"__esModule",{value:!0});var v=e(n),w=e(p),x=e(q),f=e(r),y=e(s),h=e(t),z=e(u),m=function(d){var c=new w.default;c.addRoutes([{handler:v.default,
path:function(b){b=new h.default(b);var a=(new h.default(Liferay.SPA.loginRedirect)).getHost()||window.location.host;return c.isLinkSameOrigin_(a)?"1"===b.getParameterValue("p_p_lifecycle"):!1}},{handler:y.default,path:function(b){if(0===(b+"/").indexOf(themeDisplay.getPathMain()+"/")||Liferay.SPA.excludedPaths.some(function(g){return 0===b.indexOf(g)}))return!1;var a=(new h.default(b)).getParameterValue("p_p_lifecycle");return"0"===a||!a}}]);Liferay.Util.submitForm=function(b){x.default.nextTick(function(){var a=
b.getDOM(),g=a.action;(0,l.match)(a,"form"+Liferay.SPA.navigationExceptionSelectors)&&c.canNavigate(g)&&"get"!==a.method&&!c.isInPortletBlacklist(a)?(Liferay.Util._submitLocked=!1,f.default.capturedFormElement=a,(0,l.match)(f.default.document.activeElement,"button:not([type]),button[type\x3dsubmit],input[type\x3dsubmit]")?f.default.capturedFormButtonElement=f.default.document.activeElement:f.default.capturedFormButtonElement=b.one("button:not([type]),button[type\x3dsubmit],input[type\x3dsubmit]"),
c.navigate(z.default.getUrlPath(g))):a.submit()})};Liferay.SPA.app=c;Liferay.fire("SPAReady");return c};k.default={init:function(d){var c=this;"loading"==f.default.document.readyState?f.default.document.addEventListener("DOMContentLoaded",function(){d.call(c,m())}):d.call(this,m())}}});
