unpoly-rails 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of unpoly-rails might be problematic. Click here for more details.

@@ -1 +1 @@
1
- !function(){var t={7433:function(){},7921:function(){},7298:function(){},2903:function(){},573:function(){},2811:function(){up.browser=function(){var t=up.util;function e(){return"ActiveXObject"in window}function n(){return!!window.jQuery}function r(){return window.Promise?"BackCompat"===document.compatMode?"Browser is in quirks mode (missing DOCTYPE?)":void 0:"Browser doesn't support promises"}return{loadPage:function(t){new up.Request(t).loadPage()},submitForm:function(t){t.submit()},canPushState:function(){return history.pushState&&"GET"===up.protocol.initialRequestMethod()},canFormatLog:t.negate(e),canPassiveEventListener:t.negate(e),canJQuery:n,assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw up.error.aborted("User canceled action");return!0},isSupported:function(){return!r()},supportIssue:r,popCookie:function(t){var e,n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n},get jQuery(){return n()||up.fail("jQuery must be published as window.jQuery"),jQuery},isIE11:e}}()},6346:function(){var t=up.element;up.BodyShifter=function(){function e(){this.unshiftFns=[],this.reset()}return e.prototype.reset=function(){this.unshiftNow(),this.shiftCount=0},e.prototype.shift=function(){if(this.shiftCount++,!(this.shiftCount>1)){var e=up.viewport.rootHasReducedWidthFromScrollbar(),n=up.viewport.rootOverflowElement();if(this.changeStyle(n,{overflowY:"hidden"}),e){var r=document.body,o=up.viewport.scrollbarWidth(),i=o+t.styleNumber(r,"paddingRight");this.changeStyle(r,{paddingRight:i});for(var s=0,u=up.viewport.anchoredRight();s<u.length;s++){var a=u[s],c=o+t.styleNumber(a,"right");this.changeStyle(a,{right:c})}}}},e.prototype.changeStyle=function(e,n){this.unshiftFns.push(t.setTemporaryStyle(e,n))},e.prototype.unshift=function(){this.shiftCount--,0==this.shiftCount&&this.unshiftNow()},e.prototype.unshiftNow=function(){for(var t;t=this.unshiftFns.pop();)t()},e}()},3115:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},e=up.util;up.Cache=function(){function n(t){void 0===t&&(t={}),this.config=t,this.store=this.config.store||new up.store.Memory}return n.prototype.size=function(){return this.store.size()},n.prototype.maxSize=function(){return e.evalOption(this.config.size)},n.prototype.expiryMillis=function(){return e.evalOption(this.config.expiry)},n.prototype.normalizeStoreKey=function(t){return this.config.key?this.config.key(t):t.toString()},n.prototype.isEnabled=function(){return 0!==this.maxSize()&&0!==this.expiryMillis()},n.prototype.clear=function(){this.store.clear()},n.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.config.logPrefix&&(e[0]="["+this.config.logPrefix+"] "+e[0],up.puts.apply(up,t(["up.Cache"],e)))},n.prototype.keys=function(){return this.store.keys()},n.prototype.each=function(t){var n=this;e.each(this.keys(),(function(e){var r=n.store.get(e);t(e,r.value,r.timestamp)}))},n.prototype.makeRoomForAnotherEntry=function(){var t,e;this.hasRoomForAnotherEntry()||(this.each((function(n,r,o){(!e||e>o)&&(t=n,e=o)})),t&&this.store.remove(t))},n.prototype.hasRoomForAnotherEntry=function(){var t=this.maxSize();return!t||this.size()<t},n.prototype.alias=function(t,n){var r=this.get(t,{silent:!0});e.isDefined(r)&&this.set(n,r)},n.prototype.timestamp=function(){return(new Date).valueOf()},n.prototype.set=function(t,e){if(this.isEnabled()){this.makeRoomForAnotherEntry();var n=this.normalizeStoreKey(t),r={timestamp:this.timestamp(),value:e};this.store.set(n,r)}},n.prototype.remove=function(t){var e=this.normalizeStoreKey(t);this.store.remove(e)},n.prototype.isFresh=function(t){var e=this.expiryMillis();return!e||this.timestamp()-t.timestamp<e},n.prototype.get=function(t,e){void 0===e&&(e={});var n=this.normalizeStoreKey(t),r=this.store.get(n);if(r){if(this.isFresh(r))return e.silent||this.log("Cache hit for '%s'",t),r.value;e.silent||this.log("Discarding stale cache entry for '%s'",t),this.remove(t)}else e.silent||this.log("Cache miss for '%s'",t)},n}()},7948:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util,r=up.element;up.Change.Addition=function(t){function o(e){var n=t.call(this,e)||this;return n.responseDoc=e.responseDoc,n.acceptLayer=e.acceptLayer,n.dismissLayer=e.dismissLayer,n.eventPlans=e.eventPlans||[],n}return e(o,t),o.prototype.handleLayerChangeRequests=function(){var t=this;this.layer.isOverlay()&&(this.tryAcceptLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(),this.abortWhenLayerClosed(),this.tryDismissLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(),this.abortWhenLayerClosed()),this.layer.asCurrent((function(){for(var e=0,n=t.eventPlans;e<n.length;e++){var r=n[e];up.emit(r),t.abortWhenLayerClosed()}}))},o.prototype.tryAcceptLayerFromServer=function(){n.isDefined(this.acceptLayer)&&this.layer.isOverlay()&&this.layer.accept(this.acceptLayer)},o.prototype.tryDismissLayerFromServer=function(){n.isDefined(this.dismissLayer)&&this.layer.isOverlay()&&this.layer.dismiss(this.dismissLayer)},o.prototype.abortWhenLayerClosed=function(){if(this.layer.isClosed())throw up.error.aborted("Layer was closed")},o.prototype.setSource=function(t){var e=t.oldElement,o=t.newElement,i=t.source;"keep"===i&&(i=e&&up.fragment.source(e)),i&&r.setMissingAttr(o,"up-source",n.normalizeURL(i))},o}(up.Change)},3030:function(){var t=up.util;up.Change=function(){function e(t){this.options=t}return e.prototype.notApplicable=function(t){return up.error.notApplicable(this,t)},e.prototype.execute=function(){throw up.error.notImplemented()},e.prototype.onFinished=function(){var t,e;return null===(e=(t=this.options).onFinished)||void 0===e?void 0:e.call(t)},e.prototype.improveHistoryValue=function(e,n){return!1===e||t.isString(e)?e:n},e}()},7422:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.Change.CloseLayer=function(t){function r(e){var n,r=t.call(this,e)||this;return r.verb=e.verb,r.layer=up.layer.get(e),r.origin=e.origin,r.value=e.value,r.preventable=null===(n=e.preventable)||void 0===n||n,r}return e(r,t),r.prototype.execute=function(){var t=this;if(!this.layer.isOpen())return Promise.resolve();if(up.browser.assertConfirmed(this.options),up.network.abort((function(e){return e.layer===t.layer})),this.emitCloseEvent().defaultPrevented&&this.preventable)throw up.error.aborted("Close event was prevented");var e=this.layer.parent;this.layer.peel(),this.layer.stack.remove(this.layer),e.restoreHistory(),this.handleFocus(e),this.layer.teardownHandlers(),this.layer.destroyElements(this.options),this.emitClosedEvent(e)},r.prototype.emitCloseEvent=function(){return this.layer.emit(this.buildEvent("up:layer:"+this.verb),{callback:this.layer.callback("on"+n.upperCaseFirst(this.verb)),log:"Will "+this.verb+" "+this.layer})},r.prototype.emitClosedEvent=function(t){var e=this.verb+"ed",r=n.upperCaseFirst(e);return this.layer.emit(this.buildEvent("up:layer:"+e),{baseLayer:t,callback:this.layer.callback("on"+r),ensureBubbles:!0,log:r+" "+this.layer})},r.prototype.buildEvent=function(t){return up.event.build(t,{layer:this.layer,value:this.value,origin:this.origin})},r.prototype.handleFocus=function(t){var e;this.layer.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront(),(this.layer.origin||t.element).focus({preventScroll:!0})},r}(up.Change.Removal)},8228:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},o=up.element;up.Change.DestroyFragment=function(t){function i(e){var n=t.call(this,e)||this;return n.layer=up.layer.get(e)||up.layer.current,n.element=n.options.element,n.animation=n.options.animation,n.log=n.options.log,n}return e(i,t),i.prototype.execute=function(){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return this.parent=this.element.parentNode,up.fragment.markAsDestroying(this.element),up.motion.willAnimate(this.element,this.animation,this.options)?(this.emitDestroyed(),[4,this.animate()]):[3,2];case 1:return t.sent(),this.wipe(),this.onFinished(),[3,3];case 2:this.wipe(),this.emitDestroyed(),this.onFinished(),t.label=3;case 3:return[2]}}))}))},i.prototype.animate=function(){return up.motion.animate(this.element,this.animation,this.options)},i.prototype.wipe=function(){var t=this;this.layer.asCurrent((function(){up.syntax.clean(t.element,{layer:t.layer}),up.browser.canJQuery()?jQuery(t.element).remove():o.remove(t.element)}))},i.prototype.emitDestroyed=function(){up.fragment.emitDestroyed(this.element,{parent:this.parent,log:this.log})},i}(up.Change.Removal)},9005:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.Change.FromContent=function(t){function o(e){var n=t.call(this,e)||this;return n.layers=r.filter(up.layer.getAll(n.options),n.isRenderableLayer),n.origin=n.options.origin,n.preview=n.options.preview,n.mode=n.options.mode,n.origin&&(n.originLayer=up.layer.get(n.origin)),n}return e(o,t),o.prototype.isRenderableLayer=function(t){return"new"===t||t.isOpen()},o.prototype.getPlans=function(){return this.plans||(this.plans=[],this.options.fragment&&(this.options.target=this.getResponseDoc().rootSelector()),this.expandIntoPlans(this.layers,this.options.target),this.expandIntoPlans(this.layers,this.options.fallback)),this.plans},o.prototype.expandIntoPlans=function(t,e){for(var r=0,o=t;r<o.length;r++)for(var i=o[r],s=0,u=this.expandTargets(e,i);s<u.length;s++){var a=u[s],c=n(n({},this.options),{target:a,layer:i,placement:this.defaultPlacement()}),p="new"===i?new up.Change.OpenLayer(c):new up.Change.UpdateLayer(c);this.plans.push(p)}},o.prototype.expandTargets=function(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.mode,origin:this.origin})},o.prototype.execute=function(){var t=this;return this.options.preload?Promise.resolve():this.seekPlan((function(e){return e.execute(t.getResponseDoc())}))||this.postflightTargetNotApplicable()},o.prototype.getResponseDoc=function(){var t,e;if(!this.preview&&!this.responseDoc){var n=r.pick(this.options,["target","content","fragment","document","html"]);null===(e=(t=up.migrate).handleResponseDocOptions)||void 0===e||e.call(t,n),"content"===this.defaultPlacement()&&(n.target=this.firstExpandedTarget(n.target)),this.responseDoc=new up.ResponseDoc(n)}return this.responseDoc},o.prototype.defaultPlacement=function(){if(!this.options.document&&!this.options.fragment)return"content"},o.prototype.firstExpandedTarget=function(t){return this.expandTargets(t||":main",this.layers[0])[0]},o.prototype.preflightProps=function(t){return void 0===t&&(t={}),this.seekPlan((function(t){return t.preflightProps()}))||t.optional||this.preflightTargetNotApplicable()},o.prototype.preflightTargetNotApplicable=function(){this.targetNotApplicable("Could not find target in current page")},o.prototype.postflightTargetNotApplicable=function(){this.targetNotApplicable("Could not find common target in current page and response")},o.prototype.targetNotApplicable=function(t){if(this.getPlans().length){var e=r.uniq(r.map(this.getPlans(),"target")),n=up.layer.optionToString(this.options.layer);up.fail(t+" (tried selectors %o in %s)",e,n)}else this.layers.length?up.fail("No target selector given"):up.fail("Layer %o does not exist",this.options.layer)},o.prototype.seekPlan=function(t){for(var e=0,n=this.getPlans();e<n.length;e++){var r=n[e];try{return t(r)}catch(t){if(!up.error.notApplicable.is(t))throw t}}},o}(up.Change)},2200:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.Change.FromURL=function(t){function o(e){var n=t.call(this,e)||this;return n.options.layer=up.layer.getAll(n.options),n.options.normalizeLayerOptions=!1,n.successOptions=n.options,n.failOptions=up.RenderOptions.deriveFailOptions(n.successOptions),n}return e(o,t),o.prototype.execute=function(){var t=this,e=this.newPageReason();if(e)return up.puts("up.render()",e),up.browser.loadPage(this.options),r.unresolvablePromise();var n=this.makeRequest();return this.options.preload?n:r.always(n,(function(e){return t.onRequestSettled(e)}))},o.prototype.newPageReason=function(){return r.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":up.browser.canPushState()?void 0:"Loading content in new page to restore history support"},o.prototype.makeRequest=function(){var t=this.preflightPropsForRenderOptions(this.successOptions),e=this.preflightPropsForRenderOptions(this.failOptions,{optional:!0}),n=r.merge(this.successOptions,t,r.renameKeys(e,up.fragment.failKey));return this.request=up.request(n),this.request},o.prototype.preflightPropsForRenderOptions=function(t,e){return new up.Change.FromContent(n(n({},t),{preview:!0})).preflightProps(e)},o.prototype.onRequestSettled=function(t){if(this.response=t,t instanceof up.Response){if(this.isSuccessfulResponse())return this.updateContentFromResponse(["Loaded fragment from successful response to %s",this.request.description],this.successOptions);var e=["Loaded fragment from failed response to %s (HTTP %d)",this.request.description,this.response.status];throw this.updateContentFromResponse(e,this.failOptions)}throw t},o.prototype.isSuccessfulResponse=function(){return!1===this.successOptions.fail||this.response.ok},o.prototype.buildEvent=function(t,e){var n={request:this.request,response:this.response,renderOptions:this.options};return up.event.build(t,r.merge(n,e))},o.prototype.updateContentFromResponse=function(t,e){var n=this.buildEvent("up:fragment:loaded",{renderOptions:e});return this.request.assertEmitted(n,{log:t,callback:this.options.onLoaded}),this.augmentOptionsFromResponse(e),new up.Change.FromContent(e).execute()},o.prototype.augmentOptionsFromResponse=function(t){var e=this.response.url,n=e,o=this.request.hash;o&&(t.hash=o,n+=o),"GET"===this.response.method?t.source=this.improveHistoryValue(t.source,e):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,n),t.title=this.improveHistoryValue(t.title,this.response.title),t.eventPlans=this.response.eventPlans;var i=this.response.target;i&&(t.target=i),t.document=this.response.text,t.acceptLayer=this.response.acceptLayer,t.dismissLayer=this.response.dismissLayer,t.document||!r.isDefined(t.acceptLayer)&&!r.isDefined(t.dismissLayer)||(t.target=":none"),t.context=r.merge(t.context,this.response.context)},o}(up.Change)},7050:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};up.Change.OpenLayer=function(t){function r(e){var n=t.call(this,e)||this;return n.target=e.target,n.origin=e.origin,n.baseLayer=e.baseLayer,n}return e(r,t),r.prototype.preflightProps=function(){return{layer:this.baseLayer,mode:this.options.mode,context:this.buildLayer().context,target:this.target}},r.prototype.bestPreflightSelector=function(){return this.target},r.prototype.execute=function(t){var e=this;if(":none"===this.target?this.content=document.createElement("up-none"):this.content=t.select(this.target),!this.content||this.baseLayer.isClosed())throw this.notApplicable();if(up.puts("up.render()",'Opening element "'+this.target+'" in new overlay'),this.options.title=this.improveHistoryValue(this.options.title,t.getTitle()),this.emitOpenEvent().defaultPrevented)throw up.error.aborted("Open event was prevented");return this.baseLayer.peel(),this.layer=this.buildLayer(),up.layer.stack.push(this.layer),this.layer.createElements(this.content),this.layer.setupHandlers(),this.handleHistory(),this.setSource({newElement:this.content,source:this.options.source}),t.finalizeElement(this.content),up.hello(this.layer.element,{layer:this.layer,origin:this.origin}),this.handleLayerChangeRequests(),this.handleScroll(),this.layer.startOpenAnimation().then((function(){e.layer.isOpen()&&e.handleFocus(),e.onFinished()})),this.layer.opening=!1,this.emitOpenedEvent(),this.abortWhenLayerClosed(),new up.RenderResult({layer:this.layer,fragments:[this.content]})},r.prototype.buildLayer=function(){var t=this,e=n(n({},this.options),{opening:!0});return up.layer.build(e,(function(e){return t.options=up.RenderOptions.finalize(e)}))},r.prototype.handleHistory=function(){"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory(this.content)),this.layer.parent.saveHistory(),this.layer.updateHistory(this.options)},r.prototype.handleFocus=function(){var t;null===(t=this.baseLayer.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.content,layer:this.layer,autoMeans:["autofocus","layer"]}).process(this.options.focus)},r.prototype.handleScroll=function(){var t=n(n({},this.options),{fragment:this.content,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)},r.prototype.emitOpenEvent=function(){return up.emit("up:layer:open",{origin:this.origin,baseLayer:this.baseLayer,layerOptions:this.options,log:"Opening new overlay"})},r.prototype.emitOpenedEvent=function(){return this.layer.emit("up:layer:opened",{origin:this.origin,callback:this.layer.callback("onOpened"),log:"Opened new "+this.layer})},r}(up.Change.Addition)},1752:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Change.Removal=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(up.Change)},9441:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},i=up.util,s=up.element;up.Change.UpdateLayer=function(t){function u(e){var n=this;return e=up.RenderOptions.finalize(e),(n=t.call(this,e)||this).layer=e.layer,n.target=e.target,n.placement=e.placement,n.context=e.context,n.parseSteps(),n}return e(u,t),u.prototype.preflightProps=function(){return this.matchPreflight(),{layer:this.layer,mode:this.layer.mode,context:i.merge(this.layer.context,this.context),target:this.bestPreflightSelector()}},u.prototype.bestPreflightSelector=function(){return this.matchPreflight(),i.map(this.steps,"selector").join(", ")||":none"},u.prototype.execute=function(t){var e=this;this.responseDoc=t,this.matchPostflight(),up.puts("up.render()",'Updating "'+this.bestPreflightSelector()+'" in '+this.layer),this.options.title=this.improveHistoryValue(this.options.title,this.responseDoc.getTitle()),this.setScrollAndFocusOptions(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.peel&&this.layer.peel(),i.assign(this.layer.context,this.context),"auto"===this.options.history&&(this.options.history=this.hasAutoHistory()),this.options.history&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests();var n=this.steps.map((function(t){return e.executeStep(t)}));return Promise.all(n).then((function(){return e.abortWhenLayerClosed(),e.onFinished()})),new up.RenderResult({layer:this.layer,fragments:i.map(this.steps,"newElement")})},u.prototype.executeStep=function(t){return r(this,void 0,void 0,(function(){var e,r,i,u,a,c,p,l,f=this;return o(this,(function(o){switch(o.label){case 0:switch(this.setSource(t),t.placement){case"swap":return[3,1];case"content":return[3,6];case"before":case"after":return[3,9]}return[3,13];case 1:return(e=this.findKeepPlan(t))?(up.fragment.emitKept(e),this.handleFocus(t.oldElement,t),[4,this.handleScroll(t.oldElement,t)]):[3,3];case 2:return o.sent(),[3,5];case 3:return this.transferKeepableElements(t),r=t.oldElement.parentNode,i=n(n({},t),{beforeStart:function(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:function(){f.responseDoc.finalizeElement(t.newElement),up.hello(t.newElement,t)},beforeDetach:function(){up.syntax.clean(t.oldElement,{layer:f.layer})},afterDetach:function(){s.remove(t.oldElement),up.fragment.emitDestroyed(t.oldElement,{parent:r,log:!1})},scrollNew:function(){return f.handleFocus(t.newElement,t),f.handleScroll(t.newElement,t)}}),[4,up.morph(t.oldElement,t.newElement,t.transition,i)];case 4:o.sent(),o.label=5;case 5:return[3,14];case 6:return u=s.wrapChildren(t.oldElement),a=s.wrapChildren(t.newElement),c=n(n({},t),{placement:"swap",oldElement:u,newElement:a,focus:!1}),[4,this.executeStep(c)];case 7:return o.sent(),s.unwrap(a),[4,this.handleFocus(t.oldElement,t)];case 8:return o.sent(),[3,14];case 9:return p=s.wrapChildren(t.newElement),l="before"===t.placement?"afterbegin":"beforeend",t.oldElement.insertAdjacentElement(l,p),this.responseDoc.finalizeElement(p),up.hello(p,t),this.handleFocus(p,t),[4,this.handleScroll(p,t)];case 10:return o.sent(),[4,up.animate(p,t.transition,t)];case 11:return o.sent(),[4,s.unwrap(p)];case 12:return o.sent(),[3,14];case 13:up.fail("Unknown placement: %o",t.placement),o.label=14;case 14:return[2]}}))}))},u.prototype.findKeepPlan=function(t){if(t.keep){var e=t.oldElement,n=t.newElement,r=s.booleanOrStringAttr(e,"up-keep");if(r){!0===r&&(r="&");var o,i={layer:this.layer,origin:e};if((o=t.descendantsOnly?up.fragment.get(n,r,i):up.fragment.subtree(n,r,i)[0])&&s.matches(o,"[up-keep]")){var u={oldElement:e,newElement:o,newData:up.syntax.data(o)};if(!up.fragment.emitKeep(u).defaultPrevented)return u}}}},u.prototype.transferKeepableElements=function(t){var e=[];if(t.keep)for(var r=0,o=t.oldElement.querySelectorAll("[up-keep]");r<o.length;r++){var i=o[r],u=this.findKeepPlan(n(n({},t),{oldElement:i,descendantsOnly:!0}));if(u){var a=i.cloneNode(!0);s.replace(i,a),s.replace(u.newElement,i),e.push(u)}}t.keepPlans=e},u.prototype.parseSteps=function(){this.steps=[];for(var t=0,e=i.splitValues(this.target,",");t<e.length;t++){var r=e[t];if(":none"!==r){var o=r.match(/^(.+?)(?::(before|after))?$/);if(!o)throw up.error.invalidSelector(r);var s=n(n({},this.options),{selector:o[1],placement:o[2]||this.placement||"swap"});this.steps.push(s)}}},u.prototype.matchPreflight=function(){if(!this.matchedPreflight){for(var t=0,e=this.steps;t<e.length;t++){var n=e[t],r=new up.FragmentFinder(n);if(n.oldElement||(n.oldElement=r.find()),!n.oldElement)throw this.notApplicable('Could not find element "'+this.target+'" in current page')}this.resolveOldNesting(),this.matchedPreflight=!0}},u.prototype.matchPostflight=function(){if(!this.matchedPostflight){this.matchPreflight();for(var t=0,e=this.steps;t<e.length;t++){var n=e[t],r=this.responseDoc.select(n.selector);if(!r)throw this.notApplicable('Could not find element "'+this.target+'" in server response');n.newElement=r}this.options.hungry&&this.addHungrySteps(),this.resolveOldNesting(),this.matchedPostflight=!0}},u.prototype.addHungrySteps=function(){for(var t=0,e=up.fragment.all(up.radio.hungrySelector(),this.options);t<e.length;t++){var n=e[t],r=up.fragment.toTarget(n),o=this.responseDoc.select(r);if(o){var i={selector:r,oldElement:n,newElement:o,transition:s.booleanOrStringAttr(n,"transition"),placement:"swap"};this.steps.push(i)}}},u.prototype.containedByRivalStep=function(t,e){return i.some(t,(function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)}))},u.prototype.resolveOldNesting=function(){var t=this,e=i.uniqBy(this.steps,"oldElement");e=i.reject(e,(function(n){return t.containedByRivalStep(e,n)})),this.steps=e},u.prototype.setScrollAndFocusOptions=function(){var t=this;this.steps.forEach((function(e,n){n>0&&(e.scroll=!1,e.focus=!1),"swap"!==e.placement&&"content"!==e.placement||(e.scrollBehavior="auto",t.focusCapsule||(t.focusCapsule=up.FocusCapsule.preserveWithin(e.oldElement)))}))},u.prototype.handleFocus=function(t,e){return new up.FragmentFocus(n(n({},e),{fragment:t,layer:this.layer,focusCapsule:this.focusCapsule,autoMeans:up.fragment.config.autoFocus})).process(e.focus)},u.prototype.handleScroll=function(t,e){return new up.FragmentScrolling(n(n({},e),{fragment:t,layer:this.layer,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)},u.prototype.hasAutoHistory=function(){var t=i.map(this.steps,"oldElement");return i.some(t,(function(t){return up.fragment.hasAutoHistory(t)}))},u}(up.Change.Addition)},1569:function(){var t=up.util,e=up.element;up.CompilerPass=function(){function n(t,e,n){void 0===n&&(n={}),this.root=t,this.compilers=e,this.skipSubtrees=n.skip,this.skipSubtrees.length&&this.root.querySelector("[up-keep]")||(this.skipSubtrees=void 0),this.layer=n.layer||up.layer.get(this.root)||up.layer.current,this.errors=[]}return n.prototype.run=function(){var t=this;if(up.puts("up.hello()","Compiling fragment %o",this.root),this.layer.asCurrent((function(){for(var e=0,n=t.compilers;e<n.length;e++){var r=n[e];t.runCompiler(r)}})),this.errors.length)throw up.error.failed("Errors while compiling",{errors:this.errors})},n.prototype.runCompiler=function(t){var e,n,r=this.select(t.selector);if(r.length){if(t.isDefault||up.puts("up.hello()",'Compiling "%s" on %d element(s)',t.selector,r.length),t.batch)this.compileBatch(t,r);else for(var o=0,i=r;o<i.length;o++){var s=i[o];this.compileOneElement(t,s)}return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,r,t)}},n.prototype.compileOneElement=function(t,e){var n=[t.jQuery?up.browser.jQuery(e):e];if(1!==t.length){var r=up.syntax.data(e);n.push(r)}var o=this.applyCompilerFunction(t,e,n),i=this.destructorPresence(o);i&&up.destructor(e,i)},n.prototype.compileBatch=function(e,n){var r=[e.jQuery?up.browser.jQuery(n):n];if(1!==e.length){var o=t.map(n,up.syntax.data);r.push(o)}var i=this.applyCompilerFunction(e,n,r);this.destructorPresence(i)&&up.fail("Compilers with { batch: true } cannot return destructors")},n.prototype.applyCompilerFunction=function(t,e,n){try{return t.apply(e,n)}catch(t){this.errors.push(t),up.log.error("up.hello()","While compiling %o: %o",e,t),up.error.emitGlobal(t)}},n.prototype.destructorPresence=function(e){if(t.isFunction(e)||t.isArray(e)&&t.every(e,t.isFunction))return e},n.prototype.select=function(n){var r=this,o=e.subtree(this.root,t.evalOption(n));return this.skipSubtrees&&(o=t.reject(o,(function(t){return r.isInSkippedSubtree(t)}))),o},n.prototype.isInSkippedSubtree=function(e){var n;return!!t.contains(this.skipSubtrees,e)||!!(n=e.parentElement)&&this.isInSkippedSubtree(n)},n}()},3742:function(){var t=up.util;up.Config=function(){function e(t){void 0===t&&(t=function(){return{}}),this.blueprintFn=t,this.reset()}return e.prototype.reset=function(){t.assign(this,this.blueprintFn())},e}()},2737:function(){var t=up.util,e=up.element;up.CSSTransition=function(){function n(e,n,r){this.element=e,this.lastFrameKebab=n,this.lastFrameKeysKebab=Object.keys(this.lastFrameKebab),t.some(this.lastFrameKeysKebab,(function(t){return t.match(/A-Z/)}))&&up.fail("Animation keys must be kebab-case"),this.finishEvent=r.finishEvent,this.duration=r.duration,this.easing=r.easing,this.finished=!1}return n.prototype.start=function(){return 0===this.lastFrameKeysKebab.length?(this.finished=!0,Promise.resolve()):(this.deferred=t.newDeferred(),this.pauseOldTransition(),this.startTime=new Date,this.startFallbackTimer(),this.listenToFinishEvent(),this.listenToTransitionEnd(),this.startMotion(),this.deferred.promise())},n.prototype.listenToFinishEvent=function(){this.finishEvent&&(this.stopListenToFinishEvent=up.on(this.element,this.finishEvent,this.onFinishEvent.bind(this)))},n.prototype.onFinishEvent=function(t){t.stopPropagation(),this.finish()},n.prototype.startFallbackTimer=function(){var e=this;this.fallbackTimer=t.timer(this.duration+100,(function(){e.finish()}))},n.prototype.stopFallbackTimer=function(){clearTimeout(this.fallbackTimer)},n.prototype.listenToTransitionEnd=function(){this.stopListenToTransitionEnd=up.on(this.element,"transitionend",this.onTransitionEnd.bind(this))},n.prototype.onTransitionEnd=function(e){if(e.target===this.element&&!(new Date-this.startTime<=.25*this.duration)){var n=e.propertyName;t.contains(this.lastFrameKeysKebab,n)&&this.finish()}},n.prototype.finish=function(){var t,n;this.finished||(this.finished=!0,this.stopFallbackTimer(),null===(t=this.stopListenToFinishEvent)||void 0===t||t.call(this),null===(n=this.stopListenToTransitionEnd)||void 0===n||n.call(this),e.concludeCSSTransition(this.element),this.resumeOldTransition(),this.deferred.resolve())},n.prototype.pauseOldTransition=function(){var t=e.style(this.element,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]);if(e.hasCSSTransition(t)){if("all"!==t.transitionProperty){var n=t.transitionProperty.split(/\s*,\s*/),r=e.style(this.element,n);this.setOldTransitionTargetFrame=e.setTemporaryStyle(this.element,r)}this.setOldTransition=e.concludeCSSTransition(this.element)}},n.prototype.resumeOldTransition=function(){var t,e;null===(t=this.setOldTransitionTargetFrame)||void 0===t||t.call(this),null===(e=this.setOldTransition)||void 0===e||e.call(this)},n.prototype.startMotion=function(){e.setStyle(this.element,{transitionProperty:Object.keys(this.lastFrameKebab).join(", "),transitionDuration:this.duration+"ms",transitionTimingFunction:this.easing}),e.setStyle(this.element,this.lastFrameKebab)},n}()},3635:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=up.util;up.DestructorPass=function(){function n(t,e){this.fragment=t,this.options=e,this.errors=[]}return n.prototype.run=function(){for(var t=0,n=this.selectCleanables();t<n.length;t++){var r=n[t],o=e.pluckKey(r,"upDestructors");if(o)for(var i=0,s=o;i<s.length;i++){var u=s[i];this.applyDestructorFunction(u,r)}r.classList.remove("up-can-clean")}if(this.errors.length)throw up.error.failed("Errors while destroying",{errors:this.errors})},n.prototype.selectCleanables=function(){var e=t(t({},this.options),{destroying:!0});return up.fragment.subtree(this.fragment,".up-can-clean",e)},n.prototype.applyDestructorFunction=function(t,e){try{t()}catch(t){this.errors.push(t),up.log.error("up.destroy()","While destroying %o: %o",e,t),up.error.emitGlobal(t)}},n}()},1906:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},r=up.util,o=up.element;up.EventEmitter=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.keys=function(){return["target","event","baseLayer","callback","log","ensureBubbles"]},i.prototype.emit=function(){var t=this;return this.logEmission(),this.baseLayer?this.baseLayer.asCurrent((function(){return t.dispatchEvent()})):this.dispatchEvent(),this.event},i.prototype.dispatchEvent=function(){var t;this.target.dispatchEvent(this.event),this.ensureBubbles&&o.isDetached(this.target)&&document.dispatchEvent(this.event),null===(t=this.callback)||void 0===t||t.call(this,this.event)},i.prototype.assertEmitted=function(){var t=this.emit();if(t.defaultPrevented)throw up.error.aborted("Event "+t.type+" was prevented")},i.prototype.logEmission=function(){var t;if(up.log.isEnabled()){var e,o=this.log;r.isArray(o)?(o=(t=o)[0],e=t.slice(1)):e=[];var i=this.event.type;r.isString(o)?up.puts.apply(up,n([i,o],e)):!1!==o&&up.puts(i,"Event "+i)}},i.fromEmitArgs=function(t,e){var n;void 0===e&&(e={});var i,s=r.extractOptions(t);return s=r.merge(e,s),r.isElementish(t[0])?s.target=o.get(t.shift()):t[0]instanceof up.Layer&&(s.layer=t.shift()),s.layer&&(i=up.layer.get(s.layer),null==s.target&&(s.target=i.element),null==s.baseLayer&&(s.baseLayer=i)),s.baseLayer&&(s.baseLayer=up.layer.get(s.baseLayer)),r.isString(s.target)?s.target=up.fragment.get(s.target,{layer:s.layer}):s.target||(s.target=document),(null===(n=t[0])||void 0===n?void 0:n.preventDefault)?(s.event=t[0],null==s.log&&(s.log=t[0].log)):r.isString(t[0])?s.event=up.event.build(t[0],s):s.event=up.event.build(s),new this(s)},i}(up.Record)},4158:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},r=up.util,o=up.element;up.EventListener=function(t){function i(e){var n=t.call(this,e)||this;return n.key=n.constructor.buildKey(e),n.isDefault=up.framework.booting,n.nativeCallback=n.nativeCallback.bind(n),n}return e(i,t),i.prototype.keys=function(){return["element","eventType","selector","callback","jQuery","guard","baseLayer","passive","once"]},i.prototype.bind=function(){var t,e,n=(e=this.element).upEventListeners||(e.upEventListeners={});n[this.key]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),n[this.key]=this,(t=this.element).addEventListener.apply(t,this.addListenerArgs())},i.prototype.addListenerArgs=function(){var t=[this.eventType,this.nativeCallback];return this.passive&&up.browser.canPassiveEventListener()&&t.push({passive:!0}),t},i.prototype.unbind=function(){var t,e=this.element.upEventListeners;e&&delete e[this.key],(t=this.element).removeEventListener.apply(t,this.addListenerArgs())},i.prototype.nativeCallback=function(t){var e;this.once&&this.unbind();var i=t.target;if(this.selector&&(i=o.closest(i,r.evalOption(this.selector))),(!this.guard||this.guard(t))&&i){var s=[t,this.jQuery?up.browser.jQuery(i):i],u=this.callback.length;if(1!==u&&2!==u){var a=up.syntax.data(i);s.push(a)}var c=(e=this.callback).bind.apply(e,n([i],s));this.baseLayer?this.baseLayer.asCurrent(c):c()}},i.fromElement=function(t){var e=t.element.upEventListeners;if(e)return e[this.buildKey(t)]},i.buildKey=function(t){var e;return(e=t.callback).upUid||(e.upUid=r.uid()),[t.eventType,t.selector,t.callback.upUid].join("|")},i.allNonDefault=function(t){var e=t.upEventListeners;if(e){var n=r.values(e);return r.reject(n,"isDefault")}return[]},i}(up.Record)},3139:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.EventListenerGroup=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.keys=function(){return["elements","eventTypes","selector","callback","jQuery","guard","baseLayer","passive","once"]},o.prototype.bind=function(){var t=[];return this.eachListenerAttributes((function(e){var n=new up.EventListener(e);return n.bind(),t.push(n.unbind.bind(n))})),r.sequence(t)},o.prototype.eachListenerAttributes=function(t){for(var e=0,n=this.elements;e<n.length;e++)for(var r=n[e],o=0,i=this.eventTypes;o<i.length;o++){var s=i[o];t(this.listenerAttributes(r,s))}},o.prototype.listenerAttributes=function(t,e){return n(n({},this.attributes()),{element:t,eventType:e})},o.prototype.unbind=function(){this.eachListenerAttributes((function(t){var e=up.EventListener.fromElement(t);e&&e.unbind()}))},o.fromBindArgs=function(t,e){var o,i=(t=r.copy(t)).pop();o=t[0].addEventListener?[t.shift()]:r.isJQuery(t[0])||r.isList(t[0])&&t[0][0].addEventListener?t.shift():[document];var s=r.splitValues(t.shift()),u=up.migrate.fixEventTypes;u&&(s=u(s));var a=r.extractOptions(t),c=t[0];return new this(n(n({elements:o,eventTypes:s,selector:c,callback:i},a),e))},o}(up.Record)},6866:function(){var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},e=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},n=up.util,r=up.element;up.FieldObserver=function(){function o(t,e,n){this.scheduleValues=this.scheduleValues.bind(this),this.isNewValues=this.isNewValues.bind(this),this.callback=n,this.fields=r.list(t),this.delay=e.delay,this.batch=e.batch}return o.prototype.start=function(){var t=this;this.scheduledValues=null,this.processedValues=this.readFieldValues(),this.currentTimer=void 0,this.callbackRunning=!1,this.unbind=up.on(this.fields,"input change",(function(){return t.check()}))},o.prototype.stop=function(){this.unbind(),this.cancelTimer()},o.prototype.cancelTimer=function(){clearTimeout(this.currentTimer),this.currentTimer=void 0},o.prototype.scheduleTimer=function(){var t=this;this.cancelTimer(),this.currentTimer=n.timer(this.delay,(function(){t.currentTimer=void 0,t.requestCallback()}))},o.prototype.scheduleValues=function(t){this.scheduledValues=t,this.scheduleTimer()},o.prototype.isNewValues=function(t){return!n.isEqual(t,this.processedValues)&&!n.isEqual(this.scheduledValues,t)},o.prototype.requestCallback=function(){return t(this,void 0,void 0,(function(){var t,r,o,i;return e(this,(function(e){switch(e.label){case 0:if(null===this.scheduledValues||this.currentTimer||this.callbackRunning)return[3,2];if(t=this.changedValues(this.processedValues,this.scheduledValues),this.processedValues=this.scheduledValues,this.scheduledValues=null,this.callbackRunning=!0,r=[],this.batch)r.push(this.callback(t));else for(o in t)i=t[o],r.push(this.callback(i,o));return[4,n.allSettled(r)];case 1:e.sent(),this.callbackRunning=!1,this.requestCallback(),e.label=2;case 2:return[2]}}))}))},o.prototype.changedValues=function(t,e){var r={},o=Object.keys(t);o=o.concat(Object.keys(e));for(var i=0,s=o=n.uniq(o);i<s.length;i++){var u=s[i],a=t[u],c=e[u];n.isEqual(a,c)||(r[u]=c)}return r},o.prototype.readFieldValues=function(){return up.Params.fromFields(this.fields).toObject()},o.prototype.check=function(){var t=this.readFieldValues();this.isNewValues(t)&&this.scheduleValues(t)},o}()},665:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.element,r=["selectionStart","selectionEnd","scrollLeft","scrollTop"];function o(t,e){for(var n=0,o=r;n<o.length;n++){var i=o[n];try{e[i]=t[i]}catch(t){}}}function i(t){var e=document.activeElement;if(n.isInSubtree(t,e))return e}up.FocusCapsule=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return e(s,t),s.prototype.keys=function(){return["selector","oldElement"].concat(r)},s.prototype.restore=function(t,e){if(this.wasLost()){var r=n.get(t,this.selector);return r?(o(this,r),up.focus(r,e),!0):void 0}},s.preserveWithin=function(t){var e=i(t);if(e){var n={oldElement:t,selector:up.fragment.toTarget(e)};return o(e,n),new this(n)}},s.prototype.wasLost=function(){return!i(this.oldElement)},s}(up.Record)},2587:function(){var t=/^([^ >+(]+) (.+)$/;up.FragmentFinder=function(){function e(t){this.options=t,this.origin=this.options.origin,this.selector=this.options.selector,this.layer=this.options.layer}return e.prototype.find=function(){return this.findAroundOrigin()||this.findInLayer()},e.prototype.findAroundOrigin=function(){if(this.origin&&up.fragment.config.matchAroundOrigin&&!up.element.isDetached(this.origin))return this.findClosest()||this.findInVicinity()},e.prototype.findClosest=function(){return up.fragment.closest(this.origin,this.selector,this.options)},e.prototype.findInVicinity=function(){var e=this.selector.match(t);if(e){var n=up.fragment.closest(this.origin,e[1],this.options);if(n)return up.fragment.getDumb(n,e[2])}},e.prototype.findInLayer=function(){return up.fragment.getDumb(this.selector,this.options)},e}()},7031:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util,r=up.element,o={preventScroll:!0};up.FragmentFocus=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.keys=function(){return t.prototype.keys.call(this).concat(["hash","focusCapsule"])},i.prototype.processPrimitive=function(t){switch(t){case"keep":return this.restoreFocus();case"target":case!0:return this.focusElement(this.fragment);case"layer":return this.focusElement(this.layer.getFocusElement());case"main":return this.focusSelector(":main");case"hash":return this.focusHash();case"autofocus":return this.autofocus();default:if(n.isString(t))return this.focusSelector(t)}},i.prototype.processElement=function(t){return this.focusElement(t)},i.prototype.resolveCondition=function(e){return"lost"===e?this.wasFocusLost():t.prototype.resolveCondition.call(this,e)},i.prototype.focusSelector=function(t){var e=this.findSelector(t);if(e)return this.focusElement(e)},i.prototype.restoreFocus=function(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.fragment,o)},i.prototype.autofocus=function(){var t=r.subtree(this.fragment,"[autofocus]")[0];if(t)return up.focus(t,o),!0},i.prototype.focusElement=function(t){return up.viewport.makeFocusable(t),up.focus(t,o),!0},i.prototype.focusHash=function(){var t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.focusElement(t)},i.prototype.wasFocusLost=function(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()},i}(up.FragmentProcessor)},2828:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.FragmentProcessor=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.keys=function(){return["fragment","autoMeans","origin","layer"]},r.prototype.process=function(t){return this.tryProcess(t)},r.prototype.tryProcess=function(t){var e=this;if(n.isArray(t))return n.find(t,(function(t){return e.tryProcess(t)}));if(n.isFunction(t))return this.tryProcess(t(this.fragment,this.attributes()));if(n.isElement(t))return this.processElement();if(n.isString(t)){if("auto"===t)return this.tryProcess(this.autoMeans);var r=t.match(/^(.+?)-if-(.+?)$/);if(r)return this.resolveCondition(r[2])&&this.process(r[1])}return this.processPrimitive(t)},r.prototype.resolveCondition=function(t){if("main"===t)return up.fragment.contains(this.fragment,":main")},r.prototype.findSelector=function(t){var e={layer:this.layer,origin:this.origin},n=up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e);if(n)return n;up.warn("up.render()",'Could not find an element matching "%s"',t)},r}(up.Record)},4850:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.FragmentScrolling=function(t){function o(e){var n,r;return null===(r=(n=up.migrate).handleScrollOptions)||void 0===r||r.call(n,e),t.call(this,e)||this}return e(o,t),o.prototype.keys=function(){return t.prototype.keys.call(this).concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior","scrollSpeed"])},o.prototype.process=function(e){return t.prototype.process.call(this,e)||Promise.resolve()},o.prototype.processPrimitive=function(t){switch(t){case"reset":return this.reset();case"layer":return this.revealLayer();case"main":return this.revealSelector(":main");case"restore":return this.restore();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.revealElement(this.fragment);default:if(r.isString(t))return this.revealSelector(t)}},o.prototype.processElement=function(t){return this.revealElement(t)},o.prototype.revealElement=function(t){return up.reveal(t,this.attributes())},o.prototype.revealSelector=function(t){var e=this.findSelector(t);if(e)return this.revealElement(e)},o.prototype.revealLayer=function(){return this.revealElement(this.layer.getBoxElement())},o.prototype.reset=function(){return up.viewport.resetScroll(n(n({},this.attributes()),{around:this.fragment}))},o.prototype.restore=function(){return up.viewport.restoreScroll(n(n({},this.attributes()),{around:this.fragment}))},o}(up.FragmentProcessor)},6267:function(){var t=up.util,e=up.element;up.HTMLWrapper=function(){function n(t){this.tagName=t;var e="<"+this.tagName+"[^>]*>",n="</"+this.tagName+">";this.pattern=new RegExp(e+"(.|\\s)*?"+n,"ig"),this.attrName="up-wrapped-"+this.tagName}return n.prototype.strip=function(t){return t.replace(this.pattern,"")},n.prototype.wrap=function(t){return t.replace(this.pattern,this.wrapMatch.bind(this))},n.prototype.wrapMatch=function(e){return this.didWrap=!0,'<meta name="'+this.attrName+'" value="'+t.escapeHTML(e)+'">'},n.prototype.unwrap=function(t){if(this.didWrap)for(var n=0,r=t.querySelectorAll("meta[name='"+this.attrName+"']");n<r.length;n++){var o=r[n],i=o.getAttribute("value"),s=e.createFromHTML(i);e.replace(o,s)}},n}()},7956:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},r=up.element,o=up.util;up.Layer=function(t){function i(e){void 0===e&&(e={});var n=t.call(this,e)||this;if(!n.mode)throw"missing { mode } option";return n}return e(i,t),i.prototype.keys=function(){return["element","stack","history","mode","context","lastScrollTops"]},i.prototype.defaults=function(){return{context:{},lastScrollTops:new up.Cache({size:30,key:up.history.normalizeURL})}},i.prototype.setupHandlers=function(){up.link.convertClicks(this)},i.prototype.teardownHandlers=function(){},i.prototype.mainTargets=function(){return up.layer.mainTargets(this.mode)},i.prototype.sync=function(){},i.prototype.accept=function(){throw up.error.notImplemented()},i.prototype.dismiss=function(){throw up.error.notImplemented()},i.prototype.peel=function(t){this.stack.peel(this,t)},i.prototype.evalOption=function(t){return o.evalOption(t,this)},i.prototype.isCurrent=function(){return this.stack.isCurrent(this)},i.prototype.isFront=function(){return this.stack.isFront(this)},i.prototype.isRoot=function(){return this.stack.isRoot(this)},i.prototype.isOverlay=function(){return this.stack.isOverlay(this)},i.prototype.isOpen=function(){return this.stack.isOpen(this)},i.prototype.isClosed=function(){return this.stack.isClosed(this)},Object.defineProperty(i.prototype,"parent",{get:function(){return this.stack.parentOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"child",{get:function(){return this.stack.childOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"ancestors",{get:function(){return this.stack.ancestorsOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"descendants",{get:function(){return this.stack.descendantsOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"index",{get:function(){return this.stack.indexOf(this)},enumerable:!1,configurable:!0}),i.prototype.getContentElement=function(){return this.contentElement||this.element},i.prototype.getBoxElement=function(){return this.boxElement||this.element},i.prototype.getFocusElement=function(){return this.getBoxElement()},i.prototype.getFirstSwappableElement=function(){throw up.error.notImplemented()},i.prototype.contains=function(t){return r.closest(t,up.layer.anySelector())===this.element},i.prototype.on=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventListenerGroup(t).bind()},i.prototype.off=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventListenerGroup(t).unbind()},i.prototype.buildEventListenerGroup=function(t){var e=this;return up.EventListenerGroup.fromBindArgs(t,{guard:function(t){return e.containsEventTarget(t)},elements:[this.element],baseLayer:this})},i.prototype.containsEventTarget=function(t){return this.contains(t.target)},i.prototype.wasHitByMouseEvent=function(t){var e=document.elementFromPoint(t.clientX,t.clientY);return!e||this.contains(e)},i.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})},i.prototype.emit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventEmitter(t).emit()},i.prototype.isDetached=function(){return r.isDetached(this.element)},i.prototype.saveHistory=function(){this.isHistoryVisible()&&(this.savedTitle=document.title,this.savedLocation=up.history.location)},i.prototype.restoreHistory=function(){this.savedLocation&&(up.history.push(this.savedLocation),this.savedLocation=null),this.savedTitle&&(document.title=this.savedTitle,this.savedTitle=null)},i.prototype.asCurrent=function(t){return this.stack.asCurrent(this,t)},i.prototype.updateHistory=function(t){o.isString(t.title)&&(this.title=t.title),o.isString(t.location)&&(this.location=t.location)},i.prototype.isHistoryVisible=function(){return this.history&&(this.isRoot()||this.parent.isHistoryVisible())},i.prototype.showsLiveHistory=function(){return this.isHistoryVisible()&&this.isFront()&&(up.history.config.enabled||this.isRoot())},Object.defineProperty(i.prototype,"title",{get:function(){return this.showsLiveHistory()?document.title:this.savedTitle},set:function(t){this.savedTitle=t,this.showsLiveHistory()&&(document.title=t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"location",{get:function(){return this.showsLiveHistory()?up.history.location:this.savedLocation},set:function(t){this.savedLocation!==(t=up.history.normalizeURL(t))&&(this.savedLocation=t,this.emit("up:layer:location:changed",{location:t,log:!1}),this.showsLiveHistory()&&up.history.push(t))},enumerable:!1,configurable:!0}),i.prototype.selector=function(t){return this.constructor.selector(t)},i.selector=function(t){throw up.error.notImplemented()},i.prototype.toString=function(){throw up.error.notImplemented()},i.prototype.affix=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.affix.apply(r,n([this.getFirstSwappableElement()],t))},i.prototype[o.isEqual.key]=function(t){return this.constructor===t.constructor&&this.element===t.element},i}(up.Record)},7101:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Cover=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithViewport)).mode="cover",e)},5580:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Drawer=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithViewport)).mode="drawer",e)},86:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Modal=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithViewport)).mode="modal",e)},7403:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.element,o=up.util;up.Layer.Overlay=function(t){function i(e){var n=t.call(this,e)||this;return!0===n.dismissable?n.dismissable=["button","key","outside"]:!1===n.dismissable?n.dismissable=[]:n.dismissable=o.splitValues(n.dismissable),n.acceptLocation&&(n.acceptLocation=new up.URLPattern(n.acceptLocation)),n.dismissLocation&&(n.dismissLocation=new up.URLPattern(n.dismissLocation)),n}return e(i,t),i.prototype.keys=function(){return t.prototype.keys.call(this).concat(["position","align","size","origin","class","backdrop","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","backdropOpenAnimation","backdropCloseAnimation","dismissable","dismissLabel","dismissAriaLabel","onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"])},i.prototype.callback=function(t){var e=this[t];if(e)return e.bind(this)},i.prototype.createElement=function(t){this.nesting||(this.nesting=this.suggestVisualNesting());var e=o.compactObject(o.pick(this,["align","position","size","class","nesting"]));this.element=this.affixPart(t,null,e)},i.prototype.createBackdropElement=function(t){this.backdropElement=this.affixPart(t,"backdrop")},i.prototype.createViewportElement=function(t){this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})},i.prototype.createBoxElement=function(t){this.boxElement=this.affixPart(t,"box")},i.prototype.createContentElement=function(t,e){this.contentElement=this.affixPart(t,"content"),this.contentElement.appendChild(e)},i.prototype.createDismissElement=function(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissAriaLabel}),r.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})},i.prototype.affixPart=function(t,e,n){return void 0===n&&(n={}),r.affix(t,this.selector(e),n)},i.selector=function(t){return o.compact(["up",this.mode,t]).join("-")},i.prototype.suggestVisualNesting=function(){var t=this.parent;return this.mode===t.mode?1+t.suggestVisualNesting():0},i.prototype.setupHandlers=function(){var e,n,r=this;t.prototype.setupHandlers.call(this),this.overlayFocus=new up.OverlayFocus(this),this.supportsDismissMethod("button")&&this.createDismissElement(this.getBoxElement()),this.supportsDismissMethod("outside")&&(this.unbindParentClicked=this.parent.on("up:click",(function(t,e){var n=r.origin&&r.origin.contains(e);r.onOutsideClicked(t,n)})),this.viewportElement&&up.on(this.viewportElement,"up:click",(function(t){t.target===r.viewportElement&&r.onOutsideClicked(t,!0)}))),this.supportsDismissMethod("key")&&(this.unbindEscapePressed=up.event.onEscape((function(t){return r.onEscapePressed(t)}))),this.registerClickCloser("up-accept",(function(t,e){r.accept(t,e)})),this.registerClickCloser("up-dismiss",(function(t,e){r.dismiss(t,e)})),null===(n=(e=up.migrate).registerLayerCloser)||void 0===n||n.call(e,this),this.registerEventCloser(this.acceptEvent,this.accept),this.registerEventCloser(this.dismissEvent,this.dismiss)},i.prototype.onOutsideClicked=function(t,e){e&&up.event.halt(t),this.dismiss(":outside")},i.prototype.onEscapePressed=function(t){if(this.isFront()){var e=up.form.focusedField();e?e.blur():this.supportsDismissMethod("key")&&(up.event.halt(t),this.dismiss(":key"))}},i.prototype.registerClickCloser=function(t,e){this.on("up:click","["+t+"]",(function(n){up.event.halt(n);var o=n.target,i=r.jsonAttr(o,t),s={origin:o},u=new up.OptionsParser(s,o);u.booleanOrString("animation"),u.string("easing"),u.number("duration"),u.string("confirm"),e(i,s)}))},i.prototype.registerEventCloser=function(t,e){var n=this;if(t)return this.on(t,(function(t){t.preventDefault(),e.call(n,t)}))},i.prototype.tryAcceptForLocation=function(){this.tryCloseForLocation(this.acceptLocation,this.accept)},i.prototype.tryDismissForLocation=function(){this.tryCloseForLocation(this.dismissLocation,this.dismiss)},i.prototype.tryCloseForLocation=function(t,e){var r,o;if(t&&(r=this.location)&&(o=t.recognize(r))){var i=n(n({},o),{location:r});e.call(this,i)}},i.prototype.teardownHandlers=function(){var e,n;t.prototype.teardownHandlers.call(this),null===(e=this.unbindParentClicked)||void 0===e||e.call(this),null===(n=this.unbindEscapePressed)||void 0===n||n.call(this),this.overlayFocus.teardown()},i.prototype.destroyElements=function(t){var e=this,r=n(n({},t),{animation:function(){return e.startCloseAnimation(t)},onFinished:function(){var n;e.onElementsRemoved(),null===(n=t.onFinished)||void 0===n||n.call(t)},log:!1});up.destroy(this.element,r)},i.prototype.onElementsRemoved=function(){},i.prototype.startAnimation=function(t){void 0===t&&(t={});var e,n=up.animate(this.getBoxElement(),t.boxAnimation,t);return this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(e=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([n,e])},i.prototype.startOpenAnimation=function(t){var e,n=this;return void 0===t&&(t={}),this.startAnimation({boxAnimation:null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.openAnimation),backdropAnimation:"fade-in",easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}).then((function(){return n.wasEverVisible=!0}))},i.prototype.startCloseAnimation=function(t){var e;void 0===t&&(t={});var n=this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation));return this.startAnimation({boxAnimation:n,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})},i.prototype.accept=function(t,e){return void 0===t&&(t=null),void 0===e&&(e={}),this.executeCloseChange("accept",t,e)},i.prototype.dismiss=function(t,e){return void 0===t&&(t=null),void 0===e&&(e={}),this.executeCloseChange("dismiss",t,e)},i.prototype.supportsDismissMethod=function(t){return o.contains(this.dismissable,t)},i.prototype.executeCloseChange=function(t,e,r){return r=n(n({},r),{verb:t,value:e,layer:this}),new up.Change.CloseLayer(r).execute()},i.prototype.getFirstSwappableElement=function(){return this.getContentElement().children[0]},i.prototype.toString=function(){return this.mode+" overlay"},i}(up.Layer)},6412:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.OverlayWithTether=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.createElements=function(t){this.origin||up.fail("Missing { origin } option"),this.tether=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.tether.parent),this.createContentElement(this.element,t),this.tether.start(this.element)},n.prototype.onElementsRemoved=function(){this.tether.stop()},n.prototype.sync=function(){this.isOpen()&&(this.isDetached()||this.tether.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.tether.sync())},n}(up.Layer.Overlay)},7965:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.OverlayWithViewport=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getParentElement=function(){return document.body},e.prototype.createElements=function(t){this.shiftBody(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement,t)},e.prototype.onElementsRemoved=function(){this.unshiftBody()},e.prototype.shiftBody=function(){this.constructor.bodyShifter.shift()},e.prototype.unshiftBody=function(){this.constructor.bodyShifter.unshift()},e.prototype.sync=function(){this.isDetached()&&this.isOpen()&&this.constructor.getParentElement().appendChild(this.element)},e}(up.Layer.Overlay)).bodyShifter=new up.BodyShifter,e)},4552:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Popup=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithTether)).mode="popup",e)},7771:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),r=up.util,o=up.element;up.Layer.Root=((e=function(t){function e(e){var n=t.call(this,e)||this;return n.setupHandlers(),n}return n(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return o.root},enumerable:!1,configurable:!0}),e.prototype.getFirstSwappableElement=function(){return document.body},e.selector=function(){return"html"},e.prototype.setupHandlers=function(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,t.prototype.setupHandlers.call(this))},e.prototype.sync=function(){this.setupHandlers()},e.prototype.accept=function(){this.cannotCloseRoot()},e.prototype.dismiss=function(){this.cannotCloseRoot()},e.prototype.cannotCloseRoot=function(){throw up.error.failed("Cannot close the root layer")},e.prototype.reset=function(){r.assign(this,this.defaults())},e.prototype.toString=function(){return"root layer"},e}(up.Layer)).mode="root",e)},6066:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},n=up.util,r=up.element;up.LayerLookup=function(){function o(e){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];this.stack=e;var i=n.parseArgIntoOptions(r,"layer");if(!1!==i.normalizeLayerOptions&&up.layer.normalizeOptions(i),this.values=n.splitValues(i.layer),this.origin=i.origin,this.baseLayer=i.baseLayer||this.stack.current,n.isString(this.baseLayer)){var s=t(t({},i),{baseLayer:this.stack.current,normalizeLayerOptions:!1});this.baseLayer=new this.constructor(this.stack,this.baseLayer,s).first()}}return o.prototype.originLayer=function(){if(this.origin)return this.forElement(this.origin)},o.prototype.first=function(){return this.all()[0]},o.prototype.all=function(){var t=this,e=n.flatMap(this.values,(function(e){return t.resolveValue(e)}));return e=n.compact(e),n.uniq(e)},o.prototype.forElement=function(t){return t=r.get(t),n.find(this.stack.reversed(),(function(e){return e.contains(t)}))},o.prototype.forIndex=function(t){return this.stack[t]},o.prototype.resolveValue=function(t){if(t instanceof up.Layer)return t;if(n.isNumber(t))return this.forIndex(t);if(/^\d+$/.test(t))return this.forIndex(Number(t));if(n.isElementish(t))return this.forElement(t);switch(t){case"any":return e([this.baseLayer],this.stack.reversed());case"current":return this.baseLayer;case"closest":return this.stack.selfAndAncestorsOf(this.baseLayer);case"parent":return this.baseLayer.parent;case"ancestor":case"ancestors":return this.baseLayer.ancestors;case"child":return this.baseLayer.child;case"descendant":case"descendants":return this.baseLayer.descendants;case"new":return"new";case"root":return this.stack.root;case"overlay":case"overlays":return n.reverse(this.stack.overlays);case"front":return this.stack.front;case"origin":return this.originLayer();default:return up.fail("Unknown { layer } option: %o",t)}},o}()},6387:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},o=up.util;up.LayerStack=function(t){function i(){var e=t.call(this)||this;return Object.setPrototypeOf(e,up.LayerStack.prototype),e.currentOverrides=[],e.push(e.buildRoot()),e}return e(i,t),i.prototype.buildRoot=function(){return up.layer.build({mode:"root",stack:this})},i.prototype.remove=function(t){o.remove(this,t)},i.prototype.peel=function(t,e){for(var r=o.reverse(t.descendants),i=n(n({},e),{preventable:!1}),s=0,u=r;s<u.length;s++)u[s].dismiss(":peel",i)},i.prototype.reset=function(){this.peel(this.root,{animation:!1}),this.currentOverrides=[],this.root.reset()},i.prototype.isOpen=function(t){return t.index>=0},i.prototype.isClosed=function(t){return!this.isOpen(t)},i.prototype.parentOf=function(t){return this[t.index-1]},i.prototype.childOf=function(t){return this[t.index+1]},i.prototype.ancestorsOf=function(t){return o.reverse(this.slice(0,t.index))},i.prototype.selfAndAncestorsOf=function(t){return r([t],t.ancestors)},i.prototype.descendantsOf=function(t){return this.slice(t.index+1)},i.prototype.isRoot=function(t){return this[0]===t},i.prototype.isOverlay=function(t){return!this.isRoot(t)},i.prototype.isCurrent=function(t){return this.current===t},i.prototype.isFront=function(t){return this.front===t},i.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.getAll.apply(this,t)[0]},i.prototype.getAll=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(new((t=up.LayerLookup).bind.apply(t,r([void 0,this],e)))).all()},i.prototype.sync=function(){for(var t=0;t<this.length;t++)this[t].sync()},i.prototype.asCurrent=function(t,e){try{return this.currentOverrides.push(t),e()}finally{this.currentOverrides.pop()}},i.prototype.reversed=function(){return o.reverse(this)},i.prototype.dismissOverlays=function(t,e){void 0===t&&(t=null),void 0===e&&(e={}),e.dismissable=!1;for(var n=0,r=o.reverse(this.overlays);n<r.length;n++)r[n].dismiss(t,e)},i.prototype[o.copy.key]=function(){return o.copyArrayLike(this)},Object.defineProperty(i.prototype,"count",{get:function(){return this.length},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this[0]},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"overlays",{get:function(){return this.root.descendants},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"current",{get:function(){return o.last(this.currentOverrides)||this.front},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"front",{get:function(){return o.last(this)},enumerable:!1,configurable:!0}),i}(Array)},5390:function(){up.LinkFeedbackURLs=function(){function t(t){var e=up.feedback.normalizeURL;if(this.isSafe=up.link.isSafe(t),this.isSafe){var n=t.getAttribute("href");n&&"#"!==n&&(this.href=e(n));var r=t.getAttribute("up-href");r&&(this.upHREF=e(r));var o=t.getAttribute("up-alias");o&&(this.aliasPattern=new up.URLPattern(o,e))}}return t.prototype.isCurrent=function(t){return this.isSafe&&!!(this.href&&this.href===t||this.upHREF&&this.upHREF===t||this.aliasPattern&&this.aliasPattern.test(t,!1))},t}()},2618:function(){var t=up.util,e=up.element;up.LinkPreloader=function(){function n(){this.considerPreload=this.considerPreload.bind(this)}return n.prototype.observeLink=function(t){var e=this;up.link.isSafe(t)&&(this.on(t,"mouseenter",(function(t){return e.considerPreload(t,!0)})),this.on(t,"mousedown touchstart",(function(t){return e.considerPreload(t)})),this.on(t,"mouseleave",(function(t){return e.stopPreload(t)})))},n.prototype.on=function(t,e,n){up.on(t,e,{passive:!0},n)},n.prototype.considerPreload=function(t,e){var n=t.target;n!==this.currentLink&&(this.reset(),this.currentLink=n,up.link.shouldFollowEvent(t,n)&&(e?this.preloadAfterDelay(n):this.preloadNow(n)))},n.prototype.stopPreload=function(t){if(t.target===this.currentLink)return this.reset()},n.prototype.reset=function(){var t;this.currentLink&&(clearTimeout(this.timer),(null===(t=this.currentRequest)||void 0===t?void 0:t.preload)&&this.currentRequest.abort(),this.currentLink=void 0,this.currentRequest=void 0)},n.prototype.preloadAfterDelay=function(n){var r,o=this,i=null!==(r=e.numberAttr(n,"up-delay"))&&void 0!==r?r:up.link.config.preloadDelay;this.timer=t.timer(i,(function(){return o.preloadNow(n)}))},n.prototype.preloadNow=function(t){var n=this;e.isDetached(t)?this.reset():(up.log.muteUncriticalRejection(up.link.preload(t,{onQueued:function(t){return n.currentRequest=t}})),this.queued=!0)},n}()},7792:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},r=up.util,o=up.element;up.MotionController=function(){function i(t){this.activeClass="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.activeClass,this.finishEvent="up:"+t+":finish",this.finishCount=0,this.clusterCount=0}return i.prototype.startFunction=function(t,i,s){var u;return void 0===s&&(s={}),e(this,void 0,void 0,(function(){var e,a,c=this;return n(this,(function(n){switch(n.label){case 0:return t=o.list(t),e=function(){return up.log.muteUncriticalRejection(i())},s.trackMotion=null!==(u=s.trackMotion)&&void 0!==u?u:up.motion.isEnabled(),!1!==s.trackMotion?[3,2]:[4,r.microtask(e)];case 1:return n.sent(),[3,5];case 2:return s.trackMotion=!1,[4,this.finish(t)];case 3:return n.sent(),a=this.whileForwardingFinishEvent(t,e),this.markCluster(t,a),[4,a=a.then((function(){return c.unmarkCluster(t)}))];case 4:return[2,n.sent()];case 5:return[2]}}))}))},i.prototype.startMotion=function(t,e,n){void 0===n&&(n={});var r=up.on(t,this.finishEvent,(function(){return e.finish()})),o=this.startFunction(t,(function(){return e.start()}),n);return o.then(r)},i.prototype.finish=function(t){if(this.finishCount++,0===this.clusterCount||!up.motion.isEnabled())return Promise.resolve();t=this.expandFinishRequest(t);var e=r.map(t,this.finishOneElement.bind(this));return Promise.all(e)},i.prototype.expandFinishRequest=function(t){var e=this;return t?r.flatMap(t,(function(t){return o.list(o.closest(t,e.selector),o.all(t,e.selector))})):o.all(this.selector)},i.prototype.isActive=function(t){return t.classList.contains(this.activeClass)},i.prototype.finishOneElement=function(t){return this.emitFinishEvent(t),this.whenElementFinished(t)},i.prototype.emitFinishEvent=function(e,n){return void 0===n&&(n={}),n=t({target:e,log:!1},n),up.emit(this.finishEvent,n)},i.prototype.whenElementFinished=function(t){return t[this.dataKey]||Promise.resolve()},i.prototype.markCluster=function(t,e){this.clusterCount++;for(var n=0,r=t;n<r.length;n++){var o=r[n];o.classList.add(this.activeClass),o[this.dataKey]=e}},i.prototype.unmarkCluster=function(t){this.clusterCount--;for(var e=0,n=t;e<n.length;e++){var r=n[e];r.classList.remove(this.activeClass),delete r[this.dataKey]}},i.prototype.whileForwardingFinishEvent=function(t,e){var n=this;if(t.length<2)return e();var r=up.on(t,this.finishEvent,(function(e){if(!e.forwarded)for(var r=0,o=t;r<o.length;r++){var i=o[r];i!==e.target&&n.isActive(i)&&n.emitFinishEvent(i,{forwarded:!0})}}));return e().then(r)},i.prototype.reset=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,this.finish()];case 1:return t.sent(),this.finishCount=0,this.clusterCount=0,[2]}}))}))},i}()},1104:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=up.util,n=up.element;up.OptionsParser=function(){function r(t,e,n){this.options=t,this.element=e,this.fail=null==n?void 0:n.fail}return r.prototype.string=function(t,e){this.parse(n.attr,t,e)},r.prototype.boolean=function(t,e){this.parse(n.booleanAttr,t,e)},r.prototype.number=function(t,e){this.parse(n.numberAttr,t,e)},r.prototype.booleanOrString=function(t,e){this.parse(n.booleanOrStringAttr,t,e)},r.prototype.json=function(t,e){this.parse(n.jsonAttr,t,e)},r.prototype.parse=function(n,r,o){var i;void 0===o&&(o={});var s=e.wrapList(null!==(i=o.attr)&&void 0!==i?i:this.attrNameForKey(r)),u=this.options[r];if(this.element)for(var a=0,c=s;a<c.length;a++){var p=c[a];null!=u||(u=n(this.element,p))}null!=u||(u=o.default);var l,f=o.normalize;if(f&&(u=f(u)),e.isDefined(u)&&(this.options[r]=u),(o.fail||this.fail)&&(l=up.fragment.failKey(r))){var h=e.compact(e.map(s,this.deriveFailAttrName)),d=t(t({},o),{attr:h,fail:!1});this.parse(n,l,d)}},r.prototype.deriveFailAttrName=function(t){if(0===t.indexOf("up-"))return"up-fail-"+t.slice(3)},r.prototype.attrNameForKey=function(t){return"up-"+e.camelToKebabCase(t)},r}()},8665:function(){var t=up.element,e=up.util;up.OverlayFocus=function(){function n(t){this.layer=t,this.focusElement=this.layer.getFocusElement()}return n.prototype.moveToFront=function(){var e=this;this.enabled||(this.enabled=!0,this.untrapFocus=up.on("focusin",(function(t){return e.onFocus(t)})),this.unsetAttrs=t.setTemporaryAttrs(this.focusElement,{tabindex:"0",role:"dialog","aria-modal":"true"}),this.focusTrapBefore=t.affix(this.focusElement,"beforebegin","up-focus-trap[tabindex=0]"),this.focusTrapAfter=t.affix(this.focusElement,"afterend","up-focus-trap[tabindex=0]"))},n.prototype.moveToBack=function(){this.teardown()},n.prototype.teardown=function(){this.enabled&&(this.enabled=!1,this.untrapFocus(),this.unsetAttrs(),t.remove(this.focusTrapBefore),t.remove(this.focusTrapAfter))},n.prototype.onFocus=function(t){var e=t.target;this.processingFocusEvent||(this.processingFocusEvent=!0,e===this.focusTrapBefore?this.focusEnd():e!==this.focusTrapAfter&&this.layer.contains(e)||this.focusStart(),this.processingFocusEvent=!1)},n.prototype.focusStart=function(t){up.focus(this.focusElement,t)},n.prototype.focusEnd=function(){this.focusLastDescendant(this.layer.getBoxElement())||this.focusStart()},n.prototype.focusLastDescendant=function(t){for(var n=0,r=e.reverse(t.children);n<r.length;n++){var o=r[n];if(up.viewport.tryFocus(o)||this.focusLastDescendant(o))return!0}},n}()},3645:function(){var t=up.util,e=up.element;up.Params=function(){function n(t){this.clear(),this.addAll(t)}return n.prototype.clear=function(){this.entries=[]},n.prototype[t.copy.key]=function(){return new up.Params(this)},n.prototype.toObject=function(){for(var e={},n=0,r=this.entries;n<r.length;n++){var o=r[n],i=o.name,s=o.value;t.isBasicObjectProperty(i)||(this.isArrayKey(i)?(e[i]||(e[i]=[]),e[i].push(s)):e[i]=s)}return e},n.prototype.toArray=function(){return this.entries},n.prototype.toFormData=function(){for(var t=new FormData,e=0,n=this.entries;e<n.length;e++){var r=n[e];t.append(r.name,r.value)}return t.entries||(t.originalArray=this.entries),t},n.prototype.toQuery=function(){var e=t.map(this.entries,this.arrayEntryToQuery.bind(this));return(e=t.compact(e)).join("&")},n.prototype.arrayEntryToQuery=function(e){var n=e.value;if(!this.isBinaryValue(n)){var r=encodeURIComponent(e.name);return t.isGiven(n)&&(r+="=",r+=encodeURIComponent(n)),r}},n.prototype.isBinaryValue=function(t){return t instanceof Blob},n.prototype.hasBinaryValues=function(){var e=t.map(this.entries,"value");return t.some(e,this.isBinaryValue)},n.prototype.toURL=function(e){var n=[e,this.toQuery()];n=t.filter(n,t.isPresent);var r=t.contains(e,"?")?"&":"?";return n.join(r)},n.prototype.add=function(t,e){this.entries.push({name:t,value:e})},n.prototype.addAll=function(e){var n,r;t.isMissing(e)||(e instanceof this.constructor?(n=this.entries).push.apply(n,e.entries):t.isArray(e)?(r=this.entries).push.apply(r,e):t.isString(e)?this.addAllFromQuery(e):t.isFormData(e)?this.addAllFromFormData(e):t.isObject(e)?this.addAllFromObject(e):up.fail("Unsupport params type: %o",e))},n.prototype.addAllFromObject=function(e){for(var n in e)for(var r=e[n],o=0,i=t.isArray(r)?r:[r];o<i.length;o++){var s=i[o];this.add(n,s)}},n.prototype.addAllFromQuery=function(e){for(var n=0,r=e.split("&");n<r.length;n++){var o=r[n];if(o){var i=o.split("="),s=i[0],u=i[1];s=decodeURIComponent(s),u=t.isGiven(u)?decodeURIComponent(u):null,this.add(s,u)}}},n.prototype.addAllFromFormData=function(e){var n=this;t.eachIterator(e.entries(),(function(t){n.add.apply(n,t)}))},n.prototype.set=function(t,e){this.delete(t),this.add(t,e)},n.prototype.delete=function(e){this.entries=t.reject(this.entries,this.matchEntryFn(e))},n.prototype.matchEntryFn=function(t){return function(e){return e.name===t}},n.prototype.get=function(t){return this.isArrayKey(t)?this.getAll(t):this.getFirst(t)},n.prototype.getFirst=function(e){var n=t.find(this.entries,this.matchEntryFn(e));return null==n?void 0:n.value},n.prototype.getAll=function(e){if(this.isArrayKey(e))return this.getAll(e);var n=t.map(this.entries,this.matchEntryFn(e));return t.map(n,"value")},n.prototype.isArrayKey=function(e){return t.endsWith(e,"[]")},n.prototype[t.isBlank.key]=function(){return 0===this.entries.length},n.fromForm=function(t){return t=up.fragment.get(t),this.fromFields(up.form.fields(t))},n.fromFields=function(e){for(var n=new this,r=0,o=t.wrapList(e);r<o.length;r++){var i=o[r];n.addField(i)}return n},n.prototype.addField=function(t){var n=(t=e.get(t)).name;if(n&&!t.disabled){var r=t.tagName,o=t.type;if("SELECT"===r)for(var i=0,s=t.querySelectorAll("option");i<s.length;i++){var u=s[i];u.selected&&this.add(n,u.value)}else if("checkbox"===o||"radio"===o)t.checked&&this.add(n,t.value);else{if("file"!==o)return this.add(n,t.value);for(var a=0,c=t.files;a<c.length;a++){var p=c[a];this.add(n,p)}}}},n.prototype[t.isEqual.key]=function(e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)},n.fromURL=function(e){var n=new this,r=t.parseURL(e).search;return r&&(r=r.replace(/^\?/,""),n.addAll(r)),n},n.stripURL=function(e){return t.normalizeURL(e,{search:!1})},n}()},7782:function(){var t=up.element;up.ProgressBar=function(){function e(){this.step=0,this.element=t.affix(document.body,"up-progress-bar"),this.element.style.transition="width 300ms ease-out",this.moveTo(0),up.element.paint(this.element),this.width=31,this.nextStep()}return e.prototype.nextStep=function(){var t;t=this.width<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.width)*Math.random(),this.moveTo(this.width+t),this.step++;var e=300+40*this.step;this.timeout=setTimeout(this.nextStep.bind(this),e)},e.prototype.moveTo=function(t){this.width=t,this.element.style.width=t+"vw"},e.prototype.destroy=function(){clearTimeout(this.timeout),t.remove(this.element)},e.prototype.conclude=function(){clearTimeout(this.timeout),this.moveTo(100),setTimeout(this.destroy.bind(this),300)},e}()},2406:function(){var t=up.util;up.Record=function(){function e(e){t.assign(this,this.defaults(e),this.attributes(e))}return e.prototype.keys=function(){throw"Return an array of keys"},e.prototype.defaults=function(t){return{}},e.prototype.attributes=function(e){return void 0===e&&(e=this),t.pick(e,this.keys())},e.prototype[t.copy.key]=function(){return this.variant()},e.prototype.variant=function(e){return void 0===e&&(e={}),new this.constructor(t.merge(this.attributes(),e))},e.prototype[t.isEqual.key]=function(e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())},e}()},1279:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Rect=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.keys=function(){return["left","top","width","height"]},Object.defineProperty(n.prototype,"bottom",{get:function(){return this.top+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.left+this.width},enumerable:!1,configurable:!0}),n.fromElement=function(t){return new this(t.getBoundingClientRect())},n}(up.Record)},2705:function(){var t,e,n,r,o,i=up.util;up.RenderOptions=(t={hungry:!0,keep:!0,source:!0,saveScroll:!0,fail:"auto"},e={solo:!1,confirm:!1,feedback:!1},n=["url","method","origin","headers","params","cache","clearCache","fallback","solo","confirm","feedback","origin","baseLayer","fail"].concat(["keep","hungry","history","source","saveScroll","navigate"]),r=["url","content","fragment","document"],o=["history","focus","scroll"],{preprocess:function(n){var r,s;null===(s=(r=up.migrate).preprocessRenderOptions)||void 0===s||s.call(r,n);var u=i.merge(t,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(n));return i.merge(i.omit(u,o),{defaults:u},n,function(t){if(t.preload)return e}(n))},finalize:function(t,e){return i.merge(t.defaults,e,t)},assertContentGiven:function(t){i.some(r,(function(e){return i.isGiven(t[e])}))||(t.defaultToEmptyContent?t.content="":up.fail("up.render() needs either { "+r.join(", ")+" } option"))},deriveFailOptions:function(t){return i.merge(t.defaults,i.pick(t,n),function(t){var e={};for(var n in t){var r=t[n],o=up.fragment.successKey(n);o&&(e[o]=r)}return e}(t))}})},606:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.RenderResult=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.keys=function(){return["fragments","layer"]},n}(up.Record)},5437:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.Request=function(t){function r(e){var r=t.call(this,e)||this;return r.params=new up.Params(r.params),r.headers||(r.headers={}),r.preload&&(r.cache=!0),null==r.wrapMethod&&(r.wrapMethod=up.network.config.wrapMethod),r.normalizeForCaching(),e.basic||(r.layer=up.layer.get(r.layer),r.failLayer=up.layer.get(r.failLayer||r.layer),r.context||(r.context=r.layer.context||{}),r.failContext||(r.failContext=r.failLayer.context||{}),r.mode||(r.mode=r.layer.mode),r.failMode||(r.failMode=r.failLayer.mode),r.deferred=n.newDeferred(),r.state="new"),r}return e(r,t),r.prototype.keys=function(){return["method","url","hash","params","target","failTarget","headers","timeout","preload","cache","clearCache","layer","mode","context","failLayer","failMode","failContext","origin","solo","queueTime","wrapMethod","contentType","payload","onQueued"]},r.prototype.followState=function(t){n.delegate(this,["deferred","state","preload"],(function(){return t}))},r.prototype.normalizeForCaching=function(){this.method=n.normalizeMethod(this.method),this.extractHashFromURL(),this.transferParamsToURL(),this.url=n.normalizeURL(this.url)},r.prototype.evictExpensiveAttrs=function(){var t=this;n.task((function(){return t.layer=void 0,t.failLayer=void 0,t.origin=void 0}))},r.prototype.extractHashFromURL=function(){var t,e=null===(t=this.url)||void 0===t?void 0:t.match(/^([^#]*)(#.+)$/);if(e)return this.url=e[1],this.hash=e[2]},r.prototype.transferParamsToURL=function(){!this.url||this.allowsPayload()||n.isBlank(this.params)||(this.url=this.params.toURL(this.url),this.params.clear())},r.prototype.isSafe=function(){return up.network.isSafeMethod(this.method)},r.prototype.allowsPayload=function(){return n.methodAllowsPayload(this.method)},r.prototype.will302RedirectWithGET=function(){return this.isSafe()||"POST"===this.method},r.prototype.willCache=function(){return"auto"===this.cache?up.network.config.autoCache(this):this.cache},r.prototype.runQueuedCallbacks=function(){var t,e=this;n.always(this,(function(){return e.evictExpensiveAttrs()})),null===(t=this.onQueued)||void 0===t||t.call(this,this)},r.prototype.load=function(){var t=this;"new"===this.state&&(this.state="loading",this.xhr=new up.Request.XHRRenderer(this).buildAndSend({onload:function(){return t.onXHRLoad()},onerror:function(){return t.onXHRError()},ontimeout:function(){return t.onXHRTimeout()},onabort:function(){return t.onXHRAbort()}}))},r.prototype.loadPage=function(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()},r.prototype.onXHRLoad=function(){var t=this.extractResponseFromXHR(),e=["Server responded HTTP %d to %s %s (%d characters)",t.status,this.method,this.url,t.text.length];this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)},r.prototype.onXHRError=function(){var t="Fatal error during request";this.deferred.reject(up.error.failed(t)),this.emit("up:request:fatal",{log:t})},r.prototype.onXHRTimeout=function(){this.setAbortedState("Requested timed out")},r.prototype.onXHRAbort=function(){this.setAbortedState()},r.prototype.abort=function(){this.setAbortedState()&&this.xhr&&this.xhr.abort()},r.prototype.setAbortedState=function(t){if(void 0===t&&(t=["Request to %s %s was aborted",this.method,this.url]),"new"===this.state||"loading"===this.state)return this.state="aborted",this.emit("up:request:aborted",{log:t}),this.deferred.reject(up.error.aborted(t)),!0},r.prototype.respondWith=function(t){if("loading"===this.state)return this.state="loaded",t.ok?this.deferred.resolve(t):this.deferred.reject(t)},r.prototype.csrfHeader=function(){return up.protocol.csrfHeader()},r.prototype.csrfParam=function(){return up.protocol.csrfParam()},r.prototype.csrfToken=function(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()},r.prototype.isCrossOrigin=function(){return n.isCrossOrigin(this.url)},r.prototype.extractResponseFromXHR=function(){var t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),clearCache:up.protocol.clearCacheFromXHR(this.xhr)},e=up.protocol.methodFromXHR(this.xhr),r=up.protocol.locationFromXHR(this.xhr);return r&&(e||n.matchURLs(t.url,r)||(e="GET"),t.url=r),e&&(t.method=e),new up.Response(t)},r.prototype.cacheKey=function(){return JSON.stringify([this.method,this.url,this.params.toQuery(),this.metaProps()])},r.prototype.metaProps=function(){for(var t={},e=0,r=n.evalOption(up.network.config.requestMetaKeys,this);e<r.length;e++){var o=r[e],i=this[o];n.isGiven(i)&&(t[o]=i)}return t},r.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{request:this,layer:this.layer})},r.prototype.emit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventEmitter(t).emit()},r.prototype.assertEmitted=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.buildEventEmitter(t).assertEmitted()},Object.defineProperty(r.prototype,"description",{get:function(){return this.method+" "+this.url},enumerable:!1,configurable:!0}),r}(up.Record),n.delegate(up.Request.prototype,["then","catch","finally"],(function(){return this.deferred}))},7974:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.Request.Cache=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.maxSize=function(){return up.network.config.cacheSize},r.prototype.expiryMillis=function(){return up.network.config.cacheExpiry},r.prototype.normalizeStoreKey=function(t){return n.wrapValue(up.Request,t).cacheKey()},r.prototype.clear=function(e){var n=this;if(e&&"*"!==e&&!0!==e)return e=new up.URLPattern(e),this.each((function(t,r){e.test(r.url)&&n.store.remove(t)}));t.prototype.clear.call(this)},r}(up.Cache)},5221:function(){var t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=function(){function r(t){this.request=t}return r.prototype.buildAndSubmit=function(){this.params=t.copy(this.request.params);var r=this.request.url,o=this.request.method,i=up.Params.fromURL(r);this.params.addAll(i),r=up.Params.stripURL(r),t.contains(n,o)||(o=up.protocol.wrapMethod(o,this.params)),this.form=e.affix(document.body,"form.up-request-loader",{method:o,action:r});var s,u,a=this.request.contentType;a&&this.form.setAttribute("enctype",a),(s=this.request.csrfParam())&&(u=this.request.csrfToken())&&this.params.add(s,u),t.each(this.params.toArray(),this.addField.bind(this)),up.browser.submitForm(this.form)},r.prototype.addField=function(t){e.affix(this.form,"input[type=hidden]",t)},r}()},6413:function(){var t=up.util;up.Request.Queue=function(){function e(t){var e,n;void 0===t&&(t={}),this.concurrency=null!==(e=t.concurrency)&&void 0!==e?e:function(){return up.network.config.concurrency},this.badResponseTime=null!==(n=t.badResponseTime)&&void 0!==n?n:function(){return up.network.config.badResponseTime},this.reset()}return e.prototype.reset=function(){this.queuedRequests=[],this.currentRequests=[],clearTimeout(this.checkSlowTimout),this.emittedSlow=!1},Object.defineProperty(e.prototype,"allRequests",{get:function(){return this.currentRequests.concat(this.queuedRequests)},enumerable:!1,configurable:!0}),e.prototype.asap=function(e){var n=this;e.runQueuedCallbacks(),t.always(e,(function(t){return n.onRequestSettled(e,t)})),e.queueTime=new Date,this.setSlowTimer(),this.hasConcurrencyLeft()?this.sendRequestNow(e):this.queueRequest(e)},e.prototype.promoteToForeground=function(t){if(t.preload)return t.preload=!1,this.setSlowTimer()},e.prototype.setSlowTimer=function(){var e=this,n=t.evalOption(this.badResponseTime);this.checkSlowTimout=t.timer(n,(function(){return e.checkSlow()}))},e.prototype.hasConcurrencyLeft=function(){var e=t.evalOption(this.concurrency);return-1===e||this.currentRequests.length<e},e.prototype.isBusy=function(){return this.currentRequests.length>0},e.prototype.queueRequest=function(t){this.queuedRequests.push(t)},e.prototype.pluckNextRequest=function(){var e=t.find(this.queuedRequests,(function(t){return!t.preload}));return e||(e=this.queuedRequests[0]),t.remove(this.queuedRequests,e)},e.prototype.sendRequestNow=function(t){t.emit("up:request:load",{log:["Loading %s %s",t.method,t.url]}).defaultPrevented?t.abort("Prevented by event listener"):(t.normalizeForCaching(),this.currentRequests.push(t),t.load())},e.prototype.onRequestSettled=function(e,n){var r=this;t.remove(this.currentRequests,e),n instanceof up.Response&&n.ok&&up.network.registerAliasForRedirect(e,n),this.checkSlow(),t.microtask((function(){return r.poke()}))},e.prototype.poke=function(){var t;if(this.hasConcurrencyLeft()&&(t=this.pluckNextRequest()))return this.sendRequestNow(t)},e.prototype.abort=function(e){var n=this;void 0===e&&(e=!0);for(var r=function(r){t.filter(r,(function(t){return n.requestMatches(t,e)})).forEach((function(e){e.abort(),t.remove(r,e)}))},o=0,i=[this.currentRequests,this.queuedRequests];o<i.length;o++)r(i[o])},e.prototype.abortExcept=function(e,n){void 0===n&&(n=!0);var r=e.cacheKey();this.abort((function(e){return e.cacheKey()!==r&&t.evalOption(n,e)}))},e.prototype.requestMatches=function(e,n){return e===n||t.evalOption(n,e)},e.prototype.checkSlow=function(){var t=this.isSlow();this.emittedSlow!==t&&(this.emittedSlow=t,t?up.emit("up:request:late",{log:"Server is slow to respond"}):up.emit("up:request:recover",{log:"Slow requests were loaded"}))},e.prototype.isSlow=function(){var e=new Date,n=t.evalOption(this.badResponseTime),r=t.reject(this.allRequests,"preload");return t.some(r,(function(t){return e-t.queueTime>=n-1}))},e}()},2298:function(){var t="multipart/form-data",e=up.util;up.Request.XHRRenderer=function(){function n(t){this.request=t}return n.prototype.buildAndSend=function(t){this.xhr=new XMLHttpRequest,this.params=e.copy(this.request.params),this.request.timeout&&(this.xhr.timeout=this.request.timeout),this.xhr.open(this.getMethod(),this.request.url);var n,r,o=this.request.metaProps();for(var i in o)this.addHeader(up.protocol.headerize(i),o[i]);for(var s in this.request.headers)this.addHeader(s,this.request.headers[s]);(n=this.request.csrfHeader())&&(r=this.request.csrfToken())&&this.addHeader(n,r),this.addHeader(up.protocol.headerize("version"),up.version);var u=this.getContentType();return u&&this.addHeader("Content-Type",u),e.assign(this.xhr,t),this.xhr.send(this.getPayload()),this.xhr},n.prototype.getMethod=function(){return this.method||(this.method=this.request.method,this.request.wrapMethod&&!this.request.will302RedirectWithGET()&&(this.method=up.protocol.wrapMethod(this.method,this.params))),this.method},n.prototype.getContentType=function(){return this.finalizePayload(),this.contentType},n.prototype.getPayload=function(){return this.finalizePayload(),this.payload},n.prototype.addHeader=function(t,n){(e.isOptions(n)||e.isArray(n))&&(n=JSON.stringify(n)),this.xhr.setRequestHeader(t,n)},n.prototype.finalizePayload=function(){this.payloadFinalized||(this.payloadFinalized=!0,this.payload=this.request.payload,this.contentType=this.request.contentType,!this.payload&&this.request.allowsPayload()&&(this.contentType||(this.contentType=this.params.hasBinaryValues()?t:"application/x-www-form-urlencoded"),this.contentType===t?(this.contentType=null,this.payload=this.params.toFormData()):this.payload=this.params.toQuery().replace(/%20/g,"+")))},n}()},4517:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Response=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.keys=function(){return["method","url","text","status","request","xhr","target","title","acceptLayer","dismissLayer","eventPlans","context","clearCache","headers"]},n.prototype.defaults=function(){return{headers:{}}},Object.defineProperty(n.prototype,"ok",{get:function(){return this.status&&this.status>=200&&this.status<=299},enumerable:!1,configurable:!0}),n.prototype.getHeader=function(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))},Object.defineProperty(n.prototype,"contentType",{get:function(){return this.getHeader("Content-Type")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"json",{get:function(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))},enumerable:!1,configurable:!0}),n}(up.Record)},7241:function(){var t=up.util,e=up.element;up.ResponseDoc=function(){function n(t){this.noscriptWrapper=new up.HTMLWrapper("noscript"),this.scriptWrapper=new up.HTMLWrapper("script"),this.root=this.parseDocument(t)||this.parseFragment(t)||this.parseContent(t)}return n.prototype.parseDocument=function(t){return this.parse(t.document,e.createDocumentFromHTML)},n.prototype.parseContent=function(n){var r=n.content||"",o=n.target||up.fail("must pass a { target } when passing { content }"),i=e.createFromSelector(o);return t.isString(r)?(r=this.wrapHTML(r),i.innerHTML=r):i.appendChild(r),i},n.prototype.parseFragment=function(t){return this.parse(t.fragment)},n.prototype.parse=function(n,r){return void 0===r&&(r=e.createFromHTML),t.isString(n)&&(n=r(n=this.wrapHTML(n))),n},n.prototype.rootSelector=function(){return up.fragment.toTarget(this.root)},n.prototype.wrapHTML=function(t){return t=this.noscriptWrapper.wrap(t),up.fragment.config.runScripts?this.scriptWrapper.wrap(t):this.scriptWrapper.strip(t)},n.prototype.getTitle=function(){var t;return this.titleParsed||(this.title=null===(t=this.root.querySelector("head title"))||void 0===t?void 0:t.textContent,this.titleParsed=!0),this.title},n.prototype.select=function(t){return up.fragment.subtree(this.root,t,{layer:"any"})[0]},n.prototype.finalizeElement=function(t){this.noscriptWrapper.unwrap(t),this.scriptWrapper.unwrap(t)},n}()},2723:function(){var t=up.element,e=up.util;up.RevealMotion=function(){function n(e,n){var r,o,i,s,u,a,c,p;void 0===n&&(n={}),this.element=e,this.options=n;var l=up.viewport.config;this.viewport=t.get(this.options.viewport)||up.viewport.get(this.element),this.obstructionsLayer=up.layer.get(this.viewport),this.snap=null!==(o=null!==(r=this.options.snap)&&void 0!==r?r:this.options.revealSnap)&&void 0!==o?o:l.revealSnap,this.padding=null!==(s=null!==(i=this.options.padding)&&void 0!==i?i:this.options.revealPadding)&&void 0!==s?s:l.revealPadding,this.top=null!==(a=null!==(u=this.options.top)&&void 0!==u?u:this.options.revealTop)&&void 0!==a?a:l.revealTop,this.max=null!==(p=null!==(c=this.options.max)&&void 0!==c?c:this.options.revealMax)&&void 0!==p?p:l.revealMax,this.topObstructions=l.fixedTop,this.bottomObstructions=l.fixedBottom}return n.prototype.start=function(){var t=this.getViewportRect(this.viewport),n=up.Rect.fromElement(this.element);if(this.max){var r=e.evalOption(this.max,this.element);n.height=Math.min(n.height,r)}if(this.addPadding(n),this.substractObstructions(t),t.height<0)return up.error.failed.async("Viewport has no visible area");var o=this.viewport.scrollTop,i=o;return this.top||n.height>t.height?i+=n.top-t.top:n.top<t.top?i-=t.top-n.top:n.bottom>t.bottom&&(i+=n.bottom-t.bottom),e.isNumber(this.snap)&&i<this.snap&&n.top<.5*t.height&&(i=0),i!==o?this.scrollTo(i):Promise.resolve()},n.prototype.scrollTo=function(t){return this.scrollMotion=new up.ScrollMotion(this.viewport,t,this.options),this.scrollMotion.start()},n.prototype.getViewportRect=function(){return up.viewport.isRoot(this.viewport)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.viewport)},n.prototype.addPadding=function(t){t.top-=this.padding,t.height+=2*this.padding},n.prototype.selectObstructions=function(t){return up.fragment.all(t.join(","),{layer:this.obstructionsLayer})},n.prototype.substractObstructions=function(t){for(var e=0,n=this.selectObstructions(this.topObstructions);e<n.length;e++){var r=n[e];(s=(u=up.Rect.fromElement(r)).bottom-t.top)>0&&(t.top+=s,t.height-=s)}for(var o=0,i=this.selectObstructions(this.bottomObstructions);o<i.length;o++){r=i[o];var s,u=up.Rect.fromElement(r);(s=t.bottom-u.top)>0&&(t.height-=s)}},n.prototype.finish=function(){var t;null===(t=this.scrollMotion)||void 0===t||t.finish()},n}()},6956:function(){var t=up.util;up.ScrollMotion=function(){function e(t,e,n){var r,o,i,s;void 0===n&&(n={}),this.scrollable=t,this.targetTop=e,this.behavior=null!==(o=null!==(r=n.behavior)&&void 0!==r?r:n.scrollBehavior)&&void 0!==o?o:"auto",this.speed=.065*(null!==(s=null!==(i=n.speed)&&void 0!==i?i:n.scrollSpeed)&&void 0!==s?s:up.viewport.config.scrollSpeed)}return e.prototype.start=function(){var t=this;return new Promise((function(e,n){t.resolve=e,t.reject=n,"smooth"===t.behavior&&up.motion.isEnabled()?t.startAnimation():t.finish()}))},e.prototype.startAnimation=function(){var t=this;this.startTime=Date.now(),this.startTop=this.scrollable.scrollTop,this.topDiff=this.targetTop-this.startTop,this.duration=Math.sqrt(Math.abs(this.topDiff))/this.speed,requestAnimationFrame((function(){return t.animationFrame()}))},e.prototype.animationFrame=function(){var e=this;if(!this.settled){this.frameTop&&Math.abs(this.frameTop-this.scrollable.scrollTop)>1.5&&this.abort("Animation aborted due to user intervention");var n=Date.now()-this.startTime,r=Math.min(n/this.duration,1);this.frameTop=this.startTop+t.simpleEase(r)*this.topDiff,Math.abs(this.targetTop-this.frameTop)<.3?this.finish():(this.scrollable.scrollTop=this.frameTop,requestAnimationFrame((function(){return e.animationFrame()})))}},e.prototype.abort=function(t){this.settled=!0,this.reject(up.error.aborted(t))},e.prototype.finish=function(){this.settled=!0,this.scrollable.scrollTop=this.targetTop,this.resolve()},e}()},8720:function(){var t=up.element,e=up.util;up.Selector=function(){function n(t,e){void 0===e&&(e=[]),this.selectors=t,this.filters=e,this.unionSelector=this.selectors.join(",")||"match-none"}return n.prototype.matches=function(e){return t.matches(e,this.unionSelector)&&this.passesFilter(e)},n.prototype.closest=function(t){var e;return this.matches(t)?t:(e=t.parentElement)?this.closest(e):void 0},n.prototype.passesFilter=function(t){return e.every(this.filters,(function(e){return e(t)}))},n.prototype.descendants=function(n){var r=this,o=e.flatMap(this.selectors,(function(e){return t.all(n,e)}));return e.filter(o,(function(t){return r.passesFilter(t)}))},n.prototype.subtree=function(t){var e=[];return this.matches(t)&&e.push(t),e.push.apply(e,this.descendants(t)),e},n}()},104:function(){var t=up.util;up.store||(up.store={}),up.store.Memory=function(){function e(){this.clear()}return e.prototype.clear=function(){this.data={}},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,e){this.data[t]=e},e.prototype.remove=function(t){delete this.data[t]},e.prototype.keys=function(){return Object.keys(this.data)},e.prototype.size=function(){return this.keys().length},e.prototype.values=function(){return t.values(this.data)},e}()},5438:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.store.Session=function(t){function n(e){var n=t.call(this)||this;return n.rootKey=e,n.loadFromSessionStorage(),n}return e(n,t),n.prototype.clear=function(){t.prototype.clear.call(this),this.saveToSessionStorage()},n.prototype.set=function(e,n){t.prototype.set.call(this,e,n),this.saveToSessionStorage()},n.prototype.remove=function(e){t.prototype.remove.call(this,e),this.saveToSessionStorage()},n.prototype.loadFromSessionStorage=function(){try{var t=null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(this.rootKey);t&&(this.data=JSON.parse(t))}catch(t){}},n.prototype.saveToSessionStorage=function(){var t=JSON.stringify(this.data);try{return null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.setItem(this.rootKey,t)}catch(t){}},n}(up.store.Memory)},7885:function(){var t=up.util,e=up.element;up.Tether=function(){function n(t){var n,r;null===(r=(n=up.migrate).handleTetherOptions)||void 0===r||r.call(n,t),this.anchor=t.anchor,this.align=t.align,this.position=t.position,this.alignAxis="top"===this.position||"bottom"===this.position?"horizontal":"vertical",this.viewport=up.viewport.get(this.anchor),this.parent=this.viewport===e.root?document.body:this.viewport,this.syncOnScroll=!this.viewport.contains(this.anchor.offsetParent)}return n.prototype.start=function(t){this.element=t,this.element.style.position="absolute",this.setOffset(0,0),this.sync(),this.changeEventSubscription("on")},n.prototype.stop=function(){this.changeEventSubscription("off")},n.prototype.changeEventSubscription=function(t){var e=this.scheduleSync.bind(this);up[t](window,"resize",e),this.syncOnScroll&&up[t](this.viewport,"scroll",e)},n.prototype.scheduleSync=function(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))},n.prototype.isDetached=function(){return e.isDetached(this.parent)||e.isDetached(this.anchor)},n.prototype.sync=function(){var n,r,o=this.element.getBoundingClientRect(),i=e.styleNumber(this.element,"marginTop"),s=e.styleNumber(this.element,"marginRight"),u=e.styleNumber(this.element,"marginBottom"),a=e.styleNumber(this.element,"marginLeft"),c=this.anchor.getBoundingClientRect();switch(this.alignAxis){case"horizontal":switch(this.position){case"top":r=c.top-u-o.height;break;case"bottom":r=c.top+c.height+i}switch(this.align){case"left":n=c.left+a;break;case"center":n=c.left+.5*(c.width-o.width);break;case"right":n=c.left+c.width-o.width-s}break;case"vertical":switch(this.align){case"top":r=c.top+i;break;case"center":r=c.top+.5*(c.height-o.height);break;case"bottom":r=c.top+c.height-o.height-u}switch(this.position){case"left":n=c.left-s-o.width;break;case"right":n=c.left+c.width+a}}t.isDefined(n)||t.isDefined(r)?this.moveTo(n,r):up.fail("Invalid tether constraints: %o",this.describeConstraints())},n.prototype.describeConstraints=function(){return{position:this.position,align:this.align}},n.prototype.moveTo=function(t,e){var n=this.element.getBoundingClientRect();this.setOffset(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)},n.prototype.setOffset=function(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.element,{left:t,top:n})},n}()},4818:function(){var t=up.util;up.URLPattern=function(){function e(e,n){void 0===n&&(n=t.normalizeURL),this.normalizeURL=n,this.groups=[];for(var r=[],o=[],i=0,s=t.splitValues(e);i<s.length;i++){var u=s[i];"-"===u[0]?o.push(u.substring(1)):r.push(u)}this.positiveRegexp=this.buildRegexp(r,!0),this.negativeRegexp=this.buildRegexp(o,!1)}return e.prototype.buildRegexp=function(e,n){var r=this;if(e.length){var o=e.map(this.normalizeURL).map(t.escapeRegExp).join("|");return o=(o=o.replace(/\\\*/g,".*?")).replace(/(:|\\\$)([a-z][\w-]*)/gi,(function(t,e,o){return"\\$"===e?(n&&r.groups.push({name:o,cast:Number}),"(\\d+)"):(n&&r.groups.push({name:o,cast:String}),"([^/?#]+)")})),new RegExp("^"+o+"$")}},e.prototype.test=function(t,e){return void 0===e&&(e=!0),e&&(t=this.normalizeURL(t)),this.positiveRegexp.test(t)&&!this.isExcluded(t)},e.prototype.recognize=function(t,e){void 0===e&&(e=!0),e&&(t=this.normalizeURL(t));var n=this.positiveRegexp.exec(t);if(n&&!this.isExcluded(t)){var r={};return this.groups.forEach((function(t,e){var o=n[e+1];if(o)return r[t.name]=t.cast(o)})),r}},e.prototype.isExcluded=function(t){var e;return null===(e=this.negativeRegexp)||void 0===e?void 0:e.test(t)},e}()},9675:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};up.element=function(){var e=up.util,n=up.browser.isIE11()?"msMatchesSelector":"matches";function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop(),r=t[0]||document;return r.querySelector(n)}function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop(),r=t[0]||document;return r.querySelectorAll(n)}function i(t,e){var n=[];return u(t,e)&&n.push(t),n.push.apply(n,o(t,e)),n}function s(t,e){return t.closest?t.closest(e):u(t,e)?t:a(t,e)}function u(t,e){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e)}function a(t,e){var n=t.parentElement;if(n)return u(n,e)?n:a(n,e)}function c(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=n.pop();return e.isElement(i)?i:e.isString(i)?r.apply(void 0,t(t([],n),[i])):e.isList(i)?(i.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",i),i[0]):i}function p(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.flatMap(t,l)}function l(t){return e.isString(t)?o(t):e.wrapList(t)}function f(t){t.style.display="none"}function h(t){t.style.display=""}function d(t,n){for(var r in n){var o=n[r];e.isGiven(o)?t.setAttribute(r,o):t.removeAttribute(r)}}function y(t,n){for(var r,o,i,s=[],u=function(e){var n;if(e=e.replace(/^[\w-]+/,(function(t){return n=t,""})),o=document.createElement(n||"div"),r||(r=o),e=(e=e.replace(/#([\w-]+)/,(function(t,e){return o.id=e,""}))).replace(/\.([\w-]+)/g,(function(t,e){return o.classList.add(e),""})),s.length&&(e=e.replace(/\[([\w-]+)\]/g,(function(t,e){return o.setAttribute(e,s.shift()),""}))),""!==e)throw up.error.invalidSelector(t);null==i||i.appendChild(o),i=o},a=0,c=t.replace(/\[([\w-]+)(?:[~|^$*]?=(["'])?([^\2\]]*?)\2)?\]/g,(function(t,e,n,r){return s.push(r||""),"["+e+"]"})).split(/[ >]+/);a<c.length;a++)u(c[a]);if(n){var p=void 0;if(p=e.pluckKey(n,"class"))for(var l=0,f=e.wrapList(p);l<f.length;l++){var h=f[l];r.classList.add(h)}(p=e.pluckKey(n,"style"))&&A(r,p),(p=e.pluckKey(n,"text"))&&(r.textContent=p),(p=e.pluckKey(n,"content"))&&(r.innerHTML=p),d(r,n)}return r}var m=["HTML","BODY","HEAD","TITLE"],v=new RegExp("\\b("+m.join("|")+")\\b","i"),g=up.mockable((function(t){return u(t,m.join(","))}));function b(t,e){return"["+t+'="'+(e=e.replace(/"/g,'\\"'))+'"]'}function w(){return document.documentElement}function O(t){t.offsetHeight}function k(t,n,r){e.isMissing(t.getAttribute(n))&&t.setAttribute(n,r)}function E(t,n){return e.nullToUndefined(t.getAttribute(n))}function S(t,e,n){var r=E(t,e);switch(r){case"false":return!1;case"true":case"":case e:return!0;default:if(n)return r}}function _(t,e){var n=L(t,Object.keys(e));return A(t,e),function(){return A(t,n)}}function x(t,e){return T(window.getComputedStyle(t),e)}function C(t,n){var r=x(t,n);if(e.isGiven(r))return parseFloat(r)}function L(t,e){return T(t.style,e)}function T(t,n){return e.isString(n)?t[n]:e.pick(t,n)}function A(t,e){var n=t.style;for(var r in e){var o=e[r];o=P(r,o),n[r]=o}}function P(t,n){var r;return e.isMissing(n)?n="":R.has(t.toLowerCase().replace(/-/,""))&&(r=n,n=e.isNumber(r)||e.isString(r)&&/^\d+$/.test(r)?r.toString()+"px":r),n}var R=e.arrayToSet(["top","right","bottom","left","padding","paddingtop","paddingright","paddingbottom","paddingleft","margin","margintop","marginright","marginbottom","marginleft","borderwidth","bordertopwidth","borderrightwidth","borderbottomwidth","borderleftwidth","width","height","maxwidth","maxheight","minwidth","minheight"]);function F(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}return{all:o,subtree:i,isInSubtree:function(t,e){var n=c(e);return t.contains(n)},closest:s,closestAttr:function(t,e){var n;return null===(n=s(t,"["+e+"]"))||void 0===n?void 0:n.getAttribute(e)},matches:u,ancestor:a,around:function(t,e){return p(s(t,e),i(t,e))},get:c,list:p,remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},toggle:function(t,e){null==e&&(e=!F(t)),(e?h:f)(t)},toggleClass:function(t,e,n){var r=t.classList;return null==n&&(n=!r.contains(e)),n?r.add(e):r.remove(e)},hide:f,show:h,metaContent:function(t){var e;return null===(e=r("meta"+b("name",t)))||void 0===e?void 0:e.getAttribute("content")},replace:function(t,e){t.parentElement.replaceChild(e,t)},insertBefore:function(t,e){t.insertAdjacentElement("beforebegin",e)},createFromSelector:y,setAttrs:d,setTemporaryAttrs:function(t,e){for(var n={},r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];n[i]=t.getAttribute(i)}return d(t,e),function(){return d(t,n)}},affix:function(t){for(var n,r,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var s=e.extractOptions(o);2===o.length?(n=o[0],r=o[1]):(n="beforeend",r=o[0]);var u=y(r,s);return t.insertAdjacentElement(n,u),u},toSelector:function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=up.fragment).toTarget.apply(t,e)},idSelector:function(t){return t.match(/^[a-z0-9\-_]+$/i)?"#"+t:b("id",t)},classSelector:function(t){return"."+t.replace(/:/g,"\\:")},isSingleton:g,isSingletonSelector:function(t){return v.test(t)},attributeSelector:b,trueAttributeSelector:function(t){return"["+t+"]:not(["+t+"=false])"},tagName:function(t){return t.tagName.toLowerCase()},createDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},createFromHTML:function(t){var e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes[0]},get root(){return w()},paint:O,concludeCSSTransition:function(t){var e=_(t,{transition:"none"});return O(t),e},hasCSSTransition:function(t){var n,r=(n=e.isOptions(t)?t:x(t)).transitionProperty,o=n.transitionDuration;return!("none"===r||"all"===r&&0===o)},fixedToAbsolute:function(t){var e=t.getBoundingClientRect();t.style.position="absolute";var n=t.offsetParent.getBoundingClientRect();A(t,{left:e.left-C(t,"margin-left")-n.left,top:e.top-C(t,"margin-top")-n.top,right:"",bottom:""})},setMissingAttrs:function(t,e){for(var n in e)k(t,n,e[n])},setMissingAttr:k,unwrap:function(t){var n=t.parentNode,r=e.toArray(t.childNodes);e.each(r,(function(e){return n.insertBefore(e,t)})),n.removeChild(t)},wrapChildren:function(t,e){var n;void 0===e&&(e="up-wrapper");for(var r=y(e);n=t.firstChild;)r.appendChild(n);return t.appendChild(r),r},attr:E,booleanAttr:S,numberAttr:function(t,e){var n=t.getAttribute(e);if(n&&(n=n.replace(/_/g,"")).match(/^[\d.]+$/))return parseFloat(n)},jsonAttr:function(t,e){var n,r,o=null===(r=null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,e))||void 0===r?void 0:r.trim();if(o)return JSON.parse(o)},callbackAttr:function(n,r,o){void 0===o&&(o=[]);var i=n.getAttribute(r);if(i){var s=new(Function.bind.apply(Function,t(t([void 0,"event"],o),[i])));return function(r){var i=e.values(e.pick(r,o));return s.call.apply(s,t([n,r],i))}}},booleanOrStringAttr:function(t,e){return S(t,e,!0)},setTemporaryStyle:_,style:x,styleNumber:C,inlineStyle:L,setStyle:A,isVisible:F,upAttrs:function(t){for(var e=/^up-/,n={},r=0,o=t.attributes;r<o.length;r++){var i=o[r],s=i.name;s.match(e)&&(n[s]=i.value)}return n},toggleAttr:function(t,e,n,r){return null==r&&(r=!t.hasAttribute(e)),r?t.setAttribute(e,n):t.removeAttribute(e)},isDetached:function(t){return t!==document&&!w().contains(t)}}}()},3924:function(){up.error=function(){var t=up.util;function e(e,n){void 0===n&&(n={}),t.isArray(e)&&(e=t.sprintf.apply(t,e));var r=new Error(e);return t.assign(r,n),r}function n(t,n){void 0===n&&(n=e);var r=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=n.apply(void 0,e);return o.name=t,o};return r.is=function(e){return e.name===t},r.async=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.reject(r.apply(void 0,t))},r}var r=n("up.Failed"),o=n("AbortError",(function(t){return e(t||"Aborted")})),i=n("up.NotImplemented"),s=n("up.NotApplicable",(function(t,n){return e("Cannot apply change: "+t+" ("+n+")")}));return{failed:r,aborted:o,invalidSelector:n("up.InvalidSelector",(function(t){return e("Cannot parse selector: "+t)})),notApplicable:s,notImplemented:i,emitGlobal:function(t){var e=t.message;up.emit(window,"error",{message:e,error:t,log:!1})}}}()},8670:function(){up.event=function(){var t=up.util,e=up.element;function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(t).bind()}function r(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function o(t){return up.EventEmitter.fromEmitArgs(t)}var i=["metaKey","shiftKey","ctrlKey","altKey"];function s(e){return(t.isUndefined(e.button)||0===e.button)&&!t.some(i,(function(t){return e[t]}))}function u(e,n,r){void 0===r&&(r=[]);var o=up.event.build(n,t.pick(e,r));return o.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach((function(t){var n=o[t];return o[t]=function(){return e[t](),n.call(o)}})),e.defaultPrevented&&o.preventDefault(),o}return n("up:click","a[up-emit]",(function(n,r){if(s(n)){var o=e.attr(r,"up-emit"),i=e.jsonAttr(r,"up-emit-props"),a=u(n,o);t.assign(a,i),up.emit(r,a)}})),n("up:framework:reset",(function(){for(var t=0,n=[window,document,e.root,document.body];t<n.length;t++)for(var r=n[t],o=0,i=up.EventListener.allNonDefault(r);o<i.length;o++)i[o].unbind()})),{on:n,$on:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(t,{jQuery:!0}).bind()},off:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(t).unbind()},build:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.extractOptions(e),o=e[0]||r.type||up.fail("Expected event type to be passed as string argument or { type } property"),i=document.createEvent("Event");if(i.initEvent(o,!0,!0),t.assign(i,t.omit(r,["type","target"])),up.browser.isIE11()){var s=i.preventDefault;i.preventDefault=function(){return s.call(i),t.getter(i,"defaultPrevented",(function(){return!0}))}}return i},emit:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t).emit()},assertEmitted:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t).assertEmitted()},onEscape:function(t){return n("keydown",(function(e){if(function(t){var e=t.key;return"Escape"===e||"Esc"===e}(e))return t(e)}))},halt:function(t){t.stopImmediatePropagation(),t.preventDefault()},onReady:function(t){"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)},isUnmodified:s,fork:u,keyModifiers:i}}(),up.on=up.event.on,up.$on=up.event.$on,up.off=up.event.off,up.$off=up.event.off,up.emit=up.event.emit},454:function(){up.feedback=function(){var t=up.util,e=up.element,n=new up.Config((function(){return{currentClasses:["up-current"],navSelectors:["[up-nav]","nav"]}})),r="up-active",o="a, [up-href]";function i(){return n.navSelectors.join(",")}function s(e){if(e)return t.normalizeURL(e,{stripTrailingSlash:!0})}function u(t){return t.upFeedbackURLs||(t.upFeedbackURLs=new up.LinkFeedbackURLs(t))}function a(n,r){var s=up.fragment.subtree(n,i(),r);c(t.flatMap(s,(function(t){return e.subtree(t,o)})),r)}function c(t,r){if(void 0===r&&(r={}),t.length){var o=(h=r.layer||up.layer.get(t[0])).feedbackLocation||h.location;if(o)for(var i=0,s=t;i<s.length;i++){for(var a=s[i],c=u(a).isCurrent(o),p=0,l=n.currentClasses;p<l.length;p++){var f=l[p];e.toggleClass(a,f,c)}e.toggleAttr(a,"aria-current","page",c)}}var h}function p(t){return e.ancestor(t,o)||t}function l(t){p(t).classList.add(r)}function f(t){p(t).classList.remove(r)}function h(e,n){l(e);var r=n();return t.always(r,(function(){return f(e)})),r}function d(t){var e=t.feedbackLocation,n=s(t.location);e&&e===n||(t.feedbackLocation=n,a(t.element,{layer:t}))}return up.on("up:location:changed",(function(t){var e;(e=up.layer.front).showsLiveHistory()&&d(e)})),up.on("up:fragment:inserted",(function(t,e){var n,r;n=e,r={layer:up.layer.get(n)},up.fragment.closest(n,i(),r)?c(up.fragment.subtree(n,o,r),r):a(n,r)})),up.on("up:layer:location:changed",(function(t){d(t.layer)})),up.on("up:framework:reset",(function(){n.reset()})),{config:n,start:l,stop:f,around:h,aroundForOptions:function(e,n){var r,o=e.feedback;return o&&(r=t.isBoolean(o)?e.origin:o),r?h(r=up.fragment.get(r),n):n()},normalizeURL:s}}()},2851:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};up.form=function(){var e,n=up.util,r=up.element,o=["[up-submit]","[up-target]","[up-layer]","[up-transition]"],i=new up.Config((function(){return{validateTargets:["[up-fieldset]:has(:origin)","fieldset:has(:origin)","label:has(:origin)","form:has(:origin)"],fieldSelectors:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitSelectors:up.link.combineFollowableSelectors(["form"],o),noSubmitSelectors:["[up-submit=false]","[target]"],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],observeDelay:0}}));function s(){return i.submitSelectors.join(",")}function u(t){return void 0===t&&(t=""),i.fieldSelectors.map((function(e){return e+t})).join(",")}function a(t){t=r.get(t);var e=r.subtree(t,u());if(r.matches(t,"form[id]")){var o=u(r.attributeSelector("form",t.getAttribute("id"))),i=r.all(o);e.push.apply(e,i),e=n.uniq(e)}return e}function c(){return i.submitButtonSelectors.join(",")}var p=up.mockable((function(t,e){return up.render(l(t,e))}));function l(t,e){e=n.options(e),t=up.fragment.get(t),t=r.closest(t,"form");var o=new up.OptionsParser(e,t),i=up.Params.fromForm(t),s=function(t){var e=c(),n=document.activeElement;return n&&r.matches(n,e)&&t.contains(n)?n:r.get(t,e)}(t);return s&&(i.addField(s),e.method||(e.method=s.getAttribute("formmethod")),e.url||(e.url=s.getAttribute("formaction"))),i.addAll(e.params),e.params=i,o.string("url",{attr:"action",default:up.fragment.source(t)}),o.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:n.normalizeMethod}),"GET"===e.method&&(e.url=up.Params.stripURL(e.url)),o.string("failTarget",{default:up.fragment.toTarget(t)}),e.guardEvent||(e.guardEvent=up.event.build("up:form:submit",{log:"Submitting form"})),n.assign(e,up.link.followOptions(t,e)),e}up.on("up:click",c,(function(t,e){var n=r.closest(e,"form");n&&O(n)&&e.focus()}));var f=function(t){for(var e,o,s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];t=r.list(t);var c=n.flatMap(t,a),p=n.extractCallback(s)||h(t[0])||up.fail("up.observe: No change callback given"),l=n.extractOptions(s);l.delay=null!==(o=null!==(e=l.delay)&&void 0!==e?e:r.numberAttr(t[0],"up-delay"))&&void 0!==o?o:i.observeDelay;var f=new up.FieldObserver(c,l,p);return f.start(),function(){return f.stop()}};function h(t){var e=t.getAttribute("up-observe");if(e)return new Function("value","name",e)}function d(t,e){return f(t,e,(function(){return p(t)}))}function y(e,o){return e=up.fragment.get(e),(o=n.options(o)).navigate=!1,o.origin=e,o.history=!1,o.target=function(e,o){var s,u=b(e);return n.isElementish(o.target)?up.fragment.toTarget(o.target):(s=o.target||e.getAttribute("up-validate")||u.getAttribute("up-validate"))?s:r.matches(e,"form")?up.fragment.toTarget(e):function(e,r){var o=up.layer.get(e);return n.findResult(i.validateTargets,(function(e){if(up.fragment.get(e,t(t({},r),{layer:o})))return e}))}(e,o)||up.fail("Could not find validation target for %o (tried defaults %o)",e,i.validateTargets)}(e,o),o.focus="keep",o.fail=!1,o.headers||(o.headers={}),o.headers[up.protocol.headerize("validate")]=e.getAttribute("name")||":unknown",o.guardEvent=up.event.build("up:form:validate",{field:e,log:"Validating form"}),p(e,o)}function m(t){var e,o;if(r.matches(t,"input[type=checkbox]"))t.checked?(e=t.value,o=":checked"):o=":unchecked";else if(r.matches(t,"input[type=radio]")){var i=b(t),s=t.getAttribute("name"),u=i.querySelector("input[type=radio]"+r.attributeSelector("name",s)+":checked");u?(o=":checked",e=u.value):o=":unchecked"}else e=t.value;var a=[];return n.isPresent(e)?(a.push(e),a.push(":present")):a.push(":blank"),n.isPresent(o)&&a.push(o),a}function v(t,e){void 0===e&&(e={});var n=e.target||e.target||t.getAttribute("up-switch"),o=b(t);n||up.fail("No switch target given for %o",t);for(var i=m(t),s=0,u=r.all(o,n);s<u.length;s++){var a=u[s];g(a,i)}}var g=up.mockable((function(t,e){var o;e||(e=m(function(t){var e=b(t),o=r.all(e,"[up-switch]");return n.find(o,(function(e){var n=e.getAttribute("up-switch");return r.matches(t,n)}))||up.fail("Could not find [up-switch] field for %o",t)}(t)));var i=t.getAttribute("up-hide-for");if(i)i=n.splitValues(i),o=0===n.intersect(e,i).length;else{var s=t.getAttribute("up-show-for");s=s?n.splitValues(s):[":present",":checked"],o=n.intersect(e,s).length>0}return r.toggle(t,o),t.classList.add("up-switched")}));function b(t){return t.form||r.closest(t,"form, "+up.layer.anySelector())}function w(t){return r.matches(t,u())}function O(t){return t=up.fragment.get(t),r.matches(t,s())&&!k(t)}function k(t){return r.matches(t,i.noSubmitSelectors.join(","))}return up.on("submit",s,(function(t,n){t.defaultPrevented||k(n)||(null==e||e(),up.event.halt(t),up.log.muteUncriticalRejection(p(n)))})),up.on("change","[up-validate]",(function(t){var r=a(t.target)[0];e=n.abortableMicrotask((function(){return up.log.muteUncriticalRejection(y(r))}))})),up.compiler("[up-switch]",(function(t){v(t)})),up.on("change","[up-switch]",(function(t,e){v(e)})),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",(function(t){g(t)})),up.compiler("[up-observe]",(function(t){return f(t)})),up.compiler("[up-autosubmit]",(function(t){return d(t)})),up.on("up:framework:reset",(function(){i.reset()})),{config:i,submit:p,submitOptions:l,isSubmittable:O,observe:f,validate:y,autosubmit:d,fieldSelector:u,fields:a,focusedField:function(){return n.presence(document.activeElement,w)},switchTarget:g}}(),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2667:function(t,e,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};n(7433);var o=up.util,i=up.element;up.fragment=function(){var t=new up.Config((function(){return{badTargetClasses:[/^up-/],navigateOptions:{solo:!0,feedback:!0,cache:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},matchAroundOrigin:!0,runScripts:!1,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","target-if-lost"],autoScroll:["hash","layer-if-main"]}}));function e(t,e){return void 0===e&&(e={}),t=y(t,e),i.closestAttr(t,"up-source")}function n(t){return i.closestAttr(t,"up-time")||"0"}o.delegate(t,"mainTargets",(function(){return up.layer.config.any}));var s=up.mockable((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.asyncify((function(){var e=O(t);e=up.RenderOptions.preprocess(e),up.browser.assertConfirmed(e);var n=o.pluckKey(e,"guardEvent");return n&&(n.renderOptions=e,up.event.assertEmitted(n,{target:e.origin})),up.RenderOptions.assertContentGiven(e),(e.url?u:a)(e)}))}));function u(t){return up.feedback.aroundForOptions(t,(function(){return new up.Change.FromURL(t).execute()}))}function a(t){return up.network.mimicLocalRequest(t),new up.Change.FromContent(t).execute()}var c=up.mockable((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=O(t);return s(r(r({},n),{navigate:!0}))}));function p(t,e){void 0===e&&(e={}),t=y(t);var n=(e.keepPlans||[]).map((function(t){return f(t),t.oldElement}));return up.syntax.compile(t,{skip:n,layer:e.layer}),l(t,e),t}function l(t,e){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t],origin:e.origin})}function f(t){return h(t,"up:fragment:kept",{log:["Kept fragment %o",t.oldElement]})}function h(t,e,n){var r=t.oldElement,o=up.event.build(e,{newFragment:t.newElement,newData:t.newData});return up.emit(r,o,n)}var d=o.negate((function(t){return!!i.closest(t,".up-destroying")}));function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.extractOptions(t),r=t.pop(),s=t[0];return o.isElementish(r)?i.get(r):s?m(s,r,n):new up.FragmentFinder({selector:r,origin:n.origin,layer:n.layer}).find()}function m(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return g.apply(void 0,t)[0]}var v=/:has\(([^)]+)\)$/;function g(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.extractOptions(t),r=t.pop(),i=t[0];return(r=_(r,i,n)).descendants(i||document)}function b(t,e,n){return void 0===n&&(n={}),(e=_(e,t,n)).subtree(t)}function w(t,e){return b(t,e).length>0}function O(t){var e=o.parseArgIntoOptions(t,"target");return o.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}function k(t){if(o.isString(t))return t;var e;if(t=i.get(t),i.isSingleton(t))return i.tagName(t);if(e=t.getAttribute("up-id"))return i.attributeSelector("up-id",e);if(e=t.getAttribute("id"))return i.idSelector(e);if(e=t.getAttribute("name"))return i.tagName(t)+i.attributeSelector("name",e);if(e=o.presence(o.filter(t.classList,E))){for(var n="",r=0,s=e;r<s.length;r++){var u=s[r];n+=i.classSelector(u)}return n}return i.tagName(t)}function E(e){return!o.some(t.badTargetClasses,(function(t){return o.isRegExp(t)?t.test(e):t===e}))}function S(t,e){void 0===e&&(e={});var n=e.origin;return t.replace(/&|:origin\b/,(function(e){if(n)return k(n);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',e,t)}))}function _(t,e,n){void 0===n&&(n={});var s=[];n.destroying||s.push(d),n.layer||(n.layer=e);var u=up.layer.getAll(n);"any"===n.layer||e&&i.isDetached(e)||s.push((function(t){return o.some(u,(function(e){return e.contains(t)}))}));var a=up.fragment.expandTargets(t,r(r({},n),{layer:u[0]}));return a=a.map((function(t){return(t=t.replace(v,(function(t,e){return s.push((function(t){return t.querySelector(e)})),""})))||"*"})),new up.Selector(a,s)}return up.on("up:app:boot",(function(){var t=document.body;if(t.setAttribute("up-source",up.history.location),p(t),!up.browser.canPushState())return up.warn("Cannot push history changes. Next fragment update will load in a new page.")})),up.on("up:framework:reset",(function(){t.reset()})),{config:t,reload:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=O(t);o.target||(o.target=":main");var i=y(o.target,o);return o.url||(o.url=e(i)),o.headers||(o.headers={}),o.headers[up.protocol.headerize("reloadFromTime")]=n(i),s(o)},destroy:function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=O(n);return(o.element=y(o.target,o))&&new up.Change.DestroyFragment(o).execute(),null===(e=(t=up.migrate).formerlyAsync)||void 0===e?void 0:e.call(t,"up.destroy()")},render:s,navigate:c,get:y,getDumb:m,all:g,subtree:b,contains:w,closest:function(t,e,n){return(e=_(e,t=i.get(t),n)).closest(t)},source:e,hello:p,visit:function(t,e){return c(r(r({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("aria-hidden","true")},emitInserted:l,emitDestroyed:function(t,e){var n,r=null!==(n=e.log)&&void 0!==n?n:["Destroyed fragment %o",t],o=e.parent||document;return up.emit(o,"up:fragment:destroyed",{fragment:t,parent:o,log:r})},emitKeep:function(t){return h(t,"up:fragment:keep",{log:["Keeping fragment %o",t.oldElement],callback:i.callbackAttr(t.oldElement,"up-on-keep",["newFragment","newData"])})},emitKept:f,successKey:function(t){return o.unprefixCamelCase(t,"fail")},failKey:function(t){if(!t.match(/^fail[A-Z]/))return o.prefixCamelCase(t,"fail")},expandTargets:function(t,e){void 0===e&&(e={});var n=e.layer;"new"===n||n instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",n),t=o.copy(o.wrapList(t));for(var r=[];t.length;){var i=t.shift();if(":main"===i||!0===i){var s="new"===n?e.mode:n.mode;t.unshift.apply(t,up.layer.mainTargets(s))}else":layer"===i?"new"===n||n.opening||t.unshift(n.getFirstSwappableElement()):o.isElementish(i)?r.push(k(i)):o.isString(i)&&r.push(S(i,e))}return o.uniq(r)},toTarget:k,matches:function(t,e,n){return void 0===n&&(n={}),(e=_(e,t=i.get(t),n)).matches(t)},hasAutoHistory:function(e){return!!w(e,t.autoHistoryTargets)||(up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1)}}}(),up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.hello=up.fragment.hello,up.visit=up.fragment.visit,o.delegate(up,"context",(function(){return up.layer.current}))},9634:function(){var t;up.framework=(t=!0,{boot:function(){var e=up.browser.supportIssue();e?console.error("Unpoly cannot load: %s",e):(up.emit("up:framework:boot",{log:!1}),t=!1,up.event.onReady((function(){up.emit("up:app:boot",{log:"Booting user application"})})))},startExtension:function(){t=!0},stopExtension:function(){t=!1},reset:function(){up.emit("up:framework:reset",{log:!1})},get booting(){return t}})},8944:function(){var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},e=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};up.history=function(){var n,r,o=up.util,i=up.element,s=new up.Config((function(){return{enabled:!0,restoreTargets:["body"]}}));function u(t,e){return void 0===e&&(e={}),e.hash=!0,o.normalizeURL(t,e)}function a(t){return u(location.href,t)}function c(){var t=a();r!==t&&(n=r,r=t)}function p(t){var e={stripTrailingSlash:!0};return u(t,e)===a(e)}function l(t,e){void 0===e&&(e={}),f("replaceState",t)&&!1!==e.event&&d("up:location:changed",{url:t,reason:"replace",log:"Replaced state for "+o.urlWithoutHost(t)})}function f(t,e){if(s.enabled){return window.history[t]({up:{}},"",e),c(),!0}}function h(r){c(),up.viewport.saveScroll({location:n}),function(n){t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return(null==n?void 0:n.up)?(t=a(),[4,up.render({url:t,history:!0,location:t,peel:!0,layer:"root",target:s.restoreTargets,cache:!0,keep:!1,scroll:"restore",saveScroll:!1})]):[3,2];case 1:return e.sent(),d("up:location:changed",{url:t=a(),reason:"pop",log:"Restored location "+t}),[3,3];case 2:up.puts("pop","Ignoring a state not pushed by Unpoly (%o)",n),e.label=3;case 3:return[2]}}))}))}(r.state)}function d(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.find(up.layer.stack.reversed(),"history");return n.emit.apply(n,t)}function y(){window.history.scrollRestoration="manual",window.addEventListener("popstate",h),"GET"===up.protocol.initialRequestMethod()&&l(a(),{event:!1})}return c(),up.on("up:app:boot",(function(){"jasmine"in window?y():setTimeout(y,100)})),up.macro("a[up-back], [up-href][up-back]",(function(t){n&&(i.setMissingAttrs(t,{"up-href":n,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))})),up.on("up:framework:reset",(function(){s.reset(),n=void 0,r=void 0,c()})),{config:s,push:function(t){!p(t=u(t))&&f("pushState",t)&&up.emit("up:location:changed",{url:t,reason:"push",log:"Advanced to location "+o.urlWithoutHost(t)})},replace:l,get location(){return a()},get previousLocation(){return n},isLocation:p,normalizeURL:u}}()},9443:function(t,e,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},s=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};n(7921);var u=up.util,a=up.element;up.layer=function(){var t=[up.Layer.Root,up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],e=new up.Config((function(){for(var e={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],history:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"×",dismissAriaLabel:"Dismiss dialog",dismissable:!0,history:"auto"},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation:function(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation:function(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key"}},n=0,r=t;n<r.length;n++){var o=r[n];e[o.mode].Class=o}return e})),n=null,c=[];function p(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function l(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t=u.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),[4,up.render(t)];case 1:return[2,e.sent().layer]}}))}))}up.on("up:fragment:destroyed",(function(){n.sync()})),up.on("up:framework:boot",(function(){n=new up.LayerStack})),up.on("up:framework:reset",(function(){e.reset(),n.reset(),c=u.filter(c,"isDefault")}));var f={config:e,mainTargets:function(t){return u.flatMap(p(t),"mainTargets")},open:l,build:function(t,r){var o=t.mode,i=e[o].Class,a=u.reverse(p(o)),c=up.migrate.handleLayerConfig;return c&&a.forEach(c),t=u.mergeDefined.apply(u,s(s([],a),[{mode:o,stack:n},t])),r&&(t=r(t)),new i(t)},ask:function(t){return new Promise((function(e,n){l(t=r(r({},t),{onAccepted:function(t){return e(t.value)},onDismissed:function(t){return n(t.value)}}))}))},normalizeOptions:function(t){var o,i;if(null===(i=(o=up.migrate).handleLayerOptions)||void 0===i||i.call(o,t),u.isGiven(t.layer)){var s=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/);if(s){t.layer="new";var a=s[1],c=s[3];t.mode||(t.mode=c||e.mode),"swap"===a?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===a&&(t.baseLayer="root")}}else t.mode?t.layer="new":u.isElementish(t.target)?t.layer=n.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current";t.context||(t.context={}),t.baseLayer=n.get("current",r(r({},t),{normalizeLayerOptions:!1}))},openCallbackAttr:function(t,e){return a.callbackAttr(t,e,["layer"])},closeCallbackAttr:function(t,e){return a.callbackAttr(t,e,["layer","value"])},anySelector:function(){return u.map(t,(function(t){return t.selector()})).join(",")},optionToString:function(t){return u.isString(t)?'layer "'+t+'"':t.toString()},get stack(){return n}};return u.delegate(f,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],(function(){return n})),u.delegate(f,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],(function(){return n.current})),f}()},3849:function(t,e,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};n(7298),up.link=function(){var t=up.util,e=up.element,n=new up.LinkPreloader,i=null,s=["a[up-content]","a[up-fragment]","a[up-document]"],u=["a[href]","[up-href]"],a=["[up-follow]","[up-target]","[up-layer]","[up-transition]","[up-preload]","[up-instant]"];function c(e,n){return t.flatMap(e,(function(t){return n.map((function(e){return t+e}))}))}var p=new up.Config((function(){return{followSelectors:c(u,a).concat(s),noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="#"]:not([up-content]):not([up-fragment]):not([up-document])','a[href^="javascript:"]'],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:c(u,["[up-preload]"]),noPreloadSelectors:["[up-preload=false]"],clickableSelectors:s.concat(["[up-emit]","[up-accept]","[up-dismiss]","[up-clickable]"]),preloadDelay:90,preloadEnabled:"auto"}}));function l(){return p.followSelectors.join(",")}function f(n){return e.matches(n,p.noFollowSelectors.join(","))||t.isCrossOrigin(n)}var h=up.mockable((function(t,e){return up.render(y(t,e))}));function d(e,n){n=t.options(n);var r=new up.OptionsParser(n,e);return n.url=function(t,e){void 0===e&&(e={});var n=e.url||t.getAttribute("href")||t.getAttribute("up-href");if("#"!==n)return n}(e,n),n.method=m(e,n),r.json("headers"),r.json("params"),r.booleanOrString("cache"),r.booleanOrString("clearCache"),r.boolean("solo"),r.string("contentType",{attr:["enctype","up-content-type"]}),n}function y(t,n){var r,o;n=d(t=up.fragment.get(t),n);var i=new up.OptionsParser(n,t,{fail:!0});return i.boolean("feedback"),i.boolean("fail"),null==i.options.origin&&(i.options.origin=t),i.boolean("navigate",{default:!0}),i.string("confirm"),i.string("target"),i.booleanOrString("fallback"),i.parse((function(t,n){return e.callbackAttr(t,n,["request","response","renderOptions"])}),"onLoaded"),i.string("content"),i.string("fragment"),i.string("document"),i.boolean("peel"),i.string("layer"),i.string("baseLayer"),i.json("context"),i.string("mode"),i.string("align"),i.string("position"),i.string("class"),i.string("size"),i.booleanOrString("dismissable"),i.parse(up.layer.openCallbackAttr,"onOpened"),i.parse(up.layer.closeCallbackAttr,"onAccepted"),i.parse(up.layer.closeCallbackAttr,"onDismissed"),i.string("acceptEvent"),i.string("dismissEvent"),i.string("acceptLocation"),i.string("dismissLocation"),i.booleanOrString("history"),i.booleanOrString("focus"),i.boolean("saveScroll"),i.booleanOrString("scroll"),i.boolean("revealTop"),i.number("revealMax"),i.number("revealPadding"),i.number("revealSnap"),i.string("scrollBehavior"),i.booleanOrString("history"),i.booleanOrString("location"),i.booleanOrString("title"),i.booleanOrString("animation"),i.booleanOrString("transition"),i.string("easing"),i.number("duration"),null===(o=(r=up.migrate).parseFollowOptions)||void 0===o||o.call(r,i),n.guardEvent||(n.guardEvent=up.event.build("up:link:follow",{log:"Following link"})),n}function m(e,n){return void 0===n&&(n={}),t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function v(t){return t=up.fragment.get(t),e.matches(t,l())&&!f(t)}function g(t){v(t)||t.setAttribute("up-follow","")}function b(t){e.matches(t,"a[href], button")||(e.setMissingAttrs(t,{tabindex:"0",role:"link"}),t.addEventListener("keydown",(function(t){if("Enter"===t.key||"Space"===t.key)return k(t)})))}function w(t,n){if(t.defaultPrevented||f(n))return!1;var r="a, [up-href], "+up.form.fieldSelector(),o=e.closest(t.target,r);return!o||o===n}function O(t){var n,r=e.closest(t,p.instantSelectors.join(","));return r&&(n=r,!(e.matches(n,p.noInstantSelectors.join(","))||f(n)))}function k(t){var e=o(["clientX","clientY","button"],up.event.keyModifiers),n=up.event.fork(t,"up:click",e);up.emit(t.target,n,{log:!1})}return up.macro((function(){return p.clickableSelectors.join(",")}),b),up.on("up:click",l,(function(t,e){w(t,e)&&(up.event.halt(t),up.log.muteUncriticalRejection(h(e)))})),up.macro("[up-expand]",(function(t){var n=t.getAttribute("up-expand")||"a, [up-href]",r=e.get(t,n);if(r){var o=e.upAttrs(r);o["up-href"]||(o["up-href"]=r.getAttribute("href")),e.setMissingAttrs(t,o),g(t)}})),up.compiler((function(){return p.preloadSelectors.join(",")}),(function(t){(function(t){return!up.browser.canPushState()||e.matches(t,p.noPreloadSelectors.join(","))||f(t)||!function(t){var e=d(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)})(t)||n.observeLink(t)})),up.on("up:framework:reset",(function(){i=null,p.reset(),n.reset()})),{follow:h,followOptions:y,preload:function(t,e){if(t=up.fragment.get(t),!("auto"===(n=p.preloadEnabled)?!up.network.shouldReduceRequests():n))return up.error.failed.async("Link preloading is disabled");var n,o=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return h(t,r(r({},e),{guardEvent:o,preload:!0}))},makeFollowable:g,makeClickable:b,isSafe:function(t){var e=m(t);return up.network.isSafeMethod(e)},isFollowable:v,shouldFollowEvent:w,followMethod:m,convertClicks:function(t){t.on("click",(function(e,n){if(up.event.isUnmodified(e))return O(n)&&i?up.event.halt(e):t.wasHitByMouseEvent(e)&&(!i||i===e.target)&&k(e),i=null})),t.on("mousedown",(function(t,e){up.event.isUnmodified(t)&&(i=t.target,O(e)&&k(t))}))},config:p,combineFollowableSelectors:c}}(),up.follow=up.link.follow},4453:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};up.log=function(){var e=new up.store.Session("up.log"),n=new up.Config((function(){return{enabled:e.get("enabled"),banner:!0}})),r=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.apply(void 0,t(["error"],e))};function o(e,n,r){for(var o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];r&&(up.browser.canFormatLog()?(o.unshift(""),o.unshift("color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block"),r="%c"+n+"%c "+r):r="["+n+"] "+r,console[e].apply(console,t([r],o)))}function i(t){e.set("enabled",t),n.enabled=t}return up.on("up:app:boot",(function(){if(n.banner){var t=" __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",e="";up.migrate.loaded||(e+="Load unpoly-migrate.js to enable deprecated APIs.\n\n"),n.enabled?e+="Call `up.log.disable()` to disable logging for this session.":e+="Call `up.log.enable()` to enable logging for this session.";var r="color: #777777";up.browser.canFormatLog()?console.log("%c"+t+"%c"+e,"font-family: monospace;"+r,r):console.log(t+e)}})),up.on("up:framework:reset",(function(){n.reset()})),{puts:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];n.enabled&&o.apply(void 0,t(["log"],e))},error:r,warn:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.apply(void 0,t(["warn"],e))},config:n,enable:function(){i(!0)},disable:function(){i(!1)},fail:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];throw r.apply(void 0,t(["error"],e)),up.error.failed(e)},muteUncriticalRejection:function(t){return t.catch((function(t){if("object"!=typeof t||!("AbortError"===t.name||t instanceof up.RenderResult||t instanceof up.Response))throw t}))},isEnabled:function(){return n.enabled}}}(),up.puts=up.log.puts,up.warn=up.log.warn,up.fail=up.log.fail},6535:function(){up.migrate={config:{}}},8374:function(){up.mockable=function(t){var e,n=function(){return(e||t).apply(null,arguments)};return n.mock=function(){return e=jasmine.createSpy("mockable",t)},document.addEventListener("up:framework:reset",(function(){return e=null})),n}},4034:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};up.motion=function(){var r=up.util,o=up.element,i={},s={},u=new up.MotionController("motion"),a=new up.Config((function(){return{duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches}}));function c(t){return r.pickBy(t,(function(t){return t.isDefault}))}function p(){return a.enabled}function l(t,e,n){return h(n),p()&&!w(e)&&n.duration>0&&!o.isSingleton(t)}function f(e,n,r){return r=t(t({},r),{finishEvent:u.finishEvent}),new up.CSSTransition(e,n,r).start()}function h(t){t.easing||(t.easing=a.easing),t.duration||(t.duration=a.duration)}function d(t){if(!w(t)){if(r.isFunction(t))return t;if(r.isArray(t))return y.apply(void 0,t);if(!r.isString(t))return up.fail("Unknown transition %o",t);var e=void 0;return t.indexOf("/")>=0?y.apply(void 0,t.split("/")):(e=s[t])?d(e):void 0}}function y(t,e){if(!w(t)&&!w(e)){var n=m(t)||r.asyncNoop,o=m(e)||r.asyncNoop;return function(t,e,r){return Promise.all([n(t,r),o(e,r)])}}}function m(t){return w(t)?void 0:r.isFunction(t)?t:r.isString(t)?i[e=t]||up.fail("Unknown animation %o",e):r.isOptions(t)?function(e,n){return f(e,t,n)}:up.fail("Unknown animation %o",t);var e}var v=up.mockable((function(t,e){o.replace(t,e)}));function g(t,e){var n=d(e);n.isDefault=up.framework.booting,s[t]=n}function b(t,e){var n=m(e);n.isDefault=up.framework.booting,i[t]=n}function w(t){return!t||"none"===t}function O(t,e,n){b(t,(function(t,r){return t.style.opacity=0,o.setStyle(t,{opacity:e}),f(t,{opacity:n},r)}))}function k(t,e){return{transform:"translate("+t+"px, "+e+"px)"}}function E(t){return o.setStyle(t,k(0,0)),t.getBoundingClientRect()}function S(t,e){var n="move-from-"+t;b("move-to-"+t,(function(t,n){var r=E(t);return f(t,e(r),n)})),b(n,(function(t,n){var r=E(t),i=e(r);return o.setStyle(t,i),f(t,k(0,0),n)}))}return O("fade-in",0,1),O("fade-out",1,0),S("top",(function(t){return k(0,-(t.top+t.height))})),S("bottom",(function(t){return k(0,up.viewport.rootHeight()-t.top)})),S("left",(function(t){return k(-(t.left+t.width),0)})),S("right",(function(t){return k(up.viewport.rootWidth()-t.left,0)})),g("cross-fade",["fade-out","fade-in"]),g("move-left",["move-to-left","move-from-right"]),g("move-right",["move-to-right","move-from-left"]),g("move-up",["move-to-top","move-from-bottom"]),g("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:boot",(function(){p()||up.puts("up.motion","Animations are disabled")})),up.on("up:framework:reset",(function(){u.reset(),i=c(i),s=c(s),a.reset()})),{morph:function(t,i,s,a){h(a=r.options(a)),t=up.fragment.get(t),i=up.fragment.get(i);var c=d(s),p=l(t,c,a),f=r.pluckKey(a,"beforeStart")||r.noop,y=r.pluckKey(a,"afterInsert")||r.noop,m=r.pluckKey(a,"beforeDetach")||r.noop,g=r.pluckKey(a,"afterDetach")||r.noop,b=r.pluckKey(a,"scrollNew")||r.asyncNoop;if(f(),p){if(u.isActive(t)&&!1===a.trackMotion)return c(t,i,a);up.puts("up.morph()","Morphing %o to %o with transition %O",t,i,s);var w=up.viewport.get(t),O=w.scrollTop,k=up.viewport.absolutize(t,{afterMeasure:function(){o.insertBefore(t,i),y()}});return u.startFunction([t,i],(function(){return e(this,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return[4,b()];case 1:return n.sent(),e=w.scrollTop,k.moveBounds(0,e-O),[4,c(t,i,a)];case 2:return n.sent(),m(),o.remove(k.bounds),g(),[2]}}))}))}),a)}return m(),v(t,i),y(),g(),b()},animate:function(t,e,n){t=up.fragment.get(t),n=r.options(n);var i=m(e);return l(t,e,n)?u.startFunction(t,(function(){return i(t,n)}),n):function(t,e){return r.isOptions(e)&&o.setStyle(t,e),Promise.resolve()}(t,e)},finish:function(t){return u.finish(t)},finishCount:function(){return u.finishCount},transition:g,animation:b,config:a,isEnabled:p,isNone:w,willAnimate:l,swapElementsDirectly:v}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate},1647:function(t,e,n){n(2903);var r=up.util;up.network=function(){var t=new up.Config((function(){return{concurrency:4,wrapMethod:!0,cacheSize:70,cacheExpiry:3e5,badDownlink:.6,badRTT:750,badResponseTime:400,autoCache:function(t){return t.isSafe()},clearCache:function(t,e){return!t.isSafe()},requestMetaKeys:["target","failTarget","mode","failMode","context","failContext"],progressBar:!0}})),e=new up.Request.Queue,n=new up.Request.Cache,o=null;function i(t){var e,n,o=r.extractOptions(t);return o.url||(o.url=t[0]),null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,o),o}function s(t){var r;if(t.willCache()&&(r=n.get(t)))return up.puts("up.request()","Re-using previous request to %s %s",t.method,t.url),t.preload||e.promoteToForeground(r),t.followState(r),!0}function u(o){return o.preload&&!o.isSafe()&&up.fail("Will not preload request to %s",o.description),function(e){e.willCache()&&n.set(e,e),r.always(e,(function(r){var o,i,s=null!==(i=null!==(o=r.clearCache)&&void 0!==o?o:e.clearCache)&&void 0!==i?i:t.clearCache(e,r);s&&n.clear(s),(e.willCache()||n.get(e))&&n.set(e,e),r.ok||n.remove(e)}))}(o),e.asap(o),!0}function a(){return e.isBusy()}var c=r.negate(a);function p(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e.abort.apply(e,t)}return up.on("up:request:late",(function(){r.evalOption(t.progressBar)&&(o=new up.ProgressBar)})),up.on("up:request:recover",(function(){null==o||o.conclude()})),up.on("up:framework:reset",(function(){p(),e.reset(),t.reset(),n.clear(),null==o||o.destroy(),o=null})),{request:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new up.Request(i(t));s(r)||u(r);var o=r.solo;return o&&e.abortExcept(r,o),r},cache:n,isIdle:c,isBusy:a,isSafeMethod:function(t){return r.contains(["GET","OPTIONS","HEAD"],r.normalizeMethod(t))},config:t,abort:p,registerAliasForRedirect:function(t,e){if(t.cache&&e.url&&t.url!==e.url){var r=t.variant({method:e.method,url:e.url});n.alias(t,r)}},queue:e,shouldReduceRequests:function(){var e=navigator.connection;if(e)return e.saveData||e.rtt&&e.rtt>t.badRTT||e.downlink&&e.downlink<t.badDownlink},mimicLocalRequest:function(t){var e=t.solo;e&&p(e);var r=t.clearCache;r&&n.clear(r)}}}(),up.request=up.network.request,up.cache=up.network.cache},3535:function(){up.protocol=function(){var t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,(function(t){return"-"+t.toUpperCase()}))},r=function(e,r,o){void 0===o&&(o=t.identity);var i=e.getResponseHeader(n(r));if(i)return o(i)};function o(t){switch(t){case"true":return!0;case"false":return!1;default:return t}}var i=t.memoize((function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))})),s=new up.Config((function(){return{methodParam:"_method",csrfParam:function(){return e.metaContent("csrf-param")},csrfToken:function(){return e.metaContent("csrf-token")},csrfHeader:"X-CSRF-Token"}}));function u(){s.reset()}return up.on("up:framework:reset",u),{config:s,reset:u,locationFromXHR:function(t){return r(t,"location")||t.responseURL},titleFromXHR:function(t){return r(t,"title")},targetFromXHR:function(t){return r(t,"target")},methodFromXHR:function(e){return r(e,"method",t.normalizeMethod)},acceptLayerFromXHR:function(t){return r(t,"acceptLayer",JSON.parse)},contextFromXHR:function(t){return r(t,"context",JSON.parse)},dismissLayerFromXHR:function(t){return r(t,"dismissLayer",JSON.parse)},eventPlansFromXHR:function(t){return r(t,"events",JSON.parse)},clearCacheFromXHR:function(t){return r(t,"clearCache",o)},csrfHeader:function(){return t.evalOption(s.csrfHeader)},csrfParam:function(){return t.evalOption(s.csrfParam)},csrfToken:function(){return t.evalOption(s.csrfToken)},initialRequestMethod:i,headerize:n,wrapMethod:function(t,e){return e.add(s.methodParam,t),"POST"}}}()},9615:function(){up.radio=function(){var t=up.util,e=up.element,n=new up.Config((function(){return{hungrySelectors:["[up-hungry]"],pollInterval:3e4,pollEnabled:"auto"}}));function r(r,o){var i,s;void 0===o&&(o={});var u=null!==(s=null!==(i=o.interval)&&void 0!==i?i:e.numberAttr(r,"up-interval"))&&void 0!==s?s:n.pollInterval,a=!1,c=null;function p(){a||(function(e){var r,o,i=t.evalOption(n.pollEnabled,e);return"auto"===i?!document.hidden&&!up.network.shouldReduceRequests()&&(null===(o=null===(r=up.layer.get(e))||void 0===r?void 0:r.isFront)||void 0===o?void 0:o.call(r)):i}(r)?t.always(up.reload(r,o),l):(up.puts("[up-poll]","Polling is disabled"),l(Math.min(1e4,u))))}function l(t){void 0===t&&(t=u),a||setTimeout(p,t)}function f(){a=!0,null==c||c.abort()}return o.onQueued=function(t){return c=t},up.on(r,"up:poll:stop",f),l(),f}return up.compiler("[up-poll]",r),up.on("up:framework:reset",(function(){n.reset()})),{config:n,hungrySelector:function(){return n.hungrySelectors.join(",")},startPolling:r,stopPolling:function(t){up.emit(t,"up:poll:stop")}}}()},6774:function(){var t,e;up.rails=(t=up.util,e=up.element,t.each(["method","confirm"],(function(t){var n="data-"+t,r="up-"+t;up.macro("a["+n+"]",(function(t){if((window._rails_loaded||window.Rails||(null===(o=window.jQuery)||void 0===o?void 0:o.rails))&&up.link.isFollowable(t))return e.setMissingAttr(t,r,t.getAttribute(n)),t.removeAttribute(n);var o}))})))},2514:function(){up.syntax=function(){var t=up.util,e=up.element,n={"[up-back]":-100,"[up-content]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},r=[],o=[];function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=a(t);return c(r,n)}function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=a(t);return up.framework.booting&&(n.priority=u(n.selector)||up.fail("Unregistered priority for system macro %o",n.selector)),c(o,n)}function u(e){for(var r in e=t.evalOption(e),n){var o=n[r];if(e.indexOf(r)>=0)return o}}function a(e){var n=function(e){var n=e.shift(),r=e.pop();return[n,t.extractOptions(e),r]}(e),r=n[0],o=n[1],i=n[2];return o=t.options(o,{selector:r,isDefault:up.framework.booting,priority:0,batch:!1,keep:!1,jQuery:!1}),t.assign(i,o)}function c(t,e){for(var n,r=0;(n=t[r])&&n.priority>=e.priority;)r+=1;return t.splice(r,0,e),e}return up.on("up:framework:reset",(function(){r=t.filter(r,"isDefault"),o=t.filter(o,"isDefault")})),{compiler:i,macro:s,$compiler:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=i.apply(void 0,t);n.jQuery=!0},$macro:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=s.apply(void 0,t);return n.jQuery=!0,n},destructor:function(e,n){var r=e.upDestructors;r||(r=[],e.upDestructors=r,e.classList.add("up-can-clean")),t.isArray(n)?r.push.apply(r,n):r.push(n)},compile:function(t,e){var n=o.concat(r);new up.CompilerPass(t,n,e).run()},clean:function(t,e){void 0===e&&(e={}),new up.DestructorPass(t,e).run()},data:function(t){return t=up.fragment.get(t),e.jsonAttr(t,"up-data")||{}}}}(),up.compiler=up.syntax.compiler,up.$compiler=up.syntax.$compiler,up.destructor=up.syntax.destructor,up.macro=up.syntax.macro,up.$macro=up.syntax.$macro,up.data=up.syntax.data},7924:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};up.util=function(){function e(){}var n={host:"cross-domain",stripTrailingSlash:!1,search:!0,hash:!1};function r(t,e){e=M(e,n);var r,o,i=u(t),a="";"cross-domain"===e.host&&(e.host=s(i)),e.host&&(a+=i.protocol+"//"+i.hostname,r=i.protocol,(""===(o=(o=i.port).toString())||"80"===o)&&"http:"===r||"443"===o&&"https:"===r||(a+=":"+i.port));var c=i.pathname;return e.stripTrailingSlash&&(c=c.replace(/\/$/,"")),a+=c,e.search&&(a+=i.search),e.hash&&(a+=i.hash),a}var o=location.protocol,i=location.hostname;function s(t){if(k(t)&&-1===t.indexOf("//"))return!1;var e=u(t);return i!==e.hostname||o!==e.protocol}function u(t){var e;return L(t)?e=up.element.get(t):t.pathname?e=t:(e=document.createElement("a")).href=t,e.hostname||(e.href=e.href),"/"!==e.pathname[0]&&((e=W(e,["protocol","hostname","port","pathname","search","hash"])).pathname="/"+e.pathname),e}function a(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++){var i=o[r];for(var s in i)t[s]=i[s]}return t}var c=Object.assign||a,p=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))};function l(t){return k(t)?function(e){return e[t]}:t}function f(t,e){if(0===t.length)return[];e=l(e);for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push(e(o,r))}return n}function h(t,e){for(var n=0;n<t.length;n++)e(t[n],n)}function d(t){return null===t}function y(t){return void 0===t}var m=ct(y);function v(t){return y(t)||d(t)}var g=ct(v);function b(t){return!!v(t)||(_(t)&&t[b.key]?t[b.key]():k(t)||A(t)?0===t.length:!!S(t)&&0===Object.keys(t).length)}b.key="up.util.isBlank";var w=ct(b);function O(t){return"function"==typeof t}function k(t){return"string"==typeof t||t instanceof String}function E(t){return"number"==typeof t||t instanceof Number}function S(t){return"object"==typeof t&&!d(t)&&(y(t.constructor)||t.constructor===Object)}function _(t){var e=typeof t;return"object"===e&&!d(t)||"function"===e}function x(t){return t instanceof Element}function C(t){return t instanceof RegExp}function L(t){return up.browser.canJQuery()&&t instanceof jQuery}var T=Array.isArray;function A(t){return T(t)||P(t)||R(t)||L(t)||function(t){return t instanceof HTMLCollection}(t)}function P(t){return t instanceof NodeList}function R(t){return"[object Arguments]"===Object.prototype.toString.call(t)}function F(t){return A(t)?t:v(t)?[]:[t]}function j(t){return _(t)&&t[j.key]?t=t[j.key]():A(t)?t=q(t):S(t)&&(t=c({},t)),t}function q(t){return Array.prototype.slice.call(t)}function D(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return c.apply(void 0,t([{}],e))}function M(t,e){return e?D(e,t):t?j(t):{}}function H(t,e){e=l(e);for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r)return r}}function N(t,e){e=l(e);for(var n=!0,r=0;r<t.length;r++)if(!e(t[r],r)){n=!1;break}return n}function B(t){var e=[];return t.forEach((function(t){return e.push(t)})),e}function z(t){var e=new Set;return t.forEach((function(t){return e.add(t)})),e}function U(t,e){e=l(e);var n=[];return h(t,(function(t,r){if(e(t,r))return n.push(t)})),n}function K(t){return Promise.resolve().then(t)}function V(t){return t[t.length-1]}function I(t,e){return t.indexOf(e)>=0}function W(t,e){for(var n={},r=0,o=e;r<o.length;r++){var i=o[r];i in t&&(n[i]=t[i])}return n}function Q(t,e){e=l(e);var n={};for(var r in t)e(t[r],r,t)&&(n[r]=t[r]);return n}j.key="up.util.copy",Date.prototype[j.key]=function(){return new Date(+this)};var G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};function X(t,e){var n=t[e];return delete t[e],n}function $(t,e){if(e(V(t)))return t.pop()}function J(t){return $(t,S)||{}}function Y(t){return t}function Z(t){for(var e=[],n=0,r=t;n<r.length;n++){var o=r[n];A(o)?e.push.apply(e,o):e.push(o)}return e}function tt(t){return null==t?void 0:t.catch(e)}function et(t,e){if((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),typeof t!=typeof e)return!1;if(A(t)&&A(e))return nt(t,e);if(_(t)&&t[et.key])return t[et.key](e);if(S(t)&&S(e)){var n=Object.keys(t);return!!nt(n,Object.keys(e))&&N(n,(function(n){return et(t[n],e[n])}))}return t===e}function nt(t,e){return t.length===e.length&&N(t,(function(t,n){return et(t,e[n])}))}et.key="up.util.isEqual";var rt=0;function ot(t){return t[0].toLowerCase()+t.slice(1)}function it(t){return t[0].toUpperCase()+t.slice(1)}function st(t){var e,n="";if(k(t))e=(e=(e=t.replace(/[\n\r\t ]+/g," ")).replace(/^[\n\r\t ]+/,"")).replace(/[\n\r\t ]$/,"");else if(y(t))e="undefined";else if(E(t)||O(t))e=t.toString();else if(T(t))e="["+f(t,st).join(", ")+"]",n="]";else if(L(t))e="$("+f(t,st).join(", ")+")",n=")";else if(x(t)){e="<"+t.tagName.toLowerCase();for(var r=0,o=["id","name","class"];r<o.length;r++){var i=o[r],s=t.getAttribute(i);s&&(e+=" "+i+'="'+s+'"')}e+=">",n=">"}else if(C(t))e=t.toString();else try{e=JSON.stringify(t)}catch(t){if("TypeError"!==t.name)throw t;e="(circular structure)"}return e.length>200&&(e=e.substr(0,200)+" …",e+=n),e}var ut=/%[oOdisf]/g;function at(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!e)return"";var o=0;return e.replace(ut,(function(){var e=n[o];return e=t(st(e)),o+=1,e}))}function ct(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(void 0,e)}}return{parseURL:u,normalizeURL:r,urlWithoutHost:function(t){return r(t,{host:!1})},matchURLs:function(t,e){return r(t)===r(e)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},assign:c,assignPolyfill:a,copy:j,copyArrayLike:q,merge:D,mergeDefined:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0,o=t;r<o.length;r++){var i=o[r];if(i)for(var s in i){var u=i[s];m(u)&&(n[s]=u)}}return n},options:M,parseArgIntoOptions:function(t,e){var n=J(t);return m(t[0])&&((n=j(n))[e]=t[0]),n},each:h,eachIterator:function(t,e){for(var n;(n=t.next())&&!n.done;)e(n.value)},map:f,flatMap:function(t,e){return Z(f(t,e))},mapObject:function(t,e){return f(t,e).reduce((function(t,e){return t[e[0]]=e[1],t}),{})},findResult:H,some:function(t,e){return!!H(t,e)},every:N,find:function(t,e){var n;e=l(e);for(var r=0,o=t;r<o.length;r++){var i=o[r];if(e(i)){n=i;break}}return n},filter:U,reject:function(t,e){return U(t,e=ct(l(e)))},intersect:function(t,e){return U(t,(function(t){return I(e,t)}))},compact:function(t){return U(t,g)},compactObject:function(t){return Q(t,g)},uniq:function(t){return t.length<2?t:B(z(t))},uniqBy:function(t,e){if(t.length<2)return t;e=l(e);var n=new Set;return U(t,(function(t,r){var o=e(t,r);return!n.has(o)&&(n.add(o),!0)}))},last:V,isNull:d,isDefined:m,isUndefined:y,isGiven:g,isMissing:v,isPresent:w,isBlank:b,presence:function(t,e){if(void 0===e&&(e=w),e(t))return t},isObject:_,isFunction:O,isString:k,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:E,isElement:x,isJQuery:L,isElementish:function(t){var e;return!(!t||!t.addEventListener&&!(null===(e=t[0])||void 0===e?void 0:e.addEventListener))},isPromise:function(t){return _(t)&&O(t.then)},isOptions:S,isArray:T,isFormData:function(t){return t instanceof FormData},isNodeList:P,isArguments:R,isList:A,isRegExp:C,timer:function(t,e){return setTimeout(e,t)},contains:I,objectContains:function(t,e){return et(e,W(t,Object.keys(e)))},toArray:function(t){return T(t)?t:q(t)},pick:W,pickBy:Q,omit:function(t,e){return Q(t,(function(t,n){return!I(e,n)}))},unresolvablePromise:function(){return new Promise(e)},remove:function(t,e){var n=t.indexOf(e);if(n>=0)return t.splice(n,1),e},memoize:function(t){var e,n;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n?e:(n=!0,e=t.apply(this,r))}},pluckKey:X,renameKey:function(t,e,n){return t[n]=X(t,e)},extractOptions:J,extractCallback:function(t){return $(t,O)},noop:e,asyncNoop:function(){return Promise.resolve()},identity:Y,escapeHTML:function(t){return t.replace(/[&<>"']/g,(function(t){return G[t]}))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(t){return 1===t.length?t[0]:function(){return f(t,(function(t){return t()}))}},evalOption:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return O(t)?t.apply(void 0,e):t},flatten:Z,isTruthy:function(t){return!!t},newDeferred:function(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return n.resolve=t,n.reject=e,n.promise=function(){return n},n},always:function(t,e){return t.then(e,e)},muteRejection:tt,asyncify:function(t){try{return Promise.resolve(t())}catch(t){return Promise.reject(t)}},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:s,task:function(t){return setTimeout(t)},microtask:K,abortableMicrotask:function(t){var e=!1;return K((function(){if(!e)return t()})),function(){return e=!0}},isEqual:et,splitValues:function(t,e){return void 0===e&&(e=" "),k(t)?t=U(t=f(t=t.split(e),(function(t){return t.trim()})),w):F(t)},endsWith:function(t,e){return t.substring(t.length-e.length)===e},wrapList:F,wrapValue:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return n[0]instanceof e?n[0]:new(e.bind.apply(e,t([void 0],n)))},simpleEase:function(t){return t<.5?2*t*t:t*(4-2*t)-1},values:p,arrayToSet:z,setToArray:B,uid:function(){return rt++},upperCaseFirst:it,lowerCaseFirst:ot,getter:function(t,e,n){Object.defineProperty(t,e,{get:n})},delegate:function(t,e,n){F(e).forEach((function(e){Object.defineProperty(t,e,{get:function(){var t=n.call(this),r=t[e];return O(r)&&(r=r.bind(t)),r},set:function(t){n.call(this)[e]=t}})}))},reverse:function(t){return j(t).reverse()},prefixCamelCase:function(t,e){return e+it(t)},unprefixCamelCase:function(t,e){var n=new RegExp("^"+e+"(.+)$"),r=t.match(n);if(r)return ot(r[1])},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))},nullToUndefined:function(t){if(!d(t))return t},sprintf:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return at.apply(void 0,t([Y,e],n))},sprintfWithFormattedArgs:at,renameKeys:function(t,e){var n={};for(var r in t)n[e(r)]=t[r];return n},timestamp:function(){return Math.floor(.001*Date.now())},allSettled:function(t){return Promise.all(f(t,tt))},negate:ct}}()},4606:function(t,e,n){var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};n(573),up.viewport=function(){var t=up.util,e=up.element,n=up.fragment,o=new up.Config((function(){return{viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:function(){return.5*window.innerHeight},scrollSpeed:1}})),i=new up.MotionController("scrolling");function s(t,e,r){void 0===r&&(r={}),t=n.get(t,r);var o=new up.ScrollMotion(t,e,r);i.startMotion(t,o,r)}function u(e,r){if(r=t.options(r),e=n.get(e,r),!(r.layer=up.layer.get(e)))return up.error.failed.async("Cannot reveal a detached element");r.peel&&r.layer.peel();var o=new up.RevealMotion(e,r);return i.startMotion(e,o,r)}function a(t,e){if(void 0===e&&(e={}),up.browser.isIE11()){var n=l(t),r=n.scrollTop;t.focus(),n.scrollTop=r}else t.focus({preventScroll:!0});if(!e.preventScroll)return u(t)}function c(t,e){void 0===t&&(t=location.hash);var n=E(t,e);if(n)return up.reveal(n,{top:!0})}function p(){return r([d()],o.viewportSelectors).join(",")}function l(t,r){void 0===r&&(r={});var o=n.get(t,r);return e.closest(o,p())}function f(t,r){return void 0===r&&(r={}),t=n.get(t,r),e.around(t,p())}function h(t){return void 0===t&&(t={}),n.all(p(),t)}function d(){var t;return(t=document.scrollingElement)?t.tagName:"html"}function y(){return document.querySelector(d())}function m(t){var n=e.style(t,"overflow-y");return"auto"===n||"scroll"===n}var v=t.memoize((function(){var t=up.element.affix(document.body,"[up-viewport]",{style:{position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"}}),e=t.offsetWidth-t.clientWidth;return up.element.remove(t),e}));function g(t){return up.fragment.toTarget(t)}function b(t){void 0===t&&(t=document);var e=["[up-fixed]"].concat(o.fixedTop).concat(o.fixedBottom);return t.querySelectorAll(e.join(","))}function w(e){return t.mapObject(e,(function(t){return[g(t),t.scrollTop]}))}function O(e){var n=t.copy(t.extractOptions(e));return n.layer=up.layer.get(n),[e[0]?[l(e[0],n)]:n.around?f(n.around,n):h(n),n]}function k(e,n){var r=t.map(e,(function(t){var e=g(t);return s(t,n[e]||0,{duration:0})}));return Promise.all(r)}function E(t,r){if(void 0===r&&(r={}),t=null==(i=t)?void 0:i.replace(/^#/,"")){var o=[e.attributeSelector("id",t),"a"+e.attributeSelector("name",t)].join(",");return n.get(o,r)}var i}var S=!1;return up.on("scroll",{once:!0},(function(){return S=!0})),up.on("up:app:boot",(function(){return t.task((function(){if(!S)return c()}))})),up.on(window,"hashchange",(function(){return c()})),up.on("up:framework:reset",(function(){o.reset(),i.reset()})),{reveal:u,revealHash:c,firstHashTarget:E,scroll:s,config:o,get:l,subtree:function(t,r){return void 0===r&&(r={}),t=n.get(t,r),e.subtree(t,p())},around:f,all:h,rootSelector:d,get root(){return y()},rootWidth:function(){return e.root.clientWidth},rootHeight:function(){return e.root.clientHeight},rootHasReducedWidthFromScrollbar:function(){return window.innerWidth>document.documentElement.offsetWidth},rootOverflowElement:function(){var e=document.body,n=document.documentElement;return t.find([n,e],m)||y()},isRoot:function(t){return e.matches(t,d())},scrollbarWidth:v,scrollTops:function(e){return void 0===e&&(e={}),t.mapObject(h(e),(function(t){return[g(t),t.scrollTop]}))},saveScroll:function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=O(e),o=r[0],i=r[1],s=i.location||i.layer.location;if(s){var u=null!==(t=i.tops)&&void 0!==t?t:w(o);i.layer.lastScrollTops.set(s,u)}},restoreScroll:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=O(e),o=r[0],i=r[1],s=i.layer.location,u=i.layer.lastScrollTops.get(s)||{};return up.puts("up.viewport.restoreScroll()","Restoring scroll positions for URL %s to %o",t.urlWithoutHost(s),u),k(o,u)},resetScroll:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=O(t),r=n[0];return n[1],k(r,{})},anchoredRight:function(){var t=o.anchoredRight.join(",");return n.all(t,{layer:"root"})},fixedElements:b,absolutize:function(n,r){var o;void 0===r&&(r={});var i=l(n).getBoundingClientRect(),s=n.getBoundingClientRect(),u=new up.Rect({left:s.left-i.left,top:s.top-i.top,width:s.width,height:s.height});null===(o=r.afterMeasure)||void 0===o||o.call(r),e.setStyle(n,{position:"static"===n.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"});var a=e.createFromSelector("up-bounds");e.insertBefore(n,a),a.appendChild(n);var c=function(t,n){return u.left+=t,u.top+=n,e.setStyle(a,u)};c(0,0);var p=n.getBoundingClientRect();return c(s.left-p.left,s.top-p.top),t.each(b(n),e.fixedToAbsolute),{bounds:a,moveBounds:c}},focus:a,tryFocus:function(t,e){return a(t,e),t===document.activeElement},makeFocusable:function(t){t.hasAttribute("tabindex")||function(t){return e.matches(t,"a[href], button, textarea, input, select")}(t)||(t.setAttribute("tabindex","-1"),t.classList.add("up-focusable-content"))}}}(),up.focus=up.viewport.focus,up.scroll=up.viewport.scroll,up.reveal=up.viewport.reveal},3507:function(){window.up={version:"2.2.1"}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n(3507),n(8374),n(7924),n(3924),n(6535),n(2811),n(9675),n(2406),n(3742),n(3115),n(1279),n(6346),n(3030),n(7948),n(1752),n(8228),n(7050),n(9441),n(7422),n(9005),n(2200),n(1569),n(2737),n(3635),n(1906),n(4158),n(3139),n(6866),n(665),n(2828),n(2587),n(7031),n(4850),n(6267),n(7956),n(7403),n(6412),n(7965),n(7771),n(86),n(4552),n(5580),n(7101),n(6066),n(6387),n(5390),n(2618),n(7792),n(1104),n(8665),n(3645),n(7782),n(2705),n(606),n(5437),n(7974),n(6413),n(5221),n(2298),n(4517),n(7241),n(2723),n(6956),n(8720),n(104),n(5438),n(7885),n(4818),n(9634),n(8670),n(3535),n(4453),n(2514),n(8944),n(2667),n(4606),n(4034),n(1647),n(9443),n(3849),n(2851),n(454),n(9615),n(6774),up.framework.boot()}();
1
+ !function(){var t={7433:function(){},7921:function(){},7298:function(){},2903:function(){},573:function(){},2811:function(){up.browser=function(){var t=up.util;function e(){return"ActiveXObject"in window}function n(){return!!window.jQuery}return{submitForm:function(t){t.submit()},canPushState:function(){return history.pushState&&"GET"===up.protocol.initialRequestMethod()},canFormatLog:t.negate(e),canPassiveEventListener:t.negate(e),canJQuery:n,canPromise:function(){return!!window.Promise},canEval:t.memoize((function(){try{return new Function("return true")()}catch(t){return!1}})),assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw up.error.aborted("User canceled action");return!0},popCookie:function(t){var e,n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n},get jQuery(){return n()||up.fail("jQuery must be published as window.jQuery"),jQuery},isIE11:e,isEdge18:function(){return t.contains(navigator.userAgent," Edge/")}}}()},6346:function(){var t=up.element;up.BodyShifter=function(){function e(){this.unshiftFns=[],this.reset()}return e.prototype.reset=function(){this.unshiftNow(),this.shiftCount=0},e.prototype.shift=function(){if(this.shiftCount++,!(this.shiftCount>1)){var e=up.viewport.rootHasReducedWidthFromScrollbar(),n=up.viewport.rootOverflowElement();if(this.changeStyle(n,{overflowY:"hidden"}),e){var r=document.body,o=up.viewport.scrollbarWidth(),i=o+t.styleNumber(r,"paddingRight");this.changeStyle(r,{paddingRight:i});for(var s=0,u=up.viewport.anchoredRight();s<u.length;s++){var a=u[s],c=o+t.styleNumber(a,"right");this.changeStyle(a,{right:c})}}}},e.prototype.changeStyle=function(e,n){this.unshiftFns.push(t.setTemporaryStyle(e,n))},e.prototype.unshift=function(){this.shiftCount--,0==this.shiftCount&&this.unshiftNow()},e.prototype.unshiftNow=function(){for(var t;t=this.unshiftFns.pop();)t()},e}()},3115:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},e=up.util;up.Cache=function(){function n(t){void 0===t&&(t={}),this.config=t,this.store=this.config.store||new up.store.Memory}return n.prototype.size=function(){return this.store.size()},n.prototype.maxSize=function(){return e.evalOption(this.config.size)},n.prototype.expiryMillis=function(){return e.evalOption(this.config.expiry)},n.prototype.normalizeStoreKey=function(t){return this.config.key?this.config.key(t):t.toString()},n.prototype.isEnabled=function(){return 0!==this.maxSize()&&0!==this.expiryMillis()},n.prototype.clear=function(){this.store.clear()},n.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.config.logPrefix&&(e[0]="["+this.config.logPrefix+"] "+e[0],up.puts.apply(up,t(["up.Cache"],e)))},n.prototype.keys=function(){return this.store.keys()},n.prototype.each=function(t){var n=this;e.each(this.keys(),(function(e){var r=n.store.get(e);t(e,r.value,r.timestamp)}))},n.prototype.makeRoomForAnotherEntry=function(){var t,e;this.hasRoomForAnotherEntry()||(this.each((function(n,r,o){(!e||e>o)&&(t=n,e=o)})),t&&this.store.remove(t))},n.prototype.hasRoomForAnotherEntry=function(){var t=this.maxSize();return!t||this.size()<t},n.prototype.alias=function(t,n){var r=this.get(t,{silent:!0});e.isDefined(r)&&this.set(n,r)},n.prototype.timestamp=function(){return(new Date).valueOf()},n.prototype.set=function(t,e){if(this.isEnabled()){this.makeRoomForAnotherEntry();var n=this.normalizeStoreKey(t),r={timestamp:this.timestamp(),value:e};this.store.set(n,r)}},n.prototype.remove=function(t){var e=this.normalizeStoreKey(t);this.store.remove(e)},n.prototype.isFresh=function(t){var e=this.expiryMillis();return!e||this.timestamp()-t.timestamp<e},n.prototype.get=function(t,e){void 0===e&&(e={});var n=this.normalizeStoreKey(t),r=this.store.get(n);if(r){if(this.isFresh(r))return e.silent||this.log("Cache hit for '%s'",t),r.value;e.silent||this.log("Discarding stale cache entry for '%s'",t),this.remove(t)}else e.silent||this.log("Cache miss for '%s'",t)},n}()},7948:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util,r=up.element;up.Change.Addition=function(t){function o(e){var n=t.call(this,e)||this;return n.responseDoc=e.responseDoc,n.acceptLayer=e.acceptLayer,n.dismissLayer=e.dismissLayer,n.eventPlans=e.eventPlans||[],n}return e(o,t),o.prototype.handleLayerChangeRequests=function(){var t=this;this.layer.isOverlay()&&(this.tryAcceptLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(),this.abortWhenLayerClosed(),this.tryDismissLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(),this.abortWhenLayerClosed()),this.layer.asCurrent((function(){for(var e=0,n=t.eventPlans;e<n.length;e++){var r=n[e];up.emit(r),t.abortWhenLayerClosed()}}))},o.prototype.tryAcceptLayerFromServer=function(){n.isDefined(this.acceptLayer)&&this.layer.isOverlay()&&this.layer.accept(this.acceptLayer)},o.prototype.tryDismissLayerFromServer=function(){n.isDefined(this.dismissLayer)&&this.layer.isOverlay()&&this.layer.dismiss(this.dismissLayer)},o.prototype.abortWhenLayerClosed=function(){if(this.layer.isClosed())throw up.error.aborted("Layer was closed")},o.prototype.setSource=function(t){var e=t.oldElement,o=t.newElement,i=t.source;"keep"===i&&(i=e&&up.fragment.source(e)),i&&r.setMissingAttr(o,"up-source",n.normalizeURL(i))},o}(up.Change)},3030:function(){var t=up.util;up.Change=function(){function e(t){this.options=t}return e.prototype.notApplicable=function(t){return up.error.notApplicable(this,t)},e.prototype.execute=function(){throw up.error.notImplemented()},e.prototype.onFinished=function(){var t,e;return null===(e=(t=this.options).onFinished)||void 0===e?void 0:e.call(t)},e.prototype.improveHistoryValue=function(e,n){return!1===e||t.isString(e)?e:n},e}()},7422:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.Change.CloseLayer=function(t){function r(e){var n,r=t.call(this,e)||this;return r.verb=e.verb,r.layer=up.layer.get(e),r.origin=e.origin,r.value=e.value,r.preventable=null===(n=e.preventable)||void 0===n||n,r}return e(r,t),r.prototype.execute=function(){var t=this;if(!this.layer.isOpen())return Promise.resolve();if(up.browser.assertConfirmed(this.options),up.network.abort((function(e){return e.layer===t.layer})),this.emitCloseEvent().defaultPrevented&&this.preventable)throw up.error.aborted("Close event was prevented");var e=this.layer.parent;this.layer.peel(),this.layer.stack.remove(this.layer),e.restoreHistory(),this.handleFocus(e),this.layer.teardownHandlers(),this.layer.destroyElements(this.options),this.emitClosedEvent(e)},r.prototype.emitCloseEvent=function(){return this.layer.emit(this.buildEvent("up:layer:"+this.verb),{callback:this.layer.callback("on"+n.upperCaseFirst(this.verb)),log:"Will "+this.verb+" "+this.layer})},r.prototype.emitClosedEvent=function(t){var e=this.verb+"ed",r=n.upperCaseFirst(e);return this.layer.emit(this.buildEvent("up:layer:"+e),{baseLayer:t,callback:this.layer.callback("on"+r),ensureBubbles:!0,log:r+" "+this.layer})},r.prototype.buildEvent=function(t){return up.event.build(t,{layer:this.layer,value:this.value,origin:this.origin})},r.prototype.handleFocus=function(t){var e;this.layer.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront(),(this.layer.origin||t.element).focus({preventScroll:!0})},r}(up.Change.Removal)},8228:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},o=up.element;up.Change.DestroyFragment=function(t){function i(e){var n=t.call(this,e)||this;return n.layer=up.layer.get(e)||up.layer.current,n.element=n.options.element,n.animation=n.options.animation,n.log=n.options.log,n}return e(i,t),i.prototype.execute=function(){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return this.parent=this.element.parentNode,up.fragment.markAsDestroying(this.element),up.motion.willAnimate(this.element,this.animation,this.options)?(this.emitDestroyed(),[4,this.animate()]):[3,2];case 1:return t.sent(),this.wipe(),this.onFinished(),[3,3];case 2:this.wipe(),this.emitDestroyed(),this.onFinished(),t.label=3;case 3:return[2]}}))}))},i.prototype.animate=function(){return up.motion.animate(this.element,this.animation,this.options)},i.prototype.wipe=function(){var t=this;this.layer.asCurrent((function(){up.syntax.clean(t.element,{layer:t.layer}),up.browser.canJQuery()?jQuery(t.element).remove():o.remove(t.element)}))},i.prototype.emitDestroyed=function(){up.fragment.emitDestroyed(this.element,{parent:this.parent,log:this.log})},i}(up.Change.Removal)},9005:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.Change.FromContent=function(t){function o(e){var n=t.call(this,e)||this;return n.layers=r.filter(up.layer.getAll(n.options),n.isRenderableLayer),n.origin=n.options.origin,n.preview=n.options.preview,n.mode=n.options.mode,n.origin&&(n.originLayer=up.layer.get(n.origin)),n}return e(o,t),o.prototype.isRenderableLayer=function(t){return"new"===t||t.isOpen()},o.prototype.getPlans=function(){return this.plans||(this.plans=[],this.options.fragment&&(this.options.target=this.getResponseDoc().rootSelector()),this.expandIntoPlans(this.layers,this.options.target),this.expandIntoPlans(this.layers,this.options.fallback)),this.plans},o.prototype.expandIntoPlans=function(t,e){for(var r=0,o=t;r<o.length;r++)for(var i=o[r],s=0,u=this.expandTargets(e,i);s<u.length;s++){var a=u[s],c=n(n({},this.options),{target:a,layer:i,placement:this.defaultPlacement()}),p="new"===i?new up.Change.OpenLayer(c):new up.Change.UpdateLayer(c);this.plans.push(p)}},o.prototype.expandTargets=function(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.mode,origin:this.origin})},o.prototype.execute=function(){return this.options.preload?Promise.resolve():this.seekPlan(this.executePlan.bind(this))||this.postflightTargetNotApplicable()},o.prototype.executePlan=function(t){return t.execute(this.getResponseDoc(),this.onPlanApplicable.bind(this,t))},o.prototype.onPlanApplicable=function(t){var e=this.getPlans()[0];t!==e&&up.puts("up.render()","Could not match primary target (%s). Updating a fallback target (%s).",e.target,t.target)},o.prototype.getResponseDoc=function(){var t,e;if(!this.preview&&!this.responseDoc){var n=r.pick(this.options,["target","content","fragment","document","html","cspNonces"]);null===(e=(t=up.migrate).handleResponseDocOptions)||void 0===e||e.call(t,n),"content"===this.defaultPlacement()&&(n.target=this.firstExpandedTarget(n.target)),this.responseDoc=new up.ResponseDoc(n)}return this.responseDoc},o.prototype.defaultPlacement=function(){if(!this.options.document&&!this.options.fragment)return"content"},o.prototype.firstExpandedTarget=function(t){return this.expandTargets(t||":main",this.layers[0])[0]},o.prototype.preflightProps=function(t){return void 0===t&&(t={}),this.seekPlan((function(t){return t.preflightProps()}))||t.optional||this.preflightTargetNotApplicable()},o.prototype.preflightTargetNotApplicable=function(){this.targetNotApplicable("Could not find target in current page")},o.prototype.postflightTargetNotApplicable=function(){this.targetNotApplicable("Could not find common target in current page and response")},o.prototype.targetNotApplicable=function(t){if(this.getPlans().length){var e=r.uniq(r.map(this.getPlans(),"target")),n=up.layer.optionToString(this.options.layer);up.fail(t+" (tried selectors %o in %s)",e,n)}else this.layers.length?up.fail("No target selector given"):up.fail("Layer %o does not exist",this.options.layer)},o.prototype.seekPlan=function(t){for(var e=0,n=this.getPlans();e<n.length;e++){var r=n[e];try{return t(r)}catch(t){if(!up.error.notApplicable.is(t))throw t}}},o}(up.Change)},2200:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.Change.FromURL=function(t){function o(e){var n=t.call(this,e)||this;return n.options.layer=up.layer.getAll(n.options),n.options.normalizeLayerOptions=!1,n.successOptions=n.options,n.failOptions=up.RenderOptions.deriveFailOptions(n.successOptions),n}return e(o,t),o.prototype.execute=function(){var t=this,e=this.newPageReason();if(e)return up.puts("up.render()",e),up.network.loadPage(this.options),r.unresolvablePromise();var n=this.makeRequest();return this.options.preload?n:r.always(n,(function(e){return t.onRequestSettled(e)}))},o.prototype.newPageReason=function(){return r.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":up.browser.canPushState()?void 0:"Loading content in new page to restore history support"},o.prototype.makeRequest=function(){var t=this.preflightPropsForRenderOptions(this.successOptions),e=this.preflightPropsForRenderOptions(this.failOptions,{optional:!0}),n=r.merge(this.successOptions,t,r.renameKeys(e,up.fragment.failKey));return this.request=up.request(n),this.request},o.prototype.preflightPropsForRenderOptions=function(t,e){return new up.Change.FromContent(n(n({},t),{preview:!0})).preflightProps(e)},o.prototype.onRequestSettled=function(t){if(this.response=t,t instanceof up.Response){if(this.isSuccessfulResponse())return this.updateContentFromResponse(["Loaded fragment from successful response to %s",this.request.description],this.successOptions);var e=["Loaded fragment from failed response to %s (HTTP %d)",this.request.description,this.response.status];throw this.updateContentFromResponse(e,this.failOptions)}throw t},o.prototype.isSuccessfulResponse=function(){return!1===this.successOptions.fail||this.response.ok},o.prototype.updateContentFromResponse=function(t,e){return this.request.assertEmitted("up:fragment:loaded",{callback:this.options.onLoaded,response:this.response,log:t,renderOptions:e}),this.augmentOptionsFromResponse(e),new up.Change.FromContent(e).execute()},o.prototype.augmentOptionsFromResponse=function(t){var e=this.response.url,n=e,o=this.request.hash;o&&(t.hash=o,n+=o),"GET"===this.response.method?t.source=this.improveHistoryValue(t.source,e):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,n),t.title=this.improveHistoryValue(t.title,this.response.title),t.eventPlans=this.response.eventPlans;var i=this.response.target;i&&(t.target=i),t.document=this.response.text,t.acceptLayer=this.response.acceptLayer,t.dismissLayer=this.response.dismissLayer,t.document||!r.isDefined(t.acceptLayer)&&!r.isDefined(t.dismissLayer)||(t.target=":none"),t.context=r.merge(t.context,this.response.context),t.cspNonces=this.response.cspNonces},o}(up.Change)},7050:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};up.Change.OpenLayer=function(t){function r(e){var n=t.call(this,e)||this;return n.target=e.target,n.origin=e.origin,n.baseLayer=e.baseLayer,n}return e(r,t),r.prototype.preflightProps=function(){return{layer:this.baseLayer,mode:this.options.mode,context:this.buildLayer().context,target:this.target}},r.prototype.bestPreflightSelector=function(){return this.target},r.prototype.execute=function(t,e){var n=this;if(":none"===this.target?this.content=document.createElement("up-none"):this.content=t.select(this.target),!this.content||this.baseLayer.isClosed())throw this.notApplicable();if(e(),up.puts("up.render()",'Opening element "'+this.target+'" in new overlay'),this.options.title=this.improveHistoryValue(this.options.title,t.getTitle()),this.emitOpenEvent().defaultPrevented)throw up.error.aborted("Open event was prevented");return this.baseLayer.peel(),this.layer=this.buildLayer(),up.layer.stack.push(this.layer),this.layer.createElements(this.content),this.layer.setupHandlers(),this.handleHistory(),this.setSource({newElement:this.content,source:this.options.source}),t.finalizeElement(this.content),up.hello(this.layer.element,{layer:this.layer,origin:this.origin}),this.handleLayerChangeRequests(),this.handleScroll(),this.layer.startOpenAnimation().then((function(){n.layer.isOpen()&&n.handleFocus(),n.onFinished()})),this.layer.opening=!1,this.emitOpenedEvent(),this.abortWhenLayerClosed(),new up.RenderResult({layer:this.layer,fragments:[this.content]})},r.prototype.buildLayer=function(){var t=this,e=n(n({},this.options),{opening:!0});return up.layer.build(e,(function(e){return t.options=up.RenderOptions.finalize(e)}))},r.prototype.handleHistory=function(){"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory(this.content)),this.layer.parent.saveHistory(),this.layer.updateHistory(this.options)},r.prototype.handleFocus=function(){var t;null===(t=this.baseLayer.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.content,layer:this.layer,autoMeans:["autofocus","layer"]}).process(this.options.focus)},r.prototype.handleScroll=function(){var t=n(n({},this.options),{fragment:this.content,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)},r.prototype.emitOpenEvent=function(){return up.emit("up:layer:open",{origin:this.origin,baseLayer:this.baseLayer,layerOptions:this.options,log:"Opening new overlay"})},r.prototype.emitOpenedEvent=function(){return this.layer.emit("up:layer:opened",{origin:this.origin,callback:this.layer.callback("onOpened"),log:"Opened new "+this.layer})},r}(up.Change.Addition)},1752:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Change.Removal=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n}(up.Change)},9441:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},i=up.util,s=up.element;up.Change.UpdateLayer=function(t){function u(e){var n=this;return e=up.RenderOptions.finalize(e),(n=t.call(this,e)||this).layer=e.layer,n.target=e.target,n.placement=e.placement,n.context=e.context,n.parseSteps(),n}return e(u,t),u.prototype.preflightProps=function(){return this.matchPreflight(),{layer:this.layer,mode:this.layer.mode,context:i.merge(this.layer.context,this.context),target:this.bestPreflightSelector()}},u.prototype.bestPreflightSelector=function(){return this.matchPreflight(),i.map(this.steps,"selector").join(", ")||":none"},u.prototype.execute=function(t,e){var n=this;this.responseDoc=t,this.matchPostflight(),e(),up.puts("up.render()",'Updating "'+this.bestPreflightSelector()+'" in '+this.layer),this.options.title=this.improveHistoryValue(this.options.title,this.responseDoc.getTitle()),this.setScrollAndFocusOptions(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.peel&&this.layer.peel(),i.assign(this.layer.context,this.context),"auto"===this.options.history&&(this.options.history=this.hasAutoHistory()),this.options.history&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests();var r=this.steps.map((function(t){return n.executeStep(t)}));return Promise.all(r).then((function(){return n.abortWhenLayerClosed(),n.onFinished()})),new up.RenderResult({layer:this.layer,fragments:i.map(this.steps,"newElement")})},u.prototype.executeStep=function(t){return r(this,void 0,void 0,(function(){var e,r,i,u,a,c,p,l,f=this;return o(this,(function(o){switch(o.label){case 0:switch(this.setSource(t),t.placement){case"swap":return[3,1];case"content":return[3,6];case"before":case"after":return[3,9]}return[3,13];case 1:return(e=this.findKeepPlan(t))?(up.fragment.emitKept(e),this.handleFocus(t.oldElement,t),[4,this.handleScroll(t.oldElement,t)]):[3,3];case 2:return o.sent(),[3,5];case 3:return this.transferKeepableElements(t),r=t.oldElement.parentNode,i=n(n({},t),{beforeStart:function(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:function(){f.responseDoc.finalizeElement(t.newElement),up.hello(t.newElement,t)},beforeDetach:function(){up.syntax.clean(t.oldElement,{layer:f.layer})},afterDetach:function(){s.remove(t.oldElement),up.fragment.emitDestroyed(t.oldElement,{parent:r,log:!1})},scrollNew:function(){return f.handleFocus(t.newElement,t),f.handleScroll(t.newElement,t)}}),[4,up.morph(t.oldElement,t.newElement,t.transition,i)];case 4:o.sent(),o.label=5;case 5:return[3,14];case 6:return u=s.wrapChildren(t.oldElement),a=s.wrapChildren(t.newElement),c=n(n({},t),{placement:"swap",oldElement:u,newElement:a,focus:!1}),[4,this.executeStep(c)];case 7:return o.sent(),s.unwrap(a),[4,this.handleFocus(t.oldElement,t)];case 8:return o.sent(),[3,14];case 9:return p=s.wrapChildren(t.newElement),l="before"===t.placement?"afterbegin":"beforeend",t.oldElement.insertAdjacentElement(l,p),this.responseDoc.finalizeElement(p),up.hello(p,t),this.handleFocus(p,t),[4,this.handleScroll(p,t)];case 10:return o.sent(),[4,up.animate(p,t.transition,t)];case 11:return o.sent(),[4,s.unwrap(p)];case 12:return o.sent(),[3,14];case 13:up.fail("Unknown placement: %o",t.placement),o.label=14;case 14:return[2]}}))}))},u.prototype.findKeepPlan=function(t){if(t.keep){var e=t.oldElement,n=t.newElement,r=s.booleanOrStringAttr(e,"up-keep");if(r){!0===r&&(r="&");var o,i={layer:this.layer,origin:e};if((o=t.descendantsOnly?up.fragment.get(n,r,i):up.fragment.subtree(n,r,i)[0])&&s.matches(o,"[up-keep]")){var u={oldElement:e,newElement:o,newData:up.syntax.data(o)};if(!up.fragment.emitKeep(u).defaultPrevented)return u}}}},u.prototype.transferKeepableElements=function(t){var e=[];if(t.keep)for(var r=0,o=t.oldElement.querySelectorAll("[up-keep]");r<o.length;r++){var i=o[r],u=this.findKeepPlan(n(n({},t),{oldElement:i,descendantsOnly:!0}));if(u){var a=i.cloneNode(!0);s.replace(i,a),s.replace(u.newElement,i),e.push(u)}}t.keepPlans=e},u.prototype.parseSteps=function(){this.steps=[];for(var t=0,e=i.splitValues(this.target,",");t<e.length;t++){var r=e[t];if(":none"!==r){var o=r.match(/^(.+?)(?::(before|after))?$/);if(!o)throw up.error.invalidSelector(r);var s=n(n({},this.options),{selector:o[1],placement:o[2]||this.placement||"swap"});this.steps.push(s)}}},u.prototype.matchPreflight=function(){if(!this.matchedPreflight){for(var t=0,e=this.steps;t<e.length;t++){var n=e[t],r=new up.FragmentFinder(n);if(n.oldElement||(n.oldElement=r.find()),!n.oldElement)throw this.notApplicable('Could not find element "'+this.target+'" in current page')}this.resolveOldNesting(),this.matchedPreflight=!0}},u.prototype.matchPostflight=function(){if(!this.matchedPostflight){this.matchPreflight();for(var t=0,e=this.steps;t<e.length;t++){var n=e[t],r=this.responseDoc.select(n.selector);if(!r)throw this.notApplicable('Could not find element "'+this.target+'" in server response');n.newElement=r}this.options.hungry&&this.addHungrySteps(),this.resolveOldNesting(),this.matchedPostflight=!0}},u.prototype.addHungrySteps=function(){for(var t=0,e=up.fragment.all(up.radio.hungrySelector(),this.options);t<e.length;t++){var n=e[t],r=up.fragment.toTarget(n),o=this.responseDoc.select(r);if(o){var i={selector:r,oldElement:n,newElement:o,transition:s.booleanOrStringAttr(n,"transition"),placement:"swap"};this.steps.push(i)}}},u.prototype.containedByRivalStep=function(t,e){return i.some(t,(function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)}))},u.prototype.resolveOldNesting=function(){var t=this,e=i.uniqBy(this.steps,"oldElement");e=i.reject(e,(function(n){return t.containedByRivalStep(e,n)})),this.steps=e},u.prototype.setScrollAndFocusOptions=function(){var t=this;this.steps.forEach((function(e,n){n>0&&(e.scroll=!1,e.focus=!1),"swap"!==e.placement&&"content"!==e.placement||(e.scrollBehavior="auto",t.focusCapsule||(t.focusCapsule=up.FocusCapsule.preserveWithin(e.oldElement)))}))},u.prototype.handleFocus=function(t,e){return new up.FragmentFocus(n(n({},e),{fragment:t,layer:this.layer,focusCapsule:this.focusCapsule,autoMeans:up.fragment.config.autoFocus})).process(e.focus)},u.prototype.handleScroll=function(t,e){return new up.FragmentScrolling(n(n({},e),{fragment:t,layer:this.layer,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)},u.prototype.hasAutoHistory=function(){var t=i.map(this.steps,"oldElement");return i.some(t,(function(t){return up.fragment.hasAutoHistory(t)}))},u}(up.Change.Addition)},1569:function(){var t=up.util,e=up.element;up.CompilerPass=function(){function n(t,e,n){void 0===n&&(n={}),this.root=t,this.compilers=e,this.skipSubtrees=n.skip,this.skipSubtrees.length&&this.root.querySelector("[up-keep]")||(this.skipSubtrees=void 0),this.layer=n.layer||up.layer.get(this.root)||up.layer.current,this.errors=[]}return n.prototype.run=function(){var t=this;if(up.puts("up.hello()","Compiling fragment %o",this.root),this.layer.asCurrent((function(){for(var e=0,n=t.compilers;e<n.length;e++){var r=n[e];t.runCompiler(r)}})),this.errors.length)throw up.error.failed("Errors while compiling",{errors:this.errors})},n.prototype.runCompiler=function(t){var e,n,r=this.select(t.selector);if(r.length){if(t.isDefault||up.puts("up.hello()",'Compiling "%s" on %d element(s)',t.selector,r.length),t.batch)this.compileBatch(t,r);else for(var o=0,i=r;o<i.length;o++){var s=i[o];this.compileOneElement(t,s)}return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,r,t)}},n.prototype.compileOneElement=function(t,e){var n=[t.jQuery?up.browser.jQuery(e):e];if(1!==t.length){var r=up.syntax.data(e);n.push(r)}var o=this.applyCompilerFunction(t,e,n),i=this.destructorPresence(o);i&&up.destructor(e,i)},n.prototype.compileBatch=function(e,n){var r=[e.jQuery?up.browser.jQuery(n):n];if(1!==e.length){var o=t.map(n,up.syntax.data);r.push(o)}var i=this.applyCompilerFunction(e,n,r);this.destructorPresence(i)&&up.fail("Compilers with { batch: true } cannot return destructors")},n.prototype.applyCompilerFunction=function(t,e,n){try{return t.apply(e,n)}catch(t){this.errors.push(t),up.log.error("up.hello()","While compiling %o: %o",e,t),up.error.emitGlobal(t)}},n.prototype.destructorPresence=function(e){if(t.isFunction(e)||t.isArray(e)&&t.every(e,t.isFunction))return e},n.prototype.select=function(n){var r=this,o=e.subtree(this.root,t.evalOption(n));return this.skipSubtrees&&(o=t.reject(o,(function(t){return r.isInSkippedSubtree(t)}))),o},n.prototype.isInSkippedSubtree=function(e){var n;return!!t.contains(this.skipSubtrees,e)||!!(n=e.parentElement)&&this.isInSkippedSubtree(n)},n}()},3742:function(){var t=up.util;up.Config=function(){function e(t){void 0===t&&(t=function(){return{}}),this.blueprintFn=t,this.reset()}return e.prototype.reset=function(){t.assign(this,this.blueprintFn())},e}()},2737:function(){var t=up.util,e=up.element;up.CSSTransition=function(){function n(e,n,r){this.element=e,this.lastFrameKebab=n,this.lastFrameKeysKebab=Object.keys(this.lastFrameKebab),t.some(this.lastFrameKeysKebab,(function(t){return t.match(/A-Z/)}))&&up.fail("Animation keys must be kebab-case"),this.finishEvent=r.finishEvent,this.duration=r.duration,this.easing=r.easing,this.finished=!1}return n.prototype.start=function(){return 0===this.lastFrameKeysKebab.length?(this.finished=!0,Promise.resolve()):(this.deferred=t.newDeferred(),this.pauseOldTransition(),this.startTime=new Date,this.startFallbackTimer(),this.listenToFinishEvent(),this.listenToTransitionEnd(),this.startMotion(),this.deferred.promise())},n.prototype.listenToFinishEvent=function(){this.finishEvent&&(this.stopListenToFinishEvent=up.on(this.element,this.finishEvent,this.onFinishEvent.bind(this)))},n.prototype.onFinishEvent=function(t){t.stopPropagation(),this.finish()},n.prototype.startFallbackTimer=function(){var e=this;this.fallbackTimer=t.timer(this.duration+100,(function(){e.finish()}))},n.prototype.stopFallbackTimer=function(){clearTimeout(this.fallbackTimer)},n.prototype.listenToTransitionEnd=function(){this.stopListenToTransitionEnd=up.on(this.element,"transitionend",this.onTransitionEnd.bind(this))},n.prototype.onTransitionEnd=function(e){if(e.target===this.element&&!(new Date-this.startTime<=.25*this.duration)){var n=e.propertyName;t.contains(this.lastFrameKeysKebab,n)&&this.finish()}},n.prototype.finish=function(){var t,n;this.finished||(this.finished=!0,this.stopFallbackTimer(),null===(t=this.stopListenToFinishEvent)||void 0===t||t.call(this),null===(n=this.stopListenToTransitionEnd)||void 0===n||n.call(this),e.concludeCSSTransition(this.element),this.resumeOldTransition(),this.deferred.resolve())},n.prototype.pauseOldTransition=function(){var t=e.style(this.element,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]);if(e.hasCSSTransition(t)){if("all"!==t.transitionProperty){var n=t.transitionProperty.split(/\s*,\s*/),r=e.style(this.element,n);this.setOldTransitionTargetFrame=e.setTemporaryStyle(this.element,r)}this.setOldTransition=e.concludeCSSTransition(this.element)}},n.prototype.resumeOldTransition=function(){var t,e;null===(t=this.setOldTransitionTargetFrame)||void 0===t||t.call(this),null===(e=this.setOldTransition)||void 0===e||e.call(this)},n.prototype.startMotion=function(){e.setStyle(this.element,{transitionProperty:Object.keys(this.lastFrameKebab).join(", "),transitionDuration:this.duration+"ms",transitionTimingFunction:this.easing}),e.setStyle(this.element,this.lastFrameKebab)},n}()},3635:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=up.util;up.DestructorPass=function(){function n(t,e){this.fragment=t,this.options=e,this.errors=[]}return n.prototype.run=function(){for(var t=0,n=this.selectCleanables();t<n.length;t++){var r=n[t],o=e.pluckKey(r,"upDestructors");if(o)for(var i=0,s=o;i<s.length;i++){var u=s[i];this.applyDestructorFunction(u,r)}r.classList.remove("up-can-clean")}if(this.errors.length)throw up.error.failed("Errors while destroying",{errors:this.errors})},n.prototype.selectCleanables=function(){var e=t(t({},this.options),{destroying:!0});return up.fragment.subtree(this.fragment,".up-can-clean",e)},n.prototype.applyDestructorFunction=function(t,e){try{t()}catch(t){this.errors.push(t),up.log.error("up.destroy()","While destroying %o: %o",e,t),up.error.emitGlobal(t)}},n}()},1906:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},r=up.util,o=up.element;up.EventEmitter=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.keys=function(){return["target","event","baseLayer","callback","log","ensureBubbles"]},i.prototype.emit=function(){var t=this;return this.logEmission(),this.baseLayer?this.baseLayer.asCurrent((function(){return t.dispatchEvent()})):this.dispatchEvent(),this.event},i.prototype.dispatchEvent=function(){var t;this.target.dispatchEvent(this.event),this.ensureBubbles&&o.isDetached(this.target)&&document.dispatchEvent(this.event),null===(t=this.callback)||void 0===t||t.call(this,this.event)},i.prototype.assertEmitted=function(){var t=this.emit();if(t.defaultPrevented)throw up.error.aborted("Event "+t.type+" was prevented")},i.prototype.logEmission=function(){var t;if(up.log.isEnabled()){var e,o=this.log;r.isArray(o)?(o=(t=o)[0],e=t.slice(1)):e=[];var i=this.event.type;r.isString(o)?up.puts.apply(up,n([i,o],e)):!1!==o&&up.puts(i,"Event "+i)}},i.fromEmitArgs=function(t,e){var n;void 0===e&&(e={});var i,s=r.extractOptions(t);return s=r.merge(e,s),r.isElementish(t[0])?s.target=o.get(t.shift()):t[0]instanceof up.Layer&&(s.layer=t.shift()),s.layer&&(i=up.layer.get(s.layer),null==s.target&&(s.target=i.element),null==s.baseLayer&&(s.baseLayer=i)),s.baseLayer&&(s.baseLayer=up.layer.get(s.baseLayer)),r.isString(s.target)?s.target=up.fragment.get(s.target,{layer:s.layer}):s.target||(s.target=document),(null===(n=t[0])||void 0===n?void 0:n.preventDefault)?(s.event=t[0],null==s.log&&(s.log=t[0].log)):r.isString(t[0])?s.event=up.event.build(t[0],s):s.event=up.event.build(s),new this(s)},i}(up.Record)},4158:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},r=up.util,o=up.element;up.EventListener=function(t){function i(e){var n,r=t.call(this,e)||this;return r.key=r.constructor.buildKey(e),r.isDefault=up.framework.evaling,null!==(n=r.beforeBoot)&&void 0!==n||(r.beforeBoot=0===r.eventType.indexOf("up:framework:")),r.nativeCallback=r.nativeCallback.bind(r),r}return e(i,t),i.prototype.keys=function(){return["element","eventType","selector","callback","jQuery","guard","baseLayer","passive","once","beforeBoot"]},i.prototype.bind=function(){var t,e,n=(e=this.element).upEventListeners||(e.upEventListeners={});n[this.key]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),n[this.key]=this,(t=this.element).addEventListener.apply(t,this.addListenerArgs())},i.prototype.addListenerArgs=function(){var t=[this.eventType,this.nativeCallback];return this.passive&&up.browser.canPassiveEventListener()&&t.push({passive:!0}),t},i.prototype.unbind=function(){var t,e=this.element.upEventListeners;e&&delete e[this.key],(t=this.element).removeEventListener.apply(t,this.addListenerArgs())},i.prototype.nativeCallback=function(t){var e;if(!up.framework.beforeBoot||this.beforeBoot){this.once&&this.unbind();var i=t.target;if(this.selector&&(i=o.closest(i,r.evalOption(this.selector))),(!this.guard||this.guard(t))&&i){var s=[t,this.jQuery?up.browser.jQuery(i):i],u=this.callback.length;if(1!==u&&2!==u){var a=up.syntax.data(i);s.push(a)}var c=(e=this.callback).bind.apply(e,n([i],s));this.baseLayer?this.baseLayer.asCurrent(c):c()}}},i.fromElement=function(t){var e=t.element.upEventListeners;if(e)return e[this.buildKey(t)]},i.buildKey=function(t){var e;return(e=t.callback).upUid||(e.upUid=r.uid()),[t.eventType,t.selector,t.callback.upUid].join("|")},i.allNonDefault=function(t){var e=t.upEventListeners;if(e){var n=r.values(e);return r.reject(n,"isDefault")}return[]},i}(up.Record)},3139:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.EventListenerGroup=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e(o,t),o.prototype.keys=function(){return["elements","eventTypes","selector","callback","jQuery","guard","baseLayer","passive","once","beforeBoot"]},o.prototype.bind=function(){var t=[];return this.eachListenerAttributes((function(e){var n=new up.EventListener(e);return n.bind(),t.push(n.unbind.bind(n))})),r.sequence(t)},o.prototype.eachListenerAttributes=function(t){for(var e=0,n=this.elements;e<n.length;e++)for(var r=n[e],o=0,i=this.eventTypes;o<i.length;o++){var s=i[o];t(this.listenerAttributes(r,s))}},o.prototype.listenerAttributes=function(t,e){return n(n({},this.attributes()),{element:t,eventType:e})},o.prototype.unbind=function(){this.eachListenerAttributes((function(t){var e=up.EventListener.fromElement(t);e&&e.unbind()}))},o.fromBindArgs=function(t,e){var o,i=(t=r.copy(t)).pop();o=t[0].addEventListener?[t.shift()]:r.isJQuery(t[0])||r.isList(t[0])&&t[0][0].addEventListener?t.shift():[document];var s=r.splitValues(t.shift()),u=up.migrate.fixEventTypes;u&&(s=u(s));var a=r.extractOptions(t),c=t[0];return new this(n(n({elements:o,eventTypes:s,selector:c,callback:i},a),e))},o}(up.Record)},6866:function(){var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},e=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},n=up.util,r=up.element;up.FieldObserver=function(){function o(t,e,n){this.scheduleValues=this.scheduleValues.bind(this),this.isNewValues=this.isNewValues.bind(this),this.callback=n,this.fields=r.list(t),this.delay=e.delay,this.batch=e.batch}return o.prototype.start=function(){var t=this;this.scheduledValues=null,this.processedValues=this.readFieldValues(),this.currentTimer=void 0,this.callbackRunning=!1,this.unbind=up.on(this.fields,"input change",(function(){return t.check()}))},o.prototype.stop=function(){this.unbind(),this.cancelTimer()},o.prototype.cancelTimer=function(){clearTimeout(this.currentTimer),this.currentTimer=void 0},o.prototype.scheduleTimer=function(){var t=this;this.cancelTimer(),this.currentTimer=n.timer(this.delay,(function(){t.currentTimer=void 0,t.requestCallback()}))},o.prototype.scheduleValues=function(t){this.scheduledValues=t,this.scheduleTimer()},o.prototype.isNewValues=function(t){return!n.isEqual(t,this.processedValues)&&!n.isEqual(this.scheduledValues,t)},o.prototype.requestCallback=function(){return t(this,void 0,void 0,(function(){var t,r,o,i;return e(this,(function(e){switch(e.label){case 0:if(null===this.scheduledValues||this.currentTimer||this.callbackRunning)return[3,2];if(t=this.changedValues(this.processedValues,this.scheduledValues),this.processedValues=this.scheduledValues,this.scheduledValues=null,this.callbackRunning=!0,r=[],this.batch)r.push(this.callback(t));else for(o in t)i=t[o],r.push(this.callback(i,o));return[4,n.allSettled(r)];case 1:e.sent(),this.callbackRunning=!1,this.requestCallback(),e.label=2;case 2:return[2]}}))}))},o.prototype.changedValues=function(t,e){var r={},o=Object.keys(t);o=o.concat(Object.keys(e));for(var i=0,s=o=n.uniq(o);i<s.length;i++){var u=s[i],a=t[u],c=e[u];n.isEqual(a,c)||(r[u]=c)}return r},o.prototype.readFieldValues=function(){return up.Params.fromFields(this.fields).toObject()},o.prototype.check=function(){var t=this.readFieldValues();this.isNewValues(t)&&this.scheduleValues(t)},o}()},665:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.element,r=["selectionStart","selectionEnd","scrollLeft","scrollTop"];function o(t,e){for(var n=0,o=r;n<o.length;n++){var i=o[n];try{e[i]=t[i]}catch(t){}}}function i(t){var e=document.activeElement;if(n.isInSubtree(t,e))return e}up.FocusCapsule=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return e(s,t),s.prototype.keys=function(){return["selector","oldElement"].concat(r)},s.prototype.restore=function(t,e){if(this.wasLost()){var r=n.get(t,this.selector);return r?(o(this,r),up.focus(r,e),!0):void 0}},s.preserveWithin=function(t){var e=i(t);if(e){var n={oldElement:t,selector:up.fragment.toTarget(e)};return o(e,n),new this(n)}},s.prototype.wasLost=function(){return!i(this.oldElement)},s}(up.Record)},2587:function(){var t=/^([^ >+(]+) (.+)$/;up.FragmentFinder=function(){function e(t){this.options=t,this.origin=this.options.origin,this.selector=this.options.selector,this.layer=this.options.layer}return e.prototype.find=function(){return this.findAroundOrigin()||this.findInLayer()},e.prototype.findAroundOrigin=function(){if(this.origin&&up.fragment.config.matchAroundOrigin&&!up.element.isDetached(this.origin))return this.findClosest()||this.findInVicinity()},e.prototype.findClosest=function(){return up.fragment.closest(this.origin,this.selector,this.options)},e.prototype.findInVicinity=function(){var e=this.selector.match(t);if(e){var n=up.fragment.closest(this.origin,e[1],this.options);if(n)return up.fragment.getDumb(n,e[2])}},e.prototype.findInLayer=function(){return up.fragment.getDumb(this.selector,this.options)},e}()},7031:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util,r=up.element,o={preventScroll:!0};up.FragmentFocus=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e(i,t),i.prototype.keys=function(){return t.prototype.keys.call(this).concat(["hash","focusCapsule"])},i.prototype.processPrimitive=function(t){switch(t){case"keep":return this.restoreFocus();case"target":case!0:return this.focusElement(this.fragment);case"layer":return this.focusElement(this.layer.getFocusElement());case"main":return this.focusSelector(":main");case"hash":return this.focusHash();case"autofocus":return this.autofocus();default:if(n.isString(t))return this.focusSelector(t)}},i.prototype.processElement=function(t){return this.focusElement(t)},i.prototype.resolveCondition=function(e){return"lost"===e?this.wasFocusLost():t.prototype.resolveCondition.call(this,e)},i.prototype.focusSelector=function(t){var e=this.findSelector(t);if(e)return this.focusElement(e)},i.prototype.restoreFocus=function(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.fragment,o)},i.prototype.autofocus=function(){var t=r.subtree(this.fragment,"[autofocus]")[0];if(t)return up.focus(t,o),!0},i.prototype.focusElement=function(t){return up.viewport.makeFocusable(t),up.focus(t,o),!0},i.prototype.focusHash=function(){var t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.focusElement(t)},i.prototype.wasFocusLost=function(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()},i}(up.FragmentProcessor)},2828:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.FragmentProcessor=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.keys=function(){return["fragment","autoMeans","origin","layer"]},r.prototype.process=function(t){return this.tryProcess(t)},r.prototype.tryProcess=function(t){var e=this;if(n.isArray(t))return n.find(t,(function(t){return e.tryProcess(t)}));if(n.isFunction(t))return this.tryProcess(t(this.fragment,this.attributes()));if(n.isElement(t))return this.processElement();if(n.isString(t)){if("auto"===t)return this.tryProcess(this.autoMeans);var r=t.match(/^(.+?)-if-(.+?)$/);if(r)return this.resolveCondition(r[2])&&this.process(r[1])}return this.processPrimitive(t)},r.prototype.resolveCondition=function(t){if("main"===t)return up.fragment.contains(this.fragment,":main")},r.prototype.findSelector=function(t){var e={layer:this.layer,origin:this.origin},n=up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e);if(n)return n;up.warn("up.render()",'Could not find an element matching "%s"',t)},r}(up.Record)},4850:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.util;up.FragmentScrolling=function(t){function o(e){var n,r;return null===(r=(n=up.migrate).handleScrollOptions)||void 0===r||r.call(n,e),t.call(this,e)||this}return e(o,t),o.prototype.keys=function(){return t.prototype.keys.call(this).concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior","scrollSpeed"])},o.prototype.process=function(e){return t.prototype.process.call(this,e)||Promise.resolve()},o.prototype.processPrimitive=function(t){switch(t){case"reset":return this.reset();case"layer":return this.revealLayer();case"main":return this.revealSelector(":main");case"restore":return this.restore();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.revealElement(this.fragment);default:if(r.isString(t))return this.revealSelector(t)}},o.prototype.processElement=function(t){return this.revealElement(t)},o.prototype.revealElement=function(t){return up.reveal(t,this.attributes())},o.prototype.revealSelector=function(t){var e=this.findSelector(t);if(e)return this.revealElement(e)},o.prototype.revealLayer=function(){return this.revealElement(this.layer.getBoxElement())},o.prototype.reset=function(){return up.viewport.resetScroll(n(n({},this.attributes()),{around:this.fragment}))},o.prototype.restore=function(){return up.viewport.restoreScroll(n(n({},this.attributes()),{around:this.fragment}))},o}(up.FragmentProcessor)},6267:function(){var t=up.util,e=up.element;up.HTMLWrapper=function(){function n(t){this.tagName=t;var e="<"+this.tagName+"[^>]*>",n="</"+this.tagName+">";this.pattern=new RegExp(e+"(.|\\s)*?"+n,"ig"),this.attrName="up-wrapped-"+this.tagName}return n.prototype.strip=function(t){return t.replace(this.pattern,"")},n.prototype.wrap=function(t){return t.replace(this.pattern,this.wrapMatch.bind(this))},n.prototype.wrapMatch=function(e){return this.didWrap=!0,'<meta name="'+this.attrName+'" value="'+t.escapeHTML(e)+'">'},n.prototype.unwrap=function(t){if(this.didWrap)for(var n=0,r=t.querySelectorAll("meta[name='"+this.attrName+"']");n<r.length;n++){var o=r[n],i=o.getAttribute("value"),s=e.createFromHTML(i);e.replace(o,s)}},n}()},7956:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},r=up.element,o=up.util;up.Layer=function(t){function i(e){void 0===e&&(e={});var n=t.call(this,e)||this;if(!n.mode)throw"missing { mode } option";return n}return e(i,t),i.prototype.keys=function(){return["element","stack","history","mode","context","lastScrollTops"]},i.prototype.defaults=function(){return{context:{},lastScrollTops:new up.Cache({size:30,key:up.history.normalizeURL})}},i.prototype.setupHandlers=function(){up.link.convertClicks(this)},i.prototype.teardownHandlers=function(){},i.prototype.mainTargets=function(){return up.layer.mainTargets(this.mode)},i.prototype.sync=function(){},i.prototype.accept=function(){throw up.error.notImplemented()},i.prototype.dismiss=function(){throw up.error.notImplemented()},i.prototype.peel=function(t){this.stack.peel(this,t)},i.prototype.evalOption=function(t){return o.evalOption(t,this)},i.prototype.isCurrent=function(){return this.stack.isCurrent(this)},i.prototype.isFront=function(){return this.stack.isFront(this)},i.prototype.isRoot=function(){return this.stack.isRoot(this)},i.prototype.isOverlay=function(){return this.stack.isOverlay(this)},i.prototype.isOpen=function(){return this.stack.isOpen(this)},i.prototype.isClosed=function(){return this.stack.isClosed(this)},Object.defineProperty(i.prototype,"parent",{get:function(){return this.stack.parentOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"child",{get:function(){return this.stack.childOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"ancestors",{get:function(){return this.stack.ancestorsOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"descendants",{get:function(){return this.stack.descendantsOf(this)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"index",{get:function(){return this.stack.indexOf(this)},enumerable:!1,configurable:!0}),i.prototype.getContentElement=function(){return this.contentElement||this.element},i.prototype.getBoxElement=function(){return this.boxElement||this.element},i.prototype.getFocusElement=function(){return this.getBoxElement()},i.prototype.getFirstSwappableElement=function(){throw up.error.notImplemented()},i.prototype.contains=function(t){return r.closest(t,up.layer.anySelector())===this.element},i.prototype.on=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventListenerGroup(t).bind()},i.prototype.off=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventListenerGroup(t).unbind()},i.prototype.buildEventListenerGroup=function(t){var e=this;return up.EventListenerGroup.fromBindArgs(t,{guard:function(t){return e.containsEventTarget(t)},elements:[this.element],baseLayer:this})},i.prototype.containsEventTarget=function(t){return this.contains(t.target)},i.prototype.wasHitByMouseEvent=function(t){var e=document.elementFromPoint(t.clientX,t.clientY);return!e||this.contains(e)},i.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})},i.prototype.emit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventEmitter(t).emit()},i.prototype.isDetached=function(){return r.isDetached(this.element)},i.prototype.saveHistory=function(){this.isHistoryVisible()&&(this.savedTitle=document.title,this.savedLocation=up.history.location)},i.prototype.restoreHistory=function(){this.savedLocation&&(up.history.push(this.savedLocation),this.savedLocation=null),this.savedTitle&&(document.title=this.savedTitle,this.savedTitle=null)},i.prototype.asCurrent=function(t){return this.stack.asCurrent(this,t)},i.prototype.updateHistory=function(t){o.isString(t.title)&&(this.title=t.title),o.isString(t.location)&&(this.location=t.location)},i.prototype.isHistoryVisible=function(){return this.history&&(this.isRoot()||this.parent.isHistoryVisible())},i.prototype.showsLiveHistory=function(){return this.isHistoryVisible()&&this.isFront()&&(up.history.config.enabled||this.isRoot())},Object.defineProperty(i.prototype,"title",{get:function(){return this.showsLiveHistory()?document.title:this.savedTitle},set:function(t){this.savedTitle=t,this.showsLiveHistory()&&(document.title=t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"location",{get:function(){return this.showsLiveHistory()?up.history.location:this.savedLocation},set:function(t){this.savedLocation!==(t=up.history.normalizeURL(t))&&(this.savedLocation=t,this.emit("up:layer:location:changed",{location:t,log:!1}),this.showsLiveHistory()&&up.history.push(t))},enumerable:!1,configurable:!0}),i.prototype.selector=function(t){return this.constructor.selector(t)},i.selector=function(t){throw up.error.notImplemented()},i.prototype.toString=function(){throw up.error.notImplemented()},i.prototype.affix=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.affix.apply(r,n([this.getFirstSwappableElement()],t))},i.prototype[o.isEqual.key]=function(t){return this.constructor===t.constructor&&this.element===t.element},i}(up.Record)},7101:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Cover=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithViewport)).mode="cover",e)},5580:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Drawer=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithViewport)).mode="drawer",e)},86:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Modal=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithViewport)).mode="modal",e)},7403:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=up.element,o=up.util;up.Layer.Overlay=function(t){function i(e){var n=t.call(this,e)||this;return!0===n.dismissable?n.dismissable=["button","key","outside"]:!1===n.dismissable?n.dismissable=[]:n.dismissable=o.splitValues(n.dismissable),n.acceptLocation&&(n.acceptLocation=new up.URLPattern(n.acceptLocation)),n.dismissLocation&&(n.dismissLocation=new up.URLPattern(n.dismissLocation)),n}return e(i,t),i.prototype.keys=function(){return t.prototype.keys.call(this).concat(["position","align","size","origin","class","backdrop","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","backdropOpenAnimation","backdropCloseAnimation","dismissable","dismissLabel","dismissAriaLabel","onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"])},i.prototype.callback=function(t){var e=this[t];if(e)return e.bind(this)},i.prototype.createElement=function(t){this.nesting||(this.nesting=this.suggestVisualNesting());var e=o.compactObject(o.pick(this,["align","position","size","class","nesting"]));this.element=this.affixPart(t,null,e)},i.prototype.createBackdropElement=function(t){this.backdropElement=this.affixPart(t,"backdrop")},i.prototype.createViewportElement=function(t){this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})},i.prototype.createBoxElement=function(t){this.boxElement=this.affixPart(t,"box")},i.prototype.createContentElement=function(t,e){this.contentElement=this.affixPart(t,"content"),this.contentElement.appendChild(e)},i.prototype.createDismissElement=function(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissAriaLabel}),r.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})},i.prototype.affixPart=function(t,e,n){return void 0===n&&(n={}),r.affix(t,this.selector(e),n)},i.selector=function(t){return o.compact(["up",this.mode,t]).join("-")},i.prototype.suggestVisualNesting=function(){var t=this.parent;return this.mode===t.mode?1+t.suggestVisualNesting():0},i.prototype.setupHandlers=function(){var e,n,r=this;t.prototype.setupHandlers.call(this),this.overlayFocus=new up.OverlayFocus(this),this.supportsDismissMethod("button")&&this.createDismissElement(this.getBoxElement()),this.supportsDismissMethod("outside")&&(this.unbindParentClicked=this.parent.on("up:click",(function(t,e){var n=r.origin&&r.origin.contains(e);r.onOutsideClicked(t,n)})),this.viewportElement&&up.on(this.viewportElement,"up:click",(function(t){t.target===r.viewportElement&&r.onOutsideClicked(t,!0)}))),this.supportsDismissMethod("key")&&(this.unbindEscapePressed=up.event.onEscape((function(t){return r.onEscapePressed(t)}))),this.registerClickCloser("up-accept",(function(t,e){r.accept(t,e)})),this.registerClickCloser("up-dismiss",(function(t,e){r.dismiss(t,e)})),null===(n=(e=up.migrate).registerLayerCloser)||void 0===n||n.call(e,this),this.registerEventCloser(this.acceptEvent,this.accept),this.registerEventCloser(this.dismissEvent,this.dismiss)},i.prototype.onOutsideClicked=function(t,e){e&&up.event.halt(t),this.dismiss(":outside")},i.prototype.onEscapePressed=function(t){if(this.isFront()){var e=up.form.focusedField();e?e.blur():this.supportsDismissMethod("key")&&(up.event.halt(t),this.dismiss(":key"))}},i.prototype.registerClickCloser=function(t,e){this.on("up:click","["+t+"]",(function(n){up.event.halt(n);var o=n.target,i=r.jsonAttr(o,t),s={origin:o},u=new up.OptionsParser(s,o);u.booleanOrString("animation"),u.string("easing"),u.number("duration"),u.string("confirm"),e(i,s)}))},i.prototype.registerEventCloser=function(t,e){var n=this;if(t)return this.on(t,(function(t){t.preventDefault(),e.call(n,t)}))},i.prototype.tryAcceptForLocation=function(){this.tryCloseForLocation(this.acceptLocation,this.accept)},i.prototype.tryDismissForLocation=function(){this.tryCloseForLocation(this.dismissLocation,this.dismiss)},i.prototype.tryCloseForLocation=function(t,e){var r,o;if(t&&(r=this.location)&&(o=t.recognize(r))){var i=n(n({},o),{location:r});e.call(this,i)}},i.prototype.teardownHandlers=function(){var e,n;t.prototype.teardownHandlers.call(this),null===(e=this.unbindParentClicked)||void 0===e||e.call(this),null===(n=this.unbindEscapePressed)||void 0===n||n.call(this),this.overlayFocus.teardown()},i.prototype.destroyElements=function(t){var e=this,r=n(n({},t),{animation:function(){return e.startCloseAnimation(t)},onFinished:function(){var n;e.onElementsRemoved(),null===(n=t.onFinished)||void 0===n||n.call(t)},log:!1});up.destroy(this.element,r)},i.prototype.onElementsRemoved=function(){},i.prototype.startAnimation=function(t){void 0===t&&(t={});var e,n=up.animate(this.getBoxElement(),t.boxAnimation,t);return this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(e=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([n,e])},i.prototype.startOpenAnimation=function(t){var e,n=this;return void 0===t&&(t={}),this.startAnimation({boxAnimation:null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.openAnimation),backdropAnimation:"fade-in",easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}).then((function(){return n.wasEverVisible=!0}))},i.prototype.startCloseAnimation=function(t){var e;void 0===t&&(t={});var n=this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation));return this.startAnimation({boxAnimation:n,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})},i.prototype.accept=function(t,e){return void 0===t&&(t=null),void 0===e&&(e={}),this.executeCloseChange("accept",t,e)},i.prototype.dismiss=function(t,e){return void 0===t&&(t=null),void 0===e&&(e={}),this.executeCloseChange("dismiss",t,e)},i.prototype.supportsDismissMethod=function(t){return o.contains(this.dismissable,t)},i.prototype.executeCloseChange=function(t,e,r){return r=n(n({},r),{verb:t,value:e,layer:this}),new up.Change.CloseLayer(r).execute()},i.prototype.getFirstSwappableElement=function(){return this.getContentElement().children[0]},i.prototype.toString=function(){return this.mode+" overlay"},i}(up.Layer)},6412:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.OverlayWithTether=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.createElements=function(t){this.origin||up.fail("Missing { origin } option"),this.tether=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.tether.parent),this.createContentElement(this.element,t),this.tether.start(this.element)},n.prototype.onElementsRemoved=function(){this.tether.stop()},n.prototype.sync=function(){this.isOpen()&&(this.isDetached()||this.tether.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.tether.sync())},n}(up.Layer.Overlay)},7965:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.OverlayWithViewport=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getParentElement=function(){return document.body},e.prototype.createElements=function(t){this.shiftBody(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement,t)},e.prototype.onElementsRemoved=function(){this.unshiftBody()},e.prototype.shiftBody=function(){this.constructor.bodyShifter.shift()},e.prototype.unshiftBody=function(){this.constructor.bodyShifter.unshift()},e.prototype.sync=function(){this.isDetached()&&this.isOpen()&&this.constructor.getParentElement().appendChild(this.element)},e}(up.Layer.Overlay)).bodyShifter=new up.BodyShifter,e)},4552:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Layer.Popup=((e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(up.Layer.OverlayWithTether)).mode="popup",e)},7771:function(){var t,e,n=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),r=up.util,o=up.element;up.Layer.Root=((e=function(t){function e(e){var n=t.call(this,e)||this;return n.setupHandlers(),n}return n(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return o.root},enumerable:!1,configurable:!0}),e.prototype.getFirstSwappableElement=function(){return document.body},e.selector=function(){return"html"},e.prototype.setupHandlers=function(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,t.prototype.setupHandlers.call(this))},e.prototype.sync=function(){this.setupHandlers()},e.prototype.accept=function(){this.cannotCloseRoot()},e.prototype.dismiss=function(){this.cannotCloseRoot()},e.prototype.cannotCloseRoot=function(){throw up.error.failed("Cannot close the root layer")},e.prototype.reset=function(){r.assign(this,this.defaults())},e.prototype.toString=function(){return"root layer"},e}(up.Layer)).mode="root",e)},6066:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},n=up.util,r=up.element;up.LayerLookup=function(){function o(e){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];this.stack=e;var i=n.parseArgIntoOptions(r,"layer");if(!1!==i.normalizeLayerOptions&&up.layer.normalizeOptions(i),this.values=n.splitValues(i.layer),this.origin=i.origin,this.baseLayer=i.baseLayer||this.stack.current,n.isString(this.baseLayer)){var s=t(t({},i),{baseLayer:this.stack.current,normalizeLayerOptions:!1});this.baseLayer=new this.constructor(this.stack,this.baseLayer,s).first()}}return o.prototype.originLayer=function(){if(this.origin)return this.forElement(this.origin)},o.prototype.first=function(){return this.all()[0]},o.prototype.all=function(){var t=this,e=n.flatMap(this.values,(function(e){return t.resolveValue(e)}));return e=n.compact(e),n.uniq(e)},o.prototype.forElement=function(t){return t=r.get(t),n.find(this.stack.reversed(),(function(e){return e.contains(t)}))},o.prototype.forIndex=function(t){return this.stack[t]},o.prototype.resolveValue=function(t){if(t instanceof up.Layer)return t;if(n.isNumber(t))return this.forIndex(t);if(/^\d+$/.test(t))return this.forIndex(Number(t));if(n.isElementish(t))return this.forElement(t);switch(t){case"any":return e([this.baseLayer],this.stack.reversed());case"current":return this.baseLayer;case"closest":return this.stack.selfAndAncestorsOf(this.baseLayer);case"parent":return this.baseLayer.parent;case"ancestor":case"ancestors":return this.baseLayer.ancestors;case"child":return this.baseLayer.child;case"descendant":case"descendants":return this.baseLayer.descendants;case"new":return"new";case"root":return this.stack.root;case"overlay":case"overlays":return n.reverse(this.stack.overlays);case"front":return this.stack.front;case"origin":return this.originLayer();default:return up.fail("Unknown { layer } option: %o",t)}},o}()},6387:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},o=up.util;up.LayerStack=function(t){function i(){var e=t.call(this)||this;return Object.setPrototypeOf(e,up.LayerStack.prototype),e.currentOverrides=[],e.push(e.buildRoot()),e}return e(i,t),i.prototype.buildRoot=function(){return up.layer.build({mode:"root",stack:this})},i.prototype.remove=function(t){o.remove(this,t)},i.prototype.peel=function(t,e){for(var r=o.reverse(t.descendants),i=n(n({},e),{preventable:!1}),s=0,u=r;s<u.length;s++)u[s].dismiss(":peel",i)},i.prototype.reset=function(){this.peel(this.root,{animation:!1}),this.currentOverrides=[],this.root.reset()},i.prototype.isOpen=function(t){return t.index>=0},i.prototype.isClosed=function(t){return!this.isOpen(t)},i.prototype.parentOf=function(t){return this[t.index-1]},i.prototype.childOf=function(t){return this[t.index+1]},i.prototype.ancestorsOf=function(t){return o.reverse(this.slice(0,t.index))},i.prototype.selfAndAncestorsOf=function(t){return r([t],t.ancestors)},i.prototype.descendantsOf=function(t){return this.slice(t.index+1)},i.prototype.isRoot=function(t){return this[0]===t},i.prototype.isOverlay=function(t){return!this.isRoot(t)},i.prototype.isCurrent=function(t){return this.current===t},i.prototype.isFront=function(t){return this.front===t},i.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.getAll.apply(this,t)[0]},i.prototype.getAll=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(new((t=up.LayerLookup).bind.apply(t,r([void 0,this],e)))).all()},i.prototype.sync=function(){for(var t=0;t<this.length;t++)this[t].sync()},i.prototype.asCurrent=function(t,e){try{return this.currentOverrides.push(t),e()}finally{this.currentOverrides.pop()}},i.prototype.reversed=function(){return o.reverse(this)},i.prototype.dismissOverlays=function(t,e){void 0===t&&(t=null),void 0===e&&(e={}),e.dismissable=!1;for(var n=0,r=o.reverse(this.overlays);n<r.length;n++)r[n].dismiss(t,e)},i.prototype[o.copy.key]=function(){return o.copyArrayLike(this)},Object.defineProperty(i.prototype,"count",{get:function(){return this.length},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this[0]},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"overlays",{get:function(){return this.root.descendants},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"current",{get:function(){return o.last(this.currentOverrides)||this.front},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"front",{get:function(){return o.last(this)},enumerable:!1,configurable:!0}),i}(Array)},5390:function(){up.LinkFeedbackURLs=function(){function t(t){var e=up.feedback.normalizeURL;if(this.isSafe=up.link.isSafe(t),this.isSafe){var n=t.getAttribute("href");n&&"#"!==n&&(this.href=e(n));var r=t.getAttribute("up-href");r&&(this.upHREF=e(r));var o=t.getAttribute("up-alias");o&&(this.aliasPattern=new up.URLPattern(o,e))}}return t.prototype.isCurrent=function(t){return this.isSafe&&!!(this.href&&this.href===t||this.upHREF&&this.upHREF===t||this.aliasPattern&&this.aliasPattern.test(t,!1))},t}()},2618:function(){var t=up.util,e=up.element;up.LinkPreloader=function(){function n(){this.considerPreload=this.considerPreload.bind(this)}return n.prototype.observeLink=function(t){var e=this;up.link.isSafe(t)&&(this.on(t,"mouseenter",(function(t){return e.considerPreload(t,!0)})),this.on(t,"mousedown touchstart",(function(t){return e.considerPreload(t)})),this.on(t,"mouseleave",(function(t){return e.stopPreload(t)})))},n.prototype.on=function(t,e,n){up.on(t,e,{passive:!0},n)},n.prototype.considerPreload=function(t,e){var n=t.target;n!==this.currentLink&&(this.reset(),this.currentLink=n,up.link.shouldFollowEvent(t,n)&&(e?this.preloadAfterDelay(n):this.preloadNow(n)))},n.prototype.stopPreload=function(t){if(t.target===this.currentLink)return this.reset()},n.prototype.reset=function(){var t;this.currentLink&&(clearTimeout(this.timer),(null===(t=this.currentRequest)||void 0===t?void 0:t.preload)&&this.currentRequest.abort(),this.currentLink=void 0,this.currentRequest=void 0)},n.prototype.preloadAfterDelay=function(n){var r,o=this,i=null!==(r=e.numberAttr(n,"up-delay"))&&void 0!==r?r:up.link.config.preloadDelay;this.timer=t.timer(i,(function(){return o.preloadNow(n)}))},n.prototype.preloadNow=function(t){var n=this;e.isDetached(t)?this.reset():(up.log.muteUncriticalRejection(up.link.preload(t,{onQueued:function(t){return n.currentRequest=t}})),this.queued=!0)},n}()},7792:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},r=up.util,o=up.element;up.MotionController=function(){function i(t){this.activeClass="up-"+t,this.dataKey="up-"+t+"-finished",this.selector="."+this.activeClass,this.finishEvent="up:"+t+":finish",this.finishCount=0,this.clusterCount=0}return i.prototype.startFunction=function(t,i,s){var u;return void 0===s&&(s={}),e(this,void 0,void 0,(function(){var e,a,c=this;return n(this,(function(n){switch(n.label){case 0:return t=o.list(t),e=function(){return up.log.muteUncriticalRejection(i())},s.trackMotion=null!==(u=s.trackMotion)&&void 0!==u?u:up.motion.isEnabled(),!1!==s.trackMotion?[3,2]:[4,r.microtask(e)];case 1:return n.sent(),[3,5];case 2:return s.trackMotion=!1,[4,this.finish(t)];case 3:return n.sent(),a=this.whileForwardingFinishEvent(t,e),this.markCluster(t,a),[4,a=a.then((function(){return c.unmarkCluster(t)}))];case 4:return[2,n.sent()];case 5:return[2]}}))}))},i.prototype.startMotion=function(t,e,n){void 0===n&&(n={});var r=up.on(t,this.finishEvent,(function(){return e.finish()})),o=this.startFunction(t,(function(){return e.start()}),n);return o.then(r)},i.prototype.finish=function(t){if(this.finishCount++,0===this.clusterCount||!up.motion.isEnabled())return Promise.resolve();t=this.expandFinishRequest(t);var e=r.map(t,this.finishOneElement.bind(this));return Promise.all(e)},i.prototype.expandFinishRequest=function(t){var e=this;return t?r.flatMap(t,(function(t){return o.list(o.closest(t,e.selector),o.all(t,e.selector))})):o.all(this.selector)},i.prototype.isActive=function(t){return t.classList.contains(this.activeClass)},i.prototype.finishOneElement=function(t){return this.emitFinishEvent(t),this.whenElementFinished(t)},i.prototype.emitFinishEvent=function(e,n){return void 0===n&&(n={}),n=t({target:e,log:!1},n),up.emit(this.finishEvent,n)},i.prototype.whenElementFinished=function(t){return t[this.dataKey]||Promise.resolve()},i.prototype.markCluster=function(t,e){this.clusterCount++;for(var n=0,r=t;n<r.length;n++){var o=r[n];o.classList.add(this.activeClass),o[this.dataKey]=e}},i.prototype.unmarkCluster=function(t){this.clusterCount--;for(var e=0,n=t;e<n.length;e++){var r=n[e];r.classList.remove(this.activeClass),delete r[this.dataKey]}},i.prototype.whileForwardingFinishEvent=function(t,e){var n=this;if(t.length<2)return e();var r=up.on(t,this.finishEvent,(function(e){if(!e.forwarded)for(var r=0,o=t;r<o.length;r++){var i=o[r];i!==e.target&&n.isActive(i)&&n.emitFinishEvent(i,{forwarded:!0})}}));return e().then(r)},i.prototype.reset=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,this.finish()];case 1:return t.sent(),this.finishCount=0,this.clusterCount=0,[2]}}))}))},i}()},4308:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t},e=up.util,n=up.element;up.NonceableCallback=function(){function r(t,e){this.script=t,this.nonce=e}return r.fromString=function(t){var e=t.match(/^(nonce-([^\s]+)\s)?(.*)$/);return new this(e[3],e[2])},r.prototype.toFunction=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(up.browser.canEval())return new(Function.bind.apply(Function,t(t([void 0],e),[this.script])));if(this.nonce){var r=this;return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r.runAsNoncedFunction(this,e,t)}}return this.cannotRun.bind(this)},r.prototype.toString=function(){return"nonce-"+this.nonce+" "+this.script},r.prototype.cannotRun=function(){throw new Error("Your Content Security Policy disallows inline JavaScript ("+this.script+"). See https://unpoly.com/csp for solutions.")},r.prototype.runAsNoncedFunction=function(t,e,n){var r,o="\n try {\n up.noncedEval.value = (function("+e.join(",")+") {\n "+this.script+"\n }).apply(up.noncedEval.thisArg, up.noncedEval.args)\n } catch (error) {\n up.noncedEval.error = error\n }\n ";try{if(up.noncedEval={args:n,thisArg:t},r=up.element.affix(document.body,"script",{nonce:this.nonce,text:o}),up.noncedEval.error)throw up.noncedEval.error;return up.noncedEval.value}finally{up.noncedEval=void 0,r&&up.element.remove(r)}},r.prototype.allowedBy=function(t){return this.nonce&&e.contains(t,this.nonce)},r.adoptNonces=function(r,o){var i=this;if(null==o?void 0:o.length){var s=e.memoize(up.protocol.cspNonce);e.each(up.protocol.config.nonceableAttributes,(function(u){var a=n.subtree(r,"["+u+'^="nonce-"]');e.each(a,(function(e){var n=e.getAttribute(u),r=i.fromString(n),a=function(e){for(var r,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];return(r=up.log).warn.apply(r,t(["up.render()","Cannot use callback ["+u+'="'+n+'"]: '+e],o))};if(!r.allowedBy(o))return a("Callback's CSP nonce (%o) does not match response header (%o)",r.nonce,o);var c=s();if(!c)return a("Current page's CSP nonce is unknown");r.nonce=c,e.setAttribute(u,r.toString())}))}))}},r}()},1104:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=up.util,n=up.element;up.OptionsParser=function(){function r(t,e,n){this.options=t,this.element=e,this.fail=null==n?void 0:n.fail}return r.prototype.string=function(t,e){this.parse(n.attr,t,e)},r.prototype.boolean=function(t,e){this.parse(n.booleanAttr,t,e)},r.prototype.number=function(t,e){this.parse(n.numberAttr,t,e)},r.prototype.booleanOrString=function(t,e){this.parse(n.booleanOrStringAttr,t,e)},r.prototype.json=function(t,e){this.parse(n.jsonAttr,t,e)},r.prototype.parse=function(n,r,o){var i;void 0===o&&(o={});var s=e.wrapList(null!==(i=o.attr)&&void 0!==i?i:this.attrNameForKey(r)),u=this.options[r];if(this.element)for(var a=0,c=s;a<c.length;a++){var p=c[a];null!=u||(u=n(this.element,p))}null!=u||(u=o.default);var l,f=o.normalize;if(f&&(u=f(u)),e.isDefined(u)&&(this.options[r]=u),(o.fail||this.fail)&&(l=up.fragment.failKey(r))){var h=e.compact(e.map(s,this.deriveFailAttrName)),d=t(t({},o),{attr:h,fail:!1});this.parse(n,l,d)}},r.prototype.deriveFailAttrName=function(t){if(0===t.indexOf("up-"))return"up-fail-"+t.slice(3)},r.prototype.attrNameForKey=function(t){return"up-"+e.camelToKebabCase(t)},r}()},8665:function(){var t=up.element,e=up.util;up.OverlayFocus=function(){function n(t){this.layer=t,this.focusElement=this.layer.getFocusElement()}return n.prototype.moveToFront=function(){var e=this;this.enabled||(this.enabled=!0,this.untrapFocus=up.on("focusin",(function(t){return e.onFocus(t)})),this.unsetAttrs=t.setTemporaryAttrs(this.focusElement,{tabindex:"0",role:"dialog","aria-modal":"true"}),this.focusTrapBefore=t.affix(this.focusElement,"beforebegin","up-focus-trap[tabindex=0]"),this.focusTrapAfter=t.affix(this.focusElement,"afterend","up-focus-trap[tabindex=0]"))},n.prototype.moveToBack=function(){this.teardown()},n.prototype.teardown=function(){this.enabled&&(this.enabled=!1,this.untrapFocus(),this.unsetAttrs(),t.remove(this.focusTrapBefore),t.remove(this.focusTrapAfter))},n.prototype.onFocus=function(t){var e=t.target;this.processingFocusEvent||(this.processingFocusEvent=!0,e===this.focusTrapBefore?this.focusEnd():e!==this.focusTrapAfter&&this.layer.contains(e)||this.focusStart(),this.processingFocusEvent=!1)},n.prototype.focusStart=function(t){up.focus(this.focusElement,t)},n.prototype.focusEnd=function(){this.focusLastDescendant(this.layer.getBoxElement())||this.focusStart()},n.prototype.focusLastDescendant=function(t){for(var n=0,r=e.reverse(t.children);n<r.length;n++){var o=r[n];if(up.viewport.tryFocus(o)||this.focusLastDescendant(o))return!0}},n}()},3645:function(){var t=up.util,e=up.element;up.Params=function(){function n(t){this.clear(),this.addAll(t)}return n.prototype.clear=function(){this.entries=[]},n.prototype[t.copy.key]=function(){return new up.Params(this)},n.prototype.toObject=function(){for(var e={},n=0,r=this.entries;n<r.length;n++){var o=r[n],i=o.name,s=o.value;t.isBasicObjectProperty(i)||(this.isArrayKey(i)?(e[i]||(e[i]=[]),e[i].push(s)):e[i]=s)}return e},n.prototype.toArray=function(){return this.entries},n.prototype.toFormData=function(){for(var t=new FormData,e=0,n=this.entries;e<n.length;e++){var r=n[e];t.append(r.name,r.value)}return t.entries||(t.originalArray=this.entries),t},n.prototype.toQuery=function(){var e=t.map(this.entries,this.arrayEntryToQuery.bind(this));return(e=t.compact(e)).join("&")},n.prototype.arrayEntryToQuery=function(e){var n=e.value;if(!this.isBinaryValue(n)){var r=encodeURIComponent(e.name);return t.isGiven(n)&&(r+="=",r+=encodeURIComponent(n)),r}},n.prototype.isBinaryValue=function(t){return t instanceof Blob},n.prototype.hasBinaryValues=function(){var e=t.map(this.entries,"value");return t.some(e,this.isBinaryValue)},n.prototype.toURL=function(e){var n=[e,this.toQuery()];n=t.filter(n,t.isPresent);var r=t.contains(e,"?")?"&":"?";return n.join(r)},n.prototype.add=function(t,e){this.entries.push({name:t,value:e})},n.prototype.addAll=function(e){var n,r;t.isMissing(e)||(e instanceof this.constructor?(n=this.entries).push.apply(n,e.entries):t.isArray(e)?(r=this.entries).push.apply(r,e):t.isString(e)?this.addAllFromQuery(e):t.isFormData(e)?this.addAllFromFormData(e):t.isObject(e)?this.addAllFromObject(e):up.fail("Unsupport params type: %o",e))},n.prototype.addAllFromObject=function(e){for(var n in e)for(var r=e[n],o=0,i=t.isArray(r)?r:[r];o<i.length;o++){var s=i[o];this.add(n,s)}},n.prototype.addAllFromQuery=function(e){for(var n=0,r=e.split("&");n<r.length;n++){var o=r[n];if(o){var i=o.split("="),s=i[0],u=i[1];s=decodeURIComponent(s),u=t.isGiven(u)?decodeURIComponent(u):null,this.add(s,u)}}},n.prototype.addAllFromFormData=function(e){var n=this;t.eachIterator(e.entries(),(function(t){n.add.apply(n,t)}))},n.prototype.set=function(t,e){this.delete(t),this.add(t,e)},n.prototype.delete=function(e){this.entries=t.reject(this.entries,this.matchEntryFn(e))},n.prototype.matchEntryFn=function(t){return function(e){return e.name===t}},n.prototype.get=function(t){return this.isArrayKey(t)?this.getAll(t):this.getFirst(t)},n.prototype.getFirst=function(e){var n=t.find(this.entries,this.matchEntryFn(e));return null==n?void 0:n.value},n.prototype.getAll=function(e){if(this.isArrayKey(e))return this.getAll(e);var n=t.map(this.entries,this.matchEntryFn(e));return t.map(n,"value")},n.prototype.isArrayKey=function(e){return t.endsWith(e,"[]")},n.prototype[t.isBlank.key]=function(){return 0===this.entries.length},n.fromForm=function(t){return t=up.fragment.get(t),this.fromFields(up.form.fields(t))},n.fromFields=function(e){for(var n=new this,r=0,o=t.wrapList(e);r<o.length;r++){var i=o[r];n.addField(i)}return n},n.prototype.addField=function(t){var n=(t=e.get(t)).name;if(n&&!t.disabled){var r=t.tagName,o=t.type;if("SELECT"===r)for(var i=0,s=t.querySelectorAll("option");i<s.length;i++){var u=s[i];u.selected&&this.add(n,u.value)}else if("checkbox"===o||"radio"===o)t.checked&&this.add(n,t.value);else{if("file"!==o)return this.add(n,t.value);for(var a=0,c=t.files;a<c.length;a++){var p=c[a];this.add(n,p)}}}},n.prototype[t.isEqual.key]=function(e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)},n.fromURL=function(e){var n=new this,r=t.parseURL(e).search;return r&&(r=r.replace(/^\?/,""),n.addAll(r)),n},n.stripURL=function(e){return t.normalizeURL(e,{search:!1})},n}()},7782:function(){var t=up.element;up.ProgressBar=function(){function e(){this.step=0,this.element=t.affix(document.body,"up-progress-bar"),this.element.style.transition="width 300ms ease-out",this.moveTo(0),up.element.paint(this.element),this.width=31,this.nextStep()}return e.prototype.nextStep=function(){var t;t=this.width<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.width)*Math.random(),this.moveTo(this.width+t),this.step++;var e=300+40*this.step;this.timeout=setTimeout(this.nextStep.bind(this),e)},e.prototype.moveTo=function(t){this.width=t,this.element.style.width=t+"vw"},e.prototype.destroy=function(){clearTimeout(this.timeout),t.remove(this.element)},e.prototype.conclude=function(){clearTimeout(this.timeout),this.moveTo(100),setTimeout(this.destroy.bind(this),300)},e}()},2406:function(){var t=up.util;up.Record=function(){function e(e){t.assign(this,this.defaults(e),this.attributes(e))}return e.prototype.keys=function(){throw"Return an array of keys"},e.prototype.defaults=function(t){return{}},e.prototype.attributes=function(e){return void 0===e&&(e=this),t.pick(e,this.keys())},e.prototype[t.copy.key]=function(){return this.variant()},e.prototype.variant=function(e){return void 0===e&&(e={}),new this.constructor(t.merge(this.attributes(),e))},e.prototype[t.isEqual.key]=function(e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())},e}()},1279:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Rect=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.keys=function(){return["left","top","width","height"]},Object.defineProperty(n.prototype,"bottom",{get:function(){return this.top+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.left+this.width},enumerable:!1,configurable:!0}),n.fromElement=function(t){return new this(t.getBoundingClientRect())},n}(up.Record)},2705:function(){var t,e,n,r,o,i=up.util;up.RenderOptions=(t={hungry:!0,keep:!0,source:!0,saveScroll:!0,fail:"auto"},e={solo:!1,confirm:!1,feedback:!1},n=["url","method","origin","headers","params","cache","clearCache","fallback","solo","confirm","feedback","origin","baseLayer","fail"].concat(["keep","hungry","history","source","saveScroll","navigate"]),r=["url","content","fragment","document"],o=["history","focus","scroll"],{preprocess:function(n){var r,s;null===(s=(r=up.migrate).preprocessRenderOptions)||void 0===s||s.call(r,n);var u=i.merge(t,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(n));return i.merge(i.omit(u,o),{defaults:u},n,function(t){if(t.preload)return e}(n))},finalize:function(t,e){return i.merge(t.defaults,e,t)},assertContentGiven:function(t){i.some(r,(function(e){return i.isGiven(t[e])}))||(t.defaultToEmptyContent?t.content="":up.fail("up.render() needs either { "+r.join(", ")+" } option"))},deriveFailOptions:function(t){return i.merge(t.defaults,i.pick(t,n),function(t){var e={};for(var n in t){var r=t[n],o=up.fragment.successKey(n);o&&(e[o]=r)}return e}(t))}})},606:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.RenderResult=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.keys=function(){return["fragments","layer"]},n}(up.Record)},5437:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.Request=function(t){function r(e){var r=t.call(this,e)||this;return r.params=new up.Params(r.params),r.headers||(r.headers={}),r.preload&&(r.cache=!0),null==r.wrapMethod&&(r.wrapMethod=up.network.config.wrapMethod),r.normalizeForCaching(),e.basic||(r.layer=up.layer.get(r.layer),r.failLayer=up.layer.get(r.failLayer||r.layer),r.context||(r.context=r.layer.context||{}),r.failContext||(r.failContext=r.failLayer.context||{}),r.mode||(r.mode=r.layer.mode),r.failMode||(r.failMode=r.failLayer.mode),r.deferred=n.newDeferred(),r.state="new"),r}return e(r,t),r.prototype.keys=function(){return["method","url","hash","params","target","failTarget","headers","timeout","preload","cache","clearCache","layer","mode","context","failLayer","failMode","failContext","origin","solo","queueTime","wrapMethod","contentType","payload","onQueued"]},r.prototype.followState=function(t){n.delegate(this,["deferred","state","preload"],(function(){return t}))},r.prototype.normalizeForCaching=function(){this.method=n.normalizeMethod(this.method),this.extractHashFromURL(),this.transferParamsToURL(),this.url=n.normalizeURL(this.url)},r.prototype.evictExpensiveAttrs=function(){var t=this;n.task((function(){return t.layer=void 0,t.failLayer=void 0,t.origin=void 0}))},r.prototype.extractHashFromURL=function(){var t,e=null===(t=this.url)||void 0===t?void 0:t.match(/^([^#]*)(#.+)$/);if(e)return this.url=e[1],this.hash=e[2]},r.prototype.transferParamsToURL=function(){!this.url||this.allowsPayload()||n.isBlank(this.params)||(this.url=this.params.toURL(this.url),this.params.clear())},r.prototype.isSafe=function(){return up.network.isSafeMethod(this.method)},r.prototype.allowsPayload=function(){return n.methodAllowsPayload(this.method)},r.prototype.will302RedirectWithGET=function(){return this.isSafe()||"POST"===this.method},r.prototype.willCache=function(){return"auto"===this.cache?up.network.config.autoCache(this):this.cache},r.prototype.runQueuedCallbacks=function(){var t,e=this;n.always(this,(function(){return e.evictExpensiveAttrs()})),null===(t=this.onQueued)||void 0===t||t.call(this,this)},r.prototype.load=function(){var t=this;"new"===this.state&&(this.state="loading",this.xhr=new up.Request.XHRRenderer(this).buildAndSend({onload:function(){return t.onXHRLoad()},onerror:function(){return t.onXHRError()},ontimeout:function(){return t.onXHRTimeout()},onabort:function(){return t.onXHRAbort()}}))},r.prototype.loadPage=function(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()},r.prototype.onXHRLoad=function(){var t=this.extractResponseFromXHR(),e=["Server responded HTTP %d to %s %s (%d characters)",t.status,this.method,this.url,t.text.length];this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)},r.prototype.onXHRError=function(){var t="Fatal error during request";this.deferred.reject(up.error.failed(t)),this.emit("up:request:fatal",{log:t})},r.prototype.onXHRTimeout=function(){this.setAbortedState("Requested timed out")},r.prototype.onXHRAbort=function(){this.setAbortedState()},r.prototype.abort=function(){this.setAbortedState()&&this.xhr&&this.xhr.abort()},r.prototype.setAbortedState=function(t){if(void 0===t&&(t=["Request to %s %s was aborted",this.method,this.url]),"new"===this.state||"loading"===this.state)return this.state="aborted",this.emit("up:request:aborted",{log:t}),this.deferred.reject(up.error.aborted(t)),!0},r.prototype.respondWith=function(t){if("loading"===this.state)return this.state="loaded",t.ok?this.deferred.resolve(t):this.deferred.reject(t)},r.prototype.csrfHeader=function(){return up.protocol.csrfHeader()},r.prototype.csrfParam=function(){return up.protocol.csrfParam()},r.prototype.csrfToken=function(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()},r.prototype.isCrossOrigin=function(){return n.isCrossOrigin(this.url)},r.prototype.extractResponseFromXHR=function(){var t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),clearCache:up.protocol.clearCacheFromXHR(this.xhr)},e=up.protocol.methodFromXHR(this.xhr),r=up.protocol.locationFromXHR(this.xhr);return r&&(e||n.matchURLs(t.url,r)||(e="GET"),t.url=r),e&&(t.method=e),new up.Response(t)},r.prototype.cacheKey=function(){return JSON.stringify([this.method,this.url,this.params.toQuery(),this.metaProps()])},r.prototype.metaProps=function(){for(var t={},e=0,r=n.evalOption(up.network.config.requestMetaKeys,this);e<r.length;e++){var o=r[e],i=this[o];n.isGiven(i)&&(t[o]=i)}return t},r.prototype.buildEventEmitter=function(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.layer,request:this,origin:this.origin})},r.prototype.emit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.buildEventEmitter(t).emit()},r.prototype.assertEmitted=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.buildEventEmitter(t).assertEmitted()},Object.defineProperty(r.prototype,"description",{get:function(){return this.method+" "+this.url},enumerable:!1,configurable:!0}),r}(up.Record),n.delegate(up.Request.prototype,["then","catch","finally"],(function(){return this.deferred})),up.Request.tester=function(t){if(n.isFunction(t))return t;if(t instanceof this)return function(e){return t===e};if(n.isString(t)){var e=new up.URLPattern(t);return function(t){return e.test(t.url)}}return function(e){return t}}},7974:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),n=up.util;up.Request.Cache=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.maxSize=function(){return up.network.config.cacheSize},r.prototype.expiryMillis=function(){return up.network.config.cacheExpiry},r.prototype.normalizeStoreKey=function(t){return n.wrapValue(up.Request,t).cacheKey()},r.prototype.clear=function(t){var e=this;void 0===t&&(t=!0);var n=up.Request.tester(t);this.each((function(t,r){n(r)&&e.store.remove(t)}))},r}(up.Cache)},5221:function(){var t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=function(){function r(t){this.request=t}return r.prototype.buildAndSubmit=function(){this.params=t.copy(this.request.params);var r=this.request.url,o=this.request.method,i=up.Params.fromURL(r);this.params.addAll(i),r=up.Params.stripURL(r),t.contains(n,o)||(o=up.protocol.wrapMethod(o,this.params)),this.form=e.affix(document.body,"form.up-request-loader",{method:o,action:r});var s,u,a=this.request.contentType;a&&this.form.setAttribute("enctype",a),(s=this.request.csrfParam())&&(u=this.request.csrfToken())&&this.params.add(s,u),t.each(this.params.toArray(),this.addField.bind(this)),up.browser.submitForm(this.form)},r.prototype.addField=function(t){e.affix(this.form,"input[type=hidden]",t)},r}()},6413:function(){var t=up.util;up.Request.Queue=function(){function e(t){var e,n;void 0===t&&(t={}),this.concurrency=null!==(e=t.concurrency)&&void 0!==e?e:function(){return up.network.config.concurrency},this.badResponseTime=null!==(n=t.badResponseTime)&&void 0!==n?n:function(){return up.network.config.badResponseTime},this.reset()}return e.prototype.reset=function(){this.queuedRequests=[],this.currentRequests=[],clearTimeout(this.checkSlowTimout),this.emittedSlow=!1},Object.defineProperty(e.prototype,"allRequests",{get:function(){return this.currentRequests.concat(this.queuedRequests)},enumerable:!1,configurable:!0}),e.prototype.asap=function(e){var n=this;e.runQueuedCallbacks(),t.always(e,(function(t){return n.onRequestSettled(e,t)})),e.queueTime=new Date,this.setSlowTimer(),this.hasConcurrencyLeft()?this.sendRequestNow(e):this.queueRequest(e)},e.prototype.promoteToForeground=function(t){if(t.preload)return t.preload=!1,this.setSlowTimer()},e.prototype.setSlowTimer=function(){var e=this,n=t.evalOption(this.badResponseTime);this.checkSlowTimout=t.timer(n,(function(){return e.checkSlow()}))},e.prototype.hasConcurrencyLeft=function(){var e=t.evalOption(this.concurrency);return-1===e||this.currentRequests.length<e},e.prototype.isBusy=function(){return this.currentRequests.length>0},e.prototype.queueRequest=function(t){this.queuedRequests.push(t)},e.prototype.pluckNextRequest=function(){var e=t.find(this.queuedRequests,(function(t){return!t.preload}));return e||(e=this.queuedRequests[0]),t.remove(this.queuedRequests,e)},e.prototype.sendRequestNow=function(t){t.emit("up:request:load",{log:["Loading %s %s",t.method,t.url]}).defaultPrevented?t.abort("Prevented by event listener"):(t.normalizeForCaching(),this.currentRequests.push(t),t.load())},e.prototype.onRequestSettled=function(e,n){var r=this;t.remove(this.currentRequests,e),n instanceof up.Response&&n.ok&&up.network.registerAliasForRedirect(e,n),this.checkSlow(),t.microtask((function(){return r.poke()}))},e.prototype.poke=function(){var t;if(this.hasConcurrencyLeft()&&(t=this.pluckNextRequest()))return this.sendRequestNow(t)},e.prototype.abort=function(e){void 0===e&&(e=!0);for(var n=up.Request.tester(e),r=function(e){t.filter(e,n).forEach((function(n){n.abort(),t.remove(e,n)}))},o=0,i=[this.currentRequests,this.queuedRequests];o<i.length;o++)r(i[o])},e.prototype.abortExcept=function(e,n){void 0===n&&(n=!0);var r=e.cacheKey();this.abort((function(e){return e.cacheKey()!==r&&t.evalOption(n,e)}))},e.prototype.checkSlow=function(){var t=this.isSlow();this.emittedSlow!==t&&(this.emittedSlow=t,t?up.emit("up:request:late",{log:"Server is slow to respond"}):up.emit("up:request:recover",{log:"Slow requests were loaded"}))},e.prototype.isSlow=function(){var e=new Date,n=t.evalOption(this.badResponseTime),r=t.reject(this.allRequests,"preload");return t.some(r,(function(t){return e-t.queueTime>=n-1}))},e}()},2298:function(){var t="multipart/form-data",e=up.util;up.Request.XHRRenderer=function(){function n(t){this.request=t}return n.prototype.buildAndSend=function(t){this.xhr=new XMLHttpRequest,this.params=e.copy(this.request.params),this.request.timeout&&(this.xhr.timeout=this.request.timeout),this.xhr.open(this.getMethod(),this.request.url);var n,r,o=this.request.metaProps();for(var i in o)this.addHeader(up.protocol.headerize(i),o[i]);for(var s in this.request.headers)this.addHeader(s,this.request.headers[s]);(n=this.request.csrfHeader())&&(r=this.request.csrfToken())&&this.addHeader(n,r),this.addHeader(up.protocol.headerize("version"),up.version);var u=this.getContentType();return u&&this.addHeader("Content-Type",u),e.assign(this.xhr,t),this.xhr.send(this.getPayload()),this.xhr},n.prototype.getMethod=function(){return this.method||(this.method=this.request.method,this.request.wrapMethod&&!this.request.will302RedirectWithGET()&&(this.method=up.protocol.wrapMethod(this.method,this.params))),this.method},n.prototype.getContentType=function(){return this.finalizePayload(),this.contentType},n.prototype.getPayload=function(){return this.finalizePayload(),this.payload},n.prototype.addHeader=function(t,n){(e.isOptions(n)||e.isArray(n))&&(n=JSON.stringify(n)),this.xhr.setRequestHeader(t,n)},n.prototype.finalizePayload=function(){this.payloadFinalized||(this.payloadFinalized=!0,this.payload=this.request.payload,this.contentType=this.request.contentType,!this.payload&&this.request.allowsPayload()&&(this.contentType||(this.contentType=this.params.hasBinaryValues()?t:"application/x-www-form-urlencoded"),this.contentType===t?(this.contentType=null,this.payload=this.params.toFormData()):this.payload=this.params.toQuery().replace(/%20/g,"+")))},n}()},4517:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.Response=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.keys=function(){return["method","url","text","status","request","xhr","target","title","acceptLayer","dismissLayer","eventPlans","context","clearCache","headers"]},n.prototype.defaults=function(){return{headers:{}}},Object.defineProperty(n.prototype,"ok",{get:function(){return this.status&&this.status>=200&&this.status<=299},enumerable:!1,configurable:!0}),n.prototype.getHeader=function(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))},Object.defineProperty(n.prototype,"contentType",{get:function(){return this.getHeader("Content-Type")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"cspNonces",{get:function(){return up.protocol.cspNoncesFromHeader(this.getHeader("Content-Security-Policy"))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"json",{get:function(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))},enumerable:!1,configurable:!0}),n}(up.Record)},7241:function(){var t=up.util,e=up.element;up.ResponseDoc=function(){function n(t){this.noscriptWrapper=new up.HTMLWrapper("noscript"),this.scriptWrapper=new up.HTMLWrapper("script"),this.root=this.parseDocument(t)||this.parseFragment(t)||this.parseContent(t),this.cspNonces=t.cspNonces}return n.prototype.parseDocument=function(t){return this.parse(t.document,e.createDocumentFromHTML)},n.prototype.parseContent=function(n){var r=n.content||"",o=n.target||up.fail("must pass a { target } when passing { content }"),i=e.createFromSelector(o);return t.isString(r)?(r=this.wrapHTML(r),i.innerHTML=r):i.appendChild(r),i},n.prototype.parseFragment=function(t){return this.parse(t.fragment)},n.prototype.parse=function(n,r){return void 0===r&&(r=e.createFromHTML),t.isString(n)&&(n=r(n=this.wrapHTML(n))),n},n.prototype.rootSelector=function(){return up.fragment.toTarget(this.root)},n.prototype.wrapHTML=function(t){return t=this.noscriptWrapper.wrap(t),up.fragment.config.runScripts?this.scriptWrapper.wrap(t):this.scriptWrapper.strip(t)},n.prototype.getTitle=function(){var t;return this.titleParsed||(this.title=null===(t=this.root.querySelector("head title"))||void 0===t?void 0:t.textContent,this.titleParsed=!0),this.title},n.prototype.select=function(t){return up.fragment.subtree(this.root,t,{layer:"any"})[0]},n.prototype.finalizeElement=function(t){this.noscriptWrapper.unwrap(t),up.NonceableCallback.adoptNonces(t,this.cspNonces),this.scriptWrapper.unwrap(t)},n}()},2723:function(){var t=up.element,e=up.util;up.RevealMotion=function(){function n(e,n){var r,o,i,s,u,a,c,p;void 0===n&&(n={}),this.element=e,this.options=n;var l=up.viewport.config;this.viewport=t.get(this.options.viewport)||up.viewport.get(this.element),this.obstructionsLayer=up.layer.get(this.viewport),this.snap=null!==(o=null!==(r=this.options.snap)&&void 0!==r?r:this.options.revealSnap)&&void 0!==o?o:l.revealSnap,this.padding=null!==(s=null!==(i=this.options.padding)&&void 0!==i?i:this.options.revealPadding)&&void 0!==s?s:l.revealPadding,this.top=null!==(a=null!==(u=this.options.top)&&void 0!==u?u:this.options.revealTop)&&void 0!==a?a:l.revealTop,this.max=null!==(p=null!==(c=this.options.max)&&void 0!==c?c:this.options.revealMax)&&void 0!==p?p:l.revealMax,this.topObstructions=l.fixedTop,this.bottomObstructions=l.fixedBottom}return n.prototype.start=function(){var t=this.getViewportRect(this.viewport),n=up.Rect.fromElement(this.element);if(this.max){var r=e.evalOption(this.max,this.element);n.height=Math.min(n.height,r)}if(this.addPadding(n),this.substractObstructions(t),t.height<0)return up.error.failed.async("Viewport has no visible area");var o=this.viewport.scrollTop,i=o;return this.top||n.height>t.height?i+=n.top-t.top:n.top<t.top?i-=t.top-n.top:n.bottom>t.bottom&&(i+=n.bottom-t.bottom),e.isNumber(this.snap)&&i<this.snap&&n.top<.5*t.height&&(i=0),i!==o?this.scrollTo(i):Promise.resolve()},n.prototype.scrollTo=function(t){return this.scrollMotion=new up.ScrollMotion(this.viewport,t,this.options),this.scrollMotion.start()},n.prototype.getViewportRect=function(){return up.viewport.isRoot(this.viewport)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.viewport)},n.prototype.addPadding=function(t){t.top-=this.padding,t.height+=2*this.padding},n.prototype.selectObstructions=function(t){return up.fragment.all(t.join(","),{layer:this.obstructionsLayer})},n.prototype.substractObstructions=function(t){for(var e=0,n=this.selectObstructions(this.topObstructions);e<n.length;e++){var r=n[e];(s=(u=up.Rect.fromElement(r)).bottom-t.top)>0&&(t.top+=s,t.height-=s)}for(var o=0,i=this.selectObstructions(this.bottomObstructions);o<i.length;o++){r=i[o];var s,u=up.Rect.fromElement(r);(s=t.bottom-u.top)>0&&(t.height-=s)}},n.prototype.finish=function(){var t;null===(t=this.scrollMotion)||void 0===t||t.finish()},n}()},6956:function(){var t=up.util;up.ScrollMotion=function(){function e(t,e,n){var r,o,i,s;void 0===n&&(n={}),this.scrollable=t,this.targetTop=e,this.behavior=null!==(o=null!==(r=n.behavior)&&void 0!==r?r:n.scrollBehavior)&&void 0!==o?o:"auto",this.speed=.065*(null!==(s=null!==(i=n.speed)&&void 0!==i?i:n.scrollSpeed)&&void 0!==s?s:up.viewport.config.scrollSpeed)}return e.prototype.start=function(){var t=this;return new Promise((function(e,n){t.resolve=e,t.reject=n,"smooth"===t.behavior&&up.motion.isEnabled()?t.startAnimation():t.finish()}))},e.prototype.startAnimation=function(){var t=this;this.startTime=Date.now(),this.startTop=this.scrollable.scrollTop,this.topDiff=this.targetTop-this.startTop,this.duration=Math.sqrt(Math.abs(this.topDiff))/this.speed,requestAnimationFrame((function(){return t.animationFrame()}))},e.prototype.animationFrame=function(){var e=this;if(!this.settled){this.frameTop&&Math.abs(this.frameTop-this.scrollable.scrollTop)>1.5&&this.abort("Animation aborted due to user intervention");var n=Date.now()-this.startTime,r=Math.min(n/this.duration,1);this.frameTop=this.startTop+t.simpleEase(r)*this.topDiff,Math.abs(this.targetTop-this.frameTop)<.3?this.finish():(this.scrollable.scrollTop=this.frameTop,requestAnimationFrame((function(){return e.animationFrame()})))}},e.prototype.abort=function(t){this.settled=!0,this.reject(up.error.aborted(t))},e.prototype.finish=function(){this.settled=!0,this.scrollable.scrollTop=this.targetTop,this.resolve()},e}()},8720:function(){var t=up.element,e=up.util;up.Selector=function(){function n(t,e){void 0===e&&(e=[]),this.selectors=t,this.filters=e,this.unionSelector=this.selectors.join(",")||"match-none"}return n.prototype.matches=function(e){return t.matches(e,this.unionSelector)&&this.passesFilter(e)},n.prototype.closest=function(t){var e;return this.matches(t)?t:(e=t.parentElement)?this.closest(e):void 0},n.prototype.passesFilter=function(t){return e.every(this.filters,(function(e){return e(t)}))},n.prototype.descendants=function(n){var r=this,o=e.flatMap(this.selectors,(function(e){return t.all(n,e)}));return e.filter(o,(function(t){return r.passesFilter(t)}))},n.prototype.subtree=function(t){var e=[];return this.matches(t)&&e.push(t),e.push.apply(e,this.descendants(t)),e},n}()},104:function(){var t=up.util;up.store||(up.store={}),up.store.Memory=function(){function e(){this.clear()}return e.prototype.clear=function(){this.data={}},e.prototype.get=function(t){return this.data[t]},e.prototype.set=function(t,e){this.data[t]=e},e.prototype.remove=function(t){delete this.data[t]},e.prototype.keys=function(){return Object.keys(this.data)},e.prototype.size=function(){return this.keys().length},e.prototype.values=function(){return t.values(this.data)},e}()},5438:function(){var t,e=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)});up.store.Session=function(t){function n(e){var n=t.call(this)||this;return n.rootKey=e,n.loadFromSessionStorage(),n}return e(n,t),n.prototype.clear=function(){t.prototype.clear.call(this),this.saveToSessionStorage()},n.prototype.set=function(e,n){t.prototype.set.call(this,e,n),this.saveToSessionStorage()},n.prototype.remove=function(e){t.prototype.remove.call(this,e),this.saveToSessionStorage()},n.prototype.loadFromSessionStorage=function(){try{var t=null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(this.rootKey);t&&(this.data=JSON.parse(t))}catch(t){}},n.prototype.saveToSessionStorage=function(){var t=JSON.stringify(this.data);try{return null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.setItem(this.rootKey,t)}catch(t){}},n}(up.store.Memory)},7885:function(){var t=up.util,e=up.element;up.Tether=function(){function n(t){var n,r;null===(r=(n=up.migrate).handleTetherOptions)||void 0===r||r.call(n,t),this.anchor=t.anchor,this.align=t.align,this.position=t.position,this.alignAxis="top"===this.position||"bottom"===this.position?"horizontal":"vertical",this.viewport=up.viewport.get(this.anchor),this.parent=this.viewport===e.root?document.body:this.viewport,this.syncOnScroll=!this.viewport.contains(this.anchor.offsetParent)}return n.prototype.start=function(t){this.element=t,this.element.style.position="absolute",this.setOffset(0,0),this.sync(),this.changeEventSubscription("on")},n.prototype.stop=function(){this.changeEventSubscription("off")},n.prototype.changeEventSubscription=function(t){var e=this.scheduleSync.bind(this);up[t](window,"resize",e),this.syncOnScroll&&up[t](this.viewport,"scroll",e)},n.prototype.scheduleSync=function(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))},n.prototype.isDetached=function(){return e.isDetached(this.parent)||e.isDetached(this.anchor)},n.prototype.sync=function(){var n,r,o=this.element.getBoundingClientRect(),i=e.styleNumber(this.element,"marginTop"),s=e.styleNumber(this.element,"marginRight"),u=e.styleNumber(this.element,"marginBottom"),a=e.styleNumber(this.element,"marginLeft"),c=this.anchor.getBoundingClientRect();switch(this.alignAxis){case"horizontal":switch(this.position){case"top":r=c.top-u-o.height;break;case"bottom":r=c.top+c.height+i}switch(this.align){case"left":n=c.left+a;break;case"center":n=c.left+.5*(c.width-o.width);break;case"right":n=c.left+c.width-o.width-s}break;case"vertical":switch(this.align){case"top":r=c.top+i;break;case"center":r=c.top+.5*(c.height-o.height);break;case"bottom":r=c.top+c.height-o.height-u}switch(this.position){case"left":n=c.left-s-o.width;break;case"right":n=c.left+c.width+a}}t.isDefined(n)||t.isDefined(r)?this.moveTo(n,r):up.fail("Invalid tether constraints: %o",this.describeConstraints())},n.prototype.describeConstraints=function(){return{position:this.position,align:this.align}},n.prototype.moveTo=function(t,e){var n=this.element.getBoundingClientRect();this.setOffset(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)},n.prototype.setOffset=function(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.element,{left:t,top:n})},n}()},4818:function(){var t=up.util;up.URLPattern=function(){function e(e,n){void 0===n&&(n=t.normalizeURL),this.normalizeURL=n,this.groups=[];for(var r=[],o=[],i=0,s=t.splitValues(e);i<s.length;i++){var u=s[i];"-"===u[0]?o.push(u.substring(1)):r.push(u)}this.positiveRegexp=this.buildRegexp(r,!0),this.negativeRegexp=this.buildRegexp(o,!1)}return e.prototype.buildRegexp=function(e,n){var r=this;if(e.length){var o=(e=e.map((function(e){return"*"===e[0]&&(e="/"+e),e=r.normalizeURL(e),t.escapeRegExp(e)}))).join("|");return o=(o=o.replace(/\\\*/g,".*?")).replace(/(:|\\\$)([a-z][\w-]*)/gi,(function(t,e,o){return"\\$"===e?(n&&r.groups.push({name:o,cast:Number}),"(\\d+)"):(n&&r.groups.push({name:o,cast:String}),"([^/?#]+)")})),new RegExp("^"+o+"$")}},e.prototype.test=function(t,e){return void 0===e&&(e=!0),e&&(t=this.normalizeURL(t)),this.positiveRegexp.test(t)&&!this.isExcluded(t)},e.prototype.recognize=function(t,e){void 0===e&&(e=!0),e&&(t=this.normalizeURL(t));var n=this.positiveRegexp.exec(t);if(n&&!this.isExcluded(t)){var r={};return this.groups.forEach((function(t,e){var o=n[e+1];if(o)return r[t.name]=t.cast(o)})),r}},e.prototype.isExcluded=function(t){var e;return null===(e=this.negativeRegexp)||void 0===e?void 0:e.test(t)},e}()},9675:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};up.element=function(){var e=up.util,n=up.browser.isIE11()?"msMatchesSelector":"matches";function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop(),r=t[0]||document;return r.querySelector(n)}function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.pop(),r=t[0]||document;return r.querySelectorAll(n)}function i(t,e){var n=[];return u(t,e)&&n.push(t),n.push.apply(n,o(t,e)),n}function s(t,e){return t.closest?t.closest(e):u(t,e)?t:a(t,e)}function u(t,e){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e)}function a(t,e){var n=t.parentElement;if(n)return u(n,e)?n:a(n,e)}function c(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=n.pop();return e.isElement(i)?i:e.isString(i)?r.apply(void 0,t(t([],n),[i])):e.isList(i)?(i.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",i),i[0]):i}function p(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.flatMap(t,l)}function l(t){return e.isString(t)?o(t):e.wrapList(t)}function f(t){t.style.display="none"}function h(t){t.style.display=""}function d(t,n){for(var r in n){var o=n[r];e.isGiven(o)?t.setAttribute(r,o):t.removeAttribute(r)}}function y(t,n){for(var r,o,i,s=[],u=function(e){var n;if(e=e.replace(/^[\w-]+/,(function(t){return n=t,""})),o=document.createElement(n||"div"),r||(r=o),e=(e=e.replace(/#([\w-]+)/,(function(t,e){return o.id=e,""}))).replace(/\.([\w-]+)/g,(function(t,e){return o.classList.add(e),""})),s.length&&(e=e.replace(/\[([\w-]+)\]/g,(function(t,e){return o.setAttribute(e,s.shift()),""}))),""!==e)throw up.error.invalidSelector(t);null==i||i.appendChild(o),i=o},a=0,c=t.replace(/\[([\w-]+)(?:[~|^$*]?=(["'])?([^\2\]]*?)\2)?\]/g,(function(t,e,n,r){return s.push(r||""),"["+e+"]"})).split(/[ >]+/);a<c.length;a++)u(c[a]);if(n){var p=void 0;if(p=e.pluckKey(n,"class"))for(var l=0,f=e.wrapList(p);l<f.length;l++){var h=f[l];r.classList.add(h)}(p=e.pluckKey(n,"style"))&&A(r,p),(p=e.pluckKey(n,"text"))&&(r.textContent=p),(p=e.pluckKey(n,"content"))&&(r.innerHTML=p),d(r,n)}return r}var m=["HTML","BODY","HEAD","TITLE"],v=new RegExp("\\b("+m.join("|")+")\\b","i"),g=up.mockable((function(t){return u(t,m.join(","))}));function b(t,e){return"["+t+'="'+(e=e.replace(/"/g,'\\"'))+'"]'}function w(){return document.documentElement}function O(t){t.offsetHeight}function k(t,n,r){e.isMissing(t.getAttribute(n))&&t.setAttribute(n,r)}function E(t,n){return e.nullToUndefined(t.getAttribute(n))}function S(t,e,n){var r=E(t,e);switch(r){case"false":return!1;case"true":case"":case e:return!0;default:if(n)return r}}function _(t,e){var n=L(t,Object.keys(e));return A(t,e),function(){return A(t,n)}}function x(t,e){return T(window.getComputedStyle(t),e)}function C(t,n){var r=x(t,n);if(e.isGiven(r))return parseFloat(r)}function L(t,e){return T(t.style,e)}function T(t,n){return e.isString(n)?t[n]:e.pick(t,n)}function A(t,e){var n=t.style;for(var r in e){var o=e[r];o=P(r,o),n[r]=o}}function P(t,n){var r;return e.isMissing(n)?n="":R.has(t.toLowerCase().replace(/-/,""))&&(r=n,n=e.isNumber(r)||e.isString(r)&&/^\d+$/.test(r)?r.toString()+"px":r),n}var R=e.arrayToSet(["top","right","bottom","left","padding","paddingtop","paddingright","paddingbottom","paddingleft","margin","margintop","marginright","marginbottom","marginleft","borderwidth","bordertopwidth","borderrightwidth","borderbottomwidth","borderleftwidth","width","height","maxwidth","maxheight","minwidth","minheight"]);function F(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}return{all:o,subtree:i,isInSubtree:function(t,e){var n=c(e);return t.contains(n)},closest:s,closestAttr:function(t,e){var n;return null===(n=s(t,"["+e+"]"))||void 0===n?void 0:n.getAttribute(e)},matches:u,ancestor:a,around:function(t,e){return p(s(t,e),i(t,e))},get:c,list:p,remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},toggle:function(t,e){null==e&&(e=!F(t)),(e?h:f)(t)},toggleClass:function(t,e,n){var r=t.classList;return null==n&&(n=!r.contains(e)),n?r.add(e):r.remove(e)},hide:f,show:h,metaContent:function(t){var e;return null===(e=r("meta"+b("name",t)))||void 0===e?void 0:e.getAttribute("content")},replace:function(t,e){t.parentElement.replaceChild(e,t)},insertBefore:function(t,e){t.insertAdjacentElement("beforebegin",e)},createFromSelector:y,setAttrs:d,setTemporaryAttrs:function(t,e){for(var n={},r=0,o=Object.keys(e);r<o.length;r++){var i=o[r];n[i]=t.getAttribute(i)}return d(t,e),function(){return d(t,n)}},affix:function(t){for(var n,r,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var s=e.extractOptions(o);2===o.length?(n=o[0],r=o[1]):(n="beforeend",r=o[0]);var u=y(r,s);return t.insertAdjacentElement(n,u),u},toSelector:function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=up.fragment).toTarget.apply(t,e)},idSelector:function(t){return t.match(/^[a-z0-9\-_]+$/i)?"#"+t:b("id",t)},classSelector:function(t){return"."+t.replace(/:/g,"\\:")},isSingleton:g,isSingletonSelector:function(t){return v.test(t)},attributeSelector:b,trueAttributeSelector:function(t){return"["+t+"]:not(["+t+"=false])"},tagName:function(t){return t.tagName.toLowerCase()},createDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},createFromHTML:function(t){var e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes[0]},get root(){return w()},paint:O,concludeCSSTransition:function(t){var e=_(t,{transition:"none"});return O(t),e},hasCSSTransition:function(t){var n,r=(n=e.isOptions(t)?t:x(t)).transitionProperty,o=n.transitionDuration;return!("none"===r||"all"===r&&0===o)},fixedToAbsolute:function(t){var e=t.getBoundingClientRect();t.style.position="absolute";var n=t.offsetParent.getBoundingClientRect();A(t,{left:e.left-C(t,"margin-left")-n.left,top:e.top-C(t,"margin-top")-n.top,right:"",bottom:""})},setMissingAttrs:function(t,e){for(var n in e)k(t,n,e[n])},setMissingAttr:k,unwrap:function(t){var n=t.parentNode,r=e.toArray(t.childNodes);e.each(r,(function(e){return n.insertBefore(e,t)})),n.removeChild(t)},wrapChildren:function(t,e){var n;void 0===e&&(e="up-wrapper");for(var r=y(e);n=t.firstChild;)r.appendChild(n);return t.appendChild(r),r},attr:E,booleanAttr:S,numberAttr:function(t,e){var n=t.getAttribute(e);if(n&&(n=n.replace(/_/g,"")).match(/^[\d.]+$/))return parseFloat(n)},jsonAttr:function(t,e){var n,r,o=null===(r=null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,e))||void 0===r?void 0:r.trim();if(o)return JSON.parse(o)},callbackAttr:function(n,r,o){var i;void 0===o&&(o=[]);var s=n.getAttribute(r);if(s){var u=(i=up.NonceableCallback.fromString(s)).toFunction.apply(i,t(["event"],o));return function(r){var i=e.values(e.pick(r,o));return u.call.apply(u,t([n,r],i))}}},booleanOrStringAttr:function(t,e){return S(t,e,!0)},setTemporaryStyle:_,style:x,styleNumber:C,inlineStyle:L,setStyle:A,isVisible:F,upAttrs:function(t){for(var e=/^up-/,n={},r=0,o=t.attributes;r<o.length;r++){var i=o[r],s=i.name;s.match(e)&&(n[s]=i.value)}return n},toggleAttr:function(t,e,n,r){return null==r&&(r=!t.hasAttribute(e)),r?t.setAttribute(e,n):t.removeAttribute(e)},isDetached:function(t){return t!==document&&!w().contains(t)}}}()},3924:function(){up.error=function(){var t=up.util;function e(e,n){void 0===n&&(n={}),t.isArray(e)&&(e=t.sprintf.apply(t,e));var r=new Error(e);return t.assign(r,n),r}function n(t,n){void 0===n&&(n=e);var r=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=n.apply(void 0,e);return o.name=t,o};return r.is=function(e){return e.name===t},r.async=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.reject(r.apply(void 0,t))},r}var r=n("up.Failed"),o=n("AbortError",(function(t){return e(t||"Aborted")})),i=n("up.NotImplemented"),s=n("up.NotApplicable",(function(t,n){return e("Cannot apply change: "+t+" ("+n+")")}));return{failed:r,aborted:o,invalidSelector:n("up.InvalidSelector",(function(t){return e("Cannot parse selector: "+t)})),notApplicable:s,notImplemented:i,emitGlobal:function(t){var e=t.message;up.emit(window,"error",{message:e,error:t,log:!1})}}}()},8670:function(){up.event=function(){var t=up.util,e=up.element;function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(t).bind()}function r(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function o(t){return up.EventEmitter.fromEmitArgs(t)}var i=["metaKey","shiftKey","ctrlKey","altKey"];function s(e){return(t.isUndefined(e.button)||0===e.button)&&!t.some(i,(function(t){return e[t]}))}function u(e,n,r){void 0===r&&(r=[]);var o=up.event.build(n,t.pick(e,r));return o.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach((function(t){var n=o[t];return o[t]=function(){return e[t](),n.call(o)}})),e.defaultPrevented&&o.preventDefault(),o}return n("up:click","a[up-emit]",(function(n,r){if(s(n)){var o=e.attr(r,"up-emit"),i=e.jsonAttr(r,"up-emit-props"),a=u(n,o);t.assign(a,i),up.emit(r,a)}})),n("up:framework:reset",(function(){for(var t=0,n=[window,document,e.root,document.body];t<n.length;t++)for(var r=n[t],o=0,i=up.EventListener.allNonDefault(r);o<i.length;o++)i[o].unbind()})),{on:n,$on:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(t,{jQuery:!0}).bind()},off:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(t).unbind()},build:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.extractOptions(e),o=e[0]||r.type||up.fail("Expected event type to be passed as string argument or { type } property"),i=document.createEvent("Event");if(i.initEvent(o,!0,!0),t.assign(i,t.omit(r,["type","target"])),up.browser.isIE11()){var s=i.preventDefault;i.preventDefault=function(){return s.call(i),t.getter(i,"defaultPrevented",(function(){return!0}))}}return i},emit:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t).emit()},assertEmitted:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t).assertEmitted()},onEscape:function(t){return n("keydown",(function(e){if(function(t){var e=t.key;return"Escape"===e||"Esc"===e}(e))return t(e)}))},halt:function(t){t.stopImmediatePropagation(),t.preventDefault()},isUnmodified:s,fork:u,keyModifiers:i}}(),up.on=up.event.on,up.$on=up.event.$on,up.off=up.event.off,up.$off=up.event.off,up.emit=up.event.emit},454:function(){up.feedback=function(){var t=up.util,e=up.element,n=new up.Config((function(){return{currentClasses:["up-current"],navSelectors:["[up-nav]","nav"]}})),r="up-active",o="a, [up-href]";function i(){return n.navSelectors.join(",")}function s(e){if(e)return t.normalizeURL(e,{stripTrailingSlash:!0})}function u(t){return t.upFeedbackURLs||(t.upFeedbackURLs=new up.LinkFeedbackURLs(t))}function a(n,r){var s=up.fragment.subtree(n,i(),r);c(t.flatMap(s,(function(t){return e.subtree(t,o)})),r)}function c(t,r){if(void 0===r&&(r={}),t.length){var o=(h=r.layer||up.layer.get(t[0])).feedbackLocation||h.location;if(o)for(var i=0,s=t;i<s.length;i++){for(var a=s[i],c=u(a).isCurrent(o),p=0,l=n.currentClasses;p<l.length;p++){var f=l[p];e.toggleClass(a,f,c)}e.toggleAttr(a,"aria-current","page",c)}}var h}function p(t){return e.ancestor(t,o)||t}function l(t){p(t).classList.add(r)}function f(t){p(t).classList.remove(r)}function h(e,n){l(e);var r=n();return t.always(r,(function(){return f(e)})),r}function d(t){var e=t.feedbackLocation,n=s(t.location);e&&e===n||(t.feedbackLocation=n,a(t.element,{layer:t}))}return up.on("up:location:changed",(function(t){var e;(e=up.layer.front).showsLiveHistory()&&d(e)})),up.on("up:fragment:inserted",(function(t,e){var n,r;n=e,r={layer:up.layer.get(n)},up.fragment.closest(n,i(),r)?c(up.fragment.subtree(n,o,r),r):a(n,r)})),up.on("up:layer:location:changed",(function(t){d(t.layer)})),up.on("up:framework:reset",(function(){n.reset()})),{config:n,start:l,stop:f,around:h,aroundForOptions:function(e,n){var r,o=e.feedback;return o&&(r=t.isBoolean(o)?e.origin:o),r?h(r=up.fragment.get(r),n):n()},normalizeURL:s}}()},2851:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};up.form=function(){var e,n=up.util,r=up.element,o=["[up-submit]","[up-target]","[up-layer]","[up-transition]"],i=new up.Config((function(){return{validateTargets:["[up-fieldset]:has(:origin)","fieldset:has(:origin)","label:has(:origin)","form:has(:origin)"],fieldSelectors:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitSelectors:up.link.combineFollowableSelectors(["form"],o),noSubmitSelectors:["[up-submit=false]","[target]"],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],observeDelay:0}}));function s(){return i.submitSelectors.join(",")}function u(t){return void 0===t&&(t=""),i.fieldSelectors.map((function(e){return e+t})).join(",")}function a(t){t=r.get(t);var e=r.subtree(t,u());if(r.matches(t,"form[id]")){var o=u(r.attributeSelector("form",t.getAttribute("id"))),i=r.all(o);e.push.apply(e,i),e=n.uniq(e)}return e}function c(){return i.submitButtonSelectors.join(",")}var p=up.mockable((function(t,e){return up.render(l(t,e))}));function l(t,e){e=n.options(e),t=up.fragment.get(t),t=r.closest(t,"form");var o=new up.OptionsParser(e,t),i=up.Params.fromForm(t),s=function(t){var e=c(),n=document.activeElement;return n&&r.matches(n,e)&&t.contains(n)?n:r.get(t,e)}(t);return s&&(i.addField(s),e.method||(e.method=s.getAttribute("formmethod")),e.url||(e.url=s.getAttribute("formaction"))),i.addAll(e.params),e.params=i,o.string("url",{attr:"action",default:up.fragment.source(t)}),o.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:n.normalizeMethod}),"GET"===e.method&&(e.url=up.Params.stripURL(e.url)),o.string("failTarget",{default:up.fragment.toTarget(t)}),e.guardEvent||(e.guardEvent=up.event.build("up:form:submit",{log:"Submitting form"})),n.assign(e,up.link.followOptions(t,e)),e}up.on("up:click",c,(function(t,e){var n=r.closest(e,"form");n&&O(n)&&e.focus()}));var f=function(t){for(var e,o,s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];t=r.list(t);var c=n.flatMap(t,a),p=n.reject(c,"name");p.length&&up.warn("up.observe()","Will not observe fields without a [name]: %o",p);var l=n.extractCallback(s)||h(t[0])||up.fail("up.observe: No change callback given"),f=n.extractOptions(s);f.delay=null!==(o=null!==(e=f.delay)&&void 0!==e?e:r.numberAttr(t[0],"up-delay"))&&void 0!==o?o:i.observeDelay;var d=new up.FieldObserver(c,f,l);return d.start(),function(){return d.stop()}};function h(t){var e=t.getAttribute("up-observe");if(e)return up.NonceableCallback.fromString(e).toFunction("value","name")}function d(t,e){return f(t,e,(function(){return p(t)}))}function y(e,o){return e=up.fragment.get(e),(o=n.options(o)).navigate=!1,o.origin=e,o.history=!1,o.target=function(e,o){var s,u=b(e);return n.isElementish(o.target)?up.fragment.toTarget(o.target):(s=o.target||e.getAttribute("up-validate")||u.getAttribute("up-validate"))?s:r.matches(e,"form")?up.fragment.toTarget(e):function(e,r){var o=up.layer.get(e);return n.findResult(i.validateTargets,(function(e){if(up.fragment.get(e,t(t({},r),{layer:o})))return e}))}(e,o)||up.fail("Could not find validation target for %o (tried defaults %o)",e,i.validateTargets)}(e,o),o.focus="keep",o.fail=!1,o.headers||(o.headers={}),o.headers[up.protocol.headerize("validate")]=e.getAttribute("name")||":unknown",o.guardEvent=up.event.build("up:form:validate",{field:e,log:"Validating form"}),p(e,o)}function m(t){var e,o;if(r.matches(t,"input[type=checkbox]"))t.checked?(e=t.value,o=":checked"):o=":unchecked";else if(r.matches(t,"input[type=radio]")){var i=b(t),s=t.getAttribute("name"),u=i.querySelector("input[type=radio]"+r.attributeSelector("name",s)+":checked");u?(o=":checked",e=u.value):o=":unchecked"}else e=t.value;var a=[];return n.isPresent(e)?(a.push(e),a.push(":present")):a.push(":blank"),n.isPresent(o)&&a.push(o),a}function v(t,e){void 0===e&&(e={});var n=e.target||e.target||t.getAttribute("up-switch"),o=b(t);n||up.fail("No switch target given for %o",t);for(var i=m(t),s=0,u=r.all(o,n);s<u.length;s++){var a=u[s];g(a,i)}}var g=up.mockable((function(t,e){var o;e||(e=m(function(t){var e=b(t),o=r.all(e,"[up-switch]");return n.find(o,(function(e){var n=e.getAttribute("up-switch");return r.matches(t,n)}))||up.fail("Could not find [up-switch] field for %o",t)}(t)));var i=t.getAttribute("up-hide-for");if(i)i=n.splitValues(i),o=0===n.intersect(e,i).length;else{var s=t.getAttribute("up-show-for");s=s?n.splitValues(s):[":present",":checked"],o=n.intersect(e,s).length>0}return r.toggle(t,o),t.classList.add("up-switched")}));function b(t){return t.form||r.closest(t,"form, "+up.layer.anySelector())}function w(t){return r.matches(t,u())}function O(t){return t=up.fragment.get(t),r.matches(t,s())&&!k(t)}function k(t){return r.matches(t,i.noSubmitSelectors.join(","))}return up.on("submit",s,(function(t,n){t.defaultPrevented||k(n)||(null==e||e(),up.event.halt(t),up.log.muteUncriticalRejection(p(n)))})),up.on("change","[up-validate]",(function(t){var r=a(t.target)[0];e=n.abortableMicrotask((function(){return up.log.muteUncriticalRejection(y(r))}))})),up.compiler("[up-switch]",(function(t){v(t)})),up.on("change","[up-switch]",(function(t,e){v(e)})),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",(function(t){g(t)})),up.compiler("[up-observe]",(function(t){return f(t)})),up.compiler("[up-autosubmit]",(function(t){return d(t)})),up.on("up:framework:reset",(function(){i.reset()})),{config:i,submit:p,submitOptions:l,isSubmittable:O,observe:f,validate:y,autosubmit:d,fieldSelector:u,fields:a,focusedField:function(){return n.presence(document.activeElement,w)},switchTarget:g}}(),up.submit=up.form.submit,up.observe=up.form.observe,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2667:function(t,e,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};n(7433);var o=up.util,i=up.element;up.fragment=function(){var t=new up.Config((function(){return{badTargetClasses:[/^up-/],navigateOptions:{solo:!0,feedback:!0,cache:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},matchAroundOrigin:!0,runScripts:!1,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","target-if-lost"],autoScroll:["hash","layer-if-main"]}}));function e(t,e){return void 0===e&&(e={}),t=y(t,e),i.closestAttr(t,"up-source")}function n(t){return i.closestAttr(t,"up-time")||"0"}o.delegate(t,"mainTargets",(function(){return up.layer.config.any}));var s=up.mockable((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o.asyncify((function(){var e=O(t);e=up.RenderOptions.preprocess(e),up.browser.assertConfirmed(e);var n=o.pluckKey(e,"guardEvent");return n&&(n.renderOptions=e,up.event.assertEmitted(n,{target:e.origin})),up.RenderOptions.assertContentGiven(e),(e.url?u:a)(e)}))}));function u(t){return up.feedback.aroundForOptions(t,(function(){return new up.Change.FromURL(t).execute()}))}function a(t){return up.network.mimicLocalRequest(t),new up.Change.FromContent(t).execute()}var c=up.mockable((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=O(t);return s(r(r({},n),{navigate:!0}))}));function p(t,e){void 0===e&&(e={}),t=y(t);var n=(e.keepPlans||[]).map((function(t){return f(t),t.oldElement}));return up.syntax.compile(t,{skip:n,layer:e.layer}),l(t,e),t}function l(t,e){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t],origin:e.origin})}function f(t){return h(t,"up:fragment:kept",{log:["Kept fragment %o",t.oldElement]})}function h(t,e,n){var r=t.oldElement,o=up.event.build(e,{newFragment:t.newElement,newData:t.newData});return up.emit(r,o,n)}var d=o.negate((function(t){return!!i.closest(t,".up-destroying")}));function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.extractOptions(t),r=t.pop(),s=t[0];return o.isElementish(r)?i.get(r):s?m(s,r,n):new up.FragmentFinder({selector:r,origin:n.origin,layer:n.layer}).find()}function m(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return g.apply(void 0,t)[0]}var v=/:has\(([^)]+)\)$/;function g(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.extractOptions(t),r=t.pop(),i=t[0];return(r=_(r,i,n)).descendants(i||document)}function b(t,e,n){return void 0===n&&(n={}),(e=_(e,t,n)).subtree(t)}function w(t,e){return b(t,e).length>0}function O(t){var e=o.parseArgIntoOptions(t,"target");return o.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}function k(t){if(o.isString(t))return t;var e;if(t=i.get(t),i.isSingleton(t))return i.tagName(t);if(e=t.getAttribute("up-id"))return i.attributeSelector("up-id",e);if(e=t.getAttribute("id"))return i.idSelector(e);if(e=t.getAttribute("name"))return i.tagName(t)+i.attributeSelector("name",e);if(e=o.presence(o.filter(t.classList,E))){for(var n="",r=0,s=e;r<s.length;r++){var u=s[r];n+=i.classSelector(u)}return n}return i.tagName(t)}function E(e){return!o.some(t.badTargetClasses,(function(t){return o.isRegExp(t)?t.test(e):t===e}))}function S(t,e){void 0===e&&(e={});var n=e.origin;return t.replace(/&|:origin\b/,(function(e){if(n)return k(n);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',e,t)}))}function _(t,e,n){void 0===n&&(n={});var s=[];n.destroying||s.push(d),n.layer||(n.layer=e);var u=up.layer.getAll(n);"any"===n.layer||e&&i.isDetached(e)||s.push((function(t){return o.some(u,(function(e){return e.contains(t)}))}));var a=up.fragment.expandTargets(t,r(r({},n),{layer:u[0]}));return a=a.map((function(t){return(t=t.replace(v,(function(t,e){return s.push((function(t){return t.querySelector(e)})),""})))||"*"})),new up.Selector(a,s)}return up.on("up:framework:boot",(function(){var t=document.body;if(t.setAttribute("up-source",up.history.location),p(t),!up.browser.canPushState())return up.warn("Cannot push history changes. Next fragment update will load in a new page.")})),up.on("up:framework:reset",(function(){t.reset()})),{config:t,reload:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=O(t);o.target||(o.target=":main");var i=y(o.target,o);return o.url||(o.url=e(i)),o.headers||(o.headers={}),o.headers[up.protocol.headerize("reloadFromTime")]=n(i),s(o)},destroy:function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=O(n);return(o.element=y(o.target,o))&&new up.Change.DestroyFragment(o).execute(),null===(e=(t=up.migrate).formerlyAsync)||void 0===e?void 0:e.call(t,"up.destroy()")},render:s,navigate:c,get:y,getDumb:m,all:g,subtree:b,contains:w,closest:function(t,e,n){return(e=_(e,t=i.get(t),n)).closest(t)},source:e,hello:p,visit:function(t,e){return c(r(r({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("aria-hidden","true")},emitInserted:l,emitDestroyed:function(t,e){var n,r=null!==(n=e.log)&&void 0!==n?n:["Destroyed fragment %o",t],o=e.parent||document;return up.emit(o,"up:fragment:destroyed",{fragment:t,parent:o,log:r})},emitKeep:function(t){return h(t,"up:fragment:keep",{log:["Keeping fragment %o",t.oldElement],callback:i.callbackAttr(t.oldElement,"up-on-keep",["newFragment","newData"])})},emitKept:f,successKey:function(t){return o.unprefixCamelCase(t,"fail")},failKey:function(t){if(!t.match(/^fail[A-Z]/))return o.prefixCamelCase(t,"fail")},expandTargets:function(t,e){void 0===e&&(e={});var n=e.layer;"new"===n||n instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",n),t=o.copy(o.wrapList(t));for(var r=[];t.length;){var i=t.shift();if(":main"===i||!0===i){var s="new"===n?e.mode:n.mode;t.unshift.apply(t,up.layer.mainTargets(s))}else":layer"===i?"new"===n||n.opening||t.unshift(n.getFirstSwappableElement()):o.isElementish(i)?r.push(k(i)):o.isString(i)&&r.push(S(i,e))}return o.uniq(r)},toTarget:k,matches:function(t,e,n){return void 0===n&&(n={}),(e=_(e,t=i.get(t),n)).matches(t)},hasAutoHistory:function(e){return!!w(e,t.autoHistoryTargets)||(up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1)}}}(),up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.hello=up.fragment.hello,up.visit=up.fragment.visit,o.delegate(up,"context",(function(){return up.layer.current}))},9634:function(){up.framework=function(){var t="evaling";function e(){if("configuring"===t){var e=up.framework.supportIssue();e?console.error("Unpoly cannot boot: %s",e):(t="booting",up.emit("up:framework:boot",{log:!1}),t="booted")}else console.error("Unpoly has already booted")}function n(){return up.browser.canPromise()?"BackCompat"===document.compatMode?"Browser is in quirks mode (missing DOCTYPE?)":up.browser.isEdge18()?"Edge 18 or lower is unsupported":void 0:"Browser doesn't support promises"}return{onEvaled:function(){var n;up.emit("up:framework:evaled",{log:!1}),(null==(n=document.currentScript)?void 0:n.async)||"manual"===(null==n?void 0:n.getAttribute("up-boot"))||"complete"===document.readyState?console.debug("Call up.boot() after you have configured Unpoly"):document.addEventListener("DOMContentLoaded",e),t="configuring"},boot:e,startExtension:function(){if("configuring"!==t)throw new Error("Unpoly extensions must be loaded before booting");t="evaling"},stopExtension:function(){t="configuring"},reset:function(){up.emit("up:framework:reset",{log:!1})},get evaling(){return"evaling"===t},get booted(){return"booted"===t},get beforeBoot(){return"booting"!==t&&"booted"!==t},isSupported:function(){return!n()},supportIssue:n}}(),up.boot=up.framework.boot},8944:function(){var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},e=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};up.history=function(){var n,r,o=up.util,i=up.element,s=new up.Config((function(){return{enabled:!0,restoreTargets:["body"]}}));function u(t,e){return void 0===e&&(e={}),e.hash=!0,o.normalizeURL(t,e)}function a(t){return u(location.href,t)}function c(){var t=a();r!==t&&(n=r,r=t)}function p(t){var e={stripTrailingSlash:!0};return u(t,e)===a(e)}function l(t,e){void 0===e&&(e={}),f("replaceState",t)&&!1!==e.event&&d("up:location:changed",{url:t,reason:"replace",log:"Replaced state for "+o.urlWithoutHost(t)})}function f(t,e){if(s.enabled){return window.history[t]({up:{}},"",e),c(),!0}}function h(r){c(),up.viewport.saveScroll({location:n}),function(n){t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return(null==n?void 0:n.up)?(t=a(),[4,up.render({url:t,history:!0,location:t,peel:!0,layer:"root",target:s.restoreTargets,cache:!0,keep:!1,scroll:"restore",saveScroll:!1})]):[3,2];case 1:return e.sent(),d("up:location:changed",{url:t=a(),reason:"pop",log:"Restored location "+t}),[3,3];case 2:up.puts("pop","Ignoring a state not pushed by Unpoly (%o)",n),e.label=3;case 3:return[2]}}))}))}(r.state)}function d(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.find(up.layer.stack.reversed(),"history");return n.emit.apply(n,t)}function y(){window.history.scrollRestoration="manual",window.addEventListener("popstate",h),"GET"===up.protocol.initialRequestMethod()&&l(a(),{event:!1})}return c(),up.on("up:framework:boot",(function(){"jasmine"in window?y():setTimeout(y,100)})),up.macro("a[up-back], [up-href][up-back]",(function(t){n&&(i.setMissingAttrs(t,{"up-href":n,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))})),up.on("up:framework:reset",(function(){s.reset(),n=void 0,r=void 0,c()})),{config:s,push:function(t){!p(t=u(t))&&f("pushState",t)&&up.emit("up:location:changed",{url:t,reason:"push",log:"Advanced to location "+o.urlWithoutHost(t)})},replace:l,get location(){return a()},get previousLocation(){return n},isLocation:p,normalizeURL:u}}()},9443:function(t,e,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},s=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};n(7921);var u=up.util,a=up.element;up.layer=function(){var t=[up.Layer.Root,up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],e=new up.Config((function(){for(var e={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],history:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"×",dismissAriaLabel:"Dismiss dialog",dismissable:!0,history:"auto"},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation:function(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation:function(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key"}},n=0,r=t;n<r.length;n++){var o=r[n];e[o.mode].Class=o}return e})),n=null,c=[];function p(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function l(t){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t=u.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),[4,up.render(t)];case 1:return[2,e.sent().layer]}}))}))}up.on("up:fragment:destroyed",(function(){n.sync()})),up.on("up:framework:evaled",(function(){n=new up.LayerStack})),up.on("up:framework:reset",(function(){e.reset(),n.reset(),c=u.filter(c,"isDefault")}));var f={config:e,mainTargets:function(t){return u.flatMap(p(t),"mainTargets")},open:l,build:function(t,r){var o=t.mode,i=e[o].Class,a=u.reverse(p(o)),c=up.migrate.handleLayerConfig;return c&&a.forEach(c),t=u.mergeDefined.apply(u,s(s([],a),[{mode:o,stack:n},t])),r&&(t=r(t)),new i(t)},ask:function(t){return new Promise((function(e,n){l(t=r(r({},t),{onAccepted:function(t){return e(t.value)},onDismissed:function(t){return n(t.value)}}))}))},normalizeOptions:function(t){var o,i;if(null===(i=(o=up.migrate).handleLayerOptions)||void 0===i||i.call(o,t),u.isGiven(t.layer)){var s=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/);if(s){t.layer="new";var a=s[1],c=s[3];t.mode||(t.mode=c||e.mode),"swap"===a?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===a&&(t.baseLayer="root")}}else t.mode?t.layer="new":u.isElementish(t.target)?t.layer=n.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current";t.context||(t.context={}),t.baseLayer=n.get("current",r(r({},t),{normalizeLayerOptions:!1}))},openCallbackAttr:function(t,e){return a.callbackAttr(t,e,["layer"])},closeCallbackAttr:function(t,e){return a.callbackAttr(t,e,["layer","value"])},anySelector:function(){return u.map(t,(function(t){return t.selector()})).join(",")},optionToString:function(t){return u.isString(t)?'layer "'+t+'"':t.toString()},get stack(){return n}};return u.delegate(f,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],(function(){return n})),u.delegate(f,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],(function(){return n.current})),f}()},3849:function(t,e,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};n(7298),up.link=function(){var t=up.util,e=up.element,n=new up.LinkPreloader,i=null,s=["a[up-content]","a[up-fragment]","a[up-document]"],u=["a[href]","[up-href]"],a=["[up-follow]","[up-target]","[up-layer]","[up-transition]","[up-preload]","[up-instant]"];function c(e,n){return t.flatMap(e,(function(t){return n.map((function(e){return t+e}))}))}var p=new up.Config((function(){return{followSelectors:c(u,a).concat(s),noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="#"]:not([up-content]):not([up-fragment]):not([up-document])','a[href^="javascript:"]'],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:c(u,["[up-preload]"]),noPreloadSelectors:["[up-preload=false]"],clickableSelectors:s.concat(["[up-emit]","[up-accept]","[up-dismiss]","[up-clickable]"]),preloadDelay:90,preloadEnabled:"auto"}}));function l(){return p.followSelectors.join(",")}function f(n){return e.matches(n,p.noFollowSelectors.join(","))||t.isCrossOrigin(n)}var h=up.mockable((function(t,e){return up.render(y(t,e))}));function d(e,n){n=t.options(n);var r=new up.OptionsParser(n,e);return n.url=function(t,e){void 0===e&&(e={});var n=e.url||t.getAttribute("up-href")||t.getAttribute("href");if("#"!==n)return n}(e,n),n.method=m(e,n),r.json("headers"),r.json("params"),r.booleanOrString("cache"),r.booleanOrString("clearCache"),r.booleanOrString("solo"),r.string("contentType",{attr:["enctype","up-content-type"]}),n}function y(t,n){var r,o;n=d(t=up.fragment.get(t),n);var i=new up.OptionsParser(n,t,{fail:!0});return i.boolean("feedback"),i.boolean("fail"),null==i.options.origin&&(i.options.origin=t),i.boolean("navigate",{default:!0}),i.string("confirm"),i.string("target"),i.booleanOrString("fallback"),i.parse((function(t,n){return e.callbackAttr(t,n,["request","response","renderOptions"])}),"onLoaded"),i.string("content"),i.string("fragment"),i.string("document"),i.boolean("peel"),i.string("layer"),i.string("baseLayer"),i.json("context"),i.string("mode"),i.string("align"),i.string("position"),i.string("class"),i.string("size"),i.booleanOrString("dismissable"),i.parse(up.layer.openCallbackAttr,"onOpened"),i.parse(up.layer.closeCallbackAttr,"onAccepted"),i.parse(up.layer.closeCallbackAttr,"onDismissed"),i.string("acceptEvent"),i.string("dismissEvent"),i.string("acceptLocation"),i.string("dismissLocation"),i.booleanOrString("history"),i.booleanOrString("focus"),i.boolean("saveScroll"),i.booleanOrString("scroll"),i.boolean("revealTop"),i.number("revealMax"),i.number("revealPadding"),i.number("revealSnap"),i.string("scrollBehavior"),i.booleanOrString("history"),i.booleanOrString("location"),i.booleanOrString("title"),i.booleanOrString("animation"),i.booleanOrString("transition"),i.string("easing"),i.number("duration"),null===(o=(r=up.migrate).parseFollowOptions)||void 0===o||o.call(r,i),n.guardEvent||(n.guardEvent=up.event.build("up:link:follow",{log:"Following link"})),n}function m(e,n){return void 0===n&&(n={}),t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function v(t){return t=up.fragment.get(t),e.matches(t,l())&&!f(t)}function g(t){v(t)||t.setAttribute("up-follow","")}function b(t){e.matches(t,"a[href], button")||(e.setMissingAttrs(t,{tabindex:"0",role:"link"}),t.addEventListener("keydown",(function(t){if("Enter"===t.key||"Space"===t.key)return k(t)})))}function w(t,n){if(t.defaultPrevented||f(n))return!1;var r="a, [up-href], "+up.form.fieldSelector(),o=e.closest(t.target,r);return!o||o===n}function O(t){var n,r=e.closest(t,p.instantSelectors.join(","));return r&&(n=r,!(e.matches(n,p.noInstantSelectors.join(","))||f(n)))}function k(t){var e=o(["clientX","clientY","button"],up.event.keyModifiers),n=up.event.fork(t,"up:click",e);up.emit(t.target,n,{log:!1})}return up.macro((function(){return p.clickableSelectors.join(",")}),b),up.on("up:click",l,(function(t,e){w(t,e)&&(up.event.halt(t),up.log.muteUncriticalRejection(h(e)))})),up.macro("[up-expand]",(function(t){var n=t.getAttribute("up-expand")||"a, [up-href]",r=e.get(t,n);if(r){var o=e.upAttrs(r);o["up-href"]||(o["up-href"]=r.getAttribute("href")),e.setMissingAttrs(t,o),g(t)}})),up.compiler((function(){return p.preloadSelectors.join(",")}),(function(t){(function(t){return!up.browser.canPushState()||e.matches(t,p.noPreloadSelectors.join(","))||f(t)||!function(t){var e=d(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)})(t)||n.observeLink(t)})),up.on("up:framework:reset",(function(){i=null,p.reset(),n.reset()})),{follow:h,followOptions:y,preload:function(t,e){if(t=up.fragment.get(t),!("auto"===(n=p.preloadEnabled)?!up.network.shouldReduceRequests():n))return up.error.failed.async("Link preloading is disabled");var n,o=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return h(t,r(r({},e),{guardEvent:o,preload:!0}))},makeFollowable:g,makeClickable:b,isSafe:function(t){var e=m(t);return up.network.isSafeMethod(e)},isFollowable:v,shouldFollowEvent:w,followMethod:m,convertClicks:function(t){t.on("click",(function(e,n){if(up.event.isUnmodified(e))return O(n)&&i?up.event.halt(e):t.wasHitByMouseEvent(e)&&(!i||i===e.target)&&k(e),i=null})),t.on("mousedown",(function(t,e){up.event.isUnmodified(t)&&(i=t.target,O(e)&&k(t))}))},config:p,combineFollowableSelectors:c}}(),up.follow=up.link.follow},4453:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};up.log=function(){var e=new up.store.Session("up.log"),n=new up.Config((function(){return{enabled:e.get("enabled"),banner:!0}})),r=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.apply(void 0,t(["error"],e))};function o(e,n,r){for(var o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];r&&(up.browser.canFormatLog()?(o.unshift(""),o.unshift("color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block"),r="%c"+n+"%c "+r):r="["+n+"] "+r,console[e].apply(console,t([r],o)))}function i(t){e.set("enabled",t),n.enabled=t}return up.on("up:framework:boot",(function(){if(n.banner){var t=" __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / "+up.version+"\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n",e="";up.migrate.loaded||(e+="Load unpoly-migrate.js to enable deprecated APIs.\n\n"),n.enabled?e+="Call `up.log.disable()` to disable logging for this session.":e+="Call `up.log.enable()` to enable logging for this session.";var r="color: #777777";up.browser.canFormatLog()?console.log("%c"+t+"%c"+e,"font-family: monospace;"+r,r):console.log(t+e)}})),up.on("up:framework:reset",(function(){n.reset()})),{puts:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];n.enabled&&o.apply(void 0,t(["log"],e))},error:r,warn:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.apply(void 0,t(["warn"],e))},config:n,enable:function(){i(!0)},disable:function(){i(!1)},fail:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];throw r.apply(void 0,t(["error"],e)),up.error.failed(e)},muteUncriticalRejection:function(t){return t.catch((function(t){if("object"!=typeof t||!("AbortError"===t.name||t instanceof up.RenderResult||t instanceof up.Response))throw t}))},isEnabled:function(){return n.enabled}}}(),up.puts=up.log.puts,up.warn=up.log.warn,up.fail=up.log.fail},6535:function(){up.migrate={config:{}}},8374:function(){up.mockable=function(t){var e,n=function(){return(e||t).apply(null,arguments)};return n.mock=function(){return e=jasmine.createSpy("mockable",t)},document.addEventListener("up:framework:reset",(function(){return e=null})),n}},4034:function(){var t=this&&this.__assign||function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}a((r=r.apply(t,e||[])).next())}))},n=this&&this.__generator||function(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};up.motion=function(){var r=up.util,o=up.element,i={},s={},u=new up.MotionController("motion"),a=new up.Config((function(){return{duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches}}));function c(t){return r.pickBy(t,(function(t){return t.isDefault}))}function p(){return a.enabled}function l(t,e,n){return h(n),p()&&!w(e)&&n.duration>0&&!o.isSingleton(t)}function f(e,n,r){return r=t(t({},r),{finishEvent:u.finishEvent}),new up.CSSTransition(e,n,r).start()}function h(t){t.easing||(t.easing=a.easing),t.duration||(t.duration=a.duration)}function d(t){if(!w(t)){if(r.isFunction(t))return t;if(r.isArray(t))return y.apply(void 0,t);if(!r.isString(t))return up.fail("Unknown transition %o",t);var e=void 0;return t.indexOf("/")>=0?y.apply(void 0,t.split("/")):(e=s[t])?d(e):void 0}}function y(t,e){if(!w(t)&&!w(e)){var n=m(t)||r.asyncNoop,o=m(e)||r.asyncNoop;return function(t,e,r){return Promise.all([n(t,r),o(e,r)])}}}function m(t){return w(t)?void 0:r.isFunction(t)?t:r.isString(t)?i[e=t]||up.fail("Unknown animation %o",e):r.isOptions(t)?function(e,n){return f(e,t,n)}:up.fail("Unknown animation %o",t);var e}var v=up.mockable((function(t,e){o.replace(t,e)}));function g(t,e){var n=d(e);n.isDefault=up.framework.evaling,s[t]=n}function b(t,e){var n=m(e);n.isDefault=up.framework.evaling,i[t]=n}function w(t){return!t||"none"===t}function O(t,e,n){b(t,(function(t,r){return t.style.opacity=0,o.setStyle(t,{opacity:e}),f(t,{opacity:n},r)}))}function k(t,e){return{transform:"translate("+t+"px, "+e+"px)"}}function E(t){return o.setStyle(t,k(0,0)),t.getBoundingClientRect()}function S(t,e){var n="move-from-"+t;b("move-to-"+t,(function(t,n){var r=E(t);return f(t,e(r),n)})),b(n,(function(t,n){var r=E(t),i=e(r);return o.setStyle(t,i),f(t,k(0,0),n)}))}return up.on("up:framework:boot",(function(){p()||up.puts("up.motion","Animations are disabled")})),O("fade-in",0,1),O("fade-out",1,0),S("top",(function(t){return k(0,-(t.top+t.height))})),S("bottom",(function(t){return k(0,up.viewport.rootHeight()-t.top)})),S("left",(function(t){return k(-(t.left+t.width),0)})),S("right",(function(t){return k(up.viewport.rootWidth()-t.left,0)})),g("cross-fade",["fade-out","fade-in"]),g("move-left",["move-to-left","move-from-right"]),g("move-right",["move-to-right","move-from-left"]),g("move-up",["move-to-top","move-from-bottom"]),g("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",(function(){u.reset(),i=c(i),s=c(s),a.reset()})),{morph:function(t,i,s,a){h(a=r.options(a)),t=up.fragment.get(t),i=up.fragment.get(i);var c=d(s),p=l(t,c,a),f=r.pluckKey(a,"beforeStart")||r.noop,y=r.pluckKey(a,"afterInsert")||r.noop,m=r.pluckKey(a,"beforeDetach")||r.noop,g=r.pluckKey(a,"afterDetach")||r.noop,b=r.pluckKey(a,"scrollNew")||r.asyncNoop;if(f(),p){if(u.isActive(t)&&!1===a.trackMotion)return c(t,i,a);up.puts("up.morph()","Morphing %o to %o with transition %O",t,i,s);var w=up.viewport.get(t),O=w.scrollTop,k=up.viewport.absolutize(t,{afterMeasure:function(){o.insertBefore(t,i),y()}});return u.startFunction([t,i],(function(){return e(this,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return[4,b()];case 1:return n.sent(),e=w.scrollTop,k.moveBounds(0,e-O),[4,c(t,i,a)];case 2:return n.sent(),m(),o.remove(k.bounds),g(),[2]}}))}))}),a)}return m(),v(t,i),y(),g(),b()},animate:function(t,e,n){t=up.fragment.get(t),n=r.options(n);var i=m(e);return l(t,e,n)?u.startFunction(t,(function(){return i(t,n)}),n):function(t,e){return r.isOptions(e)&&o.setStyle(t,e),Promise.resolve()}(t,e)},finish:function(t){return u.finish(t)},finishCount:function(){return u.finishCount},transition:g,animation:b,config:a,isEnabled:p,isNone:w,willAnimate:l,swapElementsDirectly:v}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate},1647:function(t,e,n){n(2903);var r=up.util;up.network=function(){var t=new up.Config((function(){return{concurrency:4,wrapMethod:!0,cacheSize:70,cacheExpiry:3e5,badDownlink:.6,badRTT:750,badResponseTime:400,autoCache:function(t){return t.isSafe()},clearCache:function(t,e){return!t.isSafe()},requestMetaKeys:["target","failTarget","mode","failMode","context","failContext"],progressBar:!0}})),e=new up.Request.Queue,n=new up.Request.Cache,o=null;function i(t){var e,n,o=r.extractOptions(t);return o.url||(o.url=t[0]),null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,o),o}function s(t){var r;if(t.willCache()&&(r=n.get(t)))return up.puts("up.request()","Re-using previous request to %s %s",t.method,t.url),t.preload||e.promoteToForeground(r),t.followState(r),!0}function u(o){return o.preload&&!o.isSafe()&&up.fail("Will not preload request to %s",o.description),function(e){e.willCache()&&n.set(e,e),r.always(e,(function(r){var o,i,s=null!==(i=null!==(o=r.clearCache)&&void 0!==o?o:e.clearCache)&&void 0!==i?i:t.clearCache(e,r);s&&n.clear(s),(e.willCache()||n.get(e))&&n.set(e,e),r.ok||n.remove(e)}))}(o),e.asap(o),!0}function a(){return e.isBusy()}var c=r.negate(a);function p(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e.abort.apply(e,t)}return up.on("up:request:late",(function(){r.evalOption(t.progressBar)&&(o=new up.ProgressBar)})),up.on("up:request:recover",(function(){null==o||o.conclude()})),up.on("up:framework:reset",(function(){p(),e.reset(),t.reset(),n.clear(),null==o||o.destroy(),o=null})),{request:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=new up.Request(i(t));s(r)||u(r);var o=r.solo;return o&&e.abortExcept(r,o),r},cache:n,isIdle:c,isBusy:a,isSafeMethod:function(t){return r.contains(["GET","OPTIONS","HEAD"],r.normalizeMethod(t))},config:t,abort:p,registerAliasForRedirect:function(t,e){if(t.cache&&e.url&&t.url!==e.url){var r=t.variant({method:e.method,url:e.url});n.alias(t,r)}},queue:e,shouldReduceRequests:function(){var e=navigator.connection;if(e)return e.saveData||e.rtt&&e.rtt>t.badRTT||e.downlink&&e.downlink<t.badDownlink},mimicLocalRequest:function(t){var e=t.solo;e&&p(e);var r=t.clearCache;r&&n.clear(r)},loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},3535:function(){up.protocol=function(){var t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,(function(t){return"-"+t.toUpperCase()}))},r=function(e,r,o){void 0===o&&(o=t.identity);var i=e.getResponseHeader(n(r));if(i)return o(i)};function o(t){switch(t){case"true":return!0;case"false":return!1;default:return t}}var i=t.memoize((function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))})),s=new up.Config((function(){return{methodParam:"_method",csrfParam:function(){return e.metaContent("csrf-param")},csrfToken:function(){return e.metaContent("csrf-token")},cspNonce:function(){return e.metaContent("csp-nonce")},csrfHeader:"X-CSRF-Token",nonceableAttributes:["up-observe","up-on-accepted","up-on-dismissed","up-on-loaded","up-on-finished","up-observe"]}}));function u(){s.reset()}return up.on("up:framework:reset",u),{config:s,reset:u,locationFromXHR:function(t){return r(t,"location")||t.responseURL},titleFromXHR:function(t){return r(t,"title")},targetFromXHR:function(t){return r(t,"target")},methodFromXHR:function(e){return r(e,"method",t.normalizeMethod)},acceptLayerFromXHR:function(t){return r(t,"acceptLayer",JSON.parse)},contextFromXHR:function(t){return r(t,"context",JSON.parse)},dismissLayerFromXHR:function(t){return r(t,"dismissLayer",JSON.parse)},eventPlansFromXHR:function(t){return r(t,"events",JSON.parse)},clearCacheFromXHR:function(t){return r(t,"clearCache",o)},csrfHeader:function(){return t.evalOption(s.csrfHeader)},csrfParam:function(){return t.evalOption(s.csrfParam)},csrfToken:function(){return t.evalOption(s.csrfToken)},cspNonce:function(){return t.evalOption(s.cspNonce)},initialRequestMethod:i,headerize:n,wrapMethod:function(t,e){return e.add(s.methodParam,t),"POST"},cspNoncesFromHeader:function(t){var e=[];if(t)for(var n=0,r=t.split(/\s*;\s*/);n<r.length;n++){var o=r[n];if(0===o.indexOf("script-src"))for(var i=/'nonce-([^']+)'/g,s=void 0;s=i.exec(o);)e.push(s[1])}return e}}}()},9615:function(){up.radio=function(){var t=up.util,e=up.element,n=new up.Config((function(){return{hungrySelectors:["[up-hungry]"],pollInterval:3e4,pollEnabled:"auto"}}));function r(r,o){var i,s;void 0===o&&(o={});var u=null!==(s=null!==(i=o.interval)&&void 0!==i?i:e.numberAttr(r,"up-interval"))&&void 0!==s?s:n.pollInterval,a=!1,c=null;function p(){a||(function(e){var r,o,i=t.evalOption(n.pollEnabled,e);return"auto"===i?!document.hidden&&!up.network.shouldReduceRequests()&&(null===(o=null===(r=up.layer.get(e))||void 0===r?void 0:r.isFront)||void 0===o?void 0:o.call(r)):i}(r)?t.always(up.reload(r,o),l):(up.puts("[up-poll]","Polling is disabled"),l(Math.min(1e4,u))))}function l(t){void 0===t&&(t=u),a||setTimeout(p,t)}function f(){a=!0,null==c||c.abort()}return o.onQueued=function(t){return c=t},up.on(r,"up:poll:stop",f),l(),f}return up.compiler("[up-poll]",r),up.on("up:framework:reset",(function(){n.reset()})),{config:n,hungrySelector:function(){return n.hungrySelectors.join(",")},startPolling:r,stopPolling:function(t){up.emit(t,"up:poll:stop")}}}()},6774:function(){var t,e;up.rails=(t=up.util,e=up.element,t.each(["method","confirm"],(function(t){var n="data-"+t,r="up-"+t;up.macro("a["+n+"]",(function(t){if((window._rails_loaded||window.Rails||(null===(o=window.jQuery)||void 0===o?void 0:o.rails))&&up.link.isFollowable(t))return e.setMissingAttr(t,r,t.getAttribute(n)),t.removeAttribute(n);var o}))})))},2514:function(){up.syntax=function(){var t=up.util,e=up.element,n={"[up-back]":-100,"[up-content]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400},r=[],o=[];function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=a(t);return c(r,n)}function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=a(t);return up.framework.evaling&&(n.priority=u(n.selector)||up.fail("Unregistered priority for system macro %o",n.selector)),c(o,n)}function u(e){for(var r in e=t.evalOption(e),n){var o=n[r];if(e.indexOf(r)>=0)return o}}function a(e){var n=function(e){var n=e.shift(),r=e.pop();return[n,t.extractOptions(e),r]}(e),r=n[0],o=n[1],i=n[2];return o=t.options(o,{selector:r,isDefault:up.framework.evaling,priority:0,batch:!1,keep:!1,jQuery:!1}),t.assign(i,o)}function c(t,e){var n;up.framework.booted&&up.puts("up.compiler()","Compiler %s was registered after booting Unpoly. Compiler will run for future fragments.",e.selector);for(var r=0;(n=t[r])&&n.priority>=e.priority;)r+=1;return t.splice(r,0,e),e}return up.on("up:framework:reset",(function(){r=t.filter(r,"isDefault"),o=t.filter(o,"isDefault")})),{compiler:i,macro:s,$compiler:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=i.apply(void 0,t);n.jQuery=!0},$macro:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=s.apply(void 0,t);return n.jQuery=!0,n},destructor:function(e,n){var r=e.upDestructors;r||(r=[],e.upDestructors=r,e.classList.add("up-can-clean")),t.isArray(n)?r.push.apply(r,n):r.push(n)},compile:function(t,e){var n=o.concat(r);new up.CompilerPass(t,n,e).run()},clean:function(t,e){void 0===e&&(e={}),new up.DestructorPass(t,e).run()},data:function(t){return t=up.fragment.get(t),e.jsonAttr(t,"up-data")||{}}}}(),up.compiler=up.syntax.compiler,up.$compiler=up.syntax.$compiler,up.destructor=up.syntax.destructor,up.macro=up.syntax.macro,up.$macro=up.syntax.$macro,up.data=up.syntax.data},7924:function(){var t=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};up.util=function(){function e(){}var n={host:"cross-domain",stripTrailingSlash:!1,search:!0,hash:!1};function r(t,e){e=H(e,n);var r,o,i=u(t),a="";"cross-domain"===e.host&&(e.host=s(i)),e.host&&(a+=i.protocol+"//"+i.hostname,r=i.protocol,(""===(o=(o=i.port).toString())||"80"===o)&&"http:"===r||"443"===o&&"https:"===r||(a+=":"+i.port));var c=i.pathname;return e.stripTrailingSlash&&(c=c.replace(/\/$/,"")),a+=c,e.search&&(a+=i.search),e.hash&&(a+=i.hash),a}var o=location.protocol,i=location.hostname;function s(t){if(k(t)&&-1===t.indexOf("//"))return!1;var e=u(t);return i!==e.hostname||o!==e.protocol}function u(t){var e;return L(t)?e=up.element.get(t):t.pathname?e=t:(e=document.createElement("a")).href=t,e.hostname||(e.href=e.href),"/"!==e.pathname[0]&&((e=I(e,["protocol","hostname","port","pathname","search","hash"])).pathname="/"+e.pathname),e}function a(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,o=e;r<o.length;r++){var i=o[r];for(var s in i)t[s]=i[s]}return t}var c=Object.assign||a,p=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))};function l(t){return k(t)?function(e){return e[t]}:t}function f(t,e){if(0===t.length)return[];e=l(e);for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push(e(o,r))}return n}function h(t,e){for(var n=0;n<t.length;n++)e(t[n],n)}function d(t){return null===t}function y(t){return void 0===t}var m=ct(y);function v(t){return y(t)||d(t)}var g=ct(v);function b(t){return!!v(t)||(_(t)&&t[b.key]?t[b.key]():k(t)||A(t)?0===t.length:!!S(t)&&0===Object.keys(t).length)}b.key="up.util.isBlank";var w=ct(b);function O(t){return"function"==typeof t}function k(t){return"string"==typeof t||t instanceof String}function E(t){return"number"==typeof t||t instanceof Number}function S(t){return"object"==typeof t&&!d(t)&&(y(t.constructor)||t.constructor===Object)}function _(t){var e=typeof t;return"object"===e&&!d(t)||"function"===e}function x(t){return t instanceof Element}function C(t){return t instanceof RegExp}function L(t){return up.browser.canJQuery()&&t instanceof jQuery}var T=Array.isArray;function A(t){return T(t)||P(t)||R(t)||L(t)||function(t){return t instanceof HTMLCollection}(t)}function P(t){return t instanceof NodeList}function R(t){return"[object Arguments]"===Object.prototype.toString.call(t)}function F(t){return A(t)?t:v(t)?[]:[t]}function j(t){return _(t)&&t[j.key]?t=t[j.key]():A(t)?t=q(t):S(t)&&(t=c({},t)),t}function q(t){return Array.prototype.slice.call(t)}function D(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return c.apply(void 0,t([{}],e))}function H(t,e){return e?D(e,t):t?j(t):{}}function M(t,e){e=l(e);for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r)return r}}function N(t,e){e=l(e);for(var n=!0,r=0;r<t.length;r++)if(!e(t[r],r)){n=!1;break}return n}function B(t){var e=[];return t.forEach((function(t){return e.push(t)})),e}function z(t){var e=new Set;return t.forEach((function(t){return e.add(t)})),e}function U(t,e){e=l(e);var n=[];return h(t,(function(t,r){if(e(t,r))return n.push(t)})),n}function K(t){return Promise.resolve().then(t)}function V(t){return t[t.length-1]}function W(t,e){return t.indexOf(e)>=0}function I(t,e){for(var n={},r=0,o=e;r<o.length;r++){var i=o[r];i in t&&(n[i]=t[i])}return n}function Q(t,e){e=l(e);var n={};for(var r in t)e(t[r],r,t)&&(n[r]=t[r]);return n}j.key="up.util.copy",Date.prototype[j.key]=function(){return new Date(+this)};var G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};function X(t,e){var n=t[e];return delete t[e],n}function $(t,e){if(e(V(t)))return t.pop()}function J(t){return $(t,S)||{}}function Y(t){return t}function Z(t){for(var e=[],n=0,r=t;n<r.length;n++){var o=r[n];A(o)?e.push.apply(e,o):e.push(o)}return e}function tt(t){return null==t?void 0:t.catch(e)}function et(t,e){if((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),typeof t!=typeof e)return!1;if(A(t)&&A(e))return nt(t,e);if(_(t)&&t[et.key])return t[et.key](e);if(S(t)&&S(e)){var n=Object.keys(t);return!!nt(n,Object.keys(e))&&N(n,(function(n){return et(t[n],e[n])}))}return t===e}function nt(t,e){return t.length===e.length&&N(t,(function(t,n){return et(t,e[n])}))}et.key="up.util.isEqual";var rt=0;function ot(t){return t[0].toLowerCase()+t.slice(1)}function it(t){return t[0].toUpperCase()+t.slice(1)}function st(t){var e,n="";if(k(t))e=(e=(e=t.replace(/[\n\r\t ]+/g," ")).replace(/^[\n\r\t ]+/,"")).replace(/[\n\r\t ]$/,"");else if(y(t))e="undefined";else if(E(t)||O(t))e=t.toString();else if(T(t))e="["+f(t,st).join(", ")+"]",n="]";else if(L(t))e="$("+f(t,st).join(", ")+")",n=")";else if(x(t)){e="<"+t.tagName.toLowerCase();for(var r=0,o=["id","name","class"];r<o.length;r++){var i=o[r],s=t.getAttribute(i);s&&(e+=" "+i+'="'+s+'"')}e+=">",n=">"}else if(C(t))e=t.toString();else try{e=JSON.stringify(t)}catch(t){if("TypeError"!==t.name)throw t;e="(circular structure)"}return e.length>200&&(e=e.substr(0,200)+" …",e+=n),e}var ut=/%[oOdisf]/g;function at(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!e)return"";var o=0;return e.replace(ut,(function(){var e=n[o];return e=t(st(e)),o+=1,e}))}function ct(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(void 0,e)}}return{parseURL:u,normalizeURL:r,urlWithoutHost:function(t){return r(t,{host:!1})},matchURLs:function(t,e){return r(t)===r(e)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},assign:c,assignPolyfill:a,copy:j,copyArrayLike:q,merge:D,mergeDefined:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0,o=t;r<o.length;r++){var i=o[r];if(i)for(var s in i){var u=i[s];m(u)&&(n[s]=u)}}return n},options:H,parseArgIntoOptions:function(t,e){var n=J(t);return m(t[0])&&((n=j(n))[e]=t[0]),n},each:h,eachIterator:function(t,e){for(var n;(n=t.next())&&!n.done;)e(n.value)},map:f,flatMap:function(t,e){return Z(f(t,e))},mapObject:function(t,e){return f(t,e).reduce((function(t,e){return t[e[0]]=e[1],t}),{})},findResult:M,some:function(t,e){return!!M(t,e)},every:N,find:function(t,e){var n;e=l(e);for(var r=0,o=t;r<o.length;r++){var i=o[r];if(e(i)){n=i;break}}return n},filter:U,reject:function(t,e){return U(t,e=ct(l(e)))},intersect:function(t,e){return U(t,(function(t){return W(e,t)}))},compact:function(t){return U(t,g)},compactObject:function(t){return Q(t,g)},uniq:function(t){return t.length<2?t:B(z(t))},uniqBy:function(t,e){if(t.length<2)return t;e=l(e);var n=new Set;return U(t,(function(t,r){var o=e(t,r);return!n.has(o)&&(n.add(o),!0)}))},last:V,isNull:d,isDefined:m,isUndefined:y,isGiven:g,isMissing:v,isPresent:w,isBlank:b,presence:function(t,e){if(void 0===e&&(e=w),e(t))return t},isObject:_,isFunction:O,isString:k,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:E,isElement:x,isJQuery:L,isElementish:function(t){var e;return!(!t||!t.addEventListener&&!(null===(e=t[0])||void 0===e?void 0:e.addEventListener))},isPromise:function(t){return _(t)&&O(t.then)},isOptions:S,isArray:T,isFormData:function(t){return t instanceof FormData},isNodeList:P,isArguments:R,isList:A,isRegExp:C,timer:function(t,e){return setTimeout(e,t)},contains:W,objectContains:function(t,e){return et(e,I(t,Object.keys(e)))},toArray:function(t){return T(t)?t:q(t)},pick:I,pickBy:Q,omit:function(t,e){return Q(t,(function(t,n){return!W(e,n)}))},unresolvablePromise:function(){return new Promise(e)},remove:function(t,e){var n=t.indexOf(e);if(n>=0)return t.splice(n,1),e},memoize:function(t){var e,n;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n?e:(n=!0,e=t.apply(this,r))}},pluckKey:X,renameKey:function(t,e,n){return t[n]=X(t,e)},extractOptions:J,extractCallback:function(t){return $(t,O)},noop:e,asyncNoop:function(){return Promise.resolve()},identity:Y,escapeHTML:function(t){return t.replace(/[&<>"']/g,(function(t){return G[t]}))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(t){return 1===t.length?t[0]:function(){return f(t,(function(t){return t()}))}},evalOption:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return O(t)?t.apply(void 0,e):t},flatten:Z,isTruthy:function(t){return!!t},newDeferred:function(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return n.resolve=t,n.reject=e,n.promise=function(){return n},n},always:function(t,e){return t.then(e,e)},muteRejection:tt,asyncify:function(t){try{return Promise.resolve(t())}catch(t){return Promise.reject(t)}},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:s,task:function(t){return setTimeout(t)},microtask:K,abortableMicrotask:function(t){var e=!1;return K((function(){if(!e)return t()})),function(){return e=!0}},isEqual:et,splitValues:function(t,e){return void 0===e&&(e=" "),k(t)?t=U(t=f(t=t.split(e),(function(t){return t.trim()})),w):F(t)},endsWith:function(t,e){return t.substring(t.length-e.length)===e},wrapList:F,wrapValue:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return n[0]instanceof e?n[0]:new(e.bind.apply(e,t([void 0],n)))},simpleEase:function(t){return t<.5?2*t*t:t*(4-2*t)-1},values:p,arrayToSet:z,setToArray:B,uid:function(){return rt++},upperCaseFirst:it,lowerCaseFirst:ot,getter:function(t,e,n){Object.defineProperty(t,e,{get:n})},delegate:function(t,e,n){F(e).forEach((function(e){Object.defineProperty(t,e,{get:function(){var t=n.call(this),r=t[e];return O(r)&&(r=r.bind(t)),r},set:function(t){n.call(this)[e]=t}})}))},reverse:function(t){return j(t).reverse()},prefixCamelCase:function(t,e){return e+it(t)},unprefixCamelCase:function(t,e){var n=new RegExp("^"+e+"(.+)$"),r=t.match(n);if(r)return ot(r[1])},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))},nullToUndefined:function(t){if(!d(t))return t},sprintf:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return at.apply(void 0,t([Y,e],n))},sprintfWithFormattedArgs:at,renameKeys:function(t,e){var n={};for(var r in t)n[e(r)]=t[r];return n},timestamp:function(){return Math.floor(.001*Date.now())},allSettled:function(t){return Promise.all(f(t,tt))},negate:ct}}()},4606:function(t,e,n){var r=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,o=t.length;n<r;n++,o++)t[o]=e[n];return t};n(573),up.viewport=function(){var t=up.util,e=up.element,n=up.fragment,o=new up.Config((function(){return{viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTop:["[up-fixed~=top]"],fixedBottom:["[up-fixed~=bottom]"],anchoredRight:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:function(){return.5*window.innerHeight},scrollSpeed:1}})),i=new up.MotionController("scrolling");function s(t,e,r){void 0===r&&(r={}),t=n.get(t,r);var o=new up.ScrollMotion(t,e,r);i.startMotion(t,o,r)}function u(e,r){if(r=t.options(r),e=n.get(e,r),!(r.layer=up.layer.get(e)))return up.error.failed.async("Cannot reveal a detached element");r.peel&&r.layer.peel();var o=new up.RevealMotion(e,r);return i.startMotion(e,o,r)}function a(t,e){if(void 0===e&&(e={}),up.browser.isIE11()){var n=l(t),r=n.scrollTop;t.focus(),n.scrollTop=r}else t.focus({preventScroll:!0});if(!e.preventScroll)return u(t)}function c(t,e){void 0===t&&(t=location.hash);var n=k(t,e);if(n)return up.reveal(n,{top:!0})}function p(){return r([d()],o.viewportSelectors).join(",")}function l(t,r){void 0===r&&(r={});var o=n.get(t,r);return e.closest(o,p())}function f(t,r){return void 0===r&&(r={}),t=n.get(t,r),e.around(t,p())}function h(t){return void 0===t&&(t={}),n.all(p(),t)}function d(){var t;return(t=document.scrollingElement)?t.tagName:"html"}function y(){return document.querySelector(d())}function m(t){var n=e.style(t,"overflow-y");return"auto"===n||"scroll"===n}var v=t.memoize((function(){var t=up.element.affix(document.body,"[up-viewport]",{style:{position:"absolute",top:"0",left:"0",width:"100px",height:"100px",overflowY:"scroll"}}),e=t.offsetWidth-t.clientWidth;return up.element.remove(t),e}));function g(t){return up.fragment.toTarget(t)}function b(e){return t.mapObject(e,(function(t){return[g(t),t.scrollTop]}))}function w(e){var n=t.copy(t.extractOptions(e));return n.layer=up.layer.get(n),[e[0]?[l(e[0],n)]:n.around?f(n.around,n):h(n),n]}function O(e,n){var r=t.map(e,(function(t){var e=g(t);return s(t,n[e]||0,{duration:0})}));return Promise.all(r)}function k(t,r){if(void 0===r&&(r={}),t=null==(i=t)?void 0:i.replace(/^#/,"")){var o=[e.attributeSelector("id",t),"a"+e.attributeSelector("name",t)].join(",");return n.get(o,r)}var i}var E=!1;return up.on("scroll",{once:!0,beforeBoot:!0},(function(){return E=!0})),up.on("up:framework:boot",(function(){t.task((function(){if(!E)return c()}))})),up.on(window,"hashchange",(function(){return c()})),up.on("up:framework:reset",(function(){o.reset(),i.reset()})),{reveal:u,revealHash:c,firstHashTarget:k,scroll:s,config:o,get:l,subtree:function(t,r){return void 0===r&&(r={}),t=n.get(t,r),e.subtree(t,p())},around:f,all:h,rootSelector:d,get root(){return y()},rootWidth:function(){return e.root.clientWidth},rootHeight:function(){return e.root.clientHeight},rootHasReducedWidthFromScrollbar:function(){return window.innerWidth>document.documentElement.offsetWidth},rootOverflowElement:function(){var e=document.body,n=document.documentElement;return t.find([n,e],m)||y()},isRoot:function(t){return e.matches(t,d())},scrollbarWidth:v,saveScroll:function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=w(e),o=r[0],i=r[1],s=i.location||i.layer.location;if(s){var u=null!==(t=i.tops)&&void 0!==t?t:b(o);i.layer.lastScrollTops.set(s,u)}},restoreScroll:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=w(e),o=r[0],i=r[1],s=i.layer.location,u=i.layer.lastScrollTops.get(s)||{};return up.puts("up.viewport.restoreScroll()","Restoring scroll positions for URL %s to %o",t.urlWithoutHost(s),u),O(o,u)},resetScroll:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=w(t),r=n[0];return n[1],O(r,{})},anchoredRight:function(){var t=o.anchoredRight.join(",");return n.all(t,{layer:"root"})},absolutize:function(n,r){var i;void 0===r&&(r={});var s=l(n).getBoundingClientRect(),u=n.getBoundingClientRect(),a=new up.Rect({left:u.left-s.left,top:u.top-s.top,width:u.width,height:u.height});null===(i=r.afterMeasure)||void 0===i||i.call(r),e.setStyle(n,{position:"static"===n.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"});var c=e.createFromSelector("up-bounds");e.insertBefore(n,c),c.appendChild(n);var p=function(t,n){return a.left+=t,a.top+=n,e.setStyle(c,a)};p(0,0);var f=n.getBoundingClientRect();return p(u.left-f.left,u.top-f.top),t.each(function(t){void 0===t&&(t=document);var e=["[up-fixed]"].concat(o.fixedTop).concat(o.fixedBottom);return t.querySelectorAll(e.join(","))}(n),e.fixedToAbsolute),{bounds:c,moveBounds:p}},focus:a,tryFocus:function(t,e){return a(t,e),t===document.activeElement},makeFocusable:function(t){t.hasAttribute("tabindex")||function(t){return e.matches(t,"a[href], button, textarea, input, select")}(t)||(t.setAttribute("tabindex","-1"),t.classList.add("up-focusable-content"))}}}(),up.focus=up.viewport.focus,up.scroll=up.viewport.scroll,up.reveal=up.viewport.reveal},3507:function(){window.up={version:"2.3.0"}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n(3507),n(8374),n(7924),n(3924),n(6535),n(2811),n(9675),n(2406),n(3742),n(3115),n(1279),n(6346),n(3030),n(7948),n(1752),n(8228),n(7050),n(9441),n(7422),n(9005),n(2200),n(1569),n(2737),n(3635),n(1906),n(4158),n(3139),n(6866),n(665),n(2828),n(2587),n(7031),n(4850),n(6267),n(7956),n(7403),n(6412),n(7965),n(7771),n(86),n(4552),n(5580),n(7101),n(6066),n(6387),n(5390),n(2618),n(7792),n(4308),n(1104),n(8665),n(3645),n(7782),n(2705),n(606),n(5437),n(7974),n(6413),n(5221),n(2298),n(4517),n(7241),n(2723),n(6956),n(8720),n(104),n(5438),n(7885),n(4818),n(9634),n(8670),n(3535),n(4453),n(2514),n(8944),n(2667),n(4606),n(4034),n(1647),n(9443),n(3849),n(2851),n(454),n(9615),n(6774),up.framework.onEvaled()}();
@@ -8,7 +8,7 @@
8
8
  @module up
9
9
  */
10
10
  window.up = {
11
- version: '2.2.1'
11
+ version: '2.3.0'
12
12
  };
13
13
 
14
14
 
@@ -1211,7 +1211,7 @@ up.util = (function () {
1211
1211
 
1212
1212
  @function up.util.pickBy
1213
1213
  @param {Object} object
1214
- @param {Function<string, string, object>} tester
1214
+ @param {Function(string, string, object): boolean} tester
1215
1215
  A function that will be called with each property.
1216
1216
 
1217
1217
  The arguments are the property value, key and the entire object.
@@ -2020,7 +2020,7 @@ up.util = (function () {
2020
2020
  renameKeys,
2021
2021
  timestamp: secondsSinceEpoch,
2022
2022
  allSettled,
2023
- negate
2023
+ negate,
2024
2024
  };
2025
2025
  })();
2026
2026
 
@@ -2093,48 +2093,16 @@ up.migrate = { config: {} };
2093
2093
  /***/ (() => {
2094
2094
 
2095
2095
  /*-
2096
- Browser support
2097
- ===============
2098
-
2099
- Unpoly supports all modern browsers.
2100
-
2101
- ### Chrome, Firefox, Edge, Safari
2102
-
2103
- Full support.
2104
-
2105
- ### Internet Explorer 11
2106
-
2107
- Full support with a `Promise` polyfill like [es6-promise](https://github.com/stefanpenner/es6-promise) (2.4 KB).\
2108
- Support may be removed when Microsoft retires IE11 in [June 2022](https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/).
2109
-
2110
- ### Internet Explorer 10 or lower
2096
+ Browser interface
2097
+ =================
2111
2098
 
2112
- Unpoly will not boot or [run compilers](/up.compiler),
2113
- leaving you with a classic server-side application.
2099
+ We tunnel some browser APIs through this module for easier mocking in tests.
2114
2100
 
2115
2101
  @module up.browser
2116
2102
  */
2117
2103
  up.browser = (function () {
2118
2104
  const u = up.util;
2119
2105
  /*-
2120
- Makes a full-page request, replacing the entire browser environment with a new page from the server response.
2121
-
2122
- Also see `up.Request#loadPage()`.
2123
-
2124
- @function up.browser.loadPage
2125
- @param {string} options.url
2126
- The URL to load.
2127
- @param {string} [options.method='get']
2128
- The method for the request.
2129
-
2130
- Methods other than GET or POST will be [wrapped](/up.protocol.config#config.methodParam) in a POST request.
2131
- @param {Object|Array|FormData|string} [options.params]
2132
- @experimental
2133
- */
2134
- function loadPage(requestsAttrs) {
2135
- new up.Request(requestsAttrs).loadPage();
2136
- }
2137
- /*-
2138
2106
  Submits the given form with a full page load.
2139
2107
 
2140
2108
  For mocking in specs.
@@ -2148,6 +2116,11 @@ up.browser = (function () {
2148
2116
  function isIE11() {
2149
2117
  return 'ActiveXObject' in window; // this is undefined, but the key is set
2150
2118
  }
2119
+ function isEdge18() {
2120
+ // Edge 18: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19582
2121
+ // Edge 92: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 Edg/92.0.902.78
2122
+ return u.contains(navigator.userAgent, ' Edge/');
2123
+ }
2151
2124
  /*-
2152
2125
  Returns whether this browser supports manipulation of the current URL
2153
2126
  via [`history.pushState`](https://developer.mozilla.org/en-US/docs/Web/API/History/pushState).
@@ -2197,6 +2170,17 @@ up.browser = (function () {
2197
2170
  function canJQuery() {
2198
2171
  return !!window.jQuery;
2199
2172
  }
2173
+ const canEval = u.memoize(function () {
2174
+ try {
2175
+ // Don't use eval() which would prevent minifiers from compressing local variables.
2176
+ return new Function('return true')();
2177
+ }
2178
+ catch {
2179
+ // With a strict CSP this will be an error like:
2180
+ // Uncaught EvalError: call to Function() blocked by CSP
2181
+ return false;
2182
+ }
2183
+ });
2200
2184
  // IE11: Use the browser.cookies API instead.
2201
2185
  function popCookie(name) {
2202
2186
  let value = document.cookie.match(new RegExp(name + "=(\\w+)"))?.[1];
@@ -2225,42 +2209,19 @@ up.browser = (function () {
2225
2209
  }
2226
2210
  return true;
2227
2211
  }
2228
- /*-
2229
- Returns whether Unpoly supports the current browser.
2230
-
2231
- If this returns `false` Unpoly will prevent itself from booting
2232
- and ignores all registered [event handlers](/up.on) and [compilers](/up.compiler).
2233
- This leaves you with a classic server-side application.
2234
- This is usually a better fallback than loading incompatible Javascript and causing
2235
- many errors on load.
2236
-
2237
- @function up.browser.isSupported
2238
- @stable
2239
- */
2240
- function isSupported() {
2241
- return !supportIssue();
2242
- }
2243
- function supportIssue() {
2244
- if (!canPromise()) {
2245
- return "Browser doesn't support promises";
2246
- }
2247
- if (document.compatMode === 'BackCompat') {
2248
- return 'Browser is in quirks mode (missing DOCTYPE?)';
2249
- }
2250
- }
2251
2212
  return {
2252
- loadPage,
2253
2213
  submitForm,
2254
2214
  canPushState,
2255
2215
  canFormatLog,
2256
2216
  canPassiveEventListener,
2257
2217
  canJQuery,
2218
+ canPromise,
2219
+ canEval,
2258
2220
  assertConfirmed,
2259
- isSupported,
2260
- supportIssue,
2261
2221
  popCookie,
2262
2222
  get jQuery() { return getJQuery(); },
2263
- isIE11
2223
+ isIE11,
2224
+ isEdge18,
2264
2225
  };
2265
2226
  })();
2266
2227
 
@@ -3223,7 +3184,7 @@ up.element = (function () {
3223
3184
  let code = link.getAttribute(attr);
3224
3185
  if (code) {
3225
3186
  // Allow callbacks to refer to an exposed property directly instead of through `event.value`.
3226
- const callback = new Function('event', ...exposedKeys, code);
3187
+ const callback = up.NonceableCallback.fromString(code).toFunction('event', ...exposedKeys);
3227
3188
  // Emulate the behavior of the `onclick` attribute,
3228
3189
  // where `this` refers to the clicked element.
3229
3190
  return function (event) {
@@ -4009,7 +3970,7 @@ up.Change.OpenLayer = class OpenLayer extends up.Change.Addition {
4009
3970
  // We assume that the server will respond with our target.
4010
3971
  return this.target;
4011
3972
  }
4012
- execute(responseDoc) {
3973
+ execute(responseDoc, onApplicable) {
4013
3974
  if (this.target === ':none') {
4014
3975
  this.content = document.createElement('up-none');
4015
3976
  }
@@ -4019,6 +3980,7 @@ up.Change.OpenLayer = class OpenLayer extends up.Change.Addition {
4019
3980
  if (!this.content || this.baseLayer.isClosed()) {
4020
3981
  throw this.notApplicable();
4021
3982
  }
3983
+ onApplicable();
4022
3984
  up.puts('up.render()', `Opening element "${this.target}" in new overlay`);
4023
3985
  this.options.title = this.improveHistoryValue(this.options.title, responseDoc.getTitle());
4024
3986
  if (this.emitOpenEvent().defaultPrevented) {
@@ -4179,11 +4141,12 @@ up.Change.UpdateLayer = class UpdateLayer extends up.Change.Addition {
4179
4141
  this.matchPreflight();
4180
4142
  return u.map(this.steps, 'selector').join(', ') || ':none';
4181
4143
  }
4182
- execute(responseDoc) {
4144
+ execute(responseDoc, onApplicable) {
4183
4145
  this.responseDoc = responseDoc;
4184
4146
  // For each step, find a step.alternative that matches in both the current page
4185
4147
  // and the response document.
4186
4148
  this.matchPostflight();
4149
+ onApplicable();
4187
4150
  // Don't log @target since that does not include hungry elements
4188
4151
  up.puts('up.render()', `Updating "${this.bestPreflightSelector()}" in ${this.layer}`);
4189
4152
  this.options.title = this.improveHistoryValue(this.options.title, this.responseDoc.getTitle());
@@ -4573,7 +4536,7 @@ up.Change.CloseLayer = class CloseLayer extends up.Change.Removal {
4573
4536
  // because the layer is detached. We do not want to emit it on the parent layer where users
4574
4537
  // might confuse it with an event for the parent layer itself. Since @layer.element
4575
4538
  // is now detached, the event will no longer bubble up to the document where global
4576
- // event listeners can receive it. So we explicitely emit the event a second time
4539
+ // event listeners can receive it. So we explicitly emit the event a second time
4577
4540
  // on the document.
4578
4541
  return this.layer.emit(this.buildEvent(`up:layer:${verbPast}`), {
4579
4542
  // Set up.layer.current to the parent of the closed layer, which is now likely
@@ -4671,12 +4634,20 @@ up.Change.FromContent = class FromContent extends up.Change {
4671
4634
  if (this.options.preload) {
4672
4635
  return Promise.resolve();
4673
4636
  }
4674
- const executePlan = plan => plan.execute(this.getResponseDoc());
4675
- return this.seekPlan(executePlan) || this.postflightTargetNotApplicable();
4637
+ return this.seekPlan(this.executePlan.bind(this)) || this.postflightTargetNotApplicable();
4638
+ }
4639
+ executePlan(matchedPlan) {
4640
+ return matchedPlan.execute(this.getResponseDoc(), this.onPlanApplicable.bind(this, matchedPlan));
4641
+ }
4642
+ onPlanApplicable(plan) {
4643
+ let primaryPlan = this.getPlans()[0];
4644
+ if (plan !== primaryPlan) {
4645
+ up.puts('up.render()', 'Could not match primary target (%s). Updating a fallback target (%s).', primaryPlan.target, plan.target);
4646
+ }
4676
4647
  }
4677
4648
  getResponseDoc() {
4678
4649
  if (!this.preview && !this.responseDoc) {
4679
- const docOptions = u.pick(this.options, ['target', 'content', 'fragment', 'document', 'html']);
4650
+ const docOptions = u.pick(this.options, ['target', 'content', 'fragment', 'document', 'html', 'cspNonces']);
4680
4651
  up.migrate.handleResponseDocOptions?.(docOptions);
4681
4652
  // If neither { document } nor { fragment } source is given, we assume { content }.
4682
4653
  if (this.defaultPlacement() === 'content') {
@@ -4766,7 +4737,7 @@ up.Change.FromURL = class FromURL extends up.Change {
4766
4737
  let newPageReason = this.newPageReason();
4767
4738
  if (newPageReason) {
4768
4739
  up.puts('up.render()', newPageReason);
4769
- up.browser.loadPage(this.options);
4740
+ up.network.loadPage(this.options);
4770
4741
  // Prevent our caller from executing any further code, since we're already
4771
4742
  // navigating away from this JavaScript environment.
4772
4743
  return u.unresolvablePromise();
@@ -4833,17 +4804,21 @@ up.Change.FromURL = class FromURL extends up.Change {
4833
4804
  isSuccessfulResponse() {
4834
4805
  return (this.successOptions.fail === false) || this.response.ok;
4835
4806
  }
4836
- buildEvent(type, props) {
4837
- const defaultProps = { request: this.request, response: this.response, renderOptions: this.options };
4838
- return up.event.build(type, u.merge(defaultProps, props));
4839
- }
4807
+ // buildEvent(type, props) {
4808
+ // const defaultProps = { request: this.request, response: this.response, renderOptions: this.options }
4809
+ // return up.event.build(type, u.merge(defaultProps, props))
4810
+ // }
4840
4811
  updateContentFromResponse(log, renderOptions) {
4841
4812
  // Allow listeners to inspect the response and either prevent the fragment change
4842
4813
  // or manipulate change options. An example for when this is useful is a maintenance
4843
4814
  // page with its own layout, that cannot be loaded as a fragment and must be loaded
4844
4815
  // with a full page load.
4845
- const event = this.buildEvent('up:fragment:loaded', { renderOptions });
4846
- this.request.assertEmitted(event, { log, callback: this.options.onLoaded });
4816
+ this.request.assertEmitted('up:fragment:loaded', {
4817
+ callback: this.options.onLoaded,
4818
+ response: this.response,
4819
+ log,
4820
+ renderOptions,
4821
+ });
4847
4822
  // The response might carry some updates for our change options,
4848
4823
  // like a server-set location, or server-sent events.
4849
4824
  this.augmentOptionsFromResponse(renderOptions);
@@ -4887,6 +4862,7 @@ up.Change.FromURL = class FromURL extends up.Change {
4887
4862
  // If the server has provided an update to our context via the X-Up-Context
4888
4863
  // response header, merge it into our existing { context } option.
4889
4864
  renderOptions.context = u.merge(renderOptions.context, this.response.context);
4865
+ renderOptions.cspNonces = this.response.cspNonces;
4890
4866
  }
4891
4867
  };
4892
4868
 
@@ -5336,13 +5312,20 @@ up.EventListener = class EventListener extends up.Record {
5336
5312
  'guard',
5337
5313
  'baseLayer',
5338
5314
  'passive',
5339
- 'once'
5315
+ 'once',
5316
+ 'beforeBoot',
5340
5317
  ];
5341
5318
  }
5342
5319
  constructor(attributes) {
5343
5320
  super(attributes);
5344
5321
  this.key = this.constructor.buildKey(attributes);
5345
- this.isDefault = up.framework.booting;
5322
+ this.isDefault = up.framework.evaling;
5323
+ // We don't usually run up.on() listeners before Unpoly has booted.
5324
+ // This is done so incompatible code is not called on browsers that don't support Unpoly.
5325
+ // Listeners that do need to run before Unpoly boots can pass { beforeBoot: true } to override.
5326
+ // We also default to { beforeBoot: true } for framework events that are emitted
5327
+ // before booting.
5328
+ this.beforeBoot ?? (this.beforeBoot = this.eventType.indexOf('up:framework:') === 0);
5346
5329
  // Need to store the bound nativeCallback function because addEventListener()
5347
5330
  // and removeEventListener() need to see the exact same reference.
5348
5331
  this.nativeCallback = this.nativeCallback.bind(this);
@@ -5371,6 +5354,9 @@ up.EventListener = class EventListener extends up.Record {
5371
5354
  this.element.removeEventListener(...this.addListenerArgs());
5372
5355
  }
5373
5356
  nativeCallback(event) {
5357
+ if (up.framework.beforeBoot && !this.beforeBoot) {
5358
+ return;
5359
+ }
5374
5360
  // Once we drop IE11 support we can forward the { once } option
5375
5361
  // to Element#addEventListener().
5376
5362
  if (this.once) {
@@ -5457,7 +5443,8 @@ up.EventListenerGroup = class EventListenerGroup extends up.Record {
5457
5443
  'guard',
5458
5444
  'baseLayer',
5459
5445
  'passive',
5460
- 'once'
5446
+ 'once',
5447
+ 'beforeBoot',
5461
5448
  ];
5462
5449
  }
5463
5450
  bind() {
@@ -7731,6 +7718,119 @@ up.MotionController = class MotionController {
7731
7718
  /* 49 */
7732
7719
  /***/ (() => {
7733
7720
 
7721
+ const u = up.util;
7722
+ const e = up.element;
7723
+ up.NonceableCallback = class NonceableCallback {
7724
+ constructor(script, nonce) {
7725
+ this.script = script;
7726
+ this.nonce = nonce;
7727
+ }
7728
+ static fromString(string) {
7729
+ let match = string.match(/^(nonce-([^\s]+)\s)?(.*)$/);
7730
+ return new this(match[3], match[2]);
7731
+ }
7732
+ /*-
7733
+ Replacement for `new Function()` that can take a nonce to work with a strict Content Security Policy.
7734
+
7735
+ It also prints an error when a strict CSP is active, but user supplies no nonce.
7736
+
7737
+ ### Examples
7738
+
7739
+ ```js
7740
+ new up.NonceableCallback('1 + 2', 'secret').toFunction()
7741
+ ```
7742
+
7743
+ @function up.NonceableCallback#toFunction
7744
+ @internal
7745
+ */
7746
+ toFunction(...argNames) {
7747
+ if (up.browser.canEval()) {
7748
+ return new Function(...argNames, this.script);
7749
+ }
7750
+ else if (this.nonce) {
7751
+ // Don't return a bound function so callers can re-bind to a different this.
7752
+ let callbackThis = this;
7753
+ return function (...args) {
7754
+ return callbackThis.runAsNoncedFunction(this, argNames, args);
7755
+ };
7756
+ }
7757
+ else {
7758
+ return this.cannotRun.bind(this);
7759
+ }
7760
+ }
7761
+ toString() {
7762
+ return `nonce-${this.nonce} ${this.script}`;
7763
+ }
7764
+ cannotRun() {
7765
+ throw new Error(`Your Content Security Policy disallows inline JavaScript (${this.script}). See https://unpoly.com/csp for solutions.`);
7766
+ }
7767
+ runAsNoncedFunction(thisArg, argNames, args) {
7768
+ let wrappedScript = `
7769
+ try {
7770
+ up.noncedEval.value = (function(${argNames.join(',')}) {
7771
+ ${this.script}
7772
+ }).apply(up.noncedEval.thisArg, up.noncedEval.args)
7773
+ } catch (error) {
7774
+ up.noncedEval.error = error
7775
+ }
7776
+ `;
7777
+ let script;
7778
+ try {
7779
+ up.noncedEval = { args, thisArg: thisArg };
7780
+ script = up.element.affix(document.body, 'script', { nonce: this.nonce, text: wrappedScript });
7781
+ if (up.noncedEval.error) {
7782
+ throw up.noncedEval.error;
7783
+ }
7784
+ else {
7785
+ return up.noncedEval.value;
7786
+ }
7787
+ }
7788
+ finally {
7789
+ up.noncedEval = undefined;
7790
+ if (script) {
7791
+ up.element.remove(script);
7792
+ }
7793
+ }
7794
+ }
7795
+ allowedBy(allowedNonces) {
7796
+ return this.nonce && u.contains(allowedNonces, this.nonce);
7797
+ }
7798
+ static adoptNonces(element, allowedNonces) {
7799
+ if (!allowedNonces?.length) {
7800
+ return;
7801
+ }
7802
+ // Looking up a nonce requires a DOM query.
7803
+ // For performance reasons we only do this when we're actually rewriting
7804
+ // a nonce, and only once per response.
7805
+ const getPageNonce = u.memoize(up.protocol.cspNonce);
7806
+ u.each(up.protocol.config.nonceableAttributes, (attribute) => {
7807
+ let matches = e.subtree(element, `[${attribute}^="nonce-"]`);
7808
+ u.each(matches, (match) => {
7809
+ let attributeValue = match.getAttribute(attribute);
7810
+ let callback = this.fromString(attributeValue);
7811
+ let warn = (message, ...args) => up.log.warn('up.render()', `Cannot use callback [${attribute}="${attributeValue}"]: ${message}`, ...args);
7812
+ if (!callback.allowedBy(allowedNonces)) {
7813
+ // Don't rewrite a nonce that the browser would have rejected.
7814
+ return warn("Callback's CSP nonce (%o) does not match response header (%o)", callback.nonce, allowedNonces);
7815
+ }
7816
+ // Replace the nonce with that of the current page.
7817
+ // This will allow the handler to run via #toFunction().
7818
+ let pageNonce = getPageNonce();
7819
+ if (!pageNonce) {
7820
+ return warn("Current page's CSP nonce is unknown");
7821
+ }
7822
+ callback.nonce = pageNonce;
7823
+ match.setAttribute(attribute, callback.toString());
7824
+ });
7825
+ });
7826
+ }
7827
+ };
7828
+
7829
+
7830
+ /***/ }),
7831
+ /* 50 */
7832
+ /***/ (() => {
7833
+
7734
7834
  const u = up.util;
7735
7835
  const e = up.element;
7736
7836
  up.OptionsParser = class OptionsParser {
@@ -7795,7 +7895,7 @@ up.OptionsParser = class OptionsParser {
7795
7895
 
7796
7896
 
7797
7897
  /***/ }),
7798
- /* 50 */
7898
+ /* 51 */
7799
7899
  /***/ (() => {
7800
7900
 
7801
7901
  const e = up.element;
@@ -7886,7 +7986,7 @@ up.OverlayFocus = class OverlayFocus {
7886
7986
 
7887
7987
 
7888
7988
  /***/ }),
7889
- /* 51 */
7989
+ /* 52 */
7890
7990
  /***/ (() => {
7891
7991
 
7892
7992
  const u = up.util;
@@ -8473,7 +8573,7 @@ up.Params = class Params {
8473
8573
 
8474
8574
 
8475
8575
  /***/ }),
8476
- /* 52 */
8576
+ /* 53 */
8477
8577
  /***/ (() => {
8478
8578
 
8479
8579
  const e = up.element;
@@ -8530,7 +8630,7 @@ up.ProgressBar = class ProgressBar {
8530
8630
 
8531
8631
 
8532
8632
  /***/ }),
8533
- /* 53 */
8633
+ /* 54 */
8534
8634
  /***/ (() => {
8535
8635
 
8536
8636
  const u = up.util;
@@ -8668,7 +8768,7 @@ up.RenderOptions = (function () {
8668
8768
 
8669
8769
 
8670
8770
  /***/ }),
8671
- /* 54 */
8771
+ /* 55 */
8672
8772
  /***/ (() => {
8673
8773
 
8674
8774
  /*-
@@ -8709,7 +8809,7 @@ up.RenderResult = class RenderResult extends up.Record {
8709
8809
 
8710
8810
 
8711
8811
  /***/ }),
8712
- /* 55 */
8812
+ /* 56 */
8713
8813
  /***/ (() => {
8714
8814
 
8715
8815
  const u = up.util;
@@ -9258,7 +9358,11 @@ up.Request = class Request extends up.Record {
9258
9358
  // This way listeners can observe event-related events on a given layer.
9259
9359
  // This request has an optional { layer } attribute, which is used by
9260
9360
  // EventEmitter.
9261
- return up.EventEmitter.fromEmitArgs(args, { request: this, layer: this.layer });
9361
+ return up.EventEmitter.fromEmitArgs(args, {
9362
+ layer: this.layer,
9363
+ request: this,
9364
+ origin: this.origin
9365
+ });
9262
9366
  }
9263
9367
  emit(...args) {
9264
9368
  return this.buildEventEmitter(args).emit();
@@ -9270,11 +9374,27 @@ up.Request = class Request extends up.Record {
9270
9374
  return this.method + ' ' + this.url;
9271
9375
  }
9272
9376
  };
9377
+ // A request is also a promise ("thenable") for its response.
9273
9378
  u.delegate(up.Request.prototype, ['then', 'catch', 'finally'], function () { return this.deferred; });
9379
+ up.Request.tester = function (condition) {
9380
+ if (u.isFunction(condition)) {
9381
+ return condition;
9382
+ }
9383
+ else if (condition instanceof this) {
9384
+ return (request) => condition === request;
9385
+ }
9386
+ else if (u.isString(condition)) {
9387
+ let pattern = new up.URLPattern(condition);
9388
+ return (request) => pattern.test(request.url);
9389
+ }
9390
+ else { // boolean, truthy/falsy values
9391
+ return (_request) => condition;
9392
+ }
9393
+ };
9274
9394
 
9275
9395
 
9276
9396
  /***/ }),
9277
- /* 56 */
9397
+ /* 57 */
9278
9398
  /***/ (() => {
9279
9399
 
9280
9400
  let u = up.util;
@@ -9305,24 +9425,21 @@ up.Request.Cache = class Cache extends up.Cache {
9305
9425
  // candidates.push(request.variant(target: 'body'))
9306
9426
  //
9307
9427
  // u.findResult candidates, (candidate) => super(candidate)
9308
- clear(pattern) {
9309
- if (pattern && (pattern !== '*') && (pattern !== true)) {
9310
- pattern = new up.URLPattern(pattern);
9311
- return this.each((key, request) => {
9312
- if (pattern.test(request.url)) {
9313
- this.store.remove(key);
9314
- }
9315
- });
9316
- }
9317
- else {
9318
- super.clear();
9319
- }
9428
+ clear(condition = true) {
9429
+ let tester = up.Request.tester(condition);
9430
+ this.each((key, request) => {
9431
+ if (tester(request)) {
9432
+ // It is generally not a great idea to manipulate the list we're iterating over,
9433
+ // but the implementation of up.Cache#each copies keys before iterating.
9434
+ this.store.remove(key);
9435
+ }
9436
+ });
9320
9437
  }
9321
9438
  };
9322
9439
 
9323
9440
 
9324
9441
  /***/ }),
9325
- /* 57 */
9442
+ /* 58 */
9326
9443
  /***/ (() => {
9327
9444
 
9328
9445
  const u = up.util;
@@ -9419,11 +9536,13 @@ up.Request.Queue = class Queue {
9419
9536
  }
9420
9537
  // Aborting a request will cause its promise to reject, which will also uncache it
9421
9538
  abort(conditions = true) {
9539
+ let tester = up.Request.tester(conditions);
9422
9540
  for (let list of [this.currentRequests, this.queuedRequests]) {
9423
- const matches = u.filter(list, request => this.requestMatches(request, conditions));
9424
- matches.forEach(function (match) {
9425
- match.abort();
9426
- u.remove(list, match);
9541
+ const abortableRequests = u.filter(list, tester);
9542
+ abortableRequests.forEach(function (abortableRequest) {
9543
+ abortableRequest.abort();
9544
+ // Avoid changing the list we're iterating over.
9545
+ u.remove(list, abortableRequest);
9427
9546
  });
9428
9547
  }
9429
9548
  }
@@ -9431,9 +9550,6 @@ up.Request.Queue = class Queue {
9431
9550
  const excusedCacheKey = excusedRequest.cacheKey();
9432
9551
  this.abort(queuedRequest => (queuedRequest.cacheKey() !== excusedCacheKey) && u.evalOption(additionalConditions, queuedRequest));
9433
9552
  }
9434
- requestMatches(request, conditions) {
9435
- return (request === conditions) || u.evalOption(conditions, request);
9436
- }
9437
9553
  checkSlow() {
9438
9554
  const currentSlow = this.isSlow();
9439
9555
  if (this.emittedSlow !== currentSlow) {
@@ -9461,7 +9577,7 @@ up.Request.Queue = class Queue {
9461
9577
 
9462
9578
 
9463
9579
  /***/ }),
9464
- /* 58 */
9580
+ /* 59 */
9465
9581
  /***/ (() => {
9466
9582
 
9467
9583
  const u = up.util;
@@ -9489,7 +9605,7 @@ up.Request.FormRenderer = class FormRenderer {
9489
9605
  method = up.protocol.wrapMethod(method, this.params);
9490
9606
  }
9491
9607
  this.form = e.affix(document.body, 'form.up-request-loader', { method, action });
9492
- // We only need an [enctype] attribute if the user has explicitely
9608
+ // We only need an [enctype] attribute if the user has explicitly
9493
9609
  // requested one. If none is given, we can use the browser's default
9494
9610
  // [enctype]. Binary values cannot be sent by this renderer anyway, so
9495
9611
  // we don't need to default to multipart/form-data in this case.
@@ -9513,7 +9629,7 @@ up.Request.FormRenderer = class FormRenderer {
9513
9629
 
9514
9630
 
9515
9631
  /***/ }),
9516
- /* 59 */
9632
+ /* 60 */
9517
9633
  /***/ (() => {
9518
9634
 
9519
9635
  const CONTENT_TYPE_URL_ENCODED = 'application/x-www-form-urlencoded';
@@ -9620,7 +9736,7 @@ up.Request.XHRRenderer = class XHRRenderer {
9620
9736
 
9621
9737
 
9622
9738
  /***/ }),
9623
- /* 60 */
9739
+ /* 61 */
9624
9740
  /***/ (() => {
9625
9741
 
9626
9742
  /*-
@@ -9776,6 +9892,9 @@ up.Response = class Response extends up.Record {
9776
9892
  get contentType() {
9777
9893
  return this.getHeader('Content-Type');
9778
9894
  }
9895
+ get cspNonces() {
9896
+ return up.protocol.cspNoncesFromHeader(this.getHeader('Content-Security-Policy'));
9897
+ }
9779
9898
  /*-
9780
9899
  The response body parsed as a JSON string.
9781
9900
 
@@ -9798,7 +9917,7 @@ up.Response = class Response extends up.Record {
9798
9917
 
9799
9918
 
9800
9919
  /***/ }),
9801
- /* 61 */
9920
+ /* 62 */
9802
9921
  /***/ (() => {
9803
9922
 
9804
9923
  const u = up.util;
@@ -9828,6 +9947,7 @@ up.ResponseDoc = class ResponseDoc {
9828
9947
  this.parseDocument(options) ||
9829
9948
  this.parseFragment(options) ||
9830
9949
  this.parseContent(options);
9950
+ this.cspNonces = options.cspNonces;
9831
9951
  }
9832
9952
  parseDocument(options) {
9833
9953
  return this.parse(options.document, e.createDocumentFromHTML);
@@ -9894,6 +10014,8 @@ up.ResponseDoc = class ResponseDoc {
9894
10014
  finalizeElement(element) {
9895
10015
  // Restore <noscript> tags so they become available to compilers.
9896
10016
  this.noscriptWrapper.unwrap(element);
10017
+ // Rewrite per-request CSP nonces to match that of the current page.
10018
+ up.NonceableCallback.adoptNonces(element, this.cspNonces);
9897
10019
  // Restore <script> so they will run.
9898
10020
  this.scriptWrapper.unwrap(element);
9899
10021
  }
@@ -9901,7 +10023,7 @@ up.ResponseDoc = class ResponseDoc {
9901
10023
 
9902
10024
 
9903
10025
  /***/ }),
9904
- /* 62 */
10026
+ /* 63 */
9905
10027
  /***/ (() => {
9906
10028
 
9907
10029
  const e = up.element;
@@ -9937,7 +10059,7 @@ up.RevealMotion = class RevealMotion {
9937
10059
  let newScrollTop = originalScrollTop;
9938
10060
  if (this.top || (elementRect.height > viewportRect.height)) {
9939
10061
  // Element is either larger than the viewport,
9940
- // or the user has explicitely requested for the element to align at top
10062
+ // or the user has explicitly requested for the element to align at top
9941
10063
  // => Scroll the viewport so the first element row is the first viewport row
9942
10064
  const diff = elementRect.top - viewportRect.top;
9943
10065
  newScrollTop += diff;
@@ -10017,7 +10139,7 @@ up.RevealMotion = class RevealMotion {
10017
10139
 
10018
10140
 
10019
10141
  /***/ }),
10020
- /* 63 */
10142
+ /* 64 */
10021
10143
  /***/ (() => {
10022
10144
 
10023
10145
  const u = up.util;
@@ -10096,7 +10218,7 @@ up.ScrollMotion = class ScrollMotion {
10096
10218
 
10097
10219
 
10098
10220
  /***/ }),
10099
- /* 64 */
10221
+ /* 65 */
10100
10222
  /***/ (() => {
10101
10223
 
10102
10224
  const e = up.element;
@@ -10147,7 +10269,7 @@ up.Selector = class Selector {
10147
10269
 
10148
10270
 
10149
10271
  /***/ }),
10150
- /* 65 */
10272
+ /* 66 */
10151
10273
  /***/ (() => {
10152
10274
 
10153
10275
  const u = up.util;
@@ -10181,7 +10303,7 @@ up.store.Memory = class Memory {
10181
10303
 
10182
10304
 
10183
10305
  /***/ }),
10184
- /* 66 */
10306
+ /* 67 */
10185
10307
  /***/ (() => {
10186
10308
 
10187
10309
  //#
@@ -10251,7 +10373,7 @@ up.store.Session = class Session extends up.store.Memory {
10251
10373
 
10252
10374
 
10253
10375
  /***/ }),
10254
- /* 67 */
10376
+ /* 68 */
10255
10377
  /***/ (() => {
10256
10378
 
10257
10379
  const u = up.util;
@@ -10411,7 +10533,7 @@ up.Tether = class Tether {
10411
10533
 
10412
10534
 
10413
10535
  /***/ }),
10414
- /* 68 */
10536
+ /* 69 */
10415
10537
  /***/ (() => {
10416
10538
 
10417
10539
  const u = up.util;
@@ -10436,7 +10558,17 @@ up.URLPattern = class URLPattern {
10436
10558
  if (!list.length) {
10437
10559
  return;
10438
10560
  }
10439
- let reCode = list.map(this.normalizeURL).map(u.escapeRegExp).join('|');
10561
+ list = list.map((url) => {
10562
+ // If the current browser location is multiple directories deep (e.g. /foo/bar),
10563
+ // a leading asterisk would be normalized to /foo/*. So we prepend a slash.
10564
+ if (url[0] === '*') {
10565
+ url = '/' + url;
10566
+ }
10567
+ url = this.normalizeURL(url);
10568
+ url = u.escapeRegExp(url);
10569
+ return url;
10570
+ });
10571
+ let reCode = list.join('|');
10440
10572
  reCode = reCode.replace(/\\\*/g, '.*?');
10441
10573
  reCode = reCode.replace(/(:|\\\$)([a-z][\w-]*)/ig, (match, type, name) => {
10442
10574
  // It's \\$ instead of $ because we do u.escapeRegExp above
@@ -10488,14 +10620,32 @@ up.URLPattern = class URLPattern {
10488
10620
 
10489
10621
 
10490
10622
  /***/ }),
10491
- /* 69 */
10623
+ /* 70 */
10492
10624
  /***/ (() => {
10493
10625
 
10494
10626
  /*-
10627
+ Framework initialization
10628
+ ========================
10629
+
10630
+ The `up.framework` module lets you customize Unpoly's [initialization sequence](/install#initialization).
10631
+
10632
+ @see up.boot
10633
+ @see script[up-boot=manual]
10634
+ @see up.framework.isSupported
10635
+
10495
10636
  @module up.framework
10496
10637
  */
10497
10638
  up.framework = (function () {
10498
- let booting = true;
10639
+ // Event up.framework.readyState document.readyState
10640
+ // ------------------------------------------------------------------------------------------------------
10641
+ // Browser starts parsing HTML - loading
10642
+ // Unpoly script is running evaling loading (if sync) or interactive (if defered)
10643
+ // ... submodules are running evaling loading (if sync) or interactive (if defered)
10644
+ // User scripts are running configuring loading (if sync) or interactive (if defered)
10645
+ // DOMContentLoaded configuring => booting interactive
10646
+ // Initial page is compiling booting interactive
10647
+ // Document resources loaded booted complete
10648
+ let readyState = 'evaling'; // evaling => configuring => booting => booted
10499
10649
  /*-
10500
10650
  Resets Unpoly to the state when it was booted.
10501
10651
  All custom event handlers, animations, etc. that have been registered
@@ -10516,64 +10666,172 @@ up.framework = (function () {
10516
10666
  @internal
10517
10667
  */
10518
10668
  /*-
10519
- Boots the Unpoly framework.
10669
+ Manually boots the Unpoly framework.
10670
+
10671
+ It is not usually necessary to call `up.boot()` yourself. When you load [Unpoly's JavaScript file](/install),
10672
+ Unpoly will automatically boot on [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event).
10673
+ There are only two cases when you would boot manually:
10674
+
10675
+ - When you load Unpoly with `<script async>`
10676
+ - When you explicitly ask to manually boot by loading Unpoly with [`<script up-boot="manual">`](/script-up-boot-manual).
10520
10677
 
10521
- **This is called automatically** by including the Unpoly JavaScript files.
10678
+ Before you manually boot, Unpoly should be configured and compilers should be registered.
10679
+ Booting will cause Unpoly to [compile](/up.hello) the initial page.
10522
10680
 
10523
- Unpoly will not boot if the current browser is [not supported](/up.browser.isSupported).
10681
+ Unpoly will refuse to boot if the current browser is [not supported](/up.framework.isSupported).
10524
10682
  This leaves you with a classic server-side application on legacy browsers.
10525
10683
 
10526
10684
  @function up.boot
10527
- @internal
10685
+ @experimental
10528
10686
  */
10529
10687
  function boot() {
10688
+ if (readyState !== 'configuring') {
10689
+ // In an app with a lot of async script the user may attempt to boot us twice.
10690
+ console.error('Unpoly has already booted');
10691
+ return;
10692
+ }
10530
10693
  // This is called synchronously after all Unpoly modules have been parsed
10531
10694
  // and executed. We cannot delay booting until the DOM is ready, since by then
10532
10695
  // all user-defined event listeners and compilers will have registered.
10533
10696
  // Note that any non-async scripts after us will delay DOMContentLoaded.
10534
- let supportIssue = up.browser.supportIssue();
10697
+ let supportIssue = up.framework.supportIssue();
10535
10698
  if (!supportIssue) {
10536
- // Some Unpoly modules will use the up:framework:boot event to:
10537
- //
10538
- // - Snapshot their state before user-defined compilers, handlers, etc. have
10539
- // been registered. We need to know this state for when we up.reset() later.
10540
- // - Run delayed initialization that could not run at load time due to
10541
- // circular dependencies.
10699
+ // Change the state in case any user-provided compiler calls up.boot().
10700
+ // up.boot() is a no-op unless readyState === 'configuring'.
10701
+ readyState = 'booting';
10542
10702
  up.emit('up:framework:boot', { log: false });
10543
- booting = false;
10544
- // From here on, all event handlers (both Unpoly's and user code) want to
10545
- // work with the DOM, so wait for the DOM to be ready.
10546
- up.event.onReady(function () {
10547
- // By now all non-sync <script> tags have been loaded and called, including
10548
- // those after us. All user-provided compilers, event handlers, etc. have
10549
- // been registered.
10550
- //
10551
- // The following event will cause Unpoly to compile the <body>.
10552
- up.emit('up:app:boot', { log: 'Booting user application' });
10553
- });
10703
+ readyState = 'booted';
10554
10704
  }
10555
10705
  else {
10556
- console.error("Unpoly cannot load: %s", supportIssue);
10706
+ console.error("Unpoly cannot boot: %s", supportIssue);
10557
10707
  }
10558
10708
  }
10709
+ function mustBootManually() {
10710
+ let unpolyScript = document.currentScript;
10711
+ // If we're is loaded via <script async>, there are no guarantees
10712
+ // when we're called or when subsequent scripts that configure Unpoly
10713
+ // have executed
10714
+ if (unpolyScript?.async) {
10715
+ return true;
10716
+ }
10717
+ // If we're loaded with <script up-boot="manual"> the user explicitly
10718
+ // requested to boot Unpoly manually.
10719
+ if (unpolyScript?.getAttribute('up-boot') === 'manual') {
10720
+ return true;
10721
+ }
10722
+ // If we're loaded this late, someone loads us dynamically.
10723
+ // We don't know when subsequent scripts that configure Unpoly
10724
+ // have executed.
10725
+ if (document.readyState === 'complete') {
10726
+ return true;
10727
+ }
10728
+ }
10729
+ /*-
10730
+ Prevent Unpoly from booting automatically.
10731
+
10732
+ By default Unpoly [automatically boots](/install#initialization)
10733
+ on [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event).
10734
+ To prevent this, add an `[up-boot="manual"]` attribute to the `<script>` element
10735
+ that loads Unpoly:
10736
+
10737
+ ```html
10738
+ <script src="unpoly.js" up-boot="manual"></script>
10739
+ ```
10740
+ You may then call `up.boot()` to manually boot Unpoly at a later time.
10741
+
10742
+ ### Browser support
10743
+
10744
+ To use this feature in Internet Explorer 11 you need a polyfill for `document.currentScript`.
10745
+
10746
+ @selector script[up-boot=manual]
10747
+ @experimental
10748
+ */
10749
+ function onEvaled() {
10750
+ up.emit('up:framework:evaled', { log: false });
10751
+ if (mustBootManually()) {
10752
+ console.debug('Call up.boot() after you have configured Unpoly');
10753
+ }
10754
+ else {
10755
+ // (1) On DOMContentLoaded we know that all non-[async] scripts have executed.
10756
+ // (2) Deferred scripts execute after the DOM was parsed (document.readyState === 'interactive'),
10757
+ // but before DOMContentLoaded. That's why we must *not* boot synchonously when
10758
+ // document.readyState === 'interactive'. We must wait until DOMContentLoaded, when we know that
10759
+ // subsequent users scripts have executed and (possibly) configured Unpoly.
10760
+ // (3) There are no guarantees when [async] scripts execute. These must boot Unpoly manually.
10761
+ document.addEventListener('DOMContentLoaded', boot);
10762
+ }
10763
+ // After this line user scripts may run and configure Unpoly, add compilers, etc.
10764
+ readyState = 'configuring';
10765
+ }
10559
10766
  function startExtension() {
10560
- booting = true;
10767
+ if (readyState !== 'configuring') {
10768
+ throw new Error('Unpoly extensions must be loaded before booting');
10769
+ }
10770
+ readyState = 'evaling';
10561
10771
  }
10562
10772
  function stopExtension() {
10563
- booting = false;
10773
+ readyState = 'configuring';
10774
+ }
10775
+ /*-
10776
+ Returns whether Unpoly can boot in the current browser.
10777
+
10778
+ If this returns `false` Unpoly will prevent itself from [booting](/up.boot)
10779
+ and will not [compile](/up.compiler) the initial page.
10780
+ This leaves you with a classic server-side application.
10781
+
10782
+ ### Browser support
10783
+
10784
+ Unpoly aims to supports all modern browsers.
10785
+
10786
+ #### Chrome, Firefox, Edge, Safari
10787
+
10788
+ Full support.
10789
+
10790
+ #### Internet Explorer 11
10791
+
10792
+ Full support with a `Promise` polyfill like [es6-promise](https://github.com/stefanpenner/es6-promise) (2.4 KB).\
10793
+ Support may be removed when Microsoft retires IE11 in [June 2022](https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/).
10794
+
10795
+ #### Internet Explorer 10 or lower
10796
+
10797
+ Unpoly will not boot or [run compilers](/up.compiler),
10798
+ leaving you with a classic server-side application.
10799
+
10800
+ @function up.framework.isSupported
10801
+ @stable
10802
+ */
10803
+ function isSupported() {
10804
+ return !supportIssue();
10805
+ }
10806
+ function supportIssue() {
10807
+ if (!up.browser.canPromise()) {
10808
+ return "Browser doesn't support promises";
10809
+ }
10810
+ if (document.compatMode === 'BackCompat') {
10811
+ return 'Browser is in quirks mode (missing DOCTYPE?)';
10812
+ }
10813
+ if (up.browser.isEdge18()) {
10814
+ return 'Edge 18 or lower is unsupported';
10815
+ }
10564
10816
  }
10565
10817
  return {
10818
+ onEvaled,
10566
10819
  boot,
10567
10820
  startExtension,
10568
10821
  stopExtension,
10569
10822
  reset: emitReset,
10570
- get booting() { return booting; }
10823
+ get evaling() { return readyState === 'evaling'; },
10824
+ get booted() { return readyState === 'booted'; },
10825
+ get beforeBoot() { return readyState !== 'booting' && readyState !== 'booted'; },
10826
+ isSupported,
10827
+ supportIssue,
10571
10828
  };
10572
10829
  })();
10830
+ up.boot = up.framework.boot;
10573
10831
 
10574
10832
 
10575
10833
  /***/ }),
10576
- /* 70 */
10834
+ /* 71 */
10577
10835
  /***/ (() => {
10578
10836
 
10579
10837
  /*-
@@ -10585,7 +10843,7 @@ This module contains functions to [emit](/up.emit) and [observe](/up.on) DOM eve
10585
10843
  While the browser also has built-in functions to work with events,
10586
10844
  you will find Unpoly's functions to be very concise and feature-rich.
10587
10845
 
10588
- *# Events emitted by Unpoly
10846
+ ### Events emitted by Unpoly
10589
10847
 
10590
10848
  Most Unpoly features emit events that are prefixed with `up:`.
10591
10849
 
@@ -10624,6 +10882,7 @@ up.event = (function () {
10624
10882
 
10625
10883
  - You may pass a selector for [event delegation](https://davidwalsh.name/event-delegate).
10626
10884
  - The event target is automatically passed as a second argument.
10885
+ - Your event listener will not be called when Unpoly has not [booted](/up.boot) in an unsupported browser
10627
10886
  - You may register a listener to multiple events by passing a space-separated list of event name (e.g. `"click mousedown"`)
10628
10887
  - You may register a listener to multiple elements in a single `up.on()` call, by passing a [list](/up.util.isList) of elements.
10629
10888
  - You use an [`[up-data]`](/up-data) attribute to [attach structured data](/up.on#attaching-structured-data)
@@ -11041,30 +11300,6 @@ up.event = (function () {
11041
11300
  event.stopImmediatePropagation();
11042
11301
  event.preventDefault();
11043
11302
  }
11044
- /*-
11045
- Runs the given callback when the the initial HTML document has been completely loaded.
11046
-
11047
- The callback is guaranteed to see the fully parsed DOM tree.
11048
- This function does not wait for stylesheets, images or frames to finish loading.
11049
-
11050
- If `up.event.onReady()` is called after the initial document was loaded,
11051
- the given callback is run immediately.
11052
-
11053
- @function up.event.onReady
11054
- @param {Function} callback
11055
- The function to call then the DOM tree is acessible.
11056
- @experimental
11057
- */
11058
- function onReady(callback) {
11059
- // Values are "loading", "interactive" and "completed".
11060
- // https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState
11061
- if (document.readyState !== 'loading') {
11062
- callback();
11063
- }
11064
- else {
11065
- document.addEventListener('DOMContentLoaded', callback);
11066
- }
11067
- }
11068
11303
  const keyModifiers = ['metaKey', 'shiftKey', 'ctrlKey', 'altKey'];
11069
11304
  /*-
11070
11305
  @function up.event.isUnmodified
@@ -11149,7 +11384,6 @@ up.event = (function () {
11149
11384
  assertEmitted,
11150
11385
  onEscape,
11151
11386
  halt,
11152
- onReady,
11153
11387
  isUnmodified,
11154
11388
  fork,
11155
11389
  keyModifiers
@@ -11163,7 +11397,7 @@ up.emit = up.event.emit;
11163
11397
 
11164
11398
 
11165
11399
  /***/ }),
11166
- /* 71 */
11400
+ /* 72 */
11167
11401
  /***/ (() => {
11168
11402
 
11169
11403
  /*-
@@ -11182,7 +11416,7 @@ While the protocol can help you optimize performance and handle some edge cases,
11182
11416
  implementing it is **entirely optional**. For instance, `unpoly.com` itself is a static site
11183
11417
  that uses Unpoly on the frontend and doesn't even have an active server component.
11184
11418
 
11185
- *# Existing implementations
11419
+ ### Existing implementations
11186
11420
 
11187
11421
  You should be able to implement the protocol in a very short time.
11188
11422
 
@@ -11380,23 +11614,39 @@ up.protocol = (function () {
11380
11614
  return extractHeader(xhr, 'clearCache', parseClearCacheValue);
11381
11615
  }
11382
11616
  /*-
11383
- The server may send this optional response header with the value `clear` to [clear the cache](/up.cache.clear).
11617
+ The server may send this optional response header to control which previously cached responses should be [uncached](/up.cache.clear) after this response.
11384
11618
 
11385
- ### Example
11619
+ The value of this header is a [URL pattern](/url-patterns) matching responses that should be uncached.
11620
+
11621
+ For example, to uncache all responses to URLs starting with `/notes/`:
11386
11622
 
11387
11623
  ```http
11388
- X-Up-Cache: clear
11624
+ X-Up-Clear-Cache: /notes/*
11389
11625
  ```
11390
11626
 
11391
- @header X-Up-Cache
11392
- @param value
11393
- The string `"clear"`.
11627
+ ### Overriding the client-side default
11628
+
11629
+ If the server does not send an `X-Up-Clear-Cache` header, Unpoly will [clear the entire cache](/up.network.config#config.clearCache) after a non-GET request.
11630
+
11631
+ You may force Unpoly to *keep* the cache after a non-GET request:
11632
+
11633
+ ```http
11634
+ X-Up-Clear-Cache: false
11635
+ ```
11636
+
11637
+ You may also force Unpoly to *clear* the cache after a GET request:
11638
+
11639
+ ```http
11640
+ X-Up-Clear-Cache: *
11641
+ ```
11642
+
11643
+ @header X-Up-Clear-Cache
11394
11644
  @stable
11395
11645
  */
11396
11646
  /*-
11397
11647
  This request header contains a timestamp of an existing fragment that is being [reloaded](/up.reload).
11398
11648
 
11399
- The timestamp must be explicitely set by the user as an `[up-time]` attribute on the fragment.
11649
+ The timestamp must be explicitly set by the user as an `[up-time]` attribute on the fragment.
11400
11650
  It should indicate the time when the fragment's underlying data was last changed.
11401
11651
 
11402
11652
  See `[up-time]` for a detailed example.
@@ -11710,7 +11960,7 @@ up.protocol = (function () {
11710
11960
  ### Rendering content
11711
11961
 
11712
11962
  The response may contain `text/html` content. If the root layer is targeted,
11713
- the `X-Up-Accept-Layer` header is ignored and the fragment is updated with
11963
+ the `X-Up-Dismiss-Layer` header is ignored and the fragment is updated with
11714
11964
  the response's HTML content.
11715
11965
 
11716
11966
  If you know that an overlay will be closed don't want to render HTML,
@@ -11719,7 +11969,7 @@ up.protocol = (function () {
11719
11969
  ```http
11720
11970
  HTTP/1.1 200 OK
11721
11971
  Content-Type: text/html
11722
- X-Up-Accept-Layer: {"user_id": 1012}
11972
+ X-Up-Dismiss-Layer: {"user_id": 1012}
11723
11973
  X-Up-Target: :none
11724
11974
  ```
11725
11975
 
@@ -11841,11 +12091,27 @@ up.protocol = (function () {
11841
12091
  <meta name='csrf-token' content='secret12345'>
11842
12092
  ```
11843
12093
 
12094
+ @param {string|Function(): string} [config.cspNonce]
12095
+ A [CSP script nonce](https://content-security-policy.com/nonce/)
12096
+ for the initial page that [booted](/up.boot) Unpoly.
12097
+
12098
+ The nonce let Unpoly run JavaScript in HTML attributes like
12099
+ [`[up-on-loaded]`](/a-up-follow#up-on-loaded) or [`[up-on-accepted]`](/a-up-layer-new#up-on-accepted).
12100
+ See [Working with a strict Content Security Policy](/csp).
12101
+
12102
+ The nonce can either be configured as a string or as function that returns the nonce.
12103
+
12104
+ Defaults to the `content` attribute of a `<meta>` tag named `csp-nonce`:
12105
+
12106
+ ```
12107
+ <meta name='csrf-token' content='secret98765'>
12108
+ ```
12109
+
11844
12110
  @param {string} [config.methodParam='_method']
11845
12111
  The name of request parameter containing the original request method when Unpoly needs to wrap
11846
12112
  the method.
11847
12113
 
11848
- Methods must be wrapped when making a [full page request](/up.browser.loadPage) with a methods other
12114
+ Methods must be wrapped when making a [full page request](/up.network.loadPage) with a methods other
11849
12115
  than GET or POST. In this case Unpoly will make a POST request with the original request method
11850
12116
  in a form parameter named `_method`:
11851
12117
 
@@ -11863,7 +12129,9 @@ up.protocol = (function () {
11863
12129
  methodParam: '_method',
11864
12130
  csrfParam() { return e.metaContent('csrf-param'); },
11865
12131
  csrfToken() { return e.metaContent('csrf-token'); },
11866
- csrfHeader: 'X-CSRF-Token' // Used by Rails. Other frameworks use different headers.
12132
+ cspNonce() { return e.metaContent('csp-nonce'); },
12133
+ csrfHeader: 'X-CSRF-Token',
12134
+ nonceableAttributes: ['up-observe', 'up-on-accepted', 'up-on-dismissed', 'up-on-loaded', 'up-on-finished', 'up-observe'],
11867
12135
  }));
11868
12136
  function csrfHeader() {
11869
12137
  return u.evalOption(config.csrfHeader);
@@ -11874,6 +12142,25 @@ up.protocol = (function () {
11874
12142
  function csrfToken() {
11875
12143
  return u.evalOption(config.csrfToken);
11876
12144
  }
12145
+ function cspNonce() {
12146
+ return u.evalOption(config.cspNonce);
12147
+ }
12148
+ function cspNoncesFromHeader(cspHeader) {
12149
+ let nonces = [];
12150
+ if (cspHeader) {
12151
+ let parts = cspHeader.split(/\s*;\s*/);
12152
+ for (let part of parts) {
12153
+ if (part.indexOf('script-src') === 0) {
12154
+ let noncePattern = /'nonce-([^']+)'/g;
12155
+ let match;
12156
+ while (match = noncePattern.exec(part)) {
12157
+ nonces.push(match[1]);
12158
+ }
12159
+ }
12160
+ }
12161
+ }
12162
+ return nonces;
12163
+ }
11877
12164
  function wrapMethod(method, params) {
11878
12165
  params.add(config.methodParam, method);
11879
12166
  return 'POST';
@@ -11897,15 +12184,17 @@ up.protocol = (function () {
11897
12184
  csrfHeader,
11898
12185
  csrfParam,
11899
12186
  csrfToken,
12187
+ cspNonce,
11900
12188
  initialRequestMethod,
11901
12189
  headerize,
11902
- wrapMethod
12190
+ wrapMethod,
12191
+ cspNoncesFromHeader,
11903
12192
  };
11904
12193
  })();
11905
12194
 
11906
12195
 
11907
12196
  /***/ }),
11908
- /* 72 */
12197
+ /* 73 */
11909
12198
  /***/ (() => {
11910
12199
 
11911
12200
  /*-
@@ -11929,13 +12218,13 @@ up.log = (function () {
11929
12218
  Configures the logging output on the developer console.
11930
12219
 
11931
12220
  @property up.log.config
11932
- @param {boolean} [options.enabled=false]
12221
+ @param {boolean} [config.enabled=false]
11933
12222
  Whether Unpoly will print debugging information to the developer console.
11934
12223
 
11935
12224
  Debugging information includes which elements are being [compiled](/up.syntax)
11936
12225
  and which [events](/up.event) are being emitted.
11937
12226
  Note that errors will always be printed, regardless of this setting.
11938
- @param {boolean} [options.banner=true]
12227
+ @param {boolean} [config.banner=true]
11939
12228
  Print the Unpoly banner to the developer console.
11940
12229
  @stable
11941
12230
  */
@@ -11993,7 +12282,7 @@ up.log = (function () {
11993
12282
  console[stream](message, ...args);
11994
12283
  }
11995
12284
  }
11996
- const printBanner = function () {
12285
+ function printBanner() {
11997
12286
  if (!config.banner) {
11998
12287
  return;
11999
12288
  }
@@ -12019,8 +12308,8 @@ up.log = (function () {
12019
12308
  else {
12020
12309
  console.log(logo + text);
12021
12310
  }
12022
- };
12023
- up.on('up:app:boot', printBanner);
12311
+ }
12312
+ up.on('up:framework:boot', printBanner);
12024
12313
  up.on('up:framework:reset', reset);
12025
12314
  function setEnabled(value) {
12026
12315
  sessionStore.set('enabled', value);
@@ -12116,7 +12405,7 @@ up.log = (function () {
12116
12405
  disable,
12117
12406
  fail,
12118
12407
  muteUncriticalRejection,
12119
- isEnabled() { return config.enabled; }
12408
+ isEnabled() { return config.enabled; },
12120
12409
  };
12121
12410
  })();
12122
12411
  up.puts = up.log.puts;
@@ -12125,7 +12414,7 @@ up.fail = up.log.fail;
12125
12414
 
12126
12415
 
12127
12416
  /***/ }),
12128
- /* 73 */
12417
+ /* 74 */
12129
12418
  /***/ (() => {
12130
12419
 
12131
12420
  /*-
@@ -12371,7 +12660,7 @@ up.syntax = (function () {
12371
12660
  */
12372
12661
  function registerMacro(...args) {
12373
12662
  const macro = buildCompiler(args);
12374
- if (up.framework.booting) {
12663
+ if (up.framework.evaling) {
12375
12664
  macro.priority = detectSystemMacroPriority(macro.selector) ||
12376
12665
  up.fail('Unregistered priority for system macro %o', macro.selector);
12377
12666
  }
@@ -12432,7 +12721,7 @@ up.syntax = (function () {
12432
12721
  let [selector, options, callback] = parseCompilerArgs(args);
12433
12722
  options = u.options(options, {
12434
12723
  selector,
12435
- isDefault: up.framework.booting,
12724
+ isDefault: up.framework.evaling,
12436
12725
  priority: 0,
12437
12726
  batch: false,
12438
12727
  keep: false,
@@ -12441,6 +12730,9 @@ up.syntax = (function () {
12441
12730
  return u.assign(callback, options);
12442
12731
  }
12443
12732
  function insertCompiler(queue, newCompiler) {
12733
+ if (up.framework.booted) {
12734
+ up.puts('up.compiler()', 'Compiler %s was registered after booting Unpoly. Compiler will run for future fragments.', newCompiler.selector);
12735
+ }
12444
12736
  let existingCompiler;
12445
12737
  let index = 0;
12446
12738
  while ((existingCompiler = queue[index]) && (existingCompiler.priority >= newCompiler.priority)) {
@@ -12627,7 +12919,7 @@ up.data = up.syntax.data;
12627
12919
 
12628
12920
 
12629
12921
  /***/ }),
12630
- /* 74 */
12922
+ /* 75 */
12631
12923
  /***/ (() => {
12632
12924
 
12633
12925
  /*-
@@ -12854,7 +13146,7 @@ up.history = (function () {
12854
13146
  replace(currentLocation(), { event: false });
12855
13147
  }
12856
13148
  }
12857
- up.on('up:app:boot', function () {
13149
+ up.on('up:framework:boot', function () {
12858
13150
  if ('jasmine' in window) {
12859
13151
  // Can't delay this in tests.
12860
13152
  register();
@@ -12919,10 +13211,10 @@ up.history = (function () {
12919
13211
 
12920
13212
 
12921
13213
  /***/ }),
12922
- /* 75 */
13214
+ /* 76 */
12923
13215
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
12924
13216
 
12925
- __webpack_require__(76);
13217
+ __webpack_require__(77);
12926
13218
  const u = up.util;
12927
13219
  const e = up.element;
12928
13220
  /*-
@@ -13322,7 +13614,7 @@ up.fragment = (function () {
13322
13614
  for the fragment.
13323
13615
 
13324
13616
  @param {string|Element} [options.fragment]
13325
- A string of HTML comprising *only* the new fragment.
13617
+ A string of HTML comprising *only* the new fragment's [outer HTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML).
13326
13618
 
13327
13619
  The `{ target }` selector will be derived from the root element in the given
13328
13620
  HTML:
@@ -13422,11 +13714,17 @@ up.fragment = (function () {
13422
13714
  @param {boolean|string} [options.clearCache]
13423
13715
  Whether existing [cache](/up.request#caching) entries will be [cleared](/up.cache.clear) with this request.
13424
13716
 
13425
- You may also pass a [URL pattern](/url-patterns) to only clear matching requests.
13717
+ Defaults to the result of `up.network.config.clearCache`, which
13718
+ defaults to clearing the entire cache after a non-GET request.
13426
13719
 
13427
- By default a non-GET request will clear the entire cache.
13720
+ To only uncache some requests, pass an [URL pattern](/url-patterns) that matches requests to uncache.
13721
+ You may also pass a function that accepts an existing `up.Request` and returns a boolean value.
13428
13722
 
13429
- Also see [`up.request({ clearCache })`](/up.request#options.clearCache) and `up.network.config.clearCache`.
13723
+ @param {boolean|string|Function(request): boolean} [options.solo]
13724
+ With `{ solo: true }` Unpoly will [abort](/up.network.abort) all other requests before laoding the new fragment.
13725
+
13726
+ To only abort some requests, pass an [URL pattern](/url-patterns) that matches requests to abort.
13727
+ You may also pass a function that accepts an existing `up.Request` and returns a boolean value.
13430
13728
 
13431
13729
  @param {Element|jQuery} [options.origin]
13432
13730
  The element that triggered the change.
@@ -13605,12 +13903,19 @@ up.fragment = (function () {
13605
13903
  to mutate options to the `up.render()` call that will process the server response.
13606
13904
 
13607
13905
  @event up:fragment:loaded
13906
+
13608
13907
  @param event.preventDefault()
13609
13908
  Event listeners may call this method to prevent the fragment change.
13909
+
13610
13910
  @param {up.Request} event.request
13611
13911
  The original request to the server.
13912
+
13612
13913
  @param {up.Response} event.response
13613
13914
  The server response.
13915
+
13916
+ @param {Element} [event.origin]
13917
+ The link or form element that caused the fragment update.
13918
+
13614
13919
  @param {Object} event.renderOptions
13615
13920
  Options for the `up.render()` call that will process the server response.
13616
13921
  @stable
@@ -13717,14 +14022,16 @@ up.fragment = (function () {
13717
14022
  @stable
13718
14023
  */
13719
14024
  /*-
13720
- Compiles a page fragment that has been inserted into the DOM
14025
+ Manually compiles a page fragment that has been inserted into the DOM
13721
14026
  by external code.
13722
14027
 
14028
+ All registered [compilers](/up.compiler) and [macros](/up.macro) will be called
14029
+ with matches in the given `element`.
14030
+
13723
14031
  **As long as you manipulate the DOM using Unpoly, you will never
13724
- need to call this method.** You only need to use `up.hello()` if the
14032
+ need to call `up.hello()`.** You only need to use `up.hello()` if the
13725
14033
  DOM is manipulated without Unpoly' involvement, e.g. by setting
13726
- the `innerHTML` property or calling jQuery methods like
13727
- `html`, `insertAfter` or `appendTo`:
14034
+ the `innerHTML` property:
13728
14035
 
13729
14036
  ```html
13730
14037
  element = document.createElement('div')
@@ -13736,7 +14043,7 @@ up.fragment = (function () {
13736
14043
  event.
13737
14044
 
13738
14045
  @function up.hello
13739
- @param {Element|jQuery} target
14046
+ @param {Element|jQuery} element
13740
14047
  @param {Element|jQuery} [options.origin]
13741
14048
  @return {Element}
13742
14049
  The compiled element
@@ -14648,7 +14955,7 @@ up.fragment = (function () {
14648
14955
  selector = parseSelector(selector, element, options);
14649
14956
  return selector.matches(element);
14650
14957
  }
14651
- up.on('up:app:boot', function () {
14958
+ up.on('up:framework:boot', function () {
14652
14959
  const { body } = document;
14653
14960
  body.setAttribute('up-source', up.history.location);
14654
14961
  hello(body);
@@ -14707,16 +15014,16 @@ u.delegate(up, 'context', () => up.layer.current);
14707
15014
 
14708
15015
 
14709
15016
  /***/ }),
14710
- /* 76 */
15017
+ /* 77 */
14711
15018
  /***/ (() => {
14712
15019
 
14713
15020
  // extracted by mini-css-extract-plugin
14714
15021
 
14715
15022
  /***/ }),
14716
- /* 77 */
15023
+ /* 78 */
14717
15024
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
14718
15025
 
14719
- __webpack_require__(78);
15026
+ __webpack_require__(79);
14720
15027
  /*-
14721
15028
  Scrolling viewports
14722
15029
  ===================
@@ -15206,22 +15513,6 @@ up.viewport = (function () {
15206
15513
  return up.fragment.toTarget(viewport);
15207
15514
  }
15208
15515
  /*-
15209
- Returns a hash with scroll positions.
15210
-
15211
- Each key in the hash is a viewport selector. The corresponding
15212
- value is the viewport's top scroll position:
15213
-
15214
- up.viewport.scrollTops()
15215
- => { '.main': 0, '.sidebar': 73 }
15216
-
15217
- @function up.viewport.scrollTops
15218
- @return Object<string, number>
15219
- @internal
15220
- */
15221
- function scrollTops(options = {}) {
15222
- return u.mapObject(getAll(options), viewport => [scrollTopKey(viewport), viewport.scrollTop]);
15223
- }
15224
- /*-
15225
15516
  @function up.viewport.fixedElements
15226
15517
  @internal
15227
15518
  */
@@ -15259,6 +15550,19 @@ up.viewport = (function () {
15259
15550
  options.layer.lastScrollTops.set(url, tops);
15260
15551
  }
15261
15552
  }
15553
+ /*-
15554
+ Returns a hash with scroll positions.
15555
+
15556
+ Each key in the hash is a viewport selector. The corresponding
15557
+ value is the viewport's top scroll position:
15558
+
15559
+ getScrollTops()
15560
+ => { '.main': 0, '.sidebar': 73 }
15561
+
15562
+ @function up.viewport.getScrollTops
15563
+ @return Object<string, number>
15564
+ @internal
15565
+ */
15262
15566
  function getScrollTops(viewports) {
15263
15567
  return u.mapObject(viewports, viewport => [scrollTopKey(viewport), viewport.scrollTop]);
15264
15568
  }
@@ -15520,23 +15824,24 @@ up.viewport = (function () {
15520
15824
  return value?.replace(/^#/, '');
15521
15825
  }
15522
15826
  let userScrolled = false;
15523
- up.on('scroll', { once: true }, () => userScrolled = true);
15524
- up.on('up:app:boot', () => // When the initial URL contains an #anchor link, the browser will automatically
15525
-
15526
- // reveal a matching fragment. We want to override that behavior with our own,
15527
- // so we can honor configured obstructions. Since we cannot disable the automatic
15528
- // browser behavior we need to ensure our code runs after it.
15529
- //
15530
- // In Chrome, when reloading, the browser behavior happens before DOMContentLoaded.
15531
- // However, when we follow a link with an #anchor URL, the browser
15532
- // behavior happens *after* DOMContentLoaded. Hence we wait one more task.
15533
- u.task(function () {
15534
- // If the user has scrolled while the page was loading, we will
15535
- // not reset their scroll position by revealing the #anchor fragment.
15536
- if (!userScrolled) {
15537
- return revealHash();
15538
- }
15539
- }));
15827
+ up.on('scroll', { once: true, beforeBoot: true }, () => userScrolled = true);
15828
+ up.on('up:framework:boot', function () {
15829
+ // When the initial URL contains an #anchor link, the browser will automatically
15830
+ // reveal a matching fragment. We want to override that behavior with our own,
15831
+ // so we can honor configured obstructions. Since we cannot disable the automatic
15832
+ // browser behavior we need to ensure our code runs after it.
15833
+ //
15834
+ // In Chrome, when reloading, the browser behavior happens before DOMContentLoaded.
15835
+ // However, when we follow a link with an #anchor URL, the browser
15836
+ // behavior happens *after* DOMContentLoaded. Hence we wait one more task.
15837
+ u.task(function () {
15838
+ // If the user has scrolled while the page was loading, we will
15839
+ // not reset their scroll position by revealing the #anchor fragment.
15840
+ if (!userScrolled) {
15841
+ return revealHash();
15842
+ }
15843
+ });
15844
+ });
15540
15845
  up.on(window, 'hashchange', () => revealHash());
15541
15846
  up.on('up:framework:reset', reset);
15542
15847
  return {
@@ -15557,16 +15862,14 @@ up.viewport = (function () {
15557
15862
  rootOverflowElement,
15558
15863
  isRoot,
15559
15864
  scrollbarWidth,
15560
- scrollTops,
15561
15865
  saveScroll,
15562
15866
  restoreScroll,
15563
15867
  resetScroll,
15564
15868
  anchoredRight,
15565
- fixedElements,
15566
15869
  absolutize,
15567
15870
  focus: doFocus,
15568
15871
  tryFocus,
15569
- makeFocusable
15872
+ makeFocusable,
15570
15873
  };
15571
15874
  })();
15572
15875
  up.focus = up.viewport.focus;
@@ -15575,13 +15878,13 @@ up.reveal = up.viewport.reveal;
15575
15878
 
15576
15879
 
15577
15880
  /***/ }),
15578
- /* 78 */
15881
+ /* 79 */
15579
15882
  /***/ (() => {
15580
15883
 
15581
15884
  // extracted by mini-css-extract-plugin
15582
15885
 
15583
15886
  /***/ }),
15584
- /* 79 */
15887
+ /* 80 */
15585
15888
  /***/ (() => {
15586
15889
 
15587
15890
  /*-
@@ -16085,7 +16388,7 @@ up.motion = (function () {
16085
16388
  */
16086
16389
  function registerTransition(name, transition) {
16087
16390
  const fn = findTransitionFn(transition);
16088
- fn.isDefault = up.framework.booting;
16391
+ fn.isDefault = up.framework.evaling;
16089
16392
  namedTransitions[name] = fn;
16090
16393
  }
16091
16394
  /*-
@@ -16124,16 +16427,16 @@ up.motion = (function () {
16124
16427
  */
16125
16428
  function registerAnimation(name, animation) {
16126
16429
  const fn = findAnimationFn(animation);
16127
- fn.isDefault = up.framework.booting;
16430
+ fn.isDefault = up.framework.evaling;
16128
16431
  namedAnimations[name] = fn;
16129
16432
  }
16130
- function warnIfDisabled() {
16433
+ up.on('up:framework:boot', function () {
16131
16434
  // Explain to the user why animations aren't working.
16132
16435
  // E.g. the user might have disabled animations in her OS.
16133
16436
  if (!isEnabled()) {
16134
16437
  up.puts('up.motion', 'Animations are disabled');
16135
16438
  }
16136
- }
16439
+ });
16137
16440
  /*-
16138
16441
  Returns whether the given animation option will cause the animation
16139
16442
  to be skipped.
@@ -16250,7 +16553,6 @@ up.motion = (function () {
16250
16553
  @see server-errors
16251
16554
  @stable
16252
16555
  */
16253
- up.on('up:framework:boot', warnIfDisabled);
16254
16556
  up.on('up:framework:reset', reset);
16255
16557
  return {
16256
16558
  morph,
@@ -16273,10 +16575,10 @@ up.animate = up.motion.animate;
16273
16575
 
16274
16576
 
16275
16577
  /***/ }),
16276
- /* 80 */
16578
+ /* 81 */
16277
16579
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
16278
16580
 
16279
- __webpack_require__(81);
16581
+ __webpack_require__(82);
16280
16582
  const u = up.util;
16281
16583
  /*-
16282
16584
  Network requests
@@ -16502,7 +16804,7 @@ up.network = (function () {
16502
16804
  By default Unpoly automatically clears the entire cache whenever it processes
16503
16805
  a request with an non-GET HTTP method. To customize this rule, use `up.network.config.clearCache`.
16504
16806
 
16505
- The server may also clear the cache by sending an [`X-Up-Cache: clear`](/X-Up-Cache) header.
16807
+ The server may also clear the cache by sending an [`X-Up-Clear-Cache`](/X-Up-Clear-Cache) header.
16506
16808
 
16507
16809
  @function up.cache.clear
16508
16810
  @param {string} [pattern]
@@ -16648,11 +16950,17 @@ up.network = (function () {
16648
16950
  @param {boolean|string} [options.clearCache]
16649
16951
  Whether to [clear](/up.cache.clear) the [cache](/up.cache.get) after this request.
16650
16952
 
16651
- You may also pass a [URL pattern](/url-patterns) to only clear matching requests.
16652
-
16653
16953
  Defaults to the result of `up.network.config.clearCache`, which
16654
16954
  defaults to clearing the entire cache after a non-GET request.
16655
16955
 
16956
+ You may also pass a [URL pattern](/url-patterns) to only uncache matching responses.
16957
+
16958
+ @param {boolean|string|Function} [options.solo]
16959
+ With `{ solo: true }` Unpoly will [abort](/up.network.abort) all other requests before making this new request.
16960
+
16961
+ To only abort some requests, pass an [URL pattern](/url-patterns) that matches requests to abort.
16962
+ You may also pass a function that accepts an existing `up.Request` and returns a boolean value.
16963
+
16656
16964
  @param {Object} [options.headers={}]
16657
16965
  An object of additional HTTP headers.
16658
16966
 
@@ -16682,6 +16990,11 @@ up.network = (function () {
16682
16990
  @param {string} [options.layer='current']
16683
16991
  The [layer](/up.layer) this request is associated with.
16684
16992
 
16993
+ If this request is intended to update an existing fragment, this is that fragment's layer.
16994
+
16995
+ If this request is intended to [open an overlay](/opening-overlays),
16996
+ the associated layer is the future overlay's parent layer.
16997
+
16685
16998
  @param {string} [options.failLayer='current']
16686
16999
  The [layer](/up.layer) this request is associated with if the server [sends a HTTP status code](/server-errors).
16687
17000
 
@@ -16832,6 +17145,24 @@ up.network = (function () {
16832
17145
  */
16833
17146
  const isIdle = u.negate(isBusy);
16834
17147
  /*-
17148
+ Makes a full-page request, replacing the entire browser environment with a new page from the server response.
17149
+
17150
+ Also see `up.Request#loadPage()`.
17151
+
17152
+ @function up.network.loadPage
17153
+ @param {string} options.url
17154
+ The URL to load.
17155
+ @param {string} [options.method='get']
17156
+ The method for the request.
17157
+
17158
+ Methods other than GET or POST will be [wrapped](/up.protocol.config#config.methodParam) in a POST request.
17159
+ @param {Object|Array|FormData|string} [options.params]
17160
+ @experimental
17161
+ */
17162
+ function loadPage(requestsAttrs) {
17163
+ new up.Request(requestsAttrs).loadPage();
17164
+ }
17165
+ /*-
16835
17166
  Returns whether optional requests should be avoided where possible.
16836
17167
 
16837
17168
  We assume the user wants to avoid requests if either of following applies:
@@ -16914,11 +17245,23 @@ up.network = (function () {
16914
17245
  The event is emitted on the layer that caused the request.
16915
17246
 
16916
17247
  @event up:request:aborted
17248
+
16917
17249
  @param {up.Request} event.request
16918
17250
  The aborted request.
17251
+
16919
17252
  @param {up.Layer} [event.layer]
16920
- The [layer](/up.layer) that caused the request.
17253
+ The [layer](/up.layer) this request is associated with.
17254
+
17255
+ If this request was intended to update an existing fragment, this is that fragment's layer.
17256
+
17257
+ If this request was intended to [open an overlay](/opening-overlays),
17258
+ the associated layer is the future overlay's parent layer.
17259
+
17260
+ @param {Element} [event.origin]
17261
+ The link or form element that caused the request.
17262
+
16921
17263
  @param event.preventDefault()
17264
+
16922
17265
  @experimental
16923
17266
  */
16924
17267
  /*-
@@ -16997,7 +17340,14 @@ up.network = (function () {
16997
17340
  @param {up.Request} event.request
16998
17341
  The request to be sent.
16999
17342
  @param {up.Layer} [event.layer]
17000
- The [layer](/up.layer) that caused the request.
17343
+ The [layer](/up.layer) this request is associated with.
17344
+
17345
+ If this request is intended to update an existing fragment, this is that fragment's layer.
17346
+
17347
+ If this request is intended to [open an overlay](/opening-overlays),
17348
+ the associated layer is the future overlay's parent layer.
17349
+ @param {Element} [event.origin]
17350
+ The link or form element that caused the request.
17001
17351
  @param event.preventDefault()
17002
17352
  Event listeners may call this method to prevent the request from being sent.
17003
17353
  @stable
@@ -17023,12 +17373,24 @@ up.network = (function () {
17023
17373
  The event is emitted on the layer that caused the request.
17024
17374
 
17025
17375
  @event up:request:loaded
17376
+
17026
17377
  @param {up.Request} event.request
17027
17378
  The request.
17379
+
17028
17380
  @param {up.Response} event.response
17029
17381
  The response that was received from the server.
17382
+
17030
17383
  @param {up.Layer} [event.layer]
17031
- The [layer](/up.layer) that caused the request.
17384
+ The [layer](/up.layer) this request is associated with.
17385
+
17386
+ If this request is intended to update an existing fragment, this is that fragment's layer.
17387
+
17388
+ If this request is intended to [open an overlay](/opening-overlays),
17389
+ the associated layer is the future overlay's parent layer.
17390
+
17391
+ @param {Element} [event.origin]
17392
+ The link or form element that caused the request.
17393
+
17032
17394
  @stable
17033
17395
  */
17034
17396
  /*-
@@ -17042,10 +17404,21 @@ up.network = (function () {
17042
17404
  The event is emitted on the layer that caused the request.
17043
17405
 
17044
17406
  @event up:request:fatal
17407
+
17045
17408
  @param {up.Request} event.request
17046
- The request.
17409
+ The failed request.
17410
+
17047
17411
  @param {up.Layer} [event.layer]
17048
- The [layer](/up.layer) that caused the request.
17412
+ The [layer](/up.layer) this request is associated with.
17413
+
17414
+ If this request was intended to update an existing fragment, this is that fragment's layer.
17415
+
17416
+ If this request was intended to [open an overlay](/opening-overlays),
17417
+ the associated layer is the future overlay's parent layer.
17418
+
17419
+ @param {Element} [event.origin]
17420
+ The link or form element that caused the request.
17421
+
17049
17422
  @stable
17050
17423
  */
17051
17424
  function isSafeMethod(method) {
@@ -17073,7 +17446,8 @@ up.network = (function () {
17073
17446
  registerAliasForRedirect,
17074
17447
  queue,
17075
17448
  shouldReduceRequests,
17076
- mimicLocalRequest
17449
+ mimicLocalRequest,
17450
+ loadPage,
17077
17451
  };
17078
17452
  })();
17079
17453
  up.request = up.network.request;
@@ -17081,16 +17455,16 @@ up.cache = up.network.cache;
17081
17455
 
17082
17456
 
17083
17457
  /***/ }),
17084
- /* 81 */
17458
+ /* 82 */
17085
17459
  /***/ (() => {
17086
17460
 
17087
17461
  // extracted by mini-css-extract-plugin
17088
17462
 
17089
17463
  /***/ }),
17090
- /* 82 */
17464
+ /* 83 */
17091
17465
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
17092
17466
 
17093
- __webpack_require__(83);
17467
+ __webpack_require__(84);
17094
17468
  const u = up.util;
17095
17469
  const e = up.element;
17096
17470
  /*-
@@ -17786,6 +18160,8 @@ up.layer = (function () {
17786
18160
  | `value` | The overlay's [acceptance value](/closing-overlays#overlay-result-values) |
17787
18161
  | `event` | An `up:layer:accepted` event |
17788
18162
 
18163
+ With a strict Content Security Policy [additional rules apply](/csp).
18164
+
17789
18165
  @param [up-on-dismissed]
17790
18166
  A JavaScript snippet that is called when the overlay was [dismissed](/closing-overlays).
17791
18167
 
@@ -17798,6 +18174,8 @@ up.layer = (function () {
17798
18174
  | `value` | The overlay's [dismissal value](/closing-overlays#overlay-result-values) |
17799
18175
  | `event` | An `up:layer:dismissed` event |
17800
18176
 
18177
+ With a strict Content Security Policy [additional rules apply](/csp).
18178
+
17801
18179
  @param [up-accept-event]
17802
18180
  One or more space-separated event types that will cause this overlay to automatically be
17803
18181
  [accepted](/closing-overlays) when a matching event occurs within the overlay.
@@ -17923,7 +18301,10 @@ up.layer = (function () {
17923
18301
  up.on('up:fragment:destroyed', function () {
17924
18302
  stack.sync();
17925
18303
  });
17926
- up.on('up:framework:boot', function () {
18304
+ up.on('up:framework:evaled', function () {
18305
+ // Due to circular dependencies we must delay initialization of the stack until all of
18306
+ // Unpoly's submodules have been evaled. We cannot delay initialization until up:framework:boot,
18307
+ // since by then user scripts have run and event listeners will no longer register as "default".
17927
18308
  stack = new up.LayerStack();
17928
18309
  });
17929
18310
  up.on('up:framework:reset', reset);
@@ -18290,16 +18671,16 @@ up.layer = (function () {
18290
18671
 
18291
18672
 
18292
18673
  /***/ }),
18293
- /* 83 */
18674
+ /* 84 */
18294
18675
  /***/ (() => {
18295
18676
 
18296
18677
  // extracted by mini-css-extract-plugin
18297
18678
 
18298
18679
  /***/ }),
18299
- /* 84 */
18680
+ /* 85 */
18300
18681
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
18301
18682
 
18302
- __webpack_require__(85);
18683
+ __webpack_require__(86);
18303
18684
  /*-
18304
18685
  Linking to fragments
18305
18686
  ====================
@@ -18534,7 +18915,7 @@ up.link = (function () {
18534
18915
  if (options.cache == null) {
18535
18916
  options.cache = 'auto';
18536
18917
  }
18537
- options.basic = true; //
18918
+ options.basic = true;
18538
18919
  const request = new up.Request(options);
18539
18920
  return request.willCache();
18540
18921
  }
@@ -18589,6 +18970,13 @@ up.link = (function () {
18589
18970
  You may pass this additional `options` object to supplement or override
18590
18971
  options parsed from the link attributes.
18591
18972
 
18973
+ @param {boolean} [options.navigate=true]
18974
+ Whether this fragment update is considered [navigation](/navigation).
18975
+
18976
+ Setting this to `false` will disable most defaults, causing
18977
+ Unpoly to render a fragment without side-effects like updating history
18978
+ or scrolling.
18979
+
18592
18980
  @return {Promise<up.RenderResult>}
18593
18981
  A promise that will be fulfilled when the link destination
18594
18982
  has been loaded and rendered.
@@ -18607,7 +18995,7 @@ up.link = (function () {
18607
18995
  parser.json('params');
18608
18996
  parser.booleanOrString('cache');
18609
18997
  parser.booleanOrString('clearCache');
18610
- parser.boolean('solo');
18998
+ parser.booleanOrString('solo');
18611
18999
  parser.string('contentType', { attr: ['enctype', 'up-content-type'] });
18612
19000
  return options;
18613
19001
  }
@@ -18797,7 +19185,7 @@ up.link = (function () {
18797
19185
  return u.normalizeMethod(options.method || link.getAttribute('up-method') || link.getAttribute('data-method'));
18798
19186
  }
18799
19187
  function followURL(link, options = {}) {
18800
- const url = options.url || link.getAttribute('href') || link.getAttribute('up-href');
19188
+ const url = options.url || link.getAttribute('up-href') || link.getAttribute('href');
18801
19189
  // Developers sometimes make a <a href="#"> to give a JavaScript interaction standard
18802
19190
  // link behavior (like keyboard navigation or default styles). However, we don't want to
18803
19191
  // consider this a link with remote content, and rather honor [up-content], [up-document]
@@ -19062,6 +19450,13 @@ up.link = (function () {
19062
19450
 
19063
19451
  @selector a[up-follow]
19064
19452
 
19453
+ @param [up-navigate='true']
19454
+ Whether this fragment update is considered [navigation](/navigation).
19455
+
19456
+ Setting this to `false` will disable most defaults documented below,
19457
+ causing Unpoly to render a fragment without side-effects like updating history
19458
+ or scrolling.
19459
+
19065
19460
  @param [href]
19066
19461
  The URL to fetch from the server.
19067
19462
 
@@ -19073,7 +19468,7 @@ up.link = (function () {
19073
19468
 
19074
19469
  If omitted a [main target](/up-main) will be rendered.
19075
19470
 
19076
- @param [up-fallback]
19471
+ @param [up-fallback='true']
19077
19472
  Specifies behavior if the [target selector](/up.render#options.target) is missing from the current page or the server response.
19078
19473
 
19079
19474
  If set to a CSS selector, Unpoly will attempt to replace that selector instead.
@@ -19082,9 +19477,6 @@ up.link = (function () {
19082
19477
 
19083
19478
  If set to `false` Unpoly will immediately reject the render promise.
19084
19479
 
19085
- @param [up-navigate='true']
19086
- Whether this fragment update is considered [navigation](/navigation).
19087
-
19088
19480
  @param [up-method='get']
19089
19481
  The HTTP method to use for the request.
19090
19482
 
@@ -19109,8 +19501,15 @@ up.link = (function () {
19109
19501
  E.g. the `X-Up-Target` header includes the targeted CSS selector.
19110
19502
  See `up.protocol` and `up.network.config.requestMetaKeys` for details.
19111
19503
 
19504
+ @param [up-content]
19505
+ A string for the fragment's new [inner HTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML).
19506
+
19507
+ If your HTML string also contains the fragment's [outer HTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML),
19508
+ consider the `[up-fragment]` attribute instead.
19509
+
19112
19510
  @param [up-fragment]
19113
- A string of HTML comprising *only* the new fragment. No server request will be sent.
19511
+ A string of HTML comprising *only* the new fragment's
19512
+ [outer HTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML).
19114
19513
 
19115
19514
  The `[up-target]` selector will be derived from the root element in the given
19116
19515
  HTML:
@@ -19147,7 +19546,7 @@ up.link = (function () {
19147
19546
 
19148
19547
  See [handling server errors](/server-errors) for details.
19149
19548
 
19150
- @param [up-history]
19549
+ @param [up-history='auto']
19151
19550
  Whether the browser URL and window title will be updated.
19152
19551
 
19153
19552
  If set to `true`, the history will always be updated, using the title and URL from
@@ -19198,7 +19597,7 @@ up.link = (function () {
19198
19597
  See [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/transition-timing-function)
19199
19598
  for a list of available timing functions.
19200
19599
 
19201
- @param [up-cache]
19600
+ @param [up-cache='auto']
19202
19601
  Whether to read from and write to the [cache](/up.request#caching).
19203
19602
 
19204
19603
  With `[up-cache=true]` Unpoly will try to re-use a cached response before connecting
@@ -19208,6 +19607,8 @@ up.link = (function () {
19208
19607
  With `[up-cache=auto]` Unpoly will use the cache only if `up.network.config.autoCache`
19209
19608
  returns `true` for the request.
19210
19609
 
19610
+ With `[up-cache=false]` Unpoly will always make a network request.
19611
+
19211
19612
  Also see [`up.request({ cache })`](/up.request#options.cache).
19212
19613
 
19213
19614
  @param [up-clear-cache]
@@ -19218,6 +19619,11 @@ up.link = (function () {
19218
19619
 
19219
19620
  Also see [`up.request({ clearCache })`](/up.request#options.clearCache) and `up.network.config.clearCache`.
19220
19621
 
19622
+ @param [up-solo='true']
19623
+ With `[up-solo=true]` Unpoly will [abort](/up.network.abort) all other requests before laoding the new fragment.
19624
+
19625
+ To only abort some requests, pass an [URL pattern](/url-patterns) that matches requests to abort.
19626
+
19221
19627
  @param [up-layer='origin current']
19222
19628
  The [layer](/up.layer) in which to match and render the fragment.
19223
19629
 
@@ -19226,7 +19632,7 @@ up.link = (function () {
19226
19632
  To [open the fragment in a new overlay](/opening-overlays), pass `[up-layer=new]`.
19227
19633
  In this case attributes for `a[up-layer=new]` may also be used.
19228
19634
 
19229
- @param [up-peel]
19635
+ @param [up-peel='true']
19230
19636
  Whether to close overlays obstructing the updated layer when the fragment is updated.
19231
19637
 
19232
19638
  This is only relevant when updating a layer that is not the [frontmost layer](/up.layer.front).
@@ -19241,7 +19647,7 @@ up.link = (function () {
19241
19647
  @param [up-hungry='true']
19242
19648
  Whether [`[up-hungry]`](/up-hungry) elements outside the updated fragment will also be updated.
19243
19649
 
19244
- @param [up-scroll]
19650
+ @param [up-scroll='auto']
19245
19651
  How to scroll after the new fragment was rendered.
19246
19652
 
19247
19653
  See [scroll option](/scroll-option) for a list of allowed values.
@@ -19251,7 +19657,7 @@ up.link = (function () {
19251
19657
 
19252
19658
  Saved scroll positions can later be restored with [`[up-scroll=restore]`](/scroll-option#restoring-scroll-positions).
19253
19659
 
19254
- @param [up-focus]
19660
+ @param [up-focus='auto']
19255
19661
  What to focus after the new fragment was rendered.
19256
19662
 
19257
19663
  See [focus option](/focus-option) for a list of allowed values.
@@ -19263,7 +19669,7 @@ up.link = (function () {
19263
19669
 
19264
19670
  If the user does not confirm the render promise will reject and no fragments will be updated.
19265
19671
 
19266
- @param [up-feedback]
19672
+ @param [up-feedback='true']
19267
19673
  Whether to give the link an `.up-active` class
19268
19674
  while loading and rendering content.
19269
19675
 
@@ -19273,10 +19679,14 @@ up.link = (function () {
19273
19679
 
19274
19680
  The callback argument is a preventable `up:fragment:loaded` event.
19275
19681
 
19682
+ With a strict Content Security Policy [additional rules apply](/csp).
19683
+
19276
19684
  @param [up-on-finished]
19277
19685
  A JavaScript snippet that is called when all animations have concluded and
19278
19686
  elements were removed from the DOM tree.
19279
19687
 
19688
+ With a strict Content Security Policy [additional rules apply](/csp).
19689
+
19280
19690
  @stable
19281
19691
  */
19282
19692
  up.on('up:click', fullFollowSelector, function (event, link) {
@@ -19407,13 +19817,13 @@ up.follow = up.link.follow;
19407
19817
 
19408
19818
 
19409
19819
  /***/ }),
19410
- /* 85 */
19820
+ /* 86 */
19411
19821
  /***/ (() => {
19412
19822
 
19413
19823
  // extracted by mini-css-extract-plugin
19414
19824
 
19415
19825
  /***/ }),
19416
- /* 86 */
19826
+ /* 87 */
19417
19827
  /***/ (() => {
19418
19828
 
19419
19829
  /*-
@@ -19449,7 +19859,7 @@ up.form = (function () {
19449
19859
  You can configure Unpoly to handle *all* forms on a page without requiring an `[up-submit]` attribute:
19450
19860
 
19451
19861
  ```js
19452
- up.form.config.submitSelectors.push('form']
19862
+ up.form.config.submitSelectors.push('form')
19453
19863
  ```
19454
19864
 
19455
19865
  Individual forms may opt out with an `[up-submit=follow]` attribute.
@@ -19591,6 +20001,11 @@ up.form = (function () {
19591
20001
  You may pass this additional `options` object to supplement or override
19592
20002
  options parsed from the form attributes.
19593
20003
 
20004
+ @param {boolean} [options.navigate=true]
20005
+ Whether this fragment update is considered [navigation](/navigation).
20006
+
20007
+ Setting this to `false` will disable most defaults.
20008
+
19594
20009
  @return {Promise<up.RenderResult>}
19595
20010
  A promise that will be fulfilled when the server response was rendered.
19596
20011
 
@@ -19784,6 +20199,15 @@ up.form = (function () {
19784
20199
  const observe = function (elements, ...args) {
19785
20200
  elements = e.list(elements);
19786
20201
  const fields = u.flatMap(elements, findFields);
20202
+ const unnamedFields = u.reject(fields, 'name');
20203
+ if (unnamedFields.length) {
20204
+ // (1) We do not need to exclude the unnamed fields for up.FieldObserver, since that
20205
+ // parses values with up.Params.fromFields(), and that ignores unnamed fields.
20206
+ // (2) Only warn, don't crash. There are some legitimate cases for having unnamed
20207
+ // a mix of named and unnamed fields in a form, and we don't want to prevent
20208
+ // <form up-observe> in that case.
20209
+ up.warn('up.observe()', 'Will not observe fields without a [name]: %o', unnamedFields);
20210
+ }
19787
20211
  const callback = u.extractCallback(args) || observeCallbackFromElement(elements[0]) || up.fail('up.observe: No change callback given');
19788
20212
  const options = u.extractOptions(args);
19789
20213
  options.delay = options.delay ?? e.numberAttr(elements[0], 'up-delay') ?? config.observeDelay;
@@ -19794,7 +20218,7 @@ up.form = (function () {
19794
20218
  function observeCallbackFromElement(element) {
19795
20219
  let rawCallback = element.getAttribute('up-observe');
19796
20220
  if (rawCallback) {
19797
- return new Function('value', 'name', rawCallback);
20221
+ return up.NonceableCallback.fromString(rawCallback).toFunction('value', 'name');
19798
20222
  }
19799
20223
  }
19800
20224
  /*-
@@ -20137,7 +20561,7 @@ up.form = (function () {
20137
20561
  @selector form[up-submit]
20138
20562
 
20139
20563
  @params-note
20140
- All attributes for `a[up-follow]` may also be used.
20564
+ All attributes for `a[up-follow]` may be used.
20141
20565
 
20142
20566
  @stable
20143
20567
  */
@@ -20468,6 +20892,8 @@ up.form = (function () {
20468
20892
  This is useful for observing text fields while the user is typing.
20469
20893
  If you want to submit the form after a change see [`input[up-autosubmit]`](/input-up-autosubmit).
20470
20894
 
20895
+ With a strict Content Security Policy [additional rules apply](/csp).
20896
+
20471
20897
  The programmatic variant of this is the [`up.observe()`](/up.observe) function.
20472
20898
 
20473
20899
  ### Example
@@ -20529,6 +20955,8 @@ up.form = (function () {
20529
20955
  This is useful for observing text fields while the user is typing.
20530
20956
  If you want to submit the form after a change see [`input[up-autosubmit]`](/input-up-autosubmit).
20531
20957
 
20958
+ With a strict Content Security Policy [additional rules apply](/csp).
20959
+
20532
20960
  The programmatic variant of this is the [`up.observe()`](/up.observe) function.
20533
20961
 
20534
20962
  ### Example
@@ -20648,7 +21076,7 @@ up.validate = up.form.validate;
20648
21076
 
20649
21077
 
20650
21078
  /***/ }),
20651
- /* 87 */
21079
+ /* 88 */
20652
21080
  /***/ (() => {
20653
21081
 
20654
21082
  /*-
@@ -21084,7 +21512,7 @@ up.feedback = (function () {
21084
21512
 
21085
21513
 
21086
21514
  /***/ }),
21087
- /* 88 */
21515
+ /* 89 */
21088
21516
  /***/ (() => {
21089
21517
 
21090
21518
  /*-
@@ -21297,7 +21725,7 @@ up.radio = (function () {
21297
21725
 
21298
21726
 
21299
21727
  /***/ }),
21300
- /* 89 */
21728
+ /* 90 */
21301
21729
  /***/ (() => {
21302
21730
 
21303
21731
  /*
@@ -21436,16 +21864,17 @@ __webpack_require__(72);
21436
21864
  __webpack_require__(73);
21437
21865
  __webpack_require__(74);
21438
21866
  __webpack_require__(75);
21439
- __webpack_require__(77);
21440
- __webpack_require__(79);
21867
+ __webpack_require__(76);
21868
+ __webpack_require__(78);
21441
21869
  __webpack_require__(80);
21442
- __webpack_require__(82);
21443
- __webpack_require__(84);
21444
- __webpack_require__(86);
21870
+ __webpack_require__(81);
21871
+ __webpack_require__(83);
21872
+ __webpack_require__(85);
21445
21873
  __webpack_require__(87);
21446
21874
  __webpack_require__(88);
21447
21875
  __webpack_require__(89);
21448
- up.framework.boot();
21876
+ __webpack_require__(90);
21877
+ up.framework.onEvaled();
21449
21878
 
21450
21879
  })();
21451
21880