Indices Talking Points:
- This afternoon brings the FOMC’s final rate decision of 2022, with the wide expectation for a 50 basis point hike. The bigger question is what the FOMC is looking at for next year.
- Yesterday brought a strong intra-day reversal, as US equity prices initially jumped at the CPI release, only to pull back in the remainder of the day, exposing a long upper wick on the daily candles of the S&P 500, Nasdaq and Dow Jones.
- The 2022 low was set on October 13th on the heels of a CPI release, two months to the date ahead of yesterday’s CPI report. The October 13th instance brought an extended underside wick, which led to rally for the next two months. Yesterday’s CPI reaction brought a long upper wick – with the big question as to whether this marks the December high for US equities.
- The analysis contained in article relies on price action and chart formations. To learn more about price action or chart patterns, check out our DailyFX Education section.
Recommended by James Stanley
Get Your Free Equities Forecast
Yesterday brought another aggressive reaction to CPI data, somewhat similar to what showed just a couple of months prior. On October 13th, US CPI came out above expectations and stocks initially put in a violent move-lower. The S&P 500 pushed down towards the 3500 level. The Nasdaq hit 10,501, which is the 61.8% Fibonacci retracement of the pandemic move. The Dow, interestingly, held a higher-low above the earlier October print; and then when stocks started to ramp after that CPI release the blue chip index led the way-higher.
Yesterday’s spike saw the Dow get within 5% of the all-time-high that was set in January, marking an incredible recovery move in Q4 trade despite the fact that the Fed is still looking to hike rates and hold tighter policy into 2023.
The big question at this point is by how much and the FOMC will speak to this in the release of the Summary of Economic Projections (SEP). This will contain the dot plot matrix, which is FOMC members’ expectations for rate policy looking ahead. Given some of the possible recessionary signals that have shown along with other fear factors, such as housing numbers, many have started to expect some form of pivot from the FOMC next year.
What that pivot entails is up for question. Some market participants have even started looking for rate cuts next year, under the anticipation that the rate hikes that have already went through will bring about some economic pain that will necessitate looser policy. From most FOMC members’ views, the bank will slow the pace of hikes, starting today, with continued pushes towards tighter policy until inflation is convincingly under control.
Also of consideration for today is seasonality. It’s been a brutal year for equities from a historical standpoint and the S&P 500 just tested above a bullish reversal formation with a couple weeks left in the year. This can keep the door open for a ‘Santa rally’ type of dynamic, particularly if the Fed can avoid freaking market participants out at today’s rate decision.
But, it’s the innuendo that’s important for this afternoon, combined with those expectations for 2023.
S&P 500
Coming into Q4 matters remained very bearish. Stocks were holding near yearly lows after bears got another shot-in-the-arm in August at the Jackson Hole Economic Symposium. After inflation printed higher than expectations on October 13th, the S&P put in a swan dive until support showed just above the 3500 psychological level.
That day brought a strong reversal, highlighting an extended underside wick that shows buyer support jumping into the matter. That bullish push led to the build of a short-term falling wedge, which was breached in November on the release of another CPI report.
Bulls continued that move through the December open but the big question now is whether we’ve seen the opposite scenario appear after the release of yesterday’s CPI report. The mirror image of what happened on October 13th took place yesterday, with sellers showing a brutal reaction to fresh highs around the release of that report. This leaves an exposed upper wick jutting out from the 2022 bearish trendline.
As I had written in this week’s forecast, I was looking for a test above that trendline to be met with a bearish reaction. This can open the door for bearish scenarios but there’s going to need to be follow-through around FOMC, and that may not show immediately as there’s also rate decisions out of Europe and the UK tomorrow morning. But, if this week’s bar holds below yesterday’s swing-high, there could be brewing bearish potential here.
For levels – near-term, 4050 remains as support and below that, it’s the 4k level that looms large. If sellers can push below that, then I’m reverting to the support zone taken from prior resistance, plotted from around 3912-3928. Below that and bears are exhibiting control, which casts next supports down to 3867 and then a confluent zone around 3800. On the upside of price, 4099-4100 remains key, and a break above that opens the door for re-test of 4139. Yesterday’s high is at 4180, and a breach of that negates the bearish theme.
Recommended by James Stanley
Building Confidence in Trading
S&P 500 Daily Chart
Chart prepared by James Stanley; S&P 500 on Tradingview
Nasdaq
The Dow led the way from the October lows and the Nasdaq was the laggard. And given the impact of higher rates on tech-heavy businesses, this made sense. And if there is another wave of bearish action, the Nasdaq could remain as an attractive vehicle as the higher rate environment will likely be a greater burden on tech-heavy companies.
From the daily chart of the Nasdaq, there’s some horizontal resistance that’s been at-work over the past month, from around the 12k psychological level up to 12,074. That zone has been tested multiple times and yesterday’s high printed well-above that area, indicating that bulls have already softened the area up quite a bit, and it’s no longer attractive for reversal scenarios.
What could be more enticing, however, is if we do get another bullish push, allowing for the 12,585 Fibonacci level to come into play. And if that push can run for long enough, the resistance zone taken from around 13k could remain as appealing.
That’s a scenario that I’d anticipate coming into the picture if today’s FOMC leads to a net bullish response, so that reversal scenario in the Nasdaq may have to wait until 2023 trade, if it comes about.
Recommended by James Stanley
Traits of Successful Traders
Nasdaq Daily Chart
Chart prepared by James Stanley; Nasdaq 100 on Tradingview
Dow Jones
The Dow led the way higher from the October low and yesterday’s spike saw the index get less than 5% from the all-time-high that was set in January. This marks an astounding reversal and at this point the index is down a mere 6% from its all-time-high.
The 35k psychological level appears important here. Bulls were able to penetrate that level briefly yesterday but price fell back to earth very quickly. Support soon showed up at a prior resistance swing, and that’s led to another bullish push back up towards 35k.
This would be a difficult breakout to chase given how developed the move is. A lower-high at or inside of the 35k level could be of interest, however. That would be a bearish look, which, if looking for bearish setups in US equities, may be more attractive elsewhere, such as the Nasdaq.
Dow Daily Price Chart
Chart prepared by James Stanley; Dow Jones on Tradingview
— Written by James Stanley, Senior Strategist, DailyFX.com & Head of DailyFX Education
Contact and follow James on Twitter: @JStanleyFX
`show()this.visiblehide()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()var element=document.createElement("style");return element.type="text/css",element.textContent=ProgressBar.defaultCSS,elementcreateProgressElement()var 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(element)element=element.tagName.toLowerCase();return"noscript"==element(element)).map(element=>function elementWithoutNonce(element)element.hasAttribute("nonce")&&element.setAttribute("nonce","");return element(element)).reduce((result,element)=>var outerHTML=element["outerHTML"],details=outerHTML in result?result[outerHTML]:type:function elementType(element)return function elementIsScript(element)element=element.tagName.toLowerCase();return"script"==element(element)?"script":function elementIsStylesheet(element)var tagName=element.tagName.toLowerCase();return"style"==tagName(element)?"stylesheet":void 0(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)=>vartype:outerHTML,tracked,elements=this.detailsByOuterHTML[outerHTML];return null!=outerHTML,[])getMetaValue(name)name=this.findMetaElementByName(name);return name?name.getAttribute("content"):nullfindMetaElementByName(name)return Object.keys(this.detailsByOuterHTML).reduce((result,outerHTML)=>var[outerHTML]=this.detailsByOuterHTML[outerHTML]["elements"];return function elementIsMetaElementWithName(element,name)var tagName=element.tagName.toLowerCase();return"meta"==tagName&&element.getAttribute("name")==name(outerHTML,name)?outerHTML: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"))?_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)(prototype=TimingMetric=TimingMetric||).visitStart="visitStart",prototype.requestStart="requestStart",prototype.requestEnd="requestEnd",prototype.visitEnd="visitEnd",(prototype=VisitState=VisitState||).initialized="initialized",prototype.started="started",prototype.canceled="canceled",prototype.failed="failed";const defaultOptions=action:"advance",historyChanged:!(prototype.completed="completed"),visitCachedSnapshot:()=>,willRender:!0;(prototype=SystemStatusCode=SystemStatusCode||)[prototype.networkFailure=0]="networkFailure",prototype[prototype.timeoutFailure=-1]="timeoutFailure",prototype[prototype.contentTypeMismatch=-2]="contentTypeMismatch";class Visitconstructor(delegate,location2,restorationIdentifier,options=)uuid();varaction:delegate,historyChanged:location2,referrer:restorationIdentifier,snapshotHTML:options,response,visitCachedSnapshot,willRender=Object.assign(Object.assign(,defaultOptions),options);this.action=delegate,this.historyChanged=location2,this.referrer=restorationIdentifier,this.snapshotHTML=options,this.response=response,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=visitCachedSnapshot,this.willRender=willRender,this.scrolled=!willRenderget 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()(_a=this.location.href===(null==(_a=this.referrer)?void 0:_a.href)?"replace":this.action,_a=this.getHistoryMethodForAction(_a),this.history.update(_a,this.location,this.restorationIdentifier),this.historyChanged=!0)issueRequest()this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new FetchRequest(this,FetchMethod.get,this.location),this.request.perform())simulateRequest()this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())startRequest()this.recordTimingMetric(TimingMetric.requestStart),this.adapter.visitRequestStarted(this)recordResponse(response=this.response)(this.response=response)&&(response=response["statusCode"],isSuccessful(response)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,response))finishRequest()this.recordTimingMetric(TimingMetric.requestEnd),this.adapter.visitRequestFinished(this)loadResponse()if(this.response)conststatusCode,responseHTML=this.response;this.render(()=>__async$3(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()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$3(this,null,function*()this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&(yield this.view.renderPromise),yield this.view.renderPage(snapshot,isPreview,this.willRender),this.adapter.visitRendered(this),isPreview))followRedirect()var _a;this.redirectedToLocation&&!this.followedRedirect&&null!=(_a=this.response)&&_a.redirected&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,action:"replace",response:this.response),this.followedRedirect=!0)goToSamePageAnchor()this.isSamePage&&this.render(()=>__async$3(this,null,function*()this.cacheSnapshot(),this.adapter.visitRendered(this)))requestStarted()this.startRequest()requestPreventedHandlingResponse(request,response)requestSucceededWithResponse(request,response)return __async$3(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$3(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()var scrollPosition=this.restorationData["scrollPosition"];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.view.cacheSnapshot().then(snapshot=>snapshot&&this.visitCachedSnapshot(snapshot)),this.snapshotCached=!0)render(callback)return __async$3(this,null,function*()this.cancelRender(),yield new Promise(resolve=>this.frame=requestAnimationFrame(()=>resolve())),yield callback(),delete this.frame,this.performScroll())cancelRender()this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)function isSuccessful(statusCode)return 200<=statusCode&&statusCode<300class BrowserAdapterconstructor(session2)this.progressBar=new ProgressBar,this.showProgressBar=()=>this.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()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=>void 0,form&&"dialog"!=((null==submitter?void 0:submitter.getAttribute("formmethod")),this.delegate=delegatestart()this.startedstop()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)var frame=this.findFrameElement(element);frame&&frame.delegate.linkClickIntercepted(element,url)shouldInterceptFormSubmission(element,submitter)return this.shouldSubmit(element,submitter)formSubmissionIntercepted(element,submitter)var frame=this.findFrameElement(element,submitter);frame&&(frame.removeAttribute("reloadable"),frame.delegate.formSubmissionIntercepted(element,submitter))shouldSubmit(form,submitter)var action=getAction(form,submitter),meta=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),meta=expandURL(null!=(meta=null==meta?void 0:meta.content)?meta:"/");return this.shouldRedirect(form,submitter)&&locationIsVisitable(action,meta)shouldRedirect(element,submitter)submitter=this.findFrameElement(element,submitter);return!!submitter&&submitter!=element.closest("turbo-frame")findFrameElement(element,submitter)submitter=(null==submitter?void 0:submitter.getAttribute("data-turbo-frame"))class Historyconstructor(delegate)this.restorationIdentifier=uuid(),this.restorationData=,this.started=!1,this.pageLoaded=!1,this.onPopState=event=>)["turbo"],event&&(this.location=new URL(window.location.href),event=event["restorationIdentifier"],this.restorationIdentifier=event,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,event))),this.onPageLoad=event=>__async$3(this,null,function*()yield function nextMicrotask()return Promise.resolve()(),this.pageLoaded=!0),this.delegate=delegatestart()this.startedstop()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)var restorationIdentifier=this["restorationIdentifier"],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()"complete"==document.readyStateclass LinkClickObserverconstructor(delegate)this.started=!1,this.clickCaptured=()=>removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1),this.clickBubbled=event=>var target,location2;this.clickEventIsSignificant(event)&&(target=event.composedPath&&event.composedPath()[0],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)return"advance"==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$3(this,null,function*()var responseHTML,statusCode,redirected,action;formSubmission==this.formSubmission&&(responseHTML=yield fetchResponse.responseHTML)&&(formSubmission.method!=FetchMethod.get&&this.view.clearSnapshotCache(),statusCode,redirected=fetchResponse,action=this.getActionForFormSubmission(formSubmission),this.proposeVisit(fetchResponse.location,action:action,response:statusCode:statusCode,responseHTML:responseHTML,redirected:redirected)))formSubmissionFailedWithResponse(formSubmission,fetchResponse)return __async$3(this,null,function*()var responseHTML=yield fetchResponse.responseHTML;responseHTML&&(responseHTML=PageSnapshot.fromHTMLString(responseHTML),fetchResponse.serverError?yield this.view.renderError(responseHTML):yield this.view.renderPage(responseHTML),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(formSubmission)varformElement:formSubmission,submitter=formSubmission,submitter=getAttribute("data-turbo-action",submitter,formSubmission);return isAction(submitter)?submitter:"advance"}(prototype=PageStage=PageStage||)[prototype.initial=0]="initial",prototype[prototype.loading=1]="loading",prototype[prototype.interactive=2]="interactive",prototype[prototype.complete=3]="complete";class PageObserverconstructor(delegate)this.stage=PageStage.initial,this.started=!1,this.interpretReadyState=()=>var readyState=this["readyState"];"interactive"==readyState?this.pageIsInteractive():"complete"==readyState&&this.pageIsComplete(),this.pageWillUnload=()=>this.delegate.pageWillUnload(),this.delegate=delegatestart()this.startedstop()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(event)event=null==(event=event.detail)?void 0:event.fetchResponse;if(event instanceof FetchResponse)return event(event);response&&function fetchResponseIsStream(response)response=null!=(response=response.contentType)?response:"";return response.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.started=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))stop()this.started&&(this.started=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))connectStreamSource(source)(this.sources.add(source),source.addEventListener("message",this.receiveMessageEvent,!1))disconnectStreamSource(source)this.streamSourceIsConnected(source)&&(this.sources.delete(source),source.removeEventListener("message",this.receiveMessageEvent,!1))streamSourceIsConnected(source)return this.sources.has(source)receiveMessageResponse(response)return __async$3(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$3(this,null,function*()this.replaceHeadAndBody(),this.activateScriptElements())replaceHeadAndBody()vardocumentElement,head,body=document;documentElement.replaceChild(this.newHead,head),documentElement.replaceChild(this.newElement,body)activateScriptElements()for(const replaceableElement of this.scriptElements)var element,parentNode=replaceableElement.parentNode;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$3(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)var snapshot;if(this.has(location2))return snapshot=this.read(location2),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(location2)var location2=toCacheKey(location2),index=this.keys.indexOf(location2);-1setTimeout(()=>resolve(),0))(),snapshot=snapshot.clone(),this.snapshotCache.put(location2,snapshot),snapshot)getCachedSnapshotForLocation(location2)return this.snapshotCache.get(location2)get snapshot()return PageSnapshot.fromElement(this.element)get shouldCacheSnapshot()return this.snapshot.isCacheablefunction 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()this.starteddisable()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(link)var linkMethod=link.getAttribute("data-turbo-method");if(linkMethod)return!1allowsVisitingLocationWithAction(location2,action)visitProposedToLocation(location2,options)extendURLWithDeprecatedProperties(location2),this.adapter.visitProposedToLocation(location2,options)visitStarted(visit2)this.notifyApplicationAfterVisitingLocation(visit2.location,visit2.action)visitCompleted(visit2)this.notifyApplicationAfterPageLoad(visit2.getTimingMetrics())locationWithActionIsSamePage(location2,action)return this.navigator.locationWithActionIsSamePage(location2,action)visitScrolledToSamePageLocation(oldURL,newURL)this.notifyApplicationAfterVisitingSamePageLocation(oldURL,newURL)willSubmitForm(form,submitter)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)&&_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)"false"!=element.getAttribute("data-turbo"):!!element&&"true"==element.getAttribute("data-turbo")getActionForLink(link)link=link.getAttribute("data-turbo-action");return isAction(link)?link:"advance"getTargetFrameForLink(link)var frame=link.getAttribute("data-turbo-frame");return frameget snapshot()return this.view.snapshot;var prototype=session["navigator"];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=Object.freeze(__proto__:null,navigator:prototype,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,clone=this;null!=(element2=element2.querySelector("#"+id))&&element2.replaceWith(clone),this.clone=element.cloneNode(!0),this.id=element.idfunction getFrameElementById(id)if(null!=id)id=document.getElementById(id);if(id instanceof FrameElement)return idfunction 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)?void 0:_a.insertBefore(this.templateContent,e.nextSibling)),append()this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent)),before()this.targetElements.forEach(e=>var _a;return null==(_a=e.parentElement)?void 0:_a.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$3(this,null,function*()tryyield this.render()catch(error)console.error(error)finallythis.disconnect())render()return __async$3(this,null,function*()var _a;return null!=(_a=this.renderPromise)?_a:this.renderPromise=__async$3(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()var _a,existingChildren=this.targetElements.flatMap(e=>[...e.children]).filter(c=>!!c.id);const newChildrenIds=[...null==(_a=this.templateContent)?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