Connect with us

Forex

S&P 500, Nasdaq 100 Push off Session Lows as Fed Chair Powell Testifies

Published

on


S&P 500, Nasdaq 100 – Talking Points

  • S&P 500 finds support around 3,700; key fib resistance ahead
  • Nasdaq 100 bounces sharply as gap fill becomes possibility near-term
  • Fed Chair Powell delivers remarks on Capitol Hill

Equities continue to erase sharp overnight losses as Fed Chair Jerome Powell speaks on Capitol Hill on the state of monetary policy. In his preprepared remarks, Powell indicated that the American economy remains strong and also is positioned to absorb tighter monetary policy. The Chairman also stated that additional rate hikes remain appropriate, and the pace of said rate hikes will depend on incoming data and the everchanging economic outlook.

Risk has bounced sharply since Powell’s remarks began, as Treasury yields across the curve have come in sharply. The 2-year yield fell to 3.07% while the 10-year yield traded down to 3.14%. Market participants may look to the bid in bonds as a potential warning sign for this rally, given the precarious nature of risk in the current climate. Given the broader bear market context, it would appear that we remain in a “sell the rip” environment.

US Treasury Yields (Maturities Greater Than 1 Year)

Courtesy of TradingView

S&P 500 futures (ES) bounced sharply premarket from the 3700 zone, ultimately coming within touching distance of a key Fib level at 3800. 3802 represents the 61.8 retracement of the advance off the March lows to all-time highs back in January, and this level was a key downside target on the initial probe lower earlier this month. This area may prove to be key resistance for ES in the near-term, as risk faces a significant uphill battle to reclaim higher prices. Elevated inflation, tighter monetary policy and recession fears will continue to present significant challenges in the near-term. Should any tests of the 3800 area fail, traders may look to 3720 and 3655 as potential areas to re-enter longs.

S&P 500 1 Hour Chart

S&P 500, Nasdaq 100 Push off Session Lows as Fed Chair Powell Testifies

Chart created with TradingView

Nasdaq 100 futures (NQ) also tremendously benefitted from lower US Treasury yields, offering some respite for the bloodied and bruised index. Tech has been put through the woodchipper in 2022, with many frothy growth names receiving massive haircuts to price and valuation multiples. As the era of ZIRP (zero interest rate policy) fades away, speculative growth names with no tangible earnings look set to continue to lag broader markets. However, this pop following the long weekend in the US sees NQ coming within touching distance of a gap above 11800 from earlier this month. Price may look to fill this gap before ultimately resuming the broader trend lower. Near-term support may be found at 11300, but should that fail then traders may look for fresh yearly lows below 11000.

Nasdaq 100 1 Hour Chart

S&P 500, Nasdaq 100 Push off Session Lows as Fed Chair Powell Testifies

Chart created with TradingView

Resources for Forex Traders

Whether you are a new or experienced trader, we have several resources available to help you; indicator for tracking trader sentiment, quarterly trading forecasts, analytical and educational webinars held daily, trading guides to help you improve trading performance, and one specifically for those who are new to forex.

— Written by Brendan Fagan, Intern

To contact Brendan, use the comments section below or @BrendanFaganFX on Twitter

