25.7 C
Singapore
HomeForex NewsUS Greenback Worth Motion Setups: EUR/USD, GBP/USD, USD/CAD, USD/JPY

US Greenback Worth Motion Setups: EUR/USD, GBP/USD, USD/CAD, USD/JPY


US Greenback Speaking Factors:

  • It was a busy week throughout markets with latter-portion of the interval bringing some giant strikes throughout equities and FX markets.
  • The US Dollar broke-out to a fresh 20-year-high earlier this week however has since begun to pullback on the heels of yesterday’s ECB rate resolution. The transfer was not clear-cut, because the preliminary response to the ECB was a pullback to assist. However, that assist held and led to a big rally in a single day that’s helped to drag the US Dollar again under the 110.00 deal with.
  • The subsequent two weeks round US markets might be very busy: The Fed goes into the blackout interval on Saturday. CPI is launched on Wednesday and there’s a big choice expiry on Friday. The week after brings the September FOMC price resolution with excessive expectations for a 75 bp hike.
  • The evaluation contained in article depends on price action and chart formations. To study extra about worth motion or chart patterns, take a look at our DailyFX Education part.

Recommended by James Stanley

Download our US Dollar Forecast

The US Greenback has snapped again after yesterday’s European Central Financial institution price resolution.

There was a delayed response within the Euro however as I had highlighted in the Euro Price Action article yesterday, assist had held to this point at an necessary spot on the chart, taken from round a previous resistance trendline that was beginning to set-in as assist. That resistance was a part of a falling wedge formation, typically approached with the intention of bullish reversals.

And given the realm on the chart the place that formation had constructed, proper across the parity psychological level, it made sense that this might preserve the door open for a pullback within the bearish transfer and given how lengthy that short-side theme has been operating, that pullback might presumably run for a bit.

For the way lengthy? Nicely, that’s probably going to be decided by basic headwinds. Darkish clouds stay over Europe which will disallow any prolonged tendencies, except there’s some assist from the US facet of the equation, or no less than the notion of such, given the FOMC’s hawkish plans. Level clean, the ECB doesn’t seem to have as a lot firepower obtainable because the Fed. Inflation stays far-elevated and problematic in each economies however, in Europe, there’s additionally the potential for an vitality disaster and progress stays much more subdued, thereby limiting how hawkish the ECB may very well have the ability to get.

After which there’s the risk behind the matter – as continued weak spot in EUR/USD might spell much more inflation for Europe, regardless of any price hikes. Because of this usually talking the specified route for currencies is stability and after we don’t have that on the earth’s largest FX markets, there’s quite a lot of alternative for collateral harm.

USD

It was a story of two tendencies within the Greenback this week as profound power within the early-portion of the week led to a pullback within the latter-portion. However – curiously, not like latest USD breakouts – this transfer was not fueled largely by the Euro. EUR/USD dawdled at assist round that parity determine for a lot of the week – with aggressive tendencies of weak spot displaying in each the Yen and British Pound, which I’ll look into under.

In USD, the 110 deal with was crossed this week for the primary time since 2002. Wednesday marked the excessive however a bearish engulfing candlestick on the day by day chart led to bearish momentum that’s continued to date by means of Friday commerce. The prior resistance stage at 109.14-109.27 notably held two resistance advances however, as but, hasn’t proven a lot for assist.

US Greenback Day by day Chart

USD daily chart

Chart ready by James Stanley; USD, DXY on Tradingview

US Greenback Shorter-Time period

The USD has set each a lower-low and lower-high on a shorter-term foundation and this can be highlighting deeper pullback potential. For that collection of bearish worth behaviors to be invalidated we’ll must see worth break that chain however, for proper now, there’s resistance potential round that key spot that sits from 109.14-109.27. Above that the 110 psychological stage comes again into play and breach back-above that may spotlight the potential of invalidation of the bearish theme.

Recommended by James Stanley

Traits of Successful Traders

US Greenback Two-Hour Chart

usd two hour chart

Chart ready by James Stanley; USD, DXY on Tradingview

EUR/USD

I’ve looked into this from a few different angles over the previous couple of weeks and this appears a superb alternative to spotlight an necessary truth.

One will be bearish on the massive image development however nonetheless entertain bullish setups alongside the way in which. And the rationale for that’s that no tendencies transfer in straight strains. It’s befuddling to me that merely mentioning a bullish setup, in anticipation of a counter-trend transfer, will be extensively misconstrued as a much bigger image bullish bias.

My view on EUR/USD is {that a} stage like parity ought to take a while to offer approach. That’s what occurred when worth broke above that stage in 2002 when it took about six months for a robust EUR/USD development to lastly depart parity within the rearview. And this actually speaks to the power of psychological levels and the significance of the EUR/USD spot price to world economies – not simply markets. Psychological ranges are sometimes drivers of human behaviors – and a worth like .9999 will typically really feel less expensive than simply two pips under 1.0001.

Living proof – virtually each retail operation that I’ve ever encountered units costs that finish in .99. It’s as a result of it makes the product appear cheaper to the patron! Nicely, the identical factor occurs in markets and in 2002, EUR/USD at 1.0001 felt far more costly than simply two pips above .9999, and that notion impacts market behaviors which then impacts worth motion.

If EUR/USD was to decisively lower by means of parity right here with solely a minimal of stall – I’d be fearful. Not only for the EUR/USD market however for the repercussions which will observe or be implied by such a violent transfer. As a substitute and what I feel could be the best situation, could be a sluggish breach of the extent, equivalent to we noticed in 2002, the place there was grindy worth motion met with pullbacks as longer-term shorts obtained squeezed and positioning grew to become much less bearish – in order that finally that bigger-picture development can proceed – similar to we noticed in 2002 going within the different path.

EUR/USD Day by day Chart

eurusd daily chart

Chart ready by James Stanley; EURUSD on Tradingview

The one downside is that the scenario round Europe has been so dire that any bullish tendencies have had a really troublesome time discovering continuation – even short-squeeze eventualities, which have merely been alternatives for bears to set off recent shorts.

The query now could be whether or not the ECB’s latest actions might have modified that dynamic a bit, and from short-term charts, we will see EUR/USD making an attempt to string collectively a bullish development. A maintain above parity might preserve this door open, which might permit for a higher-low above yesterday’s inflection across the .9950 stage.

EUR/USD Two-Hour Worth Chart

eurusd two hour charts

Chart ready by James Stanley; EURUSD on Tradingview

GBP/USD

It was a threatening technique to begin the week for Cable and the pair shortly set a recent 37-year-low. However -that’s since turned out to be some extent of assist and patrons are equally pushing-higher right here, making an attempt to provide a stronger pullback within the bearish development.

The degrees that I checked out within the Wednesday installment of USD Price Action Setups stays in-play. Worth has discovered resistance simply within the 1.1650 stage, which assist displaying round a previous worth motion swing. The 1.1500 stage stays an enormous space of curiosity and if worth does fall by means of short-term assist at 1.1560, then 1.1500 comes into play as a spot of doable assist.

For subsequent resistance – which might re-open the door for longer-term bearish eventualities, there’s potential at 1.1700 and the psychological stage at 1.1750.

Recommended by James Stanley

Get Your Free GBP Forecast

GBP/USD Two-Hour Worth Chart

gbpusd two hour chart

Chart ready by James Stanley; GBPUSD on Tradingview

USD/CAD

There was additionally a price hike out of Canada this week because the BoC hiked by 75 bps. The preliminary response was one among weak spot because the pair made a robust push in direction of the yearly excessive – however ended up falling quick as bulls slowed the method earlier than that stage at 1.3224 might come into the image.

As I had highlighted on Wednesday – there’s been some significant divergence between USD and USD/CAD trends, which might preserve USD/CAD as a sexy choice for bearish USD performs.

Given this week’s price action that bearish theme isn’t fairly there but as worth stays above key assist across the 1.3000 psychological stage – however the truth that bulls didn’t push the breakout might be a optimistic signal for a short-side theme that could be across the nook.

From the weekly chart under we will see that support from prior resistance in motion, at the moment serving to to carry the weekly bar lows. That’s additionally confluent with a mid-point of a bullish channel, which makes up a bear flag formation. So, it is a massive spot on the chart and if sellers can evoke a push, the bearish facet of the matter can quickly turn into enticing once more. However, for proper now, we’ve assist at prior resistance.

Recommended by James Stanley

Building Confidence in Trading

USD/CAD Weekly Worth Chart

usdcad weekly price chart

Chart ready by James Stanley; USDCAD on Tradingview

USD/JPY

Feast after which famine for USD/JPY bulls, as the week started with a massive breakout that’s since seen about 50% of that weekly leap erased.

With a transfer this built-in on the premise of expectations for the BoJ to proceed pumping, even the slightest trace of change may end up in a pullback. The upper the development runs and the longer it goes – the jumpier bulls are as a result of as soon as it turns – properly that exit is just so huge. And because of this tendencies equivalent to we’ve seen in USD/JPY typically observe the ‘up the steps, down the elevator’ logic.

USD/JPY took place one pip away from the 145.00 psychological stage on Wednesday morning earlier than pulling again. And then given some grumblings around the matter overnight, as covered by our own Richard Snow, that worry of change has come into the image, and that’s introduced on the ‘down the elevator’ kind of transfer.

At this stage, worth motion is holding across the 50% marker of the latest breakout off of the 140.00 stage. Close to-term worth motion remains to be displaying lower-lows and lower-highs from the two-hour chart, nonetheless, so there’s no proof but that the pullback is nearing conclusion. Taking place even shorter-term might carry some hope to that image, which I’ll take a look at in a second.