!function(){function errMsg(errCode,msg){return(msg||””)+” (SystemJS Error#”+errCode+” https://git.io/JvFET#”+errCode+”)”}var baseUrl,lastSepIndex,hasSymbol=”undefined”!=typeof Symbol,hasSelf=”undefined”!=typeof self,hasDocument=”undefined”!=typeof document,envGlobal=hasSelf?self:global;!hasDocument||(lastSepIndex=document.querySelector(“base[href]”))&&(baseUrl=lastSepIndex.href),baseUrl||”undefined”==typeof location||-1!==(lastSepIndex=(baseUrl=location.href.split(“#”)[0].split(“?”)[0]).lastIndexOf(“/”))&&(baseUrl=baseUrl.slice(0,lastSepIndex+1));var backslashRegEx=//g;function resolveIfNotPlainOrUrl(relUrl,parentUrl){if(“/”===(relUrl=-1!==relUrl.indexOf(“”)?relUrl.replace(backslashRegEx,”/”):relUrl)[0]&&”/”===relUrl[1])return parentUrl.slice(0,parentUrl.indexOf(“:”)+1)+relUrl;if(“.”===relUrl[0]&&(“/”===relUrl[1]||”.”===relUrl[1]&&(“/”===relUrl[2]||2===relUrl.length&&(relUrl+=”/”))||1===relUrl.length&&(relUrl+=”/”))||”/”===relUrl[0]){var parentProtocol=parentUrl.slice(0,parentUrl.indexOf(“:”)+1),pathname=”/”===parentUrl[parentProtocol.length+1]?”file:”!==parentProtocol?(pathname=parentUrl.slice(parentProtocol.length+2)).slice(pathname.indexOf(“/”)+1):parentUrl.slice(8):parentUrl.slice(parentProtocol.length+(“/”===parentUrl[parentProtocol.length]));if(“/”===relUrl[0])return parentUrl.slice(0,parentUrl.length-pathname.length-1)+relUrl;for(var segmented=pathname.slice(0,pathname.lastIndexOf(“/”)+1)+relUrl,output=[],segmentIndex=-1,i=0;ipkgName.length&&”/”!==pkg[pkg.length-1]?void targetWarning(“W2″,pkgName,pkg,”should have a trailing ‘/'”):pkg+id.slice(pkgName.length)}}function targetWarning(code,match,target,msg){console.warn(errMsg(code,”Package target “+msg+”, resolving target ‘”+target+”‘ for “+match))}function resolveImportMap(importMap,resolvedOrPlain,parentUrl){for(var scopes=importMap.scopes,scopeUrl=parentUrl&&getMatch(parentUrl,scopes);scopeUrl;){var packageResolution=applyPackages(resolvedOrPlain,scopes[scopeUrl]);if(packageResolution)return packageResolution;scopeUrl=getMatch(scopeUrl.slice(0,scopeUrl.lastIndexOf(“/”)),scopes)}return applyPackages(resolvedOrPlain,importMap.imports)||-1!==resolvedOrPlain.indexOf(“:”)&&resolvedOrPlain}var toStringTag=hasSymbol&&Symbol.toStringTag,REGISTRY=hasSymbol?Symbol():”@”;function SystemJS(){this[REGISTRY]={}}var lastRegister,systemJSPrototype=SystemJS.prototype;function loadToId(load){return load.id}function triggerOnload(loader,load,err,isErrSource){if(loader.onload(err,load.id,load.d&&load.d.map(loadToId),!!isErrSource),err)throw err}function getOrCreateLoad(loader,id,firstParentUrl){var load=loader[REGISTRY][id];if(load)return load;var importerSetters=[],ns=Object.create(null);toStringTag&&Object.defineProperty(ns,toStringTag,{value:”Module”});var instantiatePromise=Promise.resolve().then(function(){return loader.instantiate(id,firstParentUrl)}).then(function(registration){if(!registration)throw Error(errMsg(2,”Module “+id+” did not instantiate”));var declared=registration[1](function _export(name,value){var changed=!(load.h=!0);if(“string”==typeof name)name in ns&&ns[name]===value||(ns[name]=value,changed=!0);else{for(var p in name){value=name[p];p in ns&&ns[p]===value||(ns[p]=value,changed=!0)}name&&name.__esModule&&(ns.__esModule=name.__esModule)}if(changed)for(var i=0;i<importerSetters.length;i++){var setter=importerSetters[i];setter&&setter(ns)}return value},2===registration[1].length?{import:function(importId){return loader.import(importId,id)},meta:loader.createContext(id)}:void 0);return load.e=declared.execute||function(){},[registration[0],declared.setters||[]]},function(err){throw load.e=null,load.er=err,triggerOnload(loader,load,err,!0),err}),linkPromise=instantiatePromise.then(function(instantiation){return Promise.all(instantiation[0].map(function(dep,i){var setter=instantiation[1][i];return Promise.resolve(loader.resolve(dep,id)).then(function(depId){var depLoad=getOrCreateLoad(loader,depId,id);return Promise.resolve(depLoad.I).then(function(){return setter&&(depLoad.i.push(setter),!depLoad.h&&depLoad.I||setter(depLoad.n)),depLoad})})})).then(function(depLoads){load.d=depLoads})});return load=loader[REGISTRY][id]={id:id,i:importerSetters,n:ns,I:instantiatePromise,L:linkPromise,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0,p:void 0}}systemJSPrototype.import=function(id,parentUrl){var loader=this;return Promise.resolve(loader.prepareImport()).then(function(){return loader.resolve(id,parentUrl)}).then(function(load){load=getOrCreateLoad(loader,load);return load.C||function topLevelLoad(loader,load){return load.C=function instantiateAll(loader,load,parent,loaded){if(!loaded[load.id])return loaded[load.id]=!0,Promise.resolve(load.L).then(function(){return load.p&&null!==load.p.e||(load.p=parent),Promise.all(load.d.map(function(dep){return instantiateAll(loader,dep,parent,loaded)}))}).catch(function(err){if(load.er)throw err;throw load.e=null,triggerOnload(loader,load,err,!1),err})}(loader,load,load,{}).then(function(){return function postOrderExec(loader,load,seen){if(seen[load.id])return;seen[load.id]=!0;if(!load.e){if(load.er)throw load.er;return load.E?load.E:void 0}var depLoadPromises;load.d.forEach(function(depLoad){try{var depLoadPromise=postOrderExec(loader,depLoad,seen);depLoadPromise&&(depLoadPromises=depLoadPromises||[]).push(depLoadPromise)}catch(err){throw load.e=null,load.er=err,triggerOnload(loader,load,err,!1),err}});if(depLoadPromises)return Promise.all(depLoadPromises).then(doExec);return doExec();function doExec(){try{var execPromise=load.e.call(nullContext);if(execPromise)return execPromise=execPromise.then(function(){load.C=load.n,load.E=null,triggerOnload(loader,load,null,!0)},function(err){throw load.er=err,load.E=null,triggerOnload(loader,load,err,!0),err}),load.E=execPromise;load.C=load.n,load.L=load.I=void 0}catch(err){throw load.er=err}finally{load.e=null,triggerOnload(loader,load,load.er,!0)}}}(loader,load,{})}).then(function(){return load.n})}(loader,load)})},systemJSPrototype.createContext=function(parentId){var loader=this;return{url:parentId,resolve:function(id,parentUrl){return Promise.resolve(loader.resolve(id,parentUrl||parentId))}}},systemJSPrototype.onload=function(){},systemJSPrototype.register=function(deps,declare){lastRegister=[deps,declare]},systemJSPrototype.getRegister=function(){var _lastRegister=lastRegister;return lastRegister=void 0,_lastRegister};var nullContext=Object.freeze(Object.create(null));envGlobal.System=new SystemJS;var baseOrigin,lastAutoImportDeps,lastAutoImportTimeout,importMapPromise=Promise.resolve(),importMap={imports:{},scopes:{},depcache:{},integrity:{}},processFirst=hasDocument;function processScripts(){[].forEach.call(document.querySelectorAll("script"),function(script){var fetchPromise;script.sp||("systemjs-module"===script.type?(script.sp=!0,script.src&&System.import("import:"===script.src.slice(0,7)?script.src.slice(7):resolveUrl(script.src,baseUrl)).catch(function(e){var event;return-1<e.message.indexOf("https://git.io/JvFET#3")&&((event=document.createEvent("Event")).initEvent("error",!1,!1),script.dispatchEvent(event)),Promise.reject(e)})):"systemjs-importmap"===script.type&&(script.sp=!0,fetchPromise=script.src?fetch(script.src,{integrity:script.integrity}).then(function(res){if(!res.ok)throw Error("Invalid status code: "+res.status);return res.text()}).catch(function(err){return err.message=errMsg("W4","Error fetching systemjs-import map "+script.src)+"n"+err.message,console.warn(err),"function"==typeof script.onerror&&script.onerror(),"{}"}):script.innerHTML,importMapPromise=importMapPromise.then(function(){return fetchPromise}).then(function(text){!function extendImportMap(importMap,newMapText,newMapUrl){var newMap={};try{newMap=JSON.parse(newMapText)}catch(err){console.warn(Error(errMsg("W5","systemjs-importmap contains invalid JSON")+"nn"+newMapText+"n"))}!function resolveAndComposeImportMap(json,baseUrl,outMap){for(var u in json.imports&&resolveAndComposePackages(json.imports,outMap.imports,baseUrl,outMap,null),json.scopes||{}){var resolvedScope=resolveUrl(u,baseUrl);resolveAndComposePackages(json.scopes[u],outMap.scopes[resolvedScope]||(outMap.scopes[resolvedScope]={}),baseUrl,outMap,resolvedScope)}for(u in json.depcache||{})outMap.depcache[resolveUrl(u,baseUrl)]=json.depcache[u];for(u in json.integrity||{})outMap.integrity[resolveUrl(u,baseUrl)]=json.integrity[u]}(newMap,newMapUrl,importMap)}(importMap,text,script.src||baseUrl)})))})}systemJSPrototype.prepareImport=function(doProcessScripts){return(processFirst||doProcessScripts)&&(processScripts(),processFirst=!1),importMapPromise},hasDocument&&(processScripts(),window.addEventListener("DOMContentLoaded",processScripts)),hasDocument&&(window.addEventListener("error",function(evt){lastWindowErrorUrl=evt.filename,lastWindowError=evt.error}),baseOrigin=location.origin),systemJSPrototype.createScript=function(url){var script=document.createElement("script");script.async=!0,url.indexOf(baseOrigin+"/")&&(script.crossOrigin="anonymous");var integrity=importMap.integrity[url];return integrity&&(script.integrity=integrity),script.src=url,script};var lastWindowErrorUrl,lastWindowError,autoImportCandidates={},systemRegister=systemJSPrototype.register;systemJSPrototype.register=function(deps,declare){var scripts,lastScript,loader;return hasDocument&&"loading"===document.readyState&&"string"!=typeof deps?(scripts=document.querySelectorAll("script[src]"),(lastScript=scripts[scripts.length-1])&&(lastScript.src,lastAutoImportDeps=deps,loader=this,lastAutoImportTimeout=setTimeout(function(){autoImportCandidates[lastScript.src]=[deps,declare],loader.import(lastScript.src)}))):lastAutoImportDeps=void 0,systemRegister.call(this,deps,declare)},systemJSPrototype.instantiate=function(url,firstParentUrl){var autoImportRegistration=autoImportCandidates[url];if(autoImportRegistration)return delete autoImportCandidates[url],autoImportRegistration;var loader=this;return new Promise(function(resolve,reject){var script=systemJSPrototype.createScript(url);script.addEventListener("error",function(){reject(Error(errMsg(3,"Error loading "+url+(firstParentUrl?" from "+firstParentUrl:""))))}),script.addEventListener("load",function(){var register;document.head.removeChild(script),lastWindowErrorUrl===url?reject(lastWindowError):((register=loader.getRegister())&&register[0]===lastAutoImportDeps&&clearTimeout(lastAutoImportTimeout),resolve(register))}),document.head.appendChild(script)})},systemJSPrototype.shouldFetch=function(){return!1},"undefined"!=typeof fetch&&(systemJSPrototype.fetch=fetch);var instantiate=systemJSPrototype.instantiate,jsContentTypeRegEx=/^(text|application)/(x-)?javascript(;|$)/;systemJSPrototype.instantiate=function(url,parent){var loader=this;return this.shouldFetch(url)?this.fetch(url,{credentials:"same-origin",integrity:importMap.integrity[url]}).then(function(res){if(!res.ok)throw Error(errMsg(7,res.status+" "+res.statusText+", loading "+url+(parent?" from "+parent:"")));var contentType=res.headers.get("content-type");if(!contentType||!jsContentTypeRegEx.test(contentType))throw Error(errMsg(4,'Unknown Content-Type "'+contentType+'", loading '+url+(parent?" from "+parent:"")));return res.text().then(function(source){return source.indexOf("//# sourceURL=")<0&&(source+="n//# sourceURL="+url),(0,eval)(source),loader.getRegister()})}):instantiate.apply(this,arguments)},systemJSPrototype.resolve=function(id,parentUrl){return resolveImportMap(importMap,resolveIfNotPlainOrUrl(id,parentUrl=parentUrl||baseUrl)||id,parentUrl)||function throwUnresolved(id,parentUrl){throw Error(errMsg(8,"Unable to resolve bare specifier '"+id+(parentUrl?"' from "+parentUrl:"'")))}(id,parentUrl)};var systemInstantiate=systemJSPrototype.instantiate;systemJSPrototype.instantiate=function(url,firstParentUrl){var preloads=importMap.depcache[url];if(preloads)for(var i=0;i<preloads.length;i++)getOrCreateLoad(this,this.resolve(preloads[i],url),url);return systemInstantiate.call(this,url,firstParentUrl)},hasSelf&&"function"==typeof importScripts&&(systemJSPrototype.instantiate=function(url){var loader=this;return Promise.resolve().then(function(){return importScripts(url),loader.getRegister()})}),function(global){var firstGlobalProp,secondGlobalProp,lastGlobalProp,systemJSPrototype=global.System.constructor.prototype;var impt=systemJSPrototype.import;systemJSPrototype.import=function(id,parentUrl){return function noteGlobalProps(){for(var p in firstGlobalProp=secondGlobalProp=void 0,global)shouldSkipProperty(p)||(firstGlobalProp?secondGlobalProp=secondGlobalProp||p:firstGlobalProp=p,lastGlobalProp=p)}(),impt.call(this,id,parentUrl)};var emptyInstantiation=[[],function(){return{}}],getRegister=systemJSPrototype.getRegister;systemJSPrototype.getRegister=function(){var globalProp=getRegister.call(this);if(globalProp)return globalProp;var globalExport,globalProp=function getGlobalProp(useFirstGlobalProp){var foundLastProp,result,p,cnt=0;for(p in global)if(!shouldSkipProperty(p)){if(0===cnt&&p!==firstGlobalProp||1===cnt&&p!==secondGlobalProp)return p;foundLastProp?(lastGlobalProp=p,result=useFirstGlobalProp&&result||p):foundLastProp=p===lastGlobalProp,cnt++}return result}(this.firstGlobalProp);if(!globalProp)return emptyInstantiation;try{globalExport=global[globalProp]}catch(e){return emptyInstantiation}return[[],function(_export){return{execute:function(){_export(globalExport),_export({default:globalExport,__useDefault:!0})}}}]};var isIE11="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident");function shouldSkipProperty(p){return!global.hasOwnProperty(p)||!isNaN(p)&&pnew Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});function raise(errorConstructor,message,name){throw new errorConstructor(“Failed to execute ‘requestSubmit’ on ‘HTMLFormElement’: “+message+”.”,name)}!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){const BuiltInHTMLElement=HTMLElement,wrapperForTheName_HTMLElement=function HTMLElement2(){return Reflect.construct(BuiltInHTMLElement,[],this.constructor)};window.HTMLElement=wrapperForTheName_HTMLElement,HTMLElement.prototype=BuiltInHTMLElement.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,BuiltInHTMLElement)}}(),”function”!=typeof(Turbo$1=HTMLFormElement.prototype).requestSubmit&&(Turbo$1.requestSubmit=function(submitter){submitter?(function validateSubmitter(submitter,form){submitter instanceof HTMLElement||raise(TypeError,”parameter 1 is not of type ‘HTMLElement'”),”submit”==submitter.type||raise(TypeError,”The specified element is not a submit button”),submitter.form==form||raise(DOMException,”The specified element is not owned by this form element”,”NotFoundError”)}(submitter,this),submitter.click()):((submitter=document.createElement(“input”)).type=”submit”,submitter.hidden=!0,this.appendChild(submitter),submitter.click(),this.removeChild(submitter))});const submittersByForm=new WeakMap;function clickCaptured(submitter){submitter=function findSubmitterFromClickTarget(candidate){const element=candidate instanceof Element?candidate:candidate instanceof Node?candidate.parentElement:null;return”submit”==(null==(candidate=element?element.closest(“input, button”):null)?void 0:candidate.type)?candidate:null}(submitter.target);submitter&&submitter.form&&submittersByForm.set(submitter.form,submitter)}!function(){if(!(“submitter”in Event.prototype)){let prototype;if(“SubmitEvent”in window&&/Apple Computer/.test(navigator.vendor))prototype=window.SubmitEvent.prototype;else{if(“SubmitEvent”in window)return;prototype=window.Event.prototype}addEventListener(“click”,clickCaptured,!0),Object.defineProperty(prototype,”submitter”,{get(){if(“submit”==this.type&&this.target instanceof HTMLFormElement)return submittersByForm.get(this.target)}})}}(),(dfxGdprChecker=FrameLoadingStyle=FrameLoadingStyle||{}).eager=”eager”,dfxGdprChecker.lazy=”lazy”;class FrameElement extends HTMLElement{constructor(){super(),this.loaded=Promise.resolve(),this.delegate=new FrameElement.delegateConstructor(this)}static get observedAttributes(){return[“disabled”,”loading”,”src”]}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){var{src}=this;this.src=null,this.src=src}attributeChangedCallback(name){“loading”==name?this.delegate.loadingStyleChanged():”src”==name?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute(“src”)}set src(value){value?this.setAttribute(“src”,value):this.removeAttribute(“src”)}get loading(){return function frameLoadingStyleFromString(style){return”lazy”!==style.toLowerCase()?FrameLoadingStyle.eager:FrameLoadingStyle.lazy}(this.getAttribute(“loading”)||””)}set loading(value){value?this.setAttribute(“loading”,value):this.removeAttribute(“loading”)}get disabled(){return this.hasAttribute(“disabled”)}set disabled(value){value?this.setAttribute(“disabled”,””):this.removeAttribute(“disabled”)}get autoscroll(){return this.hasAttribute(“autoscroll”)}set autoscroll(value){value?this.setAttribute(“autoscroll”,””):this.removeAttribute(“autoscroll”)}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var _b;return null===(_b=null===(_b=this.ownerDocument)||void 0===_b?void 0:_b.documentElement)||void 0===_b?void 0:_b.hasAttribute(“data-turbo-preview”)}}function expandURL(locatable){return new URL(locatable.toString(),document.baseURI)}function getAnchor(anchorMatch){return anchorMatch.hash?anchorMatch.hash.slice(1):(anchorMatch=anchorMatch.href.match(/#(.*)$/))?anchorMatch[1]:void 0}function getAction(form,submitter){return expandURL((null==submitter?void 0:submitter.getAttribute(“formaction”))||form.getAttribute(“action”)||form.action)}function getExtension(url){return(function getLastPathComponent(url){return function getPathComponents(url){return url.pathname.split(“/”).slice(1)}(url).slice(-1)[0]}(url).match(/.[^.]*$/)||[])[0]||””}function isPrefixedBy(baseURL,prefix){prefix=function getPrefix(url){return function addTrailingSlash(value){return value.endsWith(“/”)?value:value+”/”}(url.origin+url.pathname)}(prefix);return baseURL.href===expandURL(prefix).href||baseURL.href.startsWith(prefix)}function locationIsVisitable(location2,rootLocation){return isPrefixedBy(location2,rootLocation)&&function isHTML(url){return!!getExtension(url).match(/^(?:|.(?:htm|html|xhtml))$/)}(location2)}function getRequestURL(url){var anchor=getAnchor(url);return null!=anchor?url.href.slice(0,-(anchor.length+1)):url.href}function toCacheKey(url){return getRequestURL(url)}class FetchResponse{constructor(response){this.response=response}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return 400<=this.statusCode&&this.statusCode<=499}get serverError(){return 500<=this.statusCode&&this.statusCoderequestAnimationFrame(()=>resolve()))}function parseHTMLDocument(html=””){return(new DOMParser).parseFromString(html,”text/html”)}function unindent(strings,…match){const lines=function interpolate(strings,values){return strings.reduce((result,string,i)=>{return result+string+(null==values[i]?””:values[i])},””)}(strings,match).replace(/^n/,””).split(“n”);match=lines[0].match(/^s+/);const indent=match?match[0].length:0;return lines.map(line=>line.slice(indent)).join(“n”)}function uuid(){return Array.apply(null,{length:36}).map((_,i)=>8==i||13==i||18==i||23==i?”-“:14==i?”4”:(19==i?Math.floor(4*Math.random())+8:Math.floor(15*Math.random())).toString(16)).join(“”)}function getAttribute(attributeName,…elements){for(const value of elements.map(element=>null==element?void 0:element.getAttribute(attributeName)))if(“string”==typeof value)return value;return null}function markAsBusy(…elements){for(const element of elements)”turbo-frame”==element.localName&&element.setAttribute(“busy”,””),element.setAttribute(“aria-busy”,”true”)}function clearBusyState(…elements){for(const element of elements)”turbo-frame”==element.localName&&element.removeAttribute(“busy”),element.removeAttribute(“aria-busy”)}(Turbo$1=FetchMethod=FetchMethod||{})[Turbo$1.get=0]=”get”,Turbo$1[Turbo$1.post=1]=”post”,Turbo$1[Turbo$1.put=2]=”put”,Turbo$1[Turbo$1.patch=3]=”patch”,Turbo$1[Turbo$1.delete=4]=”delete”;class FetchRequest{constructor(delegate,method,location2,body=new URLSearchParams,target=null){this.abortController=new AbortController,this.resolveRequestPromise=value=>{},this.delegate=delegate,this.method=method,this.headers=this.defaultHeaders,this.body=body,this.url=location2,this.target=target}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}perform(){return __async$4(this,null,function*(){var _a,_b,{fetchOptions}=this;null!==(_b=(_a=this.delegate).prepareHeadersForRequest)&&void 0!==_b&&_b.call(_a,this.headers,this),yield this.allowRequestToBeIntercepted(fetchOptions);try{this.delegate.requestStarted(this);var response=yield fetch(this.url.href,fetchOptions);return yield this.receive(response)}catch(error){if(“AbortError”!==error.name)throw this.delegate.requestErrored(this,error),error}finally{this.delegate.requestFinished(this)}})}receive(response){return __async$4(this,null,function*(){var fetchResponse=new FetchResponse(response);return dispatch(“turbo:before-fetch-response”,{cancelable:!0,detail:{fetchResponse:fetchResponse},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,fetchResponse):fetchResponse.succeeded?this.delegate.requestSucceededWithResponse(this,fetchResponse):this.delegate.requestFailedWithResponse(this,fetchResponse),fetchResponse})}get fetchOptions(){var _a;return{method:FetchMethod[this.method].toUpperCase(),credentials:”same-origin”,headers:this.headers,redirect:”follow”,body:this.isIdempotent?null:this.body,signal:this.abortSignal,referrer:null===(_a=this.delegate.referrer)||void 0===_a?void 0:_a.href}}get defaultHeaders(){return{Accept:”text/html, application/xhtml+xml”}}get isIdempotent(){return this.method==FetchMethod.get}get abortSignal(){return this.abortController.signal}allowRequestToBeIntercepted(fetchOptions){return __async$4(this,null,function*(){var requestInterception=new Promise(resolve=>this.resolveRequestPromise=resolve);dispatch(“turbo:before-fetch-request”,{cancelable:!0,detail:{fetchOptions:fetchOptions,url:this.url,resume:this.resolveRequestPromise},target:this.target}).defaultPrevented&&(yield requestInterception)})}}class AppearanceObserver{constructor(delegate,element){this.started=!1,this.intersect=lastEntry=>{lastEntry=lastEntry.slice(-1)[0];null!=lastEntry&&lastEntry.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=delegate,this.element=element,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}}class StreamMessage{constructor(html){this.templateElement=document.createElement(“template”),this.templateElement.innerHTML=html}static wrap(message){return”string”==typeof message?new this(message):message}get fragment(){const fragment=document.createDocumentFragment();for(const element of this.foreignElements)fragment.appendChild(document.importNode(element,!0));return fragment}get foreignElements(){return this.templateChildren.reduce((streamElements,child)=>”turbo-stream”==child.tagName.toLowerCase()?[…streamElements,child]:streamElements,[])}get templateChildren(){return Array.from(this.templateElement.content.children)}}StreamMessage.contentType=”text/vnd.turbo-stream.html”,(dfxGdprChecker=FormSubmissionState=FormSubmissionState||{})[dfxGdprChecker.initialized=0]=”initialized”,dfxGdprChecker[dfxGdprChecker.requesting=1]=”requesting”,dfxGdprChecker[dfxGdprChecker.waiting=2]=”waiting”,dfxGdprChecker[dfxGdprChecker.receiving=3]=”receiving”,dfxGdprChecker[dfxGdprChecker.stopping=4]=”stopping”,dfxGdprChecker[dfxGdprChecker.stopped=5]=”stopped”,(Turbo$1=FormEnctype=FormEnctype||{}).urlEncoded=”application/x-www-form-urlencoded”,Turbo$1.multipart=”multipart/form-data”,Turbo$1.plain=”text/plain”;class FormSubmission{constructor(delegate,formElement,submitter,mustRedirect=!1){this.state=FormSubmissionState.initialized,this.delegate=delegate,this.formElement=formElement,this.submitter=submitter,this.formData=function buildFormData(formElement,submitter){const formData=new FormData(formElement),name=null==submitter?void 0:submitter.getAttribute(“name”),value=null==submitter?void 0:submitter.getAttribute(“value”);name&&null!=value&&formData.get(name)!=value&&formData.append(name,value);return formData}(formElement,submitter),this.location=expandURL(this.action),this.method==FetchMethod.get&&function mergeFormDataEntries(url,entries){const searchParams=new URLSearchParams;for(var[name,value]of entries)value instanceof File||searchParams.append(name,value);url.search=searchParams.toString()}(this.location,[…this.body.entries()]),this.fetchRequest=new FetchRequest(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=mustRedirect}static confirmMethod(message,element){return confirm(message)}get method(){var _a;const method=(null===(_a=this.submitter)||void 0===_a?void 0:_a.getAttribute(“formmethod”))||this.formElement.getAttribute(“method”)||””;return function fetchMethodFromString(method){switch(method.toLowerCase()){case”get”:return FetchMethod.get;case”post”:return FetchMethod.post;case”put”:return FetchMethod.put;case”patch”:return FetchMethod.patch;case”delete”:return FetchMethod.delete}}(method.toLowerCase())||FetchMethod.get}get action(){var _a,formElementAction=”string”==typeof this.formElement.action?this.formElement.action:null;return(null===(_a=this.submitter)||void 0===_a?void 0:_a.getAttribute(“formaction”))||this.formElement.getAttribute(“action”)||formElementAction||””}get body(){return this.enctype==FormEnctype.urlEncoded||this.method==FetchMethod.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var _a;return function formEnctypeFromString(encoding){switch(encoding.toLowerCase()){case FormEnctype.multipart:return FormEnctype.multipart;case FormEnctype.plain:return FormEnctype.plain;default:return FormEnctype.urlEncoded}}((null===(_a=this.submitter)||void 0===_a?void 0:_a.getAttribute(“formenctype”))||this.formElement.enctype)}get isIdempotent(){return this.fetchRequest.isIdempotent}get stringFormData(){return[…this.formData].reduce((entries,[name,value])=>entries.concat(“string”==typeof value?[[name,value]]:[]),[])}get confirmationMessage(){return this.formElement.getAttribute(“data-turbo-confirm”)}get needsConfirmation(){return null!==this.confirmationMessage}start(){return __async$4(this,null,function*(){var{initialized,requesting}=FormSubmissionState;if(this.needsConfirmation&&!FormSubmission.confirmMethod(this.confirmationMessage,this.formElement))return;if(this.state==initialized)return this.state=requesting,this.fetchRequest.perform()})}stop(){var{stopping,stopped}=FormSubmissionState;if(this.state!=stopping&&this.state!=stopped)return this.state=stopping,this.fetchRequest.cancel(),!0}prepareHeadersForRequest(headers,token){token.isIdempotent||((token=function getCookieValue(cookieName){if(null!=cookieName){const cookies=document.cookie?document.cookie.split(“; “):[],cookie=cookies.find(cookie2=>cookie2.startsWith(cookieName));if(cookie){var value=cookie.split(“=”).slice(1).join(“=”);return value?decodeURIComponent(value):void 0}}}(getMetaContent(“csrf-param”))||getMetaContent(“csrf-token”))&&(headers[“X-CSRF-Token”]=token),headers.Accept=[StreamMessage.contentType,headers.Accept].join(“, “))}requestStarted(request){var _a;this.state=FormSubmissionState.waiting,null!==(_a=this.submitter)&&void 0!==_a&&_a.setAttribute(“disabled”,””),dispatch(“turbo:submit-start”,{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(request,response){this.result={success:response.succeeded,fetchResponse:response}}requestSucceededWithResponse(error,response){response.clientError||response.serverError?this.delegate.formSubmissionFailedWithResponse(this,response):this.requestMustRedirect(error)&&function responseSucceededWithoutRedirect(response){return 200==response.statusCode&&!response.redirected}(response)?(error=new Error(“Form responses must redirect to another location”),this.delegate.formSubmissionErrored(this,error)):(this.state=FormSubmissionState.receiving,this.result={success:!0,fetchResponse:response},this.delegate.formSubmissionSucceededWithResponse(this,response))}requestFailedWithResponse(request,response){this.result={success:!1,fetchResponse:response},this.delegate.formSubmissionFailedWithResponse(this,response)}requestErrored(request,error){this.result={success:!1,error:error},this.delegate.formSubmissionErrored(this,error)}requestFinished(request){var _a;this.state=FormSubmissionState.stopped,null!==(_a=this.submitter)&&void 0!==_a&&_a.removeAttribute(“disabled”),dispatch(“turbo:submit-end”,{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}requestMustRedirect(request){return!request.isIdempotent&&this.mustRedirect}}function getMetaContent(element){element=document.querySelector(`meta[name=”${element}”]`);return element&&element.content}class Snapshot{constructor(element){this.element=element}get children(){return[…this.element.children]}hasAnchor(anchor){return null!=this.getElementForAnchor(anchor)}getElementForAnchor(anchor){return anchor?this.element.querySelector(`[id=’${anchor}’], a[name=”${anchor}”]`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return this.element.querySelector(“[autofocus]”)}get permanentElements(){return[…this.element.querySelectorAll(“[id][data-turbo-permanent]”)]}getPermanentElementById(id){return this.element.querySelector(`#${id}[data-turbo-permanent]`)}getPermanentElementMapForSnapshot(snapshot){const permanentElementMap={};for(const currentPermanentElement of this.permanentElements){var{id}=currentPermanentElement,newPermanentElement=snapshot.getPermanentElementById(id);newPermanentElement&&(permanentElementMap[id]=[currentPermanentElement,newPermanentElement])}return permanentElementMap}}class FormInterceptor{constructor(delegate,element){this.submitBubbled=event=>{const form=event.target;if(!event.defaultPrevented&&form instanceof HTMLFormElement&&form.closest(“turbo-frame, html”)==this.element){const submitter=event.submitter||void 0;”dialog”!=((null===submitter||void 0===submitter?void 0:submitter.getAttribute(“formmethod”))||form.method)&&this.delegate.shouldInterceptFormSubmission(form,submitter)&&(event.preventDefault(),event.stopImmediatePropagation(),this.delegate.formSubmissionIntercepted(form,submitter))}},this.delegate=delegate,this.element=element}start(){this.element.addEventListener(“submit”,this.submitBubbled)}stop(){this.element.removeEventListener(“submit”,this.submitBubbled)}}class View{constructor(delegate,element){this.resolveRenderPromise=value=>{},this.resolveInterceptionPromise=value=>{},this.delegate=delegate,this.element=element}scrollToAnchor(element){element=this.snapshot.getElementForAnchor(element);element?(this.scrollToElement(element),this.focusElement(element)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(location2){this.scrollToAnchor(getAnchor(location2))}scrollToElement(element){element.scrollIntoView()}focusElement(element){element instanceof HTMLElement&&(element.hasAttribute(“tabindex”)?element.focus():(element.setAttribute(“tabindex”,”-1″),element.focus(),element.removeAttribute(“tabindex”)))}scrollToPosition({x,y}){this.scrollRoot.scrollTo(x,y)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}render(renderer){return __async$4(this,null,function*(){var{isPreview,shouldRender,newSnapshot:snapshot}=renderer;if(shouldRender)try{this.renderPromise=new Promise(resolve=>this.resolveRenderPromise=resolve),this.renderer=renderer,this.prepareToRenderSnapshot(renderer);var renderInterception=new Promise(resolve=>this.resolveInterceptionPromise=resolve);this.delegate.allowsImmediateRender(snapshot,this.resolveInterceptionPromise)||(yield renderInterception),yield this.renderSnapshot(renderer),this.delegate.viewRenderedSnapshot(snapshot,isPreview),this.finishRenderingSnapshot(renderer)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate()})}invalidate(){this.delegate.viewInvalidated()}prepareToRenderSnapshot(renderer){this.markAsPreview(renderer.isPreview),renderer.prepareToRender()}markAsPreview(isPreview){isPreview?this.element.setAttribute(“data-turbo-preview”,””):this.element.removeAttribute(“data-turbo-preview”)}renderSnapshot(renderer){return __async$4(this,null,function*(){yield renderer.render()})}finishRenderingSnapshot(renderer){renderer.finishRendering()}}class FrameView extends View{invalidate(){this.element.innerHTML=””}get snapshot(){return new Snapshot(this.element)}}class LinkInterceptor{constructor(delegate,element){this.clickBubbled=event=>{this.respondsToEventTarget(event.target)?this.clickEvent=event:delete this.clickEvent},this.linkClicked=event=>{this.clickEvent&&this.respondsToEventTarget(event.target)&&event.target instanceof Element&&this.delegate.shouldInterceptLinkClick(event.target,event.detail.url)&&(this.clickEvent.preventDefault(),event.preventDefault(),this.delegate.linkClickIntercepted(event.target,event.detail.url)),delete this.clickEvent},this.willVisit=()=>{delete this.clickEvent},this.delegate=delegate,this.element=element}start(){this.element.addEventListener(“click”,this.clickBubbled),document.addEventListener(“turbo:click”,this.linkClicked),document.addEventListener(“turbo:before-visit”,this.willVisit)}stop(){this.element.removeEventListener(“click”,this.clickBubbled),document.removeEventListener(“turbo:click”,this.linkClicked),document.removeEventListener(“turbo:before-visit”,this.willVisit)}respondsToEventTarget(target){const element=target instanceof Element?target:target instanceof Node?target.parentElement:null;return element&&element.closest(“turbo-frame, html”)==this.element}}class Bardo{constructor(permanentElementMap){this.permanentElementMap=permanentElementMap}static preservingPermanentElements(permanentElementMap,callback){const bardo=new this(permanentElementMap);bardo.enter(),callback(),bardo.leave()}enter(){for(const id in this.permanentElementMap){var[,newPermanentElement]=this.permanentElementMap[id];this.replaceNewPermanentElementWithPlaceholder(newPermanentElement)}}leave(){for(const id in this.permanentElementMap){var[currentPermanentElement]=this.permanentElementMap[id];this.replaceCurrentPermanentElementWithClone(currentPermanentElement),this.replacePlaceholderWithPermanentElement(currentPermanentElement)}}replaceNewPermanentElementWithPlaceholder(permanentElement){var placeholder=function createPlaceholderForPermanentElement(permanentElement){const element=document.createElement(“meta”);return element.setAttribute(“name”,”turbo-permanent-placeholder”),element.setAttribute(“content”,permanentElement.id),element}(permanentElement);permanentElement.replaceWith(placeholder)}replaceCurrentPermanentElementWithClone(permanentElement){var clone=permanentElement.cloneNode(!0);permanentElement.replaceWith(clone)}replacePlaceholderWithPermanentElement(permanentElement){const placeholder=this.getPlaceholderById(permanentElement.id);null!==placeholder&&void 0!==placeholder&&placeholder.replaceWith(permanentElement)}getPlaceholderById(id){return this.placeholders.find(element=>element.content==id)}get placeholders(){return[…document.querySelectorAll(“meta[name=turbo-permanent-placeholder][content]”)]}}class Renderer{constructor(currentSnapshot,newSnapshot,isPreview,willRender=!0){this.currentSnapshot=currentSnapshot,this.newSnapshot=newSnapshot,this.isPreview=isPreview,this.willRender=willRender,this.promise=new Promise((resolve,reject)=>this.resolvingFunctions={resolve:resolve,reject:reject})}get shouldRender(){return!0}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}createScriptElement(element){if(“false”==element.getAttribute(“data-turbo-eval”))return element;{const createdScriptElement=document.createElement(“script”);return this.cspNonce&&(createdScriptElement.nonce=this.cspNonce),createdScriptElement.textContent=element.textContent,createdScriptElement.async=!1,function copyElementAttributes(destinationElement,sourceElement){for(var{name,value}of[…sourceElement.attributes])destinationElement.setAttribute(name,value)}(createdScriptElement,element),createdScriptElement}}preservingPermanentElements(callback){Bardo.preservingPermanentElements(this.permanentElementMap,callback)}focusFirstAutofocusableElement(){const element=this.connectedSnapshot.firstAutofocusableElement;!function elementIsFocusable(element){return element&&”function”==typeof element.focus}(element)||element.focus()}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get cspNonce(){var _a;return null===(_a=document.head.querySelector(‘meta[name=”csp-nonce”]’))||void 0===_a?void 0:_a.getAttribute(“content”)}}class FrameRenderer extends Renderer{get shouldRender(){return!0}render(){return __async$4(this,null,function*(){yield nextAnimationFrame(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),yield nextAnimationFrame(),this.focusFirstAutofocusableElement(),yield nextAnimationFrame(),this.activateScriptElements()})}loadFrameElement(){var _a;const destinationRange=document.createRange();destinationRange.selectNodeContents(this.currentElement),destinationRange.deleteContents();var frameElement=this.newElement;const sourceRange=null===(_a=frameElement.ownerDocument)||void 0===_a?void 0:_a.createRange();sourceRange&&(sourceRange.selectNodeContents(frameElement),this.currentElement.appendChild(sourceRange.extractContents()))}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const element=this.currentElement.firstElementChild;var block=function readScrollLogicalPosition(value,defaultValue){return”end”==value||”start”==value||”center”==value||”nearest”==value?value:defaultValue}(this.currentElement.getAttribute(“data-autoscroll-block”),”end”);if(element)return element.scrollIntoView({block:block}),!0}return!1}activateScriptElements(){for(const inertScriptElement of this.newScriptElements){var activatedScriptElement=this.createScriptElement(inertScriptElement);inertScriptElement.replaceWith(activatedScriptElement)}}get newScriptElements(){return this.currentElement.querySelectorAll(“script”)}}class ProgressBar{constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}static get defaultCSS(){return unindent`
.turbo-progress-bar {
position: fixed;
display: block;
top: 0;
left: 0;
height: 3px;
background: #0076ff;
z-index: 9999;
transition:
width ${ProgressBar.animationDuration}ms ease-out,
opacity ${ProgressBar.animationDuration/2}ms ${ProgressBar.animationDuration/2}ms ease-in;
transform: translate3d(0, 0, 0);
}
`}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(value){this.value=value,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width=”0″,this.progressElement.style.opacity=”1″,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(callback){this.progressElement.style.opacity=”0″,setTimeout(callback,1.5*ProgressBar.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,ProgressBar.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+90*this.value}%`})}createStylesheetElement(){const element=document.createElement(“style”);return element.type=”text/css”,element.textContent=ProgressBar.defaultCSS,element}createProgressElement(){const element=document.createElement(“div”);return element.className=”turbo-progress-bar”,element}}ProgressBar.animationDuration=300;class HeadSnapshot extends Snapshot{constructor(){super(…arguments),this.detailsByOuterHTML=this.children.filter(element=>!function elementIsNoscript(tagName){tagName=tagName.tagName.toLowerCase();return”noscript”==tagName}(element)).map(element=>function elementWithoutNonce(element){element.hasAttribute(“nonce”)&&element.setAttribute(“nonce”,””);return element}(element)).reduce((result,element)=>{var{outerHTML}=element,details=outerHTML in result?result[outerHTML]:{type:function elementType(element){{if(function elementIsScript(tagName){tagName=tagName.tagName.toLowerCase();return”script”==tagName}(element))return”script”;if(function elementIsStylesheet(element){var tagName=element.tagName.toLowerCase();return”style”==tagName||”link”==tagName&&”stylesheet”==element.getAttribute(“rel”)}(element))return”stylesheet”}}(element),tracked:function elementIsTracked(element){return”reload”==element.getAttribute(“data-turbo-track”)}(element),elements:[]};return Object.assign(Object.assign({},result),{[outerHTML]:Object.assign(Object.assign({},details),{elements:[…details.elements,element]})})},{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(outerHTML=>this.detailsByOuterHTML[outerHTML].tracked).join(“”)}getScriptElementsNotInSnapshot(snapshot){return this.getElementsMatchingTypeNotInSnapshot(“script”,snapshot)}getStylesheetElementsNotInSnapshot(snapshot){return this.getElementsMatchingTypeNotInSnapshot(“stylesheet”,snapshot)}getElementsMatchingTypeNotInSnapshot(matchedType,snapshot){return Object.keys(this.detailsByOuterHTML).filter(outerHTML=>!(outerHTML in snapshot.detailsByOuterHTML)).map(outerHTML=>this.detailsByOuterHTML[outerHTML]).filter(({type})=>type==matchedType).map(({elements:[element]})=>element)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((result,outerHTML)=>{const{type,tracked,elements}=this.detailsByOuterHTML[outerHTML];return null!=type||tracked?1{var{elements:[element]}=this.detailsByOuterHTML[element];return function elementIsMetaElementWithName(element,name){var tagName=element.tagName.toLowerCase();return”meta”==tagName&&element.getAttribute(“name”)==name}(element,name)?element:result},void 0)}}class PageSnapshot extends Snapshot{constructor(element,headSnapshot){super(element),this.headSnapshot=headSnapshot}static fromHTMLString(html=””){return this.fromDocument(parseHTMLDocument(html))}static fromElement(element){return this.fromDocument(element.ownerDocument)}static fromDocument({head,body}){return new this(body,new HeadSnapshot(head))}clone(){return new PageSnapshot(this.element.cloneNode(!0),this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var _a;return expandURL(null!==(_a=this.getSetting(“root”))&&void 0!==_a?_a:”/”)}get cacheControlValue(){return this.getSetting(“cache-control”)}get isPreviewable(){return”no-preview”!=this.cacheControlValue}get isCacheable(){return”no-cache”!=this.cacheControlValue}get isVisitable(){return”reload”!=this.getSetting(“visit-control”)}getSetting(name){return this.headSnapshot.getMetaValue(`turbo-${name}`)}}(dfxGdprChecker=TimingMetric=TimingMetric||{}).visitStart=”visitStart”,dfxGdprChecker.requestStart=”requestStart”,dfxGdprChecker.requestEnd=”requestEnd”,dfxGdprChecker.visitEnd=”visitEnd”,(Turbo$1=VisitState=VisitState||{}).initialized=”initialized”,Turbo$1.started=”started”,Turbo$1.canceled=”canceled”,Turbo$1.failed=”failed”;const defaultOptions={action:”advance”,historyChanged:!(Turbo$1.completed=”completed”),visitCachedSnapshot:()=>{},willRender:!0};(dfxGdprChecker=SystemStatusCode=SystemStatusCode||{})[dfxGdprChecker.networkFailure=0]=”networkFailure”,dfxGdprChecker[dfxGdprChecker.timeoutFailure=-1]=”timeoutFailure”,dfxGdprChecker[dfxGdprChecker.contentTypeMismatch=-2]=”contentTypeMismatch”;class Visit{constructor(snapshotHTML,response,visitCachedSnapshot,willRender={}){this.identifier=uuid(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.snapshotCached=!1,this.state=VisitState.initialized,this.delegate=snapshotHTML,this.location=response,this.restorationIdentifier=visitCachedSnapshot||uuid();var{action,historyChanged,referrer,snapshotHTML,response,visitCachedSnapshot,willRender}=Object.assign(Object.assign({},defaultOptions),willRender);this.action=action,this.historyChanged=historyChanged,this.referrer=referrer,this.snapshotHTML=snapshotHTML,this.response=response,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=visitCachedSnapshot,this.willRender=willRender,this.scrolled=!willRender}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==VisitState.initialized&&(this.recordTimingMetric(TimingMetric.visitStart),this.state=VisitState.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==VisitState.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=VisitState.canceled)}complete(){this.state==VisitState.started&&(this.recordTimingMetric(TimingMetric.visitEnd),this.state=VisitState.completed,this.adapter.visitCompleted(this),this.delegate.visitCompleted(this),this.followRedirect())}fail(){this.state==VisitState.started&&(this.state=VisitState.failed,this.adapter.visitFailed(this))}changeHistory(){var method;this.historyChanged||(method=this.location.href===(null===(method=this.referrer)||void 0===method?void 0:method.href)?”replace”:this.action,method=this.getHistoryMethodForAction(method),this.history.update(method,this.location,this.restorationIdentifier),this.historyChanged=!0)}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new FetchRequest(this,FetchMethod.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(TimingMetric.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(statusCode=this.response){(this.response=statusCode)&&({statusCode:statusCode}=statusCode,isSuccessful(statusCode)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,statusCode))}finishRequest(){this.recordTimingMetric(TimingMetric.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode,responseHTML}=this.response;this.render(()=>__async$4(this,null,function*(){this.cacheSnapshot(),this.view.renderPromise&&(yield this.view.renderPromise),isSuccessful(statusCode)&&null!=responseHTML?(yield this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML),!1,this.willRender),this.adapter.visitRendered(this),this.complete()):(yield this.view.renderError(PageSnapshot.fromHTMLString(responseHTML)),this.adapter.visitRendered(this),this.fail())}))}}getCachedSnapshot(){const snapshot=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(snapshot&&(!getAnchor(this.location)||snapshot.hasAnchor(getAnchor(this.location)))&&(“restore”==this.action||snapshot.isPreviewable))return snapshot}getPreloadedSnapshot(){if(this.snapshotHTML)return PageSnapshot.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const snapshot=this.getCachedSnapshot();if(snapshot){const isPreview=this.shouldIssueRequest();this.render(()=>__async$4(this,null,function*(){this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&(yield this.view.renderPromise),yield this.view.renderPage(snapshot,isPreview,this.willRender),this.adapter.visitRendered(this),isPreview||this.complete())}))}}followRedirect(){var _a;this.redirectedToLocation&&!this.followedRedirect&&null!==(_a=this.response)&&void 0!==_a&&_a.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:”replace”,response:this.response}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(()=>__async$4(this,null,function*(){this.cacheSnapshot(),this.adapter.visitRendered(this)}))}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(request,response){}requestSucceededWithResponse(request,response){return __async$4(this,null,function*(){var responseHTML=yield response.responseHTML,{redirected,statusCode}=response;null==responseHTML?this.recordResponse({statusCode:SystemStatusCode.contentTypeMismatch,redirected:redirected}):(this.redirectedToLocation=response.redirected?response.location:void 0,this.recordResponse({statusCode:statusCode,responseHTML:responseHTML,redirected:redirected}))})}requestFailedWithResponse(request,response){return __async$4(this,null,function*(){var responseHTML=yield response.responseHTML,{redirected,statusCode}=response;null==responseHTML?this.recordResponse({statusCode:SystemStatusCode.contentTypeMismatch,redirected:redirected}):this.recordResponse({statusCode:statusCode,responseHTML:responseHTML,redirected:redirected})})}requestErrored(request,error){this.recordResponse({statusCode:SystemStatusCode.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||(“restore”==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){var{scrollPosition}=this.restorationData;if(scrollPosition)return this.view.scrollToPosition(scrollPosition),!0}scrollToAnchor(){var anchor=getAnchor(this.location);if(null!=anchor)return this.view.scrollToAnchor(anchor),!0}recordTimingMetric(metric){this.timingMetrics[metric]=(new Date).getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(action){switch(action){case”replace”:return history.replaceState;case”advance”:case”restore”:return history.pushState}}hasPreloadedResponse(){return”object”==typeof this.response}shouldIssueRequest(){return!this.isSamePage&&(“restore”==this.action?!this.hasCachedSnapshot():this.willRender)}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot().then(snapshot=>snapshot&&this.visitCachedSnapshot(snapshot)),this.snapshotCached=!0)}render(callback){return __async$4(this,null,function*(){this.cancelRender(),yield new Promise(resolve=>{this.frame=requestAnimationFrame(()=>resolve())}),yield callback(),delete this.frame,this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function isSuccessful(statusCode){return 200<=statusCode&&statusCode{this.progressBar.show()},this.session=session2}visitProposedToLocation(location2,options){this.navigator.startVisit(location2,uuid(),options)}visitStarted(visit2){visit2.loadCachedSnapshot(),visit2.issueRequest(),visit2.changeHistory(),visit2.goToSamePageAnchor()}visitRequestStarted(visit2){this.progressBar.setValue(0),visit2.hasCachedSnapshot()||”restore”!=visit2.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(visit2){visit2.loadResponse()}visitRequestFailedWithStatusCode(visit2,statusCode){switch(statusCode){case SystemStatusCode.networkFailure:case SystemStatusCode.timeoutFailure:case SystemStatusCode.contentTypeMismatch:return this.reload();default:return visit2.loadResponse()}}visitRequestFinished(visit2){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(visit2){}pageInvalidated(){this.reload()}visitFailed(visit2){}visitRendered(visit2){}formSubmissionStarted(formSubmission){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(formSubmission){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(){window.location.reload()}get navigator(){return this.session.navigator}}class CacheObserver{constructor(){this.started=!1}start(){this.started||(this.started=!0,addEventListener(“turbo:before-cache”,this.removeStaleElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener(“turbo:before-cache”,this.removeStaleElements,!1))}removeStaleElements(){for(const element of[…document.querySelectorAll(‘[data-turbo-cache=”false”]’)])element.remove()}}class FormSubmitObserver{constructor(delegate){this.started=!1,this.submitCaptured=()=>{removeEventListener(“submit”,this.submitBubbled,!1),addEventListener(“submit”,this.submitBubbled,!1)},this.submitBubbled=event=>{if(!event.defaultPrevented){const form=event.target instanceof HTMLFormElement?event.target:void 0,submitter=event.submitter||void 0;form&&”dialog”!=((null===submitter||void 0===submitter?void 0:submitter.getAttribute(“formmethod”))||form.getAttribute(“method”))&&this.delegate.willSubmitForm(form,submitter)&&(event.preventDefault(),this.delegate.formSubmitted(form,submitter))}},this.delegate=delegate}start(){this.started||(addEventListener(“submit”,this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener(“submit”,this.submitCaptured,!0),this.started=!1)}}class FrameRedirector{constructor(element){this.element=element,this.linkInterceptor=new LinkInterceptor(this,element),this.formInterceptor=new FormInterceptor(this,element)}start(){this.linkInterceptor.start(),this.formInterceptor.start()}stop(){this.linkInterceptor.stop(),this.formInterceptor.stop()}shouldInterceptLinkClick(element,url){return this.shouldRedirect(element)}linkClickIntercepted(element,url){const frame=this.findFrameElement(element);frame&&frame.delegate.linkClickIntercepted(element,url)}shouldInterceptFormSubmission(element,submitter){return this.shouldSubmit(element,submitter)}formSubmissionIntercepted(element,submitter){const frame=this.findFrameElement(element,submitter);frame&&(frame.removeAttribute(“reloadable”),frame.delegate.formSubmissionIntercepted(element,submitter))}shouldSubmit(form,submitter){var action=getAction(form,submitter),rootLocation=this.element.ownerDocument.querySelector(‘meta[name=”turbo-root”]’),rootLocation=expandURL(null!==(rootLocation=null==rootLocation?void 0:rootLocation.content)&&void 0!==rootLocation?rootLocation:”/”);return this.shouldRedirect(form,submitter)&&locationIsVisitable(action,rootLocation)}shouldRedirect(element,frame){frame=this.findFrameElement(element,frame);return!!frame&&frame!=element.closest(“turbo-frame”)}findFrameElement(frame,submitter){frame=(null==submitter?void 0:submitter.getAttribute(“data-turbo-frame”))||frame.getAttribute(“data-turbo-frame”);if(frame&&”_top”!=frame){frame=this.element.querySelector(`#${frame}:not([disabled])`);if(frame instanceof FrameElement)return frame}}}class History{constructor(delegate){this.restorationIdentifier=uuid(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.onPopState=restorationIdentifier=>{this.shouldHandlePopState()&&({turbo:restorationIdentifier}=restorationIdentifier.state||{},restorationIdentifier&&(this.location=new URL(window.location.href),{restorationIdentifier:restorationIdentifier}=restorationIdentifier,this.restorationIdentifier=restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,restorationIdentifier)))},this.onPageLoad=event=>__async$4(this,null,function*(){yield function nextMicrotask(){return Promise.resolve()}(),this.pageLoaded=!0}),this.delegate=delegate}start(){this.started||(addEventListener(“popstate”,this.onPopState,!1),addEventListener(“load”,this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener(“popstate”,this.onPopState,!1),removeEventListener(“load”,this.onPageLoad,!1),this.started=!1)}push(location2,restorationIdentifier){this.update(history.pushState,location2,restorationIdentifier)}replace(location2,restorationIdentifier){this.update(history.replaceState,location2,restorationIdentifier)}update(method,location2,restorationIdentifier=uuid()){method.call(history,{turbo:{restorationIdentifier:restorationIdentifier}},””,location2.href),this.location=location2,this.restorationIdentifier=restorationIdentifier}getRestorationDataForIdentifier(restorationIdentifier){return this.restorationData[restorationIdentifier]||{}}updateRestorationData(additionalData){var{restorationIdentifier}=this,restorationData=this.restorationData[restorationIdentifier];this.restorationData[restorationIdentifier]=Object.assign(Object.assign({},restorationData),additionalData)}assumeControlOfScrollRestoration(){var _a;this.previousScrollRestoration||(this.previousScrollRestoration=null!==(_a=history.scrollRestoration)&&void 0!==_a?_a:”auto”,history.scrollRestoration=”manual”)}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||”complete”==document.readyState}}class LinkClickObserver{constructor(delegate){this.started=!1,this.clickCaptured=()=>{removeEventListener(“click”,this.clickBubbled,!1),addEventListener(“click”,this.clickBubbled,!1)},this.clickBubbled=event=>{var link,location2;this.clickEventIsSignificant(event)&&(location2=event.composedPath&&event.composedPath()[0]||event.target,(link=this.findLinkFromClickTarget(location2))&&(location2=this.getLocationForLink(link),this.delegate.willFollowLinkToLocation(link,location2)&&(event.preventDefault(),this.delegate.followedLinkToLocation(link,location2))))},this.delegate=delegate}start(){this.started||(addEventListener(“click”,this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener(“click”,this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(event){return!(event.target&&event.target.isContentEditable||event.defaultPrevented||1{var{readyState}=this;”interactive”==readyState?this.pageIsInteractive():”complete”==readyState&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=delegate}start(){this.started||(this.stage==PageStage.initial&&(this.stage=PageStage.loading),document.addEventListener(“readystatechange”,this.interpretReadyState,!1),addEventListener(“pagehide”,this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener(“readystatechange”,this.interpretReadyState,!1),removeEventListener(“pagehide”,this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==PageStage.loading&&(this.stage=PageStage.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==PageStage.interactive&&(this.stage=PageStage.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}}class ScrollObserver{constructor(delegate){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=delegate}start(){this.started||(addEventListener(“scroll”,this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener(“scroll”,this.onScroll,!1),this.started=!1)}updatePosition(position){this.delegate.scrollPositionChanged(position)}}class StreamObserver{constructor(delegate){this.sources=new Set,this.started=!1,this.inspectFetchResponse=event=>{var response=function fetchResponseFromEvent(fetchResponse){fetchResponse=null===(fetchResponse=fetchResponse.detail)||void 0===fetchResponse?void 0:fetchResponse.fetchResponse;if(fetchResponse instanceof FetchResponse)return fetchResponse}(event);response&&function fetchResponseIsStream(_a){const contentType=null!==(_a=_a.contentType)&&void 0!==_a?_a:””;return contentType.startsWith(StreamMessage.contentType)}(response)&&(event.preventDefault(),this.receiveMessageResponse(response))},this.receiveMessageEvent=event=>{this.started&&”string”==typeof event.data&&this.receiveMessageHTML(event.data)},this.delegate=delegate}start(){this.started||(this.started=!0,addEventListener(“turbo:before-fetch-response”,this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener(“turbo:before-fetch-response”,this.inspectFetchResponse,!1))}connectStreamSource(source){this.streamSourceIsConnected(source)||(this.sources.add(source),source.addEventListener(“message”,this.receiveMessageEvent,!1))}disconnectStreamSource(source){this.streamSourceIsConnected(source)&&(this.sources.delete(source),source.removeEventListener(“message”,this.receiveMessageEvent,!1))}streamSourceIsConnected(source){return this.sources.has(source)}receiveMessageResponse(response){return __async$4(this,null,function*(){var html=yield response.responseHTML;html&&this.receiveMessageHTML(html)})}receiveMessageHTML(html){this.delegate.receivedMessageFromStream(new StreamMessage(html))}}class ErrorRenderer extends Renderer{render(){return __async$4(this,null,function*(){this.replaceHeadAndBody(),this.activateScriptElements()})}replaceHeadAndBody(){const{documentElement,head,body}=document;documentElement.replaceChild(this.newHead,head),documentElement.replaceChild(this.newElement,body)}activateScriptElements(){for(const replaceableElement of this.scriptElements){const parentNode=replaceableElement.parentNode;var element;parentNode&&(element=this.createScriptElement(replaceableElement),parentNode.replaceChild(element,replaceableElement))}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return[…document.documentElement.querySelectorAll(“script”)]}}class PageRenderer extends Renderer{get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}prepareToRender(){this.mergeHead()}render(){return __async$4(this,null,function*(){this.willRender&&this.replaceBody()})}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}mergeHead(){this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()}replaceBody(){this.preservingPermanentElements(()=>{this.activateNewBody(),this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}copyNewHeadStylesheetElements(){for(const element of this.newHeadStylesheetElements)document.head.appendChild(element)}copyNewHeadScriptElements(){for(const element of this.newHeadScriptElements)document.head.appendChild(this.createScriptElement(element))}removeCurrentHeadProvisionalElements(){for(const element of this.currentHeadProvisionalElements)document.head.removeChild(element)}copyNewHeadProvisionalElements(){for(const element of this.newHeadProvisionalElements)document.head.appendChild(element)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(const inertScriptElement of this.newBodyScriptElements){var activatedScriptElement=this.createScriptElement(inertScriptElement);inertScriptElement.replaceWith(activatedScriptElement)}}assignNewBody(){document.body&&this.newElement instanceof HTMLBodyElement?document.body.replaceWith(this.newElement):document.documentElement.appendChild(this.newElement)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll(“script”)}}class SnapshotCache{constructor(size){this.keys=[],this.snapshots={},this.size=size}has(location2){return toCacheKey(location2)in this.snapshots}get(location2){if(this.has(location2)){var snapshot=this.read(location2);return this.touch(location2),snapshot}}put(location2,snapshot){return this.write(location2,snapshot),this.touch(location2),snapshot}clear(){this.snapshots={}}read(location2){return this.snapshots[toCacheKey(location2)]}write(location2,snapshot){this.snapshots[toCacheKey(location2)]=snapshot}touch(index){var key=toCacheKey(index),index=this.keys.indexOf(key);-1setTimeout(()=>resolve(),0))}();var cachedSnapshot=snapshot.clone();return this.snapshotCache.put(location2,cachedSnapshot),cachedSnapshot}})}getCachedSnapshotForLocation(location2){return this.snapshotCache.get(location2)}get snapshot(){return PageSnapshot.fromElement(this.element)}get shouldCacheSnapshot(){return this.snapshot.isCacheable}}function extendURLWithDeprecatedProperties(url){Object.defineProperties(url,deprecatedLocationPropertyDescriptors)}const deprecatedLocationPropertyDescriptors={absoluteURL:{get(){return this.toString()}}},session=new class Session{constructor(){this.navigator=new Navigator(this),this.history=new History(this),this.view=new PageView(this,document.documentElement),this.adapter=new BrowserAdapter(this),this.pageObserver=new PageObserver(this),this.cacheObserver=new CacheObserver,this.linkClickObserver=new LinkClickObserver(this),this.formSubmitObserver=new FormSubmitObserver(this),this.scrollObserver=new ScrollObserver(this),this.streamObserver=new StreamObserver(this),this.frameRedirector=new FrameRedirector(document.documentElement),this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(adapter){this.adapter=adapter}visit(location2,options={}){this.navigator.proposeVisit(expandURL(location2),options)}connectStreamSource(source){this.streamObserver.connectStreamSource(source)}disconnectStreamSource(source){this.streamObserver.disconnectStreamSource(source)}renderStreamMessage(message){document.documentElement.appendChild(StreamMessage.wrap(message).fragment)}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(delay){this.progressBarDelay=delay}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(location2,restorationIdentifier){this.enabled?this.navigator.startVisit(location2,restorationIdentifier,{action:”restore”,historyChanged:!0}):this.adapter.pageInvalidated()}scrollPositionChanged(position){this.history.updateRestorationData({scrollPosition:position})}willFollowLinkToLocation(link,location2){return this.elementDriveEnabled(link)&&locationIsVisitable(location2,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(link,location2)}followedLinkToLocation(link,location2){var action=this.getActionForLink(link);this.convertLinkWithMethodClickToFormSubmission(link)||this.visit(location2.href,{action:action})}convertLinkWithMethodClickToFormSubmission(frame){var linkMethod=frame.getAttribute(“data-turbo-method”);if(linkMethod){const form=document.createElement(“form”);form.method=linkMethod,form.action=frame.getAttribute(“href”)||”undefined”,form.hidden=!0,frame.hasAttribute(“data-turbo-confirm”)&&form.setAttribute(“data-turbo-confirm”,frame.getAttribute(“data-turbo-confirm”));frame=this.getTargetFrameForLink(frame);return frame?(form.setAttribute(“data-turbo-frame”,frame),form.addEventListener(“turbo:submit-start”,()=>form.remove())):form.addEventListener(“submit”,()=>form.remove()),document.body.appendChild(form),dispatch(“submit”,{cancelable:!0,target:form})}return!1}allowsVisitingLocationWithAction(location2,action){return this.locationWithActionIsSamePage(location2,action)||this.applicationAllowsVisitingLocation(location2)}visitProposedToLocation(location2,options){extendURLWithDeprecatedProperties(location2),this.adapter.visitProposedToLocation(location2,options)}visitStarted(visit2){extendURLWithDeprecatedProperties(visit2.location),visit2.silent||this.notifyApplicationAfterVisitingLocation(visit2.location,visit2.action)}visitCompleted(visit2){this.notifyApplicationAfterPageLoad(visit2.getTimingMetrics())}locationWithActionIsSamePage(location2,action){return this.navigator.locationWithActionIsSamePage(location2,action)}visitScrolledToSamePageLocation(oldURL,newURL){this.notifyApplicationAfterVisitingSamePageLocation(oldURL,newURL)}willSubmitForm(form,submitter){var action=getAction(form,submitter);return this.elementDriveEnabled(form)&&(!submitter||this.elementDriveEnabled(submitter))&&locationIsVisitable(expandURL(action),this.snapshot.rootLocation)}formSubmitted(form,submitter){this.navigator.submitForm(form,submitter)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(message){this.renderStreamMessage(message)}viewWillCacheSnapshot(){var _a;null!==(_a=this.navigator.currentVisit)&&void 0!==_a&&_a.silent||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element},resume){return!this.notifyApplicationBeforeRender(element,resume).defaultPrevented}viewRenderedSnapshot(snapshot,isPreview){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}viewInvalidated(){this.adapter.pageInvalidated()}frameLoaded(frame){this.notifyApplicationAfterFrameLoad(frame)}frameRendered(fetchResponse,frame){this.notifyApplicationAfterFrameRender(fetchResponse,frame)}applicationAllowsFollowingLinkToLocation(link,location2){return!this.notifyApplicationAfterClickingLinkToLocation(link,location2).defaultPrevented}applicationAllowsVisitingLocation(location2){return!this.notifyApplicationBeforeVisitingLocation(location2).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(link,location2){return dispatch(“turbo:click”,{target:link,detail:{url:location2.href},cancelable:!0})}notifyApplicationBeforeVisitingLocation(location2){return dispatch(“turbo:before-visit”,{detail:{url:location2.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(location2,action){return markAsBusy(document.documentElement),dispatch(“turbo:visit”,{detail:{url:location2.href,action:action}})}notifyApplicationBeforeCachingSnapshot(){return dispatch(“turbo:before-cache”)}notifyApplicationBeforeRender(newBody,resume){return dispatch(“turbo:before-render”,{detail:{newBody:newBody,resume:resume},cancelable:!0})}notifyApplicationAfterRender(){return dispatch(“turbo:render”)}notifyApplicationAfterPageLoad(timing={}){return clearBusyState(document.documentElement),dispatch(“turbo:load”,{detail:{url:this.location.href,timing:timing}})}notifyApplicationAfterVisitingSamePageLocation(oldURL,newURL){dispatchEvent(new HashChangeEvent(“hashchange”,{oldURL:oldURL.toString(),newURL:newURL.toString()}))}notifyApplicationAfterFrameLoad(frame){return dispatch(“turbo:frame-load”,{target:frame})}notifyApplicationAfterFrameRender(fetchResponse,frame){return dispatch(“turbo:frame-render”,{detail:{fetchResponse:fetchResponse},target:frame,cancelable:!0})}elementDriveEnabled(element){const container=null==element?void 0:element.closest(“[data-turbo]”);return this.drive?!container||”false”!=container.getAttribute(“data-turbo”):!!container&&”true”==container.getAttribute(“data-turbo”)}getActionForLink(action){action=action.getAttribute(“data-turbo-action”);return isAction(action)?action:”advance”}getTargetFrameForLink(container){var frame=container.getAttribute(“data-turbo-frame”);if(frame)return frame;container=container.closest(“turbo-frame”);return container?container.id:void 0}get snapshot(){return this.view.snapshot}};var{navigator:dfxGdprChecker}=session;function start(){session.start()}function registerAdapter(adapter){session.registerAdapter(adapter)}function visit(location2,options){session.visit(location2,options)}function connectStreamSource(source){session.connectStreamSource(source)}function disconnectStreamSource(source){session.disconnectStreamSource(source)}function renderStreamMessage(message){session.renderStreamMessage(message)}function clearCache(){session.clearCache()}function setProgressBarDelay(delay){session.setProgressBarDelay(delay)}function setConfirmMethod(confirmMethod){FormSubmission.confirmMethod=confirmMethod}var Turbo$1=Object.freeze({__proto__:null,navigator:dfxGdprChecker,session:session,PageRenderer:PageRenderer,PageSnapshot:PageSnapshot,start:start,registerAdapter:registerAdapter,visit:visit,connectStreamSource:connectStreamSource,disconnectStreamSource:disconnectStreamSource,renderStreamMessage:renderStreamMessage,clearCache:clearCache,setProgressBarDelay:setProgressBarDelay,setConfirmMethod:setConfirmMethod});class SnapshotSubstitution{constructor(element){this.visitCachedSnapshot=({element:element2})=>{var{id:_a,clone}=this;null!==(_a=element2.querySelector(“#”+_a))&&void 0!==_a&&_a.replaceWith(clone)},this.clone=element.cloneNode(!0),this.id=element.id}}function getFrameElementById(element){if(null!=element){element=document.getElementById(element);if(element instanceof FrameElement)return element}}function activateElement(element,currentURL){if(element){var src=element.getAttribute(“src”);if(null!=src&&null!=currentURL&&function urlsAreEqual(left,right){return expandURL(left).href==expandURL(right).href}(src,currentURL))throw new Error(`Matching element has a source URL which references itself`);if((element=element.ownerDocument!==document?document.importNode(element,!0):element)instanceof FrameElement)return element.connectedCallback(),element.disconnectedCallback(),element}}const StreamActions={after(){this.targetElements.forEach(e=>{var _a;return null===(_a=e.parentElement)||void 0===_a?void 0:_a.insertBefore(this.templateContent,e.nextSibling)})},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent))},before(){this.targetElements.forEach(e=>{var _a;return null===(_a=e.parentElement)||void 0===_a?void 0:_a.insertBefore(this.templateContent,e)})},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.prepend(this.templateContent))},remove(){this.targetElements.forEach(e=>e.remove())},replace(){this.targetElements.forEach(e=>e.replaceWith(this.templateContent))},update(){this.targetElements.forEach(e=>{e.innerHTML=””,e.append(this.templateContent)})}};class StreamElement extends HTMLElement{connectedCallback(){return __async$4(this,null,function*(){try{yield this.render()}catch(error){console.error(error)}finally{this.disconnect()}})}render(){return __async$4(this,null,function*(){var _a;return null!==(_a=this.renderPromise)&&void 0!==_a?_a:this.renderPromise=__async$4(this,null,function*(){this.dispatchEvent(this.beforeRenderEvent)&&(yield nextAnimationFrame(),this.performAction())})})}disconnect(){try{this.remove()}catch(_a){}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(c=>c.remove())}get duplicateChildren(){var _a;const existingChildren=this.targetElements.flatMap(e=>[…e.children]).filter(c=>!!c.id),newChildrenIds=[…null===(_a=this.templateContent)||void 0===_a?void 0:_a.children].filter(c=>!!c.id).map(c=>c.id);return existingChildren.filter(c=>newChildrenIds.includes(c.id))}get performAction(){if(this.action){var actionFunction=StreamActions[this.action];if(actionFunction)return actionFunction;this.raise(“unknown action”)}this.raise(“action attribute is missing”)}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.raise(“target or targets attribute is missing”)}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.raise(“first child element must be a element”)}get action(){return this.getAttribute(“action”)}get target(){return this.getAttribute(“target”)}get targets(){return this.getAttribute(“targets”)}raise(message){throw new Error(`${this.description}: ${message}`)}get description(){var _b;return null!==(_b=(null!==(_b=this.outerHTML.match(/]+>/))&&void 0!==_b?_b:[])[0])&&void 0!==_b?_b:””}get beforeRenderEvent(){return new CustomEvent(“turbo:before-stream-render”,{bubbles:!0,cancelable:!0})}get targetElementsById(){var element=null===(element=this.ownerDocument)||void 0===element?void 0:element.getElementById(this.target);return null!==element?[element]:[]}get targetElementsByQuery(){var elements=null===(elements=this.ownerDocument)||void 0===elements?void 0:elements.querySelectorAll(this.targets);return 0!==elements.length?Array.prototype.slice.call(elements):[]}}FrameElement.delegateConstructor=class FrameController{constructor(element){this.fetchResponseLoaded=fetchResponse=>{},this.currentFetchRequest=null,this.resolveVisitPromise=()=>{},this.connected=!1,this.hasBeenLoaded=!1,this.settingSourceURL=!1,this.element=element,this.view=new FrameView(this,this.element),this.appearanceObserver=new AppearanceObserver(this,this.element),this.linkInterceptor=new LinkInterceptor(this,this.element),this.formInterceptor=new FormInterceptor(this,this.element)}connect(){this.connected||(this.connected=!0,this.reloadable=!1,this.loadingStyle==FrameLoadingStyle.lazy&&this.appearanceObserver.start(),this.linkInterceptor.start(),this.formInterceptor.start(),this.sourceURLChanged())}disconnect(){this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.linkInterceptor.stop(),this.formInterceptor.stop())}disabledChanged(){this.loadingStyle==FrameLoadingStyle.eager&&this.loadSourceURL()}sourceURLChanged(){this.loadingStyle!=FrameLoadingStyle.eager&&!this.hasBeenLoaded||this.loadSourceURL()}loadingStyleChanged(){this.loadingStyle==FrameLoadingStyle.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}loadSourceURL(){return __async$4(this,null,function*(){if(!this.settingSourceURL&&this.enabled&&this.isActive&&(this.reloadable||this.sourceURL!=this.currentURL)){var previousURL=this.currentURL;if(this.currentURL=this.sourceURL,this.sourceURL)try{this.element.loaded=this.visit(expandURL(this.sourceURL)),this.appearanceObserver.stop(),yield this.element.loaded,this.hasBeenLoaded=!0}catch(error){throw this.currentURL=previousURL,error}}})}loadResponse(fetchResponse){return __async$4(this,null,function*(){(fetchResponse.redirected||fetchResponse.succeeded&&fetchResponse.isHTML)&&(this.sourceURL=fetchResponse.response.url);try{var body,snapshot,renderer,html=yield fetchResponse.responseHTML;html&&({body:body}=parseHTMLDocument(html),snapshot=new Snapshot(yield this.extractForeignFrameElement(body)),renderer=new FrameRenderer(this.view.snapshot,snapshot,!1,!1),this.view.renderPromise&&(yield this.view.renderPromise),yield this.view.render(renderer),session.frameRendered(fetchResponse,this.element),session.frameLoaded(this.element),this.fetchResponseLoaded(fetchResponse))}catch(error){console.error(error),this.view.invalidate()}finally{this.fetchResponseLoaded=()=>{}}})}elementAppearedInViewport(element){this.loadSourceURL()}shouldInterceptLinkClick(element,url){return!element.hasAttribute(“data-turbo-method”)&&this.shouldInterceptNavigation(element)}linkClickIntercepted(element,url){this.reloadable=!0,this.navigateFrame(element,url)}shouldInterceptFormSubmission(element,submitter){return this.shouldInterceptNavigation(element,submitter)}formSubmissionIntercepted(element,fetchRequest){this.formSubmission&&this.formSubmission.stop(),this.reloadable=!1,this.formSubmission=new FormSubmission(this,element,fetchRequest);var{fetchRequest}=this.formSubmission;this.prepareHeadersForRequest(fetchRequest.headers,fetchRequest),this.formSubmission.start()}prepareHeadersForRequest(headers,request){headers[“Turbo-Frame”]=this.id}requestStarted(request){markAsBusy(this.element)}requestPreventedHandlingResponse(request,response){this.resolveVisitPromise()}requestSucceededWithResponse(request,response){return __async$4(this,null,function*(){yield this.loadResponse(response),this.resolveVisitPromise()})}requestFailedWithResponse(request,response){console.error(response),this.resolveVisitPromise()}requestErrored(request,error){console.error(error),this.resolveVisitPromise()}requestFinished(request){clearBusyState(this.element)}formSubmissionStarted({formElement}){markAsBusy(formElement,this.findFrameElement(formElement))}formSubmissionSucceededWithResponse(formSubmission,response){const frame=this.findFrameElement(formSubmission.formElement,formSubmission.submitter);this.proposeVisitIfNavigatedWithAction(frame,formSubmission.formElement,formSubmission.submitter),frame.delegate.loadResponse(response)}formSubmissionFailedWithResponse(formSubmission,fetchResponse){this.element.delegate.loadResponse(fetchResponse)}formSubmissionErrored(formSubmission,error){console.error(error)}formSubmissionFinished({formElement}){clearBusyState(formElement,this.findFrameElement(formElement))}allowsImmediateRender(snapshot,resume){return!0}viewRenderedSnapshot(snapshot,isPreview){}viewInvalidated(){}visit(url){return __async$4(this,null,function*(){var _a;const request=new FetchRequest(this,FetchMethod.get,url,new URLSearchParams,this.element);return null!==(_a=this.currentFetchRequest)&&void 0!==_a&&_a.cancel(),this.currentFetchRequest=request,new Promise(resolve=>{this.resolveVisitPromise=()=>{this.resolveVisitPromise=()=>{},this.currentFetchRequest=null,resolve()},request.perform()})})}navigateFrame(element,url,submitter){const frame=this.findFrameElement(element,submitter);this.proposeVisitIfNavigatedWithAction(frame,element,submitter),frame.setAttribute(“reloadable”,””),frame.src=url}proposeVisitIfNavigatedWithAction(frame,element,submitter){const action=getAttribute(“data-turbo-action”,submitter,element,frame);if(isAction(action)){const{visitCachedSnapshot}=new SnapshotSubstitution(frame);frame.delegate.fetchResponseLoaded=response=>{var statusCode;frame.src&&({statusCode:statusCode,redirected:response}=response,response={statusCode:statusCode,redirected:response,responseHTML:frame.ownerDocument.documentElement.outerHTML},session.visit(frame.src,{action:action,response:response,visitCachedSnapshot:visitCachedSnapshot,willRender:!1}))}}}findFrameElement(_a,submitter){return null!==(_a=getFrameElementById(getAttribute(“data-turbo-frame”,submitter,_a)||this.element.getAttribute(“target”)))&&void 0!==_a?_a:this.element}extractForeignFrameElement(container){return __async$4(this,null,function*(){let element;var id=CSS.escape(this.id);try{if(element=activateElement(container.querySelector(`turbo-frame#${id}`),this.currentURL))return element;if(element=activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`),this.currentURL))return yield element.loaded,yield this.extractForeignFrameElement(element);console.error(`Response has no matching element`)}catch(error){console.error(error)}return new FrameElement})}formActionIsVisitable(form,submitter){return locationIsVisitable(expandURL(getAction(form,submitter)),this.rootLocation)}shouldInterceptNavigation(element,submitter){var frameElement=getAttribute(“data-turbo-frame”,submitter,element)||this.element.getAttribute(“target”);if(element instanceof HTMLFormElement&&!this.formActionIsVisitable(element,submitter))return!1;if(!this.enabled||”_top”==frameElement)return!1;if(frameElement){frameElement=getFrameElementById(frameElement);if(frameElement)return!frameElement.disabled}return!!session.elementDriveEnabled(element)&&!(submitter&&!session.elementDriveEnabled(submitter))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}get reloadable(){const frame=this.findFrameElement(this.element);return frame.hasAttribute(“reloadable”)}set reloadable(value){const frame=this.findFrameElement(this.element);value?frame.setAttribute(“reloadable”,””):frame.removeAttribute(“reloadable”)}set sourceURL(sourceURL){this.settingSourceURL=!0,this.element.src=null!=sourceURL?sourceURL:null,this.currentURL=this.element.src,this.settingSourceURL=!1}get loadingStyle(){return this.element.loading}get isLoading(){return void 0!==this.formSubmission||void 0!==this.resolveVisitPromise()}get isActive(){return this.element.isActive&&this.connected}get rootLocation(){var _a=this.element.ownerDocument.querySelector(‘meta[name=”turbo-root”]’);return expandURL(null!==(_a=null==_a?void 0:_a.content)&&void 0!==_a?_a:”/”)}},customElements.define(“turbo-frame”,FrameElement),customElements.define(“turbo-stream”,StreamElement),(()=>{let element=document.currentScript;if(element&&!element.hasAttribute(“data-turbo-suppress-warning”))for(;element=element.parentElement;)if(element==document.body)return console.warn(unindent`
You are loading Turbo from a element inside the element. This is probably not what you meant to do!
Load your application’s JavaScript bundle inside the element instead. elements in are evaluated with each page change.
For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements
——
Suppress this warning by adding a “data-turbo-suppress-warning” attribute to: %s
`,element.outerHTML)})(),window.Turbo=Turbo$1,start();Turbo$1=Object.freeze({__proto__:null,PageRenderer:PageRenderer,PageSnapshot:PageSnapshot,clearCache:clearCache,connectStreamSource:connectStreamSource,disconnectStreamSource:disconnectStreamSource,navigator:dfxGdprChecker,registerAdapter:registerAdapter,renderStreamMessage:renderStreamMessage,session:session,setConfirmMethod:setConfirmMethod,setProgressBarDelay:setProgressBarDelay,start:start,visit:visit});function createSingleton(removeOnTurboVisit=!1){return function(target,name,descriptor){const original=descriptor.value;return descriptor.value=(…result)=>{var _a;window.DFX_SINGLETONS=null!=(_a=window.DFX_SINGLETONS)?_a:{};const instanceId=`${target.prototype.constructor.name}:${name}`;if(removeOnTurboVisit){const turboCallback=()=>{window.DFX_SINGLETONS[instanceId]&&(window.DFX_SINGLETONS[instanceId]=null),document.removeEventListener(“turbo:visit”,turboCallback)};document.addEventListener(“turbo:visit”,turboCallback)}if(window.DFX_SINGLETONS[instanceId])return window.DFX_SINGLETONS[instanceId];result=original.apply(this,result);return Object.defineProperty(window.DFX_SINGLETONS,instanceId,{value:result,writable:!0}),result},descriptor}}class DfxLocalStorageCookieManager{constructor(localStorage){this.localStorage=localStorage,this.localStorage=localStorage;try{this.localStorage.setItem(“test”,”test”),this.localStorage.removeItem(“test”),this.isLocalStorageAvailable=!0}catch(e){this.isLocalStorageAvailable=!1}}getCookie(matches){if(matches){matches=document.cookie.match(new RegExp(`(?:^|; )${matches.replace(/([.$?*|{}()[]/+^])/g,”$1″)}=([^;]*)`));return matches?decodeURIComponent(matches[1]):void 0}}setCookie(name,value,expires,domain,secure=!0){let cookieString=`${name}=${value}`;”string”==typeof expires&&(cookieString+=`;expires=${expires}`),”string”==typeof domain&&(cookieString+=`;domain=${domain}`),cookieString+=”; path=/”,secure&&”https:”===location.protocol&&(cookieString+=”; secure”),document.cookie=cookieString}deleteCookie(name){this.setCookie(name,””,”Thu, 01 Jan 1970 00:00:00 UTC”)}getLocalStorageOrCookie(name){var _a;return this.isLocalStorageAvailable&&null!=(_a=this.localStorage.getItem(name))?_a:this.getCookie(name)}setLocalStorageOrCookie(name,value,expires,domain){this.isLocalStorageAvailable?this.localStorage.setItem(name,value):this.setCookie(name,value,expires,domain)}deleteLocalStorageOrCookie(name){this.isLocalStorageAvailable?this.localStorage.removeItem(name):this.deleteCookie(name)}}var __defProp$5=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor;class DfxLocalStorageCookieManagerFactory{static create(){return new DfxLocalStorageCookieManager(window.localStorage)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$5(target,key):target,i=decorators.length-1;0=level}normalizeValue(value){let intValue=parseInt(value);return isNaN(intValue)&&(intValue=3),intValue}}var __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor;class DfxGdprCheckerFactory{static create(){return new DfxGdprChecker(DfxLocalStorageCookieManagerFactory.create())}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$4(target,key):target,i=decorators.length-1;0new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});const COUNTRIES_TO_REPLACE_MAP=new Map([[“GB”,”UK”]]);class DfxGeoLocation{constructor(geoJsUrl,dfxLocalStorageCookieManager){this.geoJsUrl=geoJsUrl,this.dfxLocalStorageCookieManager=dfxLocalStorageCookieManager}init(){return __async$3(this,null,function*(){const redirectData=yield this.getRedirectData();COUNTRIES_TO_REPLACE_MAP.has(redirectData.country)&&(redirectData.country=COUNTRIES_TO_REPLACE_MAP.get(redirectData.country)),this.redirectData=redirectData,this.setBodyClasses().setLocationToStorage()})}getRedirectData(){return __async$3(this,null,function*(){if(this.redirectData)return this.redirectData;var redirectData=this.getLocationFromStorage();return redirectData?(this.redirectData=redirectData,this.redirectData):this.loadRedirectData()})}loadRedirectData(){return new Promise(resolve=>{const script=document.createElement(“script”);script.onload=()=>{this.redirectData=window.redirectData,resolve(this.redirectData)},script.setAttribute(“src”,this.geoJsUrl),document.head.appendChild(script)})}setBodyClasses(){const countryCode=this.redirectData.country.toLowerCase();return document.body?(document.body.classList.remove(“dfx-country-pending”),document.body.classList.add(`dfx-country-${countryCode}`)):document.addEventListener(“DOMContentLoaded”,()=>{document.body.classList.remove(“dfx-country-pending”),document.body.classList.add(`dfx-country-${countryCode}`)},!1),this}getLocationFromStorage(){var _a=this.dfxLocalStorageCookieManager.getLocalStorageOrCookie(“dfx-redirectData_expiresIn”);return!!(_a&&parseInt(_a)>Date.now())&&JSON.parse(null!=(_a=this.dfxLocalStorageCookieManager.getLocalStorageOrCookie(“dfx-redirectData”))?_a:”false”)}setLocationToStorage(){const date=new Date;return date.setTime(date.getTime()+6048e5),this.dfxLocalStorageCookieManager.setLocalStorageOrCookie(“dfx-redirectData”,JSON.stringify(this.redirectData),date.toUTCString()),this.dfxLocalStorageCookieManager.setLocalStorageOrCookie(“dfx-redirectData_expiresIn”,`${date.getTime()}`,date.toUTCString()),this}}var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor;class DfxGeoLocationFactory{static create(){return new DfxGeoLocation(window.DFX_ENDPOINTS.geoJs,DfxLocalStorageCookieManagerFactory.create())}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1;0{$(“head script”).filter((_i,el)=>el.src.includes(config.mainReportSuite)||el.src.includes(config.reportSuite)).remove(),this.adobeTrackingState=STATES.OFF,this._resetAssetClasses()._resetInstruments()._resetCategories()._resetSitecatConfig()}),document.addEventListener(“turbo:before-render”,event=>{this.dfxAdobeTracking&&this.dfxAdobeTracking.refreshIframe(event.detail.newBody)})}_setDefaultStates(){return this.adobeTrackingState=STATES.OFF,this.baiduState=STATES.OFF,this.pixelState=STATES.OFF,this.gptState=STATES.OFF,this.gtmState=STATES.OFF,this.taboolaState=STATES.OFF,this}_resetInstruments(){return this.gptInstrumentPairs=new Set,this}_resetCategories(){return this.gptCategories={category:””,subCategory:””},this}_resetAssetClasses(){return this.gptAssetClasses=new Set,this}_resetSitecatConfig(){return this.sitecatConfig={mainReportSuite:this.config.mainReportSuite,reportSuite:this.config.reportSuite,organisationId:this.config.organisationId},this}createAdobeTracking(adobeTrackingUrl){return __this=this,__arguments=null,generator=function*(){if(this.dfxGdprChecker.checkLevel(2)&&this.allowedTrackingsConfig[TRACKINGS.ADOBE_TRACKING]&&this.adobeTrackingState===STATES.OFF){this.adobeTrackingState=STATES.LOADING;const{DfxAdobeTracking}=yield window.System.import(adobeTrackingUrl);this.dfxAdobeTracking=new DfxAdobeTracking(this.sitecatConfig,this.dfxGdprChecker,this.dfxLocalStorageCookieManager),this.adobeTrackingState=STATES.READY,this.runAdobeTracking()}},new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});var __this,__arguments,generator}runAdobeTracking(){this.dfxGdprChecker.checkLevel(2)&&(this.adobeTrackingState===STATES.READY?(this.dfxAdobeTracking.resetTrackingObject(),this.dfxAdobeTracking.init()):setTimeout(()=>this.runAdobeTracking(),400))}trackAdobeEvent(eventName,message,metrics){return this.dfxGdprChecker.checkLevel(2)&&this.allowedTrackingsConfig[TRACKINGS.ADOBE_TRACKING]&&(this.adobeTrackingState===STATES.READY?this.dfxAdobeTracking.trackEvent(eventName,message,metrics):setTimeout(()=>this.trackAdobeEvent(eventName,message,metrics),400)),this}getPageNameForAdobeTracking(){return this.adobeTrackingState===STATES.READY&&this.dfxAdobeTracking.getPageName()}addSitecatConfig(key,value){return this.dfxGdprChecker.checkLevel(2)&&(this.sitecatConfig[key]=value),this}createFacebookPixel(){if(!this.dfxGdprChecker.checkLevel(3))return this;if(!this.allowedTrackingsConfig[TRACKINGS.FACEBOOK_PIXEL]||this.pixelState!==STATES.OFF)return this;this.pixelState=STATES.LOADING;var loadCallback,b,n,t,s;return loadCallback=()=>{this.pixelState=STATES.READY},t=window,b=document,s=”script”,t.fbq||(n=t.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)},t._fbq||(t._fbq=n),(n.push=n).loaded=!0,n.version=”2.0″,n.queue=[],(t=b.createElement(s)).async=!0,t.onload=loadCallback,t.src=”https://connect.facebook.net/en_US/fbevents.js”,(s=b.getElementsByTagName(s)[0]).parentNode.insertBefore(t,s)),this.fbq=window.fbq,this.fbq(“init”,this.facebookPixelId),this}facebookPixelTrack(type){return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig[TRACKINGS.FACEBOOK_PIXEL]&&(this.pixelState===STATES.OFF&&this.createFacebookPixel(),this.fbq(“track”,type)),this}facebookPixelTrackPageView(){return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“PageView”),this}facebookPixelTrackLead(){return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“Lead”),this}createGTM(){if(!this.dfxGdprChecker.checkLevel(1))return this;if(!this.allowedTrackingsConfig[TRACKINGS.GTM]||this.gtmState!==STATES.OFF)return this;this.gtmState=STATES.LOADING;const scriptOnload=()=>{this.gtmState=STATES.READY};return function(w,d,s,l,i,p){w[l]=w[l]||[],w[l].push({“gtm.start”:(new Date).getTime(),event:”gtm.js”});const f=d.getElementsByTagName(s)[0],j=d.createElement(s);j.async=!0,j.src=”https://www.googletagmanager.com/gtm.js?id=”+i+p,j.onload=scriptOnload,f.parentNode.insertBefore(j,f)}(window,document,”script”,”dataLayer”,this.tagManagerId,this.tagManagerParams),this}createGPT(){if(!this.dfxGdprChecker.checkLevel(1))return this;if(!this.allowedTrackingsConfig[TRACKINGS.GPT]||this.gptState!==STATES.OFF)return this;this.gptState=STATES.LOADING;const scriptOnload=()=>{this.gptState=STATES.READY};var googletag=window.googletag||{cmd:[]};return function(){const gads=document.createElement(“script”);gads.async=!0,gads.type=”text/javascript”;var useSSL=”https:”===document.location.protocol;gads.src=(useSSL?”https:”:”http:”)+”//www.googletagservices.com/tag/js/gpt.js”,gads.onload=scriptOnload;const node=document.getElementsByTagName(“script”)[0];node.parentNode.insertBefore(gads,node)}(),window.googletag=window.googletag||googletag,this}trackGTMpageLoadEvent(){return this.dfxGdprChecker.checkLevel(1)&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:”turboPageView”,virtualUrl:window.location.pathname})),this}createBaiduTracking(){return this.dfxGdprChecker.checkLevel(2)&&this.allowedTrackingsConfig[TRACKINGS.BAIDU]&&this.baiduState!==STATES.READY&&(function(){const hm=document.createElement(“script”);hm.src=”https://hm.baidu.com/hm.js?961aa7f85d30d676f24a6f928c035b90″;const s=document.getElementsByTagName(“script”)[0];s.parentNode.insertBefore(hm,s)}(),function(){const bp=document.createElement(“script”);var curProtocol=window.location.protocol.split(“:”)[0];bp.src=”https”===curProtocol?”https://zz.bdstatic.com/linksubmit/push.js”:”http://push.zhanzhang.baidu.com/push.js”;const s=document.getElementsByTagName(“script”)[0];s.parentNode.insertBefore(bp,s)}(),this.baiduState=STATES.READY),this}addGptAssetClasses(assetClasses){if(!Array.isArray(assetClasses))throw new TypeError(“Param assetClasses must be an Array”);return assetClasses.forEach(assetClass=>this.gptAssetClasses.add(assetClass)),this}addGptInstrumentPairs(pairs){if(!Array.isArray(pairs))throw new TypeError(“Param pairs must be an Array”);return pairs.forEach(assetClass=>this.gptInstrumentPairs.add(assetClass)),this}addGptCategories(category=””,subCategory=””){this.gptCategories={category:category,subCategory:subCategory}}getGptAssetClasses(){return this.gptAssetClasses}getGptInstrumentPairs(){return this.gptInstrumentPairs}getGptCategory(){return this.gptCategories.category}getGptSubCategory(){return this.gptCategories.subCategory}createTaboolaPixel(){if(!this.dfxGdprChecker.checkLevel(3))return this;if(!this.allowedTrackingsConfig[TRACKINGS.TABOOLA_PIXEL]||this.taboolaState!==STATES.OFF)return this;this.taboolaState=STATES.LOADING;const scriptOnload=()=>{this.taboolaState=STATES.READY};var t,f,x;return window._tfa=window._tfa||[],window._tfa.push({notify:”event”,name:”page_view”,id:this.taboolaPixelId}),this.tfa=window._tfa,t=document.createElement(“script”),f=document.getElementsByTagName(“script”)[0],x=”tb_tfa_script”,document.getElementById(x)||(t.async=1,t.src=”https://cdn.taboola.com/libtrc/unip/1350268/tfa.js”,t.id=x,t.onload=scriptOnload,f.parentNode.insertBefore(t,f)),this}taboolaPixelTrack(eventName){return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig[TRACKINGS.TABOOLA_PIXEL]&&(this.pixelState===STATES.OFF&&this.createTaboolaPixel(),this.tfa.push({notify:”event”,name:eventName,id:this.taboolaPixelId})),this}}class DfxConfig{constructor(config){this.config=config}get(key){return this.config.get(key)}set(key,value){this.config.has(key)||this.config.set(key,value)}}var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor;class DfxConfigFactory{static create(){var data=Object.assign({},window.DFX_CONFIG,window.DFX_ENDPOINTS),data=new Map(Object.entries(data));return new DfxConfig(data)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1;0{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1;0{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});var __this,__arguments,generator}}var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor;class DfxFontsFactory{static create(){return new DfxFonts(document)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1;0((__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}))(window,null,function*(){try{const noscript=document.querySelector(“noscript.jsdfx-script”);if(!noscript)return;const imports=yield window.System.import(noscript.getAttribute(“data-src”));Object.keys(imports).forEach(key=>{window[key]=imports[key]}),window.runStacked()}catch(error){console.error(error)}});document.addEventListener(“turbo:load”,()=>loadScripts()),window.performance.mark=window.performance.mark||function(){},window.performance.measure=window.performance.measure||function(){},window.turbo=Turbo$1,start(),DfxGeoLocationFactory.create().init(),exports.DfxGdprChecker=dfxGdprChecker,exports.DfxGdprCheckerFactory=DfxGdprCheckerFactory,exports.DfxGeoLocationFactory=DfxGeoLocationFactory,exports.DfxThirdPartyManagerFactory=DfxThirdPartyManagerFactory,Object.defineProperty(exports,”__esModule”,{value:!0})}(this.window=this.window||{});



Source link

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published.

Forex

EUR/USD retreats towards 1.0500 on USD rebound ahead of key data, ECB’s Lagarde

Published

on


  • EUR/USD holds lower ground near intraday bottom after the first weekly gain in four.
  • Firmer yields, fears of higher rate hike underpin US dollar rebound.
  • Concerning surrounding Russia, China adds strength to the greenback’s safe-haven demand.
  • US Durable Goods Orders, speech from ECB’s Lagarde eyed for fresh impulse.

EUR/USD remains pressured around daily lows near 1.0550, after snapping the three-week uptrend, as traders reassess the previous recovery ahead of the key data/events. That said, the chatters surrounding Russia, China and the central banks’ aggression also seem to weigh on the quote during early Monday morning in Europe.

Market sentiment dwindles even as the S&P 500 Futures print mild gains, which in turn directs traders towards the US dollar due to its safe-haven demand. The reason could be linked to the market’s reassessment of the previous week’s cautious optimism, as well as fresh fears surrounding Moscow and Beijing.

It’s worth noting that the comments from a German Official suggesting the Group of Seven (G7) leaders’ preparedness for taking moves again Russia’s oil and gold seem to recently weigh on the risk appetite. On the same line were comments from the White House saying, “The US is confident that NATO’s new strategy document will include “strong” language on China, a White House official said on Sunday, adding that negotiations on how to refer to Beijing were still underway,” per the news from Reuters.

Amid these plays, the S&P 500 Futures remain firmer around 3,920, up 0.20% intraday by the press time, whereas the US 10-year Treasury yields rise three basis points (bps) to around 3.15% after posting the first weekly loss in four.

Also contributing to the EUR/USD pair’s weakness could be the fresh chatters surrounding economic weakness in China and the US, not to forget Australia.

Additionally, the market’s cautious sentiment ahead of the US Durable Goods Orders and Pending Home Sales for May, as well as a speech from European Central Bank (ECB) President Christine Lagarde exerts additional downside pressure on the quote. Forecasts suggest that the US Durable Goods Orders for May, expected 0.1% versus 0.5% prior, as well as the Pending Home Sales, expected -2.0% versus -3.9% prior.

Technical analysis

EUR/USD sellers need validation from the convergence of the 10-DMA and a one-week-old support line, around 1.0520. Alternatively, 21-DMA and the 50-DMA, around 1.0600 by the press time, restrict the short-term recovery of the pair ahead of a downward sloping resistance line from February 10, near 1.0635.

 



Source link

Continue Reading

Forex

Nasdaq 100, US Dollar, BTC/USD, Crude Oil, PCE Data, Growth Woes

Published

on


Global market sentiment improved this past week. On Wall Street, futures tracking the Nasdaq 100, Dow Jones and S&P 500 gained 7.25%, 5.25% and 6.34% respectively. In Europe, the Euro Stoxx 50 and FTSE 100 both climbed roughly 2.75%. Meanwhile, in the Asia-Pacific region, Japan’s Nikkei 225 and Australia’s ASX 200 rose 1.23% and 0.77% respectively.

Stock traders found some comfort in weakening government bond yields. The 2-year Treasury yield weakened 3.83% last week and is down over 10% from this year’s high so far. The finalized University of Michigan survey of inflation expectations unexpectedly cooled for June, perhaps an early stage that inflation might have found a turning point.

As a result, the US Dollar weakened against its major peers, suffering from a combination of improving sentiment and falling Treasury yields. One would think that the sentiment-linked Australian and New Zealand Dollars would perform handsomely in this environment, but that was not the case. Bond yields fell more strongly in Australia and New Zealand, hurting AUD and NZD.

Australia is an economy closely tied to the global business cycle, making it vulnerable to rising fears about slowing growth across the world. Speaking of which, this will likely become the next big theme in the coming months as central banks tackle high inflation. Trying to reverse rising prices is one thing, but subsequently finding a sweet spot without overshooting is another.

It is also not surprising to see crude oil prices soften amid rising concerns about recessions. The commodity is quite heavily linked to global growth estimates. Bitcoin prices have also slowed their astronomical descent. Cryptocurrencies are in general very vulnerable to a rising interest rate environment. BTC/USD’s stabilization likely reflects optimism about inflation’s turning point.

What is in store for the week ahead? From the United States, all eyes are on the Fed’s preferred gauge of inflation, core PCE. It will be for the same period that headline CPI data surprised higher. Another strong print could easily reverse some of the optimism we have been seeing in markets. Speeches from various central bank heads are also due. German consumer confidence and inflation are due. What else is in store for markets in the week ahead?

US DOLLAR PERFORMANCE VS. CURRENCIES AND GOLD

Fundamental Forecasts:

Euro Weekly Forecast: EUR/USD in Need of a Nudge Ahead of Next Week’s Key Economic Data

The euro came out of the intense week relatively unscathed as it heads into another stacked week full of key economic data while EUR/USD holds above 1.05.

Pound Weekly Fundamental Forecast: Unflattering GBP Set to Continue

Sterling ends the week slightly higher but price action over the last 72 was essentially flat. Crucial PCE inflation next week and US, UK final GDP figures.

Stock Market Week Ahead: S&P 500 & FTSE 100 Forecast

Global central bank repricing prompts a bear-market rally. Downside risks remain, however.

Gold Prices Eye Bullish Turnaround, Silver’s Outlook Clouded by Recession Fears

Gold and silver tend to show a close correlation, but their performance could begin to diverge as rising recession odds cloud the outlook for some precious metals with industrial applications

Australian Dollar May Fall as Global Growth Fears Fester

The Australian Dollar has been trading as a barometer of the markets’ recession fears. It may fall in the week ahead as worries about global growth continue to fester.

Technical Forecasts:

S&P 500, Nasdaq 100, Dow Jones Forecast for the Week Ahead

Stocks have stabilized and look poised to continue to recover in the days/weeks ahead; levels & lines to know.

Japanese Yen Technical Forecast: USD/JPY Chart Flashes Mixed Signals around 2002 High

The Japanese Yen’s rapid descent versus the US Dollar moderated last week as prices gyrated around the 2002 high. Mixed chart signals give USD/JPY a mixed outlook for the week ahead.

US Dollar Forecast: Positive Slope in 50-Day Points to USD Breakout

The US Dollar Index (DXY) may attempt to break out if it continues to track the positive slope in the 50-Day SMA (103.04).

Crude Oil Price Outlook: WTI Trendline Breakout Spells Trouble as Retail Traders Buy

Crude oil prices are at risk on rising concerns about slowing economic growth, with WTI breaking under a key trendline. Retail traders are now also majority net-long, a bearish signal.

!function(){function errMsg(errCode,msg){return(msg||””)+” (SystemJS Error#”+errCode+” https://git.io/JvFET#”+errCode+”)”}var baseUrl,lastSepIndex,hasSymbol=”undefined”!=typeof Symbol,hasSelf=”undefined”!=typeof self,hasDocument=”undefined”!=typeof document,envGlobal=hasSelf?self:global;!hasDocument||(lastSepIndex=document.querySelector(“base[href]”))&&(baseUrl=lastSepIndex.href),baseUrl||”undefined”==typeof location||-1!==(lastSepIndex=(baseUrl=location.href.split(“#”)[0].split(“?”)[0]).lastIndexOf(“/”))&&(baseUrl=baseUrl.slice(0,lastSepIndex+1));var backslashRegEx=//g;function resolveIfNotPlainOrUrl(relUrl,parentUrl){if(“/”===(relUrl=-1!==relUrl.indexOf(“”)?relUrl.replace(backslashRegEx,”/”):relUrl)[0]&&”/”===relUrl[1])return parentUrl.slice(0,parentUrl.indexOf(“:”)+1)+relUrl;if(“.”===relUrl[0]&&(“/”===relUrl[1]||”.”===relUrl[1]&&(“/”===relUrl[2]||2===relUrl.length&&(relUrl+=”/”))||1===relUrl.length&&(relUrl+=”/”))||”/”===relUrl[0]){var parentProtocol=parentUrl.slice(0,parentUrl.indexOf(“:”)+1),pathname=”/”===parentUrl[parentProtocol.length+1]?”file:”!==parentProtocol?(pathname=parentUrl.slice(parentProtocol.length+2)).slice(pathname.indexOf(“/”)+1):parentUrl.slice(8):parentUrl.slice(parentProtocol.length+(“/”===parentUrl[parentProtocol.length]));if(“/”===relUrl[0])return parentUrl.slice(0,parentUrl.length-pathname.length-1)+relUrl;for(var segmented=pathname.slice(0,pathname.lastIndexOf(“/”)+1)+relUrl,output=[],segmentIndex=-1,i=0;ipkgName.length&&”/”!==pkg[pkg.length-1]?void targetWarning(“W2″,pkgName,pkg,”should have a trailing ‘/'”):pkg+id.slice(pkgName.length)}}function targetWarning(code,match,target,msg){console.warn(errMsg(code,”Package target “+msg+”, resolving target ‘”+target+”‘ for “+match))}function resolveImportMap(importMap,resolvedOrPlain,parentUrl){for(var scopes=importMap.scopes,scopeUrl=parentUrl&&getMatch(parentUrl,scopes);scopeUrl;){var packageResolution=applyPackages(resolvedOrPlain,scopes[scopeUrl]);if(packageResolution)return packageResolution;scopeUrl=getMatch(scopeUrl.slice(0,scopeUrl.lastIndexOf(“/”)),scopes)}return applyPackages(resolvedOrPlain,importMap.imports)||-1!==resolvedOrPlain.indexOf(“:”)&&resolvedOrPlain}var toStringTag=hasSymbol&&Symbol.toStringTag,REGISTRY=hasSymbol?Symbol():”@”;function SystemJS(){this[REGISTRY]={}}var lastRegister,systemJSPrototype=SystemJS.prototype;function loadToId(load){return load.id}function triggerOnload(loader,load,err,isErrSource){if(loader.onload(err,load.id,load.d&&load.d.map(loadToId),!!isErrSource),err)throw err}function getOrCreateLoad(loader,id,firstParentUrl){var load=loader[REGISTRY][id];if(load)return load;var importerSetters=[],ns=Object.create(null);toStringTag&&Object.defineProperty(ns,toStringTag,{value:”Module”});var instantiatePromise=Promise.resolve().then(function(){return loader.instantiate(id,firstParentUrl)}).then(function(registration){if(!registration)throw Error(errMsg(2,”Module “+id+” did not instantiate”));var declared=registration[1](function _export(name,value){var changed=!(load.h=!0);if(“string”==typeof name)name in ns&&ns[name]===value||(ns[name]=value,changed=!0);else{for(var p in name){value=name[p];p in ns&&ns[p]===value||(ns[p]=value,changed=!0)}name&&name.__esModule&&(ns.__esModule=name.__esModule)}if(changed)for(var i=0;i<importerSetters.length;i++){var setter=importerSetters[i];setter&&setter(ns)}return value},2===registration[1].length?{import:function(importId){return loader.import(importId,id)},meta:loader.createContext(id)}:void 0);return load.e=declared.execute||function(){},[registration[0],declared.setters||[]]},function(err){throw load.e=null,load.er=err,triggerOnload(loader,load,err,!0),err}),linkPromise=instantiatePromise.then(function(instantiation){return Promise.all(instantiation[0].map(function(dep,i){var setter=instantiation[1][i];return Promise.resolve(loader.resolve(dep,id)).then(function(depId){var depLoad=getOrCreateLoad(loader,depId,id);return Promise.resolve(depLoad.I).then(function(){return setter&&(depLoad.i.push(setter),!depLoad.h&&depLoad.I||setter(depLoad.n)),depLoad})})})).then(function(depLoads){load.d=depLoads})});return load=loader[REGISTRY][id]={id:id,i:importerSetters,n:ns,I:instantiatePromise,L:linkPromise,h:!1,d:void 0,e:void 0,er:void 0,E:void 0,C:void 0,p:void 0}}systemJSPrototype.import=function(id,parentUrl){var loader=this;return Promise.resolve(loader.prepareImport()).then(function(){return loader.resolve(id,parentUrl)}).then(function(load){load=getOrCreateLoad(loader,load);return load.C||function topLevelLoad(loader,load){return load.C=function instantiateAll(loader,load,parent,loaded){if(!loaded[load.id])return loaded[load.id]=!0,Promise.resolve(load.L).then(function(){return load.p&&null!==load.p.e||(load.p=parent),Promise.all(load.d.map(function(dep){return instantiateAll(loader,dep,parent,loaded)}))}).catch(function(err){if(load.er)throw err;throw load.e=null,triggerOnload(loader,load,err,!1),err})}(loader,load,load,{}).then(function(){return function postOrderExec(loader,load,seen){if(seen[load.id])return;seen[load.id]=!0;if(!load.e){if(load.er)throw load.er;return load.E?load.E:void 0}var depLoadPromises;load.d.forEach(function(depLoad){try{var depLoadPromise=postOrderExec(loader,depLoad,seen);depLoadPromise&&(depLoadPromises=depLoadPromises||[]).push(depLoadPromise)}catch(err){throw load.e=null,load.er=err,triggerOnload(loader,load,err,!1),err}});if(depLoadPromises)return Promise.all(depLoadPromises).then(doExec);return doExec();function doExec(){try{var execPromise=load.e.call(nullContext);if(execPromise)return execPromise=execPromise.then(function(){load.C=load.n,load.E=null,triggerOnload(loader,load,null,!0)},function(err){throw load.er=err,load.E=null,triggerOnload(loader,load,err,!0),err}),load.E=execPromise;load.C=load.n,load.L=load.I=void 0}catch(err){throw load.er=err}finally{load.e=null,triggerOnload(loader,load,load.er,!0)}}}(loader,load,{})}).then(function(){return load.n})}(loader,load)})},systemJSPrototype.createContext=function(parentId){var loader=this;return{url:parentId,resolve:function(id,parentUrl){return Promise.resolve(loader.resolve(id,parentUrl||parentId))}}},systemJSPrototype.onload=function(){},systemJSPrototype.register=function(deps,declare){lastRegister=[deps,declare]},systemJSPrototype.getRegister=function(){var _lastRegister=lastRegister;return lastRegister=void 0,_lastRegister};var nullContext=Object.freeze(Object.create(null));envGlobal.System=new SystemJS;var baseOrigin,lastAutoImportDeps,lastAutoImportTimeout,importMapPromise=Promise.resolve(),importMap={imports:{},scopes:{},depcache:{},integrity:{}},processFirst=hasDocument;function processScripts(){[].forEach.call(document.querySelectorAll("script"),function(script){var fetchPromise;script.sp||("systemjs-module"===script.type?(script.sp=!0,script.src&&System.import("import:"===script.src.slice(0,7)?script.src.slice(7):resolveUrl(script.src,baseUrl)).catch(function(e){var event;return-1<e.message.indexOf("https://git.io/JvFET#3")&&((event=document.createEvent("Event")).initEvent("error",!1,!1),script.dispatchEvent(event)),Promise.reject(e)})):"systemjs-importmap"===script.type&&(script.sp=!0,fetchPromise=script.src?fetch(script.src,{integrity:script.integrity}).then(function(res){if(!res.ok)throw Error("Invalid status code: "+res.status);return res.text()}).catch(function(err){return err.message=errMsg("W4","Error fetching systemjs-import map "+script.src)+"n"+err.message,console.warn(err),"function"==typeof script.onerror&&script.onerror(),"{}"}):script.innerHTML,importMapPromise=importMapPromise.then(function(){return fetchPromise}).then(function(text){!function extendImportMap(importMap,newMapText,newMapUrl){var newMap={};try{newMap=JSON.parse(newMapText)}catch(err){console.warn(Error(errMsg("W5","systemjs-importmap contains invalid JSON")+"nn"+newMapText+"n"))}!function resolveAndComposeImportMap(json,baseUrl,outMap){for(var u in json.imports&&resolveAndComposePackages(json.imports,outMap.imports,baseUrl,outMap,null),json.scopes||{}){var resolvedScope=resolveUrl(u,baseUrl);resolveAndComposePackages(json.scopes[u],outMap.scopes[resolvedScope]||(outMap.scopes[resolvedScope]={}),baseUrl,outMap,resolvedScope)}for(u in json.depcache||{})outMap.depcache[resolveUrl(u,baseUrl)]=json.depcache[u];for(u in json.integrity||{})outMap.integrity[resolveUrl(u,baseUrl)]=json.integrity[u]}(newMap,newMapUrl,importMap)}(importMap,text,script.src||baseUrl)})))})}systemJSPrototype.prepareImport=function(doProcessScripts){return(processFirst||doProcessScripts)&&(processScripts(),processFirst=!1),importMapPromise},hasDocument&&(processScripts(),window.addEventListener("DOMContentLoaded",processScripts)),hasDocument&&(window.addEventListener("error",function(evt){lastWindowErrorUrl=evt.filename,lastWindowError=evt.error}),baseOrigin=location.origin),systemJSPrototype.createScript=function(url){var script=document.createElement("script");script.async=!0,url.indexOf(baseOrigin+"/")&&(script.crossOrigin="anonymous");var integrity=importMap.integrity[url];return integrity&&(script.integrity=integrity),script.src=url,script};var lastWindowErrorUrl,lastWindowError,autoImportCandidates={},systemRegister=systemJSPrototype.register;systemJSPrototype.register=function(deps,declare){var scripts,lastScript,loader;return hasDocument&&"loading"===document.readyState&&"string"!=typeof deps?(scripts=document.querySelectorAll("script[src]"),(lastScript=scripts[scripts.length-1])&&(lastScript.src,lastAutoImportDeps=deps,loader=this,lastAutoImportTimeout=setTimeout(function(){autoImportCandidates[lastScript.src]=[deps,declare],loader.import(lastScript.src)}))):lastAutoImportDeps=void 0,systemRegister.call(this,deps,declare)},systemJSPrototype.instantiate=function(url,firstParentUrl){var autoImportRegistration=autoImportCandidates[url];if(autoImportRegistration)return delete autoImportCandidates[url],autoImportRegistration;var loader=this;return new Promise(function(resolve,reject){var script=systemJSPrototype.createScript(url);script.addEventListener("error",function(){reject(Error(errMsg(3,"Error loading "+url+(firstParentUrl?" from "+firstParentUrl:""))))}),script.addEventListener("load",function(){var register;document.head.removeChild(script),lastWindowErrorUrl===url?reject(lastWindowError):((register=loader.getRegister())&&register[0]===lastAutoImportDeps&&clearTimeout(lastAutoImportTimeout),resolve(register))}),document.head.appendChild(script)})},systemJSPrototype.shouldFetch=function(){return!1},"undefined"!=typeof fetch&&(systemJSPrototype.fetch=fetch);var instantiate=systemJSPrototype.instantiate,jsContentTypeRegEx=/^(text|application)/(x-)?javascript(;|$)/;systemJSPrototype.instantiate=function(url,parent){var loader=this;return this.shouldFetch(url)?this.fetch(url,{credentials:"same-origin",integrity:importMap.integrity[url]}).then(function(res){if(!res.ok)throw Error(errMsg(7,res.status+" "+res.statusText+", loading "+url+(parent?" from "+parent:"")));var contentType=res.headers.get("content-type");if(!contentType||!jsContentTypeRegEx.test(contentType))throw Error(errMsg(4,'Unknown Content-Type "'+contentType+'", loading '+url+(parent?" from "+parent:"")));return res.text().then(function(source){return source.indexOf("//# sourceURL=")<0&&(source+="n//# sourceURL="+url),(0,eval)(source),loader.getRegister()})}):instantiate.apply(this,arguments)},systemJSPrototype.resolve=function(id,parentUrl){return resolveImportMap(importMap,resolveIfNotPlainOrUrl(id,parentUrl=parentUrl||baseUrl)||id,parentUrl)||function throwUnresolved(id,parentUrl){throw Error(errMsg(8,"Unable to resolve bare specifier '"+id+(parentUrl?"' from "+parentUrl:"'")))}(id,parentUrl)};var systemInstantiate=systemJSPrototype.instantiate;systemJSPrototype.instantiate=function(url,firstParentUrl){var preloads=importMap.depcache[url];if(preloads)for(var i=0;i<preloads.length;i++)getOrCreateLoad(this,this.resolve(preloads[i],url),url);return systemInstantiate.call(this,url,firstParentUrl)},hasSelf&&"function"==typeof importScripts&&(systemJSPrototype.instantiate=function(url){var loader=this;return Promise.resolve().then(function(){return importScripts(url),loader.getRegister()})}),function(global){var firstGlobalProp,secondGlobalProp,lastGlobalProp,systemJSPrototype=global.System.constructor.prototype;var impt=systemJSPrototype.import;systemJSPrototype.import=function(id,parentUrl){return function noteGlobalProps(){for(var p in firstGlobalProp=secondGlobalProp=void 0,global)shouldSkipProperty(p)||(firstGlobalProp?secondGlobalProp=secondGlobalProp||p:firstGlobalProp=p,lastGlobalProp=p)}(),impt.call(this,id,parentUrl)};var emptyInstantiation=[[],function(){return{}}],getRegister=systemJSPrototype.getRegister;systemJSPrototype.getRegister=function(){var globalProp=getRegister.call(this);if(globalProp)return globalProp;var globalExport,globalProp=function getGlobalProp(useFirstGlobalProp){var foundLastProp,result,p,cnt=0;for(p in global)if(!shouldSkipProperty(p)){if(0===cnt&&p!==firstGlobalProp||1===cnt&&p!==secondGlobalProp)return p;foundLastProp?(lastGlobalProp=p,result=useFirstGlobalProp&&result||p):foundLastProp=p===lastGlobalProp,cnt++}return result}(this.firstGlobalProp);if(!globalProp)return emptyInstantiation;try{globalExport=global[globalProp]}catch(e){return emptyInstantiation}return[[],function(_export){return{execute:function(){_export(globalExport),_export({default:globalExport,__useDefault:!0})}}}]};var isIE11="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident");function shouldSkipProperty(p){return!global.hasOwnProperty(p)||!isNaN(p)&&pnew Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});function raise(errorConstructor,message,name){throw new errorConstructor(“Failed to execute ‘requestSubmit’ on ‘HTMLFormElement’: “+message+”.”,name)}!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){const BuiltInHTMLElement=HTMLElement,wrapperForTheName_HTMLElement=function HTMLElement2(){return Reflect.construct(BuiltInHTMLElement,[],this.constructor)};window.HTMLElement=wrapperForTheName_HTMLElement,HTMLElement.prototype=BuiltInHTMLElement.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,BuiltInHTMLElement)}}(),”function”!=typeof(Turbo$1=HTMLFormElement.prototype).requestSubmit&&(Turbo$1.requestSubmit=function(submitter){submitter?(function validateSubmitter(submitter,form){submitter instanceof HTMLElement||raise(TypeError,”parameter 1 is not of type ‘HTMLElement'”),”submit”==submitter.type||raise(TypeError,”The specified element is not a submit button”),submitter.form==form||raise(DOMException,”The specified element is not owned by this form element”,”NotFoundError”)}(submitter,this),submitter.click()):((submitter=document.createElement(“input”)).type=”submit”,submitter.hidden=!0,this.appendChild(submitter),submitter.click(),this.removeChild(submitter))});const submittersByForm=new WeakMap;function clickCaptured(submitter){submitter=function findSubmitterFromClickTarget(candidate){const element=candidate instanceof Element?candidate:candidate instanceof Node?candidate.parentElement:null;return”submit”==(null==(candidate=element?element.closest(“input, button”):null)?void 0:candidate.type)?candidate:null}(submitter.target);submitter&&submitter.form&&submittersByForm.set(submitter.form,submitter)}!function(){if(!(“submitter”in Event.prototype)){let prototype;if(“SubmitEvent”in window&&/Apple Computer/.test(navigator.vendor))prototype=window.SubmitEvent.prototype;else{if(“SubmitEvent”in window)return;prototype=window.Event.prototype}addEventListener(“click”,clickCaptured,!0),Object.defineProperty(prototype,”submitter”,{get(){if(“submit”==this.type&&this.target instanceof HTMLFormElement)return submittersByForm.get(this.target)}})}}(),(dfxGdprChecker=FrameLoadingStyle=FrameLoadingStyle||{}).eager=”eager”,dfxGdprChecker.lazy=”lazy”;class FrameElement extends HTMLElement{constructor(){super(),this.loaded=Promise.resolve(),this.delegate=new FrameElement.delegateConstructor(this)}static get observedAttributes(){return[“disabled”,”loading”,”src”]}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){var{src}=this;this.src=null,this.src=src}attributeChangedCallback(name){“loading”==name?this.delegate.loadingStyleChanged():”src”==name?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute(“src”)}set src(value){value?this.setAttribute(“src”,value):this.removeAttribute(“src”)}get loading(){return function frameLoadingStyleFromString(style){return”lazy”!==style.toLowerCase()?FrameLoadingStyle.eager:FrameLoadingStyle.lazy}(this.getAttribute(“loading”)||””)}set loading(value){value?this.setAttribute(“loading”,value):this.removeAttribute(“loading”)}get disabled(){return this.hasAttribute(“disabled”)}set disabled(value){value?this.setAttribute(“disabled”,””):this.removeAttribute(“disabled”)}get autoscroll(){return this.hasAttribute(“autoscroll”)}set autoscroll(value){value?this.setAttribute(“autoscroll”,””):this.removeAttribute(“autoscroll”)}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var _b;return null===(_b=null===(_b=this.ownerDocument)||void 0===_b?void 0:_b.documentElement)||void 0===_b?void 0:_b.hasAttribute(“data-turbo-preview”)}}function expandURL(locatable){return new URL(locatable.toString(),document.baseURI)}function getAnchor(anchorMatch){return anchorMatch.hash?anchorMatch.hash.slice(1):(anchorMatch=anchorMatch.href.match(/#(.*)$/))?anchorMatch[1]:void 0}function getAction(form,submitter){return expandURL((null==submitter?void 0:submitter.getAttribute(“formaction”))||form.getAttribute(“action”)||form.action)}function getExtension(url){return(function getLastPathComponent(url){return function getPathComponents(url){return url.pathname.split(“/”).slice(1)}(url).slice(-1)[0]}(url).match(/.[^.]*$/)||[])[0]||””}function isPrefixedBy(baseURL,prefix){prefix=function getPrefix(url){return function addTrailingSlash(value){return value.endsWith(“/”)?value:value+”/”}(url.origin+url.pathname)}(prefix);return baseURL.href===expandURL(prefix).href||baseURL.href.startsWith(prefix)}function locationIsVisitable(location2,rootLocation){return isPrefixedBy(location2,rootLocation)&&function isHTML(url){return!!getExtension(url).match(/^(?:|.(?:htm|html|xhtml))$/)}(location2)}function getRequestURL(url){var anchor=getAnchor(url);return null!=anchor?url.href.slice(0,-(anchor.length+1)):url.href}function toCacheKey(url){return getRequestURL(url)}class FetchResponse{constructor(response){this.response=response}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return 400<=this.statusCode&&this.statusCode<=499}get serverError(){return 500<=this.statusCode&&this.statusCoderequestAnimationFrame(()=>resolve()))}function parseHTMLDocument(html=””){return(new DOMParser).parseFromString(html,”text/html”)}function unindent(strings,…match){const lines=function interpolate(strings,values){return strings.reduce((result,string,i)=>{return result+string+(null==values[i]?””:values[i])},””)}(strings,match).replace(/^n/,””).split(“n”);match=lines[0].match(/^s+/);const indent=match?match[0].length:0;return lines.map(line=>line.slice(indent)).join(“n”)}function uuid(){return Array.apply(null,{length:36}).map((_,i)=>8==i||13==i||18==i||23==i?”-“:14==i?”4”:(19==i?Math.floor(4*Math.random())+8:Math.floor(15*Math.random())).toString(16)).join(“”)}function getAttribute(attributeName,…elements){for(const value of elements.map(element=>null==element?void 0:element.getAttribute(attributeName)))if(“string”==typeof value)return value;return null}function markAsBusy(…elements){for(const element of elements)”turbo-frame”==element.localName&&element.setAttribute(“busy”,””),element.setAttribute(“aria-busy”,”true”)}function clearBusyState(…elements){for(const element of elements)”turbo-frame”==element.localName&&element.removeAttribute(“busy”),element.removeAttribute(“aria-busy”)}(Turbo$1=FetchMethod=FetchMethod||{})[Turbo$1.get=0]=”get”,Turbo$1[Turbo$1.post=1]=”post”,Turbo$1[Turbo$1.put=2]=”put”,Turbo$1[Turbo$1.patch=3]=”patch”,Turbo$1[Turbo$1.delete=4]=”delete”;class FetchRequest{constructor(delegate,method,location2,body=new URLSearchParams,target=null){this.abortController=new AbortController,this.resolveRequestPromise=value=>{},this.delegate=delegate,this.method=method,this.headers=this.defaultHeaders,this.body=body,this.url=location2,this.target=target}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}perform(){return __async$4(this,null,function*(){var _a,_b,{fetchOptions}=this;null!==(_b=(_a=this.delegate).prepareHeadersForRequest)&&void 0!==_b&&_b.call(_a,this.headers,this),yield this.allowRequestToBeIntercepted(fetchOptions);try{this.delegate.requestStarted(this);var response=yield fetch(this.url.href,fetchOptions);return yield this.receive(response)}catch(error){if(“AbortError”!==error.name)throw this.delegate.requestErrored(this,error),error}finally{this.delegate.requestFinished(this)}})}receive(response){return __async$4(this,null,function*(){var fetchResponse=new FetchResponse(response);return dispatch(“turbo:before-fetch-response”,{cancelable:!0,detail:{fetchResponse:fetchResponse},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,fetchResponse):fetchResponse.succeeded?this.delegate.requestSucceededWithResponse(this,fetchResponse):this.delegate.requestFailedWithResponse(this,fetchResponse),fetchResponse})}get fetchOptions(){var _a;return{method:FetchMethod[this.method].toUpperCase(),credentials:”same-origin”,headers:this.headers,redirect:”follow”,body:this.isIdempotent?null:this.body,signal:this.abortSignal,referrer:null===(_a=this.delegate.referrer)||void 0===_a?void 0:_a.href}}get defaultHeaders(){return{Accept:”text/html, application/xhtml+xml”}}get isIdempotent(){return this.method==FetchMethod.get}get abortSignal(){return this.abortController.signal}allowRequestToBeIntercepted(fetchOptions){return __async$4(this,null,function*(){var requestInterception=new Promise(resolve=>this.resolveRequestPromise=resolve);dispatch(“turbo:before-fetch-request”,{cancelable:!0,detail:{fetchOptions:fetchOptions,url:this.url,resume:this.resolveRequestPromise},target:this.target}).defaultPrevented&&(yield requestInterception)})}}class AppearanceObserver{constructor(delegate,element){this.started=!1,this.intersect=lastEntry=>{lastEntry=lastEntry.slice(-1)[0];null!=lastEntry&&lastEntry.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=delegate,this.element=element,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}}class StreamMessage{constructor(html){this.templateElement=document.createElement(“template”),this.templateElement.innerHTML=html}static wrap(message){return”string”==typeof message?new this(message):message}get fragment(){const fragment=document.createDocumentFragment();for(const element of this.foreignElements)fragment.appendChild(document.importNode(element,!0));return fragment}get foreignElements(){return this.templateChildren.reduce((streamElements,child)=>”turbo-stream”==child.tagName.toLowerCase()?[…streamElements,child]:streamElements,[])}get templateChildren(){return Array.from(this.templateElement.content.children)}}StreamMessage.contentType=”text/vnd.turbo-stream.html”,(dfxGdprChecker=FormSubmissionState=FormSubmissionState||{})[dfxGdprChecker.initialized=0]=”initialized”,dfxGdprChecker[dfxGdprChecker.requesting=1]=”requesting”,dfxGdprChecker[dfxGdprChecker.waiting=2]=”waiting”,dfxGdprChecker[dfxGdprChecker.receiving=3]=”receiving”,dfxGdprChecker[dfxGdprChecker.stopping=4]=”stopping”,dfxGdprChecker[dfxGdprChecker.stopped=5]=”stopped”,(Turbo$1=FormEnctype=FormEnctype||{}).urlEncoded=”application/x-www-form-urlencoded”,Turbo$1.multipart=”multipart/form-data”,Turbo$1.plain=”text/plain”;class FormSubmission{constructor(delegate,formElement,submitter,mustRedirect=!1){this.state=FormSubmissionState.initialized,this.delegate=delegate,this.formElement=formElement,this.submitter=submitter,this.formData=function buildFormData(formElement,submitter){const formData=new FormData(formElement),name=null==submitter?void 0:submitter.getAttribute(“name”),value=null==submitter?void 0:submitter.getAttribute(“value”);name&&null!=value&&formData.get(name)!=value&&formData.append(name,value);return formData}(formElement,submitter),this.location=expandURL(this.action),this.method==FetchMethod.get&&function mergeFormDataEntries(url,entries){const searchParams=new URLSearchParams;for(var[name,value]of entries)value instanceof File||searchParams.append(name,value);url.search=searchParams.toString()}(this.location,[…this.body.entries()]),this.fetchRequest=new FetchRequest(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=mustRedirect}static confirmMethod(message,element){return confirm(message)}get method(){var _a;const method=(null===(_a=this.submitter)||void 0===_a?void 0:_a.getAttribute(“formmethod”))||this.formElement.getAttribute(“method”)||””;return function fetchMethodFromString(method){switch(method.toLowerCase()){case”get”:return FetchMethod.get;case”post”:return FetchMethod.post;case”put”:return FetchMethod.put;case”patch”:return FetchMethod.patch;case”delete”:return FetchMethod.delete}}(method.toLowerCase())||FetchMethod.get}get action(){var _a,formElementAction=”string”==typeof this.formElement.action?this.formElement.action:null;return(null===(_a=this.submitter)||void 0===_a?void 0:_a.getAttribute(“formaction”))||this.formElement.getAttribute(“action”)||formElementAction||””}get body(){return this.enctype==FormEnctype.urlEncoded||this.method==FetchMethod.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var _a;return function formEnctypeFromString(encoding){switch(encoding.toLowerCase()){case FormEnctype.multipart:return FormEnctype.multipart;case FormEnctype.plain:return FormEnctype.plain;default:return FormEnctype.urlEncoded}}((null===(_a=this.submitter)||void 0===_a?void 0:_a.getAttribute(“formenctype”))||this.formElement.enctype)}get isIdempotent(){return this.fetchRequest.isIdempotent}get stringFormData(){return[…this.formData].reduce((entries,[name,value])=>entries.concat(“string”==typeof value?[[name,value]]:[]),[])}get confirmationMessage(){return this.formElement.getAttribute(“data-turbo-confirm”)}get needsConfirmation(){return null!==this.confirmationMessage}start(){return __async$4(this,null,function*(){var{initialized,requesting}=FormSubmissionState;if(this.needsConfirmation&&!FormSubmission.confirmMethod(this.confirmationMessage,this.formElement))return;if(this.state==initialized)return this.state=requesting,this.fetchRequest.perform()})}stop(){var{stopping,stopped}=FormSubmissionState;if(this.state!=stopping&&this.state!=stopped)return this.state=stopping,this.fetchRequest.cancel(),!0}prepareHeadersForRequest(headers,token){token.isIdempotent||((token=function getCookieValue(cookieName){if(null!=cookieName){const cookies=document.cookie?document.cookie.split(“; “):[],cookie=cookies.find(cookie2=>cookie2.startsWith(cookieName));if(cookie){var value=cookie.split(“=”).slice(1).join(“=”);return value?decodeURIComponent(value):void 0}}}(getMetaContent(“csrf-param”))||getMetaContent(“csrf-token”))&&(headers[“X-CSRF-Token”]=token),headers.Accept=[StreamMessage.contentType,headers.Accept].join(“, “))}requestStarted(request){var _a;this.state=FormSubmissionState.waiting,null!==(_a=this.submitter)&&void 0!==_a&&_a.setAttribute(“disabled”,””),dispatch(“turbo:submit-start”,{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(request,response){this.result={success:response.succeeded,fetchResponse:response}}requestSucceededWithResponse(error,response){response.clientError||response.serverError?this.delegate.formSubmissionFailedWithResponse(this,response):this.requestMustRedirect(error)&&function responseSucceededWithoutRedirect(response){return 200==response.statusCode&&!response.redirected}(response)?(error=new Error(“Form responses must redirect to another location”),this.delegate.formSubmissionErrored(this,error)):(this.state=FormSubmissionState.receiving,this.result={success:!0,fetchResponse:response},this.delegate.formSubmissionSucceededWithResponse(this,response))}requestFailedWithResponse(request,response){this.result={success:!1,fetchResponse:response},this.delegate.formSubmissionFailedWithResponse(this,response)}requestErrored(request,error){this.result={success:!1,error:error},this.delegate.formSubmissionErrored(this,error)}requestFinished(request){var _a;this.state=FormSubmissionState.stopped,null!==(_a=this.submitter)&&void 0!==_a&&_a.removeAttribute(“disabled”),dispatch(“turbo:submit-end”,{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}requestMustRedirect(request){return!request.isIdempotent&&this.mustRedirect}}function getMetaContent(element){element=document.querySelector(`meta[name=”${element}”]`);return element&&element.content}class Snapshot{constructor(element){this.element=element}get children(){return[…this.element.children]}hasAnchor(anchor){return null!=this.getElementForAnchor(anchor)}getElementForAnchor(anchor){return anchor?this.element.querySelector(`[id=’${anchor}’], a[name=”${anchor}”]`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return this.element.querySelector(“[autofocus]”)}get permanentElements(){return[…this.element.querySelectorAll(“[id][data-turbo-permanent]”)]}getPermanentElementById(id){return this.element.querySelector(`#${id}[data-turbo-permanent]`)}getPermanentElementMapForSnapshot(snapshot){const permanentElementMap={};for(const currentPermanentElement of this.permanentElements){var{id}=currentPermanentElement,newPermanentElement=snapshot.getPermanentElementById(id);newPermanentElement&&(permanentElementMap[id]=[currentPermanentElement,newPermanentElement])}return permanentElementMap}}class FormInterceptor{constructor(delegate,element){this.submitBubbled=event=>{const form=event.target;if(!event.defaultPrevented&&form instanceof HTMLFormElement&&form.closest(“turbo-frame, html”)==this.element){const submitter=event.submitter||void 0;”dialog”!=((null===submitter||void 0===submitter?void 0:submitter.getAttribute(“formmethod”))||form.method)&&this.delegate.shouldInterceptFormSubmission(form,submitter)&&(event.preventDefault(),event.stopImmediatePropagation(),this.delegate.formSubmissionIntercepted(form,submitter))}},this.delegate=delegate,this.element=element}start(){this.element.addEventListener(“submit”,this.submitBubbled)}stop(){this.element.removeEventListener(“submit”,this.submitBubbled)}}class View{constructor(delegate,element){this.resolveRenderPromise=value=>{},this.resolveInterceptionPromise=value=>{},this.delegate=delegate,this.element=element}scrollToAnchor(element){element=this.snapshot.getElementForAnchor(element);element?(this.scrollToElement(element),this.focusElement(element)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(location2){this.scrollToAnchor(getAnchor(location2))}scrollToElement(element){element.scrollIntoView()}focusElement(element){element instanceof HTMLElement&&(element.hasAttribute(“tabindex”)?element.focus():(element.setAttribute(“tabindex”,”-1″),element.focus(),element.removeAttribute(“tabindex”)))}scrollToPosition({x,y}){this.scrollRoot.scrollTo(x,y)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}render(renderer){return __async$4(this,null,function*(){var{isPreview,shouldRender,newSnapshot:snapshot}=renderer;if(shouldRender)try{this.renderPromise=new Promise(resolve=>this.resolveRenderPromise=resolve),this.renderer=renderer,this.prepareToRenderSnapshot(renderer);var renderInterception=new Promise(resolve=>this.resolveInterceptionPromise=resolve);this.delegate.allowsImmediateRender(snapshot,this.resolveInterceptionPromise)||(yield renderInterception),yield this.renderSnapshot(renderer),this.delegate.viewRenderedSnapshot(snapshot,isPreview),this.finishRenderingSnapshot(renderer)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate()})}invalidate(){this.delegate.viewInvalidated()}prepareToRenderSnapshot(renderer){this.markAsPreview(renderer.isPreview),renderer.prepareToRender()}markAsPreview(isPreview){isPreview?this.element.setAttribute(“data-turbo-preview”,””):this.element.removeAttribute(“data-turbo-preview”)}renderSnapshot(renderer){return __async$4(this,null,function*(){yield renderer.render()})}finishRenderingSnapshot(renderer){renderer.finishRendering()}}class FrameView extends View{invalidate(){this.element.innerHTML=””}get snapshot(){return new Snapshot(this.element)}}class LinkInterceptor{constructor(delegate,element){this.clickBubbled=event=>{this.respondsToEventTarget(event.target)?this.clickEvent=event:delete this.clickEvent},this.linkClicked=event=>{this.clickEvent&&this.respondsToEventTarget(event.target)&&event.target instanceof Element&&this.delegate.shouldInterceptLinkClick(event.target,event.detail.url)&&(this.clickEvent.preventDefault(),event.preventDefault(),this.delegate.linkClickIntercepted(event.target,event.detail.url)),delete this.clickEvent},this.willVisit=()=>{delete this.clickEvent},this.delegate=delegate,this.element=element}start(){this.element.addEventListener(“click”,this.clickBubbled),document.addEventListener(“turbo:click”,this.linkClicked),document.addEventListener(“turbo:before-visit”,this.willVisit)}stop(){this.element.removeEventListener(“click”,this.clickBubbled),document.removeEventListener(“turbo:click”,this.linkClicked),document.removeEventListener(“turbo:before-visit”,this.willVisit)}respondsToEventTarget(target){const element=target instanceof Element?target:target instanceof Node?target.parentElement:null;return element&&element.closest(“turbo-frame, html”)==this.element}}class Bardo{constructor(permanentElementMap){this.permanentElementMap=permanentElementMap}static preservingPermanentElements(permanentElementMap,callback){const bardo=new this(permanentElementMap);bardo.enter(),callback(),bardo.leave()}enter(){for(const id in this.permanentElementMap){var[,newPermanentElement]=this.permanentElementMap[id];this.replaceNewPermanentElementWithPlaceholder(newPermanentElement)}}leave(){for(const id in this.permanentElementMap){var[currentPermanentElement]=this.permanentElementMap[id];this.replaceCurrentPermanentElementWithClone(currentPermanentElement),this.replacePlaceholderWithPermanentElement(currentPermanentElement)}}replaceNewPermanentElementWithPlaceholder(permanentElement){var placeholder=function createPlaceholderForPermanentElement(permanentElement){const element=document.createElement(“meta”);return element.setAttribute(“name”,”turbo-permanent-placeholder”),element.setAttribute(“content”,permanentElement.id),element}(permanentElement);permanentElement.replaceWith(placeholder)}replaceCurrentPermanentElementWithClone(permanentElement){var clone=permanentElement.cloneNode(!0);permanentElement.replaceWith(clone)}replacePlaceholderWithPermanentElement(permanentElement){const placeholder=this.getPlaceholderById(permanentElement.id);null!==placeholder&&void 0!==placeholder&&placeholder.replaceWith(permanentElement)}getPlaceholderById(id){return this.placeholders.find(element=>element.content==id)}get placeholders(){return[…document.querySelectorAll(“meta[name=turbo-permanent-placeholder][content]”)]}}class Renderer{constructor(currentSnapshot,newSnapshot,isPreview,willRender=!0){this.currentSnapshot=currentSnapshot,this.newSnapshot=newSnapshot,this.isPreview=isPreview,this.willRender=willRender,this.promise=new Promise((resolve,reject)=>this.resolvingFunctions={resolve:resolve,reject:reject})}get shouldRender(){return!0}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}createScriptElement(element){if(“false”==element.getAttribute(“data-turbo-eval”))return element;{const createdScriptElement=document.createElement(“script”);return this.cspNonce&&(createdScriptElement.nonce=this.cspNonce),createdScriptElement.textContent=element.textContent,createdScriptElement.async=!1,function copyElementAttributes(destinationElement,sourceElement){for(var{name,value}of[…sourceElement.attributes])destinationElement.setAttribute(name,value)}(createdScriptElement,element),createdScriptElement}}preservingPermanentElements(callback){Bardo.preservingPermanentElements(this.permanentElementMap,callback)}focusFirstAutofocusableElement(){const element=this.connectedSnapshot.firstAutofocusableElement;!function elementIsFocusable(element){return element&&”function”==typeof element.focus}(element)||element.focus()}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get cspNonce(){var _a;return null===(_a=document.head.querySelector(‘meta[name=”csp-nonce”]’))||void 0===_a?void 0:_a.getAttribute(“content”)}}class FrameRenderer extends Renderer{get shouldRender(){return!0}render(){return __async$4(this,null,function*(){yield nextAnimationFrame(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),yield nextAnimationFrame(),this.focusFirstAutofocusableElement(),yield nextAnimationFrame(),this.activateScriptElements()})}loadFrameElement(){var _a;const destinationRange=document.createRange();destinationRange.selectNodeContents(this.currentElement),destinationRange.deleteContents();var frameElement=this.newElement;const sourceRange=null===(_a=frameElement.ownerDocument)||void 0===_a?void 0:_a.createRange();sourceRange&&(sourceRange.selectNodeContents(frameElement),this.currentElement.appendChild(sourceRange.extractContents()))}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const element=this.currentElement.firstElementChild;var block=function readScrollLogicalPosition(value,defaultValue){return”end”==value||”start”==value||”center”==value||”nearest”==value?value:defaultValue}(this.currentElement.getAttribute(“data-autoscroll-block”),”end”);if(element)return element.scrollIntoView({block:block}),!0}return!1}activateScriptElements(){for(const inertScriptElement of this.newScriptElements){var activatedScriptElement=this.createScriptElement(inertScriptElement);inertScriptElement.replaceWith(activatedScriptElement)}}get newScriptElements(){return this.currentElement.querySelectorAll(“script”)}}class ProgressBar{constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}static get defaultCSS(){return unindent`
.turbo-progress-bar {
position: fixed;
display: block;
top: 0;
left: 0;
height: 3px;
background: #0076ff;
z-index: 9999;
transition:
width ${ProgressBar.animationDuration}ms ease-out,
opacity ${ProgressBar.animationDuration/2}ms ${ProgressBar.animationDuration/2}ms ease-in;
transform: translate3d(0, 0, 0);
}
`}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(value){this.value=value,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width=”0″,this.progressElement.style.opacity=”1″,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(callback){this.progressElement.style.opacity=”0″,setTimeout(callback,1.5*ProgressBar.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,ProgressBar.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+90*this.value}%`})}createStylesheetElement(){const element=document.createElement(“style”);return element.type=”text/css”,element.textContent=ProgressBar.defaultCSS,element}createProgressElement(){const element=document.createElement(“div”);return element.className=”turbo-progress-bar”,element}}ProgressBar.animationDuration=300;class HeadSnapshot extends Snapshot{constructor(){super(…arguments),this.detailsByOuterHTML=this.children.filter(element=>!function elementIsNoscript(tagName){tagName=tagName.tagName.toLowerCase();return”noscript”==tagName}(element)).map(element=>function elementWithoutNonce(element){element.hasAttribute(“nonce”)&&element.setAttribute(“nonce”,””);return element}(element)).reduce((result,element)=>{var{outerHTML}=element,details=outerHTML in result?result[outerHTML]:{type:function elementType(element){{if(function elementIsScript(tagName){tagName=tagName.tagName.toLowerCase();return”script”==tagName}(element))return”script”;if(function elementIsStylesheet(element){var tagName=element.tagName.toLowerCase();return”style”==tagName||”link”==tagName&&”stylesheet”==element.getAttribute(“rel”)}(element))return”stylesheet”}}(element),tracked:function elementIsTracked(element){return”reload”==element.getAttribute(“data-turbo-track”)}(element),elements:[]};return Object.assign(Object.assign({},result),{[outerHTML]:Object.assign(Object.assign({},details),{elements:[…details.elements,element]})})},{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(outerHTML=>this.detailsByOuterHTML[outerHTML].tracked).join(“”)}getScriptElementsNotInSnapshot(snapshot){return this.getElementsMatchingTypeNotInSnapshot(“script”,snapshot)}getStylesheetElementsNotInSnapshot(snapshot){return this.getElementsMatchingTypeNotInSnapshot(“stylesheet”,snapshot)}getElementsMatchingTypeNotInSnapshot(matchedType,snapshot){return Object.keys(this.detailsByOuterHTML).filter(outerHTML=>!(outerHTML in snapshot.detailsByOuterHTML)).map(outerHTML=>this.detailsByOuterHTML[outerHTML]).filter(({type})=>type==matchedType).map(({elements:[element]})=>element)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((result,outerHTML)=>{const{type,tracked,elements}=this.detailsByOuterHTML[outerHTML];return null!=type||tracked?1{var{elements:[element]}=this.detailsByOuterHTML[element];return function elementIsMetaElementWithName(element,name){var tagName=element.tagName.toLowerCase();return”meta”==tagName&&element.getAttribute(“name”)==name}(element,name)?element:result},void 0)}}class PageSnapshot extends Snapshot{constructor(element,headSnapshot){super(element),this.headSnapshot=headSnapshot}static fromHTMLString(html=””){return this.fromDocument(parseHTMLDocument(html))}static fromElement(element){return this.fromDocument(element.ownerDocument)}static fromDocument({head,body}){return new this(body,new HeadSnapshot(head))}clone(){return new PageSnapshot(this.element.cloneNode(!0),this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var _a;return expandURL(null!==(_a=this.getSetting(“root”))&&void 0!==_a?_a:”/”)}get cacheControlValue(){return this.getSetting(“cache-control”)}get isPreviewable(){return”no-preview”!=this.cacheControlValue}get isCacheable(){return”no-cache”!=this.cacheControlValue}get isVisitable(){return”reload”!=this.getSetting(“visit-control”)}getSetting(name){return this.headSnapshot.getMetaValue(`turbo-${name}`)}}(dfxGdprChecker=TimingMetric=TimingMetric||{}).visitStart=”visitStart”,dfxGdprChecker.requestStart=”requestStart”,dfxGdprChecker.requestEnd=”requestEnd”,dfxGdprChecker.visitEnd=”visitEnd”,(Turbo$1=VisitState=VisitState||{}).initialized=”initialized”,Turbo$1.started=”started”,Turbo$1.canceled=”canceled”,Turbo$1.failed=”failed”;const defaultOptions={action:”advance”,historyChanged:!(Turbo$1.completed=”completed”),visitCachedSnapshot:()=>{},willRender:!0};(dfxGdprChecker=SystemStatusCode=SystemStatusCode||{})[dfxGdprChecker.networkFailure=0]=”networkFailure”,dfxGdprChecker[dfxGdprChecker.timeoutFailure=-1]=”timeoutFailure”,dfxGdprChecker[dfxGdprChecker.contentTypeMismatch=-2]=”contentTypeMismatch”;class Visit{constructor(snapshotHTML,response,visitCachedSnapshot,willRender={}){this.identifier=uuid(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.snapshotCached=!1,this.state=VisitState.initialized,this.delegate=snapshotHTML,this.location=response,this.restorationIdentifier=visitCachedSnapshot||uuid();var{action,historyChanged,referrer,snapshotHTML,response,visitCachedSnapshot,willRender}=Object.assign(Object.assign({},defaultOptions),willRender);this.action=action,this.historyChanged=historyChanged,this.referrer=referrer,this.snapshotHTML=snapshotHTML,this.response=response,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=visitCachedSnapshot,this.willRender=willRender,this.scrolled=!willRender}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==VisitState.initialized&&(this.recordTimingMetric(TimingMetric.visitStart),this.state=VisitState.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==VisitState.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=VisitState.canceled)}complete(){this.state==VisitState.started&&(this.recordTimingMetric(TimingMetric.visitEnd),this.state=VisitState.completed,this.adapter.visitCompleted(this),this.delegate.visitCompleted(this),this.followRedirect())}fail(){this.state==VisitState.started&&(this.state=VisitState.failed,this.adapter.visitFailed(this))}changeHistory(){var method;this.historyChanged||(method=this.location.href===(null===(method=this.referrer)||void 0===method?void 0:method.href)?”replace”:this.action,method=this.getHistoryMethodForAction(method),this.history.update(method,this.location,this.restorationIdentifier),this.historyChanged=!0)}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new FetchRequest(this,FetchMethod.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(TimingMetric.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(statusCode=this.response){(this.response=statusCode)&&({statusCode:statusCode}=statusCode,isSuccessful(statusCode)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,statusCode))}finishRequest(){this.recordTimingMetric(TimingMetric.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode,responseHTML}=this.response;this.render(()=>__async$4(this,null,function*(){this.cacheSnapshot(),this.view.renderPromise&&(yield this.view.renderPromise),isSuccessful(statusCode)&&null!=responseHTML?(yield this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML),!1,this.willRender),this.adapter.visitRendered(this),this.complete()):(yield this.view.renderError(PageSnapshot.fromHTMLString(responseHTML)),this.adapter.visitRendered(this),this.fail())}))}}getCachedSnapshot(){const snapshot=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(snapshot&&(!getAnchor(this.location)||snapshot.hasAnchor(getAnchor(this.location)))&&(“restore”==this.action||snapshot.isPreviewable))return snapshot}getPreloadedSnapshot(){if(this.snapshotHTML)return PageSnapshot.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){const snapshot=this.getCachedSnapshot();if(snapshot){const isPreview=this.shouldIssueRequest();this.render(()=>__async$4(this,null,function*(){this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&(yield this.view.renderPromise),yield this.view.renderPage(snapshot,isPreview,this.willRender),this.adapter.visitRendered(this),isPreview||this.complete())}))}}followRedirect(){var _a;this.redirectedToLocation&&!this.followedRedirect&&null!==(_a=this.response)&&void 0!==_a&&_a.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:”replace”,response:this.response}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(()=>__async$4(this,null,function*(){this.cacheSnapshot(),this.adapter.visitRendered(this)}))}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(request,response){}requestSucceededWithResponse(request,response){return __async$4(this,null,function*(){var responseHTML=yield response.responseHTML,{redirected,statusCode}=response;null==responseHTML?this.recordResponse({statusCode:SystemStatusCode.contentTypeMismatch,redirected:redirected}):(this.redirectedToLocation=response.redirected?response.location:void 0,this.recordResponse({statusCode:statusCode,responseHTML:responseHTML,redirected:redirected}))})}requestFailedWithResponse(request,response){return __async$4(this,null,function*(){var responseHTML=yield response.responseHTML,{redirected,statusCode}=response;null==responseHTML?this.recordResponse({statusCode:SystemStatusCode.contentTypeMismatch,redirected:redirected}):this.recordResponse({statusCode:statusCode,responseHTML:responseHTML,redirected:redirected})})}requestErrored(request,error){this.recordResponse({statusCode:SystemStatusCode.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||(“restore”==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){var{scrollPosition}=this.restorationData;if(scrollPosition)return this.view.scrollToPosition(scrollPosition),!0}scrollToAnchor(){var anchor=getAnchor(this.location);if(null!=anchor)return this.view.scrollToAnchor(anchor),!0}recordTimingMetric(metric){this.timingMetrics[metric]=(new Date).getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(action){switch(action){case”replace”:return history.replaceState;case”advance”:case”restore”:return history.pushState}}hasPreloadedResponse(){return”object”==typeof this.response}shouldIssueRequest(){return!this.isSamePage&&(“restore”==this.action?!this.hasCachedSnapshot():this.willRender)}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot().then(snapshot=>snapshot&&this.visitCachedSnapshot(snapshot)),this.snapshotCached=!0)}render(callback){return __async$4(this,null,function*(){this.cancelRender(),yield new Promise(resolve=>{this.frame=requestAnimationFrame(()=>resolve())}),yield callback(),delete this.frame,this.performScroll()})}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function isSuccessful(statusCode){return 200<=statusCode&&statusCode{this.progressBar.show()},this.session=session2}visitProposedToLocation(location2,options){this.navigator.startVisit(location2,uuid(),options)}visitStarted(visit2){visit2.loadCachedSnapshot(),visit2.issueRequest(),visit2.changeHistory(),visit2.goToSamePageAnchor()}visitRequestStarted(visit2){this.progressBar.setValue(0),visit2.hasCachedSnapshot()||”restore”!=visit2.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(visit2){visit2.loadResponse()}visitRequestFailedWithStatusCode(visit2,statusCode){switch(statusCode){case SystemStatusCode.networkFailure:case SystemStatusCode.timeoutFailure:case SystemStatusCode.contentTypeMismatch:return this.reload();default:return visit2.loadResponse()}}visitRequestFinished(visit2){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(visit2){}pageInvalidated(){this.reload()}visitFailed(visit2){}visitRendered(visit2){}formSubmissionStarted(formSubmission){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(formSubmission){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(){window.location.reload()}get navigator(){return this.session.navigator}}class CacheObserver{constructor(){this.started=!1}start(){this.started||(this.started=!0,addEventListener(“turbo:before-cache”,this.removeStaleElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener(“turbo:before-cache”,this.removeStaleElements,!1))}removeStaleElements(){for(const element of[…document.querySelectorAll(‘[data-turbo-cache=”false”]’)])element.remove()}}class FormSubmitObserver{constructor(delegate){this.started=!1,this.submitCaptured=()=>{removeEventListener(“submit”,this.submitBubbled,!1),addEventListener(“submit”,this.submitBubbled,!1)},this.submitBubbled=event=>{if(!event.defaultPrevented){const form=event.target instanceof HTMLFormElement?event.target:void 0,submitter=event.submitter||void 0;form&&”dialog”!=((null===submitter||void 0===submitter?void 0:submitter.getAttribute(“formmethod”))||form.getAttribute(“method”))&&this.delegate.willSubmitForm(form,submitter)&&(event.preventDefault(),this.delegate.formSubmitted(form,submitter))}},this.delegate=delegate}start(){this.started||(addEventListener(“submit”,this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener(“submit”,this.submitCaptured,!0),this.started=!1)}}class FrameRedirector{constructor(element){this.element=element,this.linkInterceptor=new LinkInterceptor(this,element),this.formInterceptor=new FormInterceptor(this,element)}start(){this.linkInterceptor.start(),this.formInterceptor.start()}stop(){this.linkInterceptor.stop(),this.formInterceptor.stop()}shouldInterceptLinkClick(element,url){return this.shouldRedirect(element)}linkClickIntercepted(element,url){const frame=this.findFrameElement(element);frame&&frame.delegate.linkClickIntercepted(element,url)}shouldInterceptFormSubmission(element,submitter){return this.shouldSubmit(element,submitter)}formSubmissionIntercepted(element,submitter){const frame=this.findFrameElement(element,submitter);frame&&(frame.removeAttribute(“reloadable”),frame.delegate.formSubmissionIntercepted(element,submitter))}shouldSubmit(form,submitter){var action=getAction(form,submitter),rootLocation=this.element.ownerDocument.querySelector(‘meta[name=”turbo-root”]’),rootLocation=expandURL(null!==(rootLocation=null==rootLocation?void 0:rootLocation.content)&&void 0!==rootLocation?rootLocation:”/”);return this.shouldRedirect(form,submitter)&&locationIsVisitable(action,rootLocation)}shouldRedirect(element,frame){frame=this.findFrameElement(element,frame);return!!frame&&frame!=element.closest(“turbo-frame”)}findFrameElement(frame,submitter){frame=(null==submitter?void 0:submitter.getAttribute(“data-turbo-frame”))||frame.getAttribute(“data-turbo-frame”);if(frame&&”_top”!=frame){frame=this.element.querySelector(`#${frame}:not([disabled])`);if(frame instanceof FrameElement)return frame}}}class History{constructor(delegate){this.restorationIdentifier=uuid(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.onPopState=restorationIdentifier=>{this.shouldHandlePopState()&&({turbo:restorationIdentifier}=restorationIdentifier.state||{},restorationIdentifier&&(this.location=new URL(window.location.href),{restorationIdentifier:restorationIdentifier}=restorationIdentifier,this.restorationIdentifier=restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,restorationIdentifier)))},this.onPageLoad=event=>__async$4(this,null,function*(){yield function nextMicrotask(){return Promise.resolve()}(),this.pageLoaded=!0}),this.delegate=delegate}start(){this.started||(addEventListener(“popstate”,this.onPopState,!1),addEventListener(“load”,this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener(“popstate”,this.onPopState,!1),removeEventListener(“load”,this.onPageLoad,!1),this.started=!1)}push(location2,restorationIdentifier){this.update(history.pushState,location2,restorationIdentifier)}replace(location2,restorationIdentifier){this.update(history.replaceState,location2,restorationIdentifier)}update(method,location2,restorationIdentifier=uuid()){method.call(history,{turbo:{restorationIdentifier:restorationIdentifier}},””,location2.href),this.location=location2,this.restorationIdentifier=restorationIdentifier}getRestorationDataForIdentifier(restorationIdentifier){return this.restorationData[restorationIdentifier]||{}}updateRestorationData(additionalData){var{restorationIdentifier}=this,restorationData=this.restorationData[restorationIdentifier];this.restorationData[restorationIdentifier]=Object.assign(Object.assign({},restorationData),additionalData)}assumeControlOfScrollRestoration(){var _a;this.previousScrollRestoration||(this.previousScrollRestoration=null!==(_a=history.scrollRestoration)&&void 0!==_a?_a:”auto”,history.scrollRestoration=”manual”)}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||”complete”==document.readyState}}class LinkClickObserver{constructor(delegate){this.started=!1,this.clickCaptured=()=>{removeEventListener(“click”,this.clickBubbled,!1),addEventListener(“click”,this.clickBubbled,!1)},this.clickBubbled=event=>{var link,location2;this.clickEventIsSignificant(event)&&(location2=event.composedPath&&event.composedPath()[0]||event.target,(link=this.findLinkFromClickTarget(location2))&&(location2=this.getLocationForLink(link),this.delegate.willFollowLinkToLocation(link,location2)&&(event.preventDefault(),this.delegate.followedLinkToLocation(link,location2))))},this.delegate=delegate}start(){this.started||(addEventListener(“click”,this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener(“click”,this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(event){return!(event.target&&event.target.isContentEditable||event.defaultPrevented||1{var{readyState}=this;”interactive”==readyState?this.pageIsInteractive():”complete”==readyState&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=delegate}start(){this.started||(this.stage==PageStage.initial&&(this.stage=PageStage.loading),document.addEventListener(“readystatechange”,this.interpretReadyState,!1),addEventListener(“pagehide”,this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener(“readystatechange”,this.interpretReadyState,!1),removeEventListener(“pagehide”,this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==PageStage.loading&&(this.stage=PageStage.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==PageStage.interactive&&(this.stage=PageStage.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}}class ScrollObserver{constructor(delegate){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=delegate}start(){this.started||(addEventListener(“scroll”,this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener(“scroll”,this.onScroll,!1),this.started=!1)}updatePosition(position){this.delegate.scrollPositionChanged(position)}}class StreamObserver{constructor(delegate){this.sources=new Set,this.started=!1,this.inspectFetchResponse=event=>{var response=function fetchResponseFromEvent(fetchResponse){fetchResponse=null===(fetchResponse=fetchResponse.detail)||void 0===fetchResponse?void 0:fetchResponse.fetchResponse;if(fetchResponse instanceof FetchResponse)return fetchResponse}(event);response&&function fetchResponseIsStream(_a){const contentType=null!==(_a=_a.contentType)&&void 0!==_a?_a:””;return contentType.startsWith(StreamMessage.contentType)}(response)&&(event.preventDefault(),this.receiveMessageResponse(response))},this.receiveMessageEvent=event=>{this.started&&”string”==typeof event.data&&this.receiveMessageHTML(event.data)},this.delegate=delegate}start(){this.started||(this.started=!0,addEventListener(“turbo:before-fetch-response”,this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener(“turbo:before-fetch-response”,this.inspectFetchResponse,!1))}connectStreamSource(source){this.streamSourceIsConnected(source)||(this.sources.add(source),source.addEventListener(“message”,this.receiveMessageEvent,!1))}disconnectStreamSource(source){this.streamSourceIsConnected(source)&&(this.sources.delete(source),source.removeEventListener(“message”,this.receiveMessageEvent,!1))}streamSourceIsConnected(source){return this.sources.has(source)}receiveMessageResponse(response){return __async$4(this,null,function*(){var html=yield response.responseHTML;html&&this.receiveMessageHTML(html)})}receiveMessageHTML(html){this.delegate.receivedMessageFromStream(new StreamMessage(html))}}class ErrorRenderer extends Renderer{render(){return __async$4(this,null,function*(){this.replaceHeadAndBody(),this.activateScriptElements()})}replaceHeadAndBody(){const{documentElement,head,body}=document;documentElement.replaceChild(this.newHead,head),documentElement.replaceChild(this.newElement,body)}activateScriptElements(){for(const replaceableElement of this.scriptElements){const parentNode=replaceableElement.parentNode;var element;parentNode&&(element=this.createScriptElement(replaceableElement),parentNode.replaceChild(element,replaceableElement))}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return[…document.documentElement.querySelectorAll(“script”)]}}class PageRenderer extends Renderer{get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}prepareToRender(){this.mergeHead()}render(){return __async$4(this,null,function*(){this.willRender&&this.replaceBody()})}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}mergeHead(){this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()}replaceBody(){this.preservingPermanentElements(()=>{this.activateNewBody(),this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}copyNewHeadStylesheetElements(){for(const element of this.newHeadStylesheetElements)document.head.appendChild(element)}copyNewHeadScriptElements(){for(const element of this.newHeadScriptElements)document.head.appendChild(this.createScriptElement(element))}removeCurrentHeadProvisionalElements(){for(const element of this.currentHeadProvisionalElements)document.head.removeChild(element)}copyNewHeadProvisionalElements(){for(const element of this.newHeadProvisionalElements)document.head.appendChild(element)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(const inertScriptElement of this.newBodyScriptElements){var activatedScriptElement=this.createScriptElement(inertScriptElement);inertScriptElement.replaceWith(activatedScriptElement)}}assignNewBody(){document.body&&this.newElement instanceof HTMLBodyElement?document.body.replaceWith(this.newElement):document.documentElement.appendChild(this.newElement)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll(“script”)}}class SnapshotCache{constructor(size){this.keys=[],this.snapshots={},this.size=size}has(location2){return toCacheKey(location2)in this.snapshots}get(location2){if(this.has(location2)){var snapshot=this.read(location2);return this.touch(location2),snapshot}}put(location2,snapshot){return this.write(location2,snapshot),this.touch(location2),snapshot}clear(){this.snapshots={}}read(location2){return this.snapshots[toCacheKey(location2)]}write(location2,snapshot){this.snapshots[toCacheKey(location2)]=snapshot}touch(index){var key=toCacheKey(index),index=this.keys.indexOf(key);-1setTimeout(()=>resolve(),0))}();var cachedSnapshot=snapshot.clone();return this.snapshotCache.put(location2,cachedSnapshot),cachedSnapshot}})}getCachedSnapshotForLocation(location2){return this.snapshotCache.get(location2)}get snapshot(){return PageSnapshot.fromElement(this.element)}get shouldCacheSnapshot(){return this.snapshot.isCacheable}}function extendURLWithDeprecatedProperties(url){Object.defineProperties(url,deprecatedLocationPropertyDescriptors)}const deprecatedLocationPropertyDescriptors={absoluteURL:{get(){return this.toString()}}},session=new class Session{constructor(){this.navigator=new Navigator(this),this.history=new History(this),this.view=new PageView(this,document.documentElement),this.adapter=new BrowserAdapter(this),this.pageObserver=new PageObserver(this),this.cacheObserver=new CacheObserver,this.linkClickObserver=new LinkClickObserver(this),this.formSubmitObserver=new FormSubmitObserver(this),this.scrollObserver=new ScrollObserver(this),this.streamObserver=new StreamObserver(this),this.frameRedirector=new FrameRedirector(document.documentElement),this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(adapter){this.adapter=adapter}visit(location2,options={}){this.navigator.proposeVisit(expandURL(location2),options)}connectStreamSource(source){this.streamObserver.connectStreamSource(source)}disconnectStreamSource(source){this.streamObserver.disconnectStreamSource(source)}renderStreamMessage(message){document.documentElement.appendChild(StreamMessage.wrap(message).fragment)}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(delay){this.progressBarDelay=delay}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(location2,restorationIdentifier){this.enabled?this.navigator.startVisit(location2,restorationIdentifier,{action:”restore”,historyChanged:!0}):this.adapter.pageInvalidated()}scrollPositionChanged(position){this.history.updateRestorationData({scrollPosition:position})}willFollowLinkToLocation(link,location2){return this.elementDriveEnabled(link)&&locationIsVisitable(location2,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(link,location2)}followedLinkToLocation(link,location2){var action=this.getActionForLink(link);this.convertLinkWithMethodClickToFormSubmission(link)||this.visit(location2.href,{action:action})}convertLinkWithMethodClickToFormSubmission(frame){var linkMethod=frame.getAttribute(“data-turbo-method”);if(linkMethod){const form=document.createElement(“form”);form.method=linkMethod,form.action=frame.getAttribute(“href”)||”undefined”,form.hidden=!0,frame.hasAttribute(“data-turbo-confirm”)&&form.setAttribute(“data-turbo-confirm”,frame.getAttribute(“data-turbo-confirm”));frame=this.getTargetFrameForLink(frame);return frame?(form.setAttribute(“data-turbo-frame”,frame),form.addEventListener(“turbo:submit-start”,()=>form.remove())):form.addEventListener(“submit”,()=>form.remove()),document.body.appendChild(form),dispatch(“submit”,{cancelable:!0,target:form})}return!1}allowsVisitingLocationWithAction(location2,action){return this.locationWithActionIsSamePage(location2,action)||this.applicationAllowsVisitingLocation(location2)}visitProposedToLocation(location2,options){extendURLWithDeprecatedProperties(location2),this.adapter.visitProposedToLocation(location2,options)}visitStarted(visit2){extendURLWithDeprecatedProperties(visit2.location),visit2.silent||this.notifyApplicationAfterVisitingLocation(visit2.location,visit2.action)}visitCompleted(visit2){this.notifyApplicationAfterPageLoad(visit2.getTimingMetrics())}locationWithActionIsSamePage(location2,action){return this.navigator.locationWithActionIsSamePage(location2,action)}visitScrolledToSamePageLocation(oldURL,newURL){this.notifyApplicationAfterVisitingSamePageLocation(oldURL,newURL)}willSubmitForm(form,submitter){var action=getAction(form,submitter);return this.elementDriveEnabled(form)&&(!submitter||this.elementDriveEnabled(submitter))&&locationIsVisitable(expandURL(action),this.snapshot.rootLocation)}formSubmitted(form,submitter){this.navigator.submitForm(form,submitter)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(message){this.renderStreamMessage(message)}viewWillCacheSnapshot(){var _a;null!==(_a=this.navigator.currentVisit)&&void 0!==_a&&_a.silent||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element},resume){return!this.notifyApplicationBeforeRender(element,resume).defaultPrevented}viewRenderedSnapshot(snapshot,isPreview){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}viewInvalidated(){this.adapter.pageInvalidated()}frameLoaded(frame){this.notifyApplicationAfterFrameLoad(frame)}frameRendered(fetchResponse,frame){this.notifyApplicationAfterFrameRender(fetchResponse,frame)}applicationAllowsFollowingLinkToLocation(link,location2){return!this.notifyApplicationAfterClickingLinkToLocation(link,location2).defaultPrevented}applicationAllowsVisitingLocation(location2){return!this.notifyApplicationBeforeVisitingLocation(location2).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(link,location2){return dispatch(“turbo:click”,{target:link,detail:{url:location2.href},cancelable:!0})}notifyApplicationBeforeVisitingLocation(location2){return dispatch(“turbo:before-visit”,{detail:{url:location2.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(location2,action){return markAsBusy(document.documentElement),dispatch(“turbo:visit”,{detail:{url:location2.href,action:action}})}notifyApplicationBeforeCachingSnapshot(){return dispatch(“turbo:before-cache”)}notifyApplicationBeforeRender(newBody,resume){return dispatch(“turbo:before-render”,{detail:{newBody:newBody,resume:resume},cancelable:!0})}notifyApplicationAfterRender(){return dispatch(“turbo:render”)}notifyApplicationAfterPageLoad(timing={}){return clearBusyState(document.documentElement),dispatch(“turbo:load”,{detail:{url:this.location.href,timing:timing}})}notifyApplicationAfterVisitingSamePageLocation(oldURL,newURL){dispatchEvent(new HashChangeEvent(“hashchange”,{oldURL:oldURL.toString(),newURL:newURL.toString()}))}notifyApplicationAfterFrameLoad(frame){return dispatch(“turbo:frame-load”,{target:frame})}notifyApplicationAfterFrameRender(fetchResponse,frame){return dispatch(“turbo:frame-render”,{detail:{fetchResponse:fetchResponse},target:frame,cancelable:!0})}elementDriveEnabled(element){const container=null==element?void 0:element.closest(“[data-turbo]”);return this.drive?!container||”false”!=container.getAttribute(“data-turbo”):!!container&&”true”==container.getAttribute(“data-turbo”)}getActionForLink(action){action=action.getAttribute(“data-turbo-action”);return isAction(action)?action:”advance”}getTargetFrameForLink(container){var frame=container.getAttribute(“data-turbo-frame”);if(frame)return frame;container=container.closest(“turbo-frame”);return container?container.id:void 0}get snapshot(){return this.view.snapshot}};var{navigator:dfxGdprChecker}=session;function start(){session.start()}function registerAdapter(adapter){session.registerAdapter(adapter)}function visit(location2,options){session.visit(location2,options)}function connectStreamSource(source){session.connectStreamSource(source)}function disconnectStreamSource(source){session.disconnectStreamSource(source)}function renderStreamMessage(message){session.renderStreamMessage(message)}function clearCache(){session.clearCache()}function setProgressBarDelay(delay){session.setProgressBarDelay(delay)}function setConfirmMethod(confirmMethod){FormSubmission.confirmMethod=confirmMethod}var Turbo$1=Object.freeze({__proto__:null,navigator:dfxGdprChecker,session:session,PageRenderer:PageRenderer,PageSnapshot:PageSnapshot,start:start,registerAdapter:registerAdapter,visit:visit,connectStreamSource:connectStreamSource,disconnectStreamSource:disconnectStreamSource,renderStreamMessage:renderStreamMessage,clearCache:clearCache,setProgressBarDelay:setProgressBarDelay,setConfirmMethod:setConfirmMethod});class SnapshotSubstitution{constructor(element){this.visitCachedSnapshot=({element:element2})=>{var{id:_a,clone}=this;null!==(_a=element2.querySelector(“#”+_a))&&void 0!==_a&&_a.replaceWith(clone)},this.clone=element.cloneNode(!0),this.id=element.id}}function getFrameElementById(element){if(null!=element){element=document.getElementById(element);if(element instanceof FrameElement)return element}}function activateElement(element,currentURL){if(element){var src=element.getAttribute(“src”);if(null!=src&&null!=currentURL&&function urlsAreEqual(left,right){return expandURL(left).href==expandURL(right).href}(src,currentURL))throw new Error(`Matching element has a source URL which references itself`);if((element=element.ownerDocument!==document?document.importNode(element,!0):element)instanceof FrameElement)return element.connectedCallback(),element.disconnectedCallback(),element}}const StreamActions={after(){this.targetElements.forEach(e=>{var _a;return null===(_a=e.parentElement)||void 0===_a?void 0:_a.insertBefore(this.templateContent,e.nextSibling)})},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent))},before(){this.targetElements.forEach(e=>{var _a;return null===(_a=e.parentElement)||void 0===_a?void 0:_a.insertBefore(this.templateContent,e)})},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.prepend(this.templateContent))},remove(){this.targetElements.forEach(e=>e.remove())},replace(){this.targetElements.forEach(e=>e.replaceWith(this.templateContent))},update(){this.targetElements.forEach(e=>{e.innerHTML=””,e.append(this.templateContent)})}};class StreamElement extends HTMLElement{connectedCallback(){return __async$4(this,null,function*(){try{yield this.render()}catch(error){console.error(error)}finally{this.disconnect()}})}render(){return __async$4(this,null,function*(){var _a;return null!==(_a=this.renderPromise)&&void 0!==_a?_a:this.renderPromise=__async$4(this,null,function*(){this.dispatchEvent(this.beforeRenderEvent)&&(yield nextAnimationFrame(),this.performAction())})})}disconnect(){try{this.remove()}catch(_a){}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(c=>c.remove())}get duplicateChildren(){var _a;const existingChildren=this.targetElements.flatMap(e=>[…e.children]).filter(c=>!!c.id),newChildrenIds=[…null===(_a=this.templateContent)||void 0===_a?void 0:_a.children].filter(c=>!!c.id).map(c=>c.id);return existingChildren.filter(c=>newChildrenIds.includes(c.id))}get performAction(){if(this.action){var actionFunction=StreamActions[this.action];if(actionFunction)return actionFunction;this.raise(“unknown action”)}this.raise(“action attribute is missing”)}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.raise(“target or targets attribute is missing”)}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.raise(“first child element must be a element”)}get action(){return this.getAttribute(“action”)}get target(){return this.getAttribute(“target”)}get targets(){return this.getAttribute(“targets”)}raise(message){throw new Error(`${this.description}: ${message}`)}get description(){var _b;return null!==(_b=(null!==(_b=this.outerHTML.match(/]+>/))&&void 0!==_b?_b:[])[0])&&void 0!==_b?_b:””}get beforeRenderEvent(){return new CustomEvent(“turbo:before-stream-render”,{bubbles:!0,cancelable:!0})}get targetElementsById(){var element=null===(element=this.ownerDocument)||void 0===element?void 0:element.getElementById(this.target);return null!==element?[element]:[]}get targetElementsByQuery(){var elements=null===(elements=this.ownerDocument)||void 0===elements?void 0:elements.querySelectorAll(this.targets);return 0!==elements.length?Array.prototype.slice.call(elements):[]}}FrameElement.delegateConstructor=class FrameController{constructor(element){this.fetchResponseLoaded=fetchResponse=>{},this.currentFetchRequest=null,this.resolveVisitPromise=()=>{},this.connected=!1,this.hasBeenLoaded=!1,this.settingSourceURL=!1,this.element=element,this.view=new FrameView(this,this.element),this.appearanceObserver=new AppearanceObserver(this,this.element),this.linkInterceptor=new LinkInterceptor(this,this.element),this.formInterceptor=new FormInterceptor(this,this.element)}connect(){this.connected||(this.connected=!0,this.reloadable=!1,this.loadingStyle==FrameLoadingStyle.lazy&&this.appearanceObserver.start(),this.linkInterceptor.start(),this.formInterceptor.start(),this.sourceURLChanged())}disconnect(){this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.linkInterceptor.stop(),this.formInterceptor.stop())}disabledChanged(){this.loadingStyle==FrameLoadingStyle.eager&&this.loadSourceURL()}sourceURLChanged(){this.loadingStyle!=FrameLoadingStyle.eager&&!this.hasBeenLoaded||this.loadSourceURL()}loadingStyleChanged(){this.loadingStyle==FrameLoadingStyle.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}loadSourceURL(){return __async$4(this,null,function*(){if(!this.settingSourceURL&&this.enabled&&this.isActive&&(this.reloadable||this.sourceURL!=this.currentURL)){var previousURL=this.currentURL;if(this.currentURL=this.sourceURL,this.sourceURL)try{this.element.loaded=this.visit(expandURL(this.sourceURL)),this.appearanceObserver.stop(),yield this.element.loaded,this.hasBeenLoaded=!0}catch(error){throw this.currentURL=previousURL,error}}})}loadResponse(fetchResponse){return __async$4(this,null,function*(){(fetchResponse.redirected||fetchResponse.succeeded&&fetchResponse.isHTML)&&(this.sourceURL=fetchResponse.response.url);try{var body,snapshot,renderer,html=yield fetchResponse.responseHTML;html&&({body:body}=parseHTMLDocument(html),snapshot=new Snapshot(yield this.extractForeignFrameElement(body)),renderer=new FrameRenderer(this.view.snapshot,snapshot,!1,!1),this.view.renderPromise&&(yield this.view.renderPromise),yield this.view.render(renderer),session.frameRendered(fetchResponse,this.element),session.frameLoaded(this.element),this.fetchResponseLoaded(fetchResponse))}catch(error){console.error(error),this.view.invalidate()}finally{this.fetchResponseLoaded=()=>{}}})}elementAppearedInViewport(element){this.loadSourceURL()}shouldInterceptLinkClick(element,url){return!element.hasAttribute(“data-turbo-method”)&&this.shouldInterceptNavigation(element)}linkClickIntercepted(element,url){this.reloadable=!0,this.navigateFrame(element,url)}shouldInterceptFormSubmission(element,submitter){return this.shouldInterceptNavigation(element,submitter)}formSubmissionIntercepted(element,fetchRequest){this.formSubmission&&this.formSubmission.stop(),this.reloadable=!1,this.formSubmission=new FormSubmission(this,element,fetchRequest);var{fetchRequest}=this.formSubmission;this.prepareHeadersForRequest(fetchRequest.headers,fetchRequest),this.formSubmission.start()}prepareHeadersForRequest(headers,request){headers[“Turbo-Frame”]=this.id}requestStarted(request){markAsBusy(this.element)}requestPreventedHandlingResponse(request,response){this.resolveVisitPromise()}requestSucceededWithResponse(request,response){return __async$4(this,null,function*(){yield this.loadResponse(response),this.resolveVisitPromise()})}requestFailedWithResponse(request,response){console.error(response),this.resolveVisitPromise()}requestErrored(request,error){console.error(error),this.resolveVisitPromise()}requestFinished(request){clearBusyState(this.element)}formSubmissionStarted({formElement}){markAsBusy(formElement,this.findFrameElement(formElement))}formSubmissionSucceededWithResponse(formSubmission,response){const frame=this.findFrameElement(formSubmission.formElement,formSubmission.submitter);this.proposeVisitIfNavigatedWithAction(frame,formSubmission.formElement,formSubmission.submitter),frame.delegate.loadResponse(response)}formSubmissionFailedWithResponse(formSubmission,fetchResponse){this.element.delegate.loadResponse(fetchResponse)}formSubmissionErrored(formSubmission,error){console.error(error)}formSubmissionFinished({formElement}){clearBusyState(formElement,this.findFrameElement(formElement))}allowsImmediateRender(snapshot,resume){return!0}viewRenderedSnapshot(snapshot,isPreview){}viewInvalidated(){}visit(url){return __async$4(this,null,function*(){var _a;const request=new FetchRequest(this,FetchMethod.get,url,new URLSearchParams,this.element);return null!==(_a=this.currentFetchRequest)&&void 0!==_a&&_a.cancel(),this.currentFetchRequest=request,new Promise(resolve=>{this.resolveVisitPromise=()=>{this.resolveVisitPromise=()=>{},this.currentFetchRequest=null,resolve()},request.perform()})})}navigateFrame(element,url,submitter){const frame=this.findFrameElement(element,submitter);this.proposeVisitIfNavigatedWithAction(frame,element,submitter),frame.setAttribute(“reloadable”,””),frame.src=url}proposeVisitIfNavigatedWithAction(frame,element,submitter){const action=getAttribute(“data-turbo-action”,submitter,element,frame);if(isAction(action)){const{visitCachedSnapshot}=new SnapshotSubstitution(frame);frame.delegate.fetchResponseLoaded=response=>{var statusCode;frame.src&&({statusCode:statusCode,redirected:response}=response,response={statusCode:statusCode,redirected:response,responseHTML:frame.ownerDocument.documentElement.outerHTML},session.visit(frame.src,{action:action,response:response,visitCachedSnapshot:visitCachedSnapshot,willRender:!1}))}}}findFrameElement(_a,submitter){return null!==(_a=getFrameElementById(getAttribute(“data-turbo-frame”,submitter,_a)||this.element.getAttribute(“target”)))&&void 0!==_a?_a:this.element}extractForeignFrameElement(container){return __async$4(this,null,function*(){let element;var id=CSS.escape(this.id);try{if(element=activateElement(container.querySelector(`turbo-frame#${id}`),this.currentURL))return element;if(element=activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`),this.currentURL))return yield element.loaded,yield this.extractForeignFrameElement(element);console.error(`Response has no matching element`)}catch(error){console.error(error)}return new FrameElement})}formActionIsVisitable(form,submitter){return locationIsVisitable(expandURL(getAction(form,submitter)),this.rootLocation)}shouldInterceptNavigation(element,submitter){var frameElement=getAttribute(“data-turbo-frame”,submitter,element)||this.element.getAttribute(“target”);if(element instanceof HTMLFormElement&&!this.formActionIsVisitable(element,submitter))return!1;if(!this.enabled||”_top”==frameElement)return!1;if(frameElement){frameElement=getFrameElementById(frameElement);if(frameElement)return!frameElement.disabled}return!!session.elementDriveEnabled(element)&&!(submitter&&!session.elementDriveEnabled(submitter))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}get reloadable(){const frame=this.findFrameElement(this.element);return frame.hasAttribute(“reloadable”)}set reloadable(value){const frame=this.findFrameElement(this.element);value?frame.setAttribute(“reloadable”,””):frame.removeAttribute(“reloadable”)}set sourceURL(sourceURL){this.settingSourceURL=!0,this.element.src=null!=sourceURL?sourceURL:null,this.currentURL=this.element.src,this.settingSourceURL=!1}get loadingStyle(){return this.element.loading}get isLoading(){return void 0!==this.formSubmission||void 0!==this.resolveVisitPromise()}get isActive(){return this.element.isActive&&this.connected}get rootLocation(){var _a=this.element.ownerDocument.querySelector(‘meta[name=”turbo-root”]’);return expandURL(null!==(_a=null==_a?void 0:_a.content)&&void 0!==_a?_a:”/”)}},customElements.define(“turbo-frame”,FrameElement),customElements.define(“turbo-stream”,StreamElement),(()=>{let element=document.currentScript;if(element&&!element.hasAttribute(“data-turbo-suppress-warning”))for(;element=element.parentElement;)if(element==document.body)return console.warn(unindent`
You are loading Turbo from a element inside the element. This is probably not what you meant to do!
Load your application’s JavaScript bundle inside the element instead. elements in are evaluated with each page change.
For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements
——
Suppress this warning by adding a “data-turbo-suppress-warning” attribute to: %s
`,element.outerHTML)})(),window.Turbo=Turbo$1,start();Turbo$1=Object.freeze({__proto__:null,PageRenderer:PageRenderer,PageSnapshot:PageSnapshot,clearCache:clearCache,connectStreamSource:connectStreamSource,disconnectStreamSource:disconnectStreamSource,navigator:dfxGdprChecker,registerAdapter:registerAdapter,renderStreamMessage:renderStreamMessage,session:session,setConfirmMethod:setConfirmMethod,setProgressBarDelay:setProgressBarDelay,start:start,visit:visit});function createSingleton(removeOnTurboVisit=!1){return function(target,name,descriptor){const original=descriptor.value;return descriptor.value=(…result)=>{var _a;window.DFX_SINGLETONS=null!=(_a=window.DFX_SINGLETONS)?_a:{};const instanceId=`${target.prototype.constructor.name}:${name}`;if(removeOnTurboVisit){const turboCallback=()=>{window.DFX_SINGLETONS[instanceId]&&(window.DFX_SINGLETONS[instanceId]=null),document.removeEventListener(“turbo:visit”,turboCallback)};document.addEventListener(“turbo:visit”,turboCallback)}if(window.DFX_SINGLETONS[instanceId])return window.DFX_SINGLETONS[instanceId];result=original.apply(this,result);return Object.defineProperty(window.DFX_SINGLETONS,instanceId,{value:result,writable:!0}),result},descriptor}}class DfxLocalStorageCookieManager{constructor(localStorage){this.localStorage=localStorage,this.localStorage=localStorage;try{this.localStorage.setItem(“test”,”test”),this.localStorage.removeItem(“test”),this.isLocalStorageAvailable=!0}catch(e){this.isLocalStorageAvailable=!1}}getCookie(matches){if(matches){matches=document.cookie.match(new RegExp(`(?:^|; )${matches.replace(/([.$?*|{}()[]/+^])/g,”$1″)}=([^;]*)`));return matches?decodeURIComponent(matches[1]):void 0}}setCookie(name,value,expires,domain,secure=!0){let cookieString=`${name}=${value}`;”string”==typeof expires&&(cookieString+=`;expires=${expires}`),”string”==typeof domain&&(cookieString+=`;domain=${domain}`),cookieString+=”; path=/”,secure&&”https:”===location.protocol&&(cookieString+=”; secure”),document.cookie=cookieString}deleteCookie(name){this.setCookie(name,””,”Thu, 01 Jan 1970 00:00:00 UTC”)}getLocalStorageOrCookie(name){var _a;return this.isLocalStorageAvailable&&null!=(_a=this.localStorage.getItem(name))?_a:this.getCookie(name)}setLocalStorageOrCookie(name,value,expires,domain){this.isLocalStorageAvailable?this.localStorage.setItem(name,value):this.setCookie(name,value,expires,domain)}deleteLocalStorageOrCookie(name){this.isLocalStorageAvailable?this.localStorage.removeItem(name):this.deleteCookie(name)}}var __defProp$5=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor;class DfxLocalStorageCookieManagerFactory{static create(){return new DfxLocalStorageCookieManager(window.localStorage)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$5(target,key):target,i=decorators.length-1;0=level}normalizeValue(value){let intValue=parseInt(value);return isNaN(intValue)&&(intValue=3),intValue}}var __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor;class DfxGdprCheckerFactory{static create(){return new DfxGdprChecker(DfxLocalStorageCookieManagerFactory.create())}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$4(target,key):target,i=decorators.length-1;0new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});const COUNTRIES_TO_REPLACE_MAP=new Map([[“GB”,”UK”]]);class DfxGeoLocation{constructor(geoJsUrl,dfxLocalStorageCookieManager){this.geoJsUrl=geoJsUrl,this.dfxLocalStorageCookieManager=dfxLocalStorageCookieManager}init(){return __async$3(this,null,function*(){const redirectData=yield this.getRedirectData();COUNTRIES_TO_REPLACE_MAP.has(redirectData.country)&&(redirectData.country=COUNTRIES_TO_REPLACE_MAP.get(redirectData.country)),this.redirectData=redirectData,this.setBodyClasses().setLocationToStorage()})}getRedirectData(){return __async$3(this,null,function*(){if(this.redirectData)return this.redirectData;var redirectData=this.getLocationFromStorage();return redirectData?(this.redirectData=redirectData,this.redirectData):this.loadRedirectData()})}loadRedirectData(){return new Promise(resolve=>{const script=document.createElement(“script”);script.onload=()=>{this.redirectData=window.redirectData,resolve(this.redirectData)},script.setAttribute(“src”,this.geoJsUrl),document.head.appendChild(script)})}setBodyClasses(){const countryCode=this.redirectData.country.toLowerCase();return document.body?(document.body.classList.remove(“dfx-country-pending”),document.body.classList.add(`dfx-country-${countryCode}`)):document.addEventListener(“DOMContentLoaded”,()=>{document.body.classList.remove(“dfx-country-pending”),document.body.classList.add(`dfx-country-${countryCode}`)},!1),this}getLocationFromStorage(){var _a=this.dfxLocalStorageCookieManager.getLocalStorageOrCookie(“dfx-redirectData_expiresIn”);return!!(_a&&parseInt(_a)>Date.now())&&JSON.parse(null!=(_a=this.dfxLocalStorageCookieManager.getLocalStorageOrCookie(“dfx-redirectData”))?_a:”false”)}setLocationToStorage(){const date=new Date;return date.setTime(date.getTime()+6048e5),this.dfxLocalStorageCookieManager.setLocalStorageOrCookie(“dfx-redirectData”,JSON.stringify(this.redirectData),date.toUTCString()),this.dfxLocalStorageCookieManager.setLocalStorageOrCookie(“dfx-redirectData_expiresIn”,`${date.getTime()}`,date.toUTCString()),this}}var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor;class DfxGeoLocationFactory{static create(){return new DfxGeoLocation(window.DFX_ENDPOINTS.geoJs,DfxLocalStorageCookieManagerFactory.create())}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1;0{$(“head script”).filter((_i,el)=>el.src.includes(config.mainReportSuite)||el.src.includes(config.reportSuite)).remove(),this.adobeTrackingState=STATES.OFF,this._resetAssetClasses()._resetInstruments()._resetCategories()._resetSitecatConfig()}),document.addEventListener(“turbo:before-render”,event=>{this.dfxAdobeTracking&&this.dfxAdobeTracking.refreshIframe(event.detail.newBody)})}_setDefaultStates(){return this.adobeTrackingState=STATES.OFF,this.baiduState=STATES.OFF,this.pixelState=STATES.OFF,this.gptState=STATES.OFF,this.gtmState=STATES.OFF,this.taboolaState=STATES.OFF,this}_resetInstruments(){return this.gptInstrumentPairs=new Set,this}_resetCategories(){return this.gptCategories={category:””,subCategory:””},this}_resetAssetClasses(){return this.gptAssetClasses=new Set,this}_resetSitecatConfig(){return this.sitecatConfig={mainReportSuite:this.config.mainReportSuite,reportSuite:this.config.reportSuite,organisationId:this.config.organisationId},this}createAdobeTracking(adobeTrackingUrl){return __this=this,__arguments=null,generator=function*(){if(this.dfxGdprChecker.checkLevel(2)&&this.allowedTrackingsConfig[TRACKINGS.ADOBE_TRACKING]&&this.adobeTrackingState===STATES.OFF){this.adobeTrackingState=STATES.LOADING;const{DfxAdobeTracking}=yield window.System.import(adobeTrackingUrl);this.dfxAdobeTracking=new DfxAdobeTracking(this.sitecatConfig,this.dfxGdprChecker,this.dfxLocalStorageCookieManager),this.adobeTrackingState=STATES.READY,this.runAdobeTracking()}},new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});var __this,__arguments,generator}runAdobeTracking(){this.dfxGdprChecker.checkLevel(2)&&(this.adobeTrackingState===STATES.READY?(this.dfxAdobeTracking.resetTrackingObject(),this.dfxAdobeTracking.init()):setTimeout(()=>this.runAdobeTracking(),400))}trackAdobeEvent(eventName,message,metrics){return this.dfxGdprChecker.checkLevel(2)&&this.allowedTrackingsConfig[TRACKINGS.ADOBE_TRACKING]&&(this.adobeTrackingState===STATES.READY?this.dfxAdobeTracking.trackEvent(eventName,message,metrics):setTimeout(()=>this.trackAdobeEvent(eventName,message,metrics),400)),this}getPageNameForAdobeTracking(){return this.adobeTrackingState===STATES.READY&&this.dfxAdobeTracking.getPageName()}addSitecatConfig(key,value){return this.dfxGdprChecker.checkLevel(2)&&(this.sitecatConfig[key]=value),this}createFacebookPixel(){if(!this.dfxGdprChecker.checkLevel(3))return this;if(!this.allowedTrackingsConfig[TRACKINGS.FACEBOOK_PIXEL]||this.pixelState!==STATES.OFF)return this;this.pixelState=STATES.LOADING;var loadCallback,b,n,t,s;return loadCallback=()=>{this.pixelState=STATES.READY},t=window,b=document,s=”script”,t.fbq||(n=t.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)},t._fbq||(t._fbq=n),(n.push=n).loaded=!0,n.version=”2.0″,n.queue=[],(t=b.createElement(s)).async=!0,t.onload=loadCallback,t.src=”https://connect.facebook.net/en_US/fbevents.js”,(s=b.getElementsByTagName(s)[0]).parentNode.insertBefore(t,s)),this.fbq=window.fbq,this.fbq(“init”,this.facebookPixelId),this}facebookPixelTrack(type){return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig[TRACKINGS.FACEBOOK_PIXEL]&&(this.pixelState===STATES.OFF&&this.createFacebookPixel(),this.fbq(“track”,type)),this}facebookPixelTrackPageView(){return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“PageView”),this}facebookPixelTrackLead(){return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“Lead”),this}createGTM(){if(!this.dfxGdprChecker.checkLevel(1))return this;if(!this.allowedTrackingsConfig[TRACKINGS.GTM]||this.gtmState!==STATES.OFF)return this;this.gtmState=STATES.LOADING;const scriptOnload=()=>{this.gtmState=STATES.READY};return function(w,d,s,l,i,p){w[l]=w[l]||[],w[l].push({“gtm.start”:(new Date).getTime(),event:”gtm.js”});const f=d.getElementsByTagName(s)[0],j=d.createElement(s);j.async=!0,j.src=”https://www.googletagmanager.com/gtm.js?id=”+i+p,j.onload=scriptOnload,f.parentNode.insertBefore(j,f)}(window,document,”script”,”dataLayer”,this.tagManagerId,this.tagManagerParams),this}createGPT(){if(!this.dfxGdprChecker.checkLevel(1))return this;if(!this.allowedTrackingsConfig[TRACKINGS.GPT]||this.gptState!==STATES.OFF)return this;this.gptState=STATES.LOADING;const scriptOnload=()=>{this.gptState=STATES.READY};var googletag=window.googletag||{cmd:[]};return function(){const gads=document.createElement(“script”);gads.async=!0,gads.type=”text/javascript”;var useSSL=”https:”===document.location.protocol;gads.src=(useSSL?”https:”:”http:”)+”//www.googletagservices.com/tag/js/gpt.js”,gads.onload=scriptOnload;const node=document.getElementsByTagName(“script”)[0];node.parentNode.insertBefore(gads,node)}(),window.googletag=window.googletag||googletag,this}trackGTMpageLoadEvent(){return this.dfxGdprChecker.checkLevel(1)&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:”turboPageView”,virtualUrl:window.location.pathname})),this}createBaiduTracking(){return this.dfxGdprChecker.checkLevel(2)&&this.allowedTrackingsConfig[TRACKINGS.BAIDU]&&this.baiduState!==STATES.READY&&(function(){const hm=document.createElement(“script”);hm.src=”https://hm.baidu.com/hm.js?961aa7f85d30d676f24a6f928c035b90″;const s=document.getElementsByTagName(“script”)[0];s.parentNode.insertBefore(hm,s)}(),function(){const bp=document.createElement(“script”);var curProtocol=window.location.protocol.split(“:”)[0];bp.src=”https”===curProtocol?”https://zz.bdstatic.com/linksubmit/push.js”:”http://push.zhanzhang.baidu.com/push.js”;const s=document.getElementsByTagName(“script”)[0];s.parentNode.insertBefore(bp,s)}(),this.baiduState=STATES.READY),this}addGptAssetClasses(assetClasses){if(!Array.isArray(assetClasses))throw new TypeError(“Param assetClasses must be an Array”);return assetClasses.forEach(assetClass=>this.gptAssetClasses.add(assetClass)),this}addGptInstrumentPairs(pairs){if(!Array.isArray(pairs))throw new TypeError(“Param pairs must be an Array”);return pairs.forEach(assetClass=>this.gptInstrumentPairs.add(assetClass)),this}addGptCategories(category=””,subCategory=””){this.gptCategories={category:category,subCategory:subCategory}}getGptAssetClasses(){return this.gptAssetClasses}getGptInstrumentPairs(){return this.gptInstrumentPairs}getGptCategory(){return this.gptCategories.category}getGptSubCategory(){return this.gptCategories.subCategory}createTaboolaPixel(){if(!this.dfxGdprChecker.checkLevel(3))return this;if(!this.allowedTrackingsConfig[TRACKINGS.TABOOLA_PIXEL]||this.taboolaState!==STATES.OFF)return this;this.taboolaState=STATES.LOADING;const scriptOnload=()=>{this.taboolaState=STATES.READY};var t,f,x;return window._tfa=window._tfa||[],window._tfa.push({notify:”event”,name:”page_view”,id:this.taboolaPixelId}),this.tfa=window._tfa,t=document.createElement(“script”),f=document.getElementsByTagName(“script”)[0],x=”tb_tfa_script”,document.getElementById(x)||(t.async=1,t.src=”https://cdn.taboola.com/libtrc/unip/1350268/tfa.js”,t.id=x,t.onload=scriptOnload,f.parentNode.insertBefore(t,f)),this}taboolaPixelTrack(eventName){return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig[TRACKINGS.TABOOLA_PIXEL]&&(this.pixelState===STATES.OFF&&this.createTaboolaPixel(),this.tfa.push({notify:”event”,name:eventName,id:this.taboolaPixelId})),this}}class DfxConfig{constructor(config){this.config=config}get(key){return this.config.get(key)}set(key,value){this.config.has(key)||this.config.set(key,value)}}var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor;class DfxConfigFactory{static create(){var data=Object.assign({},window.DFX_CONFIG,window.DFX_ENDPOINTS),data=new Map(Object.entries(data));return new DfxConfig(data)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1;0{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1;0{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())});var __this,__arguments,generator}}var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor;class DfxFontsFactory{static create(){return new DfxFonts(document)}}((decorators,target,key,kind)=>{for(var decorator,result=1<kind?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1;0((__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}))(window,null,function*(){try{const noscript=document.querySelector(“noscript.jsdfx-script”);if(!noscript)return;const imports=yield window.System.import(noscript.getAttribute(“data-src”));Object.keys(imports).forEach(key=>{window[key]=imports[key]}),window.runStacked()}catch(error){console.error(error)}});document.addEventListener(“turbo:load”,()=>loadScripts()),window.performance.mark=window.performance.mark||function(){},window.performance.measure=window.performance.measure||function(){},window.turbo=Turbo$1,start(),DfxGeoLocationFactory.create().init(),exports.DfxGdprChecker=dfxGdprChecker,exports.DfxGdprCheckerFactory=DfxGdprCheckerFactory,exports.DfxGeoLocationFactory=DfxGeoLocationFactory,exports.DfxThirdPartyManagerFactory=DfxThirdPartyManagerFactory,Object.defineProperty(exports,”__esModule”,{value:!0})}(this.window=this.window||{});



Source link

Continue Reading

Forex

Events to Look Out for Next Week

Published

on






  • ISM Manufacturing PMI (USD, GMT 14:00) – The ISM index is expected to fall to 55.5 after a rebound to 56.1 in May from a 2-year low of 55.4 in April, versus an 18-year high of 63.7 in March ’21, an 11-year low of 41.6 in April of 2020, and an all-time low of 30.3 in June of 1980.

Click here to access our Economic Calendar

Andria Pichidi

Market Analyst

Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in Leveraged Products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.






Previous articleEURCHF set to clear 1.01?
Next articleWeekly wrap up! – 24 June 2022

Having completed her five-year-long studies in the UK, Andria Pichidi has been awarded a BSc in Mathematics and Physics from the University of Bath and a MSc degree in Mathematics, while she holds a postgraduate diploma (PGdip) in Actuarial Science from the University of Leicester.




Source link

Continue Reading
Advertisement
Personal Finance38 seconds ago

Elmer’s Liquid School Glue (12 count) only $6.60 shipped!

Economy14 mins ago

The First Global Credit Crisis

NFT21 mins ago

The Music NFT Show: Podcast Episode 8

Metaverse24 mins ago

Recently ‘Metawhale World’ has announced launch of World’s First NFT Museum in Metaverse

Real Estate35 mins ago

Little Diversified Architectural Consulting, LS3P among Charlotte's largest architecture firms

Opinion43 mins ago

SOS Opinion | Online vs. Face to Face Networking Events, with Derek Maltby of Global MSC Security

Markets45 mins ago

Jim Cramer breaks down Tuesday's market action and earnings news

Tech1 hour ago

LG buys its way into the EV charging business

NFT1 hour ago

DJ Whoo Kid Partners with NFT Drop LLC to Launch Metaverse Wearables

Metaverse1 hour ago

iClick Interactive Releases Metaverse Livestreaming Mobile App Arohar

Real Estate2 hours ago

Cold case: The FBI might be lobbying to stay in D.C., but failing Hoover Building presents complications

Opinion2 hours ago

PUBLIC OPINION- PATRONIZING MINORITY OWNED BUSINESSES?

Markets2 hours ago

This kind of rally is so endemic to a bear market: Renaissance Macro's Jeff deGraaf

Tech2 hours ago

Apple’s entry-level MacBook Pro M2 has slower SSD speeds than its M1 counterpart

NFT2 hours ago

Ledger to Build its Own NFT Marketplace and Web3 Services Platform

Metaverse2 hours ago

Infosec leaders decode new workspace opportunities in Metaverse – Back End News

Opinion3 hours ago

Abstinence; let's talk about it | The Unpopular Opinion

Markets3 hours ago

Jim Cramer: Oil is suddenly in a bear market

Tech3 hours ago

Apple’s entry-level 13-inch MacBook Pro M2 may have slower SSD speeds than the M1 model

NFT3 hours ago

The Inaugural Historical NFT Collection From TheInfiniteDrop

NFT2 weeks ago

Unity and Gala Games Join Forces to Build the VOXverse

Tech2 weeks ago

FAA wants dozens of changes before SpaceX expands Texas launch site

Opinion2 weeks ago

Electric switchboard manufacturer Expert Opinion | Best Plastic manufacturing business Idea

Opinion2 weeks ago

SOS Opinion | A fresh offering to the market

Metaverse2 weeks ago

REALM Metaverse Gaming to Launch Mobile Beta App on June 21 By CoinQuora

Metaverse2 weeks ago

KaraStar: A Metaverse Game with Specific Benefits For New Users

Metaverse2 weeks ago

L’Oréal’s Chief Digital Officer on Web3, the Metaverse – WWD

Tech2 weeks ago

Blizzard claims it won’t monetize ‘Diablo IV’ like ‘Diablo Immortal’

Economy2 weeks ago

Echoes of 1970s for UK economy

Metaverse2 weeks ago

Podcast: What does worship feel like in the Metaverse?

Metaverse2 weeks ago

Here’s a Complete Guide to Investing in the Metaverse

Tech2 weeks ago

Resident Evil Village Winters’ Expansion arrives on October 28th

Bitcoin2 weeks ago

The CFTC’s action against Gemini is bad news for Bitcoin ETFs

Economy2 weeks ago

FirstFT: The yen continues descent to 24-year low

Metaverse2 weeks ago

ISG Launches Advisory Business to Help Clients Explore and Prepare for Web3, Metaverse Opportunities

Economy2 weeks ago

UK job vacancies at record high despite stalling economy

Opinion2 weeks ago

MAD Armut & Mac Opinion On FNC vs G2 | LEC Post Game Lobby Interview

Tech2 weeks ago

Sony would love if you bought its $3,700 Walkman for over-the-top audiophiles

Real Estate2 weeks ago

After over a year of delays, $140M Bremerton project nears completion

NFT2 weeks ago

Upcoming Christie’s NFT Auction to Help Scientific Psychedelic Research

Trending

0