USD/JPY Two-Hour Worth Chart

usdjpy two hour chart

Chart ready by James Stanley; USDJPY on Tradingview

USD/JPY Very Brief-Time period

That is Friday worth motion however from shorter-term charts, there could also be an ongoing try from bulls to carry the bullish development again. Worth is at the moment making an attempt to carry assist across the 50% retracement of the latest breakout which is confluent with the 142.50 psychological stage. Holding floor right here could be a giant present from bulls, and this may expose the 38.2% retracement of that transfer sits forward as subsequent resistance. If worth can take a look at as much as that stage, across the 143.00 deal with, we might be seeing a better construct of higher-highs and lows on shorter-term charts.

Recommended by James Stanley

How to Trade USD/JPY

USD/JPY 30-Minute Chart

usdjpy 30m chart

Chart ready by James Stanley; USDJPY on Tradingview

— Written by James Stanley, Senior Strategist, DailyFX.com & Head of DailyFX Education

Contact and observe James on Twitter: @JStanleyFX

!function(){function errMsg(errCode,msg)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)function resolveUrl(relUrl,parentUrl)(-1!==relUrl.indexOf(“:”)?relUrl:resolveIfNotPlainOrUrl(“./”+relUrl,parentUrl))function resolveAndComposePackages(packages,outPackages,baseUrl,parentMap,parentUrl)for(var p in packages)function getMatch(path,matchObj)if(matchObj[path])return path;var sepIndex=path.length;dovar segment=path.slice(0,sepIndex+1);if(segment in matchObj)return segmentwhile(-1!==(sepIndex=path.lastIndexOf(“/”,sepIndex-1)))function applyPackages(id,pkg)var pkgName=getMatch(id,pkg);if(pkgName)pkg=pkg[pkgName];if(null!==pkg)return id.length>pkgName.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)var toStringTag=hasSymbol&&Symbol.toStringTag,REGISTRY=hasSymbol?Symbol():”@”;function SystemJS()this[REGISTRY]=var lastRegister,systemJSPrototype=SystemJS.prototype;function loadToId(load)return load.idfunction triggerOnload(loader,load,err,isErrSource)if(loader.onload(err,load.id,load.d&&load.d.map(loadToId),!!isErrSource),err)throw errfunction 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)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()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()(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 0var depLoadPromises;load.d.forEach(function(depLoad)tryvar depLoadPromise=postOrderExec(loader,depLoad,seen);depLoadPromise&&(depLoadPromises=depLoadPromisescatch(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()tryvar 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 0catch(err)throw load.er=errfinallyload.e=null,triggerOnload(loader,load,load.er,!0)(loader,load,)}).then(function()return load.n)}(loader,load)})},systemJSPrototype.createContext=function(parentId)var loader=this;returnurl:parentId,resolve:function(id,parentUrl)return Promise.resolve(loader.resolve(id,parentUrl,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)(“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)baseUrl)))))}systemJSPrototype.prepareImport=function(doProcessScripts)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)):instantiate.apply(this,arguments),systemJSPrototype.resolve=function(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()(firstGlobalProp?secondGlobalProp=secondGlobalProp(),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!==firstGlobalPropreturn result(this.firstGlobalProp);if(!globalProp)return emptyInstantiation;tryglobalExport=global[globalProp]catch(e)return emptyInstantiationreturn[[],function(_export)returnexecute:function()_export(globalExport),_export(default:globalExport,__useDefault:!0)]};var isIE11="undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Trident");function shouldSkipProperty(p)!isNaN(p)&&pnew Promise((resolve,reject)=>var fulfilled=value=>trystep(generator.next(value))catch(e)reject(e),rejected=value=>trystep(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)raise(TypeError,”parameter 1 is not of type ‘HTMLElement'”),”submit”==submitter.type(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;elseif(“SubmitEvent”in window)return;prototype=window.Event.prototypeaddEventListener(“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 HTMLElementconstructor()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()varsrc=this;this.src=null,this.src=srcattributeChangedCallback(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()””)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.isLoadingget isActive()return this.ownerDocument===document&&!this.isPreviewget isPreview()void 0===_b?void 0:_b.documentElement)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 0function getAction(form,submitter)function getExtension(url)function isPrefixedBy(baseURL,prefix)function locationIsVisitable(location2,rootLocation)return isPrefixedBy(location2,rootLocation)&&function isHTML(url)html(location2)function getRequestURL(url)var anchor=getAnchor(url);return null!=anchor?url.href.slice(0,-(anchor.length+1)):url.hreffunction toCacheKey(url)return getRequestURL(url)class FetchResponseconstructor(response)this.response=responseget succeeded()return this.response.okget failed()return!this.succeededget clientError()return 400<=this.statusCode&&this.statusCode<=499get 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()18==ifunction getAttribute(attributeName,…elements)for(const value of elements.map(element=>null==element?void 0:element.getAttribute(attributeName)))if(“string”==typeof value)return value;return nullfunction 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=targetget location()return this.urlget params()return this.url.searchParamsget 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);trythis.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),errorfinallythis.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;returnvoid 0===_a?void 0:_a.hrefget defaultHeaders()returnAccept:”text/html, application/xhtml+xml”get isIdempotent()return this.method==FetchMethod.getget abortSignal()return this.abortController.signalallowRequestToBeIntercepted(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 AppearanceObserverconstructor(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.startedstop()this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))class StreamMessageconstructor(html)this.templateElement=document.createElement(“template”),this.templateElement.innerHTML=htmlstatic wrap(message)return”string”==typeof message?new this(message):messageget fragment()const fragment=document.createDocumentFragment();for(const element of this.foreignElements)fragment.appendChild(document.importNode(element,!0));return fragmentget 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)(this.location,[…this.body.entries()]),this.fetchRequest=new FetchRequest(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=mustRedirectstatic confirmMethod(message,element)return confirm(message)get method()get action()formElementActionget body()this.method==FetchMethod.get?new URLSearchParams(this.stringFormData):this.formDataget enctype()this.formElement.enctype)get isIdempotent()return this.fetchRequest.isIdempotentget 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.confirmationMessagestart()return __async$4(this,null,function*()varinitialized,requesting=FormSubmissionState;if(this.needsConfirmation&&!FormSubmission.confirmMethod(this.confirmationMessage,this.formElement))return;if(this.state==initialized)return this.state=requesting,this.fetchRequest.perform())stop()varstopping,stopped=FormSubmissionState;if(this.state!=stopping&&this.state!=stopped)return this.state=stopping,this.fetchRequest.cancel(),!0prepareHeadersForRequest(headers,token)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:responserequestSucceededWithResponse(error,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.contentclass Snapshotconstructor(element)this.element=elementget children()return[…this.element.children]hasAnchor(anchor)return null!=this.getElementForAnchor(anchor)getElementForAnchor(anchor)return anchor?this.element.querySelector(`[id=’$anchor’], a[name=”$anchor”]`):nullget isConnected()return this.element.isConnectedget 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)varid=currentPermanentElement,newPermanentElement=snapshot.getPermanentElementById(id);newPermanentElement&&(permanentElementMap[id]=[currentPermanentElement,newPermanentElement])return permanentElementMapclass FormInterceptorconstructor(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,this.delegate=delegate,this.element=elementstart()this.element.addEventListener(“submit”,this.submitBubbled)stop()this.element.removeEventListener(“submit”,this.submitBubbled)class Viewconstructor(delegate,element)this.resolveRenderPromise=value=>,this.resolveInterceptionPromise=value=>,this.delegate=delegate,this.element=elementscrollToAnchor(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 windowrender(renderer)return __async$4(this,null,function*()varisPreview,shouldRender,newSnapshot:snapshot=renderer;if(shouldRender)tryfinallydelete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromiseelse 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 Viewinvalidate()this.element.innerHTML=””get snapshot()return new Snapshot(this.element)class LinkInterceptorconstructor(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=elementstart()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.elementclass Bardoconstructor(permanentElementMap)this.permanentElementMap=permanentElementMapstatic 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!0prepareToRender()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(varname,valueof[…sourceElement.attributes])destinationElement.setAttribute(name,value)(createdScriptElement,element),createdScriptElementpreservingPermanentElements(callback)Bardo.preservingPermanentElements(this.permanentElementMap,callback)focusFirstAutofocusableElement()element.focus()get connectedSnapshot()return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshotget currentElement()return this.currentSnapshot.elementget newElement()return this.newSnapshot.elementget permanentElementMap()return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)get cspNonce()}class FrameRenderer extends Rendererget shouldRender()return!0render()return __async$4(this,null,function*()yield nextAnimationFrame(),this.preservingPermanentElements(()=>this.loadFrameElement()),this.scrollFrameIntoView(),yield nextAnimationFrame(),this.focusFirstAutofocusableElement(),yield nextAnimationFrame(),this.activateScriptElements())loadFrameElement()scrollFrameIntoView()activateScriptElements()for(const inertScriptElement of this.newScriptElements)var activatedScriptElement=this.createScriptElement(inertScriptElement);inertScriptElement.replaceWith(activatedScriptElement)get newScriptElements()return this.currentElement.querySelectorAll(“script”)class ProgressBarconstructor()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.animationDurationms ease-out,
opacity $ProgressBar.animationDuration/2ms $ProgressBar.animationDuration/2ms ease-in;
transform: translate3d(0, 0, 0);

`show()(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.trickleIntervalstopTrickling()window.clearInterval(this.trickleInterval),delete this.trickleIntervalrefresh()requestAnimationFrame(()=>this.progressElement.style.width=`$10+90*this.value%`)createStylesheetElement()const element=document.createElement(“style”);return element.type=”text/css”,element.textContent=ProgressBar.defaultCSS,elementcreateProgressElement()const element=document.createElement(“div”);return element.className=”turbo-progress-bar”,elementProgressBar.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)=>{varouterHTML=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)(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)=>,[])getMetaValue(name)const element=this.findMetaElementByName(name);return element?element.getAttribute(“content”):nullfindMetaElementByName(name)return Object.keys(this.detailsByOuterHTML).reduce((result,element)=>varelements:[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 Snapshotconstructor(element,headSnapshot)super(element),this.headSnapshot=headSnapshotstatic 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.elementget 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.cacheControlValueget isCacheable()return”no-cache”!=this.cacheControlValueget 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 Visitconstructor(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=visitCachedSnapshotget adapter()return this.delegate.adapterget view()return this.delegate.viewget history()return this.delegate.historyget restorationData()return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)get silent()return this.isSamePagestart()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()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)conststatusCode,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()this.getPreloadedSnapshot();if(snapshot&&(!getAnchor(this.location)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*()))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()scrollToRestoredPosition()varscrollPosition=this.restorationData;if(scrollPosition)return this.view.scrollToPosition(scrollPosition),!0scrollToAnchor()var anchor=getAnchor(this.location);if(null!=anchor)return this.view.scrollToAnchor(anchor),!0recordTimingMetric(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.pushStatehasPreloadedResponse()return”object”==typeof this.responseshouldIssueRequest()return!this.isSamePage&&(“restore”==this.action?!this.hasCachedSnapshot():this.willRender)cacheSnapshot()this.snapshotCachedrender(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&&statusCodethis.progressBar.show(),this.session=session2visitProposedToLocation(location2,options)this.navigator.startVisit(location2,uuid(),options)visitStarted(visit2)visit2.loadCachedSnapshot(),visit2.issueRequest(),visit2.changeHistory(),visit2.goToSamePageAnchor()visitRequestStarted(visit2)”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.navigatorclass CacheObserverconstructor()this.started=!1start()(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 FormSubmitObserverconstructor(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,this.delegate=delegatestart()stop()this.started&&(removeEventListener(“submit”,this.submitCaptured,!0),this.started=!1)class FrameRedirectorconstructor(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)class Historyconstructor(delegate)this.restorationIdentifier=uuid(),this.restorationData=,this.started=!1,this.pageLoaded=!1,this.onPopState=restorationIdentifier=>this.shouldHandlePopState()&&(turbo:restorationIdentifier=restorationIdentifier.state,this.onPageLoad=event=>__async$4(this,null,function*()yield function nextMicrotask()return Promise.resolve()(),this.pageLoaded=!0),this.delegate=delegatestart()(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=restorationIdentifiergetRestorationDataForIdentifier(restorationIdentifier)updateRestorationData(additionalData)varrestorationIdentifier=this,restorationData=this.restorationData[restorationIdentifier];this.restorationData[restorationIdentifier]=Object.assign(Object.assign(,restorationData),additionalData)assumeControlOfScrollRestoration()var _a;this.previousScrollRestorationrelinquishControlOfScrollRestoration()this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)shouldHandlePopState()return this.pageIsLoaded()pageIsLoaded()class LinkClickObserverconstructor(delegate)this.started=!1,this.clickCaptured=()=>removeEventListener(“click”,this.clickBubbled,!1),addEventListener(“click”,this.clickBubbled,!1),this.clickBubbled=event=>,this.delegate=delegatestart()stop()this.started&&(removeEventListener(“click”,this.clickCaptured,!0),this.started=!1)clickEventIsSignificant(event)event.defaultPreventedfindLinkFromClickTarget(target)if(target instanceof Element)return target.closest(“a[href]:not([target^=_]):not([download])”)getLocationForLink(link)function isAction(action)”restore”==actionclass Navigator{constructor(delegate)this.delegate=delegateproposeVisit(location2,options=)this.delegate.allowsVisitingLocationWithAction(location2,options.action)&&(locationIsVisitable(location2,this.view.snapshot.rootLocation)?this.delegate.visitProposedToLocation(location2,options):window.location.href=location2.toString())startVisit(locatable,restorationIdentifier,options=)this.stop(),this.currentVisit=new Visit(this,expandURL(locatable),restorationIdentifier,Object.assign(referrer:this.location,options)),this.currentVisit.start()submitForm(form,submitter)this.stop(),this.formSubmission=new FormSubmission(this,form,submitter,!0),this.formSubmission.start()stop()this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)get adapter()return this.delegate.adapterget view()return this.delegate.viewget history()return this.delegate.historyformSubmissionStarted(formSubmission)”function”==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(formSubmission)formSubmissionSucceededWithResponse(formSubmission,fetchResponse)return __async$4(this,null,function*()var responseHTML,statusCode,redirected,action;formSubmission!=this.formSubmission)formSubmissionFailedWithResponse(formSubmission,fetchResponse)return __async$4(this,null,function*()var snapshot=yield fetchResponse.responseHTML;snapshot&&(snapshot=PageSnapshot.fromHTMLString(snapshot),fetchResponse.serverError?yield this.view.renderError(snapshot):yield this.view.renderPage(snapshot),this.view.scrollToTop(),this.view.clearSnapshotCache()))formSubmissionErrored(formSubmission,error)console.error(error)formSubmissionFinished(formSubmission)”function”==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(formSubmission)visitStarted(visit2)this.delegate.visitStarted(visit2)visitCompleted(visit2)this.delegate.visitCompleted(visit2)locationWithActionIsSamePage(location2,action)visitScrolledToSamePageLocation(oldURL,newURL)this.delegate.visitScrolledToSamePageLocation(oldURL,newURL)get location()return this.history.locationget restorationIdentifier()return this.history.restorationIdentifiergetActionForFormSubmission(submitter)varformElement:action,submitter=submitter,action=getAttribute(“data-turbo-action”,submitter,action);return isAction(action)?action:”advance”}(Turbo$1=PageStage=PageStage||)[Turbo$1.initial=0]=”initial”,Turbo$1[Turbo$1.loading=1]=”loading”,Turbo$1[Turbo$1.interactive=2]=”interactive”,Turbo$1[Turbo$1.complete=3]=”complete”;class PageObserverconstructor(delegate)this.stage=PageStage.initial,this.started=!1,this.interpretReadyState=()=>varreadyState=this;”interactive”==readyState?this.pageIsInteractive():”complete”==readyState&&this.pageIsComplete(),this.pageWillUnload=()=>this.delegate.pageWillUnload(),this.delegate=delegatestart()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.readyStateclass ScrollObserverconstructor(delegate)this.started=!1,this.onScroll=()=>this.updatePosition(x:window.pageXOffset,y:window.pageYOffset),this.delegate=delegatestart()(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 StreamObserverconstructor(delegate)this.sources=new Set,this.started=!1,this.inspectFetchResponse=event=>var response=function fetchResponseFromEvent(fetchResponse)fetchResponse=null===(fetchResponse=fetchResponse.detail)(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=delegatestart()this.startedstop()this.started&&(this.started=!1,removeEventListener(“turbo:before-fetch-response”,this.inspectFetchResponse,!1))connectStreamSource(source)this.streamSourceIsConnected(source)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 Rendererrender()return __async$4(this,null,function*()this.replaceHeadAndBody(),this.activateScriptElements())replaceHeadAndBody()constdocumentElement,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.elementget scriptElements()return[…document.documentElement.querySelectorAll(“script”)]class PageRenderer extends Rendererget shouldRender()return this.newSnapshot.isVisitable&&this.trackedElementsAreIdenticalprepareToRender()this.mergeHead()render()return __async$4(this,null,function*()this.willRender&&this.replaceBody())finishRendering()this.focusFirstAutofocusableElement()get currentHeadSnapshot()return this.currentSnapshot.headSnapshotget newHeadSnapshot()return this.newSnapshot.headSnapshotget newElement()return this.newSnapshot.elementmergeHead()this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()replaceBody()this.preservingPermanentElements(()=>this.activateNewBody(),this.assignNewBody())get trackedElementsAreIdentical()return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignaturecopyNewHeadStylesheetElements()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.provisionalElementsget newHeadProvisionalElements()return this.newHeadSnapshot.provisionalElementsget newBodyScriptElements()return this.newElement.querySelectorAll(“script”)class SnapshotCacheconstructor(size)this.keys=[],this.snapshots=,this.size=sizehas(location2)return toCacheKey(location2)in this.snapshotsget(location2)if(this.has(location2))var snapshot=this.read(location2);return this.touch(location2),snapshotput(location2,snapshot)return this.write(location2,snapshot),this.touch(location2),snapshotclear()this.snapshots=read(location2)return this.snapshots[toCacheKey(location2)]write(location2,snapshot)this.snapshots[toCacheKey(location2)]=snapshottouch(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 Sessionconstructor()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=!1start()disable()this.enabled=!1stop()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=adaptervisit(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=delayget location()return this.history.locationget restorationIdentifier()return this.history.restorationIdentifierhistoryPoppedToLocationWithRestorationIdentifier(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)convertLinkWithMethodClickToFormSubmission(frame)var linkMethod=frame.getAttribute(“data-turbo-method”);if(linkMethod)const form=document.createElement(“form”);form.method=linkMethod,form.action=frame.getAttribute(“href”)return!1allowsVisitingLocationWithAction(location2,action)return this.locationWithActionIsSamePage(location2,action)visitProposedToLocation(location2,options)extendURLWithDeprecatedProperties(location2),this.adapter.visitProposedToLocation(location2,options)visitStarted(visit2)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)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.silentallowsImmediateRender(element,resume)return!this.notifyApplicationBeforeRender(element,resume).defaultPreventedviewRenderedSnapshot(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).defaultPreventedapplicationAllowsVisitingLocation(location2)return!this.notifyApplicationBeforeVisitingLocation(location2).defaultPreventednotifyApplicationAfterClickingLinkToLocation(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)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 0get snapshot()return this.view.snapshot;varnavigator: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=confirmMethodvar 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 SnapshotSubstitutionconstructor(element)this.visitCachedSnapshot=(element:element2)=>varid:_a,clone=this;null!==(_a=element2.querySelector(“#”+_a))&&void 0!==_a&&_a.replaceWith(clone),this.clone=element.cloneNode(!0),this.id=element.idfunction getFrameElementById(element)if(null!=element)element=document.getElementById(element);if(element instanceof FrameElement)return elementfunction 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(),elementconst StreamActions=after()this.targetElements.forEach(e=>var _a;return null===(_a=e.parentElement)),append()this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent)),before()this.targetElements.forEach(e=>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 HTMLElementconnectedCallback()return __async$4(this,null,function*()tryyield this.render()catch(error)console.error(error)finallythis.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()trythis.remove()catch(_a)removeDuplicateTargetChildren()this.duplicateChildren.forEach(c=>c.remove())get duplicateChildren()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()void 0===element?void 0:element.getElementById(this.target);return null!==element?[element]:[]get targetElementsByQuery()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.connecteddisconnect()this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.linkInterceptor.stop(),this.formInterceptor.stop())disabledChanged()this.loadingStyle==FrameLoadingStyle.eager&&this.loadSourceURL()sourceURLChanged()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)loadResponse(fetchResponse)return __async$4(this,null,function*())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);varfetchRequest=this.formSubmission;this.prepareHeadersForRequest(fetchRequest.headers,fetchRequest),this.formSubmission.start()prepareHeadersForRequest(headers,request)headers[“Turbo-Frame”]=this.idrequestStarted(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!0viewRenderedSnapshot(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=urlproposeVisitIfNavigatedWithAction(frame,element,submitter)const action=getAttribute(“data-turbo-action”,submitter,element,frame);if(isAction(action))constvisitCachedSnapshot=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)this.element.getAttribute(“target”)))&&void 0!==_a?_a:this.elementextractForeignFrameElement(container)return __async$4(this,null,function*()let element;var id=CSS.escape(this.id);tryif(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)this.element.getAttribute(“target”);if(element instanceof HTMLFormElement&&!this.formActionIsVisitable(element,submitter))return!1;if(!this.enabledget id()return this.element.idget enabled()return!this.element.disabledget sourceURL()if(this.element.src)return this.element.srcget 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=!1get loadingStyle()return this.element.loadingget isLoading()get isActive()return this.element.isActive&&this.connectedget 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;trythis.localStorage.setItem(“test”,”test”),this.localStorage.removeItem(“test”),this.isLocalStorageAvailable=!0catch(e)this.isLocalStorageAvailable=!1getCookie(matches)if(matches); )$matches.replace(/([.$?*=([^;]*)`));return matches?decodeURIComponent(matches[1]):void 0setCookie(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=cookieStringdeleteCookie(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 DfxLocalStorageCookieManagerFactorystatic 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=levelnormalizeValue(value)let intValue=parseInt(value);return isNaN(intValue)&&(intValue=3),intValuevar __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor;class DfxGdprCheckerFactorystatic 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=>trystep(generator.next(value))catch(e)reject(e),rejected=value=>trystep(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 DfxGeoLocationconstructor(geoJsUrl,dfxLocalStorageCookieManager)this.geoJsUrl=geoJsUrl,this.dfxLocalStorageCookieManager=dfxLocalStorageCookieManagerinit()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),thisgetLocationFromStorage()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()),thisvar __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor;class DfxGeoLocationFactorystatic create()return new DfxGeoLocation(window.DFX_ENDPOINTS.geoJs,DfxLocalStorageCookieManagerFactory.create())((decorators,target,key,kind)=>)([createSingleton()],DfxGeoLocationFactory,”create”,1);const STATES=OFF:”off”,LOADING:”loading”,READY:”ready”,TRACKINGS=FACEBOOK_PIXEL:”pixel”,GPT:”GPT”,GTM:”GTM”,ADOBE_TRACKING:”adobe_tracking”,TABOOLA_PIXEL:”taboola_pixel”,BAIDU:”baidu”,TWITTER_PIXEL:”twitter_pixel”;class DfxThirdPartyManager{constructor(dfxGdprChecker,dfxLocalStorageCookieManager,facebookPixelId,tagManagerId,tagManagerParams,taboolaPixelId,allowedTrackingsConfig,config)this.config=config,this.allowedTrackingsConfig=allowedTrackingsConfig,this.dfxGdprChecker=dfxGdprChecker,this.dfxLocalStorageCookieManager=dfxLocalStorageCookieManager,this.facebookPixelId=facebookPixelId,this.tagManagerId=tagManagerId,this.tagManagerParams=tagManagerParams,this.taboolaPixelId=taboolaPixelId,this._setDefaultStates()._resetAssetClasses()._resetInstruments()._resetCategories()._resetSitecatConfig(),document.addEventListener(“turbo:visit”,()=>),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,thiscreateAdobeTracking(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;constDfxAdobeTracking=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=>trystep(generator.next(value))catch(e)reject(e),rejected=value=>trystep(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,generatorrunAdobeTracking()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)),thisgetPageNameForAdobeTracking()return this.adobeTrackingState===STATES.READY&&this.dfxAdobeTracking.getPageName()addSitecatConfig(key,value)return this.dfxGdprChecker.checkLevel(2)&&(this.sitecatConfig[key]=value),thiscreateFacebookPixel()(n=t.fbq=function()n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments),t._fbqfacebookPixelTrack(type)return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig[TRACKINGS.FACEBOOK_PIXEL]&&(this.pixelState===STATES.OFF&&this.createFacebookPixel(),this.fbq(“track”,type)),thisfacebookPixelTrackPageView()return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“PageView”),thisfacebookPixelTrackLead()return this.dfxGdprChecker.checkLevel(3)&&this.facebookPixelTrack(“Lead”),thiscreateGTM()createTwitterPixel()return this.dfxGdprChecker.checkLevel(3)&&this.allowedTrackingsConfig[TRACKINGS.TWITTER_PIXEL]&&(u=window,t=document,a=”script”,u.twqcreateGPT()trackGTMpageLoadEvent()return this.dfxGdprChecker.checkLevel(1)&&(window.dataLayer=window.dataLayercreateBaiduTracking()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),thisaddGptAssetClasses(assetClasses)if(!Array.isArray(assetClasses))throw new TypeError(“Param assetClasses must be an Array”);return assetClasses.forEach(assetClass=>this.gptAssetClasses.add(assetClass)),thisaddGptInstrumentPairs(pairs)if(!Array.isArray(pairs))throw new TypeError(“Param pairs must be an Array”);return pairs.forEach(assetClass=>this.gptInstrumentPairs.add(assetClass)),thisaddGptCategories(category=””,subCategory=””)this.gptCategories=category:category,subCategory:subCategorygetGptAssetClasses()return this.gptAssetClassesgetGptInstrumentPairs()return this.gptInstrumentPairsgetGptCategory()return this.gptCategories.categorygetGptSubCategory()return this.gptCategories.subCategorycreateTaboolaPixel()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 DfxConfigconstructor(config)this.config=configget(key)return this.config.get(key)set(key,value)this.config.has(key)var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor;class DfxConfigFactorystatic 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)=>result);kind&&result&&__defProp$2(target,key,result))([createSingleton()],DfxConfigFactory,”create”,1);var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor;class DfxThirdPartyManagerFactorystatic create(allowedTrackingsConfig,config=window.DFX_CONFIG)const dfxConfig=DfxConfigFactory.create();return new DfxThirdPartyManager(DfxGdprCheckerFactory.create(),DfxLocalStorageCookieManagerFactory.create(),dfxConfig.get(“facebookPixelId”),dfxConfig.get(“tagManagerId”),dfxConfig.get(“tagManagerParams”),dfxConfig.get(“taboolaPixelId”),allowedTrackingsConfig,config)((decorators,target,key,kind)=>)([createSingleton()],DfxThirdPartyManagerFactory,”create”,1);class DfxFonts{constructor(document)this.document=document,this.document.fonts&&(this.document.documentElement.classList.add(“dfx-fonts-loading”),this.removeFontsLoading())removeFontsLoading()return __this=this,__arguments=null,generator=function*()yield this.document.fonts.ready,this.document.documentElement.classList.remove(“dfx-fonts-loading”),new Promise((resolve,reject)=>var fulfilled=value=>trystep(generator.next(value))catch(e)reject(e),rejected=value=>trystep(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 DfxFontsFactorystatic create()return new DfxFonts(document)((decorators,target,key,kind)=>)([createSingleton()],DfxFontsFactory,”create”,1);DfxFontsFactory.create();dfxGdprChecker=DfxGdprCheckerFactory.create();const loadScripts=()=>((__this,__arguments,generator)=>new Promise((resolve,reject)=>var fulfilled=value=>trystep(generator.next(value))catch(e)reject(e),rejected=value=>trystep(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*()tryconst 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.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||);



Read The Original Article

Latest Articles

Explore More

%d bloggers like this